@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.mjs
CHANGED
|
@@ -20,7 +20,7 @@ import { Container as Container20 } from "inversify";
|
|
|
20
20
|
|
|
21
21
|
// src/plugins/vue/vue3/vue3-preset-plugin.ts
|
|
22
22
|
import "@abraham/reflection";
|
|
23
|
-
import { inject as
|
|
23
|
+
import { inject as inject15, injectable as injectable30 } from "inversify";
|
|
24
24
|
|
|
25
25
|
// src/service-metakind.ts
|
|
26
26
|
var ServiceMetaKind = {
|
|
@@ -2383,7 +2383,8 @@ query: {`;
|
|
|
2383
2383
|
let url2 = "`";
|
|
2384
2384
|
const viewArr = s3.genViewArr();
|
|
2385
2385
|
if (Array.isArray(viewArr) && viewArr.length) {
|
|
2386
|
-
|
|
2386
|
+
const prefixPath = s3.frontend?.prefixPath;
|
|
2387
|
+
url2 += `${prefixPath}/${viewArr.join("/")}`;
|
|
2387
2388
|
const { completeArguments } = s3;
|
|
2388
2389
|
if (completeArguments.length) {
|
|
2389
2390
|
const node = s3.viewNode;
|
|
@@ -4331,40 +4332,40 @@ var metadataPlugin = makePlugin({
|
|
|
4331
4332
|
// src/hack/material-config/material.config.js
|
|
4332
4333
|
var materials = {
|
|
4333
4334
|
framework: {
|
|
4334
|
-
version: "2.
|
|
4335
|
+
version: "2.1.0",
|
|
4335
4336
|
core: "@lcap/basic-template",
|
|
4336
4337
|
pc: [
|
|
4337
4338
|
{
|
|
4338
4339
|
frameworkKind: "vue2",
|
|
4339
4340
|
name: "@lcap/pc-template",
|
|
4340
|
-
version: "2.
|
|
4341
|
+
version: "2.1.0"
|
|
4341
4342
|
},
|
|
4342
4343
|
{
|
|
4343
4344
|
frameworkKind: "react",
|
|
4344
4345
|
name: "@lcap/pc-template-react",
|
|
4345
|
-
version: "2.
|
|
4346
|
+
version: "2.1.0"
|
|
4346
4347
|
},
|
|
4347
4348
|
{
|
|
4348
4349
|
frameworkKind: "vue3",
|
|
4349
4350
|
name: "@lcap/pc-template-vue3",
|
|
4350
|
-
version: "2.
|
|
4351
|
+
version: "2.1.0"
|
|
4351
4352
|
}
|
|
4352
4353
|
],
|
|
4353
4354
|
h5: [
|
|
4354
4355
|
{
|
|
4355
4356
|
frameworkKind: "vue2",
|
|
4356
4357
|
name: "@lcap/mobile-template",
|
|
4357
|
-
version: "2.
|
|
4358
|
+
version: "2.1.0"
|
|
4358
4359
|
},
|
|
4359
4360
|
{
|
|
4360
4361
|
frameworkKind: "react",
|
|
4361
4362
|
name: "@lcap/mobile-template-react",
|
|
4362
|
-
version: "2.
|
|
4363
|
+
version: "2.1.0"
|
|
4363
4364
|
},
|
|
4364
4365
|
{
|
|
4365
4366
|
frameworkKind: "vue3",
|
|
4366
4367
|
name: "@lcap/mobile-template-vue3",
|
|
4367
|
-
version: "2.
|
|
4368
|
+
version: "2.1.0"
|
|
4368
4369
|
}
|
|
4369
4370
|
]
|
|
4370
4371
|
},
|
|
@@ -7044,7 +7045,7 @@ BundlerConfigDataPlugin = __decorateClass([
|
|
|
7044
7045
|
__decorateParam(0, inject8(ServiceMetaKind.FrontendBundlerConfig))
|
|
7045
7046
|
], BundlerConfigDataPlugin);
|
|
7046
7047
|
|
|
7047
|
-
// src/plugins/misc/bundler/
|
|
7048
|
+
// src/plugins/misc/bundler/rspack-config-plugin.ts
|
|
7048
7049
|
import "@abraham/reflection";
|
|
7049
7050
|
import { injectable as injectable17, inject as inject9 } from "inversify";
|
|
7050
7051
|
var RspackConfigPlugin = class {
|
|
@@ -7068,9 +7069,16 @@ var RspackConfigPlugin = class {
|
|
|
7068
7069
|
`chunks: '${this.frontendPerformancePlugin?.performanceOptions?.chunks}'`
|
|
7069
7070
|
);
|
|
7070
7071
|
}
|
|
7072
|
+
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"}`);
|
|
7073
|
+
if (config.needCompileViews && config.needCompileViews.length > 0 && config.cacheChunksMapCode) {
|
|
7074
|
+
rspackConfigSource = rspackConfigSource.replace("isIncremental: false", "isIncremental: true").replace("chunksMap: ''", `chunksMap: \`${config.cacheChunksMapCode}\``);
|
|
7075
|
+
}
|
|
7076
|
+
if (config.isExport) {
|
|
7077
|
+
rspackConfigSource = rspackConfigSource.replace(/\/\/ LcapPlugin start\s+new LcapPlugin\(\{[\s\S]*?\}\),\s+\/\/ LcapPlugin end/g, "");
|
|
7078
|
+
}
|
|
7071
7079
|
fs.write(
|
|
7072
7080
|
"/rspack.config.js",
|
|
7073
|
-
rspackConfigSource
|
|
7081
|
+
rspackConfigSource
|
|
7074
7082
|
);
|
|
7075
7083
|
}
|
|
7076
7084
|
}
|
|
@@ -7278,49 +7286,12 @@ EntrypointPlugin = __decorateClass([
|
|
|
7278
7286
|
__decorateParam(0, inject11(ServiceMetaKind.MicroFrontendManager))
|
|
7279
7287
|
], EntrypointPlugin);
|
|
7280
7288
|
|
|
7281
|
-
// src/plugins/misc/bundler/vite-config-plugin.ts
|
|
7282
|
-
import "@abraham/reflection";
|
|
7283
|
-
import { injectable as injectable20, inject as inject12 } from "inversify";
|
|
7284
|
-
var ViteConfigPlugin = class {
|
|
7285
|
-
constructor(bundlerConfigDataPlugin) {
|
|
7286
|
-
this.bundlerConfigDataPlugin = bundlerConfigDataPlugin;
|
|
7287
|
-
}
|
|
7288
|
-
async configBundlerConfig(app, frontend, config, fs, frameworkKind) {
|
|
7289
|
-
const isDev = config.env === "dev";
|
|
7290
|
-
const { backendUrl, publicPath, aliasMapStr, dependenciesStr } = await this.bundlerConfigDataPlugin.getBundlerConfigData(
|
|
7291
|
-
app,
|
|
7292
|
-
frontend,
|
|
7293
|
-
config,
|
|
7294
|
-
fs,
|
|
7295
|
-
frameworkKind
|
|
7296
|
-
);
|
|
7297
|
-
const viteConfigSource = fs.read("/vite.config.ts")?.toString();
|
|
7298
|
-
if (viteConfigSource) {
|
|
7299
|
-
fs.write(
|
|
7300
|
-
"/vite.config.ts",
|
|
7301
|
-
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(
|
|
7302
|
-
"optimizeDeps: { include: [], },",
|
|
7303
|
-
`optimizeDeps: { include: [${dependenciesStr}], },`
|
|
7304
|
-
)
|
|
7305
|
-
);
|
|
7306
|
-
}
|
|
7307
|
-
}
|
|
7308
|
-
static install(c) {
|
|
7309
|
-
c.bind(ServiceMetaKind.FrontendBundlerFileConfig).to(ViteConfigPlugin).inSingletonScope();
|
|
7310
|
-
return c;
|
|
7311
|
-
}
|
|
7312
|
-
};
|
|
7313
|
-
ViteConfigPlugin = __decorateClass([
|
|
7314
|
-
injectable20(),
|
|
7315
|
-
__decorateParam(0, inject12(BundlerConfigDataPlugin))
|
|
7316
|
-
], ViteConfigPlugin);
|
|
7317
|
-
|
|
7318
7289
|
// src/plugins/vue/vue3/vue3-application-assembler-plugin.ts
|
|
7319
|
-
import { inject as
|
|
7290
|
+
import { inject as inject14, injectable as injectable29 } from "inversify";
|
|
7320
7291
|
|
|
7321
7292
|
// src/plugins/vue/common/vue-router-plugin.ts
|
|
7322
7293
|
import { kebab2Pascal as kebab2Pascal2 } from "@lcap/nasl-utils";
|
|
7323
|
-
import { injectable as
|
|
7294
|
+
import { injectable as injectable20 } from "inversify";
|
|
7324
7295
|
var VueRouterPlugin = class {
|
|
7325
7296
|
extractImportIR(routes, componentPathManager) {
|
|
7326
7297
|
const nameMangler = new NameMangler();
|
|
@@ -7389,11 +7360,11 @@ var VueRouterPlugin = class {
|
|
|
7389
7360
|
}
|
|
7390
7361
|
};
|
|
7391
7362
|
VueRouterPlugin = __decorateClass([
|
|
7392
|
-
|
|
7363
|
+
injectable20()
|
|
7393
7364
|
], VueRouterPlugin);
|
|
7394
7365
|
|
|
7395
7366
|
// src/plugins/vue/vue3/vue3-codegen-plugin.ts
|
|
7396
|
-
import { injectable as
|
|
7367
|
+
import { injectable as injectable21 } from "inversify";
|
|
7397
7368
|
import { kebab2Pascal as kebab2Pascal3 } from "@lcap/nasl-utils";
|
|
7398
7369
|
import { flatten as flatten2 } from "lodash";
|
|
7399
7370
|
var Vue3CodegenPlugin = class {
|
|
@@ -7441,11 +7412,11 @@ var Vue3CodegenPlugin = class {
|
|
|
7441
7412
|
}
|
|
7442
7413
|
};
|
|
7443
7414
|
Vue3CodegenPlugin = __decorateClass([
|
|
7444
|
-
|
|
7415
|
+
injectable21()
|
|
7445
7416
|
], Vue3CodegenPlugin);
|
|
7446
7417
|
|
|
7447
7418
|
// src/plugins/vue/vue3/vue3-entry-builder-plugin.ts
|
|
7448
|
-
import { injectable as
|
|
7419
|
+
import { injectable as injectable22, inject as inject12 } from "inversify";
|
|
7449
7420
|
var Vue3EntryBuilderPlugin = class {
|
|
7450
7421
|
constructor(microFrontendManager) {
|
|
7451
7422
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -7487,12 +7458,12 @@ var Vue3EntryBuilderPlugin = class {
|
|
|
7487
7458
|
}
|
|
7488
7459
|
};
|
|
7489
7460
|
Vue3EntryBuilderPlugin = __decorateClass([
|
|
7490
|
-
|
|
7491
|
-
__decorateParam(0,
|
|
7461
|
+
injectable22(),
|
|
7462
|
+
__decorateParam(0, inject12(ServiceMetaKind.MicroFrontendManager))
|
|
7492
7463
|
], Vue3EntryBuilderPlugin);
|
|
7493
7464
|
|
|
7494
7465
|
// src/plugins/vue/vue3/vue3-libraries-builder-plugin.ts
|
|
7495
|
-
import { injectable as
|
|
7466
|
+
import { injectable as injectable23 } from "inversify";
|
|
7496
7467
|
var Vue3LibrariesBuilderPlugin = class {
|
|
7497
7468
|
/**
|
|
7498
7469
|
* 构建依赖库导入文件
|
|
@@ -7530,11 +7501,11 @@ var Vue3LibrariesBuilderPlugin = class {
|
|
|
7530
7501
|
}
|
|
7531
7502
|
};
|
|
7532
7503
|
Vue3LibrariesBuilderPlugin = __decorateClass([
|
|
7533
|
-
|
|
7504
|
+
injectable23()
|
|
7534
7505
|
], Vue3LibrariesBuilderPlugin);
|
|
7535
7506
|
|
|
7536
7507
|
// src/plugins/vue/vue3/vue3-meta-data-builder-plugin.ts
|
|
7537
|
-
import { injectable as
|
|
7508
|
+
import { injectable as injectable24 } from "inversify";
|
|
7538
7509
|
var Vue3MetaDataBuilderPlugin = class {
|
|
7539
7510
|
/**
|
|
7540
7511
|
* 构建依赖库导入文件
|
|
@@ -7555,7 +7526,7 @@ var Vue3MetaDataBuilderPlugin = class {
|
|
|
7555
7526
|
}
|
|
7556
7527
|
};
|
|
7557
7528
|
Vue3MetaDataBuilderPlugin = __decorateClass([
|
|
7558
|
-
|
|
7529
|
+
injectable24()
|
|
7559
7530
|
], Vue3MetaDataBuilderPlugin);
|
|
7560
7531
|
function stringifyMetaData(obj) {
|
|
7561
7532
|
if (typeof obj === "object" && obj !== null) {
|
|
@@ -7589,7 +7560,7 @@ function stringifyMetaData(obj) {
|
|
|
7589
7560
|
}
|
|
7590
7561
|
|
|
7591
7562
|
// src/plugins/vue/vue3/vue3-components-index-builder-plugin.ts
|
|
7592
|
-
import { injectable as
|
|
7563
|
+
import { injectable as injectable25 } from "inversify";
|
|
7593
7564
|
var Vue3ComponentsIndexBuilderPlugin = class {
|
|
7594
7565
|
/**
|
|
7595
7566
|
* 构建业务组件导出入口文件
|
|
@@ -7619,11 +7590,11 @@ var Vue3ComponentsIndexBuilderPlugin = class {
|
|
|
7619
7590
|
}
|
|
7620
7591
|
};
|
|
7621
7592
|
Vue3ComponentsIndexBuilderPlugin = __decorateClass([
|
|
7622
|
-
|
|
7593
|
+
injectable25()
|
|
7623
7594
|
], Vue3ComponentsIndexBuilderPlugin);
|
|
7624
7595
|
|
|
7625
7596
|
// src/plugins/vue/vue3/vue3-client-lazyload-template-builder-plugin .ts
|
|
7626
|
-
import { injectable as
|
|
7597
|
+
import { injectable as injectable26, inject as inject13 } from "inversify";
|
|
7627
7598
|
var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
7628
7599
|
constructor(microFrontendManager) {
|
|
7629
7600
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -7636,32 +7607,19 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
7636
7607
|
const isDebug = ir.configs.config.debug;
|
|
7637
7608
|
const entryScript = this.microFrontendManager.produceScript(ir);
|
|
7638
7609
|
return new ReactFileDescription(
|
|
7639
|
-
"../client-lazyload-template.
|
|
7610
|
+
"../client-lazyload-template.js",
|
|
7640
7611
|
[],
|
|
7641
7612
|
[],
|
|
7642
7613
|
[
|
|
7643
|
-
`
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
);` : ""}
|
|
7653
|
-
const lazyLoadCommand = \`
|
|
7654
|
-
\${JSON.stringify(jsAssets)}.forEach(asset => window.LazyLoad.js(asset));
|
|
7655
|
-
window.LazyLoad.css(\${JSON.stringify(cssAssets)});
|
|
7656
|
-
\`;
|
|
7657
|
-
return \`(function(){
|
|
7658
|
-
function loadAssets(){
|
|
7659
|
-
\${lazyLoadCommand};
|
|
7660
|
-
}
|
|
7661
|
-
${entryScript};
|
|
7662
|
-
})();\`;
|
|
7663
|
-
}
|
|
7664
|
-
`
|
|
7614
|
+
`const extraJS = [];
|
|
7615
|
+
const extraCSS = [];
|
|
7616
|
+
const entryCode = \`${entryScript}\`;
|
|
7617
|
+
|
|
7618
|
+
module.exports = {
|
|
7619
|
+
extraJS,
|
|
7620
|
+
extraCSS,
|
|
7621
|
+
entryCode,
|
|
7622
|
+
}`
|
|
7665
7623
|
]
|
|
7666
7624
|
);
|
|
7667
7625
|
}
|
|
@@ -7671,12 +7629,12 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
7671
7629
|
}
|
|
7672
7630
|
};
|
|
7673
7631
|
Vue3ClientLazyloadTemplateBuilderPlugin = __decorateClass([
|
|
7674
|
-
|
|
7675
|
-
__decorateParam(0,
|
|
7632
|
+
injectable26(),
|
|
7633
|
+
__decorateParam(0, inject13(ServiceMetaKind.MicroFrontendManager))
|
|
7676
7634
|
], Vue3ClientLazyloadTemplateBuilderPlugin);
|
|
7677
7635
|
|
|
7678
7636
|
// src/plugins/vue/vue3/vue3-platform-builder-plugin.ts
|
|
7679
|
-
import { injectable as
|
|
7637
|
+
import { injectable as injectable27 } from "inversify";
|
|
7680
7638
|
var Vue3PlatformBuilderPlugin = class {
|
|
7681
7639
|
/**
|
|
7682
7640
|
* 构建平台配置文件
|
|
@@ -7710,11 +7668,11 @@ var Vue3PlatformBuilderPlugin = class {
|
|
|
7710
7668
|
}
|
|
7711
7669
|
};
|
|
7712
7670
|
Vue3PlatformBuilderPlugin = __decorateClass([
|
|
7713
|
-
|
|
7671
|
+
injectable27()
|
|
7714
7672
|
], Vue3PlatformBuilderPlugin);
|
|
7715
7673
|
|
|
7716
7674
|
// src/plugins/vue/vue3/vue3-entry-css-plugin.ts
|
|
7717
|
-
import { injectable as
|
|
7675
|
+
import { injectable as injectable28 } from "inversify";
|
|
7718
7676
|
var Vue3EntryCssPlugin = class {
|
|
7719
7677
|
/**
|
|
7720
7678
|
* 构建依赖库导入文件
|
|
@@ -7731,7 +7689,7 @@ var Vue3EntryCssPlugin = class {
|
|
|
7731
7689
|
}
|
|
7732
7690
|
};
|
|
7733
7691
|
Vue3EntryCssPlugin = __decorateClass([
|
|
7734
|
-
|
|
7692
|
+
injectable28()
|
|
7735
7693
|
], Vue3EntryCssPlugin);
|
|
7736
7694
|
|
|
7737
7695
|
// src/plugins/vue/vue3/vue3-application-assembler-plugin.ts
|
|
@@ -7748,7 +7706,7 @@ var ComponentPathManager = class {
|
|
|
7748
7706
|
}
|
|
7749
7707
|
};
|
|
7750
7708
|
ComponentPathManager = __decorateClass([
|
|
7751
|
-
|
|
7709
|
+
injectable29()
|
|
7752
7710
|
], ComponentPathManager);
|
|
7753
7711
|
var Vue3ApplicationAssemblerPlugin = class {
|
|
7754
7712
|
constructor(vue3CodegenPlugin, routesExtactor, routerBuilder, entryBuilder, librariesBuilder, entryCssBuilder, componentsIndexBuilder, clientLazyloadTemplateBuilder, platformBuilder, metaDataBuilder) {
|
|
@@ -7803,17 +7761,17 @@ var Vue3ApplicationAssemblerPlugin = class {
|
|
|
7803
7761
|
}
|
|
7804
7762
|
};
|
|
7805
7763
|
Vue3ApplicationAssemblerPlugin = __decorateClass([
|
|
7806
|
-
|
|
7807
|
-
__decorateParam(0,
|
|
7808
|
-
__decorateParam(1,
|
|
7809
|
-
__decorateParam(2,
|
|
7810
|
-
__decorateParam(3,
|
|
7811
|
-
__decorateParam(4,
|
|
7812
|
-
__decorateParam(5,
|
|
7813
|
-
__decorateParam(6,
|
|
7814
|
-
__decorateParam(7,
|
|
7815
|
-
__decorateParam(8,
|
|
7816
|
-
__decorateParam(9,
|
|
7764
|
+
injectable29(),
|
|
7765
|
+
__decorateParam(0, inject14(Vue3CodegenPlugin)),
|
|
7766
|
+
__decorateParam(1, inject14(RoutesExtractionPlugin)),
|
|
7767
|
+
__decorateParam(2, inject14(VueRouterPlugin)),
|
|
7768
|
+
__decorateParam(3, inject14(Vue3EntryBuilderPlugin)),
|
|
7769
|
+
__decorateParam(4, inject14(Vue3LibrariesBuilderPlugin)),
|
|
7770
|
+
__decorateParam(5, inject14(Vue3EntryCssPlugin)),
|
|
7771
|
+
__decorateParam(6, inject14(Vue3ComponentsIndexBuilderPlugin)),
|
|
7772
|
+
__decorateParam(7, inject14(Vue3ClientLazyloadTemplateBuilderPlugin)),
|
|
7773
|
+
__decorateParam(8, inject14(Vue3PlatformBuilderPlugin)),
|
|
7774
|
+
__decorateParam(9, inject14(Vue3MetaDataBuilderPlugin))
|
|
7817
7775
|
], Vue3ApplicationAssemblerPlugin);
|
|
7818
7776
|
|
|
7819
7777
|
// src/plugins/vue/vue3/vue3-preset-plugin.ts
|
|
@@ -7868,7 +7826,7 @@ var Vue3PresetPlugin = class {
|
|
|
7868
7826
|
c.bind(ServiceMetaKind.ProjectOrganizer).to(ProjectOrganizerPlugin);
|
|
7869
7827
|
c.bind(ServiceMetaKind.FileSystemProvider).to(FileSystemPlugin).inSingletonScope();
|
|
7870
7828
|
c = BundlerConfigDataPlugin.install(c);
|
|
7871
|
-
c =
|
|
7829
|
+
c = RspackConfigPlugin.install(c);
|
|
7872
7830
|
c = FrontendBundlerConfigPlugin.install(c);
|
|
7873
7831
|
c = FrontendPerformancePlugin.install(c);
|
|
7874
7832
|
c = NpmPackageJSONManagerPlugin.install(c);
|
|
@@ -7885,12 +7843,12 @@ var Vue3PresetPlugin = class {
|
|
|
7885
7843
|
}
|
|
7886
7844
|
};
|
|
7887
7845
|
Vue3PresetPlugin = __decorateClass([
|
|
7888
|
-
|
|
7889
|
-
__decorateParam(0,
|
|
7890
|
-
__decorateParam(1,
|
|
7891
|
-
__decorateParam(2,
|
|
7892
|
-
__decorateParam(3,
|
|
7893
|
-
__decorateParam(4,
|
|
7846
|
+
injectable30(),
|
|
7847
|
+
__decorateParam(0, inject15(ServiceMetaKind.IRBuilder)),
|
|
7848
|
+
__decorateParam(1, inject15(ServiceMetaKind.FileSystemProvider)),
|
|
7849
|
+
__decorateParam(2, inject15(NpmPackageJSONManagerPlugin)),
|
|
7850
|
+
__decorateParam(3, inject15(ServiceMetaKind.ProjectOrganizer)),
|
|
7851
|
+
__decorateParam(4, inject15(Vue3ApplicationAssemblerPlugin))
|
|
7894
7852
|
], Vue3PresetPlugin);
|
|
7895
7853
|
|
|
7896
7854
|
// src/default-container.ts
|
|
@@ -7909,6 +7867,35 @@ async function translateNASLToApp(app, frontend, config, baseDir = "./out", cont
|
|
|
7909
7867
|
const logger13 = Logger("\u7FFB\u8BD1\u8FC7\u7A0B");
|
|
7910
7868
|
logger13.debug({ config });
|
|
7911
7869
|
async function genCode() {
|
|
7870
|
+
const { needCompileViews = [] } = config;
|
|
7871
|
+
if (needCompileViews?.length > 0) {
|
|
7872
|
+
let traverseChildren2 = function(view, callback) {
|
|
7873
|
+
if (view.children?.length > 0) {
|
|
7874
|
+
view.children.forEach((childView) => {
|
|
7875
|
+
const deep = callback(childView);
|
|
7876
|
+
if (deep) {
|
|
7877
|
+
traverseChildren2(childView, callback);
|
|
7878
|
+
}
|
|
7879
|
+
});
|
|
7880
|
+
}
|
|
7881
|
+
};
|
|
7882
|
+
var traverseChildren = traverseChildren2;
|
|
7883
|
+
logger13.info("\u5F00\u59CB\u6309\u9700\u7FFB\u8BD1\u9875\u9762");
|
|
7884
|
+
frontend.views.forEach((view) => {
|
|
7885
|
+
if (!needCompileViews.includes(view.nodePath)) {
|
|
7886
|
+
view.delete();
|
|
7887
|
+
} else {
|
|
7888
|
+
traverseChildren2(view, (childView) => {
|
|
7889
|
+
if (!needCompileViews.includes(childView.nodePath)) {
|
|
7890
|
+
childView.delete();
|
|
7891
|
+
return false;
|
|
7892
|
+
}
|
|
7893
|
+
return true;
|
|
7894
|
+
});
|
|
7895
|
+
}
|
|
7896
|
+
});
|
|
7897
|
+
logger13.info("\u7ED3\u675F\u6309\u9700\u7FFB\u8BD1\u9875\u9762");
|
|
7898
|
+
}
|
|
7912
7899
|
logger13.info("\u5F00\u59CB\u7FFB\u8BD1");
|
|
7913
7900
|
try {
|
|
7914
7901
|
const codeList2 = await container.get(ServiceMetaKind.NASLTranspiler).transpile({
|
|
@@ -8065,7 +8052,7 @@ async function compileNASLToReactDist(app, frontend, config, http) {
|
|
|
8065
8052
|
}
|
|
8066
8053
|
|
|
8067
8054
|
// src/plugins/misc/program-analysis/analyzer-manager-plugin.ts
|
|
8068
|
-
import { injectable as
|
|
8055
|
+
import { injectable as injectable31 } from "inversify";
|
|
8069
8056
|
|
|
8070
8057
|
// src/plugins/misc/program-analysis/analysis/async-analysis.ts
|
|
8071
8058
|
function buildAsyncAnalyzer() {
|
|
@@ -8192,11 +8179,11 @@ var AnalyzerManagerPlugin = class {
|
|
|
8192
8179
|
}
|
|
8193
8180
|
};
|
|
8194
8181
|
AnalyzerManagerPlugin = __decorateClass([
|
|
8195
|
-
|
|
8182
|
+
injectable31()
|
|
8196
8183
|
], AnalyzerManagerPlugin);
|
|
8197
8184
|
|
|
8198
8185
|
// src/plugins/misc/name-mangler/name-mangler-manager-plugin.ts
|
|
8199
|
-
import { injectable as
|
|
8186
|
+
import { injectable as injectable32 } from "inversify";
|
|
8200
8187
|
|
|
8201
8188
|
// src/plugins/misc/name-mangler/name-mangler.ts
|
|
8202
8189
|
var NameMangler2 = class _NameMangler {
|
|
@@ -8263,7 +8250,7 @@ var NameManglerManagerPlugin = class {
|
|
|
8263
8250
|
}
|
|
8264
8251
|
};
|
|
8265
8252
|
NameManglerManagerPlugin = __decorateClass([
|
|
8266
|
-
|
|
8253
|
+
injectable32()
|
|
8267
8254
|
], NameManglerManagerPlugin);
|
|
8268
8255
|
export {
|
|
8269
8256
|
AnalyzerManagerPlugin,
|