From fd34dcc54bb3dea79378e60e8da741bb38f1ea69 Mon Sep 17 00:00:00 2001 From: sumeyye Date: Fri, 9 Jan 2026 10:39:18 +0300 Subject: [PATCH] fix: remote stream content array check --- .../packages/schematics/src/utils/methods.ts | 5 +++++ .../packages/schematics/src/utils/service.ts | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/npm/ng-packs/packages/schematics/src/utils/methods.ts b/npm/ng-packs/packages/schematics/src/utils/methods.ts index d3fc935819..6d31903a78 100644 --- a/npm/ng-packs/packages/schematics/src/utils/methods.ts +++ b/npm/ng-packs/packages/schematics/src/utils/methods.ts @@ -19,4 +19,9 @@ export const getParamValueName = (paramName: string, descriptorName: string) => export function isDictionaryType(type?: string, typeSimple?: string): boolean { const haystacks = [type || '', typeSimple || '']; return haystacks.some(t => /(^|\b)(System\.Collections\.Generic\.)?(I)?Dictionary\s* /(^|\b)(System\.Collections\.Generic\.)?(I)?(List|Enumerable|Collection)\s* `${x}[]`).some(x => x === type); + // Check for array types like Volo.Abp.Content.IRemoteStreamContent[] + if (VOLO_REMOTE_STREAM_CONTENT.map(x => `${x}[]`).some(x => x === type)) { + return true; + } + + // Check for collection types like List, IEnumerable, ICollection, Collection, IList + // This matches any generic type from System.Collections.Generic that implements IEnumerable + if (isCollectionType(type)) { + const { generics } = extractGenerics(type); + if (generics.length > 0 && VOLO_REMOTE_STREAM_CONTENT.includes(generics[0])) { + return true; + } + } + + return false; } function getMethodNameFromAction(action: Action): string {