@lcap/nasl 3.13.1-debug.2 → 3.13.1-debug.4

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.
@@ -9,27 +9,29 @@ exports.default = async function start(webHost) {
9
9
 
10
10
  let stdlibMap = {};
11
11
 
12
- if (process.env.BUILD_TARGET === 'node') {
13
- if (globalThis.process) { // For TS build
14
- const fs = require('fs');
15
- stdlibMap = {
16
- 'lib.es5.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es5.d.ts'), 'utf8'),
17
- 'lib.es6.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es6.d.ts'), 'utf8'),
18
- 'lib.dom.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.dom.d.ts'), 'utf8'),
19
- 'lib.es2015.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.d.ts'), 'utf8'),
20
- 'lib.es2015.core.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.core.d.ts'), 'utf8'),
21
- 'lib.es2015.collection.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.collection.d.ts'), 'utf8'),
22
- 'lib.es2015.iterable.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.iterable.d.ts'), 'utf8'),
23
- 'lib.es2015.generator.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.generator.d.ts'), 'utf8'),
24
- 'lib.es2015.promise.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.promise.d.ts'), 'utf8'),
25
- 'lib.es2015.proxy.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.proxy.d.ts'), 'utf8'),
26
- 'lib.es2015.reflect.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.reflect.d.ts'), 'utf8'),
27
- 'lib.es2015.symbol.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.symbol.d.ts'), 'utf8'),
28
- 'lib.es2015.symbol.wellknown.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.symbol.wellknown.d.ts'), 'utf8'),
29
- 'typesMap.json': JSON.stringify(typesMap),
30
- };
31
- }
32
- } else if (process.env.BUILD_TARGET === 'node-worker') {
12
+ /// #if process.env.BUILD_TARGET === 'node'
13
+ if (globalThis.process) { // For TS build
14
+ const fs = require('fs');
15
+ stdlibMap = {
16
+ 'lib.es5.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es5.d.ts'), 'utf8'),
17
+ 'lib.es6.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es6.d.ts'), 'utf8'),
18
+ 'lib.dom.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.dom.d.ts'), 'utf8'),
19
+ 'lib.es2015.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.d.ts'), 'utf8'),
20
+ 'lib.es2015.core.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.core.d.ts'), 'utf8'),
21
+ 'lib.es2015.collection.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.collection.d.ts'), 'utf8'),
22
+ 'lib.es2015.iterable.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.iterable.d.ts'), 'utf8'),
23
+ 'lib.es2015.generator.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.generator.d.ts'), 'utf8'),
24
+ 'lib.es2015.promise.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.promise.d.ts'), 'utf8'),
25
+ 'lib.es2015.proxy.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.proxy.d.ts'), 'utf8'),
26
+ 'lib.es2015.reflect.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.reflect.d.ts'), 'utf8'),
27
+ 'lib.es2015.symbol.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.symbol.d.ts'), 'utf8'),
28
+ 'lib.es2015.symbol.wellknown.d.ts': fs.readFileSync(require.resolve('typescript/lib/lib.es2015.symbol.wellknown.d.ts'), 'utf8'),
29
+ 'typesMap.json': JSON.stringify(typesMap),
30
+ };
31
+ }
32
+ /// #endif
33
+ /// process.env.BUILD_TARGET !== 'node'
34
+ if (!globalThis.process) { // For TS build
33
35
  stdlibMap = {
34
36
  'lib.es5.d.ts': require('!!raw-loader!typescript/lib/lib.es5.d.ts').default,
35
37
  'lib.es6.d.ts': require('!!raw-loader!typescript/lib/lib.es6.d.ts').default,
@@ -46,26 +48,8 @@ exports.default = async function start(webHost) {
46
48
  'lib.es2015.symbol.wellknown.d.ts': require('!!raw-loader!typescript/lib/lib.es2015.symbol.wellknown.d.ts').default,
47
49
  'typesMap.json': JSON.stringify(typesMap),
48
50
  };
49
- } else {
50
- if (!globalThis.process) { // For TS build
51
- stdlibMap = {
52
- 'lib.es5.d.ts': require('!!raw-loader!typescript/lib/lib.es5.d.ts').default,
53
- 'lib.es6.d.ts': require('!!raw-loader!typescript/lib/lib.es6.d.ts').default,
54
- 'lib.dom.d.ts': require('!!raw-loader!typescript/lib/lib.dom.d.ts').default,
55
- 'lib.es2015.d.ts': require('!!raw-loader!typescript/lib/lib.es2015.d.ts').default,
56
- 'lib.es2015.core.d.ts': require('!!raw-loader!typescript/lib/lib.es2015.core.d.ts').default,
57
- 'lib.es2015.collection.d.ts': require('!!raw-loader!typescript/lib/lib.es2015.collection.d.ts').default,
58
- 'lib.es2015.iterable.d.ts': require('!!raw-loader!typescript/lib/lib.es2015.iterable.d.ts').default,
59
- 'lib.es2015.generator.d.ts': require('!!raw-loader!typescript/lib/lib.es2015.generator.d.ts').default,
60
- 'lib.es2015.promise.d.ts': require('!!raw-loader!typescript/lib/lib.es2015.promise.d.ts').default,
61
- 'lib.es2015.proxy.d.ts': require('!!raw-loader!typescript/lib/lib.es2015.proxy.d.ts').default,
62
- 'lib.es2015.reflect.d.ts': require('!!raw-loader!typescript/lib/lib.es2015.reflect.d.ts').default,
63
- 'lib.es2015.symbol.d.ts': require('!!raw-loader!typescript/lib/lib.es2015.symbol.d.ts').default,
64
- 'lib.es2015.symbol.wellknown.d.ts': require('!!raw-loader!typescript/lib/lib.es2015.symbol.wellknown.d.ts').default,
65
- 'typesMap.json': JSON.stringify(typesMap),
66
- };
67
- }
68
51
  }
52
+ /// #endif
69
53
 
70
54
  // 从内容中生成
71
55
  // 'nasl.ui.definition.ts': require('!!raw-loader!../../../file-storage/data/stdlib/nasl.ui.definition.ts').default,