@lcap/nasl 1.0.2 → 2.12.0
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 -0
- package/out/automate/engine/index.js +34 -12
- package/out/automate/engine/index.js.map +1 -1
- package/out/automate/engine/operators.d.ts +10 -2
- package/out/automate/engine/operators.js +105 -7
- package/out/automate/engine/operators.js.map +1 -1
- package/out/automate/engine/uniqueName.d.ts +8 -2
- package/out/automate/engine/uniqueName.js +72 -4
- package/out/automate/engine/uniqueName.js.map +1 -1
- package/out/automate/engine/utils.d.ts +1 -0
- package/out/automate/engine/utils.js +92 -67
- package/out/automate/engine/utils.js.map +1 -1
- package/out/automate/template/process.d.ts +9 -0
- package/out/automate/template/process.js +10976 -0
- package/out/automate/template/process.js.map +1 -0
- package/out/bak/translator.js +1 -0
- package/out/bak/translator.js.map +1 -1
- package/out/common/BaseNode.d.ts +5 -0
- package/out/common/BaseNode.js +24 -3
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/App__.d.ts +51 -49
- package/out/concepts/App__.js +86 -53
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/BindAttribute__.js +2 -2
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.js +10 -3
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.js +15 -6
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +4 -0
- package/out/concepts/BooleanLiteral__.js +11 -0
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallFunction__.js +8 -2
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallLogic__.js +48 -30
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +8 -7
- package/out/concepts/CallQueryComponent__.js +86 -76
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.js +1 -1
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/ConfigGroup__.d.ts +1 -0
- package/out/concepts/ConfigGroup__.js +7 -0
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigProperty__.d.ts +1 -0
- package/out/concepts/ConfigProperty__.js +3 -0
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.d.ts +1 -0
- package/out/concepts/Configuration__.js +3 -0
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/DataSource__.d.ts +143 -0
- package/out/concepts/DataSource__.js +318 -0
- package/out/concepts/DataSource__.js.map +1 -0
- package/out/concepts/Destination__.js +8 -8
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.js +2 -2
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +5 -0
- package/out/concepts/EntityIndex__.js +6 -0
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +9 -0
- package/out/concepts/EntityProperty__.js +19 -2
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +5 -0
- package/out/concepts/Entity__.js +20 -10
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/Enum__.js +12 -6
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/ForEachStatement__.js +2 -2
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/Function__.d.ts +18 -0
- package/out/concepts/Function__.js +96 -1
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.js +6 -15
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.js +8 -8
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/Interface__.js +19 -12
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.js +3 -5
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/Logic__.js +44 -44
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/Module__.d.ts +116 -194
- package/out/concepts/Module__.js +31 -114
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/Namespace__.d.ts +0 -86
- package/out/concepts/Namespace__.js +1 -108
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/Param__.d.ts +2 -1
- package/out/concepts/Param__.js +1 -1
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +30 -10
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/Process__.d.ts +1 -1
- package/out/concepts/Process__.js +17 -10
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.js +8 -1
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.d.ts +4 -0
- package/out/concepts/QueryFromExpression__.js +13 -2
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.d.ts +4 -0
- package/out/concepts/QueryJoinExpression__.js +14 -3
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/Return__.js +1 -1
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.js +10 -3
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +14 -0
- package/out/concepts/SqlQueryComponent__.js +48 -5
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +1 -1
- package/out/concepts/StringLiteral__.js +1 -1
- package/out/concepts/StructureProperty__.js +6 -5
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.js +19 -12
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +1 -1
- package/out/concepts/SwitchCase__.js +23 -25
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.js +1 -6
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +8 -0
- package/out/concepts/TypeAnnotation__.js +44 -2
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/Variable__.js +1 -1
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewElement__.js +25 -20
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +0 -2
- package/out/concepts/View__.js +27 -32
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.js +4 -4
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.auth.js +20 -0
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.process.d.ts +4 -0
- package/out/concepts/basics/stdlib/nasl.process.js +410 -0
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.ui.js +1 -11
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.js +280 -2
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/basics/types/index.d.ts +1 -0
- package/out/concepts/basics/types/index.js +4 -1
- package/out/concepts/basics/types/index.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/generator/genBundleFiles.d.ts +3 -1
- package/out/generator/genBundleFiles.js +23 -5
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genMetaData.d.ts +1 -0
- package/out/generator/genMetaData.js +20 -12
- package/out/generator/genMetaData.js.map +1 -1
- package/out/index.d.ts +1 -1
- package/out/index.js +2 -1
- package/out/index.js.map +1 -1
- package/out/server/createUiTs.js +1 -0
- package/out/server/createUiTs.js.map +1 -1
- package/out/server/getLogics.js +27 -1
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +5 -0
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getProcesses.d.ts +4 -0
- package/out/server/getProcesses.js +69 -1
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/naslServer.d.ts +1 -0
- package/out/server/naslServer.js +223 -26
- package/out/server/naslServer.js.map +1 -1
- package/out/server/process2LogicNamespace.js +10 -1
- package/out/server/process2LogicNamespace.js.map +1 -1
- package/out/server/translator.js +37 -1
- package/out/server/translator.js.map +1 -1
- package/out/service/creator/errHandles.js +5 -0
- package/out/service/creator/errHandles.js.map +1 -1
- package/out/service/storage/init.d.ts +1 -0
- package/out/service/storage/init.js +95 -84
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +34 -24
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +28 -18
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +45 -29
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +15 -13
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genEnumSelectBlock.js +1 -1
- package/out/templator/genEnumSelectBlock.js.map +1 -1
- package/out/templator/genGridViewBlock.js +29 -24
- package/out/templator/genGridViewBlock.js.map +1 -1
- package/out/templator/genListViewBlock.js +7 -5
- package/out/templator/genListViewBlock.js.map +1 -1
- package/out/templator/genQueryComponent.js +25 -26
- package/out/templator/genQueryComponent.js.map +1 -1
- package/out/templator/genSelectBlock.js +8 -7
- package/out/templator/genSelectBlock.js.map +1 -1
- package/out/templator/genTableBlock.js +31 -21
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +34 -24
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/templator/utils.d.ts +2 -2
- package/out/templator/utils.js.map +1 -1
- package/out/test/integration/connect-file.js +6 -6
- package/out/test/integration/connect-file.js.map +1 -1
- package/out/translator/index.js +1 -1
- package/out/translator/index.js.map +1 -1
- package/out/utils/index.d.ts +5 -0
- package/out/utils/index.js +50 -1
- package/out/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/automate/engine/index.js +33 -8
- package/src/automate/engine/operators.js +114 -17
- package/src/automate/engine/uniqueName.js +77 -9
- package/src/automate/engine/utils.js +95 -68
- package/src/automate/template/process.js +10999 -0
- package/src/bak/translator.js +1 -0
- package/src/common/BaseNode.ts +21 -4
- package/src/concepts/App__.ts +128 -94
- package/src/concepts/BindAttribute__.ts +2 -2
- package/src/concepts/BindDirective__.ts +9 -7
- package/src/concepts/BindEvent__.ts +14 -6
- package/src/concepts/BooleanLiteral__.ts +12 -0
- package/src/concepts/CallFunction__.ts +6 -2
- package/src/concepts/CallLogic__.ts +47 -32
- package/src/concepts/CallQueryComponent__.ts +92 -81
- package/src/concepts/Comment__.ts +1 -1
- package/src/concepts/ConfigGroup__.ts +3 -1
- package/src/concepts/ConfigProperty__.ts +4 -0
- package/src/concepts/Configuration__.ts +3 -0
- package/src/concepts/DataSource__.ts +391 -0
- package/src/concepts/Destination__.ts +24 -8
- package/src/concepts/End__.ts +2 -2
- package/src/concepts/EntityIndex__.ts +7 -0
- package/src/concepts/EntityProperty__.ts +20 -2
- package/src/concepts/Entity__.ts +23 -11
- package/src/concepts/Enum__.ts +25 -6
- package/src/concepts/ForEachStatement__.ts +2 -2
- package/src/concepts/Function__.ts +95 -1
- package/src/concepts/Identifier__.ts +15 -15
- package/src/concepts/IfStatement__.ts +9 -9
- package/src/concepts/Interface__.ts +20 -12
- package/src/concepts/JSBlock__.ts +3 -12
- package/src/concepts/Logic__.ts +45 -79
- package/src/concepts/Module__.ts +141 -342
- package/src/concepts/Namespace__.ts +1 -204
- package/src/concepts/Param__.ts +3 -2
- package/src/concepts/ProcessElement__.ts +33 -12
- package/src/concepts/Process__.ts +18 -12
- package/src/concepts/QueryFieldExpression__.ts +9 -1
- package/src/concepts/QueryFromExpression__.ts +13 -2
- package/src/concepts/QueryJoinExpression__.ts +14 -3
- package/src/concepts/Return__.ts +1 -1
- package/src/concepts/Role__.ts +10 -4
- package/src/concepts/SqlQueryComponent__.ts +47 -11
- package/src/concepts/StringLiteral__.ts +1 -1
- package/src/concepts/StructureProperty__.ts +6 -9
- package/src/concepts/Structure__.ts +19 -11
- package/src/concepts/SwitchCase__.ts +23 -27
- package/src/concepts/SwitchStatement__.ts +1 -5
- package/src/concepts/TypeAnnotation__.ts +43 -2
- package/src/concepts/Variable__.ts +1 -1
- package/src/concepts/ViewElement__.ts +26 -39
- package/src/concepts/View__.ts +29 -34
- package/src/concepts/WhileStatement__.ts +4 -4
- package/src/concepts/basics/stdlib/nasl.auth.ts +20 -0
- package/src/concepts/basics/stdlib/nasl.process.ts +406 -0
- package/src/concepts/basics/stdlib/nasl.ui.ts +1 -11
- package/src/concepts/basics/stdlib/nasl.util.ts +281 -2
- package/src/concepts/basics/types/index.ts +1 -0
- package/src/concepts/index__.ts +1 -0
- package/src/generator/genBundleFiles.ts +28 -7
- package/src/generator/genMetaData.ts +22 -13
- package/src/index.ts +1 -1
- package/src/server/createUiTs.ts +1 -0
- package/src/server/getLogics.ts +29 -4
- package/src/server/getMemberIdentifier.ts +4 -0
- package/src/server/getProcesses.ts +68 -0
- package/src/server/naslServer.ts +227 -30
- package/src/server/process2LogicNamespace.ts +29 -19
- package/src/server/translator.ts +39 -1
- package/src/service/creator/errHandles.js +6 -0
- package/src/service/storage/init.ts +97 -86
- package/src/templator/genCreateBlock.ts +35 -26
- package/src/templator/genCurdEditMultipleKeyBlock.ts +29 -21
- package/src/templator/genCurdMultipleKeyBlock.ts +46 -31
- package/src/templator/genEditTableBlock.ts +17 -14
- package/src/templator/genEnumSelectBlock.ts +1 -1
- package/src/templator/genGridViewBlock.ts +30 -25
- package/src/templator/genListViewBlock.ts +10 -7
- package/src/templator/genQueryComponent.ts +28 -27
- package/src/templator/genSelectBlock.ts +9 -8
- package/src/templator/genTableBlock.ts +32 -23
- package/src/templator/genUpdateBlock.ts +35 -25
- package/src/templator/utils.ts +2 -2
- package/src/test/integration/connect-file.ts +6 -6
- package/src/translator/index.ts +1 -1
- package/src/utils/index.ts +51 -0
package/src/concepts/View__.ts
CHANGED
|
@@ -234,7 +234,7 @@ export class View extends BaseNode {
|
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
|
|
237
|
+
|
|
238
238
|
|
|
239
239
|
/**
|
|
240
240
|
* 插入页面元素
|
|
@@ -370,12 +370,8 @@ export class View extends BaseNode {
|
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
|
|
373
|
-
getParamExistingNames(excludedList: Array<Param> = []) {
|
|
374
|
-
const excludedSet = new Set(excludedList);
|
|
375
|
-
return (this.params || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
376
|
-
}
|
|
377
373
|
getParamUniqueName(name = 'param1') {
|
|
378
|
-
return utils.unique(name, this.
|
|
374
|
+
return utils.unique(name, this.getVarExistingNames(), undefined, false);
|
|
379
375
|
}
|
|
380
376
|
|
|
381
377
|
/**
|
|
@@ -512,12 +508,8 @@ export class View extends BaseNode {
|
|
|
512
508
|
}
|
|
513
509
|
|
|
514
510
|
|
|
515
|
-
getVariableExistingNames(excludedList: Array<Variable> = []) {
|
|
516
|
-
const excludedSet = new Set(excludedList);
|
|
517
|
-
return (this.variables || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
518
|
-
}
|
|
519
511
|
getVariableUniqueName(name = 'variable1') {
|
|
520
|
-
return utils.unique(name, this.
|
|
512
|
+
return utils.unique(name, this.getVarExistingNames(), undefined, false);
|
|
521
513
|
}
|
|
522
514
|
|
|
523
515
|
/**
|
|
@@ -1078,7 +1070,7 @@ export class View extends BaseNode {
|
|
|
1078
1070
|
}
|
|
1079
1071
|
|
|
1080
1072
|
|
|
1081
|
-
|
|
1073
|
+
|
|
1082
1074
|
|
|
1083
1075
|
/**
|
|
1084
1076
|
* 删除页面元素
|
|
@@ -1599,6 +1591,7 @@ export class View extends BaseNode {
|
|
|
1599
1591
|
title: this.title,
|
|
1600
1592
|
crumb: this.crumb,
|
|
1601
1593
|
first: this.children.find((child) => child.isIndex)?.name,
|
|
1594
|
+
auth: this.auth ? 'loginAuth' : undefined,
|
|
1602
1595
|
};
|
|
1603
1596
|
return `${componentOptions}
|
|
1604
1597
|
${translator(definition)}
|
|
@@ -1659,12 +1652,14 @@ export class View extends BaseNode {
|
|
|
1659
1652
|
}
|
|
1660
1653
|
|
|
1661
1654
|
getNamespace(): string {
|
|
1662
|
-
if (this.parentNode) {
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1655
|
+
if (this.parentNode && (this.parentNode as Namespace).getNamespace) {
|
|
1656
|
+
const parentNamespace = (this.parentNode as Namespace).getNamespace();
|
|
1657
|
+
const parentName = this.parentNode.name;
|
|
1658
|
+
const arr = [parentNamespace];
|
|
1659
|
+
if (this.parentNode.concept !== 'App' && parentName) {
|
|
1660
|
+
arr.push(parentName);
|
|
1666
1661
|
}
|
|
1667
|
-
return `${
|
|
1662
|
+
return `${arr.join('.')}.views`;
|
|
1668
1663
|
} else
|
|
1669
1664
|
throw new Error('无法获取命名空间,请设置 parentNode!');
|
|
1670
1665
|
}
|
|
@@ -1700,27 +1695,27 @@ export class View extends BaseNode {
|
|
|
1700
1695
|
let code = `export namespace ${this.tsName} {\n`;
|
|
1701
1696
|
// 角色
|
|
1702
1697
|
if (Array.isArray(this.bindRoles) && this.bindRoles.length) {
|
|
1703
|
-
code += indent(state
|
|
1698
|
+
code += indent((state?.tabSize || 0) + 1);
|
|
1704
1699
|
code += 'export let __bindRoles = [\n';
|
|
1705
1700
|
this.bindRoles.forEach((role) => {
|
|
1706
|
-
code += indent(state
|
|
1701
|
+
code += indent((state?.tabSize || 0) + 1);
|
|
1707
1702
|
code += `${this.app.getNamespace()}.roles.${chineseTsName(role)}.${chineseTsName(role)},`;
|
|
1708
1703
|
code += '\n';
|
|
1709
1704
|
});
|
|
1710
1705
|
code += '\n';
|
|
1711
|
-
code += indent(state
|
|
1706
|
+
code += indent((state?.tabSize || 0) + 1);
|
|
1712
1707
|
code += '];\n';
|
|
1713
1708
|
}
|
|
1714
1709
|
if (Array.isArray(this.params)) {
|
|
1715
1710
|
this.params.forEach((param) => {
|
|
1716
|
-
code += indent(state
|
|
1711
|
+
code += indent((state?.tabSize || 0) + 1) + 'let ';
|
|
1717
1712
|
code += param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1718
1713
|
code += ';\n';
|
|
1719
1714
|
});
|
|
1720
1715
|
}
|
|
1721
1716
|
if (Array.isArray(this.variables)) {
|
|
1722
1717
|
this.variables.forEach((variable) => {
|
|
1723
|
-
code += indent(state
|
|
1718
|
+
code += indent((state?.tabSize || 0) + 1) + 'let ';
|
|
1724
1719
|
code += variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1725
1720
|
code += ';\n';
|
|
1726
1721
|
});
|
|
@@ -1731,53 +1726,53 @@ export class View extends BaseNode {
|
|
|
1731
1726
|
// 生成所有的name和类型定义
|
|
1732
1727
|
this.elements.forEach((element) => {
|
|
1733
1728
|
code += element.toEmbeddedTSDefinition(shiftState(state, code, {
|
|
1734
|
-
tabSize: state
|
|
1729
|
+
tabSize: (state?.tabSize || 0) + 1,
|
|
1735
1730
|
}));
|
|
1736
1731
|
});
|
|
1737
|
-
code += indent(state
|
|
1732
|
+
code += indent((state?.tabSize || 0) + 1) + '}\n';
|
|
1738
1733
|
code += `let __elements: __elements;\n`;
|
|
1739
1734
|
// 逻辑
|
|
1740
1735
|
if (Array.isArray(this.logics) && this.logics.length) {
|
|
1741
|
-
code += indent(state
|
|
1736
|
+
code += indent((state?.tabSize || 0) + 1);
|
|
1742
1737
|
this.logics.forEach((logic) => {
|
|
1743
1738
|
code += logic.toEmbeddedTS(shiftState(state, code, {
|
|
1744
|
-
tabSize: state
|
|
1739
|
+
tabSize: (state?.tabSize || 0) + 2,
|
|
1745
1740
|
}), 'noExport');
|
|
1746
1741
|
code += '\n';
|
|
1747
1742
|
});
|
|
1748
|
-
code += indent(state
|
|
1743
|
+
code += indent((state?.tabSize || 0) + 1);
|
|
1749
1744
|
}
|
|
1750
1745
|
// 事件
|
|
1751
1746
|
if (Array.isArray(this.bindEvents)) {
|
|
1752
1747
|
this.bindEvents.forEach((event) => {
|
|
1753
1748
|
code += event.toEmbeddedTS(shiftState(state, code, {
|
|
1754
|
-
tabSize: state
|
|
1749
|
+
tabSize: (state?.tabSize || 0),
|
|
1755
1750
|
}), true);
|
|
1756
1751
|
code += '\n';
|
|
1757
1752
|
});
|
|
1758
1753
|
}
|
|
1759
1754
|
|
|
1760
1755
|
// render函数
|
|
1761
|
-
code += '\n' + indent(state
|
|
1756
|
+
code += '\n' + indent((state?.tabSize || 0) + 1);
|
|
1762
1757
|
code += `export function __render(`;
|
|
1763
1758
|
code += `){\n`;
|
|
1764
|
-
code += indent(state
|
|
1759
|
+
code += indent((state?.tabSize || 0));
|
|
1765
1760
|
|
|
1766
1761
|
// elements 元素
|
|
1767
1762
|
if (Array.isArray(this.elements)) {
|
|
1768
1763
|
// 生成嵌套式的内容
|
|
1769
1764
|
this.elements.forEach((element) => {
|
|
1770
1765
|
code += element.toEmbeddedTS(shiftState(state, code, {
|
|
1771
|
-
tabSize: state
|
|
1766
|
+
tabSize: (state?.tabSize || 0) + 3,
|
|
1772
1767
|
}));
|
|
1773
1768
|
code += '\n';
|
|
1774
1769
|
});
|
|
1775
1770
|
}
|
|
1776
1771
|
|
|
1777
|
-
code += '\n' + indent(state
|
|
1772
|
+
code += '\n' + indent((state?.tabSize || 0) + 1) + '}\n';
|
|
1778
1773
|
|
|
1779
1774
|
if (Array.isArray(this.params)) {
|
|
1780
|
-
code += indent(state
|
|
1775
|
+
code += indent((state?.tabSize || 0) + 1) + `export function $destination(options: {`;
|
|
1781
1776
|
this.params.forEach((param, index) => {
|
|
1782
1777
|
code += param.name + '?: ';
|
|
1783
1778
|
code += param.typeAnnotation.toEmbeddedTS(shiftState(state, code));
|
|
@@ -1786,7 +1781,7 @@ export class View extends BaseNode {
|
|
|
1786
1781
|
});
|
|
1787
1782
|
code += '}){}\n';
|
|
1788
1783
|
}
|
|
1789
|
-
code += indent(state
|
|
1784
|
+
code += indent((state?.tabSize || 0)) + '}\n';
|
|
1790
1785
|
return code;
|
|
1791
1786
|
}
|
|
1792
1787
|
|
|
@@ -257,12 +257,12 @@ export class WhileStatement extends LogicItem {
|
|
|
257
257
|
this.body.forEach((logicItem) => {
|
|
258
258
|
code
|
|
259
259
|
+= logicItem.toJS(shiftState(state, code, {
|
|
260
|
-
tabSize: state
|
|
260
|
+
tabSize: (state?.tabSize || 0) + 1,
|
|
261
261
|
})) + '\n';
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
code += indent(state
|
|
265
|
+
code += indent((state?.tabSize || 0)) + '}\n';
|
|
266
266
|
return code;
|
|
267
267
|
}
|
|
268
268
|
|
|
@@ -279,12 +279,12 @@ export class WhileStatement extends LogicItem {
|
|
|
279
279
|
this.body.forEach((logicItem) => {
|
|
280
280
|
code
|
|
281
281
|
+= logicItem.toEmbeddedTS(shiftState(state, code, {
|
|
282
|
-
tabSize: state
|
|
282
|
+
tabSize: (state?.tabSize || 0) + 1,
|
|
283
283
|
})) + '\n';
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
code += indent(state
|
|
287
|
+
code += indent((state?.tabSize || 0)) + '}\n';
|
|
288
288
|
return code;
|
|
289
289
|
}
|
|
290
290
|
//================================================================================
|
|
@@ -22,5 +22,25 @@ export default new Namespace({
|
|
|
22
22
|
params: [],
|
|
23
23
|
returns: [],
|
|
24
24
|
}),
|
|
25
|
+
new Logic({
|
|
26
|
+
name: 'encryptByAES',
|
|
27
|
+
params: [
|
|
28
|
+
new Param({
|
|
29
|
+
name: 'string',
|
|
30
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
31
|
+
}),
|
|
32
|
+
],
|
|
33
|
+
returns: [],
|
|
34
|
+
}),
|
|
35
|
+
new Logic({
|
|
36
|
+
name: 'decryptByAES',
|
|
37
|
+
params: [
|
|
38
|
+
new Param({
|
|
39
|
+
name: 'string',
|
|
40
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
41
|
+
}),
|
|
42
|
+
],
|
|
43
|
+
returns: [],
|
|
44
|
+
}),
|
|
25
45
|
],
|
|
26
46
|
});
|
|
@@ -13,8 +13,414 @@ import Attribute from '../../Attribute__';
|
|
|
13
13
|
import { primitiveTypeList } from '../types/coreTypeList';
|
|
14
14
|
import { reference2TypeAnnotationList } from './reference2TypeAnnotationList';
|
|
15
15
|
|
|
16
|
+
const logics = [
|
|
17
|
+
new Logic({
|
|
18
|
+
name: 'getProcessDefinitionList',
|
|
19
|
+
params: [],
|
|
20
|
+
returns: [
|
|
21
|
+
new Return({
|
|
22
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
23
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
24
|
+
}),
|
|
25
|
+
}),
|
|
26
|
+
],
|
|
27
|
+
}),
|
|
28
|
+
new Logic({
|
|
29
|
+
name: 'getProcessDefinition',
|
|
30
|
+
params: [
|
|
31
|
+
new Param({
|
|
32
|
+
name: 'name',
|
|
33
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
34
|
+
}),
|
|
35
|
+
],
|
|
36
|
+
returns: [
|
|
37
|
+
new Return({
|
|
38
|
+
name: 'result',
|
|
39
|
+
typeAnnotation: TypeAnnotation.createTypeParam('T'),
|
|
40
|
+
}),
|
|
41
|
+
],
|
|
42
|
+
}),
|
|
43
|
+
new Logic({
|
|
44
|
+
name: 'getProcessInstance',
|
|
45
|
+
params: [
|
|
46
|
+
new Param({
|
|
47
|
+
name: 'processId',
|
|
48
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
49
|
+
}),
|
|
50
|
+
],
|
|
51
|
+
returns: [
|
|
52
|
+
new Return({
|
|
53
|
+
name: 'result',
|
|
54
|
+
typeAnnotation: TypeAnnotation.createTypeParam('T'),
|
|
55
|
+
}),
|
|
56
|
+
],
|
|
57
|
+
}),
|
|
58
|
+
new Logic({
|
|
59
|
+
name: 'getProcessInstanceList',
|
|
60
|
+
params: [
|
|
61
|
+
new Param({
|
|
62
|
+
name: 'processId',
|
|
63
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
64
|
+
}),
|
|
65
|
+
new Param({
|
|
66
|
+
name: 'startBy',
|
|
67
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
68
|
+
}),
|
|
69
|
+
new Param({
|
|
70
|
+
name: 'finished',
|
|
71
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
|
|
72
|
+
}),
|
|
73
|
+
new Param({
|
|
74
|
+
name: 'processDefName',
|
|
75
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
76
|
+
}),
|
|
77
|
+
new Param({
|
|
78
|
+
name: 'startTimeBefore',
|
|
79
|
+
typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
|
|
80
|
+
}),
|
|
81
|
+
new Param({
|
|
82
|
+
name: 'startTimeAfter',
|
|
83
|
+
typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
|
|
84
|
+
}),
|
|
85
|
+
new Param({
|
|
86
|
+
name: 'endTimeBefore',
|
|
87
|
+
typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
|
|
88
|
+
}),
|
|
89
|
+
new Param({
|
|
90
|
+
name: 'endTimeAfter',
|
|
91
|
+
typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
|
|
92
|
+
}),
|
|
93
|
+
new Param({
|
|
94
|
+
name: 'page',
|
|
95
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
96
|
+
}),
|
|
97
|
+
new Param({
|
|
98
|
+
name: 'size',
|
|
99
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
100
|
+
}),
|
|
101
|
+
new Param({
|
|
102
|
+
name: 'sort',
|
|
103
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
104
|
+
}),
|
|
105
|
+
new Param({
|
|
106
|
+
name: 'order',
|
|
107
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
108
|
+
}),
|
|
109
|
+
],
|
|
110
|
+
returns: [
|
|
111
|
+
new Return({
|
|
112
|
+
name: 'result',
|
|
113
|
+
typeAnnotation: TypeAnnotation.createPrimitive('PageOf', {
|
|
114
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
115
|
+
}),
|
|
116
|
+
}),
|
|
117
|
+
],
|
|
118
|
+
}),
|
|
119
|
+
new Logic({
|
|
120
|
+
name: 'getTaskDefinitionList',
|
|
121
|
+
params: [
|
|
122
|
+
new Param({
|
|
123
|
+
name: 'processDefName',
|
|
124
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
125
|
+
}),
|
|
126
|
+
],
|
|
127
|
+
returns: [
|
|
128
|
+
new Return({
|
|
129
|
+
name: 'result',
|
|
130
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
131
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
132
|
+
}),
|
|
133
|
+
}),
|
|
134
|
+
],
|
|
135
|
+
}),
|
|
136
|
+
new Logic({
|
|
137
|
+
name: 'getTaskDefinition',
|
|
138
|
+
params: [
|
|
139
|
+
new Param({
|
|
140
|
+
name: 'name',
|
|
141
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
142
|
+
}),
|
|
143
|
+
new Param({
|
|
144
|
+
name: 'processDefName',
|
|
145
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
146
|
+
}),
|
|
147
|
+
],
|
|
148
|
+
returns: [
|
|
149
|
+
new Return({
|
|
150
|
+
name: 'result',
|
|
151
|
+
typeAnnotation: TypeAnnotation.createTypeParam('T'),
|
|
152
|
+
}),
|
|
153
|
+
],
|
|
154
|
+
}),
|
|
155
|
+
new Logic({
|
|
156
|
+
name: 'getTaskInstance',
|
|
157
|
+
params: [
|
|
158
|
+
new Param({
|
|
159
|
+
name: 'taskId',
|
|
160
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
161
|
+
}),
|
|
162
|
+
],
|
|
163
|
+
returns: [
|
|
164
|
+
new Return({
|
|
165
|
+
name: 'result',
|
|
166
|
+
typeAnnotation: TypeAnnotation.createTypeParam('T'),
|
|
167
|
+
}),
|
|
168
|
+
],
|
|
169
|
+
}),
|
|
170
|
+
new Logic({
|
|
171
|
+
name: 'getTaskInstanceList',
|
|
172
|
+
params: [
|
|
173
|
+
new Param({
|
|
174
|
+
name: 'taskId',
|
|
175
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
176
|
+
}),
|
|
177
|
+
new Param({
|
|
178
|
+
name: 'user',
|
|
179
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
180
|
+
}),
|
|
181
|
+
new Param({
|
|
182
|
+
name: 'finished',
|
|
183
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
|
|
184
|
+
}),
|
|
185
|
+
new Param({
|
|
186
|
+
name: 'processId',
|
|
187
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
188
|
+
}),
|
|
189
|
+
new Param({
|
|
190
|
+
name: 'processIdIn',
|
|
191
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
192
|
+
typeArguments: [TypeAnnotation.createTypeParam('String')],
|
|
193
|
+
}),
|
|
194
|
+
}),
|
|
195
|
+
new Param({
|
|
196
|
+
name: 'processDefName',
|
|
197
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
198
|
+
}),
|
|
199
|
+
new Param({
|
|
200
|
+
name: 'taskDefName',
|
|
201
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
202
|
+
}),
|
|
203
|
+
new Param({
|
|
204
|
+
name: 'createTimeBefore',
|
|
205
|
+
typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
|
|
206
|
+
}),
|
|
207
|
+
new Param({
|
|
208
|
+
name: 'createTimeAfter',
|
|
209
|
+
typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
|
|
210
|
+
}),
|
|
211
|
+
new Param({
|
|
212
|
+
name: 'completeTimeBefore',
|
|
213
|
+
typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
|
|
214
|
+
}),
|
|
215
|
+
new Param({
|
|
216
|
+
name: 'completeTimeAfter',
|
|
217
|
+
typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
|
|
218
|
+
}),
|
|
219
|
+
new Param({
|
|
220
|
+
name: 'page',
|
|
221
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
222
|
+
}),
|
|
223
|
+
new Param({
|
|
224
|
+
name: 'size',
|
|
225
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
226
|
+
}),
|
|
227
|
+
new Param({
|
|
228
|
+
name: 'sort',
|
|
229
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
230
|
+
}),
|
|
231
|
+
new Param({
|
|
232
|
+
name: 'order',
|
|
233
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
234
|
+
}),
|
|
235
|
+
],
|
|
236
|
+
returns: [
|
|
237
|
+
new Return({
|
|
238
|
+
typeAnnotation: TypeAnnotation.createPrimitive('PageOf', {
|
|
239
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
240
|
+
}),
|
|
241
|
+
}),
|
|
242
|
+
],
|
|
243
|
+
}),
|
|
244
|
+
new Logic({
|
|
245
|
+
name: 'claimTaskInstance',
|
|
246
|
+
params: [
|
|
247
|
+
new Param({
|
|
248
|
+
name: 'taskId',
|
|
249
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
250
|
+
}),
|
|
251
|
+
new Param({
|
|
252
|
+
name: 'user',
|
|
253
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
254
|
+
}),
|
|
255
|
+
],
|
|
256
|
+
returns: [
|
|
257
|
+
new Return({
|
|
258
|
+
name: 'result',
|
|
259
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
|
|
260
|
+
}),
|
|
261
|
+
],
|
|
262
|
+
}),
|
|
263
|
+
new Logic({
|
|
264
|
+
name: 'unclaimTaskInstance',
|
|
265
|
+
params: [
|
|
266
|
+
new Param({
|
|
267
|
+
name: 'taskId',
|
|
268
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
269
|
+
}),
|
|
270
|
+
],
|
|
271
|
+
returns: [
|
|
272
|
+
new Return({
|
|
273
|
+
name: 'result',
|
|
274
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
|
|
275
|
+
}),
|
|
276
|
+
],
|
|
277
|
+
}),
|
|
278
|
+
new Logic({
|
|
279
|
+
name: 'getTaskDestinationUrl',
|
|
280
|
+
params: [
|
|
281
|
+
new Param({
|
|
282
|
+
name: 'taskId',
|
|
283
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
284
|
+
}),
|
|
285
|
+
],
|
|
286
|
+
returns: [
|
|
287
|
+
new Return({
|
|
288
|
+
name: 'result',
|
|
289
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
290
|
+
}),
|
|
291
|
+
],
|
|
292
|
+
}),
|
|
293
|
+
];
|
|
294
|
+
|
|
295
|
+
export const processStructures = [
|
|
296
|
+
new Structure({
|
|
297
|
+
name: 'LCAPProcessDefinition',
|
|
298
|
+
properties: [
|
|
299
|
+
new StructureProperty({
|
|
300
|
+
name: 'name',
|
|
301
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
302
|
+
}),
|
|
303
|
+
new StructureProperty({
|
|
304
|
+
name: 'title',
|
|
305
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
306
|
+
}),
|
|
307
|
+
new StructureProperty({
|
|
308
|
+
name: 'description',
|
|
309
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
310
|
+
}),
|
|
311
|
+
],
|
|
312
|
+
}),
|
|
313
|
+
new Structure({
|
|
314
|
+
name: 'LCAPProcessInstance',
|
|
315
|
+
properties: [
|
|
316
|
+
new StructureProperty({
|
|
317
|
+
name: 'processId',
|
|
318
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
319
|
+
}),
|
|
320
|
+
new StructureProperty({
|
|
321
|
+
name: 'title',
|
|
322
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
323
|
+
}),
|
|
324
|
+
new StructureProperty({
|
|
325
|
+
name: 'description',
|
|
326
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
327
|
+
}),
|
|
328
|
+
new StructureProperty({
|
|
329
|
+
name: 'startBy',
|
|
330
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
331
|
+
}),
|
|
332
|
+
new StructureProperty({
|
|
333
|
+
name: 'startTime',
|
|
334
|
+
typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
|
|
335
|
+
}),
|
|
336
|
+
new StructureProperty({
|
|
337
|
+
name: 'endTime',
|
|
338
|
+
typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
|
|
339
|
+
}),
|
|
340
|
+
new StructureProperty({
|
|
341
|
+
name: 'finished',
|
|
342
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
|
|
343
|
+
}),
|
|
344
|
+
new StructureProperty({
|
|
345
|
+
name: 'processDefName',
|
|
346
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
347
|
+
}),
|
|
348
|
+
],
|
|
349
|
+
}),
|
|
350
|
+
new Structure({
|
|
351
|
+
name: 'LCAPTaskDefinition',
|
|
352
|
+
properties: [
|
|
353
|
+
new StructureProperty({
|
|
354
|
+
name: 'name',
|
|
355
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
356
|
+
}),
|
|
357
|
+
new StructureProperty({
|
|
358
|
+
name: 'title',
|
|
359
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
360
|
+
}),
|
|
361
|
+
new StructureProperty({
|
|
362
|
+
name: 'description',
|
|
363
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
364
|
+
}),
|
|
365
|
+
new StructureProperty({
|
|
366
|
+
name: 'processDefName',
|
|
367
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
368
|
+
}),
|
|
369
|
+
],
|
|
370
|
+
}),
|
|
371
|
+
new Structure({
|
|
372
|
+
name: 'LCAPTaskInstance',
|
|
373
|
+
properties: [
|
|
374
|
+
new StructureProperty({
|
|
375
|
+
name: 'taskId',
|
|
376
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
377
|
+
}),
|
|
378
|
+
new StructureProperty({
|
|
379
|
+
name: 'title',
|
|
380
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
381
|
+
}),
|
|
382
|
+
new StructureProperty({
|
|
383
|
+
name: 'description',
|
|
384
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
385
|
+
}),
|
|
386
|
+
new StructureProperty({
|
|
387
|
+
name: 'finished',
|
|
388
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
|
|
389
|
+
}),
|
|
390
|
+
new StructureProperty({
|
|
391
|
+
name: 'completeBy',
|
|
392
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
393
|
+
}),
|
|
394
|
+
new StructureProperty({
|
|
395
|
+
name: 'createTime',
|
|
396
|
+
typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
|
|
397
|
+
}),
|
|
398
|
+
new StructureProperty({
|
|
399
|
+
name: 'completeTime',
|
|
400
|
+
typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
|
|
401
|
+
}),
|
|
402
|
+
new StructureProperty({
|
|
403
|
+
name: 'taskDefName',
|
|
404
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
405
|
+
}),
|
|
406
|
+
new StructureProperty({
|
|
407
|
+
name: 'processId',
|
|
408
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
409
|
+
}),
|
|
410
|
+
new StructureProperty({
|
|
411
|
+
name: 'processDefName',
|
|
412
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
413
|
+
}),
|
|
414
|
+
],
|
|
415
|
+
}),
|
|
416
|
+
];
|
|
417
|
+
|
|
418
|
+
export const processTypeList: Array<TypeAnnotation> = reference2TypeAnnotationList(processStructures, 'nasl.process');
|
|
419
|
+
|
|
16
420
|
export default new Namespace({
|
|
17
421
|
name: 'process',
|
|
422
|
+
logics,
|
|
423
|
+
structures: processStructures,
|
|
18
424
|
processComponents: [
|
|
19
425
|
new ProcessComponent({
|
|
20
426
|
name: 'UserTask',
|
|
@@ -599,16 +599,6 @@ export const uiStructures = [
|
|
|
599
599
|
new Structure({
|
|
600
600
|
name: 'TreeChangeEvent',
|
|
601
601
|
properties: [
|
|
602
|
-
new StructureProperty({
|
|
603
|
-
name: 'param1',
|
|
604
|
-
description: '参数1',
|
|
605
|
-
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
606
|
-
}),
|
|
607
|
-
new StructureProperty({
|
|
608
|
-
name: 'param2',
|
|
609
|
-
description: '参数2',
|
|
610
|
-
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
611
|
-
}),
|
|
612
602
|
new StructureProperty({
|
|
613
603
|
name: 'value',
|
|
614
604
|
description: '改变后的值',
|
|
@@ -653,7 +643,7 @@ export const uiStructures = [
|
|
|
653
643
|
}),
|
|
654
644
|
new StructureProperty({
|
|
655
645
|
name: 'oldValues',
|
|
656
|
-
description: '
|
|
646
|
+
description: '旧的每项值的数组',
|
|
657
647
|
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
658
648
|
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
659
649
|
}),
|