@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
|
@@ -38,7 +38,7 @@ function genFilterTemplate(entity: Entity, nameGroup: NameGroup, selectNameGroup
|
|
|
38
38
|
.map((property) => {
|
|
39
39
|
const vModel = `${nameGroup.viewVariableFilter}.${property.name}`;
|
|
40
40
|
const label = property.label || property.name;
|
|
41
|
-
let formItem = `<u-form-item label="${label}">`;
|
|
41
|
+
let formItem = `<u-form-item><template #label><u-text text="${label}"></u-text></template>`;
|
|
42
42
|
|
|
43
43
|
const { typeAnnotation } = property || {};
|
|
44
44
|
const { typeName: propertyTypeName, typeNamespace: propertyTypeNamespace } = typeAnnotation || {};
|
|
@@ -65,8 +65,8 @@ function genFilterTemplate(entity: Entity, nameGroup: NameGroup, selectNameGroup
|
|
|
65
65
|
} else if (propertyTypeName === 'Boolean') {
|
|
66
66
|
formItem += `
|
|
67
67
|
<u-select clearable v-model="${vModel}" placeholder="请输入${label}">
|
|
68
|
-
<u-select-item :value="true" text="是"
|
|
69
|
-
<u-select-item :value="false" text="否"
|
|
68
|
+
<u-select-item :value="true" text="是"><u-text text="是"></u-text></u-select-item>
|
|
69
|
+
<u-select-item :value="false" text="否"><u-text text="否"></u-text></u-select-item>
|
|
70
70
|
</u-select>
|
|
71
71
|
`;
|
|
72
72
|
} else if (propertyTypeName === 'Integer' || propertyTypeName === 'Long') {
|
|
@@ -134,10 +134,9 @@ function genSaveModalTemplate(entity: Entity, nameGroup: NameGroup, selectNameGr
|
|
|
134
134
|
const rulesStr = rules.join(' | ');
|
|
135
135
|
|
|
136
136
|
let formItem = `<u-form-item
|
|
137
|
-
label="${label}"
|
|
138
137
|
${required ? 'required' : ''}
|
|
139
138
|
${rulesStr.length ? `rules="${rulesStr}"` : ''}
|
|
140
|
-
>`;
|
|
139
|
+
><template #label><u-text text="${label}"></u-text></template>`;
|
|
141
140
|
|
|
142
141
|
const { typeAnnotation } = property || {};
|
|
143
142
|
const { typeName: propertyTypeName, typeNamespace: propertyTypeNamespace } = typeAnnotation || {};
|
|
@@ -264,8 +263,6 @@ function genCreateLogic(nameGroup: NameGroup) {
|
|
|
264
263
|
});
|
|
265
264
|
}
|
|
266
265
|
|
|
267
|
-
|
|
268
|
-
|
|
269
266
|
export function genCurdEditMultipleKeyBlock(entity: Entity, oldNode: ViewElement) {
|
|
270
267
|
const view = oldNode.view;
|
|
271
268
|
const dataSource = entity.parentNode as DataSource;
|
|
@@ -28,7 +28,7 @@ function genFilterTemplate(entity: Entity, nameGroup: NameGroup, selectNameGroup
|
|
|
28
28
|
.map((property) => {
|
|
29
29
|
const vModel = `${nameGroup.viewVariableFilter}.${property.name}`;
|
|
30
30
|
const label = property.label || property.name;
|
|
31
|
-
let formItem = `<u-form-item label="${label}">`;
|
|
31
|
+
let formItem = `<u-form-item><template #label><u-text text="${label}"></u-text></template>`;
|
|
32
32
|
|
|
33
33
|
const { typeAnnotation } = property || {};
|
|
34
34
|
const {
|
|
@@ -126,7 +126,7 @@ function genSaveModalTemplate(entity: Entity, nameGroup: NameGroup, selectNameGr
|
|
|
126
126
|
if (required)
|
|
127
127
|
rules.push('required');
|
|
128
128
|
const rulesStr = rules.join(' | ');
|
|
129
|
-
let formItem = `<u-form-item
|
|
129
|
+
let formItem = `<u-form-item ${required ? 'required' : ''} ${rulesStr.length ? `rules="${rulesStr}"` : ''}><template #label><u-text text="${label}"></u-text></template>`;
|
|
130
130
|
|
|
131
131
|
const { typeAnnotation } = property || {};
|
|
132
132
|
const {
|
|
@@ -162,8 +162,8 @@ function genSaveModalTemplate(entity: Entity, nameGroup: NameGroup, selectNameGr
|
|
|
162
162
|
} else if (propertyTypeName === 'Boolean') {
|
|
163
163
|
formItem += `
|
|
164
164
|
<u-select clearable v-model="${vModel}" placeholder="请输入${label}" ${property.primaryKey ? `:disabled="${nameGroup.viewVariableIsUpdate}"` : ''}>
|
|
165
|
-
<u-select-item :value="true" text="是"
|
|
166
|
-
<u-select-item :value="false" text="否"
|
|
165
|
+
<u-select-item :value="true" text="是"><u-text text="是"></u-text></u-select-item>
|
|
166
|
+
<u-select-item :value="false" text="否"><u-text text="否"></u-text></u-select-item>
|
|
167
167
|
</u-select>`;
|
|
168
168
|
} else if (propertyTypeName === 'Integer' || propertyTypeName === 'Long') {
|
|
169
169
|
formItem += `<u-number-input v-model="${vModel}" placeholder="请输入${label}" ${property.primaryKey ? `:disabled="${nameGroup.viewVariableIsUpdate}"` : ''}></u-number-input>`;
|
|
@@ -98,7 +98,8 @@ export function genEditTableColumnTemplate(entity: Entity, property: EntityPrope
|
|
|
98
98
|
</template>`;
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
return `<u-table-view-column
|
|
101
|
+
return `<u-table-view-column field="${utils.firstLowerCase(entity.name)}.${property.name}" ${canEditable(property) ? 'type="editable"' : ''}>
|
|
102
|
+
<template #title><u-text text="${title}"></u-text></template>
|
|
102
103
|
<template #cell="scope">
|
|
103
104
|
<u-linear-layout gap="small">
|
|
104
105
|
${getText(property)}
|
|
@@ -119,11 +120,12 @@ export function genEditTableTemplate(entity: Entity, nameGroup: NameGroup, selec
|
|
|
119
120
|
return `<u-table-view ref="${nameGroup.viewElementMainView}" :data-source="${nameGroup.viewLogicLoad}" data-schema="${nameGroup.structure}"
|
|
120
121
|
value-field="${nameGroup.viewVariableEntity}.id"
|
|
121
122
|
:pageable="true" :remote-paging="true" :show-sizer="true" :default-column-width="300" editable>
|
|
122
|
-
<u-table-view-column type="index" width="60" title="序号"></u-table-view-column>
|
|
123
|
+
<u-table-view-column type="index" width="60"><template #title><u-text text="序号"></u-text></template></u-table-view-column>
|
|
123
124
|
|
|
124
125
|
${properties.map((property) => genEditTableColumnTemplate(entity, property, nameGroup, selectNameGroupMap) + '\n').join('')}
|
|
125
126
|
|
|
126
|
-
<u-table-view-column
|
|
127
|
+
<u-table-view-column>
|
|
128
|
+
<template #title><u-text text="操作"></u-text></template>
|
|
127
129
|
<template #cell="scope">
|
|
128
130
|
<u-linear-layout gap="small">
|
|
129
131
|
<u-link @click="${nameGroup.viewLogicRemove}">删除</u-link>
|
|
@@ -8,10 +8,11 @@ export function genGetTemplate(entity: Entity, nameGroup: NameGroup) {
|
|
|
8
8
|
const properties = entity.properties.filter(filterProperty('inDetail'));
|
|
9
9
|
|
|
10
10
|
return `<u-info-list>
|
|
11
|
-
<u-info-list-group
|
|
11
|
+
<u-info-list-group>
|
|
12
|
+
<template #title><u-text text="基本信息"></u-text></template>
|
|
12
13
|
${properties
|
|
13
14
|
.map((property) => {
|
|
14
|
-
let formItem = ` <u-info-list-item label="${property.label || property.name}">`;
|
|
15
|
+
let formItem = ` <u-info-list-item><template #label><u-text text="${property.label || property.name}"></u-text></template>`;
|
|
15
16
|
|
|
16
17
|
formItem += '<u-text :text="' + getExpression(property, `${nameGroup.viewVariableEntity}.${property.name}`) + '"></u-text>';
|
|
17
18
|
|
|
@@ -48,7 +48,8 @@ export function genTableColumnTemplate(property: EntityProperty, scope?: string)
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
return `<u-table-view-column
|
|
51
|
+
return `<u-table-view-column field="${lowerEntityName}.${property.name}">
|
|
52
|
+
<template #title><u-text text="${title}"></u-text></template>
|
|
52
53
|
<template #cell="${scopeName}">
|
|
53
54
|
<u-linear-layout gap="small">
|
|
54
55
|
${getText(property)}
|
|
@@ -69,11 +70,12 @@ export function genTableTemplate(entity: Entity, nameGroup: NameGroup, modifyabl
|
|
|
69
70
|
return `<u-table-view ref="${nameGroup.viewElementMainView}" :data-source="${nameGroup.viewLogicLoad}" data-schema="${nameGroup.structure}"
|
|
70
71
|
value-field="${nameGroup.viewVariableEntity}.id"
|
|
71
72
|
:pageable="true" :remote-paging="true" :show-sizer="true">
|
|
72
|
-
<u-table-view-column type="index" width="60" title="序号"></u-table-view-column>
|
|
73
|
+
<u-table-view-column type="index" width="60"><template #title><u-text text="序号"></u-text></template></u-table-view-column>
|
|
73
74
|
|
|
74
75
|
${properties.map((property) => genTableColumnTemplate(property, scopeName) + '\n').join('')}
|
|
75
76
|
|
|
76
77
|
<u-table-view-column title="操作">
|
|
78
|
+
<template #title><u-text text="操作"></u-text></template>
|
|
77
79
|
<template #cell="${scopeName}">
|
|
78
80
|
<u-linear-layout gap="small">
|
|
79
81
|
<u-link ${modifyable ? `@click="${nameGroup.viewLogicModify || 'modify'}"` : ''}>修改</u-link>
|
|
@@ -34,7 +34,7 @@ export function genUpdateFormTemplate(entity: Entity, nameGroup: NameGroup, sele
|
|
|
34
34
|
rules.push('required');
|
|
35
35
|
const rulesStr = rules.join(' | ');
|
|
36
36
|
|
|
37
|
-
let formItem = ` <u-form-item
|
|
37
|
+
let formItem = ` <u-form-item ${required ? ' required' : ''}${rulesStr.length ? ` rules="${rulesStr}"` : ''}><template #label><u-text text="${label}"></u-text></template>\n`;
|
|
38
38
|
|
|
39
39
|
const { typeAnnotation } = property || {};
|
|
40
40
|
const { typeName: propertyTypeName, typeNamespace: propertyTypeNamespace } = typeAnnotation || {};
|