@lcap/nasl 3.6.0-alpha.3 → 3.6.0-alpha.5
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/.nyc_output/50a74696-517e-4e22-8a16-9eeecc5ae7c2.json +1 -0
- package/.nyc_output/processinfo/50a74696-517e-4e22-8a16-9eeecc5ae7c2.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/coverage/cobertura-coverage.xml +6417 -0
- package/coverage/index.html +127 -127
- package/coverage/src/automate/engine/index.html +1 -1
- package/coverage/src/automate/engine/utils.js.html +28 -28
- package/coverage/src/bak/index.html +19 -19
- package/coverage/src/bak/translator.js.html +59 -293
- 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 +8 -44
- package/coverage/src/breakpoint/generator/CallbackNode.ts.html +10 -61
- package/coverage/src/breakpoint/generator/index.html +26 -26
- 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 +2 -8
- package/coverage/src/breakpoint/shared/index.html +12 -12
- package/coverage/src/breakpoint/shared/index.ts.html +1 -1
- package/coverage/src/breakpoint/shared/operations.ts.html +4 -4
- package/coverage/src/breakpoint/shared/socket.ts.html +1 -1
- package/coverage/src/breakpoint/shared/utils.ts.html +80 -29
- package/coverage/src/breakpoint/store/core.ts.html +12 -12
- 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 +235 -259
- package/coverage/src/common/Command.ts.html +6 -9
- package/coverage/src/common/EventEmitter.ts.html +34 -19
- package/coverage/src/common/Messager.ts.html +1 -1
- package/coverage/src/common/asyncFuncMap.ts.html +1 -1
- package/coverage/src/common/index.html +28 -28
- package/coverage/src/common/index.ts.html +1 -1
- package/coverage/src/common/utils.ts.html +1 -1
- package/coverage/src/concepts/Abort__.ts.html +2 -2
- package/coverage/src/concepts/AbstractInterface__.ts.html +6 -6
- package/coverage/src/concepts/Anchor__.ts.html +3 -3
- package/coverage/src/concepts/AnonymousFunction__.ts.html +69 -123
- package/coverage/src/concepts/App__.ts.html +194 -623
- package/coverage/src/concepts/Argument__.ts.html +30 -30
- package/coverage/src/concepts/Assignee__.ts.html +3 -3
- package/coverage/src/concepts/AssignmentLine__.ts.html +8 -8
- package/coverage/src/concepts/Assignment__.ts.html +9 -9
- package/coverage/src/concepts/Attribute__.ts.html +2 -2
- package/coverage/src/concepts/AuthInterface__.ts.html +2 -2
- package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +3 -3
- package/coverage/src/concepts/AuthLogic__.ts.html +2 -2
- package/coverage/src/concepts/BackendVariable__.ts.html +11 -35
- package/coverage/src/concepts/Backend__.ts.html +7 -7
- package/coverage/src/concepts/BatchAssignment__.ts.html +3 -3
- package/coverage/src/concepts/BinaryExpression__.ts.html +26 -38
- package/coverage/src/concepts/BindAttribute__.ts.html +15 -60
- package/coverage/src/concepts/BindDirective__.ts.html +20 -65
- package/coverage/src/concepts/BindEvent__.ts.html +31 -115
- package/coverage/src/concepts/BindStyle__.ts.html +3 -3
- package/coverage/src/concepts/Block__.ts.html +3 -3
- package/coverage/src/concepts/BooleanLiteral__.ts.html +8 -8
- package/coverage/src/concepts/CallAuthInterface__.ts.html +3 -3
- package/coverage/src/concepts/CallConnector__.ts.html +2 -2
- package/coverage/src/concepts/CallFunction__.ts.html +88 -97
- package/coverage/src/concepts/CallInterface__.ts.html +60 -75
- package/coverage/src/concepts/CallLogic__.ts.html +111 -87
- package/coverage/src/concepts/CallQueryComponent__.ts.html +303 -57
- package/coverage/src/concepts/Comment__.ts.html +2 -2
- package/coverage/src/concepts/CompletionProperty__.ts.html +2 -2
- package/coverage/src/concepts/ConfigGroup__.ts.html +8 -8
- package/coverage/src/concepts/ConfigPropertyValue__.ts.html +2 -2
- package/coverage/src/concepts/ConfigProperty__.ts.html +3 -3
- package/coverage/src/concepts/Configuration__.ts.html +9 -9
- package/coverage/src/concepts/Connection__.ts.html +3 -3
- package/coverage/src/concepts/ConnectorTrigger__.ts.html +2 -2
- package/coverage/src/concepts/Connector__.ts.html +3 -3
- package/coverage/src/concepts/Constant__.ts.html +18 -12
- package/coverage/src/concepts/CountersignPolicy__.ts.html +2 -2
- package/coverage/src/concepts/DataSource__.ts.html +3 -3
- package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +2 -2
- package/coverage/src/concepts/DefaultValue__.ts.html +3 -3
- package/coverage/src/concepts/Destination__.ts.html +12 -18
- package/coverage/src/concepts/End__.ts.html +10 -13
- package/coverage/src/concepts/EntityIndex__.ts.html +2 -2
- package/coverage/src/concepts/EntityProperty__.ts.html +3 -3
- package/coverage/src/concepts/Entity__.ts.html +4 -10
- package/coverage/src/concepts/EnumItem__.ts.html +2 -2
- package/coverage/src/concepts/Enum__.ts.html +3 -3
- package/coverage/src/concepts/Event__.ts.html +12 -222
- package/coverage/src/concepts/ExternalDestination__.ts.html +3 -3
- package/coverage/src/concepts/ForEachStatement__.ts.html +3 -3
- package/coverage/src/concepts/FrontendLibrary__.ts.html +3 -3
- package/coverage/src/concepts/FrontendVariable__.ts.html +2 -2
- package/coverage/src/concepts/Frontend__.ts.html +770 -26
- package/coverage/src/concepts/Function__.ts.html +10 -10
- package/coverage/src/concepts/I18nInfo__.ts.html +2 -2
- package/coverage/src/concepts/Identifier__.ts.html +54 -102
- package/coverage/src/concepts/IfStatement__.ts.html +3 -3
- package/coverage/src/concepts/ImportedInterface__.ts.html +6 -6
- package/coverage/src/concepts/Integration__.ts.html +3 -3
- package/coverage/src/concepts/InterfaceParam__.ts.html +7 -7
- package/coverage/src/concepts/Interface__.ts.html +31 -73
- package/coverage/src/concepts/JSBlock__.ts.html +2 -2
- package/coverage/src/concepts/JavaLogic__.ts.html +2 -2
- package/coverage/src/concepts/LogicItem__.ts.html +11 -17
- package/coverage/src/concepts/Logic__.ts.html +150 -267
- package/coverage/src/concepts/MatchCase__.ts.html +3 -3
- package/coverage/src/concepts/Match__.ts.html +3 -3
- package/coverage/src/concepts/MemberExpression__.ts.html +22 -22
- package/coverage/src/concepts/MetadataType__.ts.html +3 -3
- package/coverage/src/concepts/MicroApp__.ts.html +2 -2
- package/coverage/src/concepts/Module__.ts.html +20 -20
- package/coverage/src/concepts/MsgTriggerEvent__.ts.html +3 -3
- package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +3 -3
- package/coverage/src/concepts/MultiApprovalPolicy__.ts.html +2 -2
- package/coverage/src/concepts/Namespace__.ts.html +20 -20
- package/coverage/src/concepts/NewComposite__.ts.html +232 -226
- package/coverage/src/concepts/NewList__.ts.html +103 -115
- package/coverage/src/concepts/NewMap__.ts.html +158 -167
- package/coverage/src/concepts/New__.ts.html +2 -2
- package/coverage/src/concepts/NullLiteral__.ts.html +2 -2
- package/coverage/src/concepts/NumericLiteral__.ts.html +14 -14
- package/coverage/src/concepts/OqlQueryComponent__.ts.html +2 -2
- package/coverage/src/concepts/OverriddenLogic__.ts.html +3 -3
- package/coverage/src/concepts/Param__.ts.html +32 -56
- package/coverage/src/concepts/Point__.ts.html +2 -2
- package/coverage/src/concepts/ProcessComponent__.ts.html +3 -3
- package/coverage/src/concepts/ProcessElement__.ts.html +8 -29
- package/coverage/src/concepts/ProcessOutcome__.ts.html +2 -2
- package/coverage/src/concepts/ProcessOutcomes__.ts.html +2 -2
- package/coverage/src/concepts/Process__.ts.html +3 -3
- package/coverage/src/concepts/QueryAggregateExpression__.ts.html +2 -2
- package/coverage/src/concepts/QueryFieldExpression__.ts.html +2 -2
- package/coverage/src/concepts/QueryFromExpression__.ts.html +3 -3
- package/coverage/src/concepts/QueryGroupByExpression__.ts.html +2 -2
- package/coverage/src/concepts/QueryJoinExpression__.ts.html +3 -3
- package/coverage/src/concepts/QueryLimitExpression__.ts.html +6 -6
- package/coverage/src/concepts/QueryOrderByExpression__.ts.html +2 -2
- package/coverage/src/concepts/QuerySelectExpression__.ts.html +3 -3
- package/coverage/src/concepts/Rect__.ts.html +2 -2
- package/coverage/src/concepts/Return__.ts.html +36 -45
- package/coverage/src/concepts/Role__.ts.html +2 -2
- package/coverage/src/concepts/SelectMembers__.ts.html +9 -9
- package/coverage/src/concepts/SequentialPolicy__.ts.html +2 -2
- package/coverage/src/concepts/Slot__.ts.html +2 -2
- package/coverage/src/concepts/SqlQueryComponent__.ts.html +2 -2
- package/coverage/src/concepts/Start__.ts.html +7 -7
- package/coverage/src/concepts/StaticString__.ts.html +2 -2
- package/coverage/src/concepts/StringInterpolation__.ts.html +3 -3
- package/coverage/src/concepts/StringLiteral__.ts.html +18 -18
- package/coverage/src/concepts/StructureProperty__.ts.html +9 -9
- package/coverage/src/concepts/Structure__.ts.html +9 -9
- package/coverage/src/concepts/SwitchCase__.ts.html +3 -3
- package/coverage/src/concepts/SwitchStatement__.ts.html +3 -3
- package/coverage/src/concepts/Theme__.ts.html +9 -9
- package/coverage/src/concepts/Transactional__.ts.html +2 -2
- package/coverage/src/concepts/TriggerEvent__.ts.html +2 -2
- package/coverage/src/concepts/TriggerLauncher__.ts.html +2 -2
- package/coverage/src/concepts/TypeAnnotation__.ts.html +37 -37
- package/coverage/src/concepts/TypeParam__.ts.html +2 -2
- package/coverage/src/concepts/UnaryExpression__.ts.html +2 -2
- package/coverage/src/concepts/Unparsed__.ts.html +2 -2
- package/coverage/src/concepts/UseComponent__.ts.html +2 -2
- package/coverage/src/concepts/ValidationRule__.ts.html +6 -21
- package/coverage/src/concepts/Variable__.ts.html +29 -53
- package/coverage/src/concepts/ViewBlock__.ts.html +2 -2
- package/coverage/src/concepts/ViewComponent__.ts.html +3 -3
- package/coverage/src/concepts/ViewElement__.ts.html +61 -535
- package/coverage/src/concepts/View__.ts.html +60 -69
- package/coverage/src/concepts/WhileStatement__.ts.html +3 -3
- package/coverage/src/concepts/basics/constants.ts.html +1 -1
- package/coverage/src/concepts/basics/index.html +1 -1
- 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 +32 -32
- package/coverage/src/concepts/basics/stdlib/nasl.validation.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts.html +2 -2
- 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 +239 -329
- package/coverage/src/concepts/index.ts.html +2 -2
- package/coverage/src/concepts/index__.ts.html +4 -22
- package/coverage/src/concepts/utils/asserts.ts.html +26 -1334
- package/coverage/src/concepts/utils/index.html +18 -33
- package/coverage/src/concepts/utils/types.ts.html +2 -101
- package/coverage/src/config.ts.html +2 -2
- package/coverage/src/decorators/index.html +18 -18
- package/coverage/src/decorators/index.ts.html +57 -42
- 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 +45 -180
- package/coverage/src/generator/genHash.ts.html +2 -2
- package/coverage/src/generator/genMetaData.ts.html +11 -14
- package/coverage/src/generator/genReleaseBody.ts.html +13 -46
- package/coverage/src/generator/icestark.ts.html +1 -1
- package/coverage/src/generator/index.html +36 -36
- 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 +10 -16
- package/coverage/src/generator/qiankun.ts.html +1 -1
- package/coverage/src/generator/styleReplacer.ts.html +1 -1
- package/coverage/src/index.html +1 -1
- package/coverage/src/index.ts.html +2 -2
- 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 +1 -1
- 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 +3 -3
- package/coverage/src/sentry/index.html +1 -1
- package/coverage/src/sentry/index.ts.html +25 -25
- package/coverage/src/server/createUiTs.ts.html +1 -1
- 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 +30 -99
- package/coverage/src/server/formatTsUtils.ts.html +18 -27
- 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 +66 -180
- package/coverage/src/server/getMemberIdentifier.ts.html +9 -27
- package/coverage/src/server/getProcessComponents.ts.html +1 -1
- package/coverage/src/server/getProcesses.ts.html +6 -6
- package/coverage/src/server/getValidates.ts.html +1 -1
- package/coverage/src/server/index.html +58 -58
- package/coverage/src/server/index.ts.html +1 -1
- package/coverage/src/server/naslServer.ts.html +127 -163
- 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 +16 -67
- package/coverage/src/service/creator/add.configs.js.html +1 -1
- package/coverage/src/service/creator/errHandles.js.html +1 -1
- package/coverage/src/service/creator/index.html +1 -1
- package/coverage/src/service/creator/index.js.html +2 -2
- 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 +17 -17
- package/coverage/src/service/storage/index.ts.html +2 -2
- package/coverage/src/service/storage/init.ts.html +13 -100
- package/coverage/src/service/storage/jsoner.ts.html +1 -1
- package/coverage/src/service/storage/map.ts.html +4 -4
- 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 +8 -8
- package/coverage/src/templator/genCurdEditMultipleKeyBlock.ts.html +18 -18
- package/coverage/src/templator/genCurdMultipleKeyBlock.ts.html +126 -2298
- package/coverage/src/templator/genEditTableBlock.ts.html +2 -2
- package/coverage/src/templator/genEnumSelectBlock.ts.html +1 -1
- package/coverage/src/templator/genGetBlock.ts.html +13 -16
- package/coverage/src/templator/genGridViewBlock.ts.html +14 -14
- package/coverage/src/templator/genListViewBlock.ts.html +6 -6
- package/coverage/src/templator/genQueryComponent.ts.html +55 -40
- package/coverage/src/templator/genSelectBlock.ts.html +5 -5
- package/coverage/src/templator/genTableBlock.ts.html +22 -397
- package/coverage/src/templator/genUpdateBlock.ts.html +17 -20
- package/coverage/src/templator/index.html +55 -55
- package/coverage/src/templator/index.ts.html +2 -2
- package/coverage/src/templator/utils.ts.html +62 -35
- package/coverage/src/translator/constant.ts.html +1 -1
- package/coverage/src/translator/index.html +19 -19
- package/coverage/src/translator/index.ts.html +2 -2
- package/coverage/src/translator/types.ts.html +1 -1
- package/coverage/src/translator/utils.ts.html +56 -89
- package/coverage/src/utils/cookie.ts.html +1 -1
- package/coverage/src/utils/env.ts.html +2 -2
- package/coverage/src/utils/i18nInfo.ts.html +4 -19
- package/coverage/src/utils/index.html +19 -19
- package/coverage/src/utils/index.ts.html +17 -647
- 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 +1 -1
- package/coverage/src/utils/time-slicing/constant.ts.html +1 -1
- package/coverage/src/utils/time-slicing/controller.ts.html +1 -1
- package/coverage/src/utils/time-slicing/index.html +1 -1
- package/coverage/src/utils/time-slicing/index.ts.html +2 -2
- package/coverage/src/utils/time-slicing/page-state.ts.html +1 -1
- package/coverage/src/utils/time-slicing/performance.ts.html +1 -1
- package/coverage/src/utils/time-slicing/runner.ts.html +6 -6
- package/coverage/src/utils/time-slicing/tool.ts.html +1 -1
- package/coverage/src/utils/time-slicing/utils.ts.html +3 -3
- package/coverage/src/utils/time-slicing/wrapper.ts.html +9 -9
- package/coverage/src/{concepts/ParamWithGroup__.ts.html → utils/time-slicing.ts.html} +142 -112
- package/coverage/src/utils/traverse.ts.html +1 -1
- package/coverage/src/utils/types.ts.html +1 -1
- package/coverage/src/utils/window.ts.html +1 -1
- package/out/automate/engine/utils.d.ts +1 -1
- package/out/automate/engine/utils.js +1 -5
- package/out/automate/engine/utils.js.map +1 -1
- package/out/common/BaseNode.js +19 -1
- package/out/common/BaseNode.js.map +1 -1
- package/out/common/EventEmitter.d.ts +1 -0
- package/out/common/EventEmitter.js.map +1 -1
- package/out/concepts/App__.d.ts +8 -0
- package/out/concepts/App__.js +50 -3
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Interface__.js +2 -0
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/Paginate__.d.ts +3 -0
- package/out/concepts/Paginate__.js +21 -0
- package/out/concepts/Paginate__.js.map +1 -1
- package/out/concepts/Structure__.js +2 -0
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/View__.d.ts +4 -0
- package/out/concepts/View__.js +12 -0
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.auth.js +68 -33
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -1
- package/out/generator/genBundleFiles.d.ts +1 -0
- package/out/generator/genBundleFiles.js +10 -2
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/permission.d.ts +5 -1
- package/out/generator/permission.js +2 -1
- package/out/generator/permission.js.map +1 -1
- package/out/natural/genNaturalTS.js +2 -0
- package/out/natural/genNaturalTS.js.map +1 -1
- package/out/natural/transformTSCode.js +8 -0
- package/out/natural/transformTSCode.js.map +1 -1
- package/out/server/getLogics.js +3 -3
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +16 -16
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/naslServer.d.ts +1 -0
- package/out/server/naslServer.js +7 -2
- package/out/server/naslServer.js.map +1 -1
- package/out/service/storage/init.d.ts +1 -0
- package/out/service/storage/init.js +5 -1
- package/out/service/storage/init.js.map +1 -1
- package/package.json +1 -1
- package/sandbox/stdlib/nasl.auth.ts +4 -0
- package/sandbox-natural/stdlib/nasl.core.ts +3 -0
- package/sandbox-natural/stdlib/nasl.oql.ts +4 -3
- package/src/automate/engine/utils.js +1 -5
- package/src/common/BaseNode.ts +27 -2
- package/src/common/EventEmitter.ts +1 -0
- package/src/concepts/App__.ts +50 -3
- package/src/concepts/Interface__.ts +2 -0
- package/src/concepts/Paginate__.ts +22 -1
- package/src/concepts/Structure__.ts +2 -0
- package/src/concepts/View__.ts +13 -0
- package/src/concepts/basics/stdlib/nasl.auth.ts +97 -34
- package/src/generator/genBundleFiles.ts +10 -2
- package/src/generator/permission.ts +1 -1
- package/src/natural/genNaturalTS.ts +2 -0
- package/src/natural/transformTSCode.ts +8 -0
- package/src/server/getLogics.ts +3 -3
- package/src/server/getMemberIdentifier.ts +18 -18
- package/src/server/naslServer.ts +7 -2
- package/src/service/storage/init.ts +6 -1
- package/.nyc_output/477a0953-2b01-4d2a-affe-d4aaf3b0191c.json +0 -1
- package/.nyc_output/processinfo/477a0953-2b01-4d2a-affe-d4aaf3b0191c.json +0 -1
- package/coverage/src/concepts/BusinessComponent__.ts.html +0 -8164
- package/coverage/src/concepts/BusinessLogic__.ts.html +0 -1213
- package/coverage/src/concepts/CallEvent__.ts.html +0 -1138
- package/coverage/src/concepts/FrontendType__.ts.html +0 -2842
- package/coverage/src/concepts/Paginate__.ts.html +0 -1033
- package/coverage/src/concepts/utils/quick-info.ts.html +0 -277
|
@@ -66,30 +66,30 @@ export function initialize() {
|
|
|
66
66
|
}),
|
|
67
67
|
],
|
|
68
68
|
}),
|
|
69
|
-
new Structure({
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}),
|
|
69
|
+
// new Structure({
|
|
70
|
+
// name: 'LCAPUser',
|
|
71
|
+
// properties: [
|
|
72
|
+
// new StructureProperty({
|
|
73
|
+
// name: 'userName',
|
|
74
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
75
|
+
// }),
|
|
76
|
+
// new StructureProperty({
|
|
77
|
+
// name: 'userId',
|
|
78
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
79
|
+
// }),
|
|
80
|
+
// new StructureProperty({
|
|
81
|
+
// name: 'extendFiledMap',
|
|
82
|
+
// typeAnnotation: TypeAnnotation.createGeneric('map', {
|
|
83
|
+
// typeArguments: [
|
|
84
|
+
// // TypeAnnotation.createPrimitive('String'),
|
|
85
|
+
// // TypeAnnotation.createPrimitive('String'),
|
|
86
|
+
// TypeAnnotation.createTypeParam('K'),
|
|
87
|
+
// TypeAnnotation.createTypeParam('V'),
|
|
88
|
+
// ],
|
|
89
|
+
// }),
|
|
90
|
+
// }),
|
|
91
|
+
// ],
|
|
92
|
+
// }),
|
|
93
93
|
);
|
|
94
94
|
|
|
95
95
|
authTypeList.push(
|
|
@@ -105,12 +105,15 @@ export function initialize() {
|
|
|
105
105
|
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
106
106
|
}),
|
|
107
107
|
],
|
|
108
|
+
description: '检查当前用户是否有当前资源的权限',
|
|
108
109
|
returns: [],
|
|
109
110
|
}),
|
|
110
111
|
new Logic({
|
|
111
112
|
name: 'logout',
|
|
112
113
|
params: [],
|
|
113
114
|
returns: [],
|
|
115
|
+
description: '退出当前登录状态',
|
|
116
|
+
|
|
114
117
|
}),
|
|
115
118
|
new Logic({
|
|
116
119
|
name: 'encryptByAES',
|
|
@@ -120,10 +123,14 @@ export function initialize() {
|
|
|
120
123
|
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
121
124
|
}),
|
|
122
125
|
],
|
|
126
|
+
description: '对字符串实现aes加密 返回加密后的字符串',
|
|
127
|
+
|
|
123
128
|
returns: [],
|
|
124
129
|
}),
|
|
125
130
|
new Logic({
|
|
126
131
|
name: 'decryptByAES',
|
|
132
|
+
description: '对字符串实现aes解密 返回解密后的字符串',
|
|
133
|
+
|
|
127
134
|
params: [
|
|
128
135
|
new Param({
|
|
129
136
|
name: 'string',
|
|
@@ -132,34 +139,90 @@ export function initialize() {
|
|
|
132
139
|
],
|
|
133
140
|
returns: [],
|
|
134
141
|
}),
|
|
142
|
+
// new Logic({
|
|
143
|
+
// name: 'getUserList',
|
|
144
|
+
// params: [
|
|
145
|
+
// new Param({
|
|
146
|
+
// name: 'userNameFilter',
|
|
147
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
148
|
+
// }),
|
|
149
|
+
// new Param({
|
|
150
|
+
// name: 'limit',
|
|
151
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('Long'),
|
|
152
|
+
// }),
|
|
153
|
+
// new Param({
|
|
154
|
+
// name: 'offset',
|
|
155
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('Long'),
|
|
156
|
+
// }),
|
|
157
|
+
// ],
|
|
158
|
+
// returns: [
|
|
159
|
+
// new Return({
|
|
160
|
+
// name: 'result',
|
|
161
|
+
// typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
162
|
+
// typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
163
|
+
// }),
|
|
164
|
+
// }),
|
|
165
|
+
// ],
|
|
166
|
+
// }),
|
|
135
167
|
new Logic({
|
|
136
|
-
name: '
|
|
168
|
+
name: 'encryptPassword',
|
|
169
|
+
description: '密码加密(采用Bcrypt算法进行加密,salt默认10位)',
|
|
137
170
|
params: [
|
|
138
171
|
new Param({
|
|
139
|
-
name: '
|
|
172
|
+
name: 'password',
|
|
140
173
|
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
141
174
|
}),
|
|
175
|
+
],
|
|
176
|
+
returns: [
|
|
177
|
+
new Return({
|
|
178
|
+
name: 'BcryptedHashPassword',
|
|
179
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
180
|
+
}),
|
|
181
|
+
],
|
|
182
|
+
}),
|
|
183
|
+
new Logic({
|
|
184
|
+
name: 'validatePassword',
|
|
185
|
+
description: '密码校验(采用Bcrypt算法进行校验)',
|
|
186
|
+
params: [
|
|
142
187
|
new Param({
|
|
143
|
-
name: '
|
|
144
|
-
typeAnnotation: TypeAnnotation.createPrimitive('
|
|
188
|
+
name: 'plainText',
|
|
189
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
190
|
+
}), new Param({
|
|
191
|
+
name: 'hashedText',
|
|
192
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
145
193
|
}),
|
|
194
|
+
|
|
195
|
+
],
|
|
196
|
+
returns: [
|
|
197
|
+
new Return({
|
|
198
|
+
name: 'matchResult',
|
|
199
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
|
|
200
|
+
}),
|
|
201
|
+
],
|
|
202
|
+
}),
|
|
203
|
+
new Logic({
|
|
204
|
+
name: 'generateUserId',
|
|
205
|
+
description: '生成用户唯一标识(根据Md5算法)',
|
|
206
|
+
params: [
|
|
146
207
|
new Param({
|
|
147
|
-
name: '
|
|
148
|
-
typeAnnotation: TypeAnnotation.createPrimitive('
|
|
208
|
+
name: 'userName',
|
|
209
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
210
|
+
}), new Param({
|
|
211
|
+
name: 'source',
|
|
212
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
149
213
|
}),
|
|
214
|
+
|
|
150
215
|
],
|
|
151
216
|
returns: [
|
|
152
217
|
new Return({
|
|
153
218
|
name: 'result',
|
|
154
|
-
typeAnnotation: TypeAnnotation.
|
|
155
|
-
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
156
|
-
}),
|
|
219
|
+
typeAnnotation: TypeAnnotation.createPrimitive('String'),
|
|
157
220
|
}),
|
|
158
221
|
],
|
|
159
222
|
}),
|
|
160
223
|
new Logic({
|
|
161
224
|
name: 'getCurrentUser',
|
|
162
|
-
description: '
|
|
225
|
+
description: '即将下线,请使用服务端全局变量currentUser',
|
|
163
226
|
returns: [
|
|
164
227
|
new Return({
|
|
165
228
|
name: 'result',
|
|
@@ -35,6 +35,7 @@ interface Config {
|
|
|
35
35
|
devDnsAddr: string;
|
|
36
36
|
miniEnable: boolean;
|
|
37
37
|
isPreviewFe?: boolean;
|
|
38
|
+
previewVersion?: string;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
// 将metaData转成字符串
|
|
@@ -615,10 +616,17 @@ export function genBundleFiles(app: App, frontend: Frontend, config: Config) {
|
|
|
615
616
|
`;
|
|
616
617
|
content += str;
|
|
617
618
|
}
|
|
619
|
+
const getBundleFileName =()=>{
|
|
620
|
+
if(config.isPreviewFe && config.previewVersion){
|
|
621
|
+
return `mockBundle-${config.previewVersion}`
|
|
622
|
+
}else {
|
|
623
|
+
return 'bundle'
|
|
624
|
+
}
|
|
625
|
+
}
|
|
618
626
|
const baseUrl = `${config.USER_STATIC_URL}/${config.tenant}/${app.id}/${config.env}`;
|
|
619
|
-
let bundleMinPath = `${baseUrl}/${
|
|
627
|
+
let bundleMinPath = `${baseUrl}/${getBundleFileName()}.${genHash(content)}.min.js`;
|
|
620
628
|
if (frontend.basePath) {
|
|
621
|
-
bundleMinPath = `${baseUrl}${frontend.basePath}/${
|
|
629
|
+
bundleMinPath = `${baseUrl}${frontend.basePath}/${getBundleFileName()}.${genHash(content)}.min.js`;
|
|
622
630
|
}
|
|
623
631
|
const otherJsList = (frontend as any)?.appletsConfig?.enable ? ['//res.wx.qq.com/open/js/jweixin-1.3.2.js'] : [];
|
|
624
632
|
|
|
@@ -178,7 +178,7 @@ async function findResourcesOfLogic(logic: Logic, uploaders: Map<string, ViewEle
|
|
|
178
178
|
return optimizeResourceData(res);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
function getAllLogics(app: App) {
|
|
181
|
+
export function getAllLogics(app: App) {
|
|
182
182
|
const modules: (Module | Connector)[] = [];
|
|
183
183
|
const entities: Entity[] = [];
|
|
184
184
|
const logics: Logic[] = [];
|
|
@@ -81,8 +81,10 @@ export function genNaturalTSContext(app: App, currentNode?: BaseNode, focusedNod
|
|
|
81
81
|
// code += '// 页面上下文\n';
|
|
82
82
|
code += ``;
|
|
83
83
|
if (view) { // 为页面中的逻辑
|
|
84
|
+
code += `\n// 当前为页面下的逻辑`;
|
|
84
85
|
code += view?.toNaturalTS(createCompilerState('', { focusedNodePath }), currentNode);
|
|
85
86
|
} else if (logic) { // 为全局逻辑
|
|
87
|
+
code += `\n// 当前为服务端逻辑`;
|
|
86
88
|
code += logic?.toNaturalTS(createCompilerState('', { focusedNodePath }), undefined, undefined, currentNode);
|
|
87
89
|
}
|
|
88
90
|
code += `\n\`\`\`\n`;
|
|
@@ -387,6 +387,14 @@ export function transformTSCode(tsCode: string, contextLogicName: string, type?:
|
|
|
387
387
|
}))],
|
|
388
388
|
});
|
|
389
389
|
}
|
|
390
|
+
if (calleeName === 'PaginateLimit') {
|
|
391
|
+
const newCallee = node?.arguments || [];
|
|
392
|
+
return new naslTypes.Paginate({
|
|
393
|
+
list: newCallee?.[0] && transformLogicNode(newCallee?.[0]),
|
|
394
|
+
page: newCallee?.[1] && transformLogicNode(newCallee?.[1]),
|
|
395
|
+
size: newCallee?.[2] && transformLogicNode(newCallee?.[2]),
|
|
396
|
+
});
|
|
397
|
+
}
|
|
390
398
|
if (calleeName === 'ForEach') {
|
|
391
399
|
const newCallee = node.arguments;
|
|
392
400
|
const arrowFunction = node.arguments[3] as babelTypes.ArrowFunctionExpression;
|
package/src/server/getLogics.ts
CHANGED
|
@@ -321,7 +321,7 @@ export function getLogicsSync(node: CallLogic | BindEvent | Identifier | Logic,
|
|
|
321
321
|
name: 'category',
|
|
322
322
|
path: `auth`,
|
|
323
323
|
title: '认证与权限',
|
|
324
|
-
logics: getStdlibNamespace().findChild('auth').logics.filter((item) =>
|
|
324
|
+
logics: getStdlibNamespace().findChild('auth').logics.filter((item) => !['getCurrentUser', 'encryptPassword', 'validatePassword', 'generateUserId'].includes(item.name)),
|
|
325
325
|
expanded: false,
|
|
326
326
|
}),
|
|
327
327
|
new Namespace({
|
|
@@ -438,8 +438,8 @@ export function getLogicsSync(node: CallLogic | BindEvent | Identifier | Logic,
|
|
|
438
438
|
new Namespace({
|
|
439
439
|
name: 'category',
|
|
440
440
|
path: `auth`,
|
|
441
|
-
title: '
|
|
442
|
-
logics: getStdlibNamespace().findChild('auth').logics.filter((item) =>
|
|
441
|
+
title: '认证与权限',
|
|
442
|
+
logics: getStdlibNamespace().findChild('auth').logics.filter((item) => ['getCurrentUser', 'encryptPassword', 'validatePassword', 'generateUserId'].includes(item.name)),
|
|
443
443
|
expanded: false,
|
|
444
444
|
}),
|
|
445
445
|
],
|
|
@@ -98,22 +98,22 @@ function formatGlobalVariable() {
|
|
|
98
98
|
value: 'userInfo',
|
|
99
99
|
children: [
|
|
100
100
|
{ name: 'Status', value: 'userInfo.Status' },
|
|
101
|
-
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
},
|
|
101
|
+
// {
|
|
102
|
+
// name: 'UserInfoExtend',
|
|
103
|
+
// value: 'userInfo.UserInfoExtend',
|
|
104
|
+
// children: [
|
|
105
|
+
// { name: 'Company', value: 'userInfo.UserInfoExtend.Company' },
|
|
106
|
+
// { name: 'JobLevel', value: 'userInfo.UserInfoExtend.JobLevel' },
|
|
107
|
+
// { name: 'JobNum', value: 'userInfo.UserInfoExtend.JobNum' },
|
|
108
|
+
// { name: 'JobYear', value: 'userInfo.UserInfoExtend.JobYear' },
|
|
109
|
+
// { name: 'RealName', value: 'userInfo.UserInfoExtend.RealName' },
|
|
110
|
+
// { name: 'NickName', value: 'userInfo.UserInfoExtend.NickName' },
|
|
111
|
+
// { name: 'NameAndEmail', value: 'userInfo.UserInfoExtend.NameAndEmail' },
|
|
112
|
+
// { name: 'Position', value: 'userInfo.UserInfoExtend.Position' },
|
|
113
|
+
// { name: 'Department', value: 'userInfo.UserInfoExtend.Department' },
|
|
114
|
+
// { name: 'EmployeeId', value: 'userInfo.UserInfoExtend.EmployeeId' },
|
|
115
|
+
// ],
|
|
116
|
+
// },
|
|
117
117
|
{ name: 'UserName', value: 'userInfo.UserName' },
|
|
118
118
|
{ name: 'Email', value: 'userInfo.Email' },
|
|
119
119
|
{ name: 'UserId', value: 'userInfo.UserId' },
|
|
@@ -143,9 +143,9 @@ function formatGlobalVariable() {
|
|
|
143
143
|
(item as any).expression = expression;
|
|
144
144
|
const completionProperty = new CompletionProperty(item as any);
|
|
145
145
|
completionProperty.icon = 'literal';
|
|
146
|
-
if (item.children) {
|
|
146
|
+
if ((item as any).children ) {
|
|
147
147
|
const children: LogicItem[] = [];
|
|
148
|
-
item.children.forEach((child) => {
|
|
148
|
+
(item as any).children.forEach((child:any) => {
|
|
149
149
|
const childExpression = new MemberExpression({
|
|
150
150
|
object: expression,
|
|
151
151
|
property: new Identifier({ name: child.name }),
|
package/src/server/naslServer.ts
CHANGED
|
@@ -1590,10 +1590,12 @@ class NaslServer {
|
|
|
1590
1590
|
* 是否符合 触发器规则
|
|
1591
1591
|
* 规则:
|
|
1592
1592
|
* 1. 入参仅有一个,且必须为string类型
|
|
1593
|
+
* 2. 不允许有返回值
|
|
1593
1594
|
*/
|
|
1594
1595
|
isTriggerRule(fileNode: BaseNode): boolean {
|
|
1595
1596
|
const { sourceMap } = fileNode;
|
|
1596
1597
|
let paramsLength = 0;
|
|
1598
|
+
let returnLength = 0;
|
|
1597
1599
|
let flag = true;
|
|
1598
1600
|
sourceMap.forEach((_, k) => {
|
|
1599
1601
|
if (k instanceof Param) {
|
|
@@ -1605,8 +1607,11 @@ class NaslServer {
|
|
|
1605
1607
|
flag = false;
|
|
1606
1608
|
}
|
|
1607
1609
|
}
|
|
1610
|
+
if (k instanceof Return) {
|
|
1611
|
+
returnLength ++;
|
|
1612
|
+
}
|
|
1608
1613
|
});
|
|
1609
|
-
return paramsLength === 1 && flag;
|
|
1614
|
+
return paramsLength === 1 && flag && returnLength === 0;
|
|
1610
1615
|
}
|
|
1611
1616
|
|
|
1612
1617
|
/**
|
|
@@ -2103,7 +2108,7 @@ class NaslServer {
|
|
|
2103
2108
|
const diagnostic = {
|
|
2104
2109
|
node: fileNode,
|
|
2105
2110
|
severity: 'error',
|
|
2106
|
-
message: `${fileNode.name} 已被Kafka消息订阅配置 ${fRefName}
|
|
2111
|
+
message: `${fileNode.name} 已被Kafka消息订阅配置 ${fRefName} 引用:该逻辑入参只有一个入参,入参类型为string;且不允许存在返回值。否则会导致无法接收Kafka消息`,
|
|
2107
2112
|
};
|
|
2108
2113
|
diagnostics.push(diagnostic);
|
|
2109
2114
|
}
|
|
@@ -421,7 +421,7 @@ async function doAction(app: any, actionItem: any) {
|
|
|
421
421
|
let hasBackEnd = false;
|
|
422
422
|
const actionList: any[] = [];
|
|
423
423
|
const allRiskList: any[] = [];
|
|
424
|
-
const { list, actionMsg, action } = actionItem || {};
|
|
424
|
+
const { list, actionMsg, action, extra} = actionItem || {};
|
|
425
425
|
handleAIPoint(app, actionItem);
|
|
426
426
|
const itemloop = (_i: LogicItem, app: any, diffArr: string[]) => {
|
|
427
427
|
const _l = getStatement(_i, app, diffArr);
|
|
@@ -683,6 +683,7 @@ async function doAction(app: any, actionItem: any) {
|
|
|
683
683
|
}
|
|
684
684
|
app._historyList.push({
|
|
685
685
|
actionMsg,
|
|
686
|
+
extra: extra,
|
|
686
687
|
list: list.map((item: any) => item?.originEvent),
|
|
687
688
|
});
|
|
688
689
|
app._historyIndex = app._historyList.length;
|
|
@@ -1000,6 +1001,7 @@ export interface ProxyApp extends App {
|
|
|
1000
1001
|
_noTimer: NodeJS.Timeout;
|
|
1001
1002
|
_actionMsg: string;
|
|
1002
1003
|
_action: string;
|
|
1004
|
+
_extra?: any;
|
|
1003
1005
|
naslServer: NaslServer;
|
|
1004
1006
|
}
|
|
1005
1007
|
|
|
@@ -1048,6 +1050,7 @@ export function handleApp(app: ProxyApp) {
|
|
|
1048
1050
|
if (!proxyApp._isCollectingCount) {
|
|
1049
1051
|
proxyApp._actionMsg = event?.actionMsg;
|
|
1050
1052
|
proxyApp._action = event?.action;
|
|
1053
|
+
proxyApp._extra = event?.extra;
|
|
1051
1054
|
}
|
|
1052
1055
|
proxyApp._isCollectingCount++;
|
|
1053
1056
|
});
|
|
@@ -1066,6 +1069,7 @@ export function handleApp(app: ProxyApp) {
|
|
|
1066
1069
|
const collectingList = proxyApp._collectingList;
|
|
1067
1070
|
const actionMsg = proxyApp._actionMsg;
|
|
1068
1071
|
const action = proxyApp._action;
|
|
1072
|
+
const extra = proxyApp._extra;
|
|
1069
1073
|
proxyApp._collectingList = [];
|
|
1070
1074
|
proxyApp._actionMsg = '';
|
|
1071
1075
|
proxyApp._action = '';
|
|
@@ -1079,6 +1083,7 @@ export function handleApp(app: ProxyApp) {
|
|
|
1079
1083
|
list: collectingList,
|
|
1080
1084
|
actionMsg,
|
|
1081
1085
|
action,
|
|
1086
|
+
extra
|
|
1082
1087
|
});
|
|
1083
1088
|
}
|
|
1084
1089
|
} else if (proxyApp._isCollectingCount < 0) {
|