@lcap/nasl-unified-frontend-generator 4.0.0-beta.7 → 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 = {
|
|
@@ -4292,40 +4292,40 @@ var metadataPlugin = makePlugin({
|
|
|
4292
4292
|
// src/hack/material-config/material.config.js
|
|
4293
4293
|
var materials = {
|
|
4294
4294
|
framework: {
|
|
4295
|
-
version: "2.
|
|
4295
|
+
version: "2.1.0",
|
|
4296
4296
|
core: "@lcap/basic-template",
|
|
4297
4297
|
pc: [
|
|
4298
4298
|
{
|
|
4299
4299
|
frameworkKind: "vue2",
|
|
4300
4300
|
name: "@lcap/pc-template",
|
|
4301
|
-
version: "2.
|
|
4301
|
+
version: "2.1.0"
|
|
4302
4302
|
},
|
|
4303
4303
|
{
|
|
4304
4304
|
frameworkKind: "react",
|
|
4305
4305
|
name: "@lcap/pc-template-react",
|
|
4306
|
-
version: "2.
|
|
4306
|
+
version: "2.1.0"
|
|
4307
4307
|
},
|
|
4308
4308
|
{
|
|
4309
4309
|
frameworkKind: "vue3",
|
|
4310
4310
|
name: "@lcap/pc-template-vue3",
|
|
4311
|
-
version: "2.
|
|
4311
|
+
version: "2.1.0"
|
|
4312
4312
|
}
|
|
4313
4313
|
],
|
|
4314
4314
|
h5: [
|
|
4315
4315
|
{
|
|
4316
4316
|
frameworkKind: "vue2",
|
|
4317
4317
|
name: "@lcap/mobile-template",
|
|
4318
|
-
version: "2.
|
|
4318
|
+
version: "2.1.0"
|
|
4319
4319
|
},
|
|
4320
4320
|
{
|
|
4321
4321
|
frameworkKind: "react",
|
|
4322
4322
|
name: "@lcap/mobile-template-react",
|
|
4323
|
-
version: "2.
|
|
4323
|
+
version: "2.1.0"
|
|
4324
4324
|
},
|
|
4325
4325
|
{
|
|
4326
4326
|
frameworkKind: "vue3",
|
|
4327
4327
|
name: "@lcap/mobile-template-vue3",
|
|
4328
|
-
version: "2.
|
|
4328
|
+
version: "2.1.0"
|
|
4329
4329
|
}
|
|
4330
4330
|
]
|
|
4331
4331
|
},
|
|
@@ -7005,7 +7005,7 @@ BundlerConfigDataPlugin = __decorateClass([
|
|
|
7005
7005
|
__decorateParam(0, (0, import_inversify16.inject)(ServiceMetaKind.FrontendBundlerConfig))
|
|
7006
7006
|
], BundlerConfigDataPlugin);
|
|
7007
7007
|
|
|
7008
|
-
// src/plugins/misc/bundler/
|
|
7008
|
+
// src/plugins/misc/bundler/rspack-config-plugin.ts
|
|
7009
7009
|
var import_reflection4 = require("@abraham/reflection");
|
|
7010
7010
|
var import_inversify17 = require("inversify");
|
|
7011
7011
|
var RspackConfigPlugin = class {
|
|
@@ -7029,9 +7029,16 @@ var RspackConfigPlugin = class {
|
|
|
7029
7029
|
`chunks: '${this.frontendPerformancePlugin?.performanceOptions?.chunks}'`
|
|
7030
7030
|
);
|
|
7031
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
|
+
}
|
|
7032
7039
|
fs.write(
|
|
7033
7040
|
"/rspack.config.js",
|
|
7034
|
-
rspackConfigSource
|
|
7041
|
+
rspackConfigSource
|
|
7035
7042
|
);
|
|
7036
7043
|
}
|
|
7037
7044
|
}
|
|
@@ -7239,49 +7246,12 @@ EntrypointPlugin = __decorateClass([
|
|
|
7239
7246
|
__decorateParam(0, (0, import_inversify19.inject)(ServiceMetaKind.MicroFrontendManager))
|
|
7240
7247
|
], EntrypointPlugin);
|
|
7241
7248
|
|
|
7242
|
-
// src/plugins/misc/bundler/vite-config-plugin.ts
|
|
7243
|
-
var import_reflection6 = require("@abraham/reflection");
|
|
7244
|
-
var import_inversify20 = require("inversify");
|
|
7245
|
-
var ViteConfigPlugin = class {
|
|
7246
|
-
constructor(bundlerConfigDataPlugin) {
|
|
7247
|
-
this.bundlerConfigDataPlugin = bundlerConfigDataPlugin;
|
|
7248
|
-
}
|
|
7249
|
-
async configBundlerConfig(app, frontend, config, fs, frameworkKind) {
|
|
7250
|
-
const isDev = config.env === "dev";
|
|
7251
|
-
const { backendUrl, publicPath, aliasMapStr, dependenciesStr } = await this.bundlerConfigDataPlugin.getBundlerConfigData(
|
|
7252
|
-
app,
|
|
7253
|
-
frontend,
|
|
7254
|
-
config,
|
|
7255
|
-
fs,
|
|
7256
|
-
frameworkKind
|
|
7257
|
-
);
|
|
7258
|
-
const viteConfigSource = fs.read("/vite.config.ts")?.toString();
|
|
7259
|
-
if (viteConfigSource) {
|
|
7260
|
-
fs.write(
|
|
7261
|
-
"/vite.config.ts",
|
|
7262
|
-
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(
|
|
7263
|
-
"optimizeDeps: { include: [], },",
|
|
7264
|
-
`optimizeDeps: { include: [${dependenciesStr}], },`
|
|
7265
|
-
)
|
|
7266
|
-
);
|
|
7267
|
-
}
|
|
7268
|
-
}
|
|
7269
|
-
static install(c) {
|
|
7270
|
-
c.bind(ServiceMetaKind.FrontendBundlerFileConfig).to(ViteConfigPlugin).inSingletonScope();
|
|
7271
|
-
return c;
|
|
7272
|
-
}
|
|
7273
|
-
};
|
|
7274
|
-
ViteConfigPlugin = __decorateClass([
|
|
7275
|
-
(0, import_inversify20.injectable)(),
|
|
7276
|
-
__decorateParam(0, (0, import_inversify20.inject)(BundlerConfigDataPlugin))
|
|
7277
|
-
], ViteConfigPlugin);
|
|
7278
|
-
|
|
7279
7249
|
// src/plugins/vue/vue3/vue3-application-assembler-plugin.ts
|
|
7280
|
-
var
|
|
7250
|
+
var import_inversify29 = require("inversify");
|
|
7281
7251
|
|
|
7282
7252
|
// src/plugins/vue/common/vue-router-plugin.ts
|
|
7283
7253
|
var import_nasl_utils2 = require("@lcap/nasl-utils");
|
|
7284
|
-
var
|
|
7254
|
+
var import_inversify20 = require("inversify");
|
|
7285
7255
|
var VueRouterPlugin = class {
|
|
7286
7256
|
extractImportIR(routes, componentPathManager) {
|
|
7287
7257
|
const nameMangler = new NameMangler();
|
|
@@ -7350,11 +7320,11 @@ var VueRouterPlugin = class {
|
|
|
7350
7320
|
}
|
|
7351
7321
|
};
|
|
7352
7322
|
VueRouterPlugin = __decorateClass([
|
|
7353
|
-
(0,
|
|
7323
|
+
(0, import_inversify20.injectable)()
|
|
7354
7324
|
], VueRouterPlugin);
|
|
7355
7325
|
|
|
7356
7326
|
// src/plugins/vue/vue3/vue3-codegen-plugin.ts
|
|
7357
|
-
var
|
|
7327
|
+
var import_inversify21 = require("inversify");
|
|
7358
7328
|
var import_nasl_utils3 = require("@lcap/nasl-utils");
|
|
7359
7329
|
var import_lodash8 = require("lodash");
|
|
7360
7330
|
var Vue3CodegenPlugin = class {
|
|
@@ -7402,11 +7372,11 @@ var Vue3CodegenPlugin = class {
|
|
|
7402
7372
|
}
|
|
7403
7373
|
};
|
|
7404
7374
|
Vue3CodegenPlugin = __decorateClass([
|
|
7405
|
-
(0,
|
|
7375
|
+
(0, import_inversify21.injectable)()
|
|
7406
7376
|
], Vue3CodegenPlugin);
|
|
7407
7377
|
|
|
7408
7378
|
// src/plugins/vue/vue3/vue3-entry-builder-plugin.ts
|
|
7409
|
-
var
|
|
7379
|
+
var import_inversify22 = require("inversify");
|
|
7410
7380
|
var Vue3EntryBuilderPlugin = class {
|
|
7411
7381
|
constructor(microFrontendManager) {
|
|
7412
7382
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -7448,12 +7418,12 @@ var Vue3EntryBuilderPlugin = class {
|
|
|
7448
7418
|
}
|
|
7449
7419
|
};
|
|
7450
7420
|
Vue3EntryBuilderPlugin = __decorateClass([
|
|
7451
|
-
(0,
|
|
7452
|
-
__decorateParam(0, (0,
|
|
7421
|
+
(0, import_inversify22.injectable)(),
|
|
7422
|
+
__decorateParam(0, (0, import_inversify22.inject)(ServiceMetaKind.MicroFrontendManager))
|
|
7453
7423
|
], Vue3EntryBuilderPlugin);
|
|
7454
7424
|
|
|
7455
7425
|
// src/plugins/vue/vue3/vue3-libraries-builder-plugin.ts
|
|
7456
|
-
var
|
|
7426
|
+
var import_inversify23 = require("inversify");
|
|
7457
7427
|
var Vue3LibrariesBuilderPlugin = class {
|
|
7458
7428
|
/**
|
|
7459
7429
|
* 构建依赖库导入文件
|
|
@@ -7491,11 +7461,11 @@ var Vue3LibrariesBuilderPlugin = class {
|
|
|
7491
7461
|
}
|
|
7492
7462
|
};
|
|
7493
7463
|
Vue3LibrariesBuilderPlugin = __decorateClass([
|
|
7494
|
-
(0,
|
|
7464
|
+
(0, import_inversify23.injectable)()
|
|
7495
7465
|
], Vue3LibrariesBuilderPlugin);
|
|
7496
7466
|
|
|
7497
7467
|
// src/plugins/vue/vue3/vue3-meta-data-builder-plugin.ts
|
|
7498
|
-
var
|
|
7468
|
+
var import_inversify24 = require("inversify");
|
|
7499
7469
|
var Vue3MetaDataBuilderPlugin = class {
|
|
7500
7470
|
/**
|
|
7501
7471
|
* 构建依赖库导入文件
|
|
@@ -7516,7 +7486,7 @@ var Vue3MetaDataBuilderPlugin = class {
|
|
|
7516
7486
|
}
|
|
7517
7487
|
};
|
|
7518
7488
|
Vue3MetaDataBuilderPlugin = __decorateClass([
|
|
7519
|
-
(0,
|
|
7489
|
+
(0, import_inversify24.injectable)()
|
|
7520
7490
|
], Vue3MetaDataBuilderPlugin);
|
|
7521
7491
|
function stringifyMetaData(obj) {
|
|
7522
7492
|
if (typeof obj === "object" && obj !== null) {
|
|
@@ -7550,7 +7520,7 @@ function stringifyMetaData(obj) {
|
|
|
7550
7520
|
}
|
|
7551
7521
|
|
|
7552
7522
|
// src/plugins/vue/vue3/vue3-components-index-builder-plugin.ts
|
|
7553
|
-
var
|
|
7523
|
+
var import_inversify25 = require("inversify");
|
|
7554
7524
|
var Vue3ComponentsIndexBuilderPlugin = class {
|
|
7555
7525
|
/**
|
|
7556
7526
|
* 构建业务组件导出入口文件
|
|
@@ -7580,11 +7550,11 @@ var Vue3ComponentsIndexBuilderPlugin = class {
|
|
|
7580
7550
|
}
|
|
7581
7551
|
};
|
|
7582
7552
|
Vue3ComponentsIndexBuilderPlugin = __decorateClass([
|
|
7583
|
-
(0,
|
|
7553
|
+
(0, import_inversify25.injectable)()
|
|
7584
7554
|
], Vue3ComponentsIndexBuilderPlugin);
|
|
7585
7555
|
|
|
7586
7556
|
// src/plugins/vue/vue3/vue3-client-lazyload-template-builder-plugin .ts
|
|
7587
|
-
var
|
|
7557
|
+
var import_inversify26 = require("inversify");
|
|
7588
7558
|
var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
7589
7559
|
constructor(microFrontendManager) {
|
|
7590
7560
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -7597,32 +7567,19 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
7597
7567
|
const isDebug = ir.configs.config.debug;
|
|
7598
7568
|
const entryScript = this.microFrontendManager.produceScript(ir);
|
|
7599
7569
|
return new ReactFileDescription(
|
|
7600
|
-
"../client-lazyload-template.
|
|
7570
|
+
"../client-lazyload-template.js",
|
|
7601
7571
|
[],
|
|
7602
7572
|
[],
|
|
7603
7573
|
[
|
|
7604
|
-
`
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
);` : ""}
|
|
7614
|
-
const lazyLoadCommand = \`
|
|
7615
|
-
\${JSON.stringify(jsAssets)}.forEach(asset => window.LazyLoad.js(asset));
|
|
7616
|
-
window.LazyLoad.css(\${JSON.stringify(cssAssets)});
|
|
7617
|
-
\`;
|
|
7618
|
-
return \`(function(){
|
|
7619
|
-
function loadAssets(){
|
|
7620
|
-
\${lazyLoadCommand};
|
|
7621
|
-
}
|
|
7622
|
-
${entryScript};
|
|
7623
|
-
})();\`;
|
|
7624
|
-
}
|
|
7625
|
-
`
|
|
7574
|
+
`const extraJS = [];
|
|
7575
|
+
const extraCSS = [];
|
|
7576
|
+
const entryCode = \`${entryScript}\`;
|
|
7577
|
+
|
|
7578
|
+
module.exports = {
|
|
7579
|
+
extraJS,
|
|
7580
|
+
extraCSS,
|
|
7581
|
+
entryCode,
|
|
7582
|
+
}`
|
|
7626
7583
|
]
|
|
7627
7584
|
);
|
|
7628
7585
|
}
|
|
@@ -7632,12 +7589,12 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
7632
7589
|
}
|
|
7633
7590
|
};
|
|
7634
7591
|
Vue3ClientLazyloadTemplateBuilderPlugin = __decorateClass([
|
|
7635
|
-
(0,
|
|
7636
|
-
__decorateParam(0, (0,
|
|
7592
|
+
(0, import_inversify26.injectable)(),
|
|
7593
|
+
__decorateParam(0, (0, import_inversify26.inject)(ServiceMetaKind.MicroFrontendManager))
|
|
7637
7594
|
], Vue3ClientLazyloadTemplateBuilderPlugin);
|
|
7638
7595
|
|
|
7639
7596
|
// src/plugins/vue/vue3/vue3-platform-builder-plugin.ts
|
|
7640
|
-
var
|
|
7597
|
+
var import_inversify27 = require("inversify");
|
|
7641
7598
|
var Vue3PlatformBuilderPlugin = class {
|
|
7642
7599
|
/**
|
|
7643
7600
|
* 构建平台配置文件
|
|
@@ -7648,7 +7605,8 @@ var Vue3PlatformBuilderPlugin = class {
|
|
|
7648
7605
|
const self = {
|
|
7649
7606
|
...routesExtractionPlugin.functions
|
|
7650
7607
|
};
|
|
7651
|
-
const
|
|
7608
|
+
const basePath = ir.configs.basePlatformConfig.basePath + "/";
|
|
7609
|
+
const { authResourcePaths, baseResourcePaths } = self.extractRoute(ir.views, basePath, {
|
|
7652
7610
|
lazy: false,
|
|
7653
7611
|
frameworkKind: "vue3"
|
|
7654
7612
|
});
|
|
@@ -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 = {
|