@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/playground.js
CHANGED
|
@@ -2259,11 +2259,11 @@ var import_axios2 = __toESM(require("axios"));
|
|
|
2259
2259
|
var import_lodash9 = require("lodash");
|
|
2260
2260
|
|
|
2261
2261
|
// src/default-container.ts
|
|
2262
|
-
var
|
|
2262
|
+
var import_inversify31 = require("inversify");
|
|
2263
2263
|
|
|
2264
2264
|
// src/plugins/vue/vue3/vue3-preset-plugin.ts
|
|
2265
|
-
var
|
|
2266
|
-
var
|
|
2265
|
+
var import_reflection6 = require("@abraham/reflection");
|
|
2266
|
+
var import_inversify30 = require("inversify");
|
|
2267
2267
|
|
|
2268
2268
|
// src/service-metakind.ts
|
|
2269
2269
|
var ServiceMetaKind = {
|
|
@@ -6447,40 +6447,40 @@ var metadataPlugin = makePlugin({
|
|
|
6447
6447
|
// src/hack/material-config/material.config.js
|
|
6448
6448
|
var materials = {
|
|
6449
6449
|
framework: {
|
|
6450
|
-
version: "2.
|
|
6450
|
+
version: "2.1.0",
|
|
6451
6451
|
core: "@lcap/basic-template",
|
|
6452
6452
|
pc: [
|
|
6453
6453
|
{
|
|
6454
6454
|
frameworkKind: "vue2",
|
|
6455
6455
|
name: "@lcap/pc-template",
|
|
6456
|
-
version: "2.
|
|
6456
|
+
version: "2.1.0"
|
|
6457
6457
|
},
|
|
6458
6458
|
{
|
|
6459
6459
|
frameworkKind: "react",
|
|
6460
6460
|
name: "@lcap/pc-template-react",
|
|
6461
|
-
version: "2.
|
|
6461
|
+
version: "2.1.0"
|
|
6462
6462
|
},
|
|
6463
6463
|
{
|
|
6464
6464
|
frameworkKind: "vue3",
|
|
6465
6465
|
name: "@lcap/pc-template-vue3",
|
|
6466
|
-
version: "2.
|
|
6466
|
+
version: "2.1.0"
|
|
6467
6467
|
}
|
|
6468
6468
|
],
|
|
6469
6469
|
h5: [
|
|
6470
6470
|
{
|
|
6471
6471
|
frameworkKind: "vue2",
|
|
6472
6472
|
name: "@lcap/mobile-template",
|
|
6473
|
-
version: "2.
|
|
6473
|
+
version: "2.1.0"
|
|
6474
6474
|
},
|
|
6475
6475
|
{
|
|
6476
6476
|
frameworkKind: "react",
|
|
6477
6477
|
name: "@lcap/mobile-template-react",
|
|
6478
|
-
version: "2.
|
|
6478
|
+
version: "2.1.0"
|
|
6479
6479
|
},
|
|
6480
6480
|
{
|
|
6481
6481
|
frameworkKind: "vue3",
|
|
6482
6482
|
name: "@lcap/mobile-template-vue3",
|
|
6483
|
-
version: "2.
|
|
6483
|
+
version: "2.1.0"
|
|
6484
6484
|
}
|
|
6485
6485
|
]
|
|
6486
6486
|
},
|
|
@@ -9160,7 +9160,7 @@ BundlerConfigDataPlugin = __decorateClass([
|
|
|
9160
9160
|
__decorateParam(0, (0, import_inversify16.inject)(ServiceMetaKind.FrontendBundlerConfig))
|
|
9161
9161
|
], BundlerConfigDataPlugin);
|
|
9162
9162
|
|
|
9163
|
-
// src/plugins/misc/bundler/
|
|
9163
|
+
// src/plugins/misc/bundler/rspack-config-plugin.ts
|
|
9164
9164
|
var import_reflection4 = require("@abraham/reflection");
|
|
9165
9165
|
var import_inversify17 = require("inversify");
|
|
9166
9166
|
var RspackConfigPlugin = class {
|
|
@@ -9184,9 +9184,16 @@ var RspackConfigPlugin = class {
|
|
|
9184
9184
|
`chunks: '${this.frontendPerformancePlugin?.performanceOptions?.chunks}'`
|
|
9185
9185
|
);
|
|
9186
9186
|
}
|
|
9187
|
+
rspackConfigSource = rspackConfigSource.replace(`const backendUrl = '';`, `const backendUrl = '${backendUrl}'`).replace(`const publicPath = '';`, `const publicPath = '${publicPath}';`).replace(`sourceMap: false,`, `sourceMap: ${config2.env === "dev"},`).replace("alias: {}", `alias: {${aliasMapStr}}`).replace("const isDev = false", `const isDev = ${config2.env === "dev"}`);
|
|
9188
|
+
if (config2.needCompileViews && config2.needCompileViews.length > 0 && config2.cacheChunksMapCode) {
|
|
9189
|
+
rspackConfigSource = rspackConfigSource.replace("isIncremental: false", "isIncremental: true").replace("chunksMap: ''", `chunksMap: \`${config2.cacheChunksMapCode}\``);
|
|
9190
|
+
}
|
|
9191
|
+
if (config2.isExport) {
|
|
9192
|
+
rspackConfigSource = rspackConfigSource.replace(/\/\/ LcapPlugin start\s+new LcapPlugin\(\{[\s\S]*?\}\),\s+\/\/ LcapPlugin end/g, "");
|
|
9193
|
+
}
|
|
9187
9194
|
fs.write(
|
|
9188
9195
|
"/rspack.config.js",
|
|
9189
|
-
rspackConfigSource
|
|
9196
|
+
rspackConfigSource
|
|
9190
9197
|
);
|
|
9191
9198
|
}
|
|
9192
9199
|
}
|
|
@@ -9394,49 +9401,12 @@ EntrypointPlugin = __decorateClass([
|
|
|
9394
9401
|
__decorateParam(0, (0, import_inversify19.inject)(ServiceMetaKind.MicroFrontendManager))
|
|
9395
9402
|
], EntrypointPlugin);
|
|
9396
9403
|
|
|
9397
|
-
// src/plugins/misc/bundler/vite-config-plugin.ts
|
|
9398
|
-
var import_reflection6 = require("@abraham/reflection");
|
|
9399
|
-
var import_inversify20 = require("inversify");
|
|
9400
|
-
var ViteConfigPlugin = class {
|
|
9401
|
-
constructor(bundlerConfigDataPlugin) {
|
|
9402
|
-
this.bundlerConfigDataPlugin = bundlerConfigDataPlugin;
|
|
9403
|
-
}
|
|
9404
|
-
async configBundlerConfig(app, frontend, config2, fs, frameworkKind) {
|
|
9405
|
-
const isDev = config2.env === "dev";
|
|
9406
|
-
const { backendUrl, publicPath, aliasMapStr, dependenciesStr } = await this.bundlerConfigDataPlugin.getBundlerConfigData(
|
|
9407
|
-
app,
|
|
9408
|
-
frontend,
|
|
9409
|
-
config2,
|
|
9410
|
-
fs,
|
|
9411
|
-
frameworkKind
|
|
9412
|
-
);
|
|
9413
|
-
const viteConfigSource = fs.read("/vite.config.ts")?.toString();
|
|
9414
|
-
if (viteConfigSource) {
|
|
9415
|
-
fs.write(
|
|
9416
|
-
"/vite.config.ts",
|
|
9417
|
-
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(
|
|
9418
|
-
"optimizeDeps: { include: [], },",
|
|
9419
|
-
`optimizeDeps: { include: [${dependenciesStr}], },`
|
|
9420
|
-
)
|
|
9421
|
-
);
|
|
9422
|
-
}
|
|
9423
|
-
}
|
|
9424
|
-
static install(c) {
|
|
9425
|
-
c.bind(ServiceMetaKind.FrontendBundlerFileConfig).to(ViteConfigPlugin).inSingletonScope();
|
|
9426
|
-
return c;
|
|
9427
|
-
}
|
|
9428
|
-
};
|
|
9429
|
-
ViteConfigPlugin = __decorateClass([
|
|
9430
|
-
(0, import_inversify20.injectable)(),
|
|
9431
|
-
__decorateParam(0, (0, import_inversify20.inject)(BundlerConfigDataPlugin))
|
|
9432
|
-
], ViteConfigPlugin);
|
|
9433
|
-
|
|
9434
9404
|
// src/plugins/vue/vue3/vue3-application-assembler-plugin.ts
|
|
9435
|
-
var
|
|
9405
|
+
var import_inversify29 = require("inversify");
|
|
9436
9406
|
|
|
9437
9407
|
// src/plugins/vue/common/vue-router-plugin.ts
|
|
9438
9408
|
var import_nasl_utils2 = require("@lcap/nasl-utils");
|
|
9439
|
-
var
|
|
9409
|
+
var import_inversify20 = require("inversify");
|
|
9440
9410
|
var VueRouterPlugin = class {
|
|
9441
9411
|
extractImportIR(routes, componentPathManager) {
|
|
9442
9412
|
const nameMangler = new NameMangler();
|
|
@@ -9505,11 +9475,11 @@ var VueRouterPlugin = class {
|
|
|
9505
9475
|
}
|
|
9506
9476
|
};
|
|
9507
9477
|
VueRouterPlugin = __decorateClass([
|
|
9508
|
-
(0,
|
|
9478
|
+
(0, import_inversify20.injectable)()
|
|
9509
9479
|
], VueRouterPlugin);
|
|
9510
9480
|
|
|
9511
9481
|
// src/plugins/vue/vue3/vue3-codegen-plugin.ts
|
|
9512
|
-
var
|
|
9482
|
+
var import_inversify21 = require("inversify");
|
|
9513
9483
|
var import_nasl_utils3 = require("@lcap/nasl-utils");
|
|
9514
9484
|
var import_lodash8 = require("lodash");
|
|
9515
9485
|
var Vue3CodegenPlugin = class {
|
|
@@ -9557,11 +9527,11 @@ var Vue3CodegenPlugin = class {
|
|
|
9557
9527
|
}
|
|
9558
9528
|
};
|
|
9559
9529
|
Vue3CodegenPlugin = __decorateClass([
|
|
9560
|
-
(0,
|
|
9530
|
+
(0, import_inversify21.injectable)()
|
|
9561
9531
|
], Vue3CodegenPlugin);
|
|
9562
9532
|
|
|
9563
9533
|
// src/plugins/vue/vue3/vue3-entry-builder-plugin.ts
|
|
9564
|
-
var
|
|
9534
|
+
var import_inversify22 = require("inversify");
|
|
9565
9535
|
var Vue3EntryBuilderPlugin = class {
|
|
9566
9536
|
constructor(microFrontendManager) {
|
|
9567
9537
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -9603,12 +9573,12 @@ var Vue3EntryBuilderPlugin = class {
|
|
|
9603
9573
|
}
|
|
9604
9574
|
};
|
|
9605
9575
|
Vue3EntryBuilderPlugin = __decorateClass([
|
|
9606
|
-
(0,
|
|
9607
|
-
__decorateParam(0, (0,
|
|
9576
|
+
(0, import_inversify22.injectable)(),
|
|
9577
|
+
__decorateParam(0, (0, import_inversify22.inject)(ServiceMetaKind.MicroFrontendManager))
|
|
9608
9578
|
], Vue3EntryBuilderPlugin);
|
|
9609
9579
|
|
|
9610
9580
|
// src/plugins/vue/vue3/vue3-libraries-builder-plugin.ts
|
|
9611
|
-
var
|
|
9581
|
+
var import_inversify23 = require("inversify");
|
|
9612
9582
|
var Vue3LibrariesBuilderPlugin = class {
|
|
9613
9583
|
/**
|
|
9614
9584
|
* 构建依赖库导入文件
|
|
@@ -9646,11 +9616,11 @@ var Vue3LibrariesBuilderPlugin = class {
|
|
|
9646
9616
|
}
|
|
9647
9617
|
};
|
|
9648
9618
|
Vue3LibrariesBuilderPlugin = __decorateClass([
|
|
9649
|
-
(0,
|
|
9619
|
+
(0, import_inversify23.injectable)()
|
|
9650
9620
|
], Vue3LibrariesBuilderPlugin);
|
|
9651
9621
|
|
|
9652
9622
|
// src/plugins/vue/vue3/vue3-meta-data-builder-plugin.ts
|
|
9653
|
-
var
|
|
9623
|
+
var import_inversify24 = require("inversify");
|
|
9654
9624
|
var Vue3MetaDataBuilderPlugin = class {
|
|
9655
9625
|
/**
|
|
9656
9626
|
* 构建依赖库导入文件
|
|
@@ -9671,7 +9641,7 @@ var Vue3MetaDataBuilderPlugin = class {
|
|
|
9671
9641
|
}
|
|
9672
9642
|
};
|
|
9673
9643
|
Vue3MetaDataBuilderPlugin = __decorateClass([
|
|
9674
|
-
(0,
|
|
9644
|
+
(0, import_inversify24.injectable)()
|
|
9675
9645
|
], Vue3MetaDataBuilderPlugin);
|
|
9676
9646
|
function stringifyMetaData(obj) {
|
|
9677
9647
|
if (typeof obj === "object" && obj !== null) {
|
|
@@ -9705,7 +9675,7 @@ function stringifyMetaData(obj) {
|
|
|
9705
9675
|
}
|
|
9706
9676
|
|
|
9707
9677
|
// src/plugins/vue/vue3/vue3-components-index-builder-plugin.ts
|
|
9708
|
-
var
|
|
9678
|
+
var import_inversify25 = require("inversify");
|
|
9709
9679
|
var Vue3ComponentsIndexBuilderPlugin = class {
|
|
9710
9680
|
/**
|
|
9711
9681
|
* 构建业务组件导出入口文件
|
|
@@ -9735,11 +9705,11 @@ var Vue3ComponentsIndexBuilderPlugin = class {
|
|
|
9735
9705
|
}
|
|
9736
9706
|
};
|
|
9737
9707
|
Vue3ComponentsIndexBuilderPlugin = __decorateClass([
|
|
9738
|
-
(0,
|
|
9708
|
+
(0, import_inversify25.injectable)()
|
|
9739
9709
|
], Vue3ComponentsIndexBuilderPlugin);
|
|
9740
9710
|
|
|
9741
9711
|
// src/plugins/vue/vue3/vue3-client-lazyload-template-builder-plugin .ts
|
|
9742
|
-
var
|
|
9712
|
+
var import_inversify26 = require("inversify");
|
|
9743
9713
|
var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
9744
9714
|
constructor(microFrontendManager) {
|
|
9745
9715
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -9752,32 +9722,19 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
9752
9722
|
const isDebug = ir.configs.config.debug;
|
|
9753
9723
|
const entryScript = this.microFrontendManager.produceScript(ir);
|
|
9754
9724
|
return new ReactFileDescription(
|
|
9755
|
-
"../client-lazyload-template.
|
|
9725
|
+
"../client-lazyload-template.js",
|
|
9756
9726
|
[],
|
|
9757
9727
|
[],
|
|
9758
9728
|
[
|
|
9759
|
-
`
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
);` : ""}
|
|
9769
|
-
const lazyLoadCommand = \`
|
|
9770
|
-
\${JSON.stringify(jsAssets)}.forEach(asset => window.LazyLoad.js(asset));
|
|
9771
|
-
window.LazyLoad.css(\${JSON.stringify(cssAssets)});
|
|
9772
|
-
\`;
|
|
9773
|
-
return \`(function(){
|
|
9774
|
-
function loadAssets(){
|
|
9775
|
-
\${lazyLoadCommand};
|
|
9776
|
-
}
|
|
9777
|
-
${entryScript};
|
|
9778
|
-
})();\`;
|
|
9779
|
-
}
|
|
9780
|
-
`
|
|
9729
|
+
`const extraJS = [];
|
|
9730
|
+
const extraCSS = [];
|
|
9731
|
+
const entryCode = \`${entryScript}\`;
|
|
9732
|
+
|
|
9733
|
+
module.exports = {
|
|
9734
|
+
extraJS,
|
|
9735
|
+
extraCSS,
|
|
9736
|
+
entryCode,
|
|
9737
|
+
}`
|
|
9781
9738
|
]
|
|
9782
9739
|
);
|
|
9783
9740
|
}
|
|
@@ -9787,12 +9744,12 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
9787
9744
|
}
|
|
9788
9745
|
};
|
|
9789
9746
|
Vue3ClientLazyloadTemplateBuilderPlugin = __decorateClass([
|
|
9790
|
-
(0,
|
|
9791
|
-
__decorateParam(0, (0,
|
|
9747
|
+
(0, import_inversify26.injectable)(),
|
|
9748
|
+
__decorateParam(0, (0, import_inversify26.inject)(ServiceMetaKind.MicroFrontendManager))
|
|
9792
9749
|
], Vue3ClientLazyloadTemplateBuilderPlugin);
|
|
9793
9750
|
|
|
9794
9751
|
// src/plugins/vue/vue3/vue3-platform-builder-plugin.ts
|
|
9795
|
-
var
|
|
9752
|
+
var import_inversify27 = require("inversify");
|
|
9796
9753
|
var Vue3PlatformBuilderPlugin = class {
|
|
9797
9754
|
/**
|
|
9798
9755
|
* 构建平台配置文件
|
|
@@ -9803,7 +9760,8 @@ var Vue3PlatformBuilderPlugin = class {
|
|
|
9803
9760
|
const self = {
|
|
9804
9761
|
...routesExtractionPlugin.functions
|
|
9805
9762
|
};
|
|
9806
|
-
const
|
|
9763
|
+
const basePath = ir.configs.basePlatformConfig.basePath + "/";
|
|
9764
|
+
const { authResourcePaths, baseResourcePaths } = self.extractRoute(ir.views, basePath, {
|
|
9807
9765
|
lazy: false,
|
|
9808
9766
|
frameworkKind: "vue3"
|
|
9809
9767
|
});
|
|
@@ -9825,11 +9783,11 @@ var Vue3PlatformBuilderPlugin = class {
|
|
|
9825
9783
|
}
|
|
9826
9784
|
};
|
|
9827
9785
|
Vue3PlatformBuilderPlugin = __decorateClass([
|
|
9828
|
-
(0,
|
|
9786
|
+
(0, import_inversify27.injectable)()
|
|
9829
9787
|
], Vue3PlatformBuilderPlugin);
|
|
9830
9788
|
|
|
9831
9789
|
// src/plugins/vue/vue3/vue3-entry-css-plugin.ts
|
|
9832
|
-
var
|
|
9790
|
+
var import_inversify28 = require("inversify");
|
|
9833
9791
|
var Vue3EntryCssPlugin = class {
|
|
9834
9792
|
/**
|
|
9835
9793
|
* 构建依赖库导入文件
|
|
@@ -9846,7 +9804,7 @@ var Vue3EntryCssPlugin = class {
|
|
|
9846
9804
|
}
|
|
9847
9805
|
};
|
|
9848
9806
|
Vue3EntryCssPlugin = __decorateClass([
|
|
9849
|
-
(0,
|
|
9807
|
+
(0, import_inversify28.injectable)()
|
|
9850
9808
|
], Vue3EntryCssPlugin);
|
|
9851
9809
|
|
|
9852
9810
|
// src/plugins/vue/vue3/vue3-application-assembler-plugin.ts
|
|
@@ -9863,7 +9821,7 @@ var ComponentPathManager = class {
|
|
|
9863
9821
|
}
|
|
9864
9822
|
};
|
|
9865
9823
|
ComponentPathManager = __decorateClass([
|
|
9866
|
-
(0,
|
|
9824
|
+
(0, import_inversify29.injectable)()
|
|
9867
9825
|
], ComponentPathManager);
|
|
9868
9826
|
var Vue3ApplicationAssemblerPlugin = class {
|
|
9869
9827
|
constructor(vue3CodegenPlugin, routesExtactor, routerBuilder, entryBuilder, librariesBuilder, entryCssBuilder, componentsIndexBuilder, clientLazyloadTemplateBuilder, platformBuilder, metaDataBuilder) {
|
|
@@ -9918,17 +9876,17 @@ var Vue3ApplicationAssemblerPlugin = class {
|
|
|
9918
9876
|
}
|
|
9919
9877
|
};
|
|
9920
9878
|
Vue3ApplicationAssemblerPlugin = __decorateClass([
|
|
9921
|
-
(0,
|
|
9922
|
-
__decorateParam(0, (0,
|
|
9923
|
-
__decorateParam(1, (0,
|
|
9924
|
-
__decorateParam(2, (0,
|
|
9925
|
-
__decorateParam(3, (0,
|
|
9926
|
-
__decorateParam(4, (0,
|
|
9927
|
-
__decorateParam(5, (0,
|
|
9928
|
-
__decorateParam(6, (0,
|
|
9929
|
-
__decorateParam(7, (0,
|
|
9930
|
-
__decorateParam(8, (0,
|
|
9931
|
-
__decorateParam(9, (0,
|
|
9879
|
+
(0, import_inversify29.injectable)(),
|
|
9880
|
+
__decorateParam(0, (0, import_inversify29.inject)(Vue3CodegenPlugin)),
|
|
9881
|
+
__decorateParam(1, (0, import_inversify29.inject)(RoutesExtractionPlugin)),
|
|
9882
|
+
__decorateParam(2, (0, import_inversify29.inject)(VueRouterPlugin)),
|
|
9883
|
+
__decorateParam(3, (0, import_inversify29.inject)(Vue3EntryBuilderPlugin)),
|
|
9884
|
+
__decorateParam(4, (0, import_inversify29.inject)(Vue3LibrariesBuilderPlugin)),
|
|
9885
|
+
__decorateParam(5, (0, import_inversify29.inject)(Vue3EntryCssPlugin)),
|
|
9886
|
+
__decorateParam(6, (0, import_inversify29.inject)(Vue3ComponentsIndexBuilderPlugin)),
|
|
9887
|
+
__decorateParam(7, (0, import_inversify29.inject)(Vue3ClientLazyloadTemplateBuilderPlugin)),
|
|
9888
|
+
__decorateParam(8, (0, import_inversify29.inject)(Vue3PlatformBuilderPlugin)),
|
|
9889
|
+
__decorateParam(9, (0, import_inversify29.inject)(Vue3MetaDataBuilderPlugin))
|
|
9932
9890
|
], Vue3ApplicationAssemblerPlugin);
|
|
9933
9891
|
|
|
9934
9892
|
// src/plugins/vue/vue3/vue3-preset-plugin.ts
|
|
@@ -9983,7 +9941,7 @@ var Vue3PresetPlugin = class {
|
|
|
9983
9941
|
c.bind(ServiceMetaKind.ProjectOrganizer).to(ProjectOrganizerPlugin);
|
|
9984
9942
|
c.bind(ServiceMetaKind.FileSystemProvider).to(FileSystemPlugin).inSingletonScope();
|
|
9985
9943
|
c = BundlerConfigDataPlugin.install(c);
|
|
9986
|
-
c =
|
|
9944
|
+
c = RspackConfigPlugin.install(c);
|
|
9987
9945
|
c = FrontendBundlerConfigPlugin.install(c);
|
|
9988
9946
|
c = FrontendPerformancePlugin.install(c);
|
|
9989
9947
|
c = NpmPackageJSONManagerPlugin.install(c);
|
|
@@ -10000,20 +9958,20 @@ var Vue3PresetPlugin = class {
|
|
|
10000
9958
|
}
|
|
10001
9959
|
};
|
|
10002
9960
|
Vue3PresetPlugin = __decorateClass([
|
|
10003
|
-
(0,
|
|
10004
|
-
__decorateParam(0, (0,
|
|
10005
|
-
__decorateParam(1, (0,
|
|
10006
|
-
__decorateParam(2, (0,
|
|
10007
|
-
__decorateParam(3, (0,
|
|
10008
|
-
__decorateParam(4, (0,
|
|
9961
|
+
(0, import_inversify30.injectable)(),
|
|
9962
|
+
__decorateParam(0, (0, import_inversify30.inject)(ServiceMetaKind.IRBuilder)),
|
|
9963
|
+
__decorateParam(1, (0, import_inversify30.inject)(ServiceMetaKind.FileSystemProvider)),
|
|
9964
|
+
__decorateParam(2, (0, import_inversify30.inject)(NpmPackageJSONManagerPlugin)),
|
|
9965
|
+
__decorateParam(3, (0, import_inversify30.inject)(ServiceMetaKind.ProjectOrganizer)),
|
|
9966
|
+
__decorateParam(4, (0, import_inversify30.inject)(Vue3ApplicationAssemblerPlugin))
|
|
10009
9967
|
], Vue3PresetPlugin);
|
|
10010
9968
|
|
|
10011
9969
|
// src/default-container.ts
|
|
10012
9970
|
function makeDefaultContainer(kind = "react") {
|
|
10013
9971
|
if (kind === "react") {
|
|
10014
|
-
return ReactPresetPlugin.install(new
|
|
9972
|
+
return ReactPresetPlugin.install(new import_inversify31.Container());
|
|
10015
9973
|
} else if (kind === "vue3") {
|
|
10016
|
-
return Vue3PresetPlugin.install(new
|
|
9974
|
+
return Vue3PresetPlugin.install(new import_inversify31.Container());
|
|
10017
9975
|
} else {
|
|
10018
9976
|
throw new Error(`\u672A\u5B9E\u73B0${kind}\u7684\u9ED8\u8BA4\u5BB9\u5668`);
|
|
10019
9977
|
}
|
|
@@ -10024,6 +9982,35 @@ async function translateNASLToApp(app, frontend, config2, baseDir = "./out", con
|
|
|
10024
9982
|
const logger15 = Logger("\u7FFB\u8BD1\u8FC7\u7A0B");
|
|
10025
9983
|
logger15.debug({ config: config2 });
|
|
10026
9984
|
async function genCode() {
|
|
9985
|
+
const { needCompileViews = [] } = config2;
|
|
9986
|
+
if (needCompileViews?.length > 0) {
|
|
9987
|
+
let traverseChildren2 = function(view, callback) {
|
|
9988
|
+
if (view.children?.length > 0) {
|
|
9989
|
+
view.children.forEach((childView) => {
|
|
9990
|
+
const deep = callback(childView);
|
|
9991
|
+
if (deep) {
|
|
9992
|
+
traverseChildren2(childView, callback);
|
|
9993
|
+
}
|
|
9994
|
+
});
|
|
9995
|
+
}
|
|
9996
|
+
};
|
|
9997
|
+
var traverseChildren = traverseChildren2;
|
|
9998
|
+
logger15.info("\u5F00\u59CB\u6309\u9700\u7FFB\u8BD1\u9875\u9762");
|
|
9999
|
+
frontend.views.forEach((view) => {
|
|
10000
|
+
if (!needCompileViews.includes(view.nodePath)) {
|
|
10001
|
+
view.delete();
|
|
10002
|
+
} else {
|
|
10003
|
+
traverseChildren2(view, (childView) => {
|
|
10004
|
+
if (!needCompileViews.includes(childView.nodePath)) {
|
|
10005
|
+
childView.delete();
|
|
10006
|
+
return false;
|
|
10007
|
+
}
|
|
10008
|
+
return true;
|
|
10009
|
+
});
|
|
10010
|
+
}
|
|
10011
|
+
});
|
|
10012
|
+
logger15.info("\u7ED3\u675F\u6309\u9700\u7FFB\u8BD1\u9875\u9762");
|
|
10013
|
+
}
|
|
10027
10014
|
logger15.info("\u5F00\u59CB\u7FFB\u8BD1");
|
|
10028
10015
|
try {
|
|
10029
10016
|
const codeList2 = await container.get(ServiceMetaKind.NASLTranspiler).transpile({
|
|
@@ -10140,7 +10127,7 @@ async function compileAsProject(app, frontend, config2, container) {
|
|
|
10140
10127
|
}
|
|
10141
10128
|
|
|
10142
10129
|
// src/plugins/misc/program-analysis/analyzer-manager-plugin.ts
|
|
10143
|
-
var
|
|
10130
|
+
var import_inversify32 = require("inversify");
|
|
10144
10131
|
|
|
10145
10132
|
// src/plugins/misc/program-analysis/analysis/async-analysis.ts
|
|
10146
10133
|
function buildAsyncAnalyzer() {
|
|
@@ -10267,11 +10254,11 @@ var AnalyzerManagerPlugin = class {
|
|
|
10267
10254
|
}
|
|
10268
10255
|
};
|
|
10269
10256
|
AnalyzerManagerPlugin = __decorateClass([
|
|
10270
|
-
(0,
|
|
10257
|
+
(0, import_inversify32.injectable)()
|
|
10271
10258
|
], AnalyzerManagerPlugin);
|
|
10272
10259
|
|
|
10273
10260
|
// src/plugins/misc/name-mangler/name-mangler-manager-plugin.ts
|
|
10274
|
-
var
|
|
10261
|
+
var import_inversify33 = require("inversify");
|
|
10275
10262
|
|
|
10276
10263
|
// src/plugins/misc/name-mangler/name-mangler.ts
|
|
10277
10264
|
var NameMangler2 = class _NameMangler {
|
|
@@ -10338,7 +10325,7 @@ var NameManglerManagerPlugin = class {
|
|
|
10338
10325
|
}
|
|
10339
10326
|
};
|
|
10340
10327
|
NameManglerManagerPlugin = __decorateClass([
|
|
10341
|
-
(0,
|
|
10328
|
+
(0, import_inversify33.injectable)()
|
|
10342
10329
|
], NameManglerManagerPlugin);
|
|
10343
10330
|
|
|
10344
10331
|
// src/utils/sanity-check.ts
|