@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.
- package/.eslintignore +2 -1
- package/.github/workflows/main.yaml +3 -3
- package/README.md +1 -0
- package/core/api/db.js +6 -1
- package/core/api/hooks/hooks.model.js +1 -1
- package/core/api/hooks/hooks.schemas.js +0 -2
- package/core/api/models/messages.model.mongodb.js +13 -0
- package/core/api/services/authorisations/authorisations.service.js +13 -4
- package/core/api/services/index.js +19 -0
- package/core/api/services/messages/messages.hooks.js +38 -0
- package/core/client/api.js +7 -32
- package/core/client/capabilities.js +2 -2
- package/core/client/components/KActivity.vue +29 -6
- package/core/client/components/KContent.vue +2 -2
- package/core/client/components/KDialog.vue +4 -7
- package/core/client/components/KStamp.vue +3 -9
- package/core/client/components/KStore.vue +2 -4
- package/core/client/components/KTab.vue +95 -0
- package/core/client/components/action/KAction.vue +15 -2
- package/core/client/components/action/KBugReportAction.vue +4 -2
- package/core/client/components/action/KToggleFullscreenAction.vue +25 -0
- package/core/client/components/app/KSettings.vue +17 -13
- package/core/client/components/chart/KDataTable.vue +6 -9
- package/core/client/components/chart/KTimeSeriesChart.vue +62 -49
- package/core/client/components/collection/KBoard.vue +22 -33
- package/core/client/components/collection/KCard.vue +71 -56
- package/core/client/components/collection/KCardSection.vue +20 -10
- package/core/client/components/collection/KDescriptionCardSection.vue +47 -0
- package/core/client/components/collection/KGrid.vue +234 -54
- package/core/client/components/collection/KScrollDown.vue +97 -0
- package/core/client/components/collection/KScrollToTop.vue +93 -0
- package/core/client/components/collection/KTable.vue +87 -33
- package/core/client/components/collection/KTimeLine.vue +406 -0
- package/core/client/components/collection/index.js +1 -5
- package/core/client/components/document/KDocument.vue +20 -55
- package/core/client/components/document/KHtml.vue +17 -7
- package/core/client/components/document/KImage.vue +78 -0
- package/core/client/components/document/KMarkdown.vue +12 -16
- package/core/client/components/document/KPdf.vue +69 -0
- package/core/client/components/form/KFileField.vue +2 -2
- package/core/client/components/form/KSelectField.vue +2 -1
- package/core/client/components/form/KUnitField.vue +3 -1
- package/core/client/components/layout/KFab.vue +9 -10
- package/core/client/components/layout/KLayout.vue +104 -6
- package/core/client/components/layout/KOpener.vue +14 -19
- package/core/client/components/layout/KPage.vue +195 -105
- package/core/client/components/layout/KWindow.vue +54 -32
- package/core/client/components/layout/index.js +0 -2
- package/core/client/components/media/KRibbon.vue +95 -0
- package/core/client/components/menu/KMenu.vue +4 -4
- package/core/client/components/team/KGroupsActivity.vue +25 -27
- package/core/client/components/team/KMembersActivity.vue +21 -23
- package/core/client/components/team/KOrganisationsActivity.vue +20 -22
- package/core/client/components/team/KTagsActivity.vue +21 -23
- package/core/client/components/time/KAbsoluteTimeRange.vue +70 -170
- package/core/client/composables/activity.js +14 -12
- package/core/client/composables/collection.js +3 -1
- package/core/client/composables/counter.js +51 -0
- package/core/client/composables/index.js +3 -0
- package/core/client/composables/layout.js +13 -2
- package/core/client/composables/messages.js +15 -0
- package/core/client/composables/pwa.js +1 -1
- package/core/client/composables/schema.js +6 -6
- package/core/client/composables/screen.js +23 -0
- package/core/client/directives/index.js +1 -0
- package/core/client/directives/v-hover.js +23 -0
- package/core/client/document.js +61 -0
- package/core/client/exporter.js +1 -1
- package/core/client/filter.js +0 -1
- package/core/client/guards.js +1 -1
- package/core/client/i18n/core_en.json +14 -8
- package/core/client/i18n/core_fr.json +15 -9
- package/core/client/index.js +9 -3
- package/core/client/layout.js +129 -29
- package/core/client/local-storage.js +1 -1
- package/core/client/mixins/index.js +0 -1
- package/core/client/mixins/mixin.base-activity.js +23 -13
- package/core/client/mixins/mixin.base-item.js +6 -3
- package/core/client/services/index.js +4 -1
- package/core/client/services/local-settings.service.js +4 -0
- package/core/client/storage.js +1 -1
- package/core/client/store.js +1 -1
- package/core/client/template-context.js +17 -0
- package/core/client/units.js +49 -27
- package/core/client/utils/index.js +3 -2
- package/core/client/utils/utils.actions.js +4 -0
- package/core/client/utils/utils.colors.js +155 -2
- package/core/client/utils/utils.items.js +26 -0
- package/core/client/utils/utils.math.js +3 -0
- package/core/client/utils/utils.platform.js +3 -1
- package/core/client/utils/utils.screen.js +82 -0
- package/core/client/utils/utils.time.js +0 -1
- package/core/common/schemas/settings.update.json +12 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/core/api/application.js.html +1870 -0
- package/coverage/core/api/authentication.js.html +742 -0
- package/coverage/core/api/db.js.html +793 -0
- package/coverage/core/api/hooks/hooks.authentication.js.html +313 -0
- package/coverage/core/api/hooks/hooks.authorisations.js.html +1243 -0
- package/coverage/core/api/hooks/hooks.groups.js.html +229 -0
- package/coverage/core/api/hooks/hooks.logger.js.html +163 -0
- package/coverage/core/api/hooks/hooks.model.js.html +955 -0
- package/coverage/core/api/hooks/hooks.organisations.js.html +541 -0
- package/coverage/core/api/hooks/hooks.push.js.html +253 -0
- package/coverage/core/api/hooks/hooks.query.js.html +862 -0
- package/coverage/core/api/hooks/hooks.schemas.js.html +298 -0
- package/coverage/core/api/hooks/hooks.service.js.html +319 -0
- package/coverage/core/api/hooks/hooks.storage.js.html +193 -0
- package/coverage/core/api/hooks/hooks.users.js.html +868 -0
- package/coverage/core/api/hooks/index.html +296 -0
- package/coverage/core/api/hooks/index.js.html +121 -0
- package/coverage/core/api/index.html +191 -0
- package/coverage/core/api/index.js.html +148 -0
- package/coverage/core/api/marshall.js.html +448 -0
- package/coverage/core/api/models/groups.model.mongodb.js.html +109 -0
- package/coverage/core/api/models/index.html +176 -0
- package/coverage/core/api/models/messages.model.mongodb.js.html +121 -0
- package/coverage/core/api/models/organisations.model.mongodb.js.html +94 -0
- package/coverage/core/api/models/tags.model.mongodb.js.html +115 -0
- package/coverage/core/api/models/users.model.mongodb.js.html +115 -0
- package/coverage/core/api/services/account/account.hooks.js.html +208 -0
- package/coverage/core/api/services/account/account.service.js.html +436 -0
- package/coverage/core/api/services/account/index.html +131 -0
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +529 -0
- package/coverage/core/api/services/authorisations/index.html +131 -0
- package/coverage/core/api/services/databases/databases.hooks.js.html +193 -0
- package/coverage/core/api/services/databases/databases.service.js.html +100 -0
- package/coverage/core/api/services/databases/index.html +131 -0
- package/coverage/core/api/services/groups/groups.hooks.js.html +178 -0
- package/coverage/core/api/services/groups/index.html +116 -0
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +184 -0
- package/coverage/core/api/services/import-export/import-export.service.js.html +118 -0
- package/coverage/core/api/services/import-export/index.html +131 -0
- package/coverage/core/api/services/index.html +116 -0
- package/coverage/core/api/services/index.js.html +556 -0
- package/coverage/core/api/services/mailer/index.html +131 -0
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +190 -0
- package/coverage/core/api/services/mailer/mailer.service.js.html +118 -0
- package/coverage/core/api/services/messages/index.html +116 -0
- package/coverage/core/api/services/messages/messages.hooks.js.html +199 -0
- package/coverage/core/api/services/organisations/index.html +131 -0
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +178 -0
- package/coverage/core/api/services/organisations/organisations.service.js.html +343 -0
- package/coverage/core/api/services/push/index.html +131 -0
- package/coverage/core/api/services/push/push.hooks.js.html +190 -0
- package/coverage/core/api/services/push/push.service.js.html +121 -0
- package/coverage/core/api/services/storage/index.html +131 -0
- package/coverage/core/api/services/storage/storage.hooks.js.html +190 -0
- package/coverage/core/api/services/storage/storage.service.js.html +172 -0
- package/coverage/core/api/services/tags/index.html +116 -0
- package/coverage/core/api/services/tags/tags.hooks.js.html +178 -0
- package/coverage/core/api/services/users/index.html +116 -0
- package/coverage/core/api/services/users/users.hooks.js.html +307 -0
- package/coverage/core/api/utils.js.html +118 -0
- package/coverage/core/common/errors.js.html +88 -0
- package/coverage/core/common/index.html +176 -0
- package/coverage/core/common/index.js.html +115 -0
- package/coverage/core/common/permissions.js.html +1048 -0
- package/coverage/core/common/schema.js.html +190 -0
- package/coverage/core/common/utils.js.html +220 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +506 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/core/api/application.js.html +1870 -0
- package/coverage/lcov-report/core/api/authentication.js.html +742 -0
- package/coverage/lcov-report/core/api/db.js.html +793 -0
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +313 -0
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +1243 -0
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +229 -0
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +163 -0
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +955 -0
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +541 -0
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +253 -0
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +862 -0
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +298 -0
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +319 -0
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +193 -0
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +868 -0
- package/coverage/lcov-report/core/api/hooks/index.html +296 -0
- package/coverage/lcov-report/core/api/hooks/index.js.html +121 -0
- package/coverage/lcov-report/core/api/index.html +191 -0
- package/coverage/lcov-report/core/api/index.js.html +148 -0
- package/coverage/lcov-report/core/api/marshall.js.html +448 -0
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +109 -0
- package/coverage/lcov-report/core/api/models/index.html +176 -0
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +121 -0
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +94 -0
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +115 -0
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +115 -0
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +208 -0
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +436 -0
- package/coverage/lcov-report/core/api/services/account/index.html +131 -0
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +529 -0
- package/coverage/lcov-report/core/api/services/authorisations/index.html +131 -0
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +193 -0
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +100 -0
- package/coverage/lcov-report/core/api/services/databases/index.html +131 -0
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +178 -0
- package/coverage/lcov-report/core/api/services/groups/index.html +116 -0
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +184 -0
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +118 -0
- package/coverage/lcov-report/core/api/services/import-export/index.html +131 -0
- package/coverage/lcov-report/core/api/services/index.html +116 -0
- package/coverage/lcov-report/core/api/services/index.js.html +556 -0
- package/coverage/lcov-report/core/api/services/mailer/index.html +131 -0
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +190 -0
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +118 -0
- package/coverage/lcov-report/core/api/services/messages/index.html +116 -0
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +199 -0
- package/coverage/lcov-report/core/api/services/organisations/index.html +131 -0
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +178 -0
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +343 -0
- package/coverage/lcov-report/core/api/services/push/index.html +131 -0
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +190 -0
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +121 -0
- package/coverage/lcov-report/core/api/services/storage/index.html +131 -0
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +190 -0
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +172 -0
- package/coverage/lcov-report/core/api/services/tags/index.html +116 -0
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +178 -0
- package/coverage/lcov-report/core/api/services/users/index.html +116 -0
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +307 -0
- package/coverage/lcov-report/core/api/utils.js.html +118 -0
- package/coverage/lcov-report/core/common/errors.js.html +88 -0
- package/coverage/lcov-report/core/common/index.html +176 -0
- package/coverage/lcov-report/core/common/index.js.html +115 -0
- package/coverage/lcov-report/core/common/permissions.js.html +1048 -0
- package/coverage/lcov-report/core/common/schema.js.html +190 -0
- package/coverage/lcov-report/core/common/utils.js.html +220 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +506 -0
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +457 -0
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +397 -0
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +1309 -0
- package/coverage/lcov-report/map/api/hooks/index.html +161 -0
- package/coverage/lcov-report/map/api/hooks/index.js.html +94 -0
- package/coverage/lcov-report/map/api/index.html +131 -0
- package/coverage/lcov-report/map/api/index.js.html +139 -0
- package/coverage/lcov-report/map/api/marshall.js.html +178 -0
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +106 -0
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +127 -0
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +196 -0
- package/coverage/lcov-report/map/api/models/index.html +161 -0
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +109 -0
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +274 -0
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +610 -0
- package/coverage/lcov-report/map/api/services/alerts/index.html +131 -0
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +310 -0
- package/coverage/lcov-report/map/api/services/catalog/index.html +116 -0
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1510 -0
- package/coverage/lcov-report/map/api/services/daptiles/index.html +116 -0
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +241 -0
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +241 -0
- package/coverage/lcov-report/map/api/services/features/index.html +131 -0
- package/coverage/lcov-report/map/api/services/index.html +116 -0
- package/coverage/lcov-report/map/api/services/index.js.html +817 -0
- package/coverage/lcov-report/map/api/services/projects/index.html +116 -0
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +439 -0
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +466 -0
- package/coverage/lcov-report/map/common/errors.js.html +94 -0
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +541 -0
- package/coverage/lcov-report/map/common/grid.js.html +1612 -0
- package/coverage/lcov-report/map/common/index.html +371 -0
- package/coverage/lcov-report/map/common/index.js.html +172 -0
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +556 -0
- package/coverage/lcov-report/map/common/moment-utils.js.html +157 -0
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +868 -0
- package/coverage/lcov-report/map/common/opendap-utils.js.html +826 -0
- package/coverage/lcov-report/map/common/permissions.js.html +124 -0
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +418 -0
- package/coverage/lcov-report/map/common/tms-utils.js.html +274 -0
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +364 -0
- package/coverage/lcov-report/map/common/wcs-utils.js.html +586 -0
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +1033 -0
- package/coverage/lcov-report/map/common/wfs-utils.js.html +574 -0
- package/coverage/lcov-report/map/common/wms-utils.js.html +451 -0
- package/coverage/lcov-report/map/common/wmts-utils.js.html +547 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +11245 -0
- package/coverage/map/api/hooks/hooks.catalog.js.html +457 -0
- package/coverage/map/api/hooks/hooks.features.js.html +397 -0
- package/coverage/map/api/hooks/hooks.query.js.html +1309 -0
- package/coverage/map/api/hooks/index.html +161 -0
- package/coverage/map/api/hooks/index.js.html +94 -0
- package/coverage/map/api/index.html +131 -0
- package/coverage/map/api/index.js.html +139 -0
- package/coverage/map/api/marshall.js.html +178 -0
- package/coverage/map/api/models/alerts.model.mongodb.js.html +106 -0
- package/coverage/map/api/models/catalog.model.mongodb.js.html +127 -0
- package/coverage/map/api/models/features.model.mongodb.js.html +196 -0
- package/coverage/map/api/models/index.html +161 -0
- package/coverage/map/api/models/projects.model.mongodb.js.html +109 -0
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +274 -0
- package/coverage/map/api/services/alerts/alerts.service.js.html +610 -0
- package/coverage/map/api/services/alerts/index.html +131 -0
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +310 -0
- package/coverage/map/api/services/catalog/index.html +116 -0
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +1510 -0
- package/coverage/map/api/services/daptiles/index.html +116 -0
- package/coverage/map/api/services/features/features.hooks.js.html +241 -0
- package/coverage/map/api/services/features/features.service.js.html +241 -0
- package/coverage/map/api/services/features/index.html +131 -0
- package/coverage/map/api/services/index.html +116 -0
- package/coverage/map/api/services/index.js.html +817 -0
- package/coverage/map/api/services/projects/index.html +116 -0
- package/coverage/map/api/services/projects/projects.hooks.js.html +439 -0
- package/coverage/map/common/dynamic-grid-source.js.html +466 -0
- package/coverage/map/common/errors.js.html +94 -0
- package/coverage/map/common/geotiff-grid-source.js.html +541 -0
- package/coverage/map/common/grid.js.html +1612 -0
- package/coverage/map/common/index.html +371 -0
- package/coverage/map/common/index.js.html +172 -0
- package/coverage/map/common/meteo-model-grid-source.js.html +556 -0
- package/coverage/map/common/moment-utils.js.html +157 -0
- package/coverage/map/common/opendap-grid-source.js.html +868 -0
- package/coverage/map/common/opendap-utils.js.html +826 -0
- package/coverage/map/common/permissions.js.html +124 -0
- package/coverage/map/common/time-based-grid-source.js.html +418 -0
- package/coverage/map/common/tms-utils.js.html +274 -0
- package/coverage/map/common/wcs-grid-source.js.html +364 -0
- package/coverage/map/common/wcs-utils.js.html +586 -0
- package/coverage/map/common/weacast-grid-source.js.html +1033 -0
- package/coverage/map/common/wfs-utils.js.html +574 -0
- package/coverage/map/common/wms-utils.js.html +451 -0
- package/coverage/map/common/wmts-utils.js.html +547 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/coverage/tmp/coverage-280506-1731704745613-0.json +1 -0
- package/coverage/tmp/coverage-280518-1731704745599-0.json +1 -0
- package/coverage/tmp/coverage-280529-1731704745588-0.json +1 -0
- package/coverage/tmp/coverage-280541-1731704745574-0.json +1 -0
- package/coverage/tmp/coverage-280548-1731704745545-0.json +1 -0
- package/extras/css/core.variables.scss +32 -8
- package/extras/icons/attribution.png +0 -0
- package/map/api/services/catalog/catalog.hooks.js +5 -7
- package/map/api/services/features/features.hooks.js +1 -1
- package/map/client/cesium/utils/utils.style.js +11 -2
- package/map/client/components/KAttribution.vue +108 -0
- package/map/client/components/KPositionIndicator.vue +11 -18
- package/map/client/components/KProjectMenu.vue +4 -4
- package/map/client/components/catalog/KCategoryItem.vue +74 -0
- package/map/client/components/catalog/KLayerCategories.vue +24 -12
- package/map/client/components/catalog/KLayersPanel.vue +139 -116
- package/map/client/components/catalog/KProjectSelector.vue +29 -17
- package/map/client/components/catalog/KProjectsPanel.vue +19 -35
- package/map/client/components/catalog/KViewSelector.vue +37 -25
- package/map/client/components/catalog/KViewsPanel.vue +19 -35
- package/map/client/components/form/KLocationField.vue +1 -2
- package/map/client/components/legend/KLegend.vue +34 -34
- package/map/client/components/location/KLocationCardSection.vue +18 -22
- package/map/client/components/location/KLocationMap.vue +36 -38
- package/map/client/components/location/KLocationTimeLineCard.vue +147 -0
- package/map/client/components/location/KLocationTip.vue +12 -2
- package/map/client/components/widget/KInformationBox.vue +0 -4
- package/map/client/components/widget/KStackableTimeSeries.vue +8 -1
- package/map/client/components/widget/KTimeSeries.vue +1 -1
- package/map/client/composables/highlight.js +29 -31
- package/map/client/composables/probe.js +7 -3
- package/map/client/composables/weather.js +71 -31
- package/map/client/i18n/map_en.json +3 -0
- package/map/client/i18n/map_fr.json +3 -0
- package/map/client/init.js +4 -3
- package/map/client/leaflet/ShapeMarker.js +1 -1
- package/map/client/leaflet/utils/utils.events.js +1 -1
- package/map/client/leaflet/utils/utils.style.js +20 -8
- package/map/client/mixins/globe/mixin.base-globe.js +111 -13
- package/map/client/mixins/globe/mixin.file-layers.js +10 -10
- package/map/client/mixins/globe/mixin.geojson-layers.js +90 -15
- package/map/client/mixins/globe/mixin.style.js +2 -0
- package/map/client/mixins/index.js +0 -1
- package/map/client/mixins/map/index.js +1 -0
- package/map/client/mixins/map/mixin.base-map.js +21 -2
- package/map/client/mixins/map/mixin.canvas-layers.js +7 -2
- package/map/client/mixins/map/mixin.edit-layers.js +12 -4
- package/map/client/mixins/map/mixin.file-layers.js +3 -0
- package/map/client/mixins/map/mixin.geojson-layers.js +90 -5
- package/map/client/mixins/map/mixin.pmtiles-layers.js +106 -0
- package/map/client/mixins/mixin.activity.js +8 -3
- package/map/client/mixins/mixin.feature-service.js +73 -32
- package/map/client/mixins/mixin.levels.js +1 -0
- package/map/client/mixins/mixin.weacast.js +10 -87
- package/map/client/utils/index.js +1 -0
- package/map/client/utils/utils.capture.js +1 -1
- package/map/client/utils/utils.catalog.js +7 -7
- package/map/client/utils/utils.features.js +59 -1
- package/map/client/utils/utils.layers.js +8 -0
- package/map/client/utils/utils.time-series.js +121 -0
- package/map/client/utils/utils.weacast.js +102 -0
- package/package.json +6 -6
- package/scripts/init_runner.sh +2 -2
- package/scripts/kash/CHANGELOG.md +12 -0
- package/scripts/kash/README.md +2 -0
- package/scripts/kash/kash.sh +34 -32
- package/scripts/run_tests.sh +2 -2
- package/scripts/setup_workspace.sh +24 -6
- package/test/api/core/hooks.test.js +6 -3
- package/test/api/core/test-log-2023-12-19.log +7 -0
- package/test/api/core/test-log-2024-01-04.log +14 -0
- package/test/api/core/test-log-2024-05-14.log +6 -0
- package/test/api/core/{test-log-2024-04-23.log → test-log-2024-06-06.log} +3 -3
- package/test/api/core/test-log-2024-06-26.log +25 -0
- package/test/api/core/test-log-2024-06-28.log +2 -0
- package/test/api/core/test-log-2024-07-09.log +0 -0
- package/test/api/core/test-log-2024-08-13.log +69 -0
- package/test/api/core/test-log-2024-10-28.log +53 -0
- package/test/api/core/test-log-2024-11-05.log +30 -0
- package/test/api/core/test-log-2024-11-15.log +23 -0
- package/test/api/map/alerts.test.js +3 -1
- package/test/api/map/config/layers.json +3 -1
- package/test/api/map/index.test.js +18 -1
- package/test/api/map/test-log-2023-11-24.log +121 -0
- package/test/api/map/test-log-2023-12-12.log +29 -0
- package/test/api/map/test-log-2023-12-13.log +5 -0
- package/test/api/map/test-log-2024-01-04.log +2 -0
- package/test/api/map/test-log-2024-01-11.log +1 -0
- package/test/api/map/test-log-2024-01-25.log +19 -0
- package/test/api/map/test-log-2024-06-06.log +39 -0
- package/test/api/map/test-log-2024-08-13.log +13 -0
- package/test/api/map/test-log-2024-08-20.log +55 -0
- package/test/api/map/test-log-2024-09-09.log +92 -0
- package/test/api/map/test-log-2024-10-28.log +11 -0
- package/test/client/core/utils.js +13 -0
- package/test/client/map/api.js +34 -0
- package/test/client/map/catalog.js +6 -2
- package/test/client/map/index.js +1 -0
- package/test/client/map/utils.js +4 -2
- package/core/client/components/collection/KList.vue +0 -135
- package/core/client/components/layout/KPageSticky.vue +0 -53
- package/core/client/mixins/mixin.base-collection.js +0 -162
- package/core/client/utils/utils.data.js +0 -22
- package/map/client/mixins/mixin.catalog-panel.js +0 -26
- 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.
|
|
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": "^
|
|
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.
|
|
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.
|
|
142
|
+
"@kalisio/feathers-distributed": "^2.4.0",
|
|
143
143
|
"@turf/intersect": "^6.1.3",
|
|
144
|
-
"@weacast/gfs": "^2.1
|
|
145
|
-
"@weacast/probe": "^2.1
|
|
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",
|
package/scripts/init_runner.sh
CHANGED
|
@@ -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
|
|
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
|
|
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
|
package/scripts/kash/README.md
CHANGED
package/scripts/kash/kash.sh
CHANGED
|
@@ -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
|
-
|
|
549
|
-
|
|
550
|
-
|
|
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
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
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
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
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
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
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
|
}
|
package/scripts/run_tests.sh
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
|
-
#
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
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/
|
|
19
|
-
{"level":"error","message":"error: api/
|
|
20
|
-
{"level":"error","message":"error: api/
|
|
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"}
|
|
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"}
|