@lcap/nasl 2.12.0 → 2.13.0-beta
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/package.json +1 -1
- package/src/bak/translator.js +8 -1
- package/src/common/BaseNode.ts +1 -1
- package/src/concepts/App__.ts +38 -1
- package/src/concepts/Argument__.ts +1 -1
- package/src/concepts/Assignee__.ts +1 -1
- package/src/concepts/Assignment__.ts +1 -1
- package/src/concepts/Attribute__.ts +1 -1
- package/src/concepts/BinaryExpression__.ts +21 -4
- package/src/concepts/BindAttribute__.ts +1 -1
- package/src/concepts/BindDirective__.ts +4 -0
- package/src/concepts/BindEvent__.ts +416 -59
- package/src/concepts/BooleanLiteral__.ts +1 -1
- package/src/concepts/CallFunction__.ts +1 -1
- package/src/concepts/CallInterface__.ts +3 -1
- package/src/concepts/CallLogic__.ts +1 -1
- package/src/concepts/CallQueryComponent__.ts +1 -1
- package/src/concepts/Comment__.ts +1 -1
- package/src/concepts/CompletionProperty__.ts +1 -2
- package/src/concepts/ConfigGroup__.ts +1 -1
- package/src/concepts/ConfigPropertyValue__.ts +1 -1
- package/src/concepts/ConfigProperty__.ts +1 -1
- package/src/concepts/Configuration__.ts +1 -1
- package/src/concepts/Constant__.ts +1 -1
- package/src/concepts/DataElement__.ts +1 -1
- package/src/concepts/DataSource__.ts +1 -1
- package/src/concepts/Destination__.ts +3 -2
- package/src/concepts/End__.ts +1 -1
- package/src/concepts/EntityIndex__.ts +1 -1
- package/src/concepts/EntityProperty__.ts +1 -1
- package/src/concepts/Entity__.ts +1 -2
- package/src/concepts/EnumItem__.ts +1 -1
- package/src/concepts/Enum__.ts +1 -1
- package/src/concepts/Event__.ts +1 -1
- package/src/concepts/ForEachStatement__.ts +1 -1
- package/src/concepts/Function__.ts +65 -41
- package/src/concepts/Identifier__.ts +2 -2
- package/src/concepts/IfStatement__.ts +1 -1
- package/src/concepts/InterfaceParam__.ts +1 -1
- package/src/concepts/Interface__.ts +2 -1
- package/src/concepts/JSBlock__.ts +7 -0
- package/src/concepts/LogicItem__.ts +1 -1
- package/src/concepts/Logic__.ts +116 -14
- package/src/concepts/MemberExpression__.ts +1 -1
- package/src/concepts/Module__.ts +129 -107
- package/src/concepts/Namespace__.ts +1 -1
- package/src/concepts/NullLiteral__.ts +1 -1
- package/src/concepts/NumericLiteral__.ts +1 -1
- package/src/concepts/Param__.ts +7 -1
- package/src/concepts/Point__.ts +1 -1
- package/src/concepts/ProcessComponent__.ts +1 -1
- package/src/concepts/ProcessElement__.ts +228 -2
- package/src/concepts/ProcessOutcome__.ts +1 -1
- package/src/concepts/Process__.ts +242 -3
- package/src/concepts/QueryAggregateExpression__.ts +1 -1
- package/src/concepts/QueryFieldExpression__.ts +1 -1
- package/src/concepts/QueryFromExpression__.ts +1 -1
- package/src/concepts/QueryGroupByExpression__.ts +1 -1
- package/src/concepts/QueryJoinExpression__.ts +1 -1
- package/src/concepts/QueryLimitExpression__.ts +1 -1
- package/src/concepts/QueryOrderByExpression__.ts +1 -1
- package/src/concepts/QuerySelectExpression__.ts +1 -1
- package/src/concepts/Rect__.ts +1 -1
- package/src/concepts/Return__.ts +1 -1
- package/src/concepts/Role__.ts +1 -1
- package/src/concepts/Slot__.ts +1 -1
- package/src/concepts/SqlQueryComponent__.ts +14 -4
- package/src/concepts/Start__.ts +1 -1
- package/src/concepts/StringLiteral__.ts +1 -1
- package/src/concepts/StructureProperty__.ts +4 -0
- package/src/concepts/Structure__.ts +1 -1
- package/src/concepts/SwitchCase__.ts +1 -1
- package/src/concepts/SwitchStatement__.ts +1 -1
- package/src/concepts/Theme__.ts +1 -1
- package/src/concepts/Transactional__.ts +1 -1
- package/src/concepts/TypeAnnotation__.ts +32 -3
- package/src/concepts/TypeParam__.ts +1 -1
- package/src/concepts/UnaryExpression__.ts +1 -1
- package/src/concepts/Unparsed__.ts +1 -1
- package/src/concepts/UseComponent__.ts +1 -1
- package/src/concepts/ValidationRule__.ts +1 -1
- package/src/concepts/Variable__.ts +1 -1
- package/src/concepts/ViewComponent__.ts +1 -1
- package/src/concepts/ViewElement__.ts +34 -17
- package/src/concepts/View__.ts +75 -12
- package/src/concepts/WhileStatement__.ts +1 -1
- package/src/concepts/basics/stdlib/nasl.ui.ts +4 -0
- package/src/concepts/basics/stdlib/nasl.util.ts +2 -2
- package/src/concepts/basics/types/coreTypeList.ts +1 -0
- package/src/enums/KEYWORDS.ts +3 -0
- package/src/server/createUiTs.ts +26 -2
- package/src/server/events.yaml +89 -0
- package/src/server/getMemberIdentifier.ts +121 -28
- package/src/server/getProcesses.ts +30 -29
- package/src/server/index.ts +4 -0
- package/src/server/naslServer.ts +46 -12
- package/src/server/translator.ts +25 -13
- package/src/templator/genCreateBlock.ts +4 -0
- package/src/templator/genCurdEditMultipleKeyBlock.ts +10 -3
- package/src/templator/genCurdMultipleKeyBlock.ts +36 -21
- package/src/templator/genEditTableBlock.ts +2 -27
- package/src/templator/genGridViewBlock.ts +0 -13
- package/src/templator/genTableBlock.ts +0 -13
- package/src/templator/genUpdateBlock.ts +4 -0
- package/src/templator/utils.ts +1 -0
- package/out/automate/engine/index.d.ts +0 -4
- package/out/automate/engine/index.js +0 -436
- package/out/automate/engine/index.js.map +0 -1
- package/out/automate/engine/operators.d.ts +0 -21
- package/out/automate/engine/operators.js +0 -161
- package/out/automate/engine/operators.js.map +0 -1
- package/out/automate/engine/uniqueName.d.ts +0 -12
- package/out/automate/engine/uniqueName.js +0 -107
- package/out/automate/engine/uniqueName.js.map +0 -1
- package/out/automate/engine/utils.d.ts +0 -25
- package/out/automate/engine/utils.js +0 -404
- package/out/automate/engine/utils.js.map +0 -1
- package/out/automate/template/process.d.ts +0 -9
- package/out/automate/template/process.js +0 -10976
- package/out/automate/template/process.js.map +0 -1
- package/out/bak/translator.d.ts +0 -1
- package/out/bak/translator.js +0 -112
- package/out/bak/translator.js.map +0 -1
- package/out/common/BaseNode.d.ts +0 -256
- package/out/common/BaseNode.js +0 -891
- package/out/common/BaseNode.js.map +0 -1
- package/out/common/Command.d.ts +0 -8
- package/out/common/Command.js +0 -32
- package/out/common/Command.js.map +0 -1
- package/out/common/ComponentAPI.d.ts +0 -110
- package/out/common/ComponentAPI.js +0 -3
- package/out/common/ComponentAPI.js.map +0 -1
- package/out/common/EventEmitter.d.ts +0 -58
- package/out/common/EventEmitter.js +0 -68
- package/out/common/EventEmitter.js.map +0 -1
- package/out/common/Messager.d.ts +0 -86
- package/out/common/Messager.js +0 -187
- package/out/common/Messager.js.map +0 -1
- package/out/common/classMap.d.ts +0 -4
- package/out/common/classMap.js +0 -5
- package/out/common/classMap.js.map +0 -1
- package/out/common/index.d.ts +0 -4
- package/out/common/index.js +0 -21
- package/out/common/index.js.map +0 -1
- package/out/concepts/App__.d.ts +0 -1119
- package/out/concepts/App__.js +0 -1591
- package/out/concepts/App__.js.map +0 -1
- package/out/concepts/Argument__.d.ts +0 -58
- package/out/concepts/Argument__.js +0 -198
- package/out/concepts/Argument__.js.map +0 -1
- package/out/concepts/Assignee__.d.ts +0 -201
- package/out/concepts/Assignee__.js +0 -298
- package/out/concepts/Assignee__.js.map +0 -1
- package/out/concepts/Assignment__.d.ts +0 -70
- package/out/concepts/Assignment__.js +0 -201
- package/out/concepts/Assignment__.js.map +0 -1
- package/out/concepts/Attribute__.d.ts +0 -101
- package/out/concepts/Attribute__.js +0 -221
- package/out/concepts/Attribute__.js.map +0 -1
- package/out/concepts/BinaryExpression__.d.ts +0 -64
- package/out/concepts/BinaryExpression__.js +0 -251
- package/out/concepts/BinaryExpression__.js.map +0 -1
- package/out/concepts/BindAttribute__.d.ts +0 -231
- package/out/concepts/BindAttribute__.js +0 -450
- package/out/concepts/BindAttribute__.js.map +0 -1
- package/out/concepts/BindDirective__.d.ts +0 -93
- package/out/concepts/BindDirective__.js +0 -251
- package/out/concepts/BindDirective__.js.map +0 -1
- package/out/concepts/BindEvent__.d.ts +0 -139
- package/out/concepts/BindEvent__.js +0 -369
- package/out/concepts/BindEvent__.js.map +0 -1
- package/out/concepts/BooleanLiteral__.d.ts +0 -31
- package/out/concepts/BooleanLiteral__.js +0 -91
- package/out/concepts/BooleanLiteral__.js.map +0 -1
- package/out/concepts/CallFunction__.d.ts +0 -153
- package/out/concepts/CallFunction__.js +0 -381
- package/out/concepts/CallFunction__.js.map +0 -1
- package/out/concepts/CallInterface__.d.ts +0 -103
- package/out/concepts/CallInterface__.js +0 -441
- package/out/concepts/CallInterface__.js.map +0 -1
- package/out/concepts/CallLogic__.d.ts +0 -170
- package/out/concepts/CallLogic__.js +0 -604
- package/out/concepts/CallLogic__.js.map +0 -1
- package/out/concepts/CallQueryComponent__.d.ts +0 -345
- package/out/concepts/CallQueryComponent__.js +0 -1009
- package/out/concepts/CallQueryComponent__.js.map +0 -1
- package/out/concepts/Comment__.d.ts +0 -30
- package/out/concepts/Comment__.js +0 -93
- package/out/concepts/Comment__.js.map +0 -1
- package/out/concepts/CompletionProperty__.d.ts +0 -101
- package/out/concepts/CompletionProperty__.js +0 -237
- package/out/concepts/CompletionProperty__.js.map +0 -1
- package/out/concepts/ConfigGroup__.d.ts +0 -121
- package/out/concepts/ConfigGroup__.js +0 -221
- package/out/concepts/ConfigGroup__.js.map +0 -1
- package/out/concepts/ConfigPropertyValue__.d.ts +0 -43
- package/out/concepts/ConfigPropertyValue__.js +0 -103
- package/out/concepts/ConfigPropertyValue__.js.map +0 -1
- package/out/concepts/ConfigProperty__.d.ts +0 -129
- package/out/concepts/ConfigProperty__.js +0 -239
- package/out/concepts/ConfigProperty__.js.map +0 -1
- package/out/concepts/Configuration__.d.ts +0 -121
- package/out/concepts/Configuration__.js +0 -213
- package/out/concepts/Configuration__.js.map +0 -1
- package/out/concepts/Constant__.d.ts +0 -99
- package/out/concepts/Constant__.js +0 -237
- package/out/concepts/Constant__.js.map +0 -1
- package/out/concepts/DataElement__.d.ts +0 -45
- package/out/concepts/DataElement__.js +0 -114
- package/out/concepts/DataElement__.js.map +0 -1
- package/out/concepts/DataSource__.d.ts +0 -143
- package/out/concepts/DataSource__.js +0 -318
- package/out/concepts/DataSource__.js.map +0 -1
- package/out/concepts/Destination__.d.ts +0 -120
- package/out/concepts/Destination__.js +0 -433
- package/out/concepts/Destination__.js.map +0 -1
- package/out/concepts/End__.d.ts +0 -23
- package/out/concepts/End__.js +0 -84
- package/out/concepts/End__.js.map +0 -1
- package/out/concepts/EntityIndex__.d.ts +0 -94
- package/out/concepts/EntityIndex__.js +0 -215
- package/out/concepts/EntityIndex__.js.map +0 -1
- package/out/concepts/EntityProperty__.d.ts +0 -231
- package/out/concepts/EntityProperty__.js +0 -567
- package/out/concepts/EntityProperty__.js.map +0 -1
- package/out/concepts/Entity__.d.ts +0 -297
- package/out/concepts/Entity__.js +0 -572
- package/out/concepts/Entity__.js.map +0 -1
- package/out/concepts/EnumItem__.d.ts +0 -60
- package/out/concepts/EnumItem__.js +0 -136
- package/out/concepts/EnumItem__.js.map +0 -1
- package/out/concepts/Enum__.d.ts +0 -135
- package/out/concepts/Enum__.js +0 -293
- package/out/concepts/Enum__.js.map +0 -1
- package/out/concepts/Event__.d.ts +0 -142
- package/out/concepts/Event__.js +0 -242
- package/out/concepts/Event__.js.map +0 -1
- package/out/concepts/ForEachStatement__.d.ts +0 -191
- package/out/concepts/ForEachStatement__.js +0 -441
- package/out/concepts/ForEachStatement__.js.map +0 -1
- package/out/concepts/Function__.d.ts +0 -406
- package/out/concepts/Function__.js +0 -657
- package/out/concepts/Function__.js.map +0 -1
- package/out/concepts/Identifier__.d.ts +0 -45
- package/out/concepts/Identifier__.js +0 -203
- package/out/concepts/Identifier__.js.map +0 -1
- package/out/concepts/IfStatement__.d.ts +0 -148
- package/out/concepts/IfStatement__.js +0 -280
- package/out/concepts/IfStatement__.js.map +0 -1
- package/out/concepts/InterfaceParam__.d.ts +0 -112
- package/out/concepts/InterfaceParam__.js +0 -311
- package/out/concepts/InterfaceParam__.js.map +0 -1
- package/out/concepts/Interface__.d.ts +0 -268
- package/out/concepts/Interface__.js +0 -598
- package/out/concepts/Interface__.js.map +0 -1
- package/out/concepts/JSBlock__.d.ts +0 -31
- package/out/concepts/JSBlock__.js +0 -90
- package/out/concepts/JSBlock__.js.map +0 -1
- package/out/concepts/LogicItem__.d.ts +0 -117
- package/out/concepts/LogicItem__.js +0 -233
- package/out/concepts/LogicItem__.js.map +0 -1
- package/out/concepts/Logic__.d.ts +0 -610
- package/out/concepts/Logic__.js +0 -1203
- package/out/concepts/Logic__.js.map +0 -1
- package/out/concepts/MemberExpression__.d.ts +0 -65
- package/out/concepts/MemberExpression__.js +0 -238
- package/out/concepts/MemberExpression__.js.map +0 -1
- package/out/concepts/Module__.d.ts +0 -675
- package/out/concepts/Module__.js +0 -914
- package/out/concepts/Module__.js.map +0 -1
- package/out/concepts/Namespace__.d.ts +0 -986
- package/out/concepts/Namespace__.js +0 -1301
- package/out/concepts/Namespace__.js.map +0 -1
- package/out/concepts/NullLiteral__.d.ts +0 -23
- package/out/concepts/NullLiteral__.js +0 -73
- package/out/concepts/NullLiteral__.js.map +0 -1
- package/out/concepts/NumericLiteral__.d.ts +0 -53
- package/out/concepts/NumericLiteral__.js +0 -172
- package/out/concepts/NumericLiteral__.js.map +0 -1
- package/out/concepts/Param__.d.ts +0 -147
- package/out/concepts/Param__.js +0 -366
- package/out/concepts/Param__.js.map +0 -1
- package/out/concepts/Point__.d.ts +0 -30
- package/out/concepts/Point__.js +0 -75
- package/out/concepts/Point__.js.map +0 -1
- package/out/concepts/ProcessComponent__.d.ts +0 -218
- package/out/concepts/ProcessComponent__.js +0 -333
- package/out/concepts/ProcessComponent__.js.map +0 -1
- package/out/concepts/ProcessElement__.d.ts +0 -554
- package/out/concepts/ProcessElement__.js +0 -998
- package/out/concepts/ProcessElement__.js.map +0 -1
- package/out/concepts/ProcessOutcome__.d.ts +0 -30
- package/out/concepts/ProcessOutcome__.js +0 -87
- package/out/concepts/ProcessOutcome__.js.map +0 -1
- package/out/concepts/Process__.d.ts +0 -451
- package/out/concepts/Process__.js +0 -773
- package/out/concepts/Process__.js.map +0 -1
- package/out/concepts/QueryAggregateExpression__.d.ts +0 -50
- package/out/concepts/QueryAggregateExpression__.js +0 -144
- package/out/concepts/QueryAggregateExpression__.js.map +0 -1
- package/out/concepts/QueryFieldExpression__.d.ts +0 -48
- package/out/concepts/QueryFieldExpression__.js +0 -132
- package/out/concepts/QueryFieldExpression__.js.map +0 -1
- package/out/concepts/QueryFromExpression__.d.ts +0 -95
- package/out/concepts/QueryFromExpression__.js +0 -192
- package/out/concepts/QueryFromExpression__.js.map +0 -1
- package/out/concepts/QueryGroupByExpression__.d.ts +0 -45
- package/out/concepts/QueryGroupByExpression__.js +0 -139
- package/out/concepts/QueryGroupByExpression__.js.map +0 -1
- package/out/concepts/QueryJoinExpression__.d.ts +0 -182
- package/out/concepts/QueryJoinExpression__.js +0 -312
- package/out/concepts/QueryJoinExpression__.js.map +0 -1
- package/out/concepts/QueryLimitExpression__.d.ts +0 -56
- package/out/concepts/QueryLimitExpression__.js +0 -156
- package/out/concepts/QueryLimitExpression__.js.map +0 -1
- package/out/concepts/QueryOrderByExpression__.d.ts +0 -67
- package/out/concepts/QueryOrderByExpression__.js +0 -169
- package/out/concepts/QueryOrderByExpression__.js.map +0 -1
- package/out/concepts/QuerySelectExpression__.d.ts +0 -114
- package/out/concepts/QuerySelectExpression__.js +0 -203
- package/out/concepts/QuerySelectExpression__.js.map +0 -1
- package/out/concepts/Rect__.d.ts +0 -38
- package/out/concepts/Rect__.js +0 -89
- package/out/concepts/Rect__.js.map +0 -1
- package/out/concepts/Return__.d.ts +0 -131
- package/out/concepts/Return__.js +0 -340
- package/out/concepts/Return__.js.map +0 -1
- package/out/concepts/Role__.d.ts +0 -61
- package/out/concepts/Role__.js +0 -164
- package/out/concepts/Role__.js.map +0 -1
- package/out/concepts/Slot__.d.ts +0 -57
- package/out/concepts/Slot__.js +0 -114
- package/out/concepts/Slot__.js.map +0 -1
- package/out/concepts/SqlQueryComponent__.d.ts +0 -61
- package/out/concepts/SqlQueryComponent__.js +0 -177
- package/out/concepts/SqlQueryComponent__.js.map +0 -1
- package/out/concepts/Start__.d.ts +0 -23
- package/out/concepts/Start__.js +0 -71
- package/out/concepts/Start__.js.map +0 -1
- package/out/concepts/StringLiteral__.d.ts +0 -35
- package/out/concepts/StringLiteral__.js +0 -125
- package/out/concepts/StringLiteral__.js.map +0 -1
- package/out/concepts/StructureProperty__.d.ts +0 -124
- package/out/concepts/StructureProperty__.js +0 -324
- package/out/concepts/StructureProperty__.js.map +0 -1
- package/out/concepts/Structure__.d.ts +0 -250
- package/out/concepts/Structure__.js +0 -440
- package/out/concepts/Structure__.js.map +0 -1
- package/out/concepts/SwitchCase__.d.ts +0 -92
- package/out/concepts/SwitchCase__.js +0 -229
- package/out/concepts/SwitchCase__.js.map +0 -1
- package/out/concepts/SwitchStatement__.d.ts +0 -82
- package/out/concepts/SwitchStatement__.js +0 -175
- package/out/concepts/SwitchStatement__.js.map +0 -1
- package/out/concepts/Theme__.d.ts +0 -36
- package/out/concepts/Theme__.js +0 -86
- package/out/concepts/Theme__.js.map +0 -1
- package/out/concepts/Transactional__.d.ts +0 -76
- package/out/concepts/Transactional__.js +0 -151
- package/out/concepts/Transactional__.js.map +0 -1
- package/out/concepts/TypeAnnotation__.d.ts +0 -133
- package/out/concepts/TypeAnnotation__.js +0 -412
- package/out/concepts/TypeAnnotation__.js.map +0 -1
- package/out/concepts/TypeParam__.d.ts +0 -20
- package/out/concepts/TypeParam__.js +0 -57
- package/out/concepts/TypeParam__.js.map +0 -1
- package/out/concepts/UnaryExpression__.d.ts +0 -46
- package/out/concepts/UnaryExpression__.js +0 -166
- package/out/concepts/UnaryExpression__.js.map +0 -1
- package/out/concepts/Unparsed__.d.ts +0 -29
- package/out/concepts/Unparsed__.js +0 -88
- package/out/concepts/Unparsed__.js.map +0 -1
- package/out/concepts/UseComponent__.d.ts +0 -30
- package/out/concepts/UseComponent__.js +0 -75
- package/out/concepts/UseComponent__.js.map +0 -1
- package/out/concepts/ValidationRule__.d.ts +0 -94
- package/out/concepts/ValidationRule__.js +0 -254
- package/out/concepts/ValidationRule__.js.map +0 -1
- package/out/concepts/Variable__.d.ts +0 -130
- package/out/concepts/Variable__.js +0 -338
- package/out/concepts/Variable__.js.map +0 -1
- package/out/concepts/ViewComponent__.d.ts +0 -472
- package/out/concepts/ViewComponent__.js +0 -644
- package/out/concepts/ViewComponent__.js.map +0 -1
- package/out/concepts/ViewElement__.d.ts +0 -490
- package/out/concepts/ViewElement__.js +0 -1414
- package/out/concepts/ViewElement__.js.map +0 -1
- package/out/concepts/View__.d.ts +0 -683
- package/out/concepts/View__.js +0 -1333
- package/out/concepts/View__.js.map +0 -1
- package/out/concepts/WhileStatement__.d.ts +0 -95
- package/out/concepts/WhileStatement__.js +0 -208
- package/out/concepts/WhileStatement__.js.map +0 -1
- package/out/concepts/basics/stdlib/index.d.ts +0 -4
- package/out/concepts/basics/stdlib/index.js +0 -26
- package/out/concepts/basics/stdlib/index.js.map +0 -1
- package/out/concepts/basics/stdlib/nasl.auth.d.ts +0 -3
- package/out/concepts/basics/stdlib/nasl.auth.js +0 -50
- package/out/concepts/basics/stdlib/nasl.auth.js.map +0 -1
- package/out/concepts/basics/stdlib/nasl.browser.d.ts +0 -3
- package/out/concepts/basics/stdlib/nasl.browser.js +0 -41
- package/out/concepts/basics/stdlib/nasl.browser.js.map +0 -1
- package/out/concepts/basics/stdlib/nasl.collection.d.ts +0 -7
- package/out/concepts/basics/stdlib/nasl.collection.js +0 -83
- package/out/concepts/basics/stdlib/nasl.collection.js.map +0 -1
- package/out/concepts/basics/stdlib/nasl.configuration.d.ts +0 -3
- package/out/concepts/basics/stdlib/nasl.configuration.js +0 -25
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +0 -1
- package/out/concepts/basics/stdlib/nasl.core.d.ts +0 -3
- package/out/concepts/basics/stdlib/nasl.core.js +0 -15
- package/out/concepts/basics/stdlib/nasl.core.js.map +0 -1
- package/out/concepts/basics/stdlib/nasl.interface.d.ts +0 -7
- package/out/concepts/basics/stdlib/nasl.interface.js +0 -43
- package/out/concepts/basics/stdlib/nasl.interface.js.map +0 -1
- package/out/concepts/basics/stdlib/nasl.process.d.ts +0 -7
- package/out/concepts/basics/stdlib/nasl.process.js +0 -453
- package/out/concepts/basics/stdlib/nasl.process.js.map +0 -1
- package/out/concepts/basics/stdlib/nasl.ui.d.ts +0 -7
- package/out/concepts/basics/stdlib/nasl.ui.js +0 -824
- package/out/concepts/basics/stdlib/nasl.ui.js.map +0 -1
- package/out/concepts/basics/stdlib/nasl.util.d.ts +0 -3
- package/out/concepts/basics/stdlib/nasl.util.js +0 -1030
- package/out/concepts/basics/stdlib/nasl.util.js.map +0 -1
- package/out/concepts/basics/stdlib/nasl.validation.d.ts +0 -3
- package/out/concepts/basics/stdlib/nasl.validation.js +0 -561
- package/out/concepts/basics/stdlib/nasl.validation.js.map +0 -1
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +0 -5
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +0 -26
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +0 -1
- package/out/concepts/basics/types/coreTypeList.d.ts +0 -2
- package/out/concepts/basics/types/coreTypeList.js +0 -18
- package/out/concepts/basics/types/coreTypeList.js.map +0 -1
- package/out/concepts/basics/types/index.d.ts +0 -13
- package/out/concepts/basics/types/index.js +0 -27
- package/out/concepts/basics/types/index.js.map +0 -1
- package/out/concepts/index.d.ts +0 -5
- package/out/concepts/index.js +0 -24
- package/out/concepts/index.js.map +0 -1
- package/out/concepts/index__.d.ts +0 -83
- package/out/concepts/index__.js +0 -100
- package/out/concepts/index__.js.map +0 -1
- package/out/config.d.ts +0 -42
- package/out/config.js +0 -71
- package/out/config.js.map +0 -1
- package/out/decorators/index.d.ts +0 -54
- package/out/decorators/index.js +0 -149
- package/out/decorators/index.js.map +0 -1
- package/out/enums/KEYWORDS.d.ts +0 -3
- package/out/enums/KEYWORDS.js +0 -1199
- package/out/enums/KEYWORDS.js.map +0 -1
- package/out/enums/LEVEL_NAME_MAP.d.ts +0 -26
- package/out/enums/LEVEL_NAME_MAP.js +0 -30
- package/out/enums/LEVEL_NAME_MAP.js.map +0 -1
- package/out/eventBus.d.ts +0 -3
- package/out/eventBus.js +0 -7
- package/out/eventBus.js.map +0 -1
- package/out/generator/compileComponent.d.ts +0 -11
- package/out/generator/compileComponent.js +0 -12
- package/out/generator/compileComponent.js.map +0 -1
- package/out/generator/genBundleFiles.d.ts +0 -44
- package/out/generator/genBundleFiles.js +0 -387
- package/out/generator/genBundleFiles.js.map +0 -1
- package/out/generator/genHash.d.ts +0 -7
- package/out/generator/genHash.js +0 -39
- package/out/generator/genHash.js.map +0 -1
- package/out/generator/genMetaData.d.ts +0 -36
- package/out/generator/genMetaData.js +0 -121
- package/out/generator/genMetaData.js.map +0 -1
- package/out/generator/index.d.ts +0 -5
- package/out/generator/index.js +0 -22
- package/out/generator/index.js.map +0 -1
- package/out/generator/styleReplacer.d.ts +0 -3
- package/out/generator/styleReplacer.js +0 -71
- package/out/generator/styleReplacer.js.map +0 -1
- package/out/index.d.ts +0 -11
- package/out/index.js +0 -53
- package/out/index.js.map +0 -1
- package/out/manager/diagnostic.d.ts +0 -38
- package/out/manager/diagnostic.js +0 -84
- package/out/manager/diagnostic.js.map +0 -1
- package/out/manager/history.d.ts +0 -0
- package/out/manager/history.js +0 -1
- package/out/manager/history.js.map +0 -1
- package/out/manager/problem.d.ts +0 -0
- package/out/manager/problem.js +0 -1
- package/out/manager/problem.js.map +0 -1
- package/out/server/createUiTs.d.ts +0 -8
- package/out/server/createUiTs.js +0 -204
- package/out/server/createUiTs.js.map +0 -1
- package/out/server/entity2LogicNamespace.d.ts +0 -10
- package/out/server/entity2LogicNamespace.js +0 -217
- package/out/server/entity2LogicNamespace.js.map +0 -1
- package/out/server/extendBaseNode.d.ts +0 -1
- package/out/server/extendBaseNode.js +0 -323
- package/out/server/extendBaseNode.js.map +0 -1
- package/out/server/getExtensionModules.d.ts +0 -3
- package/out/server/getExtensionModules.js +0 -20
- package/out/server/getExtensionModules.js.map +0 -1
- package/out/server/getFunctions.d.ts +0 -3
- package/out/server/getFunctions.js +0 -20
- package/out/server/getFunctions.js.map +0 -1
- package/out/server/getInterfaces.d.ts +0 -2
- package/out/server/getInterfaces.js +0 -48
- package/out/server/getInterfaces.js.map +0 -1
- package/out/server/getLogics.d.ts +0 -3
- package/out/server/getLogics.js +0 -210
- package/out/server/getLogics.js.map +0 -1
- package/out/server/getMemberIdentifier.d.ts +0 -22
- package/out/server/getMemberIdentifier.js +0 -459
- package/out/server/getMemberIdentifier.js.map +0 -1
- package/out/server/getProcessComponents.d.ts +0 -2
- package/out/server/getProcessComponents.js +0 -13
- package/out/server/getProcessComponents.js.map +0 -1
- package/out/server/getProcesses.d.ts +0 -33
- package/out/server/getProcesses.js +0 -565
- package/out/server/getProcesses.js.map +0 -1
- package/out/server/getScope.d.ts +0 -13
- package/out/server/getScope.js +0 -61
- package/out/server/getScope.js.map +0 -1
- package/out/server/getValidates.d.ts +0 -3
- package/out/server/getValidates.js +0 -14
- package/out/server/getValidates.js.map +0 -1
- package/out/server/index.d.ts +0 -3
- package/out/server/index.js +0 -33
- package/out/server/index.js.map +0 -1
- package/out/server/naslServer.d.ts +0 -136
- package/out/server/naslServer.js +0 -1733
- package/out/server/naslServer.js.map +0 -1
- package/out/server/process2LogicNamespace.d.ts +0 -26
- package/out/server/process2LogicNamespace.js +0 -97
- package/out/server/process2LogicNamespace.js.map +0 -1
- package/out/server/translator.d.ts +0 -24
- package/out/server/translator.js +0 -460
- package/out/server/translator.js.map +0 -1
- package/out/service/creator/add.configs.d.ts +0 -1
- package/out/service/creator/add.configs.js +0 -68
- package/out/service/creator/add.configs.js.map +0 -1
- package/out/service/creator/errHandles.d.ts +0 -18
- package/out/service/creator/errHandles.js +0 -65
- package/out/service/creator/errHandles.js.map +0 -1
- package/out/service/creator/index.d.ts +0 -1
- package/out/service/creator/index.js +0 -72
- package/out/service/creator/index.js.map +0 -1
- package/out/service/storage/api.d.ts +0 -18
- package/out/service/storage/api.js +0 -17
- package/out/service/storage/api.js.map +0 -1
- package/out/service/storage/index.d.ts +0 -2
- package/out/service/storage/index.js +0 -10
- package/out/service/storage/index.js.map +0 -1
- package/out/service/storage/init.d.ts +0 -13
- package/out/service/storage/init.js +0 -469
- package/out/service/storage/init.js.map +0 -1
- package/out/service/storage/jsoner.d.ts +0 -29
- package/out/service/storage/jsoner.js +0 -130
- package/out/service/storage/jsoner.js.map +0 -1
- package/out/service/storage/map.d.ts +0 -4
- package/out/service/storage/map.js +0 -54
- package/out/service/storage/map.js.map +0 -1
- package/out/service/storage/service.d.ts +0 -2
- package/out/service/storage/service.js +0 -10
- package/out/service/storage/service.js.map +0 -1
- package/out/service/storage/storagePoint.d.ts +0 -17
- package/out/service/storage/storagePoint.js +0 -76
- package/out/service/storage/storagePoint.js.map +0 -1
- package/out/templator/genCallComponentLogic.d.ts +0 -17
- package/out/templator/genCallComponentLogic.js +0 -30
- package/out/templator/genCallComponentLogic.js.map +0 -1
- package/out/templator/genCreateBlock.d.ts +0 -10
- package/out/templator/genCreateBlock.js +0 -327
- package/out/templator/genCreateBlock.js.map +0 -1
- package/out/templator/genCurdEditMultipleKeyBlock.d.ts +0 -2
- package/out/templator/genCurdEditMultipleKeyBlock.js +0 -475
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +0 -1
- package/out/templator/genCurdMultipleKeyBlock.d.ts +0 -3
- package/out/templator/genCurdMultipleKeyBlock.js +0 -672
- package/out/templator/genCurdMultipleKeyBlock.js.map +0 -1
- package/out/templator/genEditTableBlock.d.ts +0 -51
- package/out/templator/genEditTableBlock.js +0 -303
- package/out/templator/genEditTableBlock.js.map +0 -1
- package/out/templator/genEnumSelectBlock.d.ts +0 -10
- package/out/templator/genEnumSelectBlock.js +0 -23
- package/out/templator/genEnumSelectBlock.js.map +0 -1
- package/out/templator/genGetBlock.d.ts +0 -6
- package/out/templator/genGetBlock.js +0 -135
- package/out/templator/genGetBlock.js.map +0 -1
- package/out/templator/genGridViewBlock.d.ts +0 -55
- package/out/templator/genGridViewBlock.js +0 -368
- package/out/templator/genGridViewBlock.js.map +0 -1
- package/out/templator/genListViewBlock.d.ts +0 -19
- package/out/templator/genListViewBlock.js +0 -141
- package/out/templator/genListViewBlock.js.map +0 -1
- package/out/templator/genQueryComponent.d.ts +0 -34
- package/out/templator/genQueryComponent.js +0 -322
- package/out/templator/genQueryComponent.js.map +0 -1
- package/out/templator/genSelectBlock.d.ts +0 -34
- package/out/templator/genSelectBlock.js +0 -143
- package/out/templator/genSelectBlock.js.map +0 -1
- package/out/templator/genTableBlock.d.ts +0 -53
- package/out/templator/genTableBlock.js +0 -305
- package/out/templator/genTableBlock.js.map +0 -1
- package/out/templator/genUpdateBlock.d.ts +0 -6
- package/out/templator/genUpdateBlock.js +0 -368
- package/out/templator/genUpdateBlock.js.map +0 -1
- package/out/templator/index.d.ts +0 -16
- package/out/templator/index.js +0 -34
- package/out/templator/index.js.map +0 -1
- package/out/templator/utils.d.ts +0 -645
- package/out/templator/utils.js +0 -426
- package/out/templator/utils.js.map +0 -1
- package/out/test/fixtures/env.d.ts +0 -5
- package/out/test/fixtures/env.js +0 -20
- package/out/test/fixtures/env.js.map +0 -1
- package/out/test/integration/connect-create-file.d.ts +0 -1
- package/out/test/integration/connect-create-file.js +0 -39
- package/out/test/integration/connect-create-file.js.map +0 -1
- package/out/test/integration/connect-file.d.ts +0 -1
- package/out/test/integration/connect-file.js +0 -49
- package/out/test/integration/connect-file.js.map +0 -1
- package/out/test/units/baseTypes/Assignment.spec.d.ts +0 -1
- package/out/test/units/baseTypes/Assignment.spec.js +0 -43
- package/out/test/units/baseTypes/Assignment.spec.js.map +0 -1
- package/out/test/units/baseTypes/CallLogic.spec.d.ts +0 -1
- package/out/test/units/baseTypes/CallLogic.spec.js +0 -44
- package/out/test/units/baseTypes/CallLogic.spec.js.map +0 -1
- package/out/test/units/baseTypes/StringLiteral.spec.d.ts +0 -1
- package/out/test/units/baseTypes/StringLiteral.spec.js +0 -75
- package/out/test/units/baseTypes/StringLiteral.spec.js.map +0 -1
- package/out/test/units/baseTypes/new.spec.d.ts +0 -1
- package/out/test/units/baseTypes/new.spec.js +0 -37
- package/out/test/units/baseTypes/new.spec.js.map +0 -1
- package/out/test/units/common/Vertex.spec.d.ts +0 -1
- package/out/test/units/common/Vertex.spec.js +0 -22
- package/out/test/units/common/Vertex.spec.js.map +0 -1
- package/out/test/units/data/Entity.spec.d.ts +0 -1
- package/out/test/units/data/Entity.spec.js +0 -12
- package/out/test/units/data/Entity.spec.js.map +0 -1
- package/out/test/units/login.spec.d.ts +0 -1
- package/out/test/units/login.spec.js +0 -12
- package/out/test/units/login.spec.js.map +0 -1
- package/out/test/units/page/Block.spec.d.ts +0 -0
- package/out/test/units/page/Block.spec.js +0 -13
- package/out/test/units/page/Block.spec.js.map +0 -1
- package/out/test/units/page/Element.spec.d.ts +0 -1
- package/out/test/units/page/Element.spec.js +0 -44
- package/out/test/units/page/Element.spec.js.map +0 -1
- package/out/test/units/temp/temp.spec.d.ts +0 -1
- package/out/test/units/temp/temp.spec.js +0 -68
- package/out/test/units/temp/temp.spec.js.map +0 -1
- package/out/translator/index.d.ts +0 -47
- package/out/translator/index.js +0 -108
- package/out/translator/index.js.map +0 -1
- package/out/translator/lsp.d.ts +0 -45
- package/out/translator/lsp.js +0 -6
- package/out/translator/lsp.js.map +0 -1
- package/out/translator/tsp.d.ts +0 -12
- package/out/translator/tsp.js +0 -3
- package/out/translator/tsp.js.map +0 -1
- package/out/utils/index.d.ts +0 -37
- package/out/utils/index.js +0 -125
- package/out/utils/index.js.map +0 -1
- package/out/utils/logger.d.ts +0 -3
- package/out/utils/logger.js +0 -11
- package/out/utils/logger.js.map +0 -1
- package/out/utils/string.d.ts +0 -38
- package/out/utils/string.js +0 -95
- package/out/utils/string.js.map +0 -1
- package/out/utils/traverse.d.ts +0 -36
- package/out/utils/traverse.js +0 -132
- package/out/utils/traverse.js.map +0 -1
package/out/concepts/App__.js
DELETED
|
@@ -1,1591 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
-
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
-
if (mod && mod.__esModule) return mod;
|
|
26
|
-
var result = {};
|
|
27
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
-
__setModuleDefault(result, mod);
|
|
29
|
-
return result;
|
|
30
|
-
};
|
|
31
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
32
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
|
-
};
|
|
34
|
-
var App_1;
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.App = void 0;
|
|
37
|
-
const decorators_1 = require("../decorators");
|
|
38
|
-
const utils = __importStar(require("../utils"));
|
|
39
|
-
const BaseNode_1 = __importDefault(require("../common/BaseNode"));
|
|
40
|
-
const classMap_1 = __importDefault(require("../common/classMap"));
|
|
41
|
-
const DataSource__1 = __importDefault(require("./DataSource__"));
|
|
42
|
-
const Structure__1 = __importDefault(require("./Structure__"));
|
|
43
|
-
const Enum__1 = __importDefault(require("./Enum__"));
|
|
44
|
-
const Logic__1 = __importDefault(require("./Logic__"));
|
|
45
|
-
const Interface__1 = __importDefault(require("./Interface__"));
|
|
46
|
-
const View__1 = __importDefault(require("./View__"));
|
|
47
|
-
const Process__1 = __importDefault(require("./Process__"));
|
|
48
|
-
const Role__1 = __importDefault(require("./Role__"));
|
|
49
|
-
const Theme__1 = __importDefault(require("./Theme__"));
|
|
50
|
-
const Configuration__1 = __importDefault(require("./Configuration__"));
|
|
51
|
-
const Module__1 = __importDefault(require("./Module__"));
|
|
52
|
-
/**
|
|
53
|
-
* 应用
|
|
54
|
-
*/
|
|
55
|
-
let App = App_1 = class App extends BaseNode_1.default {
|
|
56
|
-
/**
|
|
57
|
-
* 应用 Id
|
|
58
|
-
*/
|
|
59
|
-
id = undefined;
|
|
60
|
-
/**
|
|
61
|
-
* 产品概念
|
|
62
|
-
*/
|
|
63
|
-
concept = 'App';
|
|
64
|
-
/**
|
|
65
|
-
* IDE 版本
|
|
66
|
-
*/
|
|
67
|
-
ideVersion = undefined;
|
|
68
|
-
/**
|
|
69
|
-
* 应用标识
|
|
70
|
-
*/
|
|
71
|
-
name = undefined;
|
|
72
|
-
/**
|
|
73
|
-
* 应用标题
|
|
74
|
-
*/
|
|
75
|
-
title = undefined;
|
|
76
|
-
/**
|
|
77
|
-
* 应用图标
|
|
78
|
-
*/
|
|
79
|
-
icon = undefined;
|
|
80
|
-
/**
|
|
81
|
-
* 应用描述
|
|
82
|
-
*/
|
|
83
|
-
desc = undefined;
|
|
84
|
-
/**
|
|
85
|
-
* 域名
|
|
86
|
-
*/
|
|
87
|
-
dnsAddr = undefined;
|
|
88
|
-
/**
|
|
89
|
-
* PC/H5 端
|
|
90
|
-
*/
|
|
91
|
-
scope = undefined;
|
|
92
|
-
/**
|
|
93
|
-
* 制品应用标题
|
|
94
|
-
*/
|
|
95
|
-
documentTitle = undefined;
|
|
96
|
-
/**
|
|
97
|
-
* 制品应用图标
|
|
98
|
-
*/
|
|
99
|
-
documentIcon = undefined;
|
|
100
|
-
/**
|
|
101
|
-
* 是否有用户中心
|
|
102
|
-
*/
|
|
103
|
-
hasUserCenter = undefined;
|
|
104
|
-
/**
|
|
105
|
-
* 是否有权限
|
|
106
|
-
*/
|
|
107
|
-
hasAuth = undefined;
|
|
108
|
-
/**
|
|
109
|
-
* 数据源列表
|
|
110
|
-
*/
|
|
111
|
-
dataSources = [];
|
|
112
|
-
/**
|
|
113
|
-
* 数据结构列表
|
|
114
|
-
*/
|
|
115
|
-
structures = [];
|
|
116
|
-
/**
|
|
117
|
-
* 枚举列表
|
|
118
|
-
*/
|
|
119
|
-
enums = [];
|
|
120
|
-
/**
|
|
121
|
-
* 逻辑列表
|
|
122
|
-
*/
|
|
123
|
-
logics = [];
|
|
124
|
-
/**
|
|
125
|
-
* 接口列表
|
|
126
|
-
*/
|
|
127
|
-
interfaces = [];
|
|
128
|
-
/**
|
|
129
|
-
* 页面列表
|
|
130
|
-
*/
|
|
131
|
-
views = [];
|
|
132
|
-
/**
|
|
133
|
-
* 流程列表
|
|
134
|
-
*/
|
|
135
|
-
processes = [];
|
|
136
|
-
/**
|
|
137
|
-
* 角色列表
|
|
138
|
-
*/
|
|
139
|
-
roles = [];
|
|
140
|
-
/**
|
|
141
|
-
* 主题配置
|
|
142
|
-
*/
|
|
143
|
-
theme = new Theme__1.default();
|
|
144
|
-
/**
|
|
145
|
-
* 配置管理
|
|
146
|
-
*/
|
|
147
|
-
configuration = new Configuration__1.default();
|
|
148
|
-
/**
|
|
149
|
-
* 扩展模块列表
|
|
150
|
-
*/
|
|
151
|
-
dependencies = [];
|
|
152
|
-
/**
|
|
153
|
-
* 接口应用列表(兼容老版)
|
|
154
|
-
*/
|
|
155
|
-
interfaceDependencies = [];
|
|
156
|
-
/**
|
|
157
|
-
* 扩展组件列表(兼容老版)
|
|
158
|
-
*/
|
|
159
|
-
componentDependencies = [];
|
|
160
|
-
/**
|
|
161
|
-
* @param source 需要合并的部分参数
|
|
162
|
-
*/
|
|
163
|
-
constructor(source) {
|
|
164
|
-
source = Object.assign({}, App_1.getDefaultOptions(), source);
|
|
165
|
-
super(source);
|
|
166
|
-
super.subConstructor(source);
|
|
167
|
-
}
|
|
168
|
-
static from(source, parentNode, parentKey) {
|
|
169
|
-
return super.from(source, parentNode, parentKey);
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* 从父级删除该节点
|
|
173
|
-
* @internal
|
|
174
|
-
*/
|
|
175
|
-
_delete() {
|
|
176
|
-
let params = null;
|
|
177
|
-
if (this.parentNode) {
|
|
178
|
-
params = this.parentNode?.__removeApp?.(this);
|
|
179
|
-
}
|
|
180
|
-
return params;
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* 设置制品应用标题
|
|
184
|
-
*/
|
|
185
|
-
setDocumentTitle(documentTitle) {
|
|
186
|
-
const object = {
|
|
187
|
-
documentTitle,
|
|
188
|
-
};
|
|
189
|
-
this.update({
|
|
190
|
-
...object,
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* 设置制品应用图标
|
|
195
|
-
*/
|
|
196
|
-
setDocumentIcon(documentIcon) {
|
|
197
|
-
const object = {
|
|
198
|
-
documentIcon,
|
|
199
|
-
};
|
|
200
|
-
this.update({
|
|
201
|
-
...object,
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
getDataSourceExistingNames(excludedList = []) {
|
|
205
|
-
const excludedSet = new Set(excludedList);
|
|
206
|
-
return (this.dataSources || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
207
|
-
}
|
|
208
|
-
getDataSourceUniqueName(name = 'dataSource1') {
|
|
209
|
-
return utils.unique(name, this.getDataSourceExistingNames(), undefined, true);
|
|
210
|
-
}
|
|
211
|
-
_insertDataSourceAt(options, index) {
|
|
212
|
-
const dataSourceOptions = {};
|
|
213
|
-
const relationOptions = { parentNode: this, parentKey: 'dataSources' };
|
|
214
|
-
let dataSource;
|
|
215
|
-
if (!options) {
|
|
216
|
-
dataSource = DataSource__1.default.from({
|
|
217
|
-
...dataSourceOptions,
|
|
218
|
-
name: this.getDataSourceUniqueName(),
|
|
219
|
-
}, this, 'dataSources');
|
|
220
|
-
}
|
|
221
|
-
else if (typeof options === 'string') {
|
|
222
|
-
dataSource = DataSource__1.default.from({
|
|
223
|
-
...dataSourceOptions,
|
|
224
|
-
name: options,
|
|
225
|
-
}, this, 'dataSources');
|
|
226
|
-
}
|
|
227
|
-
else if (options instanceof DataSource__1.default) {
|
|
228
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
229
|
-
dataSource = options;
|
|
230
|
-
Object.assign(dataSource, relationOptions);
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
dataSource = DataSource__1.default.from({
|
|
234
|
-
...dataSourceOptions,
|
|
235
|
-
...options,
|
|
236
|
-
}, this, 'dataSources');
|
|
237
|
-
}
|
|
238
|
-
this.dataSources.splice(index, 0, dataSource);
|
|
239
|
-
return dataSource;
|
|
240
|
-
}
|
|
241
|
-
insertDataSourceAt(options, index) {
|
|
242
|
-
const node = this._insertDataSourceAt(options, index);
|
|
243
|
-
node.create({
|
|
244
|
-
index,
|
|
245
|
-
parentNode: this,
|
|
246
|
-
parentKey: 'dataSources',
|
|
247
|
-
});
|
|
248
|
-
return node;
|
|
249
|
-
}
|
|
250
|
-
_addDataSource(options) {
|
|
251
|
-
const index = this.dataSources.length;
|
|
252
|
-
return this._insertDataSourceAt(options, index);
|
|
253
|
-
}
|
|
254
|
-
addDataSource(options) {
|
|
255
|
-
const node = this._addDataSource(options);
|
|
256
|
-
const index = this.dataSources.indexOf(node);
|
|
257
|
-
node.create({
|
|
258
|
-
index,
|
|
259
|
-
parentNode: this,
|
|
260
|
-
parentKey: 'dataSources',
|
|
261
|
-
});
|
|
262
|
-
return node;
|
|
263
|
-
}
|
|
264
|
-
getStructureExistingNames(excludedList = []) {
|
|
265
|
-
const excludedSet = new Set(excludedList);
|
|
266
|
-
return (this.structures || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
267
|
-
}
|
|
268
|
-
getStructureUniqueName(name = 'Structure1') {
|
|
269
|
-
return utils.unique(name, this.getStructureExistingNames(), undefined, true);
|
|
270
|
-
}
|
|
271
|
-
_insertStructureAt(options, index) {
|
|
272
|
-
const structureOptions = {};
|
|
273
|
-
const relationOptions = { parentNode: this, parentKey: 'structures' };
|
|
274
|
-
let structure;
|
|
275
|
-
if (!options) {
|
|
276
|
-
structure = Structure__1.default.from({
|
|
277
|
-
...structureOptions,
|
|
278
|
-
name: this.getStructureUniqueName(),
|
|
279
|
-
}, this, 'structures');
|
|
280
|
-
}
|
|
281
|
-
else if (typeof options === 'string') {
|
|
282
|
-
structure = Structure__1.default.from({
|
|
283
|
-
...structureOptions,
|
|
284
|
-
name: options,
|
|
285
|
-
}, this, 'structures');
|
|
286
|
-
}
|
|
287
|
-
else if (options instanceof Structure__1.default) {
|
|
288
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
289
|
-
structure = options;
|
|
290
|
-
Object.assign(structure, relationOptions);
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
structure = Structure__1.default.from({
|
|
294
|
-
...structureOptions,
|
|
295
|
-
...options,
|
|
296
|
-
}, this, 'structures');
|
|
297
|
-
}
|
|
298
|
-
this.structures.splice(index, 0, structure);
|
|
299
|
-
return structure;
|
|
300
|
-
}
|
|
301
|
-
insertStructureAt(options, index) {
|
|
302
|
-
const node = this._insertStructureAt(options, index);
|
|
303
|
-
node.create({
|
|
304
|
-
index,
|
|
305
|
-
parentNode: this,
|
|
306
|
-
parentKey: 'structures',
|
|
307
|
-
});
|
|
308
|
-
return node;
|
|
309
|
-
}
|
|
310
|
-
_addStructure(options) {
|
|
311
|
-
const index = 0;
|
|
312
|
-
return this._insertStructureAt(options, index);
|
|
313
|
-
}
|
|
314
|
-
addStructure(options) {
|
|
315
|
-
const node = this._addStructure(options);
|
|
316
|
-
const index = this.structures.indexOf(node);
|
|
317
|
-
node.create({
|
|
318
|
-
index,
|
|
319
|
-
parentNode: this,
|
|
320
|
-
parentKey: 'structures',
|
|
321
|
-
});
|
|
322
|
-
return node;
|
|
323
|
-
}
|
|
324
|
-
getEnumExistingNames(excludedList = []) {
|
|
325
|
-
const excludedSet = new Set(excludedList);
|
|
326
|
-
return (this.enums || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
327
|
-
}
|
|
328
|
-
getEnumUniqueName(name = 'Enum1') {
|
|
329
|
-
return utils.unique(name, this.getEnumExistingNames(), undefined, true);
|
|
330
|
-
}
|
|
331
|
-
_insertEnumAt(options, index) {
|
|
332
|
-
const enumerationOptions = {};
|
|
333
|
-
const relationOptions = { parentNode: this, parentKey: 'enums' };
|
|
334
|
-
let enumeration;
|
|
335
|
-
if (!options) {
|
|
336
|
-
enumeration = Enum__1.default.from({
|
|
337
|
-
...enumerationOptions,
|
|
338
|
-
name: this.getEnumUniqueName(),
|
|
339
|
-
}, this, 'enums');
|
|
340
|
-
}
|
|
341
|
-
else if (typeof options === 'string') {
|
|
342
|
-
enumeration = Enum__1.default.from({
|
|
343
|
-
...enumerationOptions,
|
|
344
|
-
name: options,
|
|
345
|
-
}, this, 'enums');
|
|
346
|
-
}
|
|
347
|
-
else if (options instanceof Enum__1.default) {
|
|
348
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
349
|
-
enumeration = options;
|
|
350
|
-
Object.assign(enumeration, relationOptions);
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
enumeration = Enum__1.default.from({
|
|
354
|
-
...enumerationOptions,
|
|
355
|
-
...options,
|
|
356
|
-
}, this, 'enums');
|
|
357
|
-
}
|
|
358
|
-
this.enums.splice(index, 0, enumeration);
|
|
359
|
-
return enumeration;
|
|
360
|
-
}
|
|
361
|
-
insertEnumAt(options, index) {
|
|
362
|
-
const node = this._insertEnumAt(options, index);
|
|
363
|
-
node.create({
|
|
364
|
-
index,
|
|
365
|
-
parentNode: this,
|
|
366
|
-
parentKey: 'enums',
|
|
367
|
-
});
|
|
368
|
-
return node;
|
|
369
|
-
}
|
|
370
|
-
_addEnum(options) {
|
|
371
|
-
const index = 0;
|
|
372
|
-
return this._insertEnumAt(options, index);
|
|
373
|
-
}
|
|
374
|
-
addEnum(options) {
|
|
375
|
-
const node = this._addEnum(options);
|
|
376
|
-
const index = this.enums.indexOf(node);
|
|
377
|
-
node.create({
|
|
378
|
-
index,
|
|
379
|
-
parentNode: this,
|
|
380
|
-
parentKey: 'enums',
|
|
381
|
-
});
|
|
382
|
-
return node;
|
|
383
|
-
}
|
|
384
|
-
getLogicExistingNames(excludedList = []) {
|
|
385
|
-
const excludedSet = new Set(excludedList);
|
|
386
|
-
return (this.logics || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
387
|
-
}
|
|
388
|
-
getLogicUniqueName(name = 'logic1') {
|
|
389
|
-
return utils.unique(name, this.getLogicExistingNames(), undefined, true);
|
|
390
|
-
}
|
|
391
|
-
_insertLogicAt(options, index) {
|
|
392
|
-
const logicOptions = {};
|
|
393
|
-
const relationOptions = { parentNode: this, parentKey: 'logics' };
|
|
394
|
-
let logic;
|
|
395
|
-
if (!options) {
|
|
396
|
-
logic = Logic__1.default.from({
|
|
397
|
-
...logicOptions,
|
|
398
|
-
name: this.getLogicUniqueName(),
|
|
399
|
-
}, this, 'logics');
|
|
400
|
-
}
|
|
401
|
-
else if (typeof options === 'string') {
|
|
402
|
-
logic = Logic__1.default.from({
|
|
403
|
-
...logicOptions,
|
|
404
|
-
name: options,
|
|
405
|
-
}, this, 'logics');
|
|
406
|
-
}
|
|
407
|
-
else if (options instanceof Logic__1.default) {
|
|
408
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
409
|
-
logic = options;
|
|
410
|
-
Object.assign(logic, relationOptions);
|
|
411
|
-
}
|
|
412
|
-
else {
|
|
413
|
-
logic = Logic__1.default.from({
|
|
414
|
-
...logicOptions,
|
|
415
|
-
...options,
|
|
416
|
-
}, this, 'logics');
|
|
417
|
-
}
|
|
418
|
-
this.logics.splice(index, 0, logic);
|
|
419
|
-
return logic;
|
|
420
|
-
}
|
|
421
|
-
insertLogicAt(options, index) {
|
|
422
|
-
const node = this._insertLogicAt(options, index);
|
|
423
|
-
node.create({
|
|
424
|
-
index,
|
|
425
|
-
parentNode: this,
|
|
426
|
-
parentKey: 'logics',
|
|
427
|
-
});
|
|
428
|
-
return node;
|
|
429
|
-
}
|
|
430
|
-
_addLogic(options) {
|
|
431
|
-
const index = 0;
|
|
432
|
-
return this._insertLogicAt(options, index);
|
|
433
|
-
}
|
|
434
|
-
addLogic(options) {
|
|
435
|
-
const node = this._addLogic(options);
|
|
436
|
-
const index = this.logics.indexOf(node);
|
|
437
|
-
node.create({
|
|
438
|
-
index,
|
|
439
|
-
parentNode: this,
|
|
440
|
-
parentKey: 'logics',
|
|
441
|
-
});
|
|
442
|
-
return node;
|
|
443
|
-
}
|
|
444
|
-
getInterfaceExistingNames(excludedList = []) {
|
|
445
|
-
const excludedSet = new Set(excludedList);
|
|
446
|
-
return (this.interfaces || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
447
|
-
}
|
|
448
|
-
getInterfaceUniqueName(name = 'Interface1') {
|
|
449
|
-
return utils.unique(name, this.getInterfaceExistingNames(), undefined, true);
|
|
450
|
-
}
|
|
451
|
-
_insertInterfaceAt(options, index) {
|
|
452
|
-
const itfaceOptions = {};
|
|
453
|
-
const relationOptions = { parentNode: this, parentKey: 'interfaces' };
|
|
454
|
-
let itface;
|
|
455
|
-
if (!options) {
|
|
456
|
-
itface = Interface__1.default.from({
|
|
457
|
-
...itfaceOptions,
|
|
458
|
-
name: this.getInterfaceUniqueName(),
|
|
459
|
-
}, this, 'interfaces');
|
|
460
|
-
}
|
|
461
|
-
else if (typeof options === 'string') {
|
|
462
|
-
itface = Interface__1.default.from({
|
|
463
|
-
...itfaceOptions,
|
|
464
|
-
name: options,
|
|
465
|
-
}, this, 'interfaces');
|
|
466
|
-
}
|
|
467
|
-
else if (options instanceof Interface__1.default) {
|
|
468
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
469
|
-
itface = options;
|
|
470
|
-
Object.assign(itface, relationOptions);
|
|
471
|
-
}
|
|
472
|
-
else {
|
|
473
|
-
itface = Interface__1.default.from({
|
|
474
|
-
...itfaceOptions,
|
|
475
|
-
...options,
|
|
476
|
-
}, this, 'interfaces');
|
|
477
|
-
}
|
|
478
|
-
this.interfaces.splice(index, 0, itface);
|
|
479
|
-
return itface;
|
|
480
|
-
}
|
|
481
|
-
insertInterfaceAt(options, index) {
|
|
482
|
-
const node = this._insertInterfaceAt(options, index);
|
|
483
|
-
node.create({
|
|
484
|
-
index,
|
|
485
|
-
parentNode: this,
|
|
486
|
-
parentKey: 'interfaces',
|
|
487
|
-
});
|
|
488
|
-
return node;
|
|
489
|
-
}
|
|
490
|
-
_addInterface(options) {
|
|
491
|
-
const index = 0;
|
|
492
|
-
return this._insertInterfaceAt(options, index);
|
|
493
|
-
}
|
|
494
|
-
addInterface(options) {
|
|
495
|
-
const node = this._addInterface(options);
|
|
496
|
-
const index = this.interfaces.indexOf(node);
|
|
497
|
-
node.create({
|
|
498
|
-
index,
|
|
499
|
-
parentNode: this,
|
|
500
|
-
parentKey: 'interfaces',
|
|
501
|
-
});
|
|
502
|
-
return node;
|
|
503
|
-
}
|
|
504
|
-
getViewExistingNames(excludedList = []) {
|
|
505
|
-
const excludedSet = new Set(excludedList);
|
|
506
|
-
return (this.views || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
507
|
-
}
|
|
508
|
-
getViewUniqueName(name = 'view1') {
|
|
509
|
-
return utils.unique(name, this.getViewExistingNames(), undefined, true);
|
|
510
|
-
}
|
|
511
|
-
_insertViewAt(options, index) {
|
|
512
|
-
const viewOptions = {};
|
|
513
|
-
const relationOptions = { parentNode: this, parentKey: 'views' };
|
|
514
|
-
let view;
|
|
515
|
-
if (!options) {
|
|
516
|
-
view = View__1.default.from({
|
|
517
|
-
...viewOptions,
|
|
518
|
-
name: this.getViewUniqueName(),
|
|
519
|
-
}, this, 'views');
|
|
520
|
-
}
|
|
521
|
-
else if (typeof options === 'string') {
|
|
522
|
-
view = View__1.default.from({
|
|
523
|
-
...viewOptions,
|
|
524
|
-
name: options,
|
|
525
|
-
}, this, 'views');
|
|
526
|
-
}
|
|
527
|
-
else if (options instanceof View__1.default) {
|
|
528
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
529
|
-
view = options;
|
|
530
|
-
Object.assign(view, relationOptions);
|
|
531
|
-
}
|
|
532
|
-
else {
|
|
533
|
-
view = View__1.default.from({
|
|
534
|
-
...viewOptions,
|
|
535
|
-
...options,
|
|
536
|
-
}, this, 'views');
|
|
537
|
-
}
|
|
538
|
-
this.views.splice(index, 0, view);
|
|
539
|
-
return view;
|
|
540
|
-
}
|
|
541
|
-
insertViewAt(options, index) {
|
|
542
|
-
const node = this._insertViewAt(options, index);
|
|
543
|
-
node.create({
|
|
544
|
-
index,
|
|
545
|
-
parentNode: this,
|
|
546
|
-
parentKey: 'views',
|
|
547
|
-
});
|
|
548
|
-
return node;
|
|
549
|
-
}
|
|
550
|
-
_addView(options) {
|
|
551
|
-
const index = this.views.length;
|
|
552
|
-
return this._insertViewAt(options, index);
|
|
553
|
-
}
|
|
554
|
-
addView(options) {
|
|
555
|
-
const node = this._addView(options);
|
|
556
|
-
const index = this.views.indexOf(node);
|
|
557
|
-
node.create({
|
|
558
|
-
index,
|
|
559
|
-
parentNode: this,
|
|
560
|
-
parentKey: 'views',
|
|
561
|
-
});
|
|
562
|
-
return node;
|
|
563
|
-
}
|
|
564
|
-
getProcessExistingNames(excludedList = []) {
|
|
565
|
-
const excludedSet = new Set(excludedList);
|
|
566
|
-
return (this.processes || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
567
|
-
}
|
|
568
|
-
getProcessUniqueName(name = 'Process1') {
|
|
569
|
-
return utils.unique(name, this.getProcessExistingNames(), undefined, true);
|
|
570
|
-
}
|
|
571
|
-
_insertProcessAt(options, index) {
|
|
572
|
-
const processOptions = {};
|
|
573
|
-
const relationOptions = { parentNode: this, parentKey: 'processes' };
|
|
574
|
-
let process;
|
|
575
|
-
if (!options) {
|
|
576
|
-
process = Process__1.default.from({
|
|
577
|
-
...processOptions,
|
|
578
|
-
name: this.getProcessUniqueName(),
|
|
579
|
-
}, this, 'processes');
|
|
580
|
-
}
|
|
581
|
-
else if (typeof options === 'string') {
|
|
582
|
-
process = Process__1.default.from({
|
|
583
|
-
...processOptions,
|
|
584
|
-
name: options,
|
|
585
|
-
}, this, 'processes');
|
|
586
|
-
}
|
|
587
|
-
else if (options instanceof Process__1.default) {
|
|
588
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
589
|
-
process = options;
|
|
590
|
-
Object.assign(process, relationOptions);
|
|
591
|
-
}
|
|
592
|
-
else {
|
|
593
|
-
process = Process__1.default.from({
|
|
594
|
-
...processOptions,
|
|
595
|
-
...options,
|
|
596
|
-
}, this, 'processes');
|
|
597
|
-
}
|
|
598
|
-
this.processes.splice(index, 0, process);
|
|
599
|
-
return process;
|
|
600
|
-
}
|
|
601
|
-
insertProcessAt(options, index) {
|
|
602
|
-
const node = this._insertProcessAt(options, index);
|
|
603
|
-
node.create({
|
|
604
|
-
index,
|
|
605
|
-
parentNode: this,
|
|
606
|
-
parentKey: 'processes',
|
|
607
|
-
});
|
|
608
|
-
return node;
|
|
609
|
-
}
|
|
610
|
-
_addProcess(options) {
|
|
611
|
-
const index = 0;
|
|
612
|
-
return this._insertProcessAt(options, index);
|
|
613
|
-
}
|
|
614
|
-
addProcess(options) {
|
|
615
|
-
const node = this._addProcess(options);
|
|
616
|
-
const index = this.processes.indexOf(node);
|
|
617
|
-
node.create({
|
|
618
|
-
index,
|
|
619
|
-
parentNode: this,
|
|
620
|
-
parentKey: 'processes',
|
|
621
|
-
});
|
|
622
|
-
return node;
|
|
623
|
-
}
|
|
624
|
-
getRoleExistingNames(excludedList = []) {
|
|
625
|
-
const excludedSet = new Set(excludedList);
|
|
626
|
-
return (this.roles || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
627
|
-
}
|
|
628
|
-
getRoleUniqueName(name = 'role1') {
|
|
629
|
-
return utils.unique(name, this.getRoleExistingNames(), undefined, true);
|
|
630
|
-
}
|
|
631
|
-
_insertRoleAt(options, index) {
|
|
632
|
-
const roleOptions = {};
|
|
633
|
-
const relationOptions = { parentNode: this, parentKey: 'roles' };
|
|
634
|
-
let role;
|
|
635
|
-
if (!options) {
|
|
636
|
-
role = Role__1.default.from({
|
|
637
|
-
...roleOptions,
|
|
638
|
-
name: this.getRoleUniqueName(),
|
|
639
|
-
}, this, 'roles');
|
|
640
|
-
}
|
|
641
|
-
else if (typeof options === 'string') {
|
|
642
|
-
role = Role__1.default.from({
|
|
643
|
-
...roleOptions,
|
|
644
|
-
name: options,
|
|
645
|
-
}, this, 'roles');
|
|
646
|
-
}
|
|
647
|
-
else if (options instanceof Role__1.default) {
|
|
648
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
649
|
-
role = options;
|
|
650
|
-
Object.assign(role, relationOptions);
|
|
651
|
-
}
|
|
652
|
-
else {
|
|
653
|
-
role = Role__1.default.from({
|
|
654
|
-
...roleOptions,
|
|
655
|
-
...options,
|
|
656
|
-
}, this, 'roles');
|
|
657
|
-
}
|
|
658
|
-
this.roles.splice(index, 0, role);
|
|
659
|
-
return role;
|
|
660
|
-
}
|
|
661
|
-
insertRoleAt(options, index) {
|
|
662
|
-
const node = this._insertRoleAt(options, index);
|
|
663
|
-
node.create({
|
|
664
|
-
index,
|
|
665
|
-
parentNode: this,
|
|
666
|
-
parentKey: 'roles',
|
|
667
|
-
});
|
|
668
|
-
return node;
|
|
669
|
-
}
|
|
670
|
-
_addRole(options) {
|
|
671
|
-
const index = this.roles.length;
|
|
672
|
-
return this._insertRoleAt(options, index);
|
|
673
|
-
}
|
|
674
|
-
addRole(options) {
|
|
675
|
-
const node = this._addRole(options);
|
|
676
|
-
const index = this.roles.indexOf(node);
|
|
677
|
-
node.create({
|
|
678
|
-
index,
|
|
679
|
-
parentNode: this,
|
|
680
|
-
parentKey: 'roles',
|
|
681
|
-
});
|
|
682
|
-
return node;
|
|
683
|
-
}
|
|
684
|
-
getModuleExistingNames(excludedList = []) {
|
|
685
|
-
const excludedSet = new Set(excludedList);
|
|
686
|
-
return (this.dependencies || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
687
|
-
}
|
|
688
|
-
getModuleUniqueName(name = 'module1') {
|
|
689
|
-
return utils.unique(name, this.getModuleExistingNames(), undefined, false);
|
|
690
|
-
}
|
|
691
|
-
_insertModuleInDependenciesAt(options, index) {
|
|
692
|
-
const moduleOptions = {};
|
|
693
|
-
const relationOptions = { parentNode: this, parentKey: 'dependencies' };
|
|
694
|
-
let module;
|
|
695
|
-
if (!options) {
|
|
696
|
-
module = Module__1.default.from({
|
|
697
|
-
...moduleOptions,
|
|
698
|
-
name: this.getModuleUniqueName(),
|
|
699
|
-
}, this, 'dependencies');
|
|
700
|
-
}
|
|
701
|
-
else if (typeof options === 'string') {
|
|
702
|
-
module = Module__1.default.from({
|
|
703
|
-
...moduleOptions,
|
|
704
|
-
name: options,
|
|
705
|
-
}, this, 'dependencies');
|
|
706
|
-
}
|
|
707
|
-
else if (options instanceof Module__1.default) {
|
|
708
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
709
|
-
module = options;
|
|
710
|
-
Object.assign(module, relationOptions);
|
|
711
|
-
}
|
|
712
|
-
else {
|
|
713
|
-
module = Module__1.default.from({
|
|
714
|
-
...moduleOptions,
|
|
715
|
-
...options,
|
|
716
|
-
}, this, 'dependencies');
|
|
717
|
-
}
|
|
718
|
-
this.dependencies.splice(index, 0, module);
|
|
719
|
-
return module;
|
|
720
|
-
}
|
|
721
|
-
insertModuleInDependenciesAt(options, index) {
|
|
722
|
-
const node = this._insertModuleInDependenciesAt(options, index);
|
|
723
|
-
node.create({
|
|
724
|
-
index,
|
|
725
|
-
parentNode: this,
|
|
726
|
-
parentKey: 'dependencies',
|
|
727
|
-
});
|
|
728
|
-
return node;
|
|
729
|
-
}
|
|
730
|
-
_addModuleInDependencies(options) {
|
|
731
|
-
const index = this.dependencies.length;
|
|
732
|
-
return this._insertModuleInDependenciesAt(options, index);
|
|
733
|
-
}
|
|
734
|
-
addModuleInDependencies(options) {
|
|
735
|
-
const node = this._addModuleInDependencies(options);
|
|
736
|
-
const index = this.dependencies.indexOf(node);
|
|
737
|
-
node.create({
|
|
738
|
-
index,
|
|
739
|
-
parentNode: this,
|
|
740
|
-
parentKey: 'dependencies',
|
|
741
|
-
});
|
|
742
|
-
return node;
|
|
743
|
-
}
|
|
744
|
-
_insertModuleInInterfaceDependenciesAt(options, index) {
|
|
745
|
-
const moduleOptions = {};
|
|
746
|
-
const relationOptions = { parentNode: this, parentKey: 'interfaceDependencies' };
|
|
747
|
-
let module;
|
|
748
|
-
if (!options) {
|
|
749
|
-
module = Module__1.default.from({
|
|
750
|
-
...moduleOptions,
|
|
751
|
-
name: this.getModuleUniqueName(),
|
|
752
|
-
}, this, 'interfaceDependencies');
|
|
753
|
-
}
|
|
754
|
-
else if (typeof options === 'string') {
|
|
755
|
-
module = Module__1.default.from({
|
|
756
|
-
...moduleOptions,
|
|
757
|
-
name: options,
|
|
758
|
-
}, this, 'interfaceDependencies');
|
|
759
|
-
}
|
|
760
|
-
else if (options instanceof Module__1.default) {
|
|
761
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
762
|
-
module = options;
|
|
763
|
-
Object.assign(module, relationOptions);
|
|
764
|
-
}
|
|
765
|
-
else {
|
|
766
|
-
module = Module__1.default.from({
|
|
767
|
-
...moduleOptions,
|
|
768
|
-
...options,
|
|
769
|
-
}, this, 'interfaceDependencies');
|
|
770
|
-
}
|
|
771
|
-
this.interfaceDependencies.splice(index, 0, module);
|
|
772
|
-
return module;
|
|
773
|
-
}
|
|
774
|
-
insertModuleInInterfaceDependenciesAt(options, index) {
|
|
775
|
-
const node = this._insertModuleInInterfaceDependenciesAt(options, index);
|
|
776
|
-
node.create({
|
|
777
|
-
index,
|
|
778
|
-
parentNode: this,
|
|
779
|
-
parentKey: 'interfaceDependencies',
|
|
780
|
-
});
|
|
781
|
-
return node;
|
|
782
|
-
}
|
|
783
|
-
_addModuleInInterfaceDependencies(options) {
|
|
784
|
-
const index = this.interfaceDependencies.length;
|
|
785
|
-
return this._insertModuleInInterfaceDependenciesAt(options, index);
|
|
786
|
-
}
|
|
787
|
-
addModuleInInterfaceDependencies(options) {
|
|
788
|
-
const node = this._addModuleInInterfaceDependencies(options);
|
|
789
|
-
const index = this.interfaceDependencies.indexOf(node);
|
|
790
|
-
node.create({
|
|
791
|
-
index,
|
|
792
|
-
parentNode: this,
|
|
793
|
-
parentKey: 'interfaceDependencies',
|
|
794
|
-
});
|
|
795
|
-
return node;
|
|
796
|
-
}
|
|
797
|
-
_insertModuleInComponentDependenciesAt(options, index) {
|
|
798
|
-
const moduleOptions = {};
|
|
799
|
-
const relationOptions = { parentNode: this, parentKey: 'componentDependencies' };
|
|
800
|
-
let module;
|
|
801
|
-
if (!options) {
|
|
802
|
-
module = Module__1.default.from({
|
|
803
|
-
...moduleOptions,
|
|
804
|
-
name: this.getModuleUniqueName(),
|
|
805
|
-
}, this, 'componentDependencies');
|
|
806
|
-
}
|
|
807
|
-
else if (typeof options === 'string') {
|
|
808
|
-
module = Module__1.default.from({
|
|
809
|
-
...moduleOptions,
|
|
810
|
-
name: options,
|
|
811
|
-
}, this, 'componentDependencies');
|
|
812
|
-
}
|
|
813
|
-
else if (options instanceof Module__1.default) {
|
|
814
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
815
|
-
module = options;
|
|
816
|
-
Object.assign(module, relationOptions);
|
|
817
|
-
}
|
|
818
|
-
else {
|
|
819
|
-
module = Module__1.default.from({
|
|
820
|
-
...moduleOptions,
|
|
821
|
-
...options,
|
|
822
|
-
}, this, 'componentDependencies');
|
|
823
|
-
}
|
|
824
|
-
this.componentDependencies.splice(index, 0, module);
|
|
825
|
-
return module;
|
|
826
|
-
}
|
|
827
|
-
insertModuleInComponentDependenciesAt(options, index) {
|
|
828
|
-
const node = this._insertModuleInComponentDependenciesAt(options, index);
|
|
829
|
-
node.create({
|
|
830
|
-
index,
|
|
831
|
-
parentNode: this,
|
|
832
|
-
parentKey: 'componentDependencies',
|
|
833
|
-
});
|
|
834
|
-
return node;
|
|
835
|
-
}
|
|
836
|
-
_addModuleInComponentDependencies(options) {
|
|
837
|
-
const index = this.componentDependencies.length;
|
|
838
|
-
return this._insertModuleInComponentDependenciesAt(options, index);
|
|
839
|
-
}
|
|
840
|
-
addModuleInComponentDependencies(options) {
|
|
841
|
-
const node = this._addModuleInComponentDependencies(options);
|
|
842
|
-
const index = this.componentDependencies.indexOf(node);
|
|
843
|
-
node.create({
|
|
844
|
-
index,
|
|
845
|
-
parentNode: this,
|
|
846
|
-
parentKey: 'componentDependencies',
|
|
847
|
-
});
|
|
848
|
-
return node;
|
|
849
|
-
}
|
|
850
|
-
removeDataSource(options) {
|
|
851
|
-
let dataSource;
|
|
852
|
-
if (typeof options === 'string') {
|
|
853
|
-
dataSource = this.dataSources.find((item) => item.name === options);
|
|
854
|
-
if (!dataSource) {
|
|
855
|
-
throw new Error('找不到数据源 ' + options);
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
else {
|
|
859
|
-
dataSource = options;
|
|
860
|
-
}
|
|
861
|
-
return dataSource.delete();
|
|
862
|
-
}
|
|
863
|
-
__removeDataSource(dataSource) {
|
|
864
|
-
const parentKey = dataSource.parentKey;
|
|
865
|
-
const params = {
|
|
866
|
-
parentNode: this,
|
|
867
|
-
parentKey,
|
|
868
|
-
index: -1,
|
|
869
|
-
object: null,
|
|
870
|
-
oldObject: dataSource,
|
|
871
|
-
};
|
|
872
|
-
if (parentKey) {
|
|
873
|
-
params.parentKey = parentKey;
|
|
874
|
-
if (Array.isArray(this[parentKey])) {
|
|
875
|
-
const index = this[parentKey].indexOf(dataSource);
|
|
876
|
-
~index && this[parentKey].splice(index, 1);
|
|
877
|
-
params.index = index;
|
|
878
|
-
}
|
|
879
|
-
else if (this[parentKey] === dataSource) {
|
|
880
|
-
params.index = 0;
|
|
881
|
-
this[parentKey] = undefined;
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
return params;
|
|
885
|
-
}
|
|
886
|
-
removeStructure(options) {
|
|
887
|
-
let structure;
|
|
888
|
-
if (typeof options === 'string') {
|
|
889
|
-
structure = this.structures.find((item) => item.name === options);
|
|
890
|
-
if (!structure) {
|
|
891
|
-
throw new Error('找不到数据结构 ' + options);
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
else {
|
|
895
|
-
structure = options;
|
|
896
|
-
}
|
|
897
|
-
return structure.delete();
|
|
898
|
-
}
|
|
899
|
-
__removeStructure(structure) {
|
|
900
|
-
const parentKey = structure.parentKey;
|
|
901
|
-
const params = {
|
|
902
|
-
parentNode: this,
|
|
903
|
-
parentKey,
|
|
904
|
-
index: -1,
|
|
905
|
-
object: null,
|
|
906
|
-
oldObject: structure,
|
|
907
|
-
};
|
|
908
|
-
if (parentKey) {
|
|
909
|
-
params.parentKey = parentKey;
|
|
910
|
-
if (Array.isArray(this[parentKey])) {
|
|
911
|
-
const index = this[parentKey].indexOf(structure);
|
|
912
|
-
~index && this[parentKey].splice(index, 1);
|
|
913
|
-
params.index = index;
|
|
914
|
-
}
|
|
915
|
-
else if (this[parentKey] === structure) {
|
|
916
|
-
params.index = 0;
|
|
917
|
-
this[parentKey] = undefined;
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
return params;
|
|
921
|
-
}
|
|
922
|
-
removeEnum(options) {
|
|
923
|
-
let enumeration;
|
|
924
|
-
if (typeof options === 'string') {
|
|
925
|
-
enumeration = this.enums.find((item) => item.name === options);
|
|
926
|
-
if (!enumeration) {
|
|
927
|
-
throw new Error('找不到枚举 ' + options);
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
else {
|
|
931
|
-
enumeration = options;
|
|
932
|
-
}
|
|
933
|
-
return enumeration.delete();
|
|
934
|
-
}
|
|
935
|
-
__removeEnum(enumeration) {
|
|
936
|
-
const parentKey = enumeration.parentKey;
|
|
937
|
-
const params = {
|
|
938
|
-
parentNode: this,
|
|
939
|
-
parentKey,
|
|
940
|
-
index: -1,
|
|
941
|
-
object: null,
|
|
942
|
-
oldObject: enumeration,
|
|
943
|
-
};
|
|
944
|
-
if (parentKey) {
|
|
945
|
-
params.parentKey = parentKey;
|
|
946
|
-
if (Array.isArray(this[parentKey])) {
|
|
947
|
-
const index = this[parentKey].indexOf(enumeration);
|
|
948
|
-
~index && this[parentKey].splice(index, 1);
|
|
949
|
-
params.index = index;
|
|
950
|
-
}
|
|
951
|
-
else if (this[parentKey] === enumeration) {
|
|
952
|
-
params.index = 0;
|
|
953
|
-
this[parentKey] = undefined;
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
return params;
|
|
957
|
-
}
|
|
958
|
-
removeLogic(options) {
|
|
959
|
-
let logic;
|
|
960
|
-
if (typeof options === 'string') {
|
|
961
|
-
logic = this.logics.find((item) => item.name === options);
|
|
962
|
-
if (!logic) {
|
|
963
|
-
throw new Error('找不到逻辑 ' + options);
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
else {
|
|
967
|
-
logic = options;
|
|
968
|
-
}
|
|
969
|
-
return logic.delete();
|
|
970
|
-
}
|
|
971
|
-
__removeLogic(logic) {
|
|
972
|
-
const parentKey = logic.parentKey;
|
|
973
|
-
const params = {
|
|
974
|
-
parentNode: this,
|
|
975
|
-
parentKey,
|
|
976
|
-
index: -1,
|
|
977
|
-
object: null,
|
|
978
|
-
oldObject: logic,
|
|
979
|
-
};
|
|
980
|
-
if (parentKey) {
|
|
981
|
-
params.parentKey = parentKey;
|
|
982
|
-
if (Array.isArray(this[parentKey])) {
|
|
983
|
-
const index = this[parentKey].indexOf(logic);
|
|
984
|
-
~index && this[parentKey].splice(index, 1);
|
|
985
|
-
params.index = index;
|
|
986
|
-
}
|
|
987
|
-
else if (this[parentKey] === logic) {
|
|
988
|
-
params.index = 0;
|
|
989
|
-
this[parentKey] = undefined;
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
return params;
|
|
993
|
-
}
|
|
994
|
-
removeInterface(options) {
|
|
995
|
-
let itface;
|
|
996
|
-
if (typeof options === 'string') {
|
|
997
|
-
itface = this.interfaces.find((item) => item.name === options);
|
|
998
|
-
if (!itface) {
|
|
999
|
-
throw new Error('找不到接口 ' + options);
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
else {
|
|
1003
|
-
itface = options;
|
|
1004
|
-
}
|
|
1005
|
-
return itface.delete();
|
|
1006
|
-
}
|
|
1007
|
-
__removeInterface(itface) {
|
|
1008
|
-
const parentKey = itface.parentKey;
|
|
1009
|
-
const params = {
|
|
1010
|
-
parentNode: this,
|
|
1011
|
-
parentKey,
|
|
1012
|
-
index: -1,
|
|
1013
|
-
object: null,
|
|
1014
|
-
oldObject: itface,
|
|
1015
|
-
};
|
|
1016
|
-
if (parentKey) {
|
|
1017
|
-
params.parentKey = parentKey;
|
|
1018
|
-
if (Array.isArray(this[parentKey])) {
|
|
1019
|
-
const index = this[parentKey].indexOf(itface);
|
|
1020
|
-
~index && this[parentKey].splice(index, 1);
|
|
1021
|
-
params.index = index;
|
|
1022
|
-
}
|
|
1023
|
-
else if (this[parentKey] === itface) {
|
|
1024
|
-
params.index = 0;
|
|
1025
|
-
this[parentKey] = undefined;
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
return params;
|
|
1029
|
-
}
|
|
1030
|
-
removeView(options) {
|
|
1031
|
-
let view;
|
|
1032
|
-
if (typeof options === 'string') {
|
|
1033
|
-
view = this.views.find((item) => item.name === options);
|
|
1034
|
-
if (!view) {
|
|
1035
|
-
throw new Error('找不到页面 ' + options);
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
else {
|
|
1039
|
-
view = options;
|
|
1040
|
-
}
|
|
1041
|
-
return view.delete();
|
|
1042
|
-
}
|
|
1043
|
-
__removeView(view) {
|
|
1044
|
-
const parentKey = view.parentKey;
|
|
1045
|
-
const params = {
|
|
1046
|
-
parentNode: this,
|
|
1047
|
-
parentKey,
|
|
1048
|
-
index: -1,
|
|
1049
|
-
object: null,
|
|
1050
|
-
oldObject: view,
|
|
1051
|
-
};
|
|
1052
|
-
if (parentKey) {
|
|
1053
|
-
params.parentKey = parentKey;
|
|
1054
|
-
if (Array.isArray(this[parentKey])) {
|
|
1055
|
-
const index = this[parentKey].indexOf(view);
|
|
1056
|
-
~index && this[parentKey].splice(index, 1);
|
|
1057
|
-
params.index = index;
|
|
1058
|
-
}
|
|
1059
|
-
else if (this[parentKey] === view) {
|
|
1060
|
-
params.index = 0;
|
|
1061
|
-
this[parentKey] = undefined;
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
return params;
|
|
1065
|
-
}
|
|
1066
|
-
removeProcess(options) {
|
|
1067
|
-
let process;
|
|
1068
|
-
if (typeof options === 'string') {
|
|
1069
|
-
process = this.processes.find((item) => item.name === options);
|
|
1070
|
-
if (!process) {
|
|
1071
|
-
throw new Error('找不到流程 ' + options);
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
else {
|
|
1075
|
-
process = options;
|
|
1076
|
-
}
|
|
1077
|
-
return process.delete();
|
|
1078
|
-
}
|
|
1079
|
-
__removeProcess(process) {
|
|
1080
|
-
const parentKey = process.parentKey;
|
|
1081
|
-
const params = {
|
|
1082
|
-
parentNode: this,
|
|
1083
|
-
parentKey,
|
|
1084
|
-
index: -1,
|
|
1085
|
-
object: null,
|
|
1086
|
-
oldObject: process,
|
|
1087
|
-
};
|
|
1088
|
-
if (parentKey) {
|
|
1089
|
-
params.parentKey = parentKey;
|
|
1090
|
-
if (Array.isArray(this[parentKey])) {
|
|
1091
|
-
const index = this[parentKey].indexOf(process);
|
|
1092
|
-
~index && this[parentKey].splice(index, 1);
|
|
1093
|
-
params.index = index;
|
|
1094
|
-
}
|
|
1095
|
-
else if (this[parentKey] === process) {
|
|
1096
|
-
params.index = 0;
|
|
1097
|
-
this[parentKey] = undefined;
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
return params;
|
|
1101
|
-
}
|
|
1102
|
-
removeRole(options) {
|
|
1103
|
-
let role;
|
|
1104
|
-
if (typeof options === 'string') {
|
|
1105
|
-
role = this.roles.find((item) => item.name === options);
|
|
1106
|
-
if (!role) {
|
|
1107
|
-
throw new Error('找不到角色 ' + options);
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
else {
|
|
1111
|
-
role = options;
|
|
1112
|
-
}
|
|
1113
|
-
return role.delete();
|
|
1114
|
-
}
|
|
1115
|
-
__removeRole(role) {
|
|
1116
|
-
const parentKey = role.parentKey;
|
|
1117
|
-
const params = {
|
|
1118
|
-
parentNode: this,
|
|
1119
|
-
parentKey,
|
|
1120
|
-
index: -1,
|
|
1121
|
-
object: null,
|
|
1122
|
-
oldObject: role,
|
|
1123
|
-
};
|
|
1124
|
-
if (parentKey) {
|
|
1125
|
-
params.parentKey = parentKey;
|
|
1126
|
-
if (Array.isArray(this[parentKey])) {
|
|
1127
|
-
const index = this[parentKey].indexOf(role);
|
|
1128
|
-
~index && this[parentKey].splice(index, 1);
|
|
1129
|
-
params.index = index;
|
|
1130
|
-
}
|
|
1131
|
-
else if (this[parentKey] === role) {
|
|
1132
|
-
params.index = 0;
|
|
1133
|
-
this[parentKey] = undefined;
|
|
1134
|
-
}
|
|
1135
|
-
}
|
|
1136
|
-
return params;
|
|
1137
|
-
}
|
|
1138
|
-
removeTheme(options) {
|
|
1139
|
-
let theme;
|
|
1140
|
-
if (typeof options === 'string') {
|
|
1141
|
-
theme = this.theme;
|
|
1142
|
-
if (!theme) {
|
|
1143
|
-
throw new Error('找不到主题 ' + options);
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
else {
|
|
1147
|
-
theme = options;
|
|
1148
|
-
}
|
|
1149
|
-
return theme.delete();
|
|
1150
|
-
}
|
|
1151
|
-
__removeTheme(theme) {
|
|
1152
|
-
const parentKey = theme.parentKey;
|
|
1153
|
-
const params = {
|
|
1154
|
-
parentNode: this,
|
|
1155
|
-
parentKey,
|
|
1156
|
-
index: -1,
|
|
1157
|
-
object: null,
|
|
1158
|
-
oldObject: theme,
|
|
1159
|
-
};
|
|
1160
|
-
if (parentKey) {
|
|
1161
|
-
params.parentKey = parentKey;
|
|
1162
|
-
if (Array.isArray(this[parentKey])) {
|
|
1163
|
-
const index = this[parentKey].indexOf(theme);
|
|
1164
|
-
~index && this[parentKey].splice(index, 1);
|
|
1165
|
-
params.index = index;
|
|
1166
|
-
}
|
|
1167
|
-
else if (this[parentKey] === theme) {
|
|
1168
|
-
params.index = 0;
|
|
1169
|
-
this[parentKey] = undefined;
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
return params;
|
|
1173
|
-
}
|
|
1174
|
-
removeConfiguration(options) {
|
|
1175
|
-
let configuration;
|
|
1176
|
-
if (typeof options === 'string') {
|
|
1177
|
-
configuration = this.configuration;
|
|
1178
|
-
if (!configuration) {
|
|
1179
|
-
throw new Error('找不到配置管理 ' + options);
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
else {
|
|
1183
|
-
configuration = options;
|
|
1184
|
-
}
|
|
1185
|
-
return configuration.delete();
|
|
1186
|
-
}
|
|
1187
|
-
__removeConfiguration(configuration) {
|
|
1188
|
-
const parentKey = configuration.parentKey;
|
|
1189
|
-
const params = {
|
|
1190
|
-
parentNode: this,
|
|
1191
|
-
parentKey,
|
|
1192
|
-
index: -1,
|
|
1193
|
-
object: null,
|
|
1194
|
-
oldObject: configuration,
|
|
1195
|
-
};
|
|
1196
|
-
if (parentKey) {
|
|
1197
|
-
params.parentKey = parentKey;
|
|
1198
|
-
if (Array.isArray(this[parentKey])) {
|
|
1199
|
-
const index = this[parentKey].indexOf(configuration);
|
|
1200
|
-
~index && this[parentKey].splice(index, 1);
|
|
1201
|
-
params.index = index;
|
|
1202
|
-
}
|
|
1203
|
-
else if (this[parentKey] === configuration) {
|
|
1204
|
-
params.index = 0;
|
|
1205
|
-
this[parentKey] = undefined;
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
return params;
|
|
1209
|
-
}
|
|
1210
|
-
removeModuleInDependencies(options) {
|
|
1211
|
-
let module;
|
|
1212
|
-
if (typeof options === 'string') {
|
|
1213
|
-
module = this.dependencies.find((item) => item.name === options);
|
|
1214
|
-
if (!module) {
|
|
1215
|
-
throw new Error('找不到模块 ' + options);
|
|
1216
|
-
}
|
|
1217
|
-
}
|
|
1218
|
-
else {
|
|
1219
|
-
module = options;
|
|
1220
|
-
}
|
|
1221
|
-
return module.delete();
|
|
1222
|
-
}
|
|
1223
|
-
removeModuleInInterfaceDependencies(options) {
|
|
1224
|
-
let module;
|
|
1225
|
-
if (typeof options === 'string') {
|
|
1226
|
-
module = this.interfaceDependencies.find((item) => item.name === options);
|
|
1227
|
-
if (!module) {
|
|
1228
|
-
throw new Error('找不到模块 ' + options);
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
else {
|
|
1232
|
-
module = options;
|
|
1233
|
-
}
|
|
1234
|
-
return module.delete();
|
|
1235
|
-
}
|
|
1236
|
-
removeModuleInComponentDependencies(options) {
|
|
1237
|
-
let module;
|
|
1238
|
-
if (typeof options === 'string') {
|
|
1239
|
-
module = this.componentDependencies.find((item) => item.name === options);
|
|
1240
|
-
if (!module) {
|
|
1241
|
-
throw new Error('找不到模块 ' + options);
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
else {
|
|
1245
|
-
module = options;
|
|
1246
|
-
}
|
|
1247
|
-
return module.delete();
|
|
1248
|
-
}
|
|
1249
|
-
__removeModule(module) {
|
|
1250
|
-
const parentKey = module.parentKey;
|
|
1251
|
-
const params = {
|
|
1252
|
-
parentNode: this,
|
|
1253
|
-
parentKey,
|
|
1254
|
-
index: -1,
|
|
1255
|
-
object: null,
|
|
1256
|
-
oldObject: module,
|
|
1257
|
-
};
|
|
1258
|
-
if (parentKey) {
|
|
1259
|
-
params.parentKey = parentKey;
|
|
1260
|
-
if (Array.isArray(this[parentKey])) {
|
|
1261
|
-
const index = this[parentKey].indexOf(module);
|
|
1262
|
-
~index && this[parentKey].splice(index, 1);
|
|
1263
|
-
params.index = index;
|
|
1264
|
-
}
|
|
1265
|
-
else if (this[parentKey] === module) {
|
|
1266
|
-
params.index = 0;
|
|
1267
|
-
this[parentKey] = undefined;
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
return params;
|
|
1271
|
-
}
|
|
1272
|
-
//================================================================================
|
|
1273
|
-
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
1274
|
-
// 自动生成的代码已结束。下面可以手动编写。
|
|
1275
|
-
//================================================================================
|
|
1276
|
-
findComponentDependencyByName(name) {
|
|
1277
|
-
return this.componentDependencies.find((componentDependency) => componentDependency.name === name);
|
|
1278
|
-
}
|
|
1279
|
-
findDataSourceByName(name) {
|
|
1280
|
-
return this.dataSources.find((dataSourceItem) => dataSourceItem.name === name);
|
|
1281
|
-
}
|
|
1282
|
-
get defaultDS() {
|
|
1283
|
-
return this.dataSources?.find((dataSource) => dataSource.name === 'defaultDS');
|
|
1284
|
-
}
|
|
1285
|
-
findEnumByName(name) {
|
|
1286
|
-
return this.enums.find((enumItem) => enumItem.name === name);
|
|
1287
|
-
}
|
|
1288
|
-
findStructureByName(name) {
|
|
1289
|
-
return this.structures.find((item) => item.name === name);
|
|
1290
|
-
}
|
|
1291
|
-
findLogicByName(name) {
|
|
1292
|
-
return this.logics.find((logic) => logic.name === name);
|
|
1293
|
-
}
|
|
1294
|
-
/**
|
|
1295
|
-
* 是否为官方应用
|
|
1296
|
-
*/
|
|
1297
|
-
officialType = undefined;
|
|
1298
|
-
/**
|
|
1299
|
-
* 轻舟项目 Id
|
|
1300
|
-
*/
|
|
1301
|
-
projectId = undefined;
|
|
1302
|
-
/**
|
|
1303
|
-
* 租户 Id
|
|
1304
|
-
*/
|
|
1305
|
-
tenantId = undefined;
|
|
1306
|
-
/**
|
|
1307
|
-
* 租户 Id
|
|
1308
|
-
*/
|
|
1309
|
-
userGroupId = undefined;
|
|
1310
|
-
/**
|
|
1311
|
-
* 多环境
|
|
1312
|
-
*/
|
|
1313
|
-
envs = undefined;
|
|
1314
|
-
/**
|
|
1315
|
-
* 多环境
|
|
1316
|
-
*/
|
|
1317
|
-
envList = ['dev', 'online'];
|
|
1318
|
-
/**
|
|
1319
|
-
* 发布状态
|
|
1320
|
-
*/
|
|
1321
|
-
deploying = undefined;
|
|
1322
|
-
/**
|
|
1323
|
-
* 发布 Id
|
|
1324
|
-
*/
|
|
1325
|
-
deploymentId = undefined;
|
|
1326
|
-
/**
|
|
1327
|
-
* 从模板创建的模板 Id
|
|
1328
|
-
*/
|
|
1329
|
-
templateId = undefined;
|
|
1330
|
-
/**
|
|
1331
|
-
* 获取命名空间
|
|
1332
|
-
*/
|
|
1333
|
-
getNamespace() {
|
|
1334
|
-
return 'app';
|
|
1335
|
-
}
|
|
1336
|
-
getTsNamespace() {
|
|
1337
|
-
return `app`;
|
|
1338
|
-
}
|
|
1339
|
-
findNodeByPath(nodePath) {
|
|
1340
|
-
const pathArr = nodePath?.split('.') || [];
|
|
1341
|
-
let pathItem = pathArr.shift();
|
|
1342
|
-
let node = this;
|
|
1343
|
-
while (pathItem) {
|
|
1344
|
-
const matchArr = pathItem.match(/\[(.+?)\]/);
|
|
1345
|
-
const arrayPropertyKey = pathItem.split('[')[0];
|
|
1346
|
-
const arrOption = matchArr && matchArr[1] && matchArr[1].split('=');
|
|
1347
|
-
if (node && arrayPropertyKey && arrayPropertyKey !== 'app') {
|
|
1348
|
-
node = node[arrayPropertyKey];
|
|
1349
|
-
if (Array.isArray(arrOption) && arrOption.length && Array.isArray(node)) {
|
|
1350
|
-
if (arrOption.length === 2) {
|
|
1351
|
-
node = node.filter((nodeItem) => nodeItem[arrOption[0]] === arrOption[1])[0];
|
|
1352
|
-
}
|
|
1353
|
-
else {
|
|
1354
|
-
const index = +arrOption[0];
|
|
1355
|
-
node = node[index];
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
pathItem = pathArr.shift();
|
|
1360
|
-
}
|
|
1361
|
-
return node;
|
|
1362
|
-
}
|
|
1363
|
-
findNodeByCompleteName(completeName) {
|
|
1364
|
-
const nameArr = completeName?.split('.') || [];
|
|
1365
|
-
const start = nameArr.shift();
|
|
1366
|
-
let node = this;
|
|
1367
|
-
const mod = 0;
|
|
1368
|
-
const modulesMap = {
|
|
1369
|
-
extensions: node.dependencies,
|
|
1370
|
-
apis: node.interfaceDependencies,
|
|
1371
|
-
components: node.componentDependencies,
|
|
1372
|
-
};
|
|
1373
|
-
const modules = modulesMap[start];
|
|
1374
|
-
if (Array.isArray(modules)) {
|
|
1375
|
-
const moduleName = nameArr.shift();
|
|
1376
|
-
node = modules.find((moduleItem) => moduleItem.name === moduleName);
|
|
1377
|
-
}
|
|
1378
|
-
for (let index = 0; index < nameArr.length; index++) {
|
|
1379
|
-
if (!node) {
|
|
1380
|
-
return null;
|
|
1381
|
-
}
|
|
1382
|
-
const nameItem = nameArr[index];
|
|
1383
|
-
const isKeyword = index % 2 === mod;
|
|
1384
|
-
if (!isKeyword && Array.isArray(node)) {
|
|
1385
|
-
node = node.find(({ name }) => name === nameItem);
|
|
1386
|
-
}
|
|
1387
|
-
else {
|
|
1388
|
-
node = node[nameItem];
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
return node;
|
|
1392
|
-
}
|
|
1393
|
-
/**
|
|
1394
|
-
* @param path 路径
|
|
1395
|
-
* path 为要查找路径:如 /dashboard/student/list、/dashboard/student/list
|
|
1396
|
-
*/
|
|
1397
|
-
findViewByPath(path) {
|
|
1398
|
-
const arr = path.split('/');
|
|
1399
|
-
if (arr[0] === '')
|
|
1400
|
-
arr.shift();
|
|
1401
|
-
if (!arr.length)
|
|
1402
|
-
throw Error('Cannot find View ' + path);
|
|
1403
|
-
const childName = arr.shift();
|
|
1404
|
-
const subView = this.views.find((child) => child.name === childName);
|
|
1405
|
-
return arr.length ? subView.findViewByPath(arr.join('/')) : subView;
|
|
1406
|
-
}
|
|
1407
|
-
findViewByName(name) {
|
|
1408
|
-
return utils.traverse((current) => {
|
|
1409
|
-
if (current.node.name === name)
|
|
1410
|
-
return current.node;
|
|
1411
|
-
}, { node: { name: '', children: this.views } });
|
|
1412
|
-
}
|
|
1413
|
-
loadEnvList() {
|
|
1414
|
-
this.envList = ['dev', 'online'];
|
|
1415
|
-
}
|
|
1416
|
-
// 必须先 loadPackageInfo 之后再生成代码
|
|
1417
|
-
packageInfo = null;
|
|
1418
|
-
loadPackageInfo() {
|
|
1419
|
-
const dependencyMap = window.globalData.ideVersionDetail.dependencies;
|
|
1420
|
-
this.packageInfo = {
|
|
1421
|
-
template: { name: '', version: '' },
|
|
1422
|
-
ui: { name: '', version: '' },
|
|
1423
|
-
};
|
|
1424
|
-
this.packageInfo.template.name = this.scope === 'h5' ? '@lcap/mobile-template' : 'lcap-pc-template';
|
|
1425
|
-
this.packageInfo.template.version = this.scope === 'h5' ? dependencyMap.FrontendArchH5.version : dependencyMap.FrontendArchPC.version;
|
|
1426
|
-
this.packageInfo.ui.name = this.scope === 'h5' ? '@lcap/mobile-ui' : 'cloud-ui.vusion';
|
|
1427
|
-
this.packageInfo.ui.version = this.scope === 'h5' ? dependencyMap.FrontendComponentLibraryH5.version : dependencyMap.FrontendComponentLibraryPC.version;
|
|
1428
|
-
}
|
|
1429
|
-
/**
|
|
1430
|
-
* 根据 packageInfo 的信息生成用于 load 的 assetsInfo
|
|
1431
|
-
* 在环境中需要 basic 和 custom 分开 load,否则容易报错
|
|
1432
|
-
* @param prefix
|
|
1433
|
-
*/
|
|
1434
|
-
genAllAssetsInfo(prefix) {
|
|
1435
|
-
const packageInfo = this.packageInfo;
|
|
1436
|
-
const scope = this.scope;
|
|
1437
|
-
const result = {
|
|
1438
|
-
basic: {
|
|
1439
|
-
js: [
|
|
1440
|
-
`${prefix}/packages/vue@2/dist/vue.min.js`,
|
|
1441
|
-
// `${prefix}/packages/vue-router@3/dist/vue-router.min.js`,
|
|
1442
|
-
scope === 'h5' ? `${prefix}/packages/@lcap/mobile-ui@${packageInfo.ui.version}/dist-theme/index.js` : `${prefix}/packages/cloud-ui.vusion@${packageInfo.ui.version}/dist-theme/index.js`,
|
|
1443
|
-
scope === 'h5' ? `${prefix}/packages/@lcap/mobile-template@${packageInfo.template.version}/cloudAdminDesigner.umd.min.js` : `${prefix}/packages/lcap-pc-template@${packageInfo.template.version}/cloudAdminDesigner.umd.min.js`,
|
|
1444
|
-
],
|
|
1445
|
-
css: [
|
|
1446
|
-
scope === 'h5' ? `${prefix}/packages/@lcap/mobile-ui@${packageInfo.ui.version}/dist-theme/index.css` : `${prefix}/packages/cloud-ui.vusion@${packageInfo.ui.version}/dist-theme/index.css`,
|
|
1447
|
-
scope === 'h5' ? `${prefix}/packages/@lcap/mobile-template@${packageInfo.template.version}/cloudAdminDesigner.css` : `${prefix}/packages/lcap-pc-template@${packageInfo.template.version}/cloudAdminDesigner.css`,
|
|
1448
|
-
],
|
|
1449
|
-
},
|
|
1450
|
-
custom: {
|
|
1451
|
-
js: [],
|
|
1452
|
-
css: [],
|
|
1453
|
-
names: [],
|
|
1454
|
-
},
|
|
1455
|
-
};
|
|
1456
|
-
this.componentDependencies.forEach((dep) => {
|
|
1457
|
-
const { name, version } = dep;
|
|
1458
|
-
result.custom.js.push(`${prefix}/packages/${name}@${version}/dist-theme/index.js`);
|
|
1459
|
-
if (utils.shouldLoadCss(name, version)) {
|
|
1460
|
-
result.custom.css.push(`${prefix}/packages/${name}@${version}/dist-theme/index.css`);
|
|
1461
|
-
}
|
|
1462
|
-
result.custom.names.push(name);
|
|
1463
|
-
});
|
|
1464
|
-
return result;
|
|
1465
|
-
}
|
|
1466
|
-
genThemeCSS() {
|
|
1467
|
-
const keys = Object.keys(this.theme?.variableMap || {});
|
|
1468
|
-
if (!keys.length)
|
|
1469
|
-
return;
|
|
1470
|
-
return `:root {
|
|
1471
|
-
${keys.map((key) => ` ${key}: ${this.theme?.variableMap[key]};`).join('\n')}
|
|
1472
|
-
}
|
|
1473
|
-
`;
|
|
1474
|
-
}
|
|
1475
|
-
};
|
|
1476
|
-
__decorate([
|
|
1477
|
-
(0, decorators_1.property)()
|
|
1478
|
-
], App.prototype, "id", void 0);
|
|
1479
|
-
__decorate([
|
|
1480
|
-
(0, decorators_1.property)()
|
|
1481
|
-
], App.prototype, "concept", void 0);
|
|
1482
|
-
__decorate([
|
|
1483
|
-
(0, decorators_1.property)()
|
|
1484
|
-
], App.prototype, "ideVersion", void 0);
|
|
1485
|
-
__decorate([
|
|
1486
|
-
(0, decorators_1.property)()
|
|
1487
|
-
], App.prototype, "name", void 0);
|
|
1488
|
-
__decorate([
|
|
1489
|
-
(0, decorators_1.property)()
|
|
1490
|
-
], App.prototype, "title", void 0);
|
|
1491
|
-
__decorate([
|
|
1492
|
-
(0, decorators_1.property)()
|
|
1493
|
-
], App.prototype, "icon", void 0);
|
|
1494
|
-
__decorate([
|
|
1495
|
-
(0, decorators_1.property)()
|
|
1496
|
-
], App.prototype, "desc", void 0);
|
|
1497
|
-
__decorate([
|
|
1498
|
-
(0, decorators_1.property)()
|
|
1499
|
-
], App.prototype, "dnsAddr", void 0);
|
|
1500
|
-
__decorate([
|
|
1501
|
-
(0, decorators_1.property)()
|
|
1502
|
-
], App.prototype, "scope", void 0);
|
|
1503
|
-
__decorate([
|
|
1504
|
-
(0, decorators_1.property)()
|
|
1505
|
-
], App.prototype, "documentTitle", void 0);
|
|
1506
|
-
__decorate([
|
|
1507
|
-
(0, decorators_1.property)()
|
|
1508
|
-
], App.prototype, "documentIcon", void 0);
|
|
1509
|
-
__decorate([
|
|
1510
|
-
(0, decorators_1.property)()
|
|
1511
|
-
], App.prototype, "hasUserCenter", void 0);
|
|
1512
|
-
__decorate([
|
|
1513
|
-
(0, decorators_1.property)()
|
|
1514
|
-
], App.prototype, "hasAuth", void 0);
|
|
1515
|
-
__decorate([
|
|
1516
|
-
(0, decorators_1.property)('DataSource')
|
|
1517
|
-
], App.prototype, "dataSources", void 0);
|
|
1518
|
-
__decorate([
|
|
1519
|
-
(0, decorators_1.property)('Structure')
|
|
1520
|
-
], App.prototype, "structures", void 0);
|
|
1521
|
-
__decorate([
|
|
1522
|
-
(0, decorators_1.property)('Enum')
|
|
1523
|
-
], App.prototype, "enums", void 0);
|
|
1524
|
-
__decorate([
|
|
1525
|
-
(0, decorators_1.property)('Logic')
|
|
1526
|
-
], App.prototype, "logics", void 0);
|
|
1527
|
-
__decorate([
|
|
1528
|
-
(0, decorators_1.property)('Interface')
|
|
1529
|
-
], App.prototype, "interfaces", void 0);
|
|
1530
|
-
__decorate([
|
|
1531
|
-
(0, decorators_1.property)('View')
|
|
1532
|
-
], App.prototype, "views", void 0);
|
|
1533
|
-
__decorate([
|
|
1534
|
-
(0, decorators_1.property)('Process')
|
|
1535
|
-
], App.prototype, "processes", void 0);
|
|
1536
|
-
__decorate([
|
|
1537
|
-
(0, decorators_1.property)('Role')
|
|
1538
|
-
], App.prototype, "roles", void 0);
|
|
1539
|
-
__decorate([
|
|
1540
|
-
(0, decorators_1.property)('Theme')
|
|
1541
|
-
], App.prototype, "theme", void 0);
|
|
1542
|
-
__decorate([
|
|
1543
|
-
(0, decorators_1.property)('Configuration')
|
|
1544
|
-
], App.prototype, "configuration", void 0);
|
|
1545
|
-
__decorate([
|
|
1546
|
-
(0, decorators_1.property)('Module')
|
|
1547
|
-
], App.prototype, "dependencies", void 0);
|
|
1548
|
-
__decorate([
|
|
1549
|
-
(0, decorators_1.property)('Module')
|
|
1550
|
-
], App.prototype, "interfaceDependencies", void 0);
|
|
1551
|
-
__decorate([
|
|
1552
|
-
(0, decorators_1.property)('Module')
|
|
1553
|
-
], App.prototype, "componentDependencies", void 0);
|
|
1554
|
-
__decorate([
|
|
1555
|
-
(0, decorators_1.excludedInJSON)()
|
|
1556
|
-
], App.prototype, "officialType", void 0);
|
|
1557
|
-
__decorate([
|
|
1558
|
-
(0, decorators_1.excludedInJSON)()
|
|
1559
|
-
], App.prototype, "projectId", void 0);
|
|
1560
|
-
__decorate([
|
|
1561
|
-
(0, decorators_1.excludedInJSON)()
|
|
1562
|
-
], App.prototype, "tenantId", void 0);
|
|
1563
|
-
__decorate([
|
|
1564
|
-
(0, decorators_1.excludedInJSON)()
|
|
1565
|
-
], App.prototype, "userGroupId", void 0);
|
|
1566
|
-
__decorate([
|
|
1567
|
-
(0, decorators_1.excludedInJSON)()
|
|
1568
|
-
], App.prototype, "envs", void 0);
|
|
1569
|
-
__decorate([
|
|
1570
|
-
(0, decorators_1.excludedInJSON)()
|
|
1571
|
-
], App.prototype, "envList", void 0);
|
|
1572
|
-
__decorate([
|
|
1573
|
-
(0, decorators_1.excludedInJSON)()
|
|
1574
|
-
], App.prototype, "deploying", void 0);
|
|
1575
|
-
__decorate([
|
|
1576
|
-
(0, decorators_1.excludedInJSON)()
|
|
1577
|
-
], App.prototype, "deploymentId", void 0);
|
|
1578
|
-
__decorate([
|
|
1579
|
-
(0, decorators_1.excludedInJSON)()
|
|
1580
|
-
], App.prototype, "templateId", void 0);
|
|
1581
|
-
App = App_1 = __decorate([
|
|
1582
|
-
(0, decorators_1.concept)('应用')
|
|
1583
|
-
], App);
|
|
1584
|
-
exports.App = App;
|
|
1585
|
-
classMap_1.default.App = App;
|
|
1586
|
-
exports.default = App;
|
|
1587
|
-
//================================================================================
|
|
1588
|
-
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
1589
|
-
// 自动生成的代码已结束。下面可以手动编写。
|
|
1590
|
-
//================================================================================
|
|
1591
|
-
//# sourceMappingURL=App__.js.map
|