@lcap/nasl 4.5.0-beta.5 → 4.5.0-beta.7
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/generator/genBundleFiles.d.ts.map +1 -1
- package/out/generator/genBundleFiles.js +8 -1
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/permission.d.ts.map +1 -1
- package/out/generator/permission.js +124 -8
- package/out/generator/permission.js.map +1 -1
- package/out/generator/release-body/body.d.ts.map +1 -1
- package/out/generator/release-body/body.js +2 -8
- package/out/generator/release-body/body.js.map +1 -1
- package/out/generator/release-body/data.d.ts.map +1 -1
- package/out/generator/release-body/data.js +5 -9
- package/out/generator/release-body/data.js.map +1 -1
- package/out/generator/release-body/internal.d.ts +0 -1
- package/out/generator/release-body/internal.d.ts.map +1 -1
- package/out/generator/release-body/internal.js.map +1 -1
- package/out/generator/release-body/types.d.ts +0 -2
- package/out/generator/release-body/types.d.ts.map +1 -1
- package/out/generator/release-body/utils.d.ts +1 -6
- package/out/generator/release-body/utils.d.ts.map +1 -1
- package/out/generator/release-body/utils.js +1 -1
- package/out/generator/release-body/utils.js.map +1 -1
- package/out/natural/exports/doctor/doctorView.d.ts +2 -1
- package/out/natural/exports/doctor/doctorView.d.ts.map +1 -1
- package/out/natural/exports/doctor/doctorView.js +134 -25
- package/out/natural/exports/doctor/doctorView.js.map +1 -1
- package/out/natural/exports/doctor/types.d.ts +34 -0
- package/out/natural/exports/doctor/types.d.ts.map +1 -1
- package/out/natural/exports/doctor/viewGraph.js +2 -2
- package/out/natural/exports/doctor/viewGraph.js.map +1 -1
- package/out/natural/exports/transform2BatchActions/diff/nodes.d.ts +0 -8
- package/out/natural/exports/transform2BatchActions/diff/nodes.d.ts.map +1 -1
- package/out/natural/exports/transform2BatchActions/diff/nodes.js +8 -28
- package/out/natural/exports/transform2BatchActions/diff/nodes.js.map +1 -1
- package/out/natural/exports/transform2BatchActions/diff/roles.d.ts.map +1 -1
- package/out/natural/exports/transform2BatchActions/diff/roles.js +4 -1
- package/out/natural/exports/transform2BatchActions/diff/roles.js.map +1 -1
- package/out/natural/exports/transform2BatchActions/diff/strip-uuid.d.ts +3 -0
- package/out/natural/exports/transform2BatchActions/diff/strip-uuid.d.ts.map +1 -0
- package/out/natural/exports/transform2BatchActions/diff/strip-uuid.js +30 -0
- package/out/natural/exports/transform2BatchActions/diff/strip-uuid.js.map +1 -0
- package/out/natural/exports/transform2BatchActions/index.d.ts.map +1 -1
- package/out/natural/exports/transform2BatchActions/index.js +1 -1
- package/out/natural/exports/transform2BatchActions/index.js.map +1 -1
- package/out/natural/exports/transform2BatchActions/parse.d.ts +2 -1
- package/out/natural/exports/transform2BatchActions/parse.d.ts.map +1 -1
- package/out/natural/exports/transform2BatchActions/parse.js +39 -12
- package/out/natural/exports/transform2BatchActions/parse.js.map +1 -1
- package/out/natural/exports/transform2BatchActions/types.d.ts +6 -0
- package/out/natural/exports/transform2BatchActions/types.d.ts.map +1 -1
- package/out/natural/exports/transform2BatchActions/view-path-utils.d.ts +13 -0
- package/out/natural/exports/transform2BatchActions/view-path-utils.d.ts.map +1 -0
- package/out/natural/exports/transform2BatchActions/view-path-utils.js +32 -0
- package/out/natural/exports/transform2BatchActions/view-path-utils.js.map +1 -0
- package/out/natural/old/getContext/getUILib.d.ts.map +1 -1
- package/out/natural/old/getContext/getUILib.js +47 -22
- package/out/natural/old/getContext/getUILib.js.map +1 -1
- package/out/natural/old/getContext/naslStdlibMap.d.ts.map +1 -1
- package/out/natural/old/getContext/naslStdlibMap.js +29 -14
- package/out/natural/old/getContext/naslStdlibMap.js.map +1 -1
- package/out/natural/parser/parseNaturalTSXView.d.ts.map +1 -1
- package/out/natural/parser/parseNaturalTSXView.js +38 -1
- package/out/natural/parser/parseNaturalTSXView.js.map +1 -1
- package/out/natural/transforms/checker/checkViewElement.d.ts.map +1 -1
- package/out/natural/transforms/checker/checkViewElement.js +8 -0
- package/out/natural/transforms/checker/checkViewElement.js.map +1 -1
- package/out/natural/transforms/transform2LogicItem.js +2 -2
- package/out/natural/transforms/transform2LogicItem.js.map +1 -1
- package/out/server/naslServer.d.ts.map +1 -1
- package/out/server/naslServer.js +38 -29
- package/out/server/naslServer.js.map +1 -1
- package/out/server/naslStdlibMap.d.ts.map +1 -1
- package/out/server/naslStdlibMap.js +61 -31
- package/out/server/naslStdlibMap.js.map +1 -1
- package/out/server/naslUiComponentTs.d.ts.map +1 -1
- package/out/server/naslUiComponentTs.js +18 -9
- package/out/server/naslUiComponentTs.js.map +1 -1
- package/out/service/autofix/rules/rule-convert-incompatible-assignment-to-union.d.ts.map +1 -1
- package/out/service/autofix/rules/rule-convert-incompatible-assignment-to-union.js +3 -3
- package/out/service/autofix/rules/rule-convert-incompatible-assignment-to-union.js.map +1 -1
- package/out/service/storage/init.d.ts.map +1 -1
- package/out/service/storage/init.js +2 -0
- package/out/service/storage/init.js.map +1 -1
- package/package.json +16 -10
package/out/server/naslServer.js
CHANGED
|
@@ -37,7 +37,7 @@ const config_1 = require("../config");
|
|
|
37
37
|
const Messager_1 = __importDefault(require("../common/Messager"));
|
|
38
38
|
const oql_cache_1 = require("./OQL/oql-cache");
|
|
39
39
|
const initial_1 = require("../service/initial");
|
|
40
|
-
const
|
|
40
|
+
const mnemonist_1 = require("mnemonist");
|
|
41
41
|
const sqlFunctions_json_1 = __importDefault(require("./OQL/sqlFunctions.json"));
|
|
42
42
|
const sqlCategory_json_1 = __importDefault(require("./OQL/sqlCategory.json"));
|
|
43
43
|
/// #if process.env.BUILD_TARGET === 'node'
|
|
@@ -643,34 +643,43 @@ class NaslServer {
|
|
|
643
643
|
}
|
|
644
644
|
// 根据特性开关控制是否创建TypeScript Worker
|
|
645
645
|
if (this.flags.tssEnabled) {
|
|
646
|
-
/// #if process.env.
|
|
647
|
-
if (
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
this.worker = new worker_threads_1.Worker(require.resolve('../../ts-worker/src/index.js'));
|
|
646
|
+
/// #if process.env.BUILD_TYPE === 'bundler'
|
|
647
|
+
if (process.env.BUILD_TYPE === 'bundler') {
|
|
648
|
+
this.worker = new worker_threads_1.Worker(path.join(__dirname, './ts-worker/bundle.electron.js'));
|
|
649
|
+
}
|
|
651
650
|
/// #endif
|
|
652
|
-
/// #if process.env.
|
|
653
|
-
if (
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
651
|
+
/// #if process.env.BUILD_TYPE !== 'bundler'
|
|
652
|
+
if (process.env.BUILD_TYPE !== 'bundler') {
|
|
653
|
+
/// #if process.env.BUILD_TARGET === 'node'
|
|
654
|
+
if (globalThis.process)
|
|
655
|
+
// For TS build
|
|
656
|
+
// this.worker = new Worker(require.resolve('@lcap/nasl-typescript-worker/src/index.js'));
|
|
657
|
+
this.worker = new worker_threads_1.Worker(require.resolve('../../ts-worker/src/index.js'));
|
|
658
|
+
/// #endif
|
|
659
|
+
/// #if process.env.BUILD_TARGET !== 'node'
|
|
660
|
+
if (globalThis.window) {
|
|
661
|
+
// const source = require('!!raw-loader!@lcap/nasl-typescript-worker/dist/index.js').default;
|
|
662
|
+
this.worker = await (async () => {
|
|
663
|
+
if (process.env.NODE_ENV === 'development') {
|
|
664
|
+
const source = require('!!raw-loader!../../ts-worker/bundle.js').default;
|
|
665
|
+
const url = URL.createObjectURL(new Blob([source]));
|
|
666
|
+
const worker = new window.Worker(url);
|
|
667
|
+
URL.revokeObjectURL(url);
|
|
668
|
+
return worker;
|
|
669
|
+
}
|
|
670
|
+
const instance = globalThis.window;
|
|
671
|
+
const baseIdePath = instance?.baseIdePath;
|
|
672
|
+
const hash = process.env.COMMIT_HASH || '';
|
|
673
|
+
const filename = instance?.electron?.createWorker
|
|
674
|
+
? 'tsserver.electron.js'
|
|
675
|
+
: 'tsserver.js';
|
|
676
|
+
// @ts-ignore
|
|
677
|
+
const link = `${baseIdePath}/js/${filename}?${hash}`;
|
|
678
|
+
const options = { name: 'typescript-server' };
|
|
679
|
+
return createWorker(link, options);
|
|
680
|
+
})();
|
|
681
|
+
}
|
|
682
|
+
/// #endif
|
|
674
683
|
}
|
|
675
684
|
/// #endif
|
|
676
685
|
}
|
|
@@ -3857,7 +3866,7 @@ class NaslServer {
|
|
|
3857
3866
|
const diagRecs = await (0, nasl_language_server_core_1.checkUpdateRefsDiag)({
|
|
3858
3867
|
env: this.semEnv,
|
|
3859
3868
|
diagMgr: this.diagnosticManager,
|
|
3860
|
-
chkFiles:
|
|
3869
|
+
chkFiles: mnemonist_1.set.union(this.typerCheckFiles, oqlCheckFiles, originLogicCheckFiles, exportInterfacesCheckFiles),
|
|
3861
3870
|
removeNodes: this.typerRemoveNodes,
|
|
3862
3871
|
createNodes: this.typerCreateNodes,
|
|
3863
3872
|
tsDiagnostics,
|