@lcap/nasl 1.0.0 → 1.0.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 +28 -127
- package/out/automate/engine/index.js.map +1 -1
- package/out/automate/engine/operators.d.ts +13 -0
- package/out/automate/engine/operators.js +63 -0
- package/out/automate/engine/operators.js.map +1 -0
- package/out/automate/engine/uniqueName.d.ts +6 -0
- package/out/automate/engine/uniqueName.js +39 -0
- package/out/automate/engine/uniqueName.js.map +1 -0
- package/out/concepts/App__.js +9 -9
- 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/BindAttribute__.js +1 -1
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.js +1 -1
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/CallFunction__.js +16 -0
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallLogic__.js +3 -3
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.js +1 -1
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/ConfigGroup__.js +1 -1
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigProperty__.js +1 -1
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.js +1 -1
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Destination__.js +5 -2
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +0 -3
- package/out/concepts/Entity__.js +2 -14
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/Event__.js +1 -1
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ForEachStatement__.d.ts +1 -1
- package/out/concepts/ForEachStatement__.js +2 -2
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/Function__.js +4 -4
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Interface__.js +2 -2
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +4 -0
- package/out/concepts/Logic__.js +18 -4
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +0 -1
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/Module__.js +8 -8
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/Namespace__.js +12 -12
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js +2 -2
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +5 -5
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/Process__.js +4 -4
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.js +1 -1
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.js +1 -1
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js +1 -1
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Structure__.js +2 -2
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.js +1 -1
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/ViewComponent__.js +5 -5
- package/out/concepts/ViewComponent__.js.map +1 -1
- package/out/concepts/ViewElement__.js +3 -3
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +2 -0
- package/out/concepts/View__.js +13 -5
- package/out/concepts/View__.js.map +1 -1
- package/out/enums/KEYWORDS.js +0 -2
- package/out/enums/KEYWORDS.js.map +1 -1
- package/out/server/getScope.d.ts +2 -1
- package/out/server/getScope.js +26 -14
- package/out/server/getScope.js.map +1 -1
- package/out/server/naslServer.js +39 -18
- package/out/server/naslServer.js.map +1 -1
- package/out/service/storage/init.js +13 -0
- package/out/service/storage/init.js.map +1 -1
- package/out/test/integration/connect-file copy.d.ts +1 -0
- package/out/test/integration/connect-file copy.js +50 -0
- package/out/test/integration/connect-file copy.js.map +1 -0
- package/out/test/integration/node-nasl-server.d.ts +1 -0
- package/out/test/integration/node-nasl-server.js +41 -0
- package/out/test/integration/node-nasl-server.js.map +1 -0
- package/out/utils/index.js +6 -1
- package/out/utils/index.js.map +1 -1
- package/out/utils/string.d.ts +1 -1
- package/out/utils/string.js +38 -9
- package/out/utils/string.js.map +1 -1
- package/package.json +1 -1
- package/src/automate/engine/index.js +26 -127
- package/src/automate/engine/operators.js +63 -0
- package/src/automate/engine/uniqueName.js +36 -0
- package/src/concepts/App__.ts +9 -9
- package/src/concepts/Assignee__.ts +1 -1
- package/src/concepts/BindAttribute__.ts +1 -1
- package/src/concepts/BindDirective__.ts +1 -1
- package/src/concepts/CallFunction__.ts +16 -0
- package/src/concepts/CallLogic__.ts +34 -3
- package/src/concepts/CallQueryComponent__.ts +1 -1
- package/src/concepts/ConfigGroup__.ts +1 -1
- package/src/concepts/ConfigProperty__.ts +1 -1
- package/src/concepts/Configuration__.ts +1 -1
- package/src/concepts/Destination__.ts +7 -3
- package/src/concepts/Entity__.ts +2 -14
- package/src/concepts/Event__.ts +1 -1
- package/src/concepts/ForEachStatement__.ts +2 -2
- package/src/concepts/Function__.ts +4 -4
- package/src/concepts/Interface__.ts +2 -2
- package/src/concepts/Logic__.ts +19 -4
- package/src/concepts/MemberExpression__.ts +0 -1
- package/src/concepts/Module__.ts +8 -8
- package/src/concepts/Namespace__.ts +12 -12
- package/src/concepts/ProcessComponent__.ts +2 -2
- package/src/concepts/ProcessElement__.ts +5 -5
- package/src/concepts/Process__.ts +4 -4
- package/src/concepts/QueryJoinExpression__.ts +1 -1
- package/src/concepts/QueryLimitExpression__.ts +10 -1
- package/src/concepts/QuerySelectExpression__.ts +1 -1
- package/src/concepts/Structure__.ts +2 -2
- package/src/concepts/TypeAnnotation__.ts +1 -1
- package/src/concepts/ViewComponent__.ts +5 -5
- package/src/concepts/ViewElement__.ts +3 -3
- package/src/concepts/View__.ts +13 -5
- package/src/enums/KEYWORDS.ts +0 -2
- package/src/server/getScope.ts +36 -24
- package/src/server/naslServer.ts +37 -18
- package/src/service/storage/init.ts +13 -0
- package/src/utils/index.ts +6 -1
- package/src/utils/string.ts +39 -9
|
@@ -263,7 +263,11 @@ export class Destination extends LogicItem {
|
|
|
263
263
|
return '';
|
|
264
264
|
}
|
|
265
265
|
genViewArr() {
|
|
266
|
-
const viewArr
|
|
266
|
+
const viewArr
|
|
267
|
+
= this.viewNamespace
|
|
268
|
+
?.split('.')
|
|
269
|
+
.splice(1)
|
|
270
|
+
.filter((item, index) => index % 2 === 1) || [];
|
|
267
271
|
if (this.viewName) {
|
|
268
272
|
viewArr.push(this.viewName);
|
|
269
273
|
}
|
|
@@ -277,7 +281,7 @@ export class Destination extends LogicItem {
|
|
|
277
281
|
url += ':destination="`';
|
|
278
282
|
url += `/${viewArr.join('/')}`;
|
|
279
283
|
if (Array.isArray(this.arguments) && this.arguments.length) {
|
|
280
|
-
const args = this.arguments?.map((arg) => `${arg?.keyword}=` + '${' +
|
|
284
|
+
const args = this.arguments?.map((arg) => `${arg?.keyword}=` + `${arg?.toVue(options) === '' ? '' : '${' + arg?.toVue(options) + '}'}`);
|
|
281
285
|
url += `?${args.join('&')}`;
|
|
282
286
|
}
|
|
283
287
|
url += '`"';
|
|
@@ -364,7 +368,7 @@ export class Destination extends LogicItem {
|
|
|
364
368
|
/**
|
|
365
369
|
* 设置Arguments的KeyWord
|
|
366
370
|
*/
|
|
367
|
-
setArgumentsKeyWord(options: {findArgument: Argument
|
|
371
|
+
setArgumentsKeyWord(options: { findArgument: Argument; newKeyword: string }) {
|
|
368
372
|
const { findArgument, newKeyword } = options;
|
|
369
373
|
findArgument.setKeyword(newKeyword);
|
|
370
374
|
}
|
package/src/concepts/Entity__.ts
CHANGED
|
@@ -107,18 +107,6 @@ export class Entity extends BaseNode {
|
|
|
107
107
|
}
|
|
108
108
|
return params;
|
|
109
109
|
}
|
|
110
|
-
/**
|
|
111
|
-
* 设置实体名称
|
|
112
|
-
*/
|
|
113
|
-
// setName(name: string) {
|
|
114
|
-
// const object = {
|
|
115
|
-
// name,
|
|
116
|
-
// };
|
|
117
|
-
// this.update({
|
|
118
|
-
// ...object,
|
|
119
|
-
// field: 'name',
|
|
120
|
-
// });
|
|
121
|
-
// }
|
|
122
110
|
|
|
123
111
|
/**
|
|
124
112
|
* 设置实体描述
|
|
@@ -137,7 +125,7 @@ export class Entity extends BaseNode {
|
|
|
137
125
|
return (this.properties || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
138
126
|
}
|
|
139
127
|
getPropertyUniqueName(name = 'property1') {
|
|
140
|
-
return utils.unique(name, this.getPropertyExistingNames());
|
|
128
|
+
return utils.unique(name, this.getPropertyExistingNames(), undefined, false);
|
|
141
129
|
}
|
|
142
130
|
|
|
143
131
|
/**
|
|
@@ -278,7 +266,7 @@ export class Entity extends BaseNode {
|
|
|
278
266
|
return (this.indexes || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
279
267
|
}
|
|
280
268
|
getEntityIndexUniqueName(name = 'entityIndex1') {
|
|
281
|
-
return utils.unique(name, this.getEntityIndexExistingNames());
|
|
269
|
+
return utils.unique(name, this.getEntityIndexExistingNames(), undefined, false);
|
|
282
270
|
}
|
|
283
271
|
|
|
284
272
|
/**
|
package/src/concepts/Event__.ts
CHANGED
|
@@ -111,7 +111,7 @@ export class Event extends BaseNode {
|
|
|
111
111
|
return (this.params || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
112
112
|
}
|
|
113
113
|
getParamUniqueName(name = 'param1') {
|
|
114
|
-
return utils.unique(name, this.getParamExistingNames());
|
|
114
|
+
return utils.unique(name, this.getParamExistingNames(), undefined, false);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
/**
|
|
@@ -131,7 +131,7 @@ export class Function extends BaseNode {
|
|
|
131
131
|
return (this.typeParams || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
132
132
|
}
|
|
133
133
|
getTypeParamUniqueName(name = 'typeParam1') {
|
|
134
|
-
return utils.unique(name, this.getTypeParamExistingNames());
|
|
134
|
+
return utils.unique(name, this.getTypeParamExistingNames(), undefined, false);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
/**
|
|
@@ -269,7 +269,7 @@ export class Function extends BaseNode {
|
|
|
269
269
|
|
|
270
270
|
|
|
271
271
|
getParamUniqueName(name = 'param1') {
|
|
272
|
-
return utils.unique(name, this.getVarExistingNames());
|
|
272
|
+
return utils.unique(name, this.getVarExistingNames(), undefined, false);
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
/**
|
|
@@ -407,7 +407,7 @@ export class Function extends BaseNode {
|
|
|
407
407
|
|
|
408
408
|
|
|
409
409
|
getReturnUniqueName(name = 'result') {
|
|
410
|
-
return utils.unique(name, this.getVarExistingNames());
|
|
410
|
+
return utils.unique(name, this.getVarExistingNames(), undefined, false);
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
/**
|
|
@@ -545,7 +545,7 @@ export class Function extends BaseNode {
|
|
|
545
545
|
|
|
546
546
|
|
|
547
547
|
getVariableUniqueName(name = 'variable1') {
|
|
548
|
-
return utils.unique(name, this.getVarExistingNames());
|
|
548
|
+
return utils.unique(name, this.getVarExistingNames(), undefined, false);
|
|
549
549
|
}
|
|
550
550
|
|
|
551
551
|
/**
|
|
@@ -132,7 +132,7 @@ export class Interface extends BaseNode {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
getInterfaceParamUniqueName(name = 'interfaceParam1') {
|
|
135
|
-
return utils.unique(name, this.getVarExistingNames());
|
|
135
|
+
return utils.unique(name, this.getVarExistingNames(), undefined, false);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/**
|
|
@@ -270,7 +270,7 @@ export class Interface extends BaseNode {
|
|
|
270
270
|
|
|
271
271
|
|
|
272
272
|
getReturnUniqueName(name = 'result') {
|
|
273
|
-
return utils.unique(name, this.getVarExistingNames());
|
|
273
|
+
return utils.unique(name, this.getVarExistingNames(), undefined, false);
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
/**
|
package/src/concepts/Logic__.ts
CHANGED
|
@@ -232,7 +232,7 @@ export class Logic extends BaseNode {
|
|
|
232
232
|
return (this.typeParams || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
233
233
|
}
|
|
234
234
|
getTypeParamUniqueName(name = 'typeParam1') {
|
|
235
|
-
return utils.unique(name, this.getTypeParamExistingNames());
|
|
235
|
+
return utils.unique(name, this.getTypeParamExistingNames(), undefined, false);
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
/**
|
|
@@ -370,7 +370,7 @@ export class Logic extends BaseNode {
|
|
|
370
370
|
|
|
371
371
|
|
|
372
372
|
getParamUniqueName(name = 'param1') {
|
|
373
|
-
return utils.unique(name, this.getVarExistingNames());
|
|
373
|
+
return utils.unique(name, this.getVarExistingNames(), undefined, false);
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
/**
|
|
@@ -508,7 +508,7 @@ export class Logic extends BaseNode {
|
|
|
508
508
|
|
|
509
509
|
|
|
510
510
|
getReturnUniqueName(name = 'result') {
|
|
511
|
-
return utils.unique(name, this.getVarExistingNames());
|
|
511
|
+
return utils.unique(name, this.getVarExistingNames(), undefined, false);
|
|
512
512
|
}
|
|
513
513
|
|
|
514
514
|
/**
|
|
@@ -646,7 +646,7 @@ export class Logic extends BaseNode {
|
|
|
646
646
|
|
|
647
647
|
|
|
648
648
|
getVariableUniqueName(name = 'variable1') {
|
|
649
|
-
return utils.unique(name, this.getVarExistingNames());
|
|
649
|
+
return utils.unique(name, this.getVarExistingNames(), undefined, false);
|
|
650
650
|
}
|
|
651
651
|
|
|
652
652
|
/**
|
|
@@ -1311,6 +1311,21 @@ export class Logic extends BaseNode {
|
|
|
1311
1311
|
...object,
|
|
1312
1312
|
});
|
|
1313
1313
|
}
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* 创建的时候 打开事务 通过开关设置数据库事务
|
|
1317
|
+
*/
|
|
1318
|
+
openTransactional(flag: boolean) {
|
|
1319
|
+
if (flag) {
|
|
1320
|
+
const transactional = new Transactional({
|
|
1321
|
+
enabled: flag,
|
|
1322
|
+
});
|
|
1323
|
+
transactional._delete();
|
|
1324
|
+
const relationOptions = { parentNode: this, parentKey: 'transactional' };
|
|
1325
|
+
Object.assign(transactional, relationOptions);
|
|
1326
|
+
this.transactional = transactional;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1314
1329
|
findLogicItemByConcept(concept: string) {
|
|
1315
1330
|
let result: any;
|
|
1316
1331
|
|
package/src/concepts/Module__.ts
CHANGED
|
@@ -159,7 +159,7 @@ export class Module extends BaseNode {
|
|
|
159
159
|
return (this.entities || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
160
160
|
}
|
|
161
161
|
getEntityUniqueName(name = 'Entity1') {
|
|
162
|
-
return utils.unique(name, this.getEntityExistingNames());
|
|
162
|
+
return utils.unique(name, this.getEntityExistingNames(), undefined, false);
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
/**
|
|
@@ -301,7 +301,7 @@ export class Module extends BaseNode {
|
|
|
301
301
|
return (this.structures || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
302
302
|
}
|
|
303
303
|
getStructureUniqueName(name = 'Structure1') {
|
|
304
|
-
return utils.unique(name, this.getStructureExistingNames());
|
|
304
|
+
return utils.unique(name, this.getStructureExistingNames(), undefined, false);
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
/**
|
|
@@ -443,7 +443,7 @@ export class Module extends BaseNode {
|
|
|
443
443
|
return (this.enums || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
444
444
|
}
|
|
445
445
|
getEnumUniqueName(name = 'Enum1') {
|
|
446
|
-
return utils.unique(name, this.getEnumExistingNames());
|
|
446
|
+
return utils.unique(name, this.getEnumExistingNames(), undefined, false);
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
/**
|
|
@@ -585,7 +585,7 @@ export class Module extends BaseNode {
|
|
|
585
585
|
return (this.logics || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
586
586
|
}
|
|
587
587
|
getLogicUniqueName(name = 'logic1') {
|
|
588
|
-
return utils.unique(name, this.getLogicExistingNames());
|
|
588
|
+
return utils.unique(name, this.getLogicExistingNames(), undefined, false);
|
|
589
589
|
}
|
|
590
590
|
|
|
591
591
|
/**
|
|
@@ -727,7 +727,7 @@ export class Module extends BaseNode {
|
|
|
727
727
|
return (this.interfaces || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
728
728
|
}
|
|
729
729
|
getInterfaceUniqueName(name = 'Interface1') {
|
|
730
|
-
return utils.unique(name, this.getInterfaceExistingNames());
|
|
730
|
+
return utils.unique(name, this.getInterfaceExistingNames(), undefined, false);
|
|
731
731
|
}
|
|
732
732
|
|
|
733
733
|
/**
|
|
@@ -869,7 +869,7 @@ export class Module extends BaseNode {
|
|
|
869
869
|
return (this.views || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
870
870
|
}
|
|
871
871
|
getViewUniqueName(name = 'view1') {
|
|
872
|
-
return utils.unique(name, this.getViewExistingNames());
|
|
872
|
+
return utils.unique(name, this.getViewExistingNames(), undefined, false);
|
|
873
873
|
}
|
|
874
874
|
|
|
875
875
|
/**
|
|
@@ -1011,7 +1011,7 @@ export class Module extends BaseNode {
|
|
|
1011
1011
|
return (this.processes || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1012
1012
|
}
|
|
1013
1013
|
getProcessUniqueName(name = 'Process1') {
|
|
1014
|
-
return utils.unique(name, this.getProcessExistingNames());
|
|
1014
|
+
return utils.unique(name, this.getProcessExistingNames(), undefined, false);
|
|
1015
1015
|
}
|
|
1016
1016
|
|
|
1017
1017
|
/**
|
|
@@ -1153,7 +1153,7 @@ export class Module extends BaseNode {
|
|
|
1153
1153
|
return (this.viewComponents || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1154
1154
|
}
|
|
1155
1155
|
getViewComponentUniqueName(name = 'viewComponent1') {
|
|
1156
|
-
return utils.unique(name, this.getViewComponentExistingNames());
|
|
1156
|
+
return utils.unique(name, this.getViewComponentExistingNames(), undefined, false);
|
|
1157
1157
|
}
|
|
1158
1158
|
|
|
1159
1159
|
/**
|
|
@@ -161,7 +161,7 @@ export class Namespace extends BaseNode {
|
|
|
161
161
|
return (this.children || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
162
162
|
}
|
|
163
163
|
getNamespaceUniqueName(name = 'namespace1') {
|
|
164
|
-
return utils.unique(name, this.getNamespaceExistingNames());
|
|
164
|
+
return utils.unique(name, this.getNamespaceExistingNames(), undefined, false);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
/**
|
|
@@ -303,7 +303,7 @@ export class Namespace extends BaseNode {
|
|
|
303
303
|
return (this.processes || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
304
304
|
}
|
|
305
305
|
getProcessUniqueName(name = 'Process1') {
|
|
306
|
-
return utils.unique(name, this.getProcessExistingNames());
|
|
306
|
+
return utils.unique(name, this.getProcessExistingNames(), undefined, false);
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
/**
|
|
@@ -445,7 +445,7 @@ export class Namespace extends BaseNode {
|
|
|
445
445
|
return (this.entities || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
446
446
|
}
|
|
447
447
|
getEntityUniqueName(name = 'Entity1') {
|
|
448
|
-
return utils.unique(name, this.getEntityExistingNames());
|
|
448
|
+
return utils.unique(name, this.getEntityExistingNames(), undefined, false);
|
|
449
449
|
}
|
|
450
450
|
|
|
451
451
|
/**
|
|
@@ -587,7 +587,7 @@ export class Namespace extends BaseNode {
|
|
|
587
587
|
return (this.structures || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
588
588
|
}
|
|
589
589
|
getStructureUniqueName(name = 'Structure1') {
|
|
590
|
-
return utils.unique(name, this.getStructureExistingNames());
|
|
590
|
+
return utils.unique(name, this.getStructureExistingNames(), undefined, false);
|
|
591
591
|
}
|
|
592
592
|
|
|
593
593
|
/**
|
|
@@ -729,7 +729,7 @@ export class Namespace extends BaseNode {
|
|
|
729
729
|
return (this.enums || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
730
730
|
}
|
|
731
731
|
getEnumUniqueName(name = 'Enum1') {
|
|
732
|
-
return utils.unique(name, this.getEnumExistingNames());
|
|
732
|
+
return utils.unique(name, this.getEnumExistingNames(), undefined, false);
|
|
733
733
|
}
|
|
734
734
|
|
|
735
735
|
/**
|
|
@@ -871,7 +871,7 @@ export class Namespace extends BaseNode {
|
|
|
871
871
|
return (this.logics || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
872
872
|
}
|
|
873
873
|
getLogicUniqueName(name = 'logic1') {
|
|
874
|
-
return utils.unique(name, this.getLogicExistingNames());
|
|
874
|
+
return utils.unique(name, this.getLogicExistingNames(), undefined, false);
|
|
875
875
|
}
|
|
876
876
|
|
|
877
877
|
/**
|
|
@@ -1013,7 +1013,7 @@ export class Namespace extends BaseNode {
|
|
|
1013
1013
|
return (this.functions || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1014
1014
|
}
|
|
1015
1015
|
getFunctionUniqueName(name = 'func1') {
|
|
1016
|
-
return utils.unique(name, this.getFunctionExistingNames());
|
|
1016
|
+
return utils.unique(name, this.getFunctionExistingNames(), undefined, false);
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
1019
|
/**
|
|
@@ -1155,7 +1155,7 @@ export class Namespace extends BaseNode {
|
|
|
1155
1155
|
return (this.interfaces || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1156
1156
|
}
|
|
1157
1157
|
getInterfaceUniqueName(name = 'Interface1') {
|
|
1158
|
-
return utils.unique(name, this.getInterfaceExistingNames());
|
|
1158
|
+
return utils.unique(name, this.getInterfaceExistingNames(), undefined, false);
|
|
1159
1159
|
}
|
|
1160
1160
|
|
|
1161
1161
|
/**
|
|
@@ -1297,7 +1297,7 @@ export class Namespace extends BaseNode {
|
|
|
1297
1297
|
return (this.views || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1298
1298
|
}
|
|
1299
1299
|
getViewUniqueName(name = 'view1') {
|
|
1300
|
-
return utils.unique(name, this.getViewExistingNames());
|
|
1300
|
+
return utils.unique(name, this.getViewExistingNames(), undefined, false);
|
|
1301
1301
|
}
|
|
1302
1302
|
|
|
1303
1303
|
/**
|
|
@@ -1439,7 +1439,7 @@ export class Namespace extends BaseNode {
|
|
|
1439
1439
|
return (this.variables || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1440
1440
|
}
|
|
1441
1441
|
getVariableUniqueName(name = 'variable1') {
|
|
1442
|
-
return utils.unique(name, this.getVariableExistingNames());
|
|
1442
|
+
return utils.unique(name, this.getVariableExistingNames(), undefined, false);
|
|
1443
1443
|
}
|
|
1444
1444
|
|
|
1445
1445
|
/**
|
|
@@ -1581,7 +1581,7 @@ export class Namespace extends BaseNode {
|
|
|
1581
1581
|
return (this.viewComponents || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1582
1582
|
}
|
|
1583
1583
|
getViewComponentUniqueName(name = 'viewComponent1') {
|
|
1584
|
-
return utils.unique(name, this.getViewComponentExistingNames());
|
|
1584
|
+
return utils.unique(name, this.getViewComponentExistingNames(), undefined, false);
|
|
1585
1585
|
}
|
|
1586
1586
|
|
|
1587
1587
|
/**
|
|
@@ -1723,7 +1723,7 @@ export class Namespace extends BaseNode {
|
|
|
1723
1723
|
return (this.processComponents || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1724
1724
|
}
|
|
1725
1725
|
getProcessComponentUniqueName(name = 'processComponent1') {
|
|
1726
|
-
return utils.unique(name, this.getProcessComponentExistingNames());
|
|
1726
|
+
return utils.unique(name, this.getProcessComponentExistingNames(), undefined, false);
|
|
1727
1727
|
}
|
|
1728
1728
|
|
|
1729
1729
|
/**
|
|
@@ -105,7 +105,7 @@ export class ProcessComponent extends BaseNode {
|
|
|
105
105
|
return (this.attrs || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
106
106
|
}
|
|
107
107
|
getAttributeUniqueName(name = 'attribute1') {
|
|
108
|
-
return utils.unique(name, this.getAttributeExistingNames());
|
|
108
|
+
return utils.unique(name, this.getAttributeExistingNames(), undefined, false);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
/**
|
|
@@ -247,7 +247,7 @@ export class ProcessComponent extends BaseNode {
|
|
|
247
247
|
return (this.logics || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
248
248
|
}
|
|
249
249
|
getLogicUniqueName(name = 'logic1') {
|
|
250
|
-
return utils.unique(name, this.getLogicExistingNames());
|
|
250
|
+
return utils.unique(name, this.getLogicExistingNames(), undefined, false);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
/**
|
|
@@ -253,7 +253,7 @@ export class ProcessElement extends BaseNode {
|
|
|
253
253
|
return (this.waypoints || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
254
254
|
}
|
|
255
255
|
getPointUniqueName(name = 'point1') {
|
|
256
|
-
return utils.unique(name, this.getPointExistingNames());
|
|
256
|
+
return utils.unique(name, this.getPointExistingNames(), undefined, false);
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
/**
|
|
@@ -395,7 +395,7 @@ export class ProcessElement extends BaseNode {
|
|
|
395
395
|
return (this.variables || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
396
396
|
}
|
|
397
397
|
getVariableUniqueName(name = 'variable1') {
|
|
398
|
-
return utils.unique(name, this.getVariableExistingNames());
|
|
398
|
+
return utils.unique(name, this.getVariableExistingNames(), undefined, false);
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
/**
|
|
@@ -537,7 +537,7 @@ export class ProcessElement extends BaseNode {
|
|
|
537
537
|
return (this.returns || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
538
538
|
}
|
|
539
539
|
getReturnUniqueName(name = 'ret1') {
|
|
540
|
-
return utils.unique(name, this.getReturnExistingNames());
|
|
540
|
+
return utils.unique(name, this.getReturnExistingNames(), undefined, false);
|
|
541
541
|
}
|
|
542
542
|
|
|
543
543
|
/**
|
|
@@ -679,7 +679,7 @@ export class ProcessElement extends BaseNode {
|
|
|
679
679
|
return (this.constants || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
680
680
|
}
|
|
681
681
|
getConstantUniqueName(name = 'constant1') {
|
|
682
|
-
return utils.unique(name, this.getConstantExistingNames());
|
|
682
|
+
return utils.unique(name, this.getConstantExistingNames(), undefined, false);
|
|
683
683
|
}
|
|
684
684
|
|
|
685
685
|
/**
|
|
@@ -821,7 +821,7 @@ export class ProcessElement extends BaseNode {
|
|
|
821
821
|
return (this.bindAttrs || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
822
822
|
}
|
|
823
823
|
getBindAttributeUniqueName(name = 'bindAttribute1') {
|
|
824
|
-
return utils.unique(name, this.getBindAttributeExistingNames());
|
|
824
|
+
return utils.unique(name, this.getBindAttributeExistingNames(), undefined, false);
|
|
825
825
|
}
|
|
826
826
|
|
|
827
827
|
/**
|
|
@@ -155,7 +155,7 @@ export class Process extends BaseNode {
|
|
|
155
155
|
return (this.params || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
156
156
|
}
|
|
157
157
|
getParamUniqueName(name = 'param1') {
|
|
158
|
-
return utils.unique(name, this.getParamExistingNames());
|
|
158
|
+
return utils.unique(name, this.getParamExistingNames(), undefined, false);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
/**
|
|
@@ -297,7 +297,7 @@ export class Process extends BaseNode {
|
|
|
297
297
|
return (this.returns || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
298
298
|
}
|
|
299
299
|
getReturnUniqueName(name = 'ret1') {
|
|
300
|
-
return utils.unique(name, this.getReturnExistingNames());
|
|
300
|
+
return utils.unique(name, this.getReturnExistingNames(), undefined, false);
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
/**
|
|
@@ -439,7 +439,7 @@ export class Process extends BaseNode {
|
|
|
439
439
|
return (this.constants || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
440
440
|
}
|
|
441
441
|
getConstantUniqueName(name = 'constant1') {
|
|
442
|
-
return utils.unique(name, this.getConstantExistingNames());
|
|
442
|
+
return utils.unique(name, this.getConstantExistingNames(), undefined, false);
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
/**
|
|
@@ -581,7 +581,7 @@ export class Process extends BaseNode {
|
|
|
581
581
|
return (this.elements || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
582
582
|
}
|
|
583
583
|
getElementUniqueName(name = 'element1') {
|
|
584
|
-
return utils.unique(name, this.getElementExistingNames());
|
|
584
|
+
return utils.unique(name, this.getElementExistingNames(), undefined, false);
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
/**
|
|
@@ -93,7 +93,7 @@ export class QueryJoinExpression extends LogicItem {
|
|
|
93
93
|
return (this.onExpressions || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
94
94
|
}
|
|
95
95
|
getBinaryExpressionUniqueName(name = 'binaryExpression1') {
|
|
96
|
-
return utils.unique(name, this.getBinaryExpressionExistingNames());
|
|
96
|
+
return utils.unique(name, this.getBinaryExpressionExistingNames(), undefined, false);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
/**
|
|
@@ -35,6 +35,8 @@ export class QueryLimitExpression extends LogicItem {
|
|
|
35
35
|
@property('LogicItem')
|
|
36
36
|
pageSizeElement: LogicItem = undefined;
|
|
37
37
|
|
|
38
|
+
|
|
39
|
+
|
|
38
40
|
/**
|
|
39
41
|
* @param source 需要合并的部分参数
|
|
40
42
|
*/
|
|
@@ -48,6 +50,7 @@ export class QueryLimitExpression extends LogicItem {
|
|
|
48
50
|
return super.from(source, parentNode, parentKey) as QueryLimitExpression;
|
|
49
51
|
}
|
|
50
52
|
|
|
53
|
+
|
|
51
54
|
/**
|
|
52
55
|
* 设置逻辑项
|
|
53
56
|
*/
|
|
@@ -78,6 +81,10 @@ export class QueryLimitExpression extends LogicItem {
|
|
|
78
81
|
});
|
|
79
82
|
}
|
|
80
83
|
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
81
88
|
/**
|
|
82
89
|
* 删除逻辑项
|
|
83
90
|
* @param name 逻辑项名称
|
|
@@ -103,6 +110,8 @@ export class QueryLimitExpression extends LogicItem {
|
|
|
103
110
|
return pageElement.delete();
|
|
104
111
|
}
|
|
105
112
|
|
|
113
|
+
|
|
114
|
+
|
|
106
115
|
/**
|
|
107
116
|
* 删除逻辑项
|
|
108
117
|
* @param name 逻辑项名称
|
|
@@ -171,7 +180,7 @@ export class QueryLimitExpression extends LogicItem {
|
|
|
171
180
|
//================================================================================
|
|
172
181
|
}
|
|
173
182
|
|
|
174
|
-
classMap
|
|
183
|
+
classMap['QueryLimitExpression'] = QueryLimitExpression;
|
|
175
184
|
export default QueryLimitExpression;
|
|
176
185
|
//================================================================================
|
|
177
186
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -74,7 +74,7 @@ export class QuerySelectExpression extends LogicItem {
|
|
|
74
74
|
return (this.selectElements || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
75
75
|
}
|
|
76
76
|
getQueryAggregateExpressionUniqueName(name = 'queryAggregateExpression1') {
|
|
77
|
-
return utils.unique(name, this.getQueryAggregateExpressionExistingNames());
|
|
77
|
+
return utils.unique(name, this.getQueryAggregateExpressionExistingNames(), undefined, false);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
/**
|
|
@@ -130,7 +130,7 @@ export class Structure extends BaseNode {
|
|
|
130
130
|
return (this.typeParams || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
131
131
|
}
|
|
132
132
|
getTypeParamUniqueName(name = 'typeParam1') {
|
|
133
|
-
return utils.unique(name, this.getTypeParamExistingNames());
|
|
133
|
+
return utils.unique(name, this.getTypeParamExistingNames(), undefined, false);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/**
|
|
@@ -272,7 +272,7 @@ export class Structure extends BaseNode {
|
|
|
272
272
|
return (this.properties || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
273
273
|
}
|
|
274
274
|
getPropertyUniqueName(name = 'property1') {
|
|
275
|
-
return utils.unique(name, this.getPropertyExistingNames());
|
|
275
|
+
return utils.unique(name, this.getPropertyExistingNames(), undefined, false);
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
/**
|
|
@@ -125,7 +125,7 @@ export class ViewComponent extends BaseNode {
|
|
|
125
125
|
return (this.attrs || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
126
126
|
}
|
|
127
127
|
getAttributeUniqueName(name = 'attribute1') {
|
|
128
|
-
return utils.unique(name, this.getAttributeExistingNames());
|
|
128
|
+
return utils.unique(name, this.getAttributeExistingNames(), undefined, false);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
/**
|
|
@@ -267,7 +267,7 @@ export class ViewComponent extends BaseNode {
|
|
|
267
267
|
return (this.events || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
268
268
|
}
|
|
269
269
|
getEventUniqueName(name = 'event1') {
|
|
270
|
-
return utils.unique(name, this.getEventExistingNames());
|
|
270
|
+
return utils.unique(name, this.getEventExistingNames(), undefined, false);
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
/**
|
|
@@ -409,7 +409,7 @@ export class ViewComponent extends BaseNode {
|
|
|
409
409
|
return (this.slots || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
410
410
|
}
|
|
411
411
|
getSlotUniqueName(name = 'slot1') {
|
|
412
|
-
return utils.unique(name, this.getSlotExistingNames());
|
|
412
|
+
return utils.unique(name, this.getSlotExistingNames(), undefined, false);
|
|
413
413
|
}
|
|
414
414
|
|
|
415
415
|
/**
|
|
@@ -551,7 +551,7 @@ export class ViewComponent extends BaseNode {
|
|
|
551
551
|
return (this.methods || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
552
552
|
}
|
|
553
553
|
getLogicUniqueName(name = 'logic1') {
|
|
554
|
-
return utils.unique(name, this.getLogicExistingNames());
|
|
554
|
+
return utils.unique(name, this.getLogicExistingNames(), undefined, false);
|
|
555
555
|
}
|
|
556
556
|
|
|
557
557
|
/**
|
|
@@ -693,7 +693,7 @@ export class ViewComponent extends BaseNode {
|
|
|
693
693
|
return (this.children || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
694
694
|
}
|
|
695
695
|
getViewComponentUniqueName(name = 'viewComponent1') {
|
|
696
|
-
return utils.unique(name, this.getViewComponentExistingNames());
|
|
696
|
+
return utils.unique(name, this.getViewComponentExistingNames(), undefined, false);
|
|
697
697
|
}
|
|
698
698
|
|
|
699
699
|
/**
|
|
@@ -305,7 +305,7 @@ export class ViewElement extends BaseNode {
|
|
|
305
305
|
return (this.bindAttrs || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
306
306
|
}
|
|
307
307
|
getBindAttributeUniqueName(name = 'bindAttribute1') {
|
|
308
|
-
return utils.unique(name, this.getBindAttributeExistingNames());
|
|
308
|
+
return utils.unique(name, this.getBindAttributeExistingNames(), undefined, false);
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
/**
|
|
@@ -447,7 +447,7 @@ export class ViewElement extends BaseNode {
|
|
|
447
447
|
return (this.bindEvents || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
448
448
|
}
|
|
449
449
|
getBindEventUniqueName(name = 'bindEvent1') {
|
|
450
|
-
return utils.unique(name, this.getBindEventExistingNames());
|
|
450
|
+
return utils.unique(name, this.getBindEventExistingNames(), undefined, false);
|
|
451
451
|
}
|
|
452
452
|
|
|
453
453
|
/**
|
|
@@ -589,7 +589,7 @@ export class ViewElement extends BaseNode {
|
|
|
589
589
|
return (this.bindDirectives || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
590
590
|
}
|
|
591
591
|
getBindDirectiveUniqueName(name = 'bindDirective1') {
|
|
592
|
-
return utils.unique(name, this.getBindDirectiveExistingNames());
|
|
592
|
+
return utils.unique(name, this.getBindDirectiveExistingNames(), undefined, false);
|
|
593
593
|
}
|
|
594
594
|
|
|
595
595
|
/**
|