@lcap/nasl 3.4.0-beta.5 → 3.4.0-beta.6

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 (831) hide show
  1. package/.nyc_output/b920244d-8d01-4e76-be5a-95132217c5a1.json +1 -0
  2. package/.nyc_output/processinfo/b920244d-8d01-4e76-be5a-95132217c5a1.json +1 -0
  3. package/.nyc_output/processinfo/index.json +1 -0
  4. package/coverage/base.css +224 -0
  5. package/coverage/block-navigation.js +87 -0
  6. package/coverage/favicon.png +0 -0
  7. package/coverage/index.html +461 -0
  8. package/coverage/prettify.css +1 -0
  9. package/coverage/prettify.js +2 -0
  10. package/coverage/sort-arrow-sprite.png +0 -0
  11. package/coverage/sorter.js +196 -0
  12. package/coverage/src/automate/engine/index.html +116 -0
  13. package/coverage/src/automate/engine/utils.js.html +1414 -0
  14. package/coverage/src/bak/index.html +116 -0
  15. package/coverage/src/bak/translator.js.html +631 -0
  16. package/coverage/src/breakpoint/generator/AfterStartNode.ts.html +175 -0
  17. package/coverage/src/breakpoint/generator/BeforeEndNode.ts.html +169 -0
  18. package/coverage/src/breakpoint/generator/BreakpointNode.ts.html +1246 -0
  19. package/coverage/src/breakpoint/generator/CallbackNode.ts.html +145 -0
  20. package/coverage/src/breakpoint/generator/index.html +176 -0
  21. package/coverage/src/breakpoint/generator/index.ts.html +508 -0
  22. package/coverage/src/breakpoint/index.html +116 -0
  23. package/coverage/src/breakpoint/index.ts.html +94 -0
  24. package/coverage/src/breakpoint/shared/constants.ts.html +436 -0
  25. package/coverage/src/breakpoint/shared/index.html +176 -0
  26. package/coverage/src/breakpoint/shared/index.ts.html +94 -0
  27. package/coverage/src/breakpoint/shared/operations.ts.html +160 -0
  28. package/coverage/src/breakpoint/shared/socket.ts.html +1297 -0
  29. package/coverage/src/breakpoint/shared/utils.ts.html +1087 -0
  30. package/coverage/src/breakpoint/store/core.ts.html +1600 -0
  31. package/coverage/src/breakpoint/store/dock.ts.html +733 -0
  32. package/coverage/src/breakpoint/store/index.html +146 -0
  33. package/coverage/src/breakpoint/store/index.ts.html +91 -0
  34. package/coverage/src/common/BaseNode.ts.html +4081 -0
  35. package/coverage/src/common/Command.ts.html +310 -0
  36. package/coverage/src/common/EventEmitter.ts.html +373 -0
  37. package/coverage/src/common/Messager.ts.html +820 -0
  38. package/coverage/src/common/asyncFuncMap.ts.html +127 -0
  39. package/coverage/src/common/index.html +191 -0
  40. package/coverage/src/common/index.ts.html +94 -0
  41. package/coverage/src/concepts/Abort__.ts.html +331 -0
  42. package/coverage/src/concepts/Anchor__.ts.html +667 -0
  43. package/coverage/src/concepts/AnonymousFunction__.ts.html +2092 -0
  44. package/coverage/src/concepts/App__.ts.html +13651 -0
  45. package/coverage/src/concepts/Argument__.ts.html +907 -0
  46. package/coverage/src/concepts/Assignee__.ts.html +2317 -0
  47. package/coverage/src/concepts/AssignmentLine__.ts.html +430 -0
  48. package/coverage/src/concepts/Assignment__.ts.html +1174 -0
  49. package/coverage/src/concepts/Attribute__.ts.html +919 -0
  50. package/coverage/src/concepts/AuthInterface__.ts.html +370 -0
  51. package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +2011 -0
  52. package/coverage/src/concepts/AuthLogic__.ts.html +793 -0
  53. package/coverage/src/concepts/BackendVariable__.ts.html +1690 -0
  54. package/coverage/src/concepts/Backend__.ts.html +1192 -0
  55. package/coverage/src/concepts/BatchAssignment__.ts.html +3376 -0
  56. package/coverage/src/concepts/BinaryExpression__.ts.html +1468 -0
  57. package/coverage/src/concepts/BindAttribute__.ts.html +3931 -0
  58. package/coverage/src/concepts/BindDirective__.ts.html +2002 -0
  59. package/coverage/src/concepts/BindEvent__.ts.html +3487 -0
  60. package/coverage/src/concepts/BindStyle__.ts.html +1645 -0
  61. package/coverage/src/concepts/BooleanLiteral__.ts.html +421 -0
  62. package/coverage/src/concepts/CallAuthInterface__.ts.html +1642 -0
  63. package/coverage/src/concepts/CallConnector__.ts.html +925 -0
  64. package/coverage/src/concepts/CallFunction__.ts.html +2164 -0
  65. package/coverage/src/concepts/CallInterface__.ts.html +2776 -0
  66. package/coverage/src/concepts/CallLogic__.ts.html +4693 -0
  67. package/coverage/src/concepts/CallQueryComponent__.ts.html +5419 -0
  68. package/coverage/src/concepts/Comment__.ts.html +397 -0
  69. package/coverage/src/concepts/CompletionProperty__.ts.html +946 -0
  70. package/coverage/src/concepts/ConfigGroup__.ts.html +1132 -0
  71. package/coverage/src/concepts/ConfigPropertyValue__.ts.html +427 -0
  72. package/coverage/src/concepts/ConfigProperty__.ts.html +1375 -0
  73. package/coverage/src/concepts/Configuration__.ts.html +1054 -0
  74. package/coverage/src/concepts/Connection__.ts.html +1387 -0
  75. package/coverage/src/concepts/ConnectorTrigger__.ts.html +598 -0
  76. package/coverage/src/concepts/Connector__.ts.html +4390 -0
  77. package/coverage/src/concepts/Constant__.ts.html +1123 -0
  78. package/coverage/src/concepts/DataSource__.ts.html +1798 -0
  79. package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +334 -0
  80. package/coverage/src/concepts/DefaultValue__.ts.html +946 -0
  81. package/coverage/src/concepts/Destination__.ts.html +2761 -0
  82. package/coverage/src/concepts/End__.ts.html +436 -0
  83. package/coverage/src/concepts/EntityIndex__.ts.html +799 -0
  84. package/coverage/src/concepts/EntityProperty__.ts.html +2866 -0
  85. package/coverage/src/concepts/Entity__.ts.html +3070 -0
  86. package/coverage/src/concepts/EnumItem__.ts.html +553 -0
  87. package/coverage/src/concepts/Enum__.ts.html +1258 -0
  88. package/coverage/src/concepts/Event__.ts.html +1111 -0
  89. package/coverage/src/concepts/ExternalDestination__.ts.html +1060 -0
  90. package/coverage/src/concepts/ForEachStatement__.ts.html +2023 -0
  91. package/coverage/src/concepts/FrontendLibrary__.ts.html +1762 -0
  92. package/coverage/src/concepts/FrontendVariable__.ts.html +292 -0
  93. package/coverage/src/concepts/Frontend__.ts.html +4078 -0
  94. package/coverage/src/concepts/Function__.ts.html +3718 -0
  95. package/coverage/src/concepts/Identifier__.ts.html +1060 -0
  96. package/coverage/src/concepts/IfStatement__.ts.html +1636 -0
  97. package/coverage/src/concepts/Integration__.ts.html +1273 -0
  98. package/coverage/src/concepts/InterfaceParam__.ts.html +1258 -0
  99. package/coverage/src/concepts/Interface__.ts.html +3463 -0
  100. package/coverage/src/concepts/JSBlock__.ts.html +424 -0
  101. package/coverage/src/concepts/JavaLogic__.ts.html +463 -0
  102. package/coverage/src/concepts/LogicItem__.ts.html +1174 -0
  103. package/coverage/src/concepts/Logic__.ts.html +7732 -0
  104. package/coverage/src/concepts/MatchCase__.ts.html +2974 -0
  105. package/coverage/src/concepts/Match__.ts.html +2494 -0
  106. package/coverage/src/concepts/MemberExpression__.ts.html +1744 -0
  107. package/coverage/src/concepts/MicroApp__.ts.html +439 -0
  108. package/coverage/src/concepts/Module__.ts.html +9385 -0
  109. package/coverage/src/concepts/MsgTriggerEvent__.ts.html +1072 -0
  110. package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +1045 -0
  111. package/coverage/src/concepts/Namespace__.ts.html +8221 -0
  112. package/coverage/src/concepts/NewComposite__.ts.html +4765 -0
  113. package/coverage/src/concepts/NewList__.ts.html +1702 -0
  114. package/coverage/src/concepts/NewMap__.ts.html +2470 -0
  115. package/coverage/src/concepts/New__.ts.html +289 -0
  116. package/coverage/src/concepts/NullLiteral__.ts.html +352 -0
  117. package/coverage/src/concepts/NumericLiteral__.ts.html +697 -0
  118. package/coverage/src/concepts/OqlQueryComponent__.ts.html +1237 -0
  119. package/coverage/src/concepts/OverriddenLogic__.ts.html +6970 -0
  120. package/coverage/src/concepts/Param__.ts.html +1798 -0
  121. package/coverage/src/concepts/Point__.ts.html +334 -0
  122. package/coverage/src/concepts/ProcessComponent__.ts.html +1717 -0
  123. package/coverage/src/concepts/ProcessElement__.ts.html +6187 -0
  124. package/coverage/src/concepts/ProcessOutcome__.ts.html +355 -0
  125. package/coverage/src/concepts/ProcessOutcomes__.ts.html +355 -0
  126. package/coverage/src/concepts/Process__.ts.html +5071 -0
  127. package/coverage/src/concepts/QueryAggregateExpression__.ts.html +589 -0
  128. package/coverage/src/concepts/QueryFieldExpression__.ts.html +586 -0
  129. package/coverage/src/concepts/QueryFromExpression__.ts.html +937 -0
  130. package/coverage/src/concepts/QueryGroupByExpression__.ts.html +580 -0
  131. package/coverage/src/concepts/QueryJoinExpression__.ts.html +1606 -0
  132. package/coverage/src/concepts/QueryLimitExpression__.ts.html +664 -0
  133. package/coverage/src/concepts/QueryOrderByExpression__.ts.html +706 -0
  134. package/coverage/src/concepts/QuerySelectExpression__.ts.html +1741 -0
  135. package/coverage/src/concepts/Rect__.ts.html +376 -0
  136. package/coverage/src/concepts/Return__.ts.html +1471 -0
  137. package/coverage/src/concepts/Role__.ts.html +604 -0
  138. package/coverage/src/concepts/SelectMembers__.ts.html +1279 -0
  139. package/coverage/src/concepts/Slot__.ts.html +649 -0
  140. package/coverage/src/concepts/SqlQueryComponent__.ts.html +1003 -0
  141. package/coverage/src/concepts/Start__.ts.html +307 -0
  142. package/coverage/src/concepts/StringInterpolation__.ts.html +1156 -0
  143. package/coverage/src/concepts/StringLiteral__.ts.html +508 -0
  144. package/coverage/src/concepts/StructureProperty__.ts.html +1300 -0
  145. package/coverage/src/concepts/Structure__.ts.html +2182 -0
  146. package/coverage/src/concepts/SwitchCase__.ts.html +1204 -0
  147. package/coverage/src/concepts/SwitchStatement__.ts.html +904 -0
  148. package/coverage/src/concepts/Theme__.ts.html +361 -0
  149. package/coverage/src/concepts/Transactional__.ts.html +631 -0
  150. package/coverage/src/concepts/TriggerEvent__.ts.html +1039 -0
  151. package/coverage/src/concepts/TriggerLauncher__.ts.html +778 -0
  152. package/coverage/src/concepts/TypeAnnotation__.ts.html +3832 -0
  153. package/coverage/src/concepts/TypeParam__.ts.html +322 -0
  154. package/coverage/src/concepts/UnaryExpression__.ts.html +730 -0
  155. package/coverage/src/concepts/Unparsed__.ts.html +397 -0
  156. package/coverage/src/concepts/UseComponent__.ts.html +334 -0
  157. package/coverage/src/concepts/ValidationRule__.ts.html +1876 -0
  158. package/coverage/src/concepts/Variable__.ts.html +1705 -0
  159. package/coverage/src/concepts/ViewBlock__.ts.html +355 -0
  160. package/coverage/src/concepts/ViewComponent__.ts.html +4327 -0
  161. package/coverage/src/concepts/ViewElement__.ts.html +8992 -0
  162. package/coverage/src/concepts/View__.ts.html +9019 -0
  163. package/coverage/src/concepts/WhileStatement__.ts.html +1105 -0
  164. package/coverage/src/concepts/basics/stdlib/index.html +356 -0
  165. package/coverage/src/concepts/basics/stdlib/index.ts.html +208 -0
  166. package/coverage/src/concepts/basics/stdlib/nasl.auth.ts.html +565 -0
  167. package/coverage/src/concepts/basics/stdlib/nasl.browser.ts.html +517 -0
  168. package/coverage/src/concepts/basics/stdlib/nasl.collection.ts.html +226 -0
  169. package/coverage/src/concepts/basics/stdlib/nasl.configuration.ts.html +172 -0
  170. package/coverage/src/concepts/basics/stdlib/nasl.core.ts.html +214 -0
  171. package/coverage/src/concepts/basics/stdlib/nasl.event.ts.html +145 -0
  172. package/coverage/src/concepts/basics/stdlib/nasl.http.ts.html +589 -0
  173. package/coverage/src/concepts/basics/stdlib/nasl.interface.ts.html +214 -0
  174. package/coverage/src/concepts/basics/stdlib/nasl.io.ts.html +229 -0
  175. package/coverage/src/concepts/basics/stdlib/nasl.logging.ts.html +268 -0
  176. package/coverage/src/concepts/basics/stdlib/nasl.process.ts.html +1999 -0
  177. package/coverage/src/concepts/basics/stdlib/nasl.ui.ts.html +3259 -0
  178. package/coverage/src/concepts/basics/stdlib/nasl.util.ts.html +6955 -0
  179. package/coverage/src/concepts/basics/stdlib/nasl.validation.ts.html +1768 -0
  180. package/coverage/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts.html +163 -0
  181. package/coverage/src/concepts/basics/stdlib/timeZone.ts.html +664 -0
  182. package/coverage/src/concepts/basics/types/coreTypeList.ts.html +121 -0
  183. package/coverage/src/concepts/basics/types/index.html +131 -0
  184. package/coverage/src/concepts/basics/types/index.ts.html +160 -0
  185. package/coverage/src/concepts/index.html +1976 -0
  186. package/coverage/src/concepts/index.ts.html +103 -0
  187. package/coverage/src/concepts/index__.ts.html +454 -0
  188. package/coverage/src/config.ts.html +325 -0
  189. package/coverage/src/decorators/index.html +131 -0
  190. package/coverage/src/decorators/index.ts.html +583 -0
  191. package/coverage/src/decorators/promise.ts.html +169 -0
  192. package/coverage/src/eventBus.ts.html +100 -0
  193. package/coverage/src/generator/compileComponent.ts.html +142 -0
  194. package/coverage/src/generator/genBundleFiles.ts.html +1828 -0
  195. package/coverage/src/generator/genHash.ts.html +124 -0
  196. package/coverage/src/generator/genMetaData.ts.html +1084 -0
  197. package/coverage/src/generator/genReleaseBody.ts.html +1282 -0
  198. package/coverage/src/generator/icestark.ts.html +220 -0
  199. package/coverage/src/generator/index.html +266 -0
  200. package/coverage/src/generator/index.ts.html +106 -0
  201. package/coverage/src/generator/microApp.ts.html +172 -0
  202. package/coverage/src/generator/permission.ts.html +1036 -0
  203. package/coverage/src/generator/qiankun.ts.html +232 -0
  204. package/coverage/src/generator/styleReplacer.ts.html +199 -0
  205. package/coverage/src/index.html +146 -0
  206. package/coverage/src/index.ts.html +124 -0
  207. package/coverage/src/manager/diagnostic.ts.html +442 -0
  208. package/coverage/src/manager/index.html +131 -0
  209. package/coverage/src/manager/stepRecorder.ts.html +457 -0
  210. package/coverage/src/natural/genNaturalTS.ts.html +355 -0
  211. package/coverage/src/natural/index.html +161 -0
  212. package/coverage/src/natural/index.ts.html +91 -0
  213. package/coverage/src/natural/naslStdlibMap.ts.html +157 -0
  214. package/coverage/src/natural/transformTSCode.ts.html +2707 -0
  215. package/coverage/src/sentry/index.html +116 -0
  216. package/coverage/src/sentry/index.ts.html +676 -0
  217. package/coverage/src/server/createUiTs.ts.html +919 -0
  218. package/coverage/src/server/entity2LogicNamespace.ts.html +1294 -0
  219. package/coverage/src/server/event.js.html +526 -0
  220. package/coverage/src/server/extendBaseNode.ts.html +1762 -0
  221. package/coverage/src/server/formatTsUtils.ts.html +2689 -0
  222. package/coverage/src/server/getConnector.ts.html +316 -0
  223. package/coverage/src/server/getExtensionModules.ts.html +178 -0
  224. package/coverage/src/server/getFunctions.ts.html +133 -0
  225. package/coverage/src/server/getInterfaces.ts.html +229 -0
  226. package/coverage/src/server/getLogging.ts.html +100 -0
  227. package/coverage/src/server/getLogics.ts.html +1363 -0
  228. package/coverage/src/server/getMemberIdentifier.ts.html +1606 -0
  229. package/coverage/src/server/getProcessComponents.ts.html +112 -0
  230. package/coverage/src/server/getProcesses.ts.html +2023 -0
  231. package/coverage/src/server/getValidates.ts.html +115 -0
  232. package/coverage/src/server/index.html +401 -0
  233. package/coverage/src/server/index.ts.html +229 -0
  234. package/coverage/src/server/naslServer.ts.html +14356 -0
  235. package/coverage/src/server/naslStdlibMap.ts.html +241 -0
  236. package/coverage/src/server/process2LogicNamespace.ts.html +454 -0
  237. package/coverage/src/server/translator.ts.html +2566 -0
  238. package/coverage/src/service/creator/add.configs.js.html +397 -0
  239. package/coverage/src/service/creator/errHandles.js.html +304 -0
  240. package/coverage/src/service/creator/index.html +146 -0
  241. package/coverage/src/service/creator/index.js.html +352 -0
  242. package/coverage/src/service/datasource/api.js.html +118 -0
  243. package/coverage/src/service/datasource/index.html +131 -0
  244. package/coverage/src/service/datasource/index.js.html +103 -0
  245. package/coverage/src/service/logic/api.js.html +109 -0
  246. package/coverage/src/service/logic/index.html +131 -0
  247. package/coverage/src/service/logic/index.js.html +103 -0
  248. package/coverage/src/service/storage/api.js.html +202 -0
  249. package/coverage/src/service/storage/index.html +206 -0
  250. package/coverage/src/service/storage/index.ts.html +103 -0
  251. package/coverage/src/service/storage/init.ts.html +3721 -0
  252. package/coverage/src/service/storage/jsoner.ts.html +502 -0
  253. package/coverage/src/service/storage/map.ts.html +256 -0
  254. package/coverage/src/service/storage/service.ts.html +331 -0
  255. package/coverage/src/service/storage/storagePoint.ts.html +304 -0
  256. package/coverage/src/templator/genCallComponentLogic.ts.html +163 -0
  257. package/coverage/src/templator/genCreateBlock.ts.html +1093 -0
  258. package/coverage/src/templator/genCurdEditMultipleKeyBlock.ts.html +1609 -0
  259. package/coverage/src/templator/genCurdMultipleKeyBlock.ts.html +2254 -0
  260. package/coverage/src/templator/genEditTableBlock.ts.html +1021 -0
  261. package/coverage/src/templator/genEnumSelectBlock.ts.html +178 -0
  262. package/coverage/src/templator/genGetBlock.ts.html +451 -0
  263. package/coverage/src/templator/genGridViewBlock.ts.html +1114 -0
  264. package/coverage/src/templator/genListViewBlock.ts.html +475 -0
  265. package/coverage/src/templator/genQueryComponent.ts.html +1207 -0
  266. package/coverage/src/templator/genSelectBlock.ts.html +1243 -0
  267. package/coverage/src/templator/genTableBlock.ts.html +973 -0
  268. package/coverage/src/templator/genUpdateBlock.ts.html +1192 -0
  269. package/coverage/src/templator/index.html +326 -0
  270. package/coverage/src/templator/index.ts.html +154 -0
  271. package/coverage/src/templator/utils.ts.html +1861 -0
  272. package/coverage/src/translator/constant.ts.html +106 -0
  273. package/coverage/src/translator/index.html +146 -0
  274. package/coverage/src/translator/index.ts.html +94 -0
  275. package/coverage/src/translator/utils.ts.html +436 -0
  276. package/coverage/src/utils/cookie.ts.html +265 -0
  277. package/coverage/src/utils/env.ts.html +91 -0
  278. package/coverage/src/utils/index.html +236 -0
  279. package/coverage/src/utils/index.ts.html +694 -0
  280. package/coverage/src/utils/logger.ts.html +145 -0
  281. package/coverage/src/utils/sortTsString.ts.html +187 -0
  282. package/coverage/src/utils/string.ts.html +400 -0
  283. package/coverage/src/utils/time-slicing.ts.html +418 -0
  284. package/coverage/src/utils/traverse.ts.html +568 -0
  285. package/coverage/src/utils/window.ts.html +112 -0
  286. package/out/bak/translator.js +2 -19
  287. package/out/bak/translator.js.map +1 -1
  288. package/out/common/BaseNode.d.ts +11 -0
  289. package/out/common/BaseNode.js +57 -1
  290. package/out/common/BaseNode.js.map +1 -1
  291. package/out/common/index.d.ts +1 -0
  292. package/out/common/index.js +1 -0
  293. package/out/common/index.js.map +1 -1
  294. package/out/common/utils.d.ts +2 -0
  295. package/out/common/utils.js +18 -0
  296. package/out/common/utils.js.map +1 -0
  297. package/out/concepts/Abort__.d.ts +2 -2
  298. package/out/concepts/Abort__.js +6 -2
  299. package/out/concepts/Abort__.js.map +1 -1
  300. package/out/concepts/Anchor__.d.ts +2 -2
  301. package/out/concepts/Anchor__.js +5 -4
  302. package/out/concepts/Anchor__.js.map +1 -1
  303. package/out/concepts/AnonymousFunction__.d.ts +3 -3
  304. package/out/concepts/AnonymousFunction__.js +19 -15
  305. package/out/concepts/AnonymousFunction__.js.map +1 -1
  306. package/out/concepts/Argument__.d.ts +2 -2
  307. package/out/concepts/Argument__.js +12 -13
  308. package/out/concepts/Argument__.js.map +1 -1
  309. package/out/concepts/Assignee__.d.ts +2 -2
  310. package/out/concepts/Assignee__.js +11 -9
  311. package/out/concepts/Assignee__.js.map +1 -1
  312. package/out/concepts/AssignmentLine__.d.ts +2 -2
  313. package/out/concepts/AssignmentLine__.js +3 -2
  314. package/out/concepts/AssignmentLine__.js.map +1 -1
  315. package/out/concepts/Assignment__.d.ts +2 -2
  316. package/out/concepts/Assignment__.js +13 -29
  317. package/out/concepts/Assignment__.js.map +1 -1
  318. package/out/concepts/AuthInterface__.js +1 -1
  319. package/out/concepts/AuthInterface__.js.map +1 -1
  320. package/out/concepts/AuthLogicForCallInterface__.d.ts +2 -2
  321. package/out/concepts/AuthLogicForCallInterface__.js +56 -75
  322. package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
  323. package/out/concepts/BackendVariable__.d.ts +5 -8
  324. package/out/concepts/BackendVariable__.js +47 -29
  325. package/out/concepts/BackendVariable__.js.map +1 -1
  326. package/out/concepts/Backend__.d.ts +4 -7
  327. package/out/concepts/Backend__.js +7 -6
  328. package/out/concepts/Backend__.js.map +1 -1
  329. package/out/concepts/BatchAssignment__.d.ts +2 -2
  330. package/out/concepts/BatchAssignment__.js +19 -20
  331. package/out/concepts/BatchAssignment__.js.map +1 -1
  332. package/out/concepts/BinaryExpression__.d.ts +2 -2
  333. package/out/concepts/BinaryExpression__.js +37 -38
  334. package/out/concepts/BinaryExpression__.js.map +1 -1
  335. package/out/concepts/BindAttribute__.d.ts +4 -4
  336. package/out/concepts/BindAttribute__.js +39 -32
  337. package/out/concepts/BindAttribute__.js.map +1 -1
  338. package/out/concepts/BindDirective__.d.ts +2 -2
  339. package/out/concepts/BindDirective__.js +10 -8
  340. package/out/concepts/BindDirective__.js.map +1 -1
  341. package/out/concepts/BindEvent__.d.ts +4 -7
  342. package/out/concepts/BindEvent__.js +20 -18
  343. package/out/concepts/BindEvent__.js.map +1 -1
  344. package/out/concepts/BindStyle__.d.ts +2 -2
  345. package/out/concepts/BindStyle__.js +9 -7
  346. package/out/concepts/BindStyle__.js.map +1 -1
  347. package/out/concepts/Block__.d.ts +6 -2
  348. package/out/concepts/Block__.js +36 -5
  349. package/out/concepts/Block__.js.map +1 -1
  350. package/out/concepts/BooleanLiteral__.d.ts +2 -2
  351. package/out/concepts/BooleanLiteral__.js +2 -2
  352. package/out/concepts/BooleanLiteral__.js.map +1 -1
  353. package/out/concepts/CallAuthInterface__.d.ts +3 -2
  354. package/out/concepts/CallAuthInterface__.js +46 -30
  355. package/out/concepts/CallAuthInterface__.js.map +1 -1
  356. package/out/concepts/CallConnector__.d.ts +2 -2
  357. package/out/concepts/CallConnector__.js +25 -23
  358. package/out/concepts/CallConnector__.js.map +1 -1
  359. package/out/concepts/CallFunction__.d.ts +2 -2
  360. package/out/concepts/CallFunction__.js +19 -16
  361. package/out/concepts/CallFunction__.js.map +1 -1
  362. package/out/concepts/CallInterface__.d.ts +3 -2
  363. package/out/concepts/CallInterface__.js +16 -6
  364. package/out/concepts/CallInterface__.js.map +1 -1
  365. package/out/concepts/CallLogic__.d.ts +2 -3
  366. package/out/concepts/CallLogic__.js +26 -20
  367. package/out/concepts/CallLogic__.js.map +1 -1
  368. package/out/concepts/CallQueryComponent__.d.ts +4 -4
  369. package/out/concepts/CallQueryComponent__.js +38 -36
  370. package/out/concepts/CallQueryComponent__.js.map +1 -1
  371. package/out/concepts/Comment__.d.ts +2 -2
  372. package/out/concepts/Comment__.js +3 -2
  373. package/out/concepts/Comment__.js.map +1 -1
  374. package/out/concepts/ConfigProperty__.d.ts +4 -7
  375. package/out/concepts/ConfigProperty__.js +12 -10
  376. package/out/concepts/ConfigProperty__.js.map +1 -1
  377. package/out/concepts/Connection__.d.ts +4 -7
  378. package/out/concepts/Connection__.js +6 -5
  379. package/out/concepts/Connection__.js.map +1 -1
  380. package/out/concepts/Connector__.js.map +1 -1
  381. package/out/concepts/Constant__.d.ts +3 -3
  382. package/out/concepts/Constant__.js +38 -13
  383. package/out/concepts/Constant__.js.map +1 -1
  384. package/out/concepts/DataSource__.d.ts +4 -7
  385. package/out/concepts/DataSource__.js +7 -6
  386. package/out/concepts/DataSource__.js.map +1 -1
  387. package/out/concepts/DefaultValue__.d.ts +6 -2
  388. package/out/concepts/DefaultValue__.js +11 -3
  389. package/out/concepts/DefaultValue__.js.map +1 -1
  390. package/out/concepts/Destination__.d.ts +3 -3
  391. package/out/concepts/Destination__.js +29 -26
  392. package/out/concepts/Destination__.js.map +1 -1
  393. package/out/concepts/End__.d.ts +2 -2
  394. package/out/concepts/End__.js +17 -13
  395. package/out/concepts/End__.js.map +1 -1
  396. package/out/concepts/EntityIndex__.d.ts +2 -2
  397. package/out/concepts/EntityIndex__.js +4 -3
  398. package/out/concepts/EntityIndex__.js.map +1 -1
  399. package/out/concepts/EntityProperty__.d.ts +2 -2
  400. package/out/concepts/EntityProperty__.js +9 -8
  401. package/out/concepts/EntityProperty__.js.map +1 -1
  402. package/out/concepts/Entity__.d.ts +4 -7
  403. package/out/concepts/Entity__.js +22 -22
  404. package/out/concepts/Entity__.js.map +1 -1
  405. package/out/concepts/EnumItem__.d.ts +2 -2
  406. package/out/concepts/EnumItem__.js +4 -3
  407. package/out/concepts/EnumItem__.js.map +1 -1
  408. package/out/concepts/Enum__.d.ts +4 -7
  409. package/out/concepts/Enum__.js +10 -8
  410. package/out/concepts/Enum__.js.map +1 -1
  411. package/out/concepts/ExternalDestination__.d.ts +2 -2
  412. package/out/concepts/ExternalDestination__.js +7 -5
  413. package/out/concepts/ExternalDestination__.js.map +1 -1
  414. package/out/concepts/ForEachStatement__.d.ts +2 -2
  415. package/out/concepts/ForEachStatement__.js +14 -12
  416. package/out/concepts/ForEachStatement__.js.map +1 -1
  417. package/out/concepts/Frontend__.d.ts +4 -7
  418. package/out/concepts/Frontend__.js +7 -6
  419. package/out/concepts/Frontend__.js.map +1 -1
  420. package/out/concepts/Function__.d.ts +3 -3
  421. package/out/concepts/Function__.js +22 -18
  422. package/out/concepts/Function__.js.map +1 -1
  423. package/out/concepts/Identifier__.d.ts +2 -2
  424. package/out/concepts/Identifier__.js +19 -23
  425. package/out/concepts/Identifier__.js.map +1 -1
  426. package/out/concepts/IfStatement__.d.ts +2 -2
  427. package/out/concepts/IfStatement__.js +12 -10
  428. package/out/concepts/IfStatement__.js.map +1 -1
  429. package/out/concepts/ImportedInterface__.d.ts +20 -0
  430. package/out/concepts/ImportedInterface__.js +57 -0
  431. package/out/concepts/ImportedInterface__.js.map +1 -0
  432. package/out/concepts/InterfaceParam__.d.ts +2 -7
  433. package/out/concepts/InterfaceParam__.js +33 -14
  434. package/out/concepts/InterfaceParam__.js.map +1 -1
  435. package/out/concepts/Interface__.d.ts +7 -15
  436. package/out/concepts/Interface__.js +33 -43
  437. package/out/concepts/Interface__.js.map +1 -1
  438. package/out/concepts/JSBlock__.d.ts +2 -2
  439. package/out/concepts/JSBlock__.js +3 -58
  440. package/out/concepts/JSBlock__.js.map +1 -1
  441. package/out/concepts/JavaLogic__.d.ts +2 -2
  442. package/out/concepts/JavaLogic__.js +6 -2
  443. package/out/concepts/JavaLogic__.js.map +1 -1
  444. package/out/concepts/LogicItem__.d.ts +2 -2
  445. package/out/concepts/LogicItem__.js +7 -13
  446. package/out/concepts/LogicItem__.js.map +1 -1
  447. package/out/concepts/Logic__.d.ts +8 -11
  448. package/out/concepts/Logic__.js +124 -157
  449. package/out/concepts/Logic__.js.map +1 -1
  450. package/out/concepts/MatchCase__.d.ts +2 -2
  451. package/out/concepts/MatchCase__.js +23 -22
  452. package/out/concepts/MatchCase__.js.map +1 -1
  453. package/out/concepts/Match__.d.ts +2 -2
  454. package/out/concepts/Match__.js +24 -22
  455. package/out/concepts/Match__.js.map +1 -1
  456. package/out/concepts/MemberExpression__.d.ts +2 -2
  457. package/out/concepts/MemberExpression__.js +28 -24
  458. package/out/concepts/MemberExpression__.js.map +1 -1
  459. package/out/concepts/MetadataType__.d.ts +4 -7
  460. package/out/concepts/MetadataType__.js +11 -9
  461. package/out/concepts/MetadataType__.js.map +1 -1
  462. package/out/concepts/Module__.d.ts +8 -179
  463. package/out/concepts/Module__.js +124 -265
  464. package/out/concepts/Module__.js.map +1 -1
  465. package/out/concepts/NewComposite__.d.ts +5 -5
  466. package/out/concepts/NewComposite__.js +75 -76
  467. package/out/concepts/NewComposite__.js.map +1 -1
  468. package/out/concepts/NewList__.d.ts +5 -5
  469. package/out/concepts/NewList__.js +30 -26
  470. package/out/concepts/NewList__.js.map +1 -1
  471. package/out/concepts/NewMap__.d.ts +4 -4
  472. package/out/concepts/NewMap__.js +39 -35
  473. package/out/concepts/NewMap__.js.map +1 -1
  474. package/out/concepts/New__.d.ts +2 -2
  475. package/out/concepts/New__.js +3 -2
  476. package/out/concepts/New__.js.map +1 -1
  477. package/out/concepts/NullLiteral__.d.ts +2 -2
  478. package/out/concepts/NullLiteral__.js +2 -2
  479. package/out/concepts/NullLiteral__.js.map +1 -1
  480. package/out/concepts/NumericLiteral__.d.ts +2 -2
  481. package/out/concepts/NumericLiteral__.js +6 -5
  482. package/out/concepts/NumericLiteral__.js.map +1 -1
  483. package/out/concepts/OqlQueryComponent__.d.ts +2 -2
  484. package/out/concepts/OqlQueryComponent__.js +16 -14
  485. package/out/concepts/OqlQueryComponent__.js.map +1 -1
  486. package/out/concepts/OverriddenLogic__.d.ts +8 -11
  487. package/out/concepts/OverriddenLogic__.js +99 -112
  488. package/out/concepts/OverriddenLogic__.js.map +1 -1
  489. package/out/concepts/Param__.d.ts +3 -3
  490. package/out/concepts/Param__.js +24 -30
  491. package/out/concepts/Param__.js.map +1 -1
  492. package/out/concepts/ProcessElement__.d.ts +2 -2
  493. package/out/concepts/ProcessElement__.js +54 -68
  494. package/out/concepts/ProcessElement__.js.map +1 -1
  495. package/out/concepts/ProcessOutcome__.d.ts +2 -1
  496. package/out/concepts/ProcessOutcome__.js +5 -4
  497. package/out/concepts/ProcessOutcome__.js.map +1 -1
  498. package/out/concepts/ProcessOutcomes__.d.ts +2 -1
  499. package/out/concepts/ProcessOutcomes__.js +6 -5
  500. package/out/concepts/ProcessOutcomes__.js.map +1 -1
  501. package/out/concepts/Process__.d.ts +4 -7
  502. package/out/concepts/Process__.js +35 -52
  503. package/out/concepts/Process__.js.map +1 -1
  504. package/out/concepts/QueryAggregateExpression__.d.ts +2 -2
  505. package/out/concepts/QueryAggregateExpression__.js +2 -2
  506. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  507. package/out/concepts/QueryFieldExpression__.d.ts +2 -2
  508. package/out/concepts/QueryFieldExpression__.js +5 -4
  509. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  510. package/out/concepts/QueryFromExpression__.d.ts +2 -2
  511. package/out/concepts/QueryFromExpression__.js +8 -6
  512. package/out/concepts/QueryFromExpression__.js.map +1 -1
  513. package/out/concepts/QueryGroupByExpression__.d.ts +2 -1
  514. package/out/concepts/QueryGroupByExpression__.js +6 -5
  515. package/out/concepts/QueryGroupByExpression__.js.map +1 -1
  516. package/out/concepts/QueryJoinExpression__.d.ts +2 -2
  517. package/out/concepts/QueryJoinExpression__.js +12 -10
  518. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  519. package/out/concepts/QueryLimitExpression__.d.ts +2 -2
  520. package/out/concepts/QueryLimitExpression__.js +6 -5
  521. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  522. package/out/concepts/QueryOrderByExpression__.d.ts +2 -2
  523. package/out/concepts/QueryOrderByExpression__.js +6 -5
  524. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  525. package/out/concepts/Return__.d.ts +3 -3
  526. package/out/concepts/Return__.js +41 -24
  527. package/out/concepts/Return__.js.map +1 -1
  528. package/out/concepts/Role__.d.ts +4 -7
  529. package/out/concepts/Role__.js +7 -6
  530. package/out/concepts/Role__.js.map +1 -1
  531. package/out/concepts/SelectMembers__.d.ts +2 -2
  532. package/out/concepts/SelectMembers__.js +3 -2
  533. package/out/concepts/SelectMembers__.js.map +1 -1
  534. package/out/concepts/SqlQueryComponent__.d.ts +2 -2
  535. package/out/concepts/SqlQueryComponent__.js +12 -10
  536. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  537. package/out/concepts/Start__.d.ts +2 -2
  538. package/out/concepts/Start__.js +2 -2
  539. package/out/concepts/Start__.js.map +1 -1
  540. package/out/concepts/StringInterpolation__.d.ts +2 -2
  541. package/out/concepts/StringInterpolation__.js +7 -5
  542. package/out/concepts/StringInterpolation__.js.map +1 -1
  543. package/out/concepts/StringLiteral__.d.ts +2 -2
  544. package/out/concepts/StringLiteral__.js +12 -6
  545. package/out/concepts/StringLiteral__.js.map +1 -1
  546. package/out/concepts/StructureProperty__.d.ts +2 -2
  547. package/out/concepts/StructureProperty__.js +6 -5
  548. package/out/concepts/StructureProperty__.js.map +1 -1
  549. package/out/concepts/Structure__.d.ts +4 -7
  550. package/out/concepts/Structure__.js +15 -15
  551. package/out/concepts/Structure__.js.map +1 -1
  552. package/out/concepts/SwitchCase__.d.ts +2 -2
  553. package/out/concepts/SwitchCase__.js +12 -10
  554. package/out/concepts/SwitchCase__.js.map +1 -1
  555. package/out/concepts/SwitchStatement__.d.ts +2 -2
  556. package/out/concepts/SwitchStatement__.js +8 -6
  557. package/out/concepts/SwitchStatement__.js.map +1 -1
  558. package/out/concepts/TriggerLauncher__.d.ts +4 -7
  559. package/out/concepts/TriggerLauncher__.js +7 -6
  560. package/out/concepts/TriggerLauncher__.js.map +1 -1
  561. package/out/concepts/TypeAnnotation__.d.ts +2 -2
  562. package/out/concepts/TypeAnnotation__.js +51 -25
  563. package/out/concepts/TypeAnnotation__.js.map +1 -1
  564. package/out/concepts/TypeParam__.d.ts +2 -2
  565. package/out/concepts/TypeParam__.js +4 -3
  566. package/out/concepts/TypeParam__.js.map +1 -1
  567. package/out/concepts/UnaryExpression__.d.ts +2 -2
  568. package/out/concepts/UnaryExpression__.js +12 -7
  569. package/out/concepts/UnaryExpression__.js.map +1 -1
  570. package/out/concepts/Unparsed__.d.ts +2 -2
  571. package/out/concepts/Unparsed__.js +2 -2
  572. package/out/concepts/Unparsed__.js.map +1 -1
  573. package/out/concepts/ValidationRule__.d.ts +2 -2
  574. package/out/concepts/ValidationRule__.js +11 -9
  575. package/out/concepts/ValidationRule__.js.map +1 -1
  576. package/out/concepts/Variable__.d.ts +5 -8
  577. package/out/concepts/Variable__.js +49 -32
  578. package/out/concepts/Variable__.js.map +1 -1
  579. package/out/concepts/ViewElement__.d.ts +6 -6
  580. package/out/concepts/ViewElement__.js +110 -137
  581. package/out/concepts/ViewElement__.js.map +1 -1
  582. package/out/concepts/View__.d.ts +6 -9
  583. package/out/concepts/View__.js +76 -84
  584. package/out/concepts/View__.js.map +1 -1
  585. package/out/concepts/WhileStatement__.d.ts +2 -2
  586. package/out/concepts/WhileStatement__.js +9 -7
  587. package/out/concepts/WhileStatement__.js.map +1 -1
  588. package/out/concepts/index__.d.ts +1 -1
  589. package/out/concepts/index__.js +1 -1
  590. package/out/concepts/index__.js.map +1 -1
  591. package/out/concepts/types__.d.ts +1 -3
  592. package/out/decorators/index.js +10 -9
  593. package/out/decorators/index.js.map +1 -1
  594. package/out/generator/genMetaData.js +0 -7
  595. package/out/generator/genMetaData.js.map +1 -1
  596. package/out/manager/diagnostic.d.ts +1 -1
  597. package/out/manager/diagnostic.js +2 -3
  598. package/out/manager/diagnostic.js.map +1 -1
  599. package/out/server/extendBaseNode.js +7 -24
  600. package/out/server/extendBaseNode.js.map +1 -1
  601. package/out/server/getConnector.js +8 -3
  602. package/out/server/getConnector.js.map +1 -1
  603. package/out/server/getLogics.js +13 -3
  604. package/out/server/getLogics.js.map +1 -1
  605. package/out/server/naslServer.d.ts +44 -46
  606. package/out/server/naslServer.js +333 -461
  607. package/out/server/naslServer.js.map +1 -1
  608. package/out/server/translator.js +1 -1
  609. package/out/server/translator.js.map +1 -1
  610. package/out/templator/genCreateBlock.js +5 -9
  611. package/out/templator/genCreateBlock.js.map +1 -1
  612. package/out/templator/genCurdEditMultipleKeyBlock.js +12 -18
  613. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  614. package/out/templator/genCurdMultipleKeyBlock.js +8 -10
  615. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  616. package/out/templator/genEditTableBlock.js +2 -3
  617. package/out/templator/genEditTableBlock.js.map +1 -1
  618. package/out/templator/genUpdateBlock.js +9 -12
  619. package/out/templator/genUpdateBlock.js.map +1 -1
  620. package/out/templator/utils.js.map +1 -1
  621. package/out/translator/types.d.ts +16 -3
  622. package/out/translator/utils.d.ts +19 -1
  623. package/out/translator/utils.js +90 -2
  624. package/out/translator/utils.js.map +1 -1
  625. package/out/utils/time-slicing/constant.d.ts +35 -0
  626. package/out/utils/time-slicing/constant.js +40 -0
  627. package/out/utils/time-slicing/constant.js.map +1 -0
  628. package/out/utils/time-slicing/controller.d.ts +53 -0
  629. package/out/utils/time-slicing/controller.js +280 -0
  630. package/out/utils/time-slicing/controller.js.map +1 -0
  631. package/out/utils/time-slicing/index.d.ts +5 -0
  632. package/out/utils/time-slicing/index.js +26 -0
  633. package/out/utils/time-slicing/index.js.map +1 -0
  634. package/out/utils/time-slicing/page-state.d.ts +2 -0
  635. package/out/utils/time-slicing/page-state.js +14 -0
  636. package/out/utils/time-slicing/page-state.js.map +1 -0
  637. package/out/utils/time-slicing/performance.d.ts +11 -0
  638. package/out/utils/time-slicing/performance.js +51 -0
  639. package/out/utils/time-slicing/performance.js.map +1 -0
  640. package/out/utils/time-slicing/runner.d.ts +12 -0
  641. package/out/utils/time-slicing/runner.js +53 -0
  642. package/out/utils/time-slicing/runner.js.map +1 -0
  643. package/out/utils/time-slicing/tool.d.ts +24 -0
  644. package/out/utils/time-slicing/tool.js +47 -0
  645. package/out/utils/time-slicing/tool.js.map +1 -0
  646. package/out/utils/time-slicing/utils.d.ts +62 -0
  647. package/out/utils/time-slicing/utils.js +47 -0
  648. package/out/utils/time-slicing/utils.js.map +1 -0
  649. package/out/utils/time-slicing/wrapper.d.ts +18 -0
  650. package/out/utils/time-slicing/wrapper.js +55 -0
  651. package/out/utils/time-slicing/wrapper.js.map +1 -0
  652. package/out/utils/types.d.ts +7 -0
  653. package/package.json +1 -1
  654. package/sandbox/stdlib/nasl.core.ts +0 -2
  655. package/sandbox/stdlib/nasl.util.ts +1 -1
  656. package/src/bak/translator.js +2 -17
  657. package/src/common/BaseNode.ts +73 -7
  658. package/src/common/index.ts +1 -0
  659. package/src/common/utils.ts +17 -0
  660. package/src/concepts/Abort__.ts +12 -3
  661. package/src/concepts/Anchor__.ts +15 -5
  662. package/src/concepts/AnonymousFunction__.ts +29 -23
  663. package/src/concepts/Argument__.ts +25 -14
  664. package/src/concepts/Assignee__.ts +21 -10
  665. package/src/concepts/AssignmentLine__.ts +13 -3
  666. package/src/concepts/Assignment__.ts +33 -42
  667. package/src/concepts/AuthInterface__.ts +3 -3
  668. package/src/concepts/AuthLogicForCallInterface__.ts +63 -84
  669. package/src/concepts/BackendVariable__.ts +35 -30
  670. package/src/concepts/Backend__.ts +24 -7
  671. package/src/concepts/BatchAssignment__.ts +30 -21
  672. package/src/concepts/BinaryExpression__.ts +47 -38
  673. package/src/concepts/BindAttribute__.ts +43 -39
  674. package/src/concepts/BindDirective__.ts +19 -9
  675. package/src/concepts/BindEvent__.ts +31 -26
  676. package/src/concepts/BindStyle__.ts +18 -8
  677. package/src/concepts/Block__.ts +22 -6
  678. package/src/concepts/BooleanLiteral__.ts +11 -3
  679. package/src/concepts/CallAuthInterface__.ts +58 -33
  680. package/src/concepts/CallConnector__.ts +34 -26
  681. package/src/concepts/CallFunction__.ts +22 -17
  682. package/src/concepts/CallInterface__.ts +30 -12
  683. package/src/concepts/CallLogic__.ts +46 -47
  684. package/src/concepts/CallQueryComponent__.ts +48 -46
  685. package/src/concepts/Comment__.ts +13 -3
  686. package/src/concepts/ConfigProperty__.ts +22 -12
  687. package/src/concepts/Connection__.ts +22 -6
  688. package/src/concepts/Connector__.ts +1 -1
  689. package/src/concepts/Constant__.ts +24 -14
  690. package/src/concepts/DataSource__.ts +16 -7
  691. package/src/concepts/DefaultValue__.ts +13 -4
  692. package/src/concepts/Destination__.ts +39 -33
  693. package/src/concepts/End__.ts +24 -15
  694. package/src/concepts/EntityIndex__.ts +13 -4
  695. package/src/concepts/EntityProperty__.ts +20 -10
  696. package/src/concepts/Entity__.ts +34 -27
  697. package/src/concepts/EnumItem__.ts +13 -4
  698. package/src/concepts/Enum__.ts +21 -10
  699. package/src/concepts/ExternalDestination__.ts +16 -7
  700. package/src/concepts/ForEachStatement__.ts +24 -14
  701. package/src/concepts/Frontend__.ts +18 -7
  702. package/src/concepts/Function__.ts +30 -21
  703. package/src/concepts/Identifier__.ts +32 -34
  704. package/src/concepts/IfStatement__.ts +22 -14
  705. package/src/concepts/ImportedInterface__.ts +61 -0
  706. package/src/concepts/InterfaceParam__.ts +19 -16
  707. package/src/concepts/Interface__.ts +45 -51
  708. package/src/concepts/JSBlock__.ts +12 -61
  709. package/src/concepts/JavaLogic__.ts +13 -3
  710. package/src/concepts/LogicItem__.ts +13 -14
  711. package/src/concepts/Logic__.ts +147 -172
  712. package/src/concepts/MatchCase__.ts +33 -27
  713. package/src/concepts/Match__.ts +34 -26
  714. package/src/concepts/MemberExpression__.ts +37 -25
  715. package/src/concepts/MetadataType__.ts +22 -10
  716. package/src/concepts/Module__.ts +177 -540
  717. package/src/concepts/NewComposite__.ts +86 -80
  718. package/src/concepts/NewList__.ts +40 -32
  719. package/src/concepts/NewMap__.ts +49 -42
  720. package/src/concepts/New__.ts +13 -3
  721. package/src/concepts/NullLiteral__.ts +11 -3
  722. package/src/concepts/NumericLiteral__.ts +15 -6
  723. package/src/concepts/OqlQueryComponent__.ts +26 -18
  724. package/src/concepts/OverriddenLogic__.ts +117 -125
  725. package/src/concepts/Param__.ts +42 -38
  726. package/src/concepts/ProcessElement__.ts +67 -79
  727. package/src/concepts/ProcessOutcome__.ts +14 -6
  728. package/src/concepts/ProcessOutcomes__.ts +15 -7
  729. package/src/concepts/Process__.ts +50 -61
  730. package/src/concepts/QueryAggregateExpression__.ts +11 -3
  731. package/src/concepts/QueryFieldExpression__.ts +14 -5
  732. package/src/concepts/QueryFromExpression__.ts +18 -7
  733. package/src/concepts/QueryGroupByExpression__.ts +14 -6
  734. package/src/concepts/QueryJoinExpression__.ts +22 -11
  735. package/src/concepts/QueryLimitExpression__.ts +16 -6
  736. package/src/concepts/QueryOrderByExpression__.ts +17 -6
  737. package/src/concepts/Return__.ts +27 -25
  738. package/src/concepts/Role__.ts +17 -8
  739. package/src/concepts/SelectMembers__.ts +13 -3
  740. package/src/concepts/SqlQueryComponent__.ts +22 -11
  741. package/src/concepts/Start__.ts +11 -3
  742. package/src/concepts/StringInterpolation__.ts +10 -5
  743. package/src/concepts/StringLiteral__.ts +20 -7
  744. package/src/concepts/StructureProperty__.ts +16 -6
  745. package/src/concepts/Structure__.ts +26 -18
  746. package/src/concepts/SwitchCase__.ts +22 -14
  747. package/src/concepts/SwitchStatement__.ts +17 -7
  748. package/src/concepts/TriggerLauncher__.ts +17 -7
  749. package/src/concepts/TypeAnnotation__.ts +36 -26
  750. package/src/concepts/TypeParam__.ts +13 -4
  751. package/src/concepts/UnaryExpression__.ts +22 -9
  752. package/src/concepts/Unparsed__.ts +11 -3
  753. package/src/concepts/ValidationRule__.ts +21 -17
  754. package/src/concepts/Variable__.ts +37 -33
  755. package/src/concepts/ViewElement__.ts +128 -156
  756. package/src/concepts/View__.ts +101 -101
  757. package/src/concepts/WhileStatement__.ts +19 -10
  758. package/src/concepts/index__.ts +1 -1
  759. package/src/concepts/types__.ts +1 -5
  760. package/src/decorators/index.ts +10 -9
  761. package/src/generator/genMetaData.ts +2 -12
  762. package/src/manager/diagnostic.ts +3 -4
  763. package/src/server/extendBaseNode.ts +8 -24
  764. package/src/server/getConnector.ts +8 -3
  765. package/src/server/getLogics.ts +15 -3
  766. package/src/server/naslServer.ts +717 -749
  767. package/src/server/translator.ts +1 -1
  768. package/src/templator/genCreateBlock.ts +5 -9
  769. package/src/templator/genCurdEditMultipleKeyBlock.ts +13 -19
  770. package/src/templator/genCurdMultipleKeyBlock.ts +11 -14
  771. package/src/templator/genEditTableBlock.ts +2 -4
  772. package/src/templator/genUpdateBlock.ts +12 -15
  773. package/src/templator/utils.ts +7 -8
  774. package/src/translator/types.ts +20 -5
  775. package/src/translator/utils.ts +100 -5
  776. package/src/utils/time-slicing/constant.ts +37 -0
  777. package/src/utils/time-slicing/controller.ts +342 -0
  778. package/src/utils/time-slicing/index.ts +6 -0
  779. package/src/utils/time-slicing/page-state.ts +12 -0
  780. package/src/utils/time-slicing/performance.ts +56 -0
  781. package/src/utils/time-slicing/runner.ts +54 -0
  782. package/src/utils/time-slicing/tool.ts +45 -0
  783. package/src/utils/time-slicing/utils.ts +90 -0
  784. package/src/utils/time-slicing/wrapper.ts +58 -0
  785. package/src/utils/types.ts +9 -0
  786. package/test/concepts/anonymous-function/toEmbeddedTS.spec.ts +2 -1
  787. package/test/concepts/assignment/toEmbeddedTS.spec.ts +2 -1
  788. package/test/concepts/batch-assignment/toEmbeddedTS.spec.ts +2 -1
  789. package/test/concepts/binary-expression/__snapshots__/toEmbeddedTS.spec.ts.snap +3 -3
  790. package/test/concepts/binary-expression/toEmbeddedTS.spec.ts +2 -1
  791. package/test/concepts/boolean-literal/toEmbeddedTS.spec.ts +2 -1
  792. package/test/concepts/call-function/toEmbeddedTS.spec.ts +2 -1
  793. package/test/concepts/call-interface/__snapshots__/toJS.spec.ts.snap +3 -3
  794. package/test/concepts/call-interface/toEmbeddedTS.spec.ts +2 -1
  795. package/test/concepts/call-logic/__snapshots__/toJS.spec.ts.snap +5 -5
  796. package/test/concepts/call-logic/getQuickInfoOffset.spec.ts +2 -1
  797. package/test/concepts/call-logic/toEmbeddedTS.spec.ts +2 -1
  798. package/test/concepts/data-source/toEmbeddedTS.spec.ts +2 -1
  799. package/test/concepts/data-source/toEmbeddedTSFile.spec.ts +2 -1
  800. package/test/concepts/entity/__snapshots__/toEmbeddedTS.spec.ts.snap +19 -19
  801. package/test/concepts/entity/toEmbeddedTS.spec.ts +2 -1
  802. package/test/concepts/identifier/toEmbeddedTS.spec.ts +2 -1
  803. package/test/concepts/match/__snapshots__/toJS.spec.ts.snap +1 -1
  804. package/test/concepts/match/toEmbeddedTS.spec.ts +2 -1
  805. package/test/concepts/member-expression/toEmbeddedTS.spec.ts +2 -1
  806. package/test/concepts/null-literal/toEmbeddedTS.spec.ts +2 -1
  807. package/test/concepts/numeric-literal/__snapshots__/toJS.spec.ts.snap +1 -1
  808. package/test/concepts/numeric-literal/toEmbeddedTS.spec.ts +2 -1
  809. package/test/concepts/string-literal/toEmbeddedTS.spec.ts +2 -1
  810. package/test/concepts/validation-rule/__snapshots__/toJS.spec.ts.snap +3 -3
  811. package/test/concepts/validation-rule/toEmbeddedTS.spec.ts +2 -1
  812. package/test/concepts/validation-rule/validation-rule.spec.ts +2 -1
  813. package/test/concepts/view-element/__snapshots__/toEmbeddedTS.spec.ts.snap +3 -3
  814. package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +0 -4
  815. package/test/concepts/view-element/toEmbeddedTS.spec.ts +2 -1
  816. package/test/time-slicing/runner.spec.ts +28 -0
  817. package/test/time-slicing/time-slicing-nodejs.spec.ts +27 -0
  818. package/test/time-slicing/utils.ts +7 -0
  819. package/test/time-slicing/wrapper.spec.ts +92 -0
  820. package/ts-worker/lib/tsserver.js +10 -1
  821. package/ts-worker/package.json +1 -0
  822. package/ts-worker/src/index.js +13 -12
  823. package/ts-worker/webpack.config.js +1 -1
  824. package/out/concepts/InterfaceFromExample__.d.ts +0 -88
  825. package/out/concepts/InterfaceFromExample__.js +0 -183
  826. package/out/concepts/InterfaceFromExample__.js.map +0 -1
  827. package/out/utils/time-slicing.d.ts +0 -41
  828. package/out/utils/time-slicing.js +0 -82
  829. package/out/utils/time-slicing.js.map +0 -1
  830. package/src/concepts/InterfaceFromExample__.ts +0 -205
  831. package/src/utils/time-slicing.ts +0 -111
@@ -1,4 +1,5 @@
1
- import { TranslatorState } from '../translator';
1
+ import type { EmbeddedTSFileGenerator } from '../utils';
2
+ import { TranslatorState, TranslatorGenerator } from '../translator';
2
3
  import ForEachStatement from './ForEachStatement__';
3
4
  import Assignment from './Assignment__';
4
5
  import BatchAssignment from './BatchAssignment__';
@@ -604,15 +605,15 @@ export declare class Logic extends BaseNode {
604
605
  path: string;
605
606
  };
606
607
  };
607
- toEmbeddedTSInProcess(state?: TranslatorState, prependCode?: string, noName?: boolean, prefix?: boolean): string;
608
+ toEmbeddedTSInProcess(state?: TranslatorState, prependCode?: string, noName?: boolean, prefix?: boolean): TranslatorGenerator;
608
609
  toEmbeddedTSNoExport(state?: TranslatorState): string;
609
610
  get tsName(): string;
610
- toEmbeddedTS(state?: TranslatorState, prefix?: string, hideDefaultValue?: boolean): string;
611
+ toEmbeddedTS(state?: TranslatorState, prefix?: string, hideDefaultValue?: boolean): TranslatorGenerator;
611
612
  toNaturalTS(state?: TranslatorState, prefix?: string, logicName?: string, currentNode?: BaseNode): string;
612
- getRightCode(code: string, assignment: Assignment | BatchAssignment, rightNode: any): string;
613
+ getRightCode(code: string, assignment: Assignment | BatchAssignment, rightNode: any): Generator<any, string, any>;
613
614
  handleReplaceCode(code: string, variable: string, replaceCode: string): string;
614
- handleForEachCode(code: string, forEachStatement: ForEachStatement): string;
615
- handleMatchCaseCode(code: string, matchCase: MatchCase): string;
615
+ handleForEachCode(code: string, forEachStatement: ForEachStatement): Generator<any, string, any>;
616
+ handleMatchCaseCode(code: string, matchCase: MatchCase): Generator<any, string, any>;
616
617
  getNamespace(): string;
617
618
  getTsNamespace(): string;
618
619
  /**
@@ -620,11 +621,7 @@ export declare class Logic extends BaseNode {
620
621
  * @param name 一般不用传,用于 rename
621
622
  */
622
623
  getEmbeddedFilePath(name?: string): string;
623
- toEmbeddedTSFile(): {
624
- code: string;
625
- filePath: string;
626
- sourceMap: import("../translator").SourceMap;
627
- };
624
+ toEmbeddedTSFile(): EmbeddedTSFileGenerator;
628
625
  static getDefaultOptions(): Partial<{
629
626
  body: Array<any>;
630
627
  params: Array<any>;
@@ -34,6 +34,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
34
34
  var Logic_1;
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.Logic = void 0;
37
+ const time_slicing_1 = require("../utils/time-slicing");
38
+ const common_1 = require("../common");
37
39
  const FrontendLibrary__1 = require("./FrontendLibrary__");
38
40
  const translator_1 = require("../translator");
39
41
  const Namespace__1 = __importDefault(require("./Namespace__"));
@@ -42,7 +44,6 @@ const Assignment__1 = __importDefault(require("./Assignment__"));
42
44
  const Identifier__1 = __importDefault(require("./Identifier__"));
43
45
  const BindEvent__1 = __importDefault(require("./BindEvent__"));
44
46
  const BatchAssignment__1 = __importDefault(require("./BatchAssignment__"));
45
- const OqlQueryComponent__1 = __importDefault(require("./OqlQueryComponent__"));
46
47
  const TypeAnnotation__1 = __importDefault(require("./TypeAnnotation__"));
47
48
  const CallInterface__1 = __importDefault(require("./CallInterface__"));
48
49
  const CallLogic__1 = __importDefault(require("./CallLogic__"));
@@ -1068,54 +1069,55 @@ class Logic extends BaseNode_1.default {
1068
1069
  },
1069
1070
  };
1070
1071
  }
1071
- toEmbeddedTSInProcess(state, prependCode, noName, prefix) {
1072
+ *toEmbeddedTSInProcess(state = (0, translator_1.createCompilerState)(), prependCode, noName, prefix) {
1073
+ const self = this;
1072
1074
  let code = '';
1073
1075
  if (!prefix)
1074
- code += `${noName ? '' : `${this.name}:`} function(`;
1076
+ code += `${noName ? '' : `${self.name}:`} function(`;
1075
1077
  else
1076
- code += `function ${this.name}(`; // 加空格会导致无法查询到引用
1077
- this.params.forEach((param, index) => {
1078
- code += param.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }), null, true);
1079
- if (index !== this.params.length - 1)
1078
+ code += `function ${self.name}(`; // 加空格会导致无法查询到引用
1079
+ yield* (0, time_slicing_1.wrapForEachToGenerator)(self.params, function* warpForEachGenerator(param, index) {
1080
+ code += yield* param.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1081
+ if (index !== self.params.length - 1)
1080
1082
  code += ', ';
1081
1083
  });
1082
1084
  code += `) {\n`;
1083
1085
  code += prependCode || '';
1084
1086
  code += '\n';
1085
- this.variables.forEach((variable) => {
1087
+ yield* (0, time_slicing_1.wrapForEachToGenerator)(self.variables, function* warpForEachGenerator(variable) {
1086
1088
  code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}let `;
1087
- code += variable.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1089
+ code += yield* variable.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1088
1090
  code += ';\n';
1089
1091
  });
1090
- this.returns.forEach((ret) => {
1092
+ yield* (0, time_slicing_1.wrapForEachToGenerator)(self.returns, function* warpForEachGenerator(ret) {
1091
1093
  code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}let `;
1092
- code += ret.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1094
+ code += yield* ret.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1093
1095
  code += ';\n';
1094
1096
  });
1095
- if (!this.body.length && this.returns.length) {
1096
- code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}return ${this.returns[0].name};\n`;
1097
+ if (!self.body.length && self.returns.length) {
1098
+ code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}return ${self.returns[0].name};\n`;
1097
1099
  }
1098
1100
  else {
1099
- if (this.parentNode.type === 'ExclusiveGateway') {
1100
- if (this.body.length <= 1) {
1101
+ if (self.parentNode.type === 'ExclusiveGateway') {
1102
+ if (self.body.length <= 1) {
1101
1103
  code += (0, translator_1.indent)((state?.tabSize || 0) + 1);
1102
1104
  code += 'const __LogicEmpty: any = null;';
1103
1105
  }
1104
1106
  }
1105
- else if (this.body.length <= 2 &&
1106
- !(this.parentNode instanceof Namespace__1.default) &&
1107
- !(this.parentNode instanceof Process__1.default)) {
1107
+ else if (self.body.length <= 2 &&
1108
+ !(self.parentNode instanceof Namespace__1.default) &&
1109
+ !(self.parentNode instanceof Process__1.default)) {
1108
1110
  code += (0, translator_1.indent)((state?.tabSize || 0) + 1);
1109
1111
  code += `${(0, translator_1.indent)(state?.tabSize || 0 + 4)}const __LogicEmpty: any = null;`;
1110
1112
  }
1111
- this.body.forEach((item) => {
1112
- code += item.toEmbeddedTS && item.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
1113
+ yield* (0, time_slicing_1.wrapForEachToGenerator)(self.body, function* warpForEachGenerator(item) {
1114
+ code += yield* item.toEmbeddedTS?.((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 1 })) ?? (0, time_slicing_1.returnOrigin)('');
1113
1115
  code += ';\n';
1114
1116
  });
1115
1117
  }
1116
1118
  // 在body渲染完成之后把其余的节点放到下面
1117
- this.playground.forEach((item) => {
1118
- code += item.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
1119
+ yield* (0, time_slicing_1.wrapForEachToGenerator)(self.playground, function* warpForEachGenerator(item) {
1120
+ code += yield* item.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
1119
1121
  code += '\n';
1120
1122
  });
1121
1123
  code += `${(0, translator_1.indent)(state?.tabSize || 0 + 4)}}`;
@@ -1123,7 +1125,7 @@ class Logic extends BaseNode_1.default {
1123
1125
  return code;
1124
1126
  }
1125
1127
  toEmbeddedTSNoExport(state) {
1126
- return this.toEmbeddedTS(state, 'noExport');
1128
+ return (0, time_slicing_1.runGeneratorSync)(this.toEmbeddedTS(state, 'noExport'));
1127
1129
  }
1128
1130
  get tsName() {
1129
1131
  // 来自集成中心,且是连接内部的逻辑,则认为是编辑态的,需要加上后缀
@@ -1133,35 +1135,38 @@ class Logic extends BaseNode_1.default {
1133
1135
  // 由于Logic name 已经是符合函数预期的,因此不再需要做格式化
1134
1136
  return this.name;
1135
1137
  }
1136
- toEmbeddedTS(state, prefix, hideDefaultValue) {
1138
+ *toEmbeddedTS(state = (0, translator_1.createCompilerState)(), prefix, hideDefaultValue) {
1139
+ const self = this;
1140
+ // 等待 oql 查询返回内容
1141
+ yield (0, common_1.waitOqlQueryComponentChildrenFinish)(self);
1137
1142
  // 如果传了不要前缀那就为空, 要不用传进来的,要是都没有就默认导出
1138
1143
  let code = '';
1139
1144
  // 用来储存默认值翻译结构是__IDENTIFIER__或者__IDENTIFIER__()的节点
1140
1145
  const IDENTIFIERMAP = new Set();
1141
1146
  if (!prefix) {
1142
- code += `export function ${this.tsName}`;
1147
+ code += `export function ${self.name}`;
1143
1148
  }
1144
1149
  else if (prefix === 'noExport') {
1145
- code += `function ${this.tsName}`;
1150
+ code += `function ${self.name}`;
1146
1151
  }
1147
1152
  else if (prefix === 'inObject') {
1148
- code += `${this.tsName}`;
1153
+ code += `${self.name}`;
1149
1154
  }
1150
- if (this.typeParams?.length) {
1155
+ if (self.typeParams?.length) {
1151
1156
  code += '<';
1152
- this.typeParams.forEach((typeParam, typeParamIndex) => {
1153
- code += typeParam.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1154
- if (typeParamIndex !== this.typeParams.length - 1)
1157
+ yield* (0, time_slicing_1.wrapForEachToGenerator)(self.typeParams, function* warpForEachGenerator(typeParam, typeParamIndex) {
1158
+ code += yield* typeParam.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1159
+ if (typeParamIndex !== self.typeParams.length - 1)
1155
1160
  code += ', ';
1156
1161
  });
1157
1162
  code += '>';
1158
1163
  }
1159
1164
  // 有参数长度
1160
- if (this.params.length) {
1165
+ if (self.params.length) {
1161
1166
  code += '(';
1162
- this.params.forEach((param, index) => {
1163
- code += param.toEmbeddedTS((0, translator_1.shiftState)(state, code));
1164
- if (index !== this.params.length - 1)
1167
+ yield* (0, time_slicing_1.wrapForEachToGenerator)(self.params, function* warpForEachGenerator(param, index) {
1168
+ code += yield* param.toEmbeddedTS((0, translator_1.shiftState)(state, code));
1169
+ if (index !== self.params.length - 1)
1165
1170
  code += ', ';
1166
1171
  });
1167
1172
  code += ')';
@@ -1172,108 +1177,87 @@ class Logic extends BaseNode_1.default {
1172
1177
  }
1173
1178
  // 需要类型推导的局部变量/返回值需要调整申明顺序
1174
1179
  const advanceMap = new Map();
1175
- const needGetSourceMapOqlList = [];
1176
- this.traverseChildren((el) => {
1180
+ // const needGetSourceMapOqlList: Promise<any>[] = [];
1181
+ yield* self.traverseChildrenGenerator(function* traverseChildrenGenerator(el) {
1177
1182
  if (el && (el instanceof BatchAssignment__1.default || (el instanceof Assignment__1.default && el.left?.name))) {
1178
1183
  if (el instanceof Assignment__1.default) {
1179
- const advanceVar = this.variables?.find((variable) => !variable.typeAnnotation && el.left?.name === variable.name);
1184
+ const advanceVar = self.variables?.find((variable) => !variable.typeAnnotation && el.left?.name === variable.name);
1180
1185
  if (advanceVar && !advanceMap.get(advanceVar)) {
1181
1186
  advanceMap.set(advanceVar, el);
1182
1187
  }
1183
- const advanceRn = this.returns?.find((ret) => !ret.typeAnnotation && el.left?.name === ret.name);
1188
+ const advanceRn = self.returns?.find((ret) => !ret.typeAnnotation && el.left?.name === ret.name);
1184
1189
  if (advanceRn && !advanceMap.get(advanceRn)) {
1185
1190
  advanceMap.set(advanceRn, el);
1186
1191
  }
1187
1192
  }
1188
1193
  else if (el instanceof BatchAssignment__1.default) {
1189
- el.assignmentLines.forEach(({ leftIndex }) => {
1194
+ yield* (0, time_slicing_1.wrapForEachToGenerator)(el.assignmentLines, function* warpForEachGenerator({ leftIndex }) {
1190
1195
  const leftCode = leftIndex.length === 1
1191
- ? el.left.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }))
1192
- : el.left.members[leftIndex[1]]?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1193
- const advanceVar = this.variables?.find((variable) => !variable.typeAnnotation && leftCode === variable.name);
1196
+ ? yield* el.left.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }))
1197
+ : yield* el.left.members[leftIndex[1]]?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) ?? (0, time_slicing_1.returnOrigin)('');
1198
+ const advanceVar = self.variables?.find((variable) => !variable.typeAnnotation && leftCode === variable.name);
1194
1199
  if (advanceVar && !advanceMap.get(advanceVar)) {
1195
1200
  advanceMap.set(advanceVar, el);
1196
1201
  }
1197
- const advanceRn = this.returns?.find((ret) => !ret.typeAnnotation && leftCode === ret.name);
1202
+ const advanceRn = self.returns?.find((ret) => !ret.typeAnnotation && leftCode === ret.name);
1198
1203
  if (advanceRn && !advanceMap.get(advanceRn)) {
1199
1204
  advanceMap.set(advanceRn, el);
1200
1205
  }
1201
1206
  });
1202
1207
  }
1203
1208
  }
1204
- // 如果有sql查询组件就需要把他们存起来
1205
- if (el instanceof OqlQueryComponent__1.default) {
1206
- if (!el.codeSourceMap) {
1207
- needGetSourceMapOqlList.push(el.requestEmbeddedTS());
1208
- }
1209
- }
1210
1209
  });
1211
- if (needGetSourceMapOqlList.length) {
1212
- Promise.all(needGetSourceMapOqlList).then(() => {
1213
- // 触发一下更新重新生成代码
1214
- this.app?.naslServer?.embeddedTSEmitter.emit('change', {
1215
- value: [
1216
- {
1217
- originEvent: {
1218
- action: 'update',
1219
- target: this,
1220
- },
1221
- },
1222
- ],
1223
- });
1224
- });
1225
- }
1226
1210
  // 兼容 return 没有类型情况
1227
- if (this.returns.length && this.returns[0].typeAnnotation) {
1211
+ if (self.returns.length && self.returns[0].typeAnnotation) {
1228
1212
  code += ': ';
1229
- code += this.returns[0].typeAnnotation?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1213
+ code += yield* self.returns[0].typeAnnotation?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) ?? (0, time_slicing_1.returnOrigin)('');
1230
1214
  }
1231
1215
  code += '{\n';
1232
1216
  // 用于虚拟节点的查找引用
1233
- this.virtualParams &&
1234
- Array.isArray(this.virtualParams) &&
1235
- this.virtualParams.forEach((param) => {
1217
+ if (Array.isArray(self.virtualParams)) {
1218
+ for (const param of self.virtualParams) {
1236
1219
  code += (0, translator_1.indent)((state?.tabSize || 0) + 1);
1237
- code += param.toEmbeddedNameTS((0, translator_1.shiftState)(state, code, { inline: true }));
1220
+ code += yield* param.toEmbeddedNameTS((0, translator_1.shiftState)(state, code, { inline: true }));
1238
1221
  code += '\n';
1239
- });
1240
- this.variables.forEach((variable) => {
1241
- const ts = variable.defaultValue?.toEmbeddedTS();
1222
+ }
1223
+ }
1224
+ for (const variable of self.variables) {
1225
+ const ts = yield* variable.defaultValue?.toEmbeddedTS?.() ?? utils.returnOrigin('');
1242
1226
  if (['__IDENTIFIER__', '__IDENTIFIER__()'].includes(ts)) {
1243
1227
  IDENTIFIERMAP.add(variable);
1244
1228
  }
1245
1229
  if (!advanceMap.get(variable)) {
1246
1230
  code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}let `;
1247
- code += variable.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1231
+ code += yield* variable.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1248
1232
  code += ';\n';
1249
1233
  }
1250
- });
1251
- this.returns.forEach((ret) => {
1252
- const ts = ret.defaultValue?.toEmbeddedTS();
1234
+ }
1235
+ for (const ret of self.returns) {
1236
+ const ts = yield* ret.defaultValue?.toEmbeddedTS?.() ?? (0, time_slicing_1.returnOrigin)('');
1253
1237
  if (['__IDENTIFIER__', '__IDENTIFIER__()'].includes(ts)) {
1254
1238
  IDENTIFIERMAP.add(ret);
1255
1239
  }
1256
1240
  if (!advanceMap.get(ret)) {
1257
1241
  code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}let `;
1258
- code += ret.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1242
+ code += yield* ret.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1259
1243
  code += ';\n';
1260
1244
  }
1261
- });
1262
- advanceMap.forEach((assignment, node) => {
1245
+ }
1246
+ yield* (0, time_slicing_1.wrapIteratorToGenerator)(advanceMap.entries(), function* warpForEachGenerator([node, assignment]) {
1263
1247
  // 有默认值的用默认值来推导类型, 但是如果是__IDENTIFIER__或者__IDENTIFIER__(),就不需要默认值来推导了
1264
1248
  if (node.defaultValue?.expression && !IDENTIFIERMAP.has(node)) {
1265
1249
  code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}let `;
1266
- code += node.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1250
+ code += yield* node.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1267
1251
  return;
1268
1252
  }
1269
1253
  code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}// @ts-ignore\n`;
1270
1254
  code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}let `;
1271
- code += node.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1255
+ code += yield* node.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1272
1256
  if (assignment instanceof BatchAssignment__1.default) {
1273
- assignment.assignmentLines.forEach(({ leftIndex, rightIndex }) => {
1257
+ yield* (0, time_slicing_1.wrapForEachToGenerator)(assignment.assignmentLines, function* warpForEachGenerator({ leftIndex, rightIndex }) {
1274
1258
  const leftCode = leftIndex.length === 1
1275
- ? assignment.left.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }))
1276
- : assignment.left.members[leftIndex[1]]?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1259
+ ? yield* assignment.left.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }))
1260
+ : yield* assignment.left.members[leftIndex[1]]?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) ?? (0, time_slicing_1.returnOrigin)('');
1277
1261
  if (leftCode === node.name) {
1278
1262
  const rightNode = rightIndex.length === 1
1279
1263
  ? assignment.rights[rightIndex[0]]?.expression
@@ -1282,21 +1266,21 @@ class Logic extends BaseNode_1.default {
1282
1266
  if (rightNode?.typeAnnotation && !(rightNode instanceof CallQueryComponent__1.default && !rightNode.isAutoInfer())) {
1283
1267
  if (rightNode.concept === 'NewComposite' && rightNode.typeAnnotation?.typeKind === 'anonymousStructure') {
1284
1268
  code += '= ';
1285
- code += rightNode.getInitCode((0, translator_1.shiftState)(state, code, { inline: true })) || 'null';
1269
+ code += (yield* rightNode.getInitCode((0, translator_1.shiftState)(state, code, { inline: true }))) || 'null';
1286
1270
  }
1287
1271
  else if (rightNode.concept === 'NewComposite' && rightNode.typeAnnotation?.typeKind === 'generic') {
1288
1272
  code += '= ';
1289
- code += rightNode.getNewCompositeCode((0, translator_1.shiftState)(state, code, { inline: true })) || 'null';
1273
+ code += (yield* rightNode.getNewCompositeCode((0, translator_1.shiftState)(state, code, { inline: true }))) || 'null';
1290
1274
  }
1291
1275
  else {
1292
1276
  code += ': ';
1293
- code += rightNode.typeAnnotation?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) || 'null';
1277
+ code += yield* rightNode.typeAnnotation?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) ?? (0, time_slicing_1.returnOrigin)('null');
1294
1278
  }
1295
1279
  }
1296
1280
  else {
1297
1281
  code += ' = ';
1298
- const rightCode = rightNode?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1299
- code += this.getRightCode(rightCode, assignment, rightNode);
1282
+ const rightCode = yield* rightNode?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) ?? (0, time_slicing_1.returnOrigin)('');
1283
+ code += yield* self.getRightCode(rightCode, assignment, rightNode);
1300
1284
  }
1301
1285
  }
1302
1286
  });
@@ -1305,26 +1289,26 @@ class Logic extends BaseNode_1.default {
1305
1289
  !assignment.right?.typeAnnotation) {
1306
1290
  const rightNode = assignment.right;
1307
1291
  code += ' = ';
1308
- code += rightNode.getInitCode((0, translator_1.shiftState)(state, code, { inline: true }));
1292
+ code += yield* rightNode.getInitCode((0, translator_1.shiftState)(state, code, { inline: true }));
1309
1293
  }
1310
1294
  else if (assignment.right?.concept === 'NewComposite' &&
1311
1295
  assignment.right?.typeAnnotation?.typeKind === 'anonymousStructure') {
1312
1296
  const rightNode = assignment.right;
1313
1297
  code += ' = ';
1314
- code += rightNode.getInitCode((0, translator_1.shiftState)(state, code, { inline: true }));
1298
+ code += yield* rightNode.getInitCode((0, translator_1.shiftState)(state, code, { inline: true }));
1315
1299
  }
1316
1300
  else if (assignment.right?.concept === 'NewComposite' &&
1317
1301
  assignment.right?.typeAnnotation?.typeKind === 'generic') {
1318
1302
  const rightNode = assignment.right;
1319
1303
  code += ' = ';
1320
- code += rightNode.getNewCompositeCode((0, translator_1.shiftState)(state, code, { inline: true }));
1304
+ code += (yield* rightNode.getNewCompositeCode((0, translator_1.shiftState)(state, code, { inline: true })));
1321
1305
  }
1322
1306
  else {
1323
1307
  const rightNode = assignment.right;
1324
1308
  // 当右边有明确类型时,直接使用其类型。旧版本数据查询不能直接使用其 typeAnnotation
1325
1309
  if (rightNode?.typeAnnotation && !(rightNode instanceof CallQueryComponent__1.default && !rightNode.isAutoInfer())) {
1326
1310
  code += ': ';
1327
- code += rightNode.typeAnnotation?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) || 'null';
1311
+ code += yield* rightNode.typeAnnotation?.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) ?? (0, time_slicing_1.returnOrigin)('null');
1328
1312
  }
1329
1313
  else {
1330
1314
  code += ' = ';
@@ -1338,19 +1322,19 @@ class Logic extends BaseNode_1.default {
1338
1322
  }
1339
1323
  rightCode +=
1340
1324
  rightNode && rightNode.toEmbeddedTS
1341
- ? rightNode.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }))
1325
+ ? yield* rightNode.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }))
1342
1326
  : '__RIGHT__';
1343
- code += this.getRightCode(rightCode, assignment, rightNode);
1327
+ code += yield* self.getRightCode(rightCode, assignment, rightNode);
1344
1328
  }
1345
1329
  }
1346
1330
  code += ';\n';
1347
1331
  });
1348
1332
  // 参数的默认值是__IDENTIFIER__或者__IDENTIFIER__()时不赋默认值,但是需要ts翻译出来进行报错校验
1349
1333
  if (!hideDefaultValue) {
1350
- IDENTIFIERMAP.forEach((node) => {
1351
- code += node.defaultValue.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1334
+ for (const node of IDENTIFIERMAP.values()) {
1335
+ code += yield* node.defaultValue.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true }));
1352
1336
  code += '; ';
1353
- });
1337
+ }
1354
1338
  code += '\n';
1355
1339
  }
1356
1340
  if (!this.body.length && this.returns.length) {
@@ -1358,8 +1342,8 @@ class Logic extends BaseNode_1.default {
1358
1342
  }
1359
1343
  else {
1360
1344
  // 如果长度小于2 并且不是虚拟节点就 加 报错,
1361
- if (this.body.length <= 2 && !(this.parentNode instanceof Namespace__1.default)) {
1362
- if (this.body.length && this.body[0].concept === 'JavaLogic') {
1345
+ if (self.body.length <= 2 && !(self.parentNode instanceof Namespace__1.default)) {
1346
+ if (self.body.length && self.body[0].concept === 'JavaLogic') {
1363
1347
  code += '';
1364
1348
  }
1365
1349
  else {
@@ -1367,50 +1351,31 @@ class Logic extends BaseNode_1.default {
1367
1351
  code += 'const __LogicEmpty: any = null;';
1368
1352
  }
1369
1353
  }
1370
- this.body.forEach((item) => {
1371
- code += item.toEmbeddedTS && item.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
1354
+ yield* (0, time_slicing_1.wrapForEachToGenerator)(self.body, function* warpForEachGenerator(item) {
1355
+ code += yield* item.toEmbeddedTS?.((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 1 })) ?? (0, time_slicing_1.returnOrigin)('');
1372
1356
  code += ';\n';
1373
1357
  });
1374
1358
  }
1375
1359
  // 在body渲染完成之后把其余的节点放到下面
1376
- this.playground.forEach((item) => {
1377
- code += item.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
1360
+ yield* (0, time_slicing_1.wrapForEachToGenerator)(self.playground, function* warpForEachGenerator(item) {
1361
+ code += yield* item.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
1378
1362
  code += ';\n';
1379
1363
  });
1380
1364
  if (!hideDefaultValue) {
1381
- if (this.variables.length) {
1382
- code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}/* -----以下是variable的默认值草稿------ */\n`;
1383
- }
1384
- this.variables.forEach((variable) => {
1385
- if (variable.defaultValue) {
1386
- variable.defaultValue.playground?.forEach((item) => {
1387
- code += item.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
1388
- code += ';\n';
1389
- });
1365
+ function* setPlaygroundCode(arr, name) {
1366
+ if (arr.length) {
1367
+ code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}/* -----以下是 ${name} 的默认值草稿------ */\n`;
1390
1368
  }
1391
- });
1392
- if (this.returns.length) {
1393
- code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}/* -----以下是returns的默认值草稿------ */\n`;
1394
- }
1395
- this.returns.forEach((return_) => {
1396
- if (return_.defaultValue) {
1397
- return_.defaultValue.playground?.forEach((item) => {
1398
- code += item.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
1369
+ for (const item1 of arr) {
1370
+ for (const item of item1.defaultValue?.playground ?? []) {
1371
+ code += yield* item.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
1399
1372
  code += ';\n';
1400
- });
1373
+ }
1401
1374
  }
1402
- });
1403
- if (this.params.length) {
1404
- code += `${(0, translator_1.indent)((state?.tabSize || 0) + 1)}/* -----以下是params的默认值草稿------ */\n`;
1405
1375
  }
1406
- this.params.forEach((param) => {
1407
- if (param.defaultValue) {
1408
- param.defaultValue.playground?.forEach((item) => {
1409
- code += item.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
1410
- code += ';\n';
1411
- });
1412
- }
1413
- });
1376
+ yield* setPlaygroundCode(self.variables, 'variables');
1377
+ yield* setPlaygroundCode(self.returns, 'returns');
1378
+ yield* setPlaygroundCode(self.params, 'params');
1414
1379
  }
1415
1380
  code += `${(0, translator_1.indent)(state?.tabSize || 0)}}`;
1416
1381
  if (prefix === 'inObject') {
@@ -1514,7 +1479,7 @@ ${(0, translator_1.indent)(state.tabSize)} */\n`;
1514
1479
  partialCode = item.toNaturalTS((0, translator_1.shiftState)(state, code, { tabSize: state.tabSize + 1 }));
1515
1480
  }
1516
1481
  else if (item.toEmbeddedTS) {
1517
- partialCode = item.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: state.tabSize + 1 }));
1482
+ partialCode = (0, time_slicing_1.runGeneratorSync)(item.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: state.tabSize + 1 })));
1518
1483
  }
1519
1484
  if (partialCode.trim()) {
1520
1485
  code += partialCode;
@@ -1530,7 +1495,7 @@ ${(0, translator_1.indent)(state.tabSize)} */\n`;
1530
1495
  code += '\n';
1531
1496
  return code;
1532
1497
  }
1533
- getRightCode(code, assignment, rightNode) {
1498
+ *getRightCode(code, assignment, rightNode) {
1534
1499
  code = code.replaceAll('\n', ' ');
1535
1500
  if (assignment instanceof Assignment__1.default && !assignment.right)
1536
1501
  return code;
@@ -1550,12 +1515,12 @@ ${(0, translator_1.indent)(state.tabSize)} */\n`;
1550
1515
  // ForEachStatement 内部变量需要替换处理,如 item、index
1551
1516
  const forEachStatement = assignment.getAncestor('ForEachStatement');
1552
1517
  if (forEachStatement) {
1553
- code = this.handleForEachCode(code, forEachStatement);
1518
+ code = yield* this.handleForEachCode(code, forEachStatement);
1554
1519
  }
1555
1520
  // Match 需要针对分支缩小类型范围
1556
1521
  const matchCase = assignment.getAncestor('MatchCase');
1557
1522
  if (matchCase) {
1558
- code = this.handleMatchCaseCode(code, matchCase);
1523
+ code = yield* this.handleMatchCaseCode(code, matchCase);
1559
1524
  }
1560
1525
  return code;
1561
1526
  }
@@ -1587,33 +1552,34 @@ ${(0, translator_1.indent)(state.tabSize)} */\n`;
1587
1552
  return fnCode;
1588
1553
  });
1589
1554
  }
1590
- handleForEachCode(code, forEachStatement) {
1555
+ *handleForEachCode(code, forEachStatement) {
1591
1556
  const { item, index, each } = forEachStatement;
1592
1557
  if (code.includes(item.name)) {
1593
- const eachTSCode = each ? each.toEmbeddedTS() : '__IDENTIFIER__';
1558
+ const eachTSCode = each ? yield* each.toEmbeddedTS() : '__IDENTIFIER__';
1594
1559
  code = this.handleReplaceCode(code, item.name, eachTSCode === '__IDENTIFIER__' ? eachTSCode : `${eachTSCode}.__get(0)`);
1595
1560
  }
1596
- if (code.includes(index.name))
1561
+ if (code.includes(index.name)) {
1597
1562
  code = this.handleReplaceCode(code, index.name, 'new nasl.core.Long(0)');
1563
+ }
1598
1564
  const parentForEachStatement = forEachStatement.getAncestor('ForEachStatement');
1599
1565
  if (parentForEachStatement) {
1600
- this.handleForEachCode(code, parentForEachStatement);
1566
+ code = yield* this.handleForEachCode(code, parentForEachStatement);
1601
1567
  }
1602
1568
  return code;
1603
1569
  }
1604
- handleMatchCaseCode(code, matchCase) {
1570
+ *handleMatchCaseCode(code, matchCase) {
1605
1571
  const match = matchCase.getAncestor('Match');
1606
- const expressionTsCode = match.expression.toEmbeddedTS();
1572
+ const expressionTsCode = yield* match.expression.toEmbeddedTS();
1607
1573
  if (code.includes(expressionTsCode)) {
1608
1574
  let typeCode = '';
1609
- matchCase.patterns.forEach((pattern, index) => {
1575
+ yield* (0, time_slicing_1.wrapForEachToGenerator)(matchCase.patterns, function* wrapForEach(pattern, index) {
1610
1576
  if (pattern instanceof TypeAnnotation__1.default) {
1611
1577
  if (index === 0) {
1612
- typeCode += pattern.toEmbeddedTS();
1578
+ typeCode += yield* pattern.toEmbeddedTS();
1613
1579
  }
1614
1580
  else {
1615
1581
  typeCode += '|';
1616
- typeCode += pattern.toEmbeddedTS();
1582
+ typeCode += yield* pattern.toEmbeddedTS();
1617
1583
  }
1618
1584
  }
1619
1585
  });
@@ -1623,7 +1589,7 @@ ${(0, translator_1.indent)(state.tabSize)} */\n`;
1623
1589
  }
1624
1590
  const parentMatchCase = match.getAncestor('MatchCase');
1625
1591
  if (parentMatchCase) {
1626
- code = this.handleMatchCaseCode(code, parentMatchCase);
1592
+ code = yield* this.handleMatchCaseCode(code, parentMatchCase);
1627
1593
  }
1628
1594
  return code;
1629
1595
  }
@@ -1705,7 +1671,9 @@ ${(0, translator_1.indent)(state.tabSize)} */\n`;
1705
1671
  if (this.module) {
1706
1672
  _path = `/${this.module.parentKey}/${this.module.name}`;
1707
1673
  }
1708
- else if (this.connector) {
1674
+ // 由于 getAncestor逻辑变更导致现在在module 上也可以获取 connector ,导致之前的 else if 逻辑失效
1675
+ // 现断层处理
1676
+ if (this.connector) {
1709
1677
  // 自定义连接器 编辑态文件对应parentKey 为 connectors,
1710
1678
  // 稳定态文件对应parentKey 为 dependencies
1711
1679
  // 自定义连接器有分组的概念因此,需要做文件夹处理
@@ -1724,11 +1692,11 @@ ${(0, translator_1.indent)(state.tabSize)} */\n`;
1724
1692
  }
1725
1693
  return `/embedded/${this.app.name}${_path}/logics/${name}.ts`;
1726
1694
  }
1727
- toEmbeddedTSFile() {
1695
+ *toEmbeddedTSFile() {
1728
1696
  let code = `namespace ${this.getTsNamespace()} {\n`;
1729
1697
  const state = (0, translator_1.createCompilerState)(code, { tabSize: 1 });
1730
1698
  try {
1731
- code += this.toEmbeddedTS(state);
1699
+ code += yield* this.toEmbeddedTS(state);
1732
1700
  }
1733
1701
  catch (err) {
1734
1702
  console.log(err, `有问题翻译失败:${this.getTsNamespace()}.${this.name}`);
@@ -1800,13 +1768,12 @@ ${(0, translator_1.indent)(state.tabSize)} */\n`;
1800
1768
  const connector = el?.getAncestor?.('Connector');
1801
1769
  if (['CallAuthInterface', 'CallInterface'].includes(el?.concept) && connector) {
1802
1770
  const { calleeName } = el;
1803
- const targetInterface = connector.interfaces.find((i) => i.inter.name === calleeName);
1771
+ const targetInterface = connector.interfaces.find((i) => i.name === calleeName);
1804
1772
  if (targetInterface) {
1805
1773
  const refs = await this.app?.naslServer?._isHaveRef(targetInterface);
1806
1774
  // 如果只有两个引用,则必然为自身以及当前logic引用,需要删除此接口
1807
1775
  if (refs?.length <= 2) {
1808
- console.log('走到这里了么');
1809
- targetInterface.deleteInterfaceFromExample();
1776
+ targetInterface.deleteInterface();
1810
1777
  }
1811
1778
  }
1812
1779
  }
@@ -1969,10 +1936,10 @@ __decorate([
1969
1936
  })
1970
1937
  ], Logic.prototype, "playground", void 0);
1971
1938
  __decorate([
1972
- (0, translator_1.withSourceMap)()
1939
+ translator_1.withSourceMapGenerator
1973
1940
  ], Logic.prototype, "toEmbeddedTSInProcess", null);
1974
1941
  __decorate([
1975
- (0, translator_1.withSourceMap)()
1942
+ translator_1.withSourceMapGenerator
1976
1943
  ], Logic.prototype, "toEmbeddedTS", null);
1977
1944
  __decorate([
1978
1945
  (0, translator_1.withSourceMap)()