@webda/core 3.16.4 → 4.0.0-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 (452) hide show
  1. package/lib/application.d.ts +29 -8
  2. package/lib/application.d.ts.map +1 -0
  3. package/lib/application.js +65 -38
  4. package/lib/application.js.map +1 -1
  5. package/lib/application.spec.d.ts +1 -0
  6. package/lib/application.spec.d.ts.map +1 -0
  7. package/lib/application.spec.js +57 -43
  8. package/lib/application.spec.js.map +1 -1
  9. package/lib/core.d.ts +16 -12
  10. package/lib/core.d.ts.map +1 -0
  11. package/lib/core.js +105 -80
  12. package/lib/core.js.map +1 -1
  13. package/lib/core.spec.d.ts +1 -0
  14. package/lib/core.spec.d.ts.map +1 -0
  15. package/lib/core.spec.js +96 -67
  16. package/lib/core.spec.js.map +1 -1
  17. package/lib/errors.d.ts +59 -60
  18. package/lib/errors.d.ts.map +1 -0
  19. package/lib/errors.js +92 -108
  20. package/lib/errors.js.map +1 -1
  21. package/lib/errors.spec.d.ts +1 -0
  22. package/lib/errors.spec.d.ts.map +1 -0
  23. package/lib/errors.spec.js +1 -1
  24. package/lib/errors.spec.js.map +1 -1
  25. package/lib/index.d.ts +6 -3
  26. package/lib/index.d.ts.map +1 -0
  27. package/lib/index.js +6 -3
  28. package/lib/index.js.map +1 -1
  29. package/lib/models/aclmodel.d.ts +2 -2
  30. package/lib/models/aclmodel.d.ts.map +1 -0
  31. package/lib/models/aclmodel.js +8 -9
  32. package/lib/models/aclmodel.js.map +1 -1
  33. package/lib/models/aclmodel.spec.d.ts +1 -0
  34. package/lib/models/aclmodel.spec.d.ts.map +1 -0
  35. package/lib/models/aclmodel.spec.js +3 -3
  36. package/lib/models/aclmodel.spec.js.map +1 -1
  37. package/lib/models/coremodel.d.ts +15 -0
  38. package/lib/models/coremodel.d.ts.map +1 -0
  39. package/lib/models/coremodel.js +35 -28
  40. package/lib/models/coremodel.js.map +1 -1
  41. package/lib/models/coremodel.spec.d.ts +1 -0
  42. package/lib/models/coremodel.spec.d.ts.map +1 -0
  43. package/lib/models/coremodel.spec.js +33 -31
  44. package/lib/models/coremodel.spec.js.map +1 -1
  45. package/lib/models/deployment.d.ts +1 -0
  46. package/lib/models/deployment.d.ts.map +1 -0
  47. package/lib/models/ident.d.ts +17 -2
  48. package/lib/models/ident.d.ts.map +1 -0
  49. package/lib/models/ident.js +0 -14
  50. package/lib/models/ident.js.map +1 -1
  51. package/lib/models/ident.spec.d.ts +1 -0
  52. package/lib/models/ident.spec.d.ts.map +1 -0
  53. package/lib/models/ident.spec.js +1 -20
  54. package/lib/models/ident.spec.js.map +1 -1
  55. package/lib/models/ownermodel.d.ts +1 -0
  56. package/lib/models/ownermodel.d.ts.map +1 -0
  57. package/lib/models/ownermodel.spec.d.ts +1 -0
  58. package/lib/models/ownermodel.spec.d.ts.map +1 -0
  59. package/lib/models/ownermodel.spec.js +57 -33
  60. package/lib/models/ownermodel.spec.js.map +1 -1
  61. package/lib/models/relations.d.ts +1 -0
  62. package/lib/models/relations.d.ts.map +1 -0
  63. package/lib/models/relations.js +3 -3
  64. package/lib/models/relations.js.map +1 -1
  65. package/lib/models/relations.spec.d.ts +2 -0
  66. package/lib/models/relations.spec.d.ts.map +1 -0
  67. package/lib/models/relations.spec.js +10 -17
  68. package/lib/models/relations.spec.js.map +1 -1
  69. package/lib/models/rolemodel.d.ts +1 -0
  70. package/lib/models/rolemodel.d.ts.map +1 -0
  71. package/lib/models/rolemodel.js +2 -2
  72. package/lib/models/rolemodel.js.map +1 -1
  73. package/lib/models/rolemodel.spec.d.ts +1 -0
  74. package/lib/models/rolemodel.spec.d.ts.map +1 -0
  75. package/lib/models/rolemodel.spec.js +5 -1
  76. package/lib/models/rolemodel.spec.js.map +1 -1
  77. package/lib/models/simpleuser.d.ts +47 -0
  78. package/lib/models/simpleuser.d.ts.map +1 -0
  79. package/lib/models/simpleuser.js +84 -0
  80. package/lib/models/simpleuser.js.map +1 -0
  81. package/lib/models/test.d.ts +11 -0
  82. package/lib/models/test.d.ts.map +1 -0
  83. package/lib/models/test.js +7 -0
  84. package/lib/models/test.js.map +1 -0
  85. package/lib/models/user.d.ts +2 -35
  86. package/lib/models/user.d.ts.map +1 -0
  87. package/lib/models/user.js +3 -74
  88. package/lib/models/user.js.map +1 -1
  89. package/lib/models/user.spec.d.ts +1 -0
  90. package/lib/models/user.spec.d.ts.map +1 -0
  91. package/lib/models/user.spec.js +7 -6
  92. package/lib/models/user.spec.js.map +1 -1
  93. package/lib/queues/filequeue.d.ts +1 -0
  94. package/lib/queues/filequeue.d.ts.map +1 -0
  95. package/lib/queues/filequeue.js +5 -5
  96. package/lib/queues/filequeue.js.map +1 -1
  97. package/lib/queues/filequeue.spec.d.ts +1 -0
  98. package/lib/queues/filequeue.spec.d.ts.map +1 -0
  99. package/lib/queues/filequeue.spec.js +11 -5
  100. package/lib/queues/filequeue.spec.js.map +1 -1
  101. package/lib/queues/memoryqueue.d.ts +14 -0
  102. package/lib/queues/memoryqueue.d.ts.map +1 -0
  103. package/lib/queues/memoryqueue.js +38 -7
  104. package/lib/queues/memoryqueue.js.map +1 -1
  105. package/lib/queues/memoryqueue.spec.d.ts +1 -0
  106. package/lib/queues/memoryqueue.spec.d.ts.map +1 -0
  107. package/lib/queues/memoryqueue.spec.js +18 -7
  108. package/lib/queues/memoryqueue.spec.js.map +1 -1
  109. package/lib/queues/pubsubservice.d.ts +1 -0
  110. package/lib/queues/pubsubservice.d.ts.map +1 -0
  111. package/lib/queues/queue.spec.d.ts +3 -2
  112. package/lib/queues/queue.spec.d.ts.map +1 -0
  113. package/lib/queues/queue.spec.js +5 -3
  114. package/lib/queues/queue.spec.js.map +1 -1
  115. package/lib/queues/queueservice.d.ts +1 -0
  116. package/lib/queues/queueservice.d.ts.map +1 -0
  117. package/lib/queues/queueservice.js +7 -7
  118. package/lib/queues/queueservice.js.map +1 -1
  119. package/lib/rest/restdomainservice.d.ts +63 -0
  120. package/lib/rest/restdomainservice.d.ts.map +1 -0
  121. package/lib/rest/restdomainservice.js +687 -0
  122. package/lib/rest/restdomainservice.js.map +1 -0
  123. package/lib/rest/restdomainservice.spec.d.ts +2 -0
  124. package/lib/rest/restdomainservice.spec.d.ts.map +1 -0
  125. package/lib/rest/restdomainservice.spec.js +124 -0
  126. package/lib/rest/restdomainservice.spec.js.map +1 -0
  127. package/lib/{router.d.ts → rest/router.d.ts} +6 -4
  128. package/lib/rest/router.d.ts.map +1 -0
  129. package/lib/{router.js → rest/router.js} +33 -23
  130. package/lib/rest/router.js.map +1 -0
  131. package/lib/rest/router.spec.d.ts +2 -0
  132. package/lib/rest/router.spec.d.ts.map +1 -0
  133. package/lib/{router.spec.js → rest/router.spec.js} +54 -28
  134. package/lib/rest/router.spec.js.map +1 -0
  135. package/lib/services/asyncevents.d.ts +1 -0
  136. package/lib/services/asyncevents.d.ts.map +1 -0
  137. package/lib/services/asyncevents.js +4 -4
  138. package/lib/services/asyncevents.js.map +1 -1
  139. package/lib/services/asyncevents.spec.d.ts +1 -0
  140. package/lib/services/asyncevents.spec.d.ts.map +1 -0
  141. package/lib/services/asyncevents.spec.js +10 -10
  142. package/lib/services/asyncevents.spec.js.map +1 -1
  143. package/lib/services/authentication.d.ts +2 -1
  144. package/lib/services/authentication.d.ts.map +1 -0
  145. package/lib/services/authentication.js +26 -25
  146. package/lib/services/authentication.js.map +1 -1
  147. package/lib/services/authentication.spec.d.ts +1 -0
  148. package/lib/services/authentication.spec.d.ts.map +1 -0
  149. package/lib/services/authentication.spec.js +24 -24
  150. package/lib/services/authentication.spec.js.map +1 -1
  151. package/lib/services/binary.d.ts +13 -87
  152. package/lib/services/binary.d.ts.map +1 -0
  153. package/lib/services/binary.js +39 -421
  154. package/lib/services/binary.js.map +1 -1
  155. package/lib/services/binary.spec.d.ts +19 -22
  156. package/lib/services/binary.spec.d.ts.map +1 -0
  157. package/lib/services/binary.spec.js +87 -374
  158. package/lib/services/binary.spec.js.map +1 -1
  159. package/lib/services/cloudbinary.d.ts +3 -2
  160. package/lib/services/cloudbinary.d.ts.map +1 -0
  161. package/lib/services/cloudbinary.js +1 -1
  162. package/lib/services/cloudbinary.js.map +1 -1
  163. package/lib/services/cloudbinary.spec.d.ts +1 -8
  164. package/lib/services/cloudbinary.spec.d.ts.map +1 -0
  165. package/lib/services/cloudbinary.spec.js +4 -130
  166. package/lib/services/cloudbinary.spec.js.map +1 -1
  167. package/lib/services/configuration.d.ts +10 -1
  168. package/lib/services/configuration.d.ts.map +1 -0
  169. package/lib/services/configuration.js +22 -7
  170. package/lib/services/configuration.js.map +1 -1
  171. package/lib/services/configuration.spec.d.ts +1 -0
  172. package/lib/services/configuration.spec.d.ts.map +1 -0
  173. package/lib/services/configuration.spec.js +60 -17
  174. package/lib/services/configuration.spec.js.map +1 -1
  175. package/lib/services/cron.d.ts +2 -1
  176. package/lib/services/cron.d.ts.map +1 -0
  177. package/lib/services/cron.js +10 -10
  178. package/lib/services/cron.js.map +1 -1
  179. package/lib/services/cron.spec.d.ts +1 -0
  180. package/lib/services/cron.spec.d.ts.map +1 -0
  181. package/lib/services/cron.spec.js +2 -2
  182. package/lib/services/cron.spec.js.map +1 -1
  183. package/lib/services/cryptoservice.d.ts +3 -2
  184. package/lib/services/cryptoservice.d.ts.map +1 -0
  185. package/lib/services/cryptoservice.js +29 -30
  186. package/lib/services/cryptoservice.js.map +1 -1
  187. package/lib/services/cryptoservice.spec.d.ts +1 -0
  188. package/lib/services/cryptoservice.spec.d.ts.map +1 -0
  189. package/lib/services/cryptoservice.spec.js +17 -17
  190. package/lib/services/cryptoservice.spec.js.map +1 -1
  191. package/lib/services/debugmailer.d.ts +2 -2
  192. package/lib/services/debugmailer.d.ts.map +1 -0
  193. package/lib/services/debugmailer.js +1 -2
  194. package/lib/services/debugmailer.js.map +1 -1
  195. package/lib/services/debugmailer.spec.d.ts +1 -0
  196. package/lib/services/debugmailer.spec.d.ts.map +1 -0
  197. package/lib/services/debugmailer.spec.js +6 -3
  198. package/lib/services/debugmailer.spec.js.map +1 -1
  199. package/lib/services/domainservice.d.ts +167 -47
  200. package/lib/services/domainservice.d.ts.map +1 -0
  201. package/lib/services/domainservice.js +520 -753
  202. package/lib/services/domainservice.js.map +1 -1
  203. package/lib/services/domainservice.spec.d.ts +1 -0
  204. package/lib/services/domainservice.spec.d.ts.map +1 -0
  205. package/lib/services/domainservice.spec.js +201 -31
  206. package/lib/services/domainservice.spec.js.map +1 -1
  207. package/lib/services/filebinary.d.ts +8 -5
  208. package/lib/services/filebinary.d.ts.map +1 -0
  209. package/lib/services/filebinary.js +34 -32
  210. package/lib/services/filebinary.js.map +1 -1
  211. package/lib/services/filebinary.spec.d.ts +12 -8
  212. package/lib/services/filebinary.spec.d.ts.map +1 -0
  213. package/lib/services/filebinary.spec.js +135 -122
  214. package/lib/services/filebinary.spec.js.map +1 -1
  215. package/lib/services/fileconfiguration.d.ts +2 -1
  216. package/lib/services/fileconfiguration.d.ts.map +1 -0
  217. package/lib/services/fileconfiguration.js +1 -1
  218. package/lib/services/fileconfiguration.js.map +1 -1
  219. package/lib/services/fileconfiguration.spec.d.ts +1 -0
  220. package/lib/services/fileconfiguration.spec.d.ts.map +1 -0
  221. package/lib/services/fileconfiguration.spec.js +65 -27
  222. package/lib/services/fileconfiguration.spec.js.map +1 -1
  223. package/lib/services/invitationservice.d.ts +2 -1
  224. package/lib/services/invitationservice.d.ts.map +1 -0
  225. package/lib/services/invitationservice.js +19 -16
  226. package/lib/services/invitationservice.js.map +1 -1
  227. package/lib/services/invitationservice.spec.d.ts +1 -0
  228. package/lib/services/invitationservice.spec.d.ts.map +1 -0
  229. package/lib/services/invitationservice.spec.js +73 -22
  230. package/lib/services/invitationservice.spec.js.map +1 -1
  231. package/lib/services/kubernetesconfiguration.d.ts +1 -0
  232. package/lib/services/kubernetesconfiguration.d.ts.map +1 -0
  233. package/lib/services/kubernetesconfiguration.js +0 -2
  234. package/lib/services/kubernetesconfiguration.js.map +1 -1
  235. package/lib/services/kubernetesconfiguration.spec.d.ts +1 -0
  236. package/lib/services/kubernetesconfiguration.spec.d.ts.map +1 -0
  237. package/lib/services/kubernetesconfiguration.spec.js +67 -8
  238. package/lib/services/kubernetesconfiguration.spec.js.map +1 -1
  239. package/lib/services/mailer.d.ts +1 -0
  240. package/lib/services/mailer.d.ts.map +1 -0
  241. package/lib/services/mailer.js +3 -3
  242. package/lib/services/mailer.js.map +1 -1
  243. package/lib/services/mailer.spec.d.ts +1 -0
  244. package/lib/services/mailer.spec.d.ts.map +1 -0
  245. package/lib/services/mailer.spec.js +18 -4
  246. package/lib/services/mailer.spec.js.map +1 -1
  247. package/lib/services/notificationservice.d.ts +1 -0
  248. package/lib/services/notificationservice.d.ts.map +1 -0
  249. package/lib/services/notificationservice.js +1 -1
  250. package/lib/services/notificationservice.js.map +1 -1
  251. package/lib/services/notificationservice.spec.d.ts +1 -0
  252. package/lib/services/notificationservice.spec.d.ts.map +1 -0
  253. package/lib/services/notificationservice.spec.js +8 -3
  254. package/lib/services/notificationservice.spec.js.map +1 -1
  255. package/lib/services/oauth.d.ts +6 -3
  256. package/lib/services/oauth.d.ts.map +1 -0
  257. package/lib/services/oauth.js +11 -8
  258. package/lib/services/oauth.js.map +1 -1
  259. package/lib/services/oauth.spec.d.ts +1 -0
  260. package/lib/services/oauth.spec.d.ts.map +1 -0
  261. package/lib/services/oauth.spec.js +39 -15
  262. package/lib/services/oauth.spec.js.map +1 -1
  263. package/lib/services/prometheus.d.ts +1 -0
  264. package/lib/services/prometheus.d.ts.map +1 -0
  265. package/lib/services/prometheus.spec.d.ts +1 -0
  266. package/lib/services/prometheus.spec.d.ts.map +1 -0
  267. package/lib/services/prometheus.spec.js +38 -19
  268. package/lib/services/prometheus.spec.js.map +1 -1
  269. package/lib/services/resource.d.ts +21 -1
  270. package/lib/services/resource.d.ts.map +1 -0
  271. package/lib/services/resource.js +20 -3
  272. package/lib/services/resource.js.map +1 -1
  273. package/lib/services/resource.spec.d.ts +1 -0
  274. package/lib/services/resource.spec.d.ts.map +1 -0
  275. package/lib/services/resource.spec.js +38 -20
  276. package/lib/services/resource.spec.js.map +1 -1
  277. package/lib/services/service.d.ts +2 -2
  278. package/lib/services/service.d.ts.map +1 -0
  279. package/lib/services/service.js +13 -23
  280. package/lib/services/service.js.map +1 -1
  281. package/lib/services/service.spec.d.ts +1 -0
  282. package/lib/services/service.spec.d.ts.map +1 -0
  283. package/lib/services/service.spec.js +58 -40
  284. package/lib/services/service.spec.js.map +1 -1
  285. package/lib/stores/aggregator.d.ts +10 -3
  286. package/lib/stores/aggregator.d.ts.map +1 -0
  287. package/lib/stores/aggregator.js +6 -6
  288. package/lib/stores/aggregator.js.map +1 -1
  289. package/lib/stores/file.d.ts +3 -2
  290. package/lib/stores/file.d.ts.map +1 -0
  291. package/lib/stores/file.js +13 -13
  292. package/lib/stores/file.js.map +1 -1
  293. package/lib/stores/file.spec.d.ts +5 -11
  294. package/lib/stores/file.spec.d.ts.map +1 -0
  295. package/lib/stores/file.spec.js +20 -114
  296. package/lib/stores/file.spec.js.map +1 -1
  297. package/lib/stores/mapper.d.ts +2 -1
  298. package/lib/stores/mapper.d.ts.map +1 -0
  299. package/lib/stores/mapper.js +12 -12
  300. package/lib/stores/mapper.js.map +1 -1
  301. package/lib/stores/mapper.spec.d.ts +1 -0
  302. package/lib/stores/mapper.spec.d.ts.map +1 -0
  303. package/lib/stores/mapper.spec.js +24 -17
  304. package/lib/stores/mapper.spec.js.map +1 -1
  305. package/lib/stores/memory.d.ts +2 -1
  306. package/lib/stores/memory.d.ts.map +1 -0
  307. package/lib/stores/memory.js +15 -15
  308. package/lib/stores/memory.js.map +1 -1
  309. package/lib/stores/memory.spec.d.ts +7 -13
  310. package/lib/stores/memory.spec.d.ts.map +1 -0
  311. package/lib/stores/memory.spec.js +118 -183
  312. package/lib/stores/memory.spec.js.map +1 -1
  313. package/lib/stores/modelmapper.d.ts +1 -0
  314. package/lib/stores/modelmapper.d.ts.map +1 -0
  315. package/lib/stores/modelmapper.js +8 -10
  316. package/lib/stores/modelmapper.js.map +1 -1
  317. package/lib/stores/store.d.ts +4 -145
  318. package/lib/stores/store.d.ts.map +1 -0
  319. package/lib/stores/store.js +54 -654
  320. package/lib/stores/store.js.map +1 -1
  321. package/lib/stores/store.spec.d.ts +11 -19
  322. package/lib/stores/store.spec.d.ts.map +1 -0
  323. package/lib/stores/store.spec.js +99 -268
  324. package/lib/stores/store.spec.js.map +1 -1
  325. package/lib/test.d.ts +109 -6
  326. package/lib/test.d.ts.map +1 -0
  327. package/lib/test.js +245 -22
  328. package/lib/test.js.map +1 -1
  329. package/lib/unpackedapplication.d.ts +3 -2
  330. package/lib/unpackedapplication.d.ts.map +1 -0
  331. package/lib/unpackedapplication.js +29 -16
  332. package/lib/unpackedapplication.js.map +1 -1
  333. package/lib/utils/abstractdeployer.d.ts +1 -0
  334. package/lib/utils/abstractdeployer.d.ts.map +1 -0
  335. package/lib/utils/abstractdeployer.spec.d.ts +1 -0
  336. package/lib/utils/abstractdeployer.spec.d.ts.map +1 -0
  337. package/lib/utils/case.d.ts +1 -0
  338. package/lib/utils/case.d.ts.map +1 -0
  339. package/lib/utils/case.spec.d.ts +1 -0
  340. package/lib/utils/case.spec.d.ts.map +1 -0
  341. package/lib/utils/context.d.ts +37 -17
  342. package/lib/utils/context.d.ts.map +1 -0
  343. package/lib/utils/context.js +53 -42
  344. package/lib/utils/context.js.map +1 -1
  345. package/lib/utils/context.spec.d.ts +1 -0
  346. package/lib/utils/context.spec.d.ts.map +1 -0
  347. package/lib/utils/context.spec.js +21 -14
  348. package/lib/utils/context.spec.js.map +1 -1
  349. package/lib/utils/cookie.d.ts +1 -0
  350. package/lib/utils/cookie.d.ts.map +1 -0
  351. package/lib/utils/cookie.js +2 -2
  352. package/lib/utils/cookie.js.map +1 -1
  353. package/lib/utils/cookie.spec.d.ts +1 -0
  354. package/lib/utils/cookie.spec.d.ts.map +1 -0
  355. package/lib/utils/cookie.spec.js +20 -10
  356. package/lib/utils/cookie.spec.js.map +1 -1
  357. package/lib/utils/esm.d.ts +1 -0
  358. package/lib/utils/esm.d.ts.map +1 -0
  359. package/lib/utils/httpcontext.d.ts +1 -0
  360. package/lib/utils/httpcontext.d.ts.map +1 -0
  361. package/lib/utils/httpcontext.js +7 -7
  362. package/lib/utils/httpcontext.js.map +1 -1
  363. package/lib/utils/httpcontext.spec.d.ts +1 -0
  364. package/lib/utils/httpcontext.spec.d.ts.map +1 -0
  365. package/lib/utils/httpcontext.spec.js +7 -7
  366. package/lib/utils/httpcontext.spec.js.map +1 -1
  367. package/lib/utils/logger.d.ts +1 -0
  368. package/lib/utils/logger.d.ts.map +1 -0
  369. package/lib/utils/logger.spec.d.ts +1 -0
  370. package/lib/utils/logger.spec.d.ts.map +1 -0
  371. package/lib/utils/logger.spec.js +5 -5
  372. package/lib/utils/logger.spec.js.map +1 -1
  373. package/lib/utils/serializers.d.ts +6 -4
  374. package/lib/utils/serializers.d.ts.map +1 -0
  375. package/lib/utils/serializers.js +30 -27
  376. package/lib/utils/serializers.js.map +1 -1
  377. package/lib/utils/serializers.spec.d.ts +1 -0
  378. package/lib/utils/serializers.spec.d.ts.map +1 -0
  379. package/lib/utils/serializers.spec.js +12 -14
  380. package/lib/utils/serializers.spec.js.map +1 -1
  381. package/lib/utils/session.d.ts +2 -5
  382. package/lib/utils/session.d.ts.map +1 -0
  383. package/lib/utils/session.js +1 -11
  384. package/lib/utils/session.js.map +1 -1
  385. package/lib/utils/session.spec.d.ts +1 -0
  386. package/lib/utils/session.spec.d.ts.map +1 -0
  387. package/lib/utils/session.spec.js +22 -12
  388. package/lib/utils/session.spec.js.map +1 -1
  389. package/lib/utils/throttler.d.ts +1 -4
  390. package/lib/utils/throttler.d.ts.map +1 -0
  391. package/lib/utils/throttler.js +1 -9
  392. package/lib/utils/throttler.js.map +1 -1
  393. package/lib/utils/throttler.spec.d.ts +1 -0
  394. package/lib/utils/throttler.spec.d.ts.map +1 -0
  395. package/lib/utils/throttler.spec.js +4 -6
  396. package/lib/utils/throttler.spec.js.map +1 -1
  397. package/lib/utils/waiter.d.ts +1 -0
  398. package/lib/utils/waiter.d.ts.map +1 -0
  399. package/lib/utils/waiter.js +3 -3
  400. package/lib/utils/waiter.js.map +1 -1
  401. package/lib/utils/waiter.spec.d.ts +1 -0
  402. package/lib/utils/waiter.spec.d.ts.map +1 -0
  403. package/lib/utils/waiter.spec.js +6 -6
  404. package/lib/utils/waiter.spec.js.map +1 -1
  405. package/package.json +20 -16
  406. package/test/config.json +6 -90
  407. package/test/data/.env +1 -0
  408. package/webda.module.json +607 -377
  409. package/lib/router.js.map +0 -1
  410. package/lib/router.spec.d.ts +0 -1
  411. package/lib/router.spec.js.map +0 -1
  412. package/lib/stores/aliasstore.d.ts +0 -108
  413. package/lib/stores/aliasstore.js +0 -168
  414. package/lib/stores/aliasstore.js.map +0 -1
  415. package/lib/stores/aliasstore.spec.d.ts +0 -11
  416. package/lib/stores/aliasstore.spec.js +0 -89
  417. package/lib/stores/aliasstore.spec.js.map +0 -1
  418. package/lib/stores/webdaql/WebdaQLLexer.d.ts +0 -54
  419. package/lib/stores/webdaql/WebdaQLLexer.js +0 -295
  420. package/lib/stores/webdaql/WebdaQLLexer.js.map +0 -1
  421. package/lib/stores/webdaql/WebdaQLParserLexer.d.ts +0 -54
  422. package/lib/stores/webdaql/WebdaQLParserLexer.js +0 -295
  423. package/lib/stores/webdaql/WebdaQLParserLexer.js.map +0 -1
  424. package/lib/stores/webdaql/WebdaQLParserListener.d.ts +0 -296
  425. package/lib/stores/webdaql/WebdaQLParserListener.js +0 -3
  426. package/lib/stores/webdaql/WebdaQLParserListener.js.map +0 -1
  427. package/lib/stores/webdaql/WebdaQLParserParser.d.ts +0 -311
  428. package/lib/stores/webdaql/WebdaQLParserParser.js +0 -1807
  429. package/lib/stores/webdaql/WebdaQLParserParser.js.map +0 -1
  430. package/lib/stores/webdaql/WebdaQLParserVisitor.d.ts +0 -181
  431. package/lib/stores/webdaql/WebdaQLParserVisitor.js +0 -3
  432. package/lib/stores/webdaql/WebdaQLParserVisitor.js.map +0 -1
  433. package/lib/stores/webdaql/query.d.ts +0 -390
  434. package/lib/stores/webdaql/query.js +0 -702
  435. package/lib/stores/webdaql/query.js.map +0 -1
  436. package/lib/stores/webdaql/query.spec.d.ts +0 -1
  437. package/lib/stores/webdaql/query.spec.js +0 -206
  438. package/lib/stores/webdaql/query.spec.js.map +0 -1
  439. package/test/config-file-missing-file-no-default.json +0 -44
  440. package/test/config-file-missing-file.json +0 -55
  441. package/test/config-file-no-reload.json +0 -69
  442. package/test/config-file-reload.json +0 -68
  443. package/test/config-invitation.json +0 -63
  444. package/test/config-kube-reload.json +0 -68
  445. package/test/config-reload.json +0 -66
  446. package/test/config.old.json +0 -152
  447. package/test/moddas/annotatedservice.js +0 -23
  448. package/test/moddas/debugmailer.js +0 -13
  449. package/test/moddas/fakeservice.js +0 -4
  450. package/test/moddas/voidstore.js +0 -66
  451. package/test/models/ident.js +0 -36
  452. package/test/models/task.js +0 -42
@@ -1,702 +0,0 @@
1
- import { CharStreams, CommonTokenStream } from "antlr4ts";
2
- import { AbstractParseTreeVisitor, TerminalNode } from "antlr4ts/tree/index.js";
3
- import { WebdaQLLexer } from "./WebdaQLLexer.js";
4
- import { OrderFieldExpressionContext, SubExpressionContext, WebdaQLParserParser } from "./WebdaQLParserParser.js";
5
- /**
6
- * Meta Query Language
7
- *
8
- *
9
- */
10
- export var WebdaQL;
11
- (function (WebdaQL) {
12
- function PrependCondition(query = "", condition) {
13
- return new QueryValidator(query).merge(condition).toString();
14
- }
15
- WebdaQL.PrependCondition = PrependCondition;
16
- /**
17
- * Create Expression based on the parsed token
18
- *
19
- * Expression allow to optimize and split between Query and Filter
20
- */
21
- class ExpressionBuilder extends AbstractParseTreeVisitor {
22
- /**
23
- * Default result for the override
24
- * @returns
25
- */
26
- defaultResult() {
27
- // An empty AND return true
28
- return {
29
- filter: new AndExpression([])
30
- };
31
- }
32
- /**
33
- * Get offset
34
- * @returns
35
- */
36
- getOffset() {
37
- return this.offset;
38
- }
39
- /**
40
- * Get limit
41
- * @returns
42
- */
43
- getLimit() {
44
- return this.limit;
45
- }
46
- /**
47
- * Read the limit
48
- * @param ctx
49
- */
50
- visitLimitExpression(ctx) {
51
- this.limit = this.visitIntegerLiteral(ctx.getChild(1));
52
- }
53
- /**
54
- * Read the offset if provided
55
- * @param ctx
56
- */
57
- visitOffsetExpression(ctx) {
58
- this.offset = this.visitStringLiteral(ctx.getChild(1));
59
- }
60
- /**
61
- * Visit a order field expression
62
- */
63
- visitOrderFieldExpression(ctx) {
64
- return {
65
- field: ctx.getChild(0).text,
66
- direction: ctx.childCount > 1 ? ctx.getChild(1).text : "ASC"
67
- };
68
- }
69
- /**
70
- * Read the order by values
71
- */
72
- visitOrderExpression(ctx) {
73
- this.orderBy = ctx.children
74
- ?.filter(c => c instanceof OrderFieldExpressionContext)
75
- .map((c) => this.visitOrderFieldExpression(c));
76
- }
77
- /**
78
- * Return only AndExpression
79
- * @param ctx
80
- * @returns
81
- */
82
- visitWebdaql(ctx) {
83
- if (ctx.childCount === 1) {
84
- // An empty AND return true
85
- return {
86
- filter: new AndExpression([])
87
- };
88
- }
89
- // To parse offset and limit and order by
90
- for (let i = 1; i < ctx.childCount - 1; i++) {
91
- this.visit(ctx.getChild(i));
92
- }
93
- // If the first element is a sub expression, it means we have a filter
94
- if (ctx.getChild(0) instanceof SubExpressionContext) {
95
- return {
96
- filter: this.visit(ctx.getChild(0).getChild(1)) || new AndExpression([]),
97
- limit: this.limit,
98
- continuationToken: this.offset,
99
- orderBy: this.orderBy
100
- };
101
- }
102
- // Go down one level - if expression empty it means no expression were provided
103
- return {
104
- filter: this.visit(ctx.getChild(0)) || new AndExpression([]),
105
- limit: this.limit,
106
- continuationToken: this.offset,
107
- orderBy: this.orderBy
108
- };
109
- }
110
- /**
111
- * Simplify Logic expression and regroup them
112
- * @param ctx
113
- * @returns
114
- */
115
- getComparison(ctx) {
116
- const res = [];
117
- let [left, _, right] = ctx.children;
118
- if (right instanceof SubExpressionContext) {
119
- right = right.getChild(1);
120
- }
121
- if (left instanceof SubExpressionContext) {
122
- left = left.getChild(1);
123
- }
124
- if (left instanceof ctx.constructor) {
125
- res.push(...this.getComparison(left));
126
- }
127
- else {
128
- res.push(left);
129
- }
130
- if (right instanceof ctx.constructor) {
131
- res.push(...this.getComparison(right));
132
- }
133
- else {
134
- res.push(right);
135
- }
136
- return res;
137
- }
138
- /**
139
- * Get the AndExpression, regrouping all the parameters
140
- *
141
- * By default the parser is doing a AND (b AND (c AND d)) creating 3 depth expressions
142
- * This visitor simplify to a AND b AND c AND d with only one Expression
143
- */
144
- visitAndLogicExpression(ctx) {
145
- return new AndExpression(this.getComparison(ctx).map(c => this.visit(c)));
146
- }
147
- /**
148
- * Implement the BinaryComparison with all methods managed
149
- */
150
- visitBinaryComparisonExpression(ctx) {
151
- const [left, op, right] = ctx.children;
152
- // @ts-ignore
153
- return new ComparisonExpression(op.text, left.text, this.visit(right));
154
- }
155
- /**
156
- * Visit each value of the [..., ..., ...] set
157
- */
158
- visitSetExpression(ctx) {
159
- return ctx.children.filter((_i, id) => id % 2).map(c => this.visit(c));
160
- }
161
- /**
162
- * a LIKE "%A?"
163
- * @param ctx
164
- * @returns
165
- */
166
- visitLikeExpression(ctx) {
167
- const [left, _, right] = ctx.children;
168
- let value = this.visit(right);
169
- return new ComparisonExpression("LIKE", left.text, value);
170
- }
171
- /**
172
- * Map the a IN ['b','c']
173
- */
174
- visitInExpression(ctx) {
175
- const [left, _, right] = ctx.children;
176
- let value = this.visit(right);
177
- return new ComparisonExpression("IN", left.text, value);
178
- }
179
- /**
180
- * Map the a CONTAINS 'b'
181
- */
182
- visitContainsExpression(ctx) {
183
- const [left, _, right] = ctx.children;
184
- let value = this.visit(right);
185
- return new ComparisonExpression("CONTAINS", left.text, value);
186
- }
187
- /**
188
- * Get the OrExpression, regrouping all the parameters
189
- *
190
- * By default the parser is doing a OR (b OR (c OR d)) creating 3 depth expressions
191
- * This visitor simplify to a OR b OR c OR d with only one Expression
192
- */
193
- visitOrLogicExpression(ctx) {
194
- return new OrExpression(this.getComparison(ctx).map(c => this.visit(c)));
195
- }
196
- /**
197
- * Read the string literal (removing the simple or double bracket)
198
- */
199
- visitStringLiteral(ctx) {
200
- return ctx.text.substring(1, ctx.text.length - 1);
201
- }
202
- /**
203
- * Read the boolean literal
204
- */
205
- visitBooleanLiteral(ctx) {
206
- return "TRUE" === ctx.text;
207
- }
208
- /**
209
- * Read the number literal
210
- */
211
- visitIntegerLiteral(ctx) {
212
- return parseInt(ctx.text);
213
- }
214
- }
215
- WebdaQL.ExpressionBuilder = ExpressionBuilder;
216
- /**
217
- * Represent the query expression or subset
218
- */
219
- class Expression {
220
- constructor(operator) {
221
- this.operator = operator;
222
- }
223
- }
224
- WebdaQL.Expression = Expression;
225
- /**
226
- * Comparison expression
227
- */
228
- class ComparisonExpression extends Expression {
229
- /**
230
- *
231
- * @param operator of the expression
232
- * @param attribute of the object to read
233
- * @param value
234
- */
235
- constructor(operator, attribute, value) {
236
- super(operator);
237
- this.value = value;
238
- this.attribute = attribute.split(".");
239
- }
240
- static likeToRegex(like) {
241
- return new RegExp(like
242
- // Prevent common regexp chars
243
- .replace(/\?/g, "\\?")
244
- .replace(/\[/g, "\\[")
245
- .replace(/\{/g, "\\{")
246
- .replace(/\(/g, "\\(")
247
- // Update % and _ to match regex version
248
- .replace(/([^\\])_/g, "$1.{1}")
249
- .replace(/^_/g, ".{1}")
250
- .replace(/\\_/g, "_")
251
- .replace(/([^\\])%/g, "$1.*")
252
- .replace(/^%/g, ".*")
253
- .replace(/\\%/g, "%")
254
- // Replace backslash aswell
255
- .replace(/\\([^?[{(])/g, "\\\\"));
256
- }
257
- /**
258
- * Read the value from the object
259
- *
260
- * @param target
261
- * @returns
262
- */
263
- static getAttributeValue(target, attribute) {
264
- let res = target;
265
- for (let i = 0; res && i < attribute.length; i++) {
266
- res = res[attribute[i]];
267
- }
268
- return res;
269
- }
270
- /**
271
- * Set the value of the attribute based on the assignment
272
- *
273
- * If used as a Set expression
274
- * @param target
275
- */
276
- setAttributeValue(target) {
277
- var _a;
278
- // Avoid alteration of prototype for security reason
279
- if (this.attribute.includes("__proto__")) {
280
- return;
281
- }
282
- if (this.operator === "=") {
283
- let res = target;
284
- for (let i = 0; res && i < this.attribute.length - 1; i++) {
285
- res[_a = this.attribute[i]] ?? (res[_a] = {});
286
- res = res[this.attribute[i]];
287
- }
288
- res[this.attribute[this.attribute.length - 1]] = this.value;
289
- }
290
- }
291
- /**
292
- * @override
293
- */
294
- eval(target) {
295
- const left = ComparisonExpression.getAttributeValue(target, this.attribute);
296
- switch (this.operator) {
297
- case "=":
298
- // ignore strong type on purpose
299
- return left == this.value;
300
- case "<=":
301
- return left <= this.value;
302
- case ">=":
303
- return left >= this.value;
304
- case "<":
305
- return left < this.value;
306
- case ">":
307
- return left > this.value;
308
- case "!=":
309
- return left != this.value;
310
- case "LIKE":
311
- if (typeof left === "string") {
312
- // Grammar definie value as stringLiteral
313
- return left.match(ComparisonExpression.likeToRegex(this.value)) !== null;
314
- }
315
- return left.toString().match(ComparisonExpression.likeToRegex(this.value)) !== null;
316
- case "IN":
317
- return this.value.includes(left);
318
- case "CONTAINS":
319
- if (Array.isArray(left)) {
320
- return left.includes(this.value);
321
- }
322
- return false;
323
- }
324
- }
325
- /**
326
- * Return a string represantation of a value
327
- */
328
- toStringValue(value) {
329
- if (Array.isArray(value)) {
330
- return `[${value.map(v => this.toStringValue(v)).join(", ")}]`;
331
- }
332
- switch (typeof value) {
333
- case "string":
334
- return `"${value}"`;
335
- case "boolean":
336
- return value.toString().toUpperCase();
337
- }
338
- return value?.toString();
339
- }
340
- /**
341
- * Allow subclass to create different display
342
- */
343
- toStringAttribute() {
344
- return this.attribute.join(".");
345
- }
346
- /**
347
- * Allow subclass to create different display
348
- */
349
- toStringOperator() {
350
- return this.operator;
351
- }
352
- /**
353
- * @override
354
- */
355
- toString() {
356
- return `${this.toStringAttribute()} ${this.toStringOperator()} ${this.toStringValue(this.value)}`;
357
- }
358
- }
359
- WebdaQL.ComparisonExpression = ComparisonExpression;
360
- /**
361
- * Abstract logic expression (AND|OR)
362
- *
363
- * Could add XOR in the future
364
- */
365
- class LogicalExpression extends Expression {
366
- /**
367
- *
368
- * @param operator
369
- * @param children
370
- */
371
- constructor(operator, children) {
372
- super(operator);
373
- /**
374
- * Contains the members of the logical expression
375
- */
376
- this.children = [];
377
- this.children = children;
378
- }
379
- /**
380
- * @override
381
- */
382
- toString(depth = 0) {
383
- if (depth) {
384
- return "( " + this.children.map(c => c.toString(depth + 1)).join(` ${this.operator} `) + " )";
385
- }
386
- return this.children.map(c => c.toString(depth + 1)).join(` ${this.operator} `);
387
- }
388
- }
389
- WebdaQL.LogicalExpression = LogicalExpression;
390
- /**
391
- * AND Expression implementation
392
- */
393
- class AndExpression extends LogicalExpression {
394
- /**
395
- * @param children Expressions to use for AND
396
- */
397
- constructor(children) {
398
- super("AND", children);
399
- }
400
- /**
401
- * @override
402
- */
403
- eval(target) {
404
- for (let child of this.children) {
405
- if (!child.eval(target)) {
406
- return false;
407
- }
408
- }
409
- return true;
410
- }
411
- }
412
- WebdaQL.AndExpression = AndExpression;
413
- /**
414
- * OR Expression implementation
415
- */
416
- class OrExpression extends LogicalExpression {
417
- /**
418
- * @param children Expressions to use for OR
419
- */
420
- constructor(children) {
421
- super("OR", children);
422
- }
423
- /**
424
- * @override
425
- */
426
- eval(target) {
427
- for (let child of this.children) {
428
- if (child.eval(target)) {
429
- return true;
430
- }
431
- }
432
- return this.children.length === 0;
433
- }
434
- }
435
- WebdaQL.OrExpression = OrExpression;
436
- /**
437
- *
438
- */
439
- class QueryValidator {
440
- constructor(sql, builder = new ExpressionBuilder()) {
441
- this.sql = sql;
442
- this.lexer = new WebdaQLLexer(CharStreams.fromString(sql || ""));
443
- let tokenStream = new CommonTokenStream(this.lexer);
444
- let parser = new WebdaQLParserParser(tokenStream);
445
- parser.removeErrorListeners();
446
- parser.addErrorListener({
447
- syntaxError: (_recognizer, _offendingSymbol, _line, _charPositionInLine, msg, _e) => {
448
- throw new SyntaxError(`${msg} (Query: ${sql})`);
449
- }
450
- });
451
- // Parse the input, where `compilationUnit` is whatever entry point you defined
452
- this.tree = parser.webdaql();
453
- this.builder = builder;
454
- this.query = this.builder.visit(this.tree);
455
- }
456
- hasCondition() {
457
- const filter = this.query.filter;
458
- const isAnd = filter instanceof AndExpression;
459
- if (isAnd) {
460
- return filter.children.length > 0;
461
- }
462
- return true;
463
- }
464
- toString() {
465
- let res = this.query.filter.toString();
466
- if (this.query.orderBy) {
467
- res += ` ORDER BY ${this.query.orderBy.map(o => `${o.field} ${o.direction}`).join(", ")}`;
468
- }
469
- if (this.query.limit) {
470
- res += ` LIMIT ${this.query.limit}`;
471
- }
472
- if (this.query.continuationToken) {
473
- res += ` OFFSET "${this.query.continuationToken}"`;
474
- }
475
- return res.trim();
476
- }
477
- merge(query, type = "AND") {
478
- var _a;
479
- const adds = new QueryValidator(query);
480
- // Add additional conditions
481
- if (adds.hasCondition()) {
482
- if ((this.query.filter instanceof AndExpression && type === "AND") ||
483
- (this.query.filter instanceof OrExpression && type === "OR")) {
484
- this.query.filter.children.push(adds.query.filter);
485
- }
486
- else {
487
- this.query.filter = new (type === "AND" ? AndExpression : OrExpression)([
488
- this.query.filter,
489
- adds.query.filter
490
- ]);
491
- }
492
- }
493
- // Set the limit if overriden
494
- if (adds.query.limit) {
495
- this.query.limit = adds.query.limit;
496
- }
497
- // Set the offset if overriden
498
- if (adds.query.continuationToken) {
499
- this.query.continuationToken = adds.query.continuationToken;
500
- }
501
- // Add the order by if overriden
502
- if (adds.query.orderBy) {
503
- const fields = adds.query.orderBy.map(o => o.field);
504
- (_a = this.query).orderBy ?? (_a.orderBy = []);
505
- // Remove the fields that are already in the query
506
- this.query.orderBy = [...adds.query.orderBy, ...this.query.orderBy.filter(o => !fields.includes(o.field))];
507
- }
508
- return this;
509
- }
510
- /**
511
- * Get offset
512
- * @returns
513
- */
514
- getOffset() {
515
- return this.builder.getOffset() || "";
516
- }
517
- /**
518
- * Get limit
519
- * @returns
520
- */
521
- getLimit() {
522
- return this.builder.getLimit() || 1000;
523
- }
524
- /**
525
- * Get the expression by itself
526
- * @returns
527
- */
528
- getExpression() {
529
- return this.query.filter;
530
- }
531
- /**
532
- * Retrieve parsed query
533
- * @returns
534
- */
535
- getQuery() {
536
- return {
537
- ...this.query,
538
- // Use displayTree to get the truely executed query
539
- toString: () => this.displayTree()
540
- };
541
- }
542
- /**
543
- * Verify if a target fit the expression
544
- * @param target
545
- * @returns
546
- */
547
- eval(target) {
548
- return this.query.filter.eval(target);
549
- }
550
- /**
551
- * Display parse tree back as query
552
- * @param tree
553
- * @returns
554
- */
555
- displayTree(tree = this.tree) {
556
- let res = "";
557
- for (let i = 0; i < tree.childCount; i++) {
558
- const child = tree.getChild(i);
559
- if (child instanceof TerminalNode) {
560
- if (child.text === "<EOF>") {
561
- continue;
562
- }
563
- res += child.text.trim() + " ";
564
- }
565
- else {
566
- res += this.displayTree(child).trim() + " ";
567
- }
568
- }
569
- return res;
570
- }
571
- }
572
- WebdaQL.QueryValidator = QueryValidator;
573
- /**
574
- * For now reuse same parser
575
- */
576
- class SetterValidator extends QueryValidator {
577
- constructor(sql) {
578
- super(sql);
579
- // Do one empty run to raise any issue with disallowed expression
580
- this.eval({});
581
- }
582
- eval(target) {
583
- if (this.query.filter) {
584
- this.assign(target, this.query.filter);
585
- }
586
- return true;
587
- }
588
- assign(target, expression) {
589
- if (expression instanceof AndExpression) {
590
- expression.children.forEach(c => this.assign(target, c));
591
- }
592
- else if (expression instanceof ComparisonExpression && expression.operator === "=") {
593
- expression.setAttributeValue(target);
594
- }
595
- else {
596
- throw new SyntaxError(`Set Expression can only contain And and assignment expression '='`);
597
- }
598
- }
599
- }
600
- WebdaQL.SetterValidator = SetterValidator;
601
- class PartialValidator extends QueryValidator {
602
- constructor(query, builder = new PartialExpressionBuilder()) {
603
- super(query, builder);
604
- }
605
- /**
606
- * Eval the query
607
- * @param target
608
- * @param partial
609
- * @returns
610
- */
611
- eval(target, partial = true) {
612
- this.builder.setPartial(partial);
613
- this.builder.setPartialMatch(false);
614
- return this.query.filter.eval(target);
615
- }
616
- /**
617
- * Return if the result ignored some fields
618
- * @returns
619
- */
620
- wasPartialMatch() {
621
- return this.builder.partialMatch;
622
- }
623
- }
624
- WebdaQL.PartialValidator = PartialValidator;
625
- class PartialComparisonExpression extends ComparisonExpression {
626
- constructor(builder, op, attribute, value) {
627
- super(op, attribute, value);
628
- this.builder = builder;
629
- }
630
- /**
631
- * Override the eval to check if the attribute is present
632
- * if not and we are in partial mode, return true
633
- *
634
- * @param target
635
- * @returns
636
- */
637
- eval(target) {
638
- if (this.builder.partial) {
639
- const left = ComparisonExpression.getAttributeValue(target, this.attribute);
640
- if (left === undefined) {
641
- this.builder.setPartialMatch(true);
642
- return true;
643
- }
644
- }
645
- return super.eval(target);
646
- }
647
- }
648
- WebdaQL.PartialComparisonExpression = PartialComparisonExpression;
649
- class PartialExpressionBuilder extends ExpressionBuilder {
650
- setPartial(partial) {
651
- this.partial = partial;
652
- }
653
- setPartialMatch(partial) {
654
- this.partialMatch = partial;
655
- }
656
- /**
657
- * a LIKE "%A?"
658
- * @param ctx
659
- * @returns
660
- */
661
- visitLikeExpression(ctx) {
662
- const [left, _, right] = ctx.children;
663
- let value = this.visit(right);
664
- return new PartialComparisonExpression(this, "LIKE", left.text, value);
665
- }
666
- /**
667
- * Implement the BinaryComparison with all methods managed
668
- */
669
- visitBinaryComparisonExpression(ctx) {
670
- const [left, op, right] = ctx.children;
671
- // @ts-ignore
672
- return new PartialComparisonExpression(this, op.text, left.text, this.visit(right));
673
- }
674
- /**
675
- * Map the a IN ['b','c']
676
- */
677
- visitInExpression(ctx) {
678
- const [left, _, right] = ctx.children;
679
- let value = this.visit(right);
680
- return new PartialComparisonExpression(this, "IN", left.text, value);
681
- }
682
- /**
683
- * Map the a CONTAINS 'b'
684
- */
685
- visitContainsExpression(ctx) {
686
- const [left, _, right] = ctx.children;
687
- let value = this.visit(right);
688
- return new PartialComparisonExpression(this, "CONTAINS", left.text, value);
689
- }
690
- }
691
- WebdaQL.PartialExpressionBuilder = PartialExpressionBuilder;
692
- /**
693
- * Remove artifact from sanitize-html inside query
694
- * @param query
695
- * @returns
696
- */
697
- function unsanitize(query) {
698
- return query.replace(/&lt;/g, "<").replace(/&gt;/g, ">");
699
- }
700
- WebdaQL.unsanitize = unsanitize;
701
- })(WebdaQL || (WebdaQL = {}));
702
- //# sourceMappingURL=query.js.map