@lcap/nasl 3.7.1-beta.1 → 3.7.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (475) hide show
  1. package/out/common/BaseNode.js +3 -1
  2. package/out/common/BaseNode.js.map +1 -1
  3. package/out/concepts/AnonymousFunction__.d.ts +1 -1
  4. package/out/concepts/AnonymousFunction__.js.map +1 -1
  5. package/out/concepts/App__.js +9 -27
  6. package/out/concepts/App__.js.map +1 -1
  7. package/out/concepts/Argument__.d.ts +1 -1
  8. package/out/concepts/Argument__.js +2 -6
  9. package/out/concepts/Argument__.js.map +1 -1
  10. package/out/concepts/AssigneeV2__.js +0 -2
  11. package/out/concepts/AssigneeV2__.js.map +1 -1
  12. package/out/concepts/Assignee__.js +0 -2
  13. package/out/concepts/Assignee__.js.map +1 -1
  14. package/out/concepts/AssignmentLine__.js +0 -2
  15. package/out/concepts/AssignmentLine__.js.map +1 -1
  16. package/out/concepts/Assignment__.js +2 -4
  17. package/out/concepts/Assignment__.js.map +1 -1
  18. package/out/concepts/Attribute__.d.ts +1 -1
  19. package/out/concepts/Attribute__.js +7 -23
  20. package/out/concepts/Attribute__.js.map +1 -1
  21. package/out/concepts/AuthInterface__.js +1 -3
  22. package/out/concepts/AuthInterface__.js.map +1 -1
  23. package/out/concepts/AuthLogicForCallInterface__.js +7 -7
  24. package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
  25. package/out/concepts/AuthLogic__.js +1 -3
  26. package/out/concepts/AuthLogic__.js.map +1 -1
  27. package/out/concepts/BackendVariable__.d.ts +2 -2
  28. package/out/concepts/BackendVariable__.js +3 -9
  29. package/out/concepts/BackendVariable__.js.map +1 -1
  30. package/out/concepts/Backend__.js +1 -3
  31. package/out/concepts/Backend__.js.map +1 -1
  32. package/out/concepts/BatchAssignment__.js +1 -3
  33. package/out/concepts/BatchAssignment__.js.map +1 -1
  34. package/out/concepts/BinaryExpression__.js +4 -4
  35. package/out/concepts/BinaryExpression__.js.map +1 -1
  36. package/out/concepts/BindAttribute__.js +6 -58
  37. package/out/concepts/BindAttribute__.js.map +1 -1
  38. package/out/concepts/BindDirective__.d.ts +6 -6
  39. package/out/concepts/BindDirective__.js +7 -21
  40. package/out/concepts/BindDirective__.js.map +1 -1
  41. package/out/concepts/BindEvent__.d.ts +3 -3
  42. package/out/concepts/BindEvent__.js +3 -13
  43. package/out/concepts/BindEvent__.js.map +1 -1
  44. package/out/concepts/BindStyle__.js +1 -3
  45. package/out/concepts/BindStyle__.js.map +1 -1
  46. package/out/concepts/BooleanLiteral__.js +1 -3
  47. package/out/concepts/BooleanLiteral__.js.map +1 -1
  48. package/out/concepts/BusinessComponent__.js +11 -19
  49. package/out/concepts/BusinessComponent__.js.map +1 -1
  50. package/out/concepts/BusinessLogic__.js +8 -10
  51. package/out/concepts/BusinessLogic__.js.map +1 -1
  52. package/out/concepts/CallConnector__.js +2 -6
  53. package/out/concepts/CallConnector__.js.map +1 -1
  54. package/out/concepts/CallEvent__.js +2 -6
  55. package/out/concepts/CallEvent__.js.map +1 -1
  56. package/out/concepts/CallFunction__.d.ts +1 -1
  57. package/out/concepts/CallFunction__.js +3 -13
  58. package/out/concepts/CallFunction__.js.map +1 -1
  59. package/out/concepts/CallInterface__.d.ts +1 -1
  60. package/out/concepts/CallInterface__.js +3 -9
  61. package/out/concepts/CallInterface__.js.map +1 -1
  62. package/out/concepts/CallLogic__.d.ts +4 -4
  63. package/out/concepts/CallLogic__.js +8 -23
  64. package/out/concepts/CallLogic__.js.map +1 -1
  65. package/out/concepts/CallQueryComponent__.d.ts +2 -2
  66. package/out/concepts/CallQueryComponent__.js +2 -13
  67. package/out/concepts/CallQueryComponent__.js.map +1 -1
  68. package/out/concepts/Comment__.js +1 -3
  69. package/out/concepts/Comment__.js.map +1 -1
  70. package/out/concepts/CompletionProperty__.js +5 -15
  71. package/out/concepts/CompletionProperty__.js.map +1 -1
  72. package/out/concepts/ConfigGroup__.js +1 -3
  73. package/out/concepts/ConfigGroup__.js.map +1 -1
  74. package/out/concepts/ConfigPropertyValue__.d.ts +0 -1
  75. package/out/concepts/ConfigPropertyValue__.js +2 -13
  76. package/out/concepts/ConfigPropertyValue__.js.map +1 -1
  77. package/out/concepts/ConfigProperty__.js +3 -9
  78. package/out/concepts/ConfigProperty__.js.map +1 -1
  79. package/out/concepts/Configuration__.js.map +1 -1
  80. package/out/concepts/Connection__.js +3 -9
  81. package/out/concepts/Connection__.js.map +1 -1
  82. package/out/concepts/ConnectorLogic__.js +1 -3
  83. package/out/concepts/ConnectorLogic__.js.map +1 -1
  84. package/out/concepts/ConnectorTriggerLauncher__.js +6 -9
  85. package/out/concepts/ConnectorTriggerLauncher__.js.map +1 -1
  86. package/out/concepts/ConnectorTrigger__.js +2 -6
  87. package/out/concepts/ConnectorTrigger__.js.map +1 -1
  88. package/out/concepts/Connector__.js +3 -9
  89. package/out/concepts/Connector__.js.map +1 -1
  90. package/out/concepts/Constant__.js +2 -6
  91. package/out/concepts/Constant__.js.map +1 -1
  92. package/out/concepts/CountersignPolicyV2__.js +1 -3
  93. package/out/concepts/CountersignPolicyV2__.js.map +1 -1
  94. package/out/concepts/CountersignPolicy__.js +1 -3
  95. package/out/concepts/CountersignPolicy__.js.map +1 -1
  96. package/out/concepts/DataSource__.js +6 -12
  97. package/out/concepts/DataSource__.js.map +1 -1
  98. package/out/concepts/DatabaseTypeAnnotation__.js +6 -6
  99. package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
  100. package/out/concepts/Destination__.js +3 -9
  101. package/out/concepts/Destination__.js.map +1 -1
  102. package/out/concepts/EntityIndex__.d.ts +2 -2
  103. package/out/concepts/EntityIndex__.js +4 -13
  104. package/out/concepts/EntityIndex__.js.map +1 -1
  105. package/out/concepts/EntityProperty__.d.ts +10 -12
  106. package/out/concepts/EntityProperty__.js +25 -44
  107. package/out/concepts/EntityProperty__.js.map +1 -1
  108. package/out/concepts/Entity__.d.ts +2 -2
  109. package/out/concepts/Entity__.js +7 -17
  110. package/out/concepts/Entity__.js.map +1 -1
  111. package/out/concepts/EnumItem__.d.ts +1 -1
  112. package/out/concepts/EnumItem__.js +1 -7
  113. package/out/concepts/EnumItem__.js.map +1 -1
  114. package/out/concepts/Enum__.js +3 -9
  115. package/out/concepts/Enum__.js.map +1 -1
  116. package/out/concepts/EventDeclaration__.js +4 -16
  117. package/out/concepts/EventDeclaration__.js.map +1 -1
  118. package/out/concepts/Event__.js +5 -15
  119. package/out/concepts/Event__.js.map +1 -1
  120. package/out/concepts/ExternalDestination__.d.ts +1 -1
  121. package/out/concepts/ExternalDestination__.js +1 -3
  122. package/out/concepts/ExternalDestination__.js.map +1 -1
  123. package/out/concepts/FieldPermissionV2__.js +2 -6
  124. package/out/concepts/FieldPermissionV2__.js.map +1 -1
  125. package/out/concepts/FlowConditionV2__.js +1 -3
  126. package/out/concepts/FlowConditionV2__.js.map +1 -1
  127. package/out/concepts/ForEachStatement__.d.ts +1 -1
  128. package/out/concepts/ForEachStatement__.js.map +1 -1
  129. package/out/concepts/FrontendLibrary__.js +2 -6
  130. package/out/concepts/FrontendLibrary__.js.map +1 -1
  131. package/out/concepts/FrontendType__.d.ts +0 -4
  132. package/out/concepts/FrontendType__.js +2 -15
  133. package/out/concepts/FrontendType__.js.map +1 -1
  134. package/out/concepts/FrontendVariable__.js +1 -3
  135. package/out/concepts/FrontendVariable__.js.map +1 -1
  136. package/out/concepts/Frontend__.d.ts +0 -2
  137. package/out/concepts/Frontend__.js +8 -31
  138. package/out/concepts/Frontend__.js.map +1 -1
  139. package/out/concepts/Function__.js +2 -6
  140. package/out/concepts/Function__.js.map +1 -1
  141. package/out/concepts/HistoryProcessV2__.js +4 -12
  142. package/out/concepts/HistoryProcessV2__.js.map +1 -1
  143. package/out/concepts/I18nInfo__.d.ts +1 -1
  144. package/out/concepts/I18nInfo__.js +5 -9
  145. package/out/concepts/I18nInfo__.js.map +1 -1
  146. package/out/concepts/IconSetter__.js +1 -7
  147. package/out/concepts/IconSetter__.js.map +1 -1
  148. package/out/concepts/Identifier__.js +7 -7
  149. package/out/concepts/Identifier__.js.map +1 -1
  150. package/out/concepts/ImportedInterface__.d.ts +1 -1
  151. package/out/concepts/ImportedInterface__.js +1 -3
  152. package/out/concepts/ImportedInterface__.js.map +1 -1
  153. package/out/concepts/InputSetter__.js +1 -7
  154. package/out/concepts/InputSetter__.js.map +1 -1
  155. package/out/concepts/Integration__.js.map +1 -1
  156. package/out/concepts/InterfaceParam__.js +4 -12
  157. package/out/concepts/InterfaceParam__.js.map +1 -1
  158. package/out/concepts/Interface__.js +8 -18
  159. package/out/concepts/Interface__.js.map +1 -1
  160. package/out/concepts/JSBlock__.js +1 -3
  161. package/out/concepts/JSBlock__.js.map +1 -1
  162. package/out/concepts/JavaLogic__.js +3 -9
  163. package/out/concepts/JavaLogic__.js.map +1 -1
  164. package/out/concepts/LogicDeclaration__.js +3 -13
  165. package/out/concepts/LogicDeclaration__.js.map +1 -1
  166. package/out/concepts/LogicItem__.js +5 -31
  167. package/out/concepts/LogicItem__.js.map +1 -1
  168. package/out/concepts/Logic__.d.ts +6 -6
  169. package/out/concepts/Logic__.js +25 -36
  170. package/out/concepts/Logic__.js.map +1 -1
  171. package/out/concepts/MatchCase__.d.ts +2 -2
  172. package/out/concepts/MatchCase__.js +11 -11
  173. package/out/concepts/MatchCase__.js.map +1 -1
  174. package/out/concepts/Match__.js +1 -3
  175. package/out/concepts/Match__.js.map +1 -1
  176. package/out/concepts/MemberExpression__.js +6 -2
  177. package/out/concepts/MemberExpression__.js.map +1 -1
  178. package/out/concepts/MetadataType__.d.ts +1 -1
  179. package/out/concepts/MetadataType__.js +4 -12
  180. package/out/concepts/MetadataType__.js.map +1 -1
  181. package/out/concepts/MicroApp__.js +7 -21
  182. package/out/concepts/MicroApp__.js.map +1 -1
  183. package/out/concepts/Module__.d.ts +2 -2
  184. package/out/concepts/Module__.js +8 -24
  185. package/out/concepts/Module__.js.map +1 -1
  186. package/out/concepts/Namespace__.js +4 -12
  187. package/out/concepts/Namespace__.js.map +1 -1
  188. package/out/concepts/NewComposite__.js +6 -10
  189. package/out/concepts/NewComposite__.js.map +1 -1
  190. package/out/concepts/NewList__.d.ts +1 -1
  191. package/out/concepts/NewList__.js.map +1 -1
  192. package/out/concepts/NewMap__.d.ts +1 -1
  193. package/out/concepts/NewMap__.js +5 -2
  194. package/out/concepts/NewMap__.js.map +1 -1
  195. package/out/concepts/NumberInputSetter__.js +5 -35
  196. package/out/concepts/NumberInputSetter__.js.map +1 -1
  197. package/out/concepts/NumericLiteral__.js +1 -3
  198. package/out/concepts/NumericLiteral__.js.map +1 -1
  199. package/out/concepts/OperatePermissionV2__.js +4 -12
  200. package/out/concepts/OperatePermissionV2__.js.map +1 -1
  201. package/out/concepts/OqlQueryComponent__.d.ts +1 -1
  202. package/out/concepts/OqlQueryComponent__.js +2 -6
  203. package/out/concepts/OqlQueryComponent__.js.map +1 -1
  204. package/out/concepts/OverriddenLogic__.js +12 -26
  205. package/out/concepts/OverriddenLogic__.js.map +1 -1
  206. package/out/concepts/ParamWithGroup__.js +2 -6
  207. package/out/concepts/ParamWithGroup__.js.map +1 -1
  208. package/out/concepts/Param__.d.ts +1 -1
  209. package/out/concepts/Param__.js +2 -14
  210. package/out/concepts/Param__.js.map +1 -1
  211. package/out/concepts/Point__.js +2 -6
  212. package/out/concepts/Point__.js.map +1 -1
  213. package/out/concepts/ProcessBindV2__.js +2 -6
  214. package/out/concepts/ProcessBindV2__.js.map +1 -1
  215. package/out/concepts/ProcessComponent__.js +4 -12
  216. package/out/concepts/ProcessComponent__.js.map +1 -1
  217. package/out/concepts/ProcessElementV2__.js +8 -24
  218. package/out/concepts/ProcessElementV2__.js.map +1 -1
  219. package/out/concepts/ProcessElement__.js +10 -22
  220. package/out/concepts/ProcessElement__.js.map +1 -1
  221. package/out/concepts/ProcessOutcome__.js +1 -3
  222. package/out/concepts/ProcessOutcome__.js.map +1 -1
  223. package/out/concepts/ProcessOutcomes__.js +0 -1
  224. package/out/concepts/ProcessOutcomes__.js.map +1 -1
  225. package/out/concepts/ProcessV2__.js +6 -18
  226. package/out/concepts/ProcessV2__.js.map +1 -1
  227. package/out/concepts/Process__.js +3 -9
  228. package/out/concepts/Process__.js.map +1 -1
  229. package/out/concepts/PropDeclaration__.d.ts +4 -0
  230. package/out/concepts/PropDeclaration__.js +19 -84
  231. package/out/concepts/PropDeclaration__.js.map +1 -1
  232. package/out/concepts/QueryAggregateExpression__.js +2 -6
  233. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  234. package/out/concepts/QueryFieldExpression__.js +4 -12
  235. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  236. package/out/concepts/QueryFromExpression__.js +3 -9
  237. package/out/concepts/QueryFromExpression__.js.map +1 -1
  238. package/out/concepts/QueryJoinExpression__.js +4 -12
  239. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  240. package/out/concepts/QueryLimitExpression__.js +12 -4
  241. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  242. package/out/concepts/QueryOrderByExpression__.js +6 -2
  243. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  244. package/out/concepts/QuerySelectExpression__.js +5 -7
  245. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  246. package/out/concepts/Rect__.js +4 -12
  247. package/out/concepts/Rect__.js.map +1 -1
  248. package/out/concepts/Return__.d.ts +1 -1
  249. package/out/concepts/Return__.js +2 -10
  250. package/out/concepts/Return__.js.map +1 -1
  251. package/out/concepts/Role__.d.ts +4 -4
  252. package/out/concepts/Role__.js +6 -14
  253. package/out/concepts/Role__.js.map +1 -1
  254. package/out/concepts/SelectMembers__.js +1 -3
  255. package/out/concepts/SelectMembers__.js.map +1 -1
  256. package/out/concepts/SetterOption__.js +6 -34
  257. package/out/concepts/SetterOption__.js.map +1 -1
  258. package/out/concepts/SlotDeclaration__.js +5 -23
  259. package/out/concepts/SlotDeclaration__.js.map +1 -1
  260. package/out/concepts/SqlQueryComponent__.js +4 -12
  261. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  262. package/out/concepts/StaticString__.d.ts +1 -1
  263. package/out/concepts/StaticString__.js +6 -10
  264. package/out/concepts/StaticString__.js.map +1 -1
  265. package/out/concepts/StringLiteral__.d.ts +1 -1
  266. package/out/concepts/StringLiteral__.js +2 -6
  267. package/out/concepts/StringLiteral__.js.map +1 -1
  268. package/out/concepts/StructureProperty__.d.ts +5 -5
  269. package/out/concepts/StructureProperty__.js +5 -13
  270. package/out/concepts/StructureProperty__.js.map +1 -1
  271. package/out/concepts/Structure__.d.ts +0 -4
  272. package/out/concepts/Structure__.js +9 -18
  273. package/out/concepts/Structure__.js.map +1 -1
  274. package/out/concepts/SwitchCase__.d.ts +1 -1
  275. package/out/concepts/SwitchCase__.js.map +1 -1
  276. package/out/concepts/SwitchStatement__.js.map +1 -1
  277. package/out/concepts/ThemeVariable__.js +1 -3
  278. package/out/concepts/ThemeVariable__.js.map +1 -1
  279. package/out/concepts/Theme__.js +2 -6
  280. package/out/concepts/Theme__.js.map +1 -1
  281. package/out/concepts/Transactional__.d.ts +2 -2
  282. package/out/concepts/Transactional__.js +6 -12
  283. package/out/concepts/Transactional__.js.map +1 -1
  284. package/out/concepts/TriggerEvent__.js +1 -3
  285. package/out/concepts/TriggerEvent__.js.map +1 -1
  286. package/out/concepts/TriggerLauncher__.js +3 -9
  287. package/out/concepts/TriggerLauncher__.js.map +1 -1
  288. package/out/concepts/TypeAnnotation__.d.ts +2 -2
  289. package/out/concepts/TypeAnnotation__.js +24 -31
  290. package/out/concepts/TypeAnnotation__.js.map +1 -1
  291. package/out/concepts/TypeParam__.js +1 -3
  292. package/out/concepts/TypeParam__.js.map +1 -1
  293. package/out/concepts/UnaryExpression__.js +1 -3
  294. package/out/concepts/UnaryExpression__.js.map +1 -1
  295. package/out/concepts/Unparsed__.js +1 -3
  296. package/out/concepts/Unparsed__.js.map +1 -1
  297. package/out/concepts/UseComponent__.js +2 -6
  298. package/out/concepts/UseComponent__.js.map +1 -1
  299. package/out/concepts/ValidationRule__.js +3 -17
  300. package/out/concepts/ValidationRule__.js.map +1 -1
  301. package/out/concepts/Variable__.d.ts +1 -1
  302. package/out/concepts/Variable__.js +2 -10
  303. package/out/concepts/Variable__.js.map +1 -1
  304. package/out/concepts/ViewBlockWithImage__.js +2 -6
  305. package/out/concepts/ViewBlockWithImage__.js.map +1 -1
  306. package/out/concepts/ViewBlock__.js +3 -13
  307. package/out/concepts/ViewBlock__.js.map +1 -1
  308. package/out/concepts/ViewComponentDeclaration__.d.ts +1 -1
  309. package/out/concepts/ViewComponentDeclaration__.js +8 -36
  310. package/out/concepts/ViewComponentDeclaration__.js.map +1 -1
  311. package/out/concepts/ViewElement__.js +82 -72
  312. package/out/concepts/ViewElement__.js.map +1 -1
  313. package/out/concepts/View__.js +22 -40
  314. package/out/concepts/View__.js.map +1 -1
  315. package/out/generator/genBundleFiles.js +1 -0
  316. package/out/generator/genBundleFiles.js.map +1 -1
  317. package/out/generator/release-body/utils.js +2 -1
  318. package/out/generator/release-body/utils.js.map +1 -1
  319. package/out/natural/genNaturalTS.js +1 -0
  320. package/out/natural/genNaturalTS.js.map +1 -1
  321. package/out/server/naslServer.js +24 -10
  322. package/out/server/naslServer.js.map +1 -1
  323. package/out/server/translator.js +54 -0
  324. package/out/server/translator.js.map +1 -1
  325. package/out/utils/env.d.ts +2 -0
  326. package/out/utils/env.js +3 -1
  327. package/out/utils/env.js.map +1 -1
  328. package/package.json +1 -1
  329. package/src/common/BaseNode.ts +3 -1
  330. package/src/concepts/AnonymousFunction__.ts +1 -1
  331. package/src/concepts/App__.ts +9 -27
  332. package/src/concepts/Argument__.ts +3 -7
  333. package/src/concepts/AssigneeV2__.ts +0 -2
  334. package/src/concepts/Assignee__.ts +0 -2
  335. package/src/concepts/AssignmentLine__.ts +0 -2
  336. package/src/concepts/Assignment__.ts +2 -4
  337. package/src/concepts/Attribute__.ts +9 -21
  338. package/src/concepts/AuthInterface__.ts +1 -3
  339. package/src/concepts/AuthLogicForCallInterface__.ts +4 -5
  340. package/src/concepts/AuthLogic__.ts +1 -3
  341. package/src/concepts/BackendVariable__.ts +5 -11
  342. package/src/concepts/Backend__.ts +1 -3
  343. package/src/concepts/BatchAssignment__.ts +4 -4
  344. package/src/concepts/BinaryExpression__.ts +9 -7
  345. package/src/concepts/BindAttribute__.ts +26 -38
  346. package/src/concepts/BindDirective__.ts +13 -27
  347. package/src/concepts/BindEvent__.ts +7 -13
  348. package/src/concepts/BindStyle__.ts +1 -3
  349. package/src/concepts/BooleanLiteral__.ts +1 -3
  350. package/src/concepts/BusinessComponent__.ts +16 -20
  351. package/src/concepts/BusinessLogic__.ts +7 -10
  352. package/src/concepts/CallConnector__.ts +3 -7
  353. package/src/concepts/CallEvent__.ts +2 -6
  354. package/src/concepts/CallFunction__.ts +6 -13
  355. package/src/concepts/CallInterface__.ts +8 -15
  356. package/src/concepts/CallLogic__.ts +37 -44
  357. package/src/concepts/CallQueryComponent__.ts +9 -22
  358. package/src/concepts/Comment__.ts +1 -3
  359. package/src/concepts/CompletionProperty__.ts +5 -15
  360. package/src/concepts/ConfigGroup__.ts +2 -7
  361. package/src/concepts/ConfigPropertyValue__.ts +3 -15
  362. package/src/concepts/ConfigProperty__.ts +3 -9
  363. package/src/concepts/Configuration__.ts +1 -4
  364. package/src/concepts/Connection__.ts +3 -9
  365. package/src/concepts/ConnectorLogic__.ts +2 -4
  366. package/src/concepts/ConnectorTriggerLauncher__.ts +13 -11
  367. package/src/concepts/ConnectorTrigger__.ts +12 -12
  368. package/src/concepts/Connector__.ts +3 -9
  369. package/src/concepts/Constant__.ts +2 -6
  370. package/src/concepts/CountersignPolicyV2__.ts +1 -3
  371. package/src/concepts/CountersignPolicy__.ts +1 -3
  372. package/src/concepts/DataSource__.ts +16 -18
  373. package/src/concepts/DatabaseTypeAnnotation__.ts +6 -11
  374. package/src/concepts/Destination__.ts +3 -9
  375. package/src/concepts/EntityIndex__.ts +6 -15
  376. package/src/concepts/EntityProperty__.ts +35 -56
  377. package/src/concepts/Entity__.ts +7 -17
  378. package/src/concepts/EnumItem__.ts +7 -9
  379. package/src/concepts/Enum__.ts +3 -9
  380. package/src/concepts/EventDeclaration__.ts +5 -13
  381. package/src/concepts/Event__.ts +5 -15
  382. package/src/concepts/ExternalDestination__.ts +2 -4
  383. package/src/concepts/FieldPermissionV2__.ts +2 -6
  384. package/src/concepts/FlowConditionV2__.ts +1 -3
  385. package/src/concepts/ForEachStatement__.ts +1 -1
  386. package/src/concepts/FrontendLibrary__.ts +2 -6
  387. package/src/concepts/FrontendType__.ts +2 -14
  388. package/src/concepts/FrontendVariable__.ts +1 -3
  389. package/src/concepts/Frontend__.ts +11 -35
  390. package/src/concepts/Function__.ts +2 -6
  391. package/src/concepts/HistoryProcessV2__.ts +4 -12
  392. package/src/concepts/I18nInfo__.ts +8 -15
  393. package/src/concepts/IconSetter__.ts +2 -4
  394. package/src/concepts/Identifier__.ts +9 -10
  395. package/src/concepts/ImportedInterface__.ts +2 -4
  396. package/src/concepts/InputSetter__.ts +2 -4
  397. package/src/concepts/Integration__.ts +0 -1
  398. package/src/concepts/InterfaceParam__.ts +4 -12
  399. package/src/concepts/InterfaceTriggerEvent__.ts +1 -1
  400. package/src/concepts/Interface__.ts +10 -21
  401. package/src/concepts/JSBlock__.ts +1 -3
  402. package/src/concepts/JavaLogic__.ts +3 -9
  403. package/src/concepts/LogicDeclaration__.ts +4 -10
  404. package/src/concepts/LogicItem__.ts +9 -19
  405. package/src/concepts/Logic__.ts +43 -47
  406. package/src/concepts/MatchCase__.ts +12 -12
  407. package/src/concepts/Match__.ts +11 -8
  408. package/src/concepts/MemberExpression__.ts +8 -2
  409. package/src/concepts/MetadataType__.ts +9 -16
  410. package/src/concepts/MicroApp__.ts +7 -21
  411. package/src/concepts/Module__.ts +10 -26
  412. package/src/concepts/Namespace__.ts +4 -12
  413. package/src/concepts/NewComposite__.ts +18 -16
  414. package/src/concepts/NewList__.ts +1 -1
  415. package/src/concepts/NewMap__.ts +15 -6
  416. package/src/concepts/NumberInputSetter__.ts +10 -20
  417. package/src/concepts/NumericLiteral__.ts +1 -3
  418. package/src/concepts/OperatePermissionV2__.ts +4 -12
  419. package/src/concepts/OqlQueryComponent__.ts +3 -7
  420. package/src/concepts/OverriddenLogic__.ts +15 -25
  421. package/src/concepts/ParamWithGroup__.ts +2 -6
  422. package/src/concepts/Param__.ts +5 -9
  423. package/src/concepts/Point__.ts +2 -6
  424. package/src/concepts/ProcessBindV2__.ts +2 -6
  425. package/src/concepts/ProcessComponent__.ts +4 -12
  426. package/src/concepts/ProcessElementV2__.ts +11 -27
  427. package/src/concepts/ProcessElement__.ts +13 -23
  428. package/src/concepts/ProcessOutcome__.ts +1 -3
  429. package/src/concepts/ProcessOutcomes__.ts +0 -1
  430. package/src/concepts/ProcessV2__.ts +11 -19
  431. package/src/concepts/Process__.ts +3 -9
  432. package/src/concepts/PropDeclaration__.ts +31 -57
  433. package/src/concepts/QueryAggregateExpression__.ts +3 -8
  434. package/src/concepts/QueryFieldExpression__.ts +23 -30
  435. package/src/concepts/QueryFromExpression__.ts +3 -9
  436. package/src/concepts/QueryJoinExpression__.ts +5 -14
  437. package/src/concepts/QueryLimitExpression__.ts +16 -4
  438. package/src/concepts/QueryOrderByExpression__.ts +22 -13
  439. package/src/concepts/QuerySelectExpression__.ts +8 -13
  440. package/src/concepts/Rect__.ts +4 -12
  441. package/src/concepts/Return__.ts +4 -8
  442. package/src/concepts/Role__.ts +8 -16
  443. package/src/concepts/SelectMembers__.ts +1 -3
  444. package/src/concepts/SetterOption__.ts +10 -22
  445. package/src/concepts/SlotDeclaration__.ts +7 -17
  446. package/src/concepts/SqlQueryComponent__.ts +5 -13
  447. package/src/concepts/StaticString__.ts +9 -16
  448. package/src/concepts/StringLiteral__.ts +5 -11
  449. package/src/concepts/StructureProperty__.ts +10 -18
  450. package/src/concepts/Structure__.ts +10 -18
  451. package/src/concepts/SwitchCase__.ts +1 -1
  452. package/src/concepts/SwitchStatement__.ts +1 -1
  453. package/src/concepts/ThemeVariable__.ts +1 -3
  454. package/src/concepts/Theme__.ts +2 -6
  455. package/src/concepts/Transactional__.ts +10 -19
  456. package/src/concepts/TriggerEvent__.ts +1 -3
  457. package/src/concepts/TriggerLauncher__.ts +11 -15
  458. package/src/concepts/TypeAnnotation__.ts +50 -41
  459. package/src/concepts/TypeParam__.ts +1 -3
  460. package/src/concepts/UnaryExpression__.ts +1 -3
  461. package/src/concepts/Unparsed__.ts +1 -3
  462. package/src/concepts/UseComponent__.ts +2 -6
  463. package/src/concepts/ValidationRule__.ts +5 -11
  464. package/src/concepts/Variable__.ts +4 -8
  465. package/src/concepts/ViewBlockWithImage__.ts +2 -6
  466. package/src/concepts/ViewBlock__.ts +4 -10
  467. package/src/concepts/ViewComponentDeclaration__.ts +11 -27
  468. package/src/concepts/ViewElement__.ts +219 -146
  469. package/src/concepts/View__.ts +40 -54
  470. package/src/generator/genBundleFiles.ts +2 -1
  471. package/src/generator/release-body/utils.ts +2 -1
  472. package/src/natural/genNaturalTS.ts +1 -0
  473. package/src/server/naslServer.ts +24 -10
  474. package/src/server/translator.ts +56 -0
  475. package/src/utils/env.ts +2 -0
@@ -16,7 +16,12 @@ import type Param from './Param__';
16
16
  import type View from './View__';
17
17
  import { getNodeByNodeCallee, getNaslNodeByNodeCallee } from '../automate/engine/utils';
18
18
  import { findConceptKeyWordIndexFromNamespace } from '../utils';
19
- import { getBusinessComponentCallExpressionQuickInfo, getCallExpressionQuickInfo, GetCode, Range } from './utils/quick-info';
19
+ import {
20
+ getBusinessComponentCallExpressionQuickInfo,
21
+ getCallExpressionQuickInfo,
22
+ GetCode,
23
+ Range,
24
+ } from './utils/quick-info';
20
25
  import type { ViewElement, ElementToVueOptions } from './ViewElement__';
21
26
  import type { MemberExpression } from './MemberExpression__';
22
27
  import type { StringLiteral } from './StringLiteral__';
@@ -62,42 +67,32 @@ export class CallLogic extends LogicItem {
62
67
  /**
63
68
  * 唯一标识
64
69
  */
65
- @property({
66
- objectRef: '',
67
- })
70
+ @property()
68
71
  uuid: string = createUUID();
69
72
 
70
73
  /**
71
74
  * calleeNamespace
72
75
  */
73
- @property({
74
- objectRef: '',
75
- })
76
+ @property()
76
77
  calleeNamespace: string;
77
78
 
78
79
  /**
79
80
  * calleeName
80
81
  */
81
- @property({
82
- objectRef: '',
83
- })
82
+ @property()
84
83
  calleeName: string;
85
84
 
86
85
  /**
87
86
  * shortcut
88
87
  */
89
- @property({
90
- objectRef: '',
91
- })
92
- shortcut: boolean;
88
+ @property()
89
+ shortcut?: boolean;
93
90
 
94
91
  /**
95
92
  * handleError
96
93
  */
97
- @property({
98
- objectRef: '',
99
- })
100
- handleError: boolean;
94
+ @property()
95
+ handleError?: boolean;
101
96
 
102
97
  /**
103
98
  * 类型参数
@@ -107,7 +102,7 @@ export class CallLogic extends LogicItem {
107
102
  isArray: true,
108
103
  defaultValue: null,
109
104
  })
110
- typeArguments?: Array<TypeAnnotation> = null;
105
+ typeArguments?: Array<TypeAnnotation>;
111
106
 
112
107
  /**
113
108
  * 实际参数
@@ -125,15 +120,13 @@ export class CallLogic extends LogicItem {
125
120
  @property({
126
121
  objectRef: 'BindAttribute',
127
122
  })
128
- validation: BindAttribute;
123
+ validation?: BindAttribute;
129
124
 
130
125
  /**
131
126
  * 是否被折叠
132
127
  */
133
- @property({
134
- objectRef: '',
135
- })
136
- isAdvancedSettingFolded: boolean;
128
+ @property()
129
+ isAdvancedSettingFolded?: boolean;
137
130
 
138
131
  /**
139
132
  * @param source 需要合并的部分参数
@@ -662,19 +655,19 @@ export class CallLogic extends LogicItem {
662
655
 
663
656
  if (['data-source', 'dataSource'].includes(bindAttr?.name)) {
664
657
  const currentElement = this.getAncestor('ViewElement') as ViewElement;
665
- let currentIndex = 0
666
- let targetElement = currentElement.parentNode
667
- const currentParamList: string[] = []
668
- while(asserts.isViewElement(targetElement)) {
669
- if (targetElement.tag === 'template' && targetElement.haveScope()) {
670
- currentIndex += 1
671
- }
672
- targetElement = targetElement.parentNode
658
+ let currentIndex = 0;
659
+ let targetElement = currentElement.parentNode;
660
+ const currentParamList: string[] = [];
661
+ while (asserts.isViewElement(targetElement)) {
662
+ if (targetElement.tag === 'template' && targetElement.haveScope()) {
663
+ currentIndex += 1;
673
664
  }
674
- for (let i = 0; i < currentIndex; i++) {
675
- currentParamList.push(`,current${i === 0 ? '' : i}`)
676
- }
677
- code += `(params)=>__${currentElement.name}_handleDataSourceLoad(params${currentParamList.join('')})`;
665
+ targetElement = targetElement.parentNode;
666
+ }
667
+ for (let i = 0; i < currentIndex; i++) {
668
+ currentParamList.push(`,current${i === 0 ? '' : i}`);
669
+ }
670
+ code += `(params)=>__${currentElement.name}_handleDataSourceLoad(params${currentParamList.join('')})`;
678
671
  return code;
679
672
  }
680
673
  if (calleeName === 'jsonSerialize') {
@@ -1135,7 +1128,9 @@ export class CallLogic extends LogicItem {
1135
1128
  get isSpecificProcessLogic() {
1136
1129
  return (
1137
1130
  this.calleeNamespace === 'nasl.processV2' &&
1138
- ['launchProcess', 'transferTask', 'submitTask', 'rejectTask', 'approveTask', 'getTaskData'].includes(this.calleeName)
1131
+ ['launchProcess', 'transferTask', 'submitTask', 'rejectTask', 'approveTask', 'getTaskData'].includes(
1132
+ this.calleeName,
1133
+ )
1139
1134
  );
1140
1135
  }
1141
1136
 
@@ -1453,8 +1448,7 @@ export class CallLogic extends LogicItem {
1453
1448
  } else {
1454
1449
  // 页面逻辑先都非必填
1455
1450
  let argStr = arg.toTextualNASL(shiftState(state, code, { tabSize: 0 }), paramRequired);
1456
- if (argStr.startsWith('elements.$ce.'))
1457
- argStr = argStr.replace('elements.$ce.', '$currentElement.');
1451
+ if (argStr.startsWith('elements.$ce.')) argStr = argStr.replace('elements.$ce.', '$currentElement.');
1458
1452
  code += argStr;
1459
1453
  }
1460
1454
  if (index !== logicArgs.length - 1) code += ', ';
@@ -1468,8 +1462,7 @@ export class CallLogic extends LogicItem {
1468
1462
  } else {
1469
1463
  // 取到是不是必填放入参数中
1470
1464
  let argStr = arg.toTextualNASL(shiftState(state, code, { tabSize: 0 }), arg?.paramRequired);
1471
- if (argStr.startsWith('elements.$ce.'))
1472
- argStr = argStr.replace('elements.$ce.', '$currentElement.');
1465
+ if (argStr.startsWith('elements.$ce.')) argStr = argStr.replace('elements.$ce.', '$currentElement.');
1473
1466
  code += argStr;
1474
1467
  }
1475
1468
  if (index !== logicArgs.length - 1) code += ', ';
@@ -1538,7 +1531,8 @@ export class CallLogic extends LogicItem {
1538
1531
  line: range.start.line + lineOffset + 1,
1539
1532
  offset: characterOffset,
1540
1533
  };
1541
- } else if (this.getAncestor('BusinessComponent')) { // 怕改坏其他地方,业务组件单独处理
1534
+ } else if (this.getAncestor('BusinessComponent')) {
1535
+ // 怕改坏其他地方,业务组件单独处理
1542
1536
  return getBusinessComponentCallExpressionQuickInfo(range, getCode);
1543
1537
  } else {
1544
1538
  return getCallExpressionQuickInfo(range, getCode);
@@ -1563,8 +1557,7 @@ export class CallLogic extends LogicItem {
1563
1557
  const logicParams = node?.params ?? [];
1564
1558
 
1565
1559
  callArguments.forEach((arg, index) => {
1566
- if (!arg)
1567
- return;
1560
+ if (!arg) return;
1568
1561
  const param = logicParams[index] || ({} as Param);
1569
1562
  arg.paramRequired = Boolean(!param?.defaultValue?.expression);
1570
1563
  arg.paramTypeAnnotation = undefined;
@@ -64,7 +64,7 @@ export class CallQueryComponent extends LogicItem {
64
64
  @property({
65
65
  objectRef: 'TypeAnnotation',
66
66
  })
67
- typeAnnotation: TypeAnnotation;
67
+ typeAnnotation?: TypeAnnotation;
68
68
 
69
69
  /**
70
70
  * select
@@ -116,7 +116,7 @@ export class CallQueryComponent extends LogicItem {
116
116
  @property({
117
117
  objectRef: 'LogicItem',
118
118
  })
119
- having: LogicItem;
119
+ having?: LogicItem;
120
120
 
121
121
  /**
122
122
  * having 草稿态
@@ -149,9 +149,7 @@ export class CallQueryComponent extends LogicItem {
149
149
  /**
150
150
  * 查询组件的局部版本
151
151
  */
152
- @property({
153
- objectRef: '',
154
- })
152
+ @property()
155
153
  ideVersion: string;
156
154
 
157
155
  /**
@@ -774,7 +772,7 @@ export class CallQueryComponent extends LogicItem {
774
772
  };
775
773
  }
776
774
 
777
- *toEmbeddedTSOfSubPart<T extends { toEmbeddedTS: (state?: TranslatorState) => TranslatorGenerator; }>(
775
+ *toEmbeddedTSOfSubPart<T extends { toEmbeddedTS: (state?: TranslatorState) => TranslatorGenerator }>(
778
776
  key: string,
779
777
  list: Array<T>,
780
778
  options: {
@@ -1199,15 +1197,7 @@ export class CallQueryComponent extends LogicItem {
1199
1197
  // 2.1.1. `COUNT`、`COUNTD` 返回 `Long`
1200
1198
  typeName = 'Long';
1201
1199
  } else if (['AVG'].includes(selectElements[0].aggregateName)) {
1202
- const { entityAsName, propertyName } = selectElements[0].aggregateParam;
1203
- const entity = entities.find((item: Entity) => item.name === entityAsName);
1204
- const property = entity?.properties.find((item: any) => item.name === propertyName);
1205
- const propertyTypeName = property?.typeAnnotation?.typeName;
1206
- if (propertyTypeName === 'Decimal') {
1207
- typeName = 'Decimal';
1208
- } else {
1209
- typeName = 'Double';
1210
- }
1200
+ typeName = 'Decimal';
1211
1201
  } else {
1212
1202
  // 2.1.3. 其他返回列类型,包含:`Long`、`Long`、`Double`
1213
1203
  const { entityAsName, propertyName } = selectElements[0].aggregateParam;
@@ -1328,7 +1318,7 @@ export class CallQueryComponent extends LogicItem {
1328
1318
  }
1329
1319
  }
1330
1320
  }
1331
- } catch { }
1321
+ } catch {}
1332
1322
  }
1333
1323
 
1334
1324
  getEntityInfos(node: QueryFromExpression | QueryJoinExpression, set = new Set()) {
@@ -1563,8 +1553,7 @@ export class CallQueryComponent extends LogicItem {
1563
1553
  code += ' ';
1564
1554
  code += this.from.toNaturalSQL(shiftState(state, code, { inline: true }));
1565
1555
 
1566
- if (this.where)
1567
- code += '\nWHERE ' + this.where.toNaturalSQL(shiftState(state, code, { inline: true }));
1556
+ if (this.where) code += '\nWHERE ' + this.where.toNaturalSQL(shiftState(state, code, { inline: true }));
1568
1557
  if (this.groupBy.length) {
1569
1558
  code += '\nGROUP BY ';
1570
1559
  this.groupBy.forEach((groupExpression, index) => {
@@ -1572,8 +1561,7 @@ export class CallQueryComponent extends LogicItem {
1572
1561
  if (index !== this.groupBy.length - 1) code += ', ';
1573
1562
  });
1574
1563
  }
1575
- if (this.having)
1576
- code += '\nHAVING ' + this.having.toNaturalSQL(shiftState(state, code, { inline: true }));
1564
+ if (this.having) code += '\nHAVING ' + this.having.toNaturalSQL(shiftState(state, code, { inline: true }));
1577
1565
  if (this.orderBy.length) {
1578
1566
  code += '\nORDER BY ';
1579
1567
  this.orderBy.forEach((orderExpression, index) => {
@@ -1581,8 +1569,7 @@ export class CallQueryComponent extends LogicItem {
1581
1569
  if (index !== this.orderBy.length - 1) code += ', ';
1582
1570
  });
1583
1571
  }
1584
- if (this.limit)
1585
- code += '\nLIMIT ' + this.limit.toNaturalSQL(shiftState(state, code, { inline: true }));
1572
+ if (this.limit) code += '\nLIMIT ' + this.limit.toNaturalSQL(shiftState(state, code, { inline: true }));
1586
1573
 
1587
1574
  return code;
1588
1575
  }
@@ -47,9 +47,7 @@ export class Comment extends LogicItem {
47
47
  /**
48
48
  * 注释内容
49
49
  */
50
- @property({
51
- objectRef: '',
52
- })
50
+ @property()
53
51
  value: string;
54
52
 
55
53
  /**
@@ -37,33 +37,25 @@ export class CompletionProperty extends BaseNode {
37
37
  /**
38
38
  * 自动补全属性名称
39
39
  */
40
- @property({
41
- objectRef: '',
42
- })
40
+ @property()
43
41
  name: string = '';
44
42
 
45
43
  /**
46
44
  * 自动补全属性的值
47
45
  */
48
- @property({
49
- objectRef: '',
50
- })
46
+ @property()
51
47
  value: string;
52
48
 
53
49
  /**
54
50
  * 自动补全属性标题
55
51
  */
56
- @property({
57
- objectRef: '',
58
- })
52
+ @property()
59
53
  label: string;
60
54
 
61
55
  /**
62
56
  * 自动补全属性描述
63
57
  */
64
- @property({
65
- objectRef: '',
66
- })
58
+ @property()
67
59
  description: string;
68
60
 
69
61
  /**
@@ -77,9 +69,7 @@ export class CompletionProperty extends BaseNode {
77
69
  /**
78
70
  * 默认值
79
71
  */
80
- @property({
81
- objectRef: '',
82
- })
72
+ @property()
83
73
  defaultValue: string;
84
74
 
85
75
  /**
@@ -1,7 +1,4 @@
1
- import {
2
- withSourceMap,
3
- createCompilerState,
4
- } from '../translator';
1
+ import { withSourceMap, createCompilerState } from '../translator';
5
2
  import Namespace from './Namespace__';
6
3
  //================================================================================
7
4
  // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
@@ -41,9 +38,7 @@ export class ConfigGroup extends BaseNode {
41
38
  /**
42
39
  * 配置组名称
43
40
  */
44
- @property({
45
- objectRef: '',
46
- })
41
+ @property()
47
42
  name: string = '';
48
43
 
49
44
  /**
@@ -1,7 +1,4 @@
1
- import {
2
- withSourceMap,
3
- createCompilerState,
4
- } from '../translator';
1
+ import { withSourceMap, createCompilerState } from '../translator';
5
2
  //================================================================================
6
3
  // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
7
4
  // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
@@ -39,17 +36,13 @@ export class ConfigPropertyValue extends BaseNode {
39
36
  /**
40
37
  * env
41
38
  */
42
- @property({
43
- objectRef: '',
44
- })
39
+ @property()
45
40
  env: string;
46
41
 
47
42
  /**
48
43
  * 配置属性值的值
49
44
  */
50
- @property({
51
- objectRef: '',
52
- })
45
+ @property()
53
46
  value: string;
54
47
 
55
48
  /**
@@ -89,11 +82,6 @@ export class ConfigPropertyValue extends BaseNode {
89
82
  });
90
83
  }
91
84
 
92
- @withSourceMap()
93
- toNaturalTS(state = createCompilerState()): string {
94
- return '';
95
- }
96
-
97
85
  //================================================================================
98
86
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
99
87
  // 自动生成的代码已结束。下面可以手动编写。
@@ -52,17 +52,13 @@ export class ConfigProperty extends BaseNode {
52
52
  /**
53
53
  * 配置属性名称
54
54
  */
55
- @property({
56
- objectRef: '',
57
- })
55
+ @property()
58
56
  name: string = '';
59
57
 
60
58
  /**
61
59
  * 配置属性描述
62
60
  */
63
- @property({
64
- objectRef: '',
65
- })
61
+ @property()
66
62
  description: string;
67
63
 
68
64
  /**
@@ -78,9 +74,7 @@ export class ConfigProperty extends BaseNode {
78
74
  /**
79
75
  * isPrivate
80
76
  */
81
- @property({
82
- objectRef: '',
83
- })
77
+ @property()
84
78
  isPrivate: boolean;
85
79
 
86
80
  /**
@@ -1,7 +1,4 @@
1
- import {
2
- withSourceMap,
3
- createCompilerState,
4
- } from '../translator';
1
+ import { withSourceMap, createCompilerState } from '../translator';
5
2
  import type App from './App__';
6
3
  import ConfigProperty from './ConfigProperty__';
7
4
  //================================================================================
@@ -51,25 +51,19 @@ export class Connection extends BaseNode {
51
51
  /**
52
52
  * namespace
53
53
  */
54
- @property({
55
- objectRef: '',
56
- })
54
+ @property()
57
55
  namespace: string;
58
56
 
59
57
  /**
60
58
  * 连接名称
61
59
  */
62
- @property({
63
- objectRef: '',
64
- })
60
+ @property()
65
61
  name: string = '';
66
62
 
67
63
  /**
68
64
  * 连接标题
69
65
  */
70
- @property({
71
- objectRef: '',
72
- })
66
+ @property()
73
67
  title: string;
74
68
 
75
69
  /**
@@ -6,9 +6,9 @@ import { EventPayload, Params } from '../common/EventEmitter';
6
6
  import { concept, excludedInJSON, property, getConceptConstructor } from '../decorators';
7
7
 
8
8
  import * as utils from '../utils';
9
+ import { createUUID } from '../utils/create';
9
10
  import * as types from './utils/types';
10
11
  import * as asserts from './utils/asserts';
11
- import { v4 as uuidv4 } from 'uuid';
12
12
 
13
13
  import Logic from './Logic__';
14
14
 
@@ -36,9 +36,7 @@ export class ConnectorLogic extends Logic {
36
36
  /**
37
37
  * 模式类型
38
38
  */
39
- @property({
40
- objectRef: '',
41
- })
39
+ @property()
42
40
  kind: 'http' | 'pipeline';
43
41
 
44
42
  /**
@@ -7,9 +7,9 @@ import { EventPayload, Params } from '../common/EventEmitter';
7
7
  import { concept, excludedInJSON, property, getConceptConstructor } from '../decorators';
8
8
 
9
9
  import * as utils from '../utils';
10
+ import { createUUID } from '../utils/create';
10
11
  import * as types from './utils/types';
11
12
  import * as asserts from './utils/asserts';
12
- import { v4 as uuidv4 } from 'uuid';
13
13
 
14
14
  import TriggerLauncher from './TriggerLauncher__';
15
15
 
@@ -37,17 +37,13 @@ export class ConnectorTriggerLauncher extends TriggerLauncher {
37
37
  /**
38
38
  * calleeConnectionName
39
39
  */
40
- @property({
41
- objectRef: '',
42
- })
40
+ @property()
43
41
  calleeConnectionName: string;
44
42
 
45
43
  /**
46
44
  * 连接器触发器启动器标题
47
45
  */
48
- @property({
49
- objectRef: '',
50
- })
46
+ @property()
51
47
  title: string;
52
48
 
53
49
  /**
@@ -93,16 +89,22 @@ export class ConnectorTriggerLauncher extends TriggerLauncher {
93
89
  //================================================================================
94
90
 
95
91
  get connector() {
96
- const connectorName = this.calleeNamespace.split('.')?.[1]
97
- return (this.getAncestor('App') as App)?.connectorDependencies?.find(connector => connector.name === connectorName);
92
+ const connectorName = this.calleeNamespace.split('.')?.[1];
93
+ return (this.getAncestor('App') as App)?.connectorDependencies?.find(
94
+ (connector) => connector.name === connectorName,
95
+ );
98
96
  }
99
97
 
100
98
  get connection() {
101
- return (this.getAncestor('App') as App)?.connections?.find(connection => connection.namespace === this.calleeNamespace && connection.name === (this as ConnectorTriggerLauncher).calleeConnectionName)
99
+ return (this.getAncestor('App') as App)?.connections?.find(
100
+ (connection) =>
101
+ connection.namespace === this.calleeNamespace &&
102
+ connection.name === (this as ConnectorTriggerLauncher).calleeConnectionName,
103
+ );
102
104
  }
103
105
 
104
106
  get connectorTrigger() {
105
- return this.connector?.triggers?.find(trigger => trigger.name === this.calleeName)
107
+ return this.connector?.triggers?.find((trigger) => trigger.name === this.calleeName);
106
108
  }
107
109
  //================================================================================
108
110
  // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
@@ -56,17 +56,13 @@ export class ConnectorTrigger extends BaseNode {
56
56
  /**
57
57
  * 连接器触发器名称
58
58
  */
59
- @property({
60
- objectRef: '',
61
- })
59
+ @property()
62
60
  name: string = '';
63
61
 
64
62
  /**
65
63
  * 连接器触发器标题
66
64
  */
67
- @property({
68
- objectRef: '',
69
- })
65
+ @property()
70
66
  title: string = '';
71
67
 
72
68
  /**
@@ -213,22 +209,26 @@ export class ConnectorTrigger extends BaseNode {
213
209
  let code = '';
214
210
  code += `export function ${self.tsName} () {\n`;
215
211
  try {
216
- code += `let params:`
212
+ code += `let params:`;
217
213
  if (this?.triggerEvent?.callBackLogic?.typeArguments?.[0]) {
218
- code += `${yield* this?.triggerEvent?.callBackLogic?.typeArguments?.[0]?.toEmbeddedTS?.(shiftState(state, code))}\n`
214
+ code += `${yield* this?.triggerEvent?.callBackLogic?.typeArguments?.[0]?.toEmbeddedTS?.(
215
+ shiftState(state, code),
216
+ )}\n`;
219
217
  } else {
220
- code += 'undefined;\n'
218
+ code += 'undefined;\n';
221
219
  }
222
220
  code += `let result:`;
223
221
  if (this?.triggerEvent?.callBackLogic?.returnType?.[0]) {
224
- code += `${yield* this?.triggerEvent?.callBackLogic?.returnType?.[0]?.toEmbeddedTS?.(shiftState(state, code))}\n`
222
+ code += `${yield* this?.triggerEvent?.callBackLogic?.returnType?.[0]?.toEmbeddedTS?.(
223
+ shiftState(state, code),
224
+ )}\n`;
225
225
  } else {
226
- code += 'void;\n'
226
+ code += 'void;\n';
227
227
  }
228
228
  code += `return {
229
229
  params,
230
230
  result
231
- }\n`
231
+ }\n`;
232
232
  // code += ';\n';
233
233
  code += '}\n';
234
234
  } catch (error) {
@@ -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
  /**
@@ -36,9 +36,7 @@ export class CountersignPolicyV2 extends ApprovalPolicyV2 {
36
36
  /**
37
37
  * 通过百分比
38
38
  */
39
- @property({
40
- objectRef: '',
41
- })
39
+ @property()
42
40
  passPercent: number;
43
41
 
44
42
  /**
@@ -36,9 +36,7 @@ export class CountersignPolicy extends MultiApprovalPolicy {
36
36
  /**
37
37
  * 通过百分比
38
38
  */
39
- @property({
40
- objectRef: '',
41
- })
39
+ @property()
42
40
  passPercent: number;
43
41
 
44
42
  /**