@kalisio/kdk 2.5.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/api/hooks/hooks.authorisations.js +1 -2
- package/core/api/services/authorisations/authorisations.service.js +1 -3
- package/core/api/services/index.js +5 -1
- package/core/api/services/users/users.hooks.js +4 -3
- package/core/client/utils/index.js +1 -0
- package/coverage/core/api/application.js.html +1 -1
- package/coverage/core/api/authentication.js.html +1 -1
- package/coverage/core/api/db.js.html +1 -1
- package/coverage/core/api/hooks/hooks.authentication.js.html +1 -1
- package/coverage/core/api/hooks/hooks.authorisations.js.html +44 -50
- package/coverage/core/api/hooks/hooks.groups.js.html +1 -1
- package/coverage/core/api/hooks/hooks.logger.js.html +1 -1
- package/coverage/core/api/hooks/hooks.model.js.html +8 -20
- package/coverage/core/api/hooks/hooks.organisations.js.html +1 -1
- package/coverage/core/api/hooks/hooks.push.js.html +23 -23
- package/coverage/core/api/hooks/hooks.query.js.html +9 -9
- package/coverage/core/api/hooks/hooks.schemas.js.html +1 -1
- 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.users.js.html +4 -4
- package/coverage/core/api/hooks/index.html +24 -24
- package/coverage/core/api/hooks/index.js.html +1 -1
- package/coverage/core/api/index.html +5 -5
- package/coverage/core/api/index.js.html +1 -1
- package/coverage/core/api/marshall.js.html +9 -9
- package/coverage/core/api/models/groups.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/index.html +1 -1
- package/coverage/core/api/models/messages.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/organisations.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/tags.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/users.model.mongodb.js.html +1 -1
- package/coverage/core/api/services/account/account.hooks.js.html +1 -1
- package/coverage/core/api/services/account/account.service.js.html +1 -1
- package/coverage/core/api/services/account/index.html +1 -1
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +50 -44
- package/coverage/core/api/services/authorisations/index.html +18 -18
- 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/groups/groups.hooks.js.html +1 -1
- package/coverage/core/api/services/groups/index.html +1 -1
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +1 -1
- package/coverage/core/api/services/import-export/import-export.service.js.html +1 -1
- package/coverage/core/api/services/import-export/index.html +1 -1
- package/coverage/core/api/services/index.html +1 -1
- package/coverage/core/api/services/index.js.html +1 -1
- package/coverage/core/api/services/mailer/index.html +1 -1
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +1 -1
- package/coverage/core/api/services/mailer/mailer.service.js.html +1 -1
- package/coverage/core/api/services/messages/index.html +5 -5
- package/coverage/core/api/services/messages/messages.hooks.js.html +8 -11
- package/coverage/core/api/services/organisations/index.html +1 -1
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +1 -1
- package/coverage/core/api/services/organisations/organisations.service.js.html +1 -1
- package/coverage/core/api/services/push/index.html +1 -1
- package/coverage/core/api/services/push/push.hooks.js.html +1 -1
- package/coverage/core/api/services/push/push.service.js.html +1 -1
- package/coverage/core/api/services/storage/index.html +1 -1
- package/coverage/core/api/services/storage/storage.hooks.js.html +1 -1
- package/coverage/core/api/services/storage/storage.service.js.html +1 -1
- package/coverage/core/api/services/tags/index.html +1 -1
- package/coverage/core/api/services/tags/tags.hooks.js.html +1 -1
- package/coverage/core/api/services/users/index.html +1 -1
- package/coverage/core/api/services/users/users.hooks.js.html +1 -1
- package/coverage/core/api/services/users/users.service.js.html +1 -1
- package/coverage/core/api/utils.js.html +1 -1
- package/coverage/core/common/errors.js.html +1 -1
- package/coverage/core/common/index.html +1 -1
- package/coverage/core/common/index.js.html +1 -1
- package/coverage/core/common/permissions.js.html +1 -1
- package/coverage/core/common/schema.js.html +1 -1
- package/coverage/core/common/utils.js.html +1 -1
- package/coverage/core/common/utils.offline.js.html +1 -1
- package/coverage/index.html +41 -56
- package/coverage/lcov-report/core/api/application.js.html +1 -1
- package/coverage/lcov-report/core/api/authentication.js.html +1 -1
- package/coverage/lcov-report/core/api/db.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +44 -50
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +8 -20
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +23 -23
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +9 -9
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +1 -1
- 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.users.js.html +4 -4
- package/coverage/lcov-report/core/api/hooks/index.html +24 -24
- package/coverage/lcov-report/core/api/hooks/index.js.html +1 -1
- package/coverage/lcov-report/core/api/index.html +5 -5
- package/coverage/lcov-report/core/api/index.js.html +1 -1
- package/coverage/lcov-report/core/api/marshall.js.html +9 -9
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/index.html +1 -1
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/account/index.html +1 -1
- 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 +50 -44
- package/coverage/lcov-report/core/api/services/authorisations/index.html +18 -18
- 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/groups/groups.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/groups/index.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/index.html +1 -1
- package/coverage/lcov-report/core/api/services/index.html +1 -1
- package/coverage/lcov-report/core/api/services/index.js.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/index.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/messages/index.html +5 -5
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +8 -11
- package/coverage/lcov-report/core/api/services/organisations/index.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/push/index.html +1 -1
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/index.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/tags/index.html +1 -1
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/users/index.html +1 -1
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +1 -1
- package/coverage/lcov-report/core/api/utils.js.html +1 -1
- package/coverage/lcov-report/core/common/errors.js.html +1 -1
- package/coverage/lcov-report/core/common/index.html +1 -1
- package/coverage/lcov-report/core/common/index.js.html +1 -1
- package/coverage/lcov-report/core/common/permissions.js.html +1 -1
- package/coverage/lcov-report/core/common/schema.js.html +1 -1
- package/coverage/lcov-report/core/common/utils.js.html +1 -1
- package/coverage/lcov-report/core/common/utils.offline.js.html +1 -1
- package/coverage/lcov-report/index.html +41 -56
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +6 -96
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +1 -1
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +43 -19
- 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 +7 -49
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/index.html +7 -22
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +1 -1
- 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 +9 -24
- 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 +1 -1
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/features/index.html +1 -1
- package/coverage/lcov-report/map/api/services/index.html +5 -5
- package/coverage/lcov-report/map/api/services/index.js.html +18 -126
- 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/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 +1 -1
- package/coverage/lcov-report/map/common/grid.js.html +1 -1
- package/coverage/lcov-report/map/common/index.html +5 -5
- 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 +1 -1
- package/coverage/lcov-report/map/common/permissions.js.html +4 -10
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/tms-utils.js.html +6 -6
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +3 -3
- package/coverage/lcov-report/map/common/wcs-utils.js.html +9 -9
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/wfs-utils.js.html +11 -11
- package/coverage/lcov-report/map/common/wms-utils.js.html +8 -8
- package/coverage/lcov-report/map/common/wmts-utils.js.html +7 -7
- package/coverage/lcov.info +349 -505
- package/coverage/map/api/hooks/hooks.catalog.js.html +6 -96
- package/coverage/map/api/hooks/hooks.features.js.html +1 -1
- package/coverage/map/api/hooks/hooks.query.js.html +43 -19
- 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 +7 -49
- package/coverage/map/api/models/features.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/index.html +7 -22
- package/coverage/map/api/models/projects.model.mongodb.js.html +1 -1
- 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 +9 -24
- 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 +1 -1
- package/coverage/map/api/services/features/features.service.js.html +1 -1
- package/coverage/map/api/services/features/index.html +1 -1
- package/coverage/map/api/services/index.html +5 -5
- package/coverage/map/api/services/index.js.html +18 -126
- package/coverage/map/api/services/projects/index.html +1 -1
- package/coverage/map/api/services/projects/projects.hooks.js.html +1 -1
- 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 +1 -1
- package/coverage/map/common/grid.js.html +1 -1
- package/coverage/map/common/index.html +5 -5
- 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 +1 -1
- package/coverage/map/common/permissions.js.html +4 -10
- package/coverage/map/common/time-based-grid-source.js.html +1 -1
- package/coverage/map/common/tms-utils.js.html +6 -6
- package/coverage/map/common/wcs-grid-source.js.html +3 -3
- package/coverage/map/common/wcs-utils.js.html +9 -9
- package/coverage/map/common/weacast-grid-source.js.html +1 -1
- package/coverage/map/common/wfs-utils.js.html +11 -11
- package/coverage/map/common/wms-utils.js.html +8 -8
- package/coverage/map/common/wmts-utils.js.html +7 -7
- package/coverage/tmp/coverage-122123-1739872365211-0.json +1 -0
- package/coverage/tmp/coverage-122135-1739872365196-0.json +1 -0
- package/coverage/tmp/coverage-122146-1739872365184-0.json +1 -0
- package/coverage/tmp/coverage-122158-1739872365169-0.json +1 -0
- package/coverage/tmp/coverage-122165-1739872365141-0.json +1 -0
- package/map/api/hooks/hooks.query.js +7 -4
- package/map/client/components/stickies/KAttribution.vue +8 -7
- package/map/client/i18n/map_fr.json +1 -1
- package/map/client/leaflet/utils/utils.geojson.js +5 -4
- package/package.json +1 -1
- package/test/api/core/index.test.js +49 -60
- package/test/api/core/test-log-2025-05-26.log +22 -0
- package/test/api/map/test-log-2025-05-26.log +12 -0
- package/coverage/lcov-report/map/api/models/styles.model.mongodb.js.html +0 -112
- package/coverage/lcov-report/map/api/services/styles/index.html +0 -116
- package/coverage/lcov-report/map/api/services/styles/styles.hooks.js.html +0 -196
- package/coverage/map/api/models/styles.model.mongodb.js.html +0 -112
- package/coverage/map/api/services/styles/index.html +0 -116
- package/coverage/map/api/services/styles/styles.hooks.js.html +0 -196
- package/coverage/tmp/coverage-323534-1747828879483-0.json +0 -1
- package/coverage/tmp/coverage-323546-1747828879453-0.json +0 -1
- package/coverage/tmp/coverage-323557-1747828879439-0.json +0 -1
- package/coverage/tmp/coverage-323569-1747828879416-0.json +0 -1
- package/coverage/tmp/coverage-323576-1747828879390-0.json +0 -1
- package/test/api/core/test-log-2025-02-05.log +0 -23
- package/test/api/core/test-log-2025-05-21.log +0 -15
|
@@ -355,14 +355,16 @@ export async function aggregateFeaturesQuery (hook) {
|
|
|
355
355
|
// Delete accumulator
|
|
356
356
|
_.unset(result, element)
|
|
357
357
|
}
|
|
358
|
-
// Keep track of result in map to improve search later
|
|
359
|
-
const resultKeys = keys.map(key => _.get(singleTime ? result : result._id, key))
|
|
360
|
-
const resultKey = resultKeys.join('-')
|
|
361
|
-
if (!aggregatedResultsMap.has(resultKey)) aggregatedResultsMap.set(resultKey, result)
|
|
362
358
|
})
|
|
363
359
|
// Now merge with previous element results
|
|
364
360
|
if (!aggregatedResults) {
|
|
365
361
|
aggregatedResults = elementResults
|
|
362
|
+
aggregatedResults.forEach(result => {
|
|
363
|
+
// Keep track of result in map to improve search later
|
|
364
|
+
const resultKeys = keys.map(key => _.get(singleTime ? result : result._id, key))
|
|
365
|
+
const resultKey = resultKeys.join('-')
|
|
366
|
+
aggregatedResultsMap.set(resultKey, result)
|
|
367
|
+
})
|
|
366
368
|
} else {
|
|
367
369
|
elementResults.forEach(result => {
|
|
368
370
|
// When single time no aggregation is performed at all so we only have raw features
|
|
@@ -385,6 +387,7 @@ export async function aggregateFeaturesQuery (hook) {
|
|
|
385
387
|
_.set(previousResult, prefix + element, _.get(result, prefix + element))
|
|
386
388
|
} else {
|
|
387
389
|
aggregatedResults.push(result)
|
|
390
|
+
aggregatedResultsMap.set(resultKey, result)
|
|
388
391
|
}
|
|
389
392
|
})
|
|
390
393
|
}
|
|
@@ -64,17 +64,18 @@ import KShape from '../../../../core/client/components/media/KShape.vue'
|
|
|
64
64
|
// Data
|
|
65
65
|
const { CurrentActivity } = useCurrentActivity({ selection: false, probe: false })
|
|
66
66
|
const attributions = ref({})
|
|
67
|
-
const header =
|
|
68
|
-
const headerClass =
|
|
69
|
-
const footer =
|
|
70
|
-
const footerClass =
|
|
67
|
+
const header = _.get(config, 'attribution.header', [])
|
|
68
|
+
const headerClass = _.get(config, 'attribution.headerClass', '')
|
|
69
|
+
const footer = _.get(config, 'attribution.footer', [])
|
|
70
|
+
const footerClass = _.get(config, 'attribution.footerClass', '')
|
|
71
71
|
|
|
72
72
|
// Computed
|
|
73
73
|
const sanitizedAttributions = computed(() => {
|
|
74
|
-
|
|
75
|
-
_.
|
|
74
|
+
const filteredAttributions = _.uniq(_.map(attributions.value))
|
|
75
|
+
const content = _.reduce(filteredAttributions, (content, attribution) => {
|
|
76
76
|
content += `${attribution}<br>`
|
|
77
|
-
|
|
77
|
+
return content
|
|
78
|
+
}, '')
|
|
78
79
|
return Document.sanitizeHtml(content)
|
|
79
80
|
})
|
|
80
81
|
|
|
@@ -375,7 +375,7 @@
|
|
|
375
375
|
},
|
|
376
376
|
"side-nav": {
|
|
377
377
|
"HELP_LABEL": "Accédez à notre aide en ligne à tout moment",
|
|
378
|
-
"CONTEXT_HELP_LABEL": "Pour obtenir de l'aide contextuelle lorsque vous êtes perdu cliquez à tout moment cette
|
|
378
|
+
"CONTEXT_HELP_LABEL": "Pour obtenir de l'aide contextuelle lorsque vous êtes perdu, cliquez à tout moment sur cette icône",
|
|
379
379
|
"ABOUT_LABEL": "Affichez les informations détaillées du système et signalez-nous une anomalie.",
|
|
380
380
|
"BUG_LABEL": "Signalez-nous une anomalie via un email contenant automatiquement les informations nécessaires.",
|
|
381
381
|
"SETTINGS_LABEL": "Modifiez les paramètres généraux du système sur votre appareil.",
|
|
@@ -93,14 +93,13 @@ export function getUpdateFeatureFunction(leafletOptions) {
|
|
|
93
93
|
if (!oldLayer) return
|
|
94
94
|
const oldType = _.get(oldLayer, 'feature.geometry.type')
|
|
95
95
|
const type = _.get(feature, 'geometry.type')
|
|
96
|
-
// The feature is changing its geometry type, recreate it
|
|
97
|
-
if (type !== oldType) return
|
|
98
96
|
const staticGeometry = _.get(leafletOptions, 'staticGeometry', false)
|
|
97
|
+
// The feature is changing its geometry type, recreate it except for static geometry
|
|
98
|
+
// as we'd like the geometry of the features tu remain stable in this case (eg lines in for probes vs bbox for measures)
|
|
99
|
+
if (!staticGeometry && (type !== oldType)) return
|
|
99
100
|
// Keep track of previous geometry if we don't want to update it
|
|
100
101
|
// Indeed, styling might depend on it
|
|
101
102
|
if (staticGeometry) feature.geometry = _.get(oldLayer, 'feature.geometry')
|
|
102
|
-
// Now update coordinates if not static geometry
|
|
103
|
-
if (staticGeometry) return oldLayer
|
|
104
103
|
// An existing one is found, simply update styling, properties, etc.
|
|
105
104
|
leafletOptions.onEachFeature(feature, oldLayer)
|
|
106
105
|
if (oldLayer.setStyle) {
|
|
@@ -130,6 +129,8 @@ export function getUpdateFeatureFunction(leafletOptions) {
|
|
|
130
129
|
// oldLayer.setIcon(_.get(leafletOptions.pointToLayer(feature, oldLayer.getLatLng()), 'options.icon'))
|
|
131
130
|
return
|
|
132
131
|
}
|
|
132
|
+
// Now update coordinates if not static geometry
|
|
133
|
+
if (staticGeometry) return oldLayer
|
|
133
134
|
const coordinates = feature.geometry.coordinates
|
|
134
135
|
// FIXME: support others geometry types ?
|
|
135
136
|
switch (type) {
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/* eslint-disable no-unused-expressions */
|
|
1
2
|
import path, { dirname } from 'path'
|
|
2
3
|
import assert from 'assert'
|
|
3
4
|
import fs from 'fs-extra'
|
|
4
5
|
import request from 'superagent'
|
|
5
6
|
import chai from 'chai'
|
|
6
7
|
import chailint from 'chai-lint'
|
|
8
|
+
import spies from 'chai-spies'
|
|
7
9
|
import core, { kdk, hooks, permissions, createMessagesService } from '../../../core/api/index.js'
|
|
8
10
|
import { fileURLToPath } from 'url'
|
|
9
11
|
|
|
@@ -13,10 +15,12 @@ const { util, expect } = chai
|
|
|
13
15
|
|
|
14
16
|
describe('core:services', () => {
|
|
15
17
|
let app, server, port, baseUrl, accessToken,
|
|
16
|
-
userService, userObject, authorisationService, messagesService, messageObject
|
|
18
|
+
userService, userObject, authorisationService, messagesService, messageObject,
|
|
19
|
+
spyUpdateAbilities
|
|
17
20
|
|
|
18
21
|
before(async () => {
|
|
19
22
|
chailint(chai, util)
|
|
23
|
+
chai.use(spies)
|
|
20
24
|
|
|
21
25
|
// Register default rules for all users
|
|
22
26
|
permissions.defineAbilities.registerHook(permissions.defineUserAbilities)
|
|
@@ -52,6 +56,7 @@ describe('core:services', () => {
|
|
|
52
56
|
authorisationService.hooks({
|
|
53
57
|
before: { create: hooks.preventEscalation, remove: hooks.preventEscalation }
|
|
54
58
|
})
|
|
59
|
+
spyUpdateAbilities = chai.spy.on(authorisationService, 'updateAbilities')
|
|
55
60
|
// Now app is configured launch the server
|
|
56
61
|
server = await app.listen(port)
|
|
57
62
|
await new Promise(resolve => server.once('listening', () => resolve()))
|
|
@@ -129,42 +134,37 @@ describe('core:services', () => {
|
|
|
129
134
|
// Let enough time to process
|
|
130
135
|
.timeout(20000)
|
|
131
136
|
|
|
132
|
-
it('creates a user', () => {
|
|
137
|
+
it('creates a user', async () => {
|
|
133
138
|
// Test password generation
|
|
134
139
|
const hook = hooks.generatePassword()({ type: 'before', data: {}, params: {}, app })
|
|
135
|
-
|
|
140
|
+
userObject = await userService.create({
|
|
136
141
|
email: 'test@test.org',
|
|
137
142
|
password: hook.data.password,
|
|
138
143
|
name: 'test-user',
|
|
139
144
|
profile: { phone: '0623256968' }
|
|
140
145
|
}, { checkAuthorisation: true })
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
expect(users.data[0].profile.name).toExist()
|
|
153
|
-
expect(users.data[0].profile.description).toExist()
|
|
154
|
-
})
|
|
146
|
+
expect(spyUpdateAbilities).to.have.been.called.once
|
|
147
|
+
spyUpdateAbilities.reset()
|
|
148
|
+
// Keep track of clear password
|
|
149
|
+
userObject.clearPassword = hook.data.password
|
|
150
|
+
const users = await userService.find({ query: { 'profile.name': 'test-user' } })
|
|
151
|
+
expect(users.data.length > 0).beTrue()
|
|
152
|
+
expect(users.data[0].email).toExist()
|
|
153
|
+
expect(users.data[0].clearPassword).beUndefined()
|
|
154
|
+
expect(users.data[0].profile).toExist()
|
|
155
|
+
expect(users.data[0].profile.name).toExist()
|
|
156
|
+
expect(users.data[0].profile.description).toExist()
|
|
155
157
|
})
|
|
156
158
|
// Let enough time to process
|
|
157
159
|
.timeout(10000)
|
|
158
160
|
|
|
159
|
-
it('changing user password keeps password history', () => {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
expect(user.previousPasswords).to.deep.equal([userObject.password])
|
|
167
|
-
})
|
|
161
|
+
it('changing user password keeps password history', async () => {
|
|
162
|
+
await userService.patch(userObject._id.toString(), { password: userObject.password })
|
|
163
|
+
expect(spyUpdateAbilities).to.have.been.called.once
|
|
164
|
+
spyUpdateAbilities.reset()
|
|
165
|
+
const user = await userService.get(userObject._id.toString())
|
|
166
|
+
expect(user.previousPasswords).toExist()
|
|
167
|
+
expect(user.previousPasswords).to.deep.equal([userObject.password])
|
|
168
168
|
})
|
|
169
169
|
|
|
170
170
|
it('authenticates a user', () => {
|
|
@@ -257,8 +257,8 @@ describe('core:services', () => {
|
|
|
257
257
|
// Let enough time to process
|
|
258
258
|
.timeout(5000)
|
|
259
259
|
|
|
260
|
-
it('creates an authorisation', () => {
|
|
261
|
-
|
|
260
|
+
it('creates an authorisation', async () => {
|
|
261
|
+
const authorisation = await authorisationService.create({
|
|
262
262
|
scope: 'authorisations',
|
|
263
263
|
permissions: 'manager',
|
|
264
264
|
subjects: userObject._id.toString(),
|
|
@@ -268,16 +268,13 @@ describe('core:services', () => {
|
|
|
268
268
|
}, {
|
|
269
269
|
user: userObject
|
|
270
270
|
})
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
expect(user.authorisations.length > 0).beTrue()
|
|
279
|
-
expect(user.authorisations[0].permissions).to.deep.equal('manager')
|
|
280
|
-
})
|
|
271
|
+
expect(authorisation).toExist()
|
|
272
|
+
expect(spyUpdateAbilities).to.have.been.called.once
|
|
273
|
+
spyUpdateAbilities.reset()
|
|
274
|
+
userObject = await userService.get(userObject._id.toString())
|
|
275
|
+
expect(userObject.authorisations).toExist()
|
|
276
|
+
expect(userObject.authorisations.length > 0).beTrue()
|
|
277
|
+
expect(userObject.authorisations[0].permissions).to.deep.equal('manager')
|
|
281
278
|
})
|
|
282
279
|
// Let enough time to process
|
|
283
280
|
.timeout(5000)
|
|
@@ -323,8 +320,8 @@ describe('core:services', () => {
|
|
|
323
320
|
})
|
|
324
321
|
})
|
|
325
322
|
|
|
326
|
-
it('removes an authorisation', () => {
|
|
327
|
-
|
|
323
|
+
it('removes an authorisation', async () => {
|
|
324
|
+
const authorisation = await authorisationService.remove(messageObject._id, {
|
|
328
325
|
query: {
|
|
329
326
|
scope: 'authorisations',
|
|
330
327
|
subjects: userObject._id.toString(),
|
|
@@ -334,14 +331,12 @@ describe('core:services', () => {
|
|
|
334
331
|
user: userObject,
|
|
335
332
|
checkEscalation: true
|
|
336
333
|
})
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
expect(user.authorisations.length === 0).beTrue()
|
|
344
|
-
})
|
|
334
|
+
expect(authorisation).toExist()
|
|
335
|
+
expect(spyUpdateAbilities).to.have.been.called.once
|
|
336
|
+
spyUpdateAbilities.reset()
|
|
337
|
+
const user = await userService.get(userObject._id.toString())
|
|
338
|
+
expect(user.authorisations).toExist()
|
|
339
|
+
expect(user.authorisations.length === 0).beTrue()
|
|
345
340
|
})
|
|
346
341
|
// Let enough time to process
|
|
347
342
|
.timeout(5000)
|
|
@@ -365,21 +360,15 @@ describe('core:services', () => {
|
|
|
365
360
|
})
|
|
366
361
|
})
|
|
367
362
|
|
|
368
|
-
it('removes a user', () => {
|
|
369
|
-
|
|
363
|
+
it('removes a user', async () => {
|
|
364
|
+
await userService.remove(userObject._id, {
|
|
370
365
|
user: userObject,
|
|
371
366
|
checkAuthorisation: true
|
|
372
367
|
})
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
expect(users.data.length === 0).beTrue()
|
|
378
|
-
return messagesService.find({ query: { title: 'Title' } })
|
|
379
|
-
})
|
|
380
|
-
.then(messages => {
|
|
381
|
-
expect(messages.data.length === 0).beTrue()
|
|
382
|
-
})
|
|
368
|
+
const users = await userService.find({ query: { name: 'test-user' } })
|
|
369
|
+
expect(users.data.length === 0).beTrue()
|
|
370
|
+
const messages = await messagesService.find({ query: { title: 'Title' } })
|
|
371
|
+
expect(messages.data.length === 0).beTrue()
|
|
383
372
|
})
|
|
384
373
|
// Let enough time to process
|
|
385
374
|
.timeout(5000)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{"level":"error","message":"Could not connect to mongodb database(s), please check your configuration failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]","name":"MongoNetworkError","stack":"MongoNetworkError: failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]\n at Pool.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/topologies/server.js:441:11)\n at Pool.emit (node:events:519:28)\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:564:14\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:1000:11\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:32:7\n at callback (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:300:5)\n at Socket.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:330:7)\n at Object.onceWrapper (node:events:634:26)\n at Socket.emit (node:events:519:28)\n at emitErrorNT (node:internal/streams/destroy:169:8)\n at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"}
|
|
2
|
+
{"level":"error","message":"Could not connect to mongodb database(s), please check your configuration failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]","name":"MongoNetworkError","stack":"MongoNetworkError: failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]\n at Pool.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/topologies/server.js:441:11)\n at Pool.emit (node:events:519:28)\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:564:14\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:1000:11\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:32:7\n at callback (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:300:5)\n at Socket.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:330:7)\n at Object.onceWrapper (node:events:634:26)\n at Socket.emit (node:events:519:28)\n at emitErrorNT (node:internal/streams/destroy:169:8)\n at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"}
|
|
3
|
+
{"level":"error","message":"Could not connect to mongodb database(s), please check your configuration failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]","name":"MongoNetworkError","stack":"MongoNetworkError: failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]\n at Pool.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/topologies/server.js:441:11)\n at Pool.emit (node:events:519:28)\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:564:14\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:1000:11\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:32:7\n at callback (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:300:5)\n at Socket.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:330:7)\n at Object.onceWrapper (node:events:634:26)\n at Socket.emit (node:events:519:28)\n at emitErrorNT (node:internal/streams/destroy:169:8)\n at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"}
|
|
4
|
+
{"level":"error","message":"Could not connect to mongodb database(s), please check your configuration failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]","name":"MongoNetworkError","stack":"MongoNetworkError: failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]\n at Pool.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/topologies/server.js:441:11)\n at Pool.emit (node:events:519:28)\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:564:14\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:1000:11\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:32:7\n at callback (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:300:5)\n at Socket.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:330:7)\n at Object.onceWrapper (node:events:634:26)\n at Socket.emit (node:events:519:28)\n at emitErrorNT (node:internal/streams/destroy:169:8)\n at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"}
|
|
5
|
+
{"level":"error","message":"Could not connect to mongodb database(s), please check your configuration failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]","name":"MongoNetworkError","stack":"MongoNetworkError: failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]\n at Pool.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/topologies/server.js:441:11)\n at Pool.emit (node:events:519:28)\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:564:14\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:1000:11\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:32:7\n at callback (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:300:5)\n at Socket.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:330:7)\n at Object.onceWrapper (node:events:634:26)\n at Socket.emit (node:events:519:28)\n at emitErrorNT (node:internal/streams/destroy:169:8)\n at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"}
|
|
6
|
+
{"level":"error","message":"Could not connect to mongodb database(s), please check your configuration failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]","name":"MongoNetworkError","stack":"MongoNetworkError: failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]\n at Pool.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/topologies/server.js:441:11)\n at Pool.emit (node:events:519:28)\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:564:14\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:1000:11\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:32:7\n at callback (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:300:5)\n at Socket.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:330:7)\n at Object.onceWrapper (node:events:634:26)\n at Socket.emit (node:events:519:28)\n at emitErrorNT (node:internal/streams/destroy:169:8)\n at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"}
|
|
7
|
+
{"level":"error","message":"Could not connect to mongodb database(s), please check your configuration failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]","name":"MongoNetworkError","stack":"MongoNetworkError: failed to connect to server [127.0.0.1:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {\n name: 'MongoNetworkError'\n}]\n at Pool.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/topologies/server.js:441:11)\n at Pool.emit (node:events:519:28)\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:564:14\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/pool.js:1000:11\n at /home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:32:7\n at callback (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:300:5)\n at Socket.<anonymous> (/home/luc/Development/kalisio/kdk/node_modules/mongodb/lib/core/connection/connect.js:330:7)\n at Object.onceWrapper (node:events:634:26)\n at Socket.emit (node:events:519:28)\n at emitErrorNT (node:internal/streams/destroy:169:8)\n at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"}
|
|
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/messages - Method: create: You are not allowed to access service messages"}
|
|
12
|
+
{"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
|
|
13
|
+
{"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
|
|
14
|
+
{"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to change authorisation on resource"}
|
|
15
|
+
{"level":"error","message":"error: api/authorisations - Method: remove: You are not allowed to change authorisation on subject(s)"}
|
|
16
|
+
{"level":"info","message":"This is a log test"}
|
|
17
|
+
{"level":"error","message":"error: api/service - Method: create: validation failed"}
|
|
18
|
+
{"level":"error","message":"error: api/service - Method: create: validation failed"}
|
|
19
|
+
{"level":"error","message":"error: api/service - Method: create: validation failed"}
|
|
20
|
+
{"level":"error","message":"error: api/service - Method: create: validation failed"}
|
|
21
|
+
{"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
|
|
22
|
+
{"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{"level":"info","message":"Logger configured"}
|
|
2
|
+
{"level":"info","message":"Initializing weacast-gfs plugin"}
|
|
3
|
+
{"level":"info","message":"Initializing gfs-world forecast"}
|
|
4
|
+
{"level":"info","message":"Checking for up-to-date forecast data on gfs-world/u-wind"}
|
|
5
|
+
{"level":"info","message":"Checking for up-to-date forecast data on gfs-world/v-wind"}
|
|
6
|
+
{"level":"info","message":"Completed forecast data update on gfs-world/v-wind"}
|
|
7
|
+
{"level":"info","message":"Completed forecast data update on gfs-world/u-wind"}
|
|
8
|
+
{"level":"error","message":"error: api/alerts - Method: patch: No record found for id '68341c8794d46d2d0762a7bd'"}
|
|
9
|
+
{"level":"error","message":"Cannot check alert 68341c9794d46d2d0762a7be as no data is available for gfs-world"}
|
|
10
|
+
{"level":"error","message":"Cannot check alert 68341cb594d46d2d0762ad01 as no data is available for features service vigicrues-observations"}
|
|
11
|
+
{"level":"error","message":"error: api/catalog - Method: create: Object with name equals to dummy already exist for service catalog"}
|
|
12
|
+
{"level":"info","message":"Logger configured"}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for map/api/models/styles.model.mongodb.js</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../../../index.html">All files</a> / <a href="index.html">map/api/models</a> styles.model.mongodb.js</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">0% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/9</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/1</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">0% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/1</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">0% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/9</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line low'></div>
|
|
65
|
-
<pre><table class="coverage">
|
|
66
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
-
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
-
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
-
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
-
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
-
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
-
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
-
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
-
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
-
<a name='L10'></a><a href='#L10'>10</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span>
|
|
76
|
-
<span class="cline-any cline-no"> </span>
|
|
77
|
-
<span class="cline-any cline-no"> </span>
|
|
78
|
-
<span class="cline-any cline-no"> </span>
|
|
79
|
-
<span class="cline-any cline-no"> </span>
|
|
80
|
-
<span class="cline-any cline-no"> </span>
|
|
81
|
-
<span class="cline-any cline-no"> </span>
|
|
82
|
-
<span class="cline-any cline-no"> </span>
|
|
83
|
-
<span class="cline-any cline-no"> </span>
|
|
84
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" ><span class="branch-0 cbranch-no" title="branch not covered" >export default function (app, options) {</span></span></span>
|
|
85
|
-
<span class="cstat-no" title="statement not covered" > const db = options.db || app.db</span>
|
|
86
|
-
<span class="cstat-no" title="statement not covered" > options.Model = db.collection('styles')</span>
|
|
87
|
-
<span class="cstat-no" title="statement not covered" > // Collation provided in query ensure sorting to be case insensitive w.r.t. user's language</span>
|
|
88
|
-
<span class="cstat-no" title="statement not covered" > // We built indices with collation to cover the most used languages, it requires different naming...</span>
|
|
89
|
-
<span class="cstat-no" title="statement not covered" > options.Model.createIndex({ name: 1 }, { name: 'name-en', collation: { locale: 'en', strength: 1 } })</span>
|
|
90
|
-
<span class="cstat-no" title="statement not covered" > options.Model.createIndex({ name: 1 }, { name: 'name-fr', collation: { locale: 'fr', strength: 1 } })</span>
|
|
91
|
-
<span class="cstat-no" title="statement not covered" > options.Model.createIndex({ name: 'text' })</span>
|
|
92
|
-
<span class="cstat-no" title="statement not covered" >}</span>
|
|
93
|
-
</pre></td></tr></table></pre>
|
|
94
|
-
|
|
95
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
96
|
-
</div><!-- /wrapper -->
|
|
97
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
98
|
-
Code coverage generated by
|
|
99
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
100
|
-
at 2025-05-21T12:01:19.833Z
|
|
101
|
-
</div>
|
|
102
|
-
<script src="../../../prettify.js"></script>
|
|
103
|
-
<script>
|
|
104
|
-
window.onload = function () {
|
|
105
|
-
prettyPrint();
|
|
106
|
-
};
|
|
107
|
-
</script>
|
|
108
|
-
<script src="../../../sorter.js"></script>
|
|
109
|
-
<script src="../../../block-navigation.js"></script>
|
|
110
|
-
</body>
|
|
111
|
-
</html>
|
|
112
|
-
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for map/api/services/styles</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../../../../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../../../../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../../../../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../../../../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../../../../index.html">All files</a> map/api/services/styles</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">0% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/37</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/1</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">0% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/1</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">0% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/37</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line low'></div>
|
|
65
|
-
<div class="pad1">
|
|
66
|
-
<table class="coverage-summary">
|
|
67
|
-
<thead>
|
|
68
|
-
<tr>
|
|
69
|
-
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
70
|
-
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
71
|
-
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
72
|
-
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
73
|
-
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
74
|
-
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
75
|
-
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
76
|
-
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
77
|
-
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
78
|
-
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
79
|
-
</tr>
|
|
80
|
-
</thead>
|
|
81
|
-
<tbody><tr>
|
|
82
|
-
<td class="file low" data-value="styles.hooks.js"><a href="styles.hooks.js.html">styles.hooks.js</a></td>
|
|
83
|
-
<td data-value="0" class="pic low">
|
|
84
|
-
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
85
|
-
</td>
|
|
86
|
-
<td data-value="0" class="pct low">0%</td>
|
|
87
|
-
<td data-value="37" class="abs low">0/37</td>
|
|
88
|
-
<td data-value="0" class="pct low">0%</td>
|
|
89
|
-
<td data-value="1" class="abs low">0/1</td>
|
|
90
|
-
<td data-value="0" class="pct low">0%</td>
|
|
91
|
-
<td data-value="1" class="abs low">0/1</td>
|
|
92
|
-
<td data-value="0" class="pct low">0%</td>
|
|
93
|
-
<td data-value="37" class="abs low">0/37</td>
|
|
94
|
-
</tr>
|
|
95
|
-
|
|
96
|
-
</tbody>
|
|
97
|
-
</table>
|
|
98
|
-
</div>
|
|
99
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
100
|
-
</div><!-- /wrapper -->
|
|
101
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
|
-
Code coverage generated by
|
|
103
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2025-05-21T12:01:19.833Z
|
|
105
|
-
</div>
|
|
106
|
-
<script src="../../../../prettify.js"></script>
|
|
107
|
-
<script>
|
|
108
|
-
window.onload = function () {
|
|
109
|
-
prettyPrint();
|
|
110
|
-
};
|
|
111
|
-
</script>
|
|
112
|
-
<script src="../../../../sorter.js"></script>
|
|
113
|
-
<script src="../../../../block-navigation.js"></script>
|
|
114
|
-
</body>
|
|
115
|
-
</html>
|
|
116
|
-
|