@lcap/nasl 3.6.4-beta.3 → 3.6.4-beta.4

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 (448) hide show
  1. package/dist/README.md +97 -0
  2. package/dist/index.d.ts +26 -0
  3. package/dist/index.js +397 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/package.json +91 -0
  6. package/dist/src/automate/engine/index.d.ts +4 -0
  7. package/dist/src/automate/engine/operators.d.ts +26 -0
  8. package/dist/src/automate/engine/uniqueName.d.ts +12 -0
  9. package/dist/src/automate/engine/utils.d.ts +25 -0
  10. package/dist/src/automate/engine/viewCache.d.ts +19 -0
  11. package/dist/src/automate/template/myProcess.d.ts +10 -0
  12. package/dist/src/automate/upgrader/2.12.d.ts +7 -0
  13. package/dist/src/automate/upgrader/2.14-components.d.ts +1115 -0
  14. package/dist/src/automate/upgrader/2.14.d.ts +10 -0
  15. package/dist/src/automate/upgrader/2.14.old.d.ts +1 -0
  16. package/dist/src/automate/upgrader/2.16.d.ts +10 -0
  17. package/dist/src/automate/upgrader/2.17.d.ts +21 -0
  18. package/dist/src/automate/upgrader/2.18.d.ts +10 -0
  19. package/dist/src/automate/upgrader/2.20.d.ts +17 -0
  20. package/dist/src/bak/translator.d.ts +1 -0
  21. package/dist/src/breakpoint/generator/AfterStartNode.d.ts +7 -0
  22. package/dist/src/breakpoint/generator/BeforeEndNode.d.ts +7 -0
  23. package/dist/src/breakpoint/generator/BreakpointNode.d.ts +20 -0
  24. package/dist/src/breakpoint/generator/CallbackNode.d.ts +4 -0
  25. package/dist/src/breakpoint/generator/FragmentNode.d.ts +4 -0
  26. package/dist/src/breakpoint/generator/index.d.ts +4 -0
  27. package/dist/src/breakpoint/index.d.ts +3 -0
  28. package/dist/src/breakpoint/shared/constants.d.ts +37 -0
  29. package/dist/src/breakpoint/shared/index.d.ts +3 -0
  30. package/dist/src/breakpoint/shared/operations.d.ts +10 -0
  31. package/dist/src/breakpoint/shared/socket.d.ts +48 -0
  32. package/dist/src/breakpoint/shared/utils.d.ts +27 -0
  33. package/dist/src/breakpoint/store/core.d.ts +80 -0
  34. package/dist/src/breakpoint/store/dock.d.ts +1 -0
  35. package/dist/src/breakpoint/store/index.d.ts +2 -0
  36. package/dist/src/common/BaseNode.d.ts +384 -0
  37. package/dist/src/common/Command.d.ts +21 -0
  38. package/dist/src/common/ComponentAPI.d.ts +112 -0
  39. package/dist/src/common/EventEmitter.d.ts +61 -0
  40. package/dist/src/common/Messager.d.ts +91 -0
  41. package/dist/src/common/asyncFuncMap.d.ts +2 -0
  42. package/dist/src/common/index.d.ts +4 -0
  43. package/dist/src/common/utils.d.ts +2 -0
  44. package/dist/src/concepts/Abort__.d.ts +31 -0
  45. package/dist/src/concepts/AbstractInterface__.d.ts +25 -0
  46. package/dist/src/concepts/Anchor__.d.ts +42 -0
  47. package/dist/src/concepts/AnonymousFunction__.d.ts +144 -0
  48. package/dist/src/concepts/App__.d.ts +1711 -0
  49. package/dist/src/concepts/Argument__.d.ts +64 -0
  50. package/dist/src/concepts/Assignee__.d.ts +294 -0
  51. package/dist/src/concepts/AssignmentLine__.d.ts +43 -0
  52. package/dist/src/concepts/Assignment__.d.ts +57 -0
  53. package/dist/src/concepts/Attribute__.d.ts +75 -0
  54. package/dist/src/concepts/AuthInterface__.d.ts +38 -0
  55. package/dist/src/concepts/AuthLogicForCallInterface__.d.ts +145 -0
  56. package/dist/src/concepts/AuthLogic__.d.ts +69 -0
  57. package/dist/src/concepts/BackendVariable__.d.ts +118 -0
  58. package/dist/src/concepts/Backend__.d.ts +127 -0
  59. package/dist/src/concepts/BaseSetter__.d.ts +25 -0
  60. package/dist/src/concepts/BatchAssignment__.d.ts +244 -0
  61. package/dist/src/concepts/BinaryExpression__.d.ts +61 -0
  62. package/dist/src/concepts/BindAttribute__.d.ts +284 -0
  63. package/dist/src/concepts/BindDirective__.d.ts +156 -0
  64. package/dist/src/concepts/BindEvent__.d.ts +246 -0
  65. package/dist/src/concepts/BindStyle__.d.ts +127 -0
  66. package/dist/src/concepts/Block__.d.ts +88 -0
  67. package/dist/src/concepts/BooleanLiteral__.d.ts +44 -0
  68. package/dist/src/concepts/BusinessComponent__.d.ts +640 -0
  69. package/dist/src/concepts/BusinessLogic__.d.ts +44 -0
  70. package/dist/src/concepts/CallAuthInterface__.d.ts +132 -0
  71. package/dist/src/concepts/CallConnector__.d.ts +55 -0
  72. package/dist/src/concepts/CallEvent__.d.ts +100 -0
  73. package/dist/src/concepts/CallFunction__.d.ts +171 -0
  74. package/dist/src/concepts/CallInterface__.d.ts +143 -0
  75. package/dist/src/concepts/CallLogic__.d.ts +224 -0
  76. package/dist/src/concepts/CallQueryComponent__.d.ts +383 -0
  77. package/dist/src/concepts/CapsulesSetter__.d.ts +109 -0
  78. package/dist/src/concepts/Comment__.d.ts +41 -0
  79. package/dist/src/concepts/CompletionProperty__.d.ts +87 -0
  80. package/dist/src/concepts/ConfigGroup__.d.ts +121 -0
  81. package/dist/src/concepts/ConfigPropertyValue__.d.ts +42 -0
  82. package/dist/src/concepts/ConfigProperty__.d.ts +147 -0
  83. package/dist/src/concepts/Configuration__.d.ts +120 -0
  84. package/dist/src/concepts/Connection__.d.ts +159 -0
  85. package/dist/src/concepts/ConnectorLogic__.d.ts +33 -0
  86. package/dist/src/concepts/ConnectorTriggerLauncher__.d.ts +44 -0
  87. package/dist/src/concepts/ConnectorTrigger__.d.ts +76 -0
  88. package/dist/src/concepts/Connector__.d.ts +532 -0
  89. package/dist/src/concepts/Constant__.d.ts +94 -0
  90. package/dist/src/concepts/CountersignPolicy__.d.ts +29 -0
  91. package/dist/src/concepts/DataSource__.d.ts +163 -0
  92. package/dist/src/concepts/DatabaseTypeAnnotation__.d.ts +35 -0
  93. package/dist/src/concepts/DefaultValue__.d.ts +94 -0
  94. package/dist/src/concepts/Destination__.d.ts +150 -0
  95. package/dist/src/concepts/End__.d.ts +30 -0
  96. package/dist/src/concepts/EntityIndex__.d.ts +93 -0
  97. package/dist/src/concepts/EntityProperty__.d.ts +255 -0
  98. package/dist/src/concepts/Entity__.d.ts +332 -0
  99. package/dist/src/concepts/EnumItem__.d.ts +83 -0
  100. package/dist/src/concepts/EnumSelectSetter__.d.ts +109 -0
  101. package/dist/src/concepts/Enum__.d.ts +133 -0
  102. package/dist/src/concepts/EventDeclaration__.d.ts +41 -0
  103. package/dist/src/concepts/Event__.d.ts +149 -0
  104. package/dist/src/concepts/ExternalDestination__.d.ts +63 -0
  105. package/dist/src/concepts/ForEachStatement__.d.ts +126 -0
  106. package/dist/src/concepts/FrontendLibrary__.d.ts +208 -0
  107. package/dist/src/concepts/FrontendType__.d.ts +304 -0
  108. package/dist/src/concepts/FrontendVariable__.d.ts +41 -0
  109. package/dist/src/concepts/Frontend__.d.ts +389 -0
  110. package/dist/src/concepts/Function__.d.ts +399 -0
  111. package/dist/src/concepts/I18nInfo__.d.ts +47 -0
  112. package/dist/src/concepts/IconSetter__.d.ts +29 -0
  113. package/dist/src/concepts/Identifier__.d.ts +66 -0
  114. package/dist/src/concepts/IfStatement__.d.ts +155 -0
  115. package/dist/src/concepts/ImageSetter__.d.ts +25 -0
  116. package/dist/src/concepts/ImportedInterface__.d.ts +29 -0
  117. package/dist/src/concepts/InputSetter__.d.ts +29 -0
  118. package/dist/src/concepts/Integration__.d.ts +127 -0
  119. package/dist/src/concepts/InterfaceParam__.d.ts +119 -0
  120. package/dist/src/concepts/InterfaceTriggerEvent__.d.ts +34 -0
  121. package/dist/src/concepts/Interface__.d.ts +323 -0
  122. package/dist/src/concepts/JSBlock__.d.ts +38 -0
  123. package/dist/src/concepts/JavaLogic__.d.ts +50 -0
  124. package/dist/src/concepts/LogicDeclaration__.d.ts +289 -0
  125. package/dist/src/concepts/LogicItem__.d.ts +171 -0
  126. package/dist/src/concepts/Logic__.d.ts +632 -0
  127. package/dist/src/concepts/MatchCase__.d.ts +264 -0
  128. package/dist/src/concepts/Match__.d.ts +122 -0
  129. package/dist/src/concepts/MemberExpression__.d.ts +64 -0
  130. package/dist/src/concepts/MetadataType__.d.ts +220 -0
  131. package/dist/src/concepts/MicroApp__.d.ts +53 -0
  132. package/dist/src/concepts/Module__.d.ts +1142 -0
  133. package/dist/src/concepts/MsgTriggerEvent__.d.ts +138 -0
  134. package/dist/src/concepts/MsgTriggerLauncher__.d.ts +119 -0
  135. package/dist/src/concepts/MultiApprovalPolicy__.d.ts +25 -0
  136. package/dist/src/concepts/Namespace__.d.ts +1060 -0
  137. package/dist/src/concepts/NewComposite__.d.ts +346 -0
  138. package/dist/src/concepts/NewList__.d.ts +135 -0
  139. package/dist/src/concepts/NewMap__.d.ts +226 -0
  140. package/dist/src/concepts/New__.d.ts +30 -0
  141. package/dist/src/concepts/NullLiteral__.d.ts +36 -0
  142. package/dist/src/concepts/NumberInputSetter__.d.ts +45 -0
  143. package/dist/src/concepts/NumericLiteral__.d.ts +53 -0
  144. package/dist/src/concepts/OqlQueryComponent__.d.ts +67 -0
  145. package/dist/src/concepts/OverriddenLogic__.d.ts +615 -0
  146. package/dist/src/concepts/Paginate__.d.ts +59 -0
  147. package/dist/src/concepts/ParamWithGroup__.d.ts +44 -0
  148. package/dist/src/concepts/Param__.d.ts +140 -0
  149. package/dist/src/concepts/Point__.d.ts +33 -0
  150. package/dist/src/concepts/ProcessComponent__.d.ts +214 -0
  151. package/dist/src/concepts/ProcessElement__.d.ts +620 -0
  152. package/dist/src/concepts/ProcessOutcome__.d.ts +35 -0
  153. package/dist/src/concepts/ProcessOutcomes__.d.ts +35 -0
  154. package/dist/src/concepts/Process__.d.ts +605 -0
  155. package/dist/src/concepts/PropDeclaration__.d.ts +99 -0
  156. package/dist/src/concepts/PropertySelectSetter__.d.ts +25 -0
  157. package/dist/src/concepts/QueryAggregateExpression__.d.ts +50 -0
  158. package/dist/src/concepts/QueryFieldExpression__.d.ts +66 -0
  159. package/dist/src/concepts/QueryFromExpression__.d.ts +107 -0
  160. package/dist/src/concepts/QueryGroupByExpression__.d.ts +46 -0
  161. package/dist/src/concepts/QueryJoinExpression__.d.ts +194 -0
  162. package/dist/src/concepts/QueryLimitExpression__.d.ts +46 -0
  163. package/dist/src/concepts/QueryOrderByExpression__.d.ts +57 -0
  164. package/dist/src/concepts/QuerySelectExpression__.d.ts +213 -0
  165. package/dist/src/concepts/Rect__.d.ts +41 -0
  166. package/dist/src/concepts/Return__.d.ts +120 -0
  167. package/dist/src/concepts/Role__.d.ts +58 -0
  168. package/dist/src/concepts/SelectMembers__.d.ts +134 -0
  169. package/dist/src/concepts/SequentialPolicy__.d.ts +25 -0
  170. package/dist/src/concepts/SetterOption__.d.ts +49 -0
  171. package/dist/src/concepts/SlotDeclaration__.d.ts +213 -0
  172. package/dist/src/concepts/Slot__.d.ts +53 -0
  173. package/dist/src/concepts/SqlQueryComponent__.d.ts +63 -0
  174. package/dist/src/concepts/Start__.d.ts +30 -0
  175. package/dist/src/concepts/StaticString__.d.ts +49 -0
  176. package/dist/src/concepts/StringInterpolation__.d.ts +122 -0
  177. package/dist/src/concepts/StringLiteral__.d.ts +51 -0
  178. package/dist/src/concepts/StructureProperty__.d.ts +119 -0
  179. package/dist/src/concepts/Structure__.d.ts +243 -0
  180. package/dist/src/concepts/SwitchCase__.d.ts +91 -0
  181. package/dist/src/concepts/SwitchSetter__.d.ts +25 -0
  182. package/dist/src/concepts/SwitchStatement__.d.ts +90 -0
  183. package/dist/src/concepts/ThemeVariable__.d.ts +29 -0
  184. package/dist/src/concepts/Theme__.d.ts +39 -0
  185. package/dist/src/concepts/Transactional__.d.ts +85 -0
  186. package/dist/src/concepts/TriggerEvent__.d.ts +42 -0
  187. package/dist/src/concepts/TriggerLauncher__.d.ts +76 -0
  188. package/dist/src/concepts/TypeAnnotation__.d.ts +303 -0
  189. package/dist/src/concepts/TypeParam__.d.ts +34 -0
  190. package/dist/src/concepts/UnaryExpression__.d.ts +45 -0
  191. package/dist/src/concepts/Unparsed__.d.ts +41 -0
  192. package/dist/src/concepts/UseComponent__.d.ts +33 -0
  193. package/dist/src/concepts/ValidationRule__.d.ts +133 -0
  194. package/dist/src/concepts/Variable__.d.ts +137 -0
  195. package/dist/src/concepts/ViewBlockWithImage__.d.ts +33 -0
  196. package/dist/src/concepts/ViewBlock__.d.ts +37 -0
  197. package/dist/src/concepts/ViewComponentDeclaration__.d.ts +721 -0
  198. package/dist/src/concepts/ViewElement__.d.ts +652 -0
  199. package/dist/src/concepts/View__.d.ts +728 -0
  200. package/dist/src/concepts/WhileStatement__.d.ts +94 -0
  201. package/dist/src/concepts/basics/constants.d.ts +1 -0
  202. package/dist/src/concepts/basics/stdlib/index.d.ts +16 -0
  203. package/dist/src/concepts/basics/stdlib/nasl.auth.d.ts +9 -0
  204. package/dist/src/concepts/basics/stdlib/nasl.browser.d.ts +5 -0
  205. package/dist/src/concepts/basics/stdlib/nasl.collection.d.ts +9 -0
  206. package/dist/src/concepts/basics/stdlib/nasl.configuration.d.ts +9 -0
  207. package/dist/src/concepts/basics/stdlib/nasl.core.d.ts +7 -0
  208. package/dist/src/concepts/basics/stdlib/nasl.event.d.ts +5 -0
  209. package/dist/src/concepts/basics/stdlib/nasl.http.d.ts +9 -0
  210. package/dist/src/concepts/basics/stdlib/nasl.interface.d.ts +9 -0
  211. package/dist/src/concepts/basics/stdlib/nasl.io.d.ts +5 -0
  212. package/dist/src/concepts/basics/stdlib/nasl.logging.d.ts +5 -0
  213. package/dist/src/concepts/basics/stdlib/nasl.process.d.ts +9 -0
  214. package/dist/src/concepts/basics/stdlib/nasl.ui.d.ts +9 -0
  215. package/dist/src/concepts/basics/stdlib/nasl.util.d.ts +6 -0
  216. package/dist/src/concepts/basics/stdlib/nasl.validation.d.ts +5 -0
  217. package/dist/src/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +4 -0
  218. package/dist/src/concepts/basics/stdlib/timeZone.d.ts +5 -0
  219. package/dist/src/concepts/basics/types/coreTypeList.d.ts +2 -0
  220. package/dist/src/concepts/basics/types/index.d.ts +17 -0
  221. package/dist/src/concepts/index.d.ts +7 -0
  222. package/dist/src/concepts/index__.d.ts +156 -0
  223. package/dist/src/concepts/utils/asserts.d.ts +7825 -0
  224. package/dist/src/concepts/utils/quick-info.d.ts +13 -0
  225. package/dist/src/concepts/utils/types.d.ts +510 -0
  226. package/dist/src/config.d.ts +52 -0
  227. package/dist/src/decorators/index.d.ts +67 -0
  228. package/dist/src/decorators/promise.d.ts +7 -0
  229. package/dist/src/enums/KEYWORDS.d.ts +6 -0
  230. package/dist/src/enums/LEVEL_NAME_MAP.d.ts +26 -0
  231. package/dist/src/eventBus.d.ts +3 -0
  232. package/dist/src/generator/compileComponent.d.ts +11 -0
  233. package/dist/src/generator/genBundleFiles.d.ts +37 -0
  234. package/dist/src/generator/genHash.d.ts +7 -0
  235. package/dist/src/generator/genMetaData.d.ts +31 -0
  236. package/dist/src/generator/icestark.d.ts +2 -0
  237. package/dist/src/generator/index.d.ts +7 -0
  238. package/dist/src/generator/microApp.d.ts +2 -0
  239. package/dist/src/generator/permission.d.ts +14 -0
  240. package/dist/src/generator/qiankun.d.ts +2 -0
  241. package/dist/src/generator/release-body/body.d.ts +42 -0
  242. package/dist/src/generator/release-body/data.d.ts +45 -0
  243. package/dist/src/generator/release-body/index.d.ts +2 -0
  244. package/dist/src/generator/release-body/internal.d.ts +622 -0
  245. package/dist/src/generator/release-body/types.d.ts +57 -0
  246. package/dist/src/generator/release-body/utils.d.ts +418 -0
  247. package/dist/src/generator/release-body/validation.d.ts +3 -0
  248. package/dist/src/generator/styleReplacer.d.ts +3 -0
  249. package/dist/src/index.d.ts +14 -0
  250. package/dist/src/manager/diagnostic.d.ts +39 -0
  251. package/dist/src/manager/stepRecorder.d.ts +20 -0
  252. package/dist/src/natural/componentData.d.ts +31 -0
  253. package/dist/src/natural/genNaturalTS.d.ts +241 -0
  254. package/dist/src/natural/index.d.ts +6 -0
  255. package/dist/src/natural/naslStdlibMap.d.ts +1 -0
  256. package/dist/src/natural/prompt/analyzeClaims.d.ts +1 -0
  257. package/dist/src/natural/prompt/analyzeFormatOutput.d.ts +1 -0
  258. package/dist/src/natural/prompt/analyzeTasks.d.ts +1 -0
  259. package/dist/src/natural/prompt/executeClaims.d.ts +1 -0
  260. package/dist/src/natural/transformTSCode.d.ts +7 -0
  261. package/dist/src/sentry/index.d.ts +34 -0
  262. package/dist/src/server/createUiTs.d.ts +17 -0
  263. package/dist/src/server/entity2LogicNamespace.d.ts +10 -0
  264. package/dist/src/server/event.d.ts +30 -0
  265. package/dist/src/server/extendBaseNode.d.ts +1 -0
  266. package/dist/src/server/formatTsUtils.d.ts +36 -0
  267. package/dist/src/server/getConnector.d.ts +15 -0
  268. package/dist/src/server/getExtensionModules.d.ts +3 -0
  269. package/dist/src/server/getFunctions.d.ts +3 -0
  270. package/dist/src/server/getInterfaces.d.ts +2 -0
  271. package/dist/src/server/getLogging.d.ts +1 -0
  272. package/dist/src/server/getLogics.d.ts +5 -0
  273. package/dist/src/server/getMemberIdentifier.d.ts +17 -0
  274. package/dist/src/server/getProcessComponents.d.ts +2 -0
  275. package/dist/src/server/getProcesses.d.ts +33 -0
  276. package/dist/src/server/getScope.d.ts +13 -0
  277. package/dist/src/server/getValidates.d.ts +3 -0
  278. package/dist/src/server/index.d.ts +5 -0
  279. package/dist/src/server/naslServer.d.ts +391 -0
  280. package/dist/src/server/naslStdlibMap.d.ts +2 -0
  281. package/dist/src/server/process2LogicNamespace.d.ts +26 -0
  282. package/dist/src/server/translator.d.ts +26 -0
  283. package/dist/src/service/creator/add.configs.d.ts +1 -0
  284. package/dist/src/service/creator/errHandles.d.ts +18 -0
  285. package/dist/src/service/creator/index.d.ts +1 -0
  286. package/dist/src/service/datasource/api.d.ts +12 -0
  287. package/dist/src/service/datasource/index.d.ts +2 -0
  288. package/dist/src/service/logic/api.d.ts +9 -0
  289. package/dist/src/service/logic/checktypeSocket.d.ts +5 -0
  290. package/dist/src/service/logic/index.d.ts +2 -0
  291. package/dist/src/service/storage/api.d.ts +54 -0
  292. package/dist/src/service/storage/index.d.ts +2 -0
  293. package/dist/src/service/storage/init.d.ts +105 -0
  294. package/dist/src/service/storage/jsoner.d.ts +36 -0
  295. package/dist/src/service/storage/map.d.ts +4 -0
  296. package/dist/src/service/storage/service.d.ts +25 -0
  297. package/dist/src/service/storage/storagePoint.d.ts +17 -0
  298. package/dist/src/service/video/BaseService.d.ts +7 -0
  299. package/dist/src/service/video/MainCallbackService.d.ts +12 -0
  300. package/dist/src/service/video/VideoTranscribe.d.ts +15 -0
  301. package/dist/src/service/video/publishService.d.ts +1 -0
  302. package/dist/src/templator/genCallComponentLogic.d.ts +17 -0
  303. package/dist/src/templator/genCreateBlock.d.ts +10 -0
  304. package/dist/src/templator/genCurdEditMultipleKeyBlock.d.ts +8 -0
  305. package/dist/src/templator/genCurdMultipleKeyBlock.d.ts +61 -0
  306. package/dist/src/templator/genEditTableBlock.d.ts +51 -0
  307. package/dist/src/templator/genEnumSelectBlock.d.ts +10 -0
  308. package/dist/src/templator/genGetBlock.d.ts +6 -0
  309. package/dist/src/templator/genGridViewBlock.d.ts +55 -0
  310. package/dist/src/templator/genListViewBlock.d.ts +19 -0
  311. package/dist/src/templator/genQueryComponent.d.ts +34 -0
  312. package/dist/src/templator/genSelectBlock.d.ts +45 -0
  313. package/dist/src/templator/genTableBlock.d.ts +55 -0
  314. package/dist/src/templator/genUpdateBlock.d.ts +6 -0
  315. package/dist/src/templator/index.d.ts +19 -0
  316. package/dist/src/templator/utils.d.ts +683 -0
  317. package/dist/src/translator/constant.d.ts +6 -0
  318. package/dist/src/translator/index.d.ts +3 -0
  319. package/dist/src/translator/types.d.ts +85 -0
  320. package/dist/src/translator/utils.d.ts +47 -0
  321. package/dist/src/utils/cookie.d.ts +9 -0
  322. package/dist/src/utils/create.d.ts +2 -0
  323. package/dist/src/utils/env.d.ts +2 -0
  324. package/dist/src/utils/file.d.ts +33 -0
  325. package/dist/src/utils/i18nInfo.d.ts +5 -0
  326. package/dist/src/utils/index.d.ts +72 -0
  327. package/dist/src/utils/logger.d.ts +8 -0
  328. package/dist/src/utils/sortTsString.d.ts +1 -0
  329. package/dist/src/utils/string.d.ts +64 -0
  330. package/dist/src/utils/time-slicing/constant.d.ts +35 -0
  331. package/dist/src/utils/time-slicing/controller.d.ts +53 -0
  332. package/dist/src/utils/time-slicing/index.d.ts +5 -0
  333. package/dist/src/utils/time-slicing/page-state.d.ts +2 -0
  334. package/dist/src/utils/time-slicing/performance.d.ts +11 -0
  335. package/dist/src/utils/time-slicing/runner.d.ts +12 -0
  336. package/dist/src/utils/time-slicing/tool.d.ts +24 -0
  337. package/dist/src/utils/time-slicing/utils.d.ts +62 -0
  338. package/dist/src/utils/time-slicing/wrapper.d.ts +18 -0
  339. package/dist/src/utils/traverse.d.ts +36 -0
  340. package/dist/src/utils/types.d.ts +13 -0
  341. package/dist/src/utils/window.d.ts +7 -0
  342. package/dist/test/concepts/anonymous-function/constant.d.ts +2 -0
  343. package/dist/test/concepts/anonymous-function/toEmbeddedTS.spec.d.ts +1 -0
  344. package/dist/test/concepts/anonymous-function/toJS.spec.d.ts +1 -0
  345. package/dist/test/concepts/anonymous-function/toVue.spec.d.ts +1 -0
  346. package/dist/test/concepts/assignment/constant.d.ts +2 -0
  347. package/dist/test/concepts/assignment/toEmbeddedTS.spec.d.ts +1 -0
  348. package/dist/test/concepts/assignment/toJS.spec.d.ts +1 -0
  349. package/dist/test/concepts/assignment/toVue.spec.d.ts +1 -0
  350. package/dist/test/concepts/batch-assignment/constant.d.ts +2 -0
  351. package/dist/test/concepts/batch-assignment/toEmbeddedTS.spec.d.ts +1 -0
  352. package/dist/test/concepts/batch-assignment/toJS.spec.d.ts +1 -0
  353. package/dist/test/concepts/batch-assignment/toVue.spec.d.ts +1 -0
  354. package/dist/test/concepts/binary-expression/constant.d.ts +2 -0
  355. package/dist/test/concepts/binary-expression/getQuickInfoOffset.spec.d.ts +1 -0
  356. package/dist/test/concepts/binary-expression/toEmbeddedTS.spec.d.ts +1 -0
  357. package/dist/test/concepts/binary-expression/toJS.spec.d.ts +1 -0
  358. package/dist/test/concepts/binary-expression/toVue.spec.d.ts +1 -0
  359. package/dist/test/concepts/boolean-literal/constant.d.ts +2 -0
  360. package/dist/test/concepts/boolean-literal/toEmbeddedTS.spec.d.ts +1 -0
  361. package/dist/test/concepts/boolean-literal/toJS.spec.d.ts +1 -0
  362. package/dist/test/concepts/boolean-literal/toVue.spec.d.ts +1 -0
  363. package/dist/test/concepts/call-function/constant.d.ts +2 -0
  364. package/dist/test/concepts/call-function/getQuickInfoOffset.spec.d.ts +1 -0
  365. package/dist/test/concepts/call-function/toEmbeddedTS.spec.d.ts +1 -0
  366. package/dist/test/concepts/call-function/toJS.spec.d.ts +1 -0
  367. package/dist/test/concepts/call-interface/constant.d.ts +2 -0
  368. package/dist/test/concepts/call-interface/getQuickInfoOffset.spec.d.ts +1 -0
  369. package/dist/test/concepts/call-interface/toEmbeddedTS.spec.d.ts +1 -0
  370. package/dist/test/concepts/call-interface/toJS.spec.d.ts +1 -0
  371. package/dist/test/concepts/call-logic/constant.d.ts +2 -0
  372. package/dist/test/concepts/call-logic/getQuickInfoOffset.spec.d.ts +1 -0
  373. package/dist/test/concepts/call-logic/toEmbeddedTS.spec.d.ts +1 -0
  374. package/dist/test/concepts/call-logic/toJS.spec.d.ts +1 -0
  375. package/dist/test/concepts/call-logic/toUI.spec.d.ts +1 -0
  376. package/dist/test/concepts/call-logic/toVue.spec.d.ts +1 -0
  377. package/dist/test/concepts/call-logic/toVueDesigner.spec.d.ts +1 -0
  378. package/dist/test/concepts/data-source/constant.d.ts +2 -0
  379. package/dist/test/concepts/data-source/toEmbeddedTS.spec.d.ts +1 -0
  380. package/dist/test/concepts/data-source/toEmbeddedTSFile.spec.d.ts +1 -0
  381. package/dist/test/concepts/entity/constant.d.ts +2 -0
  382. package/dist/test/concepts/entity/toEmbeddedTS.spec.d.ts +1 -0
  383. package/dist/test/concepts/entity/toEmbeddedTSFile.spec.d.ts +1 -0
  384. package/dist/test/concepts/identifier/constant.d.ts +2 -0
  385. package/dist/test/concepts/identifier/toEmbeddedTS.spec.d.ts +1 -0
  386. package/dist/test/concepts/identifier/toJS.spec.d.ts +1 -0
  387. package/dist/test/concepts/identifier/toVue.spec.d.ts +1 -0
  388. package/dist/test/concepts/match/constant.d.ts +2 -0
  389. package/dist/test/concepts/match/toEmbeddedTS.spec.d.ts +1 -0
  390. package/dist/test/concepts/match/toJS.spec.d.ts +1 -0
  391. package/dist/test/concepts/member-expression/constant.d.ts +2 -0
  392. package/dist/test/concepts/member-expression/toEmbeddedTS.spec.d.ts +1 -0
  393. package/dist/test/concepts/member-expression/toJS.spec.d.ts +1 -0
  394. package/dist/test/concepts/member-expression/toVue.spec.d.ts +1 -0
  395. package/dist/test/concepts/new-composite/constant.d.ts +2 -0
  396. package/dist/test/concepts/new-composite/getQuickInfoOffset.spec.d.ts +1 -0
  397. package/dist/test/concepts/new-composite/toEmbeddedTS.spec.d.ts +1 -0
  398. package/dist/test/concepts/new-composite/toJS.spec.d.ts +1 -0
  399. package/dist/test/concepts/new-list/constant.d.ts +2 -0
  400. package/dist/test/concepts/new-list/getQuickInfoOffset.spec.d.ts +1 -0
  401. package/dist/test/concepts/new-list/toEmbeddedTS.spec.d.ts +1 -0
  402. package/dist/test/concepts/new-list/toJS.spec.d.ts +1 -0
  403. package/dist/test/concepts/new-map/constant.d.ts +2 -0
  404. package/dist/test/concepts/new-map/getQuickInfoOffset.spec.d.ts +1 -0
  405. package/dist/test/concepts/new-map/toEmbeddedTS.spec.d.ts +1 -0
  406. package/dist/test/concepts/new-map/toJS.spec.d.ts +1 -0
  407. package/dist/test/concepts/null-literal/constant.d.ts +2 -0
  408. package/dist/test/concepts/null-literal/toEmbeddedTS.spec.d.ts +1 -0
  409. package/dist/test/concepts/null-literal/toJS.spec.d.ts +1 -0
  410. package/dist/test/concepts/null-literal/toVue.spec.d.ts +1 -0
  411. package/dist/test/concepts/numeric-literal/constant.d.ts +2 -0
  412. package/dist/test/concepts/numeric-literal/toEmbeddedTS.spec.d.ts +1 -0
  413. package/dist/test/concepts/numeric-literal/toJS.spec.d.ts +1 -0
  414. package/dist/test/concepts/numeric-literal/toVue.spec.d.ts +1 -0
  415. package/dist/test/concepts/string-literal/constant.d.ts +2 -0
  416. package/dist/test/concepts/string-literal/toEmbeddedTS.spec.d.ts +1 -0
  417. package/dist/test/concepts/string-literal/toJS.spec.d.ts +1 -0
  418. package/dist/test/concepts/string-literal/toVue.spec.d.ts +1 -0
  419. package/dist/test/concepts/utils.d.ts +13 -0
  420. package/dist/test/concepts/validation-rule/constant.d.ts +2 -0
  421. package/dist/test/concepts/validation-rule/toEmbeddedTS.spec.d.ts +1 -0
  422. package/dist/test/concepts/validation-rule/toJS.spec.d.ts +1 -0
  423. package/dist/test/concepts/validation-rule/validation-rule.spec.d.ts +1 -0
  424. package/dist/test/concepts/view-element/constant.d.ts +2 -0
  425. package/dist/test/concepts/view-element/toEmbeddedTS.spec.d.ts +1 -0
  426. package/dist/test/concepts/view-element/toVue.spec.d.ts +1 -0
  427. package/dist/test/setup.d.ts +1 -0
  428. package/dist/test/time-slicing/runner.spec.d.ts +1 -0
  429. package/dist/test/time-slicing/time-slicing-nodejs.spec.d.ts +1 -0
  430. package/dist/test/time-slicing/utils.d.ts +1 -0
  431. package/dist/test/time-slicing/wrapper.spec.d.ts +1 -0
  432. package/out/generator/release-body/body.js +2 -0
  433. package/out/generator/release-body/body.js.map +1 -1
  434. package/out/generator/release-body/data.js +2 -0
  435. package/out/generator/release-body/data.js.map +1 -1
  436. package/out/natural/transformTSCode.js +31 -3
  437. package/out/natural/transformTSCode.js.map +1 -1
  438. package/out/server/getLogics.js +1 -1
  439. package/out/server/getLogics.js.map +1 -1
  440. package/out/server/naslServer.js +2 -3
  441. package/out/server/naslServer.js.map +1 -1
  442. package/package.json +1 -1
  443. package/sandbox-natural/stdlib/nasl.core.ts +0 -2
  444. package/src/generator/release-body/body.ts +4 -1
  445. package/src/generator/release-body/data.ts +2 -0
  446. package/src/natural/transformTSCode.ts +32 -4
  447. package/src/server/getLogics.ts +1 -1
  448. package/src/server/naslServer.ts +3 -3
@@ -0,0 +1,264 @@
1
+ import { TranslatorState, TranslatorGenerator } from '../translator';
2
+ import { ElementToVueOptions } from './ViewElement__';
3
+ import LogicItem from './LogicItem__';
4
+ import TypeAnnotation from './TypeAnnotation__';
5
+ /**
6
+ * 匹配分支
7
+ */
8
+ export declare class MatchCase extends LogicItem {
9
+ /** 类名 */
10
+ static readonly ConceptName: string;
11
+ /**
12
+ * 是否为抽象类
13
+ * 抽象类不能产生 concept: string
14
+ */
15
+ static isAbstract: boolean;
16
+ /** 继承链 */
17
+ static readonly inheritanceChain: string[];
18
+ /**
19
+ * 产品概念
20
+ */
21
+ readonly concept: 'MatchCase';
22
+ /**
23
+ * then
24
+ */
25
+ body: Array<LogicItem>;
26
+ /**
27
+ * 条件表达式
28
+ */
29
+ patterns: Array<LogicItem | TypeAnnotation>;
30
+ /**
31
+ * 是否可枚举
32
+ */
33
+ isMatchedTypeEnumable: boolean;
34
+ /**
35
+ * @param source 需要合并的部分参数
36
+ */
37
+ constructor(source?: Partial<MatchCase>);
38
+ static from(source: any, parentNode?: any, parentKey?: string): MatchCase;
39
+ /**
40
+ * 设置条件表达式
41
+ */
42
+ setPatterns(patterns: Array<LogicItem | TypeAnnotation>): void;
43
+ /**
44
+ * 设置是否可枚举
45
+ */
46
+ setIsMatchedTypeEnumable(isMatchedTypeEnumable: boolean): void;
47
+ /**
48
+ * 插入逻辑项
49
+ * @internal
50
+ * @param logicItemOptions 逻辑项参数
51
+ */
52
+ _insertItemInBodyAt(logicItemOptions: Partial<LogicItem>, index: number): LogicItem;
53
+ /**
54
+ * 插入逻辑项
55
+ * @internal
56
+ * @param logicItem 已有的逻辑项实例
57
+ */
58
+ _insertItemInBodyAt(logicItem: LogicItem, index: number): LogicItem;
59
+ /**
60
+ * 插入逻辑项
61
+ * @param logicItemOptions 逻辑项参数
62
+ */
63
+ insertItemInBodyAt(logicItemOptions: Partial<LogicItem>, index: number): LogicItem;
64
+ /**
65
+ * 插入逻辑项
66
+ * @param logicItem 已有的逻辑项实例
67
+ */
68
+ insertItemInBodyAt(logicItem: LogicItem, index: number): LogicItem;
69
+ /**
70
+ * 添加逻辑项
71
+ * @internal
72
+ * @param logicItemOptions 逻辑项参数
73
+ */
74
+ _addItemInBody(logicItemOptions: Partial<LogicItem>): LogicItem;
75
+ /**
76
+ * 添加逻辑项
77
+ * @internal
78
+ * @param logicItem 已有的逻辑项实例
79
+ */
80
+ _addItemInBody(logicItem: LogicItem): LogicItem;
81
+ /**
82
+ * 添加逻辑项
83
+ * @param logicItemOptions 逻辑项参数
84
+ */
85
+ addItemInBody(logicItemOptions: Partial<LogicItem>): LogicItem;
86
+ /**
87
+ * 添加逻辑项
88
+ * @param logicItem 已有的逻辑项实例
89
+ */
90
+ addItemInBody(logicItem: LogicItem): LogicItem;
91
+ getLogicItemExistingNames(excludedList?: Array<LogicItem>): string[];
92
+ getLogicItemUniqueName(name?: string): string;
93
+ /**
94
+ * 插入逻辑项
95
+ * @internal
96
+ * @param name 逻辑项名称,如果不填会自动生成一个唯一名称
97
+ */
98
+ _insertLogicItemInPatternsAt(name: string, index: number): LogicItem;
99
+ /**
100
+ * 插入逻辑项
101
+ * @internal
102
+ * @param logicItemOptions 逻辑项参数
103
+ */
104
+ _insertLogicItemInPatternsAt(logicItemOptions: Partial<LogicItem>, index: number): LogicItem;
105
+ /**
106
+ * 插入逻辑项
107
+ * @internal
108
+ * @param logicItem 已有的逻辑项实例
109
+ */
110
+ _insertLogicItemInPatternsAt(logicItem: LogicItem, index: number): LogicItem;
111
+ /**
112
+ * 插入逻辑项
113
+ * @param name 逻辑项名称,如果不填会自动生成一个唯一名称
114
+ */
115
+ insertLogicItemInPatternsAt(name: string, index: number): LogicItem;
116
+ /**
117
+ * 插入逻辑项
118
+ * @param logicItemOptions 逻辑项参数
119
+ */
120
+ insertLogicItemInPatternsAt(logicItemOptions: Partial<LogicItem>, index: number): LogicItem;
121
+ /**
122
+ * 插入逻辑项
123
+ * @param logicItem 已有的逻辑项实例
124
+ */
125
+ insertLogicItemInPatternsAt(logicItem: LogicItem, index: number): LogicItem;
126
+ /**
127
+ * 添加逻辑项
128
+ * @internal
129
+ * @param name 逻辑项名称,如果不填会自动生成一个唯一名称
130
+ */
131
+ _addLogicItemInPatterns(name?: string): LogicItem;
132
+ /**
133
+ * 添加逻辑项
134
+ * @internal
135
+ * @param logicItemOptions 逻辑项参数
136
+ */
137
+ _addLogicItemInPatterns(logicItemOptions: Partial<LogicItem>): LogicItem;
138
+ /**
139
+ * 添加逻辑项
140
+ * @internal
141
+ * @param logicItem 已有的逻辑项实例
142
+ */
143
+ _addLogicItemInPatterns(logicItem: LogicItem): LogicItem;
144
+ /**
145
+ * 添加逻辑项
146
+ * @internal
147
+ * @param name 逻辑项名称,如果不填会自动生成一个唯一名称
148
+ */
149
+ addLogicItemInPatterns(name?: string): LogicItem;
150
+ /**
151
+ * 添加逻辑项
152
+ * @param logicItemOptions 逻辑项参数
153
+ */
154
+ addLogicItemInPatterns(logicItemOptions: Partial<LogicItem>): LogicItem;
155
+ /**
156
+ * 添加逻辑项
157
+ * @param logicItem 已有的逻辑项实例
158
+ */
159
+ addLogicItemInPatterns(logicItem: LogicItem): LogicItem;
160
+ getTypeAnnotationExistingNames(excludedList?: Array<TypeAnnotation>): string[];
161
+ getTypeAnnotationUniqueName(name?: string): string;
162
+ /**
163
+ * 插入类型标注
164
+ * @internal
165
+ * @param name 类型标注名称,如果不填会自动生成一个唯一名称
166
+ */
167
+ _insertTypeAnnotationAt(name: string, index: number): TypeAnnotation;
168
+ /**
169
+ * 插入类型标注
170
+ * @internal
171
+ * @param typeAnnotationOptions 类型标注参数
172
+ */
173
+ _insertTypeAnnotationAt(typeAnnotationOptions: Partial<TypeAnnotation>, index: number): TypeAnnotation;
174
+ /**
175
+ * 插入类型标注
176
+ * @internal
177
+ * @param typeAnnotation 已有的类型标注实例
178
+ */
179
+ _insertTypeAnnotationAt(typeAnnotation: TypeAnnotation, index: number): TypeAnnotation;
180
+ /**
181
+ * 插入类型标注
182
+ * @param name 类型标注名称,如果不填会自动生成一个唯一名称
183
+ */
184
+ insertTypeAnnotationAt(name: string, index: number): TypeAnnotation;
185
+ /**
186
+ * 插入类型标注
187
+ * @param typeAnnotationOptions 类型标注参数
188
+ */
189
+ insertTypeAnnotationAt(typeAnnotationOptions: Partial<TypeAnnotation>, index: number): TypeAnnotation;
190
+ /**
191
+ * 插入类型标注
192
+ * @param typeAnnotation 已有的类型标注实例
193
+ */
194
+ insertTypeAnnotationAt(typeAnnotation: TypeAnnotation, index: number): TypeAnnotation;
195
+ /**
196
+ * 添加类型标注
197
+ * @internal
198
+ * @param name 类型标注名称,如果不填会自动生成一个唯一名称
199
+ */
200
+ _addTypeAnnotation(name?: string): TypeAnnotation;
201
+ /**
202
+ * 添加类型标注
203
+ * @internal
204
+ * @param typeAnnotationOptions 类型标注参数
205
+ */
206
+ _addTypeAnnotation(typeAnnotationOptions: Partial<TypeAnnotation>): TypeAnnotation;
207
+ /**
208
+ * 添加类型标注
209
+ * @internal
210
+ * @param typeAnnotation 已有的类型标注实例
211
+ */
212
+ _addTypeAnnotation(typeAnnotation: TypeAnnotation): TypeAnnotation;
213
+ /**
214
+ * 添加类型标注
215
+ * @internal
216
+ * @param name 类型标注名称,如果不填会自动生成一个唯一名称
217
+ */
218
+ addTypeAnnotation(name?: string): TypeAnnotation;
219
+ /**
220
+ * 添加类型标注
221
+ * @param typeAnnotationOptions 类型标注参数
222
+ */
223
+ addTypeAnnotation(typeAnnotationOptions: Partial<TypeAnnotation>): TypeAnnotation;
224
+ /**
225
+ * 添加类型标注
226
+ * @param typeAnnotation 已有的类型标注实例
227
+ */
228
+ addTypeAnnotation(typeAnnotation: TypeAnnotation): TypeAnnotation;
229
+ /**
230
+ * 删除逻辑项
231
+ * @param logicItem 已有的逻辑项实例
232
+ */
233
+ removeItemInBody(logicItem: LogicItem): void;
234
+ /**
235
+ * 删除逻辑项
236
+ * @param name 逻辑项名称
237
+ */
238
+ removeLogicItemInPatterns(name: string): void;
239
+ /**
240
+ * 删除逻辑项
241
+ * @param logicItem 已有的逻辑项实例
242
+ */
243
+ removeLogicItemInPatterns(logicItem: LogicItem): void;
244
+ /**
245
+ * 删除类型标注
246
+ * @param name 类型标注名称
247
+ */
248
+ removeTypeAnnotation(name: string): void;
249
+ /**
250
+ * 删除类型标注
251
+ * @param typeAnnotation 已有的类型标注实例
252
+ */
253
+ removeTypeAnnotation(typeAnnotation: TypeAnnotation): void;
254
+ get isDisabled(): boolean;
255
+ get isSlotTypeError(): boolean;
256
+ isTypeMatching(): Promise<boolean>;
257
+ toVue(options?: ElementToVueOptions): string;
258
+ toUI(state?: TranslatorState, hideDetails?: boolean): string;
259
+ toJS(expression: LogicItem, index?: number, length?: number): string;
260
+ toEmbeddedTS(state?: TranslatorState, index?: number, parentCode?: string): TranslatorGenerator;
261
+ toNaturalTS(state?: TranslatorState, index?: number, parentCode?: string): string;
262
+ toTextualNASL(state?: TranslatorState): string;
263
+ }
264
+ export default MatchCase;
@@ -0,0 +1,122 @@
1
+ import { TranslatorState, TranslatorGenerator } from '../translator';
2
+ import type TypeAnnotation from './TypeAnnotation__';
3
+ import { EventPayload } from '../common/EventEmitter';
4
+ import LogicItem from './LogicItem__';
5
+ import MatchCase from './MatchCase__';
6
+ /**
7
+ * 匹配
8
+ */
9
+ export declare class Match extends LogicItem {
10
+ /** 类名 */
11
+ static readonly ConceptName: string;
12
+ /**
13
+ * 是否为抽象类
14
+ * 抽象类不能产生 concept: string
15
+ */
16
+ static isAbstract: boolean;
17
+ /** 继承链 */
18
+ static readonly inheritanceChain: string[];
19
+ /**
20
+ * 产品概念
21
+ */
22
+ readonly concept: 'Match';
23
+ /**
24
+ * 逻辑项
25
+ */
26
+ expression: LogicItem;
27
+ /**
28
+ * 是否表达式形态
29
+ */
30
+ isExpression: boolean;
31
+ /**
32
+ * 匹配分支列表
33
+ */
34
+ cases: Array<MatchCase>;
35
+ /**
36
+ * @param source 需要合并的部分参数
37
+ */
38
+ constructor(source?: Partial<Match>);
39
+ static from(source: any, parentNode?: any, parentKey?: string): Match;
40
+ /**
41
+ * 插入匹配分支
42
+ * @internal
43
+ * @param matchCaseOptions 匹配分支参数
44
+ */
45
+ _insertMatchCaseAt(matchCaseOptions: Partial<MatchCase>, index: number): MatchCase;
46
+ /**
47
+ * 插入匹配分支
48
+ * @internal
49
+ * @param matchCase 已有的匹配分支实例
50
+ */
51
+ _insertMatchCaseAt(matchCase: MatchCase, index: number): MatchCase;
52
+ /**
53
+ * 插入匹配分支
54
+ * @param matchCaseOptions 匹配分支参数
55
+ */
56
+ insertMatchCaseAt(matchCaseOptions: Partial<MatchCase>, index: number): MatchCase;
57
+ /**
58
+ * 插入匹配分支
59
+ * @param matchCase 已有的匹配分支实例
60
+ */
61
+ insertMatchCaseAt(matchCase: MatchCase, index: number): MatchCase;
62
+ /**
63
+ * 添加匹配分支
64
+ * @internal
65
+ * @param matchCaseOptions 匹配分支参数
66
+ */
67
+ _addMatchCase(matchCaseOptions: Partial<MatchCase>): MatchCase;
68
+ /**
69
+ * 添加匹配分支
70
+ * @internal
71
+ * @param matchCase 已有的匹配分支实例
72
+ */
73
+ _addMatchCase(matchCase: MatchCase): MatchCase;
74
+ /**
75
+ * 添加匹配分支
76
+ * @param matchCaseOptions 匹配分支参数
77
+ */
78
+ addMatchCase(matchCaseOptions: Partial<MatchCase>): MatchCase;
79
+ /**
80
+ * 添加匹配分支
81
+ * @param matchCase 已有的匹配分支实例
82
+ */
83
+ addMatchCase(matchCase: MatchCase): MatchCase;
84
+ /**
85
+ * 删除匹配分支
86
+ * @param matchCase 已有的匹配分支实例
87
+ */
88
+ removeMatchCase(matchCase: MatchCase): void;
89
+ enumerableItems: Array<LogicItem | TypeAnnotation>;
90
+ get isEnumerable(): boolean;
91
+ cacheStatus(): Promise<void>;
92
+ /**
93
+ * 是否允许新建case
94
+ */
95
+ get canAddCase(): boolean;
96
+ getEnumerableItems(typeAnnotation?: TypeAnnotation): Promise<LogicItem[] | TypeAnnotation[]>;
97
+ setIsExpression(isExpression: boolean): void;
98
+ /**
99
+ * 设置逻辑项
100
+ */
101
+ setExpression(expression: LogicItem): void;
102
+ setExpressionWitchCase(expression: LogicItem): Promise<void>;
103
+ autoGenCases(oldExpression: LogicItem): Promise<void>;
104
+ autoGenCasesAST({ oldAst, cacheType }: any): Promise<void>;
105
+ changeGenCases(): Promise<void>;
106
+ static getDefaultOptions(): {
107
+ label: string;
108
+ };
109
+ isTypeMatching(): Promise<boolean>;
110
+ onChange($event?: EventPayload): void;
111
+ get expressionNameInView(): string;
112
+ getViewMatchExpressionBuilder(): string;
113
+ getInViewMethod(state?: TranslatorState): string;
114
+ setIsExpressionCustom(isExpression: boolean): void;
115
+ toVue(state?: TranslatorState): string;
116
+ toUI(state?: TranslatorState, hideDetails?: boolean): string;
117
+ toJS(state?: TranslatorState): string;
118
+ toEmbeddedTS(state?: TranslatorState): TranslatorGenerator;
119
+ toNaturalTS(state?: TranslatorState): string;
120
+ toTextualNASL(state?: TranslatorState): string;
121
+ }
122
+ export default Match;
@@ -0,0 +1,64 @@
1
+ import { TranslatorState, TranslatorGenerator } from '../translator';
2
+ import { TypeAnnotation } from '..';
3
+ import { ElementToVueOptions } from './ViewElement__';
4
+ import LogicItem from './LogicItem__';
5
+ /**
6
+ * 成员表达式
7
+ */
8
+ export declare class MemberExpression extends LogicItem {
9
+ /** 类名 */
10
+ static readonly ConceptName: string;
11
+ /**
12
+ * 是否为抽象类
13
+ * 抽象类不能产生 concept: string
14
+ */
15
+ static isAbstract: boolean;
16
+ /** 继承链 */
17
+ static readonly inheritanceChain: string[];
18
+ /**
19
+ * 产品概念
20
+ */
21
+ readonly concept: 'MemberExpression';
22
+ /**
23
+ * 逻辑项
24
+ */
25
+ object: LogicItem;
26
+ /**
27
+ * 逻辑项
28
+ */
29
+ property: LogicItem;
30
+ /**
31
+ * @param source 需要合并的部分参数
32
+ */
33
+ constructor(source?: Partial<MemberExpression>);
34
+ static from(source: any, parentNode?: any, parentKey?: string): MemberExpression;
35
+ typeAnnotation: TypeAnnotation;
36
+ toVue(options?: ElementToVueOptions): string;
37
+ toUI(state?: TranslatorState, hideDetails?: boolean): string;
38
+ toJS(state?: TranslatorState): string;
39
+ toBrief(): string;
40
+ setValue(newValue: string): void;
41
+ /**
42
+ * 设置数据结构属性名称
43
+ */
44
+ setName(name: string): void;
45
+ isEnum(): boolean;
46
+ isDefaultValueExpression(getVuePrototype: boolean): boolean;
47
+ getValue(): string;
48
+ transfromAtrrLogic(options?: {
49
+ type: 'toVue' | 'toJS';
50
+ }): string;
51
+ get completeName(): string;
52
+ get rootName(): string;
53
+ /**
54
+ * 翻译
55
+ * @param state
56
+ * @returns
57
+ */
58
+ toEmbeddedTS(state?: TranslatorState): TranslatorGenerator;
59
+ toNaturalTS(state?: TranslatorState): string;
60
+ toTextualNASL(state?: TranslatorState): string;
61
+ get lastObject(): any;
62
+ firstMemberExpressionNode(): any;
63
+ }
64
+ export default MemberExpression;
@@ -0,0 +1,220 @@
1
+ import type { EmbeddedTSFileGenerator } from '../utils';
2
+ import { TranslatorState, TranslatorGenerator } from '../translator';
3
+ import Module from './Module__';
4
+ import BaseNode from '../common/BaseNode';
5
+ import TypeAnnotation from './TypeAnnotation__';
6
+ import ValidationRule from './ValidationRule__';
7
+ import LogicItem from './LogicItem__';
8
+ /**
9
+ * 元数据类型
10
+ */
11
+ export declare class MetadataType extends BaseNode {
12
+ /** 类名 */
13
+ static readonly ConceptName: string;
14
+ /**
15
+ * 是否为抽象类
16
+ * 抽象类不能产生 concept: string
17
+ */
18
+ static isAbstract: boolean;
19
+ /** 继承链 */
20
+ static readonly inheritanceChain: string[];
21
+ /**
22
+ * 产品概念
23
+ */
24
+ readonly concept: 'MetadataType';
25
+ /**
26
+ * 名称
27
+ */
28
+ name: string;
29
+ /**
30
+ * 标题
31
+ */
32
+ label: string;
33
+ /**
34
+ * 描述
35
+ */
36
+ description: string;
37
+ /**
38
+ * 类型
39
+ */
40
+ typeAnnotation: TypeAnnotation;
41
+ /**
42
+ * 验证规则
43
+ */
44
+ rules: Array<ValidationRule>;
45
+ /**
46
+ * 草稿态
47
+ */
48
+ playground: Array<LogicItem>;
49
+ /**
50
+ * 唯一标识
51
+ */
52
+ uuid: string;
53
+ /**
54
+ * @param source 需要合并的部分参数
55
+ */
56
+ constructor(source?: Partial<MetadataType>);
57
+ static from(source: any, parentNode?: any, parentKey?: string): MetadataType;
58
+ getValidationRuleExistingNames(excludedList?: Array<ValidationRule>): string[];
59
+ getValidationRuleUniqueName(name?: string): string;
60
+ /**
61
+ * 插入验证规则
62
+ * @internal
63
+ * @param name 验证规则名称,如果不填会自动生成一个唯一名称
64
+ */
65
+ _insertValidationRuleAt(name: string, index: number): ValidationRule;
66
+ /**
67
+ * 插入验证规则
68
+ * @internal
69
+ * @param validationRuleOptions 验证规则参数
70
+ */
71
+ _insertValidationRuleAt(validationRuleOptions: Partial<ValidationRule>, index: number): ValidationRule;
72
+ /**
73
+ * 插入验证规则
74
+ * @internal
75
+ * @param validationRule 已有的验证规则实例
76
+ */
77
+ _insertValidationRuleAt(validationRule: ValidationRule, index: number): ValidationRule;
78
+ /**
79
+ * 插入验证规则
80
+ * @param name 验证规则名称,如果不填会自动生成一个唯一名称
81
+ */
82
+ insertValidationRuleAt(name: string, index: number): ValidationRule;
83
+ /**
84
+ * 插入验证规则
85
+ * @param validationRuleOptions 验证规则参数
86
+ */
87
+ insertValidationRuleAt(validationRuleOptions: Partial<ValidationRule>, index: number): ValidationRule;
88
+ /**
89
+ * 插入验证规则
90
+ * @param validationRule 已有的验证规则实例
91
+ */
92
+ insertValidationRuleAt(validationRule: ValidationRule, index: number): ValidationRule;
93
+ /**
94
+ * 添加验证规则
95
+ * @internal
96
+ * @param name 验证规则名称,如果不填会自动生成一个唯一名称
97
+ */
98
+ _addValidationRule(name?: string): ValidationRule;
99
+ /**
100
+ * 添加验证规则
101
+ * @internal
102
+ * @param validationRuleOptions 验证规则参数
103
+ */
104
+ _addValidationRule(validationRuleOptions: Partial<ValidationRule>): ValidationRule;
105
+ /**
106
+ * 添加验证规则
107
+ * @internal
108
+ * @param validationRule 已有的验证规则实例
109
+ */
110
+ _addValidationRule(validationRule: ValidationRule): ValidationRule;
111
+ /**
112
+ * 添加验证规则
113
+ * @internal
114
+ * @param name 验证规则名称,如果不填会自动生成一个唯一名称
115
+ */
116
+ addValidationRule(name?: string): ValidationRule;
117
+ /**
118
+ * 添加验证规则
119
+ * @param validationRuleOptions 验证规则参数
120
+ */
121
+ addValidationRule(validationRuleOptions: Partial<ValidationRule>): ValidationRule;
122
+ /**
123
+ * 添加验证规则
124
+ * @param validationRule 已有的验证规则实例
125
+ */
126
+ addValidationRule(validationRule: ValidationRule): ValidationRule;
127
+ /**
128
+ * 插入逻辑项
129
+ * @internal
130
+ * @param logicItemOptions 逻辑项参数
131
+ */
132
+ _insertItemAt(logicItemOptions: Partial<LogicItem>, index: number): LogicItem;
133
+ /**
134
+ * 插入逻辑项
135
+ * @internal
136
+ * @param logicItem 已有的逻辑项实例
137
+ */
138
+ _insertItemAt(logicItem: LogicItem, index: number): LogicItem;
139
+ /**
140
+ * 插入逻辑项
141
+ * @param logicItemOptions 逻辑项参数
142
+ */
143
+ insertItemAt(logicItemOptions: Partial<LogicItem>, index: number): LogicItem;
144
+ /**
145
+ * 插入逻辑项
146
+ * @param logicItem 已有的逻辑项实例
147
+ */
148
+ insertItemAt(logicItem: LogicItem, index: number): LogicItem;
149
+ /**
150
+ * 添加逻辑项
151
+ * @internal
152
+ * @param logicItemOptions 逻辑项参数
153
+ */
154
+ _addItem(logicItemOptions: Partial<LogicItem>): LogicItem;
155
+ /**
156
+ * 添加逻辑项
157
+ * @internal
158
+ * @param logicItem 已有的逻辑项实例
159
+ */
160
+ _addItem(logicItem: LogicItem): LogicItem;
161
+ /**
162
+ * 添加逻辑项
163
+ * @param logicItemOptions 逻辑项参数
164
+ */
165
+ addItem(logicItemOptions: Partial<LogicItem>): LogicItem;
166
+ /**
167
+ * 添加逻辑项
168
+ * @param logicItem 已有的逻辑项实例
169
+ */
170
+ addItem(logicItem: LogicItem): LogicItem;
171
+ /**
172
+ * 删除验证规则
173
+ * @param name 验证规则名称
174
+ */
175
+ removeValidationRule(name: string): void;
176
+ /**
177
+ * 删除验证规则
178
+ * @param validationRule 已有的验证规则实例
179
+ */
180
+ removeValidationRule(validationRule: ValidationRule): void;
181
+ /**
182
+ * 删除逻辑项
183
+ * @param logicItem 已有的逻辑项实例
184
+ */
185
+ removeItem(logicItem: LogicItem): void;
186
+ /**
187
+ * 祖先 Module
188
+ */
189
+ get module(): Module;
190
+ /**
191
+ * 是否可编辑
192
+ *
193
+ */
194
+ get readonly(): boolean;
195
+ deleteLogincAndModule(): void;
196
+ /**
197
+ * 设置元数据名称
198
+ */
199
+ setName(name: string): void;
200
+ /**
201
+ * 设置元数据标题
202
+ */
203
+ setLabel(label: string): void;
204
+ /**
205
+ * 设置元数据描述
206
+ */
207
+ setDescription(description: string): void;
208
+ toEmbeddedTS(state?: TranslatorState): TranslatorGenerator;
209
+ getNamespace(): string;
210
+ getTsNamespace(): string;
211
+ /**
212
+ * 生成宿主语言的文件路径
213
+ * @param name 一般不用传,用于 rename
214
+ */
215
+ getEmbeddedFilePath(name?: string): string;
216
+ toEmbeddedTSFile(): EmbeddedTSFileGenerator;
217
+ toNaturalTS(state?: TranslatorState): string;
218
+ toTextualNASL(state?: TranslatorState): string;
219
+ }
220
+ export default MetadataType;