@lcap/nasl 3.3.2-beta.4 → 3.3.3-beta.2
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/coverage/index.html +108 -108
- package/coverage/src/automate/engine/index.html +1 -1
- package/coverage/src/automate/engine/utils.js.html +36 -36
- package/coverage/src/bak/index.html +15 -15
- package/coverage/src/bak/translator.js.html +183 -60
- package/coverage/src/breakpoint/generator/AfterStartNode.ts.html +1 -1
- package/coverage/src/breakpoint/generator/BeforeEndNode.ts.html +1 -1
- package/coverage/src/breakpoint/generator/BreakpointNode.ts.html +1 -1
- package/coverage/src/breakpoint/generator/CallbackNode.ts.html +1 -1
- package/coverage/src/breakpoint/generator/index.html +1 -1
- package/coverage/src/breakpoint/generator/index.ts.html +1 -1
- package/coverage/src/breakpoint/index.html +1 -1
- package/coverage/src/breakpoint/index.ts.html +1 -1
- package/coverage/src/breakpoint/shared/constants.ts.html +1 -1
- package/coverage/src/breakpoint/shared/index.html +1 -1
- package/coverage/src/breakpoint/shared/index.ts.html +1 -1
- package/coverage/src/breakpoint/shared/operations.ts.html +1 -1
- package/coverage/src/breakpoint/shared/socket.ts.html +1 -1
- package/coverage/src/breakpoint/shared/utils.ts.html +1 -1
- package/coverage/src/breakpoint/store/core.ts.html +1 -1
- package/coverage/src/breakpoint/store/dock.ts.html +1 -1
- package/coverage/src/breakpoint/store/index.html +1 -1
- package/coverage/src/breakpoint/store/index.ts.html +1 -1
- package/coverage/src/common/BaseNode.ts.html +92 -62
- package/coverage/src/common/Command.ts.html +1 -1
- package/coverage/src/common/EventEmitter.ts.html +1 -1
- package/coverage/src/common/Messager.ts.html +1 -1
- package/coverage/src/common/asyncFuncMap.ts.html +1 -1
- package/coverage/src/common/index.html +14 -14
- package/coverage/src/common/index.ts.html +1 -1
- package/coverage/src/concepts/Abort__.ts.html +9 -6
- package/coverage/src/concepts/Anchor__.ts.html +36 -21
- package/coverage/src/concepts/AnonymousFunction__.ts.html +62 -20
- package/coverage/src/concepts/App__.ts.html +917 -74
- package/coverage/src/concepts/Argument__.ts.html +41 -26
- package/coverage/src/concepts/Assignee__.ts.html +40 -13
- package/coverage/src/concepts/AssignmentLine__.ts.html +9 -6
- package/coverage/src/concepts/Assignment__.ts.html +61 -22
- package/coverage/src/concepts/Attribute__.ts.html +25 -10
- package/coverage/src/concepts/AuthInterface__.ts.html +9 -6
- package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +25 -10
- package/coverage/src/concepts/AuthLogic__.ts.html +18 -6
- package/coverage/src/concepts/BackendVariable__.ts.html +25 -10
- package/coverage/src/concepts/Backend__.ts.html +25 -10
- package/coverage/src/concepts/BatchAssignment__.ts.html +61 -16
- package/coverage/src/concepts/BinaryExpression__.ts.html +141 -39
- package/coverage/src/concepts/BindAttribute__.ts.html +134 -41
- package/coverage/src/concepts/BindDirective__.ts.html +79 -16
- package/coverage/src/concepts/BindEvent__.ts.html +80 -23
- package/coverage/src/concepts/BindStyle__.ts.html +25 -10
- package/coverage/src/concepts/BooleanLiteral__.ts.html +9 -6
- package/coverage/src/concepts/CallAuthInterface__.ts.html +25 -10
- package/coverage/src/concepts/CallConnector__.ts.html +9 -6
- package/coverage/src/concepts/CallFunction__.ts.html +56 -38
- package/coverage/src/concepts/CallInterface__.ts.html +81 -36
- package/coverage/src/concepts/CallLogic__.ts.html +195 -264
- package/coverage/src/concepts/CallQueryComponent__.ts.html +40 -13
- package/coverage/src/concepts/Comment__.ts.html +11 -8
- package/coverage/src/concepts/CompletionProperty__.ts.html +25 -10
- package/coverage/src/concepts/ConfigGroup__.ts.html +25 -10
- package/coverage/src/concepts/ConfigPropertyValue__.ts.html +9 -6
- package/coverage/src/concepts/ConfigProperty__.ts.html +25 -10
- package/coverage/src/concepts/Configuration__.ts.html +25 -10
- package/coverage/src/concepts/Connection__.ts.html +26 -11
- package/coverage/src/concepts/ConnectorTrigger__.ts.html +9 -6
- package/coverage/src/concepts/Connector__.ts.html +85 -22
- package/coverage/src/concepts/Constant__.ts.html +25 -10
- package/coverage/src/concepts/DataSource__.ts.html +26 -11
- package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +9 -6
- package/coverage/src/concepts/Destination__.ts.html +24 -12
- package/coverage/src/concepts/End__.ts.html +9 -6
- package/coverage/src/concepts/EntityIndex__.ts.html +9 -6
- package/coverage/src/concepts/EntityProperty__.ts.html +62 -14
- package/coverage/src/concepts/Entity__.ts.html +41 -14
- package/coverage/src/concepts/EnumItem__.ts.html +9 -6
- package/coverage/src/concepts/Enum__.ts.html +25 -10
- package/coverage/src/concepts/Event__.ts.html +25 -10
- package/coverage/src/concepts/ExternalDestination__.ts.html +25 -10
- package/coverage/src/concepts/ForEachStatement__.ts.html +68 -47
- package/coverage/src/concepts/FrontendLibrary__.ts.html +40 -13
- package/coverage/src/concepts/FrontendVariable__.ts.html +1 -1
- package/coverage/src/concepts/Frontend__.ts.html +86 -23
- package/coverage/src/concepts/Function__.ts.html +92 -26
- package/coverage/src/concepts/Identifier__.ts.html +28 -25
- package/coverage/src/concepts/IfStatement__.ts.html +83 -56
- package/coverage/src/concepts/Integration__.ts.html +40 -13
- package/coverage/src/concepts/InterfaceParam__.ts.html +25 -10
- package/coverage/src/concepts/Interface__.ts.html +61 -22
- package/coverage/src/concepts/JSBlock__.ts.html +188 -8
- package/coverage/src/concepts/JavaLogic__.ts.html +9 -6
- package/coverage/src/concepts/LogicItem__.ts.html +15 -12
- package/coverage/src/concepts/Logic__.ts.html +117 -81
- package/coverage/src/concepts/MatchCase__.ts.html +100 -61
- package/coverage/src/concepts/Match__.ts.html +48 -27
- package/coverage/src/concepts/MemberExpression__.ts.html +72 -66
- package/coverage/src/concepts/MetadataType__.ts.html +1996 -0
- package/coverage/src/concepts/MicroApp__.ts.html +9 -6
- package/coverage/src/concepts/Module__.ts.html +672 -18
- package/coverage/src/concepts/MsgTriggerEvent__.ts.html +25 -10
- package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +25 -10
- package/coverage/src/concepts/Namespace__.ts.html +175 -40
- package/coverage/src/concepts/NewComposite__.ts.html +93 -27
- package/coverage/src/concepts/NewList__.ts.html +44 -14
- package/coverage/src/concepts/NewMap__.ts.html +44 -14
- package/coverage/src/concepts/New__.ts.html +1 -1
- package/coverage/src/concepts/NullLiteral__.ts.html +9 -6
- package/coverage/src/concepts/NumericLiteral__.ts.html +27 -12
- package/coverage/src/concepts/OqlQueryComponent__.ts.html +103 -13
- package/coverage/src/concepts/OverriddenLogic__.ts.html +100 -25
- package/coverage/src/concepts/Param__.ts.html +24 -15
- package/coverage/src/concepts/Point__.ts.html +9 -6
- package/coverage/src/concepts/ProcessComponent__.ts.html +40 -13
- package/coverage/src/concepts/ProcessElement__.ts.html +128 -29
- package/coverage/src/concepts/ProcessOutcome__.ts.html +9 -6
- package/coverage/src/concepts/ProcessOutcomes__.ts.html +9 -6
- package/coverage/src/concepts/Process__.ts.html +85 -22
- package/coverage/src/concepts/QueryAggregateExpression__.ts.html +25 -10
- package/coverage/src/concepts/QueryFieldExpression__.ts.html +9 -6
- package/coverage/src/concepts/QueryFromExpression__.ts.html +25 -10
- package/coverage/src/concepts/QueryGroupByExpression__.ts.html +25 -10
- package/coverage/src/concepts/QueryJoinExpression__.ts.html +25 -10
- package/coverage/src/concepts/QueryLimitExpression__.ts.html +25 -10
- package/coverage/src/concepts/QueryOrderByExpression__.ts.html +25 -10
- package/coverage/src/concepts/QuerySelectExpression__.ts.html +25 -10
- package/coverage/src/concepts/Rect__.ts.html +9 -6
- package/coverage/src/concepts/Return__.ts.html +25 -10
- package/coverage/src/concepts/Role__.ts.html +9 -6
- package/coverage/src/concepts/SelectMembers__.ts.html +25 -10
- package/coverage/src/concepts/Slot__.ts.html +25 -10
- package/coverage/src/concepts/SqlQueryComponent__.ts.html +25 -10
- package/coverage/src/concepts/Start__.ts.html +9 -6
- package/coverage/src/concepts/StringInterpolation__.ts.html +40 -19
- package/coverage/src/concepts/StringLiteral__.ts.html +9 -6
- package/coverage/src/concepts/StructureProperty__.ts.html +25 -10
- package/coverage/src/concepts/Structure__.ts.html +40 -13
- package/coverage/src/concepts/SwitchCase__.ts.html +33 -18
- package/coverage/src/concepts/SwitchStatement__.ts.html +38 -23
- package/coverage/src/concepts/Theme__.ts.html +9 -6
- package/coverage/src/concepts/Transactional__.ts.html +9 -6
- package/coverage/src/concepts/TriggerEvent__.ts.html +25 -10
- package/coverage/src/concepts/TriggerLauncher__.ts.html +9 -6
- package/coverage/src/concepts/TypeAnnotation__.ts.html +223 -61
- package/coverage/src/concepts/TypeParam__.ts.html +10 -7
- package/coverage/src/concepts/UnaryExpression__.ts.html +40 -13
- package/coverage/src/concepts/Unparsed__.ts.html +11 -8
- package/coverage/src/concepts/UseComponent__.ts.html +9 -6
- package/coverage/src/concepts/ValidationRule__.ts.html +30 -15
- package/coverage/src/concepts/Variable__.ts.html +61 -16
- package/coverage/src/concepts/ViewBlock__.ts.html +9 -6
- package/coverage/src/concepts/ViewComponent__.ts.html +99 -24
- package/coverage/src/concepts/ViewElement__.ts.html +334 -181
- package/coverage/src/concepts/View__.ts.html +326 -71
- package/coverage/src/concepts/WhileStatement__.ts.html +78 -45
- package/coverage/src/concepts/basics/stdlib/index.html +1 -1
- package/coverage/src/concepts/basics/stdlib/index.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.auth.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.browser.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.collection.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.configuration.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.core.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.event.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.http.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.interface.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.io.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.logging.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.process.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.ui.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.util.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.validation.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/timeZone.ts.html +1 -1
- package/coverage/src/concepts/basics/types/coreTypeList.ts.html +1 -1
- package/coverage/src/concepts/basics/types/index.html +1 -1
- package/coverage/src/concepts/basics/types/index.ts.html +1 -1
- package/coverage/src/concepts/index.html +823 -808
- package/coverage/src/concepts/index.ts.html +1 -1
- package/coverage/src/concepts/index__.ts.html +7 -4
- package/coverage/src/config.ts.html +1 -1
- package/coverage/src/decorators/index.html +1 -1
- package/coverage/src/decorators/index.ts.html +24 -24
- package/coverage/src/decorators/promise.ts.html +1 -1
- package/coverage/src/eventBus.ts.html +1 -1
- package/coverage/src/generator/compileComponent.ts.html +1 -1
- package/coverage/src/generator/genBundleFiles.ts.html +13 -19
- package/coverage/src/generator/genHash.ts.html +1 -1
- package/coverage/src/generator/genMetaData.ts.html +103 -16
- package/coverage/src/generator/genReleaseBody.ts.html +1 -1
- package/coverage/src/generator/icestark.ts.html +1 -1
- package/coverage/src/generator/index.html +15 -15
- package/coverage/src/generator/index.ts.html +1 -1
- package/coverage/src/generator/microApp.ts.html +1 -1
- package/coverage/src/generator/permission.ts.html +1 -1
- package/coverage/src/generator/qiankun.ts.html +1 -1
- package/coverage/src/generator/styleReplacer.ts.html +1 -1
- package/coverage/src/index.html +7 -7
- package/coverage/src/index.ts.html +4 -4
- package/coverage/src/manager/diagnostic.ts.html +1 -1
- package/coverage/src/manager/index.html +1 -1
- package/coverage/src/manager/stepRecorder.ts.html +1 -1
- package/coverage/src/natural/genNaturalTS.ts.html +1 -1
- package/coverage/src/natural/index.html +15 -15
- package/coverage/src/natural/index.ts.html +1 -1
- package/coverage/src/natural/naslStdlibMap.ts.html +1 -1
- package/coverage/src/natural/transformTSCode.ts.html +78 -18
- package/coverage/src/sentry/index.html +1 -1
- package/coverage/src/sentry/index.ts.html +21 -21
- package/coverage/src/server/createUiTs.ts.html +15 -6
- package/coverage/src/server/entity2LogicNamespace.ts.html +1 -1
- package/coverage/src/server/event.js.html +1 -1
- package/coverage/src/server/extendBaseNode.ts.html +7 -4
- package/coverage/src/server/formatTsUtils.ts.html +1 -1
- package/coverage/src/server/getConnector.ts.html +1 -1
- package/coverage/src/server/getExtensionModules.ts.html +1 -1
- package/coverage/src/server/getFunctions.ts.html +1 -1
- package/coverage/src/server/getInterfaces.ts.html +1 -1
- package/coverage/src/server/getLogging.ts.html +1 -1
- package/coverage/src/server/getLogics.ts.html +1 -1
- package/coverage/src/server/getMemberIdentifier.ts.html +161 -113
- package/coverage/src/server/getProcessComponents.ts.html +1 -1
- package/coverage/src/server/getProcesses.ts.html +1 -1
- package/coverage/src/server/getValidates.ts.html +1 -1
- package/coverage/src/server/index.html +25 -25
- package/coverage/src/server/index.ts.html +1 -1
- package/coverage/src/server/naslServer.ts.html +470 -59
- package/coverage/src/server/naslStdlibMap.ts.html +1 -1
- package/coverage/src/server/process2LogicNamespace.ts.html +1 -1
- package/coverage/src/server/translator.ts.html +3 -3
- package/coverage/src/service/creator/add.configs.js.html +26 -8
- package/coverage/src/service/creator/errHandles.js.html +19 -37
- package/coverage/src/service/creator/index.html +22 -22
- package/coverage/src/service/creator/index.js.html +1 -1
- package/coverage/src/service/datasource/api.js.html +1 -1
- package/coverage/src/service/datasource/index.html +1 -1
- package/coverage/src/service/datasource/index.js.html +1 -1
- package/coverage/src/service/logic/api.js.html +1 -1
- package/coverage/src/service/logic/index.html +1 -1
- package/coverage/src/service/logic/index.js.html +1 -1
- package/coverage/src/service/storage/api.js.html +1 -1
- package/coverage/src/service/storage/index.html +19 -19
- package/coverage/src/service/storage/index.ts.html +1 -1
- package/coverage/src/service/storage/init.ts.html +1498 -598
- package/coverage/src/service/storage/jsoner.ts.html +3 -3
- package/coverage/src/service/storage/map.ts.html +1 -1
- package/coverage/src/service/storage/service.ts.html +1 -1
- package/coverage/src/service/storage/storagePoint.ts.html +1 -1
- package/coverage/src/templator/genCallComponentLogic.ts.html +1 -1
- package/coverage/src/templator/genCreateBlock.ts.html +47 -56
- package/coverage/src/templator/genCurdEditMultipleKeyBlock.ts.html +49 -31
- package/coverage/src/templator/genCurdMultipleKeyBlock.ts.html +81 -93
- package/coverage/src/templator/genEditTableBlock.ts.html +80 -11
- package/coverage/src/templator/genEnumSelectBlock.ts.html +1 -1
- package/coverage/src/templator/genGetBlock.ts.html +1 -1
- package/coverage/src/templator/genGridViewBlock.ts.html +1 -1
- package/coverage/src/templator/genListViewBlock.ts.html +1 -1
- package/coverage/src/templator/genQueryComponent.ts.html +1 -1
- package/coverage/src/templator/genSelectBlock.ts.html +1 -1
- package/coverage/src/templator/genTableBlock.ts.html +66 -3
- package/coverage/src/templator/genUpdateBlock.ts.html +48 -36
- package/coverage/src/templator/index.html +39 -39
- package/coverage/src/templator/index.ts.html +1 -1
- package/coverage/src/templator/utils.ts.html +77 -11
- package/coverage/src/translator/constant.ts.html +1 -1
- package/coverage/src/translator/index.html +20 -20
- package/coverage/src/translator/index.ts.html +1 -1
- package/coverage/src/translator/utils.ts.html +87 -30
- package/coverage/src/utils/cookie.ts.html +1 -1
- package/coverage/src/utils/env.ts.html +1 -1
- package/coverage/src/utils/index.html +27 -27
- package/coverage/src/utils/index.ts.html +115 -22
- package/coverage/src/utils/logger.ts.html +1 -1
- package/coverage/src/utils/sortTsString.ts.html +1 -1
- package/coverage/src/utils/string.ts.html +110 -8
- package/coverage/src/utils/time-slicing.ts.html +1 -1
- package/coverage/src/utils/traverse.ts.html +1 -1
- package/coverage/src/utils/window.ts.html +1 -1
- package/out/bak/translator.d.ts +1 -1
- package/out/bak/translator.js +42 -7
- package/out/bak/translator.js.map +1 -1
- package/out/common/BaseNode.d.ts +9 -4
- package/out/common/BaseNode.js +48 -9
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/Abort__.js +3 -1
- package/out/concepts/Abort__.js.map +1 -1
- package/out/concepts/Anchor__.js +10 -4
- package/out/concepts/Anchor__.js.map +1 -1
- package/out/concepts/AnonymousFunction__.js +27 -11
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/App__.d.ts +85 -0
- package/out/concepts/App__.js +241 -63
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.js +16 -5
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignee__.js +17 -7
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.js +3 -1
- package/out/concepts/AssignmentLine__.js.map +1 -1
- package/out/concepts/Assignment__.js +38 -9
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.js +10 -4
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/AuthInterface__.js +3 -1
- package/out/concepts/AuthInterface__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.js +10 -4
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/AuthLogic__.js +3 -1
- package/out/concepts/AuthLogic__.js.map +1 -1
- package/out/concepts/BackendVariable__.js +34 -6
- package/out/concepts/BackendVariable__.js.map +1 -1
- package/out/concepts/Backend__.js +10 -4
- package/out/concepts/Backend__.js.map +1 -1
- package/out/concepts/BatchAssignment__.js +27 -13
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BinaryExpression__.js +50 -16
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.js +37 -6
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.js +27 -5
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.js +17 -7
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.js +10 -4
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.js +3 -1
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallAuthInterface__.js +10 -4
- package/out/concepts/CallAuthInterface__.js.map +1 -1
- package/out/concepts/CallConnector__.js +3 -1
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallFunction__.js +45 -16
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.js +14 -8
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.js +49 -27
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.js +17 -7
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.js +3 -1
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.js +10 -4
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.js +10 -4
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigPropertyValue__.js +3 -1
- package/out/concepts/ConfigPropertyValue__.js.map +1 -1
- package/out/concepts/ConfigProperty__.js +10 -4
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.js +10 -4
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Connection__.js +10 -4
- package/out/concepts/Connection__.js.map +1 -1
- package/out/concepts/ConnectorTrigger__.js +3 -1
- package/out/concepts/ConnectorTrigger__.js.map +1 -1
- package/out/concepts/Connector__.js +38 -16
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/Constant__.js +10 -4
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/DataSource__.js +10 -4
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/DatabaseTypeAnnotation__.js +3 -1
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
- package/out/concepts/Destination__.js +10 -4
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.js +3 -1
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.js +3 -1
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.js +25 -8
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.js +17 -7
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.js +3 -1
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.js +10 -4
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Event__.js +10 -4
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ExternalDestination__.js +10 -4
- package/out/concepts/ExternalDestination__.js.map +1 -1
- package/out/concepts/ForEachStatement__.js +32 -24
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendLibrary__.js +17 -7
- package/out/concepts/FrontendLibrary__.js.map +1 -1
- package/out/concepts/Frontend__.js +38 -16
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Function__.js +41 -17
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.js +3 -1
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.js +25 -17
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/Integration__.js +17 -7
- package/out/concepts/Integration__.js.map +1 -1
- package/out/concepts/InterfaceParam__.js +10 -4
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.js +24 -10
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.js +59 -1
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/JavaLogic__.js +3 -1
- package/out/concepts/JavaLogic__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +4 -4
- package/out/concepts/LogicItem__.js +7 -5
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.js +49 -23
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.js +32 -22
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.js +22 -16
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +26 -20
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MetadataType__.d.ts +245 -0
- package/out/concepts/MetadataType__.js +483 -0
- package/out/concepts/MetadataType__.js.map +1 -0
- package/out/concepts/MicroApp__.js +3 -1
- package/out/concepts/MicroApp__.js.map +1 -1
- package/out/concepts/Module__.d.ts +85 -0
- package/out/concepts/Module__.js +115 -3
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/MsgTriggerEvent__.js +10 -4
- package/out/concepts/MsgTriggerEvent__.js.map +1 -1
- package/out/concepts/MsgTriggerLauncher__.js +10 -4
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
- package/out/concepts/Namespace__.js +80 -34
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NewComposite__.js +37 -16
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.d.ts +1 -0
- package/out/concepts/NewList__.js +39 -11
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.js +29 -11
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/NullLiteral__.js +3 -1
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumericLiteral__.js +11 -5
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.js +34 -5
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/OverriddenLogic__.js +45 -19
- package/out/concepts/OverriddenLogic__.js.map +1 -1
- package/out/concepts/Param__.js +34 -6
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Point__.js +3 -1
- package/out/concepts/Point__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js +17 -7
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +59 -25
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.js +3 -1
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/ProcessOutcomes__.js +3 -1
- package/out/concepts/ProcessOutcomes__.js.map +1 -1
- package/out/concepts/Process__.js +38 -16
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.js +10 -4
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.js +3 -1
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.js +10 -4
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.js +10 -4
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.js +10 -4
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.js +10 -4
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.js +10 -4
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js +10 -4
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Rect__.js +3 -1
- package/out/concepts/Rect__.js.map +1 -1
- package/out/concepts/Return__.js +34 -6
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.js +3 -1
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SelectMembers__.js +10 -4
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/Slot__.js +10 -4
- package/out/concepts/Slot__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.js +10 -4
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Start__.js +3 -1
- package/out/concepts/Start__.js.map +1 -1
- package/out/concepts/StringInterpolation__.js +14 -6
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/StringLiteral__.js +3 -1
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.js +10 -4
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.js +17 -7
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.js +14 -8
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.js +10 -4
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/Theme__.js +3 -1
- package/out/concepts/Theme__.js.map +1 -1
- package/out/concepts/Transactional__.js +3 -1
- package/out/concepts/Transactional__.js.map +1 -1
- package/out/concepts/TriggerEvent__.js +10 -4
- package/out/concepts/TriggerEvent__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.js +3 -1
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +2 -1
- package/out/concepts/TypeAnnotation__.js +75 -15
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.js +3 -1
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.js +16 -6
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.js +3 -1
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/UseComponent__.js +3 -1
- package/out/concepts/UseComponent__.js.map +1 -1
- package/out/concepts/ValidationRule__.js +11 -5
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.js +35 -7
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewBlock__.js +3 -1
- package/out/concepts/ViewBlock__.js.map +1 -1
- package/out/concepts/ViewComponent__.js +45 -19
- package/out/concepts/ViewComponent__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +1 -0
- package/out/concepts/ViewElement__.js +83 -21
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +1 -0
- package/out/concepts/View__.js +85 -22
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.js +19 -11
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.js +2 -2
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/index__.d.ts +1 -0
- package/out/concepts/index__.js +1 -0
- package/out/concepts/index__.js.map +1 -1
- package/out/concepts/types__.d.ts +2 -1
- package/out/generator/genBundleFiles.js +0 -1
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genMetaData.js +32 -4
- package/out/generator/genMetaData.js.map +1 -1
- package/out/generator/permission.js +31 -6
- package/out/generator/permission.js.map +1 -1
- package/out/sentry/index.js +2 -1
- package/out/sentry/index.js.map +1 -1
- package/out/server/extendBaseNode.js +1 -1
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/getMemberIdentifier.js +1 -1
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/naslServer.d.ts +2 -0
- package/out/server/naslServer.js +143 -5
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +5 -2
- package/out/server/translator.js.map +1 -1
- package/out/service/creator/add.configs.js +1 -1
- package/out/service/creator/add.configs.js.map +1 -1
- package/out/service/storage/init.d.ts +1 -1
- package/out/service/storage/init.js +45 -21
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +13 -7
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +15 -9
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +13 -10
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +4 -4
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +14 -10
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/templator/utils.d.ts +6 -1
- package/out/templator/utils.js +24 -1
- package/out/templator/utils.js.map +1 -1
- package/out/translator/utils.d.ts +8 -0
- package/out/translator/utils.js +19 -1
- package/out/translator/utils.js.map +1 -1
- package/out/utils/cookie.d.ts +1 -1
- package/out/utils/cookie.js +2 -2
- package/out/utils/cookie.js.map +1 -1
- package/out/utils/index.js +19 -0
- package/out/utils/index.js.map +1 -1
- package/out/utils/sortTsString.js +10 -4
- package/out/utils/sortTsString.js.map +1 -1
- package/out/utils/string.d.ts +1 -0
- package/out/utils/string.js +33 -1
- package/out/utils/string.js.map +1 -1
- package/package.json +1 -1
- package/sandbox/stdlib/nasl.core.ts +187 -185
- package/src/bak/translator.js +76 -43
- package/src/common/BaseNode.ts +62 -12
- package/src/concepts/Abort__.ts +1 -0
- package/src/concepts/Anchor__.ts +19 -14
- package/src/concepts/AnonymousFunction__.ts +26 -12
- package/src/concepts/App__.ts +359 -76
- package/src/concepts/Argument__.ts +14 -4
- package/src/concepts/Assignee__.ts +15 -6
- package/src/concepts/AssignmentLine__.ts +1 -0
- package/src/concepts/Assignment__.ts +43 -11
- package/src/concepts/Attribute__.ts +8 -3
- package/src/concepts/AuthInterface__.ts +1 -0
- package/src/concepts/AuthLogicForCallInterface__.ts +8 -3
- package/src/concepts/AuthLogic__.ts +4 -0
- package/src/concepts/BackendVariable__.ts +30 -6
- package/src/concepts/Backend__.ts +8 -3
- package/src/concepts/BatchAssignment__.ts +28 -13
- package/src/concepts/BinaryExpression__.ts +56 -22
- package/src/concepts/BindAttribute__.ts +50 -18
- package/src/concepts/BindDirective__.ts +26 -5
- package/src/concepts/BindEvent__.ts +34 -15
- package/src/concepts/BindStyle__.ts +8 -3
- package/src/concepts/BooleanLiteral__.ts +1 -0
- package/src/concepts/CallAuthInterface__.ts +8 -3
- package/src/concepts/CallConnector__.ts +1 -0
- package/src/concepts/CallFunction__.ts +49 -27
- package/src/concepts/CallInterface__.ts +43 -28
- package/src/concepts/CallLogic__.ts +85 -62
- package/src/concepts/CallQueryComponent__.ts +15 -6
- package/src/concepts/Comment__.ts +2 -1
- package/src/concepts/CompletionProperty__.ts +8 -3
- package/src/concepts/ConfigGroup__.ts +8 -3
- package/src/concepts/ConfigPropertyValue__.ts +1 -0
- package/src/concepts/ConfigProperty__.ts +8 -3
- package/src/concepts/Configuration__.ts +8 -3
- package/src/concepts/Connection__.ts +9 -4
- package/src/concepts/ConnectorTrigger__.ts +1 -0
- package/src/concepts/Connector__.ts +36 -15
- package/src/concepts/Constant__.ts +8 -3
- package/src/concepts/DataSource__.ts +8 -3
- package/src/concepts/DatabaseTypeAnnotation__.ts +1 -0
- package/src/concepts/Destination__.ts +8 -4
- package/src/concepts/End__.ts +1 -0
- package/src/concepts/EntityIndex__.ts +1 -0
- package/src/concepts/EntityProperty__.ts +23 -7
- package/src/concepts/Entity__.ts +15 -6
- package/src/concepts/EnumItem__.ts +1 -0
- package/src/concepts/Enum__.ts +8 -3
- package/src/concepts/Event__.ts +8 -3
- package/src/concepts/ExternalDestination__.ts +8 -3
- package/src/concepts/ForEachStatement__.ts +43 -36
- package/src/concepts/FrontendLibrary__.ts +15 -6
- package/src/concepts/Frontend__.ts +36 -15
- package/src/concepts/Function__.ts +40 -18
- package/src/concepts/Identifier__.ts +1 -0
- package/src/concepts/IfStatement__.ts +29 -20
- package/src/concepts/Integration__.ts +15 -6
- package/src/concepts/InterfaceParam__.ts +8 -3
- package/src/concepts/Interface__.ts +28 -15
- package/src/concepts/JSBlock__.ts +60 -0
- package/src/concepts/JavaLogic__.ts +1 -0
- package/src/concepts/LogicItem__.ts +5 -4
- package/src/concepts/Logic__.ts +70 -58
- package/src/concepts/MatchCase__.ts +42 -29
- package/src/concepts/Match__.ts +23 -16
- package/src/concepts/MemberExpression__.ts +24 -19
- package/src/concepts/MetadataType__.ts +637 -0
- package/src/concepts/MicroApp__.ts +1 -0
- package/src/concepts/Module__.ts +227 -9
- package/src/concepts/MsgTriggerEvent__.ts +8 -3
- package/src/concepts/MsgTriggerLauncher__.ts +8 -3
- package/src/concepts/Namespace__.ts +78 -33
- package/src/concepts/NewComposite__.ts +41 -19
- package/src/concepts/NewList__.ts +41 -11
- package/src/concepts/NewMap__.ts +31 -11
- package/src/concepts/NullLiteral__.ts +1 -0
- package/src/concepts/NumericLiteral__.ts +9 -4
- package/src/concepts/OqlQueryComponent__.ts +35 -5
- package/src/concepts/OverriddenLogic__.ts +44 -19
- package/src/concepts/Param__.ts +38 -15
- package/src/concepts/Point__.ts +1 -0
- package/src/concepts/ProcessComponent__.ts +15 -6
- package/src/concepts/ProcessElement__.ts +57 -24
- package/src/concepts/ProcessOutcome__.ts +1 -0
- package/src/concepts/ProcessOutcomes__.ts +1 -0
- package/src/concepts/Process__.ts +36 -15
- package/src/concepts/QueryAggregateExpression__.ts +8 -3
- package/src/concepts/QueryFieldExpression__.ts +1 -0
- package/src/concepts/QueryFromExpression__.ts +8 -3
- package/src/concepts/QueryGroupByExpression__.ts +8 -3
- package/src/concepts/QueryJoinExpression__.ts +8 -3
- package/src/concepts/QueryLimitExpression__.ts +8 -3
- package/src/concepts/QueryOrderByExpression__.ts +8 -3
- package/src/concepts/QuerySelectExpression__.ts +8 -3
- package/src/concepts/Rect__.ts +1 -0
- package/src/concepts/Return__.ts +31 -6
- package/src/concepts/Role__.ts +1 -0
- package/src/concepts/SelectMembers__.ts +8 -3
- package/src/concepts/Slot__.ts +8 -3
- package/src/concepts/SqlQueryComponent__.ts +8 -3
- package/src/concepts/Start__.ts +1 -0
- package/src/concepts/StringInterpolation__.ts +14 -7
- package/src/concepts/StringLiteral__.ts +1 -0
- package/src/concepts/StructureProperty__.ts +8 -3
- package/src/concepts/Structure__.ts +15 -6
- package/src/concepts/SwitchCase__.ts +14 -9
- package/src/concepts/SwitchStatement__.ts +21 -16
- package/src/concepts/Theme__.ts +1 -0
- package/src/concepts/Transactional__.ts +1 -0
- package/src/concepts/TriggerEvent__.ts +8 -3
- package/src/concepts/TriggerLauncher__.ts +1 -0
- package/src/concepts/TypeAnnotation__.ts +75 -21
- package/src/concepts/TypeParam__.ts +2 -1
- package/src/concepts/UnaryExpression__.ts +15 -6
- package/src/concepts/Unparsed__.ts +2 -1
- package/src/concepts/UseComponent__.ts +1 -0
- package/src/concepts/ValidationRule__.ts +10 -5
- package/src/concepts/Variable__.ts +32 -8
- package/src/concepts/ViewBlock__.ts +1 -0
- package/src/concepts/ViewComponent__.ts +43 -18
- package/src/concepts/ViewElement__.ts +191 -120
- package/src/concepts/View__.ts +136 -58
- package/src/concepts/WhileStatement__.ts +26 -15
- package/src/concepts/basics/stdlib/nasl.util.ts +2 -2
- package/src/concepts/index__.ts +1 -0
- package/src/concepts/types__.ts +2 -0
- package/src/generator/genBundleFiles.ts +11 -13
- package/src/generator/genMetaData.ts +37 -8
- package/src/generator/permission.ts +33 -9
- package/src/sentry/index.ts +3 -1
- package/src/server/extendBaseNode.ts +2 -1
- package/src/server/getMemberIdentifier.ts +122 -121
- package/src/server/naslServer.ts +141 -5
- package/src/server/translator.ts +5 -2
- package/src/service/creator/add.configs.js +1 -1
- package/src/service/storage/init.ts +46 -22
- package/src/templator/genCreateBlock.ts +35 -38
- package/src/templator/genCurdEditMultipleKeyBlock.ts +31 -25
- package/src/templator/genCurdMultipleKeyBlock.ts +67 -71
- package/src/templator/genEditTableBlock.ts +7 -6
- package/src/templator/genUpdateBlock.ts +30 -26
- package/src/templator/utils.ts +23 -1
- package/src/translator/utils.ts +20 -0
- package/src/utils/cookie.ts +2 -2
- package/src/utils/index.ts +19 -1
- package/src/utils/sortTsString.ts +9 -4
- package/src/utils/string.ts +34 -0
- package/test/concepts/call-function/__snapshots__/toEmbeddedTS.spec.ts.snap +26 -0
- package/test/concepts/call-function/__snapshots__/toJS.spec.ts.snap +26 -0
- package/test/concepts/call-function/constant.ts +5 -0
- package/test/concepts/call-function/fixtures/from-string.json +100 -0
- package/test/concepts/call-function/fixtures/to-string-global-tz.json +99 -0
- package/test/concepts/call-function/fixtures/to-string-no-tz.json +89 -0
- package/test/concepts/call-function/fixtures/to-string-user-tz.json +101 -0
- package/test/concepts/call-function/fixtures/to-string-utc-tz.json +101 -0
- package/test/concepts/call-function/toEmbeddedTS.spec.ts +14 -0
- package/test/concepts/call-function/toJS.spec.ts +14 -0
- package/test/concepts/call-interface/__snapshots__/toJS.spec.ts.snap +2 -2
- package/test/concepts/call-logic/__snapshots__/toJS.spec.ts.snap +3 -3
- package/test/concepts/match/__snapshots__/toJS.spec.ts.snap +1 -1
- package/test/concepts/numeric-literal/__snapshots__/toJS.spec.ts.snap +1 -1
- package/test/concepts/validation-rule/__snapshots__/toJS.spec.ts.snap +3 -3
- package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +4 -0
- package/.nyc_output/d58d92d8-c0d6-479b-9f82-1f4da8e73ff3.json +0 -1
- package/.nyc_output/processinfo/d58d92d8-c0d6-479b-9f82-1f4da8e73ff3.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
|
@@ -2,189 +2,191 @@ type BooleanAlias = Boolean;
|
|
|
2
2
|
type StringAlias = String;
|
|
3
3
|
|
|
4
4
|
declare namespace nasl.core {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
5
|
+
export type Any = any;
|
|
6
|
+
export class Boolean extends globalThis.Boolean {
|
|
7
|
+
}
|
|
8
|
+
// Long<Long<Decimal<Decimal 小类型可以隐式转换为大类型,反之不可。
|
|
9
|
+
// export class Long {
|
|
10
|
+
// accept: 'Long';
|
|
11
|
+
// constructor(num?: number);
|
|
12
|
+
// }
|
|
13
|
+
|
|
14
|
+
// export class Decimal {
|
|
15
|
+
// accept: 'Decimal' | 'Long' | 'Long';
|
|
16
|
+
// constructor(num?: number);
|
|
17
|
+
// }
|
|
18
|
+
export class Decimal {
|
|
19
|
+
accept: 'Decimal' | 'Long';
|
|
20
|
+
constructor(num?: number);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export class Long {
|
|
24
|
+
accept: 'Long';
|
|
25
|
+
constructor(num?: number);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export class String extends globalThis.String {
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
length: nasl.core.Long;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export class Text extends String {
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class Binary {
|
|
37
|
+
accept: 'Binary';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export class Date {
|
|
41
|
+
accept: 'Date';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export class Time {
|
|
45
|
+
accept: 'Time';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class DateTime {
|
|
49
|
+
accept: 'DateTime';
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// export class Email extends String {
|
|
53
|
+
// subAccept: 'Email';
|
|
54
|
+
// }
|
|
55
|
+
|
|
56
|
+
export class Union {
|
|
57
|
+
accept: 'Union';
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// &&
|
|
61
|
+
export function and(left: Boolean, right: Boolean): Boolean;
|
|
62
|
+
// ||
|
|
63
|
+
export function or(left: Boolean, right: Boolean): Boolean;
|
|
64
|
+
|
|
65
|
+
export function add(left: Long, right: Long): Long;
|
|
66
|
+
export function add(left: Decimal, right: Decimal): Decimal;
|
|
67
|
+
export function add(left: String, right: Any): String;
|
|
68
|
+
export function add(left: Any, right: String): String;
|
|
69
|
+
export function add(left: Long, right: Long): Long; // 为了让提示到整数上,最后补一个重载
|
|
70
|
+
|
|
71
|
+
export function minus(left: Long, right: Long): Long;
|
|
72
|
+
export function minus(left: Decimal, right: Decimal): Decimal;
|
|
73
|
+
export function minus(left: Long, right: Long): Long;
|
|
74
|
+
|
|
75
|
+
export function multiply(left: Long, right: Long): Long;
|
|
76
|
+
export function multiply(left: Decimal, right: Decimal): Decimal;
|
|
77
|
+
export function multiply(left: Long, right: Long): Long;
|
|
78
|
+
|
|
79
|
+
export function divide(left: Long, right: Long): Decimal;
|
|
80
|
+
export function divide(left: Decimal, right: Decimal): Decimal;
|
|
81
|
+
export function divide(left: Long, right: Long): Decimal;
|
|
82
|
+
|
|
83
|
+
export function remainder(left: Long, right: Long): Long;
|
|
84
|
+
export function remainder(left: Decimal, right: Decimal): Decimal;
|
|
85
|
+
export function remainder(left: Long, right: Long): Long;
|
|
86
|
+
|
|
87
|
+
export function equal<T>(left: T, right: T): Boolean;
|
|
88
|
+
export function isEqual<T>(left: T, right: T): Boolean;
|
|
89
|
+
export function notEqual<T>(left: T, right: T): Boolean;
|
|
90
|
+
export function isNotEqual<T>(left: T, right: T): Boolean;
|
|
91
|
+
|
|
92
|
+
export function greaterThan(left: Long, right: Long): Boolean;
|
|
93
|
+
export function greaterThan(left: String, right: String): Boolean;
|
|
94
|
+
export function greaterThan(left: Date, right: Date): Boolean;
|
|
95
|
+
export function greaterThan(left: Time, right: Time): Boolean;
|
|
96
|
+
export function greaterThan(left: DateTime, right: DateTime): Boolean;
|
|
97
|
+
export function greaterThan(left: Decimal, right: Decimal): Boolean;
|
|
98
|
+
export function greaterThan(left: Long, right: Long): Boolean;
|
|
99
|
+
|
|
100
|
+
export function lessThan(left: Long, right: Long): Boolean;
|
|
101
|
+
export function lessThan(left: String, right: String): Boolean;
|
|
102
|
+
export function lessThan(left: Date, right: Date): Boolean;
|
|
103
|
+
export function lessThan(left: Time, right: Time): Boolean;
|
|
104
|
+
export function lessThan(left: DateTime, right: DateTime): Boolean;
|
|
105
|
+
export function lessThan(left: Decimal, right: Decimal): Boolean;
|
|
106
|
+
export function lessThan(left: Long, right: Long): Boolean;
|
|
107
|
+
|
|
108
|
+
export function greaterThanOrEqual(left: Long, right: Long): Boolean;
|
|
109
|
+
export function greaterThanOrEqual(left: String, right: String): Boolean;
|
|
110
|
+
export function greaterThanOrEqual(left: Date, right: Date): Boolean;
|
|
111
|
+
export function greaterThanOrEqual(left: Time, right: Time): Boolean;
|
|
112
|
+
export function greaterThanOrEqual(left: DateTime, right: DateTime): Boolean;
|
|
113
|
+
export function greaterThanOrEqual(left: Decimal, right: Decimal): Boolean;
|
|
114
|
+
export function greaterThanOrEqual(left: Long, right: Long): Boolean;
|
|
115
|
+
|
|
116
|
+
export function lessThanOrEqual(left: Long, right: Long): Boolean;
|
|
117
|
+
export function lessThanOrEqual(left: String, right: String): Boolean;
|
|
118
|
+
export function lessThanOrEqual(left: Date, right: Date): Boolean;
|
|
119
|
+
export function lessThanOrEqual(left: Time, right: Time): Boolean;
|
|
120
|
+
export function lessThanOrEqual(left: DateTime, right: DateTime): Boolean;
|
|
121
|
+
export function lessThanOrEqual(left: Decimal, right: Decimal): Boolean;
|
|
122
|
+
export function lessThanOrEqual(left: Long, right: Long): Boolean;
|
|
123
|
+
|
|
124
|
+
export function ensureBoolean(value: Boolean): Boolean;
|
|
125
|
+
export function ensureVoid<T>(value: IsVoid<T>): Boolean
|
|
126
|
+
|
|
127
|
+
export function isUnionType<T, S extends T>(obj: T): obj is S;
|
|
128
|
+
|
|
129
|
+
// 代替原来的赋值语句,就只校验左右类型是不是可以赋值,但是不会改变原始类型
|
|
130
|
+
export function assign<T1, T2 extends T1>(left: T1, right: T2): T1;
|
|
131
|
+
export let universalVariable: nasl.core.Any;
|
|
132
|
+
|
|
133
|
+
// new 组件对比类型
|
|
134
|
+
export function compareNew(left: Date, right: Date): Boolean;
|
|
135
|
+
export function compareNew(left: Time, right: Time): Boolean;
|
|
136
|
+
export function compareNew(left: DateTime, right: DateTime): Boolean;
|
|
137
|
+
export function compareNew(left: Long, right: Long): Boolean;
|
|
138
|
+
export function compareNew(left: Long, right: Decimal): Boolean;
|
|
139
|
+
export function compareNew(left: Decimal, right: Long): Boolean;
|
|
140
|
+
export function compareNew(left: String, right: String): Boolean;
|
|
141
|
+
export function compareNew(left: Decimal, right: Decimal): Boolean;
|
|
142
|
+
export function compareNew<T>(left: T, right: T): Boolean;
|
|
143
|
+
|
|
144
|
+
// OQL 临时补救
|
|
145
|
+
export function compare2(left: Date, right: String): Boolean;
|
|
146
|
+
export function compare2(left: DateTime, right: String): Boolean;
|
|
147
|
+
export function compare2(left: String, right: Date): Boolean;
|
|
148
|
+
export function compare2(left: String, right: DateTime): Boolean;
|
|
149
|
+
export function compare2(left: String, right: Time): Boolean;
|
|
150
|
+
export function compare2(left: Date, right: Date): Boolean;
|
|
151
|
+
export function compare2(left: Time, right: Time): Boolean;
|
|
152
|
+
export function compare2(left: DateTime, right: DateTime): Boolean;
|
|
153
|
+
export function compare2(left: String, right: String): Boolean;
|
|
154
|
+
export function compare2(left: Long, right: Long): Boolean;
|
|
155
|
+
export function compare2(left: Long, right: Decimal): Boolean;
|
|
156
|
+
export function compare2(left: Decimal, right: Long): Boolean;
|
|
157
|
+
export function compare2(left: Decimal, right: Decimal): Boolean;
|
|
158
|
+
export function compare2<T>(left: T, right: T): Boolean;
|
|
159
|
+
|
|
160
|
+
// 包括 +
|
|
161
|
+
export function add2(left: Long, right: Long): Long;
|
|
162
|
+
export function add2(left: Decimal, right: Decimal): Decimal;
|
|
163
|
+
export function add2(left: Long, right: Long): Long;
|
|
164
|
+
export function add2(left: Long, right: Decimal): Decimal;
|
|
165
|
+
export function add2(left: Decimal, right: Long): Decimal;
|
|
166
|
+
export function add2(left: String, right: Any): String;
|
|
167
|
+
export function add2(left: Any, right: String): String;
|
|
168
|
+
export function add2(left: Long, right: Long): Long; // 为了让提示到整数上,最后补一个重载
|
|
169
|
+
|
|
170
|
+
// 包括 - * %
|
|
171
|
+
export function arith2(left: Long, right: Long): Long;
|
|
172
|
+
export function arith2(left: Decimal, right: Decimal): Decimal;
|
|
173
|
+
export function arith2(left: Long, right: Decimal): Decimal;
|
|
174
|
+
export function arith2(left: Decimal, right: Long): Decimal;
|
|
175
|
+
export function arith2(left: Long, right: Long): Long; // 为了让提示到整数上,最后补一个重载
|
|
176
|
+
|
|
177
|
+
// 包括 /
|
|
178
|
+
export function divided2(left: Long, right: Long): Decimal;
|
|
179
|
+
export function divided2(left: Decimal, right: Decimal): Decimal;
|
|
180
|
+
export function divided2(left: Long, right: Decimal): Decimal;
|
|
181
|
+
export function divided2(left: Decimal, right: Long): Decimal;
|
|
182
|
+
export function divided2(left: Long, right: Long): Decimal; // 为了让提示到整数上,最后补一个重载
|
|
183
|
+
|
|
184
|
+
export class Enums {
|
|
185
|
+
accept: 'Enums';
|
|
186
|
+
}
|
|
187
|
+
export class None {
|
|
188
|
+
accept: 'None';
|
|
189
|
+
}
|
|
190
|
+
export type Incompatible<A, B> = A extends B ? never : A
|
|
191
|
+
export type IsVoid<T> = T extends void ? never : T
|
|
190
192
|
}
|
package/src/bak/translator.js
CHANGED
|
@@ -9,12 +9,12 @@ function tryJSONParse(str) {
|
|
|
9
9
|
|
|
10
10
|
try {
|
|
11
11
|
result = JSON.parse(str);
|
|
12
|
-
} catch (e) {}
|
|
12
|
+
} catch (e) { }
|
|
13
13
|
|
|
14
14
|
return result;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export default function (definition) {
|
|
17
|
+
export default function (definition, view) {
|
|
18
18
|
/**
|
|
19
19
|
* 页面的 data
|
|
20
20
|
* 包含 页面变量 / 页面入参 / 页面元素绑定的表达式的返回
|
|
@@ -33,21 +33,44 @@ export default function (definition) {
|
|
|
33
33
|
viewVariables.forEach((viewVariable) => {
|
|
34
34
|
dataMap[viewVariable.code || viewVariable.name] = true;
|
|
35
35
|
const typeAnnotation = viewVariable.typeAnnotation || viewVariable.__TypeAnnotation;
|
|
36
|
+
let { typeKind, typeNamespace, typeName, sortedTypeKey } = typeAnnotation || {};
|
|
37
|
+
if (typeNamespace?.endsWith('.metadataTypes')) {
|
|
38
|
+
const referenceNode = view.getAncestor('App').findNodeByCompleteName(typeNamespace + '.' + typeName) || {}
|
|
39
|
+
const typeAn = referenceNode.typeAnnotation || {};
|
|
40
|
+
typeKind = typeAn.typeKind;
|
|
41
|
+
typeNamespace = typeAn.typeNamespace;
|
|
42
|
+
typeName = typeAn.typeName;
|
|
43
|
+
sortedTypeKey = `${typeNamespace}.${typeName}`;
|
|
44
|
+
if (`${viewVariable.defaultValue}` === 'undefined' || `${viewVariable.defaultValue}` === 'null') {
|
|
45
|
+
viewVariable?.setDefaultValue('')
|
|
46
|
+
}
|
|
47
|
+
}
|
|
36
48
|
const needGenInitFromSchema =
|
|
37
|
-
typeAnnotation && (!['primitive', 'union'].includes(
|
|
49
|
+
typeAnnotation && (!['primitive', 'union'].includes(typeKind) || typeName === 'DateTime');
|
|
38
50
|
let code = `${safeCodeAsKey(viewVariable.name)}:`;
|
|
39
51
|
if (needGenInitFromSchema) {
|
|
40
|
-
code += `this.$genInitFromSchema('${
|
|
52
|
+
code += `this.$genInitFromSchema('${sortedTypeKey}', `;
|
|
41
53
|
}
|
|
42
54
|
if (viewVariable.concept === 'Param') {
|
|
43
|
-
code += `this.$route.query.hasOwnProperty('${viewVariable.name}') ? this.$genInitFromSchema('${
|
|
55
|
+
code += `this.$route.query.hasOwnProperty('${viewVariable.name}') ? this.$genInitFromSchema('${sortedTypeKey}', this.$route.query.${viewVariable.name}) :`;
|
|
44
56
|
}
|
|
45
57
|
|
|
46
58
|
const { defaultValue } = viewVariable;
|
|
47
59
|
const defaultValueType = Object.prototype.toString.call(defaultValue);
|
|
48
|
-
const { typeKind, typeNamespace, typeName } = typeAnnotation || {};
|
|
49
60
|
// 设置成null,才能同步给后端清除该值,但是null对checkbox组件是一种特殊状态
|
|
50
61
|
let parsedValue = defaultValue ?? undefined;
|
|
62
|
+
const isDecimal = typeKind === 'primitive' && ['Decimal', "Double"].includes(typeName)
|
|
63
|
+
const isInteger = typeKind === 'primitive' && ['Long', "Integer"].includes(typeName)
|
|
64
|
+
function parseNumberValue(defaultValue, typeAnnotation) {
|
|
65
|
+
const { typeKind, typeName } = typeAnnotation;
|
|
66
|
+
const isNaslNumber = typeKind === 'primitive' && ['Decimal', 'Long', 'Double', 'Int'].includes(typeName);
|
|
67
|
+
if (isNaslNumber) {
|
|
68
|
+
return String(defaultValue);
|
|
69
|
+
} else {
|
|
70
|
+
return tryJSONParse(defaultValue) ?? defaultValue;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
51
74
|
if (
|
|
52
75
|
defaultValueType === '[object String]' &&
|
|
53
76
|
!(typeKind === 'primitive' && typeNamespace === 'nasl.core' && ['String', 'Text', 'Email'].includes(typeName)) &&
|
|
@@ -59,10 +82,20 @@ export default function (definition) {
|
|
|
59
82
|
if ([''].includes(defaultValue)) {
|
|
60
83
|
parsedValue = undefined;
|
|
61
84
|
} else {
|
|
62
|
-
parsedValue =
|
|
85
|
+
parsedValue = parseNumberValue(defaultValue, typeAnnotation);
|
|
63
86
|
}
|
|
64
87
|
}
|
|
65
|
-
code += `${JSON.stringify(parsedValue)}`;
|
|
88
|
+
// code += `${JSON.stringify(parsedValue)}`;
|
|
89
|
+
const isNil = val => val === undefined || val === null;
|
|
90
|
+
if (isDecimal) {
|
|
91
|
+
parsedValue = isNil(parsedValue) ? parsedValue : `new NaslDecimal('${parsedValue}')`
|
|
92
|
+
code += `${parsedValue} `;
|
|
93
|
+
} else if (isInteger) {
|
|
94
|
+
parsedValue = isNil(parsedValue) ? parsedValue : `new NaslLong('${parsedValue}')`
|
|
95
|
+
code += `${parsedValue} `;
|
|
96
|
+
} else {
|
|
97
|
+
code += `${JSON.stringify(parsedValue)} `;
|
|
98
|
+
}
|
|
66
99
|
if (needGenInitFromSchema) {
|
|
67
100
|
code += `)`;
|
|
68
101
|
}
|
|
@@ -92,48 +125,48 @@ export default function (definition) {
|
|
|
92
125
|
})
|
|
93
126
|
})
|
|
94
127
|
definition.elements.forEach(element => {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
128
|
+
element.bindAttrs.filter((attr) => PAGE_COMPONENT_INCLUDE_TAG_MAP[element.tag]?.[attr.name]).forEach(attr => {
|
|
129
|
+
let variable = '';
|
|
130
|
+
if (attr.expression) {
|
|
131
|
+
variable += `${attr.expression.toJS()}`
|
|
132
|
+
// attrsData.push(code)
|
|
133
|
+
} else if (attr.type === 'static') {
|
|
134
|
+
variable = `${attr.value}`
|
|
135
|
+
// attrsData.push(code)
|
|
136
|
+
}
|
|
137
|
+
if (attr.expression?.concept === 'CallLogic' && attr.name === 'data-source') {
|
|
138
|
+
const codeLoad = `async '__${element.name}_dataSourceLoad'(params) {
|
|
106
139
|
this['__${element.name}_params'] = {...params};
|
|
107
140
|
return ${variable}
|
|
108
141
|
}`
|
|
109
|
-
|
|
110
|
-
|
|
142
|
+
viewMethodData.push(codeLoad)
|
|
143
|
+
const code = `async '__${element.name}_dataSource'(params) {
|
|
111
144
|
return ${variable}
|
|
112
145
|
}`
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
146
|
+
viewMethodData.push(code)
|
|
147
|
+
} else {
|
|
148
|
+
const code = `'__${element.name}_${attrConvertCamelCase(attr.name)}'(${variable.includes('(current || {}).item') ? 'current' : ''}) {
|
|
116
149
|
return ${variable?.trim()?.length > 0 ? variable : undefined}
|
|
117
150
|
}`
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
151
|
+
viewMethodData.push(code)
|
|
152
|
+
}
|
|
153
|
+
})
|
|
154
|
+
viewVariablesData.push(`['__${element.name}_params']: {}`);
|
|
155
|
+
// if (['u-select', 'van-pickerson'].includes(element.tag)) {
|
|
156
|
+
// viewMethodData.push(`['__${element.name}_page-number']() {
|
|
157
|
+
// return this['__${element.name}_params']?.page ?? 1
|
|
158
|
+
// }`)
|
|
159
|
+
// viewMethodData.push(`['__${element.name}_filterText']() {
|
|
160
|
+
// return this['__${element.name}_params']?.filterText ?? ''
|
|
161
|
+
// }`)
|
|
162
|
+
// } else if (['u-list-view', 'u-grid-view', 'u-table-view', 'van-list-view', 'van-grid-view'].includes(element.tag) && element.bindAttrs?.findIndex((attr) => attr.name === 'sorting') === -1) {
|
|
163
|
+
// viewMethodData.push(`['__${element.name}_sorting']() {
|
|
164
|
+
// return {
|
|
165
|
+
// field: undefined,
|
|
166
|
+
// order: undefined
|
|
167
|
+
// }
|
|
168
|
+
// }`)
|
|
169
|
+
// }
|
|
137
170
|
})
|
|
138
171
|
|
|
139
172
|
let viewExpressionMethods;
|