@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/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 = {
|
|
@@ -4499,7 +4499,8 @@ query: {`;
|
|
|
4499
4499
|
let url2 = "`";
|
|
4500
4500
|
const viewArr = s3.genViewArr();
|
|
4501
4501
|
if (Array.isArray(viewArr) && viewArr.length) {
|
|
4502
|
-
|
|
4502
|
+
const prefixPath = s3.frontend?.prefixPath;
|
|
4503
|
+
url2 += `${prefixPath}/${viewArr.join("/")}`;
|
|
4503
4504
|
const { completeArguments } = s3;
|
|
4504
4505
|
if (completeArguments.length) {
|
|
4505
4506
|
const node = s3.viewNode;
|
|
@@ -6446,40 +6447,40 @@ var metadataPlugin = makePlugin({
|
|
|
6446
6447
|
// src/hack/material-config/material.config.js
|
|
6447
6448
|
var materials = {
|
|
6448
6449
|
framework: {
|
|
6449
|
-
version: "2.
|
|
6450
|
+
version: "2.1.0",
|
|
6450
6451
|
core: "@lcap/basic-template",
|
|
6451
6452
|
pc: [
|
|
6452
6453
|
{
|
|
6453
6454
|
frameworkKind: "vue2",
|
|
6454
6455
|
name: "@lcap/pc-template",
|
|
6455
|
-
version: "2.
|
|
6456
|
+
version: "2.1.0"
|
|
6456
6457
|
},
|
|
6457
6458
|
{
|
|
6458
6459
|
frameworkKind: "react",
|
|
6459
6460
|
name: "@lcap/pc-template-react",
|
|
6460
|
-
version: "2.
|
|
6461
|
+
version: "2.1.0"
|
|
6461
6462
|
},
|
|
6462
6463
|
{
|
|
6463
6464
|
frameworkKind: "vue3",
|
|
6464
6465
|
name: "@lcap/pc-template-vue3",
|
|
6465
|
-
version: "2.
|
|
6466
|
+
version: "2.1.0"
|
|
6466
6467
|
}
|
|
6467
6468
|
],
|
|
6468
6469
|
h5: [
|
|
6469
6470
|
{
|
|
6470
6471
|
frameworkKind: "vue2",
|
|
6471
6472
|
name: "@lcap/mobile-template",
|
|
6472
|
-
version: "2.
|
|
6473
|
+
version: "2.1.0"
|
|
6473
6474
|
},
|
|
6474
6475
|
{
|
|
6475
6476
|
frameworkKind: "react",
|
|
6476
6477
|
name: "@lcap/mobile-template-react",
|
|
6477
|
-
version: "2.
|
|
6478
|
+
version: "2.1.0"
|
|
6478
6479
|
},
|
|
6479
6480
|
{
|
|
6480
6481
|
frameworkKind: "vue3",
|
|
6481
6482
|
name: "@lcap/mobile-template-vue3",
|
|
6482
|
-
version: "2.
|
|
6483
|
+
version: "2.1.0"
|
|
6483
6484
|
}
|
|
6484
6485
|
]
|
|
6485
6486
|
},
|
|
@@ -9159,7 +9160,7 @@ BundlerConfigDataPlugin = __decorateClass([
|
|
|
9159
9160
|
__decorateParam(0, (0, import_inversify16.inject)(ServiceMetaKind.FrontendBundlerConfig))
|
|
9160
9161
|
], BundlerConfigDataPlugin);
|
|
9161
9162
|
|
|
9162
|
-
// src/plugins/misc/bundler/
|
|
9163
|
+
// src/plugins/misc/bundler/rspack-config-plugin.ts
|
|
9163
9164
|
var import_reflection4 = require("@abraham/reflection");
|
|
9164
9165
|
var import_inversify17 = require("inversify");
|
|
9165
9166
|
var RspackConfigPlugin = class {
|
|
@@ -9183,9 +9184,16 @@ var RspackConfigPlugin = class {
|
|
|
9183
9184
|
`chunks: '${this.frontendPerformancePlugin?.performanceOptions?.chunks}'`
|
|
9184
9185
|
);
|
|
9185
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
|
+
}
|
|
9186
9194
|
fs.write(
|
|
9187
9195
|
"/rspack.config.js",
|
|
9188
|
-
rspackConfigSource
|
|
9196
|
+
rspackConfigSource
|
|
9189
9197
|
);
|
|
9190
9198
|
}
|
|
9191
9199
|
}
|
|
@@ -9393,49 +9401,12 @@ EntrypointPlugin = __decorateClass([
|
|
|
9393
9401
|
__decorateParam(0, (0, import_inversify19.inject)(ServiceMetaKind.MicroFrontendManager))
|
|
9394
9402
|
], EntrypointPlugin);
|
|
9395
9403
|
|
|
9396
|
-
// src/plugins/misc/bundler/vite-config-plugin.ts
|
|
9397
|
-
var import_reflection6 = require("@abraham/reflection");
|
|
9398
|
-
var import_inversify20 = require("inversify");
|
|
9399
|
-
var ViteConfigPlugin = class {
|
|
9400
|
-
constructor(bundlerConfigDataPlugin) {
|
|
9401
|
-
this.bundlerConfigDataPlugin = bundlerConfigDataPlugin;
|
|
9402
|
-
}
|
|
9403
|
-
async configBundlerConfig(app, frontend, config2, fs, frameworkKind) {
|
|
9404
|
-
const isDev = config2.env === "dev";
|
|
9405
|
-
const { backendUrl, publicPath, aliasMapStr, dependenciesStr } = await this.bundlerConfigDataPlugin.getBundlerConfigData(
|
|
9406
|
-
app,
|
|
9407
|
-
frontend,
|
|
9408
|
-
config2,
|
|
9409
|
-
fs,
|
|
9410
|
-
frameworkKind
|
|
9411
|
-
);
|
|
9412
|
-
const viteConfigSource = fs.read("/vite.config.ts")?.toString();
|
|
9413
|
-
if (viteConfigSource) {
|
|
9414
|
-
fs.write(
|
|
9415
|
-
"/vite.config.ts",
|
|
9416
|
-
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(
|
|
9417
|
-
"optimizeDeps: { include: [], },",
|
|
9418
|
-
`optimizeDeps: { include: [${dependenciesStr}], },`
|
|
9419
|
-
)
|
|
9420
|
-
);
|
|
9421
|
-
}
|
|
9422
|
-
}
|
|
9423
|
-
static install(c) {
|
|
9424
|
-
c.bind(ServiceMetaKind.FrontendBundlerFileConfig).to(ViteConfigPlugin).inSingletonScope();
|
|
9425
|
-
return c;
|
|
9426
|
-
}
|
|
9427
|
-
};
|
|
9428
|
-
ViteConfigPlugin = __decorateClass([
|
|
9429
|
-
(0, import_inversify20.injectable)(),
|
|
9430
|
-
__decorateParam(0, (0, import_inversify20.inject)(BundlerConfigDataPlugin))
|
|
9431
|
-
], ViteConfigPlugin);
|
|
9432
|
-
|
|
9433
9404
|
// src/plugins/vue/vue3/vue3-application-assembler-plugin.ts
|
|
9434
|
-
var
|
|
9405
|
+
var import_inversify29 = require("inversify");
|
|
9435
9406
|
|
|
9436
9407
|
// src/plugins/vue/common/vue-router-plugin.ts
|
|
9437
9408
|
var import_nasl_utils2 = require("@lcap/nasl-utils");
|
|
9438
|
-
var
|
|
9409
|
+
var import_inversify20 = require("inversify");
|
|
9439
9410
|
var VueRouterPlugin = class {
|
|
9440
9411
|
extractImportIR(routes, componentPathManager) {
|
|
9441
9412
|
const nameMangler = new NameMangler();
|
|
@@ -9504,11 +9475,11 @@ var VueRouterPlugin = class {
|
|
|
9504
9475
|
}
|
|
9505
9476
|
};
|
|
9506
9477
|
VueRouterPlugin = __decorateClass([
|
|
9507
|
-
(0,
|
|
9478
|
+
(0, import_inversify20.injectable)()
|
|
9508
9479
|
], VueRouterPlugin);
|
|
9509
9480
|
|
|
9510
9481
|
// src/plugins/vue/vue3/vue3-codegen-plugin.ts
|
|
9511
|
-
var
|
|
9482
|
+
var import_inversify21 = require("inversify");
|
|
9512
9483
|
var import_nasl_utils3 = require("@lcap/nasl-utils");
|
|
9513
9484
|
var import_lodash8 = require("lodash");
|
|
9514
9485
|
var Vue3CodegenPlugin = class {
|
|
@@ -9556,11 +9527,11 @@ var Vue3CodegenPlugin = class {
|
|
|
9556
9527
|
}
|
|
9557
9528
|
};
|
|
9558
9529
|
Vue3CodegenPlugin = __decorateClass([
|
|
9559
|
-
(0,
|
|
9530
|
+
(0, import_inversify21.injectable)()
|
|
9560
9531
|
], Vue3CodegenPlugin);
|
|
9561
9532
|
|
|
9562
9533
|
// src/plugins/vue/vue3/vue3-entry-builder-plugin.ts
|
|
9563
|
-
var
|
|
9534
|
+
var import_inversify22 = require("inversify");
|
|
9564
9535
|
var Vue3EntryBuilderPlugin = class {
|
|
9565
9536
|
constructor(microFrontendManager) {
|
|
9566
9537
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -9602,12 +9573,12 @@ var Vue3EntryBuilderPlugin = class {
|
|
|
9602
9573
|
}
|
|
9603
9574
|
};
|
|
9604
9575
|
Vue3EntryBuilderPlugin = __decorateClass([
|
|
9605
|
-
(0,
|
|
9606
|
-
__decorateParam(0, (0,
|
|
9576
|
+
(0, import_inversify22.injectable)(),
|
|
9577
|
+
__decorateParam(0, (0, import_inversify22.inject)(ServiceMetaKind.MicroFrontendManager))
|
|
9607
9578
|
], Vue3EntryBuilderPlugin);
|
|
9608
9579
|
|
|
9609
9580
|
// src/plugins/vue/vue3/vue3-libraries-builder-plugin.ts
|
|
9610
|
-
var
|
|
9581
|
+
var import_inversify23 = require("inversify");
|
|
9611
9582
|
var Vue3LibrariesBuilderPlugin = class {
|
|
9612
9583
|
/**
|
|
9613
9584
|
* 构建依赖库导入文件
|
|
@@ -9645,11 +9616,11 @@ var Vue3LibrariesBuilderPlugin = class {
|
|
|
9645
9616
|
}
|
|
9646
9617
|
};
|
|
9647
9618
|
Vue3LibrariesBuilderPlugin = __decorateClass([
|
|
9648
|
-
(0,
|
|
9619
|
+
(0, import_inversify23.injectable)()
|
|
9649
9620
|
], Vue3LibrariesBuilderPlugin);
|
|
9650
9621
|
|
|
9651
9622
|
// src/plugins/vue/vue3/vue3-meta-data-builder-plugin.ts
|
|
9652
|
-
var
|
|
9623
|
+
var import_inversify24 = require("inversify");
|
|
9653
9624
|
var Vue3MetaDataBuilderPlugin = class {
|
|
9654
9625
|
/**
|
|
9655
9626
|
* 构建依赖库导入文件
|
|
@@ -9670,7 +9641,7 @@ var Vue3MetaDataBuilderPlugin = class {
|
|
|
9670
9641
|
}
|
|
9671
9642
|
};
|
|
9672
9643
|
Vue3MetaDataBuilderPlugin = __decorateClass([
|
|
9673
|
-
(0,
|
|
9644
|
+
(0, import_inversify24.injectable)()
|
|
9674
9645
|
], Vue3MetaDataBuilderPlugin);
|
|
9675
9646
|
function stringifyMetaData(obj) {
|
|
9676
9647
|
if (typeof obj === "object" && obj !== null) {
|
|
@@ -9704,7 +9675,7 @@ function stringifyMetaData(obj) {
|
|
|
9704
9675
|
}
|
|
9705
9676
|
|
|
9706
9677
|
// src/plugins/vue/vue3/vue3-components-index-builder-plugin.ts
|
|
9707
|
-
var
|
|
9678
|
+
var import_inversify25 = require("inversify");
|
|
9708
9679
|
var Vue3ComponentsIndexBuilderPlugin = class {
|
|
9709
9680
|
/**
|
|
9710
9681
|
* 构建业务组件导出入口文件
|
|
@@ -9734,11 +9705,11 @@ var Vue3ComponentsIndexBuilderPlugin = class {
|
|
|
9734
9705
|
}
|
|
9735
9706
|
};
|
|
9736
9707
|
Vue3ComponentsIndexBuilderPlugin = __decorateClass([
|
|
9737
|
-
(0,
|
|
9708
|
+
(0, import_inversify25.injectable)()
|
|
9738
9709
|
], Vue3ComponentsIndexBuilderPlugin);
|
|
9739
9710
|
|
|
9740
9711
|
// src/plugins/vue/vue3/vue3-client-lazyload-template-builder-plugin .ts
|
|
9741
|
-
var
|
|
9712
|
+
var import_inversify26 = require("inversify");
|
|
9742
9713
|
var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
9743
9714
|
constructor(microFrontendManager) {
|
|
9744
9715
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -9751,32 +9722,19 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
9751
9722
|
const isDebug = ir.configs.config.debug;
|
|
9752
9723
|
const entryScript = this.microFrontendManager.produceScript(ir);
|
|
9753
9724
|
return new ReactFileDescription(
|
|
9754
|
-
"../client-lazyload-template.
|
|
9725
|
+
"../client-lazyload-template.js",
|
|
9755
9726
|
[],
|
|
9756
9727
|
[],
|
|
9757
9728
|
[
|
|
9758
|
-
`
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
);` : ""}
|
|
9768
|
-
const lazyLoadCommand = \`
|
|
9769
|
-
\${JSON.stringify(jsAssets)}.forEach(asset => window.LazyLoad.js(asset));
|
|
9770
|
-
window.LazyLoad.css(\${JSON.stringify(cssAssets)});
|
|
9771
|
-
\`;
|
|
9772
|
-
return \`(function(){
|
|
9773
|
-
function loadAssets(){
|
|
9774
|
-
\${lazyLoadCommand};
|
|
9775
|
-
}
|
|
9776
|
-
${entryScript};
|
|
9777
|
-
})();\`;
|
|
9778
|
-
}
|
|
9779
|
-
`
|
|
9729
|
+
`const extraJS = [];
|
|
9730
|
+
const extraCSS = [];
|
|
9731
|
+
const entryCode = \`${entryScript}\`;
|
|
9732
|
+
|
|
9733
|
+
module.exports = {
|
|
9734
|
+
extraJS,
|
|
9735
|
+
extraCSS,
|
|
9736
|
+
entryCode,
|
|
9737
|
+
}`
|
|
9780
9738
|
]
|
|
9781
9739
|
);
|
|
9782
9740
|
}
|
|
@@ -9786,12 +9744,12 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
9786
9744
|
}
|
|
9787
9745
|
};
|
|
9788
9746
|
Vue3ClientLazyloadTemplateBuilderPlugin = __decorateClass([
|
|
9789
|
-
(0,
|
|
9790
|
-
__decorateParam(0, (0,
|
|
9747
|
+
(0, import_inversify26.injectable)(),
|
|
9748
|
+
__decorateParam(0, (0, import_inversify26.inject)(ServiceMetaKind.MicroFrontendManager))
|
|
9791
9749
|
], Vue3ClientLazyloadTemplateBuilderPlugin);
|
|
9792
9750
|
|
|
9793
9751
|
// src/plugins/vue/vue3/vue3-platform-builder-plugin.ts
|
|
9794
|
-
var
|
|
9752
|
+
var import_inversify27 = require("inversify");
|
|
9795
9753
|
var Vue3PlatformBuilderPlugin = class {
|
|
9796
9754
|
/**
|
|
9797
9755
|
* 构建平台配置文件
|
|
@@ -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
|