@lcap/nasl 2.14.0 → 2.15.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/out/automate/engine/index.js +2 -2
- package/out/automate/engine/index.js.map +1 -1
- package/out/automate/engine/viewCache.js +5 -5
- package/out/automate/engine/viewCache.js.map +1 -1
- package/out/common/BaseNode.js +3 -1
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/AnonymousFunction__.d.ts +170 -0
- package/out/concepts/AnonymousFunction__.js +439 -0
- package/out/concepts/AnonymousFunction__.js.map +1 -0
- package/out/concepts/App__.js +7 -1
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Assignee__.js +1 -1
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.d.ts +40 -0
- package/out/concepts/AssignmentLine__.js +109 -0
- package/out/concepts/AssignmentLine__.js.map +1 -0
- package/out/concepts/BatchAssignment__.d.ts +248 -0
- package/out/concepts/BatchAssignment__.js +742 -0
- package/out/concepts/BatchAssignment__.js.map +1 -0
- package/out/concepts/BindAttribute__.js +2 -0
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindEvent__.js +9 -4
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.d.ts +126 -0
- package/out/concepts/BindStyle__.js +233 -0
- package/out/concepts/BindStyle__.js.map +1 -0
- package/out/concepts/CallLogic__.js +3 -4
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +1 -1
- package/out/concepts/ConstructArgument__.d.ts +40 -0
- package/out/concepts/ConstructArgument__.js +108 -0
- package/out/concepts/ConstructArgument__.js.map +1 -0
- package/out/concepts/Construct__.d.ts +189 -0
- package/out/concepts/Construct__.js +340 -0
- package/out/concepts/Construct__.js.map +1 -0
- package/out/concepts/EnumItem__.js +1 -1
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Interface__.d.ts +1 -0
- package/out/concepts/Interface__.js +58 -0
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/Logic__.js +3 -3
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.d.ts +256 -0
- package/out/concepts/MatchCase__.js +584 -0
- package/out/concepts/MatchCase__.js.map +1 -0
- package/out/concepts/Match__.d.ts +117 -0
- package/out/concepts/Match__.js +434 -0
- package/out/concepts/Match__.js.map +1 -0
- package/out/concepts/OqlQueryComponent__.d.ts +73 -0
- package/out/concepts/OqlQueryComponent__.js +395 -0
- package/out/concepts/OqlQueryComponent__.js.map +1 -0
- package/out/concepts/ProcessElement__.d.ts +2 -2
- package/out/concepts/ProcessElement__.js +30 -21
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/Process__.d.ts +81 -0
- package/out/concepts/Process__.js +98 -2
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/SelectMembers__.d.ts +141 -0
- package/out/concepts/SelectMembers__.js +290 -0
- package/out/concepts/SelectMembers__.js.map +1 -0
- package/out/concepts/SqlQueryComponent__.d.ts +4 -0
- package/out/concepts/SqlQueryComponent__.js +144 -2
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Variable__.js +0 -1
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewElement__.js +10 -1
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.js +4 -1
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/basics/stdlib/index.js +2 -1
- package/out/concepts/basics/stdlib/index.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.auth.js +26 -0
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.process.js +98 -0
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.ui.js +54 -0
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.js +2 -2
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.validation.js +4 -0
- package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -1
- package/out/enums/KEYWORDS.js +1 -0
- package/out/enums/KEYWORDS.js.map +1 -1
- package/out/generator/genBundleFiles.d.ts +1 -0
- package/out/generator/genBundleFiles.js +2 -0
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/server/extendBaseNode.js +32 -4
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/getLogics.js +42 -14
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getProcesses.d.ts +2 -2
- package/out/server/getProcesses.js +47 -21
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/naslServer.js +46 -19
- package/out/server/naslServer.js.map +1 -1
- package/out/server/naslStdlibMap.js +1 -0
- package/out/server/naslStdlibMap.js.map +1 -1
- package/out/server/process2LogicNamespace.js +25 -21
- package/out/server/process2LogicNamespace.js.map +1 -1
- package/out/server/translator.js +35 -8
- package/out/server/translator.js.map +1 -1
- package/out/service/logic/api.d.ts +9 -0
- package/out/service/logic/api.js +11 -0
- package/out/service/logic/api.js.map +1 -0
- package/out/service/logic/index.d.ts +2 -0
- package/out/service/logic/index.js +10 -0
- package/out/service/logic/index.js.map +1 -0
- package/out/service/storage/init.js +18 -6
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +1 -1
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +4 -5
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +4 -4
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +5 -3
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genGetBlock.js +3 -2
- package/out/templator/genGetBlock.js.map +1 -1
- package/out/templator/genTableBlock.js +4 -2
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +1 -1
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/templator/sql-parser/index.d.ts +1 -0
- package/out/templator/sql-parser/index.js +228 -0
- package/out/templator/sql-parser/index.js.map +1 -0
- package/out/templator/sql-parser/parser.js +26664 -0
- package/out/templator/sql-parser/parser.js.map +1 -0
- package/package.json +1 -1
- package/src/automate/engine/index.js +1 -1
- package/src/automate/engine/viewCache.js +23 -23
- package/src/automate/template/myProcess.js +12295 -0
- package/src/common/BaseNode.ts +5 -1
- package/src/concepts/App__.ts +8 -1
- package/src/concepts/Assignee__.ts +1 -1
- package/src/concepts/BindAttribute__.ts +3 -1
- package/src/concepts/BindEvent__.ts +8 -4
- package/src/concepts/CallLogic__.ts +3 -4
- package/src/concepts/EnumItem__.ts +1 -1
- package/src/concepts/Interface__.ts +66 -7
- package/src/concepts/Logic__.ts +3 -3
- package/src/concepts/ProcessElement__.ts +34 -24
- package/src/concepts/Process__.ts +98 -2
- package/src/concepts/SqlQueryComponent__.ts +143 -2
- package/src/concepts/Variable__.ts +0 -1
- package/src/concepts/ViewElement__.ts +12 -20
- package/src/concepts/View__.ts +4 -1
- package/src/concepts/basics/stdlib/index.ts +2 -1
- package/src/concepts/basics/stdlib/nasl.auth.ts +25 -0
- package/src/concepts/basics/stdlib/nasl.io.ts +48 -0
- package/src/concepts/basics/stdlib/nasl.process.ts +98 -0
- package/src/concepts/basics/stdlib/nasl.ui.ts +54 -0
- package/src/concepts/basics/stdlib/nasl.util.ts +2 -2
- package/src/concepts/basics/stdlib/nasl.validation.ts +4 -0
- package/src/enums/KEYWORDS.ts +1 -0
- package/src/generator/genBundleFiles.ts +3 -0
- package/src/server/extendBaseNode.ts +31 -4
- package/src/server/getLogics.ts +43 -14
- package/src/server/getProcesses.ts +47 -21
- package/src/server/naslServer.ts +44 -21
- package/src/server/naslStdlibMap.ts +1 -0
- package/src/server/process2LogicNamespace.ts +27 -21
- package/src/server/translator.ts +35 -8
- package/src/service/storage/init.ts +18 -6
- package/src/templator/genCreateBlock.ts +1 -1
- package/src/templator/genCurdEditMultipleKeyBlock.ts +4 -7
- package/src/templator/genCurdMultipleKeyBlock.ts +4 -4
- package/src/templator/genEditTableBlock.ts +5 -3
- package/src/templator/genGetBlock.ts +3 -2
- package/src/templator/genTableBlock.ts +4 -2
- package/src/templator/genUpdateBlock.ts +1 -1
- package/src/automate/template/process.js +0 -11810
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import { getConceptConstructor, getConceptMeta } from '../../decorators/index';
|
|
|
5
5
|
// import { unique, firstUpperCase } from '../../utils/string';
|
|
6
6
|
import { uniqueName, componentUniqueName } from './uniqueName';
|
|
7
7
|
import { ops as operatorModule, ComponentOps } from './operators';
|
|
8
|
-
import { processComponent } from '../template/
|
|
8
|
+
import { processComponent } from '../template/myProcess';
|
|
9
9
|
|
|
10
10
|
let id = 0;
|
|
11
11
|
class TemplateMeta {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BindEvent } from '../../concepts';
|
|
2
2
|
import { components, commonEvents } from './2.14-components';
|
|
3
3
|
function iterateUp(node, callback) {
|
|
4
|
-
while(node) {
|
|
4
|
+
while (node) {
|
|
5
5
|
callback(node);
|
|
6
6
|
node = node.parentNode;
|
|
7
7
|
}
|
|
@@ -14,12 +14,12 @@ export function resetViewCache() {
|
|
|
14
14
|
views = [];
|
|
15
15
|
}
|
|
16
16
|
export function resolveViewCache() {
|
|
17
|
-
views.forEach(v => {
|
|
17
|
+
views.forEach((v) => {
|
|
18
18
|
if (v.slotScope) {
|
|
19
|
-
if (v.slotTarget !== 'cell'
|
|
20
|
-
&& v.slotTarget !== 'item'
|
|
19
|
+
if (v.slotTarget !== 'cell'
|
|
20
|
+
&& v.slotTarget !== 'item'
|
|
21
21
|
&& v.slotTarget !== 'default'
|
|
22
|
-
&& v.slotTarget !== 'expand-content'
|
|
22
|
+
&& v.slotTarget !== 'expand-content'
|
|
23
23
|
&& v.slotTarget !== 'editcell')
|
|
24
24
|
v.slotScope = undefined;
|
|
25
25
|
}
|
|
@@ -32,28 +32,28 @@ export function resolveViewCache() {
|
|
|
32
32
|
calleeName: undefined,
|
|
33
33
|
arguments: [],
|
|
34
34
|
logics: [],
|
|
35
|
-
})
|
|
35
|
+
});
|
|
36
36
|
}
|
|
37
|
-
const _curView = v.concept === 'View' ? v : v.view;
|
|
38
|
-
|
|
37
|
+
const _curView = v.concept === 'View' ? v : v.view;
|
|
38
|
+
|
|
39
39
|
bindEvents.forEach((be) => {
|
|
40
|
-
if(!eventMap[be.name]){
|
|
40
|
+
if (!eventMap[be.name]) {
|
|
41
41
|
const t = genBindEvent(be.name);
|
|
42
42
|
t.parentNode = v;
|
|
43
|
-
t.parentKey = 'bindEvents'
|
|
43
|
+
t.parentKey = 'bindEvents';
|
|
44
44
|
eventMap[be.name] = t;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
const bindEventTrunk = eventMap[be.name];
|
|
48
48
|
|
|
49
49
|
if (be.calleeName) {
|
|
50
|
-
|
|
50
|
+
const argStrs = [];
|
|
51
51
|
let args = [];
|
|
52
52
|
iterateUp(be, (item) => {
|
|
53
|
-
if(item.tag === 'template' && item.slotScope === 'scope') {
|
|
54
|
-
argStrs.push(`scope${argStrs.length > 0 ? argStrs.length - 1 : ''}`)
|
|
53
|
+
if (item.tag === 'template' && item.slotScope === 'scope') {
|
|
54
|
+
argStrs.push(`scope${argStrs.length > 0 ? argStrs.length - 1 : ''}`);
|
|
55
55
|
}
|
|
56
|
-
})
|
|
56
|
+
});
|
|
57
57
|
argStrs.unshift('event');
|
|
58
58
|
args = argStrs.map((name) => ({
|
|
59
59
|
concept: 'Argument',
|
|
@@ -68,8 +68,8 @@ export function resolveViewCache() {
|
|
|
68
68
|
const logic = _curView.logics.find((logic) => logic.name === be.calleeName);
|
|
69
69
|
if (logic) {
|
|
70
70
|
args = args.slice(0, logic.params.length);
|
|
71
|
-
if (args.length < logic.params.length
|
|
72
|
-
&& logic.params.length === 2
|
|
71
|
+
if (args.length < logic.params.length
|
|
72
|
+
&& logic.params.length === 2
|
|
73
73
|
&& logic.params[1].name === 'scope') {
|
|
74
74
|
logic.params.splice(1, 1);
|
|
75
75
|
}
|
|
@@ -104,7 +104,7 @@ export function resolveViewCache() {
|
|
|
104
104
|
{
|
|
105
105
|
concept: 'Start',
|
|
106
106
|
label: '开始',
|
|
107
|
-
folded: false
|
|
107
|
+
folded: false,
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
concept: 'CallLogic',
|
|
@@ -117,8 +117,8 @@ export function resolveViewCache() {
|
|
|
117
117
|
{
|
|
118
118
|
concept: 'End',
|
|
119
119
|
label: '结束',
|
|
120
|
-
folded: false
|
|
121
|
-
}
|
|
120
|
+
folded: false,
|
|
121
|
+
},
|
|
122
122
|
],
|
|
123
123
|
playground: [],
|
|
124
124
|
});
|
|
@@ -126,8 +126,8 @@ export function resolveViewCache() {
|
|
|
126
126
|
});
|
|
127
127
|
Object.keys(eventMap).forEach((k) => {
|
|
128
128
|
v.bindEvents.push(eventMap[k]);
|
|
129
|
-
})
|
|
130
|
-
})
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
export function getViewCache() {
|
|
@@ -135,5 +135,5 @@ export function getViewCache() {
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
export function getViews() {
|
|
138
|
-
return views
|
|
139
|
-
}
|
|
138
|
+
return views;
|
|
139
|
+
}
|