@lcap/nasl 3.3.0-beta.2 → 3.3.2-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/.nyc_output/d58d92d8-c0d6-479b-9f82-1f4da8e73ff3.json +1 -0
  2. package/.nyc_output/processinfo/d58d92d8-c0d6-479b-9f82-1f4da8e73ff3.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 +622 -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 +3874 -0
  35. package/coverage/src/common/Command.ts.html +310 -0
  36. package/coverage/src/common/EventEmitter.ts.html +370 -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 +328 -0
  42. package/coverage/src/concepts/Anchor__.ts.html +646 -0
  43. package/coverage/src/concepts/AnonymousFunction__.ts.html +2029 -0
  44. package/coverage/src/concepts/App__.ts.html +13252 -0
  45. package/coverage/src/concepts/Argument__.ts.html +964 -0
  46. package/coverage/src/concepts/Assignee__.ts.html +2236 -0
  47. package/coverage/src/concepts/AssignmentLine__.ts.html +409 -0
  48. package/coverage/src/concepts/Assignment__.ts.html +1123 -0
  49. package/coverage/src/concepts/Attribute__.ts.html +733 -0
  50. package/coverage/src/concepts/AuthInterface__.ts.html +367 -0
  51. package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +1984 -0
  52. package/coverage/src/concepts/AuthLogic__.ts.html +781 -0
  53. package/coverage/src/concepts/BackendVariable__.ts.html +1483 -0
  54. package/coverage/src/concepts/Backend__.ts.html +1165 -0
  55. package/coverage/src/concepts/BatchAssignment__.ts.html +3301 -0
  56. package/coverage/src/concepts/BinaryExpression__.ts.html +1441 -0
  57. package/coverage/src/concepts/BindAttribute__.ts.html +3835 -0
  58. package/coverage/src/concepts/BindDirective__.ts.html +1921 -0
  59. package/coverage/src/concepts/BindEvent__.ts.html +3406 -0
  60. package/coverage/src/concepts/BindStyle__.ts.html +1612 -0
  61. package/coverage/src/concepts/BooleanLiteral__.ts.html +418 -0
  62. package/coverage/src/concepts/CallAuthInterface__.ts.html +1615 -0
  63. package/coverage/src/concepts/CallConnector__.ts.html +922 -0
  64. package/coverage/src/concepts/CallFunction__.ts.html +2122 -0
  65. package/coverage/src/concepts/CallInterface__.ts.html +2719 -0
  66. package/coverage/src/concepts/CallLogic__.ts.html +4807 -0
  67. package/coverage/src/concepts/CallQueryComponent__.ts.html +5308 -0
  68. package/coverage/src/concepts/Comment__.ts.html +394 -0
  69. package/coverage/src/concepts/CompletionProperty__.ts.html +925 -0
  70. package/coverage/src/concepts/ConfigGroup__.ts.html +1105 -0
  71. package/coverage/src/concepts/ConfigPropertyValue__.ts.html +424 -0
  72. package/coverage/src/concepts/ConfigProperty__.ts.html +1348 -0
  73. package/coverage/src/concepts/Configuration__.ts.html +1027 -0
  74. package/coverage/src/concepts/Connection__.ts.html +1360 -0
  75. package/coverage/src/concepts/ConnectorTrigger__.ts.html +595 -0
  76. package/coverage/src/concepts/Connector__.ts.html +4255 -0
  77. package/coverage/src/concepts/Constant__.ts.html +913 -0
  78. package/coverage/src/concepts/DataSource__.ts.html +1771 -0
  79. package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +331 -0
  80. package/coverage/src/concepts/Destination__.ts.html +2731 -0
  81. package/coverage/src/concepts/End__.ts.html +433 -0
  82. package/coverage/src/concepts/EntityIndex__.ts.html +787 -0
  83. package/coverage/src/concepts/EntityProperty__.ts.html +2668 -0
  84. package/coverage/src/concepts/Entity__.ts.html +2950 -0
  85. package/coverage/src/concepts/EnumItem__.ts.html +550 -0
  86. package/coverage/src/concepts/Enum__.ts.html +1231 -0
  87. package/coverage/src/concepts/Event__.ts.html +1084 -0
  88. package/coverage/src/concepts/ExternalDestination__.ts.html +1033 -0
  89. package/coverage/src/concepts/ForEachStatement__.ts.html +1957 -0
  90. package/coverage/src/concepts/FrontendLibrary__.ts.html +1711 -0
  91. package/coverage/src/concepts/FrontendVariable__.ts.html +292 -0
  92. package/coverage/src/concepts/Frontend__.ts.html +3961 -0
  93. package/coverage/src/concepts/Function__.ts.html +3598 -0
  94. package/coverage/src/concepts/Identifier__.ts.html +1057 -0
  95. package/coverage/src/concepts/IfStatement__.ts.html +1594 -0
  96. package/coverage/src/concepts/Integration__.ts.html +1228 -0
  97. package/coverage/src/concepts/InterfaceParam__.ts.html +1087 -0
  98. package/coverage/src/concepts/Interface__.ts.html +3394 -0
  99. package/coverage/src/concepts/JSBlock__.ts.html +421 -0
  100. package/coverage/src/concepts/JavaLogic__.ts.html +460 -0
  101. package/coverage/src/concepts/LogicItem__.ts.html +1171 -0
  102. package/coverage/src/concepts/Logic__.ts.html +7408 -0
  103. package/coverage/src/concepts/MatchCase__.ts.html +2929 -0
  104. package/coverage/src/concepts/Match__.ts.html +2455 -0
  105. package/coverage/src/concepts/MemberExpression__.ts.html +1726 -0
  106. package/coverage/src/concepts/MicroApp__.ts.html +436 -0
  107. package/coverage/src/concepts/Module__.ts.html +9220 -0
  108. package/coverage/src/concepts/MsgTriggerEvent__.ts.html +1045 -0
  109. package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +1018 -0
  110. package/coverage/src/concepts/Namespace__.ts.html +7942 -0
  111. package/coverage/src/concepts/NewComposite__.ts.html +4729 -0
  112. package/coverage/src/concepts/NewList__.ts.html +1618 -0
  113. package/coverage/src/concepts/NewMap__.ts.html +2326 -0
  114. package/coverage/src/concepts/New__.ts.html +289 -0
  115. package/coverage/src/concepts/NullLiteral__.ts.html +349 -0
  116. package/coverage/src/concepts/NumericLiteral__.ts.html +676 -0
  117. package/coverage/src/concepts/OqlQueryComponent__.ts.html +1141 -0
  118. package/coverage/src/concepts/OverriddenLogic__.ts.html +6817 -0
  119. package/coverage/src/concepts/Param__.ts.html +1726 -0
  120. package/coverage/src/concepts/Point__.ts.html +331 -0
  121. package/coverage/src/concepts/ProcessComponent__.ts.html +1666 -0
  122. package/coverage/src/concepts/ProcessElement__.ts.html +5884 -0
  123. package/coverage/src/concepts/ProcessOutcome__.ts.html +352 -0
  124. package/coverage/src/concepts/ProcessOutcomes__.ts.html +343 -0
  125. package/coverage/src/concepts/Process__.ts.html +4768 -0
  126. package/coverage/src/concepts/QueryAggregateExpression__.ts.html +568 -0
  127. package/coverage/src/concepts/QueryFieldExpression__.ts.html +583 -0
  128. package/coverage/src/concepts/QueryFromExpression__.ts.html +910 -0
  129. package/coverage/src/concepts/QueryGroupByExpression__.ts.html +559 -0
  130. package/coverage/src/concepts/QueryJoinExpression__.ts.html +1567 -0
  131. package/coverage/src/concepts/QueryLimitExpression__.ts.html +637 -0
  132. package/coverage/src/concepts/QueryOrderByExpression__.ts.html +679 -0
  133. package/coverage/src/concepts/QuerySelectExpression__.ts.html +1714 -0
  134. package/coverage/src/concepts/Rect__.ts.html +373 -0
  135. package/coverage/src/concepts/Return__.ts.html +1312 -0
  136. package/coverage/src/concepts/Role__.ts.html +601 -0
  137. package/coverage/src/concepts/SelectMembers__.ts.html +1246 -0
  138. package/coverage/src/concepts/Slot__.ts.html +628 -0
  139. package/coverage/src/concepts/SqlQueryComponent__.ts.html +982 -0
  140. package/coverage/src/concepts/Start__.ts.html +304 -0
  141. package/coverage/src/concepts/StringInterpolation__.ts.html +1129 -0
  142. package/coverage/src/concepts/StringLiteral__.ts.html +505 -0
  143. package/coverage/src/concepts/StructureProperty__.ts.html +1132 -0
  144. package/coverage/src/concepts/Structure__.ts.html +2092 -0
  145. package/coverage/src/concepts/SwitchCase__.ts.html +1174 -0
  146. package/coverage/src/concepts/SwitchStatement__.ts.html +877 -0
  147. package/coverage/src/concepts/Theme__.ts.html +358 -0
  148. package/coverage/src/concepts/Transactional__.ts.html +628 -0
  149. package/coverage/src/concepts/TriggerEvent__.ts.html +1012 -0
  150. package/coverage/src/concepts/TriggerLauncher__.ts.html +775 -0
  151. package/coverage/src/concepts/TypeAnnotation__.ts.html +3718 -0
  152. package/coverage/src/concepts/TypeParam__.ts.html +319 -0
  153. package/coverage/src/concepts/UnaryExpression__.ts.html +697 -0
  154. package/coverage/src/concepts/Unparsed__.ts.html +394 -0
  155. package/coverage/src/concepts/UseComponent__.ts.html +331 -0
  156. package/coverage/src/concepts/ValidationRule__.ts.html +1840 -0
  157. package/coverage/src/concepts/Variable__.ts.html +1489 -0
  158. package/coverage/src/concepts/ViewBlock__.ts.html +352 -0
  159. package/coverage/src/concepts/ViewComponent__.ts.html +4180 -0
  160. package/coverage/src/concepts/ViewElement__.ts.html +8803 -0
  161. package/coverage/src/concepts/View__.ts.html +8620 -0
  162. package/coverage/src/concepts/WhileStatement__.ts.html +1063 -0
  163. package/coverage/src/concepts/basics/stdlib/index.html +356 -0
  164. package/coverage/src/concepts/basics/stdlib/index.ts.html +208 -0
  165. package/coverage/src/concepts/basics/stdlib/nasl.auth.ts.html +565 -0
  166. package/coverage/src/concepts/basics/stdlib/nasl.browser.ts.html +517 -0
  167. package/coverage/src/concepts/basics/stdlib/nasl.collection.ts.html +226 -0
  168. package/coverage/src/concepts/basics/stdlib/nasl.configuration.ts.html +172 -0
  169. package/coverage/src/concepts/basics/stdlib/nasl.core.ts.html +214 -0
  170. package/coverage/src/concepts/basics/stdlib/nasl.event.ts.html +145 -0
  171. package/coverage/src/concepts/basics/stdlib/nasl.http.ts.html +589 -0
  172. package/coverage/src/concepts/basics/stdlib/nasl.interface.ts.html +214 -0
  173. package/coverage/src/concepts/basics/stdlib/nasl.io.ts.html +229 -0
  174. package/coverage/src/concepts/basics/stdlib/nasl.logging.ts.html +268 -0
  175. package/coverage/src/concepts/basics/stdlib/nasl.process.ts.html +1999 -0
  176. package/coverage/src/concepts/basics/stdlib/nasl.ui.ts.html +3259 -0
  177. package/coverage/src/concepts/basics/stdlib/nasl.util.ts.html +6844 -0
  178. package/coverage/src/concepts/basics/stdlib/nasl.validation.ts.html +1768 -0
  179. package/coverage/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts.html +163 -0
  180. package/coverage/src/concepts/basics/stdlib/timeZone.ts.html +664 -0
  181. package/coverage/src/concepts/basics/types/coreTypeList.ts.html +121 -0
  182. package/coverage/src/concepts/basics/types/index.html +131 -0
  183. package/coverage/src/concepts/basics/types/index.ts.html +160 -0
  184. package/coverage/src/concepts/index.html +1961 -0
  185. package/coverage/src/concepts/index.ts.html +103 -0
  186. package/coverage/src/concepts/index__.ts.html +451 -0
  187. package/coverage/src/config.ts.html +325 -0
  188. package/coverage/src/decorators/index.html +131 -0
  189. package/coverage/src/decorators/index.ts.html +574 -0
  190. package/coverage/src/decorators/promise.ts.html +169 -0
  191. package/coverage/src/eventBus.ts.html +100 -0
  192. package/coverage/src/generator/compileComponent.ts.html +142 -0
  193. package/coverage/src/generator/genBundleFiles.ts.html +1828 -0
  194. package/coverage/src/generator/genHash.ts.html +124 -0
  195. package/coverage/src/generator/genMetaData.ts.html +1042 -0
  196. package/coverage/src/generator/genReleaseBody.ts.html +1282 -0
  197. package/coverage/src/generator/icestark.ts.html +220 -0
  198. package/coverage/src/generator/index.html +266 -0
  199. package/coverage/src/generator/index.ts.html +106 -0
  200. package/coverage/src/generator/microApp.ts.html +172 -0
  201. package/coverage/src/generator/permission.ts.html +1036 -0
  202. package/coverage/src/generator/qiankun.ts.html +232 -0
  203. package/coverage/src/generator/styleReplacer.ts.html +199 -0
  204. package/coverage/src/index.html +146 -0
  205. package/coverage/src/index.ts.html +121 -0
  206. package/coverage/src/manager/diagnostic.ts.html +442 -0
  207. package/coverage/src/manager/index.html +131 -0
  208. package/coverage/src/manager/stepRecorder.ts.html +457 -0
  209. package/coverage/src/natural/genNaturalTS.ts.html +355 -0
  210. package/coverage/src/natural/index.html +161 -0
  211. package/coverage/src/natural/index.ts.html +91 -0
  212. package/coverage/src/natural/naslStdlibMap.ts.html +157 -0
  213. package/coverage/src/natural/transformTSCode.ts.html +2647 -0
  214. package/coverage/src/sentry/index.html +116 -0
  215. package/coverage/src/sentry/index.ts.html +676 -0
  216. package/coverage/src/server/createUiTs.ts.html +910 -0
  217. package/coverage/src/server/entity2LogicNamespace.ts.html +1294 -0
  218. package/coverage/src/server/event.js.html +526 -0
  219. package/coverage/src/server/extendBaseNode.ts.html +1762 -0
  220. package/coverage/src/server/formatTsUtils.ts.html +2689 -0
  221. package/coverage/src/server/getConnector.ts.html +316 -0
  222. package/coverage/src/server/getExtensionModules.ts.html +178 -0
  223. package/coverage/src/server/getFunctions.ts.html +133 -0
  224. package/coverage/src/server/getInterfaces.ts.html +229 -0
  225. package/coverage/src/server/getLogging.ts.html +100 -0
  226. package/coverage/src/server/getLogics.ts.html +1363 -0
  227. package/coverage/src/server/getMemberIdentifier.ts.html +1561 -0
  228. package/coverage/src/server/getProcessComponents.ts.html +112 -0
  229. package/coverage/src/server/getProcesses.ts.html +2023 -0
  230. package/coverage/src/server/getValidates.ts.html +115 -0
  231. package/coverage/src/server/index.html +401 -0
  232. package/coverage/src/server/index.ts.html +229 -0
  233. package/coverage/src/server/naslServer.ts.html +14401 -0
  234. package/coverage/src/server/naslStdlibMap.ts.html +241 -0
  235. package/coverage/src/server/process2LogicNamespace.ts.html +454 -0
  236. package/coverage/src/server/translator.ts.html +2566 -0
  237. package/coverage/src/service/creator/add.configs.js.html +379 -0
  238. package/coverage/src/service/creator/errHandles.js.html +322 -0
  239. package/coverage/src/service/creator/index.html +146 -0
  240. package/coverage/src/service/creator/index.js.html +352 -0
  241. package/coverage/src/service/datasource/api.js.html +118 -0
  242. package/coverage/src/service/datasource/index.html +131 -0
  243. package/coverage/src/service/datasource/index.js.html +103 -0
  244. package/coverage/src/service/logic/api.js.html +109 -0
  245. package/coverage/src/service/logic/index.html +131 -0
  246. package/coverage/src/service/logic/index.js.html +103 -0
  247. package/coverage/src/service/storage/api.js.html +202 -0
  248. package/coverage/src/service/storage/index.html +206 -0
  249. package/coverage/src/service/storage/index.ts.html +103 -0
  250. package/coverage/src/service/storage/init.ts.html +2761 -0
  251. package/coverage/src/service/storage/jsoner.ts.html +502 -0
  252. package/coverage/src/service/storage/map.ts.html +256 -0
  253. package/coverage/src/service/storage/service.ts.html +331 -0
  254. package/coverage/src/service/storage/storagePoint.ts.html +304 -0
  255. package/coverage/src/templator/genCallComponentLogic.ts.html +163 -0
  256. package/coverage/src/templator/genCreateBlock.ts.html +1093 -0
  257. package/coverage/src/templator/genCurdEditMultipleKeyBlock.ts.html +1609 -0
  258. package/coverage/src/templator/genCurdMultipleKeyBlock.ts.html +2254 -0
  259. package/coverage/src/templator/genEditTableBlock.ts.html +955 -0
  260. package/coverage/src/templator/genEnumSelectBlock.ts.html +178 -0
  261. package/coverage/src/templator/genGetBlock.ts.html +451 -0
  262. package/coverage/src/templator/genGridViewBlock.ts.html +1114 -0
  263. package/coverage/src/templator/genListViewBlock.ts.html +475 -0
  264. package/coverage/src/templator/genQueryComponent.ts.html +1207 -0
  265. package/coverage/src/templator/genSelectBlock.ts.html +1243 -0
  266. package/coverage/src/templator/genTableBlock.ts.html +910 -0
  267. package/coverage/src/templator/genUpdateBlock.ts.html +1192 -0
  268. package/coverage/src/templator/index.html +326 -0
  269. package/coverage/src/templator/index.ts.html +154 -0
  270. package/coverage/src/templator/utils.ts.html +1861 -0
  271. package/coverage/src/translator/constant.ts.html +106 -0
  272. package/coverage/src/translator/index.html +146 -0
  273. package/coverage/src/translator/index.ts.html +94 -0
  274. package/coverage/src/translator/utils.ts.html +436 -0
  275. package/coverage/src/utils/cookie.ts.html +265 -0
  276. package/coverage/src/utils/env.ts.html +91 -0
  277. package/coverage/src/utils/index.html +236 -0
  278. package/coverage/src/utils/index.ts.html +655 -0
  279. package/coverage/src/utils/logger.ts.html +145 -0
  280. package/coverage/src/utils/sortTsString.ts.html +187 -0
  281. package/coverage/src/utils/string.ts.html +400 -0
  282. package/coverage/src/utils/time-slicing.ts.html +418 -0
  283. package/coverage/src/utils/traverse.ts.html +568 -0
  284. package/coverage/src/utils/window.ts.html +112 -0
  285. package/out/bak/translator.js +16 -18
  286. package/out/bak/translator.js.map +1 -1
  287. package/out/breakpoint/generator/BreakpointNode.js +1 -0
  288. package/out/breakpoint/generator/BreakpointNode.js.map +1 -1
  289. package/out/breakpoint/shared/constants.d.ts +2 -0
  290. package/out/breakpoint/shared/constants.js +3 -1
  291. package/out/breakpoint/shared/constants.js.map +1 -1
  292. package/out/breakpoint/shared/socket.d.ts +1 -0
  293. package/out/breakpoint/shared/socket.js +35 -17
  294. package/out/breakpoint/shared/socket.js.map +1 -1
  295. package/out/breakpoint/shared/utils.js +33 -1
  296. package/out/breakpoint/shared/utils.js.map +1 -1
  297. package/out/breakpoint/store/core.d.ts +2 -0
  298. package/out/breakpoint/store/core.js +5 -3
  299. package/out/breakpoint/store/core.js.map +1 -1
  300. package/out/breakpoint/store/dock.js +33 -0
  301. package/out/breakpoint/store/dock.js.map +1 -1
  302. package/out/concepts/AuthLogicForCallInterface__.js +2 -1
  303. package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
  304. package/out/concepts/BinaryExpression__.js +5 -5
  305. package/out/concepts/BinaryExpression__.js.map +1 -1
  306. package/out/concepts/BindAttribute__.js +3 -3
  307. package/out/concepts/BindAttribute__.js.map +1 -1
  308. package/out/concepts/CallConnector__.d.ts +2 -0
  309. package/out/concepts/CallConnector__.js +17 -1
  310. package/out/concepts/CallConnector__.js.map +1 -1
  311. package/out/concepts/CallFunction__.js +31 -24
  312. package/out/concepts/CallFunction__.js.map +1 -1
  313. package/out/concepts/CallLogic__.js +53 -46
  314. package/out/concepts/CallLogic__.js.map +1 -1
  315. package/out/concepts/Connection__.js +1 -1
  316. package/out/concepts/Connection__.js.map +1 -1
  317. package/out/concepts/ForEachStatement__.d.ts +1 -20
  318. package/out/concepts/ForEachStatement__.js +16 -14
  319. package/out/concepts/ForEachStatement__.js.map +1 -1
  320. package/out/concepts/IfStatement__.js +24 -25
  321. package/out/concepts/IfStatement__.js.map +1 -1
  322. package/out/concepts/Logic__.js +8 -20
  323. package/out/concepts/Logic__.js.map +1 -1
  324. package/out/concepts/MatchCase__.js +12 -7
  325. package/out/concepts/MatchCase__.js.map +1 -1
  326. package/out/concepts/MemberExpression__.js +11 -14
  327. package/out/concepts/MemberExpression__.js.map +1 -1
  328. package/out/concepts/NewComposite__.d.ts +1 -1
  329. package/out/concepts/NewComposite__.js +11 -83
  330. package/out/concepts/NewComposite__.js.map +1 -1
  331. package/out/concepts/NewList__.js +11 -9
  332. package/out/concepts/NewList__.js.map +1 -1
  333. package/out/concepts/NewMap__.d.ts +1 -1
  334. package/out/concepts/NewMap__.js +12 -4
  335. package/out/concepts/NewMap__.js.map +1 -1
  336. package/out/concepts/New__.js +3 -1
  337. package/out/concepts/New__.js.map +1 -1
  338. package/out/concepts/StringInterpolation__.js +2 -2
  339. package/out/concepts/StringInterpolation__.js.map +1 -1
  340. package/out/concepts/SwitchCase__.js +8 -4
  341. package/out/concepts/SwitchCase__.js.map +1 -1
  342. package/out/concepts/ViewElement__.d.ts +4 -2
  343. package/out/concepts/ViewElement__.js +7 -21
  344. package/out/concepts/ViewElement__.js.map +1 -1
  345. package/out/concepts/WhileStatement__.js +6 -4
  346. package/out/concepts/WhileStatement__.js.map +1 -1
  347. package/out/concepts/basics/stdlib/nasl.browser.js +19 -3
  348. package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -1
  349. package/out/concepts/basics/stdlib/nasl.util.d.ts +2 -0
  350. package/out/concepts/basics/stdlib/nasl.util.js +36 -11
  351. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  352. package/out/concepts/basics/stdlib/timeZone.d.ts +5 -0
  353. package/out/concepts/basics/stdlib/timeZone.js +196 -0
  354. package/out/concepts/basics/stdlib/timeZone.js.map +1 -0
  355. package/out/generator/genBundleFiles.js +12 -4
  356. package/out/generator/genBundleFiles.js.map +1 -1
  357. package/out/generator/genReleaseBody.js +1 -1
  358. package/out/generator/genReleaseBody.js.map +1 -1
  359. package/out/natural/genNaturalTS.d.ts +2 -2
  360. package/out/natural/genNaturalTS.js +5 -5
  361. package/out/natural/genNaturalTS.js.map +1 -1
  362. package/out/natural/transformTSCode.js +18 -3
  363. package/out/natural/transformTSCode.js.map +1 -1
  364. package/out/server/createUiTs.js +3 -0
  365. package/out/server/createUiTs.js.map +1 -1
  366. package/out/server/getLogics.js +3 -1
  367. package/out/server/getLogics.js.map +1 -1
  368. package/out/server/getMemberIdentifier.js +15 -0
  369. package/out/server/getMemberIdentifier.js.map +1 -1
  370. package/out/server/naslServer.js +35 -9
  371. package/out/server/naslServer.js.map +1 -1
  372. package/out/service/creator/errHandles.js +10 -19
  373. package/out/service/creator/errHandles.js.map +1 -1
  374. package/out/service/storage/init.js +7 -2
  375. package/out/service/storage/init.js.map +1 -1
  376. package/out/service/storage/jsoner.js +1 -3
  377. package/out/service/storage/jsoner.js.map +1 -1
  378. package/out/templator/genEditTableBlock.js +24 -2
  379. package/out/templator/genEditTableBlock.js.map +1 -1
  380. package/out/templator/genTableBlock.js +22 -1
  381. package/out/templator/genTableBlock.js.map +1 -1
  382. package/out/translator/types.d.ts +1 -0
  383. package/out/translator/utils.js +13 -0
  384. package/out/translator/utils.js.map +1 -1
  385. package/package.json +2 -2
  386. package/sandbox/stdlib/nasl.browser.ts +2 -0
  387. package/sandbox/stdlib/nasl.ui.definition.ts +2220 -2218
  388. package/sandbox/stdlib/nasl.util.ts +20 -10
  389. package/sandbox-natural/stdlib/nasl.core.ts +6 -3
  390. package/sandbox-natural/stdlib/nasl.oql.ts +6 -0
  391. package/sandbox-natural/stdlib/nasl.util.ts +1 -1
  392. package/src/bak/translator.js +16 -17
  393. package/src/breakpoint/generator/BreakpointNode.ts +1 -0
  394. package/src/breakpoint/shared/constants.ts +2 -0
  395. package/src/breakpoint/shared/socket.ts +41 -17
  396. package/src/breakpoint/shared/utils.ts +43 -1
  397. package/src/breakpoint/store/core.ts +2 -2
  398. package/src/breakpoint/store/dock.ts +50 -0
  399. package/src/breakpoint/types/index.d.ts +1 -0
  400. package/src/concepts/AuthLogicForCallInterface__.ts +2 -1
  401. package/src/concepts/BinaryExpression__.ts +6 -6
  402. package/src/concepts/BindAttribute__.ts +5 -4
  403. package/src/concepts/CallConnector__.ts +19 -1
  404. package/src/concepts/CallFunction__.ts +40 -22
  405. package/src/concepts/CallLogic__.ts +39 -32
  406. package/src/concepts/Connection__.ts +1 -1
  407. package/src/concepts/ForEachStatement__.ts +17 -15
  408. package/src/concepts/IfStatement__.ts +30 -30
  409. package/src/concepts/Logic__.ts +13 -27
  410. package/src/concepts/MatchCase__.ts +15 -7
  411. package/src/concepts/MemberExpression__.ts +11 -14
  412. package/src/concepts/NewComposite__.ts +15 -83
  413. package/src/concepts/NewList__.ts +11 -9
  414. package/src/concepts/NewMap__.ts +12 -4
  415. package/src/concepts/New__.ts +1 -0
  416. package/src/concepts/StringInterpolation__.ts +2 -2
  417. package/src/concepts/SwitchCase__.ts +9 -5
  418. package/src/concepts/ViewElement__.ts +8 -22
  419. package/src/concepts/WhileStatement__.ts +7 -5
  420. package/src/concepts/basics/stdlib/nasl.browser.ts +19 -3
  421. package/src/concepts/basics/stdlib/nasl.util.ts +38 -19
  422. package/src/concepts/basics/stdlib/timeZone.ts +193 -0
  423. package/src/generator/genBundleFiles.ts +12 -4
  424. package/src/generator/genReleaseBody.ts +1 -1
  425. package/src/natural/genNaturalTS.ts +5 -5
  426. package/src/natural/transformTSCode.ts +18 -4
  427. package/src/server/createUiTs.ts +3 -0
  428. package/src/server/getLogics.ts +3 -1
  429. package/src/server/getMemberIdentifier.ts +15 -0
  430. package/src/server/naslServer.ts +126 -83
  431. package/src/service/creator/errHandles.js +10 -16
  432. package/src/service/storage/init.ts +10 -3
  433. package/src/service/storage/jsoner.ts +2 -2
  434. package/src/templator/genEditTableBlock.ts +24 -2
  435. package/src/templator/genTableBlock.ts +22 -1
  436. package/src/translator/types.ts +1 -0
  437. package/src/translator/utils.ts +15 -0
  438. package/test/concepts/call-logic/__snapshots__/toJS.spec.ts.snap +20 -20
  439. package/test/concepts/match/__snapshots__/toJS.spec.ts.snap +1 -1
  440. package/test/concepts/member-expression/__snapshots__/toEmbeddedTS.spec.ts.snap +1 -1
  441. package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +10 -10
@@ -1,3 +1,4 @@
1
+ import { v4 as uuidv4 } from 'uuid';
1
2
  import { TranslatorState, shiftState, withSourceMap, indent, createCompilerState } from '../translator';
2
3
  //================================================================================
3
4
  // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
@@ -7,7 +8,6 @@ import { EventPayload, Params } from '../common/EventEmitter';
7
8
  import { concept, excludedInJSON, property, className } from '../decorators';
8
9
 
9
10
  import * as utils from '../utils';
10
- import { v4 as uuidv4 } from 'uuid';
11
11
  import BaseNode from '../common/BaseNode';
12
12
  import LogicItem from './LogicItem__';
13
13
 
@@ -44,7 +44,7 @@ export class WhileStatement extends LogicItem {
44
44
  * @param source 需要合并的部分参数
45
45
  */
46
46
  constructor(source?: Partial<WhileStatement>) {
47
- source = Object.assign({}, WhileStatement.getDefaultOptions(), source);
47
+ source = { ...WhileStatement.getDefaultOptions(), ...source};
48
48
  super(source);
49
49
  super.subConstructor(source);
50
50
  }
@@ -185,7 +185,7 @@ export class WhileStatement extends LogicItem {
185
185
  if (typeof options === 'string') {
186
186
  test = this.test;
187
187
  if (!test) {
188
- throw new Error('找不到逻辑项 ' + options);
188
+ throw new Error(`找不到逻辑项 ${ options}`);
189
189
  }
190
190
  } else {
191
191
  test = options;
@@ -200,12 +200,12 @@ export class WhileStatement extends LogicItem {
200
200
  removeItemInBody(logicItem: LogicItem): void;
201
201
 
202
202
  removeItemInBody(options: LogicItem) {
203
- let logicItem: LogicItem = options;
203
+ const logicItem: LogicItem = options;
204
204
  return logicItem.delete();
205
205
  }
206
206
 
207
207
  __removeLogicItem(logicItem: LogicItem) {
208
- const parentKey = logicItem.parentKey;
208
+ const {parentKey} = logicItem;
209
209
  const params: Params = {
210
210
  parentNode: this,
211
211
  parentKey,
@@ -305,6 +305,8 @@ export class WhileStatement extends LogicItem {
305
305
  tabSize: state.tabSize + 1,
306
306
  }))};\n`;
307
307
  });
308
+ if (state.focusedNodePath === `${this.nodePath}.body[${this.body.length}]`)
309
+ code += `${indent(state.tabSize + 1)}// 当前位置\n`;
308
310
  }
309
311
 
310
312
  code += `${indent(state.tabSize)}}\n`;
@@ -57,7 +57,7 @@ export default new Namespace({
57
57
  returns: [
58
58
  new Return({
59
59
  name: 'result',
60
- typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
60
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
61
61
  }),
62
62
  ],
63
63
  }),
@@ -68,7 +68,18 @@ export default new Namespace({
68
68
  returns: [
69
69
  new Return({
70
70
  name: 'result',
71
- typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
71
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
72
+ }),
73
+ ],
74
+ }),
75
+ new Logic({
76
+ name: 'getWeChatPhone',
77
+ params: [],
78
+ body: [],
79
+ returns: [
80
+ new Return({
81
+ name: 'result',
82
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
72
83
  }),
73
84
  ],
74
85
  }),
@@ -79,7 +90,7 @@ export default new Namespace({
79
90
  returns: [
80
91
  new Return({
81
92
  name: 'result',
82
- typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
93
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
83
94
  }),
84
95
  ],
85
96
  }),
@@ -88,6 +99,11 @@ export default new Namespace({
88
99
  params: [],
89
100
  body: [],
90
101
  }),
102
+ new Logic({
103
+ name: 'navigateToUserPhone',
104
+ params: [],
105
+ body: [],
106
+ }),
91
107
  new Logic({
92
108
  name: 'compareKeyboardInput',
93
109
  description: '用户输入键位比较',
@@ -2,11 +2,8 @@ import Namespace from '../../Namespace__';
2
2
  import Param from '../../Param__';
3
3
  import Return from '../../Return__';
4
4
  import Logic from '../../Logic__';
5
- import Module from '../../Module__';
6
- import Structure from '../../Structure__';
7
5
  import Function from '../../Function__';
8
6
  import TypeAnnotation from '../../TypeAnnotation__';
9
- import { primitiveTypeList } from '../types/coreTypeList';
10
7
  import TypeParam from '../../TypeParam__';
11
8
  import NumericLiteral from '../../NumericLiteral__';
12
9
  import Identifier from '../../Identifier__';
@@ -15,6 +12,19 @@ import StringLiteral from '../../StringLiteral__';
15
12
  import AnonymousFunction from '../../AnonymousFunction__';
16
13
  import StringInterpolation from '../../StringInterpolation__';
17
14
  import NewList from '../../NewList__';
15
+ import { TIMEZONES } from './timeZone';
16
+
17
+ export const createTimezoneParam = (fnName : string) => new Param({
18
+ name: '时区',
19
+ description: '以此时区为基准',
20
+ useComponent: { type: 's-bidirectional-bind-switch' },
21
+ defaultExpression: new StringLiteral({
22
+ name: `${fnName}TimeZoneDefaultExpression`,
23
+ value: 'global'
24
+ }),
25
+ options: TIMEZONES,
26
+ hidden: true,
27
+ })
18
28
 
19
29
  export default new Namespace({
20
30
  name: 'util',
@@ -78,25 +88,23 @@ export default new Namespace({
78
88
  new Param({
79
89
  name: 'value',
80
90
  description: '选择变量或常量',
81
- // typeAnnotation: new TypeAnnotation()
82
91
  defaultExpression: new Identifier(),
83
92
  }),
84
93
  ],
85
94
  returns: [
86
95
  new Return({
87
96
  typeAnnotation: TypeAnnotation.createTypeParam('T'),
88
- // typeAnnotation: TypeAnnotation.createPrimitive('String'),
89
97
  }),
90
98
  ],
91
99
  }),
92
-
93
100
  new Function({
94
101
  name: 'ToString',
95
102
  description: '各类型转换成字符串',
96
103
  params: [
97
104
  new Param({
98
105
  name: 'value',
99
- defaultExpression: new Identifier(),
106
+ description: '待转成字符串的表达式',
107
+ typeAnnotation: TypeAnnotation.createPrimitive('Any'),
100
108
  }),
101
109
  ],
102
110
  returns: [
@@ -105,7 +113,6 @@ export default new Namespace({
105
113
  }),
106
114
  ],
107
115
  }),
108
-
109
116
  new Function({
110
117
  name: 'FromString',
111
118
  description: '字符串转换成其他类型',
@@ -1054,8 +1061,8 @@ export default new Namespace({
1054
1061
  }),
1055
1062
  new Function({
1056
1063
  name: 'CurrDate',
1057
- description: '返回当前日期',
1058
- params: [],
1064
+ description: '返回指定时区的当前日期',
1065
+ params: [ ],
1059
1066
  returns: [
1060
1067
  new Return({
1061
1068
  typeAnnotation: TypeAnnotation.createPrimitive('Date'),
@@ -1064,8 +1071,8 @@ export default new Namespace({
1064
1071
  }),
1065
1072
  new Function({
1066
1073
  name: 'CurrTime',
1067
- description: '返回当前时间',
1068
- params: [],
1074
+ description: '返回指定时区的当前时间',
1075
+ params: [ ],
1069
1076
  returns: [
1070
1077
  new Return({
1071
1078
  typeAnnotation: TypeAnnotation.createTypeParam('Time'),
@@ -1074,8 +1081,8 @@ export default new Namespace({
1074
1081
  }),
1075
1082
  new Function({
1076
1083
  name: 'CurrDateTime',
1077
- description: '返回当前日期时间',
1078
- params: [],
1084
+ description: '返回指定时区的当前日期时间',
1085
+ params: [ ],
1079
1086
  returns: [
1080
1087
  new Return({
1081
1088
  typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
@@ -1097,7 +1104,7 @@ export default new Namespace({
1097
1104
  defaultValue: 'yyyy-MM-dd',
1098
1105
  defaultExpression: new StringLiteral({ value: 'yyyy-MM-dd' }),
1099
1106
  typeAnnotation: TypeAnnotation.createPrimitive('String'),
1100
- }),
1107
+ })
1101
1108
  ],
1102
1109
  returns: [
1103
1110
  new Return({
@@ -1107,7 +1114,7 @@ export default new Namespace({
1107
1114
  }),
1108
1115
  new Function({
1109
1116
  name: 'FormatDateTime',
1110
- description: '返回格式化日期时间字符串',
1117
+ description: '返回格式化日期时间字符串。当输入为 DateTime 类型时,会把数据转到目标时区的当地时间进行格式化。',
1111
1118
  params: [
1112
1119
  new Param({
1113
1120
  name: 'date',
@@ -1360,7 +1367,7 @@ export default new Namespace({
1360
1367
  }),
1361
1368
  new Function({
1362
1369
  name: 'GetDateCount',
1363
- description: '按指定维度计算日期,如“所在年-第几周”',
1370
+ description: '按指定维度计算日期,如“所在年-第几周”。当输入为 DateTime 类型时,会把数据转到提供的时区的当地时间进行计算。',
1364
1371
  params: [
1365
1372
  new Param({
1366
1373
  name: '指定日期',
@@ -1376,6 +1383,11 @@ export default new Namespace({
1376
1383
  cascader: true,
1377
1384
  }),
1378
1385
  ],
1386
+ returns: [
1387
+ new Return({
1388
+ typeAnnotation: TypeAnnotation.createPrimitive('Long'),
1389
+ }),
1390
+ ],
1379
1391
  }),
1380
1392
  new Function({
1381
1393
  name: 'AlterDateTime',
@@ -1419,12 +1431,12 @@ export default new Namespace({
1419
1431
  }),
1420
1432
  new Function({
1421
1433
  name: 'GetSpecificDaysOfWeek',
1422
- description: '按“星期几”获取指定日期范围内的日子',
1434
+ description: '按“星期几”获取指定日期范围内的日子。当输入为 DateTime 类型时,会把数据转到提供的时区的当地时间进行计算。',
1423
1435
  params: [
1424
1436
  new Param({
1425
1437
  name: '起始',
1426
1438
  description: '起始日期(包含)',
1427
- typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
1439
+ typeAnnotation: TypeAnnotation.createPrimitive('Date'),
1428
1440
  }),
1429
1441
  new Param({
1430
1442
  name: '结束',
@@ -1452,6 +1464,13 @@ export default new Namespace({
1452
1464
  ],
1453
1465
  }),
1454
1466
  ],
1467
+ returns: [
1468
+ new Return({
1469
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
1470
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
1471
+ }),
1472
+ }),
1473
+ ],
1455
1474
  }),
1456
1475
  new Function({
1457
1476
  name: 'Clone',
@@ -0,0 +1,193 @@
1
+ export const TIMEZONES =
2
+ [
3
+ {
4
+ "text": "全局配置",
5
+ "value": "global",
6
+ "description": "使用全局配置的时区,可在更多-应用配置-系统参数配置-应用时区中修改"
7
+ },
8
+ {
9
+ "text": "用户时区",
10
+ "value": "user",
11
+ "description": "自动适配到访问该应用的用户的本地时区"
12
+ },
13
+ {
14
+ "text": "Asia/Shanghai",
15
+ "value": "Asia/Shanghai",
16
+ "description": "中国标准时间(上海)"
17
+ },
18
+ {
19
+ "text": "UTC 0",
20
+ "value": "UTC",
21
+ "description": "零时区(标准时间)"
22
+ },
23
+ {
24
+ "text": "Africa/Casablanca",
25
+ "value": "Africa/Casablanca",
26
+ "description": "摩洛哥标准时间(卡萨布兰卡)"
27
+ },
28
+ {
29
+ "text": "Africa/Johannesburg",
30
+ "value": "Africa/Johannesburg",
31
+ "description": "南非标准时间(约翰内斯堡)"
32
+ },
33
+ {
34
+ "text": "America/Anchorage",
35
+ "value": "America/Anchorage",
36
+ "description": "阿拉斯加标准时间(安克雷奇)"
37
+ },
38
+ {
39
+ "text": "America/Buenos_Aires",
40
+ "value": "America/Buenos_Aires",
41
+ "description": "阿根廷标准时间(布宜诺斯艾利斯)"
42
+ },
43
+ {
44
+ "text": "America/Chicago",
45
+ "value": "America/Chicago",
46
+ "description": "美国中部标准时间(芝加哥)"
47
+ },
48
+ {
49
+ "text": "America/Denver",
50
+ "value": "America/Denver",
51
+ "description": "美国山区标准时间(丹佛)"
52
+ },
53
+ {
54
+ "text": "America/Los_Angeles",
55
+ "value": "America/Los_Angeles",
56
+ "description": "美国太平洋标准时间(洛杉矶)"
57
+ },
58
+ {
59
+ "text": "America/Mexico_City",
60
+ "value": "America/Mexico_City",
61
+ "description": "中美洲标准时间(墨西哥)"
62
+ },
63
+ {
64
+ "text": "America/New_York",
65
+ "value": "America/New_York",
66
+ "description": "美国东部标准时间(纽约)"
67
+ },
68
+ {
69
+ "text": "America/Sao_Paulo",
70
+ "value": "America/Sao_Paulo",
71
+ "description": "巴西利亚标准时间(圣保罗)"
72
+ },
73
+ {
74
+ "text": "Asia/Bangkok",
75
+ "value": "Asia/Bangkok",
76
+ "description": "泰国标准时间(曼谷)"
77
+ },
78
+ {
79
+ "text": "Asia/Dubai",
80
+ "value": "Asia/Dubai",
81
+ "description": "阿联酋标准时间(迪拜)"
82
+ },
83
+ {
84
+ "text": "Asia/Hong_Kong",
85
+ "value": "Asia/Hong_Kong",
86
+ "description": "香港特别行政区标准时间(香港)"
87
+ },
88
+ {
89
+ "text": "Asia/Kolkata",
90
+ "value": "Asia/Kolkata",
91
+ "description": "印度标准时间(加尔各答)"
92
+ },
93
+ {
94
+ "text": "Asia/Kuala_Lumpur",
95
+ "value": "Asia/Kuala_Lumpur",
96
+ "description": "马来西亚标准时间(吉隆坡)"
97
+ },
98
+ {
99
+ "text": "Asia/Manila",
100
+ "value": "Asia/Manila",
101
+ "description": "菲律宾标准时间(马尼拉)"
102
+ },
103
+ {
104
+ "text": "Asia/Qatar",
105
+ "value": "Asia/Qatar",
106
+ "description": "卡塔尔标准时间(卡塔尔)"
107
+ },
108
+ {
109
+ "text": "Asia/Riyadh",
110
+ "value": "Asia/Riyadh",
111
+ "description": "沙特阿拉伯标准时间(利雅得)"
112
+ },
113
+ {
114
+ "text": "Asia/Seoul",
115
+ "value": "Asia/Seoul",
116
+ "description": "韩国标准时间(首尔)"
117
+ },
118
+ {
119
+ "text": "Asia/Singapore",
120
+ "value": "Asia/Singapore",
121
+ "description": "新加坡标准时间(新加坡)"
122
+ },
123
+ {
124
+ "text": "Asia/Taipei",
125
+ "value": "Asia/Taipei",
126
+ "description": "台湾标准时间(台北)"
127
+ },
128
+ {
129
+ "text": "Asia/Tehran",
130
+ "value": "Asia/Tehran",
131
+ "description": "伊朗标准时间(德黑兰)"
132
+ },
133
+ {
134
+ "text": "Asia/Tokyo",
135
+ "value": "Asia/Tokyo",
136
+ "description": "日本标准时间(东京)"
137
+ },
138
+ {
139
+ "text": "Australia/Sydney",
140
+ "value": "Australia/Sydney",
141
+ "description": "澳大利亚东部标准时间(悉尼)"
142
+ },
143
+ {
144
+ "text": "Europe/Amsterdam",
145
+ "value": "Europe/Amsterdam",
146
+ "description": "荷兰标准时间(阿姆斯特丹)"
147
+ },
148
+ {
149
+ "text": "Europe/Berlin",
150
+ "value": "Europe/Berlin",
151
+ "description": "德国标准时间(柏林)"
152
+ },
153
+ {
154
+ "text": "Europe/Lisbon",
155
+ "value": "Europe/Lisbon",
156
+ description: "葡萄牙标准时间(里斯本)"
157
+ },
158
+ {
159
+ "text": "Europe/London",
160
+ "value": "Europe/London",
161
+ "description": "英国标准时间(伦敦)"
162
+ },
163
+ {
164
+ "text": "Europe/Madrid",
165
+ "value": "Europe/Madrid",
166
+ "description": "西班牙标准时间(马德里)"
167
+ },
168
+ {
169
+ "text": "Europe/Moscow",
170
+ "value": "Europe/Moscow",
171
+ "description": "俄罗斯标准时间(莫斯科)"
172
+ },
173
+ {
174
+ "text": "Europe/Paris",
175
+ "value": "Europe/Paris",
176
+ "description": "法国标准时间(巴黎)"
177
+ },
178
+ {
179
+ "text": "Pacific/Auckland",
180
+ "value": "Pacific/Auckland",
181
+ "description": "新西兰标准时间(奥克兰)"
182
+ },
183
+ {
184
+ "text": "Pacific/Fiji",
185
+ "value": "Pacific/Fiji",
186
+ "description": "斐济标准时间(斐济)"
187
+ },
188
+ {
189
+ "text": "Pacific/Honolulu",
190
+ "value": "Pacific/Honolulu",
191
+ "description": "夏威夷-阿留申标准时间(檀香山)"
192
+ }
193
+ ]
@@ -37,6 +37,7 @@ interface Config {
37
37
  }
38
38
 
39
39
  export function genBundleFiles(app: App, frontend: Frontend, config: Config) {
40
+ const configLowcodeDomain = config?.lowcodeDomain;
40
41
  const fnNuimsDomain = config?.envNuimsDomain?.[config?.env] || config?.nuimsDomain;
41
42
  const fnLowcodeDomain = config?.envLcpDomain?.[config?.env]?.lcpDomain || config?.lowcodeDomain;
42
43
  const modules: (Module | Connector)[] = [];
@@ -223,6 +224,7 @@ export function genBundleFiles(app: App, frontend: Frontend, config: Config) {
223
224
  project: app.name,
224
225
  domainName: app.name,
225
226
  nuimsDomain: fnNuimsDomain,
227
+ lowcodeDomain: configLowcodeDomain,
226
228
  envNuimsDomain: config.envNuimsDomain,
227
229
  tenantType: config.tenantType,
228
230
  tenantLevel: config.tenantLevel,
@@ -271,6 +273,7 @@ export function genBundleFiles(app: App, frontend: Frontend, config: Config) {
271
273
  function scalePage() {
272
274
  // 计算缩放比例
273
275
  const windowWidth = window.innerWidth;
276
+ const windowHeight = window.innerHeight;
274
277
  const baseWidth = ${frontend.canvasWidth || frontend.defaultCanvasWidth};;
275
278
  const scale = windowWidth / baseWidth;
276
279
  // iframe 按比例缩放
@@ -279,10 +282,15 @@ export function genBundleFiles(app: App, frontend: Frontend, config: Config) {
279
282
  // iframe 的宽高需要缩放回去,使其等于顶层宽高
280
283
  iframe.style.width = baseWidth + 'px';
281
284
  iframe.style.height = 100 / scale + 'vh';
282
- // 缩放后,iframe 会有多余的空白,需要去掉
283
- const margin = scale < 1 ? (scale - 1)/scale * 100 + '%' : '0px';
284
- iframe.style.marginRight = margin;
285
- iframe.style.marginBottom = margin;
285
+ let marginRight = '0px';
286
+ let marginBottom = '0px';
287
+ if(scale < 1){
288
+ marginRight = (scale - 1)/scale * 100 + '%';
289
+ // 由于 marginBottom 的百分比也是基于宽度的,因此需要乘以 windowHeight / windowWidth
290
+ marginBottom = (scale - 1)/scale * windowHeight / windowWidth * 100 + '%';
291
+ }
292
+ iframe.style.marginRight = marginRight;
293
+ iframe.style.marginBottom = marginBottom;
286
294
  }
287
295
  // 监听窗口变化
288
296
  window.addEventListener('resize', scalePage);
@@ -263,7 +263,7 @@ async function getFrontendBundleFiles(app: App, opt: ReleaseData) {
263
263
  let files: utils.GetPromise<ReturnType<typeof genFrontendBundleFiles>> = [];
264
264
 
265
265
  if (opt.frontends && opt.frontends.length) {
266
- opt.logPublishFunc?.(`[代码] "[${app.title}]" appApi.staticResourceSync生成页面代码:开始`);
266
+ opt.logPublishFunc?.(`[代码] "[${app.title}]" 生成页面代码:开始`);
267
267
  files = await genFrontendBundleFiles(app, opt.frontends, {
268
268
  ...opt.appInfo,
269
269
  env: opt.env,
@@ -3,13 +3,13 @@ import { shiftState, createCompilerState } from '../translator';
3
3
 
4
4
  import naslStdlibMap from './naslStdlibMap';
5
5
 
6
- export function genNaturalTS(app: App, currentNode?: BaseNode) {
6
+ export function genNaturalTS(app: App, currentNode?: BaseNode, focusedNodePath?: string) {
7
7
  const logic = currentNode as Logic;
8
- const code = logic?.toNaturalTS(undefined);
8
+ const code = logic?.toNaturalTS(createCompilerState('', { focusedNodePath }), undefined, undefined, currentNode);
9
9
  return code;
10
10
  }
11
11
 
12
- export function genNaturalTSContext(app: App, currentNode?: BaseNode) {
12
+ export function genNaturalTSContext(app: App, currentNode?: BaseNode, focusedNodePath?: string) {
13
13
  let code = `### 低代码应用的 ts 上下文定义如下:\n`;
14
14
  /* 标准库 */
15
15
  code += `\`\`\`ts\n`;
@@ -81,9 +81,9 @@ export function genNaturalTSContext(app: App, currentNode?: BaseNode) {
81
81
  // code += '// 页面上下文\n';
82
82
  code += ``;
83
83
  if (view) { // 为页面中的逻辑
84
- code += view?.toNaturalTS(undefined, currentNode);
84
+ code += view?.toNaturalTS(createCompilerState('', { focusedNodePath }), currentNode);
85
85
  } else if (logic) { // 为全局逻辑
86
- code += logic?.toNaturalTS(undefined, undefined, undefined, currentNode);
86
+ code += logic?.toNaturalTS(createCompilerState('', { focusedNodePath }), undefined, undefined, currentNode);
87
87
  }
88
88
  code += `\n\`\`\`\n`;
89
89
  return code;
@@ -288,7 +288,7 @@ export function transformTSCode(tsCode: string, contextLogicName: string, type?:
288
288
  }
289
289
  }
290
290
  if (calleeName === 'nasl.util.consoleLog' || calleeName === 'console.log') {
291
- if (!isPageLogic(contextLogicName)) {
291
+ if (isPageLogic(contextLogicName)) {
292
292
  return new naslTypes.CallLogic({
293
293
  calleeNamespace: 'nasl.util',
294
294
  calleeName: 'consoleLog',
@@ -343,7 +343,6 @@ export function transformTSCode(tsCode: string, contextLogicName: string, type?:
343
343
  keyword: `str${index + 1}`,
344
344
  })) as naslTypes.Argument[],
345
345
  typeArguments: node?.typeParameters?.params.map((curType: any) => transformTypeAnnotation({ ...curType, typeNamespace })),
346
-
347
346
  });
348
347
  // console.log('lemon ~ callFunction ~ 3:', nodeElement);
349
348
  return nodeElement;
@@ -376,6 +375,17 @@ export function transformTSCode(tsCode: string, contextLogicName: string, type?:
376
375
  })) as naslTypes.Argument[],
377
376
  });
378
377
  }
378
+ if (calleeName.endsWith('.map')) {
379
+ return new naslTypes.CallFunction({
380
+ calleeNamespace: 'nasl.util',
381
+ calleeName: 'ListTransform',
382
+ arguments: [new naslTypes.Argument({
383
+ expression: transformLogicNode((node.callee as babelTypes.MemberExpression).object),
384
+ }), ...node.arguments.map((arg: any) => new naslTypes.Argument({
385
+ expression: transformLogicNode(arg),
386
+ }))],
387
+ });
388
+ }
379
389
  if (calleeName === 'ForEach') {
380
390
  const newCallee = node.arguments;
381
391
  const arrowFunction = node.arguments[3] as babelTypes.ArrowFunctionExpression;
@@ -384,7 +394,9 @@ export function transformTSCode(tsCode: string, contextLogicName: string, type?:
384
394
  start: transformLogicNode(newCallee[1]),
385
395
  end: transformLogicNode(newCallee[2]),
386
396
  item: transformParam(arrowFunction.params[0] as babelTypes.Identifier),
387
- index: transformParam(arrowFunction.params[1] as babelTypes.Identifier),
397
+ index: arrowFunction.params[1] ? transformParam(arrowFunction.params[1] as babelTypes.Identifier) : new naslTypes.Param({
398
+ name: 'index', typeAnnotation: naslTypes.TypeAnnotation.createPrimitive('Long'),
399
+ }),
388
400
  body: (arrowFunction.body as babelTypes.BlockStatement).body.map((item) => transformLogicNode(item)).filter((item) => !!item),
389
401
  });
390
402
  return nodeElement;
@@ -399,7 +411,9 @@ export function transformTSCode(tsCode: string, contextLogicName: string, type?:
399
411
  start: transformLogicNode(newCallee?.arguments?.[0]),
400
412
  end: transformLogicNode(newCallee?.arguments?.[1]),
401
413
  item: transformParam(arrowFunction.params[0] as babelTypes.Identifier),
402
- index: transformParam(arrowFunction.params[1] as babelTypes.Identifier),
414
+ index: arrowFunction.params[1] ? transformParam(arrowFunction.params[1] as babelTypes.Identifier) : new naslTypes.Param({
415
+ name: 'index', typeAnnotation: naslTypes.TypeAnnotation.createPrimitive('Long'),
416
+ }),
403
417
  body: (arrowFunction.body as babelTypes.BlockStatement).body.map((item) => transformLogicNode(item)).filter((item) => !!item),
404
418
  });
405
419
  return nodeElement;
@@ -233,6 +233,8 @@ export default function formatUiTs(allComponent: any) {
233
233
  if (['u-select', 'van-pickerson'].includes(item.name)) {
234
234
  value += indent(1);
235
235
  value += `'page-number': nasl.core.Long;\n`;
236
+ value += indent(1);
237
+ value += `'filterText': nasl.core.String;\n`;
236
238
  }
237
239
  }
238
240
  // 生成methods
@@ -265,6 +267,7 @@ export default function formatUiTs(allComponent: any) {
265
267
  value += '}\n';
266
268
  }
267
269
  value += '}\n';
270
+ console.log('组件ts', value);
268
271
  // console.log(elementsLogic);
269
272
  // const elementsEventsMap = getAllComponentEventMap(allComponent);
270
273
  return {
@@ -263,7 +263,9 @@ export async function getLogics(node: CallLogic | BindEvent | Identifier | Logic
263
263
  'navigateToUserInfo',
264
264
  'getWeChatHeadImg',
265
265
  'getWeChatNickName',
266
+ 'getWeChatPhone',
266
267
  'getWeChatOpenid',
268
+ 'navigateToUserPhone'
267
269
  ].includes(item.name)
268
270
  ),
269
271
  expanded: false,
@@ -325,7 +327,7 @@ export async function getLogics(node: CallLogic | BindEvent | Identifier | Logic
325
327
  title: '微信',
326
328
  logics: stdlibNamespace
327
329
  .findChild('browser')
328
- .logics.filter((item) => ['navigateToUserInfo', 'getWeChatHeadImg', 'getWeChatNickName', 'getWeChatOpenid'].includes(item.name)),
330
+ .logics.filter((item) => ['navigateToUserInfo', 'getWeChatHeadImg', 'getWeChatNickName', 'getWeChatOpenid','navigateToUserPhone','getWeChatPhone'].includes(item.name)),
329
331
  expanded: false,
330
332
  })
331
333
  );
@@ -412,6 +412,21 @@ function flatElements(elements: ViewElement[], componentList: CompletionProperty
412
412
  completionProperty.name = 'page(当前页数)';
413
413
  completionProperty.icon = 'attr'
414
414
  stashItem.children.push(completionProperty)
415
+ const filterAttr: any = {
416
+ name: 'filterText',
417
+ value: `${item.name}.filterText`,
418
+ expression: new MemberExpression({
419
+ object: stashItem.expression,
420
+ property: new Identifier({
421
+ name: 'filterText',
422
+ namespace: 'filterText'
423
+ }),
424
+ }),
425
+ };
426
+ const filterTextCompletionProperty = new CompletionProperty(filterAttr);
427
+ filterTextCompletionProperty.name = 'filterText(过滤文本)';
428
+ filterTextCompletionProperty.icon = 'attr'
429
+ stashItem.children.push(filterTextCompletionProperty)
415
430
  } else if (['u-list-view', 'u-grid-view', 'u-table-view', 'van-list-view', 'van-grid-view'].includes(item.tag)) {
416
431
  const sortAttr: any = {
417
432
  name: 'sort',