@lcap/nasl-unified-frontend-generator 4.0.0-rc.1 → 4.1.0-beta.1
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +106 -119
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +102 -115
- package/dist/index.mjs.map +1 -1
- package/dist/playground.js +106 -119
- package/dist/playground.js.map +1 -1
- package/dist/playground.mjs +102 -115
- package/dist/playground.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -103,11 +103,11 @@ var import_axios2 = __toESM(require("axios"));
|
|
|
103
103
|
var import_lodash9 = require("lodash");
|
|
104
104
|
|
|
105
105
|
// src/default-container.ts
|
|
106
|
-
var
|
|
106
|
+
var import_inversify31 = require("inversify");
|
|
107
107
|
|
|
108
108
|
// src/plugins/vue/vue3/vue3-preset-plugin.ts
|
|
109
|
-
var
|
|
110
|
-
var
|
|
109
|
+
var import_reflection6 = require("@abraham/reflection");
|
|
110
|
+
var import_inversify30 = require("inversify");
|
|
111
111
|
|
|
112
112
|
// src/service-metakind.ts
|
|
113
113
|
var ServiceMetaKind = {
|
|
@@ -2343,7 +2343,8 @@ query: {`;
|
|
|
2343
2343
|
let url2 = "`";
|
|
2344
2344
|
const viewArr = s3.genViewArr();
|
|
2345
2345
|
if (Array.isArray(viewArr) && viewArr.length) {
|
|
2346
|
-
|
|
2346
|
+
const prefixPath = s3.frontend?.prefixPath;
|
|
2347
|
+
url2 += `${prefixPath}/${viewArr.join("/")}`;
|
|
2347
2348
|
const { completeArguments } = s3;
|
|
2348
2349
|
if (completeArguments.length) {
|
|
2349
2350
|
const node = s3.viewNode;
|
|
@@ -4291,40 +4292,40 @@ var metadataPlugin = makePlugin({
|
|
|
4291
4292
|
// src/hack/material-config/material.config.js
|
|
4292
4293
|
var materials = {
|
|
4293
4294
|
framework: {
|
|
4294
|
-
version: "2.
|
|
4295
|
+
version: "2.1.0",
|
|
4295
4296
|
core: "@lcap/basic-template",
|
|
4296
4297
|
pc: [
|
|
4297
4298
|
{
|
|
4298
4299
|
frameworkKind: "vue2",
|
|
4299
4300
|
name: "@lcap/pc-template",
|
|
4300
|
-
version: "2.
|
|
4301
|
+
version: "2.1.0"
|
|
4301
4302
|
},
|
|
4302
4303
|
{
|
|
4303
4304
|
frameworkKind: "react",
|
|
4304
4305
|
name: "@lcap/pc-template-react",
|
|
4305
|
-
version: "2.
|
|
4306
|
+
version: "2.1.0"
|
|
4306
4307
|
},
|
|
4307
4308
|
{
|
|
4308
4309
|
frameworkKind: "vue3",
|
|
4309
4310
|
name: "@lcap/pc-template-vue3",
|
|
4310
|
-
version: "2.
|
|
4311
|
+
version: "2.1.0"
|
|
4311
4312
|
}
|
|
4312
4313
|
],
|
|
4313
4314
|
h5: [
|
|
4314
4315
|
{
|
|
4315
4316
|
frameworkKind: "vue2",
|
|
4316
4317
|
name: "@lcap/mobile-template",
|
|
4317
|
-
version: "2.
|
|
4318
|
+
version: "2.1.0"
|
|
4318
4319
|
},
|
|
4319
4320
|
{
|
|
4320
4321
|
frameworkKind: "react",
|
|
4321
4322
|
name: "@lcap/mobile-template-react",
|
|
4322
|
-
version: "2.
|
|
4323
|
+
version: "2.1.0"
|
|
4323
4324
|
},
|
|
4324
4325
|
{
|
|
4325
4326
|
frameworkKind: "vue3",
|
|
4326
4327
|
name: "@lcap/mobile-template-vue3",
|
|
4327
|
-
version: "2.
|
|
4328
|
+
version: "2.1.0"
|
|
4328
4329
|
}
|
|
4329
4330
|
]
|
|
4330
4331
|
},
|
|
@@ -7004,7 +7005,7 @@ BundlerConfigDataPlugin = __decorateClass([
|
|
|
7004
7005
|
__decorateParam(0, (0, import_inversify16.inject)(ServiceMetaKind.FrontendBundlerConfig))
|
|
7005
7006
|
], BundlerConfigDataPlugin);
|
|
7006
7007
|
|
|
7007
|
-
// src/plugins/misc/bundler/
|
|
7008
|
+
// src/plugins/misc/bundler/rspack-config-plugin.ts
|
|
7008
7009
|
var import_reflection4 = require("@abraham/reflection");
|
|
7009
7010
|
var import_inversify17 = require("inversify");
|
|
7010
7011
|
var RspackConfigPlugin = class {
|
|
@@ -7028,9 +7029,16 @@ var RspackConfigPlugin = class {
|
|
|
7028
7029
|
`chunks: '${this.frontendPerformancePlugin?.performanceOptions?.chunks}'`
|
|
7029
7030
|
);
|
|
7030
7031
|
}
|
|
7032
|
+
rspackConfigSource = rspackConfigSource.replace(`const backendUrl = '';`, `const backendUrl = '${backendUrl}'`).replace(`const publicPath = '';`, `const publicPath = '${publicPath}';`).replace(`sourceMap: false,`, `sourceMap: ${config.env === "dev"},`).replace("alias: {}", `alias: {${aliasMapStr}}`).replace("const isDev = false", `const isDev = ${config.env === "dev"}`);
|
|
7033
|
+
if (config.needCompileViews && config.needCompileViews.length > 0 && config.cacheChunksMapCode) {
|
|
7034
|
+
rspackConfigSource = rspackConfigSource.replace("isIncremental: false", "isIncremental: true").replace("chunksMap: ''", `chunksMap: \`${config.cacheChunksMapCode}\``);
|
|
7035
|
+
}
|
|
7036
|
+
if (config.isExport) {
|
|
7037
|
+
rspackConfigSource = rspackConfigSource.replace(/\/\/ LcapPlugin start\s+new LcapPlugin\(\{[\s\S]*?\}\),\s+\/\/ LcapPlugin end/g, "");
|
|
7038
|
+
}
|
|
7031
7039
|
fs.write(
|
|
7032
7040
|
"/rspack.config.js",
|
|
7033
|
-
rspackConfigSource
|
|
7041
|
+
rspackConfigSource
|
|
7034
7042
|
);
|
|
7035
7043
|
}
|
|
7036
7044
|
}
|
|
@@ -7238,49 +7246,12 @@ EntrypointPlugin = __decorateClass([
|
|
|
7238
7246
|
__decorateParam(0, (0, import_inversify19.inject)(ServiceMetaKind.MicroFrontendManager))
|
|
7239
7247
|
], EntrypointPlugin);
|
|
7240
7248
|
|
|
7241
|
-
// src/plugins/misc/bundler/vite-config-plugin.ts
|
|
7242
|
-
var import_reflection6 = require("@abraham/reflection");
|
|
7243
|
-
var import_inversify20 = require("inversify");
|
|
7244
|
-
var ViteConfigPlugin = class {
|
|
7245
|
-
constructor(bundlerConfigDataPlugin) {
|
|
7246
|
-
this.bundlerConfigDataPlugin = bundlerConfigDataPlugin;
|
|
7247
|
-
}
|
|
7248
|
-
async configBundlerConfig(app, frontend, config, fs, frameworkKind) {
|
|
7249
|
-
const isDev = config.env === "dev";
|
|
7250
|
-
const { backendUrl, publicPath, aliasMapStr, dependenciesStr } = await this.bundlerConfigDataPlugin.getBundlerConfigData(
|
|
7251
|
-
app,
|
|
7252
|
-
frontend,
|
|
7253
|
-
config,
|
|
7254
|
-
fs,
|
|
7255
|
-
frameworkKind
|
|
7256
|
-
);
|
|
7257
|
-
const viteConfigSource = fs.read("/vite.config.ts")?.toString();
|
|
7258
|
-
if (viteConfigSource) {
|
|
7259
|
-
fs.write(
|
|
7260
|
-
"/vite.config.ts",
|
|
7261
|
-
viteConfigSource.replace(`const backendUrl = ''`, `const backendUrl = '${backendUrl}'`).replace(`const publicPath = ''`, `const publicPath = '${publicPath}'`).replace(`const isDev = false`, `const isDev = ${isDev}`).replace("alias: {}", `alias: {${aliasMapStr}}`).replace(
|
|
7262
|
-
"optimizeDeps: { include: [], },",
|
|
7263
|
-
`optimizeDeps: { include: [${dependenciesStr}], },`
|
|
7264
|
-
)
|
|
7265
|
-
);
|
|
7266
|
-
}
|
|
7267
|
-
}
|
|
7268
|
-
static install(c) {
|
|
7269
|
-
c.bind(ServiceMetaKind.FrontendBundlerFileConfig).to(ViteConfigPlugin).inSingletonScope();
|
|
7270
|
-
return c;
|
|
7271
|
-
}
|
|
7272
|
-
};
|
|
7273
|
-
ViteConfigPlugin = __decorateClass([
|
|
7274
|
-
(0, import_inversify20.injectable)(),
|
|
7275
|
-
__decorateParam(0, (0, import_inversify20.inject)(BundlerConfigDataPlugin))
|
|
7276
|
-
], ViteConfigPlugin);
|
|
7277
|
-
|
|
7278
7249
|
// src/plugins/vue/vue3/vue3-application-assembler-plugin.ts
|
|
7279
|
-
var
|
|
7250
|
+
var import_inversify29 = require("inversify");
|
|
7280
7251
|
|
|
7281
7252
|
// src/plugins/vue/common/vue-router-plugin.ts
|
|
7282
7253
|
var import_nasl_utils2 = require("@lcap/nasl-utils");
|
|
7283
|
-
var
|
|
7254
|
+
var import_inversify20 = require("inversify");
|
|
7284
7255
|
var VueRouterPlugin = class {
|
|
7285
7256
|
extractImportIR(routes, componentPathManager) {
|
|
7286
7257
|
const nameMangler = new NameMangler();
|
|
@@ -7349,11 +7320,11 @@ var VueRouterPlugin = class {
|
|
|
7349
7320
|
}
|
|
7350
7321
|
};
|
|
7351
7322
|
VueRouterPlugin = __decorateClass([
|
|
7352
|
-
(0,
|
|
7323
|
+
(0, import_inversify20.injectable)()
|
|
7353
7324
|
], VueRouterPlugin);
|
|
7354
7325
|
|
|
7355
7326
|
// src/plugins/vue/vue3/vue3-codegen-plugin.ts
|
|
7356
|
-
var
|
|
7327
|
+
var import_inversify21 = require("inversify");
|
|
7357
7328
|
var import_nasl_utils3 = require("@lcap/nasl-utils");
|
|
7358
7329
|
var import_lodash8 = require("lodash");
|
|
7359
7330
|
var Vue3CodegenPlugin = class {
|
|
@@ -7401,11 +7372,11 @@ var Vue3CodegenPlugin = class {
|
|
|
7401
7372
|
}
|
|
7402
7373
|
};
|
|
7403
7374
|
Vue3CodegenPlugin = __decorateClass([
|
|
7404
|
-
(0,
|
|
7375
|
+
(0, import_inversify21.injectable)()
|
|
7405
7376
|
], Vue3CodegenPlugin);
|
|
7406
7377
|
|
|
7407
7378
|
// src/plugins/vue/vue3/vue3-entry-builder-plugin.ts
|
|
7408
|
-
var
|
|
7379
|
+
var import_inversify22 = require("inversify");
|
|
7409
7380
|
var Vue3EntryBuilderPlugin = class {
|
|
7410
7381
|
constructor(microFrontendManager) {
|
|
7411
7382
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -7447,12 +7418,12 @@ var Vue3EntryBuilderPlugin = class {
|
|
|
7447
7418
|
}
|
|
7448
7419
|
};
|
|
7449
7420
|
Vue3EntryBuilderPlugin = __decorateClass([
|
|
7450
|
-
(0,
|
|
7451
|
-
__decorateParam(0, (0,
|
|
7421
|
+
(0, import_inversify22.injectable)(),
|
|
7422
|
+
__decorateParam(0, (0, import_inversify22.inject)(ServiceMetaKind.MicroFrontendManager))
|
|
7452
7423
|
], Vue3EntryBuilderPlugin);
|
|
7453
7424
|
|
|
7454
7425
|
// src/plugins/vue/vue3/vue3-libraries-builder-plugin.ts
|
|
7455
|
-
var
|
|
7426
|
+
var import_inversify23 = require("inversify");
|
|
7456
7427
|
var Vue3LibrariesBuilderPlugin = class {
|
|
7457
7428
|
/**
|
|
7458
7429
|
* 构建依赖库导入文件
|
|
@@ -7490,11 +7461,11 @@ var Vue3LibrariesBuilderPlugin = class {
|
|
|
7490
7461
|
}
|
|
7491
7462
|
};
|
|
7492
7463
|
Vue3LibrariesBuilderPlugin = __decorateClass([
|
|
7493
|
-
(0,
|
|
7464
|
+
(0, import_inversify23.injectable)()
|
|
7494
7465
|
], Vue3LibrariesBuilderPlugin);
|
|
7495
7466
|
|
|
7496
7467
|
// src/plugins/vue/vue3/vue3-meta-data-builder-plugin.ts
|
|
7497
|
-
var
|
|
7468
|
+
var import_inversify24 = require("inversify");
|
|
7498
7469
|
var Vue3MetaDataBuilderPlugin = class {
|
|
7499
7470
|
/**
|
|
7500
7471
|
* 构建依赖库导入文件
|
|
@@ -7515,7 +7486,7 @@ var Vue3MetaDataBuilderPlugin = class {
|
|
|
7515
7486
|
}
|
|
7516
7487
|
};
|
|
7517
7488
|
Vue3MetaDataBuilderPlugin = __decorateClass([
|
|
7518
|
-
(0,
|
|
7489
|
+
(0, import_inversify24.injectable)()
|
|
7519
7490
|
], Vue3MetaDataBuilderPlugin);
|
|
7520
7491
|
function stringifyMetaData(obj) {
|
|
7521
7492
|
if (typeof obj === "object" && obj !== null) {
|
|
@@ -7549,7 +7520,7 @@ function stringifyMetaData(obj) {
|
|
|
7549
7520
|
}
|
|
7550
7521
|
|
|
7551
7522
|
// src/plugins/vue/vue3/vue3-components-index-builder-plugin.ts
|
|
7552
|
-
var
|
|
7523
|
+
var import_inversify25 = require("inversify");
|
|
7553
7524
|
var Vue3ComponentsIndexBuilderPlugin = class {
|
|
7554
7525
|
/**
|
|
7555
7526
|
* 构建业务组件导出入口文件
|
|
@@ -7579,11 +7550,11 @@ var Vue3ComponentsIndexBuilderPlugin = class {
|
|
|
7579
7550
|
}
|
|
7580
7551
|
};
|
|
7581
7552
|
Vue3ComponentsIndexBuilderPlugin = __decorateClass([
|
|
7582
|
-
(0,
|
|
7553
|
+
(0, import_inversify25.injectable)()
|
|
7583
7554
|
], Vue3ComponentsIndexBuilderPlugin);
|
|
7584
7555
|
|
|
7585
7556
|
// src/plugins/vue/vue3/vue3-client-lazyload-template-builder-plugin .ts
|
|
7586
|
-
var
|
|
7557
|
+
var import_inversify26 = require("inversify");
|
|
7587
7558
|
var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
7588
7559
|
constructor(microFrontendManager) {
|
|
7589
7560
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -7596,32 +7567,19 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
7596
7567
|
const isDebug = ir.configs.config.debug;
|
|
7597
7568
|
const entryScript = this.microFrontendManager.produceScript(ir);
|
|
7598
7569
|
return new ReactFileDescription(
|
|
7599
|
-
"../client-lazyload-template.
|
|
7570
|
+
"../client-lazyload-template.js",
|
|
7600
7571
|
[],
|
|
7601
7572
|
[],
|
|
7602
7573
|
[
|
|
7603
|
-
`
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
);` : ""}
|
|
7613
|
-
const lazyLoadCommand = \`
|
|
7614
|
-
\${JSON.stringify(jsAssets)}.forEach(asset => window.LazyLoad.js(asset));
|
|
7615
|
-
window.LazyLoad.css(\${JSON.stringify(cssAssets)});
|
|
7616
|
-
\`;
|
|
7617
|
-
return \`(function(){
|
|
7618
|
-
function loadAssets(){
|
|
7619
|
-
\${lazyLoadCommand};
|
|
7620
|
-
}
|
|
7621
|
-
${entryScript};
|
|
7622
|
-
})();\`;
|
|
7623
|
-
}
|
|
7624
|
-
`
|
|
7574
|
+
`const extraJS = [];
|
|
7575
|
+
const extraCSS = [];
|
|
7576
|
+
const entryCode = \`${entryScript}\`;
|
|
7577
|
+
|
|
7578
|
+
module.exports = {
|
|
7579
|
+
extraJS,
|
|
7580
|
+
extraCSS,
|
|
7581
|
+
entryCode,
|
|
7582
|
+
}`
|
|
7625
7583
|
]
|
|
7626
7584
|
);
|
|
7627
7585
|
}
|
|
@@ -7631,12 +7589,12 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
7631
7589
|
}
|
|
7632
7590
|
};
|
|
7633
7591
|
Vue3ClientLazyloadTemplateBuilderPlugin = __decorateClass([
|
|
7634
|
-
(0,
|
|
7635
|
-
__decorateParam(0, (0,
|
|
7592
|
+
(0, import_inversify26.injectable)(),
|
|
7593
|
+
__decorateParam(0, (0, import_inversify26.inject)(ServiceMetaKind.MicroFrontendManager))
|
|
7636
7594
|
], Vue3ClientLazyloadTemplateBuilderPlugin);
|
|
7637
7595
|
|
|
7638
7596
|
// src/plugins/vue/vue3/vue3-platform-builder-plugin.ts
|
|
7639
|
-
var
|
|
7597
|
+
var import_inversify27 = require("inversify");
|
|
7640
7598
|
var Vue3PlatformBuilderPlugin = class {
|
|
7641
7599
|
/**
|
|
7642
7600
|
* 构建平台配置文件
|
|
@@ -7670,11 +7628,11 @@ var Vue3PlatformBuilderPlugin = class {
|
|
|
7670
7628
|
}
|
|
7671
7629
|
};
|
|
7672
7630
|
Vue3PlatformBuilderPlugin = __decorateClass([
|
|
7673
|
-
(0,
|
|
7631
|
+
(0, import_inversify27.injectable)()
|
|
7674
7632
|
], Vue3PlatformBuilderPlugin);
|
|
7675
7633
|
|
|
7676
7634
|
// src/plugins/vue/vue3/vue3-entry-css-plugin.ts
|
|
7677
|
-
var
|
|
7635
|
+
var import_inversify28 = require("inversify");
|
|
7678
7636
|
var Vue3EntryCssPlugin = class {
|
|
7679
7637
|
/**
|
|
7680
7638
|
* 构建依赖库导入文件
|
|
@@ -7691,7 +7649,7 @@ var Vue3EntryCssPlugin = class {
|
|
|
7691
7649
|
}
|
|
7692
7650
|
};
|
|
7693
7651
|
Vue3EntryCssPlugin = __decorateClass([
|
|
7694
|
-
(0,
|
|
7652
|
+
(0, import_inversify28.injectable)()
|
|
7695
7653
|
], Vue3EntryCssPlugin);
|
|
7696
7654
|
|
|
7697
7655
|
// src/plugins/vue/vue3/vue3-application-assembler-plugin.ts
|
|
@@ -7708,7 +7666,7 @@ var ComponentPathManager = class {
|
|
|
7708
7666
|
}
|
|
7709
7667
|
};
|
|
7710
7668
|
ComponentPathManager = __decorateClass([
|
|
7711
|
-
(0,
|
|
7669
|
+
(0, import_inversify29.injectable)()
|
|
7712
7670
|
], ComponentPathManager);
|
|
7713
7671
|
var Vue3ApplicationAssemblerPlugin = class {
|
|
7714
7672
|
constructor(vue3CodegenPlugin, routesExtactor, routerBuilder, entryBuilder, librariesBuilder, entryCssBuilder, componentsIndexBuilder, clientLazyloadTemplateBuilder, platformBuilder, metaDataBuilder) {
|
|
@@ -7763,17 +7721,17 @@ var Vue3ApplicationAssemblerPlugin = class {
|
|
|
7763
7721
|
}
|
|
7764
7722
|
};
|
|
7765
7723
|
Vue3ApplicationAssemblerPlugin = __decorateClass([
|
|
7766
|
-
(0,
|
|
7767
|
-
__decorateParam(0, (0,
|
|
7768
|
-
__decorateParam(1, (0,
|
|
7769
|
-
__decorateParam(2, (0,
|
|
7770
|
-
__decorateParam(3, (0,
|
|
7771
|
-
__decorateParam(4, (0,
|
|
7772
|
-
__decorateParam(5, (0,
|
|
7773
|
-
__decorateParam(6, (0,
|
|
7774
|
-
__decorateParam(7, (0,
|
|
7775
|
-
__decorateParam(8, (0,
|
|
7776
|
-
__decorateParam(9, (0,
|
|
7724
|
+
(0, import_inversify29.injectable)(),
|
|
7725
|
+
__decorateParam(0, (0, import_inversify29.inject)(Vue3CodegenPlugin)),
|
|
7726
|
+
__decorateParam(1, (0, import_inversify29.inject)(RoutesExtractionPlugin)),
|
|
7727
|
+
__decorateParam(2, (0, import_inversify29.inject)(VueRouterPlugin)),
|
|
7728
|
+
__decorateParam(3, (0, import_inversify29.inject)(Vue3EntryBuilderPlugin)),
|
|
7729
|
+
__decorateParam(4, (0, import_inversify29.inject)(Vue3LibrariesBuilderPlugin)),
|
|
7730
|
+
__decorateParam(5, (0, import_inversify29.inject)(Vue3EntryCssPlugin)),
|
|
7731
|
+
__decorateParam(6, (0, import_inversify29.inject)(Vue3ComponentsIndexBuilderPlugin)),
|
|
7732
|
+
__decorateParam(7, (0, import_inversify29.inject)(Vue3ClientLazyloadTemplateBuilderPlugin)),
|
|
7733
|
+
__decorateParam(8, (0, import_inversify29.inject)(Vue3PlatformBuilderPlugin)),
|
|
7734
|
+
__decorateParam(9, (0, import_inversify29.inject)(Vue3MetaDataBuilderPlugin))
|
|
7777
7735
|
], Vue3ApplicationAssemblerPlugin);
|
|
7778
7736
|
|
|
7779
7737
|
// src/plugins/vue/vue3/vue3-preset-plugin.ts
|
|
@@ -7828,7 +7786,7 @@ var Vue3PresetPlugin = class {
|
|
|
7828
7786
|
c.bind(ServiceMetaKind.ProjectOrganizer).to(ProjectOrganizerPlugin);
|
|
7829
7787
|
c.bind(ServiceMetaKind.FileSystemProvider).to(FileSystemPlugin).inSingletonScope();
|
|
7830
7788
|
c = BundlerConfigDataPlugin.install(c);
|
|
7831
|
-
c =
|
|
7789
|
+
c = RspackConfigPlugin.install(c);
|
|
7832
7790
|
c = FrontendBundlerConfigPlugin.install(c);
|
|
7833
7791
|
c = FrontendPerformancePlugin.install(c);
|
|
7834
7792
|
c = NpmPackageJSONManagerPlugin.install(c);
|
|
@@ -7845,20 +7803,20 @@ var Vue3PresetPlugin = class {
|
|
|
7845
7803
|
}
|
|
7846
7804
|
};
|
|
7847
7805
|
Vue3PresetPlugin = __decorateClass([
|
|
7848
|
-
(0,
|
|
7849
|
-
__decorateParam(0, (0,
|
|
7850
|
-
__decorateParam(1, (0,
|
|
7851
|
-
__decorateParam(2, (0,
|
|
7852
|
-
__decorateParam(3, (0,
|
|
7853
|
-
__decorateParam(4, (0,
|
|
7806
|
+
(0, import_inversify30.injectable)(),
|
|
7807
|
+
__decorateParam(0, (0, import_inversify30.inject)(ServiceMetaKind.IRBuilder)),
|
|
7808
|
+
__decorateParam(1, (0, import_inversify30.inject)(ServiceMetaKind.FileSystemProvider)),
|
|
7809
|
+
__decorateParam(2, (0, import_inversify30.inject)(NpmPackageJSONManagerPlugin)),
|
|
7810
|
+
__decorateParam(3, (0, import_inversify30.inject)(ServiceMetaKind.ProjectOrganizer)),
|
|
7811
|
+
__decorateParam(4, (0, import_inversify30.inject)(Vue3ApplicationAssemblerPlugin))
|
|
7854
7812
|
], Vue3PresetPlugin);
|
|
7855
7813
|
|
|
7856
7814
|
// src/default-container.ts
|
|
7857
7815
|
function makeDefaultContainer(kind = "react") {
|
|
7858
7816
|
if (kind === "react") {
|
|
7859
|
-
return ReactPresetPlugin.install(new
|
|
7817
|
+
return ReactPresetPlugin.install(new import_inversify31.Container());
|
|
7860
7818
|
} else if (kind === "vue3") {
|
|
7861
|
-
return Vue3PresetPlugin.install(new
|
|
7819
|
+
return Vue3PresetPlugin.install(new import_inversify31.Container());
|
|
7862
7820
|
} else {
|
|
7863
7821
|
throw new Error(`\u672A\u5B9E\u73B0${kind}\u7684\u9ED8\u8BA4\u5BB9\u5668`);
|
|
7864
7822
|
}
|
|
@@ -7869,6 +7827,35 @@ async function translateNASLToApp(app, frontend, config, baseDir = "./out", cont
|
|
|
7869
7827
|
const logger13 = Logger("\u7FFB\u8BD1\u8FC7\u7A0B");
|
|
7870
7828
|
logger13.debug({ config });
|
|
7871
7829
|
async function genCode() {
|
|
7830
|
+
const { needCompileViews = [] } = config;
|
|
7831
|
+
if (needCompileViews?.length > 0) {
|
|
7832
|
+
let traverseChildren2 = function(view, callback) {
|
|
7833
|
+
if (view.children?.length > 0) {
|
|
7834
|
+
view.children.forEach((childView) => {
|
|
7835
|
+
const deep = callback(childView);
|
|
7836
|
+
if (deep) {
|
|
7837
|
+
traverseChildren2(childView, callback);
|
|
7838
|
+
}
|
|
7839
|
+
});
|
|
7840
|
+
}
|
|
7841
|
+
};
|
|
7842
|
+
var traverseChildren = traverseChildren2;
|
|
7843
|
+
logger13.info("\u5F00\u59CB\u6309\u9700\u7FFB\u8BD1\u9875\u9762");
|
|
7844
|
+
frontend.views.forEach((view) => {
|
|
7845
|
+
if (!needCompileViews.includes(view.nodePath)) {
|
|
7846
|
+
view.delete();
|
|
7847
|
+
} else {
|
|
7848
|
+
traverseChildren2(view, (childView) => {
|
|
7849
|
+
if (!needCompileViews.includes(childView.nodePath)) {
|
|
7850
|
+
childView.delete();
|
|
7851
|
+
return false;
|
|
7852
|
+
}
|
|
7853
|
+
return true;
|
|
7854
|
+
});
|
|
7855
|
+
}
|
|
7856
|
+
});
|
|
7857
|
+
logger13.info("\u7ED3\u675F\u6309\u9700\u7FFB\u8BD1\u9875\u9762");
|
|
7858
|
+
}
|
|
7872
7859
|
logger13.info("\u5F00\u59CB\u7FFB\u8BD1");
|
|
7873
7860
|
try {
|
|
7874
7861
|
const codeList2 = await container.get(ServiceMetaKind.NASLTranspiler).transpile({
|
|
@@ -8025,7 +8012,7 @@ async function compileNASLToReactDist(app, frontend, config, http) {
|
|
|
8025
8012
|
}
|
|
8026
8013
|
|
|
8027
8014
|
// src/plugins/misc/program-analysis/analyzer-manager-plugin.ts
|
|
8028
|
-
var
|
|
8015
|
+
var import_inversify32 = require("inversify");
|
|
8029
8016
|
|
|
8030
8017
|
// src/plugins/misc/program-analysis/analysis/async-analysis.ts
|
|
8031
8018
|
function buildAsyncAnalyzer() {
|
|
@@ -8152,11 +8139,11 @@ var AnalyzerManagerPlugin = class {
|
|
|
8152
8139
|
}
|
|
8153
8140
|
};
|
|
8154
8141
|
AnalyzerManagerPlugin = __decorateClass([
|
|
8155
|
-
(0,
|
|
8142
|
+
(0, import_inversify32.injectable)()
|
|
8156
8143
|
], AnalyzerManagerPlugin);
|
|
8157
8144
|
|
|
8158
8145
|
// src/plugins/misc/name-mangler/name-mangler-manager-plugin.ts
|
|
8159
|
-
var
|
|
8146
|
+
var import_inversify33 = require("inversify");
|
|
8160
8147
|
|
|
8161
8148
|
// src/plugins/misc/name-mangler/name-mangler.ts
|
|
8162
8149
|
var NameMangler2 = class _NameMangler {
|
|
@@ -8223,7 +8210,7 @@ var NameManglerManagerPlugin = class {
|
|
|
8223
8210
|
}
|
|
8224
8211
|
};
|
|
8225
8212
|
NameManglerManagerPlugin = __decorateClass([
|
|
8226
|
-
(0,
|
|
8213
|
+
(0, import_inversify33.injectable)()
|
|
8227
8214
|
], NameManglerManagerPlugin);
|
|
8228
8215
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8229
8216
|
0 && (module.exports = {
|