@lcap/nasl-concepts 3.9.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/README.md +3 -0
- package/out/breakpoint/index.d.ts +2 -0
- package/out/breakpoint/index.d.ts.map +1 -0
- package/out/breakpoint/index.js +18 -0
- package/out/breakpoint/index.js.map +1 -0
- package/out/breakpoint/operation.d.ts +11 -0
- package/out/breakpoint/operation.d.ts.map +1 -0
- package/out/breakpoint/operation.js +24 -0
- package/out/breakpoint/operation.js.map +1 -0
- package/out/common/BaseNode.d.ts +427 -0
- package/out/common/BaseNode.d.ts.map +1 -0
- package/out/common/BaseNode.js +1721 -0
- package/out/common/BaseNode.js.map +1 -0
- package/out/common/EventEmitter.d.ts +30 -0
- package/out/common/EventEmitter.d.ts.map +1 -0
- package/out/common/EventEmitter.js +70 -0
- package/out/common/EventEmitter.js.map +1 -0
- package/out/common/index.d.ts +3 -0
- package/out/common/index.d.ts.map +1 -0
- package/out/common/index.js +19 -0
- package/out/common/index.js.map +1 -0
- package/out/common/types.d.ts +5 -0
- package/out/common/types.d.ts.map +1 -0
- package/out/common/types.js +3 -0
- package/out/common/types.js.map +1 -0
- package/out/concepts/Abort__.d.ts +32 -0
- package/out/concepts/Abort__.d.ts.map +1 -0
- package/out/concepts/Abort__.js +94 -0
- package/out/concepts/Abort__.js.map +1 -0
- package/out/concepts/AbstractInterface__.d.ts +29 -0
- package/out/concepts/AbstractInterface__.d.ts.map +1 -0
- package/out/concepts/AbstractInterface__.js +62 -0
- package/out/concepts/AbstractInterface__.js.map +1 -0
- package/out/concepts/Anchor__.d.ts +44 -0
- package/out/concepts/Anchor__.d.ts.map +1 -0
- package/out/concepts/Anchor__.js +179 -0
- package/out/concepts/Anchor__.js.map +1 -0
- package/out/concepts/Annotatable__.d.ts +111 -0
- package/out/concepts/Annotatable__.d.ts.map +1 -0
- package/out/concepts/Annotatable__.js +163 -0
- package/out/concepts/Annotatable__.js.map +1 -0
- package/out/concepts/AnnotationProperty__.d.ts +49 -0
- package/out/concepts/AnnotationProperty__.d.ts.map +1 -0
- package/out/concepts/AnnotationProperty__.js +76 -0
- package/out/concepts/AnnotationProperty__.js.map +1 -0
- package/out/concepts/Annotation__.d.ts +129 -0
- package/out/concepts/Annotation__.d.ts.map +1 -0
- package/out/concepts/Annotation__.js +249 -0
- package/out/concepts/Annotation__.js.map +1 -0
- package/out/concepts/AnonymousFunction__.d.ts +141 -0
- package/out/concepts/AnonymousFunction__.d.ts.map +1 -0
- package/out/concepts/AnonymousFunction__.js +428 -0
- package/out/concepts/AnonymousFunction__.js.map +1 -0
- package/out/concepts/App__.d.ts +1794 -0
- package/out/concepts/App__.d.ts.map +1 -0
- package/out/concepts/App__.js +3475 -0
- package/out/concepts/App__.js.map +1 -0
- package/out/concepts/ApplyAnnotation__.d.ts +88 -0
- package/out/concepts/ApplyAnnotation__.d.ts.map +1 -0
- package/out/concepts/ApplyAnnotation__.js +142 -0
- package/out/concepts/ApplyAnnotation__.js.map +1 -0
- package/out/concepts/ApprovalPolicyV2__.d.ts +27 -0
- package/out/concepts/ApprovalPolicyV2__.d.ts.map +1 -0
- package/out/concepts/ApprovalPolicyV2__.js +55 -0
- package/out/concepts/ApprovalPolicyV2__.js.map +1 -0
- package/out/concepts/Argument__.d.ts +85 -0
- package/out/concepts/Argument__.d.ts.map +1 -0
- package/out/concepts/Argument__.js +390 -0
- package/out/concepts/Argument__.js.map +1 -0
- package/out/concepts/AssigneeV2__.d.ts +380 -0
- package/out/concepts/AssigneeV2__.d.ts.map +1 -0
- package/out/concepts/AssigneeV2__.js +517 -0
- package/out/concepts/AssigneeV2__.js.map +1 -0
- package/out/concepts/Assignee__.d.ts +296 -0
- package/out/concepts/Assignee__.d.ts.map +1 -0
- package/out/concepts/Assignee__.js +404 -0
- package/out/concepts/Assignee__.js.map +1 -0
- package/out/concepts/AssignmentLine__.d.ts +44 -0
- package/out/concepts/AssignmentLine__.d.ts.map +1 -0
- package/out/concepts/AssignmentLine__.js +110 -0
- package/out/concepts/AssignmentLine__.js.map +1 -0
- package/out/concepts/Assignment__.d.ts +59 -0
- package/out/concepts/Assignment__.d.ts.map +1 -0
- package/out/concepts/Assignment__.js +288 -0
- package/out/concepts/Assignment__.js.map +1 -0
- package/out/concepts/Attribute__.d.ts +77 -0
- package/out/concepts/Attribute__.d.ts.map +1 -0
- package/out/concepts/Attribute__.js +103 -0
- package/out/concepts/Attribute__.js.map +1 -0
- package/out/concepts/AuthInterface__.d.ts +39 -0
- package/out/concepts/AuthInterface__.d.ts.map +1 -0
- package/out/concepts/AuthInterface__.js +79 -0
- package/out/concepts/AuthInterface__.js.map +1 -0
- package/out/concepts/AuthLogicForCallInterface__.d.ts +148 -0
- package/out/concepts/AuthLogicForCallInterface__.d.ts.map +1 -0
- package/out/concepts/AuthLogicForCallInterface__.js +597 -0
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -0
- package/out/concepts/AuthLogic__.d.ts +70 -0
- package/out/concepts/AuthLogic__.d.ts.map +1 -0
- package/out/concepts/AuthLogic__.js +211 -0
- package/out/concepts/AuthLogic__.js.map +1 -0
- package/out/concepts/BackendVariable__.d.ts +120 -0
- package/out/concepts/BackendVariable__.d.ts.map +1 -0
- package/out/concepts/BackendVariable__.js +432 -0
- package/out/concepts/BackendVariable__.js.map +1 -0
- package/out/concepts/Backend__.d.ts +128 -0
- package/out/concepts/Backend__.d.ts.map +1 -0
- package/out/concepts/Backend__.js +238 -0
- package/out/concepts/Backend__.js.map +1 -0
- package/out/concepts/BaseSetter__.d.ts +27 -0
- package/out/concepts/BaseSetter__.d.ts.map +1 -0
- package/out/concepts/BaseSetter__.js +55 -0
- package/out/concepts/BaseSetter__.js.map +1 -0
- package/out/concepts/BatchAssignment__.d.ts +246 -0
- package/out/concepts/BatchAssignment__.d.ts.map +1 -0
- package/out/concepts/BatchAssignment__.js +831 -0
- package/out/concepts/BatchAssignment__.js.map +1 -0
- package/out/concepts/BinaryExpression__.d.ts +64 -0
- package/out/concepts/BinaryExpression__.d.ts.map +1 -0
- package/out/concepts/BinaryExpression__.js +508 -0
- package/out/concepts/BinaryExpression__.js.map +1 -0
- package/out/concepts/BindAttribute__.d.ts +294 -0
- package/out/concepts/BindAttribute__.d.ts.map +1 -0
- package/out/concepts/BindAttribute__.js +1023 -0
- package/out/concepts/BindAttribute__.js.map +1 -0
- package/out/concepts/BindDirective__.d.ts +157 -0
- package/out/concepts/BindDirective__.d.ts.map +1 -0
- package/out/concepts/BindDirective__.js +492 -0
- package/out/concepts/BindDirective__.js.map +1 -0
- package/out/concepts/BindEvent__.d.ts +247 -0
- package/out/concepts/BindEvent__.d.ts.map +1 -0
- package/out/concepts/BindEvent__.js +833 -0
- package/out/concepts/BindEvent__.js.map +1 -0
- package/out/concepts/BindStyle__.d.ts +128 -0
- package/out/concepts/BindStyle__.d.ts.map +1 -0
- package/out/concepts/BindStyle__.js +412 -0
- package/out/concepts/BindStyle__.js.map +1 -0
- package/out/concepts/Block__.d.ts +90 -0
- package/out/concepts/Block__.d.ts.map +1 -0
- package/out/concepts/Block__.js +204 -0
- package/out/concepts/Block__.js.map +1 -0
- package/out/concepts/BooleanLiteral__.d.ts +46 -0
- package/out/concepts/BooleanLiteral__.d.ts.map +1 -0
- package/out/concepts/BooleanLiteral__.js +119 -0
- package/out/concepts/BooleanLiteral__.js.map +1 -0
- package/out/concepts/BusinessComponent__.d.ts +648 -0
- package/out/concepts/BusinessComponent__.d.ts.map +1 -0
- package/out/concepts/BusinessComponent__.js +1785 -0
- package/out/concepts/BusinessComponent__.js.map +1 -0
- package/out/concepts/BusinessLogic__.d.ts +46 -0
- package/out/concepts/BusinessLogic__.d.ts.map +1 -0
- package/out/concepts/BusinessLogic__.js +485 -0
- package/out/concepts/BusinessLogic__.js.map +1 -0
- package/out/concepts/CallAuthInterface__.d.ts +134 -0
- package/out/concepts/CallAuthInterface__.d.ts.map +1 -0
- package/out/concepts/CallAuthInterface__.js +426 -0
- package/out/concepts/CallAuthInterface__.js.map +1 -0
- package/out/concepts/CallConnector__.d.ts +56 -0
- package/out/concepts/CallConnector__.d.ts.map +1 -0
- package/out/concepts/CallConnector__.js +296 -0
- package/out/concepts/CallConnector__.js.map +1 -0
- package/out/concepts/CallEvent__.d.ts +103 -0
- package/out/concepts/CallEvent__.d.ts.map +1 -0
- package/out/concepts/CallEvent__.js +326 -0
- package/out/concepts/CallEvent__.js.map +1 -0
- package/out/concepts/CallFunction__.d.ts +173 -0
- package/out/concepts/CallFunction__.d.ts.map +1 -0
- package/out/concepts/CallFunction__.js +679 -0
- package/out/concepts/CallFunction__.js.map +1 -0
- package/out/concepts/CallInterface__.d.ts +145 -0
- package/out/concepts/CallInterface__.d.ts.map +1 -0
- package/out/concepts/CallInterface__.js +882 -0
- package/out/concepts/CallInterface__.js.map +1 -0
- package/out/concepts/CallLogic__.d.ts +247 -0
- package/out/concepts/CallLogic__.d.ts.map +1 -0
- package/out/concepts/CallLogic__.js +1583 -0
- package/out/concepts/CallLogic__.js.map +1 -0
- package/out/concepts/CallQueryComponent__.d.ts +380 -0
- package/out/concepts/CallQueryComponent__.d.ts.map +1 -0
- package/out/concepts/CallQueryComponent__.js +1227 -0
- package/out/concepts/CallQueryComponent__.js.map +1 -0
- package/out/concepts/CapsulesSetter__.d.ts +114 -0
- package/out/concepts/CapsulesSetter__.d.ts.map +1 -0
- package/out/concepts/CapsulesSetter__.js +172 -0
- package/out/concepts/CapsulesSetter__.js.map +1 -0
- package/out/concepts/Comment__.d.ts +42 -0
- package/out/concepts/Comment__.d.ts.map +1 -0
- package/out/concepts/Comment__.js +107 -0
- package/out/concepts/Comment__.js.map +1 -0
- package/out/concepts/CompletionProperty__.d.ts +88 -0
- package/out/concepts/CompletionProperty__.d.ts.map +1 -0
- package/out/concepts/CompletionProperty__.js +175 -0
- package/out/concepts/CompletionProperty__.js.map +1 -0
- package/out/concepts/ConfigGroup__.d.ts +122 -0
- package/out/concepts/ConfigGroup__.d.ts.map +1 -0
- package/out/concepts/ConfigGroup__.js +228 -0
- package/out/concepts/ConfigGroup__.js.map +1 -0
- package/out/concepts/ConfigPropertyValue__.d.ts +42 -0
- package/out/concepts/ConfigPropertyValue__.d.ts.map +1 -0
- package/out/concepts/ConfigPropertyValue__.js +83 -0
- package/out/concepts/ConfigPropertyValue__.js.map +1 -0
- package/out/concepts/ConfigProperty__.d.ts +148 -0
- package/out/concepts/ConfigProperty__.d.ts.map +1 -0
- package/out/concepts/ConfigProperty__.js +294 -0
- package/out/concepts/ConfigProperty__.js.map +1 -0
- package/out/concepts/Configuration__.d.ts +121 -0
- package/out/concepts/Configuration__.d.ts.map +1 -0
- package/out/concepts/Configuration__.js +202 -0
- package/out/concepts/Configuration__.js.map +1 -0
- package/out/concepts/Connection__.d.ts +165 -0
- package/out/concepts/Connection__.d.ts.map +1 -0
- package/out/concepts/Connection__.js +330 -0
- package/out/concepts/Connection__.js.map +1 -0
- package/out/concepts/ConnectorLogic__.d.ts +34 -0
- package/out/concepts/ConnectorLogic__.d.ts.map +1 -0
- package/out/concepts/ConnectorLogic__.js +69 -0
- package/out/concepts/ConnectorLogic__.js.map +1 -0
- package/out/concepts/ConnectorTriggerLauncher__.d.ts +45 -0
- package/out/concepts/ConnectorTriggerLauncher__.d.ts.map +1 -0
- package/out/concepts/ConnectorTriggerLauncher__.js +98 -0
- package/out/concepts/ConnectorTriggerLauncher__.js.map +1 -0
- package/out/concepts/ConnectorTrigger__.d.ts +94 -0
- package/out/concepts/ConnectorTrigger__.d.ts.map +1 -0
- package/out/concepts/ConnectorTrigger__.js +339 -0
- package/out/concepts/ConnectorTrigger__.js.map +1 -0
- package/out/concepts/Connector__.d.ts +533 -0
- package/out/concepts/Connector__.d.ts.map +1 -0
- package/out/concepts/Connector__.js +670 -0
- package/out/concepts/Connector__.js.map +1 -0
- package/out/concepts/Constant__.d.ts +95 -0
- package/out/concepts/Constant__.d.ts.map +1 -0
- package/out/concepts/Constant__.js +243 -0
- package/out/concepts/Constant__.js.map +1 -0
- package/out/concepts/CountersignPolicyV2__.d.ts +30 -0
- package/out/concepts/CountersignPolicyV2__.d.ts.map +1 -0
- package/out/concepts/CountersignPolicyV2__.js +58 -0
- package/out/concepts/CountersignPolicyV2__.js.map +1 -0
- package/out/concepts/CountersignPolicy__.d.ts +30 -0
- package/out/concepts/CountersignPolicy__.d.ts.map +1 -0
- package/out/concepts/CountersignPolicy__.js +58 -0
- package/out/concepts/CountersignPolicy__.js.map +1 -0
- package/out/concepts/DataSource__.d.ts +166 -0
- package/out/concepts/DataSource__.d.ts.map +1 -0
- package/out/concepts/DataSource__.js +516 -0
- package/out/concepts/DataSource__.js.map +1 -0
- package/out/concepts/DatabaseTypeAnnotation__.d.ts +36 -0
- package/out/concepts/DatabaseTypeAnnotation__.d.ts.map +1 -0
- package/out/concepts/DatabaseTypeAnnotation__.js +81 -0
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -0
- package/out/concepts/DefaultValue__.d.ts +96 -0
- package/out/concepts/DefaultValue__.d.ts.map +1 -0
- package/out/concepts/DefaultValue__.js +212 -0
- package/out/concepts/DefaultValue__.js.map +1 -0
- package/out/concepts/DepartmentManagerV2__.d.ts +30 -0
- package/out/concepts/DepartmentManagerV2__.d.ts.map +1 -0
- package/out/concepts/DepartmentManagerV2__.js +58 -0
- package/out/concepts/DepartmentManagerV2__.js.map +1 -0
- package/out/concepts/DepartmentV2__.d.ts +34 -0
- package/out/concepts/DepartmentV2__.d.ts.map +1 -0
- package/out/concepts/DepartmentV2__.js +65 -0
- package/out/concepts/DepartmentV2__.js.map +1 -0
- package/out/concepts/Destination__.d.ts +151 -0
- package/out/concepts/Destination__.d.ts.map +1 -0
- package/out/concepts/Destination__.js +771 -0
- package/out/concepts/Destination__.js.map +1 -0
- package/out/concepts/DirectManagerV2__.d.ts +26 -0
- package/out/concepts/DirectManagerV2__.d.ts.map +1 -0
- package/out/concepts/DirectManagerV2__.js +55 -0
- package/out/concepts/DirectManagerV2__.js.map +1 -0
- package/out/concepts/End__.d.ts +31 -0
- package/out/concepts/End__.d.ts.map +1 -0
- package/out/concepts/End__.js +150 -0
- package/out/concepts/End__.js.map +1 -0
- package/out/concepts/EntityIndex__.d.ts +94 -0
- package/out/concepts/EntityIndex__.d.ts.map +1 -0
- package/out/concepts/EntityIndex__.js +201 -0
- package/out/concepts/EntityIndex__.js.map +1 -0
- package/out/concepts/EntityProperty__.d.ts +254 -0
- package/out/concepts/EntityProperty__.d.ts.map +1 -0
- package/out/concepts/EntityProperty__.js +715 -0
- package/out/concepts/EntityProperty__.js.map +1 -0
- package/out/concepts/Entity__.d.ts +341 -0
- package/out/concepts/Entity__.d.ts.map +1 -0
- package/out/concepts/Entity__.js +783 -0
- package/out/concepts/Entity__.js.map +1 -0
- package/out/concepts/EnumItem__.d.ts +93 -0
- package/out/concepts/EnumItem__.d.ts.map +1 -0
- package/out/concepts/EnumItem__.js +235 -0
- package/out/concepts/EnumItem__.js.map +1 -0
- package/out/concepts/EnumSelectSetter__.d.ts +114 -0
- package/out/concepts/EnumSelectSetter__.d.ts.map +1 -0
- package/out/concepts/EnumSelectSetter__.js +172 -0
- package/out/concepts/EnumSelectSetter__.js.map +1 -0
- package/out/concepts/Enum__.d.ts +129 -0
- package/out/concepts/Enum__.d.ts.map +1 -0
- package/out/concepts/Enum__.js +342 -0
- package/out/concepts/Enum__.js.map +1 -0
- package/out/concepts/EventDeclaration__.d.ts +43 -0
- package/out/concepts/EventDeclaration__.d.ts.map +1 -0
- package/out/concepts/EventDeclaration__.js +109 -0
- package/out/concepts/EventDeclaration__.js.map +1 -0
- package/out/concepts/Event__.d.ts +156 -0
- package/out/concepts/Event__.d.ts.map +1 -0
- package/out/concepts/Event__.js +291 -0
- package/out/concepts/Event__.js.map +1 -0
- package/out/concepts/ExternalDestination__.d.ts +65 -0
- package/out/concepts/ExternalDestination__.d.ts.map +1 -0
- package/out/concepts/ExternalDestination__.js +285 -0
- package/out/concepts/ExternalDestination__.js.map +1 -0
- package/out/concepts/FieldPermissionV2__.d.ts +40 -0
- package/out/concepts/FieldPermissionV2__.d.ts.map +1 -0
- package/out/concepts/FieldPermissionV2__.js +85 -0
- package/out/concepts/FieldPermissionV2__.js.map +1 -0
- package/out/concepts/FlowConditionItemV2__.d.ts +45 -0
- package/out/concepts/FlowConditionItemV2__.d.ts.map +1 -0
- package/out/concepts/FlowConditionItemV2__.js +107 -0
- package/out/concepts/FlowConditionItemV2__.js.map +1 -0
- package/out/concepts/FlowConditionV2__.d.ts +116 -0
- package/out/concepts/FlowConditionV2__.d.ts.map +1 -0
- package/out/concepts/FlowConditionV2__.js +181 -0
- package/out/concepts/FlowConditionV2__.js.map +1 -0
- package/out/concepts/ForEachStatement__.d.ts +128 -0
- package/out/concepts/ForEachStatement__.d.ts.map +1 -0
- package/out/concepts/ForEachStatement__.js +398 -0
- package/out/concepts/ForEachStatement__.js.map +1 -0
- package/out/concepts/FrontendLibrary__.d.ts +213 -0
- package/out/concepts/FrontendLibrary__.d.ts.map +1 -0
- package/out/concepts/FrontendLibrary__.js +303 -0
- package/out/concepts/FrontendLibrary__.js.map +1 -0
- package/out/concepts/FrontendType__.d.ts +312 -0
- package/out/concepts/FrontendType__.d.ts.map +1 -0
- package/out/concepts/FrontendType__.js +550 -0
- package/out/concepts/FrontendType__.js.map +1 -0
- package/out/concepts/FrontendVariable__.d.ts +42 -0
- package/out/concepts/FrontendVariable__.d.ts.map +1 -0
- package/out/concepts/FrontendVariable__.js +81 -0
- package/out/concepts/FrontendVariable__.js.map +1 -0
- package/out/concepts/Frontend__.d.ts +395 -0
- package/out/concepts/Frontend__.d.ts.map +1 -0
- package/out/concepts/Frontend__.js +870 -0
- package/out/concepts/Frontend__.js.map +1 -0
- package/out/concepts/Function__.d.ts +400 -0
- package/out/concepts/Function__.d.ts.map +1 -0
- package/out/concepts/Function__.js +631 -0
- package/out/concepts/Function__.js.map +1 -0
- package/out/concepts/HistoryProcessV2__.d.ts +229 -0
- package/out/concepts/HistoryProcessV2__.d.ts.map +1 -0
- package/out/concepts/HistoryProcessV2__.js +345 -0
- package/out/concepts/HistoryProcessV2__.js.map +1 -0
- package/out/concepts/I18nInfo__.d.ts +48 -0
- package/out/concepts/I18nInfo__.d.ts.map +1 -0
- package/out/concepts/I18nInfo__.js +100 -0
- package/out/concepts/I18nInfo__.js.map +1 -0
- package/out/concepts/IconSetter__.d.ts +30 -0
- package/out/concepts/IconSetter__.d.ts.map +1 -0
- package/out/concepts/IconSetter__.js +58 -0
- package/out/concepts/IconSetter__.js.map +1 -0
- package/out/concepts/Identifier__.d.ts +69 -0
- package/out/concepts/Identifier__.d.ts.map +1 -0
- package/out/concepts/Identifier__.js +437 -0
- package/out/concepts/Identifier__.js.map +1 -0
- package/out/concepts/IfStatement__.d.ts +157 -0
- package/out/concepts/IfStatement__.d.ts.map +1 -0
- package/out/concepts/IfStatement__.js +365 -0
- package/out/concepts/IfStatement__.js.map +1 -0
- package/out/concepts/ImageSetter__.d.ts +26 -0
- package/out/concepts/ImageSetter__.d.ts.map +1 -0
- package/out/concepts/ImageSetter__.js +55 -0
- package/out/concepts/ImageSetter__.js.map +1 -0
- package/out/concepts/ImportedInterface__.d.ts +31 -0
- package/out/concepts/ImportedInterface__.d.ts.map +1 -0
- package/out/concepts/ImportedInterface__.js +58 -0
- package/out/concepts/ImportedInterface__.js.map +1 -0
- package/out/concepts/InputSetter__.d.ts +30 -0
- package/out/concepts/InputSetter__.d.ts.map +1 -0
- package/out/concepts/InputSetter__.js +58 -0
- package/out/concepts/InputSetter__.js.map +1 -0
- package/out/concepts/Integration__.d.ts +129 -0
- package/out/concepts/Integration__.d.ts.map +1 -0
- package/out/concepts/Integration__.js +215 -0
- package/out/concepts/Integration__.js.map +1 -0
- package/out/concepts/InterfaceParam__.d.ts +121 -0
- package/out/concepts/InterfaceParam__.d.ts.map +1 -0
- package/out/concepts/InterfaceParam__.js +285 -0
- package/out/concepts/InterfaceParam__.js.map +1 -0
- package/out/concepts/InterfaceTriggerEvent__.d.ts +35 -0
- package/out/concepts/InterfaceTriggerEvent__.d.ts.map +1 -0
- package/out/concepts/InterfaceTriggerEvent__.js +74 -0
- package/out/concepts/InterfaceTriggerEvent__.js.map +1 -0
- package/out/concepts/Interface__.d.ts +406 -0
- package/out/concepts/Interface__.d.ts.map +1 -0
- package/out/concepts/Interface__.js +994 -0
- package/out/concepts/Interface__.js.map +1 -0
- package/out/concepts/JSBlock__.d.ts +40 -0
- package/out/concepts/JSBlock__.d.ts.map +1 -0
- package/out/concepts/JSBlock__.js +110 -0
- package/out/concepts/JSBlock__.js.map +1 -0
- package/out/concepts/JavaLogic__.d.ts +51 -0
- package/out/concepts/JavaLogic__.d.ts.map +1 -0
- package/out/concepts/JavaLogic__.js +116 -0
- package/out/concepts/JavaLogic__.js.map +1 -0
- package/out/concepts/LogicDeclaration__.d.ts +292 -0
- package/out/concepts/LogicDeclaration__.d.ts.map +1 -0
- package/out/concepts/LogicDeclaration__.js +421 -0
- package/out/concepts/LogicDeclaration__.js.map +1 -0
- package/out/concepts/LogicItem__.d.ts +188 -0
- package/out/concepts/LogicItem__.d.ts.map +1 -0
- package/out/concepts/LogicItem__.js +322 -0
- package/out/concepts/LogicItem__.js.map +1 -0
- package/out/concepts/Logic__.d.ts +657 -0
- package/out/concepts/Logic__.d.ts.map +1 -0
- package/out/concepts/Logic__.js +2280 -0
- package/out/concepts/Logic__.js.map +1 -0
- package/out/concepts/ManagerV2__.d.ts +36 -0
- package/out/concepts/ManagerV2__.d.ts.map +1 -0
- package/out/concepts/ManagerV2__.js +63 -0
- package/out/concepts/ManagerV2__.js.map +1 -0
- package/out/concepts/MatchCase__.d.ts +266 -0
- package/out/concepts/MatchCase__.d.ts.map +1 -0
- package/out/concepts/MatchCase__.js +677 -0
- package/out/concepts/MatchCase__.js.map +1 -0
- package/out/concepts/Match__.d.ts +125 -0
- package/out/concepts/Match__.d.ts.map +1 -0
- package/out/concepts/Match__.js +685 -0
- package/out/concepts/Match__.js.map +1 -0
- package/out/concepts/MemberExpression__.d.ts +66 -0
- package/out/concepts/MemberExpression__.d.ts.map +1 -0
- package/out/concepts/MemberExpression__.js +514 -0
- package/out/concepts/MemberExpression__.js.map +1 -0
- package/out/concepts/MetadataType__.d.ts +222 -0
- package/out/concepts/MetadataType__.d.ts.map +1 -0
- package/out/concepts/MetadataType__.js +422 -0
- package/out/concepts/MetadataType__.js.map +1 -0
- package/out/concepts/MicroApp__.d.ts +54 -0
- package/out/concepts/MicroApp__.d.ts.map +1 -0
- package/out/concepts/MicroApp__.js +80 -0
- package/out/concepts/MicroApp__.js.map +1 -0
- package/out/concepts/Module__.d.ts +1314 -0
- package/out/concepts/Module__.d.ts.map +1 -0
- package/out/concepts/Module__.js +1580 -0
- package/out/concepts/Module__.js.map +1 -0
- package/out/concepts/MsgTriggerEvent__.d.ts +139 -0
- package/out/concepts/MsgTriggerEvent__.d.ts.map +1 -0
- package/out/concepts/MsgTriggerEvent__.js +210 -0
- package/out/concepts/MsgTriggerEvent__.js.map +1 -0
- package/out/concepts/MsgTriggerLauncher__.d.ts +120 -0
- package/out/concepts/MsgTriggerLauncher__.d.ts.map +1 -0
- package/out/concepts/MsgTriggerLauncher__.js +189 -0
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -0
- package/out/concepts/MultiApprovalPolicy__.d.ts +27 -0
- package/out/concepts/MultiApprovalPolicy__.d.ts.map +1 -0
- package/out/concepts/MultiApprovalPolicy__.js +55 -0
- package/out/concepts/MultiApprovalPolicy__.js.map +1 -0
- package/out/concepts/Namespace__.d.ts +1146 -0
- package/out/concepts/Namespace__.d.ts.map +1 -0
- package/out/concepts/Namespace__.js +1256 -0
- package/out/concepts/Namespace__.js.map +1 -0
- package/out/concepts/NewComposite__.d.ts +341 -0
- package/out/concepts/NewComposite__.d.ts.map +1 -0
- package/out/concepts/NewComposite__.js +1225 -0
- package/out/concepts/NewComposite__.js.map +1 -0
- package/out/concepts/NewList__.d.ts +128 -0
- package/out/concepts/NewList__.d.ts.map +1 -0
- package/out/concepts/NewList__.js +408 -0
- package/out/concepts/NewList__.js.map +1 -0
- package/out/concepts/NewMap__.d.ts +219 -0
- package/out/concepts/NewMap__.d.ts.map +1 -0
- package/out/concepts/NewMap__.js +558 -0
- package/out/concepts/NewMap__.js.map +1 -0
- package/out/concepts/New__.d.ts +32 -0
- package/out/concepts/New__.d.ts.map +1 -0
- package/out/concepts/New__.js +80 -0
- package/out/concepts/New__.js.map +1 -0
- package/out/concepts/NullLiteral__.d.ts +37 -0
- package/out/concepts/NullLiteral__.d.ts.map +1 -0
- package/out/concepts/NullLiteral__.js +102 -0
- package/out/concepts/NullLiteral__.js.map +1 -0
- package/out/concepts/NumberInputSetter__.d.ts +46 -0
- package/out/concepts/NumberInputSetter__.d.ts.map +1 -0
- package/out/concepts/NumberInputSetter__.js +70 -0
- package/out/concepts/NumberInputSetter__.js.map +1 -0
- package/out/concepts/NumericLiteral__.d.ts +49 -0
- package/out/concepts/NumericLiteral__.d.ts.map +1 -0
- package/out/concepts/NumericLiteral__.js +141 -0
- package/out/concepts/NumericLiteral__.js.map +1 -0
- package/out/concepts/OperatePermissionV2__.d.ts +44 -0
- package/out/concepts/OperatePermissionV2__.d.ts.map +1 -0
- package/out/concepts/OperatePermissionV2__.js +82 -0
- package/out/concepts/OperatePermissionV2__.js.map +1 -0
- package/out/concepts/OqlQueryComponent__.d.ts +63 -0
- package/out/concepts/OqlQueryComponent__.d.ts.map +1 -0
- package/out/concepts/OqlQueryComponent__.js +313 -0
- package/out/concepts/OqlQueryComponent__.js.map +1 -0
- package/out/concepts/OrSignPolicyV2__.d.ts +26 -0
- package/out/concepts/OrSignPolicyV2__.d.ts.map +1 -0
- package/out/concepts/OrSignPolicyV2__.js +55 -0
- package/out/concepts/OrSignPolicyV2__.js.map +1 -0
- package/out/concepts/OverriddenLogic__.d.ts +618 -0
- package/out/concepts/OverriddenLogic__.d.ts.map +1 -0
- package/out/concepts/OverriddenLogic__.js +1657 -0
- package/out/concepts/OverriddenLogic__.js.map +1 -0
- package/out/concepts/Paginate__.d.ts +57 -0
- package/out/concepts/Paginate__.d.ts.map +1 -0
- package/out/concepts/Paginate__.js +163 -0
- package/out/concepts/Paginate__.js.map +1 -0
- package/out/concepts/ParamWithGroup__.d.ts +44 -0
- package/out/concepts/ParamWithGroup__.d.ts.map +1 -0
- package/out/concepts/ParamWithGroup__.js +161 -0
- package/out/concepts/ParamWithGroup__.js.map +1 -0
- package/out/concepts/Param__.d.ts +145 -0
- package/out/concepts/Param__.d.ts.map +1 -0
- package/out/concepts/Param__.js +453 -0
- package/out/concepts/Param__.js.map +1 -0
- package/out/concepts/Point__.d.ts +34 -0
- package/out/concepts/Point__.d.ts.map +1 -0
- package/out/concepts/Point__.js +61 -0
- package/out/concepts/Point__.js.map +1 -0
- package/out/concepts/ProcessBindV2__.d.ts +53 -0
- package/out/concepts/ProcessBindV2__.d.ts.map +1 -0
- package/out/concepts/ProcessBindV2__.js +114 -0
- package/out/concepts/ProcessBindV2__.js.map +1 -0
- package/out/concepts/ProcessComponentV2__.d.ts +126 -0
- package/out/concepts/ProcessComponentV2__.d.ts.map +1 -0
- package/out/concepts/ProcessComponentV2__.js +186 -0
- package/out/concepts/ProcessComponentV2__.js.map +1 -0
- package/out/concepts/ProcessComponent__.d.ts +215 -0
- package/out/concepts/ProcessComponent__.d.ts.map +1 -0
- package/out/concepts/ProcessComponent__.js +276 -0
- package/out/concepts/ProcessComponent__.js.map +1 -0
- package/out/concepts/ProcessElementV2__.d.ts +552 -0
- package/out/concepts/ProcessElementV2__.d.ts.map +1 -0
- package/out/concepts/ProcessElementV2__.js +954 -0
- package/out/concepts/ProcessElementV2__.js.map +1 -0
- package/out/concepts/ProcessElement__.d.ts +628 -0
- package/out/concepts/ProcessElement__.d.ts.map +1 -0
- package/out/concepts/ProcessElement__.js +1079 -0
- package/out/concepts/ProcessElement__.js.map +1 -0
- package/out/concepts/ProcessOutcome__.d.ts +36 -0
- package/out/concepts/ProcessOutcome__.d.ts.map +1 -0
- package/out/concepts/ProcessOutcome__.js +97 -0
- package/out/concepts/ProcessOutcome__.js.map +1 -0
- package/out/concepts/ProcessOutcomes__.d.ts +36 -0
- package/out/concepts/ProcessOutcomes__.d.ts.map +1 -0
- package/out/concepts/ProcessOutcomes__.js +104 -0
- package/out/concepts/ProcessOutcomes__.js.map +1 -0
- package/out/concepts/ProcessV2__.d.ts +433 -0
- package/out/concepts/ProcessV2__.d.ts.map +1 -0
- package/out/concepts/ProcessV2__.js +732 -0
- package/out/concepts/ProcessV2__.js.map +1 -0
- package/out/concepts/Process__.d.ts +615 -0
- package/out/concepts/Process__.d.ts.map +1 -0
- package/out/concepts/Process__.js +985 -0
- package/out/concepts/Process__.js.map +1 -0
- package/out/concepts/PropDeclaration__.d.ts +109 -0
- package/out/concepts/PropDeclaration__.d.ts.map +1 -0
- package/out/concepts/PropDeclaration__.js +137 -0
- package/out/concepts/PropDeclaration__.js.map +1 -0
- package/out/concepts/PropertySelectSetter__.d.ts +26 -0
- package/out/concepts/PropertySelectSetter__.d.ts.map +1 -0
- package/out/concepts/PropertySelectSetter__.js +55 -0
- package/out/concepts/PropertySelectSetter__.js.map +1 -0
- package/out/concepts/QueryAggregateExpression__.d.ts +51 -0
- package/out/concepts/QueryAggregateExpression__.d.ts.map +1 -0
- package/out/concepts/QueryAggregateExpression__.js +126 -0
- package/out/concepts/QueryAggregateExpression__.js.map +1 -0
- package/out/concepts/QueryFieldExpression__.d.ts +67 -0
- package/out/concepts/QueryFieldExpression__.d.ts.map +1 -0
- package/out/concepts/QueryFieldExpression__.js +207 -0
- package/out/concepts/QueryFieldExpression__.js.map +1 -0
- package/out/concepts/QueryFromExpression__.d.ts +108 -0
- package/out/concepts/QueryFromExpression__.d.ts.map +1 -0
- package/out/concepts/QueryFromExpression__.js +244 -0
- package/out/concepts/QueryFromExpression__.js.map +1 -0
- package/out/concepts/QueryGroupByExpression__.d.ts +48 -0
- package/out/concepts/QueryGroupByExpression__.d.ts.map +1 -0
- package/out/concepts/QueryGroupByExpression__.js +123 -0
- package/out/concepts/QueryGroupByExpression__.js.map +1 -0
- package/out/concepts/QueryJoinExpression__.d.ts +195 -0
- package/out/concepts/QueryJoinExpression__.d.ts.map +1 -0
- package/out/concepts/QueryJoinExpression__.js +357 -0
- package/out/concepts/QueryJoinExpression__.js.map +1 -0
- package/out/concepts/QueryLimitExpression__.d.ts +48 -0
- package/out/concepts/QueryLimitExpression__.d.ts.map +1 -0
- package/out/concepts/QueryLimitExpression__.js +141 -0
- package/out/concepts/QueryLimitExpression__.js.map +1 -0
- package/out/concepts/QueryOrderByExpression__.d.ts +59 -0
- package/out/concepts/QueryOrderByExpression__.d.ts.map +1 -0
- package/out/concepts/QueryOrderByExpression__.js +158 -0
- package/out/concepts/QueryOrderByExpression__.js.map +1 -0
- package/out/concepts/QuerySelectExpression__.d.ts +213 -0
- package/out/concepts/QuerySelectExpression__.d.ts.map +1 -0
- package/out/concepts/QuerySelectExpression__.js +346 -0
- package/out/concepts/QuerySelectExpression__.js.map +1 -0
- package/out/concepts/Rect__.d.ts +42 -0
- package/out/concepts/Rect__.d.ts.map +1 -0
- package/out/concepts/Rect__.js +67 -0
- package/out/concepts/Rect__.js.map +1 -0
- package/out/concepts/Return__.d.ts +122 -0
- package/out/concepts/Return__.d.ts.map +1 -0
- package/out/concepts/Return__.js +359 -0
- package/out/concepts/Return__.js.map +1 -0
- package/out/concepts/Role__.d.ts +60 -0
- package/out/concepts/Role__.d.ts.map +1 -0
- package/out/concepts/Role__.js +188 -0
- package/out/concepts/Role__.js.map +1 -0
- package/out/concepts/SelectMembers__.d.ts +136 -0
- package/out/concepts/SelectMembers__.d.ts.map +1 -0
- package/out/concepts/SelectMembers__.js +259 -0
- package/out/concepts/SelectMembers__.js.map +1 -0
- package/out/concepts/SequentialPolicyV2__.d.ts +26 -0
- package/out/concepts/SequentialPolicyV2__.d.ts.map +1 -0
- package/out/concepts/SequentialPolicyV2__.js +55 -0
- package/out/concepts/SequentialPolicyV2__.js.map +1 -0
- package/out/concepts/SequentialPolicy__.d.ts +26 -0
- package/out/concepts/SequentialPolicy__.d.ts.map +1 -0
- package/out/concepts/SequentialPolicy__.js +55 -0
- package/out/concepts/SequentialPolicy__.js.map +1 -0
- package/out/concepts/SetterOption__.d.ts +50 -0
- package/out/concepts/SetterOption__.d.ts.map +1 -0
- package/out/concepts/SetterOption__.js +73 -0
- package/out/concepts/SetterOption__.js.map +1 -0
- package/out/concepts/SlotDeclaration__.d.ts +215 -0
- package/out/concepts/SlotDeclaration__.d.ts.map +1 -0
- package/out/concepts/SlotDeclaration__.js +285 -0
- package/out/concepts/SlotDeclaration__.js.map +1 -0
- package/out/concepts/Slot__.d.ts +54 -0
- package/out/concepts/Slot__.d.ts.map +1 -0
- package/out/concepts/Slot__.js +95 -0
- package/out/concepts/Slot__.js.map +1 -0
- package/out/concepts/SqlQueryComponent__.d.ts +59 -0
- package/out/concepts/SqlQueryComponent__.d.ts.map +1 -0
- package/out/concepts/SqlQueryComponent__.js +220 -0
- package/out/concepts/SqlQueryComponent__.js.map +1 -0
- package/out/concepts/Start__.d.ts +31 -0
- package/out/concepts/Start__.d.ts.map +1 -0
- package/out/concepts/Start__.js +75 -0
- package/out/concepts/Start__.js.map +1 -0
- package/out/concepts/StaticString__.d.ts +50 -0
- package/out/concepts/StaticString__.d.ts.map +1 -0
- package/out/concepts/StaticString__.js +114 -0
- package/out/concepts/StaticString__.js.map +1 -0
- package/out/concepts/StringInterpolation__.d.ts +124 -0
- package/out/concepts/StringInterpolation__.d.ts.map +1 -0
- package/out/concepts/StringInterpolation__.js +279 -0
- package/out/concepts/StringInterpolation__.js.map +1 -0
- package/out/concepts/StringLiteral__.d.ts +52 -0
- package/out/concepts/StringLiteral__.d.ts.map +1 -0
- package/out/concepts/StringLiteral__.js +185 -0
- package/out/concepts/StringLiteral__.js.map +1 -0
- package/out/concepts/StructureProperty__.d.ts +134 -0
- package/out/concepts/StructureProperty__.d.ts.map +1 -0
- package/out/concepts/StructureProperty__.js +292 -0
- package/out/concepts/StructureProperty__.js.map +1 -0
- package/out/concepts/Structure__.d.ts +241 -0
- package/out/concepts/Structure__.d.ts.map +1 -0
- package/out/concepts/Structure__.js +485 -0
- package/out/concepts/Structure__.js.map +1 -0
- package/out/concepts/SubLogic__.d.ts +418 -0
- package/out/concepts/SubLogic__.d.ts.map +1 -0
- package/out/concepts/SubLogic__.js +1002 -0
- package/out/concepts/SubLogic__.js.map +1 -0
- package/out/concepts/SwitchCase__.d.ts +93 -0
- package/out/concepts/SwitchCase__.d.ts.map +1 -0
- package/out/concepts/SwitchCase__.js +282 -0
- package/out/concepts/SwitchCase__.js.map +1 -0
- package/out/concepts/SwitchSetter__.d.ts +26 -0
- package/out/concepts/SwitchSetter__.d.ts.map +1 -0
- package/out/concepts/SwitchSetter__.js +55 -0
- package/out/concepts/SwitchSetter__.js.map +1 -0
- package/out/concepts/SwitchStatement__.d.ts +92 -0
- package/out/concepts/SwitchStatement__.d.ts.map +1 -0
- package/out/concepts/SwitchStatement__.js +221 -0
- package/out/concepts/SwitchStatement__.js.map +1 -0
- package/out/concepts/ThemeVariable__.d.ts +30 -0
- package/out/concepts/ThemeVariable__.d.ts.map +1 -0
- package/out/concepts/ThemeVariable__.js +58 -0
- package/out/concepts/ThemeVariable__.js.map +1 -0
- package/out/concepts/Theme__.d.ts +44 -0
- package/out/concepts/Theme__.d.ts.map +1 -0
- package/out/concepts/Theme__.js +83 -0
- package/out/concepts/Theme__.js.map +1 -0
- package/out/concepts/Transactional__.d.ts +86 -0
- package/out/concepts/Transactional__.d.ts.map +1 -0
- package/out/concepts/Transactional__.js +150 -0
- package/out/concepts/Transactional__.js.map +1 -0
- package/out/concepts/TriggerEvent__.d.ts +44 -0
- package/out/concepts/TriggerEvent__.d.ts.map +1 -0
- package/out/concepts/TriggerEvent__.js +93 -0
- package/out/concepts/TriggerEvent__.js.map +1 -0
- package/out/concepts/TriggerLauncher__.d.ts +77 -0
- package/out/concepts/TriggerLauncher__.d.ts.map +1 -0
- package/out/concepts/TriggerLauncher__.js +232 -0
- package/out/concepts/TriggerLauncher__.js.map +1 -0
- package/out/concepts/TypeAnnotation__.d.ts +310 -0
- package/out/concepts/TypeAnnotation__.d.ts.map +1 -0
- package/out/concepts/TypeAnnotation__.js +1169 -0
- package/out/concepts/TypeAnnotation__.js.map +1 -0
- package/out/concepts/TypeParam__.d.ts +40 -0
- package/out/concepts/TypeParam__.d.ts.map +1 -0
- package/out/concepts/TypeParam__.js +91 -0
- package/out/concepts/TypeParam__.js.map +1 -0
- package/out/concepts/UnaryExpression__.d.ts +48 -0
- package/out/concepts/UnaryExpression__.d.ts.map +1 -0
- package/out/concepts/UnaryExpression__.js +176 -0
- package/out/concepts/UnaryExpression__.js.map +1 -0
- package/out/concepts/Unparsed__.d.ts +42 -0
- package/out/concepts/Unparsed__.d.ts.map +1 -0
- package/out/concepts/Unparsed__.js +98 -0
- package/out/concepts/Unparsed__.js.map +1 -0
- package/out/concepts/UseComponent__.d.ts +34 -0
- package/out/concepts/UseComponent__.d.ts.map +1 -0
- package/out/concepts/UseComponent__.js +61 -0
- package/out/concepts/UseComponent__.js.map +1 -0
- package/out/concepts/ValidationRule__.d.ts +130 -0
- package/out/concepts/ValidationRule__.d.ts.map +1 -0
- package/out/concepts/ValidationRule__.js +542 -0
- package/out/concepts/ValidationRule__.js.map +1 -0
- package/out/concepts/Variable__.d.ts +140 -0
- package/out/concepts/Variable__.d.ts.map +1 -0
- package/out/concepts/Variable__.js +457 -0
- package/out/concepts/Variable__.js.map +1 -0
- package/out/concepts/ViewBlockWithImage__.d.ts +34 -0
- package/out/concepts/ViewBlockWithImage__.d.ts.map +1 -0
- package/out/concepts/ViewBlockWithImage__.js +61 -0
- package/out/concepts/ViewBlockWithImage__.js.map +1 -0
- package/out/concepts/ViewBlock__.d.ts +38 -0
- package/out/concepts/ViewBlock__.d.ts.map +1 -0
- package/out/concepts/ViewBlock__.js +64 -0
- package/out/concepts/ViewBlock__.js.map +1 -0
- package/out/concepts/ViewComponentDeclaration__.d.ts +727 -0
- package/out/concepts/ViewComponentDeclaration__.d.ts.map +1 -0
- package/out/concepts/ViewComponentDeclaration__.js +833 -0
- package/out/concepts/ViewComponentDeclaration__.js.map +1 -0
- package/out/concepts/ViewElement__.d.ts +666 -0
- package/out/concepts/ViewElement__.d.ts.map +1 -0
- package/out/concepts/ViewElement__.js +2929 -0
- package/out/concepts/ViewElement__.js.map +1 -0
- package/out/concepts/View__.d.ts +754 -0
- package/out/concepts/View__.d.ts.map +1 -0
- package/out/concepts/View__.js +2907 -0
- package/out/concepts/View__.js.map +1 -0
- package/out/concepts/WhileStatement__.d.ts +96 -0
- package/out/concepts/WhileStatement__.d.ts.map +1 -0
- package/out/concepts/WhileStatement__.js +256 -0
- package/out/concepts/WhileStatement__.js.map +1 -0
- package/out/concepts/basics/index.d.ts +16 -0
- package/out/concepts/basics/index.d.ts.map +1 -0
- package/out/concepts/basics/index.js +54 -0
- package/out/concepts/basics/index.js.map +1 -0
- package/out/concepts/basics/stdlib/index.d.ts +16 -0
- package/out/concepts/basics/stdlib/index.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/index.js +93 -0
- package/out/concepts/basics/stdlib/index.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.auth.d.ts +10 -0
- package/out/concepts/basics/stdlib/nasl.auth.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.auth.js +206 -0
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.browser.d.ts +6 -0
- package/out/concepts/basics/stdlib/nasl.browser.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.browser.js +200 -0
- package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.collection.d.ts +10 -0
- package/out/concepts/basics/stdlib/nasl.collection.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.collection.js +57 -0
- package/out/concepts/basics/stdlib/nasl.collection.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.configuration.d.ts +10 -0
- package/out/concepts/basics/stdlib/nasl.configuration.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js +97 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.core.d.ts +8 -0
- package/out/concepts/basics/stdlib/nasl.core.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.core.js +47 -0
- package/out/concepts/basics/stdlib/nasl.core.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.event.d.ts +6 -0
- package/out/concepts/basics/stdlib/nasl.event.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.event.js +34 -0
- package/out/concepts/basics/stdlib/nasl.event.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.http.d.ts +10 -0
- package/out/concepts/basics/stdlib/nasl.http.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.http.js +174 -0
- package/out/concepts/basics/stdlib/nasl.http.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.interface.d.ts +10 -0
- package/out/concepts/basics/stdlib/nasl.interface.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.interface.js +49 -0
- package/out/concepts/basics/stdlib/nasl.interface.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.io.d.ts +6 -0
- package/out/concepts/basics/stdlib/nasl.io.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.io.js +61 -0
- package/out/concepts/basics/stdlib/nasl.io.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.logging.d.ts +6 -0
- package/out/concepts/basics/stdlib/nasl.logging.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.logging.js +65 -0
- package/out/concepts/basics/stdlib/nasl.logging.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.process.d.ts +10 -0
- package/out/concepts/basics/stdlib/nasl.process.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.process.js +741 -0
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.processV2.d.ts +12 -0
- package/out/concepts/basics/stdlib/nasl.processV2.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.processV2.js +967 -0
- package/out/concepts/basics/stdlib/nasl.processV2.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.ui.d.ts +10 -0
- package/out/concepts/basics/stdlib/nasl.ui.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.ui.js +1038 -0
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.util.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.util.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.util.js +2501 -0
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.validation.d.ts +6 -0
- package/out/concepts/basics/stdlib/nasl.validation.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/nasl.validation.js +680 -0
- package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +5 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +47 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +1 -0
- package/out/concepts/basics/stdlib/timeZone.d.ts +6 -0
- package/out/concepts/basics/stdlib/timeZone.d.ts.map +1 -0
- package/out/concepts/basics/stdlib/timeZone.js +196 -0
- package/out/concepts/basics/stdlib/timeZone.js.map +1 -0
- package/out/concepts/basics/types/coreTypeList.d.ts +5 -0
- package/out/concepts/basics/types/coreTypeList.d.ts.map +1 -0
- package/out/concepts/basics/types/coreTypeList.js +14 -0
- package/out/concepts/basics/types/coreTypeList.js.map +1 -0
- package/out/concepts/basics/types/dataTypes.d.ts +9 -0
- package/out/concepts/basics/types/dataTypes.d.ts.map +1 -0
- package/out/concepts/basics/types/dataTypes.js +18 -0
- package/out/concepts/basics/types/dataTypes.js.map +1 -0
- package/out/concepts/basics/types/index.d.ts +5 -0
- package/out/concepts/basics/types/index.d.ts.map +1 -0
- package/out/concepts/basics/types/index.js +17 -0
- package/out/concepts/basics/types/index.js.map +1 -0
- package/out/concepts/index.d.ts +6 -0
- package/out/concepts/index.d.ts.map +1 -0
- package/out/concepts/index.js +36 -0
- package/out/concepts/index.js.map +1 -0
- package/out/concepts/index__.d.ts +178 -0
- package/out/concepts/index__.d.ts.map +1 -0
- package/out/concepts/index__.js +194 -0
- package/out/concepts/index__.js.map +1 -0
- package/out/concepts/types__.d.ts +2 -0
- package/out/concepts/types__.d.ts.map +1 -0
- package/out/concepts/types__.js +3 -0
- package/out/concepts/types__.js.map +1 -0
- package/out/concepts/utils/asserts.d.ts +8822 -0
- package/out/concepts/utils/asserts.d.ts.map +1 -0
- package/out/concepts/utils/asserts.js +11727 -0
- package/out/concepts/utils/asserts.js.map +1 -0
- package/out/concepts/utils/quick-info.d.ts +21 -0
- package/out/concepts/utils/quick-info.d.ts.map +1 -0
- package/out/concepts/utils/quick-info.js +108 -0
- package/out/concepts/utils/quick-info.js.map +1 -0
- package/out/concepts/utils/types.d.ts +580 -0
- package/out/concepts/utils/types.d.ts.map +1 -0
- package/out/concepts/utils/types.js +3 -0
- package/out/concepts/utils/types.js.map +1 -0
- package/out/decorators/constant.d.ts +12 -0
- package/out/decorators/constant.d.ts.map +1 -0
- package/out/decorators/constant.js +6 -0
- package/out/decorators/constant.js.map +1 -0
- package/out/decorators/index.d.ts +34 -0
- package/out/decorators/index.d.ts.map +1 -0
- package/out/decorators/index.js +123 -0
- package/out/decorators/index.js.map +1 -0
- package/out/decorators/utils.d.ts +22 -0
- package/out/decorators/utils.d.ts.map +1 -0
- package/out/decorators/utils.js +50 -0
- package/out/decorators/utils.js.map +1 -0
- package/out/index.d.ts +13 -0
- package/out/index.d.ts.map +1 -0
- package/out/index.js +49 -0
- package/out/index.js.map +1 -0
- package/out/service/actionable.d.ts +3 -0
- package/out/service/actionable.d.ts.map +1 -0
- package/out/service/actionable.js +9 -0
- package/out/service/actionable.js.map +1 -0
- package/out/service/engine.d.ts +7 -0
- package/out/service/engine.d.ts.map +1 -0
- package/out/service/engine.js +120 -0
- package/out/service/engine.js.map +1 -0
- package/out/service/entity2LogicNamespace.d.ts +11 -0
- package/out/service/entity2LogicNamespace.d.ts.map +1 -0
- package/out/service/entity2LogicNamespace.js +379 -0
- package/out/service/entity2LogicNamespace.js.map +1 -0
- package/out/service/formatTsUtils.d.ts +37 -0
- package/out/service/formatTsUtils.d.ts.map +1 -0
- package/out/service/formatTsUtils.js +876 -0
- package/out/service/formatTsUtils.js.map +1 -0
- package/out/service/getConnector.d.ts +13 -0
- package/out/service/getConnector.d.ts.map +1 -0
- package/out/service/getConnector.js +117 -0
- package/out/service/getConnector.js.map +1 -0
- package/out/service/getExtensionModules.d.ts +4 -0
- package/out/service/getExtensionModules.d.ts.map +1 -0
- package/out/service/getExtensionModules.js +34 -0
- package/out/service/getExtensionModules.js.map +1 -0
- package/out/service/getFunctions.d.ts +4 -0
- package/out/service/getFunctions.d.ts.map +1 -0
- package/out/service/getFunctions.js +20 -0
- package/out/service/getFunctions.js.map +1 -0
- package/out/service/getInterfaces.d.ts +3 -0
- package/out/service/getInterfaces.d.ts.map +1 -0
- package/out/service/getInterfaces.js +48 -0
- package/out/service/getInterfaces.js.map +1 -0
- package/out/service/getLogging.d.ts +2 -0
- package/out/service/getLogging.d.ts.map +1 -0
- package/out/service/getLogging.js +9 -0
- package/out/service/getLogging.js.map +1 -0
- package/out/service/getLogics.d.ts +6 -0
- package/out/service/getLogics.d.ts.map +1 -0
- package/out/service/getLogics.js +509 -0
- package/out/service/getLogics.js.map +1 -0
- package/out/service/getMemberIdentifier.d.ts +18 -0
- package/out/service/getMemberIdentifier.d.ts.map +1 -0
- package/out/service/getMemberIdentifier.js +489 -0
- package/out/service/getMemberIdentifier.js.map +1 -0
- package/out/service/getProcessComponents.d.ts +3 -0
- package/out/service/getProcessComponents.d.ts.map +1 -0
- package/out/service/getProcessComponents.js +13 -0
- package/out/service/getProcessComponents.js.map +1 -0
- package/out/service/getProcesses.d.ts +34 -0
- package/out/service/getProcesses.d.ts.map +1 -0
- package/out/service/getProcesses.js +644 -0
- package/out/service/getProcesses.js.map +1 -0
- package/out/service/getProcessesV2.d.ts +91 -0
- package/out/service/getProcessesV2.d.ts.map +1 -0
- package/out/service/getProcessesV2.js +687 -0
- package/out/service/getProcessesV2.js.map +1 -0
- package/out/service/getValidates.d.ts +4 -0
- package/out/service/getValidates.d.ts.map +1 -0
- package/out/service/getValidates.js +14 -0
- package/out/service/getValidates.js.map +1 -0
- package/out/service/index.d.ts +19 -0
- package/out/service/index.d.ts.map +1 -0
- package/out/service/index.js +48 -0
- package/out/service/index.js.map +1 -0
- package/out/service/modules.d.ts +9 -0
- package/out/service/modules.d.ts.map +1 -0
- package/out/service/modules.js +88 -0
- package/out/service/modules.js.map +1 -0
- package/out/service/process2LogicNamespace.d.ts +27 -0
- package/out/service/process2LogicNamespace.d.ts.map +1 -0
- package/out/service/process2LogicNamespace.js +109 -0
- package/out/service/process2LogicNamespace.js.map +1 -0
- package/out/service/transform.d.ts +9 -0
- package/out/service/transform.d.ts.map +1 -0
- package/out/service/transform.js +36 -0
- package/out/service/transform.js.map +1 -0
- package/out/store/event.d.ts +14 -0
- package/out/store/event.d.ts.map +1 -0
- package/out/store/event.js +19 -0
- package/out/store/event.js.map +1 -0
- package/out/store/index.d.ts +8 -0
- package/out/store/index.d.ts.map +1 -0
- package/out/store/index.js +25 -0
- package/out/store/index.js.map +1 -0
- package/out/store/lib.d.ts +16 -0
- package/out/store/lib.d.ts.map +1 -0
- package/out/store/lib.js +21 -0
- package/out/store/lib.js.map +1 -0
- package/out/store/store.d.ts +16 -0
- package/out/store/store.d.ts.map +1 -0
- package/out/store/store.js +18 -0
- package/out/store/store.js.map +1 -0
- package/out/utils/bak-translator.d.ts +2 -0
- package/out/utils/bak-translator.d.ts.map +1 -0
- package/out/utils/bak-translator.js +334 -0
- package/out/utils/bak-translator.js.map +1 -0
- package/out/utils/constant.d.ts +4 -0
- package/out/utils/constant.d.ts.map +1 -0
- package/out/utils/constant.js +34 -0
- package/out/utils/constant.js.map +1 -0
- package/out/utils/index.d.ts +6 -0
- package/out/utils/index.d.ts.map +1 -0
- package/out/utils/index.js +22 -0
- package/out/utils/index.js.map +1 -0
- package/out/utils/node.d.ts +14 -0
- package/out/utils/node.d.ts.map +1 -0
- package/out/utils/node.js +85 -0
- package/out/utils/node.js.map +1 -0
- package/out/utils/utils.d.ts +13 -0
- package/out/utils/utils.d.ts.map +1 -0
- package/out/utils/utils.js +77 -0
- package/out/utils/utils.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,1169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
32
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
|
+
};
|
|
34
|
+
var TypeAnnotation_1;
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.TypeAnnotation = exports.isUnion = exports.GENERIC_DESC = exports.PRIMITIVE_DESC = exports.OLD_PRIMITIVE_TITLE = exports.PRIMITIVE_TITLE = exports.PRIMITIVE_TYPE = void 0;
|
|
37
|
+
const utils_1 = require("../utils");
|
|
38
|
+
const nasl_translator_1 = require("@lcap/nasl-translator");
|
|
39
|
+
const service_1 = require("../service");
|
|
40
|
+
const utils_2 = require("../utils");
|
|
41
|
+
var PRIMITIVE_TYPE;
|
|
42
|
+
(function (PRIMITIVE_TYPE) {
|
|
43
|
+
PRIMITIVE_TYPE["Boolean"] = "Boolean";
|
|
44
|
+
PRIMITIVE_TYPE["Integer"] = "Integer";
|
|
45
|
+
PRIMITIVE_TYPE["Long"] = "Long";
|
|
46
|
+
PRIMITIVE_TYPE["Double"] = "Double";
|
|
47
|
+
PRIMITIVE_TYPE["Decimal"] = "Decimal";
|
|
48
|
+
PRIMITIVE_TYPE["String"] = "String";
|
|
49
|
+
PRIMITIVE_TYPE["Text"] = "Text";
|
|
50
|
+
PRIMITIVE_TYPE["Binary"] = "Binary";
|
|
51
|
+
PRIMITIVE_TYPE["Date"] = "Date";
|
|
52
|
+
PRIMITIVE_TYPE["Time"] = "Time";
|
|
53
|
+
PRIMITIVE_TYPE["DateTime"] = "DateTime";
|
|
54
|
+
PRIMITIVE_TYPE["Email"] = "Email";
|
|
55
|
+
PRIMITIVE_TYPE["Union"] = "Union";
|
|
56
|
+
PRIMITIVE_TYPE["Null"] = "Null";
|
|
57
|
+
})(PRIMITIVE_TYPE || (exports.PRIMITIVE_TYPE = PRIMITIVE_TYPE = {}));
|
|
58
|
+
exports.PRIMITIVE_TITLE = {
|
|
59
|
+
Boolean: '布尔值',
|
|
60
|
+
Integer: '整数',
|
|
61
|
+
Long: '整数',
|
|
62
|
+
Double: '小数',
|
|
63
|
+
Decimal: '小数',
|
|
64
|
+
String: '文本',
|
|
65
|
+
Text: '长文本',
|
|
66
|
+
Binary: '二进制流',
|
|
67
|
+
Date: '日期',
|
|
68
|
+
Time: '时间',
|
|
69
|
+
DateTime: '日期时间',
|
|
70
|
+
Email: '电子邮箱',
|
|
71
|
+
Union: '联合类型',
|
|
72
|
+
};
|
|
73
|
+
exports.OLD_PRIMITIVE_TITLE = {
|
|
74
|
+
Boolean: '布尔值',
|
|
75
|
+
Integer: '整数',
|
|
76
|
+
Long: '长整数',
|
|
77
|
+
Double: '小数',
|
|
78
|
+
Decimal: '精准小数',
|
|
79
|
+
String: '字符串',
|
|
80
|
+
Text: '长文本',
|
|
81
|
+
Binary: '二进制流',
|
|
82
|
+
Date: '日期',
|
|
83
|
+
Time: '时间',
|
|
84
|
+
DateTime: '日期时间',
|
|
85
|
+
Email: '电子邮箱',
|
|
86
|
+
Union: '联合类型',
|
|
87
|
+
};
|
|
88
|
+
exports.PRIMITIVE_DESC = {
|
|
89
|
+
Integer: '可表示最大长度约 10 个数字的正负整数(将被删除)',
|
|
90
|
+
Double: '小数,有效数字约 16 个左右(将被删除)',
|
|
91
|
+
Text: '底层与String相同,可存储更长的内容(将被删除)',
|
|
92
|
+
Binary: '用于二进制流的存储',
|
|
93
|
+
Email: '表示一个邮箱,底层与String相同(将被删除)',
|
|
94
|
+
Boolean: '包含真(true)、假(false)两个值',
|
|
95
|
+
Long: '可表示最大长度约 19 个数字的正负整数',
|
|
96
|
+
Decimal: '可表示 31 个有效数字以内的小数',
|
|
97
|
+
String: '表示汉语、英语、数字等文本内容',
|
|
98
|
+
Date: '通常用于仅日期处理和数据存储',
|
|
99
|
+
Time: '通常用于仅时间处理和数据存储',
|
|
100
|
+
DateTime: '通常用于日期和时间的处理和数据存储',
|
|
101
|
+
};
|
|
102
|
+
exports.GENERIC_DESC = {
|
|
103
|
+
List: 'T类型的数据构成的列表',
|
|
104
|
+
Map: '从K类型到V类型的映射',
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* 判断是否是联合类型
|
|
108
|
+
* @param typeAnnotation
|
|
109
|
+
* @returns
|
|
110
|
+
*/
|
|
111
|
+
function isUnion(typeAnnotation) {
|
|
112
|
+
return (typeAnnotation &&
|
|
113
|
+
typeAnnotation.typeKind === 'union' &&
|
|
114
|
+
typeAnnotation.typeNamespace === 'nasl.core' &&
|
|
115
|
+
typeAnnotation.typeName === 'Union');
|
|
116
|
+
}
|
|
117
|
+
exports.isUnion = isUnion;
|
|
118
|
+
const decorators_1 = require("../decorators");
|
|
119
|
+
const utils = __importStar(require("../utils"));
|
|
120
|
+
const asserts = __importStar(require("./utils/asserts"));
|
|
121
|
+
const BaseNode_1 = __importDefault(require("../common/BaseNode"));
|
|
122
|
+
/**
|
|
123
|
+
* 类型标注
|
|
124
|
+
*/
|
|
125
|
+
let TypeAnnotation = class TypeAnnotation extends BaseNode_1.default {
|
|
126
|
+
static { TypeAnnotation_1 = this; }
|
|
127
|
+
/** 类名 */
|
|
128
|
+
static { this.ConceptName = 'TypeAnnotation'; }
|
|
129
|
+
/**
|
|
130
|
+
* 是否为抽象类
|
|
131
|
+
* 抽象类不能产生 concept: string
|
|
132
|
+
*/
|
|
133
|
+
static { this.isAbstract = false; }
|
|
134
|
+
/** 继承链 */
|
|
135
|
+
static { this.inheritanceChain = ['BaseNode']; }
|
|
136
|
+
/**
|
|
137
|
+
* @param source 需要合并的部分参数
|
|
138
|
+
*/
|
|
139
|
+
constructor(source) {
|
|
140
|
+
source = Object.assign({}, TypeAnnotation_1.getDefaultOptions(), source);
|
|
141
|
+
super(source);
|
|
142
|
+
//================================================================================
|
|
143
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
144
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
145
|
+
//================================================================================
|
|
146
|
+
// 兼容 long 需要显示为 long 的情况,默认 undefined
|
|
147
|
+
this.longNotInteger = undefined;
|
|
148
|
+
super.subConstructor(source);
|
|
149
|
+
}
|
|
150
|
+
static from(source, parentNode, parentKey) {
|
|
151
|
+
return super.from(source, parentNode, parentKey);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* 设置规则对象
|
|
155
|
+
*/
|
|
156
|
+
setRuleMap(ruleMap) {
|
|
157
|
+
const object = {
|
|
158
|
+
ruleMap,
|
|
159
|
+
};
|
|
160
|
+
this.update({
|
|
161
|
+
...object,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
_insertTypeAnnotationInTypeArgumentsAt(options, index) {
|
|
165
|
+
const typeAnnotationOptions = {};
|
|
166
|
+
const relationOptions = { parentNode: this, parentKey: 'typeArguments' };
|
|
167
|
+
const TypeAnnotation = (0, decorators_1.getConceptConstructor)('TypeAnnotation');
|
|
168
|
+
let typeAnnotation;
|
|
169
|
+
if (asserts.isTypeAnnotation(options)) {
|
|
170
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
171
|
+
typeAnnotation = options;
|
|
172
|
+
Object.assign(typeAnnotation, relationOptions);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
typeAnnotation = TypeAnnotation.from({
|
|
176
|
+
...typeAnnotationOptions,
|
|
177
|
+
...options,
|
|
178
|
+
}, this, 'typeArguments');
|
|
179
|
+
}
|
|
180
|
+
this.typeArguments.splice(index, 0, typeAnnotation);
|
|
181
|
+
return typeAnnotation;
|
|
182
|
+
}
|
|
183
|
+
insertTypeAnnotationInTypeArgumentsAt(options, index) {
|
|
184
|
+
const node = this._insertTypeAnnotationInTypeArgumentsAt(options, index);
|
|
185
|
+
node.create({
|
|
186
|
+
index,
|
|
187
|
+
parentNode: this,
|
|
188
|
+
parentKey: 'typeArguments',
|
|
189
|
+
});
|
|
190
|
+
return node;
|
|
191
|
+
}
|
|
192
|
+
_addTypeAnnotationInTypeArguments(options) {
|
|
193
|
+
const index = this.typeArguments.length;
|
|
194
|
+
return this._insertTypeAnnotationInTypeArgumentsAt(options, index);
|
|
195
|
+
}
|
|
196
|
+
addTypeAnnotationInTypeArguments(options) {
|
|
197
|
+
const node = this._addTypeAnnotationInTypeArguments(options);
|
|
198
|
+
const index = this.typeArguments.indexOf(node);
|
|
199
|
+
node.create({
|
|
200
|
+
index,
|
|
201
|
+
parentNode: this,
|
|
202
|
+
parentKey: 'typeArguments',
|
|
203
|
+
});
|
|
204
|
+
return node;
|
|
205
|
+
}
|
|
206
|
+
_insertTypeAnnotationInReturnTypeAt(options, index) {
|
|
207
|
+
const typeAnnotationOptions = {};
|
|
208
|
+
const relationOptions = { parentNode: this, parentKey: 'returnType' };
|
|
209
|
+
const TypeAnnotation = (0, decorators_1.getConceptConstructor)('TypeAnnotation');
|
|
210
|
+
let typeAnnotation;
|
|
211
|
+
if (asserts.isTypeAnnotation(options)) {
|
|
212
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
213
|
+
typeAnnotation = options;
|
|
214
|
+
Object.assign(typeAnnotation, relationOptions);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
typeAnnotation = TypeAnnotation.from({
|
|
218
|
+
...typeAnnotationOptions,
|
|
219
|
+
...options,
|
|
220
|
+
}, this, 'returnType');
|
|
221
|
+
}
|
|
222
|
+
this.returnType.splice(index, 0, typeAnnotation);
|
|
223
|
+
return typeAnnotation;
|
|
224
|
+
}
|
|
225
|
+
insertTypeAnnotationInReturnTypeAt(options, index) {
|
|
226
|
+
const node = this._insertTypeAnnotationInReturnTypeAt(options, index);
|
|
227
|
+
node.create({
|
|
228
|
+
index,
|
|
229
|
+
parentNode: this,
|
|
230
|
+
parentKey: 'returnType',
|
|
231
|
+
});
|
|
232
|
+
return node;
|
|
233
|
+
}
|
|
234
|
+
_addTypeAnnotationInReturnType(options) {
|
|
235
|
+
const index = this.returnType.length;
|
|
236
|
+
return this._insertTypeAnnotationInReturnTypeAt(options, index);
|
|
237
|
+
}
|
|
238
|
+
addTypeAnnotationInReturnType(options) {
|
|
239
|
+
const node = this._addTypeAnnotationInReturnType(options);
|
|
240
|
+
const index = this.returnType.indexOf(node);
|
|
241
|
+
node.create({
|
|
242
|
+
index,
|
|
243
|
+
parentNode: this,
|
|
244
|
+
parentKey: 'returnType',
|
|
245
|
+
});
|
|
246
|
+
return node;
|
|
247
|
+
}
|
|
248
|
+
_insertStructurePropertyAt(options, index) {
|
|
249
|
+
const structurePropertyOptions = {};
|
|
250
|
+
const relationOptions = { parentNode: this, parentKey: 'properties' };
|
|
251
|
+
const StructureProperty = (0, decorators_1.getConceptConstructor)('StructureProperty');
|
|
252
|
+
let structureProperty;
|
|
253
|
+
if (asserts.isStructureProperty(options)) {
|
|
254
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
255
|
+
structureProperty = options;
|
|
256
|
+
Object.assign(structureProperty, relationOptions);
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
structureProperty = StructureProperty.from({
|
|
260
|
+
...structurePropertyOptions,
|
|
261
|
+
...options,
|
|
262
|
+
}, this, 'properties');
|
|
263
|
+
}
|
|
264
|
+
this.properties.splice(index, 0, structureProperty);
|
|
265
|
+
return structureProperty;
|
|
266
|
+
}
|
|
267
|
+
insertStructurePropertyAt(options, index) {
|
|
268
|
+
const node = this._insertStructurePropertyAt(options, index);
|
|
269
|
+
node.create({
|
|
270
|
+
index,
|
|
271
|
+
parentNode: this,
|
|
272
|
+
parentKey: 'properties',
|
|
273
|
+
});
|
|
274
|
+
return node;
|
|
275
|
+
}
|
|
276
|
+
_addStructureProperty(options) {
|
|
277
|
+
const index = this.properties.length;
|
|
278
|
+
return this._insertStructurePropertyAt(options, index);
|
|
279
|
+
}
|
|
280
|
+
addStructureProperty(options) {
|
|
281
|
+
const node = this._addStructureProperty(options);
|
|
282
|
+
const index = this.properties.indexOf(node);
|
|
283
|
+
node.create({
|
|
284
|
+
index,
|
|
285
|
+
parentNode: this,
|
|
286
|
+
parentKey: 'properties',
|
|
287
|
+
});
|
|
288
|
+
return node;
|
|
289
|
+
}
|
|
290
|
+
removeTypeAnnotationInTypeArguments(options) {
|
|
291
|
+
let typeAnnotation = options;
|
|
292
|
+
return typeAnnotation.delete();
|
|
293
|
+
}
|
|
294
|
+
removeTypeAnnotationInReturnType(options) {
|
|
295
|
+
let typeAnnotation = options;
|
|
296
|
+
return typeAnnotation.delete();
|
|
297
|
+
}
|
|
298
|
+
removeStructureProperty(options) {
|
|
299
|
+
let structureProperty = options;
|
|
300
|
+
return structureProperty.delete();
|
|
301
|
+
}
|
|
302
|
+
toUI(state, hideDetails) {
|
|
303
|
+
return this.headTitle;
|
|
304
|
+
}
|
|
305
|
+
traverse(callback, enter, leave, onJoin) {
|
|
306
|
+
enter(this);
|
|
307
|
+
callback(this);
|
|
308
|
+
if (this.typeArguments && ['generic', 'union'].includes(this.typeKind)) {
|
|
309
|
+
const l = this.typeArguments.length;
|
|
310
|
+
this?.typeArguments?.forEach((arg, idx) => {
|
|
311
|
+
arg?.traverse(callback, enter, leave, onJoin);
|
|
312
|
+
if (idx < l - 1) {
|
|
313
|
+
onJoin(this, arg);
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
leave(this);
|
|
318
|
+
}
|
|
319
|
+
get typeKey() {
|
|
320
|
+
if (this.typeKind === 'primitive' || this.typeKind === 'reference') {
|
|
321
|
+
return `${this.typeNamespace}.${this.typeName}`;
|
|
322
|
+
}
|
|
323
|
+
else if (this.typeKind === 'generic') {
|
|
324
|
+
return `${this.typeNamespace}.${this.typeName}<${(this.typeArguments || []).map((arg) => arg?.typeKey)}>`;
|
|
325
|
+
}
|
|
326
|
+
else if (this.typeKind === 'anonymousStructure') {
|
|
327
|
+
return `{ ${this.properties
|
|
328
|
+
.map(({ name, typeAnnotation }) => `${name}: ${typeAnnotation ? typeAnnotation?.typeKey : '未知'}`)
|
|
329
|
+
.join(', ')} }`;
|
|
330
|
+
}
|
|
331
|
+
else if (this.typeKind === 'union') {
|
|
332
|
+
return `${this.typeArguments.map((arg) => arg?.typeKey).join(' | ')}`;
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
return this.typeName;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
// 排过序的类型标识
|
|
339
|
+
get sortedTypeKey() {
|
|
340
|
+
const app = this.app;
|
|
341
|
+
if (this.typeKind === 'anonymousStructure') {
|
|
342
|
+
// 按匿名数据结构的key排序
|
|
343
|
+
return `{${[...this.properties]
|
|
344
|
+
.sort(({ name: name1 }, { name: name2 }) => (name1 > name2 ? 1 : -1))
|
|
345
|
+
.map(({ name, typeAnnotation }) => `${name}: ${typeAnnotation ? typeAnnotation?.sortedTypeKey : '未知'}`)
|
|
346
|
+
.join(', ')}}`;
|
|
347
|
+
}
|
|
348
|
+
else if (this.typeKind === 'union') {
|
|
349
|
+
// 按返回的每个具体项排序
|
|
350
|
+
return `${this.typeArguments
|
|
351
|
+
.map((arg) => (0, service_1.transfromMetadataType)(arg, app)?.sortedTypeKey)
|
|
352
|
+
.sort((name1, name2) => (name1 > name2 ? 1 : -1))
|
|
353
|
+
.join(' | ')}`;
|
|
354
|
+
}
|
|
355
|
+
let { typeNamespace, typeName, typeKind } = this;
|
|
356
|
+
// 统一处理元数据sortedTypeKey值,不需要再在每个调用sortedTypeKey单独处理
|
|
357
|
+
if (typeNamespace?.endsWith('.metadataTypes')) {
|
|
358
|
+
const referenceNode = this.app?.findNodeByCompleteName?.(typeNamespace + '.' + typeName);
|
|
359
|
+
const typeAn = referenceNode?.typeAnnotation;
|
|
360
|
+
if (typeAn) {
|
|
361
|
+
typeKind = typeAn.typeKind;
|
|
362
|
+
typeNamespace = typeAn.typeNamespace;
|
|
363
|
+
typeName = typeAn.typeName;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
const typeArr = [];
|
|
367
|
+
if (typeNamespace) {
|
|
368
|
+
typeArr.push(typeNamespace);
|
|
369
|
+
}
|
|
370
|
+
if (typeName) {
|
|
371
|
+
typeArr.push(typeName);
|
|
372
|
+
}
|
|
373
|
+
const typeKey = typeArr.join('.');
|
|
374
|
+
if (typeKind === 'generic') {
|
|
375
|
+
let code = typeKey;
|
|
376
|
+
code += '<';
|
|
377
|
+
if (Array.isArray(this.typeArguments) && this.typeArguments?.length) {
|
|
378
|
+
// 必须按typeArguments定义的顺序,否则实参位置不对
|
|
379
|
+
code += `${(this.typeArguments || []).map((arg) => (0, service_1.transfromMetadataType)(arg, app)?.sortedTypeKey).join(', ')}`;
|
|
380
|
+
}
|
|
381
|
+
code += '>';
|
|
382
|
+
return code;
|
|
383
|
+
}
|
|
384
|
+
return typeKey;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* 用于展示的 type 标题
|
|
388
|
+
*/
|
|
389
|
+
get headTitle() {
|
|
390
|
+
if (this.typeKind === 'primitive') {
|
|
391
|
+
// longNotInteger: 兼容 long 需要显示为 long 的情况,默认 undefined
|
|
392
|
+
if (this.typeName === 'Long' && !this.longNotInteger) {
|
|
393
|
+
return `Integer ${exports.PRIMITIVE_TITLE[this.typeName] || ''}`;
|
|
394
|
+
}
|
|
395
|
+
return `${this.typeName} ${exports.PRIMITIVE_TITLE[this.typeName] || ''}`;
|
|
396
|
+
}
|
|
397
|
+
else if (this.typeKind === 'reference') {
|
|
398
|
+
const typeNamespace = this?.typeNamespace;
|
|
399
|
+
let typeTitle = this.typeName;
|
|
400
|
+
if (typeNamespace && this.rootNode) {
|
|
401
|
+
const entity = this.rootNode.findNodeByCompleteName?.([typeNamespace, this?.typeName].join('.'));
|
|
402
|
+
if (entity?.concept === 'Entity') {
|
|
403
|
+
const dataSourceName = entity.dataSource?.name;
|
|
404
|
+
if (dataSourceName) {
|
|
405
|
+
typeTitle += `(${dataSourceName})`;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
return typeTitle;
|
|
410
|
+
}
|
|
411
|
+
else if (this.typeKind === 'generic') {
|
|
412
|
+
if (this.typeArguments && this.typeArguments?.length)
|
|
413
|
+
return `${this.typeName}<${(this.typeArguments || [])
|
|
414
|
+
.map((arg) => arg.headTitle || arg.name || 'T')
|
|
415
|
+
.join(', ')}>`;
|
|
416
|
+
else
|
|
417
|
+
return this.typeName;
|
|
418
|
+
}
|
|
419
|
+
else if (this.typeKind === 'anonymousStructure') {
|
|
420
|
+
return `{ ${this.properties
|
|
421
|
+
?.map(({ name, typeAnnotation }) => `${name}: ${typeAnnotation.headTitle}`)
|
|
422
|
+
.join(', ')} }`;
|
|
423
|
+
}
|
|
424
|
+
else if (this.typeKind === 'union') {
|
|
425
|
+
return `${this.typeArguments.map((arg) => arg.typeTitle || arg.name).join(' 或 ')}`;
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
return this.typeName;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* 用于展示的 type 标题
|
|
433
|
+
*/
|
|
434
|
+
get typeTitle() {
|
|
435
|
+
if (this.typeKind === 'primitive') {
|
|
436
|
+
if (this.typeName === 'Long') {
|
|
437
|
+
return `Integer ${exports.PRIMITIVE_TITLE[this.typeName] || ''}`;
|
|
438
|
+
}
|
|
439
|
+
return `${this.typeName} ${exports.PRIMITIVE_TITLE[this.typeName] || ''}`;
|
|
440
|
+
}
|
|
441
|
+
else if (this.typeKind === 'reference') {
|
|
442
|
+
return this.typeName;
|
|
443
|
+
}
|
|
444
|
+
else if (this.typeKind === 'generic') {
|
|
445
|
+
return `${this.typeName}<${!this.typeArguments?.length
|
|
446
|
+
? 'T'
|
|
447
|
+
: this.typeArguments.map((arg) => arg?.typeTitle || arg?.name || 'T').join(', ')}>`;
|
|
448
|
+
}
|
|
449
|
+
else if (this.typeKind === 'anonymousStructure') {
|
|
450
|
+
return `{ ${this.properties
|
|
451
|
+
?.map(({ name, typeAnnotation }) => `${name}: ${typeAnnotation ? typeAnnotation?.typeTitle : '未知'}`)
|
|
452
|
+
.join(', ')} }`;
|
|
453
|
+
}
|
|
454
|
+
else if (this.typeKind === 'union') {
|
|
455
|
+
return `${this.typeArguments.map((arg) => arg?.typeTitle || arg?.name).join(' 或 ')}`;
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
return this.typeName;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* 用于展示的 无中文的精简type标题
|
|
463
|
+
*/
|
|
464
|
+
get typeInlineTitle() {
|
|
465
|
+
if (this.typeKind === 'primitive') {
|
|
466
|
+
if (this.typeName === 'Long') {
|
|
467
|
+
return 'Integer';
|
|
468
|
+
}
|
|
469
|
+
return this.typeName;
|
|
470
|
+
}
|
|
471
|
+
else if (this.typeKind === 'reference') {
|
|
472
|
+
return this.typeName;
|
|
473
|
+
}
|
|
474
|
+
else if (this.typeKind === 'generic') {
|
|
475
|
+
return `${this.typeName}<${!this?.typeArguments?.length
|
|
476
|
+
? 'T'
|
|
477
|
+
: this.typeArguments.map((arg) => arg?.typeInlineTitle || arg?.name || 'T').join(', ')}>`;
|
|
478
|
+
}
|
|
479
|
+
else if (this.typeKind === 'anonymousStructure') {
|
|
480
|
+
return `{ ${this.properties
|
|
481
|
+
?.map(({ name, typeAnnotation }) => `${name}: ${typeAnnotation ? typeAnnotation?.typeInlineTitle : '未知'}`)
|
|
482
|
+
.join(', ')} }`;
|
|
483
|
+
}
|
|
484
|
+
else if (this.typeKind === 'union') {
|
|
485
|
+
return `${this.typeArguments.map((arg) => arg?.typeInlineTitle || arg?.name).join(' 或 ')}`;
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
return this.typeName;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* 用于展示的 纯中文的type 标题
|
|
493
|
+
*/
|
|
494
|
+
get typeChineseTitle() {
|
|
495
|
+
if (this.typeKind === 'primitive') {
|
|
496
|
+
return `${exports.PRIMITIVE_TITLE[this.typeName] || ''}`;
|
|
497
|
+
}
|
|
498
|
+
else if (this.typeKind === 'reference') {
|
|
499
|
+
return this.typeName;
|
|
500
|
+
}
|
|
501
|
+
else if (this.typeKind === 'generic') {
|
|
502
|
+
return `${this.typeName}<${this.typeArguments
|
|
503
|
+
.map((arg) => arg?.typeChineseTitle || arg?.name || 'T')
|
|
504
|
+
.join(', ')}>`;
|
|
505
|
+
}
|
|
506
|
+
else if (this.typeKind === 'anonymousStructure') {
|
|
507
|
+
return `{ ${this.properties
|
|
508
|
+
?.map(({ name, typeAnnotation }) => `${name}: ${typeAnnotation ? typeAnnotation.typeChineseTitle : '未知'}`)
|
|
509
|
+
.join(', ')} }`;
|
|
510
|
+
}
|
|
511
|
+
else if (this.typeKind === 'union') {
|
|
512
|
+
return `${this.typeArguments.map((arg) => arg?.typeChineseTitle || arg?.name).join(' 或 ')}`;
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
515
|
+
return this.typeName;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
get typeTitleList() {
|
|
519
|
+
const typeTitleList = [];
|
|
520
|
+
if (this.typeKind === 'anonymousStructure') {
|
|
521
|
+
typeTitleList.push({ key: '{' });
|
|
522
|
+
const length = this.properties?.length;
|
|
523
|
+
this.properties?.forEach(({ name, typeAnnotation }, index) => {
|
|
524
|
+
if (index === length - 1) {
|
|
525
|
+
typeTitleList.push({ key: name, value: `${typeAnnotation ? typeAnnotation.typeTitle : '未知'}` });
|
|
526
|
+
}
|
|
527
|
+
else {
|
|
528
|
+
typeTitleList.push({ key: name, value: `${typeAnnotation ? typeAnnotation.typeTitle : '未知'}`, dot: ',' });
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
typeTitleList.push({ key: '}' });
|
|
532
|
+
}
|
|
533
|
+
else if (this.typeName === 'List' && this.typeArguments?.length) {
|
|
534
|
+
if (this.typeArguments.every((item) => item?.typeKind !== 'anonymousStructure')) {
|
|
535
|
+
typeTitleList.push({ key: this.typeTitle });
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
538
|
+
const propsTypeList = [].concat(...this.typeArguments.map((arg) => arg.typeTitleList));
|
|
539
|
+
if (propsTypeList[0]?.key === '{') {
|
|
540
|
+
propsTypeList[0].key = 'List<{';
|
|
541
|
+
}
|
|
542
|
+
else {
|
|
543
|
+
typeTitleList.push({ key: 'List<' });
|
|
544
|
+
}
|
|
545
|
+
typeTitleList.push(...propsTypeList);
|
|
546
|
+
if (propsTypeList[propsTypeList.length - 1]?.key === '}') {
|
|
547
|
+
propsTypeList[propsTypeList.length - 1].key = '}>';
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
550
|
+
typeTitleList.push({ key: '>' });
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
else {
|
|
555
|
+
typeTitleList.push({ key: this.typeTitle });
|
|
556
|
+
}
|
|
557
|
+
return typeTitleList;
|
|
558
|
+
}
|
|
559
|
+
static createPrimitive(typeName, source) {
|
|
560
|
+
if (PRIMITIVE_TYPE[typeName]) {
|
|
561
|
+
return this.from(Object.assign({
|
|
562
|
+
typeKind: typeName === 'Union' ? 'union' : 'primitive',
|
|
563
|
+
typeName,
|
|
564
|
+
typeNamespace: 'nasl.core',
|
|
565
|
+
}, source));
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
static createReference(typeName, source) {
|
|
569
|
+
return this.from(Object.assign({
|
|
570
|
+
typeKind: 'reference',
|
|
571
|
+
typeName,
|
|
572
|
+
typeNamespace: 'nasl.core',
|
|
573
|
+
}, source));
|
|
574
|
+
}
|
|
575
|
+
static createGeneric(typeName, source) {
|
|
576
|
+
return this.from(Object.assign({
|
|
577
|
+
typeKind: 'generic',
|
|
578
|
+
typeName,
|
|
579
|
+
typeNamespace: 'nasl.collection',
|
|
580
|
+
}, source));
|
|
581
|
+
}
|
|
582
|
+
static createTypeParam(typeName, source) {
|
|
583
|
+
return this.from(Object.assign({
|
|
584
|
+
typeKind: 'typeParam',
|
|
585
|
+
typeName,
|
|
586
|
+
}, source));
|
|
587
|
+
}
|
|
588
|
+
static createTypeAnonymousStructure(properties, source) {
|
|
589
|
+
return this.from(Object.assign({
|
|
590
|
+
typeKind: 'anonymousStructure',
|
|
591
|
+
properties,
|
|
592
|
+
}, source));
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* 设置类型属性名称
|
|
596
|
+
*/
|
|
597
|
+
setTypeName(typeName) {
|
|
598
|
+
const object = {
|
|
599
|
+
typeName,
|
|
600
|
+
};
|
|
601
|
+
this.update({
|
|
602
|
+
...object,
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* 设置类型属性名称
|
|
607
|
+
*/
|
|
608
|
+
setTypeNamespace(typeNamespace) {
|
|
609
|
+
const object = {
|
|
610
|
+
typeNamespace,
|
|
611
|
+
};
|
|
612
|
+
this.update({
|
|
613
|
+
...object,
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
get tsCalleeNamespace() {
|
|
617
|
+
if (this.typeNamespace) {
|
|
618
|
+
let tsCalleeNamespace = this.typeNamespace;
|
|
619
|
+
tsCalleeNamespace = tsCalleeNamespace.replace(/\.[0-9]/g, (m) => m.replace('.', '.$'));
|
|
620
|
+
tsCalleeNamespace = tsCalleeNamespace.replace(/-/g, '_');
|
|
621
|
+
return tsCalleeNamespace;
|
|
622
|
+
}
|
|
623
|
+
return '';
|
|
624
|
+
}
|
|
625
|
+
// 获取 集成中心 为祖先节点
|
|
626
|
+
get integration() {
|
|
627
|
+
return this.getAncestor('Integration');
|
|
628
|
+
}
|
|
629
|
+
// 获取 连接器 为祖先节点
|
|
630
|
+
get connector() {
|
|
631
|
+
return this.getAncestor('Connector');
|
|
632
|
+
}
|
|
633
|
+
toVue(state) {
|
|
634
|
+
return JSON.stringify(this);
|
|
635
|
+
}
|
|
636
|
+
toJS(state) {
|
|
637
|
+
return JSON.stringify(this);
|
|
638
|
+
}
|
|
639
|
+
*toEmbeddedTS(state = (0, nasl_translator_1.createCompilerState)()) {
|
|
640
|
+
const self = this;
|
|
641
|
+
if (self.typeKind === 'primitive' || self.typeKind === 'reference') {
|
|
642
|
+
if (self.typeKind === 'reference' && self.typeNamespace && self.typeNamespace.endsWith('enums')) {
|
|
643
|
+
return `${self.tsCalleeNamespace}.${self.typeName}`;
|
|
644
|
+
}
|
|
645
|
+
// 针对 集成中心中的编辑态的连接器相关需要特殊处理
|
|
646
|
+
if (self.connector && self.integration && self.typeKind === 'reference') {
|
|
647
|
+
return `${self.tsCalleeNamespace}.${self.typeName}${utils_2.CUSTOM_CONNECTOR_EDITABLE_SUFFIX}`;
|
|
648
|
+
}
|
|
649
|
+
return `${self.tsCalleeNamespace}.${self.typeName}`;
|
|
650
|
+
}
|
|
651
|
+
else if (self.typeKind === 'generic') {
|
|
652
|
+
let code = `${self.tsCalleeNamespace}.${this.typeName}<`;
|
|
653
|
+
yield* (0, utils_1.wrapForEachToGenerator)(self.typeArguments || [], function* warpForEachGenerator(arg, index) {
|
|
654
|
+
code += yield* arg?.toEmbeddedTS((0, nasl_translator_1.shiftState)(state, code, { inline: true })) ?? utils.returnOrigin('');
|
|
655
|
+
if (index !== self.typeArguments.length - 1)
|
|
656
|
+
code += ', ';
|
|
657
|
+
});
|
|
658
|
+
code += '>';
|
|
659
|
+
return code;
|
|
660
|
+
}
|
|
661
|
+
else if (self.typeKind === 'union') {
|
|
662
|
+
let code = '';
|
|
663
|
+
yield* (0, utils_1.wrapForEachToGenerator)(self.typeArguments || [], function* warpForEachGenerator(arg, index) {
|
|
664
|
+
code += yield* arg?.toEmbeddedTS((0, nasl_translator_1.shiftState)(state, code, { inline: true })) ?? utils.returnOrigin('');
|
|
665
|
+
if (index !== self.typeArguments.length - 1)
|
|
666
|
+
code += ' | ';
|
|
667
|
+
});
|
|
668
|
+
return code;
|
|
669
|
+
}
|
|
670
|
+
else if (self.typeKind === 'anonymousStructure') {
|
|
671
|
+
let code = `{ `;
|
|
672
|
+
yield* (0, utils_1.wrapForEachToGenerator)(self.properties || [], function* warpForEachGenerator(property, i) {
|
|
673
|
+
code += `${property.name}: `;
|
|
674
|
+
code += `${property.typeAnnotation
|
|
675
|
+
? yield* property.typeAnnotation.toEmbeddedTS((0, nasl_translator_1.shiftState)(state, code, { inline: true, tabSize: (state?.tabSize || 0) + 1 }))
|
|
676
|
+
: '`未知`'}`;
|
|
677
|
+
code += ', ';
|
|
678
|
+
});
|
|
679
|
+
code += `__name: "AStructure_${self.hash}" `;
|
|
680
|
+
code += ' }';
|
|
681
|
+
return code;
|
|
682
|
+
}
|
|
683
|
+
else if (self?.typeKind === 'function') {
|
|
684
|
+
let code = '';
|
|
685
|
+
code += '(';
|
|
686
|
+
const paramTypes = self?.typeArguments || [];
|
|
687
|
+
yield* (0, utils_1.wrapForEachToGenerator)(paramTypes, function* warpForEachGenerator(type, index) {
|
|
688
|
+
code += `param${index + 1}:${yield* type.toEmbeddedTS((0, nasl_translator_1.shiftState)(state, code))}`;
|
|
689
|
+
if (index !== paramTypes.length - 1) {
|
|
690
|
+
code += ',';
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
code += ')';
|
|
694
|
+
code += '=>';
|
|
695
|
+
const returnTypes = self?.returnType || [];
|
|
696
|
+
yield* (0, utils_1.wrapForEachToGenerator)(returnTypes, function* warpForEachGenerator(type) {
|
|
697
|
+
code += yield* type.toEmbeddedTS((0, nasl_translator_1.shiftState)(state, code));
|
|
698
|
+
});
|
|
699
|
+
return code;
|
|
700
|
+
}
|
|
701
|
+
else {
|
|
702
|
+
if (self.tsCalleeNamespace && self.typeName) {
|
|
703
|
+
return `${self.tsCalleeNamespace}.${self.typeName}`;
|
|
704
|
+
}
|
|
705
|
+
else if (self.typeName) {
|
|
706
|
+
return self.typeName;
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
709
|
+
return '__IDENTIFIER__';
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
toNaturalTS(state = (0, nasl_translator_1.createCompilerState)()) {
|
|
714
|
+
if (this.typeKind === 'primitive' || this.typeKind === 'reference') {
|
|
715
|
+
if (this.typeKind === 'reference' &&
|
|
716
|
+
this.typeNamespace &&
|
|
717
|
+
this.typeNamespace.match(/\.(enums|entities|structures)$/)) {
|
|
718
|
+
if (this.tsCalleeNamespace.startsWith('nasl.ui')) {
|
|
719
|
+
return `${this.tsCalleeNamespace}.${this.typeName}`;
|
|
720
|
+
}
|
|
721
|
+
return state?.needNamespace ? `${this.typeNamespace}.${this.typeName}` : `${this.typeName}`;
|
|
722
|
+
}
|
|
723
|
+
return this.tsCalleeNamespace.startsWith('nasl.ui')
|
|
724
|
+
? `${this.tsCalleeNamespace}.${this.typeName}`
|
|
725
|
+
: `${this.typeName}`;
|
|
726
|
+
}
|
|
727
|
+
if (this.typeKind === 'generic') {
|
|
728
|
+
let code = `${this.typeName}<`;
|
|
729
|
+
(this.typeArguments || []).forEach((arg, index) => {
|
|
730
|
+
code += arg?.toNaturalTS((0, nasl_translator_1.shiftState)(state, code, { inline: true }));
|
|
731
|
+
if (index !== this.typeArguments?.length - 1)
|
|
732
|
+
code += ', ';
|
|
733
|
+
});
|
|
734
|
+
code += '>';
|
|
735
|
+
return code;
|
|
736
|
+
}
|
|
737
|
+
if (this.typeKind === 'union') {
|
|
738
|
+
let code = '';
|
|
739
|
+
(this.typeArguments || []).forEach((arg, index) => {
|
|
740
|
+
code += arg?.toNaturalTS((0, nasl_translator_1.shiftState)(state, code, { inline: true }));
|
|
741
|
+
if (index !== this.typeArguments?.length - 1)
|
|
742
|
+
code += ' | ';
|
|
743
|
+
});
|
|
744
|
+
return code;
|
|
745
|
+
}
|
|
746
|
+
if (this.typeKind === 'anonymousStructure') {
|
|
747
|
+
let code = `{ `;
|
|
748
|
+
(this.properties || []).forEach((property, i) => {
|
|
749
|
+
code += `${property.name}: `;
|
|
750
|
+
code += `${property.typeAnnotation?.toNaturalTS((0, nasl_translator_1.shiftState)(state, code, { inline: true, tabSize: state.tabSize + 1 }))}`;
|
|
751
|
+
code += i < this.properties?.length - 1 ? ', ' : ' }';
|
|
752
|
+
});
|
|
753
|
+
return code;
|
|
754
|
+
}
|
|
755
|
+
if (this.tsCalleeNamespace && this.typeName) {
|
|
756
|
+
return `${this.typeName}`;
|
|
757
|
+
}
|
|
758
|
+
if (this.typeName) {
|
|
759
|
+
return this.typeName;
|
|
760
|
+
}
|
|
761
|
+
return '__IDENTIFIER__';
|
|
762
|
+
}
|
|
763
|
+
toTextualNASL(state = (0, nasl_translator_1.createCompilerState)()) {
|
|
764
|
+
if (this.typeKind === 'primitive') {
|
|
765
|
+
if (this.typeName === 'Long')
|
|
766
|
+
return 'Integer';
|
|
767
|
+
return this.typeName;
|
|
768
|
+
}
|
|
769
|
+
else if (this.typeKind === 'reference') {
|
|
770
|
+
return (0, nasl_translator_1.textualNamespace)(`${this.typeNamespace}.${this.typeName}`);
|
|
771
|
+
}
|
|
772
|
+
else if (this.typeKind === 'generic') {
|
|
773
|
+
let code = `${this.typeName}<`;
|
|
774
|
+
(this.typeArguments || []).forEach((arg, index) => {
|
|
775
|
+
code += arg?.toTextualNASL((0, nasl_translator_1.shiftState)(state, code, { inline: true }));
|
|
776
|
+
if (index !== this.typeArguments.length - 1)
|
|
777
|
+
code += ', ';
|
|
778
|
+
});
|
|
779
|
+
code += '>';
|
|
780
|
+
return code;
|
|
781
|
+
}
|
|
782
|
+
else if (this.typeKind === 'union') {
|
|
783
|
+
let code = '';
|
|
784
|
+
(this.typeArguments || []).forEach((arg, index) => {
|
|
785
|
+
code += arg?.toTextualNASL((0, nasl_translator_1.shiftState)(state, code, { inline: true }));
|
|
786
|
+
if (index !== this.typeArguments.length - 1)
|
|
787
|
+
code += ' | ';
|
|
788
|
+
});
|
|
789
|
+
return code;
|
|
790
|
+
}
|
|
791
|
+
else if (this.typeKind === 'anonymousStructure') {
|
|
792
|
+
let code = `{ `;
|
|
793
|
+
(this.properties || []).forEach((property, i) => {
|
|
794
|
+
code += `${property.name}: `;
|
|
795
|
+
code += `${property.typeAnnotation?.toTextualNASL((0, nasl_translator_1.shiftState)(state, code, { inline: true, tabSize: state.tabSize + 1 }))}`;
|
|
796
|
+
code += i < this.properties?.length - 1 ? ', ' : ' }';
|
|
797
|
+
});
|
|
798
|
+
return code;
|
|
799
|
+
}
|
|
800
|
+
else {
|
|
801
|
+
return this.typeName;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
805
|
+
* 用于标准化数据结构,便于计算 anonymousStructure 的 __name
|
|
806
|
+
*/
|
|
807
|
+
get anonymousStructureTypeDesc() {
|
|
808
|
+
if (this.typeKind === 'generic') {
|
|
809
|
+
return `${this.typeName}<${this.typeArguments
|
|
810
|
+
.map((arg) => arg.anonymousStructureTypeDesc || arg.name || 'T')
|
|
811
|
+
.join(', ')}>`;
|
|
812
|
+
}
|
|
813
|
+
else if (this.typeKind === 'anonymousStructure') {
|
|
814
|
+
return `{ ${[...this.properties]
|
|
815
|
+
.sort(({ name: aName }, { name: bName }) => {
|
|
816
|
+
if (aName > bName)
|
|
817
|
+
return 1;
|
|
818
|
+
return aName < bName ? -1 : 0;
|
|
819
|
+
})
|
|
820
|
+
.map(({ name, typeAnnotation }) => `${name}: ${typeAnnotation ? typeAnnotation.anonymousStructureTypeDesc : '未知'}`)
|
|
821
|
+
.join(', ')} }`;
|
|
822
|
+
}
|
|
823
|
+
else {
|
|
824
|
+
return this.typeName;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* hash 用于比较 anonymousStructure 是否相同
|
|
829
|
+
*/
|
|
830
|
+
get hash() {
|
|
831
|
+
return (0, utils_1.genHash)(this.anonymousStructureTypeDesc);
|
|
832
|
+
}
|
|
833
|
+
getDefaultValue(value) {
|
|
834
|
+
let code = '';
|
|
835
|
+
if (this.typeKind === 'primitive') {
|
|
836
|
+
if (this.typeName === 'String') {
|
|
837
|
+
code = ` new nasl.core.String("${value}") `;
|
|
838
|
+
}
|
|
839
|
+
else if (this.typeNamespace.endsWith('.metadataTypes')) {
|
|
840
|
+
const app = this.getAncestor('App');
|
|
841
|
+
let originType = {};
|
|
842
|
+
if (this.typeNamespace === 'app.metadataTypes') {
|
|
843
|
+
originType = app.metadataTypes.find((metadataType) => metadataType.name === this.typeName)?.typeAnnotation;
|
|
844
|
+
}
|
|
845
|
+
else if (this.typeNamespace.startsWith('extensions.') && this.typeNamespace.endsWith('.metadataTypes')) {
|
|
846
|
+
const dependencyName = this.typeNamespace.replace('extensions.', '').replace('.metadataTypes', '');
|
|
847
|
+
originType =
|
|
848
|
+
app.dependencies
|
|
849
|
+
?.find((item) => item.name === dependencyName)
|
|
850
|
+
?.metadataTypes?.find((ele) => ele.name === this.typeName)?.typeAnnotation ?? {};
|
|
851
|
+
}
|
|
852
|
+
const coreType = {
|
|
853
|
+
typeNamespace: 'nasl.core',
|
|
854
|
+
typeName: originType.typeName,
|
|
855
|
+
};
|
|
856
|
+
if (coreType.typeName === 'String') {
|
|
857
|
+
code = ` new nasl.core.String("${value}") `;
|
|
858
|
+
}
|
|
859
|
+
else {
|
|
860
|
+
if (['Text'].includes(coreType.typeName)) {
|
|
861
|
+
code = ` new ${coreType.typeNamespace}.${coreType.typeName}("${value}")`;
|
|
862
|
+
}
|
|
863
|
+
else if (['Boolean'].includes(coreType.typeName)) {
|
|
864
|
+
code = value;
|
|
865
|
+
}
|
|
866
|
+
else {
|
|
867
|
+
code = ` new ${coreType.typeNamespace}.${coreType.typeName}(${value})`;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
else {
|
|
872
|
+
if (['Text'].includes(this.typeName)) {
|
|
873
|
+
code = ` new ${this.typeNamespace}.${this.typeName}("${value}")`;
|
|
874
|
+
}
|
|
875
|
+
else if (['Boolean'].includes(this.typeName)) {
|
|
876
|
+
code = value;
|
|
877
|
+
}
|
|
878
|
+
else {
|
|
879
|
+
code = ` new ${this.typeNamespace}.${this.typeName}(${value})`;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
else {
|
|
884
|
+
code = ` ${this.typeNamespace}.${this.typeName}['${value}']`;
|
|
885
|
+
}
|
|
886
|
+
return code;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
*
|
|
890
|
+
* @param code 233
|
|
891
|
+
*
|
|
892
|
+
*/
|
|
893
|
+
static recognize(code) {
|
|
894
|
+
if (typeof code === 'string') {
|
|
895
|
+
const EmailReg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
|
|
896
|
+
const TimeReg = /^(\d{1,2})(:\d{1,2})?:(\d{1,2})$/;
|
|
897
|
+
const DateReg = /^\d{1,4}(\/|-)\d{1,2}(\/|-)\d{1,2}$/;
|
|
898
|
+
const DateTimeReg = /^\d{1,4}(\/|-)\d{1,2}(\/|-)\d{1,2}\s(\d{1,2})(:\d{1,2})?:(\d{1,2})$/;
|
|
899
|
+
const BooleanReg = /(false|true|\u662f|\u5426)/i;
|
|
900
|
+
if (EmailReg.test(code)) {
|
|
901
|
+
return this.createPrimitive('String');
|
|
902
|
+
}
|
|
903
|
+
else if (TimeReg.test(code)) {
|
|
904
|
+
return this.createPrimitive('Time');
|
|
905
|
+
}
|
|
906
|
+
else if (BooleanReg.test(code)) {
|
|
907
|
+
return this.createPrimitive('Boolean');
|
|
908
|
+
}
|
|
909
|
+
else if (DateReg.test(code)) {
|
|
910
|
+
return this.createPrimitive('Date');
|
|
911
|
+
}
|
|
912
|
+
else if (DateTimeReg.test(code)) {
|
|
913
|
+
return this.createPrimitive('DateTime');
|
|
914
|
+
}
|
|
915
|
+
else if (!isNaN(Number(code))) {
|
|
916
|
+
if (code.indexOf('.') !== -1) {
|
|
917
|
+
return this.createPrimitive('Decimal');
|
|
918
|
+
// return this.createPrimitive('Decimal');
|
|
919
|
+
}
|
|
920
|
+
if (code.length > 8) {
|
|
921
|
+
return this.createPrimitive('Long');
|
|
922
|
+
}
|
|
923
|
+
return this.createPrimitive('Long');
|
|
924
|
+
}
|
|
925
|
+
else if (code.length > 255) {
|
|
926
|
+
return this.createPrimitive('String');
|
|
927
|
+
}
|
|
928
|
+
return this.createPrimitive('String');
|
|
929
|
+
}
|
|
930
|
+
else {
|
|
931
|
+
return this.createPrimitive('Long');
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
// 增加插入泛型子类型
|
|
935
|
+
typeArgumentsPush(typeItem) {
|
|
936
|
+
if (asserts.isTypeAnnotation(typeItem)) {
|
|
937
|
+
this.typeArguments.push(TypeAnnotation_1.from(typeItem, this, 'typeArguments'));
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
// 是否是复合类型 List|Map|entities|structures
|
|
941
|
+
isComplexType() {
|
|
942
|
+
const namespaceType = this.typeNamespace?.split('.').pop();
|
|
943
|
+
return (['Map', 'List'].includes(this.typeName) ||
|
|
944
|
+
(this.typeKind === 'reference' && ['entities', 'structures'].includes(namespaceType)));
|
|
945
|
+
}
|
|
946
|
+
/* 类型签名 */
|
|
947
|
+
get sign() {
|
|
948
|
+
let str = '';
|
|
949
|
+
if (['Map', 'List'].includes(this.typeName)) {
|
|
950
|
+
str += this.typeName + '<';
|
|
951
|
+
(this.typeArguments || []).forEach((item, index) => {
|
|
952
|
+
str += item.sign;
|
|
953
|
+
if (index + 1 !== this.typeArguments?.length) {
|
|
954
|
+
str += ',';
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
str += '>';
|
|
958
|
+
}
|
|
959
|
+
else {
|
|
960
|
+
str += this.typeName;
|
|
961
|
+
}
|
|
962
|
+
str = str === 'Long' ? 'Integer' : str;
|
|
963
|
+
return str;
|
|
964
|
+
}
|
|
965
|
+
/* 判断2个类型是否一致 */
|
|
966
|
+
isSame(typeAnnotation) {
|
|
967
|
+
typeAnnotation.typeArguments;
|
|
968
|
+
// 由于 序列化 出来的 TypeAnnotation 会有很多多余的属性
|
|
969
|
+
// 因此增加白名单,只有这些值才会被比较,其他均会被忽略
|
|
970
|
+
const whiteList = [
|
|
971
|
+
'concept',
|
|
972
|
+
'typeKind',
|
|
973
|
+
'typeNamespace',
|
|
974
|
+
'typeName',
|
|
975
|
+
'typeArguments',
|
|
976
|
+
'returnType',
|
|
977
|
+
'inferred',
|
|
978
|
+
'ruleMap',
|
|
979
|
+
'properties',
|
|
980
|
+
'name',
|
|
981
|
+
'label',
|
|
982
|
+
'description',
|
|
983
|
+
'typeAnnotation',
|
|
984
|
+
'required',
|
|
985
|
+
'defaultValue',
|
|
986
|
+
'jsonName',
|
|
987
|
+
];
|
|
988
|
+
const typeAnnotation1 = this.toJSON();
|
|
989
|
+
const typeAnnotation2 = typeAnnotation.toJSON();
|
|
990
|
+
const ignoreNull = (key, value) => {
|
|
991
|
+
if (key && !whiteList.includes(key)) {
|
|
992
|
+
return undefined; // 忽略此属性
|
|
993
|
+
}
|
|
994
|
+
if (value === null || value === undefined) {
|
|
995
|
+
return undefined; // 忽略此属性
|
|
996
|
+
}
|
|
997
|
+
return value; // 其他情况下返回原始值
|
|
998
|
+
};
|
|
999
|
+
if (typeAnnotation1.typeArguments) {
|
|
1000
|
+
typeAnnotation1.typeArguments = this.sortedTypeKey;
|
|
1001
|
+
}
|
|
1002
|
+
if (typeAnnotation2.typeArguments) {
|
|
1003
|
+
typeAnnotation2.typeArguments = typeAnnotation?.sortedTypeKey;
|
|
1004
|
+
}
|
|
1005
|
+
return JSON.stringify(typeAnnotation1, ignoreNull) === JSON.stringify(typeAnnotation2, ignoreNull);
|
|
1006
|
+
}
|
|
1007
|
+
// 是否是系统类型
|
|
1008
|
+
isSystemType() {
|
|
1009
|
+
return ['nasl.ui', 'nasl.auth', 'nasl.http', 'nasl.process'].includes(this.typeNamespace);
|
|
1010
|
+
}
|
|
1011
|
+
// 是否包含系统类型
|
|
1012
|
+
hasSystemType(app, structureCache = new Set()) {
|
|
1013
|
+
// 遍历子节点
|
|
1014
|
+
const traverseChild = (item, cb) => {
|
|
1015
|
+
// cb 返回 false 则终止遍历
|
|
1016
|
+
const res = cb(item);
|
|
1017
|
+
if (res === false)
|
|
1018
|
+
return true;
|
|
1019
|
+
if (item && item.concept === 'TypeAnnotation') {
|
|
1020
|
+
if (item?.typeKind === 'anonymousStructure') {
|
|
1021
|
+
return item.properties.some((prop) => traverseChild(prop.typeAnnotation, cb));
|
|
1022
|
+
}
|
|
1023
|
+
if (item.typeArguments && ['generic', 'union'].includes(item.typeKind)) {
|
|
1024
|
+
return item.typeArguments.some((arg) => traverseChild(arg, cb));
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
// hasSystemType 的最终结果
|
|
1029
|
+
let result = false;
|
|
1030
|
+
// 遍历所有的类型标注
|
|
1031
|
+
traverseChild(this, (node) => {
|
|
1032
|
+
// 回调函数 返回 false 则终止遍历,返回 true 则继续遍历
|
|
1033
|
+
if (node.typeNamespace?.endsWith('.structures')) {
|
|
1034
|
+
const structure = app.findNodeByCompleteName(`${node.typeNamespace}.${node.typeName}`);
|
|
1035
|
+
// 处理循环引用
|
|
1036
|
+
if (structureCache.has(structure)) {
|
|
1037
|
+
return true;
|
|
1038
|
+
}
|
|
1039
|
+
structureCache.add(structure);
|
|
1040
|
+
const res = structure?.properties.some((prop) => prop.typeAnnotation.hasSystemType(app, structureCache));
|
|
1041
|
+
// 如果有系统类型,则终止遍历
|
|
1042
|
+
if (res === true) {
|
|
1043
|
+
result = true;
|
|
1044
|
+
return false;
|
|
1045
|
+
}
|
|
1046
|
+
return true;
|
|
1047
|
+
}
|
|
1048
|
+
// 如果是系统类型,则终止遍历
|
|
1049
|
+
if (node.isSystemType()) {
|
|
1050
|
+
result = true;
|
|
1051
|
+
return false;
|
|
1052
|
+
}
|
|
1053
|
+
});
|
|
1054
|
+
return result;
|
|
1055
|
+
}
|
|
1056
|
+
getPropertyExistingNames(excludedList = []) {
|
|
1057
|
+
const excludedSet = new Set(excludedList);
|
|
1058
|
+
return (this.properties || [])
|
|
1059
|
+
.filter((item) => !excludedSet.has(item))
|
|
1060
|
+
.map((item) => item?.name);
|
|
1061
|
+
}
|
|
1062
|
+
getPropertyUniqueName(name = 'property1') {
|
|
1063
|
+
return utils.unique(name, this.getPropertyExistingNames(), undefined, false);
|
|
1064
|
+
}
|
|
1065
|
+
_insertPropertyAt(options, index) {
|
|
1066
|
+
const propertyOptions = {};
|
|
1067
|
+
const relationOptions = { parentNode: this, parentKey: 'properties' };
|
|
1068
|
+
const StructureProperty = (0, decorators_1.getConceptConstructor)('StructureProperty');
|
|
1069
|
+
let property;
|
|
1070
|
+
if (!options) {
|
|
1071
|
+
property = StructureProperty.from({
|
|
1072
|
+
...propertyOptions,
|
|
1073
|
+
name: this.getPropertyUniqueName(),
|
|
1074
|
+
}, this, 'properties');
|
|
1075
|
+
}
|
|
1076
|
+
else if (typeof options === 'string') {
|
|
1077
|
+
property = StructureProperty.from({
|
|
1078
|
+
...propertyOptions,
|
|
1079
|
+
name: options,
|
|
1080
|
+
}, this, 'properties');
|
|
1081
|
+
}
|
|
1082
|
+
else if (asserts.isStructureProperty(options)) {
|
|
1083
|
+
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1084
|
+
property = options;
|
|
1085
|
+
Object.assign(property, relationOptions);
|
|
1086
|
+
}
|
|
1087
|
+
else {
|
|
1088
|
+
property = StructureProperty.from({
|
|
1089
|
+
...propertyOptions,
|
|
1090
|
+
...options,
|
|
1091
|
+
}, this, 'properties');
|
|
1092
|
+
}
|
|
1093
|
+
this.properties.splice(index, 0, property);
|
|
1094
|
+
return property;
|
|
1095
|
+
}
|
|
1096
|
+
_addProperty(options) {
|
|
1097
|
+
const index = this.properties.length;
|
|
1098
|
+
return this._insertPropertyAt(options, index);
|
|
1099
|
+
}
|
|
1100
|
+
addProperty(options) {
|
|
1101
|
+
const node = this._addProperty(options);
|
|
1102
|
+
const index = this.properties.indexOf(node);
|
|
1103
|
+
node.create({
|
|
1104
|
+
index,
|
|
1105
|
+
parentNode: this,
|
|
1106
|
+
parentKey: 'properties',
|
|
1107
|
+
});
|
|
1108
|
+
return node;
|
|
1109
|
+
}
|
|
1110
|
+
};
|
|
1111
|
+
exports.TypeAnnotation = TypeAnnotation;
|
|
1112
|
+
__decorate([
|
|
1113
|
+
(0, decorators_1.property)()
|
|
1114
|
+
// @ts-ignore
|
|
1115
|
+
], TypeAnnotation.prototype, "concept", void 0);
|
|
1116
|
+
__decorate([
|
|
1117
|
+
(0, decorators_1.property)()
|
|
1118
|
+
], TypeAnnotation.prototype, "typeKind", void 0);
|
|
1119
|
+
__decorate([
|
|
1120
|
+
(0, decorators_1.property)()
|
|
1121
|
+
], TypeAnnotation.prototype, "typeNamespace", void 0);
|
|
1122
|
+
__decorate([
|
|
1123
|
+
(0, decorators_1.property)()
|
|
1124
|
+
], TypeAnnotation.prototype, "typeName", void 0);
|
|
1125
|
+
__decorate([
|
|
1126
|
+
(0, decorators_1.property)({
|
|
1127
|
+
objectRef: 'TypeAnnotation',
|
|
1128
|
+
isArray: true,
|
|
1129
|
+
defaultValue: null,
|
|
1130
|
+
})
|
|
1131
|
+
], TypeAnnotation.prototype, "typeArguments", void 0);
|
|
1132
|
+
__decorate([
|
|
1133
|
+
(0, decorators_1.property)({
|
|
1134
|
+
objectRef: 'TypeAnnotation',
|
|
1135
|
+
isArray: true,
|
|
1136
|
+
defaultValue: null,
|
|
1137
|
+
})
|
|
1138
|
+
], TypeAnnotation.prototype, "returnType", void 0);
|
|
1139
|
+
__decorate([
|
|
1140
|
+
(0, decorators_1.property)()
|
|
1141
|
+
], TypeAnnotation.prototype, "inferred", void 0);
|
|
1142
|
+
__decorate([
|
|
1143
|
+
(0, decorators_1.property)({
|
|
1144
|
+
objectRef: 'StructureProperty',
|
|
1145
|
+
isArray: true,
|
|
1146
|
+
defaultValue: null,
|
|
1147
|
+
})
|
|
1148
|
+
], TypeAnnotation.prototype, "properties", void 0);
|
|
1149
|
+
__decorate([
|
|
1150
|
+
(0, decorators_1.property)()
|
|
1151
|
+
], TypeAnnotation.prototype, "ruleMap", void 0);
|
|
1152
|
+
__decorate([
|
|
1153
|
+
nasl_translator_1.withSourceMapGenerator
|
|
1154
|
+
], TypeAnnotation.prototype, "toEmbeddedTS", null);
|
|
1155
|
+
__decorate([
|
|
1156
|
+
(0, nasl_translator_1.withSourceMap)()
|
|
1157
|
+
], TypeAnnotation.prototype, "toNaturalTS", null);
|
|
1158
|
+
__decorate([
|
|
1159
|
+
(0, nasl_translator_1.withSourceMap)()
|
|
1160
|
+
], TypeAnnotation.prototype, "toTextualNASL", null);
|
|
1161
|
+
exports.TypeAnnotation = TypeAnnotation = TypeAnnotation_1 = __decorate([
|
|
1162
|
+
(0, decorators_1.concept)('类型标注')
|
|
1163
|
+
], TypeAnnotation);
|
|
1164
|
+
exports.default = TypeAnnotation;
|
|
1165
|
+
//================================================================================
|
|
1166
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
1167
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
1168
|
+
//================================================================================
|
|
1169
|
+
//# sourceMappingURL=TypeAnnotation__.js.map
|