@kalisio/kdk 2.5.1 → 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/api/hooks/hooks.authorisations.js +1 -2
- package/core/api/services/authorisations/authorisations.service.js +1 -3
- package/core/api/services/index.js +5 -1
- package/core/api/services/users/users.hooks.js +4 -3
- package/core/client/components/input/KShapePicker.vue +4 -4
- package/core/client/utils/index.js +1 -0
- 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 +154 -157
- package/coverage/core/api/hooks/hooks.logger.js.html +18 -18
- package/coverage/core/api/hooks/hooks.model.js.html +275 -275
- package/coverage/core/api/hooks/hooks.push.js.html +34 -34
- package/coverage/core/api/hooks/hooks.query.js.html +89 -89
- 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 +50 -50
- package/coverage/core/api/hooks/index.html +51 -51
- 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/index.html +1 -1
- package/coverage/core/api/models/messages.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 +87 -93
- 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/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 +1 -1
- package/coverage/core/api/services/messages/messages.hooks.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/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/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 +173 -173
- 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 +154 -157
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +18 -18
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +275 -275
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +34 -34
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +89 -89
- 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 +50 -50
- package/coverage/lcov-report/core/api/hooks/index.html +51 -51
- 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/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/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 +87 -93
- 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/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 +1 -1
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.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/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/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 +173 -173
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +316 -316
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +218 -218
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +798 -789
- 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 +44 -44
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +80 -80
- package/coverage/lcov-report/map/api/models/index.html +65 -65
- 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 +28 -28
- 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 +172 -172
- 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 +334 -334
- 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 +21 -21
- package/coverage/lcov-report/map/api/services/styles/styles.hooks.js.html +84 -84
- 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 +159 -159
- 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 +40 -40
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +59 -59
- package/coverage/lcov-report/map/common/tms-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +190 -190
- package/coverage/lcov-report/map/common/wcs-utils.js.html +338 -338
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +345 -345
- package/coverage/lcov-report/map/common/wfs-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/wms-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/wmts-utils.js.html +1 -1
- package/coverage/lcov.info +6880 -5908
- package/coverage/map/api/hooks/hooks.catalog.js.html +316 -316
- package/coverage/map/api/hooks/hooks.features.js.html +218 -218
- package/coverage/map/api/hooks/hooks.query.js.html +798 -789
- 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 +44 -44
- package/coverage/map/api/models/features.model.mongodb.js.html +80 -80
- package/coverage/map/api/models/index.html +65 -65
- package/coverage/map/api/models/projects.model.mongodb.js.html +26 -26
- package/coverage/map/api/models/styles.model.mongodb.js.html +28 -28
- 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 +172 -172
- 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 +334 -334
- 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 +21 -21
- package/coverage/map/api/services/styles/styles.hooks.js.html +84 -84
- 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 +159 -159
- 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 +40 -40
- package/coverage/map/common/time-based-grid-source.js.html +59 -59
- package/coverage/map/common/tms-utils.js.html +1 -1
- package/coverage/map/common/wcs-grid-source.js.html +190 -190
- package/coverage/map/common/wcs-utils.js.html +338 -338
- package/coverage/map/common/weacast-grid-source.js.html +345 -345
- package/coverage/map/common/wfs-utils.js.html +1 -1
- package/coverage/map/common/wms-utils.js.html +1 -1
- package/coverage/map/common/wmts-utils.js.html +1 -1
- 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/hooks/hooks.query.js +7 -4
- 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/KAttribution.vue +8 -7
- 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 +5 -2
- package/map/client/leaflet/utils/utils.geojson.js +5 -4
- 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/index.test.js +49 -60
- package/test/api/core/push.test.js +1 -1
- 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-07-24.log +11 -0
- package/coverage/tmp/coverage-323534-1747828879483-0.json +0 -1
- package/coverage/tmp/coverage-323546-1747828879453-0.json +0 -1
- package/coverage/tmp/coverage-323557-1747828879439-0.json +0 -1
- package/coverage/tmp/coverage-323569-1747828879416-0.json +0 -1
- package/coverage/tmp/coverage-323576-1747828879390-0.json +0 -1
|
@@ -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">50.15% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>162/323</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">76.92% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>10/13</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">37.5% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>6/16</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">50.15% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>162/323</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line medium'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -386,23 +386,113 @@
|
|
|
386
386
|
<a name='L321'></a><a href='#L321'>321</a>
|
|
387
387
|
<a name='L322'></a><a href='#L322'>322</a>
|
|
388
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-
|
|
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>
|
|
390
430
|
<span class="cline-any cline-no"> </span>
|
|
391
431
|
<span class="cline-any cline-no"> </span>
|
|
392
432
|
<span class="cline-any cline-no"> </span>
|
|
393
433
|
<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>
|
|
394
454
|
<span class="cline-any cline-no"> </span>
|
|
395
455
|
<span class="cline-any cline-no"> </span>
|
|
396
456
|
<span class="cline-any cline-no"> </span>
|
|
397
457
|
<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>
|
|
398
471
|
<span class="cline-any cline-no"> </span>
|
|
399
472
|
<span class="cline-any cline-no"> </span>
|
|
400
473
|
<span class="cline-any cline-no"> </span>
|
|
401
474
|
<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>
|
|
402
489
|
<span class="cline-any cline-no"> </span>
|
|
403
490
|
<span class="cline-any cline-no"> </span>
|
|
404
491
|
<span class="cline-any cline-no"> </span>
|
|
405
492
|
<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>
|
|
406
496
|
<span class="cline-any cline-no"> </span>
|
|
407
497
|
<span class="cline-any cline-no"> </span>
|
|
408
498
|
<span class="cline-any cline-no"> </span>
|
|
@@ -424,6 +514,8 @@
|
|
|
424
514
|
<span class="cline-any cline-no"> </span>
|
|
425
515
|
<span class="cline-any cline-no"> </span>
|
|
426
516
|
<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>
|
|
427
519
|
<span class="cline-any cline-no"> </span>
|
|
428
520
|
<span class="cline-any cline-no"> </span>
|
|
429
521
|
<span class="cline-any cline-no"> </span>
|
|
@@ -436,6 +528,8 @@
|
|
|
436
528
|
<span class="cline-any cline-no"> </span>
|
|
437
529
|
<span class="cline-any cline-no"> </span>
|
|
438
530
|
<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>
|
|
439
533
|
<span class="cline-any cline-no"> </span>
|
|
440
534
|
<span class="cline-any cline-no"> </span>
|
|
441
535
|
<span class="cline-any cline-no"> </span>
|
|
@@ -450,6 +544,10 @@
|
|
|
450
544
|
<span class="cline-any cline-no"> </span>
|
|
451
545
|
<span class="cline-any cline-no"> </span>
|
|
452
546
|
<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>
|
|
453
551
|
<span class="cline-any cline-no"> </span>
|
|
454
552
|
<span class="cline-any cline-no"> </span>
|
|
455
553
|
<span class="cline-any cline-no"> </span>
|
|
@@ -532,6 +630,9 @@
|
|
|
532
630
|
<span class="cline-any cline-no"> </span>
|
|
533
631
|
<span class="cline-any cline-no"> </span>
|
|
534
632
|
<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>
|
|
535
636
|
<span class="cline-any cline-no"> </span>
|
|
536
637
|
<span class="cline-any cline-no"> </span>
|
|
537
638
|
<span class="cline-any cline-no"> </span>
|
|
@@ -539,283 +640,182 @@
|
|
|
539
640
|
<span class="cline-any cline-no"> </span>
|
|
540
641
|
<span class="cline-any cline-no"> </span>
|
|
541
642
|
<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>
|
|
542
653
|
<span class="cline-any cline-no"> </span>
|
|
543
654
|
<span class="cline-any cline-no"> </span>
|
|
544
655
|
<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>
|
|
545
662
|
<span class="cline-any cline-no"> </span>
|
|
546
663
|
<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>
|
|
547
666
|
<span class="cline-any cline-no"> </span>
|
|
548
667
|
<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>
|
|
549
678
|
<span class="cline-any cline-no"> </span>
|
|
550
679
|
<span class="cline-any cline-no"> </span>
|
|
551
|
-
<span class="cline-any cline-
|
|
552
|
-
<span class="cline-any cline-
|
|
553
|
-
<span class="cline-any cline-
|
|
554
|
-
<span class="cline-any cline-
|
|
555
|
-
<span class="cline-any cline-
|
|
556
|
-
<span class="cline-any cline-
|
|
557
|
-
<span class="cline-any cline-
|
|
558
|
-
<span class="cline-any cline-
|
|
559
|
-
<span class="cline-any cline-
|
|
560
|
-
<span class="cline-any cline-
|
|
561
|
-
<span class="cline-any cline-
|
|
562
|
-
<span class="cline-any cline-
|
|
563
|
-
<span class="cline-any cline-
|
|
564
|
-
<span class="cline-any cline-
|
|
565
|
-
<span class="cline-any cline-
|
|
566
|
-
<span class="cline-any cline-
|
|
567
|
-
<span class="cline-any cline-
|
|
568
|
-
<span class="cline-any cline-
|
|
569
|
-
<span class="cline-any cline-
|
|
570
|
-
<span class="cline-any cline-
|
|
571
|
-
<span class="cline-any cline-
|
|
572
|
-
<span class="cline-any cline-
|
|
573
|
-
<span class="cline-any cline-
|
|
574
|
-
<span class="cline-any cline-
|
|
575
|
-
<span class="cline-any cline-
|
|
576
|
-
<span class="cline-any cline-
|
|
577
|
-
<span class="cline-any cline-
|
|
578
|
-
<span class="cline-any cline-
|
|
579
|
-
<span class="cline-any cline-
|
|
580
|
-
<span class="cline-any cline-
|
|
581
|
-
<span class="cline-any cline-
|
|
582
|
-
<span class="cline-any cline-
|
|
583
|
-
<span class="cline-any cline-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
<span class="
|
|
624
|
-
<span class="cline-any cline-no"> </span>
|
|
625
|
-
<span class="cline-any cline-no"> </span>
|
|
626
|
-
<span class="cline-any cline-no"> </span>
|
|
627
|
-
<span class="cline-any cline-no"> </span>
|
|
628
|
-
<span class="cline-any cline-no"> </span>
|
|
629
|
-
<span class="cline-any cline-no"> </span>
|
|
630
|
-
<span class="cline-any cline-no"> </span>
|
|
631
|
-
<span class="cline-any cline-no"> </span>
|
|
632
|
-
<span class="cline-any cline-no"> </span>
|
|
633
|
-
<span class="cline-any cline-no"> </span>
|
|
634
|
-
<span class="cline-any cline-no"> </span>
|
|
635
|
-
<span class="cline-any cline-no"> </span>
|
|
636
|
-
<span class="cline-any cline-no"> </span>
|
|
637
|
-
<span class="cline-any cline-no"> </span>
|
|
638
|
-
<span class="cline-any cline-no"> </span>
|
|
639
|
-
<span class="cline-any cline-no"> </span>
|
|
640
|
-
<span class="cline-any cline-no"> </span>
|
|
641
|
-
<span class="cline-any cline-no"> </span>
|
|
642
|
-
<span class="cline-any cline-no"> </span>
|
|
643
|
-
<span class="cline-any cline-no"> </span>
|
|
644
|
-
<span class="cline-any cline-no"> </span>
|
|
645
|
-
<span class="cline-any cline-no"> </span>
|
|
646
|
-
<span class="cline-any cline-no"> </span>
|
|
647
|
-
<span class="cline-any cline-no"> </span>
|
|
648
|
-
<span class="cline-any cline-no"> </span>
|
|
649
|
-
<span class="cline-any cline-no"> </span>
|
|
650
|
-
<span class="cline-any cline-no"> </span>
|
|
651
|
-
<span class="cline-any cline-no"> </span>
|
|
652
|
-
<span class="cline-any cline-no"> </span>
|
|
653
|
-
<span class="cline-any cline-no"> </span>
|
|
654
|
-
<span class="cline-any cline-no"> </span>
|
|
655
|
-
<span class="cline-any cline-no"> </span>
|
|
656
|
-
<span class="cline-any cline-no"> </span>
|
|
657
|
-
<span class="cline-any cline-no"> </span>
|
|
658
|
-
<span class="cline-any cline-no"> </span>
|
|
659
|
-
<span class="cline-any cline-no"> </span>
|
|
660
|
-
<span class="cline-any cline-no"> </span>
|
|
661
|
-
<span class="cline-any cline-no"> </span>
|
|
662
|
-
<span class="cline-any cline-no"> </span>
|
|
663
|
-
<span class="cline-any cline-no"> </span>
|
|
664
|
-
<span class="cline-any cline-no"> </span>
|
|
665
|
-
<span class="cline-any cline-no"> </span>
|
|
666
|
-
<span class="cline-any cline-no"> </span>
|
|
667
|
-
<span class="cline-any cline-no"> </span>
|
|
668
|
-
<span class="cline-any cline-no"> </span>
|
|
669
|
-
<span class="cline-any cline-no"> </span>
|
|
670
|
-
<span class="cline-any cline-no"> </span>
|
|
671
|
-
<span class="cline-any cline-no"> </span>
|
|
672
|
-
<span class="cline-any cline-no"> </span>
|
|
673
|
-
<span class="cline-any cline-no"> </span>
|
|
674
|
-
<span class="cline-any cline-no"> </span>
|
|
675
|
-
<span class="cline-any cline-no"> </span>
|
|
676
|
-
<span class="cline-any cline-no"> </span>
|
|
677
|
-
<span class="cline-any cline-no"> </span>
|
|
678
|
-
<span class="cline-any cline-no"> </span>
|
|
679
|
-
<span class="cline-any cline-no"> </span>
|
|
680
|
-
<span class="cline-any cline-no"> </span>
|
|
681
|
-
<span class="cline-any cline-no"> </span>
|
|
682
|
-
<span class="cline-any cline-no"> </span>
|
|
683
|
-
<span class="cline-any cline-no"> </span>
|
|
684
|
-
<span class="cline-any cline-no"> </span>
|
|
685
|
-
<span class="cline-any cline-no"> </span>
|
|
686
|
-
<span class="cline-any cline-no"> </span>
|
|
687
|
-
<span class="cline-any cline-no"> </span>
|
|
688
|
-
<span class="cline-any cline-no"> </span>
|
|
689
|
-
<span class="cline-any cline-no"> </span>
|
|
690
|
-
<span class="cline-any cline-no"> </span>
|
|
691
|
-
<span class="cline-any cline-no"> </span>
|
|
692
|
-
<span class="cline-any cline-no"> </span>
|
|
693
|
-
<span class="cline-any cline-no"> </span>
|
|
694
|
-
<span class="cline-any cline-no"> </span>
|
|
695
|
-
<span class="cline-any cline-no"> </span>
|
|
696
|
-
<span class="cline-any cline-no"> </span>
|
|
697
|
-
<span class="cline-any cline-no"> </span>
|
|
698
|
-
<span class="cline-any cline-no"> </span>
|
|
699
|
-
<span class="cline-any cline-no"> </span>
|
|
700
|
-
<span class="cline-any cline-no"> </span>
|
|
701
|
-
<span class="cline-any cline-no"> </span>
|
|
702
|
-
<span class="cline-any cline-no"> </span>
|
|
703
|
-
<span class="cline-any cline-no"> </span>
|
|
704
|
-
<span class="cline-any cline-no"> </span>
|
|
705
|
-
<span class="cline-any cline-no"> </span>
|
|
706
|
-
<span class="cline-any cline-no"> </span>
|
|
707
|
-
<span class="cline-any cline-no"> </span>
|
|
708
|
-
<span class="cline-any cline-no"> </span>
|
|
709
|
-
<span class="cline-any cline-no"> </span>
|
|
710
|
-
<span class="cline-any cline-no"> </span>
|
|
711
|
-
<span class="cline-any cline-no"> </span>
|
|
712
|
-
<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>
|
|
713
|
-
<span class="cstat-no" title="statement not covered" >import path from 'path'</span>
|
|
714
|
-
<span class="cstat-no" title="statement not covered" >import fs from 'fs-extra'</span>
|
|
715
|
-
<span class="cstat-no" title="statement not covered" >import zlib from 'zlib'</span>
|
|
716
|
-
<span class="cstat-no" title="statement not covered" >import request from 'superagent'</span>
|
|
717
|
-
<span class="cstat-no" title="statement not covered" >import makeDebug from 'debug'</span>
|
|
718
|
-
<span class="cstat-no" title="statement not covered" >import { fileURLToPath } from 'url'</span>
|
|
719
|
-
<span class="cstat-no" title="statement not covered" >import * as permissions from '../../../core/common/permissions.js'</span>
|
|
720
|
-
<span class="cstat-no" title="statement not covered" ></span>
|
|
721
|
-
<span class="cstat-no" title="statement not covered" >const __dirname = path.dirname(fileURLToPath(import.meta.url))</span>
|
|
722
|
-
<span class="cstat-no" title="statement not covered" >const modelsPath = path.join(__dirname, '..', 'models')</span>
|
|
723
|
-
<span class="cstat-no" title="statement not covered" >const servicesPath = path.join(__dirname, '..', 'services')</span>
|
|
724
|
-
<span class="cstat-no" title="statement not covered" ></span>
|
|
725
|
-
<span class="cstat-no" title="statement not covered" >const debug = makeDebug('kdk:map:services')</span>
|
|
726
|
-
<span class="cstat-no" title="statement not covered" ></span>
|
|
727
|
-
<span class="cstat-no" title="statement not covered" >export function createFeaturesService (options = {}) {</span>
|
|
728
|
-
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
729
|
-
<span class="cstat-no" title="statement not covered" ></span>
|
|
730
|
-
<span class="cstat-no" title="statement not covered" > debug('Creating features service with options', options)</span>
|
|
731
|
-
<span class="cstat-no" title="statement not covered" > const service = app.createService(options.collection, Object.assign({</span>
|
|
732
|
-
<span class="cstat-no" title="statement not covered" > modelName: 'features',</span>
|
|
733
|
-
<span class="cstat-no" title="statement not covered" > servicesPath,</span>
|
|
734
|
-
<span class="cstat-no" title="statement not covered" > modelsPath,</span>
|
|
735
|
-
<span class="cstat-no" title="statement not covered" > paginate: { default: 5000, max: 5000 },</span>
|
|
736
|
-
<span class="cstat-no" title="statement not covered" > // FIXME: no real-time events for now since we create big batches,</span>
|
|
737
|
-
<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>
|
|
738
|
-
<span class="cstat-no" title="statement not covered" > events: ['features'],</span>
|
|
739
|
-
<span class="cstat-no" title="statement not covered" > methods: ['find', 'get', 'create', 'update', 'patch', 'remove', 'heatmap', 'formatGeoJSON']</span>
|
|
740
|
-
<span class="cstat-no" title="statement not covered" > }, options))</span>
|
|
741
|
-
<span class="cstat-no" title="statement not covered" > // As a features service can be created dynamically register default permissions for it</span>
|
|
742
|
-
<span class="cstat-no" title="statement not covered" > permissions.defineAbilities.registerHook((subject, can, cannot) => {</span>
|
|
743
|
-
<span class="cstat-no" title="statement not covered" > can('service', options.collection)</span>
|
|
744
|
-
<span class="cstat-no" title="statement not covered" > can('read', options.collection)</span>
|
|
745
|
-
<span class="cstat-no" title="statement not covered" > })</span>
|
|
746
|
-
<span class="cstat-no" title="statement not covered" > // We then need to update abilities cache</span>
|
|
747
|
-
<span class="cstat-no" title="statement not covered" > const authorisationService = app.getService('authorisations')</span>
|
|
748
|
-
<span class="cstat-no" title="statement not covered" > if (authorisationService) authorisationService.clearAbilities()</span>
|
|
749
|
-
<span class="cstat-no" title="statement not covered" > return service</span>
|
|
750
|
-
<span class="cstat-no" title="statement not covered" >}</span>
|
|
751
|
-
<span class="cstat-no" title="statement not covered" ></span>
|
|
752
|
-
<span class="cstat-no" title="statement not covered" >export function removeFeaturesService (options = {}) {</span>
|
|
680
|
+
<span class="cline-any cline-yes">4x</span>
|
|
681
|
+
<span class="cline-any cline-yes">4x</span>
|
|
682
|
+
<span class="cline-any cline-yes">4x</span>
|
|
683
|
+
<span class="cline-any cline-yes">4x</span>
|
|
684
|
+
<span class="cline-any cline-yes">4x</span>
|
|
685
|
+
<span class="cline-any cline-yes">4x</span>
|
|
686
|
+
<span class="cline-any cline-yes">4x</span>
|
|
687
|
+
<span class="cline-any cline-yes">4x</span>
|
|
688
|
+
<span class="cline-any cline-yes">4x</span>
|
|
689
|
+
<span class="cline-any cline-yes">4x</span>
|
|
690
|
+
<span class="cline-any cline-yes">4x</span>
|
|
691
|
+
<span class="cline-any cline-yes">4x</span>
|
|
692
|
+
<span class="cline-any cline-yes">4x</span>
|
|
693
|
+
<span class="cline-any cline-yes">4x</span>
|
|
694
|
+
<span class="cline-any cline-yes">4x</span>
|
|
695
|
+
<span class="cline-any cline-yes">4x</span>
|
|
696
|
+
<span class="cline-any cline-yes">4x</span>
|
|
697
|
+
<span class="cline-any cline-yes">4x</span>
|
|
698
|
+
<span class="cline-any cline-yes">4x</span>
|
|
699
|
+
<span class="cline-any cline-yes">4x</span>
|
|
700
|
+
<span class="cline-any cline-yes">4x</span>
|
|
701
|
+
<span class="cline-any cline-yes">4x</span>
|
|
702
|
+
<span class="cline-any cline-yes">4x</span>
|
|
703
|
+
<span class="cline-any cline-yes">4x</span>
|
|
704
|
+
<span class="cline-any cline-yes">4x</span>
|
|
705
|
+
<span class="cline-any cline-yes">4x</span>
|
|
706
|
+
<span class="cline-any cline-yes">4x</span>
|
|
707
|
+
<span class="cline-any cline-yes">4x</span>
|
|
708
|
+
<span class="cline-any cline-yes">4x</span>
|
|
709
|
+
<span class="cline-any cline-yes">4x</span>
|
|
710
|
+
<span class="cline-any cline-yes">4x</span>
|
|
711
|
+
<span class="cline-any cline-yes">4x</span>
|
|
712
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import _ from 'lodash'
|
|
713
|
+
import path from 'path'
|
|
714
|
+
import fs from 'fs-extra'
|
|
715
|
+
import zlib from 'zlib'
|
|
716
|
+
import request from 'superagent'
|
|
717
|
+
import makeDebug from 'debug'
|
|
718
|
+
import { fileURLToPath } from 'url'
|
|
719
|
+
import * as permissions from '../../../core/common/permissions.js'
|
|
720
|
+
|
|
721
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
722
|
+
const modelsPath = path.join(__dirname, '..', 'models')
|
|
723
|
+
const servicesPath = path.join(__dirname, '..', 'services')
|
|
724
|
+
|
|
725
|
+
const debug = makeDebug('kdk:map:services')
|
|
726
|
+
|
|
727
|
+
export function createFeaturesService (options = {}) {
|
|
728
|
+
const app = this
|
|
729
|
+
|
|
730
|
+
debug('Creating features service with options', options)
|
|
731
|
+
const service = app.createService(options.collection, Object.assign({
|
|
732
|
+
modelName: 'features',
|
|
733
|
+
servicesPath,
|
|
734
|
+
modelsPath,
|
|
735
|
+
paginate: { default: 5000, max: 5000 },
|
|
736
|
+
// FIXME: no real-time events for now since we create big batches,
|
|
737
|
+
// does not seem to be sufficient also require a hook (see https://github.com/feathersjs/feathers/issues/922)
|
|
738
|
+
events: ['features'],
|
|
739
|
+
methods: ['find', 'get', 'create', 'update', 'patch', 'remove', 'heatmap', 'formatGeoJSON']
|
|
740
|
+
}, options))
|
|
741
|
+
// As a features service can be created dynamically register default permissions for it
|
|
742
|
+
permissions.defineAbilities.registerHook((subject, can, cannot) => {
|
|
743
|
+
can('service', options.collection)
|
|
744
|
+
can('read', options.collection)
|
|
745
|
+
})
|
|
746
|
+
// We then need to update abilities cache
|
|
747
|
+
const authorisationService = app.getService('authorisations')
|
|
748
|
+
if (authorisationService) authorisationService.clearAbilities()
|
|
749
|
+
return service
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
export <span class="fstat-no" title="function not covered" >function removeFeaturesService (options = {}) {</span>
|
|
753
753
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
754
754
|
<span class="cstat-no" title="statement not covered" > debug('Removing features service with options', options)</span>
|
|
755
755
|
<span class="cstat-no" title="statement not covered" > return app.removeService(app.getService(options.collection, options.context))</span>
|
|
756
756
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
<span class="
|
|
757
|
+
|
|
758
|
+
export function createCatalogService (options = {}) {
|
|
759
|
+
const app = this
|
|
760
|
+
|
|
761
|
+
// Read default categories/sublegends config, which can be overriden by options
|
|
762
|
+
const catalogConfig = app.get('catalog') || {}
|
|
763
|
+
const categories = catalogConfig.categories
|
|
764
|
+
const sublegends = catalogConfig.sublegends
|
|
765
|
+
|
|
766
|
+
debug('Creating catalog service with options', options)
|
|
767
|
+
return app.createService('catalog', Object.assign({
|
|
768
|
+
servicesPath,
|
|
769
|
+
modelsPath,
|
|
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>
|
|
777
777
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
778
778
|
<span class="cstat-no" title="statement not covered" > debug('Removing catalog service with options', options)</span>
|
|
779
779
|
<span class="cstat-no" title="statement not covered" > return app.removeService(app.getService('catalog', options.context))</span>
|
|
780
780
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
<span class="
|
|
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
|
+
export <span class="fstat-no" title="function not covered" >function removeProjectsService (options = {}) {</span>
|
|
794
794
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
795
795
|
<span class="cstat-no" title="statement not covered" > debug('Removing projects service with options', options)</span>
|
|
796
796
|
<span class="cstat-no" title="statement not covered" > return app.removeService(app.getService('projects', options.context))</span>
|
|
797
797
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
<span class="
|
|
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>
|
|
812
812
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
813
813
|
<span class="cstat-no" title="statement not covered" > debug('Removing alerts service with options', options)</span>
|
|
814
814
|
<span class="cstat-no" title="statement not covered" > return app.removeService(app.getService('alerts', options.context))</span>
|
|
815
815
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
<span class="
|
|
816
|
+
|
|
817
|
+
// Helper to register service and permissions for a layer
|
|
818
|
+
export <span class="fstat-no" title="function not covered" >async function createFeaturesServiceForLayer (layer, context) {</span>
|
|
819
819
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
820
820
|
<span class="cstat-no" title="statement not covered" > // Check if service(s) are associated to this layer</span>
|
|
821
821
|
<span class="cstat-no" title="statement not covered" > // Avoid create it twice as we can share services between different layers</span>
|
|
@@ -837,8 +837,8 @@
|
|
|
837
837
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
838
838
|
<span class="cstat-no" title="statement not covered" > return service || probeService</span>
|
|
839
839
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
840
|
-
|
|
841
|
-
<span class="
|
|
840
|
+
// Helper to unregister service for a layer
|
|
841
|
+
export <span class="fstat-no" title="function not covered" >async function removeFeaturesServiceForLayer (layer, context) {</span>
|
|
842
842
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
843
843
|
<span class="cstat-no" title="statement not covered" > // Check if service(s) are associated to this layer and remove it</span>
|
|
844
844
|
<span class="cstat-no" title="statement not covered" > let probeService = (layer.probeService ? app.getService(layer.probeService, context) : null)</span>
|
|
@@ -851,8 +851,8 @@
|
|
|
851
851
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
852
852
|
<span class="cstat-no" title="statement not covered" > return service || probeService</span>
|
|
853
853
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
854
|
-
|
|
855
|
-
<span class="
|
|
854
|
+
// Helper to create features from source for a layer
|
|
855
|
+
export <span class="fstat-no" title="function not covered" >async function createFeaturesForLayer (features, layer, options = {}) {</span>
|
|
856
856
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
857
857
|
<span class="cstat-no" title="statement not covered" > const featuresService = app.getService(layer.service, options.context)</span>
|
|
858
858
|
<span class="cstat-no" title="statement not covered" > if (options && options.filter) features = await options.filter(features, layer, app)</span>
|
|
@@ -867,10 +867,10 @@
|
|
|
867
867
|
<span class="cstat-no" title="statement not covered" > // and that after an error remaining write operations in the queue will continue anyway</span>
|
|
868
868
|
<span class="cstat-no" title="statement not covered" > await featuresService.create(features, { mongodb: { ordered: false } })</span>
|
|
869
869
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
<span class="
|
|
870
|
+
|
|
871
|
+
// Read default layers configured and create, if not found in DB, or update it accordingly
|
|
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>
|
|
874
874
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
875
875
|
<span class="cstat-no" title="statement not covered" > const catalogService = app.getService('catalog', options.context)</span>
|
|
876
876
|
<span class="cstat-no" title="statement not covered" > const catalog = app.get('catalog')</span>
|
|
@@ -953,9 +953,9 @@
|
|
|
953
953
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
954
954
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
955
955
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
<span class="
|
|
956
|
+
|
|
957
|
+
// Create the required features services for layers found in catalog
|
|
958
|
+
export <span class="fstat-no" title="function not covered" >async function createCatalogFeaturesServices (options = {}) {</span>
|
|
959
959
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
960
960
|
<span class="cstat-no" title="statement not covered" > const catalogService = app.getService('catalog', options.context)</span>
|
|
961
961
|
<span class="cstat-no" title="statement not covered" > const layers = await catalogService.find({ query: { service: { $exists: true } }, paginate: false, $select: ['service'] })</span>
|
|
@@ -963,75 +963,75 @@
|
|
|
963
963
|
<span class="cstat-no" title="statement not covered" > await createFeaturesServiceForLayer.call(app, layers[i], options.context)</span>
|
|
964
964
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
965
965
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
<span class="
|
|
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>
|
|
976
976
|
<span class="cstat-no" title="statement not covered" > const app = this</span>
|
|
977
977
|
<span class="cstat-no" title="statement not covered" > return app.removeService(app.getService('styles', options.context))</span>
|
|
978
978
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
<span class="
|
|
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>
|
|
985
985
|
<span class="cstat-no" title="statement not covered" > await createCatalogService.call(app)</span>
|
|
986
986
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
987
|
-
|
|
988
|
-
<span class="
|
|
987
|
+
const projectsConfig = app.get('projects')
|
|
988
|
+
if (projectsConfig) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
989
989
|
<span class="cstat-no" title="statement not covered" > await createProjectsService.call(app)</span>
|
|
990
990
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
<span class="
|
|
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
|
+
if (alertsConfig) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
1001
1001
|
<span class="cstat-no" title="statement not covered" > await createAlertsService.call(app)</span>
|
|
1002
1002
|
<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
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1003
|
+
const stylesConfig = app.get('styles')
|
|
1004
|
+
if (stylesConfig) {
|
|
1005
|
+
await createStylesService.call(app)
|
|
1006
|
+
debug('\'styles\' service created')
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
/*
|
|
1010
|
+
app.createService('daptiles', Object.assign({
|
|
1011
|
+
servicesPath,
|
|
1012
|
+
middlewares: {
|
|
1013
|
+
after: [
|
|
1014
|
+
(req, res, next) => {
|
|
1015
|
+
const buffers = _.get(res.data, 'buffers')
|
|
1016
|
+
if (buffers) {
|
|
1017
|
+
const binary = Buffer.concat(buffers)
|
|
1018
|
+
res.set({
|
|
1019
|
+
'Content-Type': 'application/octet-stream'
|
|
1020
|
+
}).status(200)
|
|
1021
|
+
// for (const buf of buffers) {
|
|
1022
|
+
// // res.send(buf)
|
|
1023
|
+
// res.write(buf)
|
|
1024
|
+
// }
|
|
1025
|
+
// res.end()
|
|
1026
|
+
res.end(binary)
|
|
1027
|
+
}
|
|
1028
|
+
next()
|
|
1029
|
+
}
|
|
1030
|
+
]
|
|
1031
|
+
}
|
|
1032
|
+
}))
|
|
1033
|
+
*/
|
|
1034
|
+
}
|
|
1035
1035
|
</pre></td></tr></table></pre>
|
|
1036
1036
|
|
|
1037
1037
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -1039,7 +1039,7 @@
|
|
|
1039
1039
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1040
1040
|
Code coverage generated by
|
|
1041
1041
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1042
|
-
at 2025-
|
|
1042
|
+
at 2025-07-24T10:00:20.476Z
|
|
1043
1043
|
</div>
|
|
1044
1044
|
<script src="../../../prettify.js"></script>
|
|
1045
1045
|
<script>
|