@kalisio/kdk 2.5.2 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/client/components/input/KShapePicker.vue +4 -4
- package/coverage/core/api/application.js.html +344 -344
- package/coverage/core/api/authentication.js.html +79 -79
- package/coverage/core/api/db.js.html +167 -167
- package/coverage/core/api/hooks/hooks.authentication.js.html +12 -12
- package/coverage/core/api/hooks/hooks.authorisations.js.html +166 -163
- package/coverage/core/api/hooks/hooks.groups.js.html +1 -1
- package/coverage/core/api/hooks/hooks.logger.js.html +18 -18
- package/coverage/core/api/hooks/hooks.model.js.html +280 -268
- package/coverage/core/api/hooks/hooks.organisations.js.html +1 -1
- package/coverage/core/api/hooks/hooks.push.js.html +12 -12
- package/coverage/core/api/hooks/hooks.query.js.html +92 -92
- package/coverage/core/api/hooks/hooks.schemas.js.html +13 -13
- 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 +48 -48
- package/coverage/core/api/hooks/index.html +49 -49
- package/coverage/core/api/hooks/index.js.html +11 -11
- package/coverage/core/api/index.html +42 -42
- package/coverage/core/api/index.js.html +22 -22
- package/coverage/core/api/marshall.js.html +127 -127
- package/coverage/core/api/models/groups.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/index.html +1 -1
- package/coverage/core/api/models/messages.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/organisations.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/tags.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/users.model.mongodb.js.html +11 -11
- package/coverage/core/api/services/account/account.hooks.js.html +42 -42
- package/coverage/core/api/services/account/account.service.js.html +34 -34
- package/coverage/core/api/services/account/index.html +1 -1
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +34 -34
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +108 -120
- package/coverage/core/api/services/authorisations/index.html +19 -19
- package/coverage/core/api/services/databases/databases.hooks.js.html +1 -1
- package/coverage/core/api/services/databases/databases.service.js.html +1 -1
- package/coverage/core/api/services/databases/index.html +1 -1
- package/coverage/core/api/services/groups/groups.hooks.js.html +1 -1
- package/coverage/core/api/services/groups/index.html +1 -1
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +1 -1
- package/coverage/core/api/services/import-export/import-export.service.js.html +1 -1
- package/coverage/core/api/services/import-export/index.html +1 -1
- package/coverage/core/api/services/index.html +15 -15
- package/coverage/core/api/services/index.js.html +97 -85
- package/coverage/core/api/services/mailer/index.html +1 -1
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +1 -1
- package/coverage/core/api/services/mailer/mailer.service.js.html +1 -1
- package/coverage/core/api/services/messages/index.html +5 -5
- package/coverage/core/api/services/messages/messages.hooks.js.html +11 -8
- package/coverage/core/api/services/organisations/index.html +1 -1
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +1 -1
- package/coverage/core/api/services/organisations/organisations.service.js.html +1 -1
- package/coverage/core/api/services/push/index.html +1 -1
- package/coverage/core/api/services/push/push.hooks.js.html +1 -1
- package/coverage/core/api/services/push/push.service.js.html +1 -1
- package/coverage/core/api/services/storage/index.html +1 -1
- package/coverage/core/api/services/storage/storage.hooks.js.html +36 -36
- package/coverage/core/api/services/storage/storage.service.js.html +30 -30
- package/coverage/core/api/services/tags/index.html +1 -1
- package/coverage/core/api/services/tags/tags.hooks.js.html +1 -1
- package/coverage/core/api/services/users/index.html +7 -7
- package/coverage/core/api/services/users/users.hooks.js.html +83 -80
- package/coverage/core/api/services/users/users.service.js.html +4 -4
- package/coverage/core/api/utils.js.html +1 -1
- package/coverage/core/common/errors.js.html +2 -2
- package/coverage/core/common/index.html +30 -30
- package/coverage/core/common/index.js.html +11 -11
- package/coverage/core/common/permissions.js.html +187 -187
- package/coverage/core/common/schema.js.html +26 -26
- package/coverage/core/common/utils.js.html +61 -61
- package/coverage/core/common/utils.offline.js.html +6 -6
- package/coverage/index.html +179 -164
- package/coverage/lcov-report/core/api/application.js.html +344 -344
- package/coverage/lcov-report/core/api/authentication.js.html +79 -79
- package/coverage/lcov-report/core/api/db.js.html +167 -167
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +12 -12
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +166 -163
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +18 -18
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +280 -268
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +12 -12
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +92 -92
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +13 -13
- 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 +48 -48
- package/coverage/lcov-report/core/api/hooks/index.html +49 -49
- package/coverage/lcov-report/core/api/hooks/index.js.html +11 -11
- package/coverage/lcov-report/core/api/index.html +42 -42
- package/coverage/lcov-report/core/api/index.js.html +22 -22
- package/coverage/lcov-report/core/api/marshall.js.html +127 -127
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/index.html +1 -1
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +11 -11
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +42 -42
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +34 -34
- package/coverage/lcov-report/core/api/services/account/index.html +1 -1
- 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 +108 -120
- package/coverage/lcov-report/core/api/services/authorisations/index.html +19 -19
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/databases/index.html +1 -1
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/groups/index.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/index.html +1 -1
- package/coverage/lcov-report/core/api/services/index.html +15 -15
- package/coverage/lcov-report/core/api/services/index.js.html +97 -85
- package/coverage/lcov-report/core/api/services/mailer/index.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/messages/index.html +5 -5
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +11 -8
- package/coverage/lcov-report/core/api/services/organisations/index.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/push/index.html +1 -1
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/index.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +36 -36
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +30 -30
- package/coverage/lcov-report/core/api/services/tags/index.html +1 -1
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/users/index.html +7 -7
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +83 -80
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +4 -4
- 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 +30 -30
- package/coverage/lcov-report/core/common/index.js.html +11 -11
- package/coverage/lcov-report/core/common/permissions.js.html +187 -187
- package/coverage/lcov-report/core/common/schema.js.html +26 -26
- package/coverage/lcov-report/core/common/utils.js.html +61 -61
- package/coverage/lcov-report/core/common/utils.offline.js.html +6 -6
- package/coverage/lcov-report/index.html +179 -164
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +348 -258
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +218 -218
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +795 -810
- 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 +69 -27
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +80 -80
- package/coverage/lcov-report/map/api/models/index.html +69 -54
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +26 -26
- package/coverage/lcov-report/map/api/models/styles.model.mongodb.js.html +112 -0
- 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 +177 -162
- 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 +160 -160
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +117 -117
- 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 +404 -296
- 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/api/services/styles/index.html +116 -0
- package/coverage/lcov-report/map/api/services/styles/styles.hooks.js.html +196 -0
- 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 -267
- 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 +42 -36
- 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 +7022 -5894
- package/coverage/map/api/hooks/hooks.catalog.js.html +348 -258
- package/coverage/map/api/hooks/hooks.features.js.html +218 -218
- package/coverage/map/api/hooks/hooks.query.js.html +795 -810
- 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 +69 -27
- package/coverage/map/api/models/features.model.mongodb.js.html +80 -80
- package/coverage/map/api/models/index.html +69 -54
- package/coverage/map/api/models/projects.model.mongodb.js.html +26 -26
- package/coverage/map/api/models/styles.model.mongodb.js.html +112 -0
- 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 +177 -162
- 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 +160 -160
- package/coverage/map/api/services/features/features.service.js.html +117 -117
- 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 +404 -296
- 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/api/services/styles/index.html +116 -0
- package/coverage/map/api/services/styles/styles.hooks.js.html +196 -0
- 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 -267
- 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 +42 -36
- 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-151198-1753351220086-0.json +1 -0
- package/coverage/tmp/coverage-151210-1753351220070-0.json +1 -0
- package/coverage/tmp/coverage-151221-1753351129816-0.json +1 -0
- package/coverage/tmp/coverage-151233-1753351129803-0.json +1 -0
- package/coverage/tmp/coverage-151240-1753351129770-0.json +1 -0
- package/coverage/tmp/coverage-151307-1753351220058-0.json +1 -0
- package/coverage/tmp/coverage-151319-1753351220044-0.json +1 -0
- package/coverage/tmp/coverage-151326-1753351220010-0.json +1 -0
- package/map/api/services/styles/styles.hooks.js +1 -1
- package/map/client/components/KLayerEditor.vue +4 -0
- package/map/client/components/catalog/KLayerCategories.vue +2 -0
- package/map/client/components/stickies/KLevelSlider.vue +10 -8
- package/map/client/components/styles/KStyleEditor.vue +1 -1
- package/map/client/components/styles/KStyleManager.vue +7 -1
- package/map/client/composables/highlight.js +5 -1
- package/map/client/i18n/map_en.json +4 -1
- package/map/client/i18n/map_fr.json +4 -1
- package/map/client/mixins/globe/mixin.geojson-layers.js +11 -5
- package/map/client/mixins/mixin.activity.js +9 -0
- package/map/client/utils/utils.layers.js +0 -2
- package/package.json +1 -1
- package/test/api/core/push.test.js +1 -1
- package/test/api/core/test-log-2025-02-05.log +23 -0
- package/test/api/core/test-log-2025-05-21.log +15 -0
- package/test/api/core/test-log-2025-06-25.log +9 -0
- package/test/api/core/test-log-2025-07-24.log +44 -0
- package/test/api/map/test-log-2025-05-27.log +13 -0
- package/test/api/map/test-log-2025-06-23.log +7 -0
- package/test/api/map/{test-log-2025-05-26.log → test-log-2025-07-24.log} +3 -4
- package/coverage/tmp/coverage-122123-1739872365211-0.json +0 -1
- package/coverage/tmp/coverage-122135-1739872365196-0.json +0 -1
- package/coverage/tmp/coverage-122146-1739872365184-0.json +0 -1
- package/coverage/tmp/coverage-122158-1739872365169-0.json +0 -1
- package/coverage/tmp/coverage-122165-1739872365141-0.json +0 -1
- package/test/api/core/test-log-2025-05-26.log +0 -22
|
@@ -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">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>104/104</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">90% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>27/30</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>7/7</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>104/104</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 high'></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>
|
|
@@ -167,214 +167,214 @@
|
|
|
167
167
|
<a name='L102'></a><a href='#L102'>102</a>
|
|
168
168
|
<a name='L103'></a><a href='#L103'>103</a>
|
|
169
169
|
<a name='L104'></a><a href='#L104'>104</a>
|
|
170
|
-
<a name='L105'></a><a href='#L105'>105</a></td><td class="line-coverage quiet"><span class="cline-any cline-
|
|
171
|
-
<span class="cline-any cline-
|
|
172
|
-
<span class="cline-any cline-
|
|
173
|
-
<span class="cline-any cline-
|
|
174
|
-
<span class="cline-any cline-
|
|
175
|
-
<span class="cline-any cline-
|
|
176
|
-
<span class="cline-any cline-
|
|
177
|
-
<span class="cline-any cline-
|
|
178
|
-
<span class="cline-any cline-
|
|
179
|
-
<span class="cline-any cline-
|
|
180
|
-
<span class="cline-any cline-
|
|
181
|
-
<span class="cline-any cline-
|
|
182
|
-
<span class="cline-any cline-
|
|
183
|
-
<span class="cline-any cline-
|
|
184
|
-
<span class="cline-any cline-
|
|
185
|
-
<span class="cline-any cline-
|
|
186
|
-
<span class="cline-any cline-
|
|
187
|
-
<span class="cline-any cline-
|
|
188
|
-
<span class="cline-any cline-
|
|
189
|
-
<span class="cline-any cline-
|
|
190
|
-
<span class="cline-any cline-
|
|
191
|
-
<span class="cline-any cline-
|
|
192
|
-
<span class="cline-any cline-
|
|
193
|
-
<span class="cline-any cline-
|
|
194
|
-
<span class="cline-any cline-
|
|
195
|
-
<span class="cline-any cline-
|
|
196
|
-
<span class="cline-any cline-
|
|
197
|
-
<span class="cline-any cline-
|
|
198
|
-
<span class="cline-any cline-
|
|
199
|
-
<span class="cline-any cline-
|
|
200
|
-
<span class="cline-any cline-
|
|
201
|
-
<span class="cline-any cline-
|
|
202
|
-
<span class="cline-any cline-
|
|
203
|
-
<span class="cline-any cline-
|
|
204
|
-
<span class="cline-any cline-
|
|
205
|
-
<span class="cline-any cline-
|
|
206
|
-
<span class="cline-any cline-
|
|
207
|
-
<span class="cline-any cline-
|
|
208
|
-
<span class="cline-any cline-
|
|
209
|
-
<span class="cline-any cline-
|
|
210
|
-
<span class="cline-any cline-
|
|
211
|
-
<span class="cline-any cline-
|
|
212
|
-
<span class="cline-any cline-
|
|
213
|
-
<span class="cline-any cline-
|
|
214
|
-
<span class="cline-any cline-
|
|
215
|
-
<span class="cline-any cline-
|
|
216
|
-
<span class="cline-any cline-
|
|
217
|
-
<span class="cline-any cline-
|
|
218
|
-
<span class="cline-any cline-
|
|
219
|
-
<span class="cline-any cline-
|
|
220
|
-
<span class="cline-any cline-
|
|
221
|
-
<span class="cline-any cline-
|
|
222
|
-
<span class="cline-any cline-
|
|
223
|
-
<span class="cline-any cline-
|
|
224
|
-
<span class="cline-any cline-
|
|
225
|
-
<span class="cline-any cline-
|
|
226
|
-
<span class="cline-any cline-
|
|
227
|
-
<span class="cline-any cline-
|
|
228
|
-
<span class="cline-any cline-
|
|
229
|
-
<span class="cline-any cline-
|
|
230
|
-
<span class="cline-any cline-
|
|
231
|
-
<span class="cline-any cline-
|
|
232
|
-
<span class="cline-any cline-
|
|
233
|
-
<span class="cline-any cline-
|
|
234
|
-
<span class="cline-any cline-
|
|
235
|
-
<span class="cline-any cline-
|
|
236
|
-
<span class="cline-any cline-
|
|
237
|
-
<span class="cline-any cline-
|
|
238
|
-
<span class="cline-any cline-
|
|
239
|
-
<span class="cline-any cline-
|
|
240
|
-
<span class="cline-any cline-
|
|
241
|
-
<span class="cline-any cline-
|
|
242
|
-
<span class="cline-any cline-
|
|
243
|
-
<span class="cline-any cline-
|
|
244
|
-
<span class="cline-any cline-
|
|
245
|
-
<span class="cline-any cline-
|
|
246
|
-
<span class="cline-any cline-
|
|
247
|
-
<span class="cline-any cline-
|
|
248
|
-
<span class="cline-any cline-
|
|
249
|
-
<span class="cline-any cline-
|
|
250
|
-
<span class="cline-any cline-
|
|
251
|
-
<span class="cline-any cline-
|
|
252
|
-
<span class="cline-any cline-
|
|
253
|
-
<span class="cline-any cline-
|
|
254
|
-
<span class="cline-any cline-
|
|
255
|
-
<span class="cline-any cline-
|
|
256
|
-
<span class="cline-any cline-
|
|
257
|
-
<span class="cline-any cline-
|
|
258
|
-
<span class="cline-any cline-
|
|
259
|
-
<span class="cline-any cline-
|
|
260
|
-
<span class="cline-any cline-
|
|
261
|
-
<span class="cline-any cline-
|
|
262
|
-
<span class="cline-any cline-
|
|
263
|
-
<span class="cline-any cline-
|
|
264
|
-
<span class="cline-any cline-
|
|
265
|
-
<span class="cline-any cline-
|
|
266
|
-
<span class="cline-any cline-
|
|
267
|
-
<span class="cline-any cline-
|
|
268
|
-
<span class="cline-any cline-
|
|
269
|
-
<span class="cline-any cline-
|
|
270
|
-
<span class="cline-any cline-
|
|
271
|
-
<span class="cline-any cline-
|
|
272
|
-
<span class="cline-any cline-
|
|
273
|
-
<span class="cline-any cline-
|
|
274
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
<span class="
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
<span class="
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
<span class="
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
170
|
+
<a name='L105'></a><a href='#L105'>105</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
171
|
+
<span class="cline-any cline-yes">1x</span>
|
|
172
|
+
<span class="cline-any cline-yes">1x</span>
|
|
173
|
+
<span class="cline-any cline-yes">1x</span>
|
|
174
|
+
<span class="cline-any cline-yes">1x</span>
|
|
175
|
+
<span class="cline-any cline-yes">1x</span>
|
|
176
|
+
<span class="cline-any cline-yes">1x</span>
|
|
177
|
+
<span class="cline-any cline-yes">1x</span>
|
|
178
|
+
<span class="cline-any cline-yes">1x</span>
|
|
179
|
+
<span class="cline-any cline-yes">1x</span>
|
|
180
|
+
<span class="cline-any cline-yes">1x</span>
|
|
181
|
+
<span class="cline-any cline-yes">1x</span>
|
|
182
|
+
<span class="cline-any cline-yes">1x</span>
|
|
183
|
+
<span class="cline-any cline-yes">4x</span>
|
|
184
|
+
<span class="cline-any cline-yes">4x</span>
|
|
185
|
+
<span class="cline-any cline-yes">4x</span>
|
|
186
|
+
<span class="cline-any cline-yes">2694x</span>
|
|
187
|
+
<span class="cline-any cline-yes">2694x</span>
|
|
188
|
+
<span class="cline-any cline-yes">2694x</span>
|
|
189
|
+
<span class="cline-any cline-yes">2694x</span>
|
|
190
|
+
<span class="cline-any cline-yes">2694x</span>
|
|
191
|
+
<span class="cline-any cline-yes">4x</span>
|
|
192
|
+
<span class="cline-any cline-yes">4x</span>
|
|
193
|
+
<span class="cline-any cline-yes">4x</span>
|
|
194
|
+
<span class="cline-any cline-yes">1x</span>
|
|
195
|
+
<span class="cline-any cline-yes">4x</span>
|
|
196
|
+
<span class="cline-any cline-yes">4x</span>
|
|
197
|
+
<span class="cline-any cline-yes">4x</span>
|
|
198
|
+
<span class="cline-any cline-yes">1x</span>
|
|
199
|
+
<span class="cline-any cline-yes">4x</span>
|
|
200
|
+
<span class="cline-any cline-yes">4x</span>
|
|
201
|
+
<span class="cline-any cline-yes">4x</span>
|
|
202
|
+
<span class="cline-any cline-yes">1x</span>
|
|
203
|
+
<span class="cline-any cline-yes">1x</span>
|
|
204
|
+
<span class="cline-any cline-yes">10x</span>
|
|
205
|
+
<span class="cline-any cline-yes">10x</span>
|
|
206
|
+
<span class="cline-any cline-yes">10x</span>
|
|
207
|
+
<span class="cline-any cline-yes">10x</span>
|
|
208
|
+
<span class="cline-any cline-yes">10x</span>
|
|
209
|
+
<span class="cline-any cline-yes">10x</span>
|
|
210
|
+
<span class="cline-any cline-yes">10x</span>
|
|
211
|
+
<span class="cline-any cline-yes">10x</span>
|
|
212
|
+
<span class="cline-any cline-yes">10x</span>
|
|
213
|
+
<span class="cline-any cline-yes">10x</span>
|
|
214
|
+
<span class="cline-any cline-yes">9x</span>
|
|
215
|
+
<span class="cline-any cline-yes">9x</span>
|
|
216
|
+
<span class="cline-any cline-yes">9x</span>
|
|
217
|
+
<span class="cline-any cline-yes">10x</span>
|
|
218
|
+
<span class="cline-any cline-yes">10x</span>
|
|
219
|
+
<span class="cline-any cline-yes">1x</span>
|
|
220
|
+
<span class="cline-any cline-yes">1x</span>
|
|
221
|
+
<span class="cline-any cline-yes">10x</span>
|
|
222
|
+
<span class="cline-any cline-yes">10x</span>
|
|
223
|
+
<span class="cline-any cline-yes">10x</span>
|
|
224
|
+
<span class="cline-any cline-yes">10x</span>
|
|
225
|
+
<span class="cline-any cline-yes">10x</span>
|
|
226
|
+
<span class="cline-any cline-yes">10x</span>
|
|
227
|
+
<span class="cline-any cline-yes">10x</span>
|
|
228
|
+
<span class="cline-any cline-yes">10x</span>
|
|
229
|
+
<span class="cline-any cline-yes">10x</span>
|
|
230
|
+
<span class="cline-any cline-yes">10x</span>
|
|
231
|
+
<span class="cline-any cline-yes">10x</span>
|
|
232
|
+
<span class="cline-any cline-yes">10x</span>
|
|
233
|
+
<span class="cline-any cline-yes">10x</span>
|
|
234
|
+
<span class="cline-any cline-yes">10x</span>
|
|
235
|
+
<span class="cline-any cline-yes">10x</span>
|
|
236
|
+
<span class="cline-any cline-yes">10x</span>
|
|
237
|
+
<span class="cline-any cline-yes">1x</span>
|
|
238
|
+
<span class="cline-any cline-yes">1x</span>
|
|
239
|
+
<span class="cline-any cline-yes">10x</span>
|
|
240
|
+
<span class="cline-any cline-yes">10x</span>
|
|
241
|
+
<span class="cline-any cline-yes">10x</span>
|
|
242
|
+
<span class="cline-any cline-yes">10x</span>
|
|
243
|
+
<span class="cline-any cline-yes">10x</span>
|
|
244
|
+
<span class="cline-any cline-yes">10x</span>
|
|
245
|
+
<span class="cline-any cline-yes">10x</span>
|
|
246
|
+
<span class="cline-any cline-yes">10x</span>
|
|
247
|
+
<span class="cline-any cline-yes">10x</span>
|
|
248
|
+
<span class="cline-any cline-yes">10x</span>
|
|
249
|
+
<span class="cline-any cline-yes">10x</span>
|
|
250
|
+
<span class="cline-any cline-yes">10x</span>
|
|
251
|
+
<span class="cline-any cline-yes">10x</span>
|
|
252
|
+
<span class="cline-any cline-yes">10x</span>
|
|
253
|
+
<span class="cline-any cline-yes">4x</span>
|
|
254
|
+
<span class="cline-any cline-yes">4x</span>
|
|
255
|
+
<span class="cline-any cline-yes">4x</span>
|
|
256
|
+
<span class="cline-any cline-yes">4x</span>
|
|
257
|
+
<span class="cline-any cline-yes">4x</span>
|
|
258
|
+
<span class="cline-any cline-yes">4x</span>
|
|
259
|
+
<span class="cline-any cline-yes">4x</span>
|
|
260
|
+
<span class="cline-any cline-yes">4x</span>
|
|
261
|
+
<span class="cline-any cline-yes">4x</span>
|
|
262
|
+
<span class="cline-any cline-yes">4x</span>
|
|
263
|
+
<span class="cline-any cline-yes">4x</span>
|
|
264
|
+
<span class="cline-any cline-yes">4x</span>
|
|
265
|
+
<span class="cline-any cline-yes">10x</span>
|
|
266
|
+
<span class="cline-any cline-yes">10x</span>
|
|
267
|
+
<span class="cline-any cline-yes">1x</span>
|
|
268
|
+
<span class="cline-any cline-yes">1x</span>
|
|
269
|
+
<span class="cline-any cline-yes">36x</span>
|
|
270
|
+
<span class="cline-any cline-yes">36x</span>
|
|
271
|
+
<span class="cline-any cline-yes">36x</span>
|
|
272
|
+
<span class="cline-any cline-yes">36x</span>
|
|
273
|
+
<span class="cline-any cline-yes">36x</span>
|
|
274
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import _ from 'lodash'
|
|
275
|
+
import moment from 'moment'
|
|
276
|
+
import bbox from '@turf/bbox'
|
|
277
|
+
import makeDebug from 'debug'
|
|
278
|
+
import feathers from '@feathersjs/feathers'
|
|
279
|
+
import common from 'feathers-hooks-common'
|
|
280
|
+
import mongodbFuzzySearch from 'feathers-mongodb-fuzzy-search'
|
|
281
|
+
import { hooks as coreHooks, unmarshallTime } from '../../../core/api/index.js'
|
|
282
|
+
|
|
283
|
+
const { defaultEventMap } = feathers
|
|
284
|
+
const { iff, getItems, replaceItems } = common
|
|
285
|
+
const debug = makeDebug('kdk:map:features:hooks')
|
|
286
|
+
|
|
287
|
+
function getTimeRange (features) {
|
|
288
|
+
let startTime, endTime
|
|
289
|
+
features.forEach(feature => {
|
|
290
|
+
if (feature.time) {
|
|
291
|
+
const time = moment.utc(feature.time)
|
|
292
|
+
if (!startTime || time.isBefore(startTime)) startTime = time
|
|
293
|
+
if (!endTime || time.isAfter(endTime)) endTime = time
|
|
294
|
+
}
|
|
295
|
+
})
|
|
296
|
+
return { startTime, endTime }
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function getBBox (features) {
|
|
300
|
+
return bbox({ type: 'FeatureCollection', features })
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function getLayers (features) {
|
|
304
|
+
return _.union(features.filter(feature => feature.layer).map(feature => feature.layer))
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export function simplifyResult (hook) {
|
|
308
|
+
// Force full result emission ?
|
|
309
|
+
const fullResult = _.get(hook, 'params.fullResult')
|
|
310
|
+
if (fullResult) <span class="branch-0 cbranch-no" title="branch not covered" >return hook</span>
|
|
311
|
+
const service = hook.service
|
|
312
|
+
const method = hook.method
|
|
313
|
+
const result = getItems(hook)
|
|
314
|
+
const simplifyResult = _.get(service, 'options.simplifyResult', ['create', 'update', 'patch', 'remove'])
|
|
315
|
+
const simplifyResultLimit = _.get(service, 'options.simplifyResultLimit', 1)
|
|
316
|
+
// Only keep track of object IDs so that caller can at least get them if required
|
|
317
|
+
if (simplifyResult.includes(method) && Array.isArray(result) && (result.length > simplifyResultLimit)) {
|
|
318
|
+
debug(`Simplifying multi result for ${method} method on service ${service.name}`)
|
|
319
|
+
replaceItems(hook, result.map(item => ({ _id: item._id })))
|
|
320
|
+
}
|
|
321
|
+
return hook
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export function skipEvents (hook) {
|
|
325
|
+
// Force standard event emission ?
|
|
326
|
+
const emitEvents = _.get(hook, 'params.emitEvents')
|
|
327
|
+
if (emitEvents) <span class="branch-0 cbranch-no" title="branch not covered" >return hook</span>
|
|
328
|
+
const service = hook.service
|
|
329
|
+
const method = hook.method
|
|
330
|
+
const event = defaultEventMap[method]
|
|
331
|
+
const result = getItems(hook)
|
|
332
|
+
const skipEvents = _.get(service, 'options.skipEvents', ['created', 'updated', 'patched', 'removed'])
|
|
333
|
+
const simplifyEvents = _.get(service, 'options.simplifyEvents', [])
|
|
334
|
+
// Even if we emit simplified events we skip standard feathers events to emit our own version
|
|
335
|
+
let skip = skipEvents.includes(event) || simplifyEvents.includes(event)
|
|
336
|
+
const skipEventsLimit = _.get(service, 'options.skipEventsLimit', 1)
|
|
337
|
+
skip = skip && Array.isArray(result) && (result.length > skipEventsLimit)
|
|
338
|
+
if (skip) debug(`Skipping standard event ${event} for multi operation on service ${service.name}`)
|
|
339
|
+
return iff(hook => skip, coreHooks.skipEvents)(hook)
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export function simplifyEvents (hook) {
|
|
343
|
+
// Force standard event emission ?
|
|
344
|
+
const emitEvents = _.get(hook, 'params.emitEvents')
|
|
345
|
+
if (emitEvents) <span class="branch-0 cbranch-no" title="branch not covered" >return hook</span>
|
|
346
|
+
const service = hook.service
|
|
347
|
+
const params = hook.params
|
|
348
|
+
const data = hook.data
|
|
349
|
+
const query = params.query || {}
|
|
350
|
+
unmarshallTime(query, 'time')
|
|
351
|
+
const method = hook.method
|
|
352
|
+
const event = defaultEventMap[method]
|
|
353
|
+
const result = getItems(hook)
|
|
354
|
+
const simplifyEvents = _.get(service, 'options.simplifyEvents', [])
|
|
355
|
+
const simplifyEventsLimit = _.get(service, 'options.simplifyEventsLimit', 1)
|
|
356
|
+
if (simplifyEvents.includes(event) && Array.isArray(result) && (result.length > simplifyEventsLimit)) {
|
|
357
|
+
debug(`Simplifying event ${event} for multi operation on service ${service.name}`)
|
|
358
|
+
// Keep track of query selector when updating/patching/removing in batch
|
|
359
|
+
const payload = (event === 'created' ? {} : { data })
|
|
360
|
+
// Add information about updated time range/spatial extent so that client can decide what to do
|
|
361
|
+
Object.assign(payload, {
|
|
362
|
+
query,
|
|
363
|
+
total: result.length,
|
|
364
|
+
bbox: getBBox(result),
|
|
365
|
+
layers: getLayers(result)
|
|
366
|
+
}, getTimeRange(result))
|
|
367
|
+
service.emit(event, payload)
|
|
368
|
+
}
|
|
369
|
+
return hook
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export function fuzzySearch (hook) {
|
|
373
|
+
const service = hook.service
|
|
374
|
+
const featureLabel = _.castArray(_.get(service, 'options.featureLabel', []))
|
|
375
|
+
const fields = featureLabel.map((prop) => 'properties.' + prop)
|
|
376
|
+
return featureLabel.length ? mongodbFuzzySearch({ fields: fields })(hook) : hook
|
|
377
|
+
}
|
|
378
378
|
</pre></td></tr></table></pre>
|
|
379
379
|
|
|
380
380
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
383
383
|
Code coverage generated by
|
|
384
384
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
385
|
-
at 2025-
|
|
385
|
+
at 2025-07-24T10:00:20.476Z
|
|
386
386
|
</div>
|
|
387
387
|
<script src="../../../prettify.js"></script>
|
|
388
388
|
<script>
|