@kalisio/kdk 2.3.2 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/.eslintignore +2 -1
  2. package/.github/workflows/main.yaml +3 -3
  3. package/README.md +1 -0
  4. package/core/api/db.js +6 -1
  5. package/core/api/hooks/hooks.model.js +1 -1
  6. package/core/api/hooks/hooks.schemas.js +0 -2
  7. package/core/api/models/messages.model.mongodb.js +13 -0
  8. package/core/api/services/authorisations/authorisations.service.js +13 -4
  9. package/core/api/services/index.js +19 -0
  10. package/core/api/services/messages/messages.hooks.js +38 -0
  11. package/core/client/api.js +7 -32
  12. package/core/client/capabilities.js +2 -2
  13. package/core/client/components/KActivity.vue +29 -6
  14. package/core/client/components/KContent.vue +2 -2
  15. package/core/client/components/KDialog.vue +4 -7
  16. package/core/client/components/KStamp.vue +3 -9
  17. package/core/client/components/KStore.vue +2 -4
  18. package/core/client/components/KTab.vue +95 -0
  19. package/core/client/components/action/KAction.vue +15 -2
  20. package/core/client/components/action/KBugReportAction.vue +4 -2
  21. package/core/client/components/action/KToggleFullscreenAction.vue +25 -0
  22. package/core/client/components/app/KSettings.vue +17 -13
  23. package/core/client/components/chart/KDataTable.vue +6 -9
  24. package/core/client/components/chart/KTimeSeriesChart.vue +62 -49
  25. package/core/client/components/collection/KBoard.vue +22 -33
  26. package/core/client/components/collection/KCard.vue +71 -56
  27. package/core/client/components/collection/KCardSection.vue +20 -10
  28. package/core/client/components/collection/KDescriptionCardSection.vue +47 -0
  29. package/core/client/components/collection/KGrid.vue +234 -54
  30. package/core/client/components/collection/KScrollDown.vue +97 -0
  31. package/core/client/components/collection/KScrollToTop.vue +93 -0
  32. package/core/client/components/collection/KTable.vue +87 -33
  33. package/core/client/components/collection/KTimeLine.vue +406 -0
  34. package/core/client/components/collection/index.js +1 -5
  35. package/core/client/components/document/KDocument.vue +20 -55
  36. package/core/client/components/document/KHtml.vue +17 -7
  37. package/core/client/components/document/KImage.vue +78 -0
  38. package/core/client/components/document/KMarkdown.vue +12 -16
  39. package/core/client/components/document/KPdf.vue +69 -0
  40. package/core/client/components/form/KFileField.vue +2 -2
  41. package/core/client/components/form/KSelectField.vue +2 -1
  42. package/core/client/components/form/KUnitField.vue +3 -1
  43. package/core/client/components/layout/KFab.vue +9 -10
  44. package/core/client/components/layout/KLayout.vue +104 -6
  45. package/core/client/components/layout/KOpener.vue +14 -19
  46. package/core/client/components/layout/KPage.vue +195 -105
  47. package/core/client/components/layout/KWindow.vue +54 -32
  48. package/core/client/components/layout/index.js +0 -2
  49. package/core/client/components/media/KRibbon.vue +95 -0
  50. package/core/client/components/menu/KMenu.vue +4 -4
  51. package/core/client/components/team/KGroupsActivity.vue +25 -27
  52. package/core/client/components/team/KMembersActivity.vue +21 -23
  53. package/core/client/components/team/KOrganisationsActivity.vue +20 -22
  54. package/core/client/components/team/KTagsActivity.vue +21 -23
  55. package/core/client/components/time/KAbsoluteTimeRange.vue +70 -170
  56. package/core/client/composables/activity.js +14 -12
  57. package/core/client/composables/collection.js +3 -1
  58. package/core/client/composables/counter.js +51 -0
  59. package/core/client/composables/index.js +3 -0
  60. package/core/client/composables/layout.js +13 -2
  61. package/core/client/composables/messages.js +15 -0
  62. package/core/client/composables/pwa.js +1 -1
  63. package/core/client/composables/schema.js +6 -6
  64. package/core/client/composables/screen.js +23 -0
  65. package/core/client/directives/index.js +1 -0
  66. package/core/client/directives/v-hover.js +23 -0
  67. package/core/client/document.js +61 -0
  68. package/core/client/exporter.js +1 -1
  69. package/core/client/filter.js +0 -1
  70. package/core/client/guards.js +1 -1
  71. package/core/client/i18n/core_en.json +14 -8
  72. package/core/client/i18n/core_fr.json +15 -9
  73. package/core/client/index.js +9 -3
  74. package/core/client/layout.js +129 -29
  75. package/core/client/local-storage.js +1 -1
  76. package/core/client/mixins/index.js +0 -1
  77. package/core/client/mixins/mixin.base-activity.js +23 -13
  78. package/core/client/mixins/mixin.base-item.js +6 -3
  79. package/core/client/services/index.js +4 -1
  80. package/core/client/services/local-settings.service.js +4 -0
  81. package/core/client/storage.js +1 -1
  82. package/core/client/store.js +1 -1
  83. package/core/client/template-context.js +17 -0
  84. package/core/client/units.js +49 -27
  85. package/core/client/utils/index.js +3 -2
  86. package/core/client/utils/utils.actions.js +4 -0
  87. package/core/client/utils/utils.colors.js +155 -2
  88. package/core/client/utils/utils.items.js +26 -0
  89. package/core/client/utils/utils.math.js +3 -0
  90. package/core/client/utils/utils.platform.js +3 -1
  91. package/core/client/utils/utils.screen.js +82 -0
  92. package/core/client/utils/utils.time.js +0 -1
  93. package/core/common/schemas/settings.update.json +12 -0
  94. package/coverage/base.css +224 -0
  95. package/coverage/block-navigation.js +87 -0
  96. package/coverage/core/api/application.js.html +1870 -0
  97. package/coverage/core/api/authentication.js.html +742 -0
  98. package/coverage/core/api/db.js.html +793 -0
  99. package/coverage/core/api/hooks/hooks.authentication.js.html +313 -0
  100. package/coverage/core/api/hooks/hooks.authorisations.js.html +1243 -0
  101. package/coverage/core/api/hooks/hooks.groups.js.html +229 -0
  102. package/coverage/core/api/hooks/hooks.logger.js.html +163 -0
  103. package/coverage/core/api/hooks/hooks.model.js.html +955 -0
  104. package/coverage/core/api/hooks/hooks.organisations.js.html +541 -0
  105. package/coverage/core/api/hooks/hooks.push.js.html +253 -0
  106. package/coverage/core/api/hooks/hooks.query.js.html +862 -0
  107. package/coverage/core/api/hooks/hooks.schemas.js.html +298 -0
  108. package/coverage/core/api/hooks/hooks.service.js.html +319 -0
  109. package/coverage/core/api/hooks/hooks.storage.js.html +193 -0
  110. package/coverage/core/api/hooks/hooks.users.js.html +868 -0
  111. package/coverage/core/api/hooks/index.html +296 -0
  112. package/coverage/core/api/hooks/index.js.html +121 -0
  113. package/coverage/core/api/index.html +191 -0
  114. package/coverage/core/api/index.js.html +148 -0
  115. package/coverage/core/api/marshall.js.html +448 -0
  116. package/coverage/core/api/models/groups.model.mongodb.js.html +109 -0
  117. package/coverage/core/api/models/index.html +176 -0
  118. package/coverage/core/api/models/messages.model.mongodb.js.html +121 -0
  119. package/coverage/core/api/models/organisations.model.mongodb.js.html +94 -0
  120. package/coverage/core/api/models/tags.model.mongodb.js.html +115 -0
  121. package/coverage/core/api/models/users.model.mongodb.js.html +115 -0
  122. package/coverage/core/api/services/account/account.hooks.js.html +208 -0
  123. package/coverage/core/api/services/account/account.service.js.html +436 -0
  124. package/coverage/core/api/services/account/index.html +131 -0
  125. package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
  126. package/coverage/core/api/services/authorisations/authorisations.service.js.html +529 -0
  127. package/coverage/core/api/services/authorisations/index.html +131 -0
  128. package/coverage/core/api/services/databases/databases.hooks.js.html +193 -0
  129. package/coverage/core/api/services/databases/databases.service.js.html +100 -0
  130. package/coverage/core/api/services/databases/index.html +131 -0
  131. package/coverage/core/api/services/groups/groups.hooks.js.html +178 -0
  132. package/coverage/core/api/services/groups/index.html +116 -0
  133. package/coverage/core/api/services/import-export/import-export.hooks.js.html +184 -0
  134. package/coverage/core/api/services/import-export/import-export.service.js.html +118 -0
  135. package/coverage/core/api/services/import-export/index.html +131 -0
  136. package/coverage/core/api/services/index.html +116 -0
  137. package/coverage/core/api/services/index.js.html +556 -0
  138. package/coverage/core/api/services/mailer/index.html +131 -0
  139. package/coverage/core/api/services/mailer/mailer.hooks.js.html +190 -0
  140. package/coverage/core/api/services/mailer/mailer.service.js.html +118 -0
  141. package/coverage/core/api/services/messages/index.html +116 -0
  142. package/coverage/core/api/services/messages/messages.hooks.js.html +199 -0
  143. package/coverage/core/api/services/organisations/index.html +131 -0
  144. package/coverage/core/api/services/organisations/organisations.hooks.js.html +178 -0
  145. package/coverage/core/api/services/organisations/organisations.service.js.html +343 -0
  146. package/coverage/core/api/services/push/index.html +131 -0
  147. package/coverage/core/api/services/push/push.hooks.js.html +190 -0
  148. package/coverage/core/api/services/push/push.service.js.html +121 -0
  149. package/coverage/core/api/services/storage/index.html +131 -0
  150. package/coverage/core/api/services/storage/storage.hooks.js.html +190 -0
  151. package/coverage/core/api/services/storage/storage.service.js.html +172 -0
  152. package/coverage/core/api/services/tags/index.html +116 -0
  153. package/coverage/core/api/services/tags/tags.hooks.js.html +178 -0
  154. package/coverage/core/api/services/users/index.html +116 -0
  155. package/coverage/core/api/services/users/users.hooks.js.html +307 -0
  156. package/coverage/core/api/utils.js.html +118 -0
  157. package/coverage/core/common/errors.js.html +88 -0
  158. package/coverage/core/common/index.html +176 -0
  159. package/coverage/core/common/index.js.html +115 -0
  160. package/coverage/core/common/permissions.js.html +1048 -0
  161. package/coverage/core/common/schema.js.html +190 -0
  162. package/coverage/core/common/utils.js.html +220 -0
  163. package/coverage/favicon.png +0 -0
  164. package/coverage/index.html +506 -0
  165. package/coverage/lcov-report/base.css +224 -0
  166. package/coverage/lcov-report/block-navigation.js +87 -0
  167. package/coverage/lcov-report/core/api/application.js.html +1870 -0
  168. package/coverage/lcov-report/core/api/authentication.js.html +742 -0
  169. package/coverage/lcov-report/core/api/db.js.html +793 -0
  170. package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +313 -0
  171. package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +1243 -0
  172. package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +229 -0
  173. package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +163 -0
  174. package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +955 -0
  175. package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +541 -0
  176. package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +253 -0
  177. package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +862 -0
  178. package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +298 -0
  179. package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +319 -0
  180. package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +193 -0
  181. package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +868 -0
  182. package/coverage/lcov-report/core/api/hooks/index.html +296 -0
  183. package/coverage/lcov-report/core/api/hooks/index.js.html +121 -0
  184. package/coverage/lcov-report/core/api/index.html +191 -0
  185. package/coverage/lcov-report/core/api/index.js.html +148 -0
  186. package/coverage/lcov-report/core/api/marshall.js.html +448 -0
  187. package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +109 -0
  188. package/coverage/lcov-report/core/api/models/index.html +176 -0
  189. package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +121 -0
  190. package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +94 -0
  191. package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +115 -0
  192. package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +115 -0
  193. package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +208 -0
  194. package/coverage/lcov-report/core/api/services/account/account.service.js.html +436 -0
  195. package/coverage/lcov-report/core/api/services/account/index.html +131 -0
  196. package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
  197. package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +529 -0
  198. package/coverage/lcov-report/core/api/services/authorisations/index.html +131 -0
  199. package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +193 -0
  200. package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +100 -0
  201. package/coverage/lcov-report/core/api/services/databases/index.html +131 -0
  202. package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +178 -0
  203. package/coverage/lcov-report/core/api/services/groups/index.html +116 -0
  204. package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +184 -0
  205. package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +118 -0
  206. package/coverage/lcov-report/core/api/services/import-export/index.html +131 -0
  207. package/coverage/lcov-report/core/api/services/index.html +116 -0
  208. package/coverage/lcov-report/core/api/services/index.js.html +556 -0
  209. package/coverage/lcov-report/core/api/services/mailer/index.html +131 -0
  210. package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +190 -0
  211. package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +118 -0
  212. package/coverage/lcov-report/core/api/services/messages/index.html +116 -0
  213. package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +199 -0
  214. package/coverage/lcov-report/core/api/services/organisations/index.html +131 -0
  215. package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +178 -0
  216. package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +343 -0
  217. package/coverage/lcov-report/core/api/services/push/index.html +131 -0
  218. package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +190 -0
  219. package/coverage/lcov-report/core/api/services/push/push.service.js.html +121 -0
  220. package/coverage/lcov-report/core/api/services/storage/index.html +131 -0
  221. package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +190 -0
  222. package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +172 -0
  223. package/coverage/lcov-report/core/api/services/tags/index.html +116 -0
  224. package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +178 -0
  225. package/coverage/lcov-report/core/api/services/users/index.html +116 -0
  226. package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +307 -0
  227. package/coverage/lcov-report/core/api/utils.js.html +118 -0
  228. package/coverage/lcov-report/core/common/errors.js.html +88 -0
  229. package/coverage/lcov-report/core/common/index.html +176 -0
  230. package/coverage/lcov-report/core/common/index.js.html +115 -0
  231. package/coverage/lcov-report/core/common/permissions.js.html +1048 -0
  232. package/coverage/lcov-report/core/common/schema.js.html +190 -0
  233. package/coverage/lcov-report/core/common/utils.js.html +220 -0
  234. package/coverage/lcov-report/favicon.png +0 -0
  235. package/coverage/lcov-report/index.html +506 -0
  236. package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +457 -0
  237. package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +397 -0
  238. package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +1309 -0
  239. package/coverage/lcov-report/map/api/hooks/index.html +161 -0
  240. package/coverage/lcov-report/map/api/hooks/index.js.html +94 -0
  241. package/coverage/lcov-report/map/api/index.html +131 -0
  242. package/coverage/lcov-report/map/api/index.js.html +139 -0
  243. package/coverage/lcov-report/map/api/marshall.js.html +178 -0
  244. package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +106 -0
  245. package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +127 -0
  246. package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +196 -0
  247. package/coverage/lcov-report/map/api/models/index.html +161 -0
  248. package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +109 -0
  249. package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +274 -0
  250. package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +610 -0
  251. package/coverage/lcov-report/map/api/services/alerts/index.html +131 -0
  252. package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +310 -0
  253. package/coverage/lcov-report/map/api/services/catalog/index.html +116 -0
  254. package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1510 -0
  255. package/coverage/lcov-report/map/api/services/daptiles/index.html +116 -0
  256. package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +241 -0
  257. package/coverage/lcov-report/map/api/services/features/features.service.js.html +241 -0
  258. package/coverage/lcov-report/map/api/services/features/index.html +131 -0
  259. package/coverage/lcov-report/map/api/services/index.html +116 -0
  260. package/coverage/lcov-report/map/api/services/index.js.html +817 -0
  261. package/coverage/lcov-report/map/api/services/projects/index.html +116 -0
  262. package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +439 -0
  263. package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +466 -0
  264. package/coverage/lcov-report/map/common/errors.js.html +94 -0
  265. package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +541 -0
  266. package/coverage/lcov-report/map/common/grid.js.html +1612 -0
  267. package/coverage/lcov-report/map/common/index.html +371 -0
  268. package/coverage/lcov-report/map/common/index.js.html +172 -0
  269. package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +556 -0
  270. package/coverage/lcov-report/map/common/moment-utils.js.html +157 -0
  271. package/coverage/lcov-report/map/common/opendap-grid-source.js.html +868 -0
  272. package/coverage/lcov-report/map/common/opendap-utils.js.html +826 -0
  273. package/coverage/lcov-report/map/common/permissions.js.html +124 -0
  274. package/coverage/lcov-report/map/common/time-based-grid-source.js.html +418 -0
  275. package/coverage/lcov-report/map/common/tms-utils.js.html +274 -0
  276. package/coverage/lcov-report/map/common/wcs-grid-source.js.html +364 -0
  277. package/coverage/lcov-report/map/common/wcs-utils.js.html +586 -0
  278. package/coverage/lcov-report/map/common/weacast-grid-source.js.html +1033 -0
  279. package/coverage/lcov-report/map/common/wfs-utils.js.html +574 -0
  280. package/coverage/lcov-report/map/common/wms-utils.js.html +451 -0
  281. package/coverage/lcov-report/map/common/wmts-utils.js.html +547 -0
  282. package/coverage/lcov-report/prettify.css +1 -0
  283. package/coverage/lcov-report/prettify.js +2 -0
  284. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  285. package/coverage/lcov-report/sorter.js +196 -0
  286. package/coverage/lcov.info +11245 -0
  287. package/coverage/map/api/hooks/hooks.catalog.js.html +457 -0
  288. package/coverage/map/api/hooks/hooks.features.js.html +397 -0
  289. package/coverage/map/api/hooks/hooks.query.js.html +1309 -0
  290. package/coverage/map/api/hooks/index.html +161 -0
  291. package/coverage/map/api/hooks/index.js.html +94 -0
  292. package/coverage/map/api/index.html +131 -0
  293. package/coverage/map/api/index.js.html +139 -0
  294. package/coverage/map/api/marshall.js.html +178 -0
  295. package/coverage/map/api/models/alerts.model.mongodb.js.html +106 -0
  296. package/coverage/map/api/models/catalog.model.mongodb.js.html +127 -0
  297. package/coverage/map/api/models/features.model.mongodb.js.html +196 -0
  298. package/coverage/map/api/models/index.html +161 -0
  299. package/coverage/map/api/models/projects.model.mongodb.js.html +109 -0
  300. package/coverage/map/api/services/alerts/alerts.hooks.js.html +274 -0
  301. package/coverage/map/api/services/alerts/alerts.service.js.html +610 -0
  302. package/coverage/map/api/services/alerts/index.html +131 -0
  303. package/coverage/map/api/services/catalog/catalog.hooks.js.html +310 -0
  304. package/coverage/map/api/services/catalog/index.html +116 -0
  305. package/coverage/map/api/services/daptiles/daptiles.service.js.html +1510 -0
  306. package/coverage/map/api/services/daptiles/index.html +116 -0
  307. package/coverage/map/api/services/features/features.hooks.js.html +241 -0
  308. package/coverage/map/api/services/features/features.service.js.html +241 -0
  309. package/coverage/map/api/services/features/index.html +131 -0
  310. package/coverage/map/api/services/index.html +116 -0
  311. package/coverage/map/api/services/index.js.html +817 -0
  312. package/coverage/map/api/services/projects/index.html +116 -0
  313. package/coverage/map/api/services/projects/projects.hooks.js.html +439 -0
  314. package/coverage/map/common/dynamic-grid-source.js.html +466 -0
  315. package/coverage/map/common/errors.js.html +94 -0
  316. package/coverage/map/common/geotiff-grid-source.js.html +541 -0
  317. package/coverage/map/common/grid.js.html +1612 -0
  318. package/coverage/map/common/index.html +371 -0
  319. package/coverage/map/common/index.js.html +172 -0
  320. package/coverage/map/common/meteo-model-grid-source.js.html +556 -0
  321. package/coverage/map/common/moment-utils.js.html +157 -0
  322. package/coverage/map/common/opendap-grid-source.js.html +868 -0
  323. package/coverage/map/common/opendap-utils.js.html +826 -0
  324. package/coverage/map/common/permissions.js.html +124 -0
  325. package/coverage/map/common/time-based-grid-source.js.html +418 -0
  326. package/coverage/map/common/tms-utils.js.html +274 -0
  327. package/coverage/map/common/wcs-grid-source.js.html +364 -0
  328. package/coverage/map/common/wcs-utils.js.html +586 -0
  329. package/coverage/map/common/weacast-grid-source.js.html +1033 -0
  330. package/coverage/map/common/wfs-utils.js.html +574 -0
  331. package/coverage/map/common/wms-utils.js.html +451 -0
  332. package/coverage/map/common/wmts-utils.js.html +547 -0
  333. package/coverage/prettify.css +1 -0
  334. package/coverage/prettify.js +2 -0
  335. package/coverage/sort-arrow-sprite.png +0 -0
  336. package/coverage/sorter.js +196 -0
  337. package/coverage/tmp/coverage-280506-1731704745613-0.json +1 -0
  338. package/coverage/tmp/coverage-280518-1731704745599-0.json +1 -0
  339. package/coverage/tmp/coverage-280529-1731704745588-0.json +1 -0
  340. package/coverage/tmp/coverage-280541-1731704745574-0.json +1 -0
  341. package/coverage/tmp/coverage-280548-1731704745545-0.json +1 -0
  342. package/extras/css/core.variables.scss +32 -8
  343. package/extras/icons/attribution.png +0 -0
  344. package/map/api/services/catalog/catalog.hooks.js +5 -7
  345. package/map/api/services/features/features.hooks.js +1 -1
  346. package/map/client/cesium/utils/utils.style.js +11 -2
  347. package/map/client/components/KAttribution.vue +108 -0
  348. package/map/client/components/KPositionIndicator.vue +11 -18
  349. package/map/client/components/KProjectMenu.vue +4 -4
  350. package/map/client/components/catalog/KCategoryItem.vue +74 -0
  351. package/map/client/components/catalog/KLayerCategories.vue +24 -12
  352. package/map/client/components/catalog/KLayersPanel.vue +139 -116
  353. package/map/client/components/catalog/KProjectSelector.vue +29 -17
  354. package/map/client/components/catalog/KProjectsPanel.vue +19 -35
  355. package/map/client/components/catalog/KViewSelector.vue +37 -25
  356. package/map/client/components/catalog/KViewsPanel.vue +19 -35
  357. package/map/client/components/form/KLocationField.vue +1 -2
  358. package/map/client/components/legend/KLegend.vue +34 -34
  359. package/map/client/components/location/KLocationCardSection.vue +18 -22
  360. package/map/client/components/location/KLocationMap.vue +36 -38
  361. package/map/client/components/location/KLocationTimeLineCard.vue +147 -0
  362. package/map/client/components/location/KLocationTip.vue +12 -2
  363. package/map/client/components/widget/KInformationBox.vue +0 -4
  364. package/map/client/components/widget/KStackableTimeSeries.vue +8 -1
  365. package/map/client/components/widget/KTimeSeries.vue +1 -1
  366. package/map/client/composables/highlight.js +29 -31
  367. package/map/client/composables/probe.js +7 -3
  368. package/map/client/composables/weather.js +71 -31
  369. package/map/client/i18n/map_en.json +3 -0
  370. package/map/client/i18n/map_fr.json +3 -0
  371. package/map/client/init.js +4 -3
  372. package/map/client/leaflet/ShapeMarker.js +1 -1
  373. package/map/client/leaflet/utils/utils.events.js +1 -1
  374. package/map/client/leaflet/utils/utils.style.js +20 -8
  375. package/map/client/mixins/globe/mixin.base-globe.js +111 -13
  376. package/map/client/mixins/globe/mixin.file-layers.js +10 -10
  377. package/map/client/mixins/globe/mixin.geojson-layers.js +90 -15
  378. package/map/client/mixins/globe/mixin.style.js +2 -0
  379. package/map/client/mixins/index.js +0 -1
  380. package/map/client/mixins/map/index.js +1 -0
  381. package/map/client/mixins/map/mixin.base-map.js +21 -2
  382. package/map/client/mixins/map/mixin.canvas-layers.js +7 -2
  383. package/map/client/mixins/map/mixin.edit-layers.js +12 -4
  384. package/map/client/mixins/map/mixin.file-layers.js +3 -0
  385. package/map/client/mixins/map/mixin.geojson-layers.js +90 -5
  386. package/map/client/mixins/map/mixin.pmtiles-layers.js +106 -0
  387. package/map/client/mixins/mixin.activity.js +8 -3
  388. package/map/client/mixins/mixin.feature-service.js +73 -32
  389. package/map/client/mixins/mixin.levels.js +1 -0
  390. package/map/client/mixins/mixin.weacast.js +10 -87
  391. package/map/client/utils/index.js +1 -0
  392. package/map/client/utils/utils.capture.js +1 -1
  393. package/map/client/utils/utils.catalog.js +7 -7
  394. package/map/client/utils/utils.features.js +59 -1
  395. package/map/client/utils/utils.layers.js +8 -0
  396. package/map/client/utils/utils.time-series.js +121 -0
  397. package/map/client/utils/utils.weacast.js +102 -0
  398. package/package.json +6 -6
  399. package/scripts/init_runner.sh +2 -2
  400. package/scripts/kash/CHANGELOG.md +12 -0
  401. package/scripts/kash/README.md +2 -0
  402. package/scripts/kash/kash.sh +34 -32
  403. package/scripts/run_tests.sh +2 -2
  404. package/scripts/setup_workspace.sh +24 -6
  405. package/test/api/core/hooks.test.js +6 -3
  406. package/test/api/core/test-log-2023-12-19.log +7 -0
  407. package/test/api/core/test-log-2024-01-04.log +14 -0
  408. package/test/api/core/test-log-2024-05-14.log +6 -0
  409. package/test/api/core/{test-log-2024-04-23.log → test-log-2024-06-06.log} +3 -3
  410. package/test/api/core/test-log-2024-06-26.log +25 -0
  411. package/test/api/core/test-log-2024-06-28.log +2 -0
  412. package/test/api/core/test-log-2024-07-09.log +0 -0
  413. package/test/api/core/test-log-2024-08-13.log +69 -0
  414. package/test/api/core/test-log-2024-10-28.log +53 -0
  415. package/test/api/core/test-log-2024-11-05.log +30 -0
  416. package/test/api/core/test-log-2024-11-15.log +23 -0
  417. package/test/api/map/alerts.test.js +3 -1
  418. package/test/api/map/config/layers.json +3 -1
  419. package/test/api/map/index.test.js +18 -1
  420. package/test/api/map/test-log-2023-11-24.log +121 -0
  421. package/test/api/map/test-log-2023-12-12.log +29 -0
  422. package/test/api/map/test-log-2023-12-13.log +5 -0
  423. package/test/api/map/test-log-2024-01-04.log +2 -0
  424. package/test/api/map/test-log-2024-01-11.log +1 -0
  425. package/test/api/map/test-log-2024-01-25.log +19 -0
  426. package/test/api/map/test-log-2024-06-06.log +39 -0
  427. package/test/api/map/test-log-2024-08-13.log +13 -0
  428. package/test/api/map/test-log-2024-08-20.log +55 -0
  429. package/test/api/map/test-log-2024-09-09.log +92 -0
  430. package/test/api/map/test-log-2024-10-28.log +11 -0
  431. package/test/client/core/utils.js +13 -0
  432. package/test/client/map/api.js +34 -0
  433. package/test/client/map/catalog.js +6 -2
  434. package/test/client/map/index.js +1 -0
  435. package/test/client/map/utils.js +4 -2
  436. package/core/client/components/collection/KList.vue +0 -135
  437. package/core/client/components/layout/KPageSticky.vue +0 -53
  438. package/core/client/mixins/mixin.base-collection.js +0 -162
  439. package/core/client/utils/utils.data.js +0 -22
  440. package/map/client/mixins/mixin.catalog-panel.js +0 -26
  441. package/test/api/core/test-log-2024-04-22.log +0 -84
@@ -0,0 +1,102 @@
1
+ import _ from 'lodash'
2
+ import logger from 'loglevel'
3
+
4
+ export async function getForecastForLocation ({ longitude, latitude, startTime, endTime, forecastModel, forecastLevel, weacastApi }) {
5
+ // Not yet ready
6
+ if (!forecastModel) return
7
+ // From now to last available time
8
+ const geometry = {
9
+ type: 'Point',
10
+ coordinates: [longitude, latitude]
11
+ }
12
+ const query = {
13
+ forecastTime: {
14
+ $gte: startTime.format(),
15
+ $lte: endTime.format()
16
+ },
17
+ geometry: {
18
+ $geoIntersects: {
19
+ $geometry: geometry
20
+ }
21
+ }
22
+ }
23
+ let probedLocation
24
+ try {
25
+ let elements = forecastModel.elements.map(element => element.name)
26
+ // Filter available elements according to current level if any
27
+ if (forecastLevel) elements = elements.filter(element => element.endsWith(forecastLevel.toString()))
28
+ else {
29
+ elements = elements.filter(element => {
30
+ const tokens = element.split('-')
31
+ return (tokens.length === 0) || !_.isFinite(_.toNumber(tokens[tokens.length - 1]))
32
+ })
33
+ }
34
+ const response = await weacastApi.getService('probes')
35
+ .create({
36
+ forecast: forecastModel.name,
37
+ elements
38
+ }, { query })
39
+ if (response.features.length > 0) {
40
+ probedLocation = response.features[0]
41
+ } else throw new Error('Cannot find valid forecast at location')
42
+ } catch (error) {
43
+ logger.error(error)
44
+ }
45
+ return probedLocation
46
+ }
47
+
48
+ export async function getForecastProbe ({ name, forecastModel, weacastApi }) {
49
+ const results = await weacastApi.getService('probes').find({
50
+ query: {
51
+ name,
52
+ forecast: forecastModel.name,
53
+ $paginate: false,
54
+ $select: ['elements', 'forecast', 'featureId']
55
+ }
56
+ })
57
+ if (results.length > 0) {
58
+ const probe = results[0]
59
+ return probe
60
+ } else {
61
+ return null
62
+ }
63
+ }
64
+
65
+ export async function getForecastForFeature ({ probe, featureId, startTime, endTime, forecastModel, forecastLevel, weacastApi }) {
66
+ let probedLocation
67
+ try {
68
+ let elements = forecastModel.elements.map(element => element.name)
69
+ // Filter available elements according to current level if any
70
+ if (forecastLevel) {
71
+ elements = elements.filter(element => element.endsWith(forecastLevel.toString()))
72
+ } else {
73
+ elements = elements.filter(element => {
74
+ const tokens = element.split('-')
75
+ return (tokens.length === 0) || !_.isFinite(_.toNumber(tokens[tokens.length - 1]))
76
+ })
77
+ }
78
+ // Need to add derived values for static probes as they are not computed on the fly
79
+ const windDirection = (forecastLevel ? `windDirection-${forecastLevel}` : 'windDirection')
80
+ const windSpeed = (forecastLevel ? `windSpeed-${forecastLevel}` : 'windSpeed')
81
+ elements = elements.concat([windDirection, windSpeed])
82
+
83
+ const results = await weacastApi.getService('probe-results').find({
84
+ query: {
85
+ probeId: probe._id,
86
+ forecastTime: {
87
+ $gte: startTime.format(),
88
+ $lte: endTime.format()
89
+ },
90
+ [probe.featureId]: featureId,
91
+ $groupBy: probe.featureId,
92
+ $aggregate: elements
93
+ }
94
+ })
95
+ if (results.length > 0) {
96
+ probedLocation = results[0]
97
+ } else throw new Error('Cannot find valid forecast for feature')
98
+ } catch (error) {
99
+ logger.error(error)
100
+ }
101
+ return probedLocation
102
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kalisio/kdk",
3
3
  "description": "Kalisio Development Kit",
4
- "version": "2.3.2",
4
+ "version": "2.4.0",
5
5
  "homepage": "https://github.com/kalisio/kdk",
6
6
  "type": "module",
7
7
  "keywords": [
@@ -118,14 +118,14 @@
118
118
  "jsdap": "^8.1.0",
119
119
  "limiter": "^1.1.3",
120
120
  "lodash": "^4.17.15",
121
- "lru-cache": "^5.1.1",
121
+ "lru-cache": "^10.2.2",
122
122
  "moment": "^2.24.0",
123
123
  "mongodb": "^3.6.2",
124
124
  "node-fetch": "^2.6.0",
125
125
  "papaparse": "^5.4.1",
126
126
  "password-generator": "^2.3.2",
127
127
  "password-validator": "^4.0.0",
128
- "sanitize-html": "^2.3.2",
128
+ "sanitize-html": "^2.13.0",
129
129
  "sift": "^8.0.0",
130
130
  "superagent": "^5.1.0",
131
131
  "tiny-emitter": "^2.1.0",
@@ -139,10 +139,10 @@
139
139
  "devDependencies": {
140
140
  "@feathersjs/authentication-client": "^5.0.8",
141
141
  "@feathersjs/memory": "^5.0.8",
142
- "@kalisio/feathers-distributed": "^2.3.0",
142
+ "@kalisio/feathers-distributed": "^2.4.0",
143
143
  "@turf/intersect": "^6.1.3",
144
- "@weacast/gfs": "^2.1.5",
145
- "@weacast/probe": "^2.1.5",
144
+ "@weacast/gfs": "^2.2.1",
145
+ "@weacast/probe": "^2.2.1",
146
146
  "body-parser": "^1.17.1",
147
147
  "c8": "^7.11.0",
148
148
  "chai": "^4.2.0",
@@ -12,11 +12,11 @@ THIS_DIR=$(dirname "$THIS_FILE")
12
12
  ### Github Actions
13
13
 
14
14
  init_github_run_tests() {
15
- install_reqs age sops nvm node16 mongo4 cc_test_reporter
15
+ install_reqs age sops nvm node20 mongo7 cc_test_reporter
16
16
  }
17
17
 
18
18
  init_github_additional_tests() {
19
- install_reqs age sops nvm node18 node20 mongo5 mongo6 mongo7
19
+ install_reqs age sops nvm node18 node22 mongo5 mongo6 mongo7
20
20
  }
21
21
 
22
22
  init_github_build_docs() {
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Changed
11
+
12
+ - `build_docs` now takes a fourth parameter, the version of node to use to build the docs
@@ -1,2 +1,4 @@
1
1
  # kash
2
2
  Kalisio's bash snippets repository
3
+
4
+ ## HOWTO use
@@ -124,6 +124,7 @@ NVM_VERSION=0.39.7
124
124
  NODE16_VERSION=16.20.2
125
125
  NODE18_VERSION=18.19.1
126
126
  NODE20_VERSION=20.11.1
127
+ NODE22_VERSION=22.3.0
127
128
 
128
129
  # https://www.mongodb.com/try/download/community
129
130
  MONGODB4_VERSION=4.4.28
@@ -144,7 +145,7 @@ install_yq() {
144
145
  curl -OLsS https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/checksums_hashes_order
145
146
  curl -OLsS https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/extract-checksum.sh
146
147
  chmod u+x extract-checksum.sh
147
- ./extract-checksum.sh "SHA-256" "yq_linux_amd64.tar.gz" | awk '{ print $2 " " $1}' | sha256sum --check
148
+ ./extract-checksum.sh "SHA-256" "yq_linux_amd64.tar.gz" | awk '{ print $2 " " $1}' | sha256sum --check --quiet
148
149
  cd ~-
149
150
  fi
150
151
  cd "$DL_PATH"
@@ -295,6 +296,11 @@ install_node20() {
295
296
  bash -i -c "nvm install $NODE20_VERSION"
296
297
  }
297
298
 
299
+ # Install node22, requires nvm to be installed
300
+ install_node22() {
301
+ bash -i -c "nvm install $NODE22_VERSION"
302
+ }
303
+
298
304
  # Install mongo4 in ~/.local/bin/mongo4
299
305
  # Arg1: a writable folder where to write downloaded files
300
306
  # NOTE: each mongo version is installed in a separate folder to support multiple versions
@@ -545,57 +551,53 @@ get_json_value() {
545
551
  # Returns the current git tag (or empty string if not on a tag)
546
552
  # Arg1: the repository root
547
553
  get_git_tag() {
548
- local REPO_ROOT="$1"
549
- cd "$REPO_ROOT"
550
- git tag --points-at
551
-
552
- # case "$CI_ID" in
554
+ case "$CI_ID" in
555
+ gitlab)
556
+ echo "${CI_COMMIT_TAG:-}"
557
+ ;;
553
558
  # github)
554
559
  # if [ "$GITHUB_REF_TYPE" = "tag" ]; then
555
560
  # echo "$GITHUB_REF_NAME"
556
561
  # fi
557
562
  # ;;
558
- # gitlab)
559
- # echo "${CI_COMMIT_TAG:-}"
560
- # ;;
561
563
  # travis)
562
564
  # echo "${TRAVIS_TAG:-}"
563
565
  # ;;
564
- # *)
565
- # git tag --points-at
566
- # ;;
567
- # esac
568
- cd ~-
566
+ *)
567
+ local REPO_ROOT="$1"
568
+ cd "$REPO_ROOT"
569
+ git tag --points-at
570
+ cd ~-
571
+ ;;
572
+ esac
569
573
  }
570
574
 
571
575
  # Returns the current git branch (might be empty string if on a tag and repo was checked out with --depth 1)
572
576
  # Arg1: the repository root
573
577
  get_git_branch() {
574
- local REPO_ROOT="$1"
575
- cd "$REPO_ROOT"
576
- git branch --show-current
577
-
578
- # case "$CI_ID" in
578
+ case "$CI_ID" in
579
+ gitlab)
580
+ if [ -z "${CI_COMMIT_TAG:-}" ]; then
581
+ echo "$CI_COMMIT_REF_NAME"
582
+ fi
583
+ ;;
579
584
  # github)
580
585
  # if [ "$GITHUB_REF_TYPE" = "branch" ]; then
581
586
  # echo "$GITHUB_REF_NAME"
582
587
  # fi
583
588
  # ;;
584
- # gitlab)
585
- # if [ -z "$CI_COMMIT_TAG" ]; then
586
- # echo "$CI_COMMIT_REF_NAME"
587
- # fi
588
- # ;;
589
589
  # travis)
590
590
  # if [ -z "$TRAVIS_TAG" ]; then
591
591
  # echo "$TRAVIS_BRANCH"
592
592
  # fi
593
593
  # ;;
594
- # *)
595
- # git branch --show-current
596
- # ;;
597
- # esac
598
- cd ~-
594
+ *)
595
+ local REPO_ROOT="$1"
596
+ cd "$REPO_ROOT"
597
+ git branch --show-current
598
+ cd ~-
599
+ ;;
600
+ esac
599
601
  }
600
602
 
601
603
  # Returns the current git commit sha, always defined
@@ -744,7 +746,7 @@ begin_group() {
744
746
  elif [ "$CI_ID" = "gitlab" ]; then
745
747
  # see https://docs.gitlab.com/ee/ci/jobs/#custom-collapsible-sections
746
748
  local SECTION
747
- SECTION=$(echo "$TITLE" | tr ' .' '_')
749
+ SECTION=$(echo "$TITLE" | tr ' .:-' '_')
748
750
  echo -e "section_start:$(date +%s):$SECTION\r\e[0K\e[95m$TITLE\e[0m"
749
751
  elif [ "$CI_ID" = "travis" ]; then
750
752
  # see
@@ -765,7 +767,7 @@ end_group() {
765
767
  echo "::endgroup::"
766
768
  elif [ "$CI_ID" = "gitlab" ]; then
767
769
  local SECTION
768
- SECTION=$(echo "$TITLE" | tr ' .' '_')
770
+ SECTION=$(echo "$TITLE" | tr ' .:-' '_')
769
771
  echo -e "section_end:$(date +%s):$SECTION\r\e[0K"
770
772
  elif [ "$CI_ID" = "travis" ]; then
771
773
  echo "travis_fold:end:$TITLE"
@@ -1505,7 +1507,7 @@ build_job() {
1505
1507
  docker push "$IMAGE_NAME:$IMAGE_TAG"
1506
1508
  fi
1507
1509
 
1508
- docker logout
1510
+ docker logout "$REGISTRY_URL"
1509
1511
 
1510
1512
  end_group "Building $IMAGE_NAME:$IMAGE_TAG ..."
1511
1513
  }
@@ -12,8 +12,8 @@ WORKSPACE_DIR="$(dirname "$ROOT_DIR")"
12
12
  ## Parse options
13
13
  ##
14
14
 
15
- NODE_VER=16
16
- MONGO_VER="4"
15
+ NODE_VER=20
16
+ MONGO_VER=7
17
17
  CI_STEP_NAME="Run tests"
18
18
  CODE_COVERAGE=false
19
19
  while getopts "m:n:cr:" option; do
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
- # set -x
3
+ #set -x
4
4
 
5
5
  THIS_FILE=$(readlink -f "${BASH_SOURCE[0]}")
6
6
  THIS_DIR=$(dirname "$THIS_FILE")
@@ -12,6 +12,21 @@ WORKSPACE_DIR="$(dirname "$ROOT_DIR")"
12
12
  ## Parse options
13
13
  ##
14
14
 
15
+ WORKSPACE_NODE=20
16
+ WORKSPACE_KIND=klifull
17
+ OPT_LIST="n:k:"
18
+
19
+ while getopts "$OPT_LIST" OPT; do
20
+ case $OPT in
21
+ n) # defines node version
22
+ WORKSPACE_NODE=$OPTARG;;
23
+ k) # workspace kind (nokli kli klifull)
24
+ WORKSPACE_KIND=$OPTARG;;
25
+ *)
26
+ ;;
27
+ esac
28
+ done
29
+
15
30
  begin_group "Setting up workspace ..."
16
31
 
17
32
  if [ "$CI" != true ]; then
@@ -31,12 +46,15 @@ if [ "$CI" != true ]; then
31
46
 
32
47
  # Clone project in the workspace
33
48
  git_shallow_clone "$KALISIO_GITHUB_URL/kalisio/kdk.git" "$WORKSPACE_DIR/kdk" "${WORKSPACE_TAG:-${WORKSPACE_BRANCH:-}}"
49
+
50
+ # unset KALISIO_DEVELOPMENT_DIR because we want kli to clone everyhting in $WORKSPACE_DIR
51
+ unset KALISIO_DEVELOPMENT_DIR
34
52
  fi
35
53
 
36
- setup_lib_workspace "$WORKSPACE_DIR" "$KALISIO_GITHUB_URL/kalisio/development.git" \
37
- "https://github.com/kalisio/feathers-distributed.git" \
38
- "https://github.com/kalisio/feathers-webpush.git" \
39
- "https://github.com/kalisio/feathers-s3.git" \
40
- "https://github.com/kalisio/feathers-import-export.git"
54
+ setup_lib_workspace "$WORKSPACE_DIR" "$KALISIO_GITHUB_URL/kalisio/development.git"
55
+
56
+ if [ "$WORKSPACE_KIND" != "nokli" ]; then
57
+ run_kli "$WORKSPACE_DIR" "$WORKSPACE_NODE" "$WORKSPACE_DIR/development/workspaces/libs/kdk/dev/kdk.cjs" "$WORKSPACE_KIND"
58
+ fi
41
59
 
42
60
  end_group "Setting up workspace ..."
@@ -69,7 +69,7 @@ describe('core:hooks', () => {
69
69
  data: {
70
70
  'field._id': id.toString(),
71
71
  objects: [{
72
- _id: id.toString(), date: new Date()
72
+ _id: id.toString(), date: new Date(), string: 'transmission'
73
73
  }, {
74
74
  _id: anotherId, date: new Date()
75
75
  }],
@@ -79,6 +79,7 @@ describe('core:hooks', () => {
79
79
  query: {
80
80
  _id: { $in: [id.toString()] },
81
81
  id: anotherId,
82
+ tags: { $in: ['transmission'] },
82
83
  array: [new Date(), new Date()]
83
84
  }
84
85
  }
@@ -92,16 +93,17 @@ describe('core:hooks', () => {
92
93
  expect(Array.isArray(hook.data.objects)).beTrue()
93
94
  expect(hook.data.objects.length).to.equal(2)
94
95
  let object = hook.data.objects[0]
95
- expect(Object.keys(object)).to.deep.equal(['_id', 'date'])
96
+ expect(Object.keys(object)).to.deep.equal(['_id', 'date', 'string'])
96
97
  expect(ObjectID.isValid(object._id)).beTrue()
97
98
  expect(object._id.toString()).to.equal(id.toString())
98
99
  expect(object.date instanceof Date).beTrue()
100
+ expect(typeof object.string === 'string').beTrue()
99
101
  object = hook.data.objects[1]
100
102
  expect(Object.keys(object)).to.deep.equal(['_id', 'date'])
101
103
  expect(ObjectID.isValid(object._id)).beTrue()
102
104
  expect(object._id.toString()).to.equal(anotherId.toString())
103
105
  expect(object.date instanceof Date).beTrue()
104
- expect(Object.keys(hook.params.query)).to.deep.equal(['_id', 'id', 'array'])
106
+ expect(Object.keys(hook.params.query)).to.deep.equal(['_id', 'id', 'tags', 'array'])
105
107
  expect(Array.isArray(hook.params.query.array)).beTrue()
106
108
  expect(hook.params.query.array.length).to.equal(2)
107
109
  hook.params.query.array.forEach(value => {
@@ -111,6 +113,7 @@ describe('core:hooks', () => {
111
113
  expect(hook.params.query._id.$in[0].toString()).to.equal(id.toString())
112
114
  expect(ObjectID.isValid(hook.params.query.id)).beTrue()
113
115
  expect(hook.params.query.id.toString()).to.equal(anotherId.toString())
116
+ expect(typeof hook.params.query.tags.$in[0] === 'string').beTrue()
114
117
  })
115
118
 
116
119
  it('check uniqueness', async () => {
@@ -0,0 +1,7 @@
1
+ {"level":"info","message":"This is a log test"}
2
+ {"level":"error","message":"error: api/tags - Method: create: You are not allowed to access service tags"}
3
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
4
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
5
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to change authorisation on resource"}
6
+ {"level":"error","message":"error: api/authorisations - Method: remove: You are not allowed to change authorisation on subject(s)"}
7
+ {"level":"info","message":"This is a log test"}
@@ -0,0 +1,14 @@
1
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
2
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
3
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
4
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
5
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
6
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
7
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
8
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
9
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
10
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
11
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
12
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
13
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
14
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
@@ -0,0 +1,6 @@
1
+ {"level":"error","message":"error: api/tags - Method: create: You are not allowed to access service tags"}
2
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
3
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
4
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to change authorisation on resource"}
5
+ {"level":"error","message":"error: api/authorisations - Method: remove: You are not allowed to change authorisation on subject(s)"}
6
+ {"level":"info","message":"This is a log test"}
@@ -15,9 +15,9 @@
15
15
  {"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
16
16
  {"level":"error","message":"error: api/organisations - Method: create: You are not allowed to access service organisations"}
17
17
  {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
18
- {"level":"error","message":"error: api/66275eb3b88564fe1c99b8ee/storage - Method: get: You are not allowed to access service 66275eb3b88564fe1c99b8ee/storage"}
19
- {"level":"error","message":"error: api/66275eb3b88564fe1c99b8ee/groups - Method: create: You are not allowed to perform create operation on groups"}
20
- {"level":"error","message":"error: api/66275eb3b88564fe1c99b8ee/groups - Method: patch: You are not allowed to perform patch operation on groups"}
18
+ {"level":"error","message":"error: api/666168414d1b825f7ae70b7a/storage - Method: get: You are not allowed to access service 666168414d1b825f7ae70b7a/storage"}
19
+ {"level":"error","message":"error: api/666168414d1b825f7ae70b7a/groups - Method: create: You are not allowed to perform create operation on groups"}
20
+ {"level":"error","message":"error: api/666168414d1b825f7ae70b7a/groups - Method: patch: You are not allowed to perform patch operation on groups"}
21
21
  {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
22
22
  {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
23
23
  {"level":"error","message":"error: api/users - Method: remove: You are not allowed to delete the user undefined"}
@@ -0,0 +1,25 @@
1
+ {"level":"info","message":"This is a log test"}
2
+ {"level":"info","message":"This is a log test"}
3
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
4
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
5
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
6
+ {"level":"error","message":"error: api/tags - Method: create: You are not allowed to access service tags"}
7
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
8
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
9
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to change authorisation on resource"}
10
+ {"level":"error","message":"error: api/authorisations - Method: remove: You are not allowed to change authorisation on subject(s)"}
11
+ {"level":"info","message":"This is a log test"}
12
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
13
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
14
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
15
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
16
+ {"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
17
+ {"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
18
+ {"level":"error","message":"error: api/organisations - Method: create: You are not allowed to access service organisations"}
19
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
20
+ {"level":"error","message":"error: api/667bf15d0cf7df1907e6875c/storage - Method: get: You are not allowed to access service 667bf15d0cf7df1907e6875c/storage"}
21
+ {"level":"error","message":"error: api/667bf15d0cf7df1907e6875c/groups - Method: create: You are not allowed to perform create operation on groups"}
22
+ {"level":"error","message":"error: api/667bf15d0cf7df1907e6875c/groups - Method: patch: You are not allowed to perform patch operation on groups"}
23
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
24
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
25
+ {"level":"error","message":"error: api/users - Method: remove: You are not allowed to delete the user undefined"}
@@ -0,0 +1,2 @@
1
+ {"level":"info","message":"This is a log test"}
2
+ {"level":"info","message":"This is a log test"}
File without changes
@@ -0,0 +1,69 @@
1
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
2
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
3
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
4
+ {"level":"error","message":"error: api/tags - Method: create: You are not allowed to access service tags"}
5
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
6
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
7
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to change authorisation on resource"}
8
+ {"level":"error","message":"error: api/authorisations - Method: remove: You are not allowed to change authorisation on subject(s)"}
9
+ {"level":"info","message":"This is a log test"}
10
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
11
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
12
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
13
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
14
+ {"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
15
+ {"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
16
+ {"level":"error","message":"error: api/organisations - Method: create: You are not allowed to access service organisations"}
17
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
18
+ {"level":"error","message":"error: api/66bb567887e11629ac8fe50d/storage - Method: get: You are not allowed to access service 66bb567887e11629ac8fe50d/storage"}
19
+ {"level":"error","message":"error: api/66bb567887e11629ac8fe50d/groups - Method: create: You are not allowed to perform create operation on groups"}
20
+ {"level":"error","message":"error: api/66bb567887e11629ac8fe50d/groups - Method: patch: You are not allowed to perform patch operation on groups"}
21
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
22
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
23
+ {"level":"error","message":"error: api/users - Method: remove: You are not allowed to delete the user undefined"}
24
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
25
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
26
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
27
+ {"level":"error","message":"error: api/tags - Method: create: You are not allowed to access service tags"}
28
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
29
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
30
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to change authorisation on resource"}
31
+ {"level":"error","message":"error: api/authorisations - Method: remove: You are not allowed to change authorisation on subject(s)"}
32
+ {"level":"info","message":"This is a log test"}
33
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
34
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
35
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
36
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
37
+ {"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
38
+ {"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
39
+ {"level":"error","message":"error: api/organisations - Method: create: You are not allowed to access service organisations"}
40
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
41
+ {"level":"error","message":"error: api/66bb569a0d15552a1bb62719/storage - Method: get: You are not allowed to access service 66bb569a0d15552a1bb62719/storage"}
42
+ {"level":"error","message":"error: api/66bb569a0d15552a1bb62719/groups - Method: create: You are not allowed to perform create operation on groups"}
43
+ {"level":"error","message":"error: api/66bb569a0d15552a1bb62719/groups - Method: patch: You are not allowed to perform patch operation on groups"}
44
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
45
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
46
+ {"level":"error","message":"error: api/users - Method: remove: You are not allowed to delete the user undefined"}
47
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
48
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
49
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
50
+ {"level":"error","message":"error: api/tags - Method: create: You are not allowed to access service tags"}
51
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
52
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
53
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to change authorisation on resource"}
54
+ {"level":"error","message":"error: api/authorisations - Method: remove: You are not allowed to change authorisation on subject(s)"}
55
+ {"level":"info","message":"This is a log test"}
56
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
57
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
58
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
59
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
60
+ {"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
61
+ {"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
62
+ {"level":"error","message":"error: api/organisations - Method: create: You are not allowed to access service organisations"}
63
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
64
+ {"level":"error","message":"error: api/66bb56a99fd47c2a77bf38e2/storage - Method: get: You are not allowed to access service 66bb56a99fd47c2a77bf38e2/storage"}
65
+ {"level":"error","message":"error: api/66bb56a99fd47c2a77bf38e2/groups - Method: create: You are not allowed to perform create operation on groups"}
66
+ {"level":"error","message":"error: api/66bb56a99fd47c2a77bf38e2/groups - Method: patch: You are not allowed to perform patch operation on groups"}
67
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
68
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
69
+ {"level":"error","message":"error: api/users - Method: remove: You are not allowed to delete the user undefined"}