@lcap/nasl-unified-frontend-generator 4.1.0-beta.1 → 4.1.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -28,6 +28,7 @@ interface CommonAppConfig {
28
28
  isExport?: boolean;
29
29
  needCompileViews?: string[];
30
30
  cacheChunksMapCode?: string;
31
+ feLoadDependenciesOnDemand?: boolean;
31
32
  /**
32
33
  * 插件用的配置项
33
34
  */
@@ -117,7 +118,7 @@ interface I18nInfo {
117
118
  declare const metadataPlugin: {
118
119
  name: string;
119
120
  functions: {
120
- makeBasePlatformConfig(app: Pick<App, "name" | "dnsAddr" | "hasUserCenter" | "hasAuth" | "sysPrefixPath" | "id" | "appTimeZone">, frontend: Frontend, config: CommonAppConfig): BasePlatformConfig;
121
+ makeBasePlatformConfig(app: Pick<App, 'name' | 'dnsAddr' | 'hasUserCenter' | 'hasAuth' | 'sysPrefixPath' | 'id' | 'appTimeZone'>, frontend: Frontend, config: CommonAppConfig): BasePlatformConfig;
121
122
  };
122
123
  };
123
124
 
@@ -172,6 +173,10 @@ type Package = {
172
173
  name: string;
173
174
  version: string;
174
175
  hasCss?: boolean;
176
+ /**
177
+ * 是否被应用使用
178
+ */
179
+ used?: boolean;
175
180
  };
176
181
  type IdentifierString = string & {
177
182
  readonly __tag?: unique symbol;
@@ -641,7 +646,7 @@ declare const routesExtractionPlugin: {
641
646
  functions: {
642
647
  extractRoute(components: ViewComponentIR[], routePrefix: string, options?: {
643
648
  lazy?: boolean;
644
- frameworkKind?: "react" | "vue2" | "vue3";
649
+ frameworkKind?: 'react' | 'vue2' | 'vue3';
645
650
  }): {
646
651
  routes: RouteIR[];
647
652
  authResourcePaths: string[];
@@ -691,16 +696,18 @@ declare class FileSystemPlugin implements GeneratorInfrastructureDomain.FileSyst
691
696
 
692
697
  type AnalyzerOptions = {
693
698
  asyncAnalysis?: boolean;
699
+ depAnalysis?: boolean;
694
700
  };
695
701
  type AnalyzerManager = {
696
702
  setOptions(options: AnalyzerOptions): void;
697
703
  };
698
- declare class AnalyzerManagerPlugin implements AnalyzerManager, NASLDomain.IRPreProcesser {
704
+ declare class AnalyzerManagerPlugin implements AnalyzerManager, NASLDomain.IRPreProcesser, NASLDomain.IRPostProcesser {
699
705
  preProcess(app: App, frontend: Frontend, config: CommonAppConfig): {
700
706
  app: App;
701
707
  frontend: Frontend;
702
708
  config: CommonAppConfig;
703
709
  };
710
+ postProcess(ir: NASLAppIR, config: CommonAppConfig): NASLAppIR;
704
711
  private options;
705
712
  /**
706
713
  * 设置完整的分析选项
@@ -712,7 +719,7 @@ declare class AnalyzerManagerPlugin implements AnalyzerManager, NASLDomain.IRPre
712
719
  * @returns 分析选项
713
720
  */
714
721
  getOptions(): AnalyzerOptions;
715
- static install(c: Container): void;
722
+ static install(c: Container): Container;
716
723
  }
717
724
 
718
725
  declare class NameManglerManagerPlugin implements NASLDomain.IRPreProcesser {
@@ -1172,10 +1179,18 @@ declare const reactComponentLibHackPlugin: {
1172
1179
  name: string;
1173
1180
  functions: {
1174
1181
  __hooksDefinitions(): ReactFileDescription;
1175
- hackBindAttribute<T extends BindAttributeIR & {
1182
+ hackBindAttribute<T extends {
1176
1183
  kind: "expr";
1184
+ expression: ExprIR;
1185
+ __raw: _lcap_nasl_concepts.BindAttribute;
1186
+ sync: boolean;
1187
+ } & {
1188
+ concept: "BindAttribute";
1189
+ name: string;
1190
+ } & {
1191
+ kind: 'expr';
1177
1192
  }>(b: T): BindAttributeIR & {
1178
- kind: "expr";
1193
+ kind: 'expr';
1179
1194
  };
1180
1195
  };
1181
1196
  };
@@ -1672,7 +1687,7 @@ declare class VirtualProject {
1672
1687
  getFileDict(): {
1673
1688
  files: Record<string, ProjectFile>;
1674
1689
  };
1675
- readFile(path: string): string | Buffer<ArrayBufferLike>;
1690
+ readFile(path: string): string | Buffer;
1676
1691
  }
1677
1692
  declare function compileAsProject(app: App, frontend: Frontend, config: CommonAppConfig, container?: Container): Promise<VirtualProject>;
1678
1693
  declare function compileNASLToReactDist(app: App, frontend: Frontend, config: CommonAppConfig, http: AxiosInstance): Promise<OrganizedFile[]>;
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ interface CommonAppConfig {
28
28
  isExport?: boolean;
29
29
  needCompileViews?: string[];
30
30
  cacheChunksMapCode?: string;
31
+ feLoadDependenciesOnDemand?: boolean;
31
32
  /**
32
33
  * 插件用的配置项
33
34
  */
@@ -117,7 +118,7 @@ interface I18nInfo {
117
118
  declare const metadataPlugin: {
118
119
  name: string;
119
120
  functions: {
120
- makeBasePlatformConfig(app: Pick<App, "name" | "dnsAddr" | "hasUserCenter" | "hasAuth" | "sysPrefixPath" | "id" | "appTimeZone">, frontend: Frontend, config: CommonAppConfig): BasePlatformConfig;
121
+ makeBasePlatformConfig(app: Pick<App, 'name' | 'dnsAddr' | 'hasUserCenter' | 'hasAuth' | 'sysPrefixPath' | 'id' | 'appTimeZone'>, frontend: Frontend, config: CommonAppConfig): BasePlatformConfig;
121
122
  };
122
123
  };
123
124
 
@@ -172,6 +173,10 @@ type Package = {
172
173
  name: string;
173
174
  version: string;
174
175
  hasCss?: boolean;
176
+ /**
177
+ * 是否被应用使用
178
+ */
179
+ used?: boolean;
175
180
  };
176
181
  type IdentifierString = string & {
177
182
  readonly __tag?: unique symbol;
@@ -641,7 +646,7 @@ declare const routesExtractionPlugin: {
641
646
  functions: {
642
647
  extractRoute(components: ViewComponentIR[], routePrefix: string, options?: {
643
648
  lazy?: boolean;
644
- frameworkKind?: "react" | "vue2" | "vue3";
649
+ frameworkKind?: 'react' | 'vue2' | 'vue3';
645
650
  }): {
646
651
  routes: RouteIR[];
647
652
  authResourcePaths: string[];
@@ -691,16 +696,18 @@ declare class FileSystemPlugin implements GeneratorInfrastructureDomain.FileSyst
691
696
 
692
697
  type AnalyzerOptions = {
693
698
  asyncAnalysis?: boolean;
699
+ depAnalysis?: boolean;
694
700
  };
695
701
  type AnalyzerManager = {
696
702
  setOptions(options: AnalyzerOptions): void;
697
703
  };
698
- declare class AnalyzerManagerPlugin implements AnalyzerManager, NASLDomain.IRPreProcesser {
704
+ declare class AnalyzerManagerPlugin implements AnalyzerManager, NASLDomain.IRPreProcesser, NASLDomain.IRPostProcesser {
699
705
  preProcess(app: App, frontend: Frontend, config: CommonAppConfig): {
700
706
  app: App;
701
707
  frontend: Frontend;
702
708
  config: CommonAppConfig;
703
709
  };
710
+ postProcess(ir: NASLAppIR, config: CommonAppConfig): NASLAppIR;
704
711
  private options;
705
712
  /**
706
713
  * 设置完整的分析选项
@@ -712,7 +719,7 @@ declare class AnalyzerManagerPlugin implements AnalyzerManager, NASLDomain.IRPre
712
719
  * @returns 分析选项
713
720
  */
714
721
  getOptions(): AnalyzerOptions;
715
- static install(c: Container): void;
722
+ static install(c: Container): Container;
716
723
  }
717
724
 
718
725
  declare class NameManglerManagerPlugin implements NASLDomain.IRPreProcesser {
@@ -1172,10 +1179,18 @@ declare const reactComponentLibHackPlugin: {
1172
1179
  name: string;
1173
1180
  functions: {
1174
1181
  __hooksDefinitions(): ReactFileDescription;
1175
- hackBindAttribute<T extends BindAttributeIR & {
1182
+ hackBindAttribute<T extends {
1176
1183
  kind: "expr";
1184
+ expression: ExprIR;
1185
+ __raw: _lcap_nasl_concepts.BindAttribute;
1186
+ sync: boolean;
1187
+ } & {
1188
+ concept: "BindAttribute";
1189
+ name: string;
1190
+ } & {
1191
+ kind: 'expr';
1177
1192
  }>(b: T): BindAttributeIR & {
1178
- kind: "expr";
1193
+ kind: 'expr';
1179
1194
  };
1180
1195
  };
1181
1196
  };
@@ -1672,7 +1687,7 @@ declare class VirtualProject {
1672
1687
  getFileDict(): {
1673
1688
  files: Record<string, ProjectFile>;
1674
1689
  };
1675
- readFile(path: string): string | Buffer<ArrayBufferLike>;
1690
+ readFile(path: string): string | Buffer;
1676
1691
  }
1677
1692
  declare function compileAsProject(app: App, frontend: Frontend, config: CommonAppConfig, container?: Container): Promise<VirtualProject>;
1678
1693
  declare function compileNASLToReactDist(app: App, frontend: Frontend, config: CommonAppConfig, http: AxiosInstance): Promise<OrganizedFile[]>;