@lcap/nasl 3.4.0-alpha.2 → 3.4.0-beta.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.
Files changed (296) hide show
  1. package/out/common/BaseNode.d.ts +14 -11
  2. package/out/common/BaseNode.js +72 -52
  3. package/out/common/BaseNode.js.map +1 -1
  4. package/out/concepts/Anchor__.js +3 -1
  5. package/out/concepts/Anchor__.js.map +1 -1
  6. package/out/concepts/AnonymousFunction__.js +10 -3
  7. package/out/concepts/AnonymousFunction__.js.map +1 -1
  8. package/out/concepts/App__.js +69 -18
  9. package/out/concepts/App__.js.map +1 -1
  10. package/out/concepts/Argument__.js +3 -1
  11. package/out/concepts/Argument__.js.map +1 -1
  12. package/out/concepts/Assignee__.js +18 -5
  13. package/out/concepts/Assignee__.js.map +1 -1
  14. package/out/concepts/AssignmentLine__.js +6 -2
  15. package/out/concepts/AssignmentLine__.js.map +1 -1
  16. package/out/concepts/Assignment__.js +6 -2
  17. package/out/concepts/Assignment__.js.map +1 -1
  18. package/out/concepts/Attribute__.js +3 -1
  19. package/out/concepts/Attribute__.js.map +1 -1
  20. package/out/concepts/AuthLogicForCallInterface__.js +4 -1
  21. package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
  22. package/out/concepts/AuthLogic__.js.map +1 -1
  23. package/out/concepts/BackendVariable__.js +3 -1
  24. package/out/concepts/BackendVariable__.js.map +1 -1
  25. package/out/concepts/Backend__.js +4 -1
  26. package/out/concepts/Backend__.js.map +1 -1
  27. package/out/concepts/BatchAssignment__.js +11 -3
  28. package/out/concepts/BatchAssignment__.js.map +1 -1
  29. package/out/concepts/BinaryExpression__.js +6 -2
  30. package/out/concepts/BinaryExpression__.js.map +1 -1
  31. package/out/concepts/BindAttribute__.js +20 -6
  32. package/out/concepts/BindAttribute__.js.map +1 -1
  33. package/out/concepts/BindDirective__.js +7 -2
  34. package/out/concepts/BindDirective__.js.map +1 -1
  35. package/out/concepts/BindEvent__.js +8 -2
  36. package/out/concepts/BindEvent__.js.map +1 -1
  37. package/out/concepts/BindStyle__.js +7 -2
  38. package/out/concepts/BindStyle__.js.map +1 -1
  39. package/out/concepts/CallAuthInterface__.js +4 -1
  40. package/out/concepts/CallAuthInterface__.js.map +1 -1
  41. package/out/concepts/CallFunction__.js +8 -2
  42. package/out/concepts/CallFunction__.js.map +1 -1
  43. package/out/concepts/CallInterface__.d.ts +2 -1
  44. package/out/concepts/CallInterface__.js +51 -13
  45. package/out/concepts/CallInterface__.js.map +1 -1
  46. package/out/concepts/CallLogic__.js +11 -3
  47. package/out/concepts/CallLogic__.js.map +1 -1
  48. package/out/concepts/CallQueryComponent__.js +34 -10
  49. package/out/concepts/CallQueryComponent__.js.map +1 -1
  50. package/out/concepts/CompletionProperty__.js +3 -1
  51. package/out/concepts/CompletionProperty__.js.map +1 -1
  52. package/out/concepts/ConfigGroup__.js +4 -1
  53. package/out/concepts/ConfigGroup__.js.map +1 -1
  54. package/out/concepts/ConfigProperty__.js +4 -1
  55. package/out/concepts/ConfigProperty__.js.map +1 -1
  56. package/out/concepts/Configuration__.js +4 -1
  57. package/out/concepts/Configuration__.js.map +1 -1
  58. package/out/concepts/Connection__.js +4 -1
  59. package/out/concepts/Connection__.js.map +1 -1
  60. package/out/concepts/Connector__.js +26 -7
  61. package/out/concepts/Connector__.js.map +1 -1
  62. package/out/concepts/Constant__.js +3 -1
  63. package/out/concepts/Constant__.js.map +1 -1
  64. package/out/concepts/DataSource__.js +4 -1
  65. package/out/concepts/DataSource__.js.map +1 -1
  66. package/out/concepts/Destination__.js +7 -2
  67. package/out/concepts/Destination__.js.map +1 -1
  68. package/out/concepts/EntityIndex__.js +3 -1
  69. package/out/concepts/EntityIndex__.js.map +1 -1
  70. package/out/concepts/EntityProperty__.js +9 -3
  71. package/out/concepts/EntityProperty__.js.map +1 -1
  72. package/out/concepts/Entity__.js +8 -2
  73. package/out/concepts/Entity__.js.map +1 -1
  74. package/out/concepts/Enum__.js +4 -1
  75. package/out/concepts/Enum__.js.map +1 -1
  76. package/out/concepts/Event__.js +4 -1
  77. package/out/concepts/Event__.js.map +1 -1
  78. package/out/concepts/ExternalDestination__.js +6 -2
  79. package/out/concepts/ExternalDestination__.js.map +1 -1
  80. package/out/concepts/ForEachStatement__.js +19 -6
  81. package/out/concepts/ForEachStatement__.js.map +1 -1
  82. package/out/concepts/FrontendLibrary__.js +8 -2
  83. package/out/concepts/FrontendLibrary__.js.map +1 -1
  84. package/out/concepts/Frontend__.js +19 -5
  85. package/out/concepts/Frontend__.js.map +1 -1
  86. package/out/concepts/Function__.js +19 -5
  87. package/out/concepts/Function__.js.map +1 -1
  88. package/out/concepts/IfStatement__.js +11 -3
  89. package/out/concepts/IfStatement__.js.map +1 -1
  90. package/out/concepts/Integration__.js +7 -2
  91. package/out/concepts/Integration__.js.map +1 -1
  92. package/out/concepts/InterfaceParam__.js +3 -1
  93. package/out/concepts/InterfaceParam__.js.map +1 -1
  94. package/out/concepts/Interface__.js +11 -3
  95. package/out/concepts/Interface__.js.map +1 -1
  96. package/out/concepts/Logic__.js +46 -46
  97. package/out/concepts/Logic__.js.map +1 -1
  98. package/out/concepts/MatchCase__.js +8 -2
  99. package/out/concepts/MatchCase__.js.map +1 -1
  100. package/out/concepts/Match__.js +7 -2
  101. package/out/concepts/Match__.js.map +1 -1
  102. package/out/concepts/MemberExpression__.js +6 -2
  103. package/out/concepts/MemberExpression__.js.map +1 -1
  104. package/out/concepts/Module__.js +55 -14
  105. package/out/concepts/Module__.js.map +1 -1
  106. package/out/concepts/MsgTriggerEvent__.js +4 -1
  107. package/out/concepts/MsgTriggerEvent__.js.map +1 -1
  108. package/out/concepts/MsgTriggerLauncher__.js +4 -1
  109. package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
  110. package/out/concepts/Namespace__.js +48 -12
  111. package/out/concepts/Namespace__.js.map +1 -1
  112. package/out/concepts/NewComposite__.js +15 -4
  113. package/out/concepts/NewComposite__.js.map +1 -1
  114. package/out/concepts/NewList__.js +7 -2
  115. package/out/concepts/NewList__.js.map +1 -1
  116. package/out/concepts/NewMap__.js +11 -3
  117. package/out/concepts/NewMap__.js.map +1 -1
  118. package/out/concepts/NumericLiteral__.js +3 -1
  119. package/out/concepts/NumericLiteral__.js.map +1 -1
  120. package/out/concepts/OqlQueryComponent__.js +3 -1
  121. package/out/concepts/OqlQueryComponent__.js.map +1 -1
  122. package/out/concepts/OverriddenLogic__.js +28 -8
  123. package/out/concepts/OverriddenLogic__.js.map +1 -1
  124. package/out/concepts/Param__.js +3 -1
  125. package/out/concepts/Param__.js.map +1 -1
  126. package/out/concepts/ProcessComponent__.js +8 -2
  127. package/out/concepts/ProcessComponent__.js.map +1 -1
  128. package/out/concepts/ProcessElement__.js +30 -8
  129. package/out/concepts/ProcessElement__.js.map +1 -1
  130. package/out/concepts/ProcessOutcomes__.js +3 -1
  131. package/out/concepts/ProcessOutcomes__.js.map +1 -1
  132. package/out/concepts/Process__.js +20 -5
  133. package/out/concepts/Process__.js.map +1 -1
  134. package/out/concepts/QueryAggregateExpression__.js +3 -1
  135. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  136. package/out/concepts/QueryFromExpression__.js +4 -1
  137. package/out/concepts/QueryFromExpression__.js.map +1 -1
  138. package/out/concepts/QueryGroupByExpression__.js +3 -1
  139. package/out/concepts/QueryGroupByExpression__.js.map +1 -1
  140. package/out/concepts/QueryJoinExpression__.js +8 -2
  141. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  142. package/out/concepts/QueryLimitExpression__.js +6 -2
  143. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  144. package/out/concepts/QueryOrderByExpression__.js +6 -2
  145. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  146. package/out/concepts/QuerySelectExpression__.js +4 -1
  147. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  148. package/out/concepts/Return__.js +3 -1
  149. package/out/concepts/Return__.js.map +1 -1
  150. package/out/concepts/SelectMembers__.js +7 -2
  151. package/out/concepts/SelectMembers__.js.map +1 -1
  152. package/out/concepts/Slot__.js +3 -1
  153. package/out/concepts/Slot__.js.map +1 -1
  154. package/out/concepts/SqlQueryComponent__.js +3 -1
  155. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  156. package/out/concepts/StringInterpolation__.js +4 -1
  157. package/out/concepts/StringInterpolation__.js.map +1 -1
  158. package/out/concepts/StructureProperty__.js +3 -1
  159. package/out/concepts/StructureProperty__.js.map +1 -1
  160. package/out/concepts/Structure__.js +8 -2
  161. package/out/concepts/Structure__.js.map +1 -1
  162. package/out/concepts/SwitchCase__.js +7 -2
  163. package/out/concepts/SwitchCase__.js.map +1 -1
  164. package/out/concepts/SwitchStatement__.js +4 -1
  165. package/out/concepts/SwitchStatement__.js.map +1 -1
  166. package/out/concepts/TriggerEvent__.js +4 -1
  167. package/out/concepts/TriggerEvent__.js.map +1 -1
  168. package/out/concepts/TypeAnnotation__.js +12 -3
  169. package/out/concepts/TypeAnnotation__.js.map +1 -1
  170. package/out/concepts/UnaryExpression__.js +3 -1
  171. package/out/concepts/UnaryExpression__.js.map +1 -1
  172. package/out/concepts/ValidationRule__.js +10 -3
  173. package/out/concepts/ValidationRule__.js.map +1 -1
  174. package/out/concepts/Variable__.js +3 -1
  175. package/out/concepts/Variable__.js.map +1 -1
  176. package/out/concepts/ViewComponent__.js +24 -6
  177. package/out/concepts/ViewComponent__.js.map +1 -1
  178. package/out/concepts/ViewElement__.js +24 -7
  179. package/out/concepts/ViewElement__.js.map +1 -1
  180. package/out/concepts/View__.js +27 -7
  181. package/out/concepts/View__.js.map +1 -1
  182. package/out/concepts/WhileStatement__.js +7 -2
  183. package/out/concepts/WhileStatement__.js.map +1 -1
  184. package/out/concepts/types__.d.ts +2 -3
  185. package/out/decorators/index.d.ts +3 -3
  186. package/out/decorators/index.js +3 -1
  187. package/out/decorators/index.js.map +1 -1
  188. package/out/natural/genNaturalTS.js +1 -1
  189. package/out/natural/genNaturalTS.js.map +1 -1
  190. package/out/server/formatTsUtils.d.ts +3 -3
  191. package/out/server/getMemberIdentifier.d.ts +4 -4
  192. package/out/server/naslServer.d.ts +1 -1
  193. package/out/server/naslServer.js +4 -2
  194. package/out/server/naslServer.js.map +1 -1
  195. package/out/translator/utils.js +24 -28
  196. package/out/translator/utils.js.map +1 -1
  197. package/package.json +1 -1
  198. package/src/common/BaseNode.ts +92 -68
  199. package/src/concepts/Anchor__.ts +3 -1
  200. package/src/concepts/AnonymousFunction__.ts +10 -3
  201. package/src/concepts/App__.ts +69 -18
  202. package/src/concepts/Argument__.ts +3 -1
  203. package/src/concepts/Assignee__.ts +18 -5
  204. package/src/concepts/AssignmentLine__.ts +6 -2
  205. package/src/concepts/Assignment__.ts +6 -2
  206. package/src/concepts/Attribute__.ts +3 -1
  207. package/src/concepts/AuthLogicForCallInterface__.ts +4 -1
  208. package/src/concepts/AuthLogic__.ts +3 -0
  209. package/src/concepts/BackendVariable__.ts +3 -1
  210. package/src/concepts/Backend__.ts +4 -1
  211. package/src/concepts/BatchAssignment__.ts +11 -3
  212. package/src/concepts/BinaryExpression__.ts +6 -2
  213. package/src/concepts/BindAttribute__.ts +20 -7
  214. package/src/concepts/BindDirective__.ts +7 -2
  215. package/src/concepts/BindEvent__.ts +8 -2
  216. package/src/concepts/BindStyle__.ts +7 -2
  217. package/src/concepts/CallAuthInterface__.ts +4 -1
  218. package/src/concepts/CallFunction__.ts +8 -2
  219. package/src/concepts/CallInterface__.ts +49 -14
  220. package/src/concepts/CallLogic__.ts +11 -3
  221. package/src/concepts/CallQueryComponent__.ts +34 -10
  222. package/src/concepts/CompletionProperty__.ts +3 -1
  223. package/src/concepts/ConfigGroup__.ts +4 -1
  224. package/src/concepts/ConfigProperty__.ts +4 -1
  225. package/src/concepts/Configuration__.ts +4 -1
  226. package/src/concepts/Connection__.ts +4 -1
  227. package/src/concepts/Connector__.ts +26 -7
  228. package/src/concepts/Constant__.ts +3 -1
  229. package/src/concepts/DataSource__.ts +4 -1
  230. package/src/concepts/Destination__.ts +7 -2
  231. package/src/concepts/EntityIndex__.ts +3 -1
  232. package/src/concepts/EntityProperty__.ts +9 -3
  233. package/src/concepts/Entity__.ts +8 -2
  234. package/src/concepts/Enum__.ts +4 -1
  235. package/src/concepts/Event__.ts +4 -1
  236. package/src/concepts/ExternalDestination__.ts +6 -2
  237. package/src/concepts/ForEachStatement__.ts +19 -6
  238. package/src/concepts/FrontendLibrary__.ts +8 -2
  239. package/src/concepts/Frontend__.ts +19 -5
  240. package/src/concepts/Function__.ts +19 -5
  241. package/src/concepts/IfStatement__.ts +11 -3
  242. package/src/concepts/Integration__.ts +7 -2
  243. package/src/concepts/InterfaceParam__.ts +3 -1
  244. package/src/concepts/Interface__.ts +11 -3
  245. package/src/concepts/Logic__.ts +62 -57
  246. package/src/concepts/MatchCase__.ts +8 -2
  247. package/src/concepts/Match__.ts +7 -2
  248. package/src/concepts/MemberExpression__.ts +6 -2
  249. package/src/concepts/Module__.ts +55 -14
  250. package/src/concepts/MsgTriggerEvent__.ts +4 -1
  251. package/src/concepts/MsgTriggerLauncher__.ts +4 -1
  252. package/src/concepts/Namespace__.ts +48 -12
  253. package/src/concepts/NewComposite__.ts +15 -4
  254. package/src/concepts/NewList__.ts +7 -2
  255. package/src/concepts/NewMap__.ts +11 -3
  256. package/src/concepts/NumericLiteral__.ts +3 -1
  257. package/src/concepts/OqlQueryComponent__.ts +3 -1
  258. package/src/concepts/OverriddenLogic__.ts +28 -8
  259. package/src/concepts/Param__.ts +3 -1
  260. package/src/concepts/ProcessComponent__.ts +8 -2
  261. package/src/concepts/ProcessElement__.ts +30 -8
  262. package/src/concepts/ProcessOutcomes__.ts +3 -1
  263. package/src/concepts/Process__.ts +20 -5
  264. package/src/concepts/QueryAggregateExpression__.ts +3 -1
  265. package/src/concepts/QueryFromExpression__.ts +4 -1
  266. package/src/concepts/QueryGroupByExpression__.ts +3 -1
  267. package/src/concepts/QueryJoinExpression__.ts +8 -2
  268. package/src/concepts/QueryLimitExpression__.ts +6 -2
  269. package/src/concepts/QueryOrderByExpression__.ts +6 -2
  270. package/src/concepts/QuerySelectExpression__.ts +4 -1
  271. package/src/concepts/Return__.ts +3 -1
  272. package/src/concepts/SelectMembers__.ts +7 -2
  273. package/src/concepts/Slot__.ts +3 -1
  274. package/src/concepts/SqlQueryComponent__.ts +3 -1
  275. package/src/concepts/StringInterpolation__.ts +4 -1
  276. package/src/concepts/StructureProperty__.ts +3 -1
  277. package/src/concepts/Structure__.ts +8 -2
  278. package/src/concepts/SwitchCase__.ts +7 -2
  279. package/src/concepts/SwitchStatement__.ts +4 -1
  280. package/src/concepts/TriggerEvent__.ts +4 -1
  281. package/src/concepts/TypeAnnotation__.ts +13 -4
  282. package/src/concepts/UnaryExpression__.ts +3 -1
  283. package/src/concepts/ValidationRule__.ts +10 -3
  284. package/src/concepts/Variable__.ts +3 -1
  285. package/src/concepts/ViewComponent__.ts +24 -6
  286. package/src/concepts/ViewElement__.ts +92 -72
  287. package/src/concepts/View__.ts +27 -7
  288. package/src/concepts/WhileStatement__.ts +7 -2
  289. package/src/concepts/types__.ts +2 -4
  290. package/src/decorators/index.ts +7 -5
  291. package/src/natural/genNaturalTS.ts +1 -1
  292. package/src/server/formatTsUtils.ts +8 -8
  293. package/src/server/getMemberIdentifier.ts +4 -4
  294. package/src/server/naslServer.ts +4 -4
  295. package/src/service/storage/init.ts +2 -2
  296. package/src/translator/utils.ts +7 -9
@@ -66,73 +66,109 @@ export class Namespace extends BaseNode {
66
66
  /**
67
67
  * 命名空间列表
68
68
  */
69
- @property('Namespace')
69
+ @property({
70
+ objectRef: 'Namespace',
71
+ isArray: true,
72
+ })
70
73
  children: Array<Namespace> = [];
71
74
 
72
75
  /**
73
76
  * 流程列表
74
77
  */
75
- @property('Process')
78
+ @property({
79
+ objectRef: 'Process',
80
+ isArray: true,
81
+ })
76
82
  processes: Array<Process> = [];
77
83
 
78
84
  /**
79
85
  * 数据结构列表
80
86
  */
81
- @property('Structure')
87
+ @property({
88
+ objectRef: 'Structure',
89
+ isArray: true,
90
+ })
82
91
  structures: Array<Structure> = [];
83
92
 
84
93
  /**
85
94
  * 枚举列表
86
95
  */
87
- @property('Enum')
96
+ @property({
97
+ objectRef: 'Enum',
98
+ isArray: true,
99
+ })
88
100
  enums: Array<Enum> = [];
89
101
 
90
102
  /**
91
103
  * 逻辑列表
92
104
  */
93
- @property('Logic')
105
+ @property({
106
+ objectRef: 'Logic',
107
+ isArray: true,
108
+ })
94
109
  logics: Array<Logic> = [];
95
110
 
96
111
  /**
97
112
  * 函数列表
98
113
  */
99
- @property('Function')
114
+ @property({
115
+ objectRef: 'Function',
116
+ isArray: true,
117
+ })
100
118
  functions: Array<Function> = [];
101
119
 
102
120
  /**
103
121
  * 接口列表
104
122
  */
105
- @property('Interface')
123
+ @property({
124
+ objectRef: 'Interface',
125
+ isArray: true,
126
+ })
106
127
  interfaces: Array<Interface> = [];
107
128
 
108
129
  /**
109
130
  * 页面列表
110
131
  */
111
- @property('View')
132
+ @property({
133
+ objectRef: 'View',
134
+ isArray: true,
135
+ })
112
136
  views: Array<View> = [];
113
137
 
114
138
  /**
115
139
  * 变量列表
116
140
  */
117
- @property('Variable')
141
+ @property({
142
+ objectRef: 'Variable',
143
+ isArray: true,
144
+ })
118
145
  frontendVariables: Array<Variable> = [];
119
146
 
120
147
  /**
121
148
  * 变量列表
122
149
  */
123
- @property('Variable')
150
+ @property({
151
+ objectRef: 'Variable',
152
+ isArray: true,
153
+ })
124
154
  variables: Array<Variable> = [];
125
155
 
126
156
  /**
127
157
  * 页面组件列表
128
158
  */
129
- @property('ViewComponent')
159
+ @property({
160
+ objectRef: 'ViewComponent',
161
+ isArray: true,
162
+ })
130
163
  viewComponents: Array<ViewComponent> = [];
131
164
 
132
165
  /**
133
166
  * 流程组件列表
134
167
  */
135
- @property('ProcessComponent')
168
+ @property({
169
+ objectRef: 'ProcessComponent',
170
+ isArray: true,
171
+ })
136
172
  processComponents: Array<ProcessComponent> = [];
137
173
 
138
174
  /**
@@ -41,26 +41,37 @@ export class NewComposite extends LogicItem {
41
41
  /**
42
42
  * 类型
43
43
  */
44
- @property('TypeAnnotation')
44
+ @property({
45
+ objectRef: 'TypeAnnotation',
46
+ })
45
47
  // @ts-ignore
46
48
  typeAnnotation!: TypeAnnotation;
47
49
 
48
50
  /**
49
51
  * 左边项
50
52
  */
51
- @property('Identifier')
53
+ @property({
54
+ objectRef: 'Identifier',
55
+ isArray: true,
56
+ })
52
57
  properties: Array<Identifier> = [];
53
58
 
54
59
  /**
55
60
  * 右边项
56
61
  */
57
- @property('SelectMembers')
62
+ @property({
63
+ objectRef: 'SelectMembers',
64
+ isArray: true,
65
+ })
58
66
  rights: Array<SelectMembers> = [];
59
67
 
60
68
  /**
61
69
  * 赋值线
62
70
  */
63
- @property('AssignmentLine')
71
+ @property({
72
+ objectRef: 'AssignmentLine',
73
+ isArray: true,
74
+ })
64
75
  assignmentLines: Array<AssignmentLine> = [];
65
76
 
66
77
  /**
@@ -33,14 +33,19 @@ export class NewList extends LogicItem {
33
33
  /**
34
34
  * 类型
35
35
  */
36
- @property('TypeAnnotation')
36
+ @property({
37
+ objectRef: 'TypeAnnotation',
38
+ })
37
39
  // @ts-ignore
38
40
  typeAnnotation!: TypeAnnotation;
39
41
 
40
42
  /**
41
43
  * 成员表达式
42
44
  */
43
- @property('LogicItem')
45
+ @property({
46
+ objectRef: 'LogicItem',
47
+ isArray: true,
48
+ })
44
49
  items: Array<LogicItem> = [];
45
50
 
46
51
  /**
@@ -34,20 +34,28 @@ export class NewMap extends LogicItem {
34
34
  /**
35
35
  * 类型
36
36
  */
37
- @property('TypeAnnotation')
37
+ @property({
38
+ objectRef: 'TypeAnnotation',
39
+ })
38
40
  // @ts-ignore
39
41
  typeAnnotation!: TypeAnnotation;
40
42
 
41
43
  /**
42
44
  * 键
43
45
  */
44
- @property('LogicItem')
46
+ @property({
47
+ objectRef: 'LogicItem',
48
+ isArray: true,
49
+ })
45
50
  keys: Array<LogicItem> = [];
46
51
 
47
52
  /**
48
53
  * 键对应的值
49
54
  */
50
- @property('LogicItem')
55
+ @property({
56
+ objectRef: 'LogicItem',
57
+ isArray: true,
58
+ })
51
59
  values: Array<LogicItem> = [];
52
60
 
53
61
  /**
@@ -40,7 +40,9 @@ export class NumericLiteral extends LogicItem {
40
40
  /**
41
41
  * 类型
42
42
  */
43
- @property('TypeAnnotation')
43
+ @property({
44
+ objectRef: 'TypeAnnotation',
45
+ })
44
46
  // @ts-ignore
45
47
  typeAnnotation!: TypeAnnotation;
46
48
 
@@ -50,7 +50,9 @@ export class OqlQueryComponent extends LogicItem {
50
50
  /**
51
51
  * 相关类型
52
52
  */
53
- @property('TypeAnnotation')
53
+ @property({
54
+ objectRef: 'TypeAnnotation',
55
+ })
54
56
  // @ts-ignore
55
57
  typeAnnotation!: TypeAnnotation;
56
58
 
@@ -99,44 +99,64 @@ export class OverriddenLogic extends BaseNode {
99
99
  /**
100
100
  * 事务
101
101
  */
102
- @property('Transactional')
102
+ @property({
103
+ objectRef: 'Transactional',
104
+ })
103
105
  // @ts-ignore
104
106
  transactional!: Transactional;
105
107
 
106
108
  /**
107
109
  * 类型参数列表
108
110
  */
109
- @property('TypeParam')
111
+ @property({
112
+ objectRef: 'TypeParam',
113
+ isArray: true,
114
+ })
110
115
  typeParams: Array<TypeParam> = null;
111
116
 
112
117
  /**
113
118
  * 输入参数列表
114
119
  */
115
- @property('Param')
120
+ @property({
121
+ objectRef: 'Param',
122
+ isArray: true,
123
+ })
116
124
  params: Array<Param> = [];
117
125
 
118
126
  /**
119
127
  * 输出参数列表
120
128
  */
121
- @property('Return')
129
+ @property({
130
+ objectRef: 'Return',
131
+ isArray: true,
132
+ })
122
133
  returns: Array<Return> = [];
123
134
 
124
135
  /**
125
136
  * 变量列表
126
137
  */
127
- @property('Variable')
138
+ @property({
139
+ objectRef: 'Variable',
140
+ isArray: true,
141
+ })
128
142
  variables: Array<Variable> = [];
129
143
 
130
144
  /**
131
145
  * 逻辑项列表
132
146
  */
133
- @property('LogicItem')
147
+ @property({
148
+ objectRef: 'LogicItem',
149
+ isArray: true,
150
+ })
134
151
  body: Array<LogicItem> = [];
135
152
 
136
153
  /**
137
154
  * 逻辑项列表
138
155
  */
139
- @property('LogicItem')
156
+ @property({
157
+ objectRef: 'LogicItem',
158
+ isArray: true,
159
+ })
140
160
  playground: Array<LogicItem> = [];
141
161
 
142
162
  /**
@@ -1948,7 +1968,7 @@ export class OverriddenLogic extends BaseNode {
1948
1968
  handleForEachCode(code: string, forEachStatement: ForEachStatement): string {
1949
1969
  const { item, index, each } = forEachStatement;
1950
1970
  if (code.includes(item.name)) {
1951
- const eachTSCode = each.toEmbeddedTS();
1971
+ const eachTSCode = each ? each.toEmbeddedTS() : '__IDENTIFIER__'
1952
1972
  code = this.handleReplaceCode(
1953
1973
  code,
1954
1974
  item.name,
@@ -70,7 +70,9 @@ export class Param extends BaseNode {
70
70
  /**
71
71
  * 类型
72
72
  */
73
- @property('TypeAnnotation')
73
+ @property({
74
+ objectRef: 'TypeAnnotation',
75
+ })
74
76
  // @ts-ignore
75
77
  typeAnnotation!: TypeAnnotation;
76
78
 
@@ -60,13 +60,19 @@ export class ProcessComponent extends BaseNode {
60
60
  /**
61
61
  * 组件属性列表
62
62
  */
63
- @property('Attribute')
63
+ @property({
64
+ objectRef: 'Attribute',
65
+ isArray: true,
66
+ })
64
67
  attrs: Array<Attribute> = [];
65
68
 
66
69
  /**
67
70
  * 逻辑列表
68
71
  */
69
- @property('Logic')
72
+ @property({
73
+ objectRef: 'Logic',
74
+ isArray: true,
75
+ })
70
76
  logics: Array<Logic> = [];
71
77
 
72
78
  /**
@@ -71,7 +71,10 @@ export class ProcessElement extends BaseNode {
71
71
  /**
72
72
  * 元素绑定事件列表
73
73
  */
74
- @property('BindEvent')
74
+ @property({
75
+ objectRef: 'BindEvent',
76
+ isArray: true,
77
+ })
75
78
  bindEvents: Array<BindEvent> = [];
76
79
 
77
80
  /**
@@ -98,14 +101,19 @@ export class ProcessElement extends BaseNode {
98
101
  /**
99
102
  * 矩形信息
100
103
  */
101
- @property('Rect')
104
+ @property({
105
+ objectRef: 'Rect',
106
+ })
102
107
  // @ts-ignore
103
108
  bounds!: Rect;
104
109
 
105
110
  /**
106
111
  * 点信息列表
107
112
  */
108
- @property('Point')
113
+ @property({
114
+ objectRef: 'Point',
115
+ isArray: true,
116
+ })
109
117
  waypoints: Array<Point> = [];
110
118
 
111
119
  /**
@@ -118,32 +126,46 @@ export class ProcessElement extends BaseNode {
118
126
  /**
119
127
  * 逻辑
120
128
  */
121
- @property('Logic')
129
+ @property({
130
+ objectRef: 'Logic',
131
+ })
122
132
  // @ts-ignore
123
133
  logic!: Logic;
124
134
 
125
135
  /**
126
136
  * 变量列表
127
137
  */
128
- @property('Variable')
138
+ @property({
139
+ objectRef: 'Variable',
140
+ isArray: true,
141
+ })
129
142
  variables: Array<Variable> = [];
130
143
 
131
144
  /**
132
145
  * 输出参数列表
133
146
  */
134
- @property('Return')
147
+ @property({
148
+ objectRef: 'Return',
149
+ isArray: true,
150
+ })
135
151
  returns: Array<Return> = [];
136
152
 
137
153
  /**
138
154
  * 常量列表
139
155
  */
140
- @property('Constant')
156
+ @property({
157
+ objectRef: 'Constant',
158
+ isArray: true,
159
+ })
141
160
  constants: Array<Constant> = [];
142
161
 
143
162
  /**
144
163
  * 元素绑定属性列表
145
164
  */
146
- @property('BindAttribute')
165
+ @property({
166
+ objectRef: 'BindAttribute',
167
+ isArray: true,
168
+ })
147
169
  bindAttrs: Array<BindAttribute> = [];
148
170
 
149
171
  /**
@@ -36,7 +36,9 @@ export class ProcessOutcomes extends LogicItem {
36
36
  /**
37
37
  * 关联连接器
38
38
  */
39
- @property()
39
+ @property({
40
+ isArray: true,
41
+ })
40
42
  flowRefs: Array<string> = [];
41
43
 
42
44
  /**
@@ -63,31 +63,46 @@ export class Process extends BaseNode {
63
63
  /**
64
64
  * 元素绑定事件列表
65
65
  */
66
- @property('BindEvent')
66
+ @property({
67
+ objectRef: 'BindEvent',
68
+ isArray: true,
69
+ })
67
70
  bindEvents: Array<BindEvent> = [];
68
71
 
69
72
  /**
70
73
  * 输入参数列表
71
74
  */
72
- @property('Param')
75
+ @property({
76
+ objectRef: 'Param',
77
+ isArray: true,
78
+ })
73
79
  params: Array<Param> = [];
74
80
 
75
81
  /**
76
82
  * 输出参数列表
77
83
  */
78
- @property('Return')
84
+ @property({
85
+ objectRef: 'Return',
86
+ isArray: true,
87
+ })
79
88
  returns: Array<Return> = [];
80
89
 
81
90
  /**
82
91
  * 常量列表
83
92
  */
84
- @property('Constant')
93
+ @property({
94
+ objectRef: 'Constant',
95
+ isArray: true,
96
+ })
85
97
  constants: Array<Constant> = [];
86
98
 
87
99
  /**
88
100
  * 流程元素列表
89
101
  */
90
- @property('ProcessElement')
102
+ @property({
103
+ objectRef: 'ProcessElement',
104
+ isArray: true,
105
+ })
91
106
  elements: Array<ProcessElement> = [];
92
107
 
93
108
  /**
@@ -45,7 +45,9 @@ export class QueryAggregateExpression extends LogicItem {
45
45
  /**
46
46
  * 聚合函数参数
47
47
  */
48
- @property('QueryFieldExpression')
48
+ @property({
49
+ objectRef: 'QueryFieldExpression',
50
+ })
49
51
  // @ts-ignore
50
52
  aggregateParam!: QueryFieldExpression;
51
53
 
@@ -53,7 +53,10 @@ export class QueryFromExpression extends LogicItem {
53
53
  /**
54
54
  * 查询 Join 子句列表
55
55
  */
56
- @property('QueryJoinExpression')
56
+ @property({
57
+ objectRef: 'QueryJoinExpression',
58
+ isArray: true,
59
+ })
57
60
  joinParts: Array<QueryJoinExpression> = [];
58
61
 
59
62
  /**
@@ -33,7 +33,9 @@ export class QueryGroupByExpression extends LogicItem {
33
33
  /**
34
34
  * 逻辑项
35
35
  */
36
- @property('LogicItem')
36
+ @property({
37
+ objectRef: 'LogicItem',
38
+ })
37
39
  // @ts-ignore
38
40
  groupElement!: LogicItem;
39
41
 
@@ -60,13 +60,19 @@ export class QueryJoinExpression extends LogicItem {
60
60
  /**
61
61
  * 二元表达式列表
62
62
  */
63
- @property('BinaryExpression')
63
+ @property({
64
+ objectRef: 'BinaryExpression',
65
+ isArray: true,
66
+ })
64
67
  onExpressions: Array<BinaryExpression> = [];
65
68
 
66
69
  /**
67
70
  * 查询 Join 子句列表
68
71
  */
69
- @property('QueryJoinExpression')
72
+ @property({
73
+ objectRef: 'QueryJoinExpression',
74
+ isArray: true,
75
+ })
70
76
  joinParts: Array<QueryJoinExpression> = [];
71
77
 
72
78
  /**
@@ -30,14 +30,18 @@ export class QueryLimitExpression extends LogicItem {
30
30
  /**
31
31
  * 逻辑项
32
32
  */
33
- @property('LogicItem')
33
+ @property({
34
+ objectRef: 'LogicItem',
35
+ })
34
36
  // @ts-ignore
35
37
  pageElement!: LogicItem;
36
38
 
37
39
  /**
38
40
  * 逻辑项
39
41
  */
40
- @property('LogicItem')
42
+ @property({
43
+ objectRef: 'LogicItem',
44
+ })
41
45
  // @ts-ignore
42
46
  pageSizeElement!: LogicItem;
43
47
 
@@ -30,14 +30,18 @@ export class QueryOrderByExpression extends LogicItem {
30
30
  /**
31
31
  * 逻辑项
32
32
  */
33
- @property('LogicItem')
33
+ @property({
34
+ objectRef: 'LogicItem',
35
+ })
34
36
  // @ts-ignore
35
37
  orderElement!: LogicItem;
36
38
 
37
39
  /**
38
40
  * 逻辑项
39
41
  */
40
- @property('LogicItem')
42
+ @property({
43
+ objectRef: 'LogicItem',
44
+ })
41
45
  // @ts-ignore
42
46
  order!: LogicItem;
43
47
 
@@ -43,7 +43,10 @@ export class QuerySelectExpression extends LogicItem {
43
43
  /**
44
44
  * selectElements
45
45
  */
46
- @property('QueryAggregateExpression | QueryFieldExpression')
46
+ @property({
47
+ objectRef: 'QueryAggregateExpression | QueryFieldExpression',
48
+ isArray: true,
49
+ })
47
50
  selectElements: Array<QueryAggregateExpression | QueryFieldExpression> = [];
48
51
 
49
52
  /**
@@ -66,7 +66,9 @@ export class Return extends BaseNode {
66
66
  /**
67
67
  * 类型
68
68
  */
69
- @property('TypeAnnotation')
69
+ @property({
70
+ objectRef: 'TypeAnnotation',
71
+ })
70
72
  // @ts-ignore
71
73
  typeAnnotation!: TypeAnnotation;
72
74
 
@@ -38,14 +38,19 @@ export class SelectMembers extends BaseNode {
38
38
  /**
39
39
  * 根表达式
40
40
  */
41
- @property('LogicItem')
41
+ @property({
42
+ objectRef: 'LogicItem',
43
+ })
42
44
  // @ts-ignore
43
45
  expression!: LogicItem;
44
46
 
45
47
  /**
46
48
  * 成员表达式
47
49
  */
48
- @property('LogicItem')
50
+ @property({
51
+ objectRef: 'LogicItem',
52
+ isArray: true,
53
+ })
49
54
  members: Array<LogicItem> = [];
50
55
 
51
56
  /**
@@ -67,7 +67,9 @@ export class Slot extends BaseNode {
67
67
  /**
68
68
  * 是否为高级功能,不在低代码中显示
69
69
  */
70
- @property('Param')
70
+ @property({
71
+ objectRef: 'Param',
72
+ })
71
73
  // @ts-ignore
72
74
  slotProps!: Param;
73
75
 
@@ -50,7 +50,9 @@ export class SqlQueryComponent extends LogicItem {
50
50
  /**
51
51
  * 相关类型
52
52
  */
53
- @property('TypeAnnotation')
53
+ @property({
54
+ objectRef: 'TypeAnnotation',
55
+ })
54
56
  // @ts-ignore
55
57
  typeAnnotation!: TypeAnnotation;
56
58