@lcap/nasl 1.0.0-alpha.13 → 1.0.0-alpha.16
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.d.ts +1 -1
- package/out/automate/engine/index.js +73 -25
- package/out/automate/engine/index.js.map +1 -1
- package/out/automate/engine/utils.js +7 -6
- package/out/automate/engine/utils.js.map +1 -1
- package/out/common/BaseNode.d.ts +5 -4
- package/out/common/BaseNode.js +48 -41
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/App__.d.ts +18 -1
- package/out/concepts/App__.js +64 -24
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.js +2 -2
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignee__.d.ts +190 -0
- package/out/concepts/Assignee__.js +264 -0
- package/out/concepts/Assignee__.js.map +1 -0
- package/out/concepts/BinaryExpression__.js +6 -6
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.d.ts +19 -0
- package/out/concepts/BindAttribute__.js +36 -2
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.js +21 -1
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.d.ts +1 -0
- package/out/concepts/BindEvent__.js +38 -14
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/CallFunction__.js +20 -7
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +11 -8
- package/out/concepts/CallInterface__.js +160 -23
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +1 -0
- package/out/concepts/CallLogic__.js +17 -7
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +5 -1
- package/out/concepts/CallQueryComponent__.js +15 -11
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.js +6 -2
- package/out/concepts/Comment__.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__.d.ts +11 -0
- package/out/concepts/Destination__.js +59 -19
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.js +10 -2
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +7 -0
- package/out/concepts/EntityProperty__.js +60 -3
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +4 -1
- package/out/concepts/Entity__.js +29 -12
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/Enum__.d.ts +4 -0
- package/out/concepts/Enum__.js +9 -6
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Event__.js +1 -1
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ForEachStatement__.js +8 -12
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/Function__.js +5 -5
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.js +26 -24
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.js +2 -2
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/InterfaceParam__.d.ts +2 -0
- package/out/concepts/InterfaceParam__.js +41 -21
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.d.ts +3 -0
- package/out/concepts/Interface__.js +105 -9
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +2 -1
- package/out/concepts/LogicItem__.js +14 -0
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +3 -0
- package/out/concepts/Logic__.js +57 -16
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +13 -6
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/Module__.d.ts +6 -0
- package/out/concepts/Module__.js +18 -8
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/Namespace__.d.ts +4 -0
- package/out/concepts/Namespace__.js +23 -12
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/Param__.d.ts +2 -1
- package/out/concepts/Param__.js +35 -22
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js +2 -2
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +20 -18
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.js +1 -1
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/Process__.d.ts +6 -1
- package/out/concepts/Process__.js +18 -14
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.js +1 -1
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.js +1 -1
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.js +2 -2
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js +1 -1
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Return__.d.ts +1 -0
- package/out/concepts/Return__.js +38 -25
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.js +1 -1
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +1 -1
- package/out/concepts/StringLiteral__.js +2 -2
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +5 -4
- package/out/concepts/StructureProperty__.js +54 -31
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +1 -0
- package/out/concepts/Structure__.js +18 -5
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.js +3 -3
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.js +1 -1
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +3 -5
- package/out/concepts/TypeAnnotation__.js +36 -14
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/UnaryExpression__.js +4 -2
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +1 -0
- package/out/concepts/ValidationRule__.js +27 -1
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.d.ts +1 -0
- package/out/concepts/Variable__.js +38 -25
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewComponent__.js +5 -5
- package/out/concepts/ViewComponent__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +7 -1
- package/out/concepts/ViewElement__.js +154 -117
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +4 -0
- package/out/concepts/View__.js +38 -25
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.js +1 -1
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/basics/stdlib/index.js +3 -1
- package/out/concepts/basics/stdlib/index.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.auth.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.auth.js +30 -0
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.browser copy.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.browser copy.js +70 -0
- package/out/concepts/basics/stdlib/nasl.browser copy.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.browser.js +6 -35
- package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.configuration.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js +25 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.util.js +49 -41
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.validation.js +26 -20
- package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -1
- package/out/concepts/basics/types/coreTypeList.js +11 -11
- package/out/concepts/basics/types/coreTypeList.js.map +1 -1
- package/out/concepts/index__.d.ts +1 -0
- package/out/concepts/index__.js +1 -0
- package/out/concepts/index__.js.map +1 -1
- package/out/enums/KEYWORDS.js +1 -1
- package/out/enums/KEYWORDS.js.map +1 -1
- package/out/generator/genBundleFiles.d.ts +1 -0
- package/out/generator/genBundleFiles.js +122 -93
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/manager/diagnostic.d.ts +1 -1
- package/out/server/createUiTs.d.ts +1 -0
- package/out/server/createUiTs.js +19 -2
- package/out/server/createUiTs.js.map +1 -1
- package/out/server/entity2LogicNamespace.js +24 -9
- package/out/server/entity2LogicNamespace.js.map +1 -1
- package/out/server/getExtensionModules.js +2 -0
- package/out/server/getExtensionModules.js.map +1 -1
- package/out/server/getLogics.js +40 -56
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.d.ts +4 -0
- package/out/server/getMemberIdentifier.js +90 -48
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getProcesses.d.ts +2 -2
- package/out/server/getProcesses.js +34 -11
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/index.js +4 -0
- package/out/server/index.js.map +1 -1
- package/out/server/naslServer.d.ts +11 -30
- package/out/server/naslServer.js +410 -199
- package/out/server/naslServer.js.map +1 -1
- package/out/server/process2LogicNamespace.d.ts +10 -0
- package/out/server/process2LogicNamespace.js +16 -0
- package/out/server/process2LogicNamespace.js.map +1 -1
- package/out/server/translator.d.ts +22 -3
- package/out/server/translator.js +336 -130
- package/out/server/translator.js.map +1 -1
- package/out/service/storage/init.js +29 -15
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +5 -5
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +9 -13
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +7 -7
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +2 -2
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genGetBlock.js +4 -2
- package/out/templator/genGetBlock.js.map +1 -1
- package/out/templator/genGridViewBlock.d.ts +1 -1
- package/out/templator/genGridViewBlock.js +3 -3
- package/out/templator/genGridViewBlock.js.map +1 -1
- package/out/templator/genQueryComponent.d.ts +2 -0
- package/out/templator/genQueryComponent.js +1 -0
- package/out/templator/genQueryComponent.js.map +1 -1
- package/out/templator/genTableBlock.d.ts +1 -1
- package/out/templator/genTableBlock.js +3 -3
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +7 -7
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/templator/utils.d.ts +3 -1
- package/out/templator/utils.js +2 -1
- package/out/templator/utils.js.map +1 -1
- package/out/utils/index.d.ts +6 -0
- package/out/utils/index.js +20 -1
- package/out/utils/index.js.map +1 -1
- package/package.json +2 -1
- package/src/automate/engine/index.js +73 -25
- package/src/automate/engine/utils.js +7 -6
- package/src/common/BaseNode.ts +51 -42
- package/src/concepts/App__.ts +104 -26
- package/src/concepts/Argument__.ts +3 -2
- package/src/concepts/Assignee__.ts +437 -0
- package/src/concepts/BinaryExpression__.ts +7 -6
- package/src/concepts/BindAttribute__.ts +51 -2
- package/src/concepts/BindDirective__.ts +20 -1
- package/src/concepts/BindEvent__.ts +39 -16
- package/src/concepts/CallFunction__.ts +21 -8
- package/src/concepts/CallInterface__.ts +161 -42
- package/src/concepts/CallLogic__.ts +21 -9
- package/src/concepts/CallQueryComponent__.ts +15 -13
- package/src/concepts/Comment__.ts +6 -2
- 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 +57 -19
- package/src/concepts/End__.ts +9 -11
- package/src/concepts/EntityProperty__.ts +56 -3
- package/src/concepts/Entity__.ts +33 -20
- package/src/concepts/Enum__.ts +8 -7
- package/src/concepts/Event__.ts +1 -1
- package/src/concepts/ForEachStatement__.ts +8 -13
- package/src/concepts/Function__.ts +5 -5
- package/src/concepts/Identifier__.ts +31 -26
- package/src/concepts/IfStatement__.ts +2 -2
- package/src/concepts/InterfaceParam__.ts +39 -20
- package/src/concepts/Interface__.ts +103 -9
- package/src/concepts/LogicItem__.ts +16 -1
- package/src/concepts/Logic__.ts +60 -18
- package/src/concepts/MemberExpression__.ts +18 -6
- package/src/concepts/Module__.ts +19 -8
- package/src/concepts/Namespace__.ts +24 -12
- package/src/concepts/Param__.ts +34 -23
- package/src/concepts/ProcessComponent__.ts +2 -2
- package/src/concepts/ProcessElement__.ts +51 -50
- package/src/concepts/ProcessOutcome__.ts +1 -1
- package/src/concepts/Process__.ts +32 -28
- package/src/concepts/QueryAggregateExpression__.ts +1 -1
- package/src/concepts/QueryFromExpression__.ts +1 -1
- package/src/concepts/QueryJoinExpression__.ts +2 -2
- package/src/concepts/QuerySelectExpression__.ts +1 -1
- package/src/concepts/Return__.ts +35 -25
- package/src/concepts/SqlQueryComponent__.ts +1 -1
- package/src/concepts/StringLiteral__.ts +2 -2
- package/src/concepts/StructureProperty__.ts +49 -29
- package/src/concepts/Structure__.ts +17 -5
- package/src/concepts/SwitchCase__.ts +3 -3
- package/src/concepts/SwitchStatement__.ts +1 -1
- package/src/concepts/TypeAnnotation__.ts +34 -12
- package/src/concepts/UnaryExpression__.ts +4 -2
- package/src/concepts/ValidationRule__.ts +24 -1
- package/src/concepts/Variable__.ts +35 -24
- package/src/concepts/ViewComponent__.ts +5 -5
- package/src/concepts/ViewElement__.ts +168 -113
- package/src/concepts/View__.ts +44 -25
- package/src/concepts/WhileStatement__.ts +1 -1
- package/src/concepts/basics/stdlib/index.ts +3 -1
- package/src/concepts/basics/stdlib/nasl.auth.ts +26 -0
- package/src/concepts/basics/stdlib/nasl.browser.ts +7 -41
- package/src/concepts/basics/stdlib/nasl.configuration.ts +21 -0
- package/src/concepts/basics/stdlib/nasl.util.ts +49 -41
- package/src/concepts/basics/stdlib/nasl.validation.ts +17 -11
- package/src/concepts/basics/types/coreTypeList.ts +11 -11
- package/src/concepts/index__.ts +1 -0
- package/src/enums/KEYWORDS.ts +1 -1
- package/src/generator/genBundleFiles.ts +131 -112
- package/src/manager/diagnostic.ts +1 -1
- package/src/server/createUiTs.ts +22 -4
- package/src/server/entity2LogicNamespace.ts +25 -9
- package/src/server/getExtensionModules.ts +2 -0
- package/src/server/getLogics.ts +42 -58
- package/src/server/getMemberIdentifier.ts +88 -46
- package/src/server/getProcesses.ts +32 -9
- package/src/server/index.ts +12 -1
- package/src/server/naslServer.ts +422 -215
- package/src/server/process2LogicNamespace.ts +17 -1
- package/src/server/translator.ts +392 -134
- package/src/service/storage/init.ts +27 -16
- package/src/templator/genCreateBlock.ts +5 -5
- package/src/templator/genCurdEditMultipleKeyBlock.ts +25 -26
- package/src/templator/genCurdMultipleKeyBlock.ts +7 -7
- package/src/templator/genEditTableBlock.ts +2 -2
- package/src/templator/genGetBlock.ts +5 -7
- package/src/templator/genGridViewBlock.ts +4 -7
- package/src/templator/genQueryComponent.ts +1 -0
- package/src/templator/genTableBlock.ts +4 -7
- package/src/templator/genUpdateBlock.ts +7 -8
- package/src/templator/utils.ts +2 -1
- package/src/utils/index.ts +19 -0
package/src/concepts/View__.ts
CHANGED
|
@@ -272,7 +272,7 @@ export class View extends BaseNode {
|
|
|
272
272
|
name: options,
|
|
273
273
|
}, this, 'elements');
|
|
274
274
|
} else if (options instanceof ViewElement) {
|
|
275
|
-
options.
|
|
275
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
276
276
|
viewElement = options;
|
|
277
277
|
Object.assign(viewElement, relationOptions);
|
|
278
278
|
} else {
|
|
@@ -414,7 +414,7 @@ export class View extends BaseNode {
|
|
|
414
414
|
name: options,
|
|
415
415
|
}, this, 'params');
|
|
416
416
|
} else if (options instanceof Param) {
|
|
417
|
-
options.
|
|
417
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
418
418
|
param = options;
|
|
419
419
|
Object.assign(param, relationOptions);
|
|
420
420
|
} else {
|
|
@@ -556,7 +556,7 @@ export class View extends BaseNode {
|
|
|
556
556
|
name: options,
|
|
557
557
|
}, this, 'variables');
|
|
558
558
|
} else if (options instanceof Variable) {
|
|
559
|
-
options.
|
|
559
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
560
560
|
variable = options;
|
|
561
561
|
Object.assign(variable, relationOptions);
|
|
562
562
|
} else {
|
|
@@ -698,7 +698,7 @@ export class View extends BaseNode {
|
|
|
698
698
|
name: options,
|
|
699
699
|
}, this, 'logics');
|
|
700
700
|
} else if (options instanceof Logic) {
|
|
701
|
-
options.
|
|
701
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
702
702
|
logic = options;
|
|
703
703
|
Object.assign(logic, relationOptions);
|
|
704
704
|
} else {
|
|
@@ -840,7 +840,7 @@ export class View extends BaseNode {
|
|
|
840
840
|
name: options,
|
|
841
841
|
}, this, 'bindEvents');
|
|
842
842
|
} else if (options instanceof BindEvent) {
|
|
843
|
-
options.
|
|
843
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
844
844
|
bindEvent = options;
|
|
845
845
|
Object.assign(bindEvent, relationOptions);
|
|
846
846
|
} else {
|
|
@@ -984,7 +984,7 @@ export class View extends BaseNode {
|
|
|
984
984
|
name: options,
|
|
985
985
|
}, this, 'children');
|
|
986
986
|
} else if (options instanceof View) {
|
|
987
|
-
options.
|
|
987
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
988
988
|
view = options;
|
|
989
989
|
Object.assign(view, relationOptions);
|
|
990
990
|
} else {
|
|
@@ -1391,7 +1391,7 @@ export class View extends BaseNode {
|
|
|
1391
1391
|
get parentAuth() {
|
|
1392
1392
|
const _nameSpace = this.getTsNamespace();
|
|
1393
1393
|
const mainViewName = _nameSpace.split('.')[2];
|
|
1394
|
-
return this.app.views.find((item) => item.name === mainViewName)?.auth;
|
|
1394
|
+
return mainViewName ? this.app.views.find((item) => item.name === mainViewName)?.auth : this.auth;
|
|
1395
1395
|
}
|
|
1396
1396
|
/**
|
|
1397
1397
|
* 设置页面权限
|
|
@@ -1480,15 +1480,6 @@ export class View extends BaseNode {
|
|
|
1480
1480
|
}
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
|
-
// 全局结构体
|
|
1484
|
-
if (Array.isArray(definition.structures)) {
|
|
1485
|
-
definition.structures.forEach((structureOption: any) => {
|
|
1486
|
-
const structure = Structure.from({
|
|
1487
|
-
...structureOption,
|
|
1488
|
-
}, this.rootNode, 'structures');
|
|
1489
|
-
(this.rootNode as App).addStructure(structure);
|
|
1490
|
-
});
|
|
1491
|
-
}
|
|
1492
1483
|
|
|
1493
1484
|
// 全局逻辑
|
|
1494
1485
|
if (Array.isArray(definition.logics)) {
|
|
@@ -1500,6 +1491,16 @@ export class View extends BaseNode {
|
|
|
1500
1491
|
});
|
|
1501
1492
|
}
|
|
1502
1493
|
|
|
1494
|
+
// 全局结构体
|
|
1495
|
+
if (Array.isArray(definition.structures)) {
|
|
1496
|
+
definition.structures.forEach((structureOption: any) => {
|
|
1497
|
+
const structure = Structure.from({
|
|
1498
|
+
...structureOption,
|
|
1499
|
+
}, this.rootNode, 'structures');
|
|
1500
|
+
(this.rootNode as App).addStructure(structure);
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1503
1504
|
// 页面入参
|
|
1504
1505
|
if (Array.isArray(definition.viewParams)) {
|
|
1505
1506
|
definition.viewParams.forEach((paramsOption: any) => {
|
|
@@ -1663,12 +1664,12 @@ export class View extends BaseNode {
|
|
|
1663
1664
|
tsName = tsName.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, '_');
|
|
1664
1665
|
return tsName;
|
|
1665
1666
|
}
|
|
1666
|
-
|
|
1667
|
+
|
|
1667
1668
|
let code = `export namespace ${this.tsName} {\n`;
|
|
1668
1669
|
// 角色
|
|
1669
|
-
if (
|
|
1670
|
+
if (Array.isArray(this.bindRoles) && this.bindRoles.length) {
|
|
1670
1671
|
code += indent(state.tabSize + 1);
|
|
1671
|
-
code += 'export let
|
|
1672
|
+
code += 'export let __bindRoles = [\n';
|
|
1672
1673
|
this.bindRoles.forEach((role) => {
|
|
1673
1674
|
code += indent(state.tabSize + 1);
|
|
1674
1675
|
code += `${this.app.getNamespace()}.roles.${chineseTsName(role)}.${chineseTsName(role)},`;
|
|
@@ -1706,15 +1707,13 @@ export class View extends BaseNode {
|
|
|
1706
1707
|
// 逻辑
|
|
1707
1708
|
if (Array.isArray(this.logics) && this.logics.length) {
|
|
1708
1709
|
code += indent(state.tabSize + 1);
|
|
1709
|
-
code += `export namespace logics {\n`;
|
|
1710
1710
|
this.logics.forEach((logic) => {
|
|
1711
1711
|
code += logic.toEmbeddedTS(shiftState(state, code, {
|
|
1712
1712
|
tabSize: state.tabSize + 2,
|
|
1713
|
-
}));
|
|
1713
|
+
}), 'noExport');
|
|
1714
1714
|
code += '\n';
|
|
1715
1715
|
});
|
|
1716
1716
|
code += indent(state.tabSize + 1);
|
|
1717
|
-
code += '}\n';
|
|
1718
1717
|
}
|
|
1719
1718
|
// 事件
|
|
1720
1719
|
if (Array.isArray(this.bindEvents)) {
|
|
@@ -1746,13 +1745,14 @@ export class View extends BaseNode {
|
|
|
1746
1745
|
code += '\n' + indent(state.tabSize + 1) + '}\n';
|
|
1747
1746
|
|
|
1748
1747
|
if (Array.isArray(this.params)) {
|
|
1749
|
-
code += indent(state.tabSize + 1) + `export function $destination(`;
|
|
1748
|
+
code += indent(state.tabSize + 1) + `export function $destination(options: {`;
|
|
1750
1749
|
this.params.forEach((param, index) => {
|
|
1751
|
-
code +=
|
|
1750
|
+
code += param.name + '?: ';
|
|
1751
|
+
code += param.typeAnnotation.toEmbeddedTS(shiftState(state, code));
|
|
1752
1752
|
if (index !== this.params.length - 1)
|
|
1753
1753
|
code += ', ';
|
|
1754
1754
|
});
|
|
1755
|
-
code += '){}\n';
|
|
1755
|
+
code += '}){}\n';
|
|
1756
1756
|
}
|
|
1757
1757
|
code += indent(state.tabSize) + '}\n';
|
|
1758
1758
|
return code;
|
|
@@ -1810,6 +1810,25 @@ export class View extends BaseNode {
|
|
|
1810
1810
|
return arr.length ? subView.findViewByPath(arr.join('/')) : subView;
|
|
1811
1811
|
}
|
|
1812
1812
|
|
|
1813
|
+
findViewByName(name: string): View {
|
|
1814
|
+
return utils.traverse((current) => {
|
|
1815
|
+
if (current.node.name === name)
|
|
1816
|
+
return current.node;
|
|
1817
|
+
}, { node: this });
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
findElementByName(name: string): ViewElement {
|
|
1821
|
+
return this.elements[0]?.findElementByName(name);
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
findElementByTag(tag: string): ViewElement {
|
|
1825
|
+
return this.elements[0]?.findElementByName(tag);
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
findElementByAttr(name: string, value: string): ViewElement {
|
|
1829
|
+
return this.elements[0]?.findElementByAttr(name, value);
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1813
1832
|
_setAsIndexView(isIndex: boolean) {
|
|
1814
1833
|
let views: View[] = [];
|
|
1815
1834
|
if (this.parentNode.concept !== 'View') {
|
|
@@ -89,7 +89,7 @@ export class WhileStatement extends LogicItem {
|
|
|
89
89
|
const relationOptions = { parentNode: this, parentKey: 'body' };
|
|
90
90
|
let logicItem: LogicItem;
|
|
91
91
|
if (options instanceof LogicItem) {
|
|
92
|
-
options.
|
|
92
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
93
93
|
logicItem = options;
|
|
94
94
|
Object.assign(logicItem, relationOptions);
|
|
95
95
|
} else {
|
|
@@ -10,11 +10,13 @@ import naslUtil from './nasl.util';
|
|
|
10
10
|
import naslProcess from './nasl.process';
|
|
11
11
|
import naslValidation from './nasl.validation';
|
|
12
12
|
import naslBrowser from './nasl.browser';
|
|
13
|
+
import naslAuth from './nasl.auth';
|
|
14
|
+
import naslConfiguration from './nasl.configuration';
|
|
13
15
|
|
|
14
16
|
export { reference2TypeAnnotationList } from './reference2TypeAnnotationList';
|
|
15
17
|
export const stdlibNamespace = new Namespace({
|
|
16
18
|
name: 'nasl',
|
|
17
19
|
path: 'nasl',
|
|
18
|
-
children: [naslCore, naslCollection, naslInterface, naslUi, naslUtil, naslProcess, naslValidation, naslBrowser],
|
|
20
|
+
children: [naslCore, naslCollection, naslInterface, naslUi, naslUtil, naslProcess, naslValidation, naslBrowser, naslAuth, naslConfiguration],
|
|
19
21
|
});
|
|
20
22
|
export default stdlibNamespace;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Namespace from '../../Namespace__';
|
|
2
|
+
import Param from '../../Param__';
|
|
3
|
+
import Return from '../../Return__';
|
|
4
|
+
import Logic from '../../Logic__';
|
|
5
|
+
import TypeAnnotation from '../../TypeAnnotation__';
|
|
6
|
+
|
|
7
|
+
export default new Namespace({
|
|
8
|
+
name: 'auth',
|
|
9
|
+
logics: [
|
|
10
|
+
new Logic({
|
|
11
|
+
name: 'hasAuth',
|
|
12
|
+
params: [
|
|
13
|
+
new Param({
|
|
14
|
+
name: 'authPath',
|
|
15
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
16
|
+
}),
|
|
17
|
+
],
|
|
18
|
+
returns: [],
|
|
19
|
+
}),
|
|
20
|
+
new Logic({
|
|
21
|
+
name: 'logout',
|
|
22
|
+
params: [],
|
|
23
|
+
returns: [],
|
|
24
|
+
}),
|
|
25
|
+
],
|
|
26
|
+
});
|
|
@@ -9,22 +9,13 @@ export default new Namespace({
|
|
|
9
9
|
logics: [
|
|
10
10
|
new Logic({
|
|
11
11
|
name: 'requestFullscreen',
|
|
12
|
-
params: [
|
|
13
|
-
],
|
|
12
|
+
params: [],
|
|
13
|
+
body: [],
|
|
14
14
|
}),
|
|
15
15
|
new Logic({
|
|
16
16
|
name: 'exitFullscreen',
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
name: 'hasAuth',
|
|
20
|
-
params: [
|
|
21
|
-
new Param({
|
|
22
|
-
name: 'authPath',
|
|
23
|
-
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
24
|
-
}),
|
|
25
|
-
],
|
|
26
|
-
returns: [
|
|
27
|
-
],
|
|
17
|
+
params: [],
|
|
18
|
+
body: [],
|
|
28
19
|
}),
|
|
29
20
|
new Logic({
|
|
30
21
|
name: 'getDistance',
|
|
@@ -32,40 +23,15 @@ export default new Namespace({
|
|
|
32
23
|
new Param({
|
|
33
24
|
name: 'Point1',
|
|
34
25
|
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
26
|
+
required: true,
|
|
35
27
|
}),
|
|
36
28
|
new Param({
|
|
37
29
|
name: 'Point2',
|
|
38
30
|
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
31
|
+
required: true,
|
|
39
32
|
}),
|
|
40
33
|
],
|
|
41
|
-
|
|
42
|
-
],
|
|
43
|
-
}),
|
|
44
|
-
new Logic({
|
|
45
|
-
name: 'logOut',
|
|
46
|
-
params: [
|
|
47
|
-
new Param({
|
|
48
|
-
name: 'Point1',
|
|
49
|
-
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
50
|
-
}),
|
|
51
|
-
new Param({
|
|
52
|
-
name: 'Point2',
|
|
53
|
-
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
54
|
-
}),
|
|
55
|
-
],
|
|
56
|
-
returns: [
|
|
57
|
-
],
|
|
58
|
-
}),
|
|
59
|
-
new Logic({
|
|
60
|
-
name: 'getConfiguration',
|
|
61
|
-
params: [
|
|
62
|
-
new Param({
|
|
63
|
-
name: 'name',
|
|
64
|
-
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
65
|
-
}),
|
|
66
|
-
],
|
|
67
|
-
returns: [
|
|
68
|
-
],
|
|
34
|
+
body: [],
|
|
69
35
|
}),
|
|
70
36
|
],
|
|
71
37
|
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Namespace from '../../Namespace__';
|
|
2
|
+
import Param from '../../Param__';
|
|
3
|
+
import Return from '../../Return__';
|
|
4
|
+
import Logic from '../../Logic__';
|
|
5
|
+
import TypeAnnotation from '../../TypeAnnotation__';
|
|
6
|
+
|
|
7
|
+
export default new Namespace({
|
|
8
|
+
name: 'configuration',
|
|
9
|
+
logics: [
|
|
10
|
+
new Logic({
|
|
11
|
+
name: 'getConfig',
|
|
12
|
+
params: [
|
|
13
|
+
new Param({
|
|
14
|
+
name: 'name',
|
|
15
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
16
|
+
}),
|
|
17
|
+
],
|
|
18
|
+
returns: [],
|
|
19
|
+
}),
|
|
20
|
+
],
|
|
21
|
+
});
|
|
@@ -88,11 +88,6 @@ export default new Namespace({
|
|
|
88
88
|
new Function({
|
|
89
89
|
name: 'IndexOf',
|
|
90
90
|
description: '搜索字符串位置',
|
|
91
|
-
typeParams: [
|
|
92
|
-
new TypeParam({
|
|
93
|
-
name: 'T',
|
|
94
|
-
}),
|
|
95
|
-
],
|
|
96
91
|
params: [
|
|
97
92
|
new Param({
|
|
98
93
|
name: 'str',
|
|
@@ -126,11 +121,6 @@ export default new Namespace({
|
|
|
126
121
|
new Function({
|
|
127
122
|
name: 'LastIndexOf',
|
|
128
123
|
description: '从末尾搜索字符串位置',
|
|
129
|
-
typeParams: [
|
|
130
|
-
new TypeParam({
|
|
131
|
-
name: 'T',
|
|
132
|
-
}),
|
|
133
|
-
],
|
|
134
124
|
params: [
|
|
135
125
|
new Param({
|
|
136
126
|
name: 'str',
|
|
@@ -159,11 +149,6 @@ export default new Namespace({
|
|
|
159
149
|
new Function({
|
|
160
150
|
name: 'Replace',
|
|
161
151
|
description: '字符串替换',
|
|
162
|
-
typeParams: [
|
|
163
|
-
new TypeParam({
|
|
164
|
-
name: 'T',
|
|
165
|
-
}),
|
|
166
|
-
],
|
|
167
152
|
params: [
|
|
168
153
|
new Param({
|
|
169
154
|
name: 'str',
|
|
@@ -187,11 +172,6 @@ export default new Namespace({
|
|
|
187
172
|
new Function({
|
|
188
173
|
name: 'SubString',
|
|
189
174
|
description: '字符串截取',
|
|
190
|
-
typeParams: [
|
|
191
|
-
new TypeParam({
|
|
192
|
-
name: 'T',
|
|
193
|
-
}),
|
|
194
|
-
],
|
|
195
175
|
params: [
|
|
196
176
|
new Param({
|
|
197
177
|
name: 'str',
|
|
@@ -356,7 +336,6 @@ export default new Namespace({
|
|
|
356
336
|
new Function({
|
|
357
337
|
name: 'Get',
|
|
358
338
|
description: '获得集合指定索引的项',
|
|
359
|
-
typeParams: [new TypeParam({ name: 'T' })],
|
|
360
339
|
params: [
|
|
361
340
|
new Param({
|
|
362
341
|
name: 'list',
|
|
@@ -378,7 +357,6 @@ export default new Namespace({
|
|
|
378
357
|
new Function({
|
|
379
358
|
name: 'Set',
|
|
380
359
|
description: '为集合指定索引赋值(覆盖原索引项)',
|
|
381
|
-
typeParams: [new TypeParam({ name: 'T' })],
|
|
382
360
|
params: [
|
|
383
361
|
new Param({
|
|
384
362
|
name: 'list',
|
|
@@ -404,7 +382,6 @@ export default new Namespace({
|
|
|
404
382
|
new Function({
|
|
405
383
|
name: 'Contains',
|
|
406
384
|
description: '返回集合是否包含某一项',
|
|
407
|
-
typeParams: [new TypeParam({ name: 'T' })],
|
|
408
385
|
params: [
|
|
409
386
|
new Param({
|
|
410
387
|
name: 'list',
|
|
@@ -426,7 +403,6 @@ export default new Namespace({
|
|
|
426
403
|
new Function({
|
|
427
404
|
name: 'Add',
|
|
428
405
|
description: '为集合末尾添加项,并返回集合长度',
|
|
429
|
-
typeParams: [new TypeParam({ name: 'T' })],
|
|
430
406
|
params: [
|
|
431
407
|
new Param({
|
|
432
408
|
name: 'list',
|
|
@@ -443,7 +419,6 @@ export default new Namespace({
|
|
|
443
419
|
new Function({
|
|
444
420
|
name: 'Insert',
|
|
445
421
|
description: '为集合指定索引插入项(原索引项依次后推)',
|
|
446
|
-
typeParams: [new TypeParam({ name: 'T' })],
|
|
447
422
|
params: [
|
|
448
423
|
new Param({
|
|
449
424
|
name: 'list',
|
|
@@ -464,7 +439,6 @@ export default new Namespace({
|
|
|
464
439
|
new Function({
|
|
465
440
|
name: 'Remove',
|
|
466
441
|
description: '删除集合的项',
|
|
467
|
-
typeParams: [new TypeParam({ name: 'T' })],
|
|
468
442
|
params: [
|
|
469
443
|
new Param({
|
|
470
444
|
name: 'list',
|
|
@@ -481,7 +455,6 @@ export default new Namespace({
|
|
|
481
455
|
new Function({
|
|
482
456
|
name: 'RemoveAt',
|
|
483
457
|
description: '删除集合位于某个索引的项',
|
|
484
|
-
typeParams: [new TypeParam({ name: 'T' })],
|
|
485
458
|
params: [
|
|
486
459
|
new Param({
|
|
487
460
|
name: 'list',
|
|
@@ -493,14 +466,16 @@ export default new Namespace({
|
|
|
493
466
|
name: 'index',
|
|
494
467
|
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
495
468
|
}),
|
|
496
|
-
|
|
497
|
-
|
|
469
|
+
],
|
|
470
|
+
returns: [
|
|
471
|
+
new Return({
|
|
498
472
|
typeAnnotation: TypeAnnotation.createTypeParam('T'),
|
|
499
473
|
}),
|
|
500
474
|
],
|
|
501
475
|
}),
|
|
502
476
|
new Function({
|
|
503
477
|
name: 'CurrDate',
|
|
478
|
+
description: '返回当前日期',
|
|
504
479
|
params: [],
|
|
505
480
|
returns: [
|
|
506
481
|
new Return({
|
|
@@ -510,7 +485,7 @@ export default new Namespace({
|
|
|
510
485
|
}),
|
|
511
486
|
new Function({
|
|
512
487
|
name: 'CurrTime',
|
|
513
|
-
description: '
|
|
488
|
+
description: '返回当前时间',
|
|
514
489
|
params: [],
|
|
515
490
|
returns: [
|
|
516
491
|
new Return({
|
|
@@ -588,7 +563,10 @@ export default new Namespace({
|
|
|
588
563
|
typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
|
|
589
564
|
defaultValue: 'false',
|
|
590
565
|
defaultExpression: new BooleanLiteral({ value: 'false' }),
|
|
591
|
-
options: [
|
|
566
|
+
options: [
|
|
567
|
+
{ text: 'true', value: 'true' },
|
|
568
|
+
{ text: 'false', value: 'false' },
|
|
569
|
+
],
|
|
592
570
|
}),
|
|
593
571
|
],
|
|
594
572
|
returns: [
|
|
@@ -691,7 +669,6 @@ export default new Namespace({
|
|
|
691
669
|
new Function({
|
|
692
670
|
name: 'Clone',
|
|
693
671
|
description: '复制一个所选参数的实例',
|
|
694
|
-
typeParams: [new TypeParam({ name: 'T' })],
|
|
695
672
|
params: [
|
|
696
673
|
new Param({
|
|
697
674
|
name: 'struct',
|
|
@@ -707,7 +684,6 @@ export default new Namespace({
|
|
|
707
684
|
new Function({
|
|
708
685
|
name: 'Clear',
|
|
709
686
|
description: '清除对象数据',
|
|
710
|
-
typeParams: [new TypeParam({ name: 'T' })],
|
|
711
687
|
params: [
|
|
712
688
|
new Param({
|
|
713
689
|
name: 'struct',
|
|
@@ -746,13 +722,45 @@ export default new Namespace({
|
|
|
746
722
|
new Param({
|
|
747
723
|
name: 'name',
|
|
748
724
|
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
725
|
+
useComponent: { type: 's-config-select' },
|
|
726
|
+
}),
|
|
727
|
+
],
|
|
728
|
+
returns: [
|
|
729
|
+
new Return({
|
|
730
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
731
|
+
}),
|
|
732
|
+
],
|
|
733
|
+
}),
|
|
734
|
+
// new Function({
|
|
735
|
+
// name: 'CreatePageOf',
|
|
736
|
+
// description: '将List<T>集合转换为分页集合PageOf<T>',
|
|
737
|
+
// params: [
|
|
738
|
+
// new Param({
|
|
739
|
+
// name: 'list',
|
|
740
|
+
// typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
741
|
+
// typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
742
|
+
// }),
|
|
743
|
+
// }),
|
|
744
|
+
// new Param({
|
|
745
|
+
// name: 'page',
|
|
746
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
747
|
+
// }),
|
|
748
|
+
// new Param({
|
|
749
|
+
// name: 'size',
|
|
750
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
751
|
+
// }),
|
|
752
|
+
// new Param({
|
|
753
|
+
// name: 'total',
|
|
754
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
755
|
+
// }),
|
|
756
|
+
// ],
|
|
757
|
+
// returns: [
|
|
758
|
+
// new Return({
|
|
759
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('PageOf', {
|
|
760
|
+
// typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
761
|
+
// }),
|
|
762
|
+
// }),
|
|
763
|
+
// ],
|
|
764
|
+
// }),
|
|
757
765
|
],
|
|
758
766
|
});
|
|
@@ -205,7 +205,7 @@ export default new Namespace({
|
|
|
205
205
|
new Param({
|
|
206
206
|
name: 'arr',
|
|
207
207
|
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
208
|
-
typeArguments: [TypeAnnotation.
|
|
208
|
+
typeArguments: [TypeAnnotation.createPrimitive('Any')],
|
|
209
209
|
}),
|
|
210
210
|
}),
|
|
211
211
|
],
|
|
@@ -221,7 +221,7 @@ export default new Namespace({
|
|
|
221
221
|
new Param({
|
|
222
222
|
name: 'arr',
|
|
223
223
|
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
224
|
-
typeArguments: [TypeAnnotation.
|
|
224
|
+
typeArguments: [TypeAnnotation.createPrimitive('Any')],
|
|
225
225
|
}),
|
|
226
226
|
}),
|
|
227
227
|
],
|
|
@@ -237,7 +237,7 @@ export default new Namespace({
|
|
|
237
237
|
new Param({
|
|
238
238
|
name: 'arr',
|
|
239
239
|
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
240
|
-
typeArguments: [TypeAnnotation.
|
|
240
|
+
typeArguments: [TypeAnnotation.createPrimitive('Any')],
|
|
241
241
|
}),
|
|
242
242
|
}),
|
|
243
243
|
],
|
|
@@ -253,7 +253,7 @@ export default new Namespace({
|
|
|
253
253
|
new Param({
|
|
254
254
|
name: 'arr',
|
|
255
255
|
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
256
|
-
typeArguments: [TypeAnnotation.
|
|
256
|
+
typeArguments: [TypeAnnotation.createPrimitive('Any')],
|
|
257
257
|
}),
|
|
258
258
|
}),
|
|
259
259
|
],
|
|
@@ -263,14 +263,13 @@ export default new Namespace({
|
|
|
263
263
|
}),
|
|
264
264
|
],
|
|
265
265
|
}),
|
|
266
|
-
/*
|
|
267
266
|
new Function({
|
|
268
267
|
name: 'unique',
|
|
269
268
|
params: [
|
|
270
269
|
new Param({
|
|
271
270
|
name: 'arr',
|
|
272
271
|
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
273
|
-
typeArguments: [TypeAnnotation.
|
|
272
|
+
typeArguments: [TypeAnnotation.createPrimitive('Any')],
|
|
274
273
|
}),
|
|
275
274
|
}),
|
|
276
275
|
],
|
|
@@ -279,7 +278,16 @@ export default new Namespace({
|
|
|
279
278
|
typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
|
|
280
279
|
}),
|
|
281
280
|
],
|
|
282
|
-
})
|
|
281
|
+
}),
|
|
282
|
+
new Function({
|
|
283
|
+
name: 'noDuplicates',
|
|
284
|
+
params: [],
|
|
285
|
+
returns: [
|
|
286
|
+
new Return({
|
|
287
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
|
|
288
|
+
}),
|
|
289
|
+
],
|
|
290
|
+
}),
|
|
283
291
|
genEmptyParamFunction('string'),
|
|
284
292
|
genEmptyParamFunction('number'),
|
|
285
293
|
new Function({
|
|
@@ -412,13 +420,12 @@ export default new Namespace({
|
|
|
412
420
|
}),
|
|
413
421
|
genEmptyParamFunction('halfWidth'),
|
|
414
422
|
genEmptyParamFunction('fullWidth'),
|
|
415
|
-
/* hash ?
|
|
416
423
|
new Function({
|
|
417
424
|
name: 'hash',
|
|
418
425
|
params: [
|
|
419
426
|
new Param({
|
|
420
|
-
name: '
|
|
421
|
-
typeAnnotation: TypeAnnotation.createPrimitive('
|
|
427
|
+
name: 'algorithm',
|
|
428
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
422
429
|
}),
|
|
423
430
|
],
|
|
424
431
|
returns: [
|
|
@@ -427,7 +434,6 @@ export default new Namespace({
|
|
|
427
434
|
}),
|
|
428
435
|
],
|
|
429
436
|
}),
|
|
430
|
-
*/
|
|
431
437
|
genEmptyParamFunction('hexColor'),
|
|
432
438
|
genEmptyParamFunction('hex'),
|
|
433
439
|
genEmptyParamFunction('creditCard'),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { TypeAnnotation, PRIMITIVE_TYPE } from '../../TypeAnnotation__';
|
|
2
2
|
|
|
3
3
|
export const primitiveTypeList: Array<TypeAnnotation> = [
|
|
4
|
-
TypeAnnotation.createPrimitive('Boolean'
|
|
5
|
-
TypeAnnotation.createPrimitive('Integer'
|
|
6
|
-
TypeAnnotation.createPrimitive('Long'
|
|
7
|
-
TypeAnnotation.createPrimitive('Double'
|
|
8
|
-
TypeAnnotation.createPrimitive('String'
|
|
9
|
-
TypeAnnotation.createPrimitive('Text'
|
|
10
|
-
TypeAnnotation.createPrimitive('Binary'
|
|
11
|
-
TypeAnnotation.createPrimitive('Date'
|
|
12
|
-
TypeAnnotation.createPrimitive('Time'
|
|
13
|
-
TypeAnnotation.createPrimitive('DateTime'
|
|
14
|
-
TypeAnnotation.createPrimitive('Email'
|
|
4
|
+
TypeAnnotation.createPrimitive('Boolean'),
|
|
5
|
+
TypeAnnotation.createPrimitive('Integer'),
|
|
6
|
+
TypeAnnotation.createPrimitive('Long'),
|
|
7
|
+
TypeAnnotation.createPrimitive('Double'),
|
|
8
|
+
TypeAnnotation.createPrimitive('String'),
|
|
9
|
+
TypeAnnotation.createPrimitive('Text'),
|
|
10
|
+
TypeAnnotation.createPrimitive('Binary'),
|
|
11
|
+
TypeAnnotation.createPrimitive('Date'),
|
|
12
|
+
TypeAnnotation.createPrimitive('Time'),
|
|
13
|
+
TypeAnnotation.createPrimitive('DateTime'),
|
|
14
|
+
TypeAnnotation.createPrimitive('Email'),
|
|
15
15
|
];
|
package/src/concepts/index__.ts
CHANGED
|
@@ -70,6 +70,7 @@ export * from './Process__';
|
|
|
70
70
|
export * from './ProcessElement__';
|
|
71
71
|
export * from './ProcessComponent__';
|
|
72
72
|
export * from './ProcessOutcome__';
|
|
73
|
+
export * from './Assignee__';
|
|
73
74
|
export * from './Role__';
|
|
74
75
|
export * from './Configuration__';
|
|
75
76
|
export * from './ConfigGroup__';
|
package/src/enums/KEYWORDS.ts
CHANGED
|
@@ -62,7 +62,6 @@ export const KEYWORDS = [
|
|
|
62
62
|
'enum',
|
|
63
63
|
'enums',
|
|
64
64
|
'eval',
|
|
65
|
-
'event',
|
|
66
65
|
'events',
|
|
67
66
|
'expect',
|
|
68
67
|
'experimental',
|
|
@@ -104,6 +103,7 @@ export const KEYWORDS = [
|
|
|
104
103
|
'is',
|
|
105
104
|
'it',
|
|
106
105
|
'lazy',
|
|
106
|
+
'length',
|
|
107
107
|
'let',
|
|
108
108
|
'logging',
|
|
109
109
|
'logic',
|