@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.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 = {
|
|
@@ -4332,40 +4332,40 @@ var metadataPlugin = makePlugin({
|
|
|
4332
4332
|
// src/hack/material-config/material.config.js
|
|
4333
4333
|
var materials = {
|
|
4334
4334
|
framework: {
|
|
4335
|
-
version: "2.
|
|
4335
|
+
version: "2.1.0",
|
|
4336
4336
|
core: "@lcap/basic-template",
|
|
4337
4337
|
pc: [
|
|
4338
4338
|
{
|
|
4339
4339
|
frameworkKind: "vue2",
|
|
4340
4340
|
name: "@lcap/pc-template",
|
|
4341
|
-
version: "2.
|
|
4341
|
+
version: "2.1.0"
|
|
4342
4342
|
},
|
|
4343
4343
|
{
|
|
4344
4344
|
frameworkKind: "react",
|
|
4345
4345
|
name: "@lcap/pc-template-react",
|
|
4346
|
-
version: "2.
|
|
4346
|
+
version: "2.1.0"
|
|
4347
4347
|
},
|
|
4348
4348
|
{
|
|
4349
4349
|
frameworkKind: "vue3",
|
|
4350
4350
|
name: "@lcap/pc-template-vue3",
|
|
4351
|
-
version: "2.
|
|
4351
|
+
version: "2.1.0"
|
|
4352
4352
|
}
|
|
4353
4353
|
],
|
|
4354
4354
|
h5: [
|
|
4355
4355
|
{
|
|
4356
4356
|
frameworkKind: "vue2",
|
|
4357
4357
|
name: "@lcap/mobile-template",
|
|
4358
|
-
version: "2.
|
|
4358
|
+
version: "2.1.0"
|
|
4359
4359
|
},
|
|
4360
4360
|
{
|
|
4361
4361
|
frameworkKind: "react",
|
|
4362
4362
|
name: "@lcap/mobile-template-react",
|
|
4363
|
-
version: "2.
|
|
4363
|
+
version: "2.1.0"
|
|
4364
4364
|
},
|
|
4365
4365
|
{
|
|
4366
4366
|
frameworkKind: "vue3",
|
|
4367
4367
|
name: "@lcap/mobile-template-vue3",
|
|
4368
|
-
version: "2.
|
|
4368
|
+
version: "2.1.0"
|
|
4369
4369
|
}
|
|
4370
4370
|
]
|
|
4371
4371
|
},
|
|
@@ -7045,7 +7045,7 @@ BundlerConfigDataPlugin = __decorateClass([
|
|
|
7045
7045
|
__decorateParam(0, inject8(ServiceMetaKind.FrontendBundlerConfig))
|
|
7046
7046
|
], BundlerConfigDataPlugin);
|
|
7047
7047
|
|
|
7048
|
-
// src/plugins/misc/bundler/
|
|
7048
|
+
// src/plugins/misc/bundler/rspack-config-plugin.ts
|
|
7049
7049
|
import "@abraham/reflection";
|
|
7050
7050
|
import { injectable as injectable17, inject as inject9 } from "inversify";
|
|
7051
7051
|
var RspackConfigPlugin = class {
|
|
@@ -7069,9 +7069,16 @@ var RspackConfigPlugin = class {
|
|
|
7069
7069
|
`chunks: '${this.frontendPerformancePlugin?.performanceOptions?.chunks}'`
|
|
7070
7070
|
);
|
|
7071
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
|
+
}
|
|
7072
7079
|
fs.write(
|
|
7073
7080
|
"/rspack.config.js",
|
|
7074
|
-
rspackConfigSource
|
|
7081
|
+
rspackConfigSource
|
|
7075
7082
|
);
|
|
7076
7083
|
}
|
|
7077
7084
|
}
|
|
@@ -7279,49 +7286,12 @@ EntrypointPlugin = __decorateClass([
|
|
|
7279
7286
|
__decorateParam(0, inject11(ServiceMetaKind.MicroFrontendManager))
|
|
7280
7287
|
], EntrypointPlugin);
|
|
7281
7288
|
|
|
7282
|
-
// src/plugins/misc/bundler/vite-config-plugin.ts
|
|
7283
|
-
import "@abraham/reflection";
|
|
7284
|
-
import { injectable as injectable20, inject as inject12 } from "inversify";
|
|
7285
|
-
var ViteConfigPlugin = class {
|
|
7286
|
-
constructor(bundlerConfigDataPlugin) {
|
|
7287
|
-
this.bundlerConfigDataPlugin = bundlerConfigDataPlugin;
|
|
7288
|
-
}
|
|
7289
|
-
async configBundlerConfig(app, frontend, config, fs, frameworkKind) {
|
|
7290
|
-
const isDev = config.env === "dev";
|
|
7291
|
-
const { backendUrl, publicPath, aliasMapStr, dependenciesStr } = await this.bundlerConfigDataPlugin.getBundlerConfigData(
|
|
7292
|
-
app,
|
|
7293
|
-
frontend,
|
|
7294
|
-
config,
|
|
7295
|
-
fs,
|
|
7296
|
-
frameworkKind
|
|
7297
|
-
);
|
|
7298
|
-
const viteConfigSource = fs.read("/vite.config.ts")?.toString();
|
|
7299
|
-
if (viteConfigSource) {
|
|
7300
|
-
fs.write(
|
|
7301
|
-
"/vite.config.ts",
|
|
7302
|
-
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(
|
|
7303
|
-
"optimizeDeps: { include: [], },",
|
|
7304
|
-
`optimizeDeps: { include: [${dependenciesStr}], },`
|
|
7305
|
-
)
|
|
7306
|
-
);
|
|
7307
|
-
}
|
|
7308
|
-
}
|
|
7309
|
-
static install(c) {
|
|
7310
|
-
c.bind(ServiceMetaKind.FrontendBundlerFileConfig).to(ViteConfigPlugin).inSingletonScope();
|
|
7311
|
-
return c;
|
|
7312
|
-
}
|
|
7313
|
-
};
|
|
7314
|
-
ViteConfigPlugin = __decorateClass([
|
|
7315
|
-
injectable20(),
|
|
7316
|
-
__decorateParam(0, inject12(BundlerConfigDataPlugin))
|
|
7317
|
-
], ViteConfigPlugin);
|
|
7318
|
-
|
|
7319
7289
|
// src/plugins/vue/vue3/vue3-application-assembler-plugin.ts
|
|
7320
|
-
import { inject as
|
|
7290
|
+
import { inject as inject14, injectable as injectable29 } from "inversify";
|
|
7321
7291
|
|
|
7322
7292
|
// src/plugins/vue/common/vue-router-plugin.ts
|
|
7323
7293
|
import { kebab2Pascal as kebab2Pascal2 } from "@lcap/nasl-utils";
|
|
7324
|
-
import { injectable as
|
|
7294
|
+
import { injectable as injectable20 } from "inversify";
|
|
7325
7295
|
var VueRouterPlugin = class {
|
|
7326
7296
|
extractImportIR(routes, componentPathManager) {
|
|
7327
7297
|
const nameMangler = new NameMangler();
|
|
@@ -7390,11 +7360,11 @@ var VueRouterPlugin = class {
|
|
|
7390
7360
|
}
|
|
7391
7361
|
};
|
|
7392
7362
|
VueRouterPlugin = __decorateClass([
|
|
7393
|
-
|
|
7363
|
+
injectable20()
|
|
7394
7364
|
], VueRouterPlugin);
|
|
7395
7365
|
|
|
7396
7366
|
// src/plugins/vue/vue3/vue3-codegen-plugin.ts
|
|
7397
|
-
import { injectable as
|
|
7367
|
+
import { injectable as injectable21 } from "inversify";
|
|
7398
7368
|
import { kebab2Pascal as kebab2Pascal3 } from "@lcap/nasl-utils";
|
|
7399
7369
|
import { flatten as flatten2 } from "lodash";
|
|
7400
7370
|
var Vue3CodegenPlugin = class {
|
|
@@ -7442,11 +7412,11 @@ var Vue3CodegenPlugin = class {
|
|
|
7442
7412
|
}
|
|
7443
7413
|
};
|
|
7444
7414
|
Vue3CodegenPlugin = __decorateClass([
|
|
7445
|
-
|
|
7415
|
+
injectable21()
|
|
7446
7416
|
], Vue3CodegenPlugin);
|
|
7447
7417
|
|
|
7448
7418
|
// src/plugins/vue/vue3/vue3-entry-builder-plugin.ts
|
|
7449
|
-
import { injectable as
|
|
7419
|
+
import { injectable as injectable22, inject as inject12 } from "inversify";
|
|
7450
7420
|
var Vue3EntryBuilderPlugin = class {
|
|
7451
7421
|
constructor(microFrontendManager) {
|
|
7452
7422
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -7488,12 +7458,12 @@ var Vue3EntryBuilderPlugin = class {
|
|
|
7488
7458
|
}
|
|
7489
7459
|
};
|
|
7490
7460
|
Vue3EntryBuilderPlugin = __decorateClass([
|
|
7491
|
-
|
|
7492
|
-
__decorateParam(0,
|
|
7461
|
+
injectable22(),
|
|
7462
|
+
__decorateParam(0, inject12(ServiceMetaKind.MicroFrontendManager))
|
|
7493
7463
|
], Vue3EntryBuilderPlugin);
|
|
7494
7464
|
|
|
7495
7465
|
// src/plugins/vue/vue3/vue3-libraries-builder-plugin.ts
|
|
7496
|
-
import { injectable as
|
|
7466
|
+
import { injectable as injectable23 } from "inversify";
|
|
7497
7467
|
var Vue3LibrariesBuilderPlugin = class {
|
|
7498
7468
|
/**
|
|
7499
7469
|
* 构建依赖库导入文件
|
|
@@ -7531,11 +7501,11 @@ var Vue3LibrariesBuilderPlugin = class {
|
|
|
7531
7501
|
}
|
|
7532
7502
|
};
|
|
7533
7503
|
Vue3LibrariesBuilderPlugin = __decorateClass([
|
|
7534
|
-
|
|
7504
|
+
injectable23()
|
|
7535
7505
|
], Vue3LibrariesBuilderPlugin);
|
|
7536
7506
|
|
|
7537
7507
|
// src/plugins/vue/vue3/vue3-meta-data-builder-plugin.ts
|
|
7538
|
-
import { injectable as
|
|
7508
|
+
import { injectable as injectable24 } from "inversify";
|
|
7539
7509
|
var Vue3MetaDataBuilderPlugin = class {
|
|
7540
7510
|
/**
|
|
7541
7511
|
* 构建依赖库导入文件
|
|
@@ -7556,7 +7526,7 @@ var Vue3MetaDataBuilderPlugin = class {
|
|
|
7556
7526
|
}
|
|
7557
7527
|
};
|
|
7558
7528
|
Vue3MetaDataBuilderPlugin = __decorateClass([
|
|
7559
|
-
|
|
7529
|
+
injectable24()
|
|
7560
7530
|
], Vue3MetaDataBuilderPlugin);
|
|
7561
7531
|
function stringifyMetaData(obj) {
|
|
7562
7532
|
if (typeof obj === "object" && obj !== null) {
|
|
@@ -7590,7 +7560,7 @@ function stringifyMetaData(obj) {
|
|
|
7590
7560
|
}
|
|
7591
7561
|
|
|
7592
7562
|
// src/plugins/vue/vue3/vue3-components-index-builder-plugin.ts
|
|
7593
|
-
import { injectable as
|
|
7563
|
+
import { injectable as injectable25 } from "inversify";
|
|
7594
7564
|
var Vue3ComponentsIndexBuilderPlugin = class {
|
|
7595
7565
|
/**
|
|
7596
7566
|
* 构建业务组件导出入口文件
|
|
@@ -7620,11 +7590,11 @@ var Vue3ComponentsIndexBuilderPlugin = class {
|
|
|
7620
7590
|
}
|
|
7621
7591
|
};
|
|
7622
7592
|
Vue3ComponentsIndexBuilderPlugin = __decorateClass([
|
|
7623
|
-
|
|
7593
|
+
injectable25()
|
|
7624
7594
|
], Vue3ComponentsIndexBuilderPlugin);
|
|
7625
7595
|
|
|
7626
7596
|
// src/plugins/vue/vue3/vue3-client-lazyload-template-builder-plugin .ts
|
|
7627
|
-
import { injectable as
|
|
7597
|
+
import { injectable as injectable26, inject as inject13 } from "inversify";
|
|
7628
7598
|
var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
7629
7599
|
constructor(microFrontendManager) {
|
|
7630
7600
|
this.microFrontendManager = microFrontendManager;
|
|
@@ -7637,32 +7607,19 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
7637
7607
|
const isDebug = ir.configs.config.debug;
|
|
7638
7608
|
const entryScript = this.microFrontendManager.produceScript(ir);
|
|
7639
7609
|
return new ReactFileDescription(
|
|
7640
|
-
"../client-lazyload-template.
|
|
7610
|
+
"../client-lazyload-template.js",
|
|
7641
7611
|
[],
|
|
7642
7612
|
[],
|
|
7643
7613
|
[
|
|
7644
|
-
`
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
);` : ""}
|
|
7654
|
-
const lazyLoadCommand = \`
|
|
7655
|
-
\${JSON.stringify(jsAssets)}.forEach(asset => window.LazyLoad.js(asset));
|
|
7656
|
-
window.LazyLoad.css(\${JSON.stringify(cssAssets)});
|
|
7657
|
-
\`;
|
|
7658
|
-
return \`(function(){
|
|
7659
|
-
function loadAssets(){
|
|
7660
|
-
\${lazyLoadCommand};
|
|
7661
|
-
}
|
|
7662
|
-
${entryScript};
|
|
7663
|
-
})();\`;
|
|
7664
|
-
}
|
|
7665
|
-
`
|
|
7614
|
+
`const extraJS = [];
|
|
7615
|
+
const extraCSS = [];
|
|
7616
|
+
const entryCode = \`${entryScript}\`;
|
|
7617
|
+
|
|
7618
|
+
module.exports = {
|
|
7619
|
+
extraJS,
|
|
7620
|
+
extraCSS,
|
|
7621
|
+
entryCode,
|
|
7622
|
+
}`
|
|
7666
7623
|
]
|
|
7667
7624
|
);
|
|
7668
7625
|
}
|
|
@@ -7672,12 +7629,12 @@ var Vue3ClientLazyloadTemplateBuilderPlugin = class {
|
|
|
7672
7629
|
}
|
|
7673
7630
|
};
|
|
7674
7631
|
Vue3ClientLazyloadTemplateBuilderPlugin = __decorateClass([
|
|
7675
|
-
|
|
7676
|
-
__decorateParam(0,
|
|
7632
|
+
injectable26(),
|
|
7633
|
+
__decorateParam(0, inject13(ServiceMetaKind.MicroFrontendManager))
|
|
7677
7634
|
], Vue3ClientLazyloadTemplateBuilderPlugin);
|
|
7678
7635
|
|
|
7679
7636
|
// src/plugins/vue/vue3/vue3-platform-builder-plugin.ts
|
|
7680
|
-
import { injectable as
|
|
7637
|
+
import { injectable as injectable27 } from "inversify";
|
|
7681
7638
|
var Vue3PlatformBuilderPlugin = class {
|
|
7682
7639
|
/**
|
|
7683
7640
|
* 构建平台配置文件
|
|
@@ -7688,7 +7645,8 @@ var Vue3PlatformBuilderPlugin = class {
|
|
|
7688
7645
|
const self = {
|
|
7689
7646
|
...routesExtractionPlugin.functions
|
|
7690
7647
|
};
|
|
7691
|
-
const
|
|
7648
|
+
const basePath = ir.configs.basePlatformConfig.basePath + "/";
|
|
7649
|
+
const { authResourcePaths, baseResourcePaths } = self.extractRoute(ir.views, basePath, {
|
|
7692
7650
|
lazy: false,
|
|
7693
7651
|
frameworkKind: "vue3"
|
|
7694
7652
|
});
|
|
@@ -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,
|