@lcap/nasl 3.7.1-beta.1 → 3.7.2-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/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 +4 -14
- 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 +10 -25
- 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 +27 -44
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +2 -2
- package/out/concepts/Entity__.js +11 -18
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +1 -1
- package/out/concepts/EnumItem__.js +6 -8
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.js +7 -10
- 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 +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/IfStatement__.js +2 -2
- package/out/concepts/IfStatement__.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 +12 -19
- 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 +27 -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 +5 -11
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.js +6 -14
- 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 +9 -14
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +0 -4
- package/out/concepts/Structure__.js +17 -20
- 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__.d.ts +1 -6
- package/out/concepts/ValidationRule__.js +4 -23
- 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 +92 -83
- 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.d.ts +44 -1
- package/out/natural/genNaturalTS.js +61 -5
- package/out/natural/genNaturalTS.js.map +1 -1
- package/out/natural/getContext/index.js +3 -0
- package/out/natural/getContext/index.js.map +1 -1
- package/out/server/naslServer.js +24 -10
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +47 -0
- package/out/server/translator.js.map +1 -1
- package/out/translator/types.d.ts +4 -0
- package/out/translator/utils.d.ts +1 -0
- package/out/translator/utils.js +6 -1
- package/out/translator/utils.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 +7 -14
- package/src/concepts/CallInterface__.ts +8 -15
- package/src/concepts/CallLogic__.ts +39 -46
- 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 +40 -56
- package/src/concepts/Entity__.ts +13 -18
- package/src/concepts/EnumItem__.ts +15 -10
- package/src/concepts/Enum__.ts +9 -10
- 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 +2 -2
- 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/IfStatement__.ts +2 -2
- 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 +16 -22
- 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 +46 -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 +5 -11
- package/src/concepts/QueryJoinExpression__.ts +7 -16
- 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 +16 -19
- package/src/concepts/Structure__.ts +20 -20
- 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 +6 -17
- 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 +232 -157
- package/src/concepts/View__.ts +40 -54
- package/src/generator/genBundleFiles.ts +2 -1
- package/src/generator/release-body/utils.ts +3 -2
- package/src/natural/genNaturalTS.ts +91 -12
- package/src/natural/getContext/index.ts +3 -0
- package/src/server/naslServer.ts +24 -10
- package/src/server/translator.ts +49 -0
- package/src/translator/types.ts +4 -0
- package/src/translator/utils.ts +6 -0
- package/src/utils/env.ts +2 -0
- package/test/concepts/validation-rule/__snapshots__/toEmbeddedTS.spec.ts.snap +1 -2
|
@@ -46,9 +46,7 @@ export class Connector extends Module {
|
|
|
46
46
|
/**
|
|
47
47
|
* connectorKind
|
|
48
48
|
*/
|
|
49
|
-
@property(
|
|
50
|
-
objectRef: '',
|
|
51
|
-
})
|
|
49
|
+
@property()
|
|
52
50
|
connectorKind: string;
|
|
53
51
|
|
|
54
52
|
/**
|
|
@@ -90,9 +88,7 @@ export class Connector extends Module {
|
|
|
90
88
|
/**
|
|
91
89
|
* 预览图
|
|
92
90
|
*/
|
|
93
|
-
@property(
|
|
94
|
-
objectRef: '',
|
|
95
|
-
})
|
|
91
|
+
@property()
|
|
96
92
|
previewImg: string;
|
|
97
93
|
|
|
98
94
|
/**
|
|
@@ -128,9 +124,7 @@ export class Connector extends Module {
|
|
|
128
124
|
/**
|
|
129
125
|
* isLocal
|
|
130
126
|
*/
|
|
131
|
-
@property(
|
|
132
|
-
objectRef: '',
|
|
133
|
-
})
|
|
127
|
+
@property()
|
|
134
128
|
isLocal: boolean = true;
|
|
135
129
|
|
|
136
130
|
/**
|
|
@@ -55,17 +55,13 @@ export class Constant extends BaseNode {
|
|
|
55
55
|
/**
|
|
56
56
|
* 常量名称
|
|
57
57
|
*/
|
|
58
|
-
@property(
|
|
59
|
-
objectRef: '',
|
|
60
|
-
})
|
|
58
|
+
@property()
|
|
61
59
|
name: string = '';
|
|
62
60
|
|
|
63
61
|
/**
|
|
64
62
|
* 常量描述
|
|
65
63
|
*/
|
|
66
|
-
@property(
|
|
67
|
-
objectRef: '',
|
|
68
|
-
})
|
|
64
|
+
@property()
|
|
69
65
|
description: string;
|
|
70
66
|
|
|
71
67
|
/**
|
|
@@ -51,17 +51,13 @@ export class DataSource extends BaseNode {
|
|
|
51
51
|
/**
|
|
52
52
|
* 数据源名称
|
|
53
53
|
*/
|
|
54
|
-
@property(
|
|
55
|
-
objectRef: '',
|
|
56
|
-
})
|
|
54
|
+
@property()
|
|
57
55
|
name: string = '';
|
|
58
56
|
|
|
59
57
|
/**
|
|
60
58
|
* 数据源描述
|
|
61
59
|
*/
|
|
62
|
-
@property(
|
|
63
|
-
objectRef: '',
|
|
64
|
-
})
|
|
60
|
+
@property()
|
|
65
61
|
description: string;
|
|
66
62
|
|
|
67
63
|
/**
|
|
@@ -77,9 +73,7 @@ export class DataSource extends BaseNode {
|
|
|
77
73
|
/**
|
|
78
74
|
* ddl策略
|
|
79
75
|
*/
|
|
80
|
-
@property(
|
|
81
|
-
objectRef: '',
|
|
82
|
-
})
|
|
76
|
+
@property()
|
|
83
77
|
ddlStrategy: 'all' | 'originNotTable' | 'none';
|
|
84
78
|
|
|
85
79
|
/**
|
|
@@ -336,9 +330,9 @@ export class DataSource extends BaseNode {
|
|
|
336
330
|
typeKind: 'reference',
|
|
337
331
|
typeNamespace: entityNamespace,
|
|
338
332
|
typeName: entityName,
|
|
339
|
-
})
|
|
340
|
-
]
|
|
341
|
-
})
|
|
333
|
+
}),
|
|
334
|
+
],
|
|
335
|
+
}),
|
|
342
336
|
});
|
|
343
337
|
}
|
|
344
338
|
});
|
|
@@ -500,9 +494,11 @@ export class DataSource extends BaseNode {
|
|
|
500
494
|
toNaturalTS(state = createCompilerState()): string {
|
|
501
495
|
let code = `namespace app.dataSources.${this.name} {\n`;
|
|
502
496
|
this.entities.forEach((entity, index) => {
|
|
503
|
-
code += entity.toNaturalTS(
|
|
504
|
-
|
|
505
|
-
|
|
497
|
+
code += entity.toNaturalTS(
|
|
498
|
+
shiftState(state, code, {
|
|
499
|
+
tabSize: state.tabSize + 1,
|
|
500
|
+
}),
|
|
501
|
+
);
|
|
506
502
|
if (index !== this.entities.length - 1) code += '\n';
|
|
507
503
|
});
|
|
508
504
|
code += '}\n';
|
|
@@ -513,9 +509,11 @@ export class DataSource extends BaseNode {
|
|
|
513
509
|
toTextualNASL(state = createCompilerState()): string {
|
|
514
510
|
let code = `dataSource ${this.name} {\n`;
|
|
515
511
|
this.entities.forEach((entity, index) => {
|
|
516
|
-
code += entity.toTextualNASL(
|
|
517
|
-
|
|
518
|
-
|
|
512
|
+
code += entity.toTextualNASL(
|
|
513
|
+
shiftState(state, code, {
|
|
514
|
+
tabSize: state.tabSize + 1,
|
|
515
|
+
}),
|
|
516
|
+
);
|
|
519
517
|
if (index !== this.entities.length - 1) code += '\n';
|
|
520
518
|
});
|
|
521
519
|
code += '}\n';
|
|
@@ -36,17 +36,13 @@ export class DatabaseTypeAnnotation extends BaseNode {
|
|
|
36
36
|
/**
|
|
37
37
|
* 类型名称
|
|
38
38
|
*/
|
|
39
|
-
@property(
|
|
40
|
-
objectRef: '',
|
|
41
|
-
})
|
|
39
|
+
@property()
|
|
42
40
|
typeName: string;
|
|
43
41
|
|
|
44
42
|
/**
|
|
45
43
|
* 类型参数
|
|
46
44
|
*/
|
|
47
|
-
@property(
|
|
48
|
-
objectRef: '',
|
|
49
|
-
})
|
|
45
|
+
@property()
|
|
50
46
|
arguments: Record<string, string>;
|
|
51
47
|
|
|
52
48
|
/**
|
|
@@ -62,6 +58,10 @@ export class DatabaseTypeAnnotation extends BaseNode {
|
|
|
62
58
|
return super.from(source, parentNode, parentKey) as DatabaseTypeAnnotation;
|
|
63
59
|
}
|
|
64
60
|
|
|
61
|
+
//================================================================================
|
|
62
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
63
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
64
|
+
//================================================================================
|
|
65
65
|
@withSourceMap()
|
|
66
66
|
toNaturalTS(state = createCompilerState()): string {
|
|
67
67
|
return '';
|
|
@@ -74,11 +74,6 @@ export class DatabaseTypeAnnotation extends BaseNode {
|
|
|
74
74
|
});
|
|
75
75
|
return code;
|
|
76
76
|
}
|
|
77
|
-
//================================================================================
|
|
78
|
-
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
79
|
-
// 自动生成的代码已结束。下面可以手动编写。
|
|
80
|
-
//================================================================================
|
|
81
|
-
|
|
82
77
|
//================================================================================
|
|
83
78
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
84
79
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -56,17 +56,13 @@ export class Destination extends LogicItem {
|
|
|
56
56
|
/**
|
|
57
57
|
* viewNamespace
|
|
58
58
|
*/
|
|
59
|
-
@property(
|
|
60
|
-
objectRef: '',
|
|
61
|
-
})
|
|
59
|
+
@property()
|
|
62
60
|
viewNamespace: string;
|
|
63
61
|
|
|
64
62
|
/**
|
|
65
63
|
* viewName
|
|
66
64
|
*/
|
|
67
|
-
@property(
|
|
68
|
-
objectRef: '',
|
|
69
|
-
})
|
|
65
|
+
@property()
|
|
70
66
|
viewName: string;
|
|
71
67
|
|
|
72
68
|
/**
|
|
@@ -82,9 +78,7 @@ export class Destination extends LogicItem {
|
|
|
82
78
|
/**
|
|
83
79
|
* 目标窗口
|
|
84
80
|
*/
|
|
85
|
-
@property(
|
|
86
|
-
objectRef: '',
|
|
87
|
-
})
|
|
81
|
+
@property()
|
|
88
82
|
target: '_self' | '_blank' | '_parent' | '_top' = '_self';
|
|
89
83
|
|
|
90
84
|
/**
|
|
@@ -50,24 +50,19 @@ export class EntityIndex extends BaseNode {
|
|
|
50
50
|
/**
|
|
51
51
|
* 实体索引名称
|
|
52
52
|
*/
|
|
53
|
-
@property(
|
|
54
|
-
objectRef: '',
|
|
55
|
-
})
|
|
53
|
+
@property()
|
|
56
54
|
name: string = '';
|
|
57
55
|
|
|
58
56
|
/**
|
|
59
57
|
* 数据库索引名
|
|
60
58
|
*/
|
|
61
|
-
@property(
|
|
62
|
-
|
|
63
|
-
})
|
|
64
|
-
indexName: string;
|
|
59
|
+
@property()
|
|
60
|
+
indexName?: string;
|
|
65
61
|
|
|
66
62
|
/**
|
|
67
63
|
* propertyNames
|
|
68
64
|
*/
|
|
69
65
|
@property({
|
|
70
|
-
objectRef: '',
|
|
71
66
|
isArray: true,
|
|
72
67
|
defaultValue: [],
|
|
73
68
|
})
|
|
@@ -76,18 +71,14 @@ export class EntityIndex extends BaseNode {
|
|
|
76
71
|
/**
|
|
77
72
|
* 是否唯一
|
|
78
73
|
*/
|
|
79
|
-
@property(
|
|
80
|
-
objectRef: '',
|
|
81
|
-
})
|
|
74
|
+
@property()
|
|
82
75
|
unique: boolean;
|
|
83
76
|
|
|
84
77
|
/**
|
|
85
78
|
* 实体索引描述
|
|
86
79
|
*/
|
|
87
|
-
@property(
|
|
88
|
-
|
|
89
|
-
})
|
|
90
|
-
description: string;
|
|
80
|
+
@property()
|
|
81
|
+
description?: string;
|
|
91
82
|
|
|
92
83
|
/**
|
|
93
84
|
* @param source 需要合并的部分参数
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
withGenerator,
|
|
11
11
|
TranslatorGenerator,
|
|
12
12
|
createDecoratorCode,
|
|
13
|
+
createDescriptionComment,
|
|
13
14
|
} from '../translator';
|
|
14
15
|
import type CallQueryComponent from './CallQueryComponent__';
|
|
15
16
|
|
|
@@ -63,41 +64,31 @@ export class EntityProperty extends BaseNode {
|
|
|
63
64
|
/**
|
|
64
65
|
* 实体属性名称
|
|
65
66
|
*/
|
|
66
|
-
@property(
|
|
67
|
-
objectRef: '',
|
|
68
|
-
})
|
|
67
|
+
@property()
|
|
69
68
|
name: string = '';
|
|
70
69
|
|
|
71
70
|
/**
|
|
72
71
|
* 唯一标识
|
|
73
72
|
*/
|
|
74
|
-
@property(
|
|
75
|
-
objectRef: '',
|
|
76
|
-
})
|
|
73
|
+
@property()
|
|
77
74
|
uuid: string = createUUID();
|
|
78
75
|
|
|
79
76
|
/**
|
|
80
77
|
* 数据库列名
|
|
81
78
|
*/
|
|
82
|
-
@property(
|
|
83
|
-
objectRef: '',
|
|
84
|
-
})
|
|
79
|
+
@property()
|
|
85
80
|
columnName: string;
|
|
86
81
|
|
|
87
82
|
/**
|
|
88
83
|
* 实体属性标题
|
|
89
84
|
*/
|
|
90
|
-
@property(
|
|
91
|
-
objectRef: '',
|
|
92
|
-
})
|
|
85
|
+
@property()
|
|
93
86
|
label: string;
|
|
94
87
|
|
|
95
88
|
/**
|
|
96
89
|
* 实体属性描述
|
|
97
90
|
*/
|
|
98
|
-
@property(
|
|
99
|
-
objectRef: '',
|
|
100
|
-
})
|
|
91
|
+
@property()
|
|
101
92
|
description: string;
|
|
102
93
|
|
|
103
94
|
/**
|
|
@@ -114,15 +105,13 @@ export class EntityProperty extends BaseNode {
|
|
|
114
105
|
@property({
|
|
115
106
|
objectRef: 'DatabaseTypeAnnotation',
|
|
116
107
|
})
|
|
117
|
-
databaseTypeAnnotation
|
|
108
|
+
databaseTypeAnnotation?: DatabaseTypeAnnotation;
|
|
118
109
|
|
|
119
110
|
/**
|
|
120
111
|
* 是否必填
|
|
121
112
|
*/
|
|
122
|
-
@property(
|
|
123
|
-
|
|
124
|
-
})
|
|
125
|
-
required: boolean;
|
|
113
|
+
@property()
|
|
114
|
+
required?: boolean;
|
|
126
115
|
|
|
127
116
|
/**
|
|
128
117
|
* 默认值
|
|
@@ -130,57 +119,43 @@ export class EntityProperty extends BaseNode {
|
|
|
130
119
|
@property({
|
|
131
120
|
objectRef: 'DefaultValue',
|
|
132
121
|
})
|
|
133
|
-
defaultValue
|
|
122
|
+
defaultValue?: DefaultValue;
|
|
134
123
|
|
|
135
124
|
/**
|
|
136
125
|
* 当前属性是否为主键
|
|
137
126
|
*/
|
|
138
|
-
@property(
|
|
139
|
-
|
|
140
|
-
})
|
|
141
|
-
primaryKey: boolean;
|
|
127
|
+
@property()
|
|
128
|
+
primaryKey?: boolean;
|
|
142
129
|
|
|
143
130
|
/**
|
|
144
131
|
* 关联实体的命名空间
|
|
145
132
|
*/
|
|
146
|
-
@property(
|
|
147
|
-
|
|
148
|
-
})
|
|
149
|
-
relationNamespace: string;
|
|
133
|
+
@property()
|
|
134
|
+
relationNamespace?: string;
|
|
150
135
|
|
|
151
136
|
/**
|
|
152
137
|
* 关联实体
|
|
153
138
|
*/
|
|
154
|
-
@property(
|
|
155
|
-
|
|
156
|
-
})
|
|
157
|
-
relationEntity: string;
|
|
139
|
+
@property()
|
|
140
|
+
relationEntity?: string;
|
|
158
141
|
|
|
159
142
|
/**
|
|
160
143
|
* 关联属性
|
|
161
144
|
*/
|
|
162
|
-
@property(
|
|
163
|
-
|
|
164
|
-
})
|
|
165
|
-
relationProperty: string;
|
|
145
|
+
@property()
|
|
146
|
+
relationProperty?: string;
|
|
166
147
|
|
|
167
148
|
/**
|
|
168
149
|
* 关联属性实体记录删除规则
|
|
169
150
|
*/
|
|
170
|
-
@property(
|
|
171
|
-
|
|
172
|
-
})
|
|
173
|
-
deleteRule: 'protect' | 'cascade';
|
|
151
|
+
@property()
|
|
152
|
+
deleteRule?: 'protect' | 'cascade';
|
|
174
153
|
|
|
175
154
|
/**
|
|
176
155
|
* 显示方式
|
|
177
156
|
*/
|
|
178
|
-
@property(
|
|
179
|
-
|
|
180
|
-
})
|
|
181
|
-
display: {
|
|
182
|
-
[name: string]: boolean;
|
|
183
|
-
} = {
|
|
157
|
+
@property()
|
|
158
|
+
display: Record<string, boolean> = {
|
|
184
159
|
inDetail: true,
|
|
185
160
|
inFilter: true,
|
|
186
161
|
inForm: true,
|
|
@@ -191,7 +166,6 @@ export class EntityProperty extends BaseNode {
|
|
|
191
166
|
* 验证规则
|
|
192
167
|
*/
|
|
193
168
|
@property({
|
|
194
|
-
objectRef: '',
|
|
195
169
|
isArray: true,
|
|
196
170
|
defaultValue: [],
|
|
197
171
|
})
|
|
@@ -200,18 +174,14 @@ export class EntityProperty extends BaseNode {
|
|
|
200
174
|
/**
|
|
201
175
|
* 生成规则
|
|
202
176
|
*/
|
|
203
|
-
@property(
|
|
204
|
-
objectRef: '',
|
|
205
|
-
})
|
|
177
|
+
@property()
|
|
206
178
|
generationRule: 'auto' | 'autoIncrement' | 'manual' = 'auto';
|
|
207
179
|
|
|
208
180
|
/**
|
|
209
181
|
* 表示 Oracle 主键自增时的序列名称
|
|
210
182
|
*/
|
|
211
|
-
@property(
|
|
212
|
-
|
|
213
|
-
})
|
|
214
|
-
sequence: string;
|
|
183
|
+
@property()
|
|
184
|
+
sequence?: string;
|
|
215
185
|
|
|
216
186
|
/**
|
|
217
187
|
* @param source 需要合并的部分参数
|
|
@@ -508,6 +478,10 @@ export class EntityProperty extends BaseNode {
|
|
|
508
478
|
@withSourceMap()
|
|
509
479
|
toNaturalTS(state = createCompilerState()): string {
|
|
510
480
|
let code = '';
|
|
481
|
+
|
|
482
|
+
if (state.descriptionComment)
|
|
483
|
+
code += createDescriptionComment(state, this, ['label', 'description']);
|
|
484
|
+
|
|
511
485
|
if (this.relationNamespace && this.relationEntity && this.relationProperty) {
|
|
512
486
|
code += `@EntityRelation(() => new ${this.relationEntity}().${this.relationProperty})\n`;
|
|
513
487
|
code += indent(state.tabSize);
|
|
@@ -528,7 +502,17 @@ export class EntityProperty extends BaseNode {
|
|
|
528
502
|
const index = (this.parentNode as Entity)?.properties.indexOf(this);
|
|
529
503
|
if (index > 0) code += `\n${indent(state.tabSize)}`;
|
|
530
504
|
|
|
531
|
-
code += createDecoratorCode(state, this, [
|
|
505
|
+
code += createDecoratorCode(state, this, [
|
|
506
|
+
'label',
|
|
507
|
+
'description',
|
|
508
|
+
'uuid',
|
|
509
|
+
'columnName',
|
|
510
|
+
'databaseTypeAnnotation',
|
|
511
|
+
'required',
|
|
512
|
+
'primaryKey',
|
|
513
|
+
'generationRule',
|
|
514
|
+
'sequence',
|
|
515
|
+
]);
|
|
532
516
|
|
|
533
517
|
// , 'display'
|
|
534
518
|
|
package/src/concepts/Entity__.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
withGenerator,
|
|
12
12
|
TranslatorGenerator,
|
|
13
13
|
createDecoratorCode,
|
|
14
|
+
createDescriptionComment,
|
|
14
15
|
} from '../translator';
|
|
15
16
|
import { entity2LogicNamespace } from '../server/entity2LogicNamespace';
|
|
16
17
|
import type CallQueryComponent from './CallQueryComponent__';
|
|
@@ -56,41 +57,31 @@ export class Entity extends BaseNode {
|
|
|
56
57
|
/**
|
|
57
58
|
* 实体名称
|
|
58
59
|
*/
|
|
59
|
-
@property(
|
|
60
|
-
objectRef: '',
|
|
61
|
-
})
|
|
60
|
+
@property()
|
|
62
61
|
name: string = '';
|
|
63
62
|
|
|
64
63
|
/**
|
|
65
64
|
* 唯一标识
|
|
66
65
|
*/
|
|
67
|
-
@property(
|
|
68
|
-
objectRef: '',
|
|
69
|
-
})
|
|
66
|
+
@property()
|
|
70
67
|
uuid: string = createUUID();
|
|
71
68
|
|
|
72
69
|
/**
|
|
73
70
|
* 数据库表名
|
|
74
71
|
*/
|
|
75
|
-
@property(
|
|
76
|
-
objectRef: '',
|
|
77
|
-
})
|
|
72
|
+
@property()
|
|
78
73
|
tableName: string;
|
|
79
74
|
|
|
80
75
|
/**
|
|
81
76
|
* 实体描述
|
|
82
77
|
*/
|
|
83
|
-
@property(
|
|
84
|
-
objectRef: '',
|
|
85
|
-
})
|
|
78
|
+
@property()
|
|
86
79
|
description: string;
|
|
87
80
|
|
|
88
81
|
/**
|
|
89
82
|
* 实体来源
|
|
90
83
|
*/
|
|
91
|
-
@property(
|
|
92
|
-
objectRef: '',
|
|
93
|
-
})
|
|
84
|
+
@property()
|
|
94
85
|
origin: 'ide' | 'sql' | 'table' | 'excel' = 'ide';
|
|
95
86
|
|
|
96
87
|
/**
|
|
@@ -515,10 +506,10 @@ export class Entity extends BaseNode {
|
|
|
515
506
|
return this.getAncestor('DataSource') as DataSource;
|
|
516
507
|
}
|
|
517
508
|
|
|
518
|
-
|
|
509
|
+
/**
|
|
519
510
|
* 绑定的流程表单页面
|
|
520
511
|
*/
|
|
521
|
-
__bindView: Map<string,View> = null;
|
|
512
|
+
__bindView: Map<string, View> = null;
|
|
522
513
|
|
|
523
514
|
getPropertyExistingColumnNames(excludedList: Array<EntityProperty> = []) {
|
|
524
515
|
const excludedSet = new Set(excludedList);
|
|
@@ -846,7 +837,11 @@ export class Entity extends BaseNode {
|
|
|
846
837
|
|
|
847
838
|
@withSourceMap()
|
|
848
839
|
toNaturalTS(state = createCompilerState(), entityName?: string): string {
|
|
849
|
-
let code =
|
|
840
|
+
let code = '';
|
|
841
|
+
if (state.descriptionComment)
|
|
842
|
+
code += createDescriptionComment(state, this, ['description']);
|
|
843
|
+
code = `class ${this?.name} {\n`;
|
|
844
|
+
|
|
850
845
|
this.properties.forEach((property) => {
|
|
851
846
|
code += `${property.toNaturalTS(shiftState(state, code, { tabSize: state.tabSize + 1 }))};\n`;
|
|
852
847
|
});
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
TranslatorGenerator,
|
|
9
9
|
indent,
|
|
10
10
|
createDecoratorCode,
|
|
11
|
+
createDescriptionComment,
|
|
11
12
|
} from '../translator';
|
|
12
13
|
import Enum from './Enum__';
|
|
13
14
|
import Module from './Module__';
|
|
@@ -24,7 +25,7 @@ import { createUUID } from '../utils/create';
|
|
|
24
25
|
import * as types from './utils/types';
|
|
25
26
|
import * as asserts from './utils/asserts';
|
|
26
27
|
import BaseNode from '../common/BaseNode';
|
|
27
|
-
import
|
|
28
|
+
import StaticString from './StaticString__';
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* 枚举值
|
|
@@ -50,9 +51,7 @@ export class EnumItem extends BaseNode {
|
|
|
50
51
|
/**
|
|
51
52
|
* 枚举值的值
|
|
52
53
|
*/
|
|
53
|
-
@property(
|
|
54
|
-
objectRef: '',
|
|
55
|
-
})
|
|
54
|
+
@property()
|
|
56
55
|
value: string;
|
|
57
56
|
|
|
58
57
|
/**
|
|
@@ -61,7 +60,7 @@ export class EnumItem extends BaseNode {
|
|
|
61
60
|
@property({
|
|
62
61
|
objectRef: 'StaticString',
|
|
63
62
|
})
|
|
64
|
-
label
|
|
63
|
+
label: StaticString;
|
|
65
64
|
|
|
66
65
|
/**
|
|
67
66
|
* @param source 需要合并的部分参数
|
|
@@ -103,6 +102,10 @@ export class EnumItem extends BaseNode {
|
|
|
103
102
|
});
|
|
104
103
|
}
|
|
105
104
|
|
|
105
|
+
//================================================================================
|
|
106
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
107
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
108
|
+
//================================================================================
|
|
106
109
|
/**
|
|
107
110
|
* 删除静态字符串
|
|
108
111
|
* @param name 静态字符串名称
|
|
@@ -159,10 +162,6 @@ export class EnumItem extends BaseNode {
|
|
|
159
162
|
return params;
|
|
160
163
|
}
|
|
161
164
|
|
|
162
|
-
//================================================================================
|
|
163
|
-
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
164
|
-
// 自动生成的代码已结束。下面可以手动编写。
|
|
165
|
-
//================================================================================
|
|
166
165
|
/**
|
|
167
166
|
* 祖先 Enum
|
|
168
167
|
*/
|
|
@@ -195,7 +194,13 @@ export class EnumItem extends BaseNode {
|
|
|
195
194
|
|
|
196
195
|
@withSourceMap()
|
|
197
196
|
toNaturalTS(state = createCompilerState()): string {
|
|
198
|
-
|
|
197
|
+
let code = '';
|
|
198
|
+
|
|
199
|
+
if (state.descriptionComment)
|
|
200
|
+
code += createDescriptionComment(state, this, ['label']);
|
|
201
|
+
code += `'${this.value}' = '${this.label?.value}'`;
|
|
202
|
+
|
|
203
|
+
return code;
|
|
199
204
|
}
|
|
200
205
|
|
|
201
206
|
@withSourceMap()
|
package/src/concepts/Enum__.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
withGenerator,
|
|
11
11
|
TranslatorGenerator,
|
|
12
12
|
createDecoratorCode,
|
|
13
|
+
createDescriptionComment,
|
|
13
14
|
} from '../translator';
|
|
14
15
|
import type Namespace from './Namespace__';
|
|
15
16
|
import type Identifier from './Identifier__';
|
|
@@ -53,25 +54,19 @@ export class Enum extends BaseNode {
|
|
|
53
54
|
/**
|
|
54
55
|
* 枚举名称
|
|
55
56
|
*/
|
|
56
|
-
@property(
|
|
57
|
-
objectRef: '',
|
|
58
|
-
})
|
|
57
|
+
@property()
|
|
59
58
|
name: string = '';
|
|
60
59
|
|
|
61
60
|
/**
|
|
62
61
|
* 枚举标题
|
|
63
62
|
*/
|
|
64
|
-
@property(
|
|
65
|
-
objectRef: '',
|
|
66
|
-
})
|
|
63
|
+
@property()
|
|
67
64
|
label: string;
|
|
68
65
|
|
|
69
66
|
/**
|
|
70
67
|
* 枚举描述
|
|
71
68
|
*/
|
|
72
|
-
@property(
|
|
73
|
-
objectRef: '',
|
|
74
|
-
})
|
|
69
|
+
@property()
|
|
75
70
|
description: string;
|
|
76
71
|
|
|
77
72
|
/**
|
|
@@ -323,7 +318,11 @@ export class Enum extends BaseNode {
|
|
|
323
318
|
|
|
324
319
|
@withSourceMap()
|
|
325
320
|
toNaturalTS(state = createCompilerState()): string {
|
|
326
|
-
let code =
|
|
321
|
+
let code = '';
|
|
322
|
+
if (state.descriptionComment)
|
|
323
|
+
code += createDescriptionComment(state, this, ['label', 'description']);
|
|
324
|
+
|
|
325
|
+
code += `enum ${this.name} {\n`;
|
|
327
326
|
this.enumItems.forEach((item) => {
|
|
328
327
|
code += indent(state.tabSize + 1);
|
|
329
328
|
code += item.toNaturalTS(shiftState(state, code, { tabSize: 0 }));
|