@kalisio/kdk 2.6.4 → 2.7.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/core/api/application.js +2 -4
- package/core/api/authentication.js +2 -3
- package/core/api/db.js +10 -2
- package/core/api/hooks/hooks.authorisations.js +4 -2
- package/core/api/hooks/hooks.push.js +6 -2
- package/core/api/hooks/hooks.query.js +29 -12
- package/core/api/hooks/hooks.users.js +30 -17
- package/core/api/models/configurations.model.mongodb.js +4 -0
- package/core/api/services/authorisations/authorisations.service.js +1 -1
- package/core/api/services/configurations/configurations.hooks.js +33 -0
- package/core/api/services/index.js +41 -7
- package/core/api/services/messages/messages.hooks.js +9 -3
- package/core/client/api.js +14 -1
- package/core/client/capabilities.js +1 -6
- package/core/client/components/KAvatar.vue +24 -20
- package/core/client/components/account/KProfile.vue +10 -71
- package/core/client/components/account/index.js +0 -2
- package/core/client/components/app/KSettings.vue +1 -0
- package/core/client/components/collection/KBoard.vue +4 -3
- package/core/client/components/collection/KCardSection.vue +1 -0
- package/core/client/components/collection/KGrid.vue +2 -0
- package/core/client/components/collection/KTable.vue +5 -1
- package/core/client/components/collection/KTimeLine.vue +9 -1
- package/core/client/components/collection/index.js +0 -2
- package/core/client/components/form/KChipsField.vue +2 -1
- package/core/client/components/form/KEmailField.vue +1 -0
- package/core/client/components/form/KFileField.vue +22 -1
- package/core/client/components/form/KForm.vue +2 -0
- package/core/client/components/form/KItemField.vue +1 -0
- package/core/client/components/form/KNumberField.vue +1 -0
- package/core/client/components/form/KPasswordField.vue +1 -0
- package/core/client/components/form/KPhoneField.vue +1 -0
- package/core/client/components/form/KPropertyItemField.vue +1 -0
- package/core/client/components/form/KResolutionField.vue +1 -0
- package/core/client/components/form/KSelectField.vue +31 -0
- package/core/client/components/form/KTagField.vue +1 -0
- package/core/client/components/form/KTextField.vue +1 -0
- package/core/client/components/form/KTokenField.vue +1 -0
- package/core/client/components/form/KUnitField.vue +1 -0
- package/core/client/components/form/KUrlField.vue +1 -0
- package/core/client/components/graphics/KIcon.vue +3 -4
- package/core/client/components/layout/KPage.vue +1 -0
- package/core/client/components/layout/KWindow.vue +6 -3
- package/core/client/components/messages/KMessageComposer.vue +2 -1
- package/core/client/components/messages/KMessagesTimeLine.vue +1 -1
- package/core/client/components/time/KDate.vue +1 -2
- package/core/client/components/time/KDateTime.vue +11 -11
- package/core/client/components/time/KTime.vue +1 -1
- package/core/client/composables/collection.js +33 -8
- package/core/client/composables/errors.js +1 -1
- package/core/client/composables/layout.js +9 -9
- package/core/client/configurations.js +50 -0
- package/core/client/exporter.js +1 -1
- package/core/client/i18n/core_en.json +6 -39
- package/core/client/i18n/core_fr.json +6 -39
- package/core/client/index.js +2 -0
- package/core/client/layout.js +8 -8
- package/core/client/mixins/mixin.base-activity.js +5 -2
- package/core/client/mixins/mixin.base-field.js +3 -3
- package/core/client/search.js +2 -1
- package/core/client/utils/utils.collection.js +8 -8
- package/core/client/utils/utils.items.js +4 -0
- package/core/client/utils/utils.push.js +3 -3
- package/core/client/utils/utils.session.js +7 -5
- package/core/client/utils/utils.shapes.js +38 -7
- package/core/client/utils/utils.time.js +21 -22
- package/core/common/schemas/users.update-profile.json +3 -2
- package/coverage/core/api/application.js.html +392 -398
- package/coverage/core/api/authentication.js.html +352 -187
- package/coverage/core/api/db.js.html +165 -126
- package/coverage/core/api/hooks/hooks.authentication.js.html +22 -196
- package/coverage/core/api/hooks/hooks.authorisations.js.html +383 -662
- package/coverage/core/api/hooks/hooks.logger.js.html +41 -41
- package/coverage/core/api/hooks/hooks.model.js.html +113 -101
- package/coverage/core/api/hooks/hooks.push.js.html +124 -97
- package/coverage/core/api/hooks/hooks.query.js.html +292 -217
- package/coverage/core/api/hooks/hooks.schemas.js.html +123 -123
- package/coverage/core/api/hooks/hooks.service.js.html +1 -1
- package/coverage/core/api/hooks/hooks.storage.js.html +1 -1
- package/coverage/core/api/hooks/{hooks.groups.js.html → hooks.tags.js.html} +100 -76
- package/coverage/core/api/hooks/hooks.users.js.html +255 -447
- package/coverage/core/api/hooks/index.html +107 -122
- package/coverage/core/api/hooks/index.js.html +4 -10
- package/coverage/core/api/index.html +46 -61
- package/coverage/core/api/index.js.html +9 -9
- package/coverage/core/api/marshall.js.html +9 -9
- package/coverage/core/api/models/{organisations.model.mongodb.js.html → configurations.model.mongodb.js.html} +10 -7
- package/coverage/core/api/models/index.html +35 -50
- package/coverage/core/api/models/messages.model.mongodb.js.html +39 -27
- package/coverage/core/api/models/tags.model.mongodb.js.html +26 -32
- package/coverage/core/api/models/users.model.mongodb.js.html +10 -10
- package/coverage/core/api/services/account/account.hooks.js.html +5 -5
- package/coverage/core/api/services/account/account.service.js.html +127 -127
- package/coverage/core/api/services/account/index.html +22 -22
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +213 -222
- package/coverage/core/api/services/authorisations/index.html +21 -21
- package/coverage/core/api/services/{organisations/organisations.hooks.js.html → configurations/configurations.hooks.js.html} +16 -10
- package/coverage/core/api/services/{groups → configurations}/index.html +8 -8
- package/coverage/core/api/services/databases/databases.hooks.js.html +1 -1
- package/coverage/core/api/services/databases/databases.service.js.html +1 -1
- package/coverage/core/api/services/databases/index.html +1 -1
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +76 -76
- package/coverage/core/api/services/import-export/import-export.service.js.html +32 -32
- package/coverage/core/api/services/import-export/index.html +32 -32
- package/coverage/core/api/services/index.html +21 -21
- package/coverage/core/api/services/index.js.html +313 -142
- package/coverage/core/api/services/mailer/index.html +32 -32
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +80 -80
- package/coverage/core/api/services/mailer/mailer.service.js.html +32 -32
- package/coverage/core/api/services/messages/index.html +21 -21
- package/coverage/core/api/services/messages/messages.hooks.js.html +112 -76
- package/coverage/core/api/services/push/index.html +32 -32
- package/coverage/core/api/services/push/push.hooks.js.html +80 -80
- package/coverage/core/api/services/push/push.service.js.html +34 -34
- package/coverage/core/api/services/storage/index.html +29 -29
- package/coverage/core/api/services/storage/storage.hooks.js.html +80 -80
- package/coverage/core/api/services/storage/storage.service.js.html +29 -29
- package/coverage/core/api/services/tags/index.html +21 -21
- package/coverage/core/api/services/tags/tags.hooks.js.html +119 -71
- package/coverage/core/api/services/users/index.html +27 -12
- package/coverage/core/api/services/users/users.hooks.js.html +14 -11
- package/coverage/core/api/services/users/users.service.js.html +100 -0
- package/coverage/core/common/errors.js.html +1 -1
- package/coverage/core/common/index.html +42 -27
- package/coverage/core/common/index.js.html +1 -1
- package/coverage/core/common/permissions.js.html +166 -472
- package/coverage/core/common/schema.js.html +4 -4
- package/coverage/core/common/utils.js.html +31 -25
- package/coverage/core/common/utils.offline.js.html +199 -0
- package/coverage/index.html +192 -192
- package/coverage/lcov-report/core/api/application.js.html +392 -398
- package/coverage/lcov-report/core/api/authentication.js.html +352 -187
- package/coverage/lcov-report/core/api/db.js.html +165 -126
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +22 -196
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +383 -662
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +41 -41
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +113 -101
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +124 -97
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +292 -217
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +123 -123
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/{hooks.groups.js.html → hooks.tags.js.html} +100 -76
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +255 -447
- package/coverage/lcov-report/core/api/hooks/index.html +107 -122
- package/coverage/lcov-report/core/api/hooks/index.js.html +4 -10
- package/coverage/lcov-report/core/api/index.html +46 -61
- package/coverage/lcov-report/core/api/index.js.html +9 -9
- package/coverage/lcov-report/core/api/marshall.js.html +9 -9
- package/coverage/lcov-report/core/api/models/{organisations.model.mongodb.js.html → configurations.model.mongodb.js.html} +10 -7
- package/coverage/lcov-report/core/api/models/index.html +35 -50
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +39 -27
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +26 -32
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +10 -10
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +5 -5
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +127 -127
- package/coverage/lcov-report/core/api/services/account/index.html +22 -22
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +213 -222
- package/coverage/lcov-report/core/api/services/authorisations/index.html +21 -21
- package/coverage/lcov-report/core/api/services/{groups/groups.hooks.js.html → configurations/configurations.hooks.js.html} +16 -10
- package/coverage/lcov-report/core/api/services/{groups → configurations}/index.html +8 -8
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/databases/index.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +76 -76
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +32 -32
- package/coverage/lcov-report/core/api/services/import-export/index.html +32 -32
- package/coverage/lcov-report/core/api/services/index.html +21 -21
- package/coverage/lcov-report/core/api/services/index.js.html +313 -142
- package/coverage/lcov-report/core/api/services/mailer/index.html +32 -32
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +80 -80
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +32 -32
- package/coverage/lcov-report/core/api/services/messages/index.html +21 -21
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +112 -76
- package/coverage/lcov-report/core/api/services/push/index.html +32 -32
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +80 -80
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +34 -34
- package/coverage/lcov-report/core/api/services/storage/index.html +29 -29
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +80 -80
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +29 -29
- package/coverage/lcov-report/core/api/services/tags/index.html +21 -21
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +119 -71
- package/coverage/lcov-report/core/api/services/users/index.html +27 -12
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +14 -11
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +100 -0
- package/coverage/lcov-report/core/common/errors.js.html +1 -1
- package/coverage/lcov-report/core/common/index.html +42 -27
- package/coverage/lcov-report/core/common/index.js.html +1 -1
- package/coverage/lcov-report/core/common/permissions.js.html +166 -472
- package/coverage/lcov-report/core/common/schema.js.html +4 -4
- package/coverage/lcov-report/core/common/utils.js.html +31 -25
- package/coverage/lcov-report/core/common/utils.offline.js.html +199 -0
- package/coverage/lcov-report/index.html +192 -192
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +169 -31
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +1 -1
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +215 -35
- package/coverage/lcov-report/map/api/hooks/index.html +7 -7
- package/coverage/lcov-report/map/api/hooks/index.js.html +1 -1
- package/coverage/lcov-report/map/api/index.html +1 -1
- package/coverage/lcov-report/map/api/index.js.html +1 -1
- package/coverage/lcov-report/map/api/marshall.js.html +1 -1
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +82 -7
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/index.html +22 -7
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/{core/api/models/groups.model.mongodb.js.html → map/api/models/styles.model.mongodb.js.html} +10 -7
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +1 -1
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/alerts/index.html +1 -1
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +39 -12
- package/coverage/lcov-report/map/api/services/catalog/index.html +5 -5
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/daptiles/index.html +1 -1
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +86 -11
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +307 -4
- package/coverage/lcov-report/map/api/services/features/index.html +7 -7
- package/coverage/lcov-report/map/api/services/index.html +5 -5
- package/coverage/lcov-report/map/api/services/index.js.html +326 -50
- package/coverage/lcov-report/map/api/services/projects/index.html +1 -1
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +1 -1
- package/coverage/{core/api/services/organisations → lcov-report/map/api/services/styles}/index.html +10 -25
- package/coverage/lcov-report/{core/api/services/organisations/organisations.hooks.js.html → map/api/services/styles/styles.hooks.js.html} +45 -12
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/errors.js.html +1 -1
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +7 -10
- package/coverage/lcov-report/map/common/grid.js.html +1 -1
- package/coverage/lcov-report/map/common/index.html +19 -19
- package/coverage/lcov-report/map/common/index.js.html +1 -1
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/moment-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/opendap-utils.js.html +4 -7
- package/coverage/lcov-report/map/common/permissions.js.html +10 -4
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/tms-utils.js.html +9 -12
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +3 -3
- package/coverage/lcov-report/map/common/wcs-utils.js.html +12 -15
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +2 -2
- package/coverage/lcov-report/map/common/wfs-utils.js.html +14 -17
- package/coverage/lcov-report/map/common/wms-utils.js.html +30 -12
- package/coverage/lcov-report/map/common/wmts-utils.js.html +10 -13
- package/coverage/lcov.info +4157 -3816
- package/coverage/map/api/hooks/hooks.catalog.js.html +169 -31
- package/coverage/map/api/hooks/hooks.features.js.html +1 -1
- package/coverage/map/api/hooks/hooks.query.js.html +215 -35
- package/coverage/map/api/hooks/index.html +7 -7
- package/coverage/map/api/hooks/index.js.html +1 -1
- package/coverage/map/api/index.html +1 -1
- package/coverage/map/api/index.js.html +1 -1
- package/coverage/map/api/marshall.js.html +1 -1
- package/coverage/map/api/models/alerts.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/catalog.model.mongodb.js.html +82 -7
- package/coverage/map/api/models/features.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/index.html +22 -7
- package/coverage/map/api/models/projects.model.mongodb.js.html +1 -1
- package/coverage/{core/api/models/groups.model.mongodb.js.html → map/api/models/styles.model.mongodb.js.html} +10 -7
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +1 -1
- package/coverage/map/api/services/alerts/alerts.service.js.html +1 -1
- package/coverage/map/api/services/alerts/index.html +1 -1
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +39 -12
- package/coverage/map/api/services/catalog/index.html +5 -5
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +1 -1
- package/coverage/map/api/services/daptiles/index.html +1 -1
- package/coverage/map/api/services/features/features.hooks.js.html +86 -11
- package/coverage/map/api/services/features/features.service.js.html +307 -4
- package/coverage/map/api/services/features/index.html +7 -7
- package/coverage/map/api/services/index.html +5 -5
- package/coverage/map/api/services/index.js.html +326 -50
- package/coverage/map/api/services/projects/index.html +1 -1
- package/coverage/map/api/services/projects/projects.hooks.js.html +1 -1
- package/coverage/{lcov-report/core/api/services/organisations → map/api/services/styles}/index.html +10 -25
- package/coverage/{core/api/services/groups/groups.hooks.js.html → map/api/services/styles/styles.hooks.js.html} +45 -12
- package/coverage/map/common/dynamic-grid-source.js.html +1 -1
- package/coverage/map/common/errors.js.html +1 -1
- package/coverage/map/common/geotiff-grid-source.js.html +7 -10
- package/coverage/map/common/grid.js.html +1 -1
- package/coverage/map/common/index.html +19 -19
- package/coverage/map/common/index.js.html +1 -1
- package/coverage/map/common/meteo-model-grid-source.js.html +1 -1
- package/coverage/map/common/moment-utils.js.html +1 -1
- package/coverage/map/common/opendap-grid-source.js.html +1 -1
- package/coverage/map/common/opendap-utils.js.html +4 -7
- package/coverage/map/common/permissions.js.html +10 -4
- package/coverage/map/common/time-based-grid-source.js.html +1 -1
- package/coverage/map/common/tms-utils.js.html +9 -12
- package/coverage/map/common/wcs-grid-source.js.html +3 -3
- package/coverage/map/common/wcs-utils.js.html +12 -15
- package/coverage/map/common/weacast-grid-source.js.html +2 -2
- package/coverage/map/common/wfs-utils.js.html +14 -17
- package/coverage/map/common/wms-utils.js.html +30 -12
- package/coverage/map/common/wmts-utils.js.html +10 -13
- package/coverage/tmp/coverage-1028514-1773134124472-0.json +1 -0
- package/coverage/tmp/coverage-1028526-1773134124448-0.json +1 -0
- package/coverage/tmp/coverage-1028537-1773134124431-0.json +1 -0
- package/coverage/tmp/coverage-1028549-1773134124401-0.json +1 -0
- package/coverage/tmp/coverage-1028556-1773134124353-0.json +1 -0
- package/extras/configs/widgets.top.js +3 -3
- package/extras/tests/core/collection.mjs +2 -9
- package/extras/tours/pane.top.js +0 -9
- package/map/api/hooks/hooks.catalog.js +18 -4
- package/map/api/services/catalog/catalog.hooks.js +3 -0
- package/map/api/services/features/features.hooks.js +3 -1
- package/map/api/services/index.js +2 -6
- package/map/api/services/styles/styles.hooks.js +6 -1
- package/map/client/components/KFeatureActionButton.vue +9 -3
- package/map/client/components/KFeaturesFilterManager.vue +5 -5
- package/map/client/components/KFilterCondition.vue +17 -10
- package/map/client/components/KLayerEditor.vue +49 -39
- package/map/client/components/KMeasureTool.vue +7 -1
- package/map/client/components/KTimezoneMap.vue +29 -9
- package/map/client/components/catalog/KLayersPanel.vue +26 -16
- package/map/client/components/catalog/KLayersSelector.vue +13 -2
- package/map/client/components/catalog/KViewsPanel.vue +5 -4
- package/map/client/components/form/KSelectLayersField.vue +28 -17
- package/map/client/components/form/KSelectViewsField.vue +18 -9
- package/map/client/components/form/KTimezoneField.vue +1 -2
- package/map/client/components/legend/KVariablesLegend.vue +10 -1
- package/map/client/components/location/KLocationCardSection.vue +7 -2
- package/map/client/components/location/KLocationMap.vue +31 -7
- package/map/client/components/selection/KSelectedLayerFeatures.vue +2 -2
- package/map/client/components/stickies/KZoomControl.vue +1 -1
- package/map/client/components/styles/KStyleManager.vue +4 -1
- package/map/client/components/widget/KTimeSeries.vue +174 -497
- package/map/client/components/widget/KTimeSeriesSelector.vue +72 -0
- package/map/client/components/widget/KTimeSeriesToolbar.vue +83 -0
- package/map/client/composables/catalog.js +6 -10
- package/map/client/composables/highlight.js +12 -9
- package/map/client/composables/project.js +1 -1
- package/map/client/composables/selection.js +8 -7
- package/map/client/composables/weather.js +9 -2
- package/map/client/geolocation.js +8 -5
- package/map/client/i18n/map_en.json +11 -10
- package/map/client/i18n/map_fr.json +10 -9
- package/map/client/leaflet/TiledFeatureLayer.js +85 -82
- package/map/client/leaflet/utils/utils.geojson.js +3 -3
- package/map/client/mixins/globe/mixin.base-globe.js +15 -6
- package/map/client/mixins/globe/mixin.geojson-layers.js +27 -18
- package/map/client/mixins/map/mixin.edit-layers.js +9 -1
- package/map/client/mixins/map/mixin.pmtiles-layers.js +118 -29
- package/map/client/mixins/map/mixin.tiled-mesh-layers.js +12 -5
- package/map/client/mixins/map/mixin.tiled-wind-layers.js +19 -10
- package/map/client/mixins/mixin.activity.js +23 -30
- package/map/client/mixins/mixin.feature-selection.js +41 -5
- package/map/client/planets.js +1 -1
- package/map/client/readers/reader.kml.js +2 -3
- package/map/client/utils/utils.catalog.js +36 -10
- package/map/client/utils/utils.layers.js +39 -8
- package/map/client/utils/utils.project.js +4 -0
- package/map/client/utils/utils.style.js +37 -7
- package/map/client/utils/utils.time-series.js +215 -6
- package/map/common/schemas/catalog.update.json +1 -1
- package/map/common/weacast-grid-source.js +1 -1
- package/package.json +3 -3
- package/scripts/kash/CHANGELOG.md +0 -4
- package/scripts/kash/README.md +0 -9
- package/scripts/kash/kash.sh +45 -40
- package/scripts/kash/scripts/run_tests.sh +1 -4
- package/test/api/core/authentication.test.js +9 -4
- package/test/api/core/config/default.cjs +1 -0
- package/test/api/core/hooks.test.js +6 -0
- package/test/api/core/index.test.js +43 -18
- package/test/api/core/push.test.js +8 -8
- package/test/api/core/test-log-2026-03-10.log +60 -0
- package/test/api/core/users.test.js +384 -0
- package/test/api/map/grid-sources.test.js +1 -1
- package/test/api/map/test-log-2026-03-10.log +56 -0
- package/vite/package.json +11 -2
- package/vite/test/core/composables.test.js +77 -0
- package/vite/vitest.config.js +13 -0
- package/vite/yarn.lock +1096 -18
- package/.vscode/settings.json +0 -5
- package/core/client/components/account/KAccount.vue +0 -68
- package/core/client/components/account/KDeleteAccountManager.vue +0 -62
- package/core/client/components/account/KEmailManager.vue +0 -128
- package/core/client/components/account/KPasswordManager.vue +0 -90
- package/core/client/components/account/KVerifyEmailManager.vue +0 -105
- package/core/client/components/collection/KColumn.vue +0 -227
- package/core/client/components/collection/KHistory.vue +0 -113
- package/core/client/components/collection/KHistoryEntry.vue +0 -109
- package/coverage/core/api/hooks/hooks.organisations.js.html +0 -541
- package/coverage/core/api/services/organisations/organisations.service.js.html +0 -343
- package/coverage/core/api/utils.js.html +0 -118
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +0 -541
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +0 -343
- package/coverage/lcov-report/core/api/utils.js.html +0 -118
- package/coverage/tmp/coverage-151166-1723543324307-0.json +0 -1
- package/coverage/tmp/coverage-151178-1723543324283-0.json +0 -1
- package/coverage/tmp/coverage-151189-1723543324271-0.json +0 -1
- package/coverage/tmp/coverage-151201-1723543324248-0.json +0 -1
- package/coverage/tmp/coverage-151208-1723543324227-0.json +0 -1
- package/scripts/kash/LICENSE +0 -21
- package/test/api/core/test-log-2024-04-22.log +0 -84
- package/test/api/core/test-log-2024-04-23.log +0 -23
- package/test/api/core/test-log-2024-08-13.log +0 -3
- package/test/api/map/test-log-2025-03-08.log +0 -0
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">65.38% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>17/26</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">50% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>2/4</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>1/1</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">65.38% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>17/26</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line medium'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -91,8 +91,22 @@
|
|
|
91
91
|
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
92
|
<a name='L27'></a><a href='#L27'>27</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
93
93
|
<span class="cline-any cline-yes">1x</span>
|
|
94
|
+
<span class="cline-any cline-yes">14x</span>
|
|
95
|
+
<span class="cline-any cline-yes">14x</span>
|
|
96
|
+
<span class="cline-any cline-yes">14x</span>
|
|
97
|
+
<span class="cline-any cline-yes">14x</span>
|
|
98
|
+
<span class="cline-any cline-yes">14x</span>
|
|
99
|
+
<span class="cline-any cline-yes">14x</span>
|
|
100
|
+
<span class="cline-any cline-yes">14x</span>
|
|
101
|
+
<span class="cline-any cline-yes">14x</span>
|
|
102
|
+
<span class="cline-any cline-yes">14x</span>
|
|
94
103
|
<span class="cline-any cline-no"> </span>
|
|
95
104
|
<span class="cline-any cline-no"> </span>
|
|
105
|
+
<span class="cline-any cline-yes">14x</span>
|
|
106
|
+
<span class="cline-any cline-yes">14x</span>
|
|
107
|
+
<span class="cline-any cline-yes">14x</span>
|
|
108
|
+
<span class="cline-any cline-yes">14x</span>
|
|
109
|
+
<span class="cline-any cline-yes">14x</span>
|
|
96
110
|
<span class="cline-any cline-no"> </span>
|
|
97
111
|
<span class="cline-any cline-no"> </span>
|
|
98
112
|
<span class="cline-any cline-no"> </span>
|
|
@@ -100,39 +114,25 @@
|
|
|
100
114
|
<span class="cline-any cline-no"> </span>
|
|
101
115
|
<span class="cline-any cline-no"> </span>
|
|
102
116
|
<span class="cline-any cline-no"> </span>
|
|
103
|
-
<span class="cline-any cline-
|
|
104
|
-
<span class="cline-any cline-no"> </span>
|
|
105
|
-
<span class="cline-any cline-no"> </span>
|
|
106
|
-
<span class="cline-any cline-no"> </span>
|
|
107
|
-
<span class="cline-any cline-no"> </span>
|
|
108
|
-
<span class="cline-any cline-no"> </span>
|
|
109
|
-
<span class="cline-any cline-no"> </span>
|
|
110
|
-
<span class="cline-any cline-no"> </span>
|
|
111
|
-
<span class="cline-any cline-no"> </span>
|
|
112
|
-
<span class="cline-any cline-no"> </span>
|
|
113
|
-
<span class="cline-any cline-no"> </span>
|
|
114
|
-
<span class="cline-any cline-no"> </span>
|
|
115
|
-
<span class="cline-any cline-no"> </span>
|
|
116
|
-
<span class="cline-any cline-no"> </span>
|
|
117
|
-
<span class="cline-any cline-no"> </span>
|
|
117
|
+
<span class="cline-any cline-yes">14x</span>
|
|
118
118
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">// A hook that logs service method before, after and error
|
|
119
|
-
export
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
<span class="
|
|
119
|
+
export function log (hook) {
|
|
120
|
+
let message = `${hook.type}: ${hook.path} - Method: ${hook.method}`
|
|
121
|
+
|
|
122
|
+
if (hook.type === 'error') {
|
|
123
|
+
message += `: ${hook.error.message}`
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (hook.error) {
|
|
127
|
+
hook.app.logger.error(message, hook.error.stack)
|
|
128
|
+
}<span class="branch-0 cbranch-no" title="branch not covered" > else {</span>
|
|
129
129
|
<span class="cstat-no" title="statement not covered" > hook.app.logger.debug(message)</span>
|
|
130
130
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<span class="
|
|
131
|
+
|
|
132
|
+
// Required as the logger causes high CPU usage to serialize messages
|
|
133
|
+
// even if the current log level should discard it
|
|
134
|
+
// See https://github.com/kalisio/kdk/issues/287
|
|
135
|
+
if (process.env.NODE_ENV === 'development') <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
136
136
|
<span class="cstat-no" title="statement not covered" > hook.app.logger.silly('hook.data', hook.data)</span>
|
|
137
137
|
<span class="cstat-no" title="statement not covered" > hook.app.logger.silly('hook.params', hook.params)</span>
|
|
138
138
|
<span class="cstat-no" title="statement not covered" ></span>
|
|
@@ -140,7 +140,7 @@ export <span class="fstat-no" title="function not covered" >function log (hook)
|
|
|
140
140
|
<span class="cstat-no" title="statement not covered" > hook.app.logger.silly('hook.result', hook.result)</span>
|
|
141
141
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
142
142
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
143
|
-
|
|
143
|
+
}
|
|
144
144
|
</pre></td></tr></table></pre>
|
|
145
145
|
|
|
146
146
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -148,7 +148,7 @@ export <span class="fstat-no" title="function not covered" >function log (hook)
|
|
|
148
148
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
149
149
|
Code coverage generated by
|
|
150
150
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
151
|
-
at
|
|
151
|
+
at 2026-03-10T09:15:24.774Z
|
|
152
152
|
</div>
|
|
153
153
|
<script src="../../../prettify.js"></script>
|
|
154
154
|
<script>
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">77.55% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>228/294</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">60% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>39/65</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">58.82% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>10/17</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">77.55% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>228/294</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -353,7 +353,11 @@
|
|
|
353
353
|
<a name='L288'></a><a href='#L288'>288</a>
|
|
354
354
|
<a name='L289'></a><a href='#L289'>289</a>
|
|
355
355
|
<a name='L290'></a><a href='#L290'>290</a>
|
|
356
|
-
<a name='L291'></a><a href='#L291'>291</a
|
|
356
|
+
<a name='L291'></a><a href='#L291'>291</a>
|
|
357
|
+
<a name='L292'></a><a href='#L292'>292</a>
|
|
358
|
+
<a name='L293'></a><a href='#L293'>293</a>
|
|
359
|
+
<a name='L294'></a><a href='#L294'>294</a>
|
|
360
|
+
<a name='L295'></a><a href='#L295'>295</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
357
361
|
<span class="cline-any cline-yes">1x</span>
|
|
358
362
|
<span class="cline-any cline-yes">1x</span>
|
|
359
363
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -397,30 +401,30 @@
|
|
|
397
401
|
<span class="cline-any cline-yes">1x</span>
|
|
398
402
|
<span class="cline-any cline-yes">1x</span>
|
|
399
403
|
<span class="cline-any cline-yes">1x</span>
|
|
400
|
-
<span class="cline-any cline-yes">
|
|
401
|
-
<span class="cline-any cline-
|
|
402
|
-
<span class="cline-any cline-
|
|
403
|
-
<span class="cline-any cline-
|
|
404
|
-
<span class="cline-any cline-
|
|
405
|
-
<span class="cline-any cline-
|
|
406
|
-
<span class="cline-any cline-
|
|
407
|
-
<span class="cline-any cline-
|
|
408
|
-
<span class="cline-any cline-
|
|
409
|
-
<span class="cline-any cline-
|
|
410
|
-
<span class="cline-any cline-
|
|
411
|
-
<span class="cline-any cline-
|
|
412
|
-
<span class="cline-any cline-
|
|
413
|
-
<span class="cline-any cline-
|
|
414
|
-
<span class="cline-any cline-
|
|
415
|
-
<span class="cline-any cline-
|
|
416
|
-
<span class="cline-any cline-no"> </span>
|
|
417
|
-
<span class="cline-any cline-no"> </span>
|
|
418
|
-
<span class="cline-any cline-no"> </span>
|
|
419
|
-
<span class="cline-any cline-no"> </span>
|
|
420
|
-
<span class="cline-any cline-no"> </span>
|
|
404
|
+
<span class="cline-any cline-yes">3x</span>
|
|
405
|
+
<span class="cline-any cline-yes">20x</span>
|
|
406
|
+
<span class="cline-any cline-yes">20x</span>
|
|
407
|
+
<span class="cline-any cline-yes">20x</span>
|
|
408
|
+
<span class="cline-any cline-yes">20x</span>
|
|
409
|
+
<span class="cline-any cline-yes">20x</span>
|
|
410
|
+
<span class="cline-any cline-yes">20x</span>
|
|
411
|
+
<span class="cline-any cline-yes">20x</span>
|
|
412
|
+
<span class="cline-any cline-yes">30x</span>
|
|
413
|
+
<span class="cline-any cline-yes">30x</span>
|
|
414
|
+
<span class="cline-any cline-yes">27x</span>
|
|
415
|
+
<span class="cline-any cline-yes">27x</span>
|
|
416
|
+
<span class="cline-any cline-yes">27x</span>
|
|
417
|
+
<span class="cline-any cline-yes">10x</span>
|
|
418
|
+
<span class="cline-any cline-yes">10x</span>
|
|
419
|
+
<span class="cline-any cline-yes">30x</span>
|
|
421
420
|
<span class="cline-any cline-no"> </span>
|
|
422
421
|
<span class="cline-any cline-no"> </span>
|
|
423
|
-
<span class="cline-any cline-yes">
|
|
422
|
+
<span class="cline-any cline-yes">20x</span>
|
|
423
|
+
<span class="cline-any cline-yes">20x</span>
|
|
424
|
+
<span class="cline-any cline-yes">20x</span>
|
|
425
|
+
<span class="cline-any cline-yes">20x</span>
|
|
426
|
+
<span class="cline-any cline-yes">20x</span>
|
|
427
|
+
<span class="cline-any cline-yes">3x</span>
|
|
424
428
|
<span class="cline-any cline-yes">1x</span>
|
|
425
429
|
<span class="cline-any cline-yes">1x</span>
|
|
426
430
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -532,19 +536,18 @@
|
|
|
532
536
|
<span class="cline-any cline-no"> </span>
|
|
533
537
|
<span class="cline-any cline-yes">1x</span>
|
|
534
538
|
<span class="cline-any cline-yes">1x</span>
|
|
539
|
+
<span class="cline-any cline-yes">5x</span>
|
|
535
540
|
<span class="cline-any cline-no"> </span>
|
|
536
541
|
<span class="cline-any cline-no"> </span>
|
|
537
|
-
<span class="cline-any cline-
|
|
538
|
-
<span class="cline-any cline-
|
|
539
|
-
<span class="cline-any cline-
|
|
540
|
-
<span class="cline-any cline-
|
|
541
|
-
<span class="cline-any cline-
|
|
542
|
-
<span class="cline-any cline-
|
|
543
|
-
<span class="cline-any cline-
|
|
544
|
-
<span class="cline-any cline-
|
|
545
|
-
<span class="cline-any cline-
|
|
546
|
-
<span class="cline-any cline-no"> </span>
|
|
547
|
-
<span class="cline-any cline-yes">1x</span>
|
|
542
|
+
<span class="cline-any cline-yes">5x</span>
|
|
543
|
+
<span class="cline-any cline-yes">5x</span>
|
|
544
|
+
<span class="cline-any cline-yes">5x</span>
|
|
545
|
+
<span class="cline-any cline-yes">5x</span>
|
|
546
|
+
<span class="cline-any cline-yes">5x</span>
|
|
547
|
+
<span class="cline-any cline-yes">5x</span>
|
|
548
|
+
<span class="cline-any cline-yes">5x</span>
|
|
549
|
+
<span class="cline-any cline-yes">5x</span>
|
|
550
|
+
<span class="cline-any cline-yes">5x</span>
|
|
548
551
|
<span class="cline-any cline-yes">1x</span>
|
|
549
552
|
<span class="cline-any cline-yes">1x</span>
|
|
550
553
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -559,6 +562,7 @@
|
|
|
559
562
|
<span class="cline-any cline-yes">1x</span>
|
|
560
563
|
<span class="cline-any cline-yes">1x</span>
|
|
561
564
|
<span class="cline-any cline-yes">1x</span>
|
|
565
|
+
<span class="cline-any cline-yes">2x</span>
|
|
562
566
|
<span class="cline-any cline-yes">1x</span>
|
|
563
567
|
<span class="cline-any cline-no"> </span>
|
|
564
568
|
<span class="cline-any cline-no"> </span>
|
|
@@ -573,7 +577,7 @@
|
|
|
573
577
|
<span class="cline-any cline-yes">1x</span>
|
|
574
578
|
<span class="cline-any cline-yes">1x</span>
|
|
575
579
|
<span class="cline-any cline-yes">1x</span>
|
|
576
|
-
<span class="cline-any cline-yes">
|
|
580
|
+
<span class="cline-any cline-yes">2x</span>
|
|
577
581
|
<span class="cline-any cline-yes">1x</span>
|
|
578
582
|
<span class="cline-any cline-yes">1x</span>
|
|
579
583
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -587,15 +591,16 @@
|
|
|
587
591
|
<span class="cline-any cline-yes">1x</span>
|
|
588
592
|
<span class="cline-any cline-yes">1x</span>
|
|
589
593
|
<span class="cline-any cline-yes">1x</span>
|
|
590
|
-
<span class="cline-any cline-yes">
|
|
591
|
-
<span class="cline-any cline-yes">
|
|
592
|
-
<span class="cline-any cline-yes">4x</span>
|
|
593
|
-
<span class="cline-any cline-yes">4x</span>
|
|
594
|
-
<span class="cline-any cline-yes">4x</span>
|
|
595
|
-
<span class="cline-any cline-yes">4x</span>
|
|
594
|
+
<span class="cline-any cline-yes">7x</span>
|
|
595
|
+
<span class="cline-any cline-yes">6x</span>
|
|
596
596
|
<span class="cline-any cline-yes">2x</span>
|
|
597
597
|
<span class="cline-any cline-yes">2x</span>
|
|
598
598
|
<span class="cline-any cline-yes">2x</span>
|
|
599
|
+
<span class="cline-any cline-yes">6x</span>
|
|
600
|
+
<span class="cline-any cline-yes">6x</span>
|
|
601
|
+
<span class="cline-any cline-yes">6x</span>
|
|
602
|
+
<span class="cline-any cline-yes">6x</span>
|
|
603
|
+
<span class="cline-any cline-yes">6x</span>
|
|
599
604
|
<span class="cline-any cline-yes">2x</span>
|
|
600
605
|
<span class="cline-any cline-yes">2x</span>
|
|
601
606
|
<span class="cline-any cline-yes">2x</span>
|
|
@@ -607,42 +612,45 @@
|
|
|
607
612
|
<span class="cline-any cline-yes">2x</span>
|
|
608
613
|
<span class="cline-any cline-yes">2x</span>
|
|
609
614
|
<span class="cline-any cline-yes">2x</span>
|
|
610
|
-
<span class="cline-any cline-yes">1x</span>
|
|
611
615
|
<span class="cline-any cline-yes">2x</span>
|
|
612
616
|
<span class="cline-any cline-yes">2x</span>
|
|
613
617
|
<span class="cline-any cline-yes">2x</span>
|
|
618
|
+
<span class="cline-any cline-yes">1x</span>
|
|
619
|
+
<span class="cline-any cline-yes">2x</span>
|
|
620
|
+
<span class="cline-any cline-yes">2x</span>
|
|
614
621
|
<span class="cline-any cline-yes">2x</span>
|
|
615
622
|
<span class="cline-any cline-yes">2x</span>
|
|
616
623
|
<span class="cline-any cline-yes">4x</span>
|
|
617
|
-
<span class="cline-any cline-yes">
|
|
624
|
+
<span class="cline-any cline-yes">6x</span>
|
|
625
|
+
<span class="cline-any cline-yes">7x</span>
|
|
618
626
|
<span class="cline-any cline-yes">1x</span>
|
|
619
627
|
<span class="cline-any cline-yes">1x</span>
|
|
620
628
|
<span class="cline-any cline-yes">1x</span>
|
|
621
629
|
<span class="cline-any cline-yes">1x</span>
|
|
622
630
|
<span class="cline-any cline-yes">1x</span>
|
|
623
|
-
<span class="cline-any cline-yes">
|
|
624
|
-
<span class="cline-any cline-yes">
|
|
631
|
+
<span class="cline-any cline-yes">4x</span>
|
|
632
|
+
<span class="cline-any cline-yes">9x</span>
|
|
625
633
|
<span class="cline-any cline-no"> </span>
|
|
626
634
|
<span class="cline-any cline-no"> </span>
|
|
627
|
-
<span class="cline-any cline-yes">
|
|
628
|
-
<span class="cline-any cline-yes">
|
|
629
|
-
<span class="cline-any cline-yes">
|
|
630
|
-
<span class="cline-any cline-yes">
|
|
635
|
+
<span class="cline-any cline-yes">9x</span>
|
|
636
|
+
<span class="cline-any cline-yes">9x</span>
|
|
637
|
+
<span class="cline-any cline-yes">9x</span>
|
|
638
|
+
<span class="cline-any cline-yes">9x</span>
|
|
639
|
+
<span class="cline-any cline-yes">13x</span>
|
|
640
|
+
<span class="cline-any cline-yes">16x</span>
|
|
641
|
+
<span class="cline-any cline-yes">16x</span>
|
|
631
642
|
<span class="cline-any cline-yes">7x</span>
|
|
632
|
-
<span class="cline-any cline-yes">10x</span>
|
|
633
|
-
<span class="cline-any cline-yes">10x</span>
|
|
634
643
|
<span class="cline-any cline-yes">4x</span>
|
|
635
|
-
<span class="cline-any cline-yes">
|
|
636
|
-
<span class="cline-any cline-yes">1x</span>
|
|
637
|
-
<span class="cline-any cline-yes">3x</span>
|
|
638
|
-
<span class="cline-any cline-yes">3x</span>
|
|
639
|
-
<span class="cline-any cline-yes">7x</span>
|
|
640
|
-
<span class="cline-any cline-yes">3x</span>
|
|
641
|
-
<span class="cline-any cline-yes">3x</span>
|
|
642
|
-
<span class="cline-any cline-yes">3x</span>
|
|
643
|
-
<span class="cline-any cline-yes">3x</span>
|
|
644
|
+
<span class="cline-any cline-yes">4x</span>
|
|
644
645
|
<span class="cline-any cline-yes">3x</span>
|
|
645
646
|
<span class="cline-any cline-yes">3x</span>
|
|
647
|
+
<span class="cline-any cline-yes">13x</span>
|
|
648
|
+
<span class="cline-any cline-yes">9x</span>
|
|
649
|
+
<span class="cline-any cline-yes">9x</span>
|
|
650
|
+
<span class="cline-any cline-yes">9x</span>
|
|
651
|
+
<span class="cline-any cline-yes">9x</span>
|
|
652
|
+
<span class="cline-any cline-yes">9x</span>
|
|
653
|
+
<span class="cline-any cline-yes">4x</span>
|
|
646
654
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import _ from 'lodash'
|
|
647
655
|
import siftModule from 'sift'
|
|
648
656
|
import moment from 'moment'
|
|
@@ -688,28 +696,28 @@ export <span class="fstat-no" title="function not covered" >function unprocessTi
|
|
|
688
696
|
// - delete: a flag to define whether the hook has to delete the source property
|
|
689
697
|
export function serialize (rules, options = {}) {
|
|
690
698
|
return function (hook) {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
<span class="
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
<span class="
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
<span class="
|
|
699
|
+
// Retrieve the items from the hook
|
|
700
|
+
let items = getItems(hook)
|
|
701
|
+
const isArray = Array.isArray(items)
|
|
702
|
+
items = (isArray <span class="branch-0 cbranch-no" title="branch not covered" >? items </span>: [items])
|
|
703
|
+
// Apply the rules for each item
|
|
704
|
+
items.forEach(item => {
|
|
705
|
+
rules.forEach(rule => {
|
|
706
|
+
let source = _.get(item, rule.source)
|
|
707
|
+
if (!_.isNil(source)) {
|
|
708
|
+
if (rule.filter) <span class="branch-0 cbranch-no" title="branch not covered" >source = source.filter(sift(rule.filter))</span>
|
|
709
|
+
_.set(item, rule.target, source)
|
|
710
|
+
if (rule.delete) {
|
|
711
|
+
_.unset(item, rule.source)
|
|
712
|
+
}
|
|
713
|
+
} else if (options.throwOnNotFound || rule.throwOnNotFound) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
706
714
|
<span class="cstat-no" title="statement not covered" > throw new Error('Cannot find valid input value for property ' + rule.target)</span>
|
|
707
715
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
<span class="
|
|
712
|
-
|
|
716
|
+
})
|
|
717
|
+
})
|
|
718
|
+
// Replace the items within the hook
|
|
719
|
+
replaceItems(hook, isArray <span class="branch-0 cbranch-no" title="branch not covered" >? items </span>: items[0])
|
|
720
|
+
}
|
|
713
721
|
}
|
|
714
722
|
|
|
715
723
|
// This hook allows to transform the values bound to '_id' like keys or
|
|
@@ -821,19 +829,19 @@ export <span class="fstat-no" title="function not covered" >function convertToSt
|
|
|
821
829
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
822
830
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
823
831
|
|
|
824
|
-
export
|
|
825
|
-
<span class="
|
|
832
|
+
export async function populatePreviousObject (hook) {
|
|
833
|
+
if (hook.type !== 'before') <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
826
834
|
<span class="cstat-no" title="statement not covered" > throw new Error('The \'populatePreviousObject\' hook should only be used as a \'before\' hook.')</span>
|
|
827
835
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
828
|
-
|
|
829
|
-
<span class="
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
836
|
+
const item = getItems(hook)
|
|
837
|
+
const id = (hook.id ? hook.id <span class="branch-0 cbranch-no" title="branch not covered" >: _.get(item, '_id'))</span>
|
|
838
|
+
// Retrieve previous version of the item and make it available to next hooks
|
|
839
|
+
if (id) {
|
|
840
|
+
hook.params.previousItem = await hook.service.get(id.toString())
|
|
841
|
+
debug('Populated previous object', hook.params.previousItem)
|
|
842
|
+
}
|
|
843
|
+
return hook
|
|
844
|
+
}
|
|
837
845
|
|
|
838
846
|
export function setAsDeleted (hook) {
|
|
839
847
|
// Retrieve the items from the hook
|
|
@@ -869,7 +877,7 @@ export function setExpireAfter (delayInSeconds) {
|
|
|
869
877
|
export <span class="fstat-no" title="function not covered" >async function distinct (hook) {</span>
|
|
870
878
|
<span class="cstat-no" title="statement not covered" > const params = hook.params</span>
|
|
871
879
|
<span class="cstat-no" title="statement not covered" > const query = params.query</span>
|
|
872
|
-
<span class="cstat-no" title="statement not covered" > if (!query.$distinct) return hook</span>
|
|
880
|
+
<span class="cstat-no" title="statement not covered" > if (!query || !query.$distinct) return hook</span>
|
|
873
881
|
<span class="cstat-no" title="statement not covered" > const collection = hook.service.Model</span>
|
|
874
882
|
<span class="cstat-no" title="statement not covered" > hook.result = await collection.distinct(query.$distinct, _.omit(query, ['$distinct']))</span>
|
|
875
883
|
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
@@ -878,6 +886,10 @@ export <span class="fstat-no" title="function not covered" >async function disti
|
|
|
878
886
|
// Check for already existing object according to given service/id field
|
|
879
887
|
export function checkUnique (options = {}) {
|
|
880
888
|
return async (hook) => {
|
|
889
|
+
if (hook.app) {
|
|
890
|
+
const serviceConfig = hook.app.get(hook.service.name)
|
|
891
|
+
if (serviceConfig && serviceConfig.checkUnique) <span class="branch-0 cbranch-no" title="branch not covered" >options = serviceConfig.checkUnique</span>
|
|
892
|
+
}
|
|
881
893
|
const service = (options.service <span class="branch-0 cbranch-no" title="branch not covered" >? hook.app.getService(options.service) </span>: hook.service)
|
|
882
894
|
const field = options.field <span class="branch-0 cbranch-no" title="branch not covered" >|| 'name'</span>
|
|
883
895
|
const id = _.get(hook, `data.${field}`)
|
|
@@ -940,7 +952,7 @@ export function preventChanges (ifThrow, fieldNames) {
|
|
|
940
952
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
941
953
|
Code coverage generated by
|
|
942
954
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
943
|
-
at
|
|
955
|
+
at 2026-03-10T09:15:24.774Z
|
|
944
956
|
</div>
|
|
945
957
|
<script src="../../../prettify.js"></script>
|
|
946
958
|
<script>
|