@lcap/nasl 3.7.3-beta.1 → 3.8.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mocharc.js +0 -1
- package/out/automate/engine/utils.js +6 -1
- package/out/automate/engine/utils.js.map +1 -1
- package/out/bak/translator.js +37 -0
- package/out/bak/translator.js.map +1 -1
- package/out/breakpoint/shared/utils.d.ts +1 -0
- package/out/breakpoint/shared/utils.js +1 -1
- package/out/breakpoint/shared/utils.js.map +1 -1
- package/out/common/BaseNode.d.ts +11 -0
- package/out/common/BaseNode.js +101 -5
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/Annotatable__.d.ts +109 -0
- package/out/concepts/Annotatable__.js +161 -0
- package/out/concepts/Annotatable__.js.map +1 -0
- package/out/concepts/AnnotationProperty__.d.ts +48 -0
- package/out/concepts/AnnotationProperty__.js +74 -0
- package/out/concepts/AnnotationProperty__.js.map +1 -0
- package/out/concepts/Annotation__.d.ts +128 -0
- package/out/concepts/Annotation__.js +248 -0
- package/out/concepts/Annotation__.js.map +1 -0
- package/out/concepts/App__.d.ts +14 -26
- package/out/concepts/App__.js +50 -20
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/ApplyAnnotation__.d.ts +87 -0
- package/out/concepts/ApplyAnnotation__.js +140 -0
- package/out/concepts/ApplyAnnotation__.js.map +1 -0
- package/out/concepts/Argument__.d.ts +19 -0
- package/out/concepts/Argument__.js +126 -0
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/AssigneeV2__.d.ts +169 -0
- package/out/concepts/AssigneeV2__.js +176 -1
- package/out/concepts/AssigneeV2__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.js +1 -1
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/AuthLogic__.js +1 -1
- package/out/concepts/AuthLogic__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +1 -0
- package/out/concepts/BooleanLiteral__.js +9 -0
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/BusinessLogic__.js +1 -1
- package/out/concepts/BusinessLogic__.js.map +1 -1
- package/out/concepts/CallFunction__.js +1 -1
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +15 -0
- package/out/concepts/CallLogic__.js +149 -17
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/ConnectorLogic__.js +1 -1
- package/out/concepts/ConnectorLogic__.js.map +1 -1
- package/out/concepts/DatabaseTypeAnnotation__.d.ts +0 -2
- package/out/concepts/DatabaseTypeAnnotation__.js +0 -20
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
- package/out/concepts/DepartmentManagerV2__.d.ts +29 -0
- package/out/concepts/DepartmentManagerV2__.js +56 -0
- package/out/concepts/DepartmentManagerV2__.js.map +1 -0
- package/out/concepts/DepartmentV2__.d.ts +33 -0
- package/out/concepts/DepartmentV2__.js +63 -0
- package/out/concepts/DepartmentV2__.js.map +1 -0
- package/out/concepts/DirectManagerV2__.d.ts +25 -0
- package/out/concepts/DirectManagerV2__.js +53 -0
- package/out/concepts/DirectManagerV2__.js.map +1 -0
- package/out/concepts/End__.js +9 -1
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityProperty__.js +0 -2
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +2 -2
- package/out/concepts/Entity__.js +4 -7
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +1 -12
- package/out/concepts/EnumItem__.js +17 -49
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/EnumSelectSetter__.d.ts +4 -0
- package/out/concepts/EnumSelectSetter__.js +7 -0
- package/out/concepts/EnumSelectSetter__.js.map +1 -1
- package/out/concepts/Enum__.js +1 -4
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/ForEachStatement__.js +1 -1
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendLibrary__.d.ts +52 -48
- package/out/concepts/FrontendLibrary__.js +45 -36
- package/out/concepts/FrontendLibrary__.js.map +1 -1
- package/out/concepts/FrontendType__.d.ts +4 -0
- package/out/concepts/FrontendType__.js +7 -0
- package/out/concepts/FrontendType__.js.map +1 -1
- package/out/concepts/Frontend__.d.ts +2 -0
- package/out/concepts/Frontend__.js +21 -2
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/HistoryProcessV2__.js +4 -1
- package/out/concepts/HistoryProcessV2__.js.map +1 -1
- package/out/concepts/I18nInfo__.d.ts +0 -1
- package/out/concepts/I18nInfo__.js +0 -7
- package/out/concepts/I18nInfo__.js.map +1 -1
- package/out/concepts/Identifier__.d.ts +2 -0
- package/out/concepts/Identifier__.js +31 -0
- 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/Interface__.js +1 -4
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +1 -1
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +16 -1
- package/out/concepts/Logic__.js +133 -15
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/ManagerV2__.d.ts +34 -0
- package/out/concepts/ManagerV2__.js +61 -0
- package/out/concepts/ManagerV2__.js.map +1 -0
- package/out/concepts/MatchCase__.d.ts +2 -2
- package/out/concepts/MatchCase__.js +7 -7
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +1 -0
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/Module__.d.ts +88 -0
- package/out/concepts/Module__.js +85 -0
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/OperatePermissionV2__.d.ts +1 -1
- package/out/concepts/OperatePermissionV2__.js.map +1 -1
- package/out/concepts/Param__.d.ts +4 -0
- package/out/concepts/Param__.js +13 -21
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessElementV2__.d.ts +6 -1
- package/out/concepts/ProcessElementV2__.js +20 -0
- package/out/concepts/ProcessElementV2__.js.map +1 -1
- package/out/concepts/ProcessElement__.d.ts +7 -0
- package/out/concepts/ProcessElement__.js +47 -0
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessV2__.d.ts +1 -34
- package/out/concepts/ProcessV2__.js +3 -70
- package/out/concepts/ProcessV2__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.js +2 -2
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.js +2 -2
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/StaticString__.d.ts +0 -4
- package/out/concepts/StaticString__.js +0 -11
- package/out/concepts/StaticString__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +1 -0
- package/out/concepts/StructureProperty__.js +14 -5
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +4 -0
- package/out/concepts/Structure__.js +6 -9
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SubLogic__.d.ts +418 -0
- package/out/concepts/SubLogic__.js +992 -0
- package/out/concepts/SubLogic__.js.map +1 -0
- package/out/concepts/Theme__.d.ts +9 -0
- package/out/concepts/Theme__.js +10 -0
- package/out/concepts/Theme__.js.map +1 -1
- package/out/concepts/Transactional__.d.ts +0 -1
- package/out/concepts/Transactional__.js +0 -7
- package/out/concepts/Transactional__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.js +18 -0
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.d.ts +1 -0
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +6 -1
- package/out/concepts/ValidationRule__.js +6 -1
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +8 -2
- package/out/concepts/ViewElement__.js +213 -32
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +10 -2
- package/out/concepts/View__.js +129 -17
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.processV2.d.ts +2 -0
- package/out/concepts/basics/stdlib/nasl.processV2.js +50 -4
- package/out/concepts/basics/stdlib/nasl.processV2.js.map +1 -1
- package/out/concepts/basics/types/index.d.ts +1 -1
- package/out/concepts/basics/types/index.js +2 -1
- package/out/concepts/basics/types/index.js.map +1 -1
- package/out/concepts/index__.d.ts +9 -0
- package/out/concepts/index__.js +9 -0
- package/out/concepts/index__.js.map +1 -1
- package/out/concepts/utils/asserts.d.ts +409 -0
- package/out/concepts/utils/asserts.js +564 -14
- package/out/concepts/utils/asserts.js.map +1 -1
- package/out/concepts/utils/types.d.ts +33 -2
- package/out/generator/genBundleFiles.d.ts +13 -9
- package/out/generator/genBundleFiles.js +383 -63
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genMetaData.js +2 -0
- package/out/generator/genMetaData.js.map +1 -1
- package/out/generator/release-body/body.js +1 -0
- package/out/generator/release-body/body.js.map +1 -1
- package/out/generator/release-body/utils.d.ts +15 -7
- package/out/generator/release-body/utils.js +50 -7
- package/out/generator/release-body/utils.js.map +1 -1
- package/out/natural/genNaturalTS.js +2 -4
- package/out/natural/genNaturalTS.js.map +1 -1
- package/out/natural/getContext/index.js +0 -2
- package/out/natural/getContext/index.js.map +1 -1
- package/out/natural/transformTS2UI.js.map +1 -1
- package/out/natural/transformTSCode.d.ts +1 -1
- package/out/natural/transformTSCode.js.map +1 -1
- package/out/server/extendBaseNode.js +9 -0
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/getLogics.js +10 -6
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +6 -0
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getProcessesV2.d.ts +3 -2
- package/out/server/getProcessesV2.js +15 -6
- package/out/server/getProcessesV2.js.map +1 -1
- package/out/server/naslServer.d.ts +5 -1
- package/out/server/naslServer.js +120 -30
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +4 -0
- package/out/server/translator.js.map +1 -1
- package/out/service/storage/init.d.ts +2 -1
- package/out/service/storage/init.js +28 -71
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.d.ts +6 -2
- package/out/templator/genCreateBlock.js +25 -8
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.d.ts +22 -0
- package/out/templator/genCurdEditMultipleKeyBlock.js +60 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.d.ts +13 -3
- package/out/templator/genCurdMultipleKeyBlock.js +29 -23
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genGetBlock.d.ts +1 -1
- package/out/templator/genGetBlock.js +3 -2
- package/out/templator/genGetBlock.js.map +1 -1
- package/out/templator/genListViewBlock.d.ts +1 -1
- package/out/templator/genListViewBlock.js +3 -2
- package/out/templator/genListViewBlock.js.map +1 -1
- package/out/templator/genSelectBlock.d.ts +1 -1
- package/out/templator/genSelectBlock.js +3 -2
- package/out/templator/genSelectBlock.js.map +1 -1
- package/out/templator/genTableBlock.d.ts +9 -4
- package/out/templator/genTableBlock.js +31 -17
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.d.ts +2 -2
- package/out/templator/genUpdateBlock.js +11 -11
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/translator/types.d.ts +0 -4
- package/out/translator/utils.d.ts +0 -1
- package/out/translator/utils.js +1 -6
- package/out/translator/utils.js.map +1 -1
- package/out/utils/delay/index.d.ts +0 -0
- package/out/utils/delay/index.js +1 -0
- package/out/utils/delay/index.js.map +1 -0
- package/out/utils/env.d.ts +0 -4
- package/out/utils/env.js +3 -6
- package/out/utils/env.js.map +1 -1
- package/out/utils/index.d.ts +3 -2
- package/out/utils/index.js +18 -14
- package/out/utils/index.js.map +1 -1
- package/out/utils/time-slicing/controller.js.map +1 -1
- package/out/utils/types.d.ts +0 -17
- package/package.json +27 -20
- package/sandbox/stdlib/extension.component.ts +29 -0
- package/sandbox/stdlib/nasl.process.ts +17 -0
- package/sandbox/stdlib/nasl.processV2.ts +10 -5
- package/sandbox/stdlib/nasl.util.ts +3 -1
- package/src/automate/engine/utils.js +7 -2
- package/src/bak/translator.js +42 -1
- package/src/breakpoint/shared/utils.ts +2 -1
- package/src/common/BaseNode.ts +117 -5
- package/src/concepts/Annotatable__.ts +263 -0
- package/src/concepts/AnnotationProperty__.ts +102 -0
- package/src/concepts/Annotation__.ts +344 -0
- package/src/concepts/App__.ts +917 -26
- package/src/concepts/ApplyAnnotation__.ts +198 -0
- package/src/concepts/Argument__.ts +145 -1
- package/src/concepts/AssigneeV2__.ts +387 -1
- package/src/concepts/AuthLogicForCallInterface__.ts +1 -1
- package/src/concepts/AuthLogic__.ts +1 -1
- package/src/concepts/BooleanLiteral__.ts +9 -1
- package/src/concepts/BusinessLogic__.ts +1 -1
- package/src/concepts/CallFunction__.ts +1 -1
- package/src/concepts/CallLogic__.ts +153 -16
- package/src/concepts/ConnectorLogic__.ts +1 -1
- package/src/concepts/DatabaseTypeAnnotation__.ts +0 -11
- package/src/concepts/DepartmentManagerV2__.ts +70 -0
- package/src/concepts/DepartmentV2__.ts +75 -0
- package/src/concepts/DirectManagerV2__.ts +65 -0
- package/src/concepts/End__.ts +10 -1
- package/src/concepts/EntityProperty__.ts +0 -5
- package/src/concepts/Entity__.ts +5 -9
- package/src/concepts/EnumItem__.ts +16 -65
- package/src/concepts/EnumSelectSetter__.ts +6 -0
- package/src/concepts/Enum__.ts +1 -6
- package/src/concepts/ForEachStatement__.ts +1 -1
- package/src/concepts/FrontendLibrary__.ts +88 -80
- package/src/concepts/FrontendType__.ts +6 -0
- package/src/concepts/Frontend__.ts +26 -3
- package/src/concepts/HistoryProcessV2__.ts +5 -0
- package/src/concepts/I18nInfo__.ts +0 -5
- package/src/concepts/Identifier__.ts +32 -0
- package/src/concepts/IfStatement__.ts +2 -2
- package/src/concepts/Interface__.ts +1 -6
- package/src/concepts/LogicItem__.ts +1 -0
- package/src/concepts/Logic__.ts +140 -17
- package/src/concepts/ManagerV2__.ts +78 -0
- package/src/concepts/MatchCase__.ts +9 -8
- package/src/concepts/MemberExpression__.ts +1 -0
- package/src/concepts/Module__.ts +194 -0
- package/src/concepts/OperatePermissionV2__.ts +1 -1
- package/src/concepts/Param__.ts +17 -20
- package/src/concepts/ProcessElementV2__.ts +23 -0
- package/src/concepts/ProcessElement__.ts +18 -0
- package/src/concepts/ProcessV2__.ts +4 -70
- package/src/concepts/QueryFromExpression__.ts +2 -2
- package/src/concepts/QueryJoinExpression__.ts +2 -2
- package/src/concepts/StaticString__.ts +0 -13
- package/src/concepts/StructureProperty__.ts +16 -7
- package/src/concepts/Structure__.ts +10 -11
- package/src/concepts/SubLogic__.ts +1516 -0
- package/src/concepts/Theme__.ts +9 -0
- package/src/concepts/Transactional__.ts +0 -5
- package/src/concepts/TriggerLauncher__.ts +1 -1
- package/src/concepts/TypeAnnotation__.ts +17 -0
- package/src/concepts/TypeParam__.ts +3 -0
- package/src/concepts/ValidationRule__.ts +6 -1
- package/src/concepts/ViewElement__.ts +224 -34
- package/src/concepts/View__.ts +135 -22
- package/src/concepts/basics/stdlib/nasl.processV2.ts +56 -3
- package/src/concepts/basics/types/index.ts +1 -1
- package/src/concepts/index__.ts +9 -0
- package/src/concepts/utils/asserts.ts +595 -0
- package/src/concepts/utils/types.ts +53 -0
- package/src/generator/genBundleFiles.ts +408 -68
- package/src/generator/genMetaData.ts +3 -0
- package/src/generator/release-body/body.ts +1 -0
- package/src/generator/release-body/utils.ts +159 -55
- package/src/natural/genNaturalTS.ts +3 -5
- package/src/natural/getContext/index.ts +0 -2
- package/src/natural/transformTS2UI.ts +5 -2
- package/src/natural/transformTSCode.ts +2 -2
- package/src/server/extendBaseNode.ts +11 -2
- package/src/server/getLogics.ts +9 -7
- package/src/server/getMemberIdentifier.ts +7 -0
- package/src/server/getProcessesV2.ts +16 -6
- package/src/server/naslServer.ts +133 -30
- package/src/server/translator.ts +4 -0
- package/src/service/storage/init.ts +52 -97
- package/src/templator/genCreateBlock.ts +35 -14
- package/src/templator/genCurdEditMultipleKeyBlock.ts +65 -1
- package/src/templator/genCurdMultipleKeyBlock.ts +42 -23
- package/src/templator/genGetBlock.ts +4 -3
- package/src/templator/genListViewBlock.ts +3 -3
- package/src/templator/genSelectBlock.ts +4 -2
- package/src/templator/genTableBlock.ts +32 -17
- package/src/templator/genUpdateBlock.ts +21 -18
- package/src/translator/types.ts +0 -4
- package/src/translator/utils.ts +0 -6
- package/src/utils/delay/index.ts +0 -0
- package/src/utils/env.ts +4 -5
- package/src/utils/index.ts +16 -4
- package/src/utils/time-slicing/controller.ts +1 -0
- package/src/utils/types.ts +0 -20
- package/test/concepts/validation-rule/__snapshots__/toEmbeddedTS.spec.ts.snap +2 -1
- package/ts-worker/bundle.js +1 -1
- package/ts-worker/src/index.js +1 -0
- package/out/utils/language-cache/constant.d.ts +0 -18
- package/out/utils/language-cache/constant.js +0 -35
- package/out/utils/language-cache/constant.js.map +0 -1
- package/out/utils/language-cache/index.d.ts +0 -2
- package/out/utils/language-cache/index.js +0 -19
- package/out/utils/language-cache/index.js.map +0 -1
- package/out/utils/language-cache/nasl.d.ts +0 -10
- package/out/utils/language-cache/nasl.js +0 -98
- package/out/utils/language-cache/nasl.js.map +0 -1
- package/out/utils/language-cache/types.d.ts +0 -44
- package/out/utils/language-cache/types.js +0 -4
- package/out/utils/language-cache/types.js.map +0 -1
- package/src/utils/language-cache/constant.ts +0 -37
- package/src/utils/language-cache/index.ts +0 -2
- package/src/utils/language-cache/nasl.ts +0 -83
- package/src/utils/language-cache/types.ts +0 -48
|
@@ -31,7 +31,7 @@ export declare abstract class LogicItem extends BaseNode {
|
|
|
31
31
|
/**
|
|
32
32
|
* 产品概念
|
|
33
33
|
*/
|
|
34
|
-
readonly concept: 'AnonymousFunction' | 'Abort' | 'Start' | 'End' | 'IfStatement' | 'SwitchStatement' | 'SwitchCase' | 'ForEachStatement' | 'WhileStatement' | 'Assignment' | 'BatchAssignment' | 'Comment' | 'CallLogic' | 'CallConnector' | 'CallEvent' | 'CallFunction' | 'CallInterface' | 'CallAuthInterface' | 'Destination' | 'ExternalDestination' | 'ValidationRule' | 'Argument' | 'Anchor' | 'JSBlock' | 'JavaLogic' | 'Block' | 'Identifier' | 'NullLiteral' | 'BooleanLiteral' | 'StringLiteral' | 'StringInterpolation' | 'NumericLiteral' | 'BinaryExpression' | 'MatchCase' | 'Match' | 'UnaryExpression' | 'MemberExpression' | 'Unparsed' | 'New' | 'NewComposite' | 'NewList' | 'NewMap' | 'Paginate' | 'CallQueryComponent' | 'QuerySelectExpression' | 'QueryFromExpression' | 'QueryJoinExpression' | 'QueryFieldExpression' | 'QueryAggregateExpression' | 'QueryOrderByExpression' | 'QueryGroupByExpression' | 'QueryLimitExpression' | 'SqlQueryComponent' | 'OqlQueryComponent' | 'ProcessOutcome' | 'Assignee' | 'ProcessOutcomes';
|
|
34
|
+
readonly concept: 'SubLogic' | 'AnonymousFunction' | 'Abort' | 'Start' | 'End' | 'IfStatement' | 'SwitchStatement' | 'SwitchCase' | 'ForEachStatement' | 'WhileStatement' | 'Assignment' | 'BatchAssignment' | 'Comment' | 'CallLogic' | 'CallConnector' | 'CallEvent' | 'CallFunction' | 'CallInterface' | 'CallAuthInterface' | 'Destination' | 'ExternalDestination' | 'ValidationRule' | 'Argument' | 'Anchor' | 'JSBlock' | 'JavaLogic' | 'Block' | 'Identifier' | 'NullLiteral' | 'BooleanLiteral' | 'StringLiteral' | 'StringInterpolation' | 'NumericLiteral' | 'BinaryExpression' | 'MatchCase' | 'Match' | 'UnaryExpression' | 'MemberExpression' | 'Unparsed' | 'New' | 'NewComposite' | 'NewList' | 'NewMap' | 'Paginate' | 'CallQueryComponent' | 'QuerySelectExpression' | 'QueryFromExpression' | 'QueryJoinExpression' | 'QueryFieldExpression' | 'QueryAggregateExpression' | 'QueryOrderByExpression' | 'QueryGroupByExpression' | 'QueryLimitExpression' | 'SqlQueryComponent' | 'OqlQueryComponent' | 'ProcessOutcome' | 'Assignee' | 'ProcessOutcomes';
|
|
35
35
|
/**
|
|
36
36
|
* 逻辑项标题
|
|
37
37
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogicItem__.js","sourceRoot":"","sources":["../../src/concepts/LogicItem__.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,wDAAoE;AACpE,8CAMuB;AAuBvB,8CAAyF;AAMzF,kEAA0C;AAE1C;;GAEG;AAEH,IAAsB,SAAS,iBAA/B,MAAsB,SAAU,SAAQ,kBAAQ;
|
|
1
|
+
{"version":3,"file":"LogicItem__.js","sourceRoot":"","sources":["../../src/concepts/LogicItem__.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,wDAAoE;AACpE,8CAMuB;AAuBvB,8CAAyF;AAMzF,kEAA0C;AAE1C;;GAEG;AAEH,IAAsB,SAAS,iBAA/B,MAAsB,SAAU,SAAQ,kBAAQ;IAyG9C;;OAEG;IACH,YAAY,MAA2B;QACrC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,WAAS,CAAC,iBAAiB,EAAE,EAAE,MAAM,CAAC,CAAC;QAClE,KAAK,CAAC,MAAM,CAAC,CAAC;QAvBhB;;WAEG;QAEH,WAAM,GAAa,KAAK,CAAC;QAoBvB,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAAW,EAAE,UAAgB,EAAE,SAAkB;QAC3D,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAc,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,KAAa;QACpB,MAAM,MAAM,GAAG;YACb,K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A6MjB;IADC,0BAAa;6CAIb;AAvTmB,SAAS;IAD9B,IAAA,oBAAO,EAAC,KAAK,CAAC;GACO,SAAS,CAyX9B;AAzXqB,8BAAS;AA2X/B,kBAAe,SAAS,CAAC;AACzB,kFAAkF;AAClF,gEAAgE;AAChE,uBAAuB;AACvB,kFAAkF"}
|
|
@@ -15,6 +15,7 @@ import type Process from './Process__';
|
|
|
15
15
|
import type CallFunction from './CallFunction__';
|
|
16
16
|
import ProcessElementV2 from './ProcessElementV2__';
|
|
17
17
|
import ProcessV2 from './ProcessV2__';
|
|
18
|
+
import type SubLogic from './SubLogic__';
|
|
18
19
|
import { EventPayload } from '../common/EventEmitter';
|
|
19
20
|
import * as types from './utils/types';
|
|
20
21
|
import BaseNode from '../common/BaseNode';
|
|
@@ -24,10 +25,11 @@ import Param from './Param__';
|
|
|
24
25
|
import Return from './Return__';
|
|
25
26
|
import Variable from './Variable__';
|
|
26
27
|
import LogicItem from './LogicItem__';
|
|
28
|
+
import Annotatable from './Annotatable__';
|
|
27
29
|
/**
|
|
28
30
|
* 逻辑
|
|
29
31
|
*/
|
|
30
|
-
export declare class Logic extends
|
|
32
|
+
export declare class Logic extends Annotatable {
|
|
31
33
|
/** 类名 */
|
|
32
34
|
static readonly ConceptName: string;
|
|
33
35
|
/**
|
|
@@ -637,5 +639,18 @@ export declare class Logic extends BaseNode {
|
|
|
637
639
|
static checkLogicReturnTypeHasError(logic: Logic): boolean;
|
|
638
640
|
get integration(): types.SyntaxNode;
|
|
639
641
|
get likeComponent(): View | BusinessComponent;
|
|
642
|
+
subLogics: Array<SubLogic>;
|
|
643
|
+
getSubLogics(): void;
|
|
644
|
+
existingSubLogic: Set<string>;
|
|
645
|
+
collectExistSubLogic(): SubLogic[];
|
|
646
|
+
getSubLogicExistingNames(excludedList?: Array<SubLogic>): string[];
|
|
647
|
+
getSubLogicUniqueName(name?: string): string;
|
|
648
|
+
genActionListener($event: EventPayload): void;
|
|
649
|
+
/**
|
|
650
|
+
* 完成的泛型参数
|
|
651
|
+
* 先指支持依赖库的泛型参数
|
|
652
|
+
* 所以别的都输出 空数组,让别的走旧逻辑
|
|
653
|
+
*/
|
|
654
|
+
get completeTypeParams(): TypeParam[];
|
|
640
655
|
}
|
|
641
656
|
export default Logic;
|
package/out/concepts/Logic__.js
CHANGED
|
@@ -41,11 +41,11 @@ const constants_1 = require("./basics/constants");
|
|
|
41
41
|
const decorators_1 = require("../decorators");
|
|
42
42
|
const utils = __importStar(require("../utils"));
|
|
43
43
|
const asserts = __importStar(require("./utils/asserts"));
|
|
44
|
-
const
|
|
44
|
+
const Annotatable__1 = __importDefault(require("./Annotatable__"));
|
|
45
45
|
/**
|
|
46
46
|
* 逻辑
|
|
47
47
|
*/
|
|
48
|
-
let Logic = Logic_1 = class Logic extends
|
|
48
|
+
let Logic = Logic_1 = class Logic extends Annotatable__1.default {
|
|
49
49
|
/**
|
|
50
50
|
* @param source 需要合并的部分参数
|
|
51
51
|
*/
|
|
@@ -82,6 +82,8 @@ let Logic = Logic_1 = class Logic extends BaseNode_1.default {
|
|
|
82
82
|
this.isSmpty = false;
|
|
83
83
|
// 虚拟输入参数列表
|
|
84
84
|
this.virtualParams = [];
|
|
85
|
+
this.subLogics = [];
|
|
86
|
+
this.existingSubLogic = new Set();
|
|
85
87
|
super.subConstructor(source);
|
|
86
88
|
}
|
|
87
89
|
static from(source, parentNode, parentKey) {
|
|
@@ -839,6 +841,9 @@ let Logic = Logic_1 = class Logic extends BaseNode_1.default {
|
|
|
839
841
|
}
|
|
840
842
|
*toEmbeddedTSInProcess(state = (0, translator_1.createCompilerState)(), prependCode, noName, prefix) {
|
|
841
843
|
const self = this;
|
|
844
|
+
// 获取所有子节点用于树上填充
|
|
845
|
+
self.getSubLogics();
|
|
846
|
+
yield (0, common_1.waitOqlQueryComponentChildrenFinish)(self);
|
|
842
847
|
let code = '';
|
|
843
848
|
if (!prefix)
|
|
844
849
|
code += `${noName ? '' : `${self.name}:`} function(`;
|
|
@@ -1106,6 +1111,8 @@ let Logic = Logic_1 = class Logic extends BaseNode_1.default {
|
|
|
1106
1111
|
}
|
|
1107
1112
|
*toEmbeddedTS(state = (0, translator_1.createCompilerState)(), prefix, hideDefaultValue) {
|
|
1108
1113
|
const self = this;
|
|
1114
|
+
// 获取所有子节点用于树上填充
|
|
1115
|
+
self.getSubLogics();
|
|
1109
1116
|
// 等待 oql 查询返回内容
|
|
1110
1117
|
yield (0, common_1.waitOqlQueryComponentChildrenFinish)(self);
|
|
1111
1118
|
// 如果传了不要前缀那就为空, 要不用传进来的,要是都没有就默认导出
|
|
@@ -1121,11 +1128,13 @@ let Logic = Logic_1 = class Logic extends BaseNode_1.default {
|
|
|
1121
1128
|
else if (prefix === 'inObject') {
|
|
1122
1129
|
code += `${self.tsName}`;
|
|
1123
1130
|
}
|
|
1124
|
-
|
|
1131
|
+
const completeTypeParams = this.completeTypeParams;
|
|
1132
|
+
const noChooseParamTypes = completeTypeParams.filter((typeParam) => !typeParam.needChoose);
|
|
1133
|
+
if (noChooseParamTypes?.length) {
|
|
1125
1134
|
code += '<';
|
|
1126
|
-
yield* (0, time_slicing_1.wrapForEachToGenerator)(
|
|
1135
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(noChooseParamTypes, function* warpForEachGenerator(typeParam, typeParamIndex) {
|
|
1127
1136
|
code += yield* typeParam.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
|
|
1128
|
-
if (typeParamIndex !==
|
|
1137
|
+
if (typeParamIndex !== noChooseParamTypes.length - 1)
|
|
1129
1138
|
code += ', ';
|
|
1130
1139
|
});
|
|
1131
1140
|
code += '>';
|
|
@@ -1194,8 +1203,48 @@ let Logic = Logic_1 = class Logic extends BaseNode_1.default {
|
|
|
1194
1203
|
}
|
|
1195
1204
|
}
|
|
1196
1205
|
});
|
|
1206
|
+
const needChooseParamTypes = completeTypeParams.filter((typeParam) => typeParam.needChoose);
|
|
1197
1207
|
// 兼容 return 没有类型情况
|
|
1198
|
-
|
|
1208
|
+
/**
|
|
1209
|
+
*为了翻译成一部分推导一部分手选,翻译和调用同时需要特殊翻译
|
|
1210
|
+
declare function singleTypeParam3<T, S, V>(param: T, param2: S): Map<V, Array<T>>
|
|
1211
|
+
declare function singleTypeParam4<T, S>(param: T, param2: S): <V>() => Map<V, Array<T>>
|
|
1212
|
+
|
|
1213
|
+
发现还有问题,所以,翻译在调整一下
|
|
1214
|
+
把所有的泛型拼接在函数后面方便去取回来特殊处理, 因为tsserver没有返回泛型,所以需要手动处理
|
|
1215
|
+
等后面沟通一下
|
|
1216
|
+
declare function singleTypeParam4<T, S>(param: T, param2: S): <V>() => [Map<V, Array<T>>, T, S]
|
|
1217
|
+
*/
|
|
1218
|
+
if (completeTypeParams.length) {
|
|
1219
|
+
code += ': ';
|
|
1220
|
+
if (needChooseParamTypes?.length) {
|
|
1221
|
+
code += '<';
|
|
1222
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(needChooseParamTypes, function* warpForEachGenerator(typeParam, typeParamIndex) {
|
|
1223
|
+
code += yield* typeParam.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
|
|
1224
|
+
if (typeParamIndex !== needChooseParamTypes.length - 1)
|
|
1225
|
+
code += ', ';
|
|
1226
|
+
});
|
|
1227
|
+
code += '>';
|
|
1228
|
+
}
|
|
1229
|
+
code += '() => [';
|
|
1230
|
+
if (self.returns.length && self.returns[0].typeAnnotation) {
|
|
1231
|
+
code += yield* self.returns[0].typeAnnotation?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) ??
|
|
1232
|
+
(0, time_slicing_1.returnOrigin)('');
|
|
1233
|
+
}
|
|
1234
|
+
else {
|
|
1235
|
+
code += 'void';
|
|
1236
|
+
}
|
|
1237
|
+
if (noChooseParamTypes?.length) {
|
|
1238
|
+
code += ',';
|
|
1239
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(noChooseParamTypes, function* warpForEachGenerator(typeParam, typeParamIndex) {
|
|
1240
|
+
code += yield* typeParam.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
|
|
1241
|
+
if (typeParamIndex !== noChooseParamTypes.length - 1)
|
|
1242
|
+
code += ', ';
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
code += ']';
|
|
1246
|
+
}
|
|
1247
|
+
else if (self.returns.length && self.returns[0].typeAnnotation) {
|
|
1199
1248
|
code += ': ';
|
|
1200
1249
|
code += yield* self.returns[0].typeAnnotation?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) ??
|
|
1201
1250
|
(0, time_slicing_1.returnOrigin)('');
|
|
@@ -1430,8 +1479,6 @@ let Logic = Logic_1 = class Logic extends BaseNode_1.default {
|
|
|
1430
1479
|
}
|
|
1431
1480
|
toNaturalTS(state = (0, translator_1.createCompilerState)()) {
|
|
1432
1481
|
let code = '';
|
|
1433
|
-
if (state.descriptionComment)
|
|
1434
|
-
code += (0, translator_1.createDescriptionComment)(state, this, ['description']);
|
|
1435
1482
|
let logicName = this.name;
|
|
1436
1483
|
if (state.autoPrefixName) {
|
|
1437
1484
|
if (this.parentNode?.concept === 'View') {
|
|
@@ -1702,7 +1749,7 @@ let Logic = Logic_1 = class Logic extends BaseNode_1.default {
|
|
|
1702
1749
|
}
|
|
1703
1750
|
getNamespace() {
|
|
1704
1751
|
if (this.parentNode) {
|
|
1705
|
-
const parentNamespace = this.parentNode?.getNamespace();
|
|
1752
|
+
const parentNamespace = this.parentNode?.getNamespace?.();
|
|
1706
1753
|
// 针对Connector, 其对应的引入入口只有连接器。且唯一标识由
|
|
1707
1754
|
// calleeName、calleeNamespace 两个字段组合确认,
|
|
1708
1755
|
// 故这里只返回 Connector 对应的nameSpace 且 俩字段组合默认会含带logic 字段
|
|
@@ -1868,11 +1915,6 @@ let Logic = Logic_1 = class Logic extends BaseNode_1.default {
|
|
|
1868
1915
|
actionMsg,
|
|
1869
1916
|
});
|
|
1870
1917
|
super.delete();
|
|
1871
|
-
this.body.forEach((el) => {
|
|
1872
|
-
if (asserts.isCallInterface(el)) {
|
|
1873
|
-
el.deleteCallNode();
|
|
1874
|
-
}
|
|
1875
|
-
});
|
|
1876
1918
|
this.traverseChildren(async (el) => {
|
|
1877
1919
|
if (el?.concept === 'CallQueryComponent')
|
|
1878
1920
|
el.removeStructure();
|
|
@@ -1978,6 +2020,82 @@ let Logic = Logic_1 = class Logic extends BaseNode_1.default {
|
|
|
1978
2020
|
get likeComponent() {
|
|
1979
2021
|
return this.view || this?.getAncestor('BusinessComponent');
|
|
1980
2022
|
}
|
|
2023
|
+
getSubLogics() {
|
|
2024
|
+
const subLogics = this.findNaslNodeByBFS((node) => {
|
|
2025
|
+
if (asserts.isSubLogic(node)) {
|
|
2026
|
+
return true;
|
|
2027
|
+
}
|
|
2028
|
+
});
|
|
2029
|
+
this.subLogics = subLogics;
|
|
2030
|
+
}
|
|
2031
|
+
collectExistSubLogic() {
|
|
2032
|
+
const existSubLogics = [];
|
|
2033
|
+
this.findNaslNodeByBFS((node) => {
|
|
2034
|
+
if (asserts.isSubLogic(node)) {
|
|
2035
|
+
existSubLogics.push(node);
|
|
2036
|
+
}
|
|
2037
|
+
return false;
|
|
2038
|
+
});
|
|
2039
|
+
return existSubLogics;
|
|
2040
|
+
}
|
|
2041
|
+
// 获取当前逻辑中已经存在的子逻辑名称
|
|
2042
|
+
getSubLogicExistingNames(excludedList = []) {
|
|
2043
|
+
if (!this.existingSubLogic.size) {
|
|
2044
|
+
const subLogics = this.collectExistSubLogic();
|
|
2045
|
+
subLogics.forEach((subLogic) => {
|
|
2046
|
+
if (!excludedList.includes(subLogic)) {
|
|
2047
|
+
this.existingSubLogic.add(subLogic.name);
|
|
2048
|
+
}
|
|
2049
|
+
});
|
|
2050
|
+
}
|
|
2051
|
+
return Array.from(this.existingSubLogic);
|
|
2052
|
+
}
|
|
2053
|
+
getSubLogicUniqueName(name = 'subLogic1') {
|
|
2054
|
+
const existingNames = this.getSubLogicExistingNames();
|
|
2055
|
+
const uniqueName = utils.unique(name, existingNames, undefined, false);
|
|
2056
|
+
this.existingSubLogic.add(uniqueName);
|
|
2057
|
+
return uniqueName;
|
|
2058
|
+
}
|
|
2059
|
+
genActionListener($event) {
|
|
2060
|
+
super.genActionListener($event);
|
|
2061
|
+
(0, common_1.invokeCommand)('logic.update', this);
|
|
2062
|
+
}
|
|
2063
|
+
/**
|
|
2064
|
+
* 完成的泛型参数
|
|
2065
|
+
* 先指支持依赖库的泛型参数
|
|
2066
|
+
* 所以别的都输出 空数组,让别的走旧逻辑
|
|
2067
|
+
*/
|
|
2068
|
+
get completeTypeParams() {
|
|
2069
|
+
/**
|
|
2070
|
+
* 遍历泛型和入参类型
|
|
2071
|
+
* 如果泛型在入参中使用,则不需要选择
|
|
2072
|
+
* 所以需要递归看下子集到底是否真的用到了泛型,如果用了,就不需要选择,反之就需要选择
|
|
2073
|
+
*/
|
|
2074
|
+
const typeParams = this.typeParams ?? [];
|
|
2075
|
+
if (this.module && typeParams.length) {
|
|
2076
|
+
let needNoChooses = new Set();
|
|
2077
|
+
this.params?.forEach((param) => {
|
|
2078
|
+
param?.typeAnnotation?.traverseStrictChildren((item) => {
|
|
2079
|
+
if (item.concept === 'TypeAnnotation' && item.typeKind === 'typeParam') {
|
|
2080
|
+
const findItem = typeParams.find((typeParam) => typeParam.name === item.typeName);
|
|
2081
|
+
if (findItem) {
|
|
2082
|
+
needNoChooses.add(findItem);
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
});
|
|
2086
|
+
});
|
|
2087
|
+
typeParams.forEach((typeParam) => {
|
|
2088
|
+
if (needNoChooses.has(typeParam)) {
|
|
2089
|
+
typeParam.needChoose = false;
|
|
2090
|
+
}
|
|
2091
|
+
else {
|
|
2092
|
+
typeParam.needChoose = true;
|
|
2093
|
+
}
|
|
2094
|
+
});
|
|
2095
|
+
return typeParams;
|
|
2096
|
+
}
|
|
2097
|
+
return [];
|
|
2098
|
+
}
|
|
1981
2099
|
};
|
|
1982
2100
|
/** 类名 */
|
|
1983
2101
|
Logic.ConceptName = 'Logic';
|
|
@@ -1987,7 +2105,7 @@ Logic.ConceptName = 'Logic';
|
|
|
1987
2105
|
*/
|
|
1988
2106
|
Logic.isAbstract = false;
|
|
1989
2107
|
/** 继承链 */
|
|
1990
|
-
Logic.inheritanceChain = ['BaseNode'];
|
|
2108
|
+
Logic.inheritanceChain = ['Annotatable', 'BaseNode'];
|
|
1991
2109
|
__decorate([
|
|
1992
2110
|
(0, decorators_1.property)('concept')
|
|
1993
2111
|
], Logic.prototype, "concept", void 0);
|