@lcap/nasl 1.0.0-alpha.2 → 1.0.0-alpha.5
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/README.md +3 -3
- package/docs/assets/search.js +1 -1
- package/docs/classes/Entity.html +2832 -204
- package/docs/classes/View.html +4567 -365
- package/out/common/BaseNode.d.ts +1 -1
- package/out/common/BaseNode.js +38 -23
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/App__.d.ts +22 -0
- package/out/concepts/App__.js +77 -15
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.d.ts +2 -1
- package/out/concepts/Argument__.js +2 -2
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignment__.d.ts +2 -1
- package/out/concepts/Assignment__.js +3 -8
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/BinaryExpression__.d.ts +2 -1
- package/out/concepts/BinaryExpression__.js +5 -5
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.d.ts +2 -1
- package/out/concepts/BindAttribute__.js +9 -4
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.d.ts +2 -1
- package/out/concepts/BindDirective__.js +2 -2
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.d.ts +2 -1
- package/out/concepts/BindEvent__.js +4 -3
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +2 -1
- package/out/concepts/BooleanLiteral__.js +1 -1
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallFunction__.d.ts +57 -1
- package/out/concepts/CallFunction__.js +119 -11
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +2 -1
- package/out/concepts/CallInterface__.js +2 -2
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +57 -1
- package/out/concepts/CallLogic__.js +117 -10
- 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/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.d.ts +120 -0
- package/out/concepts/ConfigGroup__.js +214 -0
- package/out/concepts/ConfigGroup__.js.map +1 -0
- package/out/concepts/ConfigPropertyValue__.d.ts +43 -0
- package/out/concepts/ConfigPropertyValue__.js +103 -0
- package/out/concepts/ConfigPropertyValue__.js.map +1 -0
- package/out/concepts/ConfigProperty__.d.ts +128 -0
- package/out/concepts/ConfigProperty__.js +236 -0
- package/out/concepts/ConfigProperty__.js.map +1 -0
- package/out/concepts/Configuration__.d.ts +120 -0
- package/out/concepts/Configuration__.js +210 -0
- package/out/concepts/Configuration__.js.map +1 -0
- package/out/concepts/Constant__.d.ts +2 -1
- package/out/concepts/Constant__.js +1 -1
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/DataElement__.js.map +1 -1
- package/out/concepts/Destination__.d.ts +2 -1
- package/out/concepts/Destination__.js +4 -3
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +8 -0
- package/out/concepts/EntityIndex__.js +18 -0
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +5 -5
- package/out/concepts/EntityProperty__.js +10 -9
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +30 -26
- package/out/concepts/Entity__.js +44 -36
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.d.ts +8 -8
- package/out/concepts/Enum__.js +10 -4
- 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__.d.ts +35 -33
- package/out/concepts/ForEachStatement__.js +103 -36
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/Function__.js +1 -1
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.d.ts +2 -1
- package/out/concepts/Identifier__.js +15 -1
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/InterfaceParam__.js +1 -1
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.d.ts +5 -1
- package/out/concepts/Interface__.js +19 -5
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +2 -1
- package/out/concepts/LogicItem__.js +2 -2
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.js +9 -7
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MemberExpression__.d.ts +2 -5
- package/out/concepts/MemberExpression__.js +12 -18
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/Module__.d.ts +121 -126
- package/out/concepts/Module__.js +10 -17
- 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/NullLiteral__.d.ts +2 -1
- package/out/concepts/NullLiteral__.js +1 -1
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumericLiteral__.d.ts +2 -1
- package/out/concepts/NumericLiteral__.js +1 -1
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/Param__.d.ts +1 -1
- package/out/concepts/Param__.js +2 -2
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Point__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js +2 -2
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.d.ts +82 -81
- package/out/concepts/ProcessElement__.js +19 -6
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/Process__.d.ts +1 -0
- package/out/concepts/Process__.js +10 -4
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.js +1 -1
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.js +1 -1
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js +1 -1
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Rect__.js.map +1 -1
- package/out/concepts/Return__.d.ts +1 -1
- package/out/concepts/Return__.js +2 -2
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.d.ts +5 -0
- package/out/concepts/Role__.js +19 -2
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/Slot__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +2 -0
- package/out/concepts/SqlQueryComponent__.js +16 -0
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Start__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +2 -1
- package/out/concepts/StringLiteral__.js +1 -1
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +1 -1
- package/out/concepts/StructureProperty__.js +1 -1
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +1 -1
- package/out/concepts/Structure__.js +4 -4
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/Theme__.js.map +1 -1
- package/out/concepts/Transactional__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.js +3 -0
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.d.ts +2 -1
- package/out/concepts/UnaryExpression__.js +3 -3
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.d.ts +2 -1
- package/out/concepts/Unparsed__.js +1 -1
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/UseComponent__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +2 -1
- package/out/concepts/ValidationRule__.js +2 -2
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.d.ts +6 -5
- package/out/concepts/Variable__.js +3 -3
- 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 +5 -4
- package/out/concepts/ViewElement__.js +109 -65
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +97 -90
- package/out/concepts/View__.js +153 -118
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/basics/stdlib/index.js +2 -2
- package/out/concepts/basics/stdlib/index.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.ui.js +3 -137
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.js +21 -5
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.validation.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.validation.js +527 -0
- package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -0
- package/out/concepts/index__.d.ts +4 -0
- package/out/concepts/index__.js +4 -0
- package/out/concepts/index__.js.map +1 -1
- package/out/data/Module.d.ts +34 -0
- package/out/data/Module.js +53 -0
- package/out/data/Module.js.map +1 -0
- package/out/generator/compileComponent.d.ts +1 -1
- package/out/generator/genBundleFiles.d.ts +0 -1
- package/out/generator/genBundleFiles.js +1 -1
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genMetaData.d.ts +35 -0
- package/out/generator/genMetaData.js +78 -0
- package/out/generator/genMetaData.js.map +1 -0
- package/out/generator/index.d.ts +1 -0
- package/out/generator/index.js +1 -0
- package/out/generator/index.js.map +1 -1
- package/out/index.d.ts +2 -2
- package/out/index.js +3 -1
- package/out/index.js.map +1 -1
- package/out/server/createUiTs.d.ts +7 -0
- package/out/server/createUiTs.js +157 -0
- package/out/server/createUiTs.js.map +1 -0
- package/out/server/entity2LogicNamespace.d.ts +9 -1
- package/out/server/entity2LogicNamespace.js +11 -1
- package/out/server/entity2LogicNamespace.js.map +1 -1
- package/out/server/getExtensionModules.d.ts +3 -0
- package/out/server/getExtensionModules.js +18 -0
- package/out/server/getExtensionModules.js.map +1 -0
- package/out/server/getLogics.js +18 -15
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.d.ts +3 -2
- package/out/server/getMemberIdentifier.js +47 -15
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getProcesses.d.ts +4 -1
- package/out/server/getProcesses.js +16 -7
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/getValidates.js +1 -1
- package/out/server/getValidates.js.map +1 -1
- package/out/server/index.js +1 -0
- package/out/server/index.js.map +1 -1
- package/out/server/naslServer.d.ts +23 -5
- package/out/server/naslServer.js +199 -25
- package/out/server/naslServer.js.map +1 -1
- package/out/server/process2LogicNamespace.d.ts +15 -1
- package/out/server/process2LogicNamespace.js +30 -3
- package/out/server/process2LogicNamespace.js.map +1 -1
- package/out/server/translator.js +28 -0
- package/out/server/translator.js.map +1 -1
- package/out/service/storage/init.d.ts +5 -0
- package/out/service/storage/init.js +60 -52
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCallComponentLogic.js +2 -2
- package/out/templator/genCallComponentLogic.js.map +1 -1
- package/out/templator/genCreateBlock.js +6 -8
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +3 -3
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +4 -4
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +3 -3
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genGetBlock.js +1 -1
- package/out/templator/genGetBlock.js.map +1 -1
- package/out/templator/genListViewBlock.js +2 -2
- package/out/templator/genListViewBlock.js.map +1 -1
- package/out/templator/genSelectBlock.js +1 -1
- package/out/templator/genSelectBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +8 -12
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/templator/utils.d.ts +20 -20
- package/out/templator/utils.js +22 -22
- package/out/templator/utils.js.map +1 -1
- package/package.json +3 -1
- package/src/automate/engine/index.js +37 -3
- package/src/automate/engine/utils.js +68 -64
- package/src/common/BaseNode.ts +43 -28
- package/src/concepts/App__.ts +93 -17
- package/src/concepts/Argument__.ts +4 -2
- package/src/concepts/Assignment__.ts +5 -7
- package/src/concepts/Attribute__.ts +1 -0
- package/src/concepts/BinaryExpression__.ts +7 -5
- package/src/concepts/BindAttribute__.ts +9 -4
- package/src/concepts/BindDirective__.ts +4 -2
- package/src/concepts/BindEvent__.ts +6 -4
- package/src/concepts/BooleanLiteral__.ts +3 -1
- package/src/concepts/CallFunction__.ts +195 -11
- package/src/concepts/CallInterface__.ts +4 -2
- package/src/concepts/CallLogic__.ts +211 -12
- package/src/concepts/CallQueryComponent__.ts +2 -1
- package/src/concepts/Comment__.ts +1 -0
- package/src/concepts/CompletionProperty__.ts +1 -0
- package/src/concepts/ConfigGroup__.ts +290 -0
- package/src/concepts/ConfigPropertyValue__.ts +112 -0
- package/src/concepts/ConfigProperty__.ts +306 -0
- package/src/concepts/Configuration__.ts +286 -0
- package/src/concepts/Constant__.ts +3 -1
- package/src/concepts/DataElement__.ts +1 -0
- package/src/concepts/Destination__.ts +7 -5
- package/src/concepts/End__.ts +1 -0
- package/src/concepts/EntityIndex__.ts +19 -0
- package/src/concepts/EntityProperty__.ts +9 -8
- package/src/concepts/Entity__.ts +66 -59
- package/src/concepts/EnumItem__.ts +1 -0
- package/src/concepts/Enum__.ts +32 -12
- package/src/concepts/Event__.ts +2 -1
- package/src/concepts/ForEachStatement__.ts +115 -69
- package/src/concepts/Function__.ts +2 -1
- package/src/concepts/Identifier__.ts +18 -1
- package/src/concepts/IfStatement__.ts +1 -0
- package/src/concepts/InterfaceParam__.ts +2 -1
- package/src/concepts/Interface__.ts +21 -5
- package/src/concepts/JSBlock__.ts +1 -0
- package/src/concepts/LogicItem__.ts +9 -40
- package/src/concepts/Logic__.ts +48 -9
- package/src/concepts/MemberExpression__.ts +14 -17
- package/src/concepts/Module__.ts +158 -139
- package/src/concepts/Namespace__.ts +13 -12
- package/src/concepts/NullLiteral__.ts +3 -1
- package/src/concepts/NumericLiteral__.ts +3 -1
- package/src/concepts/Param__.ts +3 -2
- package/src/concepts/Point__.ts +1 -0
- package/src/concepts/ProcessComponent__.ts +3 -2
- package/src/concepts/ProcessElement__.ts +102 -107
- package/src/concepts/ProcessOutcome__.ts +1 -0
- package/src/concepts/Process__.ts +12 -4
- package/src/concepts/QueryAggregateExpression__.ts +1 -0
- package/src/concepts/QueryFieldExpression__.ts +2 -1
- package/src/concepts/QueryFromExpression__.ts +1 -0
- package/src/concepts/QueryGroupByExpression__.ts +1 -0
- package/src/concepts/QueryJoinExpression__.ts +2 -1
- package/src/concepts/QueryLimitExpression__.ts +1 -0
- package/src/concepts/QueryOrderByExpression__.ts +1 -0
- package/src/concepts/QuerySelectExpression__.ts +2 -1
- package/src/concepts/Rect__.ts +1 -0
- package/src/concepts/Return__.ts +3 -2
- package/src/concepts/Role__.ts +19 -2
- package/src/concepts/Slot__.ts +1 -0
- package/src/concepts/SqlQueryComponent__.ts +11 -1
- package/src/concepts/Start__.ts +1 -0
- package/src/concepts/StringLiteral__.ts +3 -1
- package/src/concepts/StructureProperty__.ts +2 -1
- package/src/concepts/Structure__.ts +5 -4
- package/src/concepts/SwitchCase__.ts +1 -0
- package/src/concepts/SwitchStatement__.ts +1 -0
- package/src/concepts/Theme__.ts +1 -0
- package/src/concepts/Transactional__.ts +1 -0
- package/src/concepts/TypeAnnotation__.ts +4 -0
- package/src/concepts/TypeParam__.ts +1 -0
- package/src/concepts/UnaryExpression__.ts +6 -3
- package/src/concepts/Unparsed__.ts +3 -1
- package/src/concepts/UseComponent__.ts +1 -0
- package/src/concepts/ValidationRule__.ts +5 -2
- package/src/concepts/Variable__.ts +12 -6
- package/src/concepts/ViewComponent__.ts +6 -5
- package/src/concepts/ViewElement__.ts +109 -80
- package/src/concepts/View__.ts +245 -206
- package/src/concepts/WhileStatement__.ts +1 -0
- package/src/concepts/basics/stdlib/index.ts +2 -2
- package/src/concepts/basics/stdlib/nasl.ui.ts +3 -137
- package/src/concepts/basics/stdlib/nasl.util.ts +21 -5
- package/src/concepts/basics/stdlib/{nasl.validate.ts → nasl.validation.ts} +28 -28
- package/src/concepts/index__.ts +4 -0
- package/src/generator/compileComponent.ts +1 -1
- package/src/generator/genBundleFiles.ts +1 -2
- package/src/generator/genMetaData.ts +111 -0
- package/src/generator/index.ts +1 -0
- package/src/index.ts +2 -2
- package/src/server/createUiTs.ts +153 -0
- package/src/server/entity2LogicNamespace.ts +17 -1
- package/src/server/getExtensionModules.ts +13 -0
- package/src/server/getLogics.ts +19 -18
- package/src/server/getMemberIdentifier.ts +60 -19
- package/src/server/getProcesses.ts +15 -8
- package/src/server/getValidates.ts +1 -1
- package/src/server/index.ts +2 -1
- package/src/server/naslServer.ts +204 -24
- package/src/server/process2LogicNamespace.ts +44 -3
- package/src/server/translator.ts +121 -97
- package/src/service/config/api.js +32 -0
- package/src/service/config/index.js +6 -0
- package/src/service/creator/index.js +2 -2
- package/src/service/logic/checktypeSocket.js +49 -0
- package/src/service/modules/api.js +20 -0
- package/src/service/modules/index.js +6 -0
- package/src/service/storage/init.ts +62 -54
- package/src/templator/genCallComponentLogic.ts +2 -2
- package/src/templator/genCreateBlock.ts +19 -25
- package/src/templator/genCurdEditMultipleKeyBlock.ts +3 -3
- package/src/templator/genCurdMultipleKeyBlock.ts +4 -4
- package/src/templator/genEditTableBlock.ts +3 -3
- package/src/templator/genGetBlock.ts +1 -1
- package/src/templator/genListViewBlock.ts +2 -2
- package/src/templator/genSelectBlock.ts +1 -1
- package/src/templator/genUpdateBlock.ts +19 -25
- package/src/templator/utils.ts +25 -153
package/src/concepts/Module__.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { EventPayload, Params } from '../common/EventEmitter';
|
|
|
13
13
|
import { concept, excludedInJSON, property } from '../decorators';
|
|
14
14
|
|
|
15
15
|
import * as utils from '../utils';
|
|
16
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
16
17
|
import BaseNode from '../common/BaseNode';
|
|
17
18
|
import classMap from '../common/classMap';
|
|
18
19
|
import Entity from './Entity__';
|
|
@@ -70,7 +71,7 @@ export class Module extends BaseNode {
|
|
|
70
71
|
* 外部语言依赖
|
|
71
72
|
*/
|
|
72
73
|
@property()
|
|
73
|
-
externalDependencyMap: { maven?: Array<{ groupId: string
|
|
74
|
+
externalDependencyMap: { maven?: Array<{ groupId: string, artifactId: string, version: string }> } = undefined;
|
|
74
75
|
|
|
75
76
|
/**
|
|
76
77
|
* 实体列表
|
|
@@ -151,34 +152,35 @@ export class Module extends BaseNode {
|
|
|
151
152
|
}
|
|
152
153
|
return params;
|
|
153
154
|
}
|
|
155
|
+
|
|
154
156
|
|
|
155
|
-
|
|
157
|
+
getEntityExistingNames(excludedList: Array<Entity> = []) {
|
|
156
158
|
const excludedSet = new Set(excludedList);
|
|
157
|
-
return this.entities.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
159
|
+
return (this.entities || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
158
160
|
}
|
|
159
161
|
getEntityUniqueName(name = 'Entity1') {
|
|
160
162
|
return utils.unique(name, this.getEntityExistingNames());
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
/**
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
* 插入实体
|
|
167
|
+
* @internal
|
|
168
|
+
* @param name 实体名称,如果不填会自动生成一个唯一名称
|
|
169
|
+
*/
|
|
168
170
|
_insertEntityAt(name: string, index: number): Entity;
|
|
169
171
|
|
|
170
172
|
/**
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
* 插入实体
|
|
174
|
+
* @internal
|
|
175
|
+
* @param entityOptions 实体参数
|
|
176
|
+
*/
|
|
175
177
|
_insertEntityAt(entityOptions: Partial<Entity>, index: number): Entity;
|
|
176
178
|
|
|
177
179
|
/**
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
* 插入实体
|
|
181
|
+
* @internal
|
|
182
|
+
* @param entity 已有的实体实例
|
|
183
|
+
*/
|
|
182
184
|
_insertEntityAt(entity: Entity, index: number): Entity;
|
|
183
185
|
|
|
184
186
|
_insertEntityAt(options: string | Partial<Entity> | Entity, index: number) {
|
|
@@ -293,33 +295,34 @@ export class Module extends BaseNode {
|
|
|
293
295
|
return node;
|
|
294
296
|
}
|
|
295
297
|
|
|
298
|
+
|
|
296
299
|
getStructureExistingNames(excludedList: Array<Structure> = []) {
|
|
297
300
|
const excludedSet = new Set(excludedList);
|
|
298
|
-
return this.structures.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
301
|
+
return (this.structures || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
299
302
|
}
|
|
300
303
|
getStructureUniqueName(name = 'Structure1') {
|
|
301
304
|
return utils.unique(name, this.getStructureExistingNames());
|
|
302
305
|
}
|
|
303
306
|
|
|
304
307
|
/**
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
308
|
+
* 插入数据结构
|
|
309
|
+
* @internal
|
|
310
|
+
* @param name 数据结构名称,如果不填会自动生成一个唯一名称
|
|
311
|
+
*/
|
|
309
312
|
_insertStructureAt(name: string, index: number): Structure;
|
|
310
313
|
|
|
311
314
|
/**
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
315
|
+
* 插入数据结构
|
|
316
|
+
* @internal
|
|
317
|
+
* @param structureOptions 数据结构参数
|
|
318
|
+
*/
|
|
316
319
|
_insertStructureAt(structureOptions: Partial<Structure>, index: number): Structure;
|
|
317
320
|
|
|
318
321
|
/**
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
322
|
+
* 插入数据结构
|
|
323
|
+
* @internal
|
|
324
|
+
* @param structure 已有的数据结构实例
|
|
325
|
+
*/
|
|
323
326
|
_insertStructureAt(structure: Structure, index: number): Structure;
|
|
324
327
|
|
|
325
328
|
_insertStructureAt(options: string | Partial<Structure> | Structure, index: number) {
|
|
@@ -434,33 +437,34 @@ export class Module extends BaseNode {
|
|
|
434
437
|
return node;
|
|
435
438
|
}
|
|
436
439
|
|
|
440
|
+
|
|
437
441
|
getEnumExistingNames(excludedList: Array<Enum> = []) {
|
|
438
442
|
const excludedSet = new Set(excludedList);
|
|
439
|
-
return this.enums.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
443
|
+
return (this.enums || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
440
444
|
}
|
|
441
445
|
getEnumUniqueName(name = 'Enum1') {
|
|
442
446
|
return utils.unique(name, this.getEnumExistingNames());
|
|
443
447
|
}
|
|
444
448
|
|
|
445
449
|
/**
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
+
* 插入枚举
|
|
451
|
+
* @internal
|
|
452
|
+
* @param name 枚举名称,如果不填会自动生成一个唯一名称
|
|
453
|
+
*/
|
|
450
454
|
_insertEnumAt(name: string, index: number): Enum;
|
|
451
455
|
|
|
452
456
|
/**
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
+
* 插入枚举
|
|
458
|
+
* @internal
|
|
459
|
+
* @param enumerationOptions 枚举参数
|
|
460
|
+
*/
|
|
457
461
|
_insertEnumAt(enumerationOptions: Partial<Enum>, index: number): Enum;
|
|
458
462
|
|
|
459
463
|
/**
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
+
* 插入枚举
|
|
465
|
+
* @internal
|
|
466
|
+
* @param enumeration 已有的枚举实例
|
|
467
|
+
*/
|
|
464
468
|
_insertEnumAt(enumeration: Enum, index: number): Enum;
|
|
465
469
|
|
|
466
470
|
_insertEnumAt(options: string | Partial<Enum> | Enum, index: number) {
|
|
@@ -575,33 +579,34 @@ export class Module extends BaseNode {
|
|
|
575
579
|
return node;
|
|
576
580
|
}
|
|
577
581
|
|
|
582
|
+
|
|
578
583
|
getLogicExistingNames(excludedList: Array<Logic> = []) {
|
|
579
584
|
const excludedSet = new Set(excludedList);
|
|
580
|
-
return this.logics.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
585
|
+
return (this.logics || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
581
586
|
}
|
|
582
587
|
getLogicUniqueName(name = 'logic1') {
|
|
583
588
|
return utils.unique(name, this.getLogicExistingNames());
|
|
584
589
|
}
|
|
585
590
|
|
|
586
591
|
/**
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
592
|
+
* 插入逻辑
|
|
593
|
+
* @internal
|
|
594
|
+
* @param name 逻辑名称,如果不填会自动生成一个唯一名称
|
|
595
|
+
*/
|
|
591
596
|
_insertLogicAt(name: string, index: number): Logic;
|
|
592
597
|
|
|
593
598
|
/**
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
599
|
+
* 插入逻辑
|
|
600
|
+
* @internal
|
|
601
|
+
* @param logicOptions 逻辑参数
|
|
602
|
+
*/
|
|
598
603
|
_insertLogicAt(logicOptions: Partial<Logic>, index: number): Logic;
|
|
599
604
|
|
|
600
605
|
/**
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
606
|
+
* 插入逻辑
|
|
607
|
+
* @internal
|
|
608
|
+
* @param logic 已有的逻辑实例
|
|
609
|
+
*/
|
|
605
610
|
_insertLogicAt(logic: Logic, index: number): Logic;
|
|
606
611
|
|
|
607
612
|
_insertLogicAt(options: string | Partial<Logic> | Logic, index: number) {
|
|
@@ -716,33 +721,34 @@ export class Module extends BaseNode {
|
|
|
716
721
|
return node;
|
|
717
722
|
}
|
|
718
723
|
|
|
724
|
+
|
|
719
725
|
getInterfaceExistingNames(excludedList: Array<Interface> = []) {
|
|
720
726
|
const excludedSet = new Set(excludedList);
|
|
721
|
-
return this.interfaces.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
727
|
+
return (this.interfaces || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
722
728
|
}
|
|
723
729
|
getInterfaceUniqueName(name = 'Interface1') {
|
|
724
730
|
return utils.unique(name, this.getInterfaceExistingNames());
|
|
725
731
|
}
|
|
726
732
|
|
|
727
733
|
/**
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
734
|
+
* 插入接口
|
|
735
|
+
* @internal
|
|
736
|
+
* @param name 接口名称,如果不填会自动生成一个唯一名称
|
|
737
|
+
*/
|
|
732
738
|
_insertInterfaceAt(name: string, index: number): Interface;
|
|
733
739
|
|
|
734
740
|
/**
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
741
|
+
* 插入接口
|
|
742
|
+
* @internal
|
|
743
|
+
* @param itfaceOptions 接口参数
|
|
744
|
+
*/
|
|
739
745
|
_insertInterfaceAt(itfaceOptions: Partial<Interface>, index: number): Interface;
|
|
740
746
|
|
|
741
747
|
/**
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
748
|
+
* 插入接口
|
|
749
|
+
* @internal
|
|
750
|
+
* @param itface 已有的接口实例
|
|
751
|
+
*/
|
|
746
752
|
_insertInterfaceAt(itface: Interface, index: number): Interface;
|
|
747
753
|
|
|
748
754
|
_insertInterfaceAt(options: string | Partial<Interface> | Interface, index: number) {
|
|
@@ -857,33 +863,34 @@ export class Module extends BaseNode {
|
|
|
857
863
|
return node;
|
|
858
864
|
}
|
|
859
865
|
|
|
866
|
+
|
|
860
867
|
getViewExistingNames(excludedList: Array<View> = []) {
|
|
861
868
|
const excludedSet = new Set(excludedList);
|
|
862
|
-
return this.views.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
869
|
+
return (this.views || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
863
870
|
}
|
|
864
871
|
getViewUniqueName(name = 'view1') {
|
|
865
872
|
return utils.unique(name, this.getViewExistingNames());
|
|
866
873
|
}
|
|
867
874
|
|
|
868
875
|
/**
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
876
|
+
* 插入页面
|
|
877
|
+
* @internal
|
|
878
|
+
* @param name 页面名称,如果不填会自动生成一个唯一名称
|
|
879
|
+
*/
|
|
873
880
|
_insertViewAt(name: string, index: number): View;
|
|
874
881
|
|
|
875
882
|
/**
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
883
|
+
* 插入页面
|
|
884
|
+
* @internal
|
|
885
|
+
* @param viewOptions 页面参数
|
|
886
|
+
*/
|
|
880
887
|
_insertViewAt(viewOptions: Partial<View>, index: number): View;
|
|
881
888
|
|
|
882
889
|
/**
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
890
|
+
* 插入页面
|
|
891
|
+
* @internal
|
|
892
|
+
* @param view 已有的页面实例
|
|
893
|
+
*/
|
|
887
894
|
_insertViewAt(view: View, index: number): View;
|
|
888
895
|
|
|
889
896
|
_insertViewAt(options: string | Partial<View> | View, index: number) {
|
|
@@ -998,33 +1005,34 @@ export class Module extends BaseNode {
|
|
|
998
1005
|
return node;
|
|
999
1006
|
}
|
|
1000
1007
|
|
|
1008
|
+
|
|
1001
1009
|
getProcessExistingNames(excludedList: Array<Process> = []) {
|
|
1002
1010
|
const excludedSet = new Set(excludedList);
|
|
1003
|
-
return this.processes.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1011
|
+
return (this.processes || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1004
1012
|
}
|
|
1005
1013
|
getProcessUniqueName(name = 'Process1') {
|
|
1006
1014
|
return utils.unique(name, this.getProcessExistingNames());
|
|
1007
1015
|
}
|
|
1008
1016
|
|
|
1009
1017
|
/**
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1018
|
+
* 插入流程
|
|
1019
|
+
* @internal
|
|
1020
|
+
* @param name 流程名称,如果不填会自动生成一个唯一名称
|
|
1021
|
+
*/
|
|
1014
1022
|
_insertProcessAt(name: string, index: number): Process;
|
|
1015
1023
|
|
|
1016
1024
|
/**
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1025
|
+
* 插入流程
|
|
1026
|
+
* @internal
|
|
1027
|
+
* @param processOptions 流程参数
|
|
1028
|
+
*/
|
|
1021
1029
|
_insertProcessAt(processOptions: Partial<Process>, index: number): Process;
|
|
1022
1030
|
|
|
1023
1031
|
/**
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1032
|
+
* 插入流程
|
|
1033
|
+
* @internal
|
|
1034
|
+
* @param process 已有的流程实例
|
|
1035
|
+
*/
|
|
1028
1036
|
_insertProcessAt(process: Process, index: number): Process;
|
|
1029
1037
|
|
|
1030
1038
|
_insertProcessAt(options: string | Partial<Process> | Process, index: number) {
|
|
@@ -1139,33 +1147,34 @@ export class Module extends BaseNode {
|
|
|
1139
1147
|
return node;
|
|
1140
1148
|
}
|
|
1141
1149
|
|
|
1150
|
+
|
|
1142
1151
|
getViewComponentExistingNames(excludedList: Array<ViewComponent> = []) {
|
|
1143
1152
|
const excludedSet = new Set(excludedList);
|
|
1144
|
-
return this.viewComponents.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1153
|
+
return (this.viewComponents || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1145
1154
|
}
|
|
1146
1155
|
getViewComponentUniqueName(name = 'viewComponent1') {
|
|
1147
1156
|
return utils.unique(name, this.getViewComponentExistingNames());
|
|
1148
1157
|
}
|
|
1149
1158
|
|
|
1150
1159
|
/**
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1160
|
+
* 插入页面组件
|
|
1161
|
+
* @internal
|
|
1162
|
+
* @param name 页面组件名称,如果不填会自动生成一个唯一名称
|
|
1163
|
+
*/
|
|
1155
1164
|
_insertViewComponentAt(name: string, index: number): ViewComponent;
|
|
1156
1165
|
|
|
1157
1166
|
/**
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1167
|
+
* 插入页面组件
|
|
1168
|
+
* @internal
|
|
1169
|
+
* @param viewComponentOptions 页面组件参数
|
|
1170
|
+
*/
|
|
1162
1171
|
_insertViewComponentAt(viewComponentOptions: Partial<ViewComponent>, index: number): ViewComponent;
|
|
1163
1172
|
|
|
1164
1173
|
/**
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1174
|
+
* 插入页面组件
|
|
1175
|
+
* @internal
|
|
1176
|
+
* @param viewComponent 已有的页面组件实例
|
|
1177
|
+
*/
|
|
1169
1178
|
_insertViewComponentAt(viewComponent: ViewComponent, index: number): ViewComponent;
|
|
1170
1179
|
|
|
1171
1180
|
_insertViewComponentAt(options: string | Partial<ViewComponent> | ViewComponent, index: number) {
|
|
@@ -1280,10 +1289,13 @@ export class Module extends BaseNode {
|
|
|
1280
1289
|
return node;
|
|
1281
1290
|
}
|
|
1282
1291
|
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
|
|
1283
1295
|
/**
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1296
|
+
* 删除实体
|
|
1297
|
+
* @param name 实体名称
|
|
1298
|
+
*/
|
|
1287
1299
|
removeEntity(name: string): void;
|
|
1288
1300
|
|
|
1289
1301
|
/**
|
|
@@ -1328,10 +1340,12 @@ export class Module extends BaseNode {
|
|
|
1328
1340
|
return params;
|
|
1329
1341
|
}
|
|
1330
1342
|
|
|
1343
|
+
|
|
1344
|
+
|
|
1331
1345
|
/**
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1346
|
+
* 删除数据结构
|
|
1347
|
+
* @param name 数据结构名称
|
|
1348
|
+
*/
|
|
1335
1349
|
removeStructure(name: string): void;
|
|
1336
1350
|
|
|
1337
1351
|
/**
|
|
@@ -1376,10 +1390,12 @@ export class Module extends BaseNode {
|
|
|
1376
1390
|
return params;
|
|
1377
1391
|
}
|
|
1378
1392
|
|
|
1393
|
+
|
|
1394
|
+
|
|
1379
1395
|
/**
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1396
|
+
* 删除枚举
|
|
1397
|
+
* @param name 枚举名称
|
|
1398
|
+
*/
|
|
1383
1399
|
removeEnum(name: string): void;
|
|
1384
1400
|
|
|
1385
1401
|
/**
|
|
@@ -1424,10 +1440,12 @@ export class Module extends BaseNode {
|
|
|
1424
1440
|
return params;
|
|
1425
1441
|
}
|
|
1426
1442
|
|
|
1443
|
+
|
|
1444
|
+
|
|
1427
1445
|
/**
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1446
|
+
* 删除逻辑
|
|
1447
|
+
* @param name 逻辑名称
|
|
1448
|
+
*/
|
|
1431
1449
|
removeLogic(name: string): void;
|
|
1432
1450
|
|
|
1433
1451
|
/**
|
|
@@ -1472,10 +1490,12 @@ export class Module extends BaseNode {
|
|
|
1472
1490
|
return params;
|
|
1473
1491
|
}
|
|
1474
1492
|
|
|
1493
|
+
|
|
1494
|
+
|
|
1475
1495
|
/**
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1496
|
+
* 删除接口
|
|
1497
|
+
* @param name 接口名称
|
|
1498
|
+
*/
|
|
1479
1499
|
removeInterface(name: string): void;
|
|
1480
1500
|
|
|
1481
1501
|
/**
|
|
@@ -1520,10 +1540,12 @@ export class Module extends BaseNode {
|
|
|
1520
1540
|
return params;
|
|
1521
1541
|
}
|
|
1522
1542
|
|
|
1543
|
+
|
|
1544
|
+
|
|
1523
1545
|
/**
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1546
|
+
* 删除页面
|
|
1547
|
+
* @param name 页面名称
|
|
1548
|
+
*/
|
|
1527
1549
|
removeView(name: string): void;
|
|
1528
1550
|
|
|
1529
1551
|
/**
|
|
@@ -1568,10 +1590,12 @@ export class Module extends BaseNode {
|
|
|
1568
1590
|
return params;
|
|
1569
1591
|
}
|
|
1570
1592
|
|
|
1593
|
+
|
|
1594
|
+
|
|
1571
1595
|
/**
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1596
|
+
* 删除流程
|
|
1597
|
+
* @param name 流程名称
|
|
1598
|
+
*/
|
|
1575
1599
|
removeProcess(name: string): void;
|
|
1576
1600
|
|
|
1577
1601
|
/**
|
|
@@ -1616,10 +1640,12 @@ export class Module extends BaseNode {
|
|
|
1616
1640
|
return params;
|
|
1617
1641
|
}
|
|
1618
1642
|
|
|
1643
|
+
|
|
1644
|
+
|
|
1619
1645
|
/**
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1646
|
+
* 删除页面组件
|
|
1647
|
+
* @param name 页面组件名称
|
|
1648
|
+
*/
|
|
1623
1649
|
removeViewComponent(name: string): void;
|
|
1624
1650
|
|
|
1625
1651
|
/**
|
|
@@ -1669,18 +1695,11 @@ export class Module extends BaseNode {
|
|
|
1669
1695
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
1670
1696
|
//================================================================================
|
|
1671
1697
|
|
|
1672
|
-
/**
|
|
1673
|
-
* 获取命名空间
|
|
1674
|
-
* 暂时不考虑 Module 嵌套的情况
|
|
1675
|
-
*/
|
|
1676
|
-
getNamespace() {
|
|
1677
|
-
return `${this.app.getNamespace()}.${this.name}`;
|
|
1678
|
-
}
|
|
1679
1698
|
/**
|
|
1680
1699
|
* 获取命名空间和
|
|
1681
1700
|
* 暂时不考虑 Module 嵌套的情况
|
|
1682
1701
|
*/
|
|
1683
|
-
|
|
1702
|
+
getNamespace() {
|
|
1684
1703
|
return `${moduleNameSpace[this.parentKey as ModuleKeyType]}.${this.name}`;
|
|
1685
1704
|
}
|
|
1686
1705
|
|
|
@@ -1698,7 +1717,7 @@ export class Module extends BaseNode {
|
|
|
1698
1717
|
//================================================================================
|
|
1699
1718
|
}
|
|
1700
1719
|
|
|
1701
|
-
classMap
|
|
1720
|
+
classMap['Module'] = Module;
|
|
1702
1721
|
export default Module;
|
|
1703
1722
|
//================================================================================
|
|
1704
1723
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -6,6 +6,7 @@ import { EventPayload, Params } from '../common/EventEmitter';
|
|
|
6
6
|
import { concept, excludedInJSON, property } from '../decorators';
|
|
7
7
|
|
|
8
8
|
import * as utils from '../utils';
|
|
9
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
9
10
|
import BaseNode from '../common/BaseNode';
|
|
10
11
|
import classMap from '../common/classMap';
|
|
11
12
|
import Process from './Process__';
|
|
@@ -157,7 +158,7 @@ export class Namespace extends BaseNode {
|
|
|
157
158
|
|
|
158
159
|
getNamespaceExistingNames(excludedList: Array<Namespace> = []) {
|
|
159
160
|
const excludedSet = new Set(excludedList);
|
|
160
|
-
return this.children.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
161
|
+
return (this.children || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
161
162
|
}
|
|
162
163
|
getNamespaceUniqueName(name = 'namespace1') {
|
|
163
164
|
return utils.unique(name, this.getNamespaceExistingNames());
|
|
@@ -299,7 +300,7 @@ export class Namespace extends BaseNode {
|
|
|
299
300
|
|
|
300
301
|
getProcessExistingNames(excludedList: Array<Process> = []) {
|
|
301
302
|
const excludedSet = new Set(excludedList);
|
|
302
|
-
return this.processes.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
303
|
+
return (this.processes || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
303
304
|
}
|
|
304
305
|
getProcessUniqueName(name = 'Process1') {
|
|
305
306
|
return utils.unique(name, this.getProcessExistingNames());
|
|
@@ -441,7 +442,7 @@ export class Namespace extends BaseNode {
|
|
|
441
442
|
|
|
442
443
|
getEntityExistingNames(excludedList: Array<Entity> = []) {
|
|
443
444
|
const excludedSet = new Set(excludedList);
|
|
444
|
-
return this.entities.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
445
|
+
return (this.entities || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
445
446
|
}
|
|
446
447
|
getEntityUniqueName(name = 'Entity1') {
|
|
447
448
|
return utils.unique(name, this.getEntityExistingNames());
|
|
@@ -583,7 +584,7 @@ export class Namespace extends BaseNode {
|
|
|
583
584
|
|
|
584
585
|
getStructureExistingNames(excludedList: Array<Structure> = []) {
|
|
585
586
|
const excludedSet = new Set(excludedList);
|
|
586
|
-
return this.structures.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
587
|
+
return (this.structures || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
587
588
|
}
|
|
588
589
|
getStructureUniqueName(name = 'Structure1') {
|
|
589
590
|
return utils.unique(name, this.getStructureExistingNames());
|
|
@@ -725,7 +726,7 @@ export class Namespace extends BaseNode {
|
|
|
725
726
|
|
|
726
727
|
getEnumExistingNames(excludedList: Array<Enum> = []) {
|
|
727
728
|
const excludedSet = new Set(excludedList);
|
|
728
|
-
return this.enums.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
729
|
+
return (this.enums || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
729
730
|
}
|
|
730
731
|
getEnumUniqueName(name = 'Enum1') {
|
|
731
732
|
return utils.unique(name, this.getEnumExistingNames());
|
|
@@ -867,7 +868,7 @@ export class Namespace extends BaseNode {
|
|
|
867
868
|
|
|
868
869
|
getLogicExistingNames(excludedList: Array<Logic> = []) {
|
|
869
870
|
const excludedSet = new Set(excludedList);
|
|
870
|
-
return this.logics.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
871
|
+
return (this.logics || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
871
872
|
}
|
|
872
873
|
getLogicUniqueName(name = 'logic1') {
|
|
873
874
|
return utils.unique(name, this.getLogicExistingNames());
|
|
@@ -1009,7 +1010,7 @@ export class Namespace extends BaseNode {
|
|
|
1009
1010
|
|
|
1010
1011
|
getFunctionExistingNames(excludedList: Array<Function> = []) {
|
|
1011
1012
|
const excludedSet = new Set(excludedList);
|
|
1012
|
-
return this.functions.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1013
|
+
return (this.functions || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1013
1014
|
}
|
|
1014
1015
|
getFunctionUniqueName(name = 'func1') {
|
|
1015
1016
|
return utils.unique(name, this.getFunctionExistingNames());
|
|
@@ -1151,7 +1152,7 @@ export class Namespace extends BaseNode {
|
|
|
1151
1152
|
|
|
1152
1153
|
getInterfaceExistingNames(excludedList: Array<Interface> = []) {
|
|
1153
1154
|
const excludedSet = new Set(excludedList);
|
|
1154
|
-
return this.interfaces.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1155
|
+
return (this.interfaces || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1155
1156
|
}
|
|
1156
1157
|
getInterfaceUniqueName(name = 'Interface1') {
|
|
1157
1158
|
return utils.unique(name, this.getInterfaceExistingNames());
|
|
@@ -1293,7 +1294,7 @@ export class Namespace extends BaseNode {
|
|
|
1293
1294
|
|
|
1294
1295
|
getViewExistingNames(excludedList: Array<View> = []) {
|
|
1295
1296
|
const excludedSet = new Set(excludedList);
|
|
1296
|
-
return this.views.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1297
|
+
return (this.views || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1297
1298
|
}
|
|
1298
1299
|
getViewUniqueName(name = 'view1') {
|
|
1299
1300
|
return utils.unique(name, this.getViewExistingNames());
|
|
@@ -1435,7 +1436,7 @@ export class Namespace extends BaseNode {
|
|
|
1435
1436
|
|
|
1436
1437
|
getVariableExistingNames(excludedList: Array<Variable> = []) {
|
|
1437
1438
|
const excludedSet = new Set(excludedList);
|
|
1438
|
-
return this.variables.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1439
|
+
return (this.variables || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1439
1440
|
}
|
|
1440
1441
|
getVariableUniqueName(name = 'variable1') {
|
|
1441
1442
|
return utils.unique(name, this.getVariableExistingNames());
|
|
@@ -1577,7 +1578,7 @@ export class Namespace extends BaseNode {
|
|
|
1577
1578
|
|
|
1578
1579
|
getViewComponentExistingNames(excludedList: Array<ViewComponent> = []) {
|
|
1579
1580
|
const excludedSet = new Set(excludedList);
|
|
1580
|
-
return this.viewComponents.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1581
|
+
return (this.viewComponents || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1581
1582
|
}
|
|
1582
1583
|
getViewComponentUniqueName(name = 'viewComponent1') {
|
|
1583
1584
|
return utils.unique(name, this.getViewComponentExistingNames());
|
|
@@ -1719,7 +1720,7 @@ export class Namespace extends BaseNode {
|
|
|
1719
1720
|
|
|
1720
1721
|
getProcessComponentExistingNames(excludedList: Array<ProcessComponent> = []) {
|
|
1721
1722
|
const excludedSet = new Set(excludedList);
|
|
1722
|
-
return this.processComponents.filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1723
|
+
return (this.processComponents || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1723
1724
|
}
|
|
1724
1725
|
getProcessComponentUniqueName(name = 'processComponent1') {
|
|
1725
1726
|
return utils.unique(name, this.getProcessComponentExistingNames());
|