@lcap/nasl 3.7.0-alpha.1 → 3.7.0-beta.1
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/utils.d.ts +1 -1
- package/out/automate/engine/utils.js +3 -7
- package/out/automate/engine/utils.js.map +1 -1
- package/out/automate/template/myProcess.js +65 -65
- package/out/automate/template/myProcess.js.map +1 -1
- package/out/bak/translator.js +42 -12
- package/out/bak/translator.js.map +1 -1
- package/out/breakpoint/generator/BreakpointNode.d.ts +2 -0
- package/out/breakpoint/generator/BreakpointNode.js +7 -0
- package/out/breakpoint/generator/BreakpointNode.js.map +1 -1
- package/out/breakpoint/shared/constants.js +1 -0
- package/out/breakpoint/shared/constants.js.map +1 -1
- package/out/breakpoint/shared/utils.js +1 -1
- package/out/breakpoint/shared/utils.js.map +1 -1
- package/out/common/BaseNode.d.ts +4 -3
- package/out/common/BaseNode.js +61 -10
- package/out/common/BaseNode.js.map +1 -1
- package/out/common/ComponentAPI.d.ts +5 -3
- package/out/common/EventEmitter.d.ts +1 -0
- package/out/common/EventEmitter.js.map +1 -1
- package/out/concepts/Abort__.d.ts +5 -4
- package/out/concepts/Abort__.js +5 -7
- package/out/concepts/Abort__.js.map +1 -1
- package/out/concepts/AbstractInterface__.d.ts +9 -6
- package/out/concepts/AbstractInterface__.js +8 -11
- package/out/concepts/AbstractInterface__.js.map +1 -1
- package/out/concepts/Anchor__.d.ts +5 -12
- package/out/concepts/Anchor__.js +5 -44
- package/out/concepts/Anchor__.js.map +1 -1
- package/out/concepts/AnonymousFunction__.d.ts +10 -47
- package/out/concepts/AnonymousFunction__.js +14 -159
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/App__.d.ts +321 -437
- package/out/concepts/App__.js +460 -986
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.d.ts +5 -12
- package/out/concepts/Argument__.js +11 -46
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignee__.d.ts +8 -5
- package/out/concepts/Assignee__.js +9 -66
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.d.ts +5 -6
- package/out/concepts/AssignmentLine__.js +7 -11
- package/out/concepts/AssignmentLine__.js.map +1 -1
- package/out/concepts/Assignment__.d.ts +5 -26
- package/out/concepts/Assignment__.js +5 -64
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.d.ts +14 -51
- package/out/concepts/Attribute__.js +36 -126
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/AuthInterface__.d.ts +10 -10
- package/out/concepts/AuthInterface__.js +18 -13
- package/out/concepts/AuthInterface__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.d.ts +6 -3
- package/out/concepts/AuthLogicForCallInterface__.js +6 -32
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/AuthLogic__.d.ts +19 -19
- package/out/concepts/AuthLogic__.js +26 -25
- package/out/concepts/AuthLogic__.js.map +1 -1
- package/out/concepts/BackendVariable__.d.ts +19 -47
- package/out/concepts/BackendVariable__.js +43 -134
- package/out/concepts/BackendVariable__.js.map +1 -1
- package/out/concepts/Backend__.d.ts +6 -13
- package/out/concepts/Backend__.js +13 -50
- package/out/concepts/Backend__.js.map +1 -1
- package/out/concepts/BaseSetter__.d.ts +25 -0
- package/out/concepts/BaseSetter__.js +53 -0
- package/out/concepts/BaseSetter__.js.map +1 -0
- package/out/concepts/BatchAssignment__.d.ts +9 -21
- package/out/concepts/BatchAssignment__.js +11 -86
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BinaryExpression__.d.ts +5 -22
- package/out/concepts/BinaryExpression__.js +32 -59
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.d.ts +60 -107
- package/out/concepts/BindAttribute__.js +144 -251
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.d.ts +26 -42
- package/out/concepts/BindDirective__.js +63 -105
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.d.ts +27 -36
- package/out/concepts/BindEvent__.js +50 -109
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.d.ts +24 -41
- package/out/concepts/BindStyle__.js +48 -88
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/Block__.d.ts +5 -2
- package/out/concepts/Block__.js +5 -31
- package/out/concepts/Block__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +5 -0
- package/out/concepts/BooleanLiteral__.js +8 -1
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/BusinessComponent__.d.ts +47 -49
- package/out/concepts/BusinessComponent__.js +122 -444
- package/out/concepts/BusinessComponent__.js.map +1 -1
- package/out/concepts/BusinessLogic__.d.ts +5 -0
- package/out/concepts/BusinessLogic__.js +8 -1
- package/out/concepts/BusinessLogic__.js.map +1 -1
- package/out/concepts/CallAuthInterface__.d.ts +6 -4
- package/out/concepts/CallAuthInterface__.js +6 -34
- package/out/concepts/CallAuthInterface__.js.map +1 -1
- package/out/concepts/CallConnector__.d.ts +5 -0
- package/out/concepts/CallConnector__.js +11 -2
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallEvent__.d.ts +6 -7
- package/out/concepts/CallEvent__.js +11 -40
- package/out/concepts/CallEvent__.js.map +1 -1
- package/out/concepts/CallFunction__.d.ts +17 -9
- package/out/concepts/CallFunction__.js +84 -130
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +6 -7
- package/out/concepts/CallInterface__.js +14 -41
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +11 -24
- package/out/concepts/CallLogic__.js +68 -140
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +70 -126
- package/out/concepts/CallQueryComponent__.js +134 -308
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/CapsulesSetter__.d.ts +109 -0
- package/out/concepts/CapsulesSetter__.js +163 -0
- package/out/concepts/CapsulesSetter__.js.map +1 -0
- package/out/concepts/Comment__.d.ts +5 -0
- package/out/concepts/Comment__.js +8 -1
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.d.ts +6 -26
- package/out/concepts/CompletionProperty__.js +24 -74
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.d.ts +6 -13
- package/out/concepts/ConfigGroup__.js +13 -50
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigPropertyValue__.d.ts +5 -11
- package/out/concepts/ConfigPropertyValue__.js +11 -19
- package/out/concepts/ConfigPropertyValue__.js.map +1 -1
- package/out/concepts/ConfigProperty__.d.ts +11 -18
- package/out/concepts/ConfigProperty__.js +25 -58
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.d.ts +6 -13
- package/out/concepts/Configuration__.js +6 -49
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Connection__.d.ts +11 -18
- package/out/concepts/Connection__.js +25 -58
- package/out/concepts/Connection__.js.map +1 -1
- package/out/concepts/ConnectorTrigger__.d.ts +28 -34
- package/out/concepts/ConnectorTrigger__.js +55 -50
- package/out/concepts/ConnectorTrigger__.js.map +1 -1
- package/out/concepts/Connector__.d.ts +106 -504
- package/out/concepts/Connector__.js +134 -791
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/Constant__.d.ts +27 -55
- package/out/concepts/Constant__.js +45 -137
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/CountersignPolicy__.d.ts +6 -5
- package/out/concepts/CountersignPolicy__.js +8 -12
- package/out/concepts/CountersignPolicy__.js.map +1 -1
- package/out/concepts/DataSource__.d.ts +11 -18
- package/out/concepts/DataSource__.js +25 -58
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/DatabaseTypeAnnotation__.d.ts +5 -6
- package/out/concepts/DatabaseTypeAnnotation__.js +11 -13
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
- package/out/concepts/DefaultValue__.d.ts +7 -19
- package/out/concepts/DefaultValue__.js +6 -56
- package/out/concepts/DefaultValue__.js.map +1 -1
- package/out/concepts/Destination__.d.ts +10 -21
- package/out/concepts/Destination__.js +15 -55
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.d.ts +5 -4
- package/out/concepts/End__.js +7 -8
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +20 -26
- package/out/concepts/EntityIndex__.js +40 -39
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +17 -56
- package/out/concepts/EntityProperty__.js +70 -181
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +18 -26
- package/out/concepts/Entity__.js +38 -98
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +15 -21
- package/out/concepts/EnumItem__.js +27 -31
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/EnumSelectSetter__.d.ts +109 -0
- package/out/concepts/EnumSelectSetter__.js +163 -0
- package/out/concepts/EnumSelectSetter__.js.map +1 -0
- package/out/concepts/Enum__.d.ts +10 -28
- package/out/concepts/Enum__.js +35 -102
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/EventDeclaration__.d.ts +41 -0
- package/out/concepts/EventDeclaration__.js +81 -0
- package/out/concepts/EventDeclaration__.js.map +1 -0
- package/out/concepts/Event__.d.ts +16 -27
- package/out/concepts/Event__.js +37 -78
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ExternalDestination__.d.ts +8 -25
- package/out/concepts/ExternalDestination__.js +8 -58
- package/out/concepts/ExternalDestination__.js.map +1 -1
- package/out/concepts/ForEachStatement__.d.ts +7 -55
- package/out/concepts/ForEachStatement__.js +6 -128
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendLibrary__.d.ts +38 -46
- package/out/concepts/FrontendLibrary__.js +55 -121
- package/out/concepts/FrontendLibrary__.js.map +1 -1
- package/out/concepts/FrontendType__.d.ts +8 -12
- package/out/concepts/FrontendType__.js +15 -109
- package/out/concepts/FrontendType__.js.map +1 -1
- package/out/concepts/FrontendVariable__.d.ts +5 -0
- package/out/concepts/FrontendVariable__.js +8 -1
- package/out/concepts/FrontendVariable__.js.map +1 -1
- package/out/concepts/Frontend__.d.ts +9 -41
- package/out/concepts/Frontend__.js +36 -209
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Function__.d.ts +13 -34
- package/out/concepts/Function__.js +22 -194
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/I18nInfo__.d.ts +6 -7
- package/out/concepts/I18nInfo__.js +14 -14
- package/out/concepts/I18nInfo__.js.map +1 -1
- package/out/concepts/IconSetter__.d.ts +29 -0
- package/out/concepts/IconSetter__.js +62 -0
- package/out/concepts/IconSetter__.js.map +1 -0
- package/out/concepts/Identifier__.d.ts +5 -0
- package/out/concepts/Identifier__.js +20 -6
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.d.ts +5 -12
- package/out/concepts/IfStatement__.js +5 -44
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/ImageSetter__.d.ts +25 -0
- package/out/concepts/ImageSetter__.js +53 -0
- package/out/concepts/ImageSetter__.js.map +1 -0
- package/out/concepts/ImportedInterface__.d.ts +9 -0
- package/out/concepts/ImportedInterface__.js +11 -1
- package/out/concepts/ImportedInterface__.js.map +1 -1
- package/out/concepts/InputSetter__.d.ts +29 -0
- package/out/concepts/InputSetter__.js +62 -0
- package/out/concepts/InputSetter__.js.map +1 -0
- package/out/concepts/Integration__.d.ts +7 -26
- package/out/concepts/Integration__.js +6 -93
- package/out/concepts/Integration__.js.map +1 -1
- package/out/concepts/InterfaceParam__.d.ts +34 -62
- package/out/concepts/InterfaceParam__.js +63 -147
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.d.ts +42 -48
- package/out/concepts/Interface__.js +89 -158
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.d.ts +5 -4
- package/out/concepts/JSBlock__.js +8 -8
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/JavaLogic__.d.ts +5 -0
- package/out/concepts/JavaLogic__.js +14 -3
- package/out/concepts/JavaLogic__.js.map +1 -1
- package/out/concepts/LogicDeclaration__.d.ts +289 -0
- package/out/concepts/LogicDeclaration__.js +352 -0
- package/out/concepts/LogicDeclaration__.js.map +1 -0
- package/out/concepts/LogicItem__.d.ts +39 -45
- package/out/concepts/LogicItem__.js +76 -62
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +45 -63
- package/out/concepts/Logic__.js +159 -280
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.d.ts +6 -4
- package/out/concepts/MatchCase__.js +16 -68
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.d.ts +8 -14
- package/out/concepts/Match__.js +17 -49
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.d.ts +8 -23
- package/out/concepts/MemberExpression__.js +85 -103
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MetadataType__.d.ts +36 -54
- package/out/concepts/MetadataType__.js +44 -119
- package/out/concepts/MetadataType__.js.map +1 -1
- package/out/concepts/MicroApp__.d.ts +5 -6
- package/out/concepts/MicroApp__.js +30 -18
- package/out/concepts/MicroApp__.js.map +1 -1
- package/out/concepts/Module__.d.ts +99 -128
- package/out/concepts/Module__.js +133 -532
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/MsgTriggerEvent__.d.ts +31 -33
- package/out/concepts/MsgTriggerEvent__.js +39 -67
- package/out/concepts/MsgTriggerEvent__.js.map +1 -1
- package/out/concepts/MsgTriggerLauncher__.d.ts +11 -14
- package/out/concepts/MsgTriggerLauncher__.js +18 -44
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
- package/out/concepts/MultiApprovalPolicy__.d.ts +8 -9
- package/out/concepts/MultiApprovalPolicy__.js +7 -13
- package/out/concepts/MultiApprovalPolicy__.js.map +1 -1
- package/out/concepts/Namespace__.d.ts +112 -138
- package/out/concepts/Namespace__.js +122 -501
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NewComposite__.d.ts +11 -21
- package/out/concepts/NewComposite__.js +48 -146
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.d.ts +6 -14
- package/out/concepts/NewList__.js +7 -77
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.d.ts +6 -14
- package/out/concepts/NewMap__.js +7 -77
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/New__.d.ts +6 -0
- package/out/concepts/New__.js +9 -0
- package/out/concepts/New__.js.map +1 -1
- package/out/concepts/NullLiteral__.d.ts +5 -0
- package/out/concepts/NullLiteral__.js +5 -0
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumberInputSetter__.d.ts +45 -0
- package/out/concepts/NumberInputSetter__.js +98 -0
- package/out/concepts/NumberInputSetter__.js.map +1 -0
- package/out/concepts/NumericLiteral__.d.ts +6 -13
- package/out/concepts/NumericLiteral__.js +8 -45
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.d.ts +7 -17
- package/out/concepts/OqlQueryComponent__.js +16 -53
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/OverriddenLogic__.d.ts +38 -59
- package/out/concepts/OverriddenLogic__.js +55 -252
- package/out/concepts/OverriddenLogic__.js.map +1 -1
- package/out/concepts/Paginate__.d.ts +59 -0
- package/out/concepts/Paginate__.js +158 -0
- package/out/concepts/Paginate__.js.map +1 -0
- package/out/concepts/ParamWithGroup__.d.ts +13 -10
- package/out/concepts/ParamWithGroup__.js +15 -6
- package/out/concepts/ParamWithGroup__.js.map +1 -1
- package/out/concepts/Param__.d.ts +33 -76
- package/out/concepts/Param__.js +63 -159
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Point__.d.ts +5 -6
- package/out/concepts/Point__.js +11 -13
- package/out/concepts/Point__.js.map +1 -1
- package/out/concepts/ProcessComponent__.d.ts +12 -20
- package/out/concepts/ProcessComponent__.js +32 -90
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.d.ts +21 -66
- package/out/concepts/ProcessElement__.js +48 -360
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.d.ts +5 -4
- package/out/concepts/ProcessOutcome__.js +8 -8
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/ProcessOutcomes__.d.ts +5 -4
- package/out/concepts/ProcessOutcomes__.js +6 -7
- package/out/concepts/ProcessOutcomes__.js.map +1 -1
- package/out/concepts/Process__.d.ts +16 -26
- package/out/concepts/Process__.js +29 -186
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/PropDeclaration__.d.ts +99 -0
- package/out/concepts/PropDeclaration__.js +183 -0
- package/out/concepts/PropDeclaration__.js.map +1 -0
- package/out/concepts/PropertySelectSetter__.d.ts +25 -0
- package/out/concepts/PropertySelectSetter__.js +53 -0
- package/out/concepts/PropertySelectSetter__.js.map +1 -0
- package/out/concepts/QueryAggregateExpression__.d.ts +6 -13
- package/out/concepts/QueryAggregateExpression__.js +11 -46
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.d.ts +5 -0
- package/out/concepts/QueryFieldExpression__.js +17 -4
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.d.ts +6 -3
- package/out/concepts/QueryFromExpression__.js +14 -34
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.d.ts +5 -12
- package/out/concepts/QueryGroupByExpression__.js +5 -44
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.d.ts +29 -26
- package/out/concepts/QueryJoinExpression__.js +34 -52
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.d.ts +5 -22
- package/out/concepts/QueryLimitExpression__.js +5 -57
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.d.ts +5 -22
- package/out/concepts/QueryOrderByExpression__.js +5 -57
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.d.ts +37 -34
- package/out/concepts/QuerySelectExpression__.js +37 -59
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Rect__.d.ts +5 -6
- package/out/concepts/Rect__.js +17 -15
- package/out/concepts/Rect__.js.map +1 -1
- package/out/concepts/Return__.d.ts +28 -56
- package/out/concepts/Return__.js +50 -139
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.d.ts +5 -11
- package/out/concepts/Role__.js +21 -21
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SelectMembers__.d.ts +8 -20
- package/out/concepts/SelectMembers__.js +10 -58
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/SequentialPolicy__.d.ts +5 -0
- package/out/concepts/SequentialPolicy__.js +5 -0
- package/out/concepts/SequentialPolicy__.js.map +1 -1
- package/out/concepts/SetterOption__.d.ts +49 -0
- package/out/concepts/SetterOption__.js +99 -0
- package/out/concepts/SetterOption__.js.map +1 -0
- package/out/concepts/SlotDeclaration__.d.ts +213 -0
- package/out/concepts/SlotDeclaration__.js +287 -0
- package/out/concepts/SlotDeclaration__.js.map +1 -0
- package/out/concepts/Slot__.d.ts +7 -31
- package/out/concepts/Slot__.js +27 -72
- package/out/concepts/Slot__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +6 -17
- package/out/concepts/SqlQueryComponent__.js +14 -54
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Start__.d.ts +5 -4
- package/out/concepts/Start__.js +5 -7
- package/out/concepts/Start__.js.map +1 -1
- package/out/concepts/StaticString__.d.ts +6 -12
- package/out/concepts/StaticString__.js +14 -21
- package/out/concepts/StaticString__.js.map +1 -1
- package/out/concepts/StringInterpolation__.d.ts +5 -2
- package/out/concepts/StringInterpolation__.js +7 -33
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +6 -1
- package/out/concepts/StringLiteral__.js +16 -2
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +13 -49
- package/out/concepts/StructureProperty__.js +35 -137
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +13 -21
- package/out/concepts/Structure__.js +28 -90
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +6 -13
- package/out/concepts/SwitchCase__.js +6 -45
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchSetter__.d.ts +25 -0
- package/out/concepts/SwitchSetter__.js +53 -0
- package/out/concepts/SwitchSetter__.js.map +1 -0
- package/out/concepts/SwitchStatement__.d.ts +6 -3
- package/out/concepts/SwitchStatement__.js +5 -31
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/ThemeVariable__.d.ts +29 -0
- package/out/concepts/ThemeVariable__.js +58 -0
- package/out/concepts/ThemeVariable__.js.map +1 -0
- package/out/concepts/Theme__.d.ts +5 -6
- package/out/concepts/Theme__.js +11 -13
- package/out/concepts/Theme__.js.map +1 -1
- package/out/concepts/Transactional__.d.ts +29 -35
- package/out/concepts/Transactional__.js +54 -56
- package/out/concepts/Transactional__.js.map +1 -1
- package/out/concepts/TriggerEvent__.d.ts +8 -20
- package/out/concepts/TriggerEvent__.js +13 -57
- package/out/concepts/TriggerEvent__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.d.ts +12 -17
- package/out/concepts/TriggerLauncher__.js +30 -27
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +8 -11
- package/out/concepts/TypeAnnotation__.js +40 -89
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.d.ts +5 -0
- package/out/concepts/TypeParam__.js +12 -1
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.d.ts +5 -12
- package/out/concepts/UnaryExpression__.js +8 -45
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.d.ts +5 -0
- package/out/concepts/Unparsed__.js +8 -1
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/UseComponent__.d.ts +6 -7
- package/out/concepts/UseComponent__.js +11 -13
- package/out/concepts/UseComponent__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +7 -28
- package/out/concepts/ValidationRule__.js +18 -71
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.d.ts +30 -58
- package/out/concepts/Variable__.js +51 -140
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewBlockWithImage__.d.ts +33 -0
- package/out/concepts/ViewBlockWithImage__.js +63 -0
- package/out/concepts/ViewBlockWithImage__.js.map +1 -0
- package/out/concepts/ViewBlock__.d.ts +11 -12
- package/out/concepts/ViewBlock__.js +22 -18
- package/out/concepts/ViewBlock__.js.map +1 -1
- package/out/concepts/ViewComponentDeclaration__.d.ts +721 -0
- package/out/concepts/ViewComponentDeclaration__.js +808 -0
- package/out/concepts/ViewComponentDeclaration__.js.map +1 -0
- package/out/concepts/ViewElement__.d.ts +38 -37
- package/out/concepts/ViewElement__.js +415 -432
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +39 -46
- package/out/concepts/View__.js +509 -342
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.d.ts +6 -13
- package/out/concepts/WhileStatement__.js +6 -45
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.auth.js +68 -33
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.process.js +101 -3
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.js +31 -31
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/index__.d.ts +24 -8
- package/out/concepts/index__.js +24 -8
- package/out/concepts/index__.js.map +1 -1
- package/out/concepts/utils/asserts.d.ts +1079 -313
- package/out/concepts/utils/asserts.js +1461 -441
- package/out/concepts/utils/asserts.js.map +1 -1
- package/out/concepts/utils/types.d.ts +82 -30
- package/out/config.d.ts +9 -0
- package/out/config.js +5 -0
- package/out/config.js.map +1 -1
- package/out/decorators/index.d.ts +1 -6
- package/out/decorators/index.js +7 -16
- package/out/decorators/index.js.map +1 -1
- package/out/enums/KEYWORDS.js +2 -0
- package/out/enums/KEYWORDS.js.map +1 -1
- package/out/generator/genBundleFiles.d.ts +2 -0
- package/out/generator/genBundleFiles.js +105 -25
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genReleaseBody.d.ts +2 -4
- package/out/generator/genReleaseBody.js +0 -1
- package/out/generator/genReleaseBody.js.map +1 -1
- package/out/generator/permission.d.ts +5 -1
- package/out/generator/permission.js +3 -2
- package/out/generator/permission.js.map +1 -1
- package/out/index.d.ts +1 -0
- package/out/index.js +3 -1
- package/out/index.js.map +1 -1
- package/out/natural/genNaturalTS.js +2 -5
- package/out/natural/genNaturalTS.js.map +1 -1
- package/out/natural/index.d.ts +2 -0
- package/out/natural/index.js +2 -0
- package/out/natural/index.js.map +1 -1
- package/out/natural/naslStdlibMap.d.ts +1 -2
- package/out/natural/naslStdlibMap.js +32 -23
- package/out/natural/naslStdlibMap.js.map +1 -1
- package/out/natural/prompt/analyzeClaims.d.ts +1 -0
- package/out/natural/prompt/analyzeClaims.js +21 -0
- package/out/natural/prompt/analyzeClaims.js.map +1 -0
- package/out/natural/prompt/executeClaims.d.ts +1 -0
- package/out/natural/prompt/executeClaims.js +73 -0
- package/out/natural/prompt/executeClaims.js.map +1 -0
- package/out/natural/transformTSCode.js +13 -2
- package/out/natural/transformTSCode.js.map +1 -1
- package/out/server/createUiTs.d.ts +2 -1
- package/out/server/createUiTs.js +133 -161
- package/out/server/createUiTs.js.map +1 -1
- package/out/server/entity2LogicNamespace.js +1 -15
- package/out/server/entity2LogicNamespace.js.map +1 -1
- package/out/server/extendBaseNode.js +36 -9
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/formatTsUtils.js +9 -9
- package/out/server/formatTsUtils.js.map +1 -1
- package/out/server/getConnector.d.ts +1 -0
- package/out/server/getConnector.js +38 -35
- package/out/server/getConnector.js.map +1 -1
- package/out/server/getFunctions.js +3 -3
- package/out/server/getFunctions.js.map +1 -1
- package/out/server/getLogics.js +51 -15
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +87 -144
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/naslServer.d.ts +11 -1
- package/out/server/naslServer.js +118 -74
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +24 -5
- package/out/server/translator.js.map +1 -1
- package/out/service/storage/init.d.ts +1 -0
- package/out/service/storage/init.js +12 -7
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +16 -16
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +23 -23
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.d.ts +2 -2
- package/out/templator/genCurdMultipleKeyBlock.js +28 -38
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +15 -15
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genEnumSelectBlock.js +8 -8
- package/out/templator/genEnumSelectBlock.js.map +1 -1
- package/out/templator/genGridViewBlock.js +18 -20
- package/out/templator/genGridViewBlock.js.map +1 -1
- package/out/templator/genListViewBlock.js +10 -10
- package/out/templator/genListViewBlock.js.map +1 -1
- package/out/templator/genQueryComponent.js +32 -37
- package/out/templator/genQueryComponent.js.map +1 -1
- package/out/templator/genSelectBlock.js +10 -10
- package/out/templator/genSelectBlock.js.map +1 -1
- package/out/templator/genTableBlock.js +18 -10
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +15 -15
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/templator/utils.d.ts +19 -24
- package/out/templator/utils.js +20 -30
- package/out/templator/utils.js.map +1 -1
- package/out/translator/types.d.ts +2 -0
- package/out/utils/index.d.ts +6 -1
- package/out/utils/index.js +37 -4
- package/out/utils/index.js.map +1 -1
- package/out/utils/string.d.ts +12 -0
- package/out/utils/string.js +15 -1
- package/out/utils/string.js.map +1 -1
- package/out/utils/time-slicing/performance.js +3 -3
- package/out/utils/time-slicing/performance.js.map +1 -1
- package/package.json +1 -1
- package/sandbox/stdlib/nasl.auth.ts +4 -0
- package/sandbox/stdlib/nasl.collection.ts +5 -3
- package/sandbox/stdlib/nasl.core.ts +16 -1
- package/sandbox/stdlib/nasl.oql.ts +2 -2
- package/sandbox/stdlib/nasl.process.ts +18 -0
- package/sandbox/stdlib/nasl.ui.components.h5.ts +1751 -0
- package/sandbox/stdlib/nasl.ui.components.pc.ts +3479 -0
- package/sandbox/stdlib/nasl.ui.definition.ts +53 -2688
- package/sandbox/stdlib/nasl.ui.ts +2 -1
- package/sandbox/stdlib/nasl.util.ts +7 -5
- package/sandbox-natural/stdlib/nasl.core.ts +3 -0
- package/sandbox-natural/stdlib/nasl.oql.ts +4 -3
- package/src/automate/engine/utils.js +3 -7
- package/src/automate/template/myProcess.js +65 -65
- package/src/bak/translator.js +62 -29
- package/src/breakpoint/generator/BreakpointNode.ts +9 -0
- package/src/breakpoint/shared/constants.ts +1 -0
- package/src/breakpoint/shared/utils.ts +1 -1
- package/src/common/BaseNode.ts +71 -9
- package/src/common/ComponentAPI.ts +6 -3
- package/src/common/EventEmitter.ts +1 -0
- package/src/concepts/Abort__.ts +8 -8
- package/src/concepts/AbstractInterface__.ts +14 -14
- package/src/concepts/Anchor__.ts +8 -60
- package/src/concepts/AnonymousFunction__.ts +21 -198
- package/src/concepts/App__.ts +1151 -1837
- package/src/concepts/Argument__.ts +16 -64
- package/src/concepts/Assignee__.ts +14 -72
- package/src/concepts/AssignmentLine__.ts +9 -14
- package/src/concepts/Assignment__.ts +9 -92
- package/src/concepts/Attribute__.ts +49 -176
- package/src/concepts/AuthInterface__.ts +19 -20
- package/src/concepts/AuthLogicForCallInterface__.ts +9 -36
- package/src/concepts/AuthLogic__.ts +45 -46
- package/src/concepts/BackendVariable__.ts +45 -167
- package/src/concepts/Backend__.ts +13 -57
- package/src/concepts/BaseSetter__.ts +72 -0
- package/src/concepts/BatchAssignment__.ts +18 -105
- package/src/concepts/BinaryExpression__.ts +36 -89
- package/src/concepts/BindAttribute__.ts +194 -343
- package/src/concepts/BindDirective__.ts +80 -135
- package/src/concepts/BindEvent__.ts +62 -126
- package/src/concepts/BindStyle__.ts +59 -112
- package/src/concepts/Block__.ts +8 -34
- package/src/concepts/BooleanLiteral__.ts +12 -5
- package/src/concepts/BusinessComponent__.ts +201 -502
- package/src/concepts/BusinessLogic__.ts +15 -15
- package/src/concepts/CallAuthInterface__.ts +10 -39
- package/src/concepts/CallConnector__.ts +15 -6
- package/src/concepts/CallEvent__.ts +16 -45
- package/src/concepts/CallFunction__.ts +104 -134
- package/src/concepts/CallInterface__.ts +20 -47
- package/src/concepts/CallLogic__.ts +93 -175
- package/src/concepts/CallQueryComponent__.ts +226 -520
- package/src/concepts/CapsulesSetter__.ts +254 -0
- package/src/concepts/Comment__.ts +11 -5
- package/src/concepts/CompletionProperty__.ts +29 -100
- package/src/concepts/ConfigGroup__.ts +13 -57
- package/src/concepts/ConfigPropertyValue__.ts +14 -26
- package/src/concepts/ConfigProperty__.ts +28 -68
- package/src/concepts/Configuration__.ts +9 -56
- package/src/concepts/Connection__.ts +27 -68
- package/src/concepts/ConnectorTrigger__.ts +57 -65
- package/src/concepts/Connector__.ts +339 -1448
- package/src/concepts/Constant__.ts +59 -182
- package/src/concepts/CountersignPolicy__.ts +12 -18
- package/src/concepts/DataSource__.ts +29 -68
- package/src/concepts/DatabaseTypeAnnotation__.ts +14 -19
- package/src/concepts/DefaultValue__.ts +10 -74
- package/src/concepts/Destination__.ts +28 -80
- package/src/concepts/End__.ts +11 -9
- package/src/concepts/EntityIndex__.ts +44 -51
- package/src/concepts/EntityProperty__.ts +86 -238
- package/src/concepts/Entity__.ts +43 -111
- package/src/concepts/EnumItem__.ts +29 -40
- package/src/concepts/EnumSelectSetter__.ts +254 -0
- package/src/concepts/Enum__.ts +38 -129
- package/src/concepts/EventDeclaration__.ts +95 -0
- package/src/concepts/Event__.ts +43 -92
- package/src/concepts/ExternalDestination__.ts +17 -91
- package/src/concepts/ForEachStatement__.ts +15 -198
- package/src/concepts/FrontendLibrary__.ts +111 -161
- package/src/concepts/FrontendType__.ts +21 -118
- package/src/concepts/FrontendVariable__.ts +10 -4
- package/src/concepts/Frontend__.ts +44 -250
- package/src/concepts/Function__.ts +28 -220
- package/src/concepts/I18nInfo__.ts +18 -20
- package/src/concepts/IconSetter__.ts +72 -0
- package/src/concepts/Identifier__.ts +27 -16
- package/src/concepts/IfStatement__.ts +9 -60
- package/src/concepts/ImageSetter__.ts +65 -0
- package/src/concepts/ImportedInterface__.ts +17 -4
- package/src/concepts/InputSetter__.ts +72 -0
- package/src/concepts/Integration__.ts +10 -114
- package/src/concepts/InterfaceParam__.ts +67 -186
- package/src/concepts/Interface__.ts +106 -200
- package/src/concepts/JSBlock__.ts +11 -11
- package/src/concepts/JavaLogic__.ts +19 -9
- package/src/concepts/LogicDeclaration__.ts +657 -0
- package/src/concepts/LogicItem__.ts +91 -96
- package/src/concepts/Logic__.ts +287 -434
- package/src/concepts/MatchCase__.ts +22 -72
- package/src/concepts/Match__.ts +23 -67
- package/src/concepts/MemberExpression__.ts +136 -132
- package/src/concepts/MetadataType__.ts +72 -167
- package/src/concepts/MicroApp__.ts +34 -29
- package/src/concepts/Module__.ts +259 -681
- package/src/concepts/MsgTriggerEvent__.ts +44 -79
- package/src/concepts/MsgTriggerLauncher__.ts +21 -54
- package/src/concepts/MultiApprovalPolicy__.ts +10 -18
- package/src/concepts/Namespace__.ts +278 -652
- package/src/concepts/NewComposite__.ts +62 -170
- package/src/concepts/NewList__.ts +12 -94
- package/src/concepts/NewMap__.ts +12 -94
- package/src/concepts/New__.ts +13 -2
- package/src/concepts/NullLiteral__.ts +8 -2
- package/src/concepts/NumberInputSetter__.ts +104 -0
- package/src/concepts/NumericLiteral__.ts +13 -63
- package/src/concepts/OqlQueryComponent__.ts +23 -71
- package/src/concepts/OverriddenLogic__.ts +71 -287
- package/src/concepts/Paginate__.ts +185 -0
- package/src/concepts/ParamWithGroup__.ts +26 -17
- package/src/concepts/Param__.ts +70 -211
- package/src/concepts/Point__.ts +14 -19
- package/src/concepts/ProcessComponent__.ts +33 -104
- package/src/concepts/ProcessElement__.ts +67 -422
- package/src/concepts/ProcessOutcome__.ts +12 -11
- package/src/concepts/ProcessOutcomes__.ts +9 -9
- package/src/concepts/Process__.ts +36 -200
- package/src/concepts/PropDeclaration__.ts +209 -0
- package/src/concepts/PropertySelectSetter__.ts +65 -0
- package/src/concepts/QueryAggregateExpression__.ts +18 -65
- package/src/concepts/QueryFieldExpression__.ts +22 -10
- package/src/concepts/QueryFromExpression__.ts +21 -41
- package/src/concepts/QueryGroupByExpression__.ts +8 -60
- package/src/concepts/QueryJoinExpression__.ts +64 -101
- package/src/concepts/QueryLimitExpression__.ts +9 -86
- package/src/concepts/QueryOrderByExpression__.ts +9 -86
- package/src/concepts/QuerySelectExpression__.ts +70 -118
- package/src/concepts/Rect__.ts +22 -23
- package/src/concepts/Return__.ts +60 -185
- package/src/concepts/Role__.ts +22 -29
- package/src/concepts/SelectMembers__.ts +16 -77
- package/src/concepts/SequentialPolicy__.ts +7 -2
- package/src/concepts/SetterOption__.ts +111 -0
- package/src/concepts/SlotDeclaration__.ts +488 -0
- package/src/concepts/Slot__.ts +35 -105
- package/src/concepts/SqlQueryComponent__.ts +21 -73
- package/src/concepts/Start__.ts +7 -8
- package/src/concepts/StaticString__.ts +16 -26
- package/src/concepts/StringInterpolation__.ts +9 -36
- package/src/concepts/StringLiteral__.ts +16 -7
- package/src/concepts/StructureProperty__.ts +38 -176
- package/src/concepts/Structure__.ts +32 -102
- package/src/concepts/SwitchCase__.ts +10 -62
- package/src/concepts/SwitchSetter__.ts +65 -0
- package/src/concepts/SwitchStatement__.ts +9 -35
- package/src/concepts/ThemeVariable__.ts +71 -0
- package/src/concepts/Theme__.ts +15 -17
- package/src/concepts/Transactional__.ts +67 -77
- package/src/concepts/TriggerEvent__.ts +14 -76
- package/src/concepts/TriggerLauncher__.ts +34 -38
- package/src/concepts/TypeAnnotation__.ts +50 -100
- package/src/concepts/TypeParam__.ts +10 -5
- package/src/concepts/UnaryExpression__.ts +12 -62
- package/src/concepts/Unparsed__.ts +11 -5
- package/src/concepts/UseComponent__.ts +14 -19
- package/src/concepts/ValidationRule__.ts +26 -105
- package/src/concepts/Variable__.ts +71 -195
- package/src/concepts/ViewBlockWithImage__.ts +80 -0
- package/src/concepts/ViewBlock__.ts +24 -27
- package/src/concepts/ViewComponentDeclaration__.ts +1670 -0
- package/src/concepts/ViewElement__.ts +502 -486
- package/src/concepts/View__.ts +576 -389
- package/src/concepts/WhileStatement__.ts +11 -62
- package/src/concepts/basics/stdlib/nasl.auth.ts +97 -34
- package/src/concepts/basics/stdlib/nasl.process.ts +103 -7
- package/src/concepts/basics/stdlib/nasl.util.ts +31 -31
- package/src/concepts/index__.ts +24 -8
- package/src/concepts/utils/asserts.ts +1544 -446
- package/src/concepts/utils/types.ts +121 -41
- package/src/config.ts +6 -0
- package/src/decorators/index.ts +3 -8
- package/src/enums/KEYWORDS.ts +2 -0
- package/src/generator/genBundleFiles.ts +129 -29
- package/src/generator/genReleaseBody.ts +0 -2
- package/src/generator/permission.ts +2 -2
- package/src/index.ts +1 -0
- package/src/natural/genNaturalTS.ts +2 -2
- package/src/natural/index.ts +3 -0
- package/src/natural/naslStdlibMap.ts +25 -19
- package/src/natural/prompt/analyzeClaims.ts +16 -0
- package/src/natural/prompt/executeClaims.ts +69 -0
- package/src/natural/transformTSCode.ts +12 -2
- package/src/server/createUiTs.ts +121 -155
- package/src/server/entity2LogicNamespace.ts +1 -16
- package/src/server/extendBaseNode.ts +46 -15
- package/src/server/formatTsUtils.ts +13 -13
- package/src/server/getConnector.ts +43 -35
- package/src/server/getFunctions.ts +3 -3
- package/src/server/getLogics.ts +34 -17
- package/src/server/getMemberIdentifier.ts +101 -145
- package/src/server/naslServer.ts +136 -74
- package/src/server/translator.ts +23 -5
- package/src/service/storage/init.ts +15 -8
- package/src/templator/genCreateBlock.ts +16 -16
- package/src/templator/genCurdEditMultipleKeyBlock.ts +23 -23
- package/src/templator/genCurdMultipleKeyBlock.ts +34 -44
- package/src/templator/genEditTableBlock.ts +15 -15
- package/src/templator/genEnumSelectBlock.ts +8 -8
- package/src/templator/genGridViewBlock.ts +18 -20
- package/src/templator/genListViewBlock.ts +10 -10
- package/src/templator/genQueryComponent.ts +33 -38
- package/src/templator/genSelectBlock.ts +10 -10
- package/src/templator/genTableBlock.ts +20 -12
- package/src/templator/genUpdateBlock.ts +15 -15
- package/src/templator/utils.ts +21 -30
- package/src/translator/types.ts +4 -0
- package/src/utils/index.ts +40 -5
- package/src/utils/string.ts +14 -0
- package/src/utils/time-slicing/performance.ts +3 -3
- package/test/concepts/call-interface/__snapshots__/getQuickInfoOffset.spec.ts.snap +1 -1
- package/test/concepts/call-interface/__snapshots__/toEmbeddedTS.spec.ts.snap +1 -1
- package/test/concepts/call-logic/__snapshots__/getQuickInfoOffset.spec.ts.snap +7 -8
- package/test/concepts/call-logic/__snapshots__/toEmbeddedTS.spec.ts.snap +5 -5
- package/test/concepts/entity/__snapshots__/toEmbeddedTS.spec.ts.snap +2 -2
- package/test/concepts/member-expression/__snapshots__/toEmbeddedTS.spec.ts.snap +1 -1
- package/test/concepts/member-expression/__snapshots__/toJS.spec.ts.snap +1 -1
- package/test/concepts/member-expression/fixtures/elements.table-view.data.json +363 -10
- package/test/concepts/view-element/__snapshots__/toEmbeddedTS.spec.ts.snap +655 -611
- package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +127 -6
- package/test/concepts/view-element/fixtures/table-data-source-calllogic-with-server-validation.json +2074 -0
- package/test/concepts/view-element/toEmbeddedTS.spec.ts +11 -0
- package/test/concepts/view-element/toVue.spec.ts +0 -1
- package/ts-worker/src/start.js +1 -0
- package/out/concepts/ViewComponent__.d.ts +0 -568
- package/out/concepts/ViewComponent__.js +0 -809
- package/out/concepts/ViewComponent__.js.map +0 -1
- package/src/concepts/ViewComponent__.ts +0 -1444
|
@@ -1,29 +1,26 @@
|
|
|
1
|
+
import View from './View__';
|
|
2
|
+
import Frontend from './Frontend__';
|
|
3
|
+
import ProcessElement from './ProcessElement__';
|
|
4
|
+
import Process from './Process__';
|
|
1
5
|
//================================================================================
|
|
2
6
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
3
7
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
4
8
|
//================================================================================
|
|
5
9
|
import { EventPayload, Params } from '../common/EventEmitter';
|
|
6
|
-
import { concept, excludedInJSON, property, getConceptConstructor
|
|
10
|
+
import { concept, excludedInJSON, property, getConceptConstructor } from '../decorators';
|
|
7
11
|
|
|
8
12
|
import * as utils from '../utils';
|
|
9
13
|
import * as types from './utils/types';
|
|
10
14
|
import * as asserts from './utils/asserts';
|
|
11
15
|
import { v4 as uuidv4 } from 'uuid';
|
|
16
|
+
|
|
17
|
+
import Param from './Param__';
|
|
18
|
+
import ConnectorTrigger from './ConnectorTrigger__';
|
|
19
|
+
import Logic from './Logic__';
|
|
20
|
+
import Namespace from './Namespace__';
|
|
21
|
+
import AuthLogic from './AuthLogic__';
|
|
22
|
+
import AuthLogicForCallInterface from './AuthLogicForCallInterface__';
|
|
12
23
|
import Module from './Module__';
|
|
13
|
-
import type Param from './Param__';
|
|
14
|
-
import type Logic from './Logic__';
|
|
15
|
-
import type ConnectorTrigger from './ConnectorTrigger__';
|
|
16
|
-
import type Structure from './Structure__';
|
|
17
|
-
import type Namespace from './Namespace__';
|
|
18
|
-
import type AuthLogic from './AuthLogic__';
|
|
19
|
-
import type AuthLogicForCallInterface from './AuthLogicForCallInterface__';
|
|
20
|
-
import type TriggerLauncher from './TriggerLauncher__';
|
|
21
|
-
import type Connection from './Connection__';
|
|
22
|
-
import type View from './View__';
|
|
23
|
-
import type ProcessElement from './ProcessElement__';
|
|
24
|
-
import type App from './App__';
|
|
25
|
-
import type Frontend from './Frontend__';
|
|
26
|
-
import type Process from './Process__';
|
|
27
24
|
|
|
28
25
|
/**
|
|
29
26
|
* 连接器
|
|
@@ -32,7 +29,11 @@ import type Process from './Process__';
|
|
|
32
29
|
export class Connector extends Module {
|
|
33
30
|
/** 类名 */
|
|
34
31
|
static readonly ConceptName: string = 'Connector';
|
|
35
|
-
|
|
32
|
+
/**
|
|
33
|
+
* 是否为抽象类
|
|
34
|
+
* 抽象类不能产生 concept: string
|
|
35
|
+
*/
|
|
36
|
+
static isAbstract: boolean = false;
|
|
36
37
|
/** 继承链 */
|
|
37
38
|
static readonly inheritanceChain: string[] = ['Module', 'BaseNode'];
|
|
38
39
|
|
|
@@ -42,18 +43,13 @@ export class Connector extends Module {
|
|
|
42
43
|
@property('concept')
|
|
43
44
|
// @ts-ignore
|
|
44
45
|
readonly concept!: 'Connector';
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* 连接器名称
|
|
48
|
-
*/
|
|
49
|
-
@property()
|
|
50
|
-
name!: string;
|
|
51
|
-
|
|
52
46
|
/**
|
|
53
47
|
* connectorKind
|
|
54
48
|
*/
|
|
55
|
-
@property(
|
|
56
|
-
|
|
49
|
+
@property({
|
|
50
|
+
objectRef: '',
|
|
51
|
+
})
|
|
52
|
+
connectorKind: string;
|
|
57
53
|
|
|
58
54
|
/**
|
|
59
55
|
* 输入参数列表
|
|
@@ -65,16 +61,6 @@ export class Connector extends Module {
|
|
|
65
61
|
})
|
|
66
62
|
properties: Array<Param> = [];
|
|
67
63
|
|
|
68
|
-
/**
|
|
69
|
-
* 逻辑列表
|
|
70
|
-
*/
|
|
71
|
-
@property({
|
|
72
|
-
objectRef: 'Logic',
|
|
73
|
-
isArray: true,
|
|
74
|
-
defaultValue: [],
|
|
75
|
-
})
|
|
76
|
-
logics: Array<Logic> = [];
|
|
77
|
-
|
|
78
64
|
/**
|
|
79
65
|
* 连接器触发器列表
|
|
80
66
|
*/
|
|
@@ -85,29 +71,13 @@ export class Connector extends Module {
|
|
|
85
71
|
})
|
|
86
72
|
triggers: Array<ConnectorTrigger> = [];
|
|
87
73
|
|
|
88
|
-
/**
|
|
89
|
-
* 数据结构列表
|
|
90
|
-
*/
|
|
91
|
-
@property({
|
|
92
|
-
objectRef: 'Structure',
|
|
93
|
-
isArray: true,
|
|
94
|
-
defaultValue: [],
|
|
95
|
-
})
|
|
96
|
-
structures: Array<Structure> = [];
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* compilerInfoMap
|
|
100
|
-
*/
|
|
101
|
-
@property()
|
|
102
|
-
compilerInfoMap!: Map<string, string>;
|
|
103
|
-
|
|
104
74
|
/**
|
|
105
75
|
* createLogic
|
|
106
76
|
*/
|
|
107
77
|
@property({
|
|
108
78
|
objectRef: 'Logic',
|
|
109
79
|
})
|
|
110
|
-
createLogic
|
|
80
|
+
createLogic: Logic;
|
|
111
81
|
|
|
112
82
|
/**
|
|
113
83
|
* testConnectorLogic
|
|
@@ -115,13 +85,15 @@ export class Connector extends Module {
|
|
|
115
85
|
@property({
|
|
116
86
|
objectRef: 'Logic',
|
|
117
87
|
})
|
|
118
|
-
testConnectorLogic
|
|
88
|
+
testConnectorLogic: Logic;
|
|
119
89
|
|
|
120
90
|
/**
|
|
121
91
|
* 预览图
|
|
122
92
|
*/
|
|
123
|
-
@property(
|
|
124
|
-
|
|
93
|
+
@property({
|
|
94
|
+
objectRef: '',
|
|
95
|
+
})
|
|
96
|
+
previewImg: string;
|
|
125
97
|
|
|
126
98
|
/**
|
|
127
99
|
* 命名空间列表
|
|
@@ -154,68 +126,13 @@ export class Connector extends Module {
|
|
|
154
126
|
authLogicsForCallInterface: Array<AuthLogicForCallInterface> = [];
|
|
155
127
|
|
|
156
128
|
/**
|
|
157
|
-
*
|
|
158
|
-
*/
|
|
159
|
-
@property({
|
|
160
|
-
objectRef: 'TriggerLauncher',
|
|
161
|
-
isArray: true,
|
|
162
|
-
defaultValue: [],
|
|
163
|
-
})
|
|
164
|
-
triggerLaunchers: Array<TriggerLauncher> = [];
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* 连接列表
|
|
129
|
+
* isLocal
|
|
168
130
|
*/
|
|
169
131
|
@property({
|
|
170
|
-
objectRef: '
|
|
171
|
-
isArray: true,
|
|
172
|
-
defaultValue: [],
|
|
132
|
+
objectRef: '',
|
|
173
133
|
})
|
|
174
|
-
connections: Array<Connection> = [];
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* isLocal
|
|
178
|
-
*/
|
|
179
|
-
@property()
|
|
180
134
|
isLocal: boolean = true;
|
|
181
135
|
|
|
182
|
-
/**
|
|
183
|
-
* 祖先 Module
|
|
184
|
-
*/
|
|
185
|
-
get module() {
|
|
186
|
-
return this.getAncestor('Module') as Module;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* 祖先 App
|
|
190
|
-
*/
|
|
191
|
-
get app() {
|
|
192
|
-
return this.getAncestor('App') as App;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* 祖先 View
|
|
196
|
-
*/
|
|
197
|
-
get view() {
|
|
198
|
-
return this.getAncestor('View') as View;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* 祖先 Frontend
|
|
202
|
-
*/
|
|
203
|
-
get frontend() {
|
|
204
|
-
return this.getAncestor('Frontend') as Frontend;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* 祖先 ProcessElement
|
|
208
|
-
*/
|
|
209
|
-
get processElement() {
|
|
210
|
-
return this.getAncestor('ProcessElement') as ProcessElement;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* 祖先 Process
|
|
214
|
-
*/
|
|
215
|
-
get process() {
|
|
216
|
-
return this.getAncestor('Process') as Process;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
136
|
/**
|
|
220
137
|
* @param source 需要合并的部分参数
|
|
221
138
|
*/
|
|
@@ -229,19 +146,6 @@ export class Connector extends Module {
|
|
|
229
146
|
return super.from(source, parentNode, parentKey) as Connector;
|
|
230
147
|
}
|
|
231
148
|
|
|
232
|
-
/**
|
|
233
|
-
* 设置连接器名称
|
|
234
|
-
*/
|
|
235
|
-
setName(name: string) {
|
|
236
|
-
const object = {
|
|
237
|
-
name,
|
|
238
|
-
};
|
|
239
|
-
this.update({
|
|
240
|
-
...object,
|
|
241
|
-
field: 'name',
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
|
|
245
149
|
/**
|
|
246
150
|
* 设置connectorKind
|
|
247
151
|
*/
|
|
@@ -266,18 +170,6 @@ export class Connector extends Module {
|
|
|
266
170
|
});
|
|
267
171
|
}
|
|
268
172
|
|
|
269
|
-
/**
|
|
270
|
-
* 设置逻辑列表
|
|
271
|
-
*/
|
|
272
|
-
setLogics(logics: Array<Logic>) {
|
|
273
|
-
const object = {
|
|
274
|
-
logics,
|
|
275
|
-
};
|
|
276
|
-
this.update({
|
|
277
|
-
...object,
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
|
|
281
173
|
/**
|
|
282
174
|
* 设置连接器触发器列表
|
|
283
175
|
*/
|
|
@@ -290,34 +182,13 @@ export class Connector extends Module {
|
|
|
290
182
|
});
|
|
291
183
|
}
|
|
292
184
|
|
|
293
|
-
/**
|
|
294
|
-
* 设置数据结构列表
|
|
295
|
-
*/
|
|
296
|
-
setStructures(structures: Array<Structure>) {
|
|
297
|
-
const object = {
|
|
298
|
-
structures,
|
|
299
|
-
};
|
|
300
|
-
this.update({
|
|
301
|
-
...object,
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* 设置compilerInfoMap
|
|
307
|
-
*/
|
|
308
|
-
setCompilerInfoMap(compilerInfoMap: Map<string, string>) {
|
|
309
|
-
const object = {
|
|
310
|
-
compilerInfoMap,
|
|
311
|
-
};
|
|
312
|
-
this.update({
|
|
313
|
-
...object,
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
|
|
317
185
|
/**
|
|
318
186
|
* 设置createLogic
|
|
319
187
|
*/
|
|
320
|
-
setCreateLogic(createLogic:
|
|
188
|
+
setCreateLogic(createLogic: Logic) {
|
|
189
|
+
createLogic._delete();
|
|
190
|
+
const relationOptions = { parentNode: this, parentKey: 'createLogic' };
|
|
191
|
+
Object.assign(createLogic, relationOptions);
|
|
321
192
|
const object = {
|
|
322
193
|
createLogic,
|
|
323
194
|
};
|
|
@@ -329,7 +200,10 @@ export class Connector extends Module {
|
|
|
329
200
|
/**
|
|
330
201
|
* 设置testConnectorLogic
|
|
331
202
|
*/
|
|
332
|
-
setTestConnectorLogic(testConnectorLogic:
|
|
203
|
+
setTestConnectorLogic(testConnectorLogic: Logic) {
|
|
204
|
+
testConnectorLogic._delete();
|
|
205
|
+
const relationOptions = { parentNode: this, parentKey: 'testConnectorLogic' };
|
|
206
|
+
Object.assign(testConnectorLogic, relationOptions);
|
|
333
207
|
const object = {
|
|
334
208
|
testConnectorLogic,
|
|
335
209
|
};
|
|
@@ -376,7 +250,7 @@ export class Connector extends Module {
|
|
|
376
250
|
|
|
377
251
|
getParamExistingNames(excludedList: Array<Param> = []) {
|
|
378
252
|
const excludedSet = new Set(excludedList);
|
|
379
|
-
return ((this.properties as Param[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
253
|
+
return ((this.properties as Param[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
380
254
|
}
|
|
381
255
|
getParamUniqueName(name = 'param1') {
|
|
382
256
|
return utils.unique(name, this.getParamExistingNames(), undefined, false);
|
|
@@ -528,165 +402,11 @@ export class Connector extends Module {
|
|
|
528
402
|
return node;
|
|
529
403
|
}
|
|
530
404
|
|
|
531
|
-
getLogicExistingNames(excludedList: Array<Logic> = []) {
|
|
532
|
-
const excludedSet = new Set(excludedList);
|
|
533
|
-
return ((this.logics as Logic[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
534
|
-
}
|
|
535
|
-
getLogicUniqueName(name = 'logic1') {
|
|
536
|
-
return utils.unique(name, this.getLogicExistingNames(), undefined, false);
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* 插入逻辑
|
|
541
|
-
* @internal
|
|
542
|
-
* @param name 逻辑名称,如果不填会自动生成一个唯一名称
|
|
543
|
-
*/
|
|
544
|
-
_insertLogicInLogicsAt(name: string, index: number): Logic;
|
|
545
|
-
|
|
546
|
-
/**
|
|
547
|
-
* 插入逻辑
|
|
548
|
-
* @internal
|
|
549
|
-
* @param logicOptions 逻辑参数
|
|
550
|
-
*/
|
|
551
|
-
_insertLogicInLogicsAt(logicOptions: Partial<Logic>, index: number): Logic;
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* 插入逻辑
|
|
555
|
-
* @internal
|
|
556
|
-
* @param logic 已有的逻辑实例
|
|
557
|
-
*/
|
|
558
|
-
_insertLogicInLogicsAt(logic: Logic, index: number): Logic;
|
|
559
|
-
|
|
560
|
-
_insertLogicInLogicsAt(options: string | Partial<Logic> | Logic, index: number) {
|
|
561
|
-
const logicOptions: any = {};
|
|
562
|
-
const relationOptions = { parentNode: this, parentKey: 'logics' };
|
|
563
|
-
const Logic = getConceptConstructor('Logic');
|
|
564
|
-
let logic: Logic;
|
|
565
|
-
if (!options) {
|
|
566
|
-
logic = Logic.from(
|
|
567
|
-
{
|
|
568
|
-
...logicOptions,
|
|
569
|
-
name: this.getLogicUniqueName(),
|
|
570
|
-
},
|
|
571
|
-
this,
|
|
572
|
-
'logics',
|
|
573
|
-
);
|
|
574
|
-
} else if (typeof options === 'string') {
|
|
575
|
-
logic = Logic.from(
|
|
576
|
-
{
|
|
577
|
-
...logicOptions,
|
|
578
|
-
name: options,
|
|
579
|
-
},
|
|
580
|
-
this,
|
|
581
|
-
'logics',
|
|
582
|
-
);
|
|
583
|
-
} else if (asserts.isLogic(options)) {
|
|
584
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
585
|
-
logic = options;
|
|
586
|
-
Object.assign(logic, relationOptions);
|
|
587
|
-
} else {
|
|
588
|
-
logic = Logic.from(
|
|
589
|
-
{
|
|
590
|
-
...logicOptions,
|
|
591
|
-
...options,
|
|
592
|
-
},
|
|
593
|
-
this,
|
|
594
|
-
'logics',
|
|
595
|
-
);
|
|
596
|
-
}
|
|
597
|
-
this.logics.splice(index, 0, logic);
|
|
598
|
-
return logic;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* 插入逻辑
|
|
603
|
-
* @param name 逻辑名称,如果不填会自动生成一个唯一名称
|
|
604
|
-
*/
|
|
605
|
-
insertLogicInLogicsAt(name: string, index: number): Logic;
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* 插入逻辑
|
|
609
|
-
* @param logicOptions 逻辑参数
|
|
610
|
-
*/
|
|
611
|
-
insertLogicInLogicsAt(logicOptions: Partial<Logic>, index: number): Logic;
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* 插入逻辑
|
|
615
|
-
* @param logic 已有的逻辑实例
|
|
616
|
-
*/
|
|
617
|
-
insertLogicInLogicsAt(logic: Logic, index: number): Logic;
|
|
618
|
-
|
|
619
|
-
insertLogicInLogicsAt(options: string | Partial<Logic> | Logic, index: number) {
|
|
620
|
-
const node = this._insertLogicInLogicsAt(options as any, index);
|
|
621
|
-
node.create({
|
|
622
|
-
index,
|
|
623
|
-
parentNode: this,
|
|
624
|
-
parentKey: 'logics',
|
|
625
|
-
});
|
|
626
|
-
return node;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
/**
|
|
630
|
-
* 添加逻辑
|
|
631
|
-
* @internal
|
|
632
|
-
* @param name 逻辑名称,如果不填会自动生成一个唯一名称
|
|
633
|
-
*/
|
|
634
|
-
_addLogicInLogics(name?: string): Logic;
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* 添加逻辑
|
|
638
|
-
* @internal
|
|
639
|
-
* @param logicOptions 逻辑参数
|
|
640
|
-
*/
|
|
641
|
-
_addLogicInLogics(logicOptions: Partial<Logic>): Logic;
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* 添加逻辑
|
|
645
|
-
* @internal
|
|
646
|
-
* @param logic 已有的逻辑实例
|
|
647
|
-
*/
|
|
648
|
-
_addLogicInLogics(logic: Logic): Logic;
|
|
649
|
-
|
|
650
|
-
_addLogicInLogics(options?: string | Partial<Logic> | Logic) {
|
|
651
|
-
const index = this.logics.length;
|
|
652
|
-
return this._insertLogicInLogicsAt(options as any, index);
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
/**
|
|
656
|
-
* 添加逻辑
|
|
657
|
-
* @internal
|
|
658
|
-
* @param name 逻辑名称,如果不填会自动生成一个唯一名称
|
|
659
|
-
*/
|
|
660
|
-
addLogicInLogics(name?: string): Logic;
|
|
661
|
-
|
|
662
|
-
/**
|
|
663
|
-
* 添加逻辑
|
|
664
|
-
* @param logicOptions 逻辑参数
|
|
665
|
-
*/
|
|
666
|
-
addLogicInLogics(logicOptions: Partial<Logic>): Logic;
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* 添加逻辑
|
|
670
|
-
* @param logic 已有的逻辑实例
|
|
671
|
-
*/
|
|
672
|
-
addLogicInLogics(logic: Logic): Logic;
|
|
673
|
-
|
|
674
|
-
addLogicInLogics(options?: string | Partial<Logic> | Logic) {
|
|
675
|
-
const node = this._addLogicInLogics(options as any);
|
|
676
|
-
const index = this.logics.indexOf(node);
|
|
677
|
-
node.create({
|
|
678
|
-
index,
|
|
679
|
-
parentNode: this,
|
|
680
|
-
parentKey: 'logics',
|
|
681
|
-
});
|
|
682
|
-
return node;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
405
|
getConnectorTriggerExistingNames(excludedList: Array<ConnectorTrigger> = []) {
|
|
686
406
|
const excludedSet = new Set(excludedList);
|
|
687
407
|
return ((this.triggers as ConnectorTrigger[]) || [])
|
|
688
408
|
.filter((item) => !excludedSet.has(item))
|
|
689
|
-
.map((item) => item
|
|
409
|
+
.map((item) => item.name);
|
|
690
410
|
}
|
|
691
411
|
getConnectorTriggerUniqueName(name = 'connectorTrigger1') {
|
|
692
412
|
return utils.unique(name, this.getConnectorTriggerExistingNames(), undefined, false);
|
|
@@ -838,286 +558,132 @@ export class Connector extends Module {
|
|
|
838
558
|
return node;
|
|
839
559
|
}
|
|
840
560
|
|
|
841
|
-
|
|
561
|
+
getNamespaceExistingNames(excludedList: Array<Namespace> = []) {
|
|
842
562
|
const excludedSet = new Set(excludedList);
|
|
843
|
-
return ((this.
|
|
563
|
+
return ((this.namespaces as Namespace[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
844
564
|
}
|
|
845
|
-
|
|
846
|
-
return utils.unique(name, this.
|
|
565
|
+
getNamespaceUniqueName(name = 'namespace1') {
|
|
566
|
+
return utils.unique(name, this.getNamespaceExistingNames(), undefined, false);
|
|
847
567
|
}
|
|
848
568
|
|
|
849
569
|
/**
|
|
850
|
-
*
|
|
570
|
+
* 插入命名空间
|
|
851
571
|
* @internal
|
|
852
|
-
* @param name
|
|
572
|
+
* @param name 命名空间名称,如果不填会自动生成一个唯一名称
|
|
853
573
|
*/
|
|
854
|
-
|
|
574
|
+
_insertNamespaceAt(name: string, index: number): Namespace;
|
|
855
575
|
|
|
856
576
|
/**
|
|
857
|
-
*
|
|
577
|
+
* 插入命名空间
|
|
858
578
|
* @internal
|
|
859
|
-
* @param
|
|
579
|
+
* @param namespaceOptions 命名空间参数
|
|
860
580
|
*/
|
|
861
|
-
|
|
581
|
+
_insertNamespaceAt(namespaceOptions: Partial<Namespace>, index: number): Namespace;
|
|
862
582
|
|
|
863
583
|
/**
|
|
864
|
-
*
|
|
584
|
+
* 插入命名空间
|
|
865
585
|
* @internal
|
|
866
|
-
* @param
|
|
586
|
+
* @param namespace 已有的命名空间实例
|
|
867
587
|
*/
|
|
868
|
-
|
|
588
|
+
_insertNamespaceAt(namespace: Namespace, index: number): Namespace;
|
|
869
589
|
|
|
870
|
-
|
|
871
|
-
const
|
|
872
|
-
const relationOptions = { parentNode: this, parentKey: '
|
|
873
|
-
const
|
|
874
|
-
let
|
|
590
|
+
_insertNamespaceAt(options: string | Partial<Namespace> | Namespace, index: number) {
|
|
591
|
+
const namespaceOptions: any = {};
|
|
592
|
+
const relationOptions = { parentNode: this, parentKey: 'namespaces' };
|
|
593
|
+
const Namespace = getConceptConstructor('Namespace');
|
|
594
|
+
let namespace: Namespace;
|
|
875
595
|
if (!options) {
|
|
876
|
-
|
|
596
|
+
namespace = Namespace.from(
|
|
877
597
|
{
|
|
878
|
-
...
|
|
879
|
-
name: this.
|
|
598
|
+
...namespaceOptions,
|
|
599
|
+
name: this.getNamespaceUniqueName(),
|
|
880
600
|
},
|
|
881
601
|
this,
|
|
882
|
-
'
|
|
602
|
+
'namespaces',
|
|
883
603
|
);
|
|
884
604
|
} else if (typeof options === 'string') {
|
|
885
|
-
|
|
605
|
+
namespace = Namespace.from(
|
|
886
606
|
{
|
|
887
|
-
...
|
|
607
|
+
...namespaceOptions,
|
|
888
608
|
name: options,
|
|
889
609
|
},
|
|
890
610
|
this,
|
|
891
|
-
'
|
|
611
|
+
'namespaces',
|
|
892
612
|
);
|
|
893
|
-
} else if (asserts.
|
|
613
|
+
} else if (asserts.isNamespace(options)) {
|
|
894
614
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
895
|
-
|
|
896
|
-
Object.assign(
|
|
615
|
+
namespace = options;
|
|
616
|
+
Object.assign(namespace, relationOptions);
|
|
897
617
|
} else {
|
|
898
|
-
|
|
618
|
+
namespace = Namespace.from(
|
|
899
619
|
{
|
|
900
|
-
...
|
|
620
|
+
...namespaceOptions,
|
|
901
621
|
...options,
|
|
902
622
|
},
|
|
903
623
|
this,
|
|
904
|
-
'
|
|
624
|
+
'namespaces',
|
|
905
625
|
);
|
|
906
626
|
}
|
|
907
|
-
this.
|
|
908
|
-
return
|
|
627
|
+
this.namespaces.splice(index, 0, namespace);
|
|
628
|
+
return namespace;
|
|
909
629
|
}
|
|
910
630
|
|
|
911
631
|
/**
|
|
912
|
-
*
|
|
913
|
-
* @param name
|
|
632
|
+
* 插入命名空间
|
|
633
|
+
* @param name 命名空间名称,如果不填会自动生成一个唯一名称
|
|
914
634
|
*/
|
|
915
|
-
|
|
635
|
+
insertNamespaceAt(name: string, index: number): Namespace;
|
|
916
636
|
|
|
917
637
|
/**
|
|
918
|
-
*
|
|
919
|
-
* @param
|
|
638
|
+
* 插入命名空间
|
|
639
|
+
* @param namespaceOptions 命名空间参数
|
|
920
640
|
*/
|
|
921
|
-
|
|
641
|
+
insertNamespaceAt(namespaceOptions: Partial<Namespace>, index: number): Namespace;
|
|
922
642
|
|
|
923
643
|
/**
|
|
924
|
-
*
|
|
925
|
-
* @param
|
|
644
|
+
* 插入命名空间
|
|
645
|
+
* @param namespace 已有的命名空间实例
|
|
926
646
|
*/
|
|
927
|
-
|
|
647
|
+
insertNamespaceAt(namespace: Namespace, index: number): Namespace;
|
|
928
648
|
|
|
929
|
-
|
|
930
|
-
const node = this.
|
|
649
|
+
insertNamespaceAt(options: string | Partial<Namespace> | Namespace, index: number) {
|
|
650
|
+
const node = this._insertNamespaceAt(options as any, index);
|
|
931
651
|
node.create({
|
|
932
652
|
index,
|
|
933
653
|
parentNode: this,
|
|
934
|
-
parentKey: '
|
|
654
|
+
parentKey: 'namespaces',
|
|
935
655
|
});
|
|
936
656
|
return node;
|
|
937
657
|
}
|
|
938
658
|
|
|
939
659
|
/**
|
|
940
|
-
*
|
|
660
|
+
* 添加命名空间
|
|
941
661
|
* @internal
|
|
942
|
-
* @param name
|
|
662
|
+
* @param name 命名空间名称,如果不填会自动生成一个唯一名称
|
|
943
663
|
*/
|
|
944
|
-
|
|
664
|
+
_addNamespace(name?: string): Namespace;
|
|
945
665
|
|
|
946
666
|
/**
|
|
947
|
-
*
|
|
667
|
+
* 添加命名空间
|
|
948
668
|
* @internal
|
|
949
|
-
* @param
|
|
669
|
+
* @param namespaceOptions 命名空间参数
|
|
950
670
|
*/
|
|
951
|
-
|
|
671
|
+
_addNamespace(namespaceOptions: Partial<Namespace>): Namespace;
|
|
952
672
|
|
|
953
673
|
/**
|
|
954
|
-
*
|
|
674
|
+
* 添加命名空间
|
|
955
675
|
* @internal
|
|
956
|
-
* @param
|
|
676
|
+
* @param namespace 已有的命名空间实例
|
|
957
677
|
*/
|
|
958
|
-
|
|
678
|
+
_addNamespace(namespace: Namespace): Namespace;
|
|
959
679
|
|
|
960
|
-
|
|
961
|
-
const index = this.
|
|
962
|
-
return this.
|
|
680
|
+
_addNamespace(options?: string | Partial<Namespace> | Namespace) {
|
|
681
|
+
const index = this.namespaces.length;
|
|
682
|
+
return this._insertNamespaceAt(options as any, index);
|
|
963
683
|
}
|
|
964
684
|
|
|
965
685
|
/**
|
|
966
|
-
*
|
|
967
|
-
* @internal
|
|
968
|
-
* @param name 数据结构名称,如果不填会自动生成一个唯一名称
|
|
969
|
-
*/
|
|
970
|
-
addStructure(name?: string): Structure;
|
|
971
|
-
|
|
972
|
-
/**
|
|
973
|
-
* 添加数据结构
|
|
974
|
-
* @param structureOptions 数据结构参数
|
|
975
|
-
*/
|
|
976
|
-
addStructure(structureOptions: Partial<Structure>): Structure;
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* 添加数据结构
|
|
980
|
-
* @param structure 已有的数据结构实例
|
|
981
|
-
*/
|
|
982
|
-
addStructure(structure: Structure): Structure;
|
|
983
|
-
|
|
984
|
-
addStructure(options?: string | Partial<Structure> | Structure) {
|
|
985
|
-
const node = this._addStructure(options as any);
|
|
986
|
-
const index = this.structures.indexOf(node);
|
|
987
|
-
node.create({
|
|
988
|
-
index,
|
|
989
|
-
parentNode: this,
|
|
990
|
-
parentKey: 'structures',
|
|
991
|
-
});
|
|
992
|
-
return node;
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
getNamespaceExistingNames(excludedList: Array<Namespace> = []) {
|
|
996
|
-
const excludedSet = new Set(excludedList);
|
|
997
|
-
return ((this.namespaces as Namespace[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
998
|
-
}
|
|
999
|
-
getNamespaceUniqueName(name = 'namespace1') {
|
|
1000
|
-
return utils.unique(name, this.getNamespaceExistingNames(), undefined, false);
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
/**
|
|
1004
|
-
* 插入命名空间
|
|
1005
|
-
* @internal
|
|
1006
|
-
* @param name 命名空间名称,如果不填会自动生成一个唯一名称
|
|
1007
|
-
*/
|
|
1008
|
-
_insertNamespaceAt(name: string, index: number): Namespace;
|
|
1009
|
-
|
|
1010
|
-
/**
|
|
1011
|
-
* 插入命名空间
|
|
1012
|
-
* @internal
|
|
1013
|
-
* @param namespaceOptions 命名空间参数
|
|
1014
|
-
*/
|
|
1015
|
-
_insertNamespaceAt(namespaceOptions: Partial<Namespace>, index: number): Namespace;
|
|
1016
|
-
|
|
1017
|
-
/**
|
|
1018
|
-
* 插入命名空间
|
|
1019
|
-
* @internal
|
|
1020
|
-
* @param namespace 已有的命名空间实例
|
|
1021
|
-
*/
|
|
1022
|
-
_insertNamespaceAt(namespace: Namespace, index: number): Namespace;
|
|
1023
|
-
|
|
1024
|
-
_insertNamespaceAt(options: string | Partial<Namespace> | Namespace, index: number) {
|
|
1025
|
-
const namespaceOptions: any = {};
|
|
1026
|
-
const relationOptions = { parentNode: this, parentKey: 'namespaces' };
|
|
1027
|
-
const Namespace = getConceptConstructor('Namespace');
|
|
1028
|
-
let namespace: Namespace;
|
|
1029
|
-
if (!options) {
|
|
1030
|
-
namespace = Namespace.from(
|
|
1031
|
-
{
|
|
1032
|
-
...namespaceOptions,
|
|
1033
|
-
name: this.getNamespaceUniqueName(),
|
|
1034
|
-
},
|
|
1035
|
-
this,
|
|
1036
|
-
'namespaces',
|
|
1037
|
-
);
|
|
1038
|
-
} else if (typeof options === 'string') {
|
|
1039
|
-
namespace = Namespace.from(
|
|
1040
|
-
{
|
|
1041
|
-
...namespaceOptions,
|
|
1042
|
-
name: options,
|
|
1043
|
-
},
|
|
1044
|
-
this,
|
|
1045
|
-
'namespaces',
|
|
1046
|
-
);
|
|
1047
|
-
} else if (asserts.isNamespace(options)) {
|
|
1048
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1049
|
-
namespace = options;
|
|
1050
|
-
Object.assign(namespace, relationOptions);
|
|
1051
|
-
} else {
|
|
1052
|
-
namespace = Namespace.from(
|
|
1053
|
-
{
|
|
1054
|
-
...namespaceOptions,
|
|
1055
|
-
...options,
|
|
1056
|
-
},
|
|
1057
|
-
this,
|
|
1058
|
-
'namespaces',
|
|
1059
|
-
);
|
|
1060
|
-
}
|
|
1061
|
-
this.namespaces.splice(index, 0, namespace);
|
|
1062
|
-
return namespace;
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
/**
|
|
1066
|
-
* 插入命名空间
|
|
1067
|
-
* @param name 命名空间名称,如果不填会自动生成一个唯一名称
|
|
1068
|
-
*/
|
|
1069
|
-
insertNamespaceAt(name: string, index: number): Namespace;
|
|
1070
|
-
|
|
1071
|
-
/**
|
|
1072
|
-
* 插入命名空间
|
|
1073
|
-
* @param namespaceOptions 命名空间参数
|
|
1074
|
-
*/
|
|
1075
|
-
insertNamespaceAt(namespaceOptions: Partial<Namespace>, index: number): Namespace;
|
|
1076
|
-
|
|
1077
|
-
/**
|
|
1078
|
-
* 插入命名空间
|
|
1079
|
-
* @param namespace 已有的命名空间实例
|
|
1080
|
-
*/
|
|
1081
|
-
insertNamespaceAt(namespace: Namespace, index: number): Namespace;
|
|
1082
|
-
|
|
1083
|
-
insertNamespaceAt(options: string | Partial<Namespace> | Namespace, index: number) {
|
|
1084
|
-
const node = this._insertNamespaceAt(options as any, index);
|
|
1085
|
-
node.create({
|
|
1086
|
-
index,
|
|
1087
|
-
parentNode: this,
|
|
1088
|
-
parentKey: 'namespaces',
|
|
1089
|
-
});
|
|
1090
|
-
return node;
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
* 添加命名空间
|
|
1095
|
-
* @internal
|
|
1096
|
-
* @param name 命名空间名称,如果不填会自动生成一个唯一名称
|
|
1097
|
-
*/
|
|
1098
|
-
_addNamespace(name?: string): Namespace;
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* 添加命名空间
|
|
1102
|
-
* @internal
|
|
1103
|
-
* @param namespaceOptions 命名空间参数
|
|
1104
|
-
*/
|
|
1105
|
-
_addNamespace(namespaceOptions: Partial<Namespace>): Namespace;
|
|
1106
|
-
|
|
1107
|
-
/**
|
|
1108
|
-
* 添加命名空间
|
|
1109
|
-
* @internal
|
|
1110
|
-
* @param namespace 已有的命名空间实例
|
|
1111
|
-
*/
|
|
1112
|
-
_addNamespace(namespace: Namespace): Namespace;
|
|
1113
|
-
|
|
1114
|
-
_addNamespace(options?: string | Partial<Namespace> | Namespace) {
|
|
1115
|
-
const index = this.namespaces.length;
|
|
1116
|
-
return this._insertNamespaceAt(options as any, index);
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
/**
|
|
1120
|
-
* 添加命名空间
|
|
686
|
+
* 添加命名空间
|
|
1121
687
|
* @internal
|
|
1122
688
|
* @param name 命名空间名称,如果不填会自动生成一个唯一名称
|
|
1123
689
|
*/
|
|
@@ -1146,852 +712,166 @@ export class Connector extends Module {
|
|
|
1146
712
|
return node;
|
|
1147
713
|
}
|
|
1148
714
|
|
|
1149
|
-
|
|
1150
|
-
const excludedSet = new Set(excludedList);
|
|
1151
|
-
return ((this.triggerLaunchers as TriggerLauncher[]) || [])
|
|
1152
|
-
.filter((item) => !excludedSet.has(item))
|
|
1153
|
-
.map((item) => item?.name);
|
|
1154
|
-
}
|
|
1155
|
-
getTriggerLauncherUniqueName(name = 'triggerLauncher1') {
|
|
1156
|
-
return utils.unique(name, this.getTriggerLauncherExistingNames(), undefined, false);
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
/**
|
|
1160
|
-
* 插入触发器启动器
|
|
1161
|
-
* @internal
|
|
1162
|
-
* @param name 触发器启动器名称,如果不填会自动生成一个唯一名称
|
|
1163
|
-
*/
|
|
1164
|
-
_insertTriggerLauncherAt(name: string, index: number): TriggerLauncher;
|
|
1165
|
-
|
|
1166
|
-
/**
|
|
1167
|
-
* 插入触发器启动器
|
|
1168
|
-
* @internal
|
|
1169
|
-
* @param triggerLauncherOptions 触发器启动器参数
|
|
1170
|
-
*/
|
|
1171
|
-
_insertTriggerLauncherAt(triggerLauncherOptions: Partial<TriggerLauncher>, index: number): TriggerLauncher;
|
|
1172
|
-
|
|
1173
|
-
/**
|
|
1174
|
-
* 插入触发器启动器
|
|
1175
|
-
* @internal
|
|
1176
|
-
* @param triggerLauncher 已有的触发器启动器实例
|
|
1177
|
-
*/
|
|
1178
|
-
_insertTriggerLauncherAt(triggerLauncher: TriggerLauncher, index: number): TriggerLauncher;
|
|
1179
|
-
|
|
1180
|
-
_insertTriggerLauncherAt(options: string | Partial<TriggerLauncher> | TriggerLauncher, index: number) {
|
|
1181
|
-
const triggerLauncherOptions: any = {};
|
|
1182
|
-
const relationOptions = { parentNode: this, parentKey: 'triggerLaunchers' };
|
|
1183
|
-
const TriggerLauncher = getConceptConstructor('TriggerLauncher');
|
|
1184
|
-
let triggerLauncher: TriggerLauncher;
|
|
1185
|
-
if (!options) {
|
|
1186
|
-
triggerLauncher = TriggerLauncher.from(
|
|
1187
|
-
{
|
|
1188
|
-
...triggerLauncherOptions,
|
|
1189
|
-
name: this.getTriggerLauncherUniqueName(),
|
|
1190
|
-
},
|
|
1191
|
-
this,
|
|
1192
|
-
'triggerLaunchers',
|
|
1193
|
-
);
|
|
1194
|
-
} else if (typeof options === 'string') {
|
|
1195
|
-
triggerLauncher = TriggerLauncher.from(
|
|
1196
|
-
{
|
|
1197
|
-
...triggerLauncherOptions,
|
|
1198
|
-
name: options,
|
|
1199
|
-
},
|
|
1200
|
-
this,
|
|
1201
|
-
'triggerLaunchers',
|
|
1202
|
-
);
|
|
1203
|
-
} else if (asserts.isTriggerLauncher(options)) {
|
|
1204
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1205
|
-
triggerLauncher = options;
|
|
1206
|
-
Object.assign(triggerLauncher, relationOptions);
|
|
1207
|
-
} else {
|
|
1208
|
-
triggerLauncher = TriggerLauncher.from(
|
|
1209
|
-
{
|
|
1210
|
-
...triggerLauncherOptions,
|
|
1211
|
-
...options,
|
|
1212
|
-
},
|
|
1213
|
-
this,
|
|
1214
|
-
'triggerLaunchers',
|
|
1215
|
-
);
|
|
1216
|
-
}
|
|
1217
|
-
this.triggerLaunchers.splice(index, 0, triggerLauncher);
|
|
1218
|
-
return triggerLauncher;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
/**
|
|
1222
|
-
* 插入触发器启动器
|
|
1223
|
-
* @param name 触发器启动器名称,如果不填会自动生成一个唯一名称
|
|
1224
|
-
*/
|
|
1225
|
-
insertTriggerLauncherAt(name: string, index: number): TriggerLauncher;
|
|
1226
|
-
|
|
1227
|
-
/**
|
|
1228
|
-
* 插入触发器启动器
|
|
1229
|
-
* @param triggerLauncherOptions 触发器启动器参数
|
|
1230
|
-
*/
|
|
1231
|
-
insertTriggerLauncherAt(triggerLauncherOptions: Partial<TriggerLauncher>, index: number): TriggerLauncher;
|
|
1232
|
-
|
|
1233
|
-
/**
|
|
1234
|
-
* 插入触发器启动器
|
|
1235
|
-
* @param triggerLauncher 已有的触发器启动器实例
|
|
1236
|
-
*/
|
|
1237
|
-
insertTriggerLauncherAt(triggerLauncher: TriggerLauncher, index: number): TriggerLauncher;
|
|
1238
|
-
|
|
1239
|
-
insertTriggerLauncherAt(options: string | Partial<TriggerLauncher> | TriggerLauncher, index: number) {
|
|
1240
|
-
const node = this._insertTriggerLauncherAt(options as any, index);
|
|
1241
|
-
node.create({
|
|
1242
|
-
index,
|
|
1243
|
-
parentNode: this,
|
|
1244
|
-
parentKey: 'triggerLaunchers',
|
|
1245
|
-
});
|
|
1246
|
-
return node;
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
/**
|
|
1250
|
-
* 添加触发器启动器
|
|
1251
|
-
* @internal
|
|
1252
|
-
* @param name 触发器启动器名称,如果不填会自动生成一个唯一名称
|
|
1253
|
-
*/
|
|
1254
|
-
_addTriggerLauncher(name?: string): TriggerLauncher;
|
|
1255
|
-
|
|
1256
|
-
/**
|
|
1257
|
-
* 添加触发器启动器
|
|
1258
|
-
* @internal
|
|
1259
|
-
* @param triggerLauncherOptions 触发器启动器参数
|
|
1260
|
-
*/
|
|
1261
|
-
_addTriggerLauncher(triggerLauncherOptions: Partial<TriggerLauncher>): TriggerLauncher;
|
|
1262
|
-
|
|
1263
|
-
/**
|
|
1264
|
-
* 添加触发器启动器
|
|
1265
|
-
* @internal
|
|
1266
|
-
* @param triggerLauncher 已有的触发器启动器实例
|
|
1267
|
-
*/
|
|
1268
|
-
_addTriggerLauncher(triggerLauncher: TriggerLauncher): TriggerLauncher;
|
|
1269
|
-
|
|
1270
|
-
_addTriggerLauncher(options?: string | Partial<TriggerLauncher> | TriggerLauncher) {
|
|
1271
|
-
const index = 0;
|
|
1272
|
-
return this._insertTriggerLauncherAt(options as any, index);
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
/**
|
|
1276
|
-
* 添加触发器启动器
|
|
1277
|
-
* @internal
|
|
1278
|
-
* @param name 触发器启动器名称,如果不填会自动生成一个唯一名称
|
|
1279
|
-
*/
|
|
1280
|
-
addTriggerLauncher(name?: string): TriggerLauncher;
|
|
1281
|
-
|
|
1282
|
-
/**
|
|
1283
|
-
* 添加触发器启动器
|
|
1284
|
-
* @param triggerLauncherOptions 触发器启动器参数
|
|
1285
|
-
*/
|
|
1286
|
-
addTriggerLauncher(triggerLauncherOptions: Partial<TriggerLauncher>): TriggerLauncher;
|
|
1287
|
-
|
|
1288
|
-
/**
|
|
1289
|
-
* 添加触发器启动器
|
|
1290
|
-
* @param triggerLauncher 已有的触发器启动器实例
|
|
1291
|
-
*/
|
|
1292
|
-
addTriggerLauncher(triggerLauncher: TriggerLauncher): TriggerLauncher;
|
|
1293
|
-
|
|
1294
|
-
addTriggerLauncher(options?: string | Partial<TriggerLauncher> | TriggerLauncher) {
|
|
1295
|
-
const node = this._addTriggerLauncher(options as any);
|
|
1296
|
-
const index = this.triggerLaunchers.indexOf(node);
|
|
1297
|
-
node.create({
|
|
1298
|
-
index,
|
|
1299
|
-
parentNode: this,
|
|
1300
|
-
parentKey: 'triggerLaunchers',
|
|
1301
|
-
});
|
|
1302
|
-
return node;
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
getConnectionExistingNames(excludedList: Array<Connection> = []) {
|
|
715
|
+
getAuthLogicExistingNames(excludedList: Array<AuthLogic> = []) {
|
|
1306
716
|
const excludedSet = new Set(excludedList);
|
|
1307
|
-
return ((this.
|
|
1308
|
-
.filter((item) => !excludedSet.has(item))
|
|
1309
|
-
.map((item) => item?.name);
|
|
717
|
+
return ((this.authLogics as AuthLogic[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1310
718
|
}
|
|
1311
|
-
|
|
1312
|
-
return utils.unique(name, this.
|
|
719
|
+
getAuthLogicUniqueName(name = 'authentication1') {
|
|
720
|
+
return utils.unique(name, this.getAuthLogicExistingNames(), undefined, false);
|
|
1313
721
|
}
|
|
1314
722
|
|
|
1315
723
|
/**
|
|
1316
|
-
*
|
|
724
|
+
* 插入鉴权逻辑
|
|
1317
725
|
* @internal
|
|
1318
|
-
* @param name
|
|
726
|
+
* @param name 鉴权逻辑名称,如果不填会自动生成一个唯一名称
|
|
1319
727
|
*/
|
|
1320
|
-
|
|
728
|
+
_insertAuthLogicAt(name: string, index: number): AuthLogic;
|
|
1321
729
|
|
|
1322
730
|
/**
|
|
1323
|
-
*
|
|
731
|
+
* 插入鉴权逻辑
|
|
1324
732
|
* @internal
|
|
1325
|
-
* @param
|
|
733
|
+
* @param authLogicOptions 鉴权逻辑参数
|
|
1326
734
|
*/
|
|
1327
|
-
|
|
735
|
+
_insertAuthLogicAt(authLogicOptions: Partial<AuthLogic>, index: number): AuthLogic;
|
|
1328
736
|
|
|
1329
737
|
/**
|
|
1330
|
-
*
|
|
738
|
+
* 插入鉴权逻辑
|
|
1331
739
|
* @internal
|
|
1332
|
-
* @param
|
|
740
|
+
* @param authLogic 已有的鉴权逻辑实例
|
|
1333
741
|
*/
|
|
1334
|
-
|
|
742
|
+
_insertAuthLogicAt(authLogic: AuthLogic, index: number): AuthLogic;
|
|
1335
743
|
|
|
1336
|
-
|
|
1337
|
-
const
|
|
1338
|
-
const relationOptions = { parentNode: this, parentKey: '
|
|
1339
|
-
const
|
|
1340
|
-
let
|
|
744
|
+
_insertAuthLogicAt(options: string | Partial<AuthLogic> | AuthLogic, index: number) {
|
|
745
|
+
const authLogicOptions: any = {};
|
|
746
|
+
const relationOptions = { parentNode: this, parentKey: 'authLogics' };
|
|
747
|
+
const AuthLogic = getConceptConstructor('AuthLogic');
|
|
748
|
+
let authLogic: AuthLogic;
|
|
1341
749
|
if (!options) {
|
|
1342
|
-
|
|
750
|
+
authLogic = AuthLogic.from(
|
|
1343
751
|
{
|
|
1344
|
-
...
|
|
1345
|
-
name: this.
|
|
752
|
+
...authLogicOptions,
|
|
753
|
+
name: this.getAuthLogicUniqueName(),
|
|
1346
754
|
},
|
|
1347
755
|
this,
|
|
1348
|
-
'
|
|
756
|
+
'authLogics',
|
|
1349
757
|
);
|
|
1350
758
|
} else if (typeof options === 'string') {
|
|
1351
|
-
|
|
759
|
+
authLogic = AuthLogic.from(
|
|
1352
760
|
{
|
|
1353
|
-
...
|
|
761
|
+
...authLogicOptions,
|
|
1354
762
|
name: options,
|
|
1355
763
|
},
|
|
1356
764
|
this,
|
|
1357
|
-
'
|
|
765
|
+
'authLogics',
|
|
1358
766
|
);
|
|
1359
|
-
} else if (asserts.
|
|
767
|
+
} else if (asserts.isAuthLogic(options)) {
|
|
1360
768
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1361
|
-
|
|
1362
|
-
Object.assign(
|
|
769
|
+
authLogic = options;
|
|
770
|
+
Object.assign(authLogic, relationOptions);
|
|
1363
771
|
} else {
|
|
1364
|
-
|
|
772
|
+
authLogic = AuthLogic.from(
|
|
1365
773
|
{
|
|
1366
|
-
...
|
|
774
|
+
...authLogicOptions,
|
|
1367
775
|
...options,
|
|
1368
776
|
},
|
|
1369
777
|
this,
|
|
1370
|
-
'
|
|
778
|
+
'authLogics',
|
|
1371
779
|
);
|
|
1372
780
|
}
|
|
1373
|
-
this.
|
|
1374
|
-
return
|
|
781
|
+
this.authLogics.splice(index, 0, authLogic);
|
|
782
|
+
return authLogic;
|
|
1375
783
|
}
|
|
1376
784
|
|
|
1377
785
|
/**
|
|
1378
|
-
*
|
|
1379
|
-
* @param name
|
|
786
|
+
* 插入鉴权逻辑
|
|
787
|
+
* @param name 鉴权逻辑名称,如果不填会自动生成一个唯一名称
|
|
1380
788
|
*/
|
|
1381
|
-
|
|
789
|
+
insertAuthLogicAt(name: string, index: number): AuthLogic;
|
|
1382
790
|
|
|
1383
791
|
/**
|
|
1384
|
-
*
|
|
1385
|
-
* @param
|
|
792
|
+
* 插入鉴权逻辑
|
|
793
|
+
* @param authLogicOptions 鉴权逻辑参数
|
|
1386
794
|
*/
|
|
1387
|
-
|
|
795
|
+
insertAuthLogicAt(authLogicOptions: Partial<AuthLogic>, index: number): AuthLogic;
|
|
1388
796
|
|
|
1389
797
|
/**
|
|
1390
|
-
*
|
|
1391
|
-
* @param
|
|
798
|
+
* 插入鉴权逻辑
|
|
799
|
+
* @param authLogic 已有的鉴权逻辑实例
|
|
1392
800
|
*/
|
|
1393
|
-
|
|
801
|
+
insertAuthLogicAt(authLogic: AuthLogic, index: number): AuthLogic;
|
|
1394
802
|
|
|
1395
|
-
|
|
1396
|
-
const node = this.
|
|
803
|
+
insertAuthLogicAt(options: string | Partial<AuthLogic> | AuthLogic, index: number) {
|
|
804
|
+
const node = this._insertAuthLogicAt(options as any, index);
|
|
1397
805
|
node.create({
|
|
1398
806
|
index,
|
|
1399
807
|
parentNode: this,
|
|
1400
|
-
parentKey: '
|
|
808
|
+
parentKey: 'authLogics',
|
|
1401
809
|
});
|
|
1402
810
|
return node;
|
|
1403
811
|
}
|
|
1404
812
|
|
|
1405
813
|
/**
|
|
1406
|
-
*
|
|
814
|
+
* 添加鉴权逻辑
|
|
1407
815
|
* @internal
|
|
1408
|
-
* @param name
|
|
816
|
+
* @param name 鉴权逻辑名称,如果不填会自动生成一个唯一名称
|
|
1409
817
|
*/
|
|
1410
|
-
|
|
818
|
+
_addAuthLogic(name?: string): AuthLogic;
|
|
1411
819
|
|
|
1412
820
|
/**
|
|
1413
|
-
*
|
|
821
|
+
* 添加鉴权逻辑
|
|
1414
822
|
* @internal
|
|
1415
|
-
* @param
|
|
823
|
+
* @param authLogicOptions 鉴权逻辑参数
|
|
1416
824
|
*/
|
|
1417
|
-
|
|
825
|
+
_addAuthLogic(authLogicOptions: Partial<AuthLogic>): AuthLogic;
|
|
1418
826
|
|
|
1419
827
|
/**
|
|
1420
|
-
*
|
|
828
|
+
* 添加鉴权逻辑
|
|
1421
829
|
* @internal
|
|
1422
|
-
* @param
|
|
1423
|
-
*/
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
_addConnection(options?: string | Partial<Connection> | Connection) {
|
|
1427
|
-
const index = 0;
|
|
1428
|
-
return this._insertConnectionAt(options as any, index);
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
/**
|
|
1432
|
-
* 添加连接
|
|
1433
|
-
* @internal
|
|
1434
|
-
* @param name 连接名称,如果不填会自动生成一个唯一名称
|
|
1435
|
-
*/
|
|
1436
|
-
addConnection(name?: string): Connection;
|
|
1437
|
-
|
|
1438
|
-
/**
|
|
1439
|
-
* 添加连接
|
|
1440
|
-
* @param connectionOptions 连接参数
|
|
1441
|
-
*/
|
|
1442
|
-
addConnection(connectionOptions: Partial<Connection>): Connection;
|
|
1443
|
-
|
|
1444
|
-
/**
|
|
1445
|
-
* 添加连接
|
|
1446
|
-
* @param connection 已有的连接实例
|
|
1447
|
-
*/
|
|
1448
|
-
addConnection(connection: Connection): Connection;
|
|
1449
|
-
|
|
1450
|
-
addConnection(options?: string | Partial<Connection> | Connection) {
|
|
1451
|
-
const node = this._addConnection(options as any);
|
|
1452
|
-
const index = this.connections.indexOf(node);
|
|
1453
|
-
node.create({
|
|
1454
|
-
index,
|
|
1455
|
-
parentNode: this,
|
|
1456
|
-
parentKey: 'connections',
|
|
1457
|
-
});
|
|
1458
|
-
return node;
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
/**
|
|
1462
|
-
* 删除输入参数
|
|
1463
|
-
* @param name 输入参数名称
|
|
1464
|
-
*/
|
|
1465
|
-
removeParam(name: string): void;
|
|
1466
|
-
|
|
1467
|
-
/**
|
|
1468
|
-
* 删除输入参数
|
|
1469
|
-
* @param param 已有的输入参数实例
|
|
1470
|
-
*/
|
|
1471
|
-
removeParam(param: Param): void;
|
|
1472
|
-
|
|
1473
|
-
removeParam(options: string | Param) {
|
|
1474
|
-
let param: Param;
|
|
1475
|
-
if (typeof options === 'string') {
|
|
1476
|
-
param = (this.properties as Param[]).find((item) => item.name === options);
|
|
1477
|
-
if (!param) {
|
|
1478
|
-
throw new Error('找不到输入参数 ' + options);
|
|
1479
|
-
}
|
|
1480
|
-
} else {
|
|
1481
|
-
param = options;
|
|
1482
|
-
}
|
|
1483
|
-
return param.delete();
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
__removeParam(param: Param) {
|
|
1487
|
-
const parentKey = param.parentKey;
|
|
1488
|
-
const params: Params = {
|
|
1489
|
-
parentNode: this,
|
|
1490
|
-
parentKey,
|
|
1491
|
-
index: -1,
|
|
1492
|
-
object: null,
|
|
1493
|
-
oldObject: param,
|
|
1494
|
-
};
|
|
1495
|
-
if (parentKey) {
|
|
1496
|
-
params.parentKey = parentKey;
|
|
1497
|
-
// @ts-ignore
|
|
1498
|
-
const t = this.__v_raw || this;
|
|
1499
|
-
// @ts-ignore
|
|
1500
|
-
const n = param.__v_raw || param;
|
|
1501
|
-
if (Array.isArray((t as any)[parentKey])) {
|
|
1502
|
-
// @ts-ignore
|
|
1503
|
-
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1504
|
-
~index && (this as any)[parentKey].splice(index, 1);
|
|
1505
|
-
params.index = index;
|
|
1506
|
-
} else {
|
|
1507
|
-
const q = (t as any)[parentKey];
|
|
1508
|
-
if ((q.__v_raw || q) === n) {
|
|
1509
|
-
params.index = 0;
|
|
1510
|
-
(this as any)[parentKey] = undefined;
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
return params;
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
/**
|
|
1518
|
-
* 删除逻辑
|
|
1519
|
-
* @param name 逻辑名称
|
|
1520
|
-
*/
|
|
1521
|
-
removeLogicInLogics(name: string): void;
|
|
1522
|
-
|
|
1523
|
-
/**
|
|
1524
|
-
* 删除逻辑
|
|
1525
|
-
* @param logic 已有的逻辑实例
|
|
1526
|
-
*/
|
|
1527
|
-
removeLogicInLogics(logic: Logic): void;
|
|
1528
|
-
|
|
1529
|
-
removeLogicInLogics(options: string | Logic) {
|
|
1530
|
-
let logic: Logic;
|
|
1531
|
-
if (typeof options === 'string') {
|
|
1532
|
-
logic = (this.logics as Logic[]).find((item) => item.name === options);
|
|
1533
|
-
if (!logic) {
|
|
1534
|
-
throw new Error('找不到逻辑 ' + options);
|
|
1535
|
-
}
|
|
1536
|
-
} else {
|
|
1537
|
-
logic = options;
|
|
1538
|
-
}
|
|
1539
|
-
return logic.delete();
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
/**
|
|
1543
|
-
* 删除逻辑
|
|
1544
|
-
* @param name 逻辑名称
|
|
1545
|
-
*/
|
|
1546
|
-
removeCreateLogic(name: string): void;
|
|
1547
|
-
|
|
1548
|
-
/**
|
|
1549
|
-
* 删除逻辑
|
|
1550
|
-
* @param createLogic 已有的逻辑实例
|
|
1551
|
-
*/
|
|
1552
|
-
removeCreateLogic(createLogic: Logic): void;
|
|
1553
|
-
|
|
1554
|
-
removeCreateLogic(options: string | Logic) {
|
|
1555
|
-
let createLogic: Logic;
|
|
1556
|
-
if (typeof options === 'string') {
|
|
1557
|
-
createLogic = this.createLogic;
|
|
1558
|
-
if (!createLogic) {
|
|
1559
|
-
throw new Error('找不到逻辑 ' + options);
|
|
1560
|
-
}
|
|
1561
|
-
} else {
|
|
1562
|
-
createLogic = options;
|
|
1563
|
-
}
|
|
1564
|
-
return createLogic.delete();
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
/**
|
|
1568
|
-
* 删除逻辑
|
|
1569
|
-
* @param name 逻辑名称
|
|
1570
|
-
*/
|
|
1571
|
-
removeTestConnectorLogic(name: string): void;
|
|
1572
|
-
|
|
1573
|
-
/**
|
|
1574
|
-
* 删除逻辑
|
|
1575
|
-
* @param testConnectorLogic 已有的逻辑实例
|
|
1576
|
-
*/
|
|
1577
|
-
removeTestConnectorLogic(testConnectorLogic: Logic): void;
|
|
1578
|
-
|
|
1579
|
-
removeTestConnectorLogic(options: string | Logic) {
|
|
1580
|
-
let testConnectorLogic: Logic;
|
|
1581
|
-
if (typeof options === 'string') {
|
|
1582
|
-
testConnectorLogic = this.testConnectorLogic;
|
|
1583
|
-
if (!testConnectorLogic) {
|
|
1584
|
-
throw new Error('找不到逻辑 ' + options);
|
|
1585
|
-
}
|
|
1586
|
-
} else {
|
|
1587
|
-
testConnectorLogic = options;
|
|
1588
|
-
}
|
|
1589
|
-
return testConnectorLogic.delete();
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
/**
|
|
1593
|
-
* 删除鉴权逻辑
|
|
1594
|
-
* @param name 鉴权逻辑名称
|
|
1595
|
-
*/
|
|
1596
|
-
removeAuthLogicInAuthLogics(name: string): void;
|
|
1597
|
-
|
|
1598
|
-
/**
|
|
1599
|
-
* 删除鉴权逻辑
|
|
1600
|
-
* @param authLogic 已有的鉴权逻辑实例
|
|
1601
|
-
*/
|
|
1602
|
-
removeAuthLogicInAuthLogics(authLogic: AuthLogic): void;
|
|
1603
|
-
|
|
1604
|
-
removeAuthLogicInAuthLogics(options: string | AuthLogic) {
|
|
1605
|
-
let authLogic: AuthLogic;
|
|
1606
|
-
if (typeof options === 'string') {
|
|
1607
|
-
authLogic = (this.authLogics as AuthLogic[]).find((item) => item.name === options);
|
|
1608
|
-
if (!authLogic) {
|
|
1609
|
-
throw new Error('找不到鉴权逻辑 ' + options);
|
|
1610
|
-
}
|
|
1611
|
-
} else {
|
|
1612
|
-
authLogic = options;
|
|
1613
|
-
}
|
|
1614
|
-
return authLogic.delete();
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
/**
|
|
1618
|
-
* 删除调用接口的鉴权逻辑
|
|
1619
|
-
* @param name 调用接口的鉴权逻辑名称
|
|
1620
|
-
*/
|
|
1621
|
-
removeAuthLogicForCallInterfaceInAuthLogicsForCallInterface(name: string): void;
|
|
1622
|
-
|
|
1623
|
-
/**
|
|
1624
|
-
* 删除调用接口的鉴权逻辑
|
|
1625
|
-
* @param authLogicForCallInterface 已有的调用接口的鉴权逻辑实例
|
|
1626
|
-
*/
|
|
1627
|
-
removeAuthLogicForCallInterfaceInAuthLogicsForCallInterface(
|
|
1628
|
-
authLogicForCallInterface: AuthLogicForCallInterface,
|
|
1629
|
-
): void;
|
|
1630
|
-
|
|
1631
|
-
removeAuthLogicForCallInterfaceInAuthLogicsForCallInterface(options: string | AuthLogicForCallInterface) {
|
|
1632
|
-
let authLogicForCallInterface: AuthLogicForCallInterface;
|
|
1633
|
-
if (typeof options === 'string') {
|
|
1634
|
-
authLogicForCallInterface = (this.authLogicsForCallInterface as AuthLogicForCallInterface[]).find(
|
|
1635
|
-
(item) => item.name === options,
|
|
1636
|
-
);
|
|
1637
|
-
if (!authLogicForCallInterface) {
|
|
1638
|
-
throw new Error('找不到调用接口的鉴权逻辑 ' + options);
|
|
1639
|
-
}
|
|
1640
|
-
} else {
|
|
1641
|
-
authLogicForCallInterface = options;
|
|
1642
|
-
}
|
|
1643
|
-
return authLogicForCallInterface.delete();
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
__removeLogic(logic: Logic) {
|
|
1647
|
-
const parentKey = logic.parentKey;
|
|
1648
|
-
const params: Params = {
|
|
1649
|
-
parentNode: this,
|
|
1650
|
-
parentKey,
|
|
1651
|
-
index: -1,
|
|
1652
|
-
object: null,
|
|
1653
|
-
oldObject: logic,
|
|
1654
|
-
};
|
|
1655
|
-
if (parentKey) {
|
|
1656
|
-
params.parentKey = parentKey;
|
|
1657
|
-
// @ts-ignore
|
|
1658
|
-
const t = this.__v_raw || this;
|
|
1659
|
-
// @ts-ignore
|
|
1660
|
-
const n = logic.__v_raw || logic;
|
|
1661
|
-
if (Array.isArray((t as any)[parentKey])) {
|
|
1662
|
-
// @ts-ignore
|
|
1663
|
-
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1664
|
-
~index && (this as any)[parentKey].splice(index, 1);
|
|
1665
|
-
params.index = index;
|
|
1666
|
-
} else {
|
|
1667
|
-
const q = (t as any)[parentKey];
|
|
1668
|
-
if ((q.__v_raw || q) === n) {
|
|
1669
|
-
params.index = 0;
|
|
1670
|
-
(this as any)[parentKey] = undefined;
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
return params;
|
|
1675
|
-
}
|
|
1676
|
-
|
|
1677
|
-
/**
|
|
1678
|
-
* 删除连接器触发器
|
|
1679
|
-
* @param name 连接器触发器名称
|
|
1680
|
-
*/
|
|
1681
|
-
removeConnectorTrigger(name: string): void;
|
|
1682
|
-
|
|
1683
|
-
/**
|
|
1684
|
-
* 删除连接器触发器
|
|
1685
|
-
* @param connectorTrigger 已有的连接器触发器实例
|
|
1686
|
-
*/
|
|
1687
|
-
removeConnectorTrigger(connectorTrigger: ConnectorTrigger): void;
|
|
1688
|
-
|
|
1689
|
-
removeConnectorTrigger(options: string | ConnectorTrigger) {
|
|
1690
|
-
let connectorTrigger: ConnectorTrigger;
|
|
1691
|
-
if (typeof options === 'string') {
|
|
1692
|
-
connectorTrigger = (this.triggers as ConnectorTrigger[]).find((item) => item.name === options);
|
|
1693
|
-
if (!connectorTrigger) {
|
|
1694
|
-
throw new Error('找不到连接器触发器 ' + options);
|
|
1695
|
-
}
|
|
1696
|
-
} else {
|
|
1697
|
-
connectorTrigger = options;
|
|
1698
|
-
}
|
|
1699
|
-
return connectorTrigger.delete();
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1702
|
-
__removeConnectorTrigger(connectorTrigger: ConnectorTrigger) {
|
|
1703
|
-
const parentKey = connectorTrigger.parentKey;
|
|
1704
|
-
const params: Params = {
|
|
1705
|
-
parentNode: this,
|
|
1706
|
-
parentKey,
|
|
1707
|
-
index: -1,
|
|
1708
|
-
object: null,
|
|
1709
|
-
oldObject: connectorTrigger,
|
|
1710
|
-
};
|
|
1711
|
-
if (parentKey) {
|
|
1712
|
-
params.parentKey = parentKey;
|
|
1713
|
-
// @ts-ignore
|
|
1714
|
-
const t = this.__v_raw || this;
|
|
1715
|
-
// @ts-ignore
|
|
1716
|
-
const n = connectorTrigger.__v_raw || connectorTrigger;
|
|
1717
|
-
if (Array.isArray((t as any)[parentKey])) {
|
|
1718
|
-
// @ts-ignore
|
|
1719
|
-
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1720
|
-
~index && (this as any)[parentKey].splice(index, 1);
|
|
1721
|
-
params.index = index;
|
|
1722
|
-
} else {
|
|
1723
|
-
const q = (t as any)[parentKey];
|
|
1724
|
-
if ((q.__v_raw || q) === n) {
|
|
1725
|
-
params.index = 0;
|
|
1726
|
-
(this as any)[parentKey] = undefined;
|
|
1727
|
-
}
|
|
1728
|
-
}
|
|
1729
|
-
}
|
|
1730
|
-
return params;
|
|
1731
|
-
}
|
|
1732
|
-
|
|
1733
|
-
/**
|
|
1734
|
-
* 删除数据结构
|
|
1735
|
-
* @param name 数据结构名称
|
|
1736
|
-
*/
|
|
1737
|
-
removeStructure(name: string): void;
|
|
1738
|
-
|
|
1739
|
-
/**
|
|
1740
|
-
* 删除数据结构
|
|
1741
|
-
* @param structure 已有的数据结构实例
|
|
1742
|
-
*/
|
|
1743
|
-
removeStructure(structure: Structure): void;
|
|
1744
|
-
|
|
1745
|
-
removeStructure(options: string | Structure) {
|
|
1746
|
-
let structure: Structure;
|
|
1747
|
-
if (typeof options === 'string') {
|
|
1748
|
-
structure = (this.structures as Structure[]).find((item) => item.name === options);
|
|
1749
|
-
if (!structure) {
|
|
1750
|
-
throw new Error('找不到数据结构 ' + options);
|
|
1751
|
-
}
|
|
1752
|
-
} else {
|
|
1753
|
-
structure = options;
|
|
1754
|
-
}
|
|
1755
|
-
return structure.delete();
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
__removeStructure(structure: Structure) {
|
|
1759
|
-
const parentKey = structure.parentKey;
|
|
1760
|
-
const params: Params = {
|
|
1761
|
-
parentNode: this,
|
|
1762
|
-
parentKey,
|
|
1763
|
-
index: -1,
|
|
1764
|
-
object: null,
|
|
1765
|
-
oldObject: structure,
|
|
1766
|
-
};
|
|
1767
|
-
if (parentKey) {
|
|
1768
|
-
params.parentKey = parentKey;
|
|
1769
|
-
// @ts-ignore
|
|
1770
|
-
const t = this.__v_raw || this;
|
|
1771
|
-
// @ts-ignore
|
|
1772
|
-
const n = structure.__v_raw || structure;
|
|
1773
|
-
if (Array.isArray((t as any)[parentKey])) {
|
|
1774
|
-
// @ts-ignore
|
|
1775
|
-
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1776
|
-
~index && (this as any)[parentKey].splice(index, 1);
|
|
1777
|
-
params.index = index;
|
|
1778
|
-
} else {
|
|
1779
|
-
const q = (t as any)[parentKey];
|
|
1780
|
-
if ((q.__v_raw || q) === n) {
|
|
1781
|
-
params.index = 0;
|
|
1782
|
-
(this as any)[parentKey] = undefined;
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
}
|
|
1786
|
-
return params;
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
/**
|
|
1790
|
-
* 删除命名空间
|
|
1791
|
-
* @param name 命名空间名称
|
|
1792
|
-
*/
|
|
1793
|
-
removeNamespace(name: string): void;
|
|
1794
|
-
|
|
1795
|
-
/**
|
|
1796
|
-
* 删除命名空间
|
|
1797
|
-
* @param namespace 已有的命名空间实例
|
|
1798
|
-
*/
|
|
1799
|
-
removeNamespace(namespace: Namespace): void;
|
|
1800
|
-
|
|
1801
|
-
removeNamespace(options: string | Namespace) {
|
|
1802
|
-
let namespace: Namespace;
|
|
1803
|
-
if (typeof options === 'string') {
|
|
1804
|
-
namespace = (this.namespaces as Namespace[]).find((item) => item.name === options);
|
|
1805
|
-
if (!namespace) {
|
|
1806
|
-
throw new Error('找不到命名空间 ' + options);
|
|
1807
|
-
}
|
|
1808
|
-
} else {
|
|
1809
|
-
namespace = options;
|
|
1810
|
-
}
|
|
1811
|
-
return namespace.delete();
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
__removeNamespace(namespace: Namespace) {
|
|
1815
|
-
const parentKey = namespace.parentKey;
|
|
1816
|
-
const params: Params = {
|
|
1817
|
-
parentNode: this,
|
|
1818
|
-
parentKey,
|
|
1819
|
-
index: -1,
|
|
1820
|
-
object: null,
|
|
1821
|
-
oldObject: namespace,
|
|
1822
|
-
};
|
|
1823
|
-
if (parentKey) {
|
|
1824
|
-
params.parentKey = parentKey;
|
|
1825
|
-
// @ts-ignore
|
|
1826
|
-
const t = this.__v_raw || this;
|
|
1827
|
-
// @ts-ignore
|
|
1828
|
-
const n = namespace.__v_raw || namespace;
|
|
1829
|
-
if (Array.isArray((t as any)[parentKey])) {
|
|
1830
|
-
// @ts-ignore
|
|
1831
|
-
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1832
|
-
~index && (this as any)[parentKey].splice(index, 1);
|
|
1833
|
-
params.index = index;
|
|
1834
|
-
} else {
|
|
1835
|
-
const q = (t as any)[parentKey];
|
|
1836
|
-
if ((q.__v_raw || q) === n) {
|
|
1837
|
-
params.index = 0;
|
|
1838
|
-
(this as any)[parentKey] = undefined;
|
|
1839
|
-
}
|
|
1840
|
-
}
|
|
1841
|
-
}
|
|
1842
|
-
return params;
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
/**
|
|
1846
|
-
* 删除触发器启动器
|
|
1847
|
-
* @param name 触发器启动器名称
|
|
1848
|
-
*/
|
|
1849
|
-
removeTriggerLauncher(name: string): void;
|
|
1850
|
-
|
|
1851
|
-
/**
|
|
1852
|
-
* 删除触发器启动器
|
|
1853
|
-
* @param triggerLauncher 已有的触发器启动器实例
|
|
1854
|
-
*/
|
|
1855
|
-
removeTriggerLauncher(triggerLauncher: TriggerLauncher): void;
|
|
1856
|
-
|
|
1857
|
-
removeTriggerLauncher(options: string | TriggerLauncher) {
|
|
1858
|
-
let triggerLauncher: TriggerLauncher;
|
|
1859
|
-
if (typeof options === 'string') {
|
|
1860
|
-
triggerLauncher = (this.triggerLaunchers as TriggerLauncher[]).find((item) => item.name === options);
|
|
1861
|
-
if (!triggerLauncher) {
|
|
1862
|
-
throw new Error('找不到触发器启动器 ' + options);
|
|
1863
|
-
}
|
|
1864
|
-
} else {
|
|
1865
|
-
triggerLauncher = options;
|
|
1866
|
-
}
|
|
1867
|
-
return triggerLauncher.delete();
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
__removeTriggerLauncher(triggerLauncher: TriggerLauncher) {
|
|
1871
|
-
const parentKey = triggerLauncher.parentKey;
|
|
1872
|
-
const params: Params = {
|
|
1873
|
-
parentNode: this,
|
|
1874
|
-
parentKey,
|
|
1875
|
-
index: -1,
|
|
1876
|
-
object: null,
|
|
1877
|
-
oldObject: triggerLauncher,
|
|
1878
|
-
};
|
|
1879
|
-
if (parentKey) {
|
|
1880
|
-
params.parentKey = parentKey;
|
|
1881
|
-
// @ts-ignore
|
|
1882
|
-
const t = this.__v_raw || this;
|
|
1883
|
-
// @ts-ignore
|
|
1884
|
-
const n = triggerLauncher.__v_raw || triggerLauncher;
|
|
1885
|
-
if (Array.isArray((t as any)[parentKey])) {
|
|
1886
|
-
// @ts-ignore
|
|
1887
|
-
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1888
|
-
~index && (this as any)[parentKey].splice(index, 1);
|
|
1889
|
-
params.index = index;
|
|
1890
|
-
} else {
|
|
1891
|
-
const q = (t as any)[parentKey];
|
|
1892
|
-
if ((q.__v_raw || q) === n) {
|
|
1893
|
-
params.index = 0;
|
|
1894
|
-
(this as any)[parentKey] = undefined;
|
|
1895
|
-
}
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
return params;
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
|
-
/**
|
|
1902
|
-
* 删除连接
|
|
1903
|
-
* @param name 连接名称
|
|
1904
|
-
*/
|
|
1905
|
-
removeConnection(name: string): void;
|
|
1906
|
-
|
|
1907
|
-
/**
|
|
1908
|
-
* 删除连接
|
|
1909
|
-
* @param connection 已有的连接实例
|
|
1910
|
-
*/
|
|
1911
|
-
removeConnection(connection: Connection): void;
|
|
1912
|
-
|
|
1913
|
-
removeConnection(options: string | Connection) {
|
|
1914
|
-
let connection: Connection;
|
|
1915
|
-
if (typeof options === 'string') {
|
|
1916
|
-
connection = (this.connections as Connection[]).find((item) => item.name === options);
|
|
1917
|
-
if (!connection) {
|
|
1918
|
-
throw new Error('找不到连接 ' + options);
|
|
1919
|
-
}
|
|
1920
|
-
} else {
|
|
1921
|
-
connection = options;
|
|
1922
|
-
}
|
|
1923
|
-
return connection.delete();
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
__removeConnection(connection: Connection) {
|
|
1927
|
-
const parentKey = connection.parentKey;
|
|
1928
|
-
const params: Params = {
|
|
1929
|
-
parentNode: this,
|
|
1930
|
-
parentKey,
|
|
1931
|
-
index: -1,
|
|
1932
|
-
object: null,
|
|
1933
|
-
oldObject: connection,
|
|
1934
|
-
};
|
|
1935
|
-
if (parentKey) {
|
|
1936
|
-
params.parentKey = parentKey;
|
|
1937
|
-
// @ts-ignore
|
|
1938
|
-
const t = this.__v_raw || this;
|
|
1939
|
-
// @ts-ignore
|
|
1940
|
-
const n = connection.__v_raw || connection;
|
|
1941
|
-
if (Array.isArray((t as any)[parentKey])) {
|
|
1942
|
-
// @ts-ignore
|
|
1943
|
-
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1944
|
-
~index && (this as any)[parentKey].splice(index, 1);
|
|
1945
|
-
params.index = index;
|
|
1946
|
-
} else {
|
|
1947
|
-
const q = (t as any)[parentKey];
|
|
1948
|
-
if ((q.__v_raw || q) === n) {
|
|
1949
|
-
params.index = 0;
|
|
1950
|
-
(this as any)[parentKey] = undefined;
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
}
|
|
1954
|
-
return params;
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
//================================================================================
|
|
1958
|
-
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
1959
|
-
// 自动生成的代码已结束。下面可以手动编写。
|
|
1960
|
-
//================================================================================
|
|
1961
|
-
|
|
1962
|
-
getActions() {
|
|
1963
|
-
// 自定义连接器有分组的概念
|
|
1964
|
-
if (this.connectorKind === 'app') {
|
|
1965
|
-
return this.namespaces.map((namespace) => {
|
|
1966
|
-
return {
|
|
1967
|
-
title: namespace.title,
|
|
1968
|
-
name: namespace.name,
|
|
1969
|
-
expanded: true,
|
|
1970
|
-
unselectable: true, // 自定义属性。用于标注当前选项是否可以被选择
|
|
1971
|
-
children: namespace.logics,
|
|
1972
|
-
};
|
|
1973
|
-
});
|
|
1974
|
-
}
|
|
1975
|
-
return this.logics;
|
|
1976
|
-
}
|
|
830
|
+
* @param authLogic 已有的鉴权逻辑实例
|
|
831
|
+
*/
|
|
832
|
+
_addAuthLogic(authLogic: AuthLogic): AuthLogic;
|
|
1977
833
|
|
|
1978
|
-
|
|
1979
|
-
const
|
|
1980
|
-
return
|
|
834
|
+
_addAuthLogic(options?: string | Partial<AuthLogic> | AuthLogic) {
|
|
835
|
+
const index = this.authLogics.length;
|
|
836
|
+
return this._insertAuthLogicAt(options as any, index);
|
|
1981
837
|
}
|
|
1982
838
|
|
|
1983
|
-
|
|
1984
|
-
|
|
839
|
+
/**
|
|
840
|
+
* 添加鉴权逻辑
|
|
841
|
+
* @internal
|
|
842
|
+
* @param name 鉴权逻辑名称,如果不填会自动生成一个唯一名称
|
|
843
|
+
*/
|
|
844
|
+
addAuthLogic(name?: string): AuthLogic;
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* 添加鉴权逻辑
|
|
848
|
+
* @param authLogicOptions 鉴权逻辑参数
|
|
849
|
+
*/
|
|
850
|
+
addAuthLogic(authLogicOptions: Partial<AuthLogic>): AuthLogic;
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* 添加鉴权逻辑
|
|
854
|
+
* @param authLogic 已有的鉴权逻辑实例
|
|
855
|
+
*/
|
|
856
|
+
addAuthLogic(authLogic: AuthLogic): AuthLogic;
|
|
857
|
+
|
|
858
|
+
addAuthLogic(options?: string | Partial<AuthLogic> | AuthLogic) {
|
|
859
|
+
const node = this._addAuthLogic(options as any);
|
|
860
|
+
const index = this.authLogics.indexOf(node);
|
|
861
|
+
node.create({
|
|
862
|
+
index,
|
|
863
|
+
parentNode: this,
|
|
864
|
+
parentKey: 'authLogics',
|
|
865
|
+
});
|
|
866
|
+
return node;
|
|
1985
867
|
}
|
|
1986
868
|
|
|
1987
|
-
// ================ 为解决循环引用而将之前的自动生成代码移动到这里 START =================
|
|
1988
869
|
getAuthLogicForCallInterfaceExistingNames(excludedList: Array<AuthLogicForCallInterface> = []) {
|
|
1989
870
|
const excludedSet = new Set(excludedList);
|
|
1990
871
|
return ((this.authLogicsForCallInterface as AuthLogicForCallInterface[]) || [])
|
|
1991
872
|
.filter((item) => !excludedSet.has(item))
|
|
1992
873
|
.map((item) => item.name);
|
|
1993
874
|
}
|
|
1994
|
-
|
|
1995
875
|
getAuthLogicForCallInterfaceUniqueName(name = 'authLogicForCallInterface1') {
|
|
1996
876
|
return utils.unique(name, this.getAuthLogicForCallInterfaceExistingNames(), undefined, false);
|
|
1997
877
|
}
|
|
@@ -2029,18 +909,39 @@ export class Connector extends Module {
|
|
|
2029
909
|
) {
|
|
2030
910
|
const authLogicForCallInterfaceOptions: any = {};
|
|
2031
911
|
const relationOptions = { parentNode: this, parentKey: 'authLogicsForCallInterface' };
|
|
912
|
+
const AuthLogicForCallInterface = getConceptConstructor('AuthLogicForCallInterface');
|
|
2032
913
|
let authLogicForCallInterface: AuthLogicForCallInterface;
|
|
2033
914
|
if (!options) {
|
|
2034
|
-
|
|
915
|
+
authLogicForCallInterface = AuthLogicForCallInterface.from(
|
|
916
|
+
{
|
|
917
|
+
...authLogicForCallInterfaceOptions,
|
|
918
|
+
name: this.getAuthLogicForCallInterfaceUniqueName(),
|
|
919
|
+
},
|
|
920
|
+
this,
|
|
921
|
+
'authLogicsForCallInterface',
|
|
922
|
+
);
|
|
2035
923
|
} else if (typeof options === 'string') {
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
924
|
+
authLogicForCallInterface = AuthLogicForCallInterface.from(
|
|
925
|
+
{
|
|
926
|
+
...authLogicForCallInterfaceOptions,
|
|
927
|
+
name: options,
|
|
928
|
+
},
|
|
929
|
+
this,
|
|
930
|
+
'authLogicsForCallInterface',
|
|
931
|
+
);
|
|
932
|
+
} else if (asserts.isAuthLogicForCallInterface(options)) {
|
|
2039
933
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
2040
|
-
authLogicForCallInterface = options
|
|
934
|
+
authLogicForCallInterface = options;
|
|
2041
935
|
Object.assign(authLogicForCallInterface, relationOptions);
|
|
2042
936
|
} else {
|
|
2043
|
-
|
|
937
|
+
authLogicForCallInterface = AuthLogicForCallInterface.from(
|
|
938
|
+
{
|
|
939
|
+
...authLogicForCallInterfaceOptions,
|
|
940
|
+
...options,
|
|
941
|
+
},
|
|
942
|
+
this,
|
|
943
|
+
'authLogicsForCallInterface',
|
|
944
|
+
);
|
|
2044
945
|
}
|
|
2045
946
|
this.authLogicsForCallInterface.splice(index, 0, authLogicForCallInterface);
|
|
2046
947
|
return authLogicForCallInterface;
|
|
@@ -2144,202 +1045,192 @@ export class Connector extends Module {
|
|
|
2144
1045
|
}
|
|
2145
1046
|
|
|
2146
1047
|
/**
|
|
2147
|
-
*
|
|
2148
|
-
* @param name
|
|
1048
|
+
* 删除输入参数
|
|
1049
|
+
* @param name 输入参数名称
|
|
2149
1050
|
*/
|
|
2150
|
-
|
|
1051
|
+
removeParam(name: string): void;
|
|
2151
1052
|
|
|
2152
1053
|
/**
|
|
2153
|
-
*
|
|
2154
|
-
* @param
|
|
1054
|
+
* 删除输入参数
|
|
1055
|
+
* @param param 已有的输入参数实例
|
|
2155
1056
|
*/
|
|
2156
|
-
|
|
1057
|
+
removeParam(param: Param): void;
|
|
2157
1058
|
|
|
2158
|
-
|
|
2159
|
-
let
|
|
1059
|
+
removeParam(options: string | Param) {
|
|
1060
|
+
let param: Param;
|
|
2160
1061
|
if (typeof options === 'string') {
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
if (!authLogicForCallInterface) {
|
|
2165
|
-
throw new Error('找不到调用接口的鉴权逻辑 ' + options);
|
|
1062
|
+
param = (this.properties as Param[]).find((item) => item.name === options);
|
|
1063
|
+
if (!param) {
|
|
1064
|
+
throw new Error('找不到输入参数 ' + options);
|
|
2166
1065
|
}
|
|
2167
1066
|
} else {
|
|
2168
|
-
|
|
1067
|
+
param = options;
|
|
2169
1068
|
}
|
|
2170
|
-
return
|
|
1069
|
+
return param.delete();
|
|
2171
1070
|
}
|
|
2172
1071
|
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
index: -1,
|
|
2179
|
-
object: null,
|
|
2180
|
-
oldObject: authLogic,
|
|
2181
|
-
};
|
|
2182
|
-
if (parentKey) {
|
|
2183
|
-
params.parentKey = parentKey;
|
|
2184
|
-
if (Array.isArray((this as any)[parentKey])) {
|
|
2185
|
-
const index = (this as any)[parentKey].indexOf(authLogic);
|
|
2186
|
-
~index && (this as any)[parentKey].splice(index, 1);
|
|
2187
|
-
params.index = index;
|
|
2188
|
-
} else if ((this as any)[parentKey] === authLogic) {
|
|
2189
|
-
params.index = 0;
|
|
2190
|
-
(this as any)[parentKey] = undefined;
|
|
2191
|
-
}
|
|
2192
|
-
}
|
|
2193
|
-
return params;
|
|
2194
|
-
}
|
|
1072
|
+
/**
|
|
1073
|
+
* 删除连接器触发器
|
|
1074
|
+
* @param name 连接器触发器名称
|
|
1075
|
+
*/
|
|
1076
|
+
removeConnectorTrigger(name: string): void;
|
|
2195
1077
|
|
|
2196
1078
|
/**
|
|
2197
|
-
*
|
|
2198
|
-
* @
|
|
2199
|
-
* @param name 鉴权逻辑名称,如果不填会自动生成一个唯一名称
|
|
1079
|
+
* 删除连接器触发器
|
|
1080
|
+
* @param connectorTrigger 已有的连接器触发器实例
|
|
2200
1081
|
*/
|
|
2201
|
-
|
|
1082
|
+
removeConnectorTrigger(connectorTrigger: ConnectorTrigger): void;
|
|
1083
|
+
|
|
1084
|
+
removeConnectorTrigger(options: string | ConnectorTrigger) {
|
|
1085
|
+
let connectorTrigger: ConnectorTrigger;
|
|
1086
|
+
if (typeof options === 'string') {
|
|
1087
|
+
connectorTrigger = (this.triggers as ConnectorTrigger[]).find((item) => item.name === options);
|
|
1088
|
+
if (!connectorTrigger) {
|
|
1089
|
+
throw new Error('找不到连接器触发器 ' + options);
|
|
1090
|
+
}
|
|
1091
|
+
} else {
|
|
1092
|
+
connectorTrigger = options;
|
|
1093
|
+
}
|
|
1094
|
+
return connectorTrigger.delete();
|
|
1095
|
+
}
|
|
2202
1096
|
|
|
2203
1097
|
/**
|
|
2204
|
-
*
|
|
2205
|
-
* @
|
|
2206
|
-
* @param authLogicOptions 鉴权逻辑参数
|
|
1098
|
+
* 删除命名空间
|
|
1099
|
+
* @param name 命名空间名称
|
|
2207
1100
|
*/
|
|
2208
|
-
|
|
1101
|
+
removeNamespace(name: string): void;
|
|
2209
1102
|
|
|
2210
1103
|
/**
|
|
2211
|
-
*
|
|
2212
|
-
* @
|
|
2213
|
-
* @param authLogic 已有的鉴权逻辑实例
|
|
1104
|
+
* 删除命名空间
|
|
1105
|
+
* @param namespace 已有的命名空间实例
|
|
2214
1106
|
*/
|
|
2215
|
-
|
|
1107
|
+
removeNamespace(namespace: Namespace): void;
|
|
2216
1108
|
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
// }, this, 'authLogics');
|
|
2225
|
-
throw Error('请先调用from方法');
|
|
2226
|
-
} else if (typeof options === 'string') {
|
|
2227
|
-
// authLogic = AuthLogic.from({
|
|
2228
|
-
// ...authLogicOptions,
|
|
2229
|
-
// name: options,
|
|
2230
|
-
// }, this, 'authLogics');
|
|
2231
|
-
// FIXME : dont change
|
|
2232
|
-
throw Error('请先调用from方法');
|
|
2233
|
-
} else if (options.concept === 'AuthLogic') {
|
|
2234
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
2235
|
-
authLogic = options as any;
|
|
2236
|
-
Object.assign(authLogic, relationOptions);
|
|
1109
|
+
removeNamespace(options: string | Namespace) {
|
|
1110
|
+
let namespace: Namespace;
|
|
1111
|
+
if (typeof options === 'string') {
|
|
1112
|
+
namespace = (this.namespaces as Namespace[]).find((item) => item.name === options);
|
|
1113
|
+
if (!namespace) {
|
|
1114
|
+
throw new Error('找不到命名空间 ' + options);
|
|
1115
|
+
}
|
|
2237
1116
|
} else {
|
|
2238
|
-
|
|
2239
|
-
// ...authLogicOptions,
|
|
2240
|
-
// ...options,
|
|
2241
|
-
// }, this, 'authLogics');
|
|
2242
|
-
throw Error('请先调用from方法');
|
|
1117
|
+
namespace = options;
|
|
2243
1118
|
}
|
|
2244
|
-
|
|
2245
|
-
return authLogic;
|
|
1119
|
+
return namespace.delete();
|
|
2246
1120
|
}
|
|
2247
1121
|
|
|
2248
1122
|
/**
|
|
2249
|
-
*
|
|
2250
|
-
* @param name
|
|
2251
|
-
*/
|
|
2252
|
-
insertAuthLogicInAuthLogicsAt(name: string, index: number): AuthLogic;
|
|
2253
|
-
|
|
2254
|
-
/**
|
|
2255
|
-
* 插入鉴权逻辑
|
|
2256
|
-
* @param authLogicOptions 鉴权逻辑参数
|
|
1123
|
+
* 删除鉴权逻辑
|
|
1124
|
+
* @param name 鉴权逻辑名称
|
|
2257
1125
|
*/
|
|
2258
|
-
|
|
1126
|
+
removeAuthLogic(name: string): void;
|
|
2259
1127
|
|
|
2260
1128
|
/**
|
|
2261
|
-
*
|
|
1129
|
+
* 删除鉴权逻辑
|
|
2262
1130
|
* @param authLogic 已有的鉴权逻辑实例
|
|
2263
1131
|
*/
|
|
2264
|
-
|
|
1132
|
+
removeAuthLogic(authLogic: AuthLogic): void;
|
|
2265
1133
|
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
1134
|
+
removeAuthLogic(options: string | AuthLogic) {
|
|
1135
|
+
let authLogic: AuthLogic;
|
|
1136
|
+
if (typeof options === 'string') {
|
|
1137
|
+
authLogic = (this.authLogics as AuthLogic[]).find((item) => item.name === options);
|
|
1138
|
+
if (!authLogic) {
|
|
1139
|
+
throw new Error('找不到鉴权逻辑 ' + options);
|
|
1140
|
+
}
|
|
1141
|
+
} else {
|
|
1142
|
+
authLogic = options;
|
|
1143
|
+
}
|
|
1144
|
+
return authLogic.delete();
|
|
2274
1145
|
}
|
|
2275
1146
|
|
|
2276
1147
|
/**
|
|
2277
|
-
*
|
|
2278
|
-
* @
|
|
2279
|
-
* @param name 鉴权逻辑名称,如果不填会自动生成一个唯一名称
|
|
1148
|
+
* 删除调用接口的鉴权逻辑
|
|
1149
|
+
* @param name 调用接口的鉴权逻辑名称
|
|
2280
1150
|
*/
|
|
2281
|
-
|
|
1151
|
+
removeAuthLogicForCallInterface(name: string): void;
|
|
2282
1152
|
|
|
2283
1153
|
/**
|
|
2284
|
-
*
|
|
2285
|
-
* @
|
|
2286
|
-
* @param authLogicOptions 鉴权逻辑参数
|
|
1154
|
+
* 删除调用接口的鉴权逻辑
|
|
1155
|
+
* @param authLogicForCallInterface 已有的调用接口的鉴权逻辑实例
|
|
2287
1156
|
*/
|
|
2288
|
-
|
|
1157
|
+
removeAuthLogicForCallInterface(authLogicForCallInterface: AuthLogicForCallInterface): void;
|
|
1158
|
+
|
|
1159
|
+
removeAuthLogicForCallInterface(options: string | AuthLogicForCallInterface) {
|
|
1160
|
+
let authLogicForCallInterface: AuthLogicForCallInterface;
|
|
1161
|
+
if (typeof options === 'string') {
|
|
1162
|
+
authLogicForCallInterface = (this.authLogicsForCallInterface as AuthLogicForCallInterface[]).find(
|
|
1163
|
+
(item) => item.name === options,
|
|
1164
|
+
);
|
|
1165
|
+
if (!authLogicForCallInterface) {
|
|
1166
|
+
throw new Error('找不到调用接口的鉴权逻辑 ' + options);
|
|
1167
|
+
}
|
|
1168
|
+
} else {
|
|
1169
|
+
authLogicForCallInterface = options;
|
|
1170
|
+
}
|
|
1171
|
+
return authLogicForCallInterface.delete();
|
|
1172
|
+
}
|
|
2289
1173
|
|
|
1174
|
+
//================================================================================
|
|
1175
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
1176
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
1177
|
+
//================================================================================
|
|
2290
1178
|
/**
|
|
2291
|
-
*
|
|
2292
|
-
* @internal
|
|
2293
|
-
* @param authLogic 已有的鉴权逻辑实例
|
|
1179
|
+
* 祖先 Module
|
|
2294
1180
|
*/
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
_addAuthLogicInAuthLogics(options?: string | Partial<AuthLogic> | AuthLogic) {
|
|
2298
|
-
const index = this.authLogics.length;
|
|
2299
|
-
return this._insertAuthLogicInAuthLogicsAt(options as any, index);
|
|
1181
|
+
get module() {
|
|
1182
|
+
return this.getAncestor('Module') as Module;
|
|
2300
1183
|
}
|
|
2301
|
-
|
|
2302
1184
|
/**
|
|
2303
|
-
*
|
|
2304
|
-
* @internal
|
|
2305
|
-
* @param name 鉴权逻辑名称,如果不填会自动生成一个唯一名称
|
|
1185
|
+
* 祖先 View
|
|
2306
1186
|
*/
|
|
2307
|
-
|
|
2308
|
-
|
|
1187
|
+
get view() {
|
|
1188
|
+
return this.getAncestor('View') as View;
|
|
1189
|
+
}
|
|
2309
1190
|
/**
|
|
2310
|
-
*
|
|
2311
|
-
* @param authLogicOptions 鉴权逻辑参数
|
|
1191
|
+
* 祖先 Frontend
|
|
2312
1192
|
*/
|
|
2313
|
-
|
|
2314
|
-
|
|
1193
|
+
get frontend() {
|
|
1194
|
+
return this.getAncestor('Frontend') as Frontend;
|
|
1195
|
+
}
|
|
2315
1196
|
/**
|
|
2316
|
-
*
|
|
2317
|
-
|
|
1197
|
+
* 祖先 ProcessElement
|
|
1198
|
+
*/
|
|
1199
|
+
get processElement() {
|
|
1200
|
+
return this.getAncestor('ProcessElement') as ProcessElement;
|
|
1201
|
+
}
|
|
1202
|
+
/**
|
|
1203
|
+
* 祖先 Process
|
|
2318
1204
|
*/
|
|
2319
|
-
|
|
1205
|
+
get process() {
|
|
1206
|
+
return this.getAncestor('Process') as Process;
|
|
1207
|
+
}
|
|
2320
1208
|
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
1209
|
+
getActions() {
|
|
1210
|
+
// 自定义连接器有分组的概念
|
|
1211
|
+
if (this.connectorKind === 'app') {
|
|
1212
|
+
return this.namespaces.map((namespace) => {
|
|
1213
|
+
return {
|
|
1214
|
+
title: namespace.title,
|
|
1215
|
+
name: namespace.name,
|
|
1216
|
+
expanded: true,
|
|
1217
|
+
unselectable: true, // 自定义属性。用于标注当前选项是否可以被选择
|
|
1218
|
+
children: namespace.logics,
|
|
1219
|
+
};
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1222
|
+
return this.logics;
|
|
2330
1223
|
}
|
|
2331
1224
|
|
|
2332
|
-
|
|
1225
|
+
getNamespaceExistingTitles(excludedList: Array<Namespace> = []) {
|
|
2333
1226
|
const excludedSet = new Set(excludedList);
|
|
2334
|
-
return ((this.
|
|
1227
|
+
return ((this.namespaces as Namespace[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.title);
|
|
2335
1228
|
}
|
|
2336
1229
|
|
|
2337
|
-
|
|
2338
|
-
return utils.unique(name, this.
|
|
1230
|
+
getNamespaceUniqueTitle(name = '分组1') {
|
|
1231
|
+
return utils.unique(name, this.getNamespaceExistingTitles(), undefined, false);
|
|
2339
1232
|
}
|
|
2340
1233
|
|
|
2341
|
-
// ================ 为解决循环引用而将之前的自动生成代码移动到这里 END =================
|
|
2342
|
-
|
|
2343
1234
|
//================================================================================
|
|
2344
1235
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
2345
1236
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|