@kalisio/kdk 2.5.3 → 2.6.1
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/.github/workflows/main.yaml +35 -6
- package/.vscode/settings.json +5 -0
- package/client.globe.js +8 -0
- package/client.js +8 -0
- package/client.map.js +8 -0
- package/core/api/hooks/hooks.push.js +3 -2
- package/core/api/hooks/hooks.tags.js +56 -0
- package/core/api/models/tags.model.mongodb.js +8 -0
- package/core/api/services/index.js +33 -2
- package/core/api/services/tags/tags.hooks.js +47 -0
- package/core/client/api.js +5 -5
- package/core/client/components/KActivity.vue +3 -2
- package/core/client/components/KChip.vue +2 -2
- package/core/client/components/KEditor.vue +3 -1
- package/core/client/components/KFollower.vue +4 -4
- package/core/client/components/KStore.vue +1 -1
- package/core/client/components/KTab.vue +20 -7
- package/core/client/components/account/KProfile.vue +9 -25
- package/core/client/components/action/KAction.vue +10 -10
- package/core/client/components/action/KToggleFullscreenAction.vue +2 -11
- package/core/client/components/app/KHome.vue +3 -2
- package/core/client/components/collection/KFilter.vue +5 -4
- package/core/client/components/collection/KGrid.vue +5 -1
- package/core/client/components/collection/KItemsFilter.vue +47 -0
- package/core/client/components/collection/KItemsSorter.vue +42 -0
- package/core/client/components/collection/KScrollDown.vue +2 -2
- package/core/client/components/collection/KSearchFilterControl.vue +3 -2
- package/core/client/components/collection/KSorter.vue +33 -37
- package/core/client/components/collection/KTagsFilterControl.vue +14 -40
- package/core/client/components/collection/KTagsFilterView.vue +10 -45
- package/core/client/components/collection/KTimeFilterControl.vue +6 -7
- package/core/client/components/collection/KTimeFilterView.vue +13 -22
- package/core/client/components/collection/KTimeLine.vue +18 -9
- package/core/client/components/form/KColorField.vue +13 -6
- package/core/client/components/form/KColorScaleField.vue +7 -12
- package/core/client/components/form/KFileField.vue +118 -89
- package/core/client/components/form/KForm.vue +30 -18
- package/core/client/components/form/KIconField.vue +4 -1
- package/core/client/components/form/KNumberField.vue +9 -2
- package/core/client/components/form/KSelectField.vue +1 -4
- package/core/client/components/form/KTagField.vue +229 -0
- package/core/client/components/form/KTextField.vue +4 -0
- package/core/client/components/form/KTextareaField.vue +3 -1
- package/core/client/components/input/KShapePicker.vue +3 -3
- package/core/client/components/layout/KFab.vue +32 -20
- package/core/client/components/layout/KPage.vue +11 -6
- package/core/client/components/layout/KWindow.vue +6 -1
- package/core/client/components/media/index.js +2 -6
- package/core/client/components/menu/KMenu.vue +12 -10
- package/core/client/components/menu/KSubMenu.vue +12 -12
- package/core/client/components/messages/KMessageCard.vue +13 -12
- package/core/client/components/messages/KMessageComposer.vue +13 -9
- package/core/client/components/messages/KMessagesTimeLine.vue +16 -8
- package/core/client/components/tags/KTagFilter.vue +99 -0
- package/core/client/components/tags/KTagItem.vue +65 -0
- package/core/client/components/tags/KTagManager.vue +198 -0
- package/core/client/components/tags/KTagSelection.vue +82 -0
- package/core/client/components/time/KDate.vue +3 -17
- package/core/client/components/time/KDateTime.vue +1 -1
- package/core/client/components/time/KTime.vue +0 -4
- package/core/client/composables/collection-filter.js +41 -2
- package/core/client/composables/collection.js +3 -3
- package/core/client/composables/index.js +1 -0
- package/core/client/composables/pwa.js +13 -0
- package/core/client/composables/session.js +7 -8
- package/core/client/composables/user.js +36 -0
- package/core/client/directives/index.js +1 -0
- package/core/client/directives/v-drop-file.js +174 -0
- package/core/client/document.js +2 -1
- package/core/client/exporter.js +17 -3
- package/core/client/i18n/core_en.json +34 -7
- package/core/client/i18n/core_fr.json +36 -9
- package/core/client/i18n.js +26 -11
- package/core/client/layout.js +5 -5
- package/core/client/mixins/mixin.base-activity.js +8 -5
- package/core/client/mixins/mixin.base-editor.js +2 -1
- package/core/client/mixins/mixin.base-field.js +3 -2
- package/core/client/mixins/mixin.base-item.js +12 -10
- package/core/client/mixins/mixin.service.js +3 -1
- package/core/client/platform.js +0 -3
- package/core/client/readers/reader.json.js +2 -2
- package/core/client/utils/index.js +2 -0
- package/core/client/utils/utils.collection.js +6 -6
- package/core/client/utils/utils.colors.js +473 -173
- package/core/client/utils/utils.files.js +19 -0
- package/core/client/utils/utils.locale.js +13 -17
- package/core/client/utils/utils.services.js +27 -0
- package/core/client/utils/utils.shapes.js +2 -2
- package/core/client/utils/utils.tags.js +17 -0
- package/core/client/utils/utils.tours.js +31 -0
- package/core/common/permissions.js +3 -0
- package/core/common/schemas/tags.update.json +35 -0
- package/core/common/schemas/users.update-profile.json +1 -1
- package/core/common/utils.js +5 -5
- package/coverage/core/api/application.js.html +464 -464
- package/coverage/core/api/authentication.js.html +219 -351
- package/coverage/core/api/db.js.html +194 -209
- package/coverage/core/api/hooks/hooks.authentication.js.html +208 -34
- package/coverage/core/api/hooks/hooks.authorisations.js.html +717 -432
- package/coverage/core/api/hooks/hooks.groups.js.html +52 -52
- package/coverage/core/api/hooks/hooks.logger.js.html +43 -43
- package/coverage/core/api/hooks/hooks.model.js.html +300 -312
- package/coverage/core/api/hooks/hooks.organisations.js.html +264 -264
- package/coverage/core/api/hooks/hooks.push.js.html +107 -119
- package/coverage/core/api/hooks/hooks.query.js.html +279 -279
- package/coverage/core/api/hooks/hooks.schemas.js.html +135 -135
- package/coverage/core/api/hooks/hooks.service.js.html +28 -28
- package/coverage/core/api/hooks/hooks.storage.js.html +7 -7
- package/coverage/core/api/hooks/hooks.users.js.html +478 -205
- package/coverage/core/api/hooks/index.html +132 -102
- package/coverage/core/api/hooks/index.js.html +19 -13
- package/coverage/core/api/index.html +69 -54
- package/coverage/core/api/index.js.html +25 -25
- package/coverage/core/api/marshall.js.html +127 -127
- package/coverage/core/api/models/groups.model.mongodb.js.html +26 -26
- package/coverage/core/api/models/index.html +66 -21
- package/coverage/core/api/models/messages.model.mongodb.js.html +27 -39
- package/coverage/core/api/models/organisations.model.mongodb.js.html +16 -16
- package/coverage/core/api/models/tags.model.mongodb.js.html +30 -30
- package/coverage/core/api/models/users.model.mongodb.js.html +11 -11
- package/coverage/core/api/services/account/account.hooks.js.html +46 -46
- package/coverage/core/api/services/account/account.service.js.html +139 -139
- package/coverage/core/api/services/account/index.html +22 -22
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +34 -34
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +230 -221
- package/coverage/core/api/services/authorisations/index.html +20 -20
- 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 +72 -72
- package/coverage/core/api/services/groups/index.html +21 -21
- 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 +195 -171
- 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 +76 -94
- package/coverage/core/api/services/organisations/index.html +32 -32
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +72 -72
- package/coverage/core/api/services/organisations/organisations.service.js.html +163 -163
- 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 +37 -37
- package/coverage/core/api/services/tags/index.html +21 -21
- package/coverage/core/api/services/tags/tags.hooks.js.html +72 -72
- package/coverage/core/api/services/users/index.html +12 -27
- package/coverage/core/api/services/users/users.hooks.js.html +84 -87
- package/coverage/core/api/utils.js.html +1 -1
- package/coverage/core/common/errors.js.html +2 -2
- package/coverage/core/common/index.html +32 -47
- package/coverage/core/common/index.js.html +11 -11
- package/coverage/core/common/permissions.js.html +579 -264
- package/coverage/core/common/schema.js.html +26 -26
- package/coverage/core/common/utils.js.html +59 -65
- package/coverage/index.html +286 -256
- package/coverage/lcov-report/core/api/application.js.html +464 -464
- package/coverage/lcov-report/core/api/authentication.js.html +219 -351
- package/coverage/lcov-report/core/api/db.js.html +194 -209
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +208 -34
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +717 -432
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +52 -52
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +43 -43
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +300 -312
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +264 -264
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +107 -119
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +279 -279
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +135 -135
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +28 -28
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +7 -7
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +478 -205
- package/coverage/lcov-report/core/api/hooks/index.html +132 -102
- package/coverage/lcov-report/core/api/hooks/index.js.html +19 -13
- package/coverage/lcov-report/core/api/index.html +69 -54
- package/coverage/lcov-report/core/api/index.js.html +25 -25
- package/coverage/lcov-report/core/api/marshall.js.html +127 -127
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +26 -26
- package/coverage/lcov-report/core/api/models/index.html +66 -21
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +27 -39
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +16 -16
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +30 -30
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +11 -11
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +46 -46
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +139 -139
- package/coverage/lcov-report/core/api/services/account/index.html +22 -22
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +34 -34
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +230 -221
- package/coverage/lcov-report/core/api/services/authorisations/index.html +20 -20
- 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 +72 -72
- package/coverage/lcov-report/core/api/services/groups/index.html +21 -21
- 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 +195 -171
- 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 +76 -94
- package/coverage/lcov-report/core/api/services/organisations/index.html +32 -32
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +72 -72
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +163 -163
- 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 +37 -37
- package/coverage/lcov-report/core/api/services/tags/index.html +21 -21
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +72 -72
- package/coverage/lcov-report/core/api/services/users/index.html +12 -27
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +84 -87
- package/coverage/lcov-report/core/api/utils.js.html +1 -1
- package/coverage/lcov-report/core/common/errors.js.html +2 -2
- package/coverage/lcov-report/core/common/index.html +32 -47
- package/coverage/lcov-report/core/common/index.js.html +11 -11
- package/coverage/lcov-report/core/common/permissions.js.html +579 -264
- package/coverage/lcov-report/core/common/schema.js.html +26 -26
- package/coverage/lcov-report/core/common/utils.js.html +59 -65
- package/coverage/lcov-report/index.html +286 -256
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +257 -353
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +218 -218
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +810 -795
- package/coverage/lcov-report/map/api/hooks/index.html +54 -54
- package/coverage/lcov-report/map/api/hooks/index.js.html +16 -16
- package/coverage/lcov-report/map/api/index.html +32 -32
- package/coverage/lcov-report/map/api/index.js.html +46 -46
- package/coverage/lcov-report/map/api/marshall.js.html +72 -72
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +24 -24
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +27 -69
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +80 -80
- package/coverage/lcov-report/map/api/models/index.html +54 -69
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +26 -26
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +136 -136
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +343 -343
- package/coverage/lcov-report/map/api/services/alerts/index.html +32 -32
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +160 -178
- package/coverage/lcov-report/map/api/services/catalog/index.html +21 -21
- 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 +114 -183
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +56 -359
- package/coverage/lcov-report/map/api/services/features/index.html +31 -31
- package/coverage/lcov-report/map/api/services/index.html +21 -21
- package/coverage/lcov-report/map/api/services/index.js.html +258 -495
- package/coverage/lcov-report/map/api/services/projects/index.html +21 -21
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +237 -237
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +68 -68
- package/coverage/lcov-report/map/common/errors.js.html +16 -16
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +267 -270
- package/coverage/lcov-report/map/common/grid.js.html +554 -554
- package/coverage/lcov-report/map/common/index.html +158 -158
- package/coverage/lcov-report/map/common/index.js.html +68 -68
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +73 -73
- package/coverage/lcov-report/map/common/moment-utils.js.html +18 -18
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +484 -484
- package/coverage/lcov-report/map/common/opendap-utils.js.html +353 -353
- package/coverage/lcov-report/map/common/permissions.js.html +36 -42
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +59 -59
- package/coverage/lcov-report/map/common/tms-utils.js.html +6 -6
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +190 -190
- package/coverage/lcov-report/map/common/wcs-utils.js.html +339 -339
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +345 -345
- 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 +7793 -8564
- package/coverage/map/api/hooks/hooks.catalog.js.html +257 -353
- package/coverage/map/api/hooks/hooks.features.js.html +218 -218
- package/coverage/map/api/hooks/hooks.query.js.html +810 -795
- package/coverage/map/api/hooks/index.html +54 -54
- package/coverage/map/api/hooks/index.js.html +16 -16
- package/coverage/map/api/index.html +32 -32
- package/coverage/map/api/index.js.html +46 -46
- package/coverage/map/api/marshall.js.html +72 -72
- package/coverage/map/api/models/alerts.model.mongodb.js.html +24 -24
- package/coverage/map/api/models/catalog.model.mongodb.js.html +27 -69
- package/coverage/map/api/models/features.model.mongodb.js.html +80 -80
- package/coverage/map/api/models/index.html +54 -69
- package/coverage/map/api/models/projects.model.mongodb.js.html +26 -26
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +136 -136
- package/coverage/map/api/services/alerts/alerts.service.js.html +343 -343
- package/coverage/map/api/services/alerts/index.html +32 -32
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +160 -178
- package/coverage/map/api/services/catalog/index.html +21 -21
- 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 +114 -183
- package/coverage/map/api/services/features/features.service.js.html +56 -359
- package/coverage/map/api/services/features/index.html +31 -31
- package/coverage/map/api/services/index.html +21 -21
- package/coverage/map/api/services/index.js.html +258 -495
- package/coverage/map/api/services/projects/index.html +21 -21
- package/coverage/map/api/services/projects/projects.hooks.js.html +237 -237
- package/coverage/map/common/dynamic-grid-source.js.html +68 -68
- package/coverage/map/common/errors.js.html +16 -16
- package/coverage/map/common/geotiff-grid-source.js.html +267 -270
- package/coverage/map/common/grid.js.html +554 -554
- package/coverage/map/common/index.html +158 -158
- package/coverage/map/common/index.js.html +68 -68
- package/coverage/map/common/meteo-model-grid-source.js.html +73 -73
- package/coverage/map/common/moment-utils.js.html +18 -18
- package/coverage/map/common/opendap-grid-source.js.html +484 -484
- package/coverage/map/common/opendap-utils.js.html +353 -353
- package/coverage/map/common/permissions.js.html +36 -42
- package/coverage/map/common/time-based-grid-source.js.html +59 -59
- package/coverage/map/common/tms-utils.js.html +6 -6
- package/coverage/map/common/wcs-grid-source.js.html +190 -190
- package/coverage/map/common/wcs-utils.js.html +339 -339
- package/coverage/map/common/weacast-grid-source.js.html +345 -345
- 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-151166-1723543324307-0.json +1 -0
- package/coverage/tmp/coverage-151178-1723543324283-0.json +1 -0
- package/coverage/tmp/coverage-151189-1723543324271-0.json +1 -0
- package/coverage/tmp/coverage-151201-1723543324248-0.json +1 -0
- package/coverage/tmp/coverage-151208-1723543324227-0.json +1 -0
- package/extras/configs/panes.top.js +33 -11
- package/extras/configs/stickies.js +26 -16
- package/extras/configs/widgets.left.js +13 -1
- package/extras/libs/jsts.min.js +8 -0
- package/{test/client/core/account.js → extras/tests/core/account.mjs} +4 -4
- package/extras/tests/core/api.mjs +114 -0
- package/{test/client/core/collection.js → extras/tests/core/collection.mjs} +8 -8
- package/{test/client/core/dialogs.js → extras/tests/core/dialogs.mjs} +1 -1
- package/extras/tests/core/index.mjs +9 -0
- package/{test/client/core/layout.js → extras/tests/core/layout.mjs} +7 -3
- package/{test/client/core/runner.js → extras/tests/core/runner.mjs} +3 -3
- package/{test/client/core/screens.js → extras/tests/core/screens.mjs} +1 -1
- package/{test/client/core/utils.js → extras/tests/core/utils.mjs} +79 -26
- package/extras/tests/index.mjs +4 -0
- package/{test/client/map/api.js → extras/tests/map/api.mjs} +1 -1
- package/{test/client/map/catalog.js → extras/tests/map/catalog.mjs} +18 -18
- package/{test/client/map/controls.js → extras/tests/map/controls.mjs} +3 -3
- package/extras/tests/map/index.mjs +5 -0
- package/{test/client/map/time.js → extras/tests/map/time.mjs} +3 -3
- package/{test/client/map/utils.js → extras/tests/map/utils.mjs} +6 -5
- package/extras/tours/fab.js +36 -0
- package/extras/tours/layout.js +49 -0
- package/extras/tours/pane.left.js +78 -0
- package/extras/tours/pane.right.js +145 -0
- package/extras/tours/pane.top.js +239 -0
- package/map/api/config/layers.cjs +28 -13
- package/map/api/hooks/hooks.query.js +12 -7
- package/map/api/models/catalog.model.mongodb.js +17 -6
- package/map/api/services/catalog/catalog.hooks.js +1 -1
- package/map/api/services/index.js +18 -1
- package/map/client/cesium/utils/utils.cesium.js +25 -65
- package/map/client/cesium/utils/utils.features.js +1 -0
- package/map/client/cesium/utils/utils.geojson.js +1 -0
- package/map/client/cesium/utils/utils.style.js +7 -6
- package/map/client/components/KFeatureEditor.vue +3 -3
- package/map/client/components/KFeaturesChart.vue +4 -4
- package/map/client/components/KFeaturesFilterEditor.vue +19 -13
- package/map/client/components/KFeaturesFilterManager.vue +7 -4
- package/map/client/components/KFeaturesTable.vue +2 -2
- package/map/client/components/KLayerEditor.vue +6 -6
- package/map/client/components/KMeasureTool.vue +2 -1
- package/map/client/components/catalog/KBaseLayersSelector.vue +1 -1
- package/map/client/components/catalog/KCategoryItem.vue +15 -1
- package/map/client/components/catalog/KConnectLayer.vue +2 -2
- package/map/client/components/catalog/KCreateView.vue +3 -2
- package/map/client/components/catalog/KFilteredLayerItem.vue +26 -6
- package/map/client/components/catalog/KImportLayer.vue +6 -3
- package/map/client/components/catalog/KLayerCategories.vue +6 -6
- package/map/client/components/catalog/KLayerItem.vue +12 -2
- package/map/client/components/catalog/KLayersList.vue +180 -0
- package/map/client/components/catalog/KLayersPanel.vue +146 -36
- package/map/client/components/catalog/KLayersSelector.vue +96 -48
- package/map/client/components/catalog/KProjectEditor.vue +0 -9
- package/map/client/components/catalog/KProjectSelector.vue +3 -2
- package/map/client/components/catalog/KProjectsPanel.vue +23 -8
- package/map/client/components/catalog/KViewsPanel.vue +18 -8
- package/map/client/components/catalog/KWeatherLayersSelector.vue +3 -3
- package/map/client/components/form/KDirectionField.vue +3 -6
- package/map/client/components/form/KLayerCategoryField.vue +2 -2
- package/map/client/components/form/KOwsServiceField.vue +25 -24
- package/map/client/components/form/KSelectLayersField.vue +4 -4
- package/map/client/components/form/KSelectViewsField.vue +4 -4
- package/map/client/components/legend/KLayerLegend.vue +11 -2
- package/map/client/components/legend/KLegend.vue +44 -51
- package/map/client/components/location/KLocationCardSection.vue +6 -7
- package/map/client/components/location/KLocationMap.vue +23 -13
- package/map/client/components/stickies/KPosition.vue +5 -0
- package/map/client/components/stickies/KZoomControl.vue +70 -0
- package/map/client/components/styles/KLayerStyleAction.vue +59 -12
- package/map/client/components/styles/KStyleEditor.vue +71 -8
- package/map/client/components/styles/KStyleEditorSection.vue +82 -33
- package/map/client/components/styles/KStyleManager.vue +119 -59
- package/map/client/components/styles/KStylePreview.vue +9 -25
- package/map/client/components/styles/KStylePreviewItem.vue +22 -1
- package/map/client/components/tools/KSearchTool.vue +1 -1
- package/map/client/components/widget/KElevationProfile.vue +20 -17
- package/map/client/components/widget/KInformationBox.vue +5 -5
- package/map/client/components/widget/KMapillaryViewer.vue +2 -1
- package/map/client/components/widget/KTimeSeries.vue +11 -9
- package/map/client/globe.js +2 -0
- package/map/client/i18n/map_en.json +30 -7
- package/map/client/i18n/map_fr.json +30 -7
- package/map/client/leaflet/GradientPath.js +61 -24
- package/map/client/leaflet/ShapeMarker.js +12 -5
- package/map/client/leaflet/TiledMeshLayer.js +3 -3
- package/map/client/leaflet/utils/utils.geojson.js +66 -8
- package/map/client/leaflet/utils/utils.style.js +14 -15
- package/map/client/mixins/globe/mixin.base-globe.js +190 -34
- package/map/client/mixins/globe/mixin.file-layers.js +3 -0
- package/map/client/mixins/globe/mixin.geojson-layers.js +179 -31
- package/map/client/mixins/globe/mixin.opendap-layers.js +2 -1
- package/map/client/mixins/globe/mixin.style.js +23 -1
- package/map/client/mixins/globe/mixin.tooltip.js +14 -2
- package/map/client/mixins/map/mixin.base-map.js +156 -58
- package/map/client/mixins/map/mixin.edit-layers.js +18 -15
- package/map/client/mixins/map/mixin.geojson-layers.js +181 -106
- package/map/client/mixins/map/mixin.heatmap-layers.js +3 -2
- package/map/client/mixins/map/mixin.map-activity.js +6 -1
- package/map/client/mixins/map/mixin.mapillary-layers.js +2 -1
- package/map/client/mixins/map/mixin.pmtiles-layers.js +3 -3
- package/map/client/mixins/map/mixin.tiled-mesh-layers.js +3 -2
- package/map/client/mixins/map/mixin.tiled-wind-layers.js +3 -2
- package/map/client/mixins/mixin.activity.js +199 -55
- package/map/client/mixins/mixin.context.js +11 -11
- package/map/client/mixins/mixin.feature-service.js +11 -9
- package/map/client/mixins/mixin.weacast.js +5 -3
- package/map/client/readers/reader.geojson.js +3 -1
- package/map/client/utils/utils.capture.js +3 -3
- package/map/client/utils/utils.catalog.js +9 -5
- package/map/client/utils/utils.features.js +120 -54
- package/map/client/utils/utils.js +25 -10
- package/map/client/utils/utils.layers.js +148 -24
- package/map/client/utils/utils.location.js +26 -9
- package/map/client/utils/utils.schema.js +2 -1
- package/map/client/utils/utils.style.js +53 -9
- package/map/common/geotiff-grid-source.js +1 -3
- package/map/common/opendap-utils.js +0 -1
- package/map/common/tms-utils.js +0 -1
- package/map/common/wcs-utils.js +0 -1
- package/map/common/wfs-utils.js +0 -1
- package/map/common/wms-utils.js +7 -1
- package/map/common/wmts-utils.js +0 -1
- package/package.json +12 -12
- package/scripts/init_runner.sh +3 -3
- package/scripts/kash/CHANGELOG.md +27 -0
- package/scripts/kash/kash.sh +556 -237
- package/scripts/kash/scripts/run_tests.sh +44 -5
- package/scripts/setup_workspace.sh +23 -13
- package/test/api/core/config/default.cjs +2 -1
- package/test/api/core/tags.test.js +62 -0
- package/test/api/core/test-log-2024-04-22.log +84 -0
- package/test/api/core/{test-log-2025-02-05.log → test-log-2024-04-23.log} +3 -3
- package/test/api/core/test-log-2024-08-13.log +3 -0
- package/test/api/map/config/default.cjs +2 -1
- package/test/api/map/config/layers.json +9 -0
- package/test/api/map/data/openradiation.json +13811 -0
- package/test/api/map/grid-sources.test.js +1 -3
- package/test/api/map/index.test.js +60 -1
- package/test/api/map/style.test.js +30 -1
- package/test/api/map/test-log-2025-03-08.log +0 -0
- package/test.api.js +1 -1
- package/vite/App.vue +18 -0
- package/vite/AppWithGlobe.vue +84 -0
- package/vite/GlobeActivity.vue +58 -0
- package/vite/MapActivity.vue +63 -0
- package/vite/MapActivityWithGlobe.vue +63 -0
- package/vite/README.md +169 -0
- package/vite/config.js +221 -0
- package/vite/index_with_globe.html +50 -0
- package/vite/index_with_map.html +50 -0
- package/vite/package.json +173 -0
- package/vite/quasar.variables.scss +17 -0
- package/vite/vite.config.js +166 -0
- package/vite/yarn.lock +11641 -0
- package/core/client/components/media/KImageViewer.vue +0 -68
- package/core/client/components/media/KMarkdownViewer.vue +0 -55
- package/core/client/components/media/KMediaBrowser.vue +0 -301
- package/coverage/core/api/services/users/users.service.js.html +0 -100
- package/coverage/core/common/utils.offline.js.html +0 -199
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +0 -100
- package/coverage/lcov-report/core/common/utils.offline.js.html +0 -199
- 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-151198-1753351220086-0.json +0 -1
- package/coverage/tmp/coverage-151210-1753351220070-0.json +0 -1
- package/coverage/tmp/coverage-151221-1753351129816-0.json +0 -1
- package/coverage/tmp/coverage-151233-1753351129803-0.json +0 -1
- package/coverage/tmp/coverage-151240-1753351129770-0.json +0 -1
- package/coverage/tmp/coverage-151307-1753351220058-0.json +0 -1
- package/coverage/tmp/coverage-151319-1753351220044-0.json +0 -1
- package/coverage/tmp/coverage-151326-1753351220010-0.json +0 -1
- package/extras/tours/core/account-profile.js +0 -32
- package/extras/tours/core/account.js +0 -143
- package/extras/tours/core/add-member.js +0 -75
- package/extras/tours/core/add-tag.js +0 -13
- package/extras/tours/core/create-group.js +0 -19
- package/extras/tours/core/create-organisation.js +0 -19
- package/extras/tours/core/create-tag.js +0 -26
- package/extras/tours/core/edit-member-role.js +0 -13
- package/extras/tours/core/groups.js +0 -65
- package/extras/tours/core/join-group.js +0 -13
- package/extras/tours/core/login.js +0 -41
- package/extras/tours/core/members.js +0 -108
- package/extras/tours/core/register.js +0 -61
- package/extras/tours/core/send-reset-password.js +0 -14
- package/extras/tours/core/tags.js +0 -65
- package/extras/tours/map/catalog-panel.js +0 -112
- package/extras/tours/map/fab.js +0 -26
- package/extras/tours/map/navigation-bar.js +0 -187
- package/extras/tours/map/side-nav.js +0 -36
- package/test/api/core/test-log-2025-05-21.log +0 -15
- package/test/api/core/test-log-2025-06-25.log +0 -9
- package/test/api/core/test-log-2025-07-24.log +0 -44
- package/test/api/map/test-log-2025-05-27.log +0 -13
- package/test/api/map/test-log-2025-06-23.log +0 -7
- package/test/api/map/test-log-2025-07-24.log +0 -11
- package/test/client/core/api.js +0 -361
- package/test/client/core/index.js +0 -9
- package/test/client/index.js +0 -4
- package/test/client/map/index.js +0 -5
- package/test.client.js +0 -1
- /package/{test/client/core/time.js → extras/tests/core/time.mjs} +0 -0
- /package/extras/tours/{map/add-layer.js → add-layer.js} +0 -0
- /package/extras/tours/{map/catalog-categories.js → catalog-categories.js} +0 -0
- /package/extras/tours/{map/connect-layer.js → connect-layer.js} +0 -0
- /package/extras/tours/{map/create-layer.js → create-layer.js} +0 -0
- /package/extras/tours/{map/create-view.js → create-view.js} +0 -0
- /package/extras/tours/{map/import-layer.js → import-layer.js} +0 -0
- /package/extras/tours/{map/timeline.js → pane.bottom.js} +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">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>0/244</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>0/1</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>0/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">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>0/244</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 low'></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>
|
|
@@ -307,192 +307,20 @@
|
|
|
307
307
|
<a name='L242'></a><a href='#L242'>242</a>
|
|
308
308
|
<a name='L243'></a><a href='#L243'>243</a>
|
|
309
309
|
<a name='L244'></a><a href='#L244'>244</a>
|
|
310
|
-
<a name='L245'></a><a href='#L245'>245</a>
|
|
311
|
-
<a name='L246'></a><a href='#L246'>246</a>
|
|
312
|
-
<a name='L247'></a><a href='#L247'>247</a>
|
|
313
|
-
<a name='L248'></a><a href='#L248'>248</a>
|
|
314
|
-
<a name='L249'></a><a href='#L249'>249</a>
|
|
315
|
-
<a name='L250'></a><a href='#L250'>250</a>
|
|
316
|
-
<a name='L251'></a><a href='#L251'>251</a>
|
|
317
|
-
<a name='L252'></a><a href='#L252'>252</a>
|
|
318
|
-
<a name='L253'></a><a href='#L253'>253</a>
|
|
319
|
-
<a name='L254'></a><a href='#L254'>254</a>
|
|
320
|
-
<a name='L255'></a><a href='#L255'>255</a>
|
|
321
|
-
<a name='L256'></a><a href='#L256'>256</a>
|
|
322
|
-
<a name='L257'></a><a href='#L257'>257</a>
|
|
323
|
-
<a name='L258'></a><a href='#L258'>258</a>
|
|
324
|
-
<a name='L259'></a><a href='#L259'>259</a>
|
|
325
|
-
<a name='L260'></a><a href='#L260'>260</a>
|
|
326
|
-
<a name='L261'></a><a href='#L261'>261</a>
|
|
327
|
-
<a name='L262'></a><a href='#L262'>262</a>
|
|
328
|
-
<a name='L263'></a><a href='#L263'>263</a>
|
|
329
|
-
<a name='L264'></a><a href='#L264'>264</a>
|
|
330
|
-
<a name='L265'></a><a href='#L265'>265</a>
|
|
331
|
-
<a name='L266'></a><a href='#L266'>266</a>
|
|
332
|
-
<a name='L267'></a><a href='#L267'>267</a>
|
|
333
|
-
<a name='L268'></a><a href='#L268'>268</a>
|
|
334
|
-
<a name='L269'></a><a href='#L269'>269</a>
|
|
335
|
-
<a name='L270'></a><a href='#L270'>270</a>
|
|
336
|
-
<a name='L271'></a><a href='#L271'>271</a>
|
|
337
|
-
<a name='L272'></a><a href='#L272'>272</a>
|
|
338
|
-
<a name='L273'></a><a href='#L273'>273</a>
|
|
339
|
-
<a name='L274'></a><a href='#L274'>274</a>
|
|
340
|
-
<a name='L275'></a><a href='#L275'>275</a>
|
|
341
|
-
<a name='L276'></a><a href='#L276'>276</a>
|
|
342
|
-
<a name='L277'></a><a href='#L277'>277</a>
|
|
343
|
-
<a name='L278'></a><a href='#L278'>278</a>
|
|
344
|
-
<a name='L279'></a><a href='#L279'>279</a>
|
|
345
|
-
<a name='L280'></a><a href='#L280'>280</a>
|
|
346
|
-
<a name='L281'></a><a href='#L281'>281</a>
|
|
347
|
-
<a name='L282'></a><a href='#L282'>282</a>
|
|
348
|
-
<a name='L283'></a><a href='#L283'>283</a>
|
|
349
|
-
<a name='L284'></a><a href='#L284'>284</a>
|
|
350
|
-
<a name='L285'></a><a href='#L285'>285</a>
|
|
351
|
-
<a name='L286'></a><a href='#L286'>286</a>
|
|
352
|
-
<a name='L287'></a><a href='#L287'>287</a>
|
|
353
|
-
<a name='L288'></a><a href='#L288'>288</a>
|
|
354
|
-
<a name='L289'></a><a href='#L289'>289</a>
|
|
355
|
-
<a name='L290'></a><a href='#L290'>290</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>
|
|
361
|
-
<a name='L296'></a><a href='#L296'>296</a>
|
|
362
|
-
<a name='L297'></a><a href='#L297'>297</a>
|
|
363
|
-
<a name='L298'></a><a href='#L298'>298</a>
|
|
364
|
-
<a name='L299'></a><a href='#L299'>299</a>
|
|
365
|
-
<a name='L300'></a><a href='#L300'>300</a>
|
|
366
|
-
<a name='L301'></a><a href='#L301'>301</a>
|
|
367
|
-
<a name='L302'></a><a href='#L302'>302</a>
|
|
368
|
-
<a name='L303'></a><a href='#L303'>303</a>
|
|
369
|
-
<a name='L304'></a><a href='#L304'>304</a>
|
|
370
|
-
<a name='L305'></a><a href='#L305'>305</a>
|
|
371
|
-
<a name='L306'></a><a href='#L306'>306</a>
|
|
372
|
-
<a name='L307'></a><a href='#L307'>307</a>
|
|
373
|
-
<a name='L308'></a><a href='#L308'>308</a>
|
|
374
|
-
<a name='L309'></a><a href='#L309'>309</a>
|
|
375
|
-
<a name='L310'></a><a href='#L310'>310</a>
|
|
376
|
-
<a name='L311'></a><a href='#L311'>311</a>
|
|
377
|
-
<a name='L312'></a><a href='#L312'>312</a>
|
|
378
|
-
<a name='L313'></a><a href='#L313'>313</a>
|
|
379
|
-
<a name='L314'></a><a href='#L314'>314</a>
|
|
380
|
-
<a name='L315'></a><a href='#L315'>315</a>
|
|
381
|
-
<a name='L316'></a><a href='#L316'>316</a>
|
|
382
|
-
<a name='L317'></a><a href='#L317'>317</a>
|
|
383
|
-
<a name='L318'></a><a href='#L318'>318</a>
|
|
384
|
-
<a name='L319'></a><a href='#L319'>319</a>
|
|
385
|
-
<a name='L320'></a><a href='#L320'>320</a>
|
|
386
|
-
<a name='L321'></a><a href='#L321'>321</a>
|
|
387
|
-
<a name='L322'></a><a href='#L322'>322</a>
|
|
388
|
-
<a name='L323'></a><a href='#L323'>323</a>
|
|
389
|
-
<a name='L324'></a><a href='#L324'>324</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
390
|
-
<span class="cline-any cline-yes">1x</span>
|
|
391
|
-
<span class="cline-any cline-yes">1x</span>
|
|
392
|
-
<span class="cline-any cline-yes">1x</span>
|
|
393
|
-
<span class="cline-any cline-yes">1x</span>
|
|
394
|
-
<span class="cline-any cline-yes">1x</span>
|
|
395
|
-
<span class="cline-any cline-yes">1x</span>
|
|
396
|
-
<span class="cline-any cline-yes">1x</span>
|
|
397
|
-
<span class="cline-any cline-yes">1x</span>
|
|
398
|
-
<span class="cline-any cline-yes">1x</span>
|
|
399
|
-
<span class="cline-any cline-yes">1x</span>
|
|
400
|
-
<span class="cline-any cline-yes">1x</span>
|
|
401
|
-
<span class="cline-any cline-yes">1x</span>
|
|
402
|
-
<span class="cline-any cline-yes">1x</span>
|
|
403
|
-
<span class="cline-any cline-yes">1x</span>
|
|
404
|
-
<span class="cline-any cline-yes">1x</span>
|
|
405
|
-
<span class="cline-any cline-yes">5x</span>
|
|
406
|
-
<span class="cline-any cline-yes">5x</span>
|
|
407
|
-
<span class="cline-any cline-yes">5x</span>
|
|
408
|
-
<span class="cline-any cline-yes">5x</span>
|
|
409
|
-
<span class="cline-any cline-yes">5x</span>
|
|
410
|
-
<span class="cline-any cline-yes">5x</span>
|
|
411
|
-
<span class="cline-any cline-yes">5x</span>
|
|
412
|
-
<span class="cline-any cline-yes">5x</span>
|
|
413
|
-
<span class="cline-any cline-yes">5x</span>
|
|
414
|
-
<span class="cline-any cline-yes">5x</span>
|
|
415
|
-
<span class="cline-any cline-yes">5x</span>
|
|
416
|
-
<span class="cline-any cline-yes">5x</span>
|
|
417
|
-
<span class="cline-any cline-yes">5x</span>
|
|
418
|
-
<span class="cline-any cline-yes">5x</span>
|
|
419
|
-
<span class="cline-any cline-yes">5x</span>
|
|
420
|
-
<span class="cline-any cline-yes">12x</span>
|
|
421
|
-
<span class="cline-any cline-yes">12x</span>
|
|
422
|
-
<span class="cline-any cline-yes">5x</span>
|
|
423
|
-
<span class="cline-any cline-yes">5x</span>
|
|
424
|
-
<span class="cline-any cline-yes">5x</span>
|
|
425
|
-
<span class="cline-any cline-yes">5x</span>
|
|
426
|
-
<span class="cline-any cline-yes">5x</span>
|
|
427
|
-
<span class="cline-any cline-yes">5x</span>
|
|
428
|
-
<span class="cline-any cline-yes">1x</span>
|
|
429
|
-
<span class="cline-any cline-yes">1x</span>
|
|
430
|
-
<span class="cline-any cline-no"> </span>
|
|
431
|
-
<span class="cline-any cline-no"> </span>
|
|
432
|
-
<span class="cline-any cline-no"> </span>
|
|
310
|
+
<a name='L245'></a><a href='#L245'>245</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span>
|
|
433
311
|
<span class="cline-any cline-no"> </span>
|
|
434
|
-
<span class="cline-any cline-yes">1x</span>
|
|
435
|
-
<span class="cline-any cline-yes">1x</span>
|
|
436
|
-
<span class="cline-any cline-yes">2x</span>
|
|
437
|
-
<span class="cline-any cline-yes">2x</span>
|
|
438
|
-
<span class="cline-any cline-yes">2x</span>
|
|
439
|
-
<span class="cline-any cline-yes">2x</span>
|
|
440
|
-
<span class="cline-any cline-yes">2x</span>
|
|
441
|
-
<span class="cline-any cline-yes">2x</span>
|
|
442
|
-
<span class="cline-any cline-yes">2x</span>
|
|
443
|
-
<span class="cline-any cline-yes">2x</span>
|
|
444
|
-
<span class="cline-any cline-yes">2x</span>
|
|
445
|
-
<span class="cline-any cline-yes">2x</span>
|
|
446
|
-
<span class="cline-any cline-yes">2x</span>
|
|
447
|
-
<span class="cline-any cline-yes">2x</span>
|
|
448
|
-
<span class="cline-any cline-yes">2x</span>
|
|
449
|
-
<span class="cline-any cline-yes">2x</span>
|
|
450
|
-
<span class="cline-any cline-yes">2x</span>
|
|
451
|
-
<span class="cline-any cline-yes">2x</span>
|
|
452
|
-
<span class="cline-any cline-yes">1x</span>
|
|
453
|
-
<span class="cline-any cline-yes">1x</span>
|
|
454
312
|
<span class="cline-any cline-no"> </span>
|
|
455
313
|
<span class="cline-any cline-no"> </span>
|
|
456
314
|
<span class="cline-any cline-no"> </span>
|
|
457
315
|
<span class="cline-any cline-no"> </span>
|
|
458
|
-
<span class="cline-any cline-yes">1x</span>
|
|
459
|
-
<span class="cline-any cline-yes">1x</span>
|
|
460
|
-
<span class="cline-any cline-yes">1x</span>
|
|
461
|
-
<span class="cline-any cline-yes">1x</span>
|
|
462
|
-
<span class="cline-any cline-yes">1x</span>
|
|
463
|
-
<span class="cline-any cline-yes">1x</span>
|
|
464
|
-
<span class="cline-any cline-yes">1x</span>
|
|
465
|
-
<span class="cline-any cline-yes">1x</span>
|
|
466
|
-
<span class="cline-any cline-yes">1x</span>
|
|
467
|
-
<span class="cline-any cline-yes">1x</span>
|
|
468
|
-
<span class="cline-any cline-yes">1x</span>
|
|
469
|
-
<span class="cline-any cline-yes">1x</span>
|
|
470
|
-
<span class="cline-any cline-yes">1x</span>
|
|
471
316
|
<span class="cline-any cline-no"> </span>
|
|
472
317
|
<span class="cline-any cline-no"> </span>
|
|
473
318
|
<span class="cline-any cline-no"> </span>
|
|
474
319
|
<span class="cline-any cline-no"> </span>
|
|
475
|
-
<span class="cline-any cline-yes">1x</span>
|
|
476
|
-
<span class="cline-any cline-yes">1x</span>
|
|
477
|
-
<span class="cline-any cline-yes">1x</span>
|
|
478
|
-
<span class="cline-any cline-yes">1x</span>
|
|
479
|
-
<span class="cline-any cline-yes">1x</span>
|
|
480
|
-
<span class="cline-any cline-yes">1x</span>
|
|
481
|
-
<span class="cline-any cline-yes">1x</span>
|
|
482
|
-
<span class="cline-any cline-yes">1x</span>
|
|
483
|
-
<span class="cline-any cline-yes">1x</span>
|
|
484
|
-
<span class="cline-any cline-yes">1x</span>
|
|
485
|
-
<span class="cline-any cline-yes">1x</span>
|
|
486
|
-
<span class="cline-any cline-yes">1x</span>
|
|
487
|
-
<span class="cline-any cline-yes">1x</span>
|
|
488
|
-
<span class="cline-any cline-yes">1x</span>
|
|
489
320
|
<span class="cline-any cline-no"> </span>
|
|
490
321
|
<span class="cline-any cline-no"> </span>
|
|
491
322
|
<span class="cline-any cline-no"> </span>
|
|
492
323
|
<span class="cline-any cline-no"> </span>
|
|
493
|
-
<span class="cline-any cline-yes">1x</span>
|
|
494
|
-
<span class="cline-any cline-yes">1x</span>
|
|
495
|
-
<span class="cline-any cline-yes">1x</span>
|
|
496
324
|
<span class="cline-any cline-no"> </span>
|
|
497
325
|
<span class="cline-any cline-no"> </span>
|
|
498
326
|
<span class="cline-any cline-no"> </span>
|
|
@@ -514,8 +342,6 @@
|
|
|
514
342
|
<span class="cline-any cline-no"> </span>
|
|
515
343
|
<span class="cline-any cline-no"> </span>
|
|
516
344
|
<span class="cline-any cline-no"> </span>
|
|
517
|
-
<span class="cline-any cline-yes">1x</span>
|
|
518
|
-
<span class="cline-any cline-yes">1x</span>
|
|
519
345
|
<span class="cline-any cline-no"> </span>
|
|
520
346
|
<span class="cline-any cline-no"> </span>
|
|
521
347
|
<span class="cline-any cline-no"> </span>
|
|
@@ -528,8 +354,6 @@
|
|
|
528
354
|
<span class="cline-any cline-no"> </span>
|
|
529
355
|
<span class="cline-any cline-no"> </span>
|
|
530
356
|
<span class="cline-any cline-no"> </span>
|
|
531
|
-
<span class="cline-any cline-yes">1x</span>
|
|
532
|
-
<span class="cline-any cline-yes">1x</span>
|
|
533
357
|
<span class="cline-any cline-no"> </span>
|
|
534
358
|
<span class="cline-any cline-no"> </span>
|
|
535
359
|
<span class="cline-any cline-no"> </span>
|
|
@@ -544,10 +368,6 @@
|
|
|
544
368
|
<span class="cline-any cline-no"> </span>
|
|
545
369
|
<span class="cline-any cline-no"> </span>
|
|
546
370
|
<span class="cline-any cline-no"> </span>
|
|
547
|
-
<span class="cline-any cline-yes">1x</span>
|
|
548
|
-
<span class="cline-any cline-yes">1x</span>
|
|
549
|
-
<span class="cline-any cline-yes">1x</span>
|
|
550
|
-
<span class="cline-any cline-yes">1x</span>
|
|
551
371
|
<span class="cline-any cline-no"> </span>
|
|
552
372
|
<span class="cline-any cline-no"> </span>
|
|
553
373
|
<span class="cline-any cline-no"> </span>
|
|
@@ -630,9 +450,6 @@
|
|
|
630
450
|
<span class="cline-any cline-no"> </span>
|
|
631
451
|
<span class="cline-any cline-no"> </span>
|
|
632
452
|
<span class="cline-any cline-no"> </span>
|
|
633
|
-
<span class="cline-any cline-yes">1x</span>
|
|
634
|
-
<span class="cline-any cline-yes">1x</span>
|
|
635
|
-
<span class="cline-any cline-yes">1x</span>
|
|
636
453
|
<span class="cline-any cline-no"> </span>
|
|
637
454
|
<span class="cline-any cline-no"> </span>
|
|
638
455
|
<span class="cline-any cline-no"> </span>
|
|
@@ -640,277 +457,257 @@
|
|
|
640
457
|
<span class="cline-any cline-no"> </span>
|
|
641
458
|
<span class="cline-any cline-no"> </span>
|
|
642
459
|
<span class="cline-any cline-no"> </span>
|
|
643
|
-
<span class="cline-any cline-yes">1x</span>
|
|
644
|
-
<span class="cline-any cline-yes">1x</span>
|
|
645
|
-
<span class="cline-any cline-yes">4x</span>
|
|
646
|
-
<span class="cline-any cline-yes">4x</span>
|
|
647
|
-
<span class="cline-any cline-yes">4x</span>
|
|
648
|
-
<span class="cline-any cline-yes">4x</span>
|
|
649
|
-
<span class="cline-any cline-yes">4x</span>
|
|
650
|
-
<span class="cline-any cline-yes">4x</span>
|
|
651
|
-
<span class="cline-any cline-yes">1x</span>
|
|
652
|
-
<span class="cline-any cline-yes">1x</span>
|
|
653
460
|
<span class="cline-any cline-no"> </span>
|
|
654
461
|
<span class="cline-any cline-no"> </span>
|
|
655
462
|
<span class="cline-any cline-no"> </span>
|
|
656
|
-
<span class="cline-any cline-yes">1x</span>
|
|
657
|
-
<span class="cline-any cline-yes">1x</span>
|
|
658
|
-
<span class="cline-any cline-yes">4x</span>
|
|
659
|
-
<span class="cline-any cline-yes">4x</span>
|
|
660
|
-
<span class="cline-any cline-yes">4x</span>
|
|
661
|
-
<span class="cline-any cline-yes">4x</span>
|
|
662
463
|
<span class="cline-any cline-no"> </span>
|
|
663
464
|
<span class="cline-any cline-no"> </span>
|
|
664
|
-
<span class="cline-any cline-yes">4x</span>
|
|
665
|
-
<span class="cline-any cline-yes">4x</span>
|
|
666
465
|
<span class="cline-any cline-no"> </span>
|
|
667
466
|
<span class="cline-any cline-no"> </span>
|
|
668
|
-
<span class="cline-any cline-yes">4x</span>
|
|
669
|
-
<span class="cline-any cline-yes">4x</span>
|
|
670
|
-
<span class="cline-any cline-yes">14x</span>
|
|
671
|
-
<span class="cline-any cline-yes">1x</span>
|
|
672
|
-
<span class="cline-any cline-yes">1x</span>
|
|
673
|
-
<span class="cline-any cline-yes">1x</span>
|
|
674
|
-
<span class="cline-any cline-yes">1x</span>
|
|
675
|
-
<span class="cline-any cline-yes">4x</span>
|
|
676
|
-
<span class="cline-any cline-yes">4x</span>
|
|
677
|
-
<span class="cline-any cline-yes">4x</span>
|
|
678
467
|
<span class="cline-any cline-no"> </span>
|
|
679
468
|
<span class="cline-any cline-no"> </span>
|
|
680
|
-
<span class="cline-any cline-
|
|
681
|
-
<span class="cline-any cline-
|
|
682
|
-
<span class="cline-any cline-
|
|
683
|
-
<span class="cline-any cline-
|
|
684
|
-
<span class="cline-any cline-
|
|
685
|
-
<span class="cline-any cline-
|
|
686
|
-
<span class="cline-any cline-
|
|
687
|
-
<span class="cline-any cline-
|
|
688
|
-
<span class="cline-any cline-
|
|
689
|
-
<span class="cline-any cline-
|
|
690
|
-
<span class="cline-any cline-
|
|
691
|
-
<span class="cline-any cline-
|
|
692
|
-
<span class="cline-any cline-
|
|
693
|
-
<span class="cline-any cline-
|
|
694
|
-
<span class="cline-any cline-
|
|
695
|
-
<span class="cline-any cline-
|
|
696
|
-
<span class="cline-any cline-
|
|
697
|
-
<span class="cline-any cline-
|
|
698
|
-
<span class="cline-any cline-
|
|
699
|
-
<span class="cline-any cline-
|
|
700
|
-
<span class="cline-any cline-
|
|
701
|
-
<span class="cline-any cline-
|
|
702
|
-
<span class="cline-any cline-
|
|
703
|
-
<span class="cline-any cline-
|
|
704
|
-
<span class="cline-any cline-
|
|
705
|
-
<span class="cline-any cline-
|
|
706
|
-
<span class="cline-any cline-
|
|
707
|
-
<span class="cline-any cline-
|
|
708
|
-
<span class="cline-any cline-
|
|
709
|
-
<span class="cline-any cline-
|
|
710
|
-
<span class="cline-any cline-
|
|
711
|
-
<span class="cline-any cline-
|
|
712
|
-
<span class="cline-any cline-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
469
|
+
<span class="cline-any cline-no"> </span>
|
|
470
|
+
<span class="cline-any cline-no"> </span>
|
|
471
|
+
<span class="cline-any cline-no"> </span>
|
|
472
|
+
<span class="cline-any cline-no"> </span>
|
|
473
|
+
<span class="cline-any cline-no"> </span>
|
|
474
|
+
<span class="cline-any cline-no"> </span>
|
|
475
|
+
<span class="cline-any cline-no"> </span>
|
|
476
|
+
<span class="cline-any cline-no"> </span>
|
|
477
|
+
<span class="cline-any cline-no"> </span>
|
|
478
|
+
<span class="cline-any cline-no"> </span>
|
|
479
|
+
<span class="cline-any cline-no"> </span>
|
|
480
|
+
<span class="cline-any cline-no"> </span>
|
|
481
|
+
<span class="cline-any cline-no"> </span>
|
|
482
|
+
<span class="cline-any cline-no"> </span>
|
|
483
|
+
<span class="cline-any cline-no"> </span>
|
|
484
|
+
<span class="cline-any cline-no"> </span>
|
|
485
|
+
<span class="cline-any cline-no"> </span>
|
|
486
|
+
<span class="cline-any cline-no"> </span>
|
|
487
|
+
<span class="cline-any cline-no"> </span>
|
|
488
|
+
<span class="cline-any cline-no"> </span>
|
|
489
|
+
<span class="cline-any cline-no"> </span>
|
|
490
|
+
<span class="cline-any cline-no"> </span>
|
|
491
|
+
<span class="cline-any cline-no"> </span>
|
|
492
|
+
<span class="cline-any cline-no"> </span>
|
|
493
|
+
<span class="cline-any cline-no"> </span>
|
|
494
|
+
<span class="cline-any cline-no"> </span>
|
|
495
|
+
<span class="cline-any cline-no"> </span>
|
|
496
|
+
<span class="cline-any cline-no"> </span>
|
|
497
|
+
<span class="cline-any cline-no"> </span>
|
|
498
|
+
<span class="cline-any cline-no"> </span>
|
|
499
|
+
<span class="cline-any cline-no"> </span>
|
|
500
|
+
<span class="cline-any cline-no"> </span>
|
|
501
|
+
<span class="cline-any cline-no"> </span>
|
|
502
|
+
<span class="cline-any cline-no"> </span>
|
|
503
|
+
<span class="cline-any cline-no"> </span>
|
|
504
|
+
<span class="cline-any cline-no"> </span>
|
|
505
|
+
<span class="cline-any cline-no"> </span>
|
|
506
|
+
<span class="cline-any cline-no"> </span>
|
|
507
|
+
<span class="cline-any cline-no"> </span>
|
|
508
|
+
<span class="cline-any cline-no"> </span>
|
|
509
|
+
<span class="cline-any cline-no"> </span>
|
|
510
|
+
<span class="cline-any cline-no"> </span>
|
|
511
|
+
<span class="cline-any cline-no"> </span>
|
|
512
|
+
<span class="cline-any cline-no"> </span>
|
|
513
|
+
<span class="cline-any cline-no"> </span>
|
|
514
|
+
<span class="cline-any cline-no"> </span>
|
|
515
|
+
<span class="cline-any cline-no"> </span>
|
|
516
|
+
<span class="cline-any cline-no"> </span>
|
|
517
|
+
<span class="cline-any cline-no"> </span>
|
|
518
|
+
<span class="cline-any cline-no"> </span>
|
|
519
|
+
<span class="cline-any cline-no"> </span>
|
|
520
|
+
<span class="cline-any cline-no"> </span>
|
|
521
|
+
<span class="cline-any cline-no"> </span>
|
|
522
|
+
<span class="cline-any cline-no"> </span>
|
|
523
|
+
<span class="cline-any cline-no"> </span>
|
|
524
|
+
<span class="cline-any cline-no"> </span>
|
|
525
|
+
<span class="cline-any cline-no"> </span>
|
|
526
|
+
<span class="cline-any cline-no"> </span>
|
|
527
|
+
<span class="cline-any cline-no"> </span>
|
|
528
|
+
<span class="cline-any cline-no"> </span>
|
|
529
|
+
<span class="cline-any cline-no"> </span>
|
|
530
|
+
<span class="cline-any cline-no"> </span>
|
|
531
|
+
<span class="cline-any cline-no"> </span>
|
|
532
|
+
<span class="cline-any cline-no"> </span>
|
|
533
|
+
<span class="cline-any cline-no"> </span>
|
|
534
|
+
<span class="cline-any cline-no"> </span>
|
|
535
|
+
<span class="cline-any cline-no"> </span>
|
|
536
|
+
<span class="cline-any cline-no"> </span>
|
|
537
|
+
<span class="cline-any cline-no"> </span>
|
|
538
|
+
<span class="cline-any cline-no"> </span>
|
|
539
|
+
<span class="cline-any cline-no"> </span>
|
|
540
|
+
<span class="cline-any cline-no"> </span>
|
|
541
|
+
<span class="cline-any cline-no"> </span>
|
|
542
|
+
<span class="cline-any cline-no"> </span>
|
|
543
|
+
<span class="cline-any cline-no"> </span>
|
|
544
|
+
<span class="cline-any cline-no"> </span>
|
|
545
|
+
<span class="cline-any cline-no"> </span>
|
|
546
|
+
<span class="cline-any cline-no"> </span>
|
|
547
|
+
<span class="cline-any cline-no"> </span>
|
|
548
|
+
<span class="cline-any cline-no"> </span>
|
|
549
|
+
<span class="cline-any cline-no"> </span>
|
|
550
|
+
<span class="cline-any cline-no"> </span>
|
|
551
|
+
<span class="cline-any cline-no"> </span>
|
|
552
|
+
<span class="cline-any cline-no"> </span>
|
|
553
|
+
<span class="cline-any cline-no"> </span>
|
|
554
|
+
<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" >import _ from 'lodash'</span></span></span>
|
|
555
|
+
<span class="cstat-no" title="statement not covered" >import path from 'path'</span>
|
|
556
|
+
<span class="cstat-no" title="statement not covered" >import fs from 'fs-extra'</span>
|
|
557
|
+
<span class="cstat-no" title="statement not covered" >import zlib from 'zlib'</span>
|
|
558
|
+
<span class="cstat-no" title="statement not covered" >import request from 'superagent'</span>
|
|
559
|
+
<span class="cstat-no" title="statement not covered" >import makeDebug from 'debug'</span>
|
|
560
|
+
<span class="cstat-no" title="statement not covered" >import { fileURLToPath } from 'url'</span>
|
|
561
|
+
<span class="cstat-no" title="statement not covered" >import * as permissions from '../../../core/common/permissions.js'</span>
|
|
562
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
563
|
+
<span class="cstat-no" title="statement not covered" >const __dirname = path.dirname(fileURLToPath(import.meta.url))</span>
|
|
564
|
+
<span class="cstat-no" title="statement not covered" >const modelsPath = path.join(__dirname, '..', 'models')</span>
|
|
565
|
+
<span class="cstat-no" title="statement not covered" >const servicesPath = path.join(__dirname, '..', 'services')</span>
|
|
566
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
567
|
+
<span class="cstat-no" title="statement not covered" >const debug = makeDebug('kdk:map:services')</span>
|
|
568
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
569
|
+
<span class="cstat-no" title="statement not covered" >export function createFeaturesService (options = {}) {</span>
|
|
570
|
+
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
571
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
572
|
+
<span class="cstat-no" title="statement not covered" > debug('Creating features service with options', options)</span>
|
|
573
|
+
<span class="cstat-no" title="statement not covered" > return app.createService(options.collection, Object.assign({</span>
|
|
574
|
+
<span class="cstat-no" title="statement not covered" > modelName: 'features',</span>
|
|
575
|
+
<span class="cstat-no" title="statement not covered" > servicesPath,</span>
|
|
576
|
+
<span class="cstat-no" title="statement not covered" > modelsPath,</span>
|
|
577
|
+
<span class="cstat-no" title="statement not covered" > paginate: { default: 5000, max: 5000 },</span>
|
|
578
|
+
<span class="cstat-no" title="statement not covered" > // FIXME: no real-time events for now since we create big batches,</span>
|
|
579
|
+
<span class="cstat-no" title="statement not covered" > // does not seem to be sufficient also require a hook (see https://github.com/feathersjs/feathers/issues/922)</span>
|
|
580
|
+
<span class="cstat-no" title="statement not covered" > events: ['features'],</span>
|
|
581
|
+
<span class="cstat-no" title="statement not covered" > methods: ['find', 'get', 'create', 'update', 'patch', 'remove', 'heatmap']</span>
|
|
582
|
+
<span class="cstat-no" title="statement not covered" > }, options))</span>
|
|
583
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
584
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
585
|
+
<span class="cstat-no" title="statement not covered" >export function removeFeaturesService (options = {}) {</span>
|
|
753
586
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
754
|
-
<span class="cstat-no" title="statement not covered" > debug('Removing features service with options', options)</span>
|
|
755
587
|
<span class="cstat-no" title="statement not covered" > return app.removeService(app.getService(options.collection, options.context))</span>
|
|
756
588
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
757
|
-
|
|
758
|
-
export function createCatalogService (options = {}) {
|
|
759
|
-
const app = this
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
paginate: { default: 1000, max: 1000 },
|
|
771
|
-
categories,
|
|
772
|
-
sublegends
|
|
773
|
-
}, options))
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
export <span class="fstat-no" title="function not covered" >function removeCatalogService (options = {}) {</span>
|
|
589
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
590
|
+
<span class="cstat-no" title="statement not covered" >export function createCatalogService (options = {}) {</span>
|
|
591
|
+
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
592
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
593
|
+
<span class="cstat-no" title="statement not covered" > debug('Creating catalog service with options', options)</span>
|
|
594
|
+
<span class="cstat-no" title="statement not covered" > return app.createService('catalog', Object.assign({</span>
|
|
595
|
+
<span class="cstat-no" title="statement not covered" > servicesPath,</span>
|
|
596
|
+
<span class="cstat-no" title="statement not covered" > modelsPath,</span>
|
|
597
|
+
<span class="cstat-no" title="statement not covered" > paginate: { default: 1000, max: 1000 }</span>
|
|
598
|
+
<span class="cstat-no" title="statement not covered" > }, options))</span>
|
|
599
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
600
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
601
|
+
<span class="cstat-no" title="statement not covered" >export function removeCatalogService (options = {}) {</span>
|
|
777
602
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
778
|
-
<span class="cstat-no" title="statement not covered" > debug('Removing catalog service with options', options)</span>
|
|
779
603
|
<span class="cstat-no" title="statement not covered" > return app.removeService(app.getService('catalog', options.context))</span>
|
|
780
604
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
781
|
-
|
|
782
|
-
export async function createProjectsService (options = {}) {
|
|
783
|
-
const app = this
|
|
784
|
-
|
|
785
|
-
debug('Creating projects service with options', options)
|
|
786
|
-
await app.createService('projects', Object.assign({
|
|
787
|
-
servicesPath
|
|
788
|
-
modelsPath
|
|
789
|
-
paginate: { default: 20, max: 5000 }
|
|
790
|
-
}, options))
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
|
|
605
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
606
|
+
<span class="cstat-no" title="statement not covered" >export async function createProjectsService (options = {}) {</span>
|
|
607
|
+
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
608
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
609
|
+
<span class="cstat-no" title="statement not covered" > debug('Creating projects service with options', options)</span>
|
|
610
|
+
<span class="cstat-no" title="statement not covered" > await app.createService('projects', Object.assign({</span>
|
|
611
|
+
<span class="cstat-no" title="statement not covered" > servicesPath,</span>
|
|
612
|
+
<span class="cstat-no" title="statement not covered" > modelsPath,</span>
|
|
613
|
+
<span class="cstat-no" title="statement not covered" > paginate: { default: 20, max: 5000 }</span>
|
|
614
|
+
<span class="cstat-no" title="statement not covered" > }, options))</span>
|
|
615
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
616
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
617
|
+
<span class="cstat-no" title="statement not covered" >export function removeProjectsService (options = {}) {</span>
|
|
794
618
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
795
|
-
<span class="cstat-no" title="statement not covered" > debug('Removing projects service with options', options)</span>
|
|
796
619
|
<span class="cstat-no" title="statement not covered" > return app.removeService(app.getService('projects', options.context))</span>
|
|
797
620
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
798
|
-
|
|
799
|
-
export function createAlertsService (options = {}) {
|
|
800
|
-
const app = this
|
|
801
|
-
|
|
802
|
-
debug('Creating alerts service with options', options)
|
|
803
|
-
const paginate = { default: 5000, max: 5000 }
|
|
804
|
-
return app.createService('alerts', Object.assign({
|
|
805
|
-
servicesPath,
|
|
806
|
-
modelsPath,
|
|
807
|
-
paginate
|
|
808
|
-
}, options))
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
export <span class="fstat-no" title="function not covered" >function removeAlertsService (options = {}) {</span>
|
|
621
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
622
|
+
<span class="cstat-no" title="statement not covered" >export function createAlertsService (options = {}) {</span>
|
|
812
623
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
813
|
-
<span class="cstat-no" title="statement not covered"
|
|
814
|
-
<span class="cstat-no" title="statement not covered" >
|
|
624
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
625
|
+
<span class="cstat-no" title="statement not covered" > debug('Creating alerts service with options', options)</span>
|
|
626
|
+
<span class="cstat-no" title="statement not covered" > const paginate = { default: 5000, max: 5000 }</span>
|
|
627
|
+
<span class="cstat-no" title="statement not covered" > return app.createService('alerts', Object.assign({</span>
|
|
628
|
+
<span class="cstat-no" title="statement not covered" > servicesPath,</span>
|
|
629
|
+
<span class="cstat-no" title="statement not covered" > modelsPath,</span>
|
|
630
|
+
<span class="cstat-no" title="statement not covered" > paginate</span>
|
|
631
|
+
<span class="cstat-no" title="statement not covered" > }, options))</span>
|
|
815
632
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
export <span class="fstat-no" title="function not covered" >async function createFeaturesServiceForLayer (layer, context) {</span>
|
|
633
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
634
|
+
<span class="cstat-no" title="statement not covered" >export function removeAlertsService (options = {}) {</span>
|
|
819
635
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
820
|
-
<span class="cstat-no" title="statement not covered" >
|
|
821
|
-
<span class="cstat-no" title="statement not covered" > // Avoid create it twice as we can share services between different layers</span>
|
|
822
|
-
<span class="cstat-no" title="statement not covered" > let probeService = (layer.probeService ? app.getService(layer.probeService, context) : null)</span>
|
|
823
|
-
<span class="cstat-no" title="statement not covered" > if (layer.probeService && !probeService) {</span>
|
|
824
|
-
<span class="cstat-no" title="statement not covered" > probeService = await createFeaturesService.call(app, Object.assign({</span>
|
|
825
|
-
<span class="cstat-no" title="statement not covered" > collection: layer.probeService,</span>
|
|
826
|
-
<span class="cstat-no" title="statement not covered" > context,</span>
|
|
827
|
-
<span class="cstat-no" title="statement not covered" > db: app.db.db(layer.dbName)</span>
|
|
828
|
-
<span class="cstat-no" title="statement not covered" > }, _.pick(layer, ['featureLabel', 'simplifyResult', 'skipEvents', 'simplifyEvents'])))</span>
|
|
829
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
830
|
-
<span class="cstat-no" title="statement not covered" > let service = (layer.service ? app.getService(layer.service, context) : null)</span>
|
|
831
|
-
<span class="cstat-no" title="statement not covered" > if (layer.service && !service) {</span>
|
|
832
|
-
<span class="cstat-no" title="statement not covered" > service = await createFeaturesService.call(app, Object.assign({</span>
|
|
833
|
-
<span class="cstat-no" title="statement not covered" > collection: layer.service,</span>
|
|
834
|
-
<span class="cstat-no" title="statement not covered" > context,</span>
|
|
835
|
-
<span class="cstat-no" title="statement not covered" > db: app.db.db(layer.dbName)</span>
|
|
836
|
-
<span class="cstat-no" title="statement not covered" > }, _.pick(layer, ['ttl', 'featureId', 'featureIdType', 'featureLabel', 'variables', 'simplifyResult', 'skipEvents', 'simplifyEvents'])))</span>
|
|
837
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
838
|
-
<span class="cstat-no" title="statement not covered" > return service || probeService</span>
|
|
636
|
+
<span class="cstat-no" title="statement not covered" > return app.removeService(app.getService('alerts', options.context))</span>
|
|
839
637
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
840
|
-
|
|
841
|
-
|
|
638
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
639
|
+
<span class="cstat-no" title="statement not covered" >// Helper to register service and permissions for a layer</span>
|
|
640
|
+
<span class="cstat-no" title="statement not covered" >export async function createFeaturesServiceForLayer (options) {</span>
|
|
842
641
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
843
|
-
<span class="cstat-no" title="statement not covered" >
|
|
844
|
-
<span class="cstat-no" title="statement not covered" >
|
|
845
|
-
<span class="cstat-no" title="statement not covered" >
|
|
846
|
-
<span class="cstat-no" title="statement not covered" >
|
|
847
|
-
<span class="cstat-no" title="statement not covered" >
|
|
848
|
-
<span class="cstat-no" title="statement not covered" >
|
|
849
|
-
<span class="cstat-no" title="statement not covered" >
|
|
850
|
-
<span class="cstat-no" title="statement not covered" > service = await removeFeaturesService.call(app, { collection: layer.service, context })</span>
|
|
851
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
852
|
-
<span class="cstat-no" title="statement not covered" > return service || probeService</span>
|
|
642
|
+
<span class="cstat-no" title="statement not covered" > const service = await createFeaturesService.call(app, options)</span>
|
|
643
|
+
<span class="cstat-no" title="statement not covered" > // Register default permissions for it</span>
|
|
644
|
+
<span class="cstat-no" title="statement not covered" > permissions.defineAbilities.registerHook((subject, can, cannot) => {</span>
|
|
645
|
+
<span class="cstat-no" title="statement not covered" > can('service', options.collection)</span>
|
|
646
|
+
<span class="cstat-no" title="statement not covered" > can('read', options.collection)</span>
|
|
647
|
+
<span class="cstat-no" title="statement not covered" > })</span>
|
|
648
|
+
<span class="cstat-no" title="statement not covered" > return service</span>
|
|
853
649
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
854
|
-
|
|
855
|
-
|
|
650
|
+
<span class="cstat-no" title="statement not covered" >// Helper to create features from source for a layer</span>
|
|
651
|
+
<span class="cstat-no" title="statement not covered" >export async function createFeaturesForLayer (features, layer, options) {</span>
|
|
856
652
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
857
|
-
<span class="cstat-no" title="statement not covered" > const featuresService = app.getService(layer.service
|
|
653
|
+
<span class="cstat-no" title="statement not covered" > const featuresService = app.getService(layer.service)</span>
|
|
858
654
|
<span class="cstat-no" title="statement not covered" > if (options && options.filter) features = await options.filter(features, layer, app)</span>
|
|
859
|
-
<span class="cstat-no" title="statement not covered" > // User-defined layers requires layer ID</span>
|
|
860
|
-
<span class="cstat-no" title="statement not covered" > if (layer.service === 'features') {</span>
|
|
861
|
-
<span class="cstat-no" title="statement not covered" > features.forEach(feature => {</span>
|
|
862
|
-
<span class="cstat-no" title="statement not covered" > feature.layer = layer._id</span>
|
|
863
|
-
<span class="cstat-no" title="statement not covered" > })</span>
|
|
864
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
865
655
|
<span class="cstat-no" title="statement not covered" > if (!features.length) return</span>
|
|
866
656
|
<span class="cstat-no" title="statement not covered" > // The unordered option ensure a faster processing when inserting multiple items</span>
|
|
867
657
|
<span class="cstat-no" title="statement not covered" > // and that after an error remaining write operations in the queue will continue anyway</span>
|
|
868
658
|
<span class="cstat-no" title="statement not covered" > await featuresService.create(features, { mongodb: { ordered: false } })</span>
|
|
869
659
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
// Will also clean and feed default data (ie features) if provided as input file
|
|
873
|
-
export <span class="fstat-no" title="function not covered" >async function createDefaultCatalogLayers (options = {}) {</span>
|
|
660
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
661
|
+
<span class="cstat-no" title="statement not covered" >export async function createDefaultCatalogLayers (options) {</span>
|
|
874
662
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
875
|
-
<span class="cstat-no" title="statement not covered" >
|
|
663
|
+
<span class="cstat-no" title="statement not covered" > // Backward compatibility when the sole possible option was a context</span>
|
|
664
|
+
<span class="cstat-no" title="statement not covered" > let context</span>
|
|
665
|
+
<span class="cstat-no" title="statement not covered" > if (typeof options === 'object') {</span>
|
|
666
|
+
<span class="cstat-no" title="statement not covered" > if (options.context) context = options.context</span>
|
|
667
|
+
<span class="cstat-no" title="statement not covered" > else if (options._id) context = options</span>
|
|
668
|
+
<span class="cstat-no" title="statement not covered" > } else if (typeof options === 'string') context = options</span>
|
|
669
|
+
<span class="cstat-no" title="statement not covered" > const catalogService = app.getService('catalog', context)</span>
|
|
876
670
|
<span class="cstat-no" title="statement not covered" > const catalog = app.get('catalog')</span>
|
|
877
671
|
<span class="cstat-no" title="statement not covered" ></span>
|
|
878
672
|
<span class="cstat-no" title="statement not covered" > const defaultLayers = catalog ? catalog.layers || [] : []</span>
|
|
879
673
|
<span class="cstat-no" title="statement not covered" > const layers = await catalogService.find({ query: {}, paginate: false })</span>
|
|
880
674
|
<span class="cstat-no" title="statement not covered" > for (let i = 0; i < defaultLayers.length; i++) {</span>
|
|
881
675
|
<span class="cstat-no" title="statement not covered" > const defaultLayer = defaultLayers[i]</span>
|
|
882
|
-
<span class="cstat-no" title="statement not covered" >
|
|
883
|
-
<span class="cstat-no" title="statement not covered" > const isLayerAlreadyCreated = !_.isNil(createdLayer)</span>
|
|
884
|
-
<span class="cstat-no" title="statement not covered" > let featuresService</span>
|
|
676
|
+
<span class="cstat-no" title="statement not covered" > const createdLayer = _.find(layers, { name: defaultLayer.name })</span>
|
|
885
677
|
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
886
|
-
<span class="cstat-no" title="statement not covered" > // Used to filter properties only used to initialize a layer and related data</span>
|
|
887
|
-
<span class="cstat-no" title="statement not covered" > const reservedProperties = ['filter', 'url', 'fileName', 'forceDataUpdate']</span>
|
|
888
678
|
<span class="cstat-no" title="statement not covered" > // Create or update the layer removing any option only used to manage layer setup</span>
|
|
889
|
-
<span class="cstat-no" title="statement not covered" > if (!
|
|
679
|
+
<span class="cstat-no" title="statement not covered" > if (!createdLayer) {</span>
|
|
890
680
|
<span class="cstat-no" title="statement not covered" > app.logger.info('Adding default layer (name = ' + defaultLayer.name + ')')</span>
|
|
891
|
-
<span class="cstat-no" title="statement not covered" >
|
|
681
|
+
<span class="cstat-no" title="statement not covered" > await catalogService.create(_.omit(defaultLayer, ['filter']))</span>
|
|
892
682
|
<span class="cstat-no" title="statement not covered" > } else {</span>
|
|
893
683
|
<span class="cstat-no" title="statement not covered" > app.logger.info('Updating default layer (name = ' + defaultLayer.name + ')')</span>
|
|
894
|
-
<span class="cstat-no" title="statement not covered" >
|
|
895
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
896
|
-
<span class="cstat-no" title="statement not covered" > // Features creation might require the layer ID</span>
|
|
897
|
-
<span class="cstat-no" title="statement not covered" > defaultLayer._id = createdLayer._id</span>
|
|
898
|
-
<span class="cstat-no" title="statement not covered" > // Check if service(s) are associated to this layer and create the related service(s) if required</span>
|
|
899
|
-
<span class="cstat-no" title="statement not covered" > if (defaultLayer.service) {</span>
|
|
900
|
-
<span class="cstat-no" title="statement not covered" > featuresService = app.getService(defaultLayer.service)</span>
|
|
901
|
-
<span class="cstat-no" title="statement not covered" > // Avoid create it twice as we can share services between different layers</span>
|
|
902
|
-
<span class="cstat-no" title="statement not covered" > featuresService = await createFeaturesServiceForLayer.call(app, defaultLayer, options.context)</span>
|
|
684
|
+
<span class="cstat-no" title="statement not covered" > await catalogService.update(createdLayer._id, _.omit(defaultLayer, ['filter']))</span>
|
|
903
685
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
904
686
|
<span class="cstat-no" title="statement not covered" > } catch (error) {</span>
|
|
905
687
|
<span class="cstat-no" title="statement not covered" > console.error(error)</span>
|
|
906
688
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
689
|
+
<span class="cstat-no" title="statement not covered" > // Check if service(s) are associated to this layer</span>
|
|
690
|
+
<span class="cstat-no" title="statement not covered" > let featuresService</span>
|
|
691
|
+
<span class="cstat-no" title="statement not covered" > if (defaultLayer.service) {</span>
|
|
692
|
+
<span class="cstat-no" title="statement not covered" > featuresService = app.getService(defaultLayer.service)</span>
|
|
693
|
+
<span class="cstat-no" title="statement not covered" > // Avoid create it twice as we can share services between different layers</span>
|
|
694
|
+
<span class="cstat-no" title="statement not covered" > if (featuresService) continue</span>
|
|
695
|
+
<span class="cstat-no" title="statement not covered" > featuresService = await createFeaturesServiceForLayer.call(app, Object.assign({</span>
|
|
696
|
+
<span class="cstat-no" title="statement not covered" > collection: defaultLayer.service,</span>
|
|
697
|
+
<span class="cstat-no" title="statement not covered" > db: app.db.db(defaultLayer.dbName)</span>
|
|
698
|
+
<span class="cstat-no" title="statement not covered" > }, _.pick(defaultLayer, ['ttl', 'featureId', 'featureIdType', 'featureLabel', 'variables', 'simplifyResult', 'skipEvents', 'simplifyEvents'])))</span>
|
|
699
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
700
|
+
<span class="cstat-no" title="statement not covered" > if (defaultLayer.probeService) {</span>
|
|
701
|
+
<span class="cstat-no" title="statement not covered" > await createFeaturesServiceForLayer.call(app, Object.assign({</span>
|
|
702
|
+
<span class="cstat-no" title="statement not covered" > collection: defaultLayer.probeService,</span>
|
|
703
|
+
<span class="cstat-no" title="statement not covered" > db: app.db.db(defaultLayer.dbName)</span>
|
|
704
|
+
<span class="cstat-no" title="statement not covered" > }, _.pick(defaultLayer, ['featureLabel', 'simplifyResult', 'skipEvents', 'simplifyEvents'])))</span>
|
|
705
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
907
706
|
<span class="cstat-no" title="statement not covered" > // And if we need to initialize some data as well</span>
|
|
908
|
-
<span class="cstat-no" title="statement not covered" > if (
|
|
909
|
-
<span class="cstat-no" title="statement not covered" > app.logger.info('Updating data for default layer (name = ' + defaultLayer.name + ')')</span>
|
|
707
|
+
<span class="cstat-no" title="statement not covered" > if (!createdLayer && featuresService && (defaultLayer.url || defaultLayer.fileName)) {</span>
|
|
910
708
|
<span class="cstat-no" title="statement not covered" > // Cleanup</span>
|
|
911
709
|
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
912
|
-
<span class="cstat-no" title="statement not covered" >
|
|
913
|
-
<span class="cstat-no" title="statement not covered" > await featuresService.remove(null, { query: { layer: { $exists: false } } })</span>
|
|
710
|
+
<span class="cstat-no" title="statement not covered" > await featuresService.remove(null, { query: {} })</span>
|
|
914
711
|
<span class="cstat-no" title="statement not covered" > } catch (error) {</span>
|
|
915
712
|
<span class="cstat-no" title="statement not covered" > console.error(error)</span>
|
|
916
713
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
@@ -928,15 +725,9 @@ export <span class="fstat-no" title="function not covered" >async function creat
|
|
|
928
725
|
<span class="cstat-no" title="statement not covered" > .pipe(zlib.createGunzip())</span>
|
|
929
726
|
<span class="cstat-no" title="statement not covered" > .pipe(fs.createWriteStream(extractedFileName))</span>
|
|
930
727
|
<span class="cstat-no" title="statement not covered" > .on('close', async () => {</span>
|
|
931
|
-
<span class="cstat-no" title="statement not covered" >
|
|
932
|
-
<span class="cstat-no" title="statement not covered" > // We allow GeoJson collection or features array</span>
|
|
933
|
-
<span class="cstat-no" title="statement not covered" > geojson = Array.isArray(geojson) ? geojson : geojson.features</span>
|
|
934
|
-
<span class="cstat-no" title="statement not covered" > // We also allow for data exported from MongoDB, in this case remove any Mongo specific ID</span>
|
|
935
|
-
<span class="cstat-no" title="statement not covered" > geojson.forEach(feature => {</span>
|
|
936
|
-
<span class="cstat-no" title="statement not covered" > delete feature._id</span>
|
|
937
|
-
<span class="cstat-no" title="statement not covered" > })</span>
|
|
728
|
+
<span class="cstat-no" title="statement not covered" > const geojson = fs.readJsonSync(extractedFileName)</span>
|
|
938
729
|
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
939
|
-
<span class="cstat-no" title="statement not covered" > await createFeaturesForLayer.call(app, geojson, defaultLayer, options)</span>
|
|
730
|
+
<span class="cstat-no" title="statement not covered" > await createFeaturesForLayer.call(app, geojson.features, defaultLayer, options)</span>
|
|
940
731
|
<span class="cstat-no" title="statement not covered" > } catch (error) {</span>
|
|
941
732
|
<span class="cstat-no" title="statement not covered" > console.error(error)</span>
|
|
942
733
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
@@ -953,85 +744,57 @@ export <span class="fstat-no" title="function not covered" >async function creat
|
|
|
953
744
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
954
745
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
955
746
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
export <span class="fstat-no" title="function not covered" >async function createCatalogFeaturesServices (options = {}) {</span>
|
|
959
|
-
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
960
|
-
<span class="cstat-no" title="statement not covered" > const catalogService = app.getService('catalog', options.context)</span>
|
|
961
|
-
<span class="cstat-no" title="statement not covered" > const layers = await catalogService.find({ query: { service: { $exists: true } }, paginate: false, $select: ['service'] })</span>
|
|
962
|
-
<span class="cstat-no" title="statement not covered" > for (let i = 0; i < layers.length; i++) {</span>
|
|
963
|
-
<span class="cstat-no" title="statement not covered" > await createFeaturesServiceForLayer.call(app, layers[i], options.context)</span>
|
|
964
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
965
|
-
<span class="cstat-no" title="statement not covered" >}</span>
|
|
966
|
-
|
|
967
|
-
export function createStylesService (options = {}) {
|
|
968
|
-
const app = this
|
|
969
|
-
return app.createService('styles', Object.assign({
|
|
970
|
-
servicesPath,
|
|
971
|
-
modelsPath
|
|
972
|
-
}, options))
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
export <span class="fstat-no" title="function not covered" >function removeStylesService (options = {}) {</span>
|
|
747
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
748
|
+
<span class="cstat-no" title="statement not covered" >export default async function () {</span>
|
|
976
749
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
977
|
-
<span class="cstat-no" title="statement not covered"
|
|
978
|
-
<span class="cstat-no" title="statement not covered" >
|
|
979
|
-
|
|
980
|
-
export default async function () {
|
|
981
|
-
const app = this
|
|
982
|
-
|
|
983
|
-
const catalogConfig = app.get('catalog')
|
|
984
|
-
if (catalogConfig) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
750
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
751
|
+
<span class="cstat-no" title="statement not covered" > const catalogConfig = app.get('catalog')</span>
|
|
752
|
+
<span class="cstat-no" title="statement not covered" > if (catalogConfig) {</span>
|
|
985
753
|
<span class="cstat-no" title="statement not covered" > await createCatalogService.call(app)</span>
|
|
986
754
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
987
|
-
const projectsConfig = app.get('projects')
|
|
988
|
-
|
|
755
|
+
<span class="cstat-no" title="statement not covered" > const projectsConfig = app.get('projects')</span>
|
|
756
|
+
<span class="cstat-no" title="statement not covered" > if (projectsConfig) {</span>
|
|
989
757
|
<span class="cstat-no" title="statement not covered" > await createProjectsService.call(app)</span>
|
|
990
758
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
991
|
-
// Add app-specific hooks to required services
|
|
992
|
-
app.on('service', async service => {
|
|
993
|
-
if (service.name === 'alerts') {
|
|
994
|
-
// On startup restore alerts CRON tasks if service not disabled
|
|
995
|
-
const alerts = await service.find({ paginate: false })
|
|
996
|
-
alerts.forEach(alert => service.registerAlert(alert, false))
|
|
997
|
-
}
|
|
998
|
-
})
|
|
999
|
-
const alertsConfig = app.get('alerts')
|
|
1000
|
-
|
|
759
|
+
<span class="cstat-no" title="statement not covered" > // Add app-specific hooks to required services</span>
|
|
760
|
+
<span class="cstat-no" title="statement not covered" > app.on('service', async service => {</span>
|
|
761
|
+
<span class="cstat-no" title="statement not covered" > if (service.name === 'alerts') {</span>
|
|
762
|
+
<span class="cstat-no" title="statement not covered" > // On startup restore alerts CRON tasks if service not disabled</span>
|
|
763
|
+
<span class="cstat-no" title="statement not covered" > const alerts = await service.find({ paginate: false })</span>
|
|
764
|
+
<span class="cstat-no" title="statement not covered" > alerts.forEach(alert => service.registerAlert(alert, false))</span>
|
|
765
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
766
|
+
<span class="cstat-no" title="statement not covered" > })</span>
|
|
767
|
+
<span class="cstat-no" title="statement not covered" > const alertsConfig = app.get('alerts')</span>
|
|
768
|
+
<span class="cstat-no" title="statement not covered" > if (alertsConfig) {</span>
|
|
1001
769
|
<span class="cstat-no" title="statement not covered" > await createAlertsService.call(app)</span>
|
|
1002
770
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
res.
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
]
|
|
1031
|
-
}
|
|
1032
|
-
}))
|
|
1033
|
-
*/
|
|
1034
|
-
}
|
|
771
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
772
|
+
<span class="cstat-no" title="statement not covered" > /*</span>
|
|
773
|
+
<span class="cstat-no" title="statement not covered" > app.createService('daptiles', Object.assign({</span>
|
|
774
|
+
<span class="cstat-no" title="statement not covered" > servicesPath,</span>
|
|
775
|
+
<span class="cstat-no" title="statement not covered" > middlewares: {</span>
|
|
776
|
+
<span class="cstat-no" title="statement not covered" > after: [</span>
|
|
777
|
+
<span class="cstat-no" title="statement not covered" > (req, res, next) => {</span>
|
|
778
|
+
<span class="cstat-no" title="statement not covered" > const buffers = _.get(res.data, 'buffers')</span>
|
|
779
|
+
<span class="cstat-no" title="statement not covered" > if (buffers) {</span>
|
|
780
|
+
<span class="cstat-no" title="statement not covered" > const binary = Buffer.concat(buffers)</span>
|
|
781
|
+
<span class="cstat-no" title="statement not covered" > res.set({</span>
|
|
782
|
+
<span class="cstat-no" title="statement not covered" > 'Content-Type': 'application/octet-stream'</span>
|
|
783
|
+
<span class="cstat-no" title="statement not covered" > }).status(200)</span>
|
|
784
|
+
<span class="cstat-no" title="statement not covered" > // for (const buf of buffers) {</span>
|
|
785
|
+
<span class="cstat-no" title="statement not covered" > // // res.send(buf)</span>
|
|
786
|
+
<span class="cstat-no" title="statement not covered" > // res.write(buf)</span>
|
|
787
|
+
<span class="cstat-no" title="statement not covered" > // }</span>
|
|
788
|
+
<span class="cstat-no" title="statement not covered" > // res.end()</span>
|
|
789
|
+
<span class="cstat-no" title="statement not covered" > res.end(binary)</span>
|
|
790
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
791
|
+
<span class="cstat-no" title="statement not covered" > next()</span>
|
|
792
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
793
|
+
<span class="cstat-no" title="statement not covered" > ]</span>
|
|
794
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
795
|
+
<span class="cstat-no" title="statement not covered" > }))</span>
|
|
796
|
+
<span class="cstat-no" title="statement not covered" > */</span>
|
|
797
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
1035
798
|
</pre></td></tr></table></pre>
|
|
1036
799
|
|
|
1037
800
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -1039,7 +802,7 @@ export default async function () {
|
|
|
1039
802
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1040
803
|
Code coverage generated by
|
|
1041
804
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1042
|
-
at
|
|
805
|
+
at 2024-08-13T10:02:04.872Z
|
|
1043
806
|
</div>
|
|
1044
807
|
<script src="../../../prettify.js"></script>
|
|
1045
808
|
<script>
|