@lcap/nasl 2.22.2-beta.3 → 2.22.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/automate/engine/index.d.ts +4 -0
- package/out/automate/engine/index.js +443 -0
- package/out/automate/engine/index.js.map +1 -0
- package/out/automate/engine/operators.d.ts +24 -0
- package/out/automate/engine/operators.js +252 -0
- package/out/automate/engine/operators.js.map +1 -0
- package/out/automate/engine/uniqueName.d.ts +12 -0
- package/out/automate/engine/uniqueName.js +112 -0
- package/out/automate/engine/uniqueName.js.map +1 -0
- package/out/automate/engine/utils.d.ts +25 -0
- package/out/automate/engine/utils.js +428 -0
- package/out/automate/engine/utils.js.map +1 -0
- package/out/automate/engine/viewCache.d.ts +19 -0
- package/out/automate/engine/viewCache.js +45 -0
- package/out/automate/engine/viewCache.js.map +1 -0
- package/out/automate/template/myProcess.d.ts +10 -0
- package/out/automate/template/myProcess.js +11498 -0
- package/out/automate/template/myProcess.js.map +1 -0
- package/out/bak/translator.d.ts +1 -0
- package/out/bak/translator.js +130 -0
- package/out/bak/translator.js.map +1 -0
- package/out/common/BaseNode.d.ts +306 -0
- package/out/common/BaseNode.js +1222 -0
- package/out/common/BaseNode.js.map +1 -0
- package/out/common/Command.d.ts +20 -0
- package/out/common/Command.js +66 -0
- package/out/common/Command.js.map +1 -0
- package/out/common/ComponentAPI.d.ts +110 -0
- package/out/common/ComponentAPI.js +3 -0
- package/out/common/ComponentAPI.js.map +1 -0
- package/out/common/EventEmitter.d.ts +59 -0
- package/out/common/EventEmitter.js +69 -0
- package/out/common/EventEmitter.js.map +1 -0
- package/out/common/Messager.d.ts +91 -0
- package/out/common/Messager.js +208 -0
- package/out/common/Messager.js.map +1 -0
- package/out/common/index.d.ts +3 -0
- package/out/common/index.js +20 -0
- package/out/common/index.js.map +1 -0
- package/out/concepts/Abort__.d.ts +26 -0
- package/out/concepts/Abort__.js +79 -0
- package/out/concepts/Abort__.js.map +1 -0
- package/out/concepts/Anchor__.d.ts +45 -0
- package/out/concepts/Anchor__.js +182 -0
- package/out/concepts/Anchor__.js.map +1 -0
- package/out/concepts/AnonymousFunction__.d.ts +173 -0
- package/out/concepts/AnonymousFunction__.js +484 -0
- package/out/concepts/AnonymousFunction__.js.map +1 -0
- package/out/concepts/App__.d.ts +1166 -0
- package/out/concepts/App__.js +1885 -0
- package/out/concepts/App__.js.map +1 -0
- package/out/concepts/Argument__.d.ts +66 -0
- package/out/concepts/Argument__.js +267 -0
- package/out/concepts/Argument__.js.map +1 -0
- package/out/concepts/Assignee__.d.ts +289 -0
- package/out/concepts/Assignee__.js +426 -0
- package/out/concepts/Assignee__.js.map +1 -0
- package/out/concepts/AssignmentLine__.d.ts +42 -0
- package/out/concepts/AssignmentLine__.js +111 -0
- package/out/concepts/AssignmentLine__.js.map +1 -0
- package/out/concepts/Assignment__.d.ts +74 -0
- package/out/concepts/Assignment__.js +287 -0
- package/out/concepts/Assignment__.js.map +1 -0
- package/out/concepts/Attribute__.d.ts +98 -0
- package/out/concepts/Attribute__.js +206 -0
- package/out/concepts/Attribute__.js.map +1 -0
- package/out/concepts/BatchAssignment__.d.ts +252 -0
- package/out/concepts/BatchAssignment__.js +806 -0
- package/out/concepts/BatchAssignment__.js.map +1 -0
- package/out/concepts/BinaryExpression__.d.ts +71 -0
- package/out/concepts/BinaryExpression__.js +347 -0
- package/out/concepts/BinaryExpression__.js.map +1 -0
- package/out/concepts/BindAttribute__.d.ts +319 -0
- package/out/concepts/BindAttribute__.js +896 -0
- package/out/concepts/BindAttribute__.js.map +1 -0
- package/out/concepts/BindDirective__.d.ts +162 -0
- package/out/concepts/BindDirective__.js +538 -0
- package/out/concepts/BindDirective__.js.map +1 -0
- package/out/concepts/BindEvent__.d.ts +240 -0
- package/out/concepts/BindEvent__.js +764 -0
- package/out/concepts/BindEvent__.js.map +1 -0
- package/out/concepts/BindStyle__.d.ts +140 -0
- package/out/concepts/BindStyle__.js +433 -0
- package/out/concepts/BindStyle__.js.map +1 -0
- package/out/concepts/BooleanLiteral__.d.ts +35 -0
- package/out/concepts/BooleanLiteral__.js +100 -0
- package/out/concepts/BooleanLiteral__.js.map +1 -0
- package/out/concepts/CallFunction__.d.ts +159 -0
- package/out/concepts/CallFunction__.js +503 -0
- package/out/concepts/CallFunction__.js.map +1 -0
- package/out/concepts/CallInterface__.d.ts +116 -0
- package/out/concepts/CallInterface__.js +570 -0
- package/out/concepts/CallInterface__.js.map +1 -0
- package/out/concepts/CallLogic__.d.ts +187 -0
- package/out/concepts/CallLogic__.js +1007 -0
- package/out/concepts/CallLogic__.js.map +1 -0
- package/out/concepts/CallQueryComponent__.d.ts +433 -0
- package/out/concepts/CallQueryComponent__.js +1267 -0
- package/out/concepts/CallQueryComponent__.js.map +1 -0
- package/out/concepts/Comment__.d.ts +32 -0
- package/out/concepts/Comment__.js +96 -0
- package/out/concepts/Comment__.js.map +1 -0
- package/out/concepts/CompletionProperty__.d.ts +105 -0
- package/out/concepts/CompletionProperty__.js +262 -0
- package/out/concepts/CompletionProperty__.js.map +1 -0
- package/out/concepts/ConfigGroup__.d.ts +124 -0
- package/out/concepts/ConfigGroup__.js +237 -0
- package/out/concepts/ConfigGroup__.js.map +1 -0
- package/out/concepts/ConfigPropertyValue__.d.ts +45 -0
- package/out/concepts/ConfigPropertyValue__.js +107 -0
- package/out/concepts/ConfigPropertyValue__.js.map +1 -0
- package/out/concepts/ConfigProperty__.d.ts +154 -0
- package/out/concepts/ConfigProperty__.js +324 -0
- package/out/concepts/ConfigProperty__.js.map +1 -0
- package/out/concepts/Configuration__.d.ts +124 -0
- package/out/concepts/Configuration__.js +228 -0
- package/out/concepts/Configuration__.js.map +1 -0
- package/out/concepts/Constant__.d.ts +106 -0
- package/out/concepts/Constant__.js +249 -0
- package/out/concepts/Constant__.js.map +1 -0
- package/out/concepts/DataElement__.d.ts +47 -0
- package/out/concepts/DataElement__.js +119 -0
- package/out/concepts/DataElement__.js.map +1 -0
- package/out/concepts/DataSource__.d.ts +165 -0
- package/out/concepts/DataSource__.js +442 -0
- package/out/concepts/DataSource__.js.map +1 -0
- package/out/concepts/DatabaseTypeAnnotation__.d.ts +32 -0
- package/out/concepts/DatabaseTypeAnnotation__.js +79 -0
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -0
- package/out/concepts/Destination__.d.ts +157 -0
- package/out/concepts/Destination__.js +740 -0
- package/out/concepts/Destination__.js.map +1 -0
- package/out/concepts/End__.d.ts +25 -0
- package/out/concepts/End__.js +86 -0
- package/out/concepts/End__.js.map +1 -0
- package/out/concepts/EntityIndex__.d.ts +96 -0
- package/out/concepts/EntityIndex__.js +221 -0
- package/out/concepts/EntityIndex__.js.map +1 -0
- package/out/concepts/EntityProperty__.d.ts +274 -0
- package/out/concepts/EntityProperty__.js +824 -0
- package/out/concepts/EntityProperty__.js.map +1 -0
- package/out/concepts/Entity__.d.ts +339 -0
- package/out/concepts/Entity__.js +711 -0
- package/out/concepts/Entity__.js.map +1 -0
- package/out/concepts/EnumItem__.d.ts +64 -0
- package/out/concepts/EnumItem__.js +146 -0
- package/out/concepts/EnumItem__.js.map +1 -0
- package/out/concepts/Enum__.d.ts +138 -0
- package/out/concepts/Enum__.js +322 -0
- package/out/concepts/Enum__.js.map +1 -0
- package/out/concepts/Event__.d.ts +144 -0
- package/out/concepts/Event__.js +249 -0
- package/out/concepts/Event__.js.map +1 -0
- package/out/concepts/ExternalDestination__.d.ts +76 -0
- package/out/concepts/ExternalDestination__.js +286 -0
- package/out/concepts/ExternalDestination__.js.map +1 -0
- package/out/concepts/ForEachStatement__.d.ts +189 -0
- package/out/concepts/ForEachStatement__.js +446 -0
- package/out/concepts/ForEachStatement__.js.map +1 -0
- package/out/concepts/FrontendLibrary__.d.ts +214 -0
- package/out/concepts/FrontendLibrary__.js +353 -0
- package/out/concepts/FrontendLibrary__.js.map +1 -0
- package/out/concepts/Frontend__.d.ts +374 -0
- package/out/concepts/Frontend__.js +690 -0
- package/out/concepts/Frontend__.js.map +1 -0
- package/out/concepts/Function__.d.ts +417 -0
- package/out/concepts/Function__.js +717 -0
- package/out/concepts/Function__.js.map +1 -0
- package/out/concepts/Identifier__.d.ts +52 -0
- package/out/concepts/Identifier__.js +296 -0
- package/out/concepts/Identifier__.js.map +1 -0
- package/out/concepts/IfStatement__.d.ts +158 -0
- package/out/concepts/IfStatement__.js +305 -0
- package/out/concepts/IfStatement__.js.map +1 -0
- package/out/concepts/Integration__.d.ts +54 -0
- package/out/concepts/Integration__.js +143 -0
- package/out/concepts/Integration__.js.map +1 -0
- package/out/concepts/InterfaceParam__.d.ts +111 -0
- package/out/concepts/InterfaceParam__.js +266 -0
- package/out/concepts/InterfaceParam__.js.map +1 -0
- package/out/concepts/Interface__.d.ts +284 -0
- package/out/concepts/Interface__.js +749 -0
- package/out/concepts/Interface__.js.map +1 -0
- package/out/concepts/JSBlock__.d.ts +34 -0
- package/out/concepts/JSBlock__.js +106 -0
- package/out/concepts/JSBlock__.js.map +1 -0
- package/out/concepts/JavaLogic__.d.ts +43 -0
- package/out/concepts/JavaLogic__.js +124 -0
- package/out/concepts/JavaLogic__.js.map +1 -0
- package/out/concepts/LogicItem__.d.ts +126 -0
- package/out/concepts/LogicItem__.js +253 -0
- package/out/concepts/LogicItem__.js.map +1 -0
- package/out/concepts/Logic__.d.ts +633 -0
- package/out/concepts/Logic__.js +1568 -0
- package/out/concepts/Logic__.js.map +1 -0
- package/out/concepts/MatchCase__.d.ts +258 -0
- package/out/concepts/MatchCase__.js +591 -0
- package/out/concepts/MatchCase__.js.map +1 -0
- package/out/concepts/Match__.d.ts +124 -0
- package/out/concepts/Match__.js +628 -0
- package/out/concepts/Match__.js.map +1 -0
- package/out/concepts/MemberExpression__.d.ts +73 -0
- package/out/concepts/MemberExpression__.js +319 -0
- package/out/concepts/MemberExpression__.js.map +1 -0
- package/out/concepts/MetadataType__.d.ts +245 -0
- package/out/concepts/MetadataType__.js +473 -0
- package/out/concepts/MetadataType__.js.map +1 -0
- package/out/concepts/MicroApp__.d.ts +52 -0
- package/out/concepts/MicroApp__.js +119 -0
- package/out/concepts/MicroApp__.js.map +1 -0
- package/out/concepts/Module__.d.ts +978 -0
- package/out/concepts/Module__.js +1386 -0
- package/out/concepts/Module__.js.map +1 -0
- package/out/concepts/Namespace__.d.ts +1069 -0
- package/out/concepts/Namespace__.js +1380 -0
- package/out/concepts/Namespace__.js.map +1 -0
- package/out/concepts/NewComposite__.d.ts +346 -0
- package/out/concepts/NewComposite__.js +1086 -0
- package/out/concepts/NewComposite__.js.map +1 -0
- package/out/concepts/NewList__.d.ts +133 -0
- package/out/concepts/NewList__.js +385 -0
- package/out/concepts/NewList__.js.map +1 -0
- package/out/concepts/NewMap__.d.ts +224 -0
- package/out/concepts/NewMap__.js +530 -0
- package/out/concepts/NewMap__.js.map +1 -0
- package/out/concepts/New__.d.ts +21 -0
- package/out/concepts/New__.js +68 -0
- package/out/concepts/New__.js.map +1 -0
- package/out/concepts/NullLiteral__.d.ts +27 -0
- package/out/concepts/NullLiteral__.js +81 -0
- package/out/concepts/NullLiteral__.js.map +1 -0
- package/out/concepts/NumericLiteral__.d.ts +56 -0
- package/out/concepts/NumericLiteral__.js +174 -0
- package/out/concepts/NumericLiteral__.js.map +1 -0
- package/out/concepts/OqlQueryComponent__.d.ts +73 -0
- package/out/concepts/OqlQueryComponent__.js +327 -0
- package/out/concepts/OqlQueryComponent__.js.map +1 -0
- package/out/concepts/Param__.d.ts +161 -0
- package/out/concepts/Param__.js +431 -0
- package/out/concepts/Param__.js.map +1 -0
- package/out/concepts/Point__.d.ts +32 -0
- package/out/concepts/Point__.js +79 -0
- package/out/concepts/Point__.js.map +1 -0
- package/out/concepts/ProcessComponent__.d.ts +220 -0
- package/out/concepts/ProcessComponent__.js +339 -0
- package/out/concepts/ProcessComponent__.js.map +1 -0
- package/out/concepts/ProcessElement__.d.ts +647 -0
- package/out/concepts/ProcessElement__.js +1220 -0
- package/out/concepts/ProcessElement__.js.map +1 -0
- package/out/concepts/ProcessOutcome__.d.ts +32 -0
- package/out/concepts/ProcessOutcome__.js +90 -0
- package/out/concepts/ProcessOutcome__.js.map +1 -0
- package/out/concepts/ProcessOutcomes__.d.ts +32 -0
- package/out/concepts/ProcessOutcomes__.js +89 -0
- package/out/concepts/ProcessOutcomes__.js.map +1 -0
- package/out/concepts/Process__.d.ts +614 -0
- package/out/concepts/Process__.js +1031 -0
- package/out/concepts/Process__.js.map +1 -0
- package/out/concepts/QueryAggregateExpression__.d.ts +52 -0
- package/out/concepts/QueryAggregateExpression__.js +149 -0
- package/out/concepts/QueryAggregateExpression__.js.map +1 -0
- package/out/concepts/QueryFieldExpression__.d.ts +54 -0
- package/out/concepts/QueryFieldExpression__.js +160 -0
- package/out/concepts/QueryFieldExpression__.js.map +1 -0
- package/out/concepts/QueryFromExpression__.d.ts +97 -0
- package/out/concepts/QueryFromExpression__.js +197 -0
- package/out/concepts/QueryFromExpression__.js.map +1 -0
- package/out/concepts/QueryGroupByExpression__.d.ts +47 -0
- package/out/concepts/QueryGroupByExpression__.js +142 -0
- package/out/concepts/QueryGroupByExpression__.js.map +1 -0
- package/out/concepts/QueryJoinExpression__.d.ts +184 -0
- package/out/concepts/QueryJoinExpression__.js +318 -0
- package/out/concepts/QueryJoinExpression__.js.map +1 -0
- package/out/concepts/QueryLimitExpression__.d.ts +58 -0
- package/out/concepts/QueryLimitExpression__.js +160 -0
- package/out/concepts/QueryLimitExpression__.js.map +1 -0
- package/out/concepts/QueryOrderByExpression__.d.ts +69 -0
- package/out/concepts/QueryOrderByExpression__.js +173 -0
- package/out/concepts/QueryOrderByExpression__.js.map +1 -0
- package/out/concepts/QuerySelectExpression__.d.ts +204 -0
- package/out/concepts/QuerySelectExpression__.js +295 -0
- package/out/concepts/QuerySelectExpression__.js.map +1 -0
- package/out/concepts/Rect__.d.ts +40 -0
- package/out/concepts/Rect__.js +95 -0
- package/out/concepts/Rect__.js.map +1 -0
- package/out/concepts/Return__.d.ts +129 -0
- package/out/concepts/Return__.js +345 -0
- package/out/concepts/Return__.js.map +1 -0
- package/out/concepts/Role__.d.ts +63 -0
- package/out/concepts/Role__.js +170 -0
- package/out/concepts/Role__.js.map +1 -0
- package/out/concepts/SelectMembers__.d.ts +143 -0
- package/out/concepts/SelectMembers__.js +293 -0
- package/out/concepts/SelectMembers__.js.map +1 -0
- package/out/concepts/Slot__.d.ts +75 -0
- package/out/concepts/Slot__.js +165 -0
- package/out/concepts/Slot__.js.map +1 -0
- package/out/concepts/SqlQueryComponent__.d.ts +71 -0
- package/out/concepts/SqlQueryComponent__.js +271 -0
- package/out/concepts/SqlQueryComponent__.js.map +1 -0
- package/out/concepts/Start__.d.ts +25 -0
- package/out/concepts/Start__.js +73 -0
- package/out/concepts/Start__.js.map +1 -0
- package/out/concepts/StringInterpolation__.d.ts +117 -0
- package/out/concepts/StringInterpolation__.js +252 -0
- package/out/concepts/StringInterpolation__.js.map +1 -0
- package/out/concepts/StringLiteral__.d.ts +38 -0
- package/out/concepts/StringLiteral__.js +134 -0
- package/out/concepts/StringLiteral__.js.map +1 -0
- package/out/concepts/StructureProperty__.d.ts +131 -0
- package/out/concepts/StructureProperty__.js +303 -0
- package/out/concepts/StructureProperty__.js.map +1 -0
- package/out/concepts/Structure__.d.ts +252 -0
- package/out/concepts/Structure__.js +447 -0
- package/out/concepts/Structure__.js.map +1 -0
- package/out/concepts/SwitchCase__.d.ts +94 -0
- package/out/concepts/SwitchCase__.js +232 -0
- package/out/concepts/SwitchCase__.js.map +1 -0
- package/out/concepts/SwitchStatement__.d.ts +84 -0
- package/out/concepts/SwitchStatement__.js +177 -0
- package/out/concepts/SwitchStatement__.js.map +1 -0
- package/out/concepts/Theme__.d.ts +38 -0
- package/out/concepts/Theme__.js +88 -0
- package/out/concepts/Theme__.js.map +1 -0
- package/out/concepts/Transactional__.d.ts +83 -0
- package/out/concepts/Transactional__.js +162 -0
- package/out/concepts/Transactional__.js.map +1 -0
- package/out/concepts/TypeAnnotation__.d.ts +290 -0
- package/out/concepts/TypeAnnotation__.js +885 -0
- package/out/concepts/TypeAnnotation__.js.map +1 -0
- package/out/concepts/TypeParam__.d.ts +25 -0
- package/out/concepts/TypeParam__.js +73 -0
- package/out/concepts/TypeParam__.js.map +1 -0
- package/out/concepts/UnaryExpression__.d.ts +49 -0
- package/out/concepts/UnaryExpression__.js +176 -0
- package/out/concepts/UnaryExpression__.js.map +1 -0
- package/out/concepts/Unparsed__.d.ts +32 -0
- package/out/concepts/Unparsed__.js +94 -0
- package/out/concepts/Unparsed__.js.map +1 -0
- package/out/concepts/UseComponent__.d.ts +32 -0
- package/out/concepts/UseComponent__.js +79 -0
- package/out/concepts/UseComponent__.js.map +1 -0
- package/out/concepts/ValidationRule__.d.ts +142 -0
- package/out/concepts/ValidationRule__.js +473 -0
- package/out/concepts/ValidationRule__.js.map +1 -0
- package/out/concepts/Variable__.d.ts +139 -0
- package/out/concepts/Variable__.js +386 -0
- package/out/concepts/Variable__.js.map +1 -0
- package/out/concepts/ViewBlock__.d.ts +36 -0
- package/out/concepts/ViewBlock__.js +87 -0
- package/out/concepts/ViewBlock__.js.map +1 -0
- package/out/concepts/ViewComponent__.d.ts +566 -0
- package/out/concepts/ViewComponent__.js +762 -0
- package/out/concepts/ViewComponent__.js.map +1 -0
- package/out/concepts/ViewElement__.d.ts +597 -0
- package/out/concepts/ViewElement__.js +1777 -0
- package/out/concepts/ViewElement__.js.map +1 -0
- package/out/concepts/View__.d.ts +714 -0
- package/out/concepts/View__.js +1733 -0
- package/out/concepts/View__.js.map +1 -0
- package/out/concepts/WhileStatement__.d.ts +97 -0
- package/out/concepts/WhileStatement__.js +211 -0
- package/out/concepts/WhileStatement__.js.map +1 -0
- package/out/concepts/basics/stdlib/index.d.ts +4 -0
- package/out/concepts/basics/stdlib/index.js +29 -0
- package/out/concepts/basics/stdlib/index.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.auth.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.auth.js +140 -0
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.browser.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.browser.js +133 -0
- package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.collection.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.collection.js +52 -0
- package/out/concepts/basics/stdlib/nasl.collection.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.configuration.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js +33 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.core.d.ts +5 -0
- package/out/concepts/basics/stdlib/nasl.core.js +49 -0
- package/out/concepts/basics/stdlib/nasl.core.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.event.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.event.js +25 -0
- package/out/concepts/basics/stdlib/nasl.event.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.interface.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.interface.js +43 -0
- package/out/concepts/basics/stdlib/nasl.interface.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.io.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.io.js +52 -0
- package/out/concepts/basics/stdlib/nasl.io.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.logging.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.logging.js +56 -0
- package/out/concepts/basics/stdlib/nasl.logging.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.process.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.process.js +638 -0
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.ui.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.ui.js +1043 -0
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.util.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.util.js +1798 -0
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.validation.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.validation.js +565 -0
- package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +5 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +26 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +1 -0
- package/out/concepts/basics/types/coreTypeList.d.ts +2 -0
- package/out/concepts/basics/types/coreTypeList.js +15 -0
- package/out/concepts/basics/types/coreTypeList.js.map +1 -0
- package/out/concepts/basics/types/index.d.ts +15 -0
- package/out/concepts/basics/types/index.js +32 -0
- package/out/concepts/basics/types/index.js.map +1 -0
- package/out/concepts/index.d.ts +5 -0
- package/out/concepts/index.js +24 -0
- package/out/concepts/index.js.map +1 -0
- package/out/concepts/index__.d.ts +108 -0
- package/out/concepts/index__.js +125 -0
- package/out/concepts/index__.js.map +1 -0
- package/out/config.d.ts +44 -0
- package/out/config.js +73 -0
- package/out/config.js.map +1 -0
- package/out/decorators/index.d.ts +56 -0
- package/out/decorators/index.js +159 -0
- package/out/decorators/index.js.map +1 -0
- package/out/enums/KEYWORDS.d.ts +6 -0
- package/out/enums/KEYWORDS.js +1243 -0
- package/out/enums/KEYWORDS.js.map +1 -0
- package/out/enums/LEVEL_NAME_MAP.d.ts +26 -0
- package/out/enums/LEVEL_NAME_MAP.js +30 -0
- package/out/enums/LEVEL_NAME_MAP.js.map +1 -0
- package/out/eventBus.d.ts +3 -0
- package/out/eventBus.js +7 -0
- package/out/eventBus.js.map +1 -0
- package/out/generator/compileComponent.d.ts +11 -0
- package/out/generator/compileComponent.js +12 -0
- package/out/generator/compileComponent.js.map +1 -0
- package/out/generator/genBundleFiles.d.ts +33 -0
- package/out/generator/genBundleFiles.js +501 -0
- package/out/generator/genBundleFiles.js.map +1 -0
- package/out/generator/genHash.d.ts +7 -0
- package/out/generator/genHash.js +39 -0
- package/out/generator/genHash.js.map +1 -0
- package/out/generator/genMetaData.d.ts +28 -0
- package/out/generator/genMetaData.js +288 -0
- package/out/generator/genMetaData.js.map +1 -0
- package/out/generator/genReleaseBody.d.ts +60 -0
- package/out/generator/genReleaseBody.js +493 -0
- package/out/generator/genReleaseBody.js.map +1 -0
- package/out/generator/icestark.d.ts +2 -0
- package/out/generator/icestark.js +48 -0
- package/out/generator/icestark.js.map +1 -0
- package/out/generator/index.d.ts +7 -0
- package/out/generator/index.js +24 -0
- package/out/generator/index.js.map +1 -0
- package/out/generator/microApp.d.ts +2 -0
- package/out/generator/microApp.js +35 -0
- package/out/generator/microApp.js.map +1 -0
- package/out/generator/permission.d.ts +10 -0
- package/out/generator/permission.js +269 -0
- package/out/generator/permission.js.map +1 -0
- package/out/generator/qiankun.d.ts +2 -0
- package/out/generator/qiankun.js +52 -0
- package/out/generator/qiankun.js.map +1 -0
- package/out/generator/styleReplacer.d.ts +3 -0
- package/out/generator/styleReplacer.js +71 -0
- package/out/generator/styleReplacer.js.map +1 -0
- package/out/index.d.ts +13 -0
- package/out/index.js +64 -0
- package/out/index.js.map +1 -0
- package/out/manager/diagnostic.d.ts +35 -0
- package/out/manager/diagnostic.js +63 -0
- package/out/manager/diagnostic.js.map +1 -0
- package/out/manager/stepRecorder.d.ts +20 -0
- package/out/manager/stepRecorder.js +110 -0
- package/out/manager/stepRecorder.js.map +1 -0
- package/out/sentry/index.d.ts +29 -0
- package/out/sentry/index.js +111 -0
- package/out/sentry/index.js.map +1 -0
- package/out/server/createUiTs.d.ts +16 -0
- package/out/server/createUiTs.js +248 -0
- package/out/server/createUiTs.js.map +1 -0
- package/out/server/entity2LogicNamespace.d.ts +10 -0
- package/out/server/entity2LogicNamespace.js +380 -0
- package/out/server/entity2LogicNamespace.js.map +1 -0
- package/out/server/event.d.ts +30 -0
- package/out/server/event.js +151 -0
- package/out/server/event.js.map +1 -0
- package/out/server/extendBaseNode.d.ts +1 -0
- package/out/server/extendBaseNode.js +475 -0
- package/out/server/extendBaseNode.js.map +1 -0
- package/out/server/formatTsUtils.d.ts +36 -0
- package/out/server/formatTsUtils.js +788 -0
- package/out/server/formatTsUtils.js.map +1 -0
- package/out/server/getExtensionModules.d.ts +3 -0
- package/out/server/getExtensionModules.js +20 -0
- package/out/server/getExtensionModules.js.map +1 -0
- package/out/server/getFunctions.d.ts +3 -0
- package/out/server/getFunctions.js +20 -0
- package/out/server/getFunctions.js.map +1 -0
- package/out/server/getInterfaces.d.ts +2 -0
- package/out/server/getInterfaces.js +48 -0
- package/out/server/getInterfaces.js.map +1 -0
- package/out/server/getLogging.d.ts +1 -0
- package/out/server/getLogging.js +9 -0
- package/out/server/getLogging.js.map +1 -0
- package/out/server/getLogics.d.ts +4 -0
- package/out/server/getLogics.js +352 -0
- package/out/server/getLogics.js.map +1 -0
- package/out/server/getMemberIdentifier.d.ts +15 -0
- package/out/server/getMemberIdentifier.js +290 -0
- package/out/server/getMemberIdentifier.js.map +1 -0
- package/out/server/getProcessComponents.d.ts +2 -0
- package/out/server/getProcessComponents.js +13 -0
- package/out/server/getProcessComponents.js.map +1 -0
- package/out/server/getProcesses.d.ts +33 -0
- package/out/server/getProcesses.js +599 -0
- package/out/server/getProcesses.js.map +1 -0
- package/out/server/getScope.d.ts +13 -0
- package/out/server/getScope.js +61 -0
- package/out/server/getScope.js.map +1 -0
- package/out/server/getValidates.d.ts +3 -0
- package/out/server/getValidates.js +14 -0
- package/out/server/getValidates.js.map +1 -0
- package/out/server/index.d.ts +5 -0
- package/out/server/index.js +38 -0
- package/out/server/index.js.map +1 -0
- package/out/server/naslServer.d.ts +363 -0
- package/out/server/naslServer.js +4382 -0
- package/out/server/naslServer.js.map +1 -0
- package/out/server/naslStdlibMap.d.ts +2 -0
- package/out/server/naslStdlibMap.js +50 -0
- package/out/server/naslStdlibMap.js.map +1 -0
- package/out/server/process2LogicNamespace.d.ts +26 -0
- package/out/server/process2LogicNamespace.js +109 -0
- package/out/server/process2LogicNamespace.js.map +1 -0
- package/out/server/translator.d.ts +26 -0
- package/out/server/translator.js +787 -0
- package/out/server/translator.js.map +1 -0
- package/out/service/creator/add.configs.d.ts +1 -0
- package/out/service/creator/add.configs.js +74 -0
- package/out/service/creator/add.configs.js.map +1 -0
- package/out/service/creator/errHandles.d.ts +18 -0
- package/out/service/creator/errHandles.js +75 -0
- package/out/service/creator/errHandles.js.map +1 -0
- package/out/service/creator/index.d.ts +1 -0
- package/out/service/creator/index.js +74 -0
- package/out/service/creator/index.js.map +1 -0
- package/out/service/datasource/api.d.ts +12 -0
- package/out/service/datasource/api.js +14 -0
- package/out/service/datasource/api.js.map +1 -0
- package/out/service/datasource/index.d.ts +2 -0
- package/out/service/datasource/index.js +10 -0
- package/out/service/datasource/index.js.map +1 -0
- package/out/service/defaultErrorMessage.json +98 -0
- package/out/service/logic/api.d.ts +9 -0
- package/out/service/logic/api.js +11 -0
- package/out/service/logic/api.js.map +1 -0
- package/out/service/logic/index.d.ts +2 -0
- package/out/service/logic/index.js +10 -0
- package/out/service/logic/index.js.map +1 -0
- package/out/service/storage/api.d.ts +45 -0
- package/out/service/storage/api.js +36 -0
- package/out/service/storage/api.js.map +1 -0
- package/out/service/storage/index.d.ts +2 -0
- package/out/service/storage/index.js +10 -0
- package/out/service/storage/index.js.map +1 -0
- package/out/service/storage/init.d.ts +65 -0
- package/out/service/storage/init.js +797 -0
- package/out/service/storage/init.js.map +1 -0
- package/out/service/storage/jsoner.d.ts +36 -0
- package/out/service/storage/jsoner.js +131 -0
- package/out/service/storage/jsoner.js.map +1 -0
- package/out/service/storage/map.d.ts +4 -0
- package/out/service/storage/map.js +54 -0
- package/out/service/storage/map.js.map +1 -0
- package/out/service/storage/service.d.ts +22 -0
- package/out/service/storage/service.js +70 -0
- package/out/service/storage/service.js.map +1 -0
- package/out/service/storage/storagePoint.d.ts +17 -0
- package/out/service/storage/storagePoint.js +76 -0
- package/out/service/storage/storagePoint.js.map +1 -0
- package/out/templator/genCallComponentLogic.d.ts +17 -0
- package/out/templator/genCallComponentLogic.js +30 -0
- package/out/templator/genCallComponentLogic.js.map +1 -0
- package/out/templator/genCreateBlock.d.ts +10 -0
- package/out/templator/genCreateBlock.js +338 -0
- package/out/templator/genCreateBlock.js.map +1 -0
- package/out/templator/genCurdEditMultipleKeyBlock.d.ts +8 -0
- package/out/templator/genCurdEditMultipleKeyBlock.js +516 -0
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -0
- package/out/templator/genCurdMultipleKeyBlock.d.ts +34 -0
- package/out/templator/genCurdMultipleKeyBlock.js +709 -0
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -0
- package/out/templator/genEditTableBlock.d.ts +51 -0
- package/out/templator/genEditTableBlock.js +299 -0
- package/out/templator/genEditTableBlock.js.map +1 -0
- package/out/templator/genEnumSelectBlock.d.ts +10 -0
- package/out/templator/genEnumSelectBlock.js +26 -0
- package/out/templator/genEnumSelectBlock.js.map +1 -0
- package/out/templator/genGetBlock.d.ts +6 -0
- package/out/templator/genGetBlock.js +138 -0
- package/out/templator/genGetBlock.js.map +1 -0
- package/out/templator/genGridViewBlock.d.ts +55 -0
- package/out/templator/genGridViewBlock.js +350 -0
- package/out/templator/genGridViewBlock.js.map +1 -0
- package/out/templator/genListViewBlock.d.ts +19 -0
- package/out/templator/genListViewBlock.js +143 -0
- package/out/templator/genListViewBlock.js.map +1 -0
- package/out/templator/genQueryComponent.d.ts +34 -0
- package/out/templator/genQueryComponent.js +342 -0
- package/out/templator/genQueryComponent.js.map +1 -0
- package/out/templator/genSelectBlock.d.ts +45 -0
- package/out/templator/genSelectBlock.js +406 -0
- package/out/templator/genSelectBlock.js.map +1 -0
- package/out/templator/genTableBlock.d.ts +53 -0
- package/out/templator/genTableBlock.js +280 -0
- package/out/templator/genTableBlock.js.map +1 -0
- package/out/templator/genUpdateBlock.d.ts +6 -0
- package/out/templator/genUpdateBlock.js +380 -0
- package/out/templator/genUpdateBlock.js.map +1 -0
- package/out/templator/index.d.ts +18 -0
- package/out/templator/index.js +34 -0
- package/out/templator/index.js.map +1 -0
- package/out/templator/utils.d.ts +676 -0
- package/out/templator/utils.js +469 -0
- package/out/templator/utils.js.map +1 -0
- package/out/translator/constant.d.ts +6 -0
- package/out/translator/constant.js +10 -0
- package/out/translator/constant.js.map +1 -0
- package/out/translator/index.d.ts +3 -0
- package/out/translator/index.js +20 -0
- package/out/translator/index.js.map +1 -0
- package/out/translator/types.d.ts +32 -0
- package/out/translator/types.js +3 -0
- package/out/translator/types.js.map +1 -0
- package/out/translator/utils.d.ts +25 -0
- package/out/translator/utils.js +120 -0
- package/out/translator/utils.js.map +1 -0
- package/out/utils/index.d.ts +42 -0
- package/out/utils/index.js +213 -0
- package/out/utils/index.js.map +1 -0
- package/out/utils/logger.d.ts +7 -0
- package/out/utils/logger.js +23 -0
- package/out/utils/logger.js.map +1 -0
- package/out/utils/sortTsString.d.ts +1 -0
- package/out/utils/sortTsString.js +36 -0
- package/out/utils/sortTsString.js.map +1 -0
- package/out/utils/string.d.ts +51 -0
- package/out/utils/string.js +110 -0
- package/out/utils/string.js.map +1 -0
- package/out/utils/time.d.ts +1 -0
- package/out/utils/time.js +6 -0
- package/out/utils/time.js.map +1 -0
- package/out/utils/traverse.d.ts +36 -0
- package/out/utils/traverse.js +145 -0
- package/out/utils/traverse.js.map +1 -0
- package/out/utils/types.d.ts +1 -0
- package/out/utils/types.js +3 -0
- package/out/utils/types.js.map +1 -0
- package/out/utils/window.d.ts +7 -0
- package/out/utils/window.js +14 -0
- package/out/utils/window.js.map +1 -0
- package/package.json +1 -1
- package/src/concepts/BindEvent__.ts +5 -6
- package/src/concepts/Module__.ts +2 -2
- package/src/concepts/View__.ts +2 -2
- package/src/server/naslServer.ts +4 -4
|
@@ -0,0 +1,1885 @@
|
|
|
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 jsoner_1 = require("../service/storage/jsoner");
|
|
38
|
+
const utils_1 = require("../automate/engine/utils");
|
|
39
|
+
const ConfigProperty__1 = __importDefault(require("./ConfigProperty__"));
|
|
40
|
+
const decorators_1 = require("../decorators");
|
|
41
|
+
const utils = __importStar(require("../utils"));
|
|
42
|
+
const BaseNode_1 = __importDefault(require("../common/BaseNode"));
|
|
43
|
+
const DataSource__1 = __importDefault(require("./DataSource__"));
|
|
44
|
+
const Structure__1 = __importDefault(require("./Structure__"));
|
|
45
|
+
const Enum__1 = __importDefault(require("./Enum__"));
|
|
46
|
+
const Logic__1 = __importDefault(require("./Logic__"));
|
|
47
|
+
const Interface__1 = __importDefault(require("./Interface__"));
|
|
48
|
+
const Frontend__1 = __importDefault(require("./Frontend__"));
|
|
49
|
+
const Process__1 = __importDefault(require("./Process__"));
|
|
50
|
+
const Role__1 = __importDefault(require("./Role__"));
|
|
51
|
+
const Configuration__1 = __importDefault(require("./Configuration__"));
|
|
52
|
+
const Module__1 = __importDefault(require("./Module__"));
|
|
53
|
+
const MetadataType__1 = __importDefault(require("./MetadataType__"));
|
|
54
|
+
/**
|
|
55
|
+
* 应用
|
|
56
|
+
*/
|
|
57
|
+
let App = App_1 =
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
class App extends BaseNode_1.default {
|
|
60
|
+
/** 类名 */
|
|
61
|
+
static ConceptName = 'App';
|
|
62
|
+
/**
|
|
63
|
+
* 应用 Id
|
|
64
|
+
*/
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
id;
|
|
67
|
+
/**
|
|
68
|
+
* 产品概念
|
|
69
|
+
*/
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
concept;
|
|
72
|
+
/**
|
|
73
|
+
* IDE 版本
|
|
74
|
+
*/
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
ideVersion;
|
|
77
|
+
/**
|
|
78
|
+
* 应用标识
|
|
79
|
+
*/
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
name;
|
|
82
|
+
/**
|
|
83
|
+
* 应用标题
|
|
84
|
+
*/
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
title;
|
|
87
|
+
/**
|
|
88
|
+
* 应用图标
|
|
89
|
+
*/
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
icon;
|
|
92
|
+
/**
|
|
93
|
+
* 应用描述
|
|
94
|
+
*/
|
|
95
|
+
// @ts-ignore
|
|
96
|
+
desc;
|
|
97
|
+
/**
|
|
98
|
+
* 域名
|
|
99
|
+
*/
|
|
100
|
+
// @ts-ignore
|
|
101
|
+
dnsAddr;
|
|
102
|
+
/**
|
|
103
|
+
* 是否有用户中心
|
|
104
|
+
*/
|
|
105
|
+
// @ts-ignore
|
|
106
|
+
hasUserCenter;
|
|
107
|
+
/**
|
|
108
|
+
* 是否有权限
|
|
109
|
+
*/
|
|
110
|
+
// @ts-ignore
|
|
111
|
+
hasAuth;
|
|
112
|
+
/**
|
|
113
|
+
* 数据源列表
|
|
114
|
+
*/
|
|
115
|
+
dataSources = [];
|
|
116
|
+
/**
|
|
117
|
+
* 数据结构列表
|
|
118
|
+
*/
|
|
119
|
+
structures = [];
|
|
120
|
+
/**
|
|
121
|
+
* 枚举列表
|
|
122
|
+
*/
|
|
123
|
+
enums = [];
|
|
124
|
+
/**
|
|
125
|
+
* 逻辑列表
|
|
126
|
+
*/
|
|
127
|
+
logics = [];
|
|
128
|
+
/**
|
|
129
|
+
* 接口列表
|
|
130
|
+
*/
|
|
131
|
+
interfaces = [];
|
|
132
|
+
/**
|
|
133
|
+
* 端列表
|
|
134
|
+
*/
|
|
135
|
+
frontends = [];
|
|
136
|
+
/**
|
|
137
|
+
* 流程列表
|
|
138
|
+
*/
|
|
139
|
+
processes = [];
|
|
140
|
+
/**
|
|
141
|
+
* 角色列表
|
|
142
|
+
*/
|
|
143
|
+
roles = [];
|
|
144
|
+
/**
|
|
145
|
+
* 配置管理
|
|
146
|
+
*/
|
|
147
|
+
configuration = new Configuration__1.default();
|
|
148
|
+
/**
|
|
149
|
+
* 扩展模块列表
|
|
150
|
+
*/
|
|
151
|
+
dependencies = [];
|
|
152
|
+
/**
|
|
153
|
+
* 接口应用列表(兼容老版)
|
|
154
|
+
*/
|
|
155
|
+
interfaceDependencies = [];
|
|
156
|
+
/**
|
|
157
|
+
* 集成
|
|
158
|
+
*/
|
|
159
|
+
// @ts-ignore
|
|
160
|
+
integration;
|
|
161
|
+
/**
|
|
162
|
+
* 元数据类型列表
|
|
163
|
+
*/
|
|
164
|
+
metadataTypes = [];
|
|
165
|
+
/**
|
|
166
|
+
* @param source 需要合并的部分参数
|
|
167
|
+
*/
|
|
168
|
+
constructor(source) {
|
|
169
|
+
source = Object.assign({}, App_1.getDefaultOptions(), source);
|
|
170
|
+
super(source);
|
|
171
|
+
super.subConstructor(source);
|
|
172
|
+
}
|
|
173
|
+
static from(source, parentNode, parentKey) {
|
|
174
|
+
return super.from(source, parentNode, parentKey);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* 从父级删除该节点
|
|
178
|
+
* @internal
|
|
179
|
+
*/
|
|
180
|
+
_delete() {
|
|
181
|
+
let params = null;
|
|
182
|
+
if (this.parentNode) {
|
|
183
|
+
params = this.parentNode?.__removeApp?.(this);
|
|
184
|
+
}
|
|
185
|
+
return params;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* 设置集成
|
|
189
|
+
*/
|
|
190
|
+
setIntegration(integration) {
|
|
191
|
+
integration._delete();
|
|
192
|
+
const relationOptions = { parentNode: this, parentKey: 'integration' };
|
|
193
|
+
Object.assign(integration, relationOptions);
|
|
194
|
+
const object = {
|
|
195
|
+
integration,
|
|
196
|
+
};
|
|
197
|
+
this.update({
|
|
198
|
+
...object,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
getDataSourceUniqueName(name = 'dataSource1') {
|
|
202
|
+
return utils.unique(name, this.getDataSourceExistingNames(), undefined, true);
|
|
203
|
+
}
|
|
204
|
+
_insertDataSourceAt(options, index) {
|
|
205
|
+
const dataSourceOptions = {};
|
|
206
|
+
const relationOptions = { parentNode: this, parentKey: 'dataSources' };
|
|
207
|
+
let dataSource;
|
|
208
|
+
if (!options) {
|
|
209
|
+
dataSource = DataSource__1.default.from({
|
|
210
|
+
...dataSourceOptions,
|
|
211
|
+
name: this.getDataSourceUniqueName(),
|
|
212
|
+
}, this, 'dataSources');
|
|
213
|
+
}
|
|
214
|
+
else if (typeof options === 'string') {
|
|
215
|
+
dataSource = DataSource__1.default.from({
|
|
216
|
+
...dataSourceOptions,
|
|
217
|
+
name: options,
|
|
218
|
+
}, this, 'dataSources');
|
|
219
|
+
}
|
|
220
|
+
else if (options instanceof DataSource__1.default) {
|
|
221
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
222
|
+
dataSource = options;
|
|
223
|
+
Object.assign(dataSource, relationOptions);
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
dataSource = DataSource__1.default.from({
|
|
227
|
+
...dataSourceOptions,
|
|
228
|
+
...options,
|
|
229
|
+
}, this, 'dataSources');
|
|
230
|
+
}
|
|
231
|
+
this.dataSources.splice(index, 0, dataSource);
|
|
232
|
+
return dataSource;
|
|
233
|
+
}
|
|
234
|
+
insertDataSourceAt(options, index) {
|
|
235
|
+
const node = this._insertDataSourceAt(options, index);
|
|
236
|
+
node.create({
|
|
237
|
+
index,
|
|
238
|
+
parentNode: this,
|
|
239
|
+
parentKey: 'dataSources',
|
|
240
|
+
});
|
|
241
|
+
return node;
|
|
242
|
+
}
|
|
243
|
+
_addDataSource(options) {
|
|
244
|
+
const index = this.dataSources.length;
|
|
245
|
+
return this._insertDataSourceAt(options, index);
|
|
246
|
+
}
|
|
247
|
+
addDataSource(options) {
|
|
248
|
+
const node = this._addDataSource(options);
|
|
249
|
+
const index = this.dataSources.indexOf(node);
|
|
250
|
+
node.create({
|
|
251
|
+
index,
|
|
252
|
+
parentNode: this,
|
|
253
|
+
parentKey: 'dataSources',
|
|
254
|
+
});
|
|
255
|
+
return node;
|
|
256
|
+
}
|
|
257
|
+
getStructureExistingNames(excludedList = []) {
|
|
258
|
+
const excludedSet = new Set(excludedList);
|
|
259
|
+
return (this.structures || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
260
|
+
}
|
|
261
|
+
getStructureUniqueName(name = 'Structure1') {
|
|
262
|
+
return utils.unique(name, this.getStructureExistingNames(), undefined, true);
|
|
263
|
+
}
|
|
264
|
+
_insertStructureAt(options, index) {
|
|
265
|
+
const structureOptions = {};
|
|
266
|
+
const relationOptions = { parentNode: this, parentKey: 'structures' };
|
|
267
|
+
let structure;
|
|
268
|
+
if (!options) {
|
|
269
|
+
structure = Structure__1.default.from({
|
|
270
|
+
...structureOptions,
|
|
271
|
+
name: this.getStructureUniqueName(),
|
|
272
|
+
}, this, 'structures');
|
|
273
|
+
}
|
|
274
|
+
else if (typeof options === 'string') {
|
|
275
|
+
structure = Structure__1.default.from({
|
|
276
|
+
...structureOptions,
|
|
277
|
+
name: options,
|
|
278
|
+
}, this, 'structures');
|
|
279
|
+
}
|
|
280
|
+
else if (options instanceof Structure__1.default) {
|
|
281
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
282
|
+
structure = options;
|
|
283
|
+
Object.assign(structure, relationOptions);
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
structure = Structure__1.default.from({
|
|
287
|
+
...structureOptions,
|
|
288
|
+
...options,
|
|
289
|
+
}, this, 'structures');
|
|
290
|
+
}
|
|
291
|
+
this.structures.splice(index, 0, structure);
|
|
292
|
+
return structure;
|
|
293
|
+
}
|
|
294
|
+
insertStructureAt(options, index) {
|
|
295
|
+
const node = this._insertStructureAt(options, index);
|
|
296
|
+
node.create({
|
|
297
|
+
index,
|
|
298
|
+
parentNode: this,
|
|
299
|
+
parentKey: 'structures',
|
|
300
|
+
});
|
|
301
|
+
return node;
|
|
302
|
+
}
|
|
303
|
+
_addStructure(options) {
|
|
304
|
+
const index = 0;
|
|
305
|
+
return this._insertStructureAt(options, index);
|
|
306
|
+
}
|
|
307
|
+
addStructure(options) {
|
|
308
|
+
const node = this._addStructure(options);
|
|
309
|
+
const index = this.structures.indexOf(node);
|
|
310
|
+
node.create({
|
|
311
|
+
index,
|
|
312
|
+
parentNode: this,
|
|
313
|
+
parentKey: 'structures',
|
|
314
|
+
});
|
|
315
|
+
return node;
|
|
316
|
+
}
|
|
317
|
+
getEnumExistingNames(excludedList = []) {
|
|
318
|
+
const excludedSet = new Set(excludedList);
|
|
319
|
+
return (this.enums || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
320
|
+
}
|
|
321
|
+
getEnumUniqueName(name = 'Enum1') {
|
|
322
|
+
return utils.unique(name, this.getEnumExistingNames(), undefined, true);
|
|
323
|
+
}
|
|
324
|
+
_insertEnumAt(options, index) {
|
|
325
|
+
const enumerationOptions = {};
|
|
326
|
+
const relationOptions = { parentNode: this, parentKey: 'enums' };
|
|
327
|
+
let enumeration;
|
|
328
|
+
if (!options) {
|
|
329
|
+
enumeration = Enum__1.default.from({
|
|
330
|
+
...enumerationOptions,
|
|
331
|
+
name: this.getEnumUniqueName(),
|
|
332
|
+
}, this, 'enums');
|
|
333
|
+
}
|
|
334
|
+
else if (typeof options === 'string') {
|
|
335
|
+
enumeration = Enum__1.default.from({
|
|
336
|
+
...enumerationOptions,
|
|
337
|
+
name: options,
|
|
338
|
+
}, this, 'enums');
|
|
339
|
+
}
|
|
340
|
+
else if (options instanceof Enum__1.default) {
|
|
341
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
342
|
+
enumeration = options;
|
|
343
|
+
Object.assign(enumeration, relationOptions);
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
enumeration = Enum__1.default.from({
|
|
347
|
+
...enumerationOptions,
|
|
348
|
+
...options,
|
|
349
|
+
}, this, 'enums');
|
|
350
|
+
}
|
|
351
|
+
this.enums.splice(index, 0, enumeration);
|
|
352
|
+
return enumeration;
|
|
353
|
+
}
|
|
354
|
+
insertEnumAt(options, index) {
|
|
355
|
+
const node = this._insertEnumAt(options, index);
|
|
356
|
+
node.create({
|
|
357
|
+
index,
|
|
358
|
+
parentNode: this,
|
|
359
|
+
parentKey: 'enums',
|
|
360
|
+
});
|
|
361
|
+
return node;
|
|
362
|
+
}
|
|
363
|
+
_addEnum(options) {
|
|
364
|
+
const index = 0;
|
|
365
|
+
return this._insertEnumAt(options, index);
|
|
366
|
+
}
|
|
367
|
+
addEnum(options) {
|
|
368
|
+
const node = this._addEnum(options);
|
|
369
|
+
const index = this.enums.indexOf(node);
|
|
370
|
+
node.create({
|
|
371
|
+
index,
|
|
372
|
+
parentNode: this,
|
|
373
|
+
parentKey: 'enums',
|
|
374
|
+
});
|
|
375
|
+
return node;
|
|
376
|
+
}
|
|
377
|
+
getLogicExistingNames(excludedList = []) {
|
|
378
|
+
const excludedSet = new Set(excludedList);
|
|
379
|
+
return (this.logics || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
380
|
+
}
|
|
381
|
+
getLogicUniqueName(name = 'logic1') {
|
|
382
|
+
return utils.unique(name, this.getLogicExistingNames(), undefined, true);
|
|
383
|
+
}
|
|
384
|
+
_insertLogicAt(options, index) {
|
|
385
|
+
const logicOptions = {};
|
|
386
|
+
const relationOptions = { parentNode: this, parentKey: 'logics' };
|
|
387
|
+
let logic;
|
|
388
|
+
if (!options) {
|
|
389
|
+
logic = Logic__1.default.from({
|
|
390
|
+
...logicOptions,
|
|
391
|
+
name: this.getLogicUniqueName(),
|
|
392
|
+
}, this, 'logics');
|
|
393
|
+
}
|
|
394
|
+
else if (typeof options === 'string') {
|
|
395
|
+
logic = Logic__1.default.from({
|
|
396
|
+
...logicOptions,
|
|
397
|
+
name: options,
|
|
398
|
+
}, this, 'logics');
|
|
399
|
+
}
|
|
400
|
+
else if (options instanceof Logic__1.default) {
|
|
401
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
402
|
+
logic = options;
|
|
403
|
+
Object.assign(logic, relationOptions);
|
|
404
|
+
}
|
|
405
|
+
else {
|
|
406
|
+
logic = Logic__1.default.from({
|
|
407
|
+
...logicOptions,
|
|
408
|
+
...options,
|
|
409
|
+
}, this, 'logics');
|
|
410
|
+
}
|
|
411
|
+
this.logics.splice(index, 0, logic);
|
|
412
|
+
return logic;
|
|
413
|
+
}
|
|
414
|
+
insertLogicAt(options, index) {
|
|
415
|
+
const node = this._insertLogicAt(options, index);
|
|
416
|
+
node.create({
|
|
417
|
+
index,
|
|
418
|
+
parentNode: this,
|
|
419
|
+
parentKey: 'logics',
|
|
420
|
+
});
|
|
421
|
+
return node;
|
|
422
|
+
}
|
|
423
|
+
_addLogic(options) {
|
|
424
|
+
const index = 0;
|
|
425
|
+
return this._insertLogicAt(options, index);
|
|
426
|
+
}
|
|
427
|
+
addLogic(options) {
|
|
428
|
+
const node = this._addLogic(options);
|
|
429
|
+
const index = this.logics.indexOf(node);
|
|
430
|
+
node.create({
|
|
431
|
+
index,
|
|
432
|
+
parentNode: this,
|
|
433
|
+
parentKey: 'logics',
|
|
434
|
+
});
|
|
435
|
+
return node;
|
|
436
|
+
}
|
|
437
|
+
getInterfaceExistingNames(excludedList = []) {
|
|
438
|
+
const excludedSet = new Set(excludedList);
|
|
439
|
+
return (this.interfaces || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
440
|
+
}
|
|
441
|
+
getInterfaceUniqueName(name = 'Interface1') {
|
|
442
|
+
return utils.unique(name, this.getInterfaceExistingNames(), undefined, true);
|
|
443
|
+
}
|
|
444
|
+
_insertInterfaceAt(options, index) {
|
|
445
|
+
const itfaceOptions = {};
|
|
446
|
+
const relationOptions = { parentNode: this, parentKey: 'interfaces' };
|
|
447
|
+
let itface;
|
|
448
|
+
if (!options) {
|
|
449
|
+
itface = Interface__1.default.from({
|
|
450
|
+
...itfaceOptions,
|
|
451
|
+
name: this.getInterfaceUniqueName(),
|
|
452
|
+
}, this, 'interfaces');
|
|
453
|
+
}
|
|
454
|
+
else if (typeof options === 'string') {
|
|
455
|
+
itface = Interface__1.default.from({
|
|
456
|
+
...itfaceOptions,
|
|
457
|
+
name: options,
|
|
458
|
+
}, this, 'interfaces');
|
|
459
|
+
}
|
|
460
|
+
else if (options instanceof Interface__1.default) {
|
|
461
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
462
|
+
itface = options;
|
|
463
|
+
Object.assign(itface, relationOptions);
|
|
464
|
+
}
|
|
465
|
+
else {
|
|
466
|
+
itface = Interface__1.default.from({
|
|
467
|
+
...itfaceOptions,
|
|
468
|
+
...options,
|
|
469
|
+
}, this, 'interfaces');
|
|
470
|
+
}
|
|
471
|
+
this.interfaces.splice(index, 0, itface);
|
|
472
|
+
return itface;
|
|
473
|
+
}
|
|
474
|
+
insertInterfaceAt(options, index) {
|
|
475
|
+
const node = this._insertInterfaceAt(options, index);
|
|
476
|
+
node.create({
|
|
477
|
+
index,
|
|
478
|
+
parentNode: this,
|
|
479
|
+
parentKey: 'interfaces',
|
|
480
|
+
});
|
|
481
|
+
return node;
|
|
482
|
+
}
|
|
483
|
+
_addInterface(options) {
|
|
484
|
+
const index = 0;
|
|
485
|
+
return this._insertInterfaceAt(options, index);
|
|
486
|
+
}
|
|
487
|
+
addInterface(options) {
|
|
488
|
+
const node = this._addInterface(options);
|
|
489
|
+
const index = this.interfaces.indexOf(node);
|
|
490
|
+
node.create({
|
|
491
|
+
index,
|
|
492
|
+
parentNode: this,
|
|
493
|
+
parentKey: 'interfaces',
|
|
494
|
+
});
|
|
495
|
+
return node;
|
|
496
|
+
}
|
|
497
|
+
getFrontendExistingNames(excludedList = []) {
|
|
498
|
+
const excludedSet = new Set(excludedList);
|
|
499
|
+
return (this.frontends || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
500
|
+
}
|
|
501
|
+
getFrontendUniqueName(name = 'frontend1') {
|
|
502
|
+
return utils.unique(name, this.getFrontendExistingNames(), undefined, true);
|
|
503
|
+
}
|
|
504
|
+
_insertFrontendAt(options, index) {
|
|
505
|
+
const frontendOptions = {};
|
|
506
|
+
const relationOptions = { parentNode: this, parentKey: 'frontends' };
|
|
507
|
+
let frontend;
|
|
508
|
+
if (!options) {
|
|
509
|
+
frontend = Frontend__1.default.from({
|
|
510
|
+
...frontendOptions,
|
|
511
|
+
name: this.getFrontendUniqueName(),
|
|
512
|
+
}, this, 'frontends');
|
|
513
|
+
}
|
|
514
|
+
else if (typeof options === 'string') {
|
|
515
|
+
frontend = Frontend__1.default.from({
|
|
516
|
+
...frontendOptions,
|
|
517
|
+
name: options,
|
|
518
|
+
}, this, 'frontends');
|
|
519
|
+
}
|
|
520
|
+
else if (options instanceof Frontend__1.default) {
|
|
521
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
522
|
+
frontend = options;
|
|
523
|
+
Object.assign(frontend, relationOptions);
|
|
524
|
+
}
|
|
525
|
+
else {
|
|
526
|
+
frontend = Frontend__1.default.from({
|
|
527
|
+
...frontendOptions,
|
|
528
|
+
...options,
|
|
529
|
+
}, this, 'frontends');
|
|
530
|
+
}
|
|
531
|
+
this.frontends.splice(index, 0, frontend);
|
|
532
|
+
return frontend;
|
|
533
|
+
}
|
|
534
|
+
insertFrontendAt(options, index) {
|
|
535
|
+
const node = this._insertFrontendAt(options, index);
|
|
536
|
+
node.create({
|
|
537
|
+
index,
|
|
538
|
+
parentNode: this,
|
|
539
|
+
parentKey: 'frontends',
|
|
540
|
+
});
|
|
541
|
+
return node;
|
|
542
|
+
}
|
|
543
|
+
_addFrontend(options) {
|
|
544
|
+
const index = this.frontends.length;
|
|
545
|
+
return this._insertFrontendAt(options, index);
|
|
546
|
+
}
|
|
547
|
+
addFrontend(options) {
|
|
548
|
+
const node = this._addFrontend(options);
|
|
549
|
+
const index = this.frontends.indexOf(node);
|
|
550
|
+
node.create({
|
|
551
|
+
index,
|
|
552
|
+
parentNode: this,
|
|
553
|
+
parentKey: 'frontends',
|
|
554
|
+
});
|
|
555
|
+
return node;
|
|
556
|
+
}
|
|
557
|
+
getProcessExistingNames(excludedList = []) {
|
|
558
|
+
const excludedSet = new Set(excludedList);
|
|
559
|
+
return (this.processes || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
560
|
+
}
|
|
561
|
+
getProcessUniqueName(name = 'Process1') {
|
|
562
|
+
return utils.unique(name, this.getProcessExistingNames(), undefined, true);
|
|
563
|
+
}
|
|
564
|
+
_insertProcessAt(options, index) {
|
|
565
|
+
const processOptions = {};
|
|
566
|
+
const relationOptions = { parentNode: this, parentKey: 'processes' };
|
|
567
|
+
let process;
|
|
568
|
+
if (!options) {
|
|
569
|
+
process = Process__1.default.from({
|
|
570
|
+
...processOptions,
|
|
571
|
+
name: this.getProcessUniqueName(),
|
|
572
|
+
}, this, 'processes');
|
|
573
|
+
}
|
|
574
|
+
else if (typeof options === 'string') {
|
|
575
|
+
process = Process__1.default.from({
|
|
576
|
+
...processOptions,
|
|
577
|
+
name: options,
|
|
578
|
+
}, this, 'processes');
|
|
579
|
+
}
|
|
580
|
+
else if (options instanceof Process__1.default) {
|
|
581
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
582
|
+
process = options;
|
|
583
|
+
Object.assign(process, relationOptions);
|
|
584
|
+
}
|
|
585
|
+
else {
|
|
586
|
+
process = Process__1.default.from({
|
|
587
|
+
...processOptions,
|
|
588
|
+
...options,
|
|
589
|
+
}, this, 'processes');
|
|
590
|
+
}
|
|
591
|
+
this.processes.splice(index, 0, process);
|
|
592
|
+
return process;
|
|
593
|
+
}
|
|
594
|
+
insertProcessAt(options, index) {
|
|
595
|
+
const node = this._insertProcessAt(options, index);
|
|
596
|
+
node.create({
|
|
597
|
+
index,
|
|
598
|
+
parentNode: this,
|
|
599
|
+
parentKey: 'processes',
|
|
600
|
+
});
|
|
601
|
+
return node;
|
|
602
|
+
}
|
|
603
|
+
_addProcess(options) {
|
|
604
|
+
const index = 0;
|
|
605
|
+
return this._insertProcessAt(options, index);
|
|
606
|
+
}
|
|
607
|
+
addProcess(options) {
|
|
608
|
+
const node = this._addProcess(options);
|
|
609
|
+
const index = this.processes.indexOf(node);
|
|
610
|
+
node.create({
|
|
611
|
+
index,
|
|
612
|
+
parentNode: this,
|
|
613
|
+
parentKey: 'processes',
|
|
614
|
+
});
|
|
615
|
+
return node;
|
|
616
|
+
}
|
|
617
|
+
getRoleExistingNames(excludedList = []) {
|
|
618
|
+
const excludedSet = new Set(excludedList);
|
|
619
|
+
return (this.roles || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
620
|
+
}
|
|
621
|
+
getRoleUniqueName(name = 'role1') {
|
|
622
|
+
return utils.unique(name, this.getRoleExistingNames(), undefined, true);
|
|
623
|
+
}
|
|
624
|
+
_insertRoleAt(options, index) {
|
|
625
|
+
const roleOptions = {};
|
|
626
|
+
const relationOptions = { parentNode: this, parentKey: 'roles' };
|
|
627
|
+
let role;
|
|
628
|
+
if (!options) {
|
|
629
|
+
role = Role__1.default.from({
|
|
630
|
+
...roleOptions,
|
|
631
|
+
name: this.getRoleUniqueName(),
|
|
632
|
+
}, this, 'roles');
|
|
633
|
+
}
|
|
634
|
+
else if (typeof options === 'string') {
|
|
635
|
+
role = Role__1.default.from({
|
|
636
|
+
...roleOptions,
|
|
637
|
+
name: options,
|
|
638
|
+
}, this, 'roles');
|
|
639
|
+
}
|
|
640
|
+
else if (options instanceof Role__1.default) {
|
|
641
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
642
|
+
role = options;
|
|
643
|
+
Object.assign(role, relationOptions);
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
role = Role__1.default.from({
|
|
647
|
+
...roleOptions,
|
|
648
|
+
...options,
|
|
649
|
+
}, this, 'roles');
|
|
650
|
+
}
|
|
651
|
+
this.roles.splice(index, 0, role);
|
|
652
|
+
return role;
|
|
653
|
+
}
|
|
654
|
+
insertRoleAt(options, index) {
|
|
655
|
+
const node = this._insertRoleAt(options, index);
|
|
656
|
+
node.create({
|
|
657
|
+
index,
|
|
658
|
+
parentNode: this,
|
|
659
|
+
parentKey: 'roles',
|
|
660
|
+
});
|
|
661
|
+
return node;
|
|
662
|
+
}
|
|
663
|
+
_addRole(options) {
|
|
664
|
+
const index = this.roles.length;
|
|
665
|
+
return this._insertRoleAt(options, index);
|
|
666
|
+
}
|
|
667
|
+
addRole(options) {
|
|
668
|
+
const node = this._addRole(options);
|
|
669
|
+
const index = this.roles.indexOf(node);
|
|
670
|
+
node.create({
|
|
671
|
+
index,
|
|
672
|
+
parentNode: this,
|
|
673
|
+
parentKey: 'roles',
|
|
674
|
+
});
|
|
675
|
+
return node;
|
|
676
|
+
}
|
|
677
|
+
getModuleExistingNames(excludedList = []) {
|
|
678
|
+
const excludedSet = new Set(excludedList);
|
|
679
|
+
return (this.dependencies || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
680
|
+
}
|
|
681
|
+
getModuleUniqueName(name = 'module1') {
|
|
682
|
+
return utils.unique(name, this.getModuleExistingNames(), undefined, false);
|
|
683
|
+
}
|
|
684
|
+
_insertModuleInDependenciesAt(options, index) {
|
|
685
|
+
const moduleOptions = {};
|
|
686
|
+
const relationOptions = { parentNode: this, parentKey: 'dependencies' };
|
|
687
|
+
let module;
|
|
688
|
+
if (!options) {
|
|
689
|
+
module = Module__1.default.from({
|
|
690
|
+
...moduleOptions,
|
|
691
|
+
name: this.getModuleUniqueName(),
|
|
692
|
+
}, this, 'dependencies');
|
|
693
|
+
}
|
|
694
|
+
else if (typeof options === 'string') {
|
|
695
|
+
module = Module__1.default.from({
|
|
696
|
+
...moduleOptions,
|
|
697
|
+
name: options,
|
|
698
|
+
}, this, 'dependencies');
|
|
699
|
+
}
|
|
700
|
+
else if (options instanceof Module__1.default) {
|
|
701
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
702
|
+
module = options;
|
|
703
|
+
Object.assign(module, relationOptions);
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
module = Module__1.default.from({
|
|
707
|
+
...moduleOptions,
|
|
708
|
+
...options,
|
|
709
|
+
}, this, 'dependencies');
|
|
710
|
+
}
|
|
711
|
+
this.dependencies.splice(index, 0, module);
|
|
712
|
+
return module;
|
|
713
|
+
}
|
|
714
|
+
insertModuleInDependenciesAt(options, index) {
|
|
715
|
+
const node = this._insertModuleInDependenciesAt(options, index);
|
|
716
|
+
node.create({
|
|
717
|
+
index,
|
|
718
|
+
parentNode: this,
|
|
719
|
+
parentKey: 'dependencies',
|
|
720
|
+
});
|
|
721
|
+
return node;
|
|
722
|
+
}
|
|
723
|
+
_addModuleInDependencies(options) {
|
|
724
|
+
const index = this.dependencies.length;
|
|
725
|
+
return this._insertModuleInDependenciesAt(options, index);
|
|
726
|
+
}
|
|
727
|
+
addModuleInDependencies(options) {
|
|
728
|
+
const node = this._addModuleInDependencies(options);
|
|
729
|
+
const index = this.dependencies.indexOf(node);
|
|
730
|
+
node.create({
|
|
731
|
+
index,
|
|
732
|
+
parentNode: this,
|
|
733
|
+
parentKey: 'dependencies',
|
|
734
|
+
});
|
|
735
|
+
return node;
|
|
736
|
+
}
|
|
737
|
+
_insertModuleInInterfaceDependenciesAt(options, index) {
|
|
738
|
+
const moduleOptions = {};
|
|
739
|
+
const relationOptions = { parentNode: this, parentKey: 'interfaceDependencies' };
|
|
740
|
+
let module;
|
|
741
|
+
if (!options) {
|
|
742
|
+
module = Module__1.default.from({
|
|
743
|
+
...moduleOptions,
|
|
744
|
+
name: this.getModuleUniqueName(),
|
|
745
|
+
}, this, 'interfaceDependencies');
|
|
746
|
+
}
|
|
747
|
+
else if (typeof options === 'string') {
|
|
748
|
+
module = Module__1.default.from({
|
|
749
|
+
...moduleOptions,
|
|
750
|
+
name: options,
|
|
751
|
+
}, this, 'interfaceDependencies');
|
|
752
|
+
}
|
|
753
|
+
else if (options instanceof Module__1.default) {
|
|
754
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
755
|
+
module = options;
|
|
756
|
+
Object.assign(module, relationOptions);
|
|
757
|
+
}
|
|
758
|
+
else {
|
|
759
|
+
module = Module__1.default.from({
|
|
760
|
+
...moduleOptions,
|
|
761
|
+
...options,
|
|
762
|
+
}, this, 'interfaceDependencies');
|
|
763
|
+
}
|
|
764
|
+
this.interfaceDependencies.splice(index, 0, module);
|
|
765
|
+
return module;
|
|
766
|
+
}
|
|
767
|
+
insertModuleInInterfaceDependenciesAt(options, index) {
|
|
768
|
+
const node = this._insertModuleInInterfaceDependenciesAt(options, index);
|
|
769
|
+
node.create({
|
|
770
|
+
index,
|
|
771
|
+
parentNode: this,
|
|
772
|
+
parentKey: 'interfaceDependencies',
|
|
773
|
+
});
|
|
774
|
+
return node;
|
|
775
|
+
}
|
|
776
|
+
_addModuleInInterfaceDependencies(options) {
|
|
777
|
+
const index = this.interfaceDependencies.length;
|
|
778
|
+
return this._insertModuleInInterfaceDependenciesAt(options, index);
|
|
779
|
+
}
|
|
780
|
+
addModuleInInterfaceDependencies(options) {
|
|
781
|
+
const node = this._addModuleInInterfaceDependencies(options);
|
|
782
|
+
const index = this.interfaceDependencies.indexOf(node);
|
|
783
|
+
node.create({
|
|
784
|
+
index,
|
|
785
|
+
parentNode: this,
|
|
786
|
+
parentKey: 'interfaceDependencies',
|
|
787
|
+
});
|
|
788
|
+
return node;
|
|
789
|
+
}
|
|
790
|
+
getMetadataTypeExistingNames(excludedList = []) {
|
|
791
|
+
const excludedSet = new Set(excludedList);
|
|
792
|
+
return (this.metadataTypes || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
793
|
+
}
|
|
794
|
+
getMetadataTypeUniqueName(name = 'MetadataType1') {
|
|
795
|
+
return utils.unique(name, this.getMetadataTypeExistingNames(), undefined, true);
|
|
796
|
+
}
|
|
797
|
+
_insertMetadataTypeAt(options, index) {
|
|
798
|
+
const metadataTypeOptions = {};
|
|
799
|
+
const relationOptions = { parentNode: this, parentKey: 'metadataTypes' };
|
|
800
|
+
let metadataType;
|
|
801
|
+
if (!options) {
|
|
802
|
+
metadataType = MetadataType__1.default.from({
|
|
803
|
+
...metadataTypeOptions,
|
|
804
|
+
name: this.getMetadataTypeUniqueName(),
|
|
805
|
+
}, this, 'metadataTypes');
|
|
806
|
+
}
|
|
807
|
+
else if (typeof options === 'string') {
|
|
808
|
+
metadataType = MetadataType__1.default.from({
|
|
809
|
+
...metadataTypeOptions,
|
|
810
|
+
name: options,
|
|
811
|
+
}, this, 'metadataTypes');
|
|
812
|
+
}
|
|
813
|
+
else if (options instanceof MetadataType__1.default) {
|
|
814
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
815
|
+
metadataType = options;
|
|
816
|
+
Object.assign(metadataType, relationOptions);
|
|
817
|
+
}
|
|
818
|
+
else {
|
|
819
|
+
metadataType = MetadataType__1.default.from({
|
|
820
|
+
...metadataTypeOptions,
|
|
821
|
+
...options,
|
|
822
|
+
}, this, 'metadataTypes');
|
|
823
|
+
}
|
|
824
|
+
this.metadataTypes.splice(index, 0, metadataType);
|
|
825
|
+
return metadataType;
|
|
826
|
+
}
|
|
827
|
+
insertMetadataTypeAt(options, index) {
|
|
828
|
+
const node = this._insertMetadataTypeAt(options, index);
|
|
829
|
+
node.create({
|
|
830
|
+
index,
|
|
831
|
+
parentNode: this,
|
|
832
|
+
parentKey: 'metadataTypes',
|
|
833
|
+
});
|
|
834
|
+
return node;
|
|
835
|
+
}
|
|
836
|
+
_addMetadataType(options) {
|
|
837
|
+
const index = 0;
|
|
838
|
+
return this._insertMetadataTypeAt(options, index);
|
|
839
|
+
}
|
|
840
|
+
addMetadataType(options) {
|
|
841
|
+
const node = this._addMetadataType(options);
|
|
842
|
+
const index = this.metadataTypes.indexOf(node);
|
|
843
|
+
node.create({
|
|
844
|
+
index,
|
|
845
|
+
parentNode: this,
|
|
846
|
+
parentKey: 'metadataTypes',
|
|
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
|
+
removeFrontend(options) {
|
|
1031
|
+
let frontend;
|
|
1032
|
+
if (typeof options === 'string') {
|
|
1033
|
+
frontend = this.frontends.find((item) => item.name === options);
|
|
1034
|
+
if (!frontend) {
|
|
1035
|
+
throw new Error('找不到端 ' + options);
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
else {
|
|
1039
|
+
frontend = options;
|
|
1040
|
+
}
|
|
1041
|
+
return frontend.delete();
|
|
1042
|
+
}
|
|
1043
|
+
__removeFrontend(frontend) {
|
|
1044
|
+
const parentKey = frontend.parentKey;
|
|
1045
|
+
const params = {
|
|
1046
|
+
parentNode: this,
|
|
1047
|
+
parentKey,
|
|
1048
|
+
index: -1,
|
|
1049
|
+
object: null,
|
|
1050
|
+
oldObject: frontend,
|
|
1051
|
+
};
|
|
1052
|
+
if (parentKey) {
|
|
1053
|
+
params.parentKey = parentKey;
|
|
1054
|
+
if (Array.isArray(this[parentKey])) {
|
|
1055
|
+
const index = this[parentKey].indexOf(frontend);
|
|
1056
|
+
~index && this[parentKey].splice(index, 1);
|
|
1057
|
+
params.index = index;
|
|
1058
|
+
}
|
|
1059
|
+
else if (this[parentKey] === frontend) {
|
|
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
|
+
removeConfiguration(options) {
|
|
1139
|
+
let configuration;
|
|
1140
|
+
if (typeof options === 'string') {
|
|
1141
|
+
configuration = this.configuration;
|
|
1142
|
+
if (!configuration) {
|
|
1143
|
+
throw new Error('找不到配置管理 ' + options);
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
else {
|
|
1147
|
+
configuration = options;
|
|
1148
|
+
}
|
|
1149
|
+
return configuration.delete();
|
|
1150
|
+
}
|
|
1151
|
+
__removeConfiguration(configuration) {
|
|
1152
|
+
const parentKey = configuration.parentKey;
|
|
1153
|
+
const params = {
|
|
1154
|
+
parentNode: this,
|
|
1155
|
+
parentKey,
|
|
1156
|
+
index: -1,
|
|
1157
|
+
object: null,
|
|
1158
|
+
oldObject: configuration,
|
|
1159
|
+
};
|
|
1160
|
+
if (parentKey) {
|
|
1161
|
+
params.parentKey = parentKey;
|
|
1162
|
+
if (Array.isArray(this[parentKey])) {
|
|
1163
|
+
const index = this[parentKey].indexOf(configuration);
|
|
1164
|
+
~index && this[parentKey].splice(index, 1);
|
|
1165
|
+
params.index = index;
|
|
1166
|
+
}
|
|
1167
|
+
else if (this[parentKey] === configuration) {
|
|
1168
|
+
params.index = 0;
|
|
1169
|
+
this[parentKey] = undefined;
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
return params;
|
|
1173
|
+
}
|
|
1174
|
+
removeModuleInDependencies(options) {
|
|
1175
|
+
let module;
|
|
1176
|
+
if (typeof options === 'string') {
|
|
1177
|
+
module = this.dependencies.find((item) => item.name === options);
|
|
1178
|
+
if (!module) {
|
|
1179
|
+
throw new Error('找不到模块 ' + options);
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
else {
|
|
1183
|
+
module = options;
|
|
1184
|
+
}
|
|
1185
|
+
return module.delete();
|
|
1186
|
+
}
|
|
1187
|
+
removeModuleInInterfaceDependencies(options) {
|
|
1188
|
+
let module;
|
|
1189
|
+
if (typeof options === 'string') {
|
|
1190
|
+
module = this.interfaceDependencies.find((item) => item.name === options);
|
|
1191
|
+
if (!module) {
|
|
1192
|
+
throw new Error('找不到模块 ' + options);
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
else {
|
|
1196
|
+
module = options;
|
|
1197
|
+
}
|
|
1198
|
+
return module.delete();
|
|
1199
|
+
}
|
|
1200
|
+
__removeModule(module) {
|
|
1201
|
+
const parentKey = module.parentKey;
|
|
1202
|
+
const params = {
|
|
1203
|
+
parentNode: this,
|
|
1204
|
+
parentKey,
|
|
1205
|
+
index: -1,
|
|
1206
|
+
object: null,
|
|
1207
|
+
oldObject: module,
|
|
1208
|
+
};
|
|
1209
|
+
if (parentKey) {
|
|
1210
|
+
params.parentKey = parentKey;
|
|
1211
|
+
if (Array.isArray(this[parentKey])) {
|
|
1212
|
+
const index = this[parentKey].indexOf(module);
|
|
1213
|
+
~index && this[parentKey].splice(index, 1);
|
|
1214
|
+
params.index = index;
|
|
1215
|
+
}
|
|
1216
|
+
else if (this[parentKey] === module) {
|
|
1217
|
+
params.index = 0;
|
|
1218
|
+
this[parentKey] = undefined;
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
return params;
|
|
1222
|
+
}
|
|
1223
|
+
removeIntegration(options) {
|
|
1224
|
+
let integration;
|
|
1225
|
+
if (typeof options === 'string') {
|
|
1226
|
+
integration = this.integration;
|
|
1227
|
+
if (!integration) {
|
|
1228
|
+
throw new Error('找不到集成 ' + options);
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
else {
|
|
1232
|
+
integration = options;
|
|
1233
|
+
}
|
|
1234
|
+
return integration.delete();
|
|
1235
|
+
}
|
|
1236
|
+
__removeIntegration(integration) {
|
|
1237
|
+
const parentKey = integration.parentKey;
|
|
1238
|
+
const params = {
|
|
1239
|
+
parentNode: this,
|
|
1240
|
+
parentKey,
|
|
1241
|
+
index: -1,
|
|
1242
|
+
object: null,
|
|
1243
|
+
oldObject: integration,
|
|
1244
|
+
};
|
|
1245
|
+
if (parentKey) {
|
|
1246
|
+
params.parentKey = parentKey;
|
|
1247
|
+
if (Array.isArray(this[parentKey])) {
|
|
1248
|
+
const index = this[parentKey].indexOf(integration);
|
|
1249
|
+
~index && this[parentKey].splice(index, 1);
|
|
1250
|
+
params.index = index;
|
|
1251
|
+
}
|
|
1252
|
+
else if (this[parentKey] === integration) {
|
|
1253
|
+
params.index = 0;
|
|
1254
|
+
this[parentKey] = undefined;
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
return params;
|
|
1258
|
+
}
|
|
1259
|
+
removeMetadataType(options) {
|
|
1260
|
+
let metadataType;
|
|
1261
|
+
if (typeof options === 'string') {
|
|
1262
|
+
metadataType = this.metadataTypes.find((item) => item.name === options);
|
|
1263
|
+
if (!metadataType) {
|
|
1264
|
+
throw new Error('找不到元数据类型 ' + options);
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
else {
|
|
1268
|
+
metadataType = options;
|
|
1269
|
+
}
|
|
1270
|
+
return metadataType.delete();
|
|
1271
|
+
}
|
|
1272
|
+
__removeMetadataType(metadataType) {
|
|
1273
|
+
const parentKey = metadataType.parentKey;
|
|
1274
|
+
const params = {
|
|
1275
|
+
parentNode: this,
|
|
1276
|
+
parentKey,
|
|
1277
|
+
index: -1,
|
|
1278
|
+
object: null,
|
|
1279
|
+
oldObject: metadataType,
|
|
1280
|
+
};
|
|
1281
|
+
if (parentKey) {
|
|
1282
|
+
params.parentKey = parentKey;
|
|
1283
|
+
if (Array.isArray(this[parentKey])) {
|
|
1284
|
+
const index = this[parentKey].indexOf(metadataType);
|
|
1285
|
+
~index && this[parentKey].splice(index, 1);
|
|
1286
|
+
params.index = index;
|
|
1287
|
+
}
|
|
1288
|
+
else if (this[parentKey] === metadataType) {
|
|
1289
|
+
params.index = 0;
|
|
1290
|
+
this[parentKey] = undefined;
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
return params;
|
|
1294
|
+
}
|
|
1295
|
+
//================================================================================
|
|
1296
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
1297
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
1298
|
+
//================================================================================
|
|
1299
|
+
findDataSourceByName(name) {
|
|
1300
|
+
return this.dataSources.find((dataSourceItem) => dataSourceItem.name === name);
|
|
1301
|
+
}
|
|
1302
|
+
get defaultDS() {
|
|
1303
|
+
return this.dataSources?.find((dataSource) => dataSource.name === 'defaultDS');
|
|
1304
|
+
}
|
|
1305
|
+
findEnumByName(name) {
|
|
1306
|
+
return this.enums.find((enumItem) => enumItem.name === name);
|
|
1307
|
+
}
|
|
1308
|
+
findStructureByName(name) {
|
|
1309
|
+
return this.structures.find((item) => item.name === name);
|
|
1310
|
+
}
|
|
1311
|
+
findLogicByName(name) {
|
|
1312
|
+
return this.logics.find((logic) => logic.name === name);
|
|
1313
|
+
}
|
|
1314
|
+
/**
|
|
1315
|
+
* 是否为官方应用
|
|
1316
|
+
*/
|
|
1317
|
+
officialType = undefined;
|
|
1318
|
+
/**
|
|
1319
|
+
* 轻舟项目 Id
|
|
1320
|
+
*/
|
|
1321
|
+
projectId = undefined;
|
|
1322
|
+
/**
|
|
1323
|
+
* 租户 Id
|
|
1324
|
+
*/
|
|
1325
|
+
tenantId = undefined;
|
|
1326
|
+
/**
|
|
1327
|
+
* 租户 Id
|
|
1328
|
+
*/
|
|
1329
|
+
userGroupId = undefined;
|
|
1330
|
+
/**
|
|
1331
|
+
* 多环境
|
|
1332
|
+
*/
|
|
1333
|
+
envs = undefined;
|
|
1334
|
+
/**
|
|
1335
|
+
* 多环境
|
|
1336
|
+
*/
|
|
1337
|
+
envList = ['dev', 'online'];
|
|
1338
|
+
/**
|
|
1339
|
+
* 发布状态
|
|
1340
|
+
*/
|
|
1341
|
+
deploying = undefined;
|
|
1342
|
+
/**
|
|
1343
|
+
* 发布 Id
|
|
1344
|
+
*/
|
|
1345
|
+
deploymentId = undefined;
|
|
1346
|
+
/**
|
|
1347
|
+
* 从模板创建的模板 Id
|
|
1348
|
+
*/
|
|
1349
|
+
templateId = undefined;
|
|
1350
|
+
/**
|
|
1351
|
+
* 全局设置
|
|
1352
|
+
*/
|
|
1353
|
+
preferenceMap = {};
|
|
1354
|
+
/**
|
|
1355
|
+
* 获取命名空间
|
|
1356
|
+
*/
|
|
1357
|
+
getNamespace() {
|
|
1358
|
+
return 'app';
|
|
1359
|
+
}
|
|
1360
|
+
getTsNamespace() {
|
|
1361
|
+
return `app`;
|
|
1362
|
+
}
|
|
1363
|
+
findNodeByPath(nodePath) {
|
|
1364
|
+
return (0, jsoner_1.queryNodeByPath)(this, nodePath);
|
|
1365
|
+
}
|
|
1366
|
+
findNodeByCompleteName(completeName) {
|
|
1367
|
+
const nameArr = completeName?.split('.') || [];
|
|
1368
|
+
let node = this;
|
|
1369
|
+
// 先处理平台的
|
|
1370
|
+
if (completeName.startsWith('nasl')) {
|
|
1371
|
+
node = (0, utils_1.getNaslNodeByNodeCallee)(nameArr.splice(0, nameArr.length - 1).join('.'), nameArr[nameArr.length - 1]);
|
|
1372
|
+
return node;
|
|
1373
|
+
}
|
|
1374
|
+
const start = nameArr.shift();
|
|
1375
|
+
const mod = 0;
|
|
1376
|
+
const modulesMap = {
|
|
1377
|
+
extensions: node.dependencies,
|
|
1378
|
+
apis: node.interfaceDependencies,
|
|
1379
|
+
components: node.componentDependencies,
|
|
1380
|
+
};
|
|
1381
|
+
const modules = modulesMap[start];
|
|
1382
|
+
if (Array.isArray(modules)) {
|
|
1383
|
+
const moduleName = nameArr.shift();
|
|
1384
|
+
node = modules.find((moduleItem) => moduleItem.name === moduleName);
|
|
1385
|
+
}
|
|
1386
|
+
for (let index = 0; index < nameArr.length; index++) {
|
|
1387
|
+
if (!node) {
|
|
1388
|
+
return null;
|
|
1389
|
+
}
|
|
1390
|
+
const nameItem = nameArr[index];
|
|
1391
|
+
// const isKeyword = index % 2 === mod;
|
|
1392
|
+
// if (!isKeyword && Array.isArray(node)) {
|
|
1393
|
+
// node = node.find(({ name }) => name === nameItem);
|
|
1394
|
+
// } else {
|
|
1395
|
+
// node = node[nameItem];
|
|
1396
|
+
// }
|
|
1397
|
+
if (Array.isArray(node)) {
|
|
1398
|
+
node = node.find(({ name }) => name === nameItem);
|
|
1399
|
+
}
|
|
1400
|
+
else {
|
|
1401
|
+
node = node[nameItem];
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
return node;
|
|
1405
|
+
}
|
|
1406
|
+
loadEnvList() {
|
|
1407
|
+
this.envList = ['dev', 'online'];
|
|
1408
|
+
}
|
|
1409
|
+
loadPackageInfo(scope) {
|
|
1410
|
+
const dependencyMap = window.globalData.ideVersionDetail.dependencies;
|
|
1411
|
+
const packageInfo = {
|
|
1412
|
+
template: { name: '', version: '', scope },
|
|
1413
|
+
ui: { name: '', version: '', scope },
|
|
1414
|
+
scope,
|
|
1415
|
+
};
|
|
1416
|
+
packageInfo.template.name = scope === 'h5' ? '@lcap/mobile-template' : 'lcap-pc-template';
|
|
1417
|
+
packageInfo.template.version = scope === 'h5' ? dependencyMap.FrontendArchH5.version : dependencyMap.FrontendArchPC.version;
|
|
1418
|
+
packageInfo.ui.name = scope === 'h5' ? '@lcap/mobile-ui' : 'cloud-ui.vusion';
|
|
1419
|
+
packageInfo.ui.version = scope === 'h5' ? dependencyMap.FrontendComponentLibraryH5.version : dependencyMap.FrontendComponentLibraryPC.version;
|
|
1420
|
+
return packageInfo;
|
|
1421
|
+
}
|
|
1422
|
+
packageInfos = [];
|
|
1423
|
+
loadPackageInfos() {
|
|
1424
|
+
this.packageInfos = [];
|
|
1425
|
+
const scopes = ['pc', 'h5'];
|
|
1426
|
+
scopes.forEach((scope) => {
|
|
1427
|
+
this.packageInfos.push(this.loadPackageInfo(scope));
|
|
1428
|
+
});
|
|
1429
|
+
}
|
|
1430
|
+
/**
|
|
1431
|
+
* 根据 packageInfo 的信息生成用于 load 的 assetsInfo
|
|
1432
|
+
* 在环境中需要 basic 和 custom 分开 load,否则容易报错
|
|
1433
|
+
* @param prefix
|
|
1434
|
+
*/
|
|
1435
|
+
genAllAssetsInfo(prefix, scope) {
|
|
1436
|
+
// const packageInfo = this.packageInfo;
|
|
1437
|
+
const packageInfo = this.packageInfos.find((info) => info.scope === scope);
|
|
1438
|
+
const result = {
|
|
1439
|
+
basic: {
|
|
1440
|
+
js: [
|
|
1441
|
+
`${prefix}/packages/vue@2/dist/vue.min.js`,
|
|
1442
|
+
// `${prefix}/packages/vue-router@3/dist/vue-router.min.js`,
|
|
1443
|
+
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`,
|
|
1444
|
+
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`,
|
|
1445
|
+
],
|
|
1446
|
+
css: [
|
|
1447
|
+
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`,
|
|
1448
|
+
scope === 'h5' ? `${prefix}/packages/@lcap/mobile-template@${packageInfo.template.version}/cloudAdminDesigner.css` : `${prefix}/packages/lcap-pc-template@${packageInfo.template.version}/cloudAdminDesigner.css`,
|
|
1449
|
+
],
|
|
1450
|
+
},
|
|
1451
|
+
custom: {
|
|
1452
|
+
js: [],
|
|
1453
|
+
css: [],
|
|
1454
|
+
names: [],
|
|
1455
|
+
},
|
|
1456
|
+
};
|
|
1457
|
+
const frontends = this.frontends.filter((frontend) => frontend.type === scope);
|
|
1458
|
+
const existingSet = new Set();
|
|
1459
|
+
frontends.forEach((frontend) => {
|
|
1460
|
+
frontend.componentDependencies.forEach((dep) => {
|
|
1461
|
+
const { name, version } = dep;
|
|
1462
|
+
const jsName = `${prefix}/packages/${name}@${version}/dist-theme/index.js`;
|
|
1463
|
+
if (!existingSet.has(jsName)) {
|
|
1464
|
+
existingSet.add(jsName);
|
|
1465
|
+
result.custom.js.push(jsName);
|
|
1466
|
+
if (utils.shouldLoadCss(name, version)) {
|
|
1467
|
+
result.custom.css.push(`${prefix}/packages/${name}@${version}/dist-theme/index.css`);
|
|
1468
|
+
}
|
|
1469
|
+
result.custom.names.push(name);
|
|
1470
|
+
}
|
|
1471
|
+
});
|
|
1472
|
+
});
|
|
1473
|
+
this.dependencies.forEach((dep) => {
|
|
1474
|
+
const { name, version, compilerInfoMap, frontends } = dep;
|
|
1475
|
+
const prefixPath = compilerInfoMap?.js?.prefix;
|
|
1476
|
+
if (name) {
|
|
1477
|
+
(frontends || []).forEach((frontend) => {
|
|
1478
|
+
if (frontend.type === scope) {
|
|
1479
|
+
const jsName = `${prefix}/packages/${prefixPath ? prefixPath + "/" : ""}${name}@${version}/dist-theme/index.js`;
|
|
1480
|
+
if (!existingSet.has(jsName)) {
|
|
1481
|
+
existingSet.add(jsName);
|
|
1482
|
+
result.custom.js.push(jsName);
|
|
1483
|
+
result.custom.names.push(dep.name);
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
});
|
|
1487
|
+
}
|
|
1488
|
+
});
|
|
1489
|
+
return result;
|
|
1490
|
+
}
|
|
1491
|
+
onChange($event) {
|
|
1492
|
+
this.emit('change', $event);
|
|
1493
|
+
}
|
|
1494
|
+
addModuleInDependenciesWithDataSource(options) {
|
|
1495
|
+
this.emit('collect:start', {
|
|
1496
|
+
actionMsg: '导入依赖库',
|
|
1497
|
+
});
|
|
1498
|
+
const existSameNameNode = this.dependencies.find((l) => l.name === options.name);
|
|
1499
|
+
// 同名同版本的依赖库会替换 同名不同版本的依赖库会保留并设置为禁用
|
|
1500
|
+
// (options as Module).enable = true;
|
|
1501
|
+
if (existSameNameNode) {
|
|
1502
|
+
// const hasSameVersion = existSameNameNode.version === (options as Module).version;
|
|
1503
|
+
// if (hasSameVersion) {
|
|
1504
|
+
existSameNameNode.delete();
|
|
1505
|
+
// }
|
|
1506
|
+
// 同名的依赖库 只启用第一个
|
|
1507
|
+
// (options as Module).enable = hasSameVersion;
|
|
1508
|
+
}
|
|
1509
|
+
const node = this.addModuleInDependencies(options);
|
|
1510
|
+
// 启用的依赖库才创建数据源
|
|
1511
|
+
// if (node.enable && node.dataSources) {
|
|
1512
|
+
if (node.dataSources) {
|
|
1513
|
+
const dataSourceGroup = this.configuration?.getGroup('dataSource');
|
|
1514
|
+
if (dataSourceGroup) {
|
|
1515
|
+
node.dataSources.forEach((datasource) => {
|
|
1516
|
+
const body = ConfigProperty__1.default.from({
|
|
1517
|
+
name: datasource.name,
|
|
1518
|
+
description: '',
|
|
1519
|
+
isPrivate: false,
|
|
1520
|
+
values: [
|
|
1521
|
+
{ env: 'dev', value: '', concept: 'ConfigPropertyValue' },
|
|
1522
|
+
{ env: 'online', value: '', concept: 'ConfigPropertyValue' },
|
|
1523
|
+
],
|
|
1524
|
+
});
|
|
1525
|
+
dataSourceGroup.addConfigProperty(body);
|
|
1526
|
+
});
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
this.emit('collect:end');
|
|
1530
|
+
}
|
|
1531
|
+
statistics() {
|
|
1532
|
+
const sum = (list) => list.reduce((curr, prev) => prev + curr, 0);
|
|
1533
|
+
const countView = (list) => list.length + sum(list.map((view) => countView(view.children)));
|
|
1534
|
+
return {
|
|
1535
|
+
entityCount: sum(this.dataSources.map((dataSource) => dataSource.entities.length)),
|
|
1536
|
+
structureCount: this.structures.length,
|
|
1537
|
+
enumCount: this.enums.length,
|
|
1538
|
+
logicCount: this.logics.length,
|
|
1539
|
+
viewCount: sum(this.frontends.map((frontend) => countView(frontend.views))),
|
|
1540
|
+
processCount: this.processes.length,
|
|
1541
|
+
};
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* 需要包含依赖库里的dataSources,不自动生成
|
|
1545
|
+
*/
|
|
1546
|
+
getDataSourceExistingNames(excludedList = []) {
|
|
1547
|
+
const excludedSet = new Set(excludedList);
|
|
1548
|
+
const dependDatasources = [];
|
|
1549
|
+
const modules = [...this.dependencies];
|
|
1550
|
+
modules.forEach((module) => {
|
|
1551
|
+
if (Array.isArray(module.dataSources)) {
|
|
1552
|
+
dependDatasources.push(...module.dataSources);
|
|
1553
|
+
}
|
|
1554
|
+
});
|
|
1555
|
+
const dataSources = this.dataSources.concat(dependDatasources);
|
|
1556
|
+
return (dataSources || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1557
|
+
}
|
|
1558
|
+
/**
|
|
1559
|
+
* 更新全局设置 preferenceMap
|
|
1560
|
+
*/
|
|
1561
|
+
updatePreferenceMap(preferences = {}) {
|
|
1562
|
+
this.emit('collect:start', { actionMsg: '修改实体表名列名' });
|
|
1563
|
+
const oldPreferenceMap = { ...this.preferenceMap };
|
|
1564
|
+
Object.assign(this.preferenceMap, preferences);
|
|
1565
|
+
// 更新实体表名和列名
|
|
1566
|
+
this.dataSources.forEach((ds) => {
|
|
1567
|
+
ds.entities.forEach((e) => {
|
|
1568
|
+
if (oldPreferenceMap['namingConvention.tableName'] !== preferences['namingConvention.tableName']) {
|
|
1569
|
+
e.formatTableName();
|
|
1570
|
+
}
|
|
1571
|
+
if (oldPreferenceMap['namingConvention.columnName'] !== preferences['namingConvention.columnName']) {
|
|
1572
|
+
e.formatPropertyColumnName();
|
|
1573
|
+
}
|
|
1574
|
+
});
|
|
1575
|
+
});
|
|
1576
|
+
// 使撤销生效
|
|
1577
|
+
Object.assign(this.preferenceMap, oldPreferenceMap);
|
|
1578
|
+
this.update({
|
|
1579
|
+
preferenceMap: preferences,
|
|
1580
|
+
});
|
|
1581
|
+
this.emit('collect:end');
|
|
1582
|
+
}
|
|
1583
|
+
/* 判断接口是否有误,需要重新导出 */
|
|
1584
|
+
getQualifiedInterface(interfaces = this.interfaces) {
|
|
1585
|
+
const errorList = [];
|
|
1586
|
+
interfaces.forEach((item) => {
|
|
1587
|
+
const logic = this.logics.find((logic) => logic.name === item.originLogicName);
|
|
1588
|
+
const logicParamMap = {};
|
|
1589
|
+
logic.params.forEach((param) => {
|
|
1590
|
+
logicParamMap[param.name] = param.typeAnnotation;
|
|
1591
|
+
});
|
|
1592
|
+
item.params.forEach((param) => {
|
|
1593
|
+
const logicTypeAnnotation = logicParamMap[param.name]?.toJSON();
|
|
1594
|
+
delete logicParamMap[param.name];
|
|
1595
|
+
if (!logicTypeAnnotation) {
|
|
1596
|
+
return errorList.push({
|
|
1597
|
+
logicName: logic.name,
|
|
1598
|
+
interfaceName: item.name,
|
|
1599
|
+
param: param.name,
|
|
1600
|
+
type: 1,
|
|
1601
|
+
message: `参数“${param.name}”已被删除,请确定请求类型无误后点击“重新导出”`,
|
|
1602
|
+
});
|
|
1603
|
+
}
|
|
1604
|
+
const interfaceTypeAnnotation = param.typeAnnotation.toJSON();
|
|
1605
|
+
let isSame = false;
|
|
1606
|
+
if (logicTypeAnnotation?.typeNamespace === 'app.enums') {
|
|
1607
|
+
if (interfaceTypeAnnotation.typeNamespace === 'nasl.core' && interfaceTypeAnnotation.typeName === 'String') {
|
|
1608
|
+
isSame = true;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
if (JSON.stringify(logicTypeAnnotation) === JSON.stringify(interfaceTypeAnnotation)) {
|
|
1612
|
+
isSame = true;
|
|
1613
|
+
}
|
|
1614
|
+
if (!isSame) {
|
|
1615
|
+
errorList.push({
|
|
1616
|
+
logicName: logic.name,
|
|
1617
|
+
interfaceName: item.name,
|
|
1618
|
+
param: param.name,
|
|
1619
|
+
type: 2,
|
|
1620
|
+
message: `参数“${param.name}”数据类型变更,请确定请求类型无误后点击“重新导出”`,
|
|
1621
|
+
});
|
|
1622
|
+
}
|
|
1623
|
+
});
|
|
1624
|
+
const logicReturns = logic.returns;
|
|
1625
|
+
const interfaceReturns = item.returns;
|
|
1626
|
+
if (logicReturns?.length > interfaceReturns?.length) {
|
|
1627
|
+
if (!logicReturns[0].typeAnnotation) {
|
|
1628
|
+
errorList.push({
|
|
1629
|
+
logicName: logic.name,
|
|
1630
|
+
interfaceName: item.name,
|
|
1631
|
+
resultName: logicReturns[0].name,
|
|
1632
|
+
type: 4,
|
|
1633
|
+
message: `输出参数发生变更,请点击“重新导出”`,
|
|
1634
|
+
});
|
|
1635
|
+
}
|
|
1636
|
+
else {
|
|
1637
|
+
errorList.push({
|
|
1638
|
+
logicName: logic.name,
|
|
1639
|
+
interfaceName: item.name,
|
|
1640
|
+
resultName: logicReturns[0].name,
|
|
1641
|
+
type: 4,
|
|
1642
|
+
message: `输出参数发生变更,请点击“重新导出”`,
|
|
1643
|
+
});
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
else if (logicReturns?.length < interfaceReturns?.length) {
|
|
1647
|
+
errorList.push({
|
|
1648
|
+
logicName: logic.name,
|
|
1649
|
+
interfaceName: item.name,
|
|
1650
|
+
resultName: interfaceReturns[0].name,
|
|
1651
|
+
type: 4,
|
|
1652
|
+
message: `输出参数发生变更,请点击“重新导出”`,
|
|
1653
|
+
});
|
|
1654
|
+
}
|
|
1655
|
+
else if (logicReturns?.length === interfaceReturns?.length) {
|
|
1656
|
+
if (logicReturns.length !== 0) {
|
|
1657
|
+
if (logicReturns[0].name !== interfaceReturns[0].name) {
|
|
1658
|
+
errorList.push({
|
|
1659
|
+
logicName: logic.name,
|
|
1660
|
+
interfaceName: item.name,
|
|
1661
|
+
resultName: logicReturns[0].name,
|
|
1662
|
+
type: 4,
|
|
1663
|
+
message: `输出参数发生变更,请点击“重新导出”`,
|
|
1664
|
+
});
|
|
1665
|
+
}
|
|
1666
|
+
else if (!logicReturns[0].typeAnnotation) {
|
|
1667
|
+
if (!logicReturns[0]?.__TypeAnnotation) {
|
|
1668
|
+
errorList.push({
|
|
1669
|
+
logicName: logic.name,
|
|
1670
|
+
interfaceName: item.name,
|
|
1671
|
+
resultName: logicReturns[0].name,
|
|
1672
|
+
type: 7,
|
|
1673
|
+
message: `输出参数“${logicReturns[0].name}”没有数据类型,无法导出`,
|
|
1674
|
+
});
|
|
1675
|
+
}
|
|
1676
|
+
else if (!logicReturns[0]?.__TypeAnnotation.isSame(interfaceReturns[0]?.typeAnnotation)) {
|
|
1677
|
+
errorList.push({
|
|
1678
|
+
logicName: logic.name,
|
|
1679
|
+
interfaceName: item.name,
|
|
1680
|
+
resultName: logicReturns[0].name,
|
|
1681
|
+
type: 4,
|
|
1682
|
+
message: `输出参数发生变更,请点击“重新导出”`,
|
|
1683
|
+
});
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
else if (JSON.stringify(logicReturns[0]?.typeAnnotation?.toJSON()) !== JSON.stringify(interfaceReturns[0]?.typeAnnotation?.toJSON())) {
|
|
1687
|
+
errorList.push({
|
|
1688
|
+
logicName: logic.name,
|
|
1689
|
+
interfaceName: item.name,
|
|
1690
|
+
resultName: logicReturns[0].name,
|
|
1691
|
+
type: 4,
|
|
1692
|
+
message: `输出参数发生变更,请点击“重新导出”`,
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
for (const i in logicParamMap) {
|
|
1698
|
+
errorList.push({
|
|
1699
|
+
logicName: logic.name,
|
|
1700
|
+
param: i,
|
|
1701
|
+
message: `新增参数“${i}”,请确定请求类型无误后点击“重新导出”`,
|
|
1702
|
+
type: 3,
|
|
1703
|
+
});
|
|
1704
|
+
}
|
|
1705
|
+
});
|
|
1706
|
+
return errorList;
|
|
1707
|
+
}
|
|
1708
|
+
addFrontendForType(options) {
|
|
1709
|
+
let insertIndex = -1;
|
|
1710
|
+
this.frontends.forEach((frontend, index) => {
|
|
1711
|
+
if (frontend.type === options.type) {
|
|
1712
|
+
insertIndex = index;
|
|
1713
|
+
}
|
|
1714
|
+
});
|
|
1715
|
+
if (options.type === 'h5' && insertIndex === -1) {
|
|
1716
|
+
insertIndex = this.frontends.length;
|
|
1717
|
+
}
|
|
1718
|
+
const node = this._insertFrontendAt(options, insertIndex + 1);
|
|
1719
|
+
const index = this.frontends.indexOf(node);
|
|
1720
|
+
node.create({
|
|
1721
|
+
index,
|
|
1722
|
+
parentNode: this,
|
|
1723
|
+
parentKey: 'frontends',
|
|
1724
|
+
});
|
|
1725
|
+
return node;
|
|
1726
|
+
}
|
|
1727
|
+
getFrontendExistingTitles(excludedList = []) {
|
|
1728
|
+
const excludedSet = new Set(excludedList);
|
|
1729
|
+
return (this.frontends || []).filter((item) => !excludedSet.has(item)).map((item) => item.title);
|
|
1730
|
+
}
|
|
1731
|
+
getExtensionsCallbackLogics() {
|
|
1732
|
+
const resultLogics = [];
|
|
1733
|
+
this.frontends.forEach((frontend) => {
|
|
1734
|
+
resultLogics.push(...resultLogics, ...frontend.getExtensionsCallbackLogics());
|
|
1735
|
+
});
|
|
1736
|
+
return Array.from(new Set(resultLogics));
|
|
1737
|
+
}
|
|
1738
|
+
getJavaLogicUniqueName(name = 'javalogic1') {
|
|
1739
|
+
return utils.unique(name, this.getLogicExistingNames(), undefined, true);
|
|
1740
|
+
}
|
|
1741
|
+
getJavaLogicClassUniqueName(name = 'Javalogic1') {
|
|
1742
|
+
return utils.unique(name, this.getLogicExistingNames(), undefined, true) + 'Service';
|
|
1743
|
+
}
|
|
1744
|
+
genAllCustomComponents() {
|
|
1745
|
+
const frontends = this.frontends;
|
|
1746
|
+
const compMap = {
|
|
1747
|
+
pc: [],
|
|
1748
|
+
h5: [],
|
|
1749
|
+
};
|
|
1750
|
+
const existingSet = new Set();
|
|
1751
|
+
frontends.forEach((frontend) => {
|
|
1752
|
+
if (frontend.componentDependencies) {
|
|
1753
|
+
frontend.componentDependencies.forEach((dep) => {
|
|
1754
|
+
const { name } = dep;
|
|
1755
|
+
if (!existingSet.has(name)) {
|
|
1756
|
+
compMap[frontend.type].push(dep);
|
|
1757
|
+
}
|
|
1758
|
+
});
|
|
1759
|
+
}
|
|
1760
|
+
});
|
|
1761
|
+
return compMap;
|
|
1762
|
+
}
|
|
1763
|
+
/**
|
|
1764
|
+
* 当前正在发布的环境,临时状态
|
|
1765
|
+
*/
|
|
1766
|
+
curDeployEnv = 'dev';
|
|
1767
|
+
/**
|
|
1768
|
+
* 获取 “系统统一路径前缀”
|
|
1769
|
+
* @returns
|
|
1770
|
+
*/
|
|
1771
|
+
get sysPrefixPath() {
|
|
1772
|
+
const uniformPathPrefix = this.configuration?.groups?.find((item) => item.name === 'system')?.properties?.find((item) => item.name === 'uniformPathPrefix')?.values.find((item) => item.env === this.curDeployEnv)?.value;
|
|
1773
|
+
const sysPrefixPath = uniformPathPrefix && uniformPathPrefix !== '/' ? uniformPathPrefix : '';
|
|
1774
|
+
return sysPrefixPath;
|
|
1775
|
+
}
|
|
1776
|
+
__databaseTypeMap = {};
|
|
1777
|
+
};
|
|
1778
|
+
__decorate([
|
|
1779
|
+
(0, decorators_1.property)()
|
|
1780
|
+
], App.prototype, "id", void 0);
|
|
1781
|
+
__decorate([
|
|
1782
|
+
(0, decorators_1.property)()
|
|
1783
|
+
], App.prototype, "ideVersion", void 0);
|
|
1784
|
+
__decorate([
|
|
1785
|
+
(0, decorators_1.property)()
|
|
1786
|
+
], App.prototype, "name", void 0);
|
|
1787
|
+
__decorate([
|
|
1788
|
+
(0, decorators_1.property)()
|
|
1789
|
+
], App.prototype, "title", void 0);
|
|
1790
|
+
__decorate([
|
|
1791
|
+
(0, decorators_1.property)()
|
|
1792
|
+
], App.prototype, "icon", void 0);
|
|
1793
|
+
__decorate([
|
|
1794
|
+
(0, decorators_1.property)()
|
|
1795
|
+
], App.prototype, "desc", void 0);
|
|
1796
|
+
__decorate([
|
|
1797
|
+
(0, decorators_1.property)()
|
|
1798
|
+
], App.prototype, "dnsAddr", void 0);
|
|
1799
|
+
__decorate([
|
|
1800
|
+
(0, decorators_1.property)()
|
|
1801
|
+
], App.prototype, "hasUserCenter", void 0);
|
|
1802
|
+
__decorate([
|
|
1803
|
+
(0, decorators_1.property)()
|
|
1804
|
+
], App.prototype, "hasAuth", void 0);
|
|
1805
|
+
__decorate([
|
|
1806
|
+
(0, decorators_1.property)('DataSource')
|
|
1807
|
+
], App.prototype, "dataSources", void 0);
|
|
1808
|
+
__decorate([
|
|
1809
|
+
(0, decorators_1.property)('Structure')
|
|
1810
|
+
], App.prototype, "structures", void 0);
|
|
1811
|
+
__decorate([
|
|
1812
|
+
(0, decorators_1.property)('Enum')
|
|
1813
|
+
], App.prototype, "enums", void 0);
|
|
1814
|
+
__decorate([
|
|
1815
|
+
(0, decorators_1.property)('Logic')
|
|
1816
|
+
], App.prototype, "logics", void 0);
|
|
1817
|
+
__decorate([
|
|
1818
|
+
(0, decorators_1.property)('Interface')
|
|
1819
|
+
], App.prototype, "interfaces", void 0);
|
|
1820
|
+
__decorate([
|
|
1821
|
+
(0, decorators_1.property)('Frontend')
|
|
1822
|
+
], App.prototype, "frontends", void 0);
|
|
1823
|
+
__decorate([
|
|
1824
|
+
(0, decorators_1.property)('Process')
|
|
1825
|
+
], App.prototype, "processes", void 0);
|
|
1826
|
+
__decorate([
|
|
1827
|
+
(0, decorators_1.property)('Role')
|
|
1828
|
+
], App.prototype, "roles", void 0);
|
|
1829
|
+
__decorate([
|
|
1830
|
+
(0, decorators_1.property)('Configuration')
|
|
1831
|
+
], App.prototype, "configuration", void 0);
|
|
1832
|
+
__decorate([
|
|
1833
|
+
(0, decorators_1.property)('Module')
|
|
1834
|
+
], App.prototype, "dependencies", void 0);
|
|
1835
|
+
__decorate([
|
|
1836
|
+
(0, decorators_1.property)('Module')
|
|
1837
|
+
], App.prototype, "interfaceDependencies", void 0);
|
|
1838
|
+
__decorate([
|
|
1839
|
+
(0, decorators_1.property)('Integration')
|
|
1840
|
+
], App.prototype, "integration", void 0);
|
|
1841
|
+
__decorate([
|
|
1842
|
+
(0, decorators_1.property)('MetadataType')
|
|
1843
|
+
], App.prototype, "metadataTypes", void 0);
|
|
1844
|
+
__decorate([
|
|
1845
|
+
(0, decorators_1.excludedInJSON)()
|
|
1846
|
+
], App.prototype, "officialType", void 0);
|
|
1847
|
+
__decorate([
|
|
1848
|
+
(0, decorators_1.excludedInJSON)()
|
|
1849
|
+
], App.prototype, "projectId", void 0);
|
|
1850
|
+
__decorate([
|
|
1851
|
+
(0, decorators_1.excludedInJSON)()
|
|
1852
|
+
], App.prototype, "tenantId", void 0);
|
|
1853
|
+
__decorate([
|
|
1854
|
+
(0, decorators_1.excludedInJSON)()
|
|
1855
|
+
], App.prototype, "userGroupId", void 0);
|
|
1856
|
+
__decorate([
|
|
1857
|
+
(0, decorators_1.excludedInJSON)()
|
|
1858
|
+
], App.prototype, "envs", void 0);
|
|
1859
|
+
__decorate([
|
|
1860
|
+
(0, decorators_1.excludedInJSON)()
|
|
1861
|
+
], App.prototype, "envList", void 0);
|
|
1862
|
+
__decorate([
|
|
1863
|
+
(0, decorators_1.excludedInJSON)()
|
|
1864
|
+
], App.prototype, "deploying", void 0);
|
|
1865
|
+
__decorate([
|
|
1866
|
+
(0, decorators_1.excludedInJSON)()
|
|
1867
|
+
], App.prototype, "deploymentId", void 0);
|
|
1868
|
+
__decorate([
|
|
1869
|
+
(0, decorators_1.excludedInJSON)()
|
|
1870
|
+
], App.prototype, "templateId", void 0);
|
|
1871
|
+
__decorate([
|
|
1872
|
+
(0, decorators_1.property)()
|
|
1873
|
+
], App.prototype, "preferenceMap", void 0);
|
|
1874
|
+
App = App_1 = __decorate([
|
|
1875
|
+
decorators_1.className,
|
|
1876
|
+
(0, decorators_1.concept)('应用')
|
|
1877
|
+
// @ts-ignore
|
|
1878
|
+
], App);
|
|
1879
|
+
exports.App = App;
|
|
1880
|
+
exports.default = App;
|
|
1881
|
+
//================================================================================
|
|
1882
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
1883
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
1884
|
+
//================================================================================
|
|
1885
|
+
//# sourceMappingURL=App__.js.map
|