@lcap/nasl 3.1.0-beta.4 → 3.1.0-beta.5

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 (245) hide show
  1. package/out/automate/engine/utils.js +4 -0
  2. package/out/automate/engine/utils.js.map +1 -1
  3. package/out/automate/upgrader/2.12.js +1 -5
  4. package/out/automate/upgrader/2.12.js.map +1 -1
  5. package/out/automate/upgrader/2.14.js +1 -5
  6. package/out/automate/upgrader/2.14.js.map +1 -1
  7. package/out/automate/upgrader/2.16.js +1 -5
  8. package/out/automate/upgrader/2.16.js.map +1 -1
  9. package/out/automate/upgrader/2.17.js +1 -5
  10. package/out/automate/upgrader/2.17.js.map +1 -1
  11. package/out/automate/upgrader/2.18.js +1 -5
  12. package/out/automate/upgrader/2.18.js.map +1 -1
  13. package/out/automate/upgrader/2.20.js +1 -5
  14. package/out/automate/upgrader/2.20.js.map +1 -1
  15. package/out/breakpoint/generator/BreakpointNode.js +14 -4
  16. package/out/breakpoint/generator/BreakpointNode.js.map +1 -1
  17. package/out/breakpoint/index.js +1 -5
  18. package/out/breakpoint/index.js.map +1 -1
  19. package/out/breakpoint/shared/index.js +1 -5
  20. package/out/breakpoint/shared/index.js.map +1 -1
  21. package/out/breakpoint/shared/utils.js +1 -1
  22. package/out/breakpoint/shared/utils.js.map +1 -1
  23. package/out/breakpoint/store/core.js +1 -5
  24. package/out/breakpoint/store/core.js.map +1 -1
  25. package/out/breakpoint/store/dock.js +1 -5
  26. package/out/breakpoint/store/dock.js.map +1 -1
  27. package/out/breakpoint/store/index.js +1 -5
  28. package/out/breakpoint/store/index.js.map +1 -1
  29. package/out/common/BaseNode.d.ts +1 -1
  30. package/out/common/BaseNode.js +17 -11
  31. package/out/common/BaseNode.js.map +1 -1
  32. package/out/common/index.js +1 -5
  33. package/out/common/index.js.map +1 -1
  34. package/out/concepts/Anchor__.js +1 -5
  35. package/out/concepts/Anchor__.js.map +1 -1
  36. package/out/concepts/AnonymousFunction__.d.ts +9 -8
  37. package/out/concepts/AnonymousFunction__.js +14 -18
  38. package/out/concepts/AnonymousFunction__.js.map +1 -1
  39. package/out/concepts/App__.js +1 -5
  40. package/out/concepts/App__.js.map +1 -1
  41. package/out/concepts/Argument__.js +2 -11
  42. package/out/concepts/Argument__.js.map +1 -1
  43. package/out/concepts/Assignee__.js +1 -5
  44. package/out/concepts/Assignee__.js.map +1 -1
  45. package/out/concepts/Assignment__.js +1 -1
  46. package/out/concepts/Assignment__.js.map +1 -1
  47. package/out/concepts/AuthLogicForCallInterface__.js +1 -5
  48. package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
  49. package/out/concepts/Backend__.js +1 -5
  50. package/out/concepts/Backend__.js.map +1 -1
  51. package/out/concepts/BatchAssignment__.js +3 -8
  52. package/out/concepts/BatchAssignment__.js.map +1 -1
  53. package/out/concepts/BindAttribute__.js +2 -15
  54. package/out/concepts/BindAttribute__.js.map +1 -1
  55. package/out/concepts/BindDirective__.js +1 -5
  56. package/out/concepts/BindDirective__.js.map +1 -1
  57. package/out/concepts/BindEvent__.js +1 -5
  58. package/out/concepts/BindEvent__.js.map +1 -1
  59. package/out/concepts/BindStyle__.js +1 -5
  60. package/out/concepts/BindStyle__.js.map +1 -1
  61. package/out/concepts/CallAuthInterface__.js +1 -5
  62. package/out/concepts/CallAuthInterface__.js.map +1 -1
  63. package/out/concepts/CallFunction__.js +2 -2
  64. package/out/concepts/CallFunction__.js.map +1 -1
  65. package/out/concepts/CallInterface__.js +50 -62
  66. package/out/concepts/CallInterface__.js.map +1 -1
  67. package/out/concepts/CallLogic__.d.ts +4 -1
  68. package/out/concepts/CallLogic__.js +86 -123
  69. package/out/concepts/CallLogic__.js.map +1 -1
  70. package/out/concepts/CallQueryComponent__.d.ts +1 -1
  71. package/out/concepts/CallQueryComponent__.js +1 -5
  72. package/out/concepts/CallQueryComponent__.js.map +1 -1
  73. package/out/concepts/CompletionProperty__.js +8 -1
  74. package/out/concepts/CompletionProperty__.js.map +1 -1
  75. package/out/concepts/ConfigGroup__.js +1 -5
  76. package/out/concepts/ConfigGroup__.js.map +1 -1
  77. package/out/concepts/ConfigProperty__.js +1 -5
  78. package/out/concepts/ConfigProperty__.js.map +1 -1
  79. package/out/concepts/Configuration__.js +1 -5
  80. package/out/concepts/Configuration__.js.map +1 -1
  81. package/out/concepts/Connector__.js +1 -5
  82. package/out/concepts/Connector__.js.map +1 -1
  83. package/out/concepts/DataSource__.js +1 -5
  84. package/out/concepts/DataSource__.js.map +1 -1
  85. package/out/concepts/Destination__.js +1 -5
  86. package/out/concepts/Destination__.js.map +1 -1
  87. package/out/concepts/EntityProperty__.js +1 -5
  88. package/out/concepts/EntityProperty__.js.map +1 -1
  89. package/out/concepts/Entity__.js +1 -5
  90. package/out/concepts/Entity__.js.map +1 -1
  91. package/out/concepts/Enum__.js +1 -5
  92. package/out/concepts/Enum__.js.map +1 -1
  93. package/out/concepts/Event__.js +1 -5
  94. package/out/concepts/Event__.js.map +1 -1
  95. package/out/concepts/ForEachStatement__.js +1 -5
  96. package/out/concepts/ForEachStatement__.js.map +1 -1
  97. package/out/concepts/FrontendLibrary__.d.ts +29 -29
  98. package/out/concepts/FrontendLibrary__.js +3 -7
  99. package/out/concepts/FrontendLibrary__.js.map +1 -1
  100. package/out/concepts/Frontend__.js +1 -5
  101. package/out/concepts/Frontend__.js.map +1 -1
  102. package/out/concepts/Function__.js +2 -6
  103. package/out/concepts/Function__.js.map +1 -1
  104. package/out/concepts/Interface__.js +1 -5
  105. package/out/concepts/Interface__.js.map +1 -1
  106. package/out/concepts/LogicItem__.d.ts +6 -6
  107. package/out/concepts/LogicItem__.js +6 -6
  108. package/out/concepts/LogicItem__.js.map +1 -1
  109. package/out/concepts/Logic__.js +5 -24
  110. package/out/concepts/Logic__.js.map +1 -1
  111. package/out/concepts/MatchCase__.js +1 -5
  112. package/out/concepts/MatchCase__.js.map +1 -1
  113. package/out/concepts/Module__.js +1 -5
  114. package/out/concepts/Module__.js.map +1 -1
  115. package/out/concepts/MsgTriggerEvent__.js +1 -5
  116. package/out/concepts/MsgTriggerEvent__.js.map +1 -1
  117. package/out/concepts/MsgTriggerLauncher__.js +1 -5
  118. package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
  119. package/out/concepts/Namespace__.d.ts +29 -29
  120. package/out/concepts/Namespace__.js +3 -7
  121. package/out/concepts/Namespace__.js.map +1 -1
  122. package/out/concepts/NewComposite__.d.ts +0 -1
  123. package/out/concepts/NewComposite__.js +4 -72
  124. package/out/concepts/NewComposite__.js.map +1 -1
  125. package/out/concepts/NewList__.d.ts +0 -1
  126. package/out/concepts/NewList__.js +2 -22
  127. package/out/concepts/NewList__.js.map +1 -1
  128. package/out/concepts/NewMap__.js +1 -5
  129. package/out/concepts/NewMap__.js.map +1 -1
  130. package/out/concepts/OverriddenLogic__.js +1 -5
  131. package/out/concepts/OverriddenLogic__.js.map +1 -1
  132. package/out/concepts/ProcessComponent__.js +1 -5
  133. package/out/concepts/ProcessComponent__.js.map +1 -1
  134. package/out/concepts/ProcessElement__.js +1 -5
  135. package/out/concepts/ProcessElement__.js.map +1 -1
  136. package/out/concepts/Process__.js +1 -5
  137. package/out/concepts/Process__.js.map +1 -1
  138. package/out/concepts/QueryJoinExpression__.js +1 -5
  139. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  140. package/out/concepts/QuerySelectExpression__.js +1 -5
  141. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  142. package/out/concepts/SelectMembers__.js +1 -5
  143. package/out/concepts/SelectMembers__.js.map +1 -1
  144. package/out/concepts/StringInterpolation__.js +1 -5
  145. package/out/concepts/StringInterpolation__.js.map +1 -1
  146. package/out/concepts/Structure__.js +1 -5
  147. package/out/concepts/Structure__.js.map +1 -1
  148. package/out/concepts/TriggerEvent__.js +1 -5
  149. package/out/concepts/TriggerEvent__.js.map +1 -1
  150. package/out/concepts/TypeAnnotation__.js +5 -5
  151. package/out/concepts/TypeAnnotation__.js.map +1 -1
  152. package/out/concepts/ValidationRule__.js +10 -4
  153. package/out/concepts/ValidationRule__.js.map +1 -1
  154. package/out/concepts/ViewComponent__.d.ts +33 -33
  155. package/out/concepts/ViewComponent__.js +8 -12
  156. package/out/concepts/ViewComponent__.js.map +1 -1
  157. package/out/concepts/ViewElement__.js +53 -74
  158. package/out/concepts/ViewElement__.js.map +1 -1
  159. package/out/concepts/View__.js +5 -9
  160. package/out/concepts/View__.js.map +1 -1
  161. package/out/concepts/basics/stdlib/nasl.http.js +2 -2
  162. package/out/concepts/basics/stdlib/nasl.util.js +9 -17
  163. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  164. package/out/concepts/basics/types/index.js +1 -1
  165. package/out/concepts/basics/types/index.js.map +1 -1
  166. package/out/concepts/index.js +1 -5
  167. package/out/concepts/index.js.map +1 -1
  168. package/out/concepts/index__.js +1 -5
  169. package/out/concepts/index__.js.map +1 -1
  170. package/out/generator/genBundleFiles.js +1 -5
  171. package/out/generator/genBundleFiles.js.map +1 -1
  172. package/out/generator/genHash.js +1 -5
  173. package/out/generator/genHash.js.map +1 -1
  174. package/out/generator/genMetaData.js +1 -13
  175. package/out/generator/genMetaData.js.map +1 -1
  176. package/out/generator/index.js +1 -5
  177. package/out/generator/index.js.map +1 -1
  178. package/out/generator/permission.js +48 -24
  179. package/out/generator/permission.js.map +1 -1
  180. package/out/generator/styleReplacer.js +1 -5
  181. package/out/generator/styleReplacer.js.map +1 -1
  182. package/out/index.js +1 -5
  183. package/out/index.js.map +1 -1
  184. package/out/sentry/index.js +1 -8
  185. package/out/sentry/index.js.map +1 -1
  186. package/out/server/formatTsUtils.js +28 -29
  187. package/out/server/formatTsUtils.js.map +1 -1
  188. package/out/server/getMemberIdentifier.js +1 -1
  189. package/out/server/getMemberIdentifier.js.map +1 -1
  190. package/out/server/naslServer.js +17 -20
  191. package/out/server/naslServer.js.map +1 -1
  192. package/out/service/creator/errHandles.d.ts +1 -1
  193. package/out/service/storage/init.js +5 -8
  194. package/out/service/storage/init.js.map +1 -1
  195. package/out/templator/genCreateBlock.js +1 -5
  196. package/out/templator/genCreateBlock.js.map +1 -1
  197. package/out/templator/genCurdEditMultipleKeyBlock.js +2 -6
  198. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  199. package/out/templator/genCurdMultipleKeyBlock.js +3 -7
  200. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  201. package/out/templator/genEditTableBlock.d.ts +1 -1
  202. package/out/templator/genEditTableBlock.js +3 -11
  203. package/out/templator/genEditTableBlock.js.map +1 -1
  204. package/out/templator/genGetBlock.js +1 -5
  205. package/out/templator/genGetBlock.js.map +1 -1
  206. package/out/templator/genGridViewBlock.d.ts +2 -2
  207. package/out/templator/genGridViewBlock.js +9 -19
  208. package/out/templator/genGridViewBlock.js.map +1 -1
  209. package/out/templator/genListViewBlock.d.ts +2 -2
  210. package/out/templator/genListViewBlock.js +6 -14
  211. package/out/templator/genListViewBlock.js.map +1 -1
  212. package/out/templator/genQueryComponent.js +1 -5
  213. package/out/templator/genQueryComponent.js.map +1 -1
  214. package/out/templator/genSelectBlock.d.ts +2 -2
  215. package/out/templator/genSelectBlock.js +10 -20
  216. package/out/templator/genSelectBlock.js.map +1 -1
  217. package/out/templator/genTableBlock.d.ts +1 -1
  218. package/out/templator/genTableBlock.js +4 -12
  219. package/out/templator/genTableBlock.js.map +1 -1
  220. package/out/templator/genUpdateBlock.js +1 -5
  221. package/out/templator/genUpdateBlock.js.map +1 -1
  222. package/out/templator/index.js +1 -5
  223. package/out/templator/index.js.map +1 -1
  224. package/out/utils/index.js +1 -5
  225. package/out/utils/index.js.map +1 -1
  226. package/package.json +2 -2
  227. package/src/breakpoint/generator/BreakpointNode.ts +19 -4
  228. package/src/breakpoint/shared/utils.ts +1 -1
  229. package/src/common/BaseNode.ts +15 -3
  230. package/src/concepts/CallLogic__.ts +45 -15
  231. package/src/concepts/ValidationRule__.ts +15 -5
  232. package/src/concepts/ViewElement__.ts +9 -6
  233. package/src/generator/permission.ts +28 -8
  234. package/src/server/formatTsUtils.ts +26 -28
  235. package/src/server/getMemberIdentifier.ts +1 -1
  236. package/src/server/naslServer.ts +0 -1
  237. package/test/concepts/call-logic/__snapshots__/getQuickInfoOffset.spec.ts.snap +106 -0
  238. package/test/concepts/call-logic/__snapshots__/toEmbeddedTS.spec.ts.snap +45 -0
  239. package/test/concepts/call-logic/__snapshots__/toJS.spec.ts.snap +102 -0
  240. package/test/concepts/call-logic/fixtures/nested-call-logic.json +934 -0
  241. package/test/concepts/call-logic/getQuickInfoOffset.spec.ts +23 -0
  242. package/test/concepts/validation-rule/__snapshots__/toEmbeddedTS.spec.ts.snap +6 -0
  243. package/test/concepts/validation-rule/__snapshots__/toJS.spec.ts.snap +5 -0
  244. package/test/concepts/validation-rule/fixtures/argument-without-keyout.json +34 -0
  245. package/test/concepts/validation-rule/validation-rule.spec.ts +15 -0
@@ -101,6 +101,108 @@ exports[`call-logic:toJS global-logic-argument-some-expression 1`] = `
101
101
  "
102
102
  `;
103
103
 
104
+ exports[`call-logic:toJS nested-call-logic 1`] = `
105
+ "await(
106
+ this.$logics[\\"extensions.httpclient.logics.exchange\\"]({
107
+ config: {
108
+ download: false,
109
+ },
110
+ query: {},
111
+ headers: {
112
+ \\"lcap-calllogic-uuid\\": \\"2aa4ac49eeae443bb3cd155528c8b1dc\\",
113
+ },
114
+ path: {},
115
+ body: {
116
+ url:
117
+ this.$utils[\\"ToString\\"](
118
+ \`https://dysmsapi.aliyuncs.com/?AccessKeyId=LTAI5tPhPfe7NDP1qzrQjkuV&Action=SendSms&Format=JSON&Signature=\`,
119
+ \\"nasl.core.String\\"
120
+ ) +
121
+ this.$utils[\\"ToString\\"](
122
+ await(
123
+ this.$logics[\\"extensions.encrypt_tool.logics.encryptWithUrlEncode\\"](
124
+ {
125
+ config: {
126
+ download: false,
127
+ },
128
+ query: {},
129
+ headers: {
130
+ \\"lcap-calllogic-uuid\\": \\"c363848a-dff4-43ed-9eb7-d8e5a8b84573\\",
131
+ },
132
+ path: {},
133
+ body: {
134
+ source: sign,
135
+ },
136
+ }
137
+ )
138
+ ),
139
+ \\"nasl.core.String\\"
140
+ ) +
141
+ this.$utils[\\"ToString\\"](
142
+ \`&SignatureMethod=HMAC-SHA1&SignatureVersion=1.0&Timestamp=\`,
143
+ \\"nasl.core.String\\"
144
+ ) +
145
+ this.$utils[\\"ToString\\"](
146
+ await(
147
+ this.$logics[\\"extensions.encrypt_tool.logics.encryptWithUrlEncode\\"](
148
+ {
149
+ config: {
150
+ download: false,
151
+ },
152
+ query: {},
153
+ headers: {
154
+ \\"lcap-calllogic-uuid\\": \\"16404a8b-1b51-41a7-b6fa-af016df2c264\\",
155
+ },
156
+ path: {},
157
+ body: {
158
+ source: currDate,
159
+ },
160
+ }
161
+ )
162
+ ),
163
+ \\"nasl.core.String\\"
164
+ ) +
165
+ this.$utils[\\"ToString\\"](
166
+ \`&Version=2017-05-25&SignatureNonce=\`,
167
+ \\"nasl.core.String\\"
168
+ ) +
169
+ this.$utils[\\"ToString\\"](SignatureNonce, \\"nasl.core.String\\") +
170
+ this.$utils[\\"ToString\\"](\`&PhoneNumbers=\`, \\"nasl.core.String\\") +
171
+ this.$utils[\\"ToString\\"](receiver, \\"nasl.core.String\\") +
172
+ this.$utils[\\"ToString\\"](\`&SignName=\`, \\"nasl.core.String\\") +
173
+ this.$utils[\\"ToString\\"](signName, \\"nasl.core.String\\") +
174
+ this.$utils[\\"ToString\\"](\`&TemplateCode=\`, \\"nasl.core.String\\") +
175
+ this.$utils[\\"ToString\\"](templateCode, \\"nasl.core.String\\") +
176
+ this.$utils[\\"ToString\\"](\`&TemolateParam=\`, \\"nasl.core.String\\") +
177
+ this.$utils[\\"ToString\\"](
178
+ await(
179
+ this.$logics[\\"extensions.encrypt_tool.logics.encryptWithUrlEncode\\"](
180
+ {
181
+ config: {
182
+ download: false,
183
+ },
184
+ query: {},
185
+ headers: {
186
+ \\"lcap-calllogic-uuid\\": \\"db11a00aeb884c2cb8a3404db9879973\\",
187
+ },
188
+ path: {},
189
+ body: {
190
+ source: templateParam,
191
+ },
192
+ }
193
+ )
194
+ ),
195
+ \\"nasl.core.String\\"
196
+ ),
197
+ httpMethod: \`Get\`,
198
+ header: header,
199
+ body: body,
200
+ },
201
+ })
202
+ );
203
+ "
204
+ `;
205
+
104
206
  exports[`call-logic:toJS only-call-logic 1`] = `
105
207
  "await(this.$global.logout({}));
106
208
  "