@lcap/nasl 3.7.1-beta.1 → 3.7.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/common/BaseNode.js +3 -1
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/AnonymousFunction__.d.ts +1 -1
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/App__.js +9 -27
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.d.ts +1 -1
- package/out/concepts/Argument__.js +2 -6
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/AssigneeV2__.js +0 -2
- package/out/concepts/AssigneeV2__.js.map +1 -1
- package/out/concepts/Assignee__.js +0 -2
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.js +0 -2
- package/out/concepts/AssignmentLine__.js.map +1 -1
- package/out/concepts/Assignment__.js +2 -4
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.d.ts +1 -1
- package/out/concepts/Attribute__.js +7 -23
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/AuthInterface__.js +1 -3
- package/out/concepts/AuthInterface__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.js +7 -7
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/AuthLogic__.js +1 -3
- package/out/concepts/AuthLogic__.js.map +1 -1
- package/out/concepts/BackendVariable__.d.ts +2 -2
- package/out/concepts/BackendVariable__.js +3 -9
- package/out/concepts/BackendVariable__.js.map +1 -1
- package/out/concepts/Backend__.js +1 -3
- package/out/concepts/Backend__.js.map +1 -1
- package/out/concepts/BatchAssignment__.js +1 -3
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BinaryExpression__.js +4 -4
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.js +6 -58
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.d.ts +6 -6
- package/out/concepts/BindDirective__.js +7 -21
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.d.ts +3 -3
- package/out/concepts/BindEvent__.js +3 -13
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.js +1 -3
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.js +1 -3
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/BusinessComponent__.js +11 -19
- package/out/concepts/BusinessComponent__.js.map +1 -1
- package/out/concepts/BusinessLogic__.js +8 -10
- package/out/concepts/BusinessLogic__.js.map +1 -1
- package/out/concepts/CallConnector__.js +2 -6
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallEvent__.js +2 -6
- package/out/concepts/CallEvent__.js.map +1 -1
- package/out/concepts/CallFunction__.d.ts +1 -1
- package/out/concepts/CallFunction__.js +3 -13
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +1 -1
- package/out/concepts/CallInterface__.js +3 -9
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +4 -4
- package/out/concepts/CallLogic__.js +8 -23
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +2 -2
- package/out/concepts/CallQueryComponent__.js +2 -13
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.js +1 -3
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.js +5 -15
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.js +1 -3
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigPropertyValue__.d.ts +0 -1
- package/out/concepts/ConfigPropertyValue__.js +2 -13
- package/out/concepts/ConfigPropertyValue__.js.map +1 -1
- package/out/concepts/ConfigProperty__.js +3 -9
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Connection__.js +3 -9
- package/out/concepts/Connection__.js.map +1 -1
- package/out/concepts/ConnectorLogic__.js +1 -3
- package/out/concepts/ConnectorLogic__.js.map +1 -1
- package/out/concepts/ConnectorTriggerLauncher__.js +6 -9
- package/out/concepts/ConnectorTriggerLauncher__.js.map +1 -1
- package/out/concepts/ConnectorTrigger__.js +2 -6
- package/out/concepts/ConnectorTrigger__.js.map +1 -1
- package/out/concepts/Connector__.js +3 -9
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/Constant__.js +2 -6
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/CountersignPolicyV2__.js +1 -3
- package/out/concepts/CountersignPolicyV2__.js.map +1 -1
- package/out/concepts/CountersignPolicy__.js +1 -3
- package/out/concepts/CountersignPolicy__.js.map +1 -1
- package/out/concepts/DataSource__.js +6 -12
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/DatabaseTypeAnnotation__.js +6 -6
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
- package/out/concepts/Destination__.js +3 -9
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +2 -2
- package/out/concepts/EntityIndex__.js +4 -13
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +10 -12
- package/out/concepts/EntityProperty__.js +25 -44
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +2 -2
- package/out/concepts/Entity__.js +7 -17
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +1 -1
- package/out/concepts/EnumItem__.js +1 -7
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.js +3 -9
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/EventDeclaration__.js +4 -16
- package/out/concepts/EventDeclaration__.js.map +1 -1
- package/out/concepts/Event__.js +5 -15
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ExternalDestination__.d.ts +1 -1
- package/out/concepts/ExternalDestination__.js +1 -3
- package/out/concepts/ExternalDestination__.js.map +1 -1
- package/out/concepts/FieldPermissionV2__.js +2 -6
- package/out/concepts/FieldPermissionV2__.js.map +1 -1
- package/out/concepts/FlowConditionV2__.js +1 -3
- package/out/concepts/FlowConditionV2__.js.map +1 -1
- package/out/concepts/ForEachStatement__.d.ts +1 -1
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendLibrary__.js +2 -6
- package/out/concepts/FrontendLibrary__.js.map +1 -1
- package/out/concepts/FrontendType__.d.ts +0 -4
- package/out/concepts/FrontendType__.js +2 -15
- package/out/concepts/FrontendType__.js.map +1 -1
- package/out/concepts/FrontendVariable__.js +1 -3
- package/out/concepts/FrontendVariable__.js.map +1 -1
- package/out/concepts/Frontend__.d.ts +0 -2
- package/out/concepts/Frontend__.js +8 -31
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Function__.js +2 -6
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/HistoryProcessV2__.js +4 -12
- package/out/concepts/HistoryProcessV2__.js.map +1 -1
- package/out/concepts/I18nInfo__.d.ts +1 -1
- package/out/concepts/I18nInfo__.js +5 -9
- package/out/concepts/I18nInfo__.js.map +1 -1
- package/out/concepts/IconSetter__.js +1 -7
- package/out/concepts/IconSetter__.js.map +1 -1
- package/out/concepts/Identifier__.js +7 -7
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/ImportedInterface__.d.ts +1 -1
- package/out/concepts/ImportedInterface__.js +1 -3
- package/out/concepts/ImportedInterface__.js.map +1 -1
- package/out/concepts/InputSetter__.js +1 -7
- package/out/concepts/InputSetter__.js.map +1 -1
- package/out/concepts/Integration__.js.map +1 -1
- package/out/concepts/InterfaceParam__.js +4 -12
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.js +8 -18
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.js +1 -3
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/JavaLogic__.js +3 -9
- package/out/concepts/JavaLogic__.js.map +1 -1
- package/out/concepts/LogicDeclaration__.js +3 -13
- package/out/concepts/LogicDeclaration__.js.map +1 -1
- package/out/concepts/LogicItem__.js +5 -31
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +6 -6
- package/out/concepts/Logic__.js +25 -36
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.d.ts +2 -2
- package/out/concepts/MatchCase__.js +11 -11
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.js +1 -3
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +6 -2
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MetadataType__.d.ts +1 -1
- package/out/concepts/MetadataType__.js +4 -12
- package/out/concepts/MetadataType__.js.map +1 -1
- package/out/concepts/MicroApp__.js +7 -21
- package/out/concepts/MicroApp__.js.map +1 -1
- package/out/concepts/Module__.d.ts +2 -2
- package/out/concepts/Module__.js +8 -24
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/Namespace__.js +4 -12
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NewComposite__.js +6 -10
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.d.ts +1 -1
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.d.ts +1 -1
- package/out/concepts/NewMap__.js +5 -2
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/NumberInputSetter__.js +5 -35
- package/out/concepts/NumberInputSetter__.js.map +1 -1
- package/out/concepts/NumericLiteral__.js +1 -3
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OperatePermissionV2__.js +4 -12
- package/out/concepts/OperatePermissionV2__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.d.ts +1 -1
- package/out/concepts/OqlQueryComponent__.js +2 -6
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/OverriddenLogic__.js +12 -26
- package/out/concepts/OverriddenLogic__.js.map +1 -1
- package/out/concepts/ParamWithGroup__.js +2 -6
- package/out/concepts/ParamWithGroup__.js.map +1 -1
- package/out/concepts/Param__.d.ts +1 -1
- package/out/concepts/Param__.js +2 -14
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Point__.js +2 -6
- package/out/concepts/Point__.js.map +1 -1
- package/out/concepts/ProcessBindV2__.js +2 -6
- package/out/concepts/ProcessBindV2__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js +4 -12
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElementV2__.js +8 -24
- package/out/concepts/ProcessElementV2__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +10 -22
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.js +1 -3
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/ProcessOutcomes__.js +0 -1
- package/out/concepts/ProcessOutcomes__.js.map +1 -1
- package/out/concepts/ProcessV2__.js +6 -18
- package/out/concepts/ProcessV2__.js.map +1 -1
- package/out/concepts/Process__.js +3 -9
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/PropDeclaration__.d.ts +4 -0
- package/out/concepts/PropDeclaration__.js +19 -84
- package/out/concepts/PropDeclaration__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.js +2 -6
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.js +4 -12
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.js +3 -9
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.js +4 -12
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.js +12 -4
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.js +6 -2
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js +5 -7
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Rect__.js +4 -12
- package/out/concepts/Rect__.js.map +1 -1
- package/out/concepts/Return__.d.ts +1 -1
- package/out/concepts/Return__.js +2 -10
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.d.ts +4 -4
- package/out/concepts/Role__.js +6 -14
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SelectMembers__.js +1 -3
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/SetterOption__.js +6 -34
- package/out/concepts/SetterOption__.js.map +1 -1
- package/out/concepts/SlotDeclaration__.js +5 -23
- package/out/concepts/SlotDeclaration__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.js +4 -12
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/StaticString__.d.ts +1 -1
- package/out/concepts/StaticString__.js +6 -10
- package/out/concepts/StaticString__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +1 -1
- package/out/concepts/StringLiteral__.js +2 -6
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +5 -5
- package/out/concepts/StructureProperty__.js +5 -13
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +0 -4
- package/out/concepts/Structure__.js +9 -18
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +1 -1
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/ThemeVariable__.js +1 -3
- package/out/concepts/ThemeVariable__.js.map +1 -1
- package/out/concepts/Theme__.js +2 -6
- package/out/concepts/Theme__.js.map +1 -1
- package/out/concepts/Transactional__.d.ts +2 -2
- package/out/concepts/Transactional__.js +6 -12
- package/out/concepts/Transactional__.js.map +1 -1
- package/out/concepts/TriggerEvent__.js +1 -3
- package/out/concepts/TriggerEvent__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.js +3 -9
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +2 -2
- package/out/concepts/TypeAnnotation__.js +24 -31
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.js +1 -3
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.js +1 -3
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.js +1 -3
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/UseComponent__.js +2 -6
- package/out/concepts/UseComponent__.js.map +1 -1
- package/out/concepts/ValidationRule__.js +3 -17
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.d.ts +1 -1
- package/out/concepts/Variable__.js +2 -10
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewBlockWithImage__.js +2 -6
- package/out/concepts/ViewBlockWithImage__.js.map +1 -1
- package/out/concepts/ViewBlock__.js +3 -13
- package/out/concepts/ViewBlock__.js.map +1 -1
- package/out/concepts/ViewComponentDeclaration__.d.ts +1 -1
- package/out/concepts/ViewComponentDeclaration__.js +8 -36
- package/out/concepts/ViewComponentDeclaration__.js.map +1 -1
- package/out/concepts/ViewElement__.js +82 -72
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.js +22 -40
- package/out/concepts/View__.js.map +1 -1
- package/out/generator/genBundleFiles.js +1 -0
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/release-body/utils.js +2 -1
- package/out/generator/release-body/utils.js.map +1 -1
- package/out/natural/genNaturalTS.js +1 -0
- package/out/natural/genNaturalTS.js.map +1 -1
- package/out/server/naslServer.js +24 -10
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +54 -0
- package/out/server/translator.js.map +1 -1
- package/out/utils/env.d.ts +2 -0
- package/out/utils/env.js +3 -1
- package/out/utils/env.js.map +1 -1
- package/package.json +1 -1
- package/src/common/BaseNode.ts +3 -1
- package/src/concepts/AnonymousFunction__.ts +1 -1
- package/src/concepts/App__.ts +9 -27
- package/src/concepts/Argument__.ts +3 -7
- package/src/concepts/AssigneeV2__.ts +0 -2
- package/src/concepts/Assignee__.ts +0 -2
- package/src/concepts/AssignmentLine__.ts +0 -2
- package/src/concepts/Assignment__.ts +2 -4
- package/src/concepts/Attribute__.ts +9 -21
- package/src/concepts/AuthInterface__.ts +1 -3
- package/src/concepts/AuthLogicForCallInterface__.ts +4 -5
- package/src/concepts/AuthLogic__.ts +1 -3
- package/src/concepts/BackendVariable__.ts +5 -11
- package/src/concepts/Backend__.ts +1 -3
- package/src/concepts/BatchAssignment__.ts +4 -4
- package/src/concepts/BinaryExpression__.ts +9 -7
- package/src/concepts/BindAttribute__.ts +26 -38
- package/src/concepts/BindDirective__.ts +13 -27
- package/src/concepts/BindEvent__.ts +7 -13
- package/src/concepts/BindStyle__.ts +1 -3
- package/src/concepts/BooleanLiteral__.ts +1 -3
- package/src/concepts/BusinessComponent__.ts +16 -20
- package/src/concepts/BusinessLogic__.ts +7 -10
- package/src/concepts/CallConnector__.ts +3 -7
- package/src/concepts/CallEvent__.ts +2 -6
- package/src/concepts/CallFunction__.ts +6 -13
- package/src/concepts/CallInterface__.ts +8 -15
- package/src/concepts/CallLogic__.ts +37 -44
- package/src/concepts/CallQueryComponent__.ts +9 -22
- package/src/concepts/Comment__.ts +1 -3
- package/src/concepts/CompletionProperty__.ts +5 -15
- package/src/concepts/ConfigGroup__.ts +2 -7
- package/src/concepts/ConfigPropertyValue__.ts +3 -15
- package/src/concepts/ConfigProperty__.ts +3 -9
- package/src/concepts/Configuration__.ts +1 -4
- package/src/concepts/Connection__.ts +3 -9
- package/src/concepts/ConnectorLogic__.ts +2 -4
- package/src/concepts/ConnectorTriggerLauncher__.ts +13 -11
- package/src/concepts/ConnectorTrigger__.ts +12 -12
- package/src/concepts/Connector__.ts +3 -9
- package/src/concepts/Constant__.ts +2 -6
- package/src/concepts/CountersignPolicyV2__.ts +1 -3
- package/src/concepts/CountersignPolicy__.ts +1 -3
- package/src/concepts/DataSource__.ts +16 -18
- package/src/concepts/DatabaseTypeAnnotation__.ts +6 -11
- package/src/concepts/Destination__.ts +3 -9
- package/src/concepts/EntityIndex__.ts +6 -15
- package/src/concepts/EntityProperty__.ts +35 -56
- package/src/concepts/Entity__.ts +7 -17
- package/src/concepts/EnumItem__.ts +7 -9
- package/src/concepts/Enum__.ts +3 -9
- package/src/concepts/EventDeclaration__.ts +5 -13
- package/src/concepts/Event__.ts +5 -15
- package/src/concepts/ExternalDestination__.ts +2 -4
- package/src/concepts/FieldPermissionV2__.ts +2 -6
- package/src/concepts/FlowConditionV2__.ts +1 -3
- package/src/concepts/ForEachStatement__.ts +1 -1
- package/src/concepts/FrontendLibrary__.ts +2 -6
- package/src/concepts/FrontendType__.ts +2 -14
- package/src/concepts/FrontendVariable__.ts +1 -3
- package/src/concepts/Frontend__.ts +11 -35
- package/src/concepts/Function__.ts +2 -6
- package/src/concepts/HistoryProcessV2__.ts +4 -12
- package/src/concepts/I18nInfo__.ts +8 -15
- package/src/concepts/IconSetter__.ts +2 -4
- package/src/concepts/Identifier__.ts +9 -10
- package/src/concepts/ImportedInterface__.ts +2 -4
- package/src/concepts/InputSetter__.ts +2 -4
- package/src/concepts/Integration__.ts +0 -1
- package/src/concepts/InterfaceParam__.ts +4 -12
- package/src/concepts/InterfaceTriggerEvent__.ts +1 -1
- package/src/concepts/Interface__.ts +10 -21
- package/src/concepts/JSBlock__.ts +1 -3
- package/src/concepts/JavaLogic__.ts +3 -9
- package/src/concepts/LogicDeclaration__.ts +4 -10
- package/src/concepts/LogicItem__.ts +9 -19
- package/src/concepts/Logic__.ts +43 -47
- package/src/concepts/MatchCase__.ts +12 -12
- package/src/concepts/Match__.ts +11 -8
- package/src/concepts/MemberExpression__.ts +8 -2
- package/src/concepts/MetadataType__.ts +9 -16
- package/src/concepts/MicroApp__.ts +7 -21
- package/src/concepts/Module__.ts +10 -26
- package/src/concepts/Namespace__.ts +4 -12
- package/src/concepts/NewComposite__.ts +18 -16
- package/src/concepts/NewList__.ts +1 -1
- package/src/concepts/NewMap__.ts +15 -6
- package/src/concepts/NumberInputSetter__.ts +10 -20
- package/src/concepts/NumericLiteral__.ts +1 -3
- package/src/concepts/OperatePermissionV2__.ts +4 -12
- package/src/concepts/OqlQueryComponent__.ts +3 -7
- package/src/concepts/OverriddenLogic__.ts +15 -25
- package/src/concepts/ParamWithGroup__.ts +2 -6
- package/src/concepts/Param__.ts +5 -9
- package/src/concepts/Point__.ts +2 -6
- package/src/concepts/ProcessBindV2__.ts +2 -6
- package/src/concepts/ProcessComponent__.ts +4 -12
- package/src/concepts/ProcessElementV2__.ts +11 -27
- package/src/concepts/ProcessElement__.ts +13 -23
- package/src/concepts/ProcessOutcome__.ts +1 -3
- package/src/concepts/ProcessOutcomes__.ts +0 -1
- package/src/concepts/ProcessV2__.ts +11 -19
- package/src/concepts/Process__.ts +3 -9
- package/src/concepts/PropDeclaration__.ts +31 -57
- package/src/concepts/QueryAggregateExpression__.ts +3 -8
- package/src/concepts/QueryFieldExpression__.ts +23 -30
- package/src/concepts/QueryFromExpression__.ts +3 -9
- package/src/concepts/QueryJoinExpression__.ts +5 -14
- package/src/concepts/QueryLimitExpression__.ts +16 -4
- package/src/concepts/QueryOrderByExpression__.ts +22 -13
- package/src/concepts/QuerySelectExpression__.ts +8 -13
- package/src/concepts/Rect__.ts +4 -12
- package/src/concepts/Return__.ts +4 -8
- package/src/concepts/Role__.ts +8 -16
- package/src/concepts/SelectMembers__.ts +1 -3
- package/src/concepts/SetterOption__.ts +10 -22
- package/src/concepts/SlotDeclaration__.ts +7 -17
- package/src/concepts/SqlQueryComponent__.ts +5 -13
- package/src/concepts/StaticString__.ts +9 -16
- package/src/concepts/StringLiteral__.ts +5 -11
- package/src/concepts/StructureProperty__.ts +10 -18
- package/src/concepts/Structure__.ts +10 -18
- package/src/concepts/SwitchCase__.ts +1 -1
- package/src/concepts/SwitchStatement__.ts +1 -1
- package/src/concepts/ThemeVariable__.ts +1 -3
- package/src/concepts/Theme__.ts +2 -6
- package/src/concepts/Transactional__.ts +10 -19
- package/src/concepts/TriggerEvent__.ts +1 -3
- package/src/concepts/TriggerLauncher__.ts +11 -15
- package/src/concepts/TypeAnnotation__.ts +50 -41
- package/src/concepts/TypeParam__.ts +1 -3
- package/src/concepts/UnaryExpression__.ts +1 -3
- package/src/concepts/Unparsed__.ts +1 -3
- package/src/concepts/UseComponent__.ts +2 -6
- package/src/concepts/ValidationRule__.ts +5 -11
- package/src/concepts/Variable__.ts +4 -8
- package/src/concepts/ViewBlockWithImage__.ts +2 -6
- package/src/concepts/ViewBlock__.ts +4 -10
- package/src/concepts/ViewComponentDeclaration__.ts +11 -27
- package/src/concepts/ViewElement__.ts +219 -146
- package/src/concepts/View__.ts +40 -54
- package/src/generator/genBundleFiles.ts +2 -1
- package/src/generator/release-body/utils.ts +2 -1
- package/src/natural/genNaturalTS.ts +1 -0
- package/src/server/naslServer.ts +24 -10
- package/src/server/translator.ts +56 -0
- package/src/utils/env.ts +2 -0
package/src/concepts/Logic__.ts
CHANGED
|
@@ -89,50 +89,38 @@ export class Logic extends BaseNode {
|
|
|
89
89
|
/**
|
|
90
90
|
* 逻辑名称
|
|
91
91
|
*/
|
|
92
|
-
@property(
|
|
93
|
-
objectRef: '',
|
|
94
|
-
})
|
|
92
|
+
@property()
|
|
95
93
|
name: string = '';
|
|
96
94
|
|
|
97
95
|
/**
|
|
98
96
|
* 逻辑标题
|
|
99
97
|
*/
|
|
100
|
-
@property(
|
|
101
|
-
|
|
102
|
-
})
|
|
103
|
-
title: string;
|
|
98
|
+
@property()
|
|
99
|
+
title?: string;
|
|
104
100
|
|
|
105
101
|
/**
|
|
106
102
|
* 逻辑描述
|
|
107
103
|
*/
|
|
108
|
-
@property(
|
|
109
|
-
|
|
110
|
-
})
|
|
111
|
-
description: string;
|
|
104
|
+
@property()
|
|
105
|
+
description?: string;
|
|
112
106
|
|
|
113
107
|
/**
|
|
114
108
|
* 触发方式
|
|
115
109
|
*/
|
|
116
|
-
@property(
|
|
117
|
-
|
|
118
|
-
})
|
|
119
|
-
triggerType: string;
|
|
110
|
+
@property()
|
|
111
|
+
triggerType?: string;
|
|
120
112
|
|
|
121
113
|
/**
|
|
122
114
|
* 定时任务表达式
|
|
123
115
|
*/
|
|
124
|
-
@property(
|
|
125
|
-
|
|
126
|
-
})
|
|
127
|
-
cron: string;
|
|
116
|
+
@property()
|
|
117
|
+
cron?: string;
|
|
128
118
|
|
|
129
119
|
/**
|
|
130
120
|
* 是否可覆写
|
|
131
121
|
*/
|
|
132
|
-
@property(
|
|
133
|
-
|
|
134
|
-
})
|
|
135
|
-
overridable: boolean;
|
|
122
|
+
@property()
|
|
123
|
+
overridable?: boolean;
|
|
136
124
|
|
|
137
125
|
/**
|
|
138
126
|
* 事务
|
|
@@ -140,7 +128,7 @@ export class Logic extends BaseNode {
|
|
|
140
128
|
@property({
|
|
141
129
|
objectRef: 'Transactional',
|
|
142
130
|
})
|
|
143
|
-
transactional
|
|
131
|
+
transactional?: Transactional;
|
|
144
132
|
|
|
145
133
|
/**
|
|
146
134
|
* 类型参数列表
|
|
@@ -150,7 +138,7 @@ export class Logic extends BaseNode {
|
|
|
150
138
|
isArray: true,
|
|
151
139
|
defaultValue: null,
|
|
152
140
|
})
|
|
153
|
-
typeParams?: Array<TypeParam
|
|
141
|
+
typeParams?: Array<TypeParam>;
|
|
154
142
|
|
|
155
143
|
/**
|
|
156
144
|
* 输入参数列表
|
|
@@ -1574,14 +1562,13 @@ export class Logic extends BaseNode {
|
|
|
1574
1562
|
// const needGetSourceMapOqlList: Promise<any>[] = [];
|
|
1575
1563
|
yield* self.traverseChildrenGenerator(function* traverseChildrenGenerator(el) {
|
|
1576
1564
|
if (
|
|
1577
|
-
el &&
|
|
1578
|
-
|
|
1579
|
-
|
|
1565
|
+
el &&
|
|
1566
|
+
// 批量赋值
|
|
1567
|
+
(asserts.isBatchAssignment(el) ||
|
|
1580
1568
|
// 赋值
|
|
1581
1569
|
(asserts.isAssignment(el) && el.left?.name) ||
|
|
1582
1570
|
// 内置函数对集合类型的推导
|
|
1583
|
-
(asserts.isCallFunction(el) && el.derivablecollection?.name)
|
|
1584
|
-
)
|
|
1571
|
+
(asserts.isCallFunction(el) && el.derivablecollection?.name))
|
|
1585
1572
|
) {
|
|
1586
1573
|
if (asserts.isAssignment(el)) {
|
|
1587
1574
|
const advanceVar = self.variables?.find(
|
|
@@ -1610,7 +1597,7 @@ export class Logic extends BaseNode {
|
|
|
1610
1597
|
leftIndex.length === 1
|
|
1611
1598
|
? yield* el.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
1612
1599
|
: yield* el.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1613
|
-
|
|
1600
|
+
returnOrigin('');
|
|
1614
1601
|
const advanceVar = self.variables?.find(
|
|
1615
1602
|
(variable) => !variable.typeAnnotation && leftCode === variable.name,
|
|
1616
1603
|
);
|
|
@@ -1663,7 +1650,7 @@ export class Logic extends BaseNode {
|
|
|
1663
1650
|
leftIndex.length === 1
|
|
1664
1651
|
? yield* assignment.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
1665
1652
|
: yield* assignment.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1666
|
-
|
|
1653
|
+
returnOrigin('');
|
|
1667
1654
|
if (leftCode === node.name) {
|
|
1668
1655
|
const rightNode: any =
|
|
1669
1656
|
rightIndex.length === 1
|
|
@@ -1788,7 +1775,11 @@ export class Logic extends BaseNode {
|
|
|
1788
1775
|
}
|
|
1789
1776
|
|
|
1790
1777
|
@withSourceMapGenerator
|
|
1791
|
-
*toEmbeddedDeclarationTS(
|
|
1778
|
+
*toEmbeddedDeclarationTS(
|
|
1779
|
+
state = createCompilerState(),
|
|
1780
|
+
prefix?: string,
|
|
1781
|
+
hideDefaultValue?: boolean,
|
|
1782
|
+
): TranslatorGenerator {
|
|
1792
1783
|
const self = this;
|
|
1793
1784
|
let code = '';
|
|
1794
1785
|
if (!prefix) {
|
|
@@ -1831,7 +1822,6 @@ export class Logic extends BaseNode {
|
|
|
1831
1822
|
return code;
|
|
1832
1823
|
}
|
|
1833
1824
|
|
|
1834
|
-
|
|
1835
1825
|
@withSourceMapGenerator
|
|
1836
1826
|
*toEmbeddedTS(state = createCompilerState(), prefix?: string, hideDefaultValue?: boolean): TranslatorGenerator {
|
|
1837
1827
|
const self = this;
|
|
@@ -1874,14 +1864,13 @@ export class Logic extends BaseNode {
|
|
|
1874
1864
|
const callFunctionAdvanceMap: Map<Return | Variable, CallFunction> = new Map();
|
|
1875
1865
|
yield* self.traverseChildrenGenerator(function* traverseChildrenGenerator(el) {
|
|
1876
1866
|
if (
|
|
1877
|
-
el &&
|
|
1878
|
-
|
|
1879
|
-
|
|
1867
|
+
el &&
|
|
1868
|
+
// 批量赋值
|
|
1869
|
+
(asserts.isBatchAssignment(el) ||
|
|
1880
1870
|
// 赋值
|
|
1881
1871
|
(asserts.isAssignment(el) && el.left?.name) ||
|
|
1882
1872
|
// 内置函数对集合类型的推导
|
|
1883
|
-
(asserts.isCallFunction(el) && el.derivablecollection?.name)
|
|
1884
|
-
)
|
|
1873
|
+
(asserts.isCallFunction(el) && el.derivablecollection?.name))
|
|
1885
1874
|
) {
|
|
1886
1875
|
if (asserts.isAssignment(el)) {
|
|
1887
1876
|
const advanceVar = self.variables?.find(
|
|
@@ -1910,7 +1899,7 @@ export class Logic extends BaseNode {
|
|
|
1910
1899
|
leftIndex.length === 1
|
|
1911
1900
|
? yield* el.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
1912
1901
|
: yield* el.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1913
|
-
|
|
1902
|
+
returnOrigin('');
|
|
1914
1903
|
const advanceVar = self.variables?.find(
|
|
1915
1904
|
(variable) => !variable.typeAnnotation && leftCode === variable.name,
|
|
1916
1905
|
);
|
|
@@ -1935,7 +1924,7 @@ export class Logic extends BaseNode {
|
|
|
1935
1924
|
code += '{\n';
|
|
1936
1925
|
if (self.exportInterface) {
|
|
1937
1926
|
code += indent((state?.tabSize || 0) + 1);
|
|
1938
|
-
code += `let exportInterface = app.interfaces.${self.exportInterface.name};\n
|
|
1927
|
+
code += `let exportInterface = app.interfaces.${self.exportInterface.name};\n`;
|
|
1939
1928
|
}
|
|
1940
1929
|
// 用于虚拟节点的查找引用
|
|
1941
1930
|
if (Array.isArray(self.virtualParams)) {
|
|
@@ -1989,7 +1978,7 @@ export class Logic extends BaseNode {
|
|
|
1989
1978
|
leftIndex.length === 1
|
|
1990
1979
|
? yield* assignment.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
1991
1980
|
: yield* assignment.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1992
|
-
|
|
1981
|
+
returnOrigin('');
|
|
1993
1982
|
if (leftCode === node.name) {
|
|
1994
1983
|
const rightNode: any =
|
|
1995
1984
|
rightIndex.length === 1
|
|
@@ -2234,7 +2223,8 @@ export class Logic extends BaseNode {
|
|
|
2234
2223
|
});
|
|
2235
2224
|
|
|
2236
2225
|
if (!this.body.length || this.body.length === 2) {
|
|
2237
|
-
if (`${this.nodePath}.body[1]` === state.focusedNodePath)
|
|
2226
|
+
if (`${this.nodePath}.body[1]` === state.focusedNodePath)
|
|
2227
|
+
code += `${indent(state.tabSize + 1)}/* 当前位置 */\n`;
|
|
2238
2228
|
code += `${indent(state.tabSize + 1)}return ${this?.returns?.[0]?.name || ''};\n`;
|
|
2239
2229
|
} else {
|
|
2240
2230
|
this.body.forEach((item) => {
|
|
@@ -2419,8 +2409,8 @@ export class Logic extends BaseNode {
|
|
|
2419
2409
|
collectionTSCode === '__IDENTIFIER__'
|
|
2420
2410
|
? collectionTSCode
|
|
2421
2411
|
: callFunction.isLoopMap && index === 0
|
|
2422
|
-
|
|
2423
|
-
|
|
2412
|
+
? `${collectionTSCode}.__getKey(0)`
|
|
2413
|
+
: `${collectionTSCode}.__get(0)`,
|
|
2424
2414
|
);
|
|
2425
2415
|
}
|
|
2426
2416
|
});
|
|
@@ -2562,8 +2552,9 @@ export class Logic extends BaseNode {
|
|
|
2562
2552
|
if (asserts.isFrontendLibrary(this.parentNode)) {
|
|
2563
2553
|
_path += `/frontends/${this.parentNode.type}`;
|
|
2564
2554
|
} else if (this.parentNode.concept === 'BindEvent' && this.getAncestor('Frontend')) {
|
|
2565
|
-
_path += `/frontendTypes/${this.getAncestor('FrontendType')?.name}/frontends/${
|
|
2566
|
-
|
|
2555
|
+
_path += `/frontendTypes/${this.getAncestor('FrontendType')?.name}/frontends/${
|
|
2556
|
+
this.getAncestor('Frontend')?.name
|
|
2557
|
+
}/bindEvents/${name}.ts`;
|
|
2567
2558
|
}
|
|
2568
2559
|
return `/embedded/${this.getAncestor('App')?.name}${_path}/logics/${name}.ts`;
|
|
2569
2560
|
}
|
|
@@ -2651,6 +2642,11 @@ export class Logic extends BaseNode {
|
|
|
2651
2642
|
actionMsg,
|
|
2652
2643
|
});
|
|
2653
2644
|
super.delete();
|
|
2645
|
+
this.body.forEach((el) => {
|
|
2646
|
+
if (asserts.isCallInterface(el)) {
|
|
2647
|
+
el.deleteCallNode()
|
|
2648
|
+
}
|
|
2649
|
+
})
|
|
2654
2650
|
this.traverseChildren(async (el) => {
|
|
2655
2651
|
if (el?.concept === 'CallQueryComponent') (el as CallQueryComponent).removeStructure();
|
|
2656
2652
|
// 仅仅针对 自定义连接器下的 Loigc,其他需要界定边界
|
|
@@ -73,9 +73,7 @@ export class MatchCase extends LogicItem {
|
|
|
73
73
|
/**
|
|
74
74
|
* 是否可枚举
|
|
75
75
|
*/
|
|
76
|
-
@property(
|
|
77
|
-
objectRef: '',
|
|
78
|
-
})
|
|
76
|
+
@property()
|
|
79
77
|
isMatchedTypeEnumable: boolean = false;
|
|
80
78
|
|
|
81
79
|
/**
|
|
@@ -152,14 +150,6 @@ export class MatchCase extends LogicItem {
|
|
|
152
150
|
return logicItem;
|
|
153
151
|
}
|
|
154
152
|
|
|
155
|
-
getLogicItemExistingNames(excludedList: Array<LogicItem> = []) {
|
|
156
|
-
const excludedSet = new Set(excludedList);
|
|
157
|
-
return ((this.patterns as LogicItem[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
158
|
-
}
|
|
159
|
-
getLogicItemUniqueName(name = 'logicItem1') {
|
|
160
|
-
return utils.unique(name, this.getLogicItemExistingNames(), undefined, false);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
153
|
/**
|
|
164
154
|
* 插入逻辑项
|
|
165
155
|
* @param logicItemOptions 逻辑项参数
|
|
@@ -592,6 +582,14 @@ export class MatchCase extends LogicItem {
|
|
|
592
582
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
593
583
|
//================================================================================
|
|
594
584
|
|
|
585
|
+
getLogicItemExistingNames(excludedList: Array<LogicItem> = []) {
|
|
586
|
+
const excludedSet = new Set(excludedList);
|
|
587
|
+
return ((this.patterns as LogicItem[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
588
|
+
}
|
|
589
|
+
getLogicItemUniqueName(name = 'logicItem1') {
|
|
590
|
+
return utils.unique(name, this.getLogicItemExistingNames(), undefined, false);
|
|
591
|
+
}
|
|
592
|
+
|
|
595
593
|
// 是否处于禁用状态
|
|
596
594
|
get isDisabled() {
|
|
597
595
|
const matchExpression = this.parentNode as Match;
|
|
@@ -928,7 +926,9 @@ export class MatchCase extends LogicItem {
|
|
|
928
926
|
@withSourceMap()
|
|
929
927
|
toTextualNASL(state = createCompilerState()): string {
|
|
930
928
|
let code = '';
|
|
931
|
-
code += this.patterns.length
|
|
929
|
+
code += this.patterns.length
|
|
930
|
+
? this.patterns.map((pattern) => pattern.toTextualNASL(shiftState(state, code, { inline: true }))).join(' | ')
|
|
931
|
+
: '_';
|
|
932
932
|
code += ` => `;
|
|
933
933
|
if ((this.parentNode as Match)?.isExpression) {
|
|
934
934
|
this.body.forEach((logicItem) => {
|
package/src/concepts/Match__.ts
CHANGED
|
@@ -63,9 +63,7 @@ export class Match extends LogicItem {
|
|
|
63
63
|
/**
|
|
64
64
|
* 是否表达式形态
|
|
65
65
|
*/
|
|
66
|
-
@property(
|
|
67
|
-
objectRef: '',
|
|
68
|
-
})
|
|
66
|
+
@property()
|
|
69
67
|
isExpression: boolean = false;
|
|
70
68
|
|
|
71
69
|
/**
|
|
@@ -285,7 +283,7 @@ export class Match extends LogicItem {
|
|
|
285
283
|
if (enabled && messagesLanguageList?.length) {
|
|
286
284
|
const filterChildren = children.filter((child) => {
|
|
287
285
|
return messagesLanguageList.find((langId) => 'I18nEnum.' + langId === child.value);
|
|
288
|
-
})
|
|
286
|
+
});
|
|
289
287
|
return filterChildren.map((child) => child?.expression);
|
|
290
288
|
}
|
|
291
289
|
}
|
|
@@ -749,9 +747,15 @@ export class Match extends LogicItem {
|
|
|
749
747
|
// 最后一项是else
|
|
750
748
|
this.cases.forEach((item, index) => {
|
|
751
749
|
// 如果是最后一项
|
|
752
|
-
code += item.toNaturalTS(
|
|
750
|
+
code += item.toNaturalTS(
|
|
751
|
+
shiftState(state, code, { tabSize: (state?.tabSize || 0) + 1, inline: true }),
|
|
752
|
+
index,
|
|
753
|
+
parentCode,
|
|
754
|
+
);
|
|
753
755
|
});
|
|
754
|
-
code += `${indent(state?.tabSize || 0)}})(${this.expression?.toNaturalTS(
|
|
756
|
+
code += `${indent(state?.tabSize || 0)}})(${this.expression?.toNaturalTS(
|
|
757
|
+
shiftState(state, code, { inline: true }),
|
|
758
|
+
)})`;
|
|
755
759
|
|
|
756
760
|
if (
|
|
757
761
|
this.parentNode?.concept !== 'Argument' &&
|
|
@@ -777,8 +781,7 @@ export class Match extends LogicItem {
|
|
|
777
781
|
code += this.expression?.toTextualNASL(shiftState(state, '', { inline: true }));
|
|
778
782
|
code += ` {\n`;
|
|
779
783
|
this.cases.forEach((item, index) => {
|
|
780
|
-
if (item.body.length)
|
|
781
|
-
code += item.toTextualNASL(shiftState(state, code, { tabSize: state.tabSize + 1 }));
|
|
784
|
+
if (item.body.length) code += item.toTextualNASL(shiftState(state, code, { tabSize: state.tabSize + 1 }));
|
|
782
785
|
});
|
|
783
786
|
code += `${indent(state.tabSize)}}\n`;
|
|
784
787
|
return code;
|
|
@@ -540,7 +540,9 @@ export class MemberExpression extends LogicItem {
|
|
|
540
540
|
@withSourceMap()
|
|
541
541
|
toNaturalTS(state = createCompilerState()): string {
|
|
542
542
|
let code = '';
|
|
543
|
-
const leftCode = this.object
|
|
543
|
+
const leftCode = this.object
|
|
544
|
+
? `${this.object.toNaturalTS(shiftState(state, code, { inline: true }))}.`
|
|
545
|
+
: '__IDENTIFIER__';
|
|
544
546
|
code += this.object ? `${this.object.toNaturalTS(shiftState(state, code, { inline: true }))}.` : '__IDENTIFIER__';
|
|
545
547
|
code += this.property ? this.property.toNaturalTS(shiftState(state, code, { inline: true })) : '__IDENTIFIER__';
|
|
546
548
|
// 就说明这是一个枚举取值操作,直接啊app.enums.color.red 要转成字符串
|
|
@@ -558,7 +560,11 @@ export class MemberExpression extends LogicItem {
|
|
|
558
560
|
toTextualNASL(state = createCompilerState()): string {
|
|
559
561
|
let code = '';
|
|
560
562
|
// const leftCode = this.object ? `${this.object.toTextualNASL(shiftState(state, code, { inline: true }))}.` : '';
|
|
561
|
-
code += this.object
|
|
563
|
+
code += this.object
|
|
564
|
+
? `${this.object.toTextualNASL(shiftState(state, code, { inline: true }))}${
|
|
565
|
+
(this.object as Identifier)?.namespace?.includes('.enums') ? '::' : '.'
|
|
566
|
+
}`
|
|
567
|
+
: '__IDENTIFIER__';
|
|
562
568
|
code += this.property ? this.property.toTextualNASL(shiftState(state, code, { inline: true })) : '__IDENTIFIER__';
|
|
563
569
|
return code;
|
|
564
570
|
}
|
|
@@ -54,26 +54,20 @@ export class MetadataType extends BaseNode {
|
|
|
54
54
|
/**
|
|
55
55
|
* 名称
|
|
56
56
|
*/
|
|
57
|
-
@property(
|
|
58
|
-
objectRef: '',
|
|
59
|
-
})
|
|
57
|
+
@property()
|
|
60
58
|
name: string = '';
|
|
61
59
|
|
|
62
60
|
/**
|
|
63
61
|
* 标题
|
|
64
62
|
*/
|
|
65
|
-
@property(
|
|
66
|
-
objectRef: '',
|
|
67
|
-
})
|
|
63
|
+
@property()
|
|
68
64
|
label: string = '元数据';
|
|
69
65
|
|
|
70
66
|
/**
|
|
71
67
|
* 描述
|
|
72
68
|
*/
|
|
73
|
-
@property(
|
|
74
|
-
|
|
75
|
-
})
|
|
76
|
-
description: string;
|
|
69
|
+
@property()
|
|
70
|
+
description?: string;
|
|
77
71
|
|
|
78
72
|
/**
|
|
79
73
|
* 类型
|
|
@@ -106,9 +100,7 @@ export class MetadataType extends BaseNode {
|
|
|
106
100
|
/**
|
|
107
101
|
* 唯一标识
|
|
108
102
|
*/
|
|
109
|
-
@property(
|
|
110
|
-
objectRef: '',
|
|
111
|
-
})
|
|
103
|
+
@property()
|
|
112
104
|
uuid: string = createUUID();
|
|
113
105
|
|
|
114
106
|
/**
|
|
@@ -549,8 +541,7 @@ export class MetadataType extends BaseNode {
|
|
|
549
541
|
let code = '';
|
|
550
542
|
|
|
551
543
|
this.rules.forEach((rule, index) => {
|
|
552
|
-
if (index > 0)
|
|
553
|
-
code += indent(state.tabSize);
|
|
544
|
+
if (index > 0) code += indent(state.tabSize);
|
|
554
545
|
|
|
555
546
|
code += `${rule.toTextualNASL(shiftState(state, code, { tabSize: state.tabSize + 1 }))}\n`;
|
|
556
547
|
});
|
|
@@ -565,7 +556,9 @@ export class MetadataType extends BaseNode {
|
|
|
565
556
|
code += `type ${this.name} = ${this.typeAnnotation.toTextualNASL(state)} {\n`;
|
|
566
557
|
|
|
567
558
|
this.rules.forEach((rule) => {
|
|
568
|
-
code += `${indent(state.tabSize)}${rule.toTextualNASL(
|
|
559
|
+
code += `${indent(state.tabSize)}${rule.toTextualNASL(
|
|
560
|
+
shiftState(state, code, { tabSize: state.tabSize + 1 }),
|
|
561
|
+
)};\n`;
|
|
569
562
|
});
|
|
570
563
|
|
|
571
564
|
code += `${indent(state.tabSize)}}\n`;
|
|
@@ -35,57 +35,43 @@ export class MicroApp extends BaseNode {
|
|
|
35
35
|
/**
|
|
36
36
|
* 微前端框架
|
|
37
37
|
*/
|
|
38
|
-
@property(
|
|
39
|
-
objectRef: '',
|
|
40
|
-
})
|
|
38
|
+
@property()
|
|
41
39
|
framework: 'qiankun' | 'icestark';
|
|
42
40
|
|
|
43
41
|
/**
|
|
44
42
|
* 微应用名称
|
|
45
43
|
*/
|
|
46
|
-
@property(
|
|
47
|
-
objectRef: '',
|
|
48
|
-
})
|
|
44
|
+
@property()
|
|
49
45
|
name: string = '';
|
|
50
46
|
|
|
51
47
|
/**
|
|
52
48
|
* 页面路径前缀
|
|
53
49
|
*/
|
|
54
|
-
@property(
|
|
55
|
-
objectRef: '',
|
|
56
|
-
})
|
|
50
|
+
@property()
|
|
57
51
|
routePrefix: string;
|
|
58
52
|
|
|
59
53
|
/**
|
|
60
54
|
* 接口和静态资源前缀
|
|
61
55
|
*/
|
|
62
|
-
@property(
|
|
63
|
-
objectRef: '',
|
|
64
|
-
})
|
|
56
|
+
@property()
|
|
65
57
|
proxyPrefix: string;
|
|
66
58
|
|
|
67
59
|
/**
|
|
68
60
|
* 登录页面地址
|
|
69
61
|
*/
|
|
70
|
-
@property(
|
|
71
|
-
objectRef: '',
|
|
72
|
-
})
|
|
62
|
+
@property()
|
|
73
63
|
loginUrl: string;
|
|
74
64
|
|
|
75
65
|
/**
|
|
76
66
|
* 无权限页面地址
|
|
77
67
|
*/
|
|
78
|
-
@property(
|
|
79
|
-
objectRef: '',
|
|
80
|
-
})
|
|
68
|
+
@property()
|
|
81
69
|
noAuthUrl: string;
|
|
82
70
|
|
|
83
71
|
/**
|
|
84
72
|
* 404页面地址
|
|
85
73
|
*/
|
|
86
|
-
@property(
|
|
87
|
-
objectRef: '',
|
|
88
|
-
})
|
|
74
|
+
@property()
|
|
89
75
|
notFoundUrl: string;
|
|
90
76
|
|
|
91
77
|
/**
|
package/src/concepts/Module__.ts
CHANGED
|
@@ -61,57 +61,43 @@ export class Module extends BaseNode {
|
|
|
61
61
|
/**
|
|
62
62
|
* type
|
|
63
63
|
*/
|
|
64
|
-
@property(
|
|
65
|
-
objectRef: '',
|
|
66
|
-
})
|
|
64
|
+
@property()
|
|
67
65
|
type: 'extension' | 'interface' | 'component' | 'connector' | 'customInterface';
|
|
68
66
|
|
|
69
67
|
/**
|
|
70
68
|
* version
|
|
71
69
|
*/
|
|
72
|
-
@property(
|
|
73
|
-
objectRef: '',
|
|
74
|
-
})
|
|
70
|
+
@property()
|
|
75
71
|
version: string;
|
|
76
72
|
|
|
77
73
|
/**
|
|
78
74
|
* 模块名称
|
|
79
75
|
*/
|
|
80
|
-
@property(
|
|
81
|
-
objectRef: '',
|
|
82
|
-
})
|
|
76
|
+
@property()
|
|
83
77
|
name: string = '';
|
|
84
78
|
|
|
85
79
|
/**
|
|
86
80
|
* 模块标题
|
|
87
81
|
*/
|
|
88
|
-
@property(
|
|
89
|
-
objectRef: '',
|
|
90
|
-
})
|
|
82
|
+
@property()
|
|
91
83
|
title: string;
|
|
92
84
|
|
|
93
85
|
/**
|
|
94
86
|
* 模块描述
|
|
95
87
|
*/
|
|
96
|
-
@property(
|
|
97
|
-
objectRef: '',
|
|
98
|
-
})
|
|
88
|
+
@property()
|
|
99
89
|
description: string;
|
|
100
90
|
|
|
101
91
|
/**
|
|
102
92
|
* provider
|
|
103
93
|
*/
|
|
104
|
-
@property(
|
|
105
|
-
objectRef: '',
|
|
106
|
-
})
|
|
94
|
+
@property()
|
|
107
95
|
provider: string;
|
|
108
96
|
|
|
109
97
|
/**
|
|
110
98
|
* 外部语言依赖
|
|
111
99
|
*/
|
|
112
|
-
@property(
|
|
113
|
-
objectRef: '',
|
|
114
|
-
})
|
|
100
|
+
@property()
|
|
115
101
|
externalDependencyMap: {
|
|
116
102
|
maven?: Array<{
|
|
117
103
|
groupId: string;
|
|
@@ -123,9 +109,7 @@ export class Module extends BaseNode {
|
|
|
123
109
|
/**
|
|
124
110
|
* 外部语言依赖
|
|
125
111
|
*/
|
|
126
|
-
@property(
|
|
127
|
-
objectRef: '',
|
|
128
|
-
})
|
|
112
|
+
@property()
|
|
129
113
|
compilerInfoMap:
|
|
130
114
|
| {
|
|
131
115
|
java?: Array<{
|
|
@@ -133,13 +117,13 @@ export class Module extends BaseNode {
|
|
|
133
117
|
className: string;
|
|
134
118
|
naslName: string;
|
|
135
119
|
type: string;
|
|
136
|
-
javaTypes:
|
|
120
|
+
javaTypes: Record<string, string>;
|
|
137
121
|
}>;
|
|
138
122
|
js?: {
|
|
139
123
|
prefix: string;
|
|
140
124
|
};
|
|
141
125
|
}
|
|
142
|
-
|
|
|
126
|
+
| Record<string, string>;
|
|
143
127
|
|
|
144
128
|
/**
|
|
145
129
|
* 数据源列表
|
|
@@ -47,33 +47,25 @@ export class Namespace extends BaseNode {
|
|
|
47
47
|
/**
|
|
48
48
|
* 表示是从实体还是流程等概念产生的
|
|
49
49
|
*/
|
|
50
|
-
@property(
|
|
51
|
-
objectRef: '',
|
|
52
|
-
})
|
|
50
|
+
@property()
|
|
53
51
|
originConcept: string;
|
|
54
52
|
|
|
55
53
|
/**
|
|
56
54
|
* 命名空间名称
|
|
57
55
|
*/
|
|
58
|
-
@property(
|
|
59
|
-
objectRef: '',
|
|
60
|
-
})
|
|
56
|
+
@property()
|
|
61
57
|
name: string = '';
|
|
62
58
|
|
|
63
59
|
/**
|
|
64
60
|
* 命名空间标题
|
|
65
61
|
*/
|
|
66
|
-
@property(
|
|
67
|
-
objectRef: '',
|
|
68
|
-
})
|
|
62
|
+
@property()
|
|
69
63
|
title: string;
|
|
70
64
|
|
|
71
65
|
/**
|
|
72
66
|
* 命名空间描述
|
|
73
67
|
*/
|
|
74
|
-
@property(
|
|
75
|
-
objectRef: '',
|
|
76
|
-
})
|
|
68
|
+
@property()
|
|
77
69
|
description: string;
|
|
78
70
|
|
|
79
71
|
/**
|
|
@@ -95,25 +95,19 @@ export class NewComposite extends LogicItem {
|
|
|
95
95
|
/**
|
|
96
96
|
* hideProperties
|
|
97
97
|
*/
|
|
98
|
-
@property(
|
|
99
|
-
objectRef: '',
|
|
100
|
-
})
|
|
98
|
+
@property()
|
|
101
99
|
hideProperties: boolean = false;
|
|
102
100
|
|
|
103
101
|
/**
|
|
104
102
|
* hideDefaults
|
|
105
103
|
*/
|
|
106
|
-
@property(
|
|
107
|
-
objectRef: '',
|
|
108
|
-
})
|
|
104
|
+
@property()
|
|
109
105
|
hideDefaults: boolean = false;
|
|
110
106
|
|
|
111
107
|
/**
|
|
112
108
|
* 自动连线
|
|
113
109
|
*/
|
|
114
|
-
@property(
|
|
115
|
-
objectRef: '',
|
|
116
|
-
})
|
|
110
|
+
@property()
|
|
117
111
|
autoConnection: boolean = true;
|
|
118
112
|
|
|
119
113
|
/**
|
|
@@ -1045,11 +1039,13 @@ export class NewComposite extends LogicItem {
|
|
|
1045
1039
|
} else if (typeAnnotation.typeKind !== 'anonymousStructure') {
|
|
1046
1040
|
// 实体、数据结构默认值使用new时需要改成vue.prototype才能获取到方法
|
|
1047
1041
|
if (state?.getVuePrototype) {
|
|
1048
|
-
code += `const obj = Vue.prototype.$genInitFromSchema('${
|
|
1049
|
-
|
|
1042
|
+
code += `const obj = Vue.prototype.$genInitFromSchema('${
|
|
1043
|
+
typeAnnotation.sortedTypeKey
|
|
1044
|
+
}', Vue.prototype.$utils['New'](${typeAnnotation.toJS(state)}));\n`;
|
|
1050
1045
|
} else {
|
|
1051
|
-
code += `const obj = this.$genInitFromSchema('${
|
|
1052
|
-
|
|
1046
|
+
code += `const obj = this.$genInitFromSchema('${
|
|
1047
|
+
typeAnnotation.sortedTypeKey
|
|
1048
|
+
}', this.$utils['New'](${typeAnnotation.toJS(state)}));\n`;
|
|
1053
1049
|
}
|
|
1054
1050
|
const rightMap = new Map();
|
|
1055
1051
|
this.assignmentLines.forEach(({ leftIndex, rightIndex }) => {
|
|
@@ -1114,7 +1110,8 @@ export class NewComposite extends LogicItem {
|
|
|
1114
1110
|
if (typeAnnotation) {
|
|
1115
1111
|
let { typeKind, typeNamespace, typeName, sortedTypeKey } = typeAnnotation;
|
|
1116
1112
|
if (typeNamespace?.endsWith('.metadataTypes')) {
|
|
1117
|
-
const referenceNode =
|
|
1113
|
+
const referenceNode =
|
|
1114
|
+
(this.getAncestor('App') as App).findNodeByCompleteName(typeNamespace + '.' + typeName) || {};
|
|
1118
1115
|
const typeAn = referenceNode.typeAnnotation || {};
|
|
1119
1116
|
typeKind = typeAn.typeKind;
|
|
1120
1117
|
typeNamespace = typeAn.typeNamespace;
|
|
@@ -1375,14 +1372,19 @@ export class NewComposite extends LogicItem {
|
|
|
1375
1372
|
|
|
1376
1373
|
@withSourceMap()
|
|
1377
1374
|
toTextualNASL(state = createCompilerState()): string {
|
|
1378
|
-
let code =
|
|
1375
|
+
let code =
|
|
1376
|
+
this?.typeAnnotation?.typeKind === 'anonymousStructure'
|
|
1377
|
+
? ''
|
|
1378
|
+
: `${textualNamespace(this?.typeAnnotation?.typeKey)} `;
|
|
1379
1379
|
|
|
1380
1380
|
let params = '';
|
|
1381
1381
|
this?.properties?.forEach((item, index) => {
|
|
1382
1382
|
if (item) {
|
|
1383
1383
|
const right = this?.rights?.[index]?.expression;
|
|
1384
1384
|
if (right) {
|
|
1385
|
-
params += `${indent(state.tabSize + 1)}${item?.toTextualNASL()} = ${this?.rights?.[
|
|
1385
|
+
params += `${indent(state.tabSize + 1)}${item?.toTextualNASL()} = ${this?.rights?.[
|
|
1386
|
+
index
|
|
1387
|
+
]?.expression?.toTextualNASL()}`;
|
|
1386
1388
|
// if (index !== this.properties.length - 1) {
|
|
1387
1389
|
params += ',\n';
|
|
1388
1390
|
// }
|