@lcap/nasl 4.5.0-beta.1 → 4.5.0-beta.3
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/out/automate/upgrader/2.12.d.ts.map +1 -1
- package/out/automate/upgrader/2.12.js +1 -0
- package/out/automate/upgrader/2.12.js.map +1 -1
- package/out/automate/upgrader/2.14.d.ts.map +1 -1
- package/out/automate/upgrader/2.14.js +1 -0
- package/out/automate/upgrader/2.14.js.map +1 -1
- package/out/automate/upgrader/2.16.d.ts.map +1 -1
- package/out/automate/upgrader/2.16.js +1 -0
- package/out/automate/upgrader/2.16.js.map +1 -1
- package/out/automate/upgrader/2.17.d.ts.map +1 -1
- package/out/automate/upgrader/2.17.js +1 -0
- package/out/automate/upgrader/2.17.js.map +1 -1
- package/out/automate/upgrader/2.18.d.ts.map +1 -1
- package/out/automate/upgrader/2.18.js +1 -0
- package/out/automate/upgrader/2.18.js.map +1 -1
- package/out/automate/upgrader/2.20.d.ts.map +1 -1
- package/out/automate/upgrader/2.20.js +1 -0
- package/out/automate/upgrader/2.20.js.map +1 -1
- package/out/concepts/index.mini.d.ts +10 -0
- package/out/concepts/index.mini.d.ts.map +1 -0
- package/out/concepts/index.mini.js +26 -0
- package/out/concepts/index.mini.js.map +1 -0
- package/out/generator/genBundleFiles.d.ts.map +1 -1
- package/out/generator/genBundleFiles.js +161 -24
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/permission.js +2 -2
- package/out/generator/permission.js.map +1 -1
- package/out/generator/release-body/utils.d.ts +1 -1
- package/out/generator/release-body/utils.d.ts.map +1 -1
- package/out/generator/release-body/utils.js +8 -6
- package/out/generator/release-body/utils.js.map +1 -1
- package/out/generator/rspack-broswer/bundle.d.ts +24 -0
- package/out/generator/rspack-broswer/bundle.d.ts.map +1 -0
- package/out/generator/rspack-broswer/bundle.js +442 -0
- package/out/generator/rspack-broswer/bundle.js.map +1 -0
- package/out/generator/rspack-broswer/container/client-lazyload-template.d.ts +9 -0
- package/out/generator/rspack-broswer/container/client-lazyload-template.d.ts.map +1 -0
- package/out/generator/rspack-broswer/container/client-lazyload-template.js +88 -0
- package/out/generator/rspack-broswer/container/client-lazyload-template.js.map +1 -0
- package/out/generator/rspack-broswer/container/file-system.d.ts +12 -0
- package/out/generator/rspack-broswer/container/file-system.d.ts.map +1 -0
- package/out/generator/rspack-broswer/container/file-system.js +58 -0
- package/out/generator/rspack-broswer/container/file-system.js.map +1 -0
- package/out/generator/rspack-broswer/container/index.d.ts +3 -0
- package/out/generator/rspack-broswer/container/index.d.ts.map +1 -0
- package/out/generator/rspack-broswer/container/index.js +15 -0
- package/out/generator/rspack-broswer/container/index.js.map +1 -0
- package/out/generator/rspack-broswer/index.d.ts +3 -0
- package/out/generator/rspack-broswer/index.d.ts.map +1 -0
- package/out/generator/rspack-broswer/index.js +19 -0
- package/out/generator/rspack-broswer/index.js.map +1 -0
- package/out/generator/rspack-broswer/loaders/vue/index.d.ts +2 -0
- package/out/generator/rspack-broswer/loaders/vue/index.d.ts.map +1 -0
- package/out/generator/rspack-broswer/loaders/vue/index.js +228 -0
- package/out/generator/rspack-broswer/loaders/vue/index.js.map +1 -0
- package/out/generator/rspack-broswer/plugins/lcap/constant.d.ts +3 -0
- package/out/generator/rspack-broswer/plugins/lcap/constant.d.ts.map +1 -0
- package/out/generator/rspack-broswer/plugins/lcap/constant.js +213 -0
- package/out/generator/rspack-broswer/plugins/lcap/constant.js.map +1 -0
- package/out/generator/rspack-broswer/plugins/lcap/index.d.ts +6 -0
- package/out/generator/rspack-broswer/plugins/lcap/index.d.ts.map +1 -0
- package/out/generator/rspack-broswer/plugins/lcap/index.js +175 -0
- package/out/generator/rspack-broswer/plugins/lcap/index.js.map +1 -0
- package/out/generator/rspack-broswer/plugins/missing-css-fallback/index.d.ts +10 -0
- package/out/generator/rspack-broswer/plugins/missing-css-fallback/index.d.ts.map +1 -0
- package/out/generator/rspack-broswer/plugins/missing-css-fallback/index.js +50 -0
- package/out/generator/rspack-broswer/plugins/missing-css-fallback/index.js.map +1 -0
- package/out/generator/ui-library-declaration/dependency.d.ts +20 -0
- package/out/generator/ui-library-declaration/dependency.d.ts.map +1 -1
- package/out/generator/ui-library-declaration/dependency.js +3 -2
- package/out/generator/ui-library-declaration/dependency.js.map +1 -1
- package/out/generator/ui-library-declaration/index.d.ts +1 -0
- package/out/generator/ui-library-declaration/index.d.ts.map +1 -1
- package/out/generator/ui-library-declaration/index.js +1 -0
- package/out/generator/ui-library-declaration/index.js.map +1 -1
- package/out/generator/ui-library-declaration/material.d.ts +2 -2
- package/out/generator/ui-library-declaration/material.d.ts.map +1 -1
- package/out/generator/ui-library-declaration/material.js +7 -3
- package/out/generator/ui-library-declaration/material.js.map +1 -1
- package/out/index.d.ts +2 -2
- package/out/index.d.ts.map +1 -1
- package/out/index.js +7 -1
- package/out/index.js.map +1 -1
- package/out/index.mini.d.ts +42 -0
- package/out/index.mini.d.ts.map +1 -0
- package/out/index.mini.js +89 -0
- package/out/index.mini.js.map +1 -0
- package/out/manager/diagnostic.d.ts +5 -5
- package/out/manager/diagnostic.d.ts.map +1 -1
- package/out/natural/exports/doctor/doctorView.d.ts +24 -0
- package/out/natural/exports/doctor/doctorView.d.ts.map +1 -0
- package/out/natural/exports/doctor/doctorView.js +351 -0
- package/out/natural/exports/doctor/doctorView.js.map +1 -0
- package/out/natural/exports/doctor/index.d.ts +4 -0
- package/out/natural/exports/doctor/index.d.ts.map +1 -0
- package/out/natural/exports/doctor/index.js +10 -0
- package/out/natural/exports/doctor/index.js.map +1 -0
- package/out/natural/exports/doctor/types.d.ts +109 -0
- package/out/natural/exports/doctor/types.d.ts.map +1 -0
- package/out/natural/exports/doctor/types.js +6 -0
- package/out/natural/exports/doctor/types.js.map +1 -0
- package/out/natural/exports/doctor/viewGraph.d.ts +20 -0
- package/out/natural/exports/doctor/viewGraph.d.ts.map +1 -0
- package/out/natural/exports/doctor/viewGraph.js +448 -0
- package/out/natural/exports/doctor/viewGraph.js.map +1 -0
- package/out/natural/exports/nasl2Files.d.ts.map +1 -1
- package/out/natural/exports/nasl2Files.js +113 -9
- package/out/natural/exports/nasl2Files.js.map +1 -1
- package/out/natural/exports/transform2BatchActions/apply.d.ts +11 -0
- package/out/natural/exports/transform2BatchActions/apply.d.ts.map +1 -0
- package/out/natural/exports/transform2BatchActions/apply.js +68 -0
- package/out/natural/exports/transform2BatchActions/apply.js.map +1 -0
- package/out/natural/exports/transform2BatchActions/diff/directories.d.ts +17 -0
- package/out/natural/exports/transform2BatchActions/diff/directories.d.ts.map +1 -0
- package/out/natural/exports/transform2BatchActions/diff/directories.js +215 -0
- package/out/natural/exports/transform2BatchActions/diff/directories.js.map +1 -0
- package/out/natural/exports/transform2BatchActions/diff/index.d.ts +21 -0
- package/out/natural/exports/transform2BatchActions/diff/index.d.ts.map +1 -0
- package/out/natural/exports/transform2BatchActions/diff/index.js +20 -0
- package/out/natural/exports/transform2BatchActions/diff/index.js.map +1 -0
- package/out/natural/exports/transform2BatchActions/diff/nodes.d.ts +186 -0
- package/out/natural/exports/transform2BatchActions/diff/nodes.d.ts.map +1 -0
- package/out/natural/exports/transform2BatchActions/diff/nodes.js +498 -0
- package/out/natural/exports/transform2BatchActions/diff/nodes.js.map +1 -0
- package/out/natural/exports/transform2BatchActions/diff/roles.d.ts +18 -0
- package/out/natural/exports/transform2BatchActions/diff/roles.d.ts.map +1 -0
- package/out/natural/exports/transform2BatchActions/diff/roles.js +61 -0
- package/out/natural/exports/transform2BatchActions/diff/roles.js.map +1 -0
- package/out/natural/exports/transform2BatchActions/index.d.ts +41 -0
- package/out/natural/exports/transform2BatchActions/index.d.ts.map +1 -0
- package/out/natural/exports/transform2BatchActions/index.js +61 -0
- package/out/natural/exports/transform2BatchActions/index.js.map +1 -0
- package/out/natural/exports/transform2BatchActions/parse.d.ts +24 -0
- package/out/natural/exports/transform2BatchActions/parse.d.ts.map +1 -0
- package/out/natural/exports/transform2BatchActions/parse.js +257 -0
- package/out/natural/exports/transform2BatchActions/parse.js.map +1 -0
- package/out/natural/exports/transform2BatchActions/types.d.ts +147 -0
- package/out/natural/exports/transform2BatchActions/types.d.ts.map +1 -0
- package/out/natural/exports/transform2BatchActions/types.js +7 -0
- package/out/natural/exports/transform2BatchActions/types.js.map +1 -0
- package/out/natural/index.d.ts +1 -0
- package/out/natural/index.d.ts.map +1 -1
- package/out/natural/index.js +1 -0
- package/out/natural/index.js.map +1 -1
- package/out/natural/old/parser/transformTS2UI.d.ts.map +1 -1
- package/out/natural/old/parser/transformTS2UI.js +4 -1
- package/out/natural/old/parser/transformTS2UI.js.map +1 -1
- package/out/natural/old/parser/transformTSCode.js +1 -1
- package/out/natural/old/parser/transformTSCode.js.map +1 -1
- package/out/natural/parser/parseNaturalTS.d.ts.map +1 -1
- package/out/natural/parser/parseNaturalTS.js +106 -2
- package/out/natural/parser/parseNaturalTS.js.map +1 -1
- package/out/natural/parser/parseNaturalTSXView.d.ts.map +1 -1
- package/out/natural/parser/parseNaturalTSXView.js +60 -7
- package/out/natural/parser/parseNaturalTSXView.js.map +1 -1
- package/out/natural/transforms/checker/checkIdentifierName.d.ts +6 -0
- package/out/natural/transforms/checker/checkIdentifierName.d.ts.map +1 -0
- package/out/natural/transforms/checker/checkIdentifierName.js +15 -0
- package/out/natural/transforms/checker/checkIdentifierName.js.map +1 -0
- package/out/natural/transforms/checker/checkKeywords.d.ts +33 -0
- package/out/natural/transforms/checker/checkKeywords.d.ts.map +1 -0
- package/out/natural/transforms/checker/checkKeywords.js +85 -0
- package/out/natural/transforms/checker/checkKeywords.js.map +1 -0
- package/out/natural/transforms/checker/checkViewElement.d.ts +10 -0
- package/out/natural/transforms/checker/checkViewElement.d.ts.map +1 -1
- package/out/natural/transforms/checker/checkViewElement.js +28 -1
- package/out/natural/transforms/checker/checkViewElement.js.map +1 -1
- package/out/natural/transforms/checker/index.d.ts +3 -1
- package/out/natural/transforms/checker/index.d.ts.map +1 -1
- package/out/natural/transforms/checker/index.js +10 -1
- package/out/natural/transforms/checker/index.js.map +1 -1
- package/out/natural/transforms/transform2AuthLogic.d.ts +4 -0
- package/out/natural/transforms/transform2AuthLogic.d.ts.map +1 -0
- package/out/natural/transforms/transform2AuthLogic.js +116 -0
- package/out/natural/transforms/transform2AuthLogic.js.map +1 -0
- package/out/natural/transforms/transform2Config.d.ts +17 -0
- package/out/natural/transforms/transform2Config.d.ts.map +1 -0
- package/out/natural/transforms/transform2Config.js +114 -0
- package/out/natural/transforms/transform2Config.js.map +1 -0
- package/out/natural/transforms/transform2Entity.d.ts +2 -2
- package/out/natural/transforms/transform2Entity.d.ts.map +1 -1
- package/out/natural/transforms/transform2Entity.js +11 -2
- package/out/natural/transforms/transform2Entity.js.map +1 -1
- package/out/natural/transforms/transform2Enum.d.ts.map +1 -1
- package/out/natural/transforms/transform2Enum.js +8 -1
- package/out/natural/transforms/transform2Enum.js.map +1 -1
- package/out/natural/transforms/transform2ExportInterface.d.ts +3 -0
- package/out/natural/transforms/transform2ExportInterface.d.ts.map +1 -0
- package/out/natural/transforms/transform2ExportInterface.js +96 -0
- package/out/natural/transforms/transform2ExportInterface.js.map +1 -0
- package/out/natural/transforms/transform2GlobalLogicDeclaration.d.ts.map +1 -1
- package/out/natural/transforms/transform2GlobalLogicDeclaration.js +4 -1
- package/out/natural/transforms/transform2GlobalLogicDeclaration.js.map +1 -1
- package/out/natural/transforms/transform2Logic.d.ts.map +1 -1
- package/out/natural/transforms/transform2Logic.js +8 -38
- package/out/natural/transforms/transform2Logic.js.map +1 -1
- package/out/natural/transforms/transform2LogicItem.d.ts +9 -2
- package/out/natural/transforms/transform2LogicItem.d.ts.map +1 -1
- package/out/natural/transforms/transform2LogicItem.js +169 -61
- package/out/natural/transforms/transform2LogicItem.js.map +1 -1
- package/out/natural/transforms/transform2OverriddenLogic.d.ts +3 -0
- package/out/natural/transforms/transform2OverriddenLogic.d.ts.map +1 -0
- package/out/natural/transforms/transform2OverriddenLogic.js +83 -0
- package/out/natural/transforms/transform2OverriddenLogic.js.map +1 -0
- package/out/natural/transforms/transform2Param.d.ts +1 -1
- package/out/natural/transforms/transform2Param.d.ts.map +1 -1
- package/out/natural/transforms/transform2Param.js +19 -1
- package/out/natural/transforms/transform2Param.js.map +1 -1
- package/out/natural/transforms/transform2Roles.d.ts +3 -0
- package/out/natural/transforms/transform2Roles.d.ts.map +1 -0
- package/out/natural/transforms/transform2Roles.js +34 -0
- package/out/natural/transforms/transform2Roles.js.map +1 -0
- package/out/natural/transforms/transform2Structure.d.ts.map +1 -1
- package/out/natural/transforms/transform2Structure.js +2 -0
- package/out/natural/transforms/transform2Structure.js.map +1 -1
- package/out/natural/transforms/transform2TypeAnnotation.d.ts.map +1 -1
- package/out/natural/transforms/transform2TypeAnnotation.js +8 -4
- package/out/natural/transforms/transform2TypeAnnotation.js.map +1 -1
- package/out/natural/transforms/transform2Variable.d.ts.map +1 -1
- package/out/natural/transforms/transform2Variable.js +4 -0
- package/out/natural/transforms/transform2Variable.js.map +1 -1
- package/out/natural/transforms/utils/createComponentLookupMap.js +3 -3
- package/out/natural/transforms/utils/createComponentLookupMap.js.map +1 -1
- package/out/natural/transforms/utils/ensureBindRoles.d.ts +9 -0
- package/out/natural/transforms/utils/ensureBindRoles.d.ts.map +1 -0
- package/out/natural/transforms/utils/ensureBindRoles.js +25 -0
- package/out/natural/transforms/utils/ensureBindRoles.js.map +1 -0
- package/out/natural/transforms/utils/flattenStatementsWithComments.d.ts +11 -0
- package/out/natural/transforms/utils/flattenStatementsWithComments.d.ts.map +1 -0
- package/out/natural/transforms/utils/flattenStatementsWithComments.js +36 -0
- package/out/natural/transforms/utils/flattenStatementsWithComments.js.map +1 -0
- package/out/natural/transforms/utils/parseDecorator.d.ts +4 -4
- package/out/natural/transforms/utils/parseDecorator.d.ts.map +1 -1
- package/out/natural/transforms/utils/parseDecorator.js +40 -24
- package/out/natural/transforms/utils/parseDecorator.js.map +1 -1
- package/out/natural/transforms/utils/parseLogicBody.d.ts +17 -0
- package/out/natural/transforms/utils/parseLogicBody.d.ts.map +1 -0
- package/out/natural/transforms/utils/parseLogicBody.js +47 -0
- package/out/natural/transforms/utils/parseLogicBody.js.map +1 -0
- package/out/natural/utils/index.d.ts +5 -0
- package/out/natural/utils/index.d.ts.map +1 -1
- package/out/natural/utils/index.js +11 -1
- package/out/natural/utils/index.js.map +1 -1
- package/out/natural/utils/nasl-file-types.d.ts +6 -1
- package/out/natural/utils/nasl-file-types.d.ts.map +1 -1
- package/out/natural/utils/nasl-file-types.js +77 -2
- package/out/natural/utils/nasl-file-types.js.map +1 -1
- package/out/server/extendBaseNode.d.ts.map +1 -1
- package/out/server/extendBaseNode.js +9 -3
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/naslServer.d.ts +18 -0
- package/out/server/naslServer.d.ts.map +1 -1
- package/out/server/naslServer.js +89 -0
- package/out/server/naslServer.js.map +1 -1
- package/out/server/naslUiComponentTs.d.ts +1 -2
- package/out/server/naslUiComponentTs.d.ts.map +1 -1
- package/out/server/naslUiComponentTs.default.d.ts +47 -0
- package/out/server/naslUiComponentTs.js +25 -49
- package/out/server/naslUiComponentTs.js.map +1 -1
- package/out/service/autofix/types.d.ts +2 -2
- package/out/service/autofix/types.d.ts.map +1 -1
- package/out/service/instruct-ruler/ruler.d.ts +3 -1
- package/out/service/instruct-ruler/ruler.d.ts.map +1 -1
- package/out/service/instruct-ruler/ruler.js +2 -1
- package/out/service/instruct-ruler/ruler.js.map +1 -1
- package/out/service/storage/init.d.ts +6 -0
- package/out/service/storage/init.d.ts.map +1 -1
- package/out/service/storage/init.js +22 -9
- package/out/service/storage/init.js.map +1 -1
- package/out/service/storage/operation.d.ts +9 -1
- package/out/service/storage/operation.d.ts.map +1 -1
- package/out/service/storage/operation.js +220 -100
- package/out/service/storage/operation.js.map +1 -1
- package/out/service/storage/specTools.d.ts.map +1 -1
- package/out/service/storage/specTools.js +25 -13
- package/out/service/storage/specTools.js.map +1 -1
- package/out/templator/genQueryComponent.d.ts +13 -1
- package/out/templator/genQueryComponent.d.ts.map +1 -1
- package/out/templator/genQueryComponent.js +18 -14
- package/out/templator/genQueryComponent.js.map +1 -1
- package/package.json +16 -10
- package/sandbox/stdlib/nasl.util.ts +16 -15
- package/out/natural/exports/transform2BatchActions.d.ts +0 -114
- package/out/natural/exports/transform2BatchActions.d.ts.map +0 -1
- package/out/natural/exports/transform2BatchActions.js +0 -1233
- package/out/natural/exports/transform2BatchActions.js.map +0 -1
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const browser_1 = require("@rspack/browser");
|
|
7
|
+
const constant_1 = __importDefault(require("./constant"));
|
|
8
|
+
const plugin = "lcap-plugin";
|
|
9
|
+
class LcapPlugin {
|
|
10
|
+
constructor(options) {
|
|
11
|
+
this.options = options;
|
|
12
|
+
}
|
|
13
|
+
apply(compiler) {
|
|
14
|
+
const { isDev, isIncremental, lastResource, extra } = this.options;
|
|
15
|
+
// 增量发布
|
|
16
|
+
if (isIncremental) {
|
|
17
|
+
addIncrementalBuild(compiler, {
|
|
18
|
+
lastResource,
|
|
19
|
+
});
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
// 标准发布
|
|
23
|
+
overrideRuntime(compiler, {
|
|
24
|
+
isDev,
|
|
25
|
+
});
|
|
26
|
+
emitChunksMapResource(compiler, {
|
|
27
|
+
isDev,
|
|
28
|
+
});
|
|
29
|
+
emitClientResource(compiler, {
|
|
30
|
+
isDev,
|
|
31
|
+
extra,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = LcapPlugin;
|
|
36
|
+
// 复写加载css\js chunk的函数
|
|
37
|
+
function overrideRuntime(compiler, options) {
|
|
38
|
+
const { isDev } = options;
|
|
39
|
+
if (!isDev) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const { RuntimeGlobals } = compiler.webpack;
|
|
43
|
+
// 复写__webpack_require__.k和__webpack_require__.u
|
|
44
|
+
compiler.hooks.compilation.tap(plugin, (compilation) => {
|
|
45
|
+
compilation.hooks.runtimeModule.tap(plugin, (module, chunk) => {
|
|
46
|
+
if (module.name === "get javascript chunk filename" && chunk.name === "runtime") {
|
|
47
|
+
module.source.source = `__webpack_require__.u = (chunkId) => {
|
|
48
|
+
return "" + window.lcapChunksNameMap[chunkId] + "." + window.lcapChunksHashMap[chunkId] + ".js"
|
|
49
|
+
}\n`;
|
|
50
|
+
}
|
|
51
|
+
if (module.name === "get css chunk filename" && chunk.name === "runtime") {
|
|
52
|
+
module.source.source = `__webpack_require__.k = (chunkId) => {
|
|
53
|
+
return "" + window.lcapChunksNameMap[chunkId] + "." + window.lcapChunksHashMap[chunkId] + ".css"
|
|
54
|
+
}\n`;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
// 增加chunkMap资源
|
|
60
|
+
function emitChunksMapResource(compiler, options) {
|
|
61
|
+
const { isDev } = options;
|
|
62
|
+
if (!isDev) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
compiler.hooks.emit.tapAsync(plugin, (compilation, callback) => {
|
|
66
|
+
// 2、增加router.min.js asset
|
|
67
|
+
const ChunksNameMap = {};
|
|
68
|
+
const ChunksHashMap = {};
|
|
69
|
+
compilation.chunks.forEach((chunk) => {
|
|
70
|
+
const chunkId = chunk.id;
|
|
71
|
+
const chunkName = chunk.name;
|
|
72
|
+
const chunkHash = chunk.hash.substring(0, 8);
|
|
73
|
+
ChunksNameMap[chunkId] = chunkName || chunkId;
|
|
74
|
+
ChunksHashMap[chunkId] = chunkHash;
|
|
75
|
+
});
|
|
76
|
+
const { RawSource } = compiler.webpack.sources;
|
|
77
|
+
const code = `window.lcapChunksNameMap = ${JSON.stringify(ChunksNameMap)};
|
|
78
|
+
window.lcapChunksHashMap = ${JSON.stringify(ChunksHashMap)};
|
|
79
|
+
|
|
80
|
+
var lcap_changed_chunks = [];
|
|
81
|
+
|
|
82
|
+
// lcap_changed_chunks placeholder
|
|
83
|
+
|
|
84
|
+
lcap_changed_chunks.forEach(item => {
|
|
85
|
+
window.lcapChunksNameMap[item.id] = item.name;
|
|
86
|
+
window.lcapChunksHashMap[item.id] = item.hash;
|
|
87
|
+
});`;
|
|
88
|
+
compilation.emitAsset("router.min.js", new RawSource(code), {
|
|
89
|
+
minimized: true,
|
|
90
|
+
});
|
|
91
|
+
callback();
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
// 生成client.js
|
|
95
|
+
function emitClientResource(compiler, options) {
|
|
96
|
+
const { isDev, extra } = options;
|
|
97
|
+
compiler.hooks.compilation.tap(plugin, (compilation) => {
|
|
98
|
+
browser_1.HtmlRspackPlugin.getCompilationHooks(compilation).beforeAssetTagGeneration.tapPromise(plugin, async (data) => {
|
|
99
|
+
const { assets } = data;
|
|
100
|
+
const { publicPath, js, css } = assets;
|
|
101
|
+
const allJS = [...(extra.preJS || []), ...js, ...(extra.postJS || [])];
|
|
102
|
+
const allCSS = [
|
|
103
|
+
...(extra.preCSS || []),
|
|
104
|
+
...css,
|
|
105
|
+
...(extra.postCSS || []),
|
|
106
|
+
];
|
|
107
|
+
const clientCode = `(function() {
|
|
108
|
+
${constant_1.default}
|
|
109
|
+
|
|
110
|
+
function loadAssets() {
|
|
111
|
+
// chunksMap
|
|
112
|
+
${isDev} && LazyLoad.js(["${publicPath}router.min.js"].map(item => {
|
|
113
|
+
var timestamp = Date.now();
|
|
114
|
+
return item + '?timestamp=' + timestamp;
|
|
115
|
+
}));
|
|
116
|
+
|
|
117
|
+
LazyLoad.js(${JSON.stringify(allJS)});
|
|
118
|
+
LazyLoad.css(${JSON.stringify(allCSS)});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
${extra.entryCode}
|
|
122
|
+
})();
|
|
123
|
+
`;
|
|
124
|
+
// 浏览器环境兼容:RawSource 直接支持字符串
|
|
125
|
+
const source = new compiler.webpack.sources.RawSource(clientCode, {
|
|
126
|
+
minimized: true,
|
|
127
|
+
});
|
|
128
|
+
compilation.emitAsset("client.js", source);
|
|
129
|
+
data.assets.js = [`${publicPath}client.js?t=${Date.now()}`];
|
|
130
|
+
data.assets.css = [];
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
// 增量构建
|
|
135
|
+
function addIncrementalBuild(compiler, options) {
|
|
136
|
+
const { lastResource } = options;
|
|
137
|
+
const { chunksMap: chunksMapCode } = lastResource;
|
|
138
|
+
compiler.hooks.emit.tapAsync(plugin, (compilation, callback) => {
|
|
139
|
+
// 只保留pages相关的chunk 资源
|
|
140
|
+
const pagesAssets = [];
|
|
141
|
+
const changedChunks = [];
|
|
142
|
+
compilation.chunks.forEach((chunk) => {
|
|
143
|
+
if (chunk.idNameHints?.includes("page")) {
|
|
144
|
+
chunk.files.forEach((file) => pagesAssets.push(file));
|
|
145
|
+
changedChunks.push({
|
|
146
|
+
id: chunk.id,
|
|
147
|
+
name: chunk.name || chunk.id,
|
|
148
|
+
hash: chunk.hash.substring(0, 8),
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
// 删除不需要的chunk(非页面相关的chunk)
|
|
153
|
+
compilation.getAssets().forEach((asset) => {
|
|
154
|
+
if (!pagesAssets.includes(asset.name)) {
|
|
155
|
+
compilation.deleteAsset(asset.name);
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
// 生成增量变更的chunks-map.js
|
|
159
|
+
let code = chunksMapCode;
|
|
160
|
+
const placeholderIdx = code.indexOf("// lcap_changed_chunks placeholder");
|
|
161
|
+
// 前面插入代码
|
|
162
|
+
if (placeholderIdx !== -1) {
|
|
163
|
+
code =
|
|
164
|
+
code.slice(0, placeholderIdx) +
|
|
165
|
+
`lcap_changed_chunks.push(...${JSON.stringify(changedChunks)});\n` +
|
|
166
|
+
code.slice(placeholderIdx);
|
|
167
|
+
}
|
|
168
|
+
const { RawSource } = compiler.webpack.sources;
|
|
169
|
+
compilation.emitAsset("router.min.js", new RawSource(code), {
|
|
170
|
+
minimized: true,
|
|
171
|
+
});
|
|
172
|
+
callback();
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generator/rspack-broswer/plugins/lcap/index.js"],"names":[],"mappings":";;;;;AAAA,6CAA2D;AAC3D,0DAAsC;AAEtC,MAAM,MAAM,GAAG,aAAa,CAAC;AAE7B,MAAqB,UAAU;IAC7B,YAAY,OAAO;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IACD,KAAK,CAAC,QAAQ;QACZ,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QAEnE,OAAO;QACP,IAAI,aAAa,EAAE,CAAC;YAClB,mBAAmB,CAAC,QAAQ,EAAE;gBAC5B,YAAY;aACb,CAAC,CAAC;YAEH,OAAO;QACT,CAAC;QAED,OAAO;QACP,eAAe,CAAC,QAAQ,EAAE;YACxB,KAAK;SACN,CAAC,CAAC;QACH,qBAAqB,CAAC,QAAQ,EAAE;YAC9B,KAAK;SACN,CAAC,CAAC;QACH,kBAAkB,CAAC,QAAQ,EAAE;YAC3B,KAAK;YACL,KAAK;SACN,CAAC,CAAC;IACL,CAAC;CACF;AA5BD,6BA4BC;AAED,sBAAsB;AACtB,SAAS,eAAe,CAAC,QAAQ,EAAE,OAAO;IACxC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAE1B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO;IACT,CAAC;IAED,MAAM,EAAE,cAAc,EAAE,GAAG,Q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AC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generator/rspack-broswer/plugins/missing-css-fallback/index.js"],"names":[],"mappings":"AAIA;IACE,0BASC;IARC;;;;MAOC;IAGH,2BAsCC;CACF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const browser_1 = require("@rspack/browser");
|
|
4
|
+
const fs = browser_1.builtinMemFs.fs;
|
|
5
|
+
class MissingCssFallbackPlugin {
|
|
6
|
+
constructor(options = {}) {
|
|
7
|
+
this.options = {
|
|
8
|
+
// 默认匹配 dist-theme/index.css 结尾的路径
|
|
9
|
+
pattern: /\/dist-theme\/index\.css$/,
|
|
10
|
+
filename: 'lcap-missing-css.css',
|
|
11
|
+
// 空的 CSS 内容
|
|
12
|
+
fallbackContent: '/* CSS file not found, using empty fallback */',
|
|
13
|
+
...options
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
apply(compiler) {
|
|
17
|
+
const { pattern, fallbackContent, filename } = this.options;
|
|
18
|
+
// 使用 NormalModuleReplacementPlugin 来替换不存在的 CSS 文件
|
|
19
|
+
const normalModuleReplacementPlugin = new browser_1.NormalModuleReplacementPlugin(pattern, (resource) => {
|
|
20
|
+
const originalRequest = resource.request;
|
|
21
|
+
try {
|
|
22
|
+
// 尝试解析原始模块
|
|
23
|
+
const context = resource.context || compiler.context;
|
|
24
|
+
const resolver = compiler.resolverFactory.get('normal');
|
|
25
|
+
try {
|
|
26
|
+
// 使用同步解析方法
|
|
27
|
+
const resolvedPath = resolver.resolveSync(null, context, originalRequest);
|
|
28
|
+
// 检查文件是否存在
|
|
29
|
+
if (!fs.existsSync(resolvedPath)) {
|
|
30
|
+
throw new Error('File not found');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
// 文件不存在,创建一个内联模块
|
|
35
|
+
console.log(`[MissingCssFallbackPlugin] CSS file not found: ${originalRequest}, using empty fallback`);
|
|
36
|
+
// 创建一个临时的空 CSS 文件
|
|
37
|
+
const tempCssPath = '/fallback/' + filename;
|
|
38
|
+
fs.writeFileSync(tempCssPath, fallbackContent);
|
|
39
|
+
resource.request = tempCssPath;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
console.warn(`[MissingCssFallbackPlugin] Warning: Error processing ${originalRequest}:`, error.message);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
normalModuleReplacementPlugin.apply(compiler);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.default = MissingCssFallbackPlugin;
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generator/rspack-broswer/plugins/missing-css-fallback/index.js"],"names":[],"mappings":";;AAAA,6CAA8E;AAE9E,MAAM,EAAE,GAAG,sBAAY,CAAC,EAAE,CAAC;AAE3B,MAAqB,wBAAwB;IAC3C,YAAY,OAAO,GAAG,EAAE;QACtB,IAAI,CAAC,OAAO,GAAG;YACb,kCAAkC;YAClC,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,sBAAsB;YAChC,YAAY;YACZ,eAAe,EAAE,gDAAgD;YACjE,GAAG,OAAO;SACX,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QAE5D,kDAAkD;QAClD,MAAM,6BAA6B,GAAG,IAAI,uCAA6B,CACrE,OAAO,EACP,CAAC,QAAQ,EAAE,EAAE;YACX,MAAM,eAAe,GAAG,QAAQ,CAAC,OAAO,CAAC;YAEzC,IAAI,CAAC;gBACH,WAAW;gBACX,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,OAAO,CAAC;gBACrD,MAAM,QAAQ,GAAG,QAAQ,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;gBAEvD,IAAI,CAAC;oBACH,WAAW;oBACX,MAAM,YAAY,GAAG,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;oBAE1E,WAAW;oBACX,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;wBACjC,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;oBACpC,CAAC;gBACH,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACX,iBAAiB;oBACjB,OAAO,CAAC,GAAG,CAAC,kDAAkD,eAAe,wBAAwB,CAAC,CAAC;oBAEvG,kBAAkB;oBAClB,MAAM,WAAW,GAAG,YAAY,GAAG,QAAQ,CAAC;oBAC5C,EAAE,CAAC,aAAa,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;oBAC/C,QAAQ,CAAC,OAAO,GAAG,WAAW,CAAC;gBACjC,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,IAAI,CAAC,wDAAwD,eAAe,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;YAC1G,CAAC;QACH,CAAC,CACF,CAAC;QAEF,6BAA6B,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;CACF;AAnDD,2CAmDC"}
|
|
@@ -3,5 +3,25 @@ import { AppInfo, UIDeclaration, type LoadMaterialContext, type MaterialManifest
|
|
|
3
3
|
import { Module } from "../../concepts";
|
|
4
4
|
export declare function getDepMainfiest(dep: Module): MaterialManifest;
|
|
5
5
|
export declare const getDepJSONSchema: (dep: any, axios: AxiosInstance, appInfo: AppInfo) => Promise<any>;
|
|
6
|
+
export declare const getNewComponent: (component: any, config: any, appInfo: AppInfo, componentApi: Record<string, any>) => {
|
|
7
|
+
concept: any;
|
|
8
|
+
name: any;
|
|
9
|
+
title: any;
|
|
10
|
+
show: boolean;
|
|
11
|
+
icon: any;
|
|
12
|
+
category: any;
|
|
13
|
+
tagName: any;
|
|
14
|
+
componentName: any;
|
|
15
|
+
namespace: string;
|
|
16
|
+
screenshots: string[];
|
|
17
|
+
drawings: string[];
|
|
18
|
+
hasTypeDeclaration: any;
|
|
19
|
+
frontendType: any;
|
|
20
|
+
libInfo: string;
|
|
21
|
+
blocks: any;
|
|
22
|
+
i18nMap: any;
|
|
23
|
+
themes: any;
|
|
24
|
+
ideusage: any;
|
|
25
|
+
};
|
|
6
26
|
export declare function loadDependencyUIDeclaration({ axios, appInfo }: LoadMaterialContext, dep: Module): Promise<UIDeclaration>;
|
|
7
27
|
//# sourceMappingURL=dependency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency.d.ts","sourceRoot":"","sources":["../../../src/generator/ui-library-declaration/dependency.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAY,aAAa,EAAE,KAAK,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC5G,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAIxC,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAmB7D;AAED,eAAO,MAAM,gBAAgB,QAAe,GAAG,SAAS,aAAa,WAAW,OAAO,iBAgCtF,CAAA;
|
|
1
|
+
{"version":3,"file":"dependency.d.ts","sourceRoot":"","sources":["../../../src/generator/ui-library-declaration/dependency.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAY,aAAa,EAAE,KAAK,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC5G,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAIxC,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAmB7D;AAED,eAAO,MAAM,gBAAgB,QAAe,GAAG,SAAS,aAAa,WAAW,OAAO,iBAgCtF,CAAA;AAED,eAAO,MAAM,eAAe,cAAe,GAAG,UAAU,GAAG,WAAW,OAAO,gBAAgB,OAAO,MAAM,EAAE,GAAG,CAAC;;;;;;;;;;;;;;;;;;;CAuE/G,CAAC;AA6BF,wBAAsB,2BAA2B,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,mBAAmB,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAoC9H"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadDependencyUIDeclaration = exports.getDepJSONSchema = exports.getDepMainfiest = void 0;
|
|
3
|
+
exports.loadDependencyUIDeclaration = exports.getNewComponent = exports.getDepJSONSchema = exports.getDepMainfiest = void 0;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
const nasl_unified_frontend_generator_1 = require("@lcap/nasl-unified-frontend-generator");
|
|
6
6
|
const format_1 = require("./format");
|
|
@@ -122,6 +122,7 @@ const getNewComponent = (component, config, appInfo, componentApi) => {
|
|
|
122
122
|
ideusage: _component.ideusage,
|
|
123
123
|
};
|
|
124
124
|
};
|
|
125
|
+
exports.getNewComponent = getNewComponent;
|
|
125
126
|
const loadLibraryTypeTs = async (dep, appInfo, manifest, axios) => {
|
|
126
127
|
const tsFileName = 'nasl.extension.d.ts';
|
|
127
128
|
const fetchURL = (0, manifest_1.getFetchURL)('nasl', tsFileName, {
|
|
@@ -157,7 +158,7 @@ async function loadDependencyUIDeclaration({ axios, appInfo }, dep) {
|
|
|
157
158
|
(depSchema.frontends || []).forEach((frontend) => {
|
|
158
159
|
const { frameworkKind } = frontend;
|
|
159
160
|
(frontend.viewComponents || []).forEach((component) => {
|
|
160
|
-
components.push(getNewComponent(component, {
|
|
161
|
+
components.push((0, exports.getNewComponent)(component, {
|
|
161
162
|
title: dep.title,
|
|
162
163
|
name: dep.name,
|
|
163
164
|
version: dep.version,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency.js","sourceRoot":"","sources":["../../../src/generator/ui-library-declaration/dependency.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAEnC,2FAAkE;AAGlE,qCAAuG;AACvG,yCAA4D;AAE5D,SAAgB,eAAe,CAAC,GAAW;IACzC,MAAM,eAAe,GAAqB;QACxC,IAAI,EAAE,EAAE;QACR,OAAO,EAAE,CAAC,qBAAqB,CAAC;QAChC,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,EAAE;KACR,CAAC;IACF,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,IAAI,CAAE,GAAG,CAAC,eAAuB,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9E,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAE,GAAG,CAAC,eAAuB,CAAC,UAAU,CAAC,CAAC,CAAC;QACtE,OAAO,QAA4B,CAAC;IACtC,CAAC;IAAC,OAAM,CAAC,EAAE,CAAC;QACV,OAAO,eAAe,CAAC;IACzB,CAAC;AACH,CAAC;AAnBD,0CAmBC;AAEM,MAAM,gBAAgB,GAAG,KAAK,EAAE,GAAQ,EAAE,KAAoB,EAAE,OAAgB,EAAE,EAAE;IACzF,IAAI,CAAC,GAAG,CAAC,eAAe,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;QAC1D,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,MAAM,GAAQ,EAAE,CAAC;IA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5B,aAAa;aACd,EACD,OAAO,EACP,QAAQ,CACT,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EAAE,QAAQ;QACrB,aAAa,EAAE,UAAU;QACzB,MAAM;KACP,CAAC;AACJ,CAAC;AApCD,kEAoCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generator/ui-library-declaration/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generator/ui-library-declaration/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./types"), exports);
|
|
18
18
|
__exportStar(require("./material"), exports);
|
|
19
19
|
__exportStar(require("./basic"), exports);
|
|
20
|
+
__exportStar(require("./dependency"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generator/ui-library-declaration/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generator/ui-library-declaration/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,0CAAwB;AACxB,+CAA6B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
2
|
import type { AppInfo, UILibraryDeclaration } from './types';
|
|
3
3
|
import type { App } from '../../concepts';
|
|
4
|
-
export declare function getUILibDeclaration(axios: AxiosInstance, app: App, appInfo: AppInfo): Promise<UILibraryDeclaration>;
|
|
5
|
-
export declare function getUILibDeclarationWithoutEnv(axios: AxiosInstance, app: App): Promise<UILibraryDeclaration>;
|
|
4
|
+
export declare function getUILibDeclaration(axios: AxiosInstance, app: App, appInfo: AppInfo, onlyBasicUI?: boolean): Promise<UILibraryDeclaration>;
|
|
5
|
+
export declare function getUILibDeclarationWithoutEnv(axios: AxiosInstance, app: App, onlyBasicUI?: boolean): Promise<UILibraryDeclaration>;
|
|
6
6
|
//# sourceMappingURL=material.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../../src/generator/ui-library-declaration/material.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,OAAO,EACP,oBAAoB,EACrB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAiB1C,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,
|
|
1
|
+
{"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../../src/generator/ui-library-declaration/material.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,OAAO,EACP,oBAAoB,EACrB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAiB1C,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,GAAE,OAAe,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAsGvJ;AAED,wBAAsB,6BAA6B,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,EAAE,WAAW,GAAE,OAAe,iCAiB/G"}
|
|
@@ -6,7 +6,7 @@ const custom_1 = require("./custom");
|
|
|
6
6
|
const basic_1 = require("./basic");
|
|
7
7
|
const utils_1 = require("../release-body/utils");
|
|
8
8
|
const utils_2 = require("../../utils");
|
|
9
|
-
async function getUILibDeclaration(axios, app, appInfo) {
|
|
9
|
+
async function getUILibDeclaration(axios, app, appInfo, onlyBasicUI = false) {
|
|
10
10
|
const ui = {
|
|
11
11
|
allNodesAPI: {},
|
|
12
12
|
needTSComponents: {},
|
|
@@ -55,6 +55,10 @@ async function getUILibDeclaration(axios, app, appInfo) {
|
|
|
55
55
|
});
|
|
56
56
|
basicUITsCodes.push(tsCode);
|
|
57
57
|
}));
|
|
58
|
+
if (onlyBasicUI) {
|
|
59
|
+
ui.basicUITsCode = basicUITsCodes.join('\n\n');
|
|
60
|
+
return ui;
|
|
61
|
+
}
|
|
58
62
|
const libraryTsCodes = [];
|
|
59
63
|
await Promise.all(app.dependencies.map(async (dep) => {
|
|
60
64
|
if (!dep.frontends || dep.frontends.length === 0) {
|
|
@@ -93,7 +97,7 @@ async function getUILibDeclaration(axios, app, appInfo) {
|
|
|
93
97
|
return ui;
|
|
94
98
|
}
|
|
95
99
|
exports.getUILibDeclaration = getUILibDeclaration;
|
|
96
|
-
async function getUILibDeclarationWithoutEnv(axios, app) {
|
|
100
|
+
async function getUILibDeclarationWithoutEnv(axios, app, onlyBasicUI = false) {
|
|
97
101
|
const [env, version] = await Promise.all([
|
|
98
102
|
(0, utils_1.getEnvConfig)(axios, app.id),
|
|
99
103
|
(0, utils_1.getVersionDetail)(axios, app),
|
|
@@ -103,7 +107,7 @@ async function getUILibDeclarationWithoutEnv(axios, app) {
|
|
|
103
107
|
return getUILibDeclaration(axios, app, {
|
|
104
108
|
STATIC_URL: env.STATIC_URL,
|
|
105
109
|
tenantID: env.officialTenantId,
|
|
106
|
-
});
|
|
110
|
+
}, onlyBasicUI);
|
|
107
111
|
}
|
|
108
112
|
exports.getUILibDeclarationWithoutEnv = getUILibDeclarationWithoutEnv;
|
|
109
113
|
//# sourceMappingURL=material.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material.js","sourceRoot":"","sources":["../../../src/generator/ui-library-declaration/material.ts"],"names":[],"mappings":";;;AAOA,6CAA2D;AAC3D,qCAAmD;AACnD,mCAMiB;AACjB,iDAI+B;AAC/B,uCAA0C;AAEnC,KAAK,UAAU,mBAAmB,CAAC,KAAoB,EAAE,GAAQ,EAAE,OAAgB;
|
|
1
|
+
{"version":3,"file":"material.js","sourceRoot":"","sources":["../../../src/generator/ui-library-declaration/material.ts"],"names":[],"mappings":";;;AAOA,6CAA2D;AAC3D,qCAAmD;AACnD,mCAMiB;AACjB,iDAI+B;AAC/B,uCAA0C;AAEnC,KAAK,UAAU,mBAAmB,CAAC,KAAoB,EAAE,GAAQ,EAAE,OAAgB,EAAE,cAAuB,KAAK;IACtH,MAAM,EAAE,GAAG;QACT,WAAW,EAAE,EAA6B;QAC1C,gBAAgB,EAAE,EAAE;QACpB,oBAAoB,EAAE,EAAE;QACxB,aAAa,EAAE,EAAE;QACjB,qBAAqB,EAAE,EAAE;KAC1B,CAAC;IAEF,MAAM,cAAc,GAAa,EAAE,CAAC;IACpC,MAAM,OAAO,GAAG;QACd,KAAK;QACL,GAAG;QACH,OAAO;KACR,CAAC;IAEF,MAAM,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;QACnD,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;QACnC,MAAM,aAAa,GAAG,IAAA,wBAAgB,EAAC,GAAG,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;QACjE,MAAM,QAAQ,GAAG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CAAC,WAAW,GAAG;QACf,GAAG,EAAE,CAAC,WAAW;QACjB,GAAG,WAAW;KACf,CAAC;IACF,EAAE,CAAC,gBAAgB,GAAG;QACpB,GAAG,EAAE,CAAC,gBAAgB;QACtB,GAAG,WAAW;KACf,CAAC;IAEF,EAAE,CAAC,aAAa,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/C,EAAE,CAAC,qBAAqB,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEvD,OAAO,EAAE,CAAC;AACZ,CAAC;AAtGD,kDAsGC;AAEM,KAAK,UAAU,6BAA6B,CAAC,KAAoB,EAAE,GAAQ,EAAE,cAAuB,KAAK;IAC9G,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACvC,IAAA,oBAAY,EAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;QAC3B,IAAA,wBAAgB,EAAC,KAAK,EAAE,GAAG,CAAC;KAC7B,CAAC,CAAC;IACH,sBAAsB;IACtB,MAAM,IAAA,uBAAe,EACnB,KAAK,EACL,GAAG,EACH,GAAG,CAAC,UAAU,EACd,OAAO,CAAC,WAAW,CACpB,CAAC;IAEF,OAAO,mBAAmB,CAAC,KAAK,EAAE,GAAG,EAAE;QACrC,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,QAAQ,EAAE,GAAG,CAAC,gBAAgB;KAC/B,EAAE,WAAW,CAAC,CAAC;AAClB,CAAC;AAjBD,sEAiBC"}
|
package/out/index.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ export * as breakpoint from './breakpoint';
|
|
|
11
11
|
export * as Types from '@lcap/nasl-types';
|
|
12
12
|
export * as LanguageServerCore from '@lcap/nasl-language-server-core';
|
|
13
13
|
export * from './decorators';
|
|
14
|
-
export { getOperationRecords, operationRecordInfoMap, doOperationRecord, operationRecordQuery, operationRecordPlayback, } from './service/storage/operation';
|
|
15
|
-
export { loadApp, setStore, loadAppSync, handleApp, batchAction, batchQuery, cleanUselessUnit, mountDatabaseTypes, initializeCheckRules, changeTabTimestamp, getGlobalChangedTime, getNaslIncrQuery, saveNaslManual, } from './service/storage/init';
|
|
14
|
+
export { getOperationRecords, operationRecordInfoMap, doOperationRecord, operationRecordQuery, operationRecordPlayback, operationRecordPlaybackAll, operationRecordPlaybackOne, executeOperationActionItem, executeOperationRecordFromFile, applyOperationStackData, } from './service/storage/operation';
|
|
15
|
+
export { loadApp, setStore, loadAppSync, handleApp, batchAction, batchQuery, cleanUselessUnit, mountDatabaseTypes, initializeCheckRules, changeTabTimestamp, getGlobalChangedTime, getNaslIncrQuery, saveNaslManual, getBatchAdditionalData, } from './service/storage/init';
|
|
16
16
|
export { createService } from './service/creator';
|
|
17
17
|
export { defaultAutoFixRuleSet, findSupportedRules } from './service/autofix';
|
|
18
18
|
export { stepRecorder } from './manager/stepRecorder';
|
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,OAAO,EACL,OAAO,IAAI,MAAM,EACjB,UAAU,EACV,iCAAiC,EACjC,4BAA4B,EAC5B,6BAA6B,EAC7B,wBAAwB,GACzB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,QAAQ,MAAM,0BAA0B,CAAC;AACrD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,kBAAkB,MAAM,iCAAiC,CAAC;AACtE,cAAc,cAAc,CAA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AClB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAE7B,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,cAAc,6BAA6B,CAAA"}
|
package/out/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
29
29
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
30
|
};
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.canIUse = exports.deleteTaskQueueFromIndexedDB = exports.deleteExpiredTaskQueueRecords = exports.getTaskQueueTimestamps = exports.getAllTaskQueueRecords = exports.saveTaskQueueToIndexedDB = exports.loadTaskQueueFromIndexedDB = exports.stepRecorder = exports.findSupportedRules = exports.defaultAutoFixRuleSet = exports.createService = exports.saveNaslManual = exports.getNaslIncrQuery = exports.getGlobalChangedTime = exports.changeTabTimestamp = exports.initializeCheckRules = exports.mountDatabaseTypes = exports.cleanUselessUnit = exports.batchQuery = exports.batchAction = exports.handleApp = exports.loadAppSync = exports.setStore = exports.loadApp = exports.operationRecordPlayback = exports.operationRecordQuery = exports.doOperationRecord = exports.operationRecordInfoMap = exports.getOperationRecords = exports.LanguageServerCore = exports.Types = exports.breakpoint = exports.instruct = exports.utils = exports.genBlock = exports.isNaslUiTsUrlFlagEnabled = exports.getNaslUiComponentTsQueryOpts = exports.DEFAULT_NASL_UI_COMPONENT_TS = exports.buildNaslUiComponentTsFileContent = exports.NaslServer = exports.server = void 0;
|
|
32
|
+
exports.canIUse = exports.deleteTaskQueueFromIndexedDB = exports.deleteExpiredTaskQueueRecords = exports.getTaskQueueTimestamps = exports.getAllTaskQueueRecords = exports.saveTaskQueueToIndexedDB = exports.loadTaskQueueFromIndexedDB = exports.stepRecorder = exports.findSupportedRules = exports.defaultAutoFixRuleSet = exports.createService = exports.getBatchAdditionalData = exports.saveNaslManual = exports.getNaslIncrQuery = exports.getGlobalChangedTime = exports.changeTabTimestamp = exports.initializeCheckRules = exports.mountDatabaseTypes = exports.cleanUselessUnit = exports.batchQuery = exports.batchAction = exports.handleApp = exports.loadAppSync = exports.setStore = exports.loadApp = exports.applyOperationStackData = exports.executeOperationRecordFromFile = exports.executeOperationActionItem = exports.operationRecordPlaybackOne = exports.operationRecordPlaybackAll = exports.operationRecordPlayback = exports.operationRecordQuery = exports.doOperationRecord = exports.operationRecordInfoMap = exports.getOperationRecords = exports.LanguageServerCore = exports.Types = exports.breakpoint = exports.instruct = exports.utils = exports.genBlock = exports.isNaslUiTsUrlFlagEnabled = exports.getNaslUiComponentTsQueryOpts = exports.DEFAULT_NASL_UI_COMPONENT_TS = exports.buildNaslUiComponentTsFileContent = exports.NaslServer = exports.server = void 0;
|
|
33
33
|
__exportStar(require("./concepts"), exports);
|
|
34
34
|
__exportStar(require("./generator"), exports);
|
|
35
35
|
__exportStar(require("./translator"), exports);
|
|
@@ -55,6 +55,11 @@ Object.defineProperty(exports, "operationRecordInfoMap", { enumerable: true, get
|
|
|
55
55
|
Object.defineProperty(exports, "doOperationRecord", { enumerable: true, get: function () { return operation_1.doOperationRecord; } });
|
|
56
56
|
Object.defineProperty(exports, "operationRecordQuery", { enumerable: true, get: function () { return operation_1.operationRecordQuery; } });
|
|
57
57
|
Object.defineProperty(exports, "operationRecordPlayback", { enumerable: true, get: function () { return operation_1.operationRecordPlayback; } });
|
|
58
|
+
Object.defineProperty(exports, "operationRecordPlaybackAll", { enumerable: true, get: function () { return operation_1.operationRecordPlaybackAll; } });
|
|
59
|
+
Object.defineProperty(exports, "operationRecordPlaybackOne", { enumerable: true, get: function () { return operation_1.operationRecordPlaybackOne; } });
|
|
60
|
+
Object.defineProperty(exports, "executeOperationActionItem", { enumerable: true, get: function () { return operation_1.executeOperationActionItem; } });
|
|
61
|
+
Object.defineProperty(exports, "executeOperationRecordFromFile", { enumerable: true, get: function () { return operation_1.executeOperationRecordFromFile; } });
|
|
62
|
+
Object.defineProperty(exports, "applyOperationStackData", { enumerable: true, get: function () { return operation_1.applyOperationStackData; } });
|
|
58
63
|
var init_1 = require("./service/storage/init");
|
|
59
64
|
Object.defineProperty(exports, "loadApp", { enumerable: true, get: function () { return init_1.loadApp; } });
|
|
60
65
|
Object.defineProperty(exports, "setStore", { enumerable: true, get: function () { return init_1.setStore; } });
|
|
@@ -69,6 +74,7 @@ Object.defineProperty(exports, "changeTabTimestamp", { enumerable: true, get: fu
|
|
|
69
74
|
Object.defineProperty(exports, "getGlobalChangedTime", { enumerable: true, get: function () { return init_1.getGlobalChangedTime; } });
|
|
70
75
|
Object.defineProperty(exports, "getNaslIncrQuery", { enumerable: true, get: function () { return init_1.getNaslIncrQuery; } });
|
|
71
76
|
Object.defineProperty(exports, "saveNaslManual", { enumerable: true, get: function () { return init_1.saveNaslManual; } });
|
|
77
|
+
Object.defineProperty(exports, "getBatchAdditionalData", { enumerable: true, get: function () { return init_1.getBatchAdditionalData; } });
|
|
72
78
|
var creator_1 = require("./service/creator");
|
|
73
79
|
Object.defineProperty(exports, "createService", { enumerable: true, get: function () { return creator_1.createService; } });
|
|
74
80
|
var autofix_1 = require("./service/autofix");
|
package/out/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2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AACT,mGAAA,WAAW,OAAA;AACX,kGAAA,UAAU,OAAA;AACV,wGAAA,gBAAgB,OAAA;AAChB,0GAAA,kBAAkB,OAAA;AAClB,4GAAA,oBAAoB,OAAA;AACpB,0GAAA,kBAAkB,OAAA;AAClB,4GAAA,oBAAoB,OAAA;AACpB,wGAAA,gBAAgB,OAAA;AAChB,sGAAA,cAAc,OAAA;AACd,8GAAA,sBAAsB,OAAA;AAGxB,6CAAkD;AAAzC,wGAAA,aAAa,OAAA;AACtB,6CAA8E;AAArE,gHAAA,qBAAqB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAClD,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AAErB,4CAA0B;AAC1B,+CAA6B;AAE7B,yDAOqC;AANnC,uHAAA,0BAA0B,OAAA;AAC1B,qHAAA,wBAAwB,OAAA;AACxB,mHAAA,sBAAsB,OAAA;AACtB,mHAAA,sBAAsB,OAAA;AACtB,0HAAA,6BAA6B,OAAA;AAC7B,yHAAA,4BAA4B,OAAA;AAG9B,iCAAkC;AAAzB,gGAAA,OAAO,OAAA;AAEhB,8DAA2C"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* nasl.mini 入口
|
|
3
|
+
*
|
|
4
|
+
* 最小化 bundle,只包含 TDD 所需核心:
|
|
5
|
+
* - parseNaturalTS / parseNaturalTSXView(parse)
|
|
6
|
+
* - toNaturalTS(通过 BaseNode 方法及所有 Concept 实现)
|
|
7
|
+
* - nasl2Files / transform2BatchActions(文件导出)
|
|
8
|
+
* - createCompilerState(编译器状态工厂)
|
|
9
|
+
*
|
|
10
|
+
* **不包含(与完整 index.ts 相比剔除):**
|
|
11
|
+
* - NaslServer / extendBaseNode(server/index.ts)
|
|
12
|
+
* - @lcap/nasl-language-server-core
|
|
13
|
+
* - @lcap/nasl-unified-frontend-generator(generator)
|
|
14
|
+
* - @lcap/nasl-breakpoint(breakpoint)
|
|
15
|
+
* - old/* 兼容层(只保留 parseNaturalTSLogic,TDD logicCompiler 依赖它)
|
|
16
|
+
*
|
|
17
|
+
* 公共依赖抽取说明:
|
|
18
|
+
* getBuildInFunction / getSqlFunction 原先在 transform2LogicItem.ts 通过 naslServer 调用,
|
|
19
|
+
* 现已改为直接从 @lcap/nasl-concepts/service 导入,naslServer 不再是 parse/toNaturalTS 的依赖。
|
|
20
|
+
*
|
|
21
|
+
* **运行环境提示:**
|
|
22
|
+
* 该 bundle 以 `target: 'web'` 打包并用 `crypto-browserify` 作为 crypto polyfill,
|
|
23
|
+
* 推荐在浏览器(UMD 全局 `nasl`)中使用。
|
|
24
|
+
* 如需在 Node.js 中 require,请在 require 前自行注入 WebCrypto,例如:
|
|
25
|
+
* ```js
|
|
26
|
+
* if (typeof globalThis.crypto === 'undefined') {
|
|
27
|
+
* globalThis.crypto = require('crypto').webcrypto;
|
|
28
|
+
* }
|
|
29
|
+
* const nasl = require('.../nasl.mini.min.js');
|
|
30
|
+
* ```
|
|
31
|
+
* 否则首次走 uuid 路径会报错(参见 packages/nasl/tests/tdd/fixtures.mini.js)。
|
|
32
|
+
*/
|
|
33
|
+
export * from '@lcap/nasl-concepts';
|
|
34
|
+
export * from './translator';
|
|
35
|
+
export * as Types from '@lcap/nasl-types';
|
|
36
|
+
export * from './natural/parser/parseNaturalTS';
|
|
37
|
+
export * from './natural/parser/parseNaturalTSXView';
|
|
38
|
+
export * from './natural/exports/nasl2Files';
|
|
39
|
+
export * from './natural/exports/transform2BatchActions';
|
|
40
|
+
export * from './natural/utils';
|
|
41
|
+
export { parseNaturalTSLogic } from './natural/old/parser/transformTSCode';
|
|
42
|
+
//# sourceMappingURL=index.mini.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mini.d.ts","sourceRoot":"","sources":["../src/index.mini.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAcH,cAAc,qBAAqB,CAAC;AAGpC,cAAc,cAAc,CAAC;AAG7B,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAG1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AAGrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AAGzD,cAAc,iBAAiB,CAAC;AAIhC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC"}
|