@lcap/nasl-unified-frontend-generator 0.0.1-beta.4 → 3.8.3-alpha.2-optimize

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
@@ -2,6 +2,7 @@ import * as _lcap_nasl from '@lcap/nasl';
2
2
  import { App, Frontend, LogicItem, genMetaData, FrontendVariable, TypeAnnotation, DefaultValue, Logic, BindAttribute, BindDirective, BindEvent, View, ViewElement, ValidationRule, Identifier, Return, Variable, Param, BindStyle } from '@lcap/nasl';
3
3
  import { Container } from 'inversify';
4
4
  import { format } from 'prettier/standalone';
5
+ import { AxiosInstance } from 'axios';
5
6
  import pino from 'pino';
6
7
 
7
8
  interface CommonAppConfig {
@@ -746,7 +747,9 @@ declare class ReactFileDescription {
746
747
  * @param importResolver - import 解析函数
747
748
  * @returns 序列化后的字符串
748
749
  */
749
- serialize(importResolver: ImportIRResolver): Promise<string>;
750
+ serialize(importResolver: ImportIRResolver, options?: {
751
+ noFormat?: boolean;
752
+ }): Promise<string>;
750
753
  /**
751
754
  * 将另外一个文件描述合并到当前文件描述(修改当前文件描述)
752
755
  * @param other - 另一个文件描述
@@ -1065,6 +1068,12 @@ declare namespace GeneratorInfrastructureDomain {
1065
1068
  organize(config: {
1066
1069
  baseDir: string;
1067
1070
  project: Record<string, InputFile | InputFile[]>;
1071
+ options?: {
1072
+ /**
1073
+ * 不格式化
1074
+ */
1075
+ noFormat?: boolean;
1076
+ };
1068
1077
  }): Promise<OrganizedFile[]>;
1069
1078
  }
1070
1079
  export { };
@@ -1262,6 +1271,12 @@ type InputFile = ReactFileDescription;
1262
1271
  type ProjectStructureConfig = {
1263
1272
  baseDir: string;
1264
1273
  project: Record<string, InputFile | InputFile[]>;
1274
+ options?: {
1275
+ /**
1276
+ * 不格式化
1277
+ */
1278
+ noFormat?: boolean;
1279
+ };
1265
1280
  };
1266
1281
  /**
1267
1282
  * 已经被放置在文件系统中的文件
@@ -1307,7 +1322,7 @@ declare class VirtualProject {
1307
1322
  };
1308
1323
  readFile(path: string): string;
1309
1324
  }
1310
- declare function compileAsProject(app: App, frontend: Frontend, config: CommonAppConfig, container?: Container): Promise<VirtualProject>;
1325
+ declare function compileAsProject(app: App, frontend: Frontend, config: CommonAppConfig, container?: Container, axios?: AxiosInstance): Promise<VirtualProject>;
1311
1326
  declare function compileNASLToReactDist(app: App, frontend: Frontend, config: CommonAppConfig): Promise<OrganizedFile[]>;
1312
1327
 
1313
1328
  declare function makeDefaultContainer(): Container;
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as _lcap_nasl from '@lcap/nasl';
2
2
  import { App, Frontend, LogicItem, genMetaData, FrontendVariable, TypeAnnotation, DefaultValue, Logic, BindAttribute, BindDirective, BindEvent, View, ViewElement, ValidationRule, Identifier, Return, Variable, Param, BindStyle } from '@lcap/nasl';
3
3
  import { Container } from 'inversify';
4
4
  import { format } from 'prettier/standalone';
5
+ import { AxiosInstance } from 'axios';
5
6
  import pino from 'pino';
6
7
 
7
8
  interface CommonAppConfig {
@@ -746,7 +747,9 @@ declare class ReactFileDescription {
746
747
  * @param importResolver - import 解析函数
747
748
  * @returns 序列化后的字符串
748
749
  */
749
- serialize(importResolver: ImportIRResolver): Promise<string>;
750
+ serialize(importResolver: ImportIRResolver, options?: {
751
+ noFormat?: boolean;
752
+ }): Promise<string>;
750
753
  /**
751
754
  * 将另外一个文件描述合并到当前文件描述(修改当前文件描述)
752
755
  * @param other - 另一个文件描述
@@ -1065,6 +1068,12 @@ declare namespace GeneratorInfrastructureDomain {
1065
1068
  organize(config: {
1066
1069
  baseDir: string;
1067
1070
  project: Record<string, InputFile | InputFile[]>;
1071
+ options?: {
1072
+ /**
1073
+ * 不格式化
1074
+ */
1075
+ noFormat?: boolean;
1076
+ };
1068
1077
  }): Promise<OrganizedFile[]>;
1069
1078
  }
1070
1079
  export { };
@@ -1262,6 +1271,12 @@ type InputFile = ReactFileDescription;
1262
1271
  type ProjectStructureConfig = {
1263
1272
  baseDir: string;
1264
1273
  project: Record<string, InputFile | InputFile[]>;
1274
+ options?: {
1275
+ /**
1276
+ * 不格式化
1277
+ */
1278
+ noFormat?: boolean;
1279
+ };
1265
1280
  };
1266
1281
  /**
1267
1282
  * 已经被放置在文件系统中的文件
@@ -1307,7 +1322,7 @@ declare class VirtualProject {
1307
1322
  };
1308
1323
  readFile(path: string): string;
1309
1324
  }
1310
- declare function compileAsProject(app: App, frontend: Frontend, config: CommonAppConfig, container?: Container): Promise<VirtualProject>;
1325
+ declare function compileAsProject(app: App, frontend: Frontend, config: CommonAppConfig, container?: Container, axios?: AxiosInstance): Promise<VirtualProject>;
1311
1326
  declare function compileNASLToReactDist(app: App, frontend: Frontend, config: CommonAppConfig): Promise<OrganizedFile[]>;
1312
1327
 
1313
1328
  declare function makeDefaultContainer(): Container;