@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.mjs
CHANGED
|
@@ -2259,7 +2259,7 @@ import { Container as Container20 } from "inversify";
|
|
|
2259
2259
|
|
|
2260
2260
|
// src/plugins/vue/vue3/vue3-preset-plugin.ts
|
|
2261
2261
|
import "@abraham/reflection";
|
|
2262
|
-
import { inject as
|
|
2262
|
+
import { inject as inject15, injectable as injectable30 } from "inversify";
|
|
2263
2263
|
|
|
2264
2264
|
// src/service-metakind.ts
|
|
2265
2265
|
var ServiceMetaKind = {
|
|
@@ -4622,7 +4622,8 @@ query: {`;
|
|
|
4622
4622
|
let url2 = "`";
|
|
4623
4623
|
const viewArr = s3.genViewArr();
|
|
4624
4624
|
if (Array.isArray(viewArr) && viewArr.length) {
|
|
4625
|
-
|
|
4625
|
+
const prefixPath = s3.frontend?.prefixPath;
|
|
4626
|
+
url2 += `${prefixPath}/${viewArr.join("/")}`;
|
|
4626
4627
|
const { completeArguments } = s3;
|
|
4627
4628
|
if (completeArguments.length) {
|
|
4628
4629
|
const node = s3.viewNode;
|
|
@@ -6569,40 +6570,40 @@ var metadataPlugin = makePlugin({
|
|
|
6569
6570
|
// src/hack/material-config/material.config.js
|
|
6570
6571
|
var materials = {
|
|
6571
6572
|
framework: {
|
|
6572
|
-
version: "2.
|
|
6573
|
+
version: "2.1.0",
|
|
6573
6574
|
core: "@lcap/basic-template",
|
|
6574
6575
|
pc: [
|
|
6575
6576
|
{
|
|
6576
6577
|
frameworkKind: "vue2",
|
|
6577
6578
|
name: "@lcap/pc-template",
|
|
6578
|
-
version: "2.
|
|
6579
|
+
version: "2.1.0"
|
|
6579
6580
|
},
|
|
6580
6581
|
{
|
|
6581
6582
|
frameworkKind: "react",
|
|
6582
6583
|
name: "@lcap/pc-template-react",
|
|
6583
|
-
version: "2.
|
|
6584
|
+
version: "2.1.0"
|
|
6584
6585
|
},
|
|
6585
6586
|
{
|
|
6586
6587
|
frameworkKind: "vue3",
|
|
6587
6588
|
name: "@lcap/pc-template-vue3",
|
|
6588
|
-
version: "2.
|
|
6589
|
+
version: "2.1.0"
|
|
6589
6590
|
}
|
|
6590
6591
|
],
|
|
6591
6592
|
h5: [
|
|
6592
6593
|
{
|
|
6593
6594
|
frameworkKind: "vue2",
|
|
6594
6595
|
name: "@lcap/mobile-template",
|
|
6595
|
-
version: "2.
|
|
6596
|
+
version: "2.1.0"
|
|
6596
6597
|
},
|
|
6597
6598
|
{
|
|
6598
6599
|
frameworkKind: "react",
|
|
6599
6600
|
name: "@lcap/mobile-template-react",
|
|
6600
|
-
version: "2.
|
|
6601
|
+
version: "2.1.0"
|
|
6601
6602
|
},
|
|
6602
6603
|
{
|
|
6603
6604
|
frameworkKind: "vue3",
|
|
6604
6605
|
name: "@lcap/mobile-template-vue3",
|
|
6605
|
-
version: "2.
|
|
6606
|
+
version: "2.1.0"
|
|
6606
6607
|
}
|
|
6607
6608
|
]
|
|
6608
6609
|
},
|
|
@@ -9282,7 +9283,7 @@ BundlerConfigDataPlugin = __decorateClass([
|
|
|
9282
9283
|
__decorateParam(0, inject8(ServiceMetaKind.FrontendBundlerConfig))
|
|
9283
9284
|
], BundlerConfigDataPlugin);
|
|
9284
9285
|
|
|
9285
|
-
// src/plugins/misc/bundler/
|
|
9286
|
+
// src/plugins/misc/bundler/rspack-config-plugin.ts
|
|
9286
9287
|
import "@abraham/reflection";
|
|
9287
9288
|
import { injectable as injectable17, inject as inject9 } from "inversify";
|
|
9288
9289
|
var RspackConfigPlugin = class {
|
|
@@ -9306,9 +9307,16 @@ var RspackConfigPlugin = class {
|
|
|
9306
9307
|
`chunks: '${this.frontendPerformancePlugin?.performanceOptions?.chunks}'`
|
|
9307
9308
|
);
|
|
9308
9309
|
}
|
|
9310
|
+
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"}`);
|
|
9311
|
+
if (config2.needCompileViews && config2.needCompileViews.length > 0 && config2.cacheChunksMapCode) {
|
|
9312
|
+
rspackConfigSource = rspackConfigSource.replace("isIncremental: false", "isIncremental: true").replace("chunksMap: ''", `chunksMap: \`${config2.cacheChunksMapCode}\``);
|
|
9313
|
+
}
|
|
9314
|
+
if (config2.isExport) {
|
|
9315
|
+
rspackConfigSource = rspackConfigSource.replace(/\/\/ LcapPlugin start\s+new LcapPlugin\(\{[\s\S]*?\}\),\s+\/\/ LcapPlugin end/g, "");
|
|
9316
|
+
}
|
|
9309
9317
|
fs.write(
|
|
9310
9318
|
"/rspack.config.js",
|
|
9311
|
-
rspackConfigSource
|
|
9319
|
+
rspackConfigSource
|
|
9312
9320
|
);
|
|
9313
9321
|
}
|
|
9314
9322
|
}
|
|
@@ -9516,49 +9524,12 @@ EntrypointPlugin = __decorateClass([
|
|
|
9516
9524
|
__decorateParam(0, inject11(ServiceMetaKind.MicroFrontendManager))
|
|
9517
9525
|
], EntrypointPlugin);
|
|
9518
9526
|
|
|
9519
|
-
// src/plugins/misc/bundler/vite-config-plugin.ts
|
|
9520
|
-
import "@abraham/reflection";
|
|
9521
|
-
import { injectable as injectable20, inject as inject12 } from "inversify";
|
|
9522
|
-
var ViteConfigPlugin = class {
|
|
9523
|
-
constructor(bundlerConfigDataPlugin) {
|
|
9524
|
-
this.bundlerConfigDataPlugin = bundlerConfigDataPlugin;
|
|
9525
|
-
}
|
|
9526
|
-
async configBundlerConfig(app, frontend, config2, fs, frameworkKind) {
|
|
9527
|
-
const isDev = config2.env === "dev";
|
|
9528
|
-
const { backendUrl, publicPath, aliasMapStr, dependenciesStr } = await this.bundlerConfigDataPlugin.getBundlerConfigData(
|
|
9529
|
-
app,
|
|
9530
|
-
frontend,
|
|
9531
|
-
config2,
|
|
9532
|
-
fs,
|
|
9533
|
-
frameworkKind
|
|
9534
|
-
);
|
|
9535
|
-
const viteConfigSource = fs.read("/vite.config.ts")?.toString();
|
|
9536
|
-
if (viteConfigSource) {
|
|
9537
|
-
fs.write(
|
|
9538
|
-
"/vite.config.ts",
|
|
9539
|
-
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(
|
|
9540
|
-
"optimizeDeps: { include: [], },",
|
|
9541
|
-
`optimizeDeps: { include: [${dependenciesStr}], },`
|
|
9542
|
-
)
|
|
9543
|
-
);
|
|
9544
|
-
}
|
|
9545
|
-
}
|
|
9546
|
-
static install(c) {
|
|
9547
|
-
c.bind(ServiceMetaKind.FrontendBundlerFileConfig).to(ViteConfigPlugin).inSingletonScope();
|
|
9548
|
-
return c;
|
|
9549
|
-
}
|
|
9550
|
-
};
|
|
9551
|
-
ViteConfigPlugin = __decorateClass([
|
|
9552
|
-
injectable20(),
|
|
9553
|
-
__decorateParam(0, inject12(BundlerConfigDataPlugin))
|
|
9554
|
-
], ViteConfigPlugin);
|
|
9555
|
-
|
|
9556
9527
|
// src/plugins/vue/vue3/vue3-application-assembler-plugin.ts
|
|
9557
|
-
import { inject as
|
|
9528
|
+
import { inject as inject14, injectable as injectable29 } from "inversify";
|
|
9558
9529
|
|
|
9559
9530
|
// src/plugins/vue/common/vue-router-plugin.ts
|
|
9560
9531
|
import { kebab2Pascal as kebab2Pascal2 } from "@lcap/nasl-utils";
|
|
9561
|
-
import { injectable as
|
|
9532
|
+
import { injectable as injectable20 } from "inversify";
|
|
9562
9533
|
var VueRouterPlugin = class {
|
|
9563
9534
|
extractImportIR(routes, componentPathManager) {
|
|
9564
9535
|
const nameMangler = new NameMangler();
|
|
@@ -9627,11 +9598,11 @@ var VueRouterPlugin = class {
|
|
|
9627
9598
|
}
|
|
9628
9599
|
};
|
|
9629
9600
|
VueRouterPlugin = __decorateClass([
|
|
9630
|
-
|
|
9601
|
+
injectable20()
|
|
9631
9602
|
], VueRouterPlugin);
|
|
9632
9603
|
|
|
9633
9604
|
// src/plugins/vue/vue3/vue3-codegen-plugin.ts
|
|
9634
|
-
import { injectable as
|
|
9605
|
+
import { injectable as injectable21 } from "inversify";
|
|
9635
9606
|
import { kebab2Pascal as kebab2Pascal3 } from "@lcap/nasl-utils";
|
|
9636
9607
|
import { flatten as flatten2 } from "lodash";
|
|
9637
9608
|
var Vue3CodegenPlugin = class {
|
|
@@ -9679,11 +9650,11 @@ var Vue3CodegenPlugin = class {
|
|
|
9679
9650
|
}
|
|
9680
9651
|
};
|
|
9681
9652
|
Vue3CodegenPlugin = __decorateClass([
|
|
9682
|
-
|
|
9653
|
+
injectable21()
|
|
9683
9654
|
], Vue3CodegenPlugin);
|
|
9684
9655
|
|
|
9685
9656
|
// src/plugins/vue/vue3/vue3-entry-builder-plugin.ts
|
|
9686
|
-
import { injectable as
|
|
9657
|
+
import { injectable as injectable22, inject as inject12 } from "inversify";
|
|
9687
9658
|
var Vue3EntryBuilderPlugin = class {
|
|
9688
9659
|
constructor(microFrontendManager) {
|
|
9689
9660
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -9725,12 +9696,12 @@ var Vue3EntryBuilderPlugin = class {
|
|
|
9725
9696
|
}
|
|
9726
9697
|
};
|
|
9727
9698
|
Vue3EntryBuilderPlugin = __decorateClass([
|
|
9728
|
-
|
|
9729
|
-
__decorateParam(0,
|
|
9699
|
+
injectable22(),
|
|
9700
|
+
__decorateParam(0, inject12(ServiceMetaKind.MicroFrontendManager))
|
|
9730
9701
|
], Vue3EntryBuilderPlugin);
|
|
9731
9702
|
|
|
9732
9703
|
// src/plugins/vue/vue3/vue3-libraries-builder-plugin.ts
|
|
9733
|
-
import { injectable as
|
|
9704
|
+
import { injectable as injectable23 } from "inversify";
|
|
9734
9705
|
var Vue3LibrariesBuilderPlugin = class {
|
|
9735
9706
|
/**
|
|
9736
9707
|
* 构建依赖库导入文件
|
|
@@ -9768,11 +9739,11 @@ var Vue3LibrariesBuilderPlugin = class {
|
|
|
9768
9739
|
}
|
|
9769
9740
|
};
|
|
9770
9741
|
Vue3LibrariesBuilderPlugin = __decorateClass([
|
|
9771
|
-
|
|
9742
|
+
injectable23()
|
|
9772
9743
|
], Vue3LibrariesBuilderPlugin);
|
|
9773
9744
|
|
|
9774
9745
|
// src/plugins/vue/vue3/vue3-meta-data-builder-plugin.ts
|
|
9775
|
-
import { injectable as
|
|
9746
|
+
import { injectable as injectable24 } from "inversify";
|
|
9776
9747
|
var Vue3MetaDataBuilderPlugin = class {
|
|
9777
9748
|
/**
|
|
9778
9749
|
* 构建依赖库导入文件
|
|
@@ -9793,7 +9764,7 @@ var Vue3MetaDataBuilderPlugin = class {
|
|
|
9793
9764
|
}
|
|
9794
9765
|
};
|
|
9795
9766
|
Vue3MetaDataBuilderPlugin = __decorateClass([
|
|
9796
|
-
|
|
9767
|
+
injectable24()
|
|
9797
9768
|
], Vue3MetaDataBuilderPlugin);
|
|
9798
9769
|
function stringifyMetaData(obj) {
|
|
9799
9770
|
if (typeof obj === "object" && obj !== null) {
|
|
@@ -9827,7 +9798,7 @@ function stringifyMetaData(obj) {
|
|
|
9827
9798
|
}
|
|
9828
9799
|
|
|
9829
9800
|
// src/plugins/vue/vue3/vue3-components-index-builder-plugin.ts
|
|
9830
|
-
import { injectable as
|
|
9801
|
+
import { injectable as injectable25 } from "inversify";
|
|
9831
9802
|
var Vue3ComponentsIndexBuilderPlugin = class {
|
|
9832
9803
|
/**
|
|
9833
9804
|
* 构建业务组件导出入口文件
|
|
@@ -9857,11 +9828,11 @@ var Vue3ComponentsIndexBuilderPlugin = class {
|
|
|
9857
9828
|
}
|
|
9858
9829
|
};
|
|
9859
9830
|
Vue3ComponentsIndexBuilderPlugin = __decorateClass([
|
|
9860
|
-
|
|
9831
|
+
injectable25()
|
|
9861
9832
|
], Vue3ComponentsIndexBuilderPlugin);
|
|
9862
9833
|
|
|
9863
9834
|
// src/plugins/vue/vue3/vue3-client-lazyload-template-builder-plugin .ts
|
|
9864
|
-
import { injectable as
|
|
9835
|
+
import { injectable as injectable26, inject as inject13 } from "inversify";
|
|
9865
9836
|
var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
9866
9837
|
constructor(microFrontendManager) {
|
|
9867
9838
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -9874,32 +9845,19 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
9874
9845
|
const isDebug = ir.configs.config.debug;
|
|
9875
9846
|
const entryScript = this.microFrontendManager.produceScript(ir);
|
|
9876
9847
|
return new ReactFileDescription(
|
|
9877
|
-
"../client-lazyload-template.
|
|
9848
|
+
"../client-lazyload-template.js",
|
|
9878
9849
|
[],
|
|
9879
9850
|
[],
|
|
9880
9851
|
[
|
|
9881
|
-
`
|
|
9882
|
-
|
|
9883
|
-
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
);` : ""}
|
|
9891
|
-
const lazyLoadCommand = \`
|
|
9892
|
-
\${JSON.stringify(jsAssets)}.forEach(asset => window.LazyLoad.js(asset));
|
|
9893
|
-
window.LazyLoad.css(\${JSON.stringify(cssAssets)});
|
|
9894
|
-
\`;
|
|
9895
|
-
return \`(function(){
|
|
9896
|
-
function loadAssets(){
|
|
9897
|
-
\${lazyLoadCommand};
|
|
9898
|
-
}
|
|
9899
|
-
${entryScript};
|
|
9900
|
-
})();\`;
|
|
9901
|
-
}
|
|
9902
|
-
`
|
|
9852
|
+
`const extraJS = [];
|
|
9853
|
+
const extraCSS = [];
|
|
9854
|
+
const entryCode = \`${entryScript}\`;
|
|
9855
|
+
|
|
9856
|
+
module.exports = {
|
|
9857
|
+
extraJS,
|
|
9858
|
+
extraCSS,
|
|
9859
|
+
entryCode,
|
|
9860
|
+
}`
|
|
9903
9861
|
]
|
|
9904
9862
|
);
|
|
9905
9863
|
}
|
|
@@ -9909,12 +9867,12 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
9909
9867
|
}
|
|
9910
9868
|
};
|
|
9911
9869
|
Vue3ClientLazyloadTemplateBuilderPlugin = __decorateClass([
|
|
9912
|
-
|
|
9913
|
-
__decorateParam(0,
|
|
9870
|
+
injectable26(),
|
|
9871
|
+
__decorateParam(0, inject13(ServiceMetaKind.MicroFrontendManager))
|
|
9914
9872
|
], Vue3ClientLazyloadTemplateBuilderPlugin);
|
|
9915
9873
|
|
|
9916
9874
|
// src/plugins/vue/vue3/vue3-platform-builder-plugin.ts
|
|
9917
|
-
import { injectable as
|
|
9875
|
+
import { injectable as injectable27 } from "inversify";
|
|
9918
9876
|
var Vue3PlatformBuilderPlugin = class {
|
|
9919
9877
|
/**
|
|
9920
9878
|
* 构建平台配置文件
|
|
@@ -9948,11 +9906,11 @@ var Vue3PlatformBuilderPlugin = class {
|
|
|
9948
9906
|
}
|
|
9949
9907
|
};
|
|
9950
9908
|
Vue3PlatformBuilderPlugin = __decorateClass([
|
|
9951
|
-
|
|
9909
|
+
injectable27()
|
|
9952
9910
|
], Vue3PlatformBuilderPlugin);
|
|
9953
9911
|
|
|
9954
9912
|
// src/plugins/vue/vue3/vue3-entry-css-plugin.ts
|
|
9955
|
-
import { injectable as
|
|
9913
|
+
import { injectable as injectable28 } from "inversify";
|
|
9956
9914
|
var Vue3EntryCssPlugin = class {
|
|
9957
9915
|
/**
|
|
9958
9916
|
* 构建依赖库导入文件
|
|
@@ -9969,7 +9927,7 @@ var Vue3EntryCssPlugin = class {
|
|
|
9969
9927
|
}
|
|
9970
9928
|
};
|
|
9971
9929
|
Vue3EntryCssPlugin = __decorateClass([
|
|
9972
|
-
|
|
9930
|
+
injectable28()
|
|
9973
9931
|
], Vue3EntryCssPlugin);
|
|
9974
9932
|
|
|
9975
9933
|
// src/plugins/vue/vue3/vue3-application-assembler-plugin.ts
|
|
@@ -9986,7 +9944,7 @@ var ComponentPathManager = class {
|
|
|
9986
9944
|
}
|
|
9987
9945
|
};
|
|
9988
9946
|
ComponentPathManager = __decorateClass([
|
|
9989
|
-
|
|
9947
|
+
injectable29()
|
|
9990
9948
|
], ComponentPathManager);
|
|
9991
9949
|
var Vue3ApplicationAssemblerPlugin = class {
|
|
9992
9950
|
constructor(vue3CodegenPlugin, routesExtactor, routerBuilder, entryBuilder, librariesBuilder, entryCssBuilder, componentsIndexBuilder, clientLazyloadTemplateBuilder, platformBuilder, metaDataBuilder) {
|
|
@@ -10041,17 +9999,17 @@ var Vue3ApplicationAssemblerPlugin = class {
|
|
|
10041
9999
|
}
|
|
10042
10000
|
};
|
|
10043
10001
|
Vue3ApplicationAssemblerPlugin = __decorateClass([
|
|
10044
|
-
|
|
10045
|
-
__decorateParam(0,
|
|
10046
|
-
__decorateParam(1,
|
|
10047
|
-
__decorateParam(2,
|
|
10048
|
-
__decorateParam(3,
|
|
10049
|
-
__decorateParam(4,
|
|
10050
|
-
__decorateParam(5,
|
|
10051
|
-
__decorateParam(6,
|
|
10052
|
-
__decorateParam(7,
|
|
10053
|
-
__decorateParam(8,
|
|
10054
|
-
__decorateParam(9,
|
|
10002
|
+
injectable29(),
|
|
10003
|
+
__decorateParam(0, inject14(Vue3CodegenPlugin)),
|
|
10004
|
+
__decorateParam(1, inject14(RoutesExtractionPlugin)),
|
|
10005
|
+
__decorateParam(2, inject14(VueRouterPlugin)),
|
|
10006
|
+
__decorateParam(3, inject14(Vue3EntryBuilderPlugin)),
|
|
10007
|
+
__decorateParam(4, inject14(Vue3LibrariesBuilderPlugin)),
|
|
10008
|
+
__decorateParam(5, inject14(Vue3EntryCssPlugin)),
|
|
10009
|
+
__decorateParam(6, inject14(Vue3ComponentsIndexBuilderPlugin)),
|
|
10010
|
+
__decorateParam(7, inject14(Vue3ClientLazyloadTemplateBuilderPlugin)),
|
|
10011
|
+
__decorateParam(8, inject14(Vue3PlatformBuilderPlugin)),
|
|
10012
|
+
__decorateParam(9, inject14(Vue3MetaDataBuilderPlugin))
|
|
10055
10013
|
], Vue3ApplicationAssemblerPlugin);
|
|
10056
10014
|
|
|
10057
10015
|
// src/plugins/vue/vue3/vue3-preset-plugin.ts
|
|
@@ -10106,7 +10064,7 @@ var Vue3PresetPlugin = class {
|
|
|
10106
10064
|
c.bind(ServiceMetaKind.ProjectOrganizer).to(ProjectOrganizerPlugin);
|
|
10107
10065
|
c.bind(ServiceMetaKind.FileSystemProvider).to(FileSystemPlugin).inSingletonScope();
|
|
10108
10066
|
c = BundlerConfigDataPlugin.install(c);
|
|
10109
|
-
c =
|
|
10067
|
+
c = RspackConfigPlugin.install(c);
|
|
10110
10068
|
c = FrontendBundlerConfigPlugin.install(c);
|
|
10111
10069
|
c = FrontendPerformancePlugin.install(c);
|
|
10112
10070
|
c = NpmPackageJSONManagerPlugin.install(c);
|
|
@@ -10123,12 +10081,12 @@ var Vue3PresetPlugin = class {
|
|
|
10123
10081
|
}
|
|
10124
10082
|
};
|
|
10125
10083
|
Vue3PresetPlugin = __decorateClass([
|
|
10126
|
-
|
|
10127
|
-
__decorateParam(0,
|
|
10128
|
-
__decorateParam(1,
|
|
10129
|
-
__decorateParam(2,
|
|
10130
|
-
__decorateParam(3,
|
|
10131
|
-
__decorateParam(4,
|
|
10084
|
+
injectable30(),
|
|
10085
|
+
__decorateParam(0, inject15(ServiceMetaKind.IRBuilder)),
|
|
10086
|
+
__decorateParam(1, inject15(ServiceMetaKind.FileSystemProvider)),
|
|
10087
|
+
__decorateParam(2, inject15(NpmPackageJSONManagerPlugin)),
|
|
10088
|
+
__decorateParam(3, inject15(ServiceMetaKind.ProjectOrganizer)),
|
|
10089
|
+
__decorateParam(4, inject15(Vue3ApplicationAssemblerPlugin))
|
|
10132
10090
|
], Vue3PresetPlugin);
|
|
10133
10091
|
|
|
10134
10092
|
// src/default-container.ts
|
|
@@ -10147,6 +10105,35 @@ async function translateNASLToApp(app, frontend, config2, baseDir = "./out", con
|
|
|
10147
10105
|
const logger15 = Logger("\u7FFB\u8BD1\u8FC7\u7A0B");
|
|
10148
10106
|
logger15.debug({ config: config2 });
|
|
10149
10107
|
async function genCode() {
|
|
10108
|
+
const { needCompileViews = [] } = config2;
|
|
10109
|
+
if (needCompileViews?.length > 0) {
|
|
10110
|
+
let traverseChildren2 = function(view, callback) {
|
|
10111
|
+
if (view.children?.length > 0) {
|
|
10112
|
+
view.children.forEach((childView) => {
|
|
10113
|
+
const deep = callback(childView);
|
|
10114
|
+
if (deep) {
|
|
10115
|
+
traverseChildren2(childView, callback);
|
|
10116
|
+
}
|
|
10117
|
+
});
|
|
10118
|
+
}
|
|
10119
|
+
};
|
|
10120
|
+
var traverseChildren = traverseChildren2;
|
|
10121
|
+
logger15.info("\u5F00\u59CB\u6309\u9700\u7FFB\u8BD1\u9875\u9762");
|
|
10122
|
+
frontend.views.forEach((view) => {
|
|
10123
|
+
if (!needCompileViews.includes(view.nodePath)) {
|
|
10124
|
+
view.delete();
|
|
10125
|
+
} else {
|
|
10126
|
+
traverseChildren2(view, (childView) => {
|
|
10127
|
+
if (!needCompileViews.includes(childView.nodePath)) {
|
|
10128
|
+
childView.delete();
|
|
10129
|
+
return false;
|
|
10130
|
+
}
|
|
10131
|
+
return true;
|
|
10132
|
+
});
|
|
10133
|
+
}
|
|
10134
|
+
});
|
|
10135
|
+
logger15.info("\u7ED3\u675F\u6309\u9700\u7FFB\u8BD1\u9875\u9762");
|
|
10136
|
+
}
|
|
10150
10137
|
logger15.info("\u5F00\u59CB\u7FFB\u8BD1");
|
|
10151
10138
|
try {
|
|
10152
10139
|
const codeList2 = await container.get(ServiceMetaKind.NASLTranspiler).transpile({
|
|
@@ -10263,7 +10250,7 @@ async function compileAsProject(app, frontend, config2, container) {
|
|
|
10263
10250
|
}
|
|
10264
10251
|
|
|
10265
10252
|
// src/plugins/misc/program-analysis/analyzer-manager-plugin.ts
|
|
10266
|
-
import { injectable as
|
|
10253
|
+
import { injectable as injectable31 } from "inversify";
|
|
10267
10254
|
|
|
10268
10255
|
// src/plugins/misc/program-analysis/analysis/async-analysis.ts
|
|
10269
10256
|
function buildAsyncAnalyzer() {
|
|
@@ -10390,11 +10377,11 @@ var AnalyzerManagerPlugin = class {
|
|
|
10390
10377
|
}
|
|
10391
10378
|
};
|
|
10392
10379
|
AnalyzerManagerPlugin = __decorateClass([
|
|
10393
|
-
|
|
10380
|
+
injectable31()
|
|
10394
10381
|
], AnalyzerManagerPlugin);
|
|
10395
10382
|
|
|
10396
10383
|
// src/plugins/misc/name-mangler/name-mangler-manager-plugin.ts
|
|
10397
|
-
import { injectable as
|
|
10384
|
+
import { injectable as injectable32 } from "inversify";
|
|
10398
10385
|
|
|
10399
10386
|
// src/plugins/misc/name-mangler/name-mangler.ts
|
|
10400
10387
|
var NameMangler2 = class _NameMangler {
|
|
@@ -10461,7 +10448,7 @@ var NameManglerManagerPlugin = class {
|
|
|
10461
10448
|
}
|
|
10462
10449
|
};
|
|
10463
10450
|
NameManglerManagerPlugin = __decorateClass([
|
|
10464
|
-
|
|
10451
|
+
injectable32()
|
|
10465
10452
|
], NameManglerManagerPlugin);
|
|
10466
10453
|
|
|
10467
10454
|
// src/utils/sanity-check.ts
|