@kalisio/kdk 1.3.6 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nyc_output/{0d403586-0c7c-4336-94d1-a49e9f02a905.json → 058fc679-d60a-4501-ac04-71171e5200b8.json} +0 -0
- package/.nyc_output/2226bcce-9d22-4dad-b9fa-46564b5565c7.json +1 -0
- package/.nyc_output/6dc4b140-1a8a-4d69-b91c-89c557883d6e.json +1 -0
- package/.nyc_output/{21dd57bd-48c5-41c8-8800-252db32a9366.json → 8b1830fa-932e-4a61-9837-4a5b18f83ea9.json} +0 -0
- package/.nyc_output/{3eb3a2ca-53c2-4551-ba6b-adf70f9a53cd.json → afd2d144-3570-4858-b94a-b523dbd023dd.json} +0 -0
- package/.nyc_output/processinfo/058fc679-d60a-4501-ac04-71171e5200b8.json +1 -0
- package/.nyc_output/processinfo/2226bcce-9d22-4dad-b9fa-46564b5565c7.json +1 -0
- package/.nyc_output/processinfo/6dc4b140-1a8a-4d69-b91c-89c557883d6e.json +1 -0
- package/.nyc_output/processinfo/8b1830fa-932e-4a61-9837-4a5b18f83ea9.json +1 -0
- package/.nyc_output/processinfo/afd2d144-3570-4858-b94a-b523dbd023dd.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/CHANGELOG.md +167 -79
- package/README.md +1 -1
- package/coverage/core/api/application.js.html +436 -436
- package/coverage/core/api/authentication.js.html +119 -119
- package/coverage/core/api/db.js.html +201 -201
- package/coverage/core/api/hooks/hooks.account.js.html +48 -48
- package/coverage/core/api/hooks/hooks.authentication.js.html +64 -64
- package/coverage/core/api/hooks/hooks.authorisations.js.html +369 -378
- package/coverage/core/api/hooks/hooks.devices.js.html +49 -49
- package/coverage/core/api/hooks/hooks.groups.js.html +37 -37
- package/coverage/core/api/hooks/hooks.logger.js.html +27 -27
- package/coverage/core/api/hooks/hooks.model.js.html +269 -269
- package/coverage/core/api/hooks/hooks.organisations.js.html +183 -231
- package/coverage/core/api/hooks/hooks.pusher.js.html +114 -114
- package/coverage/core/api/hooks/hooks.query.js.html +234 -198
- package/coverage/core/api/hooks/hooks.service.js.html +82 -82
- package/coverage/core/api/hooks/hooks.storage.js.html +121 -121
- package/coverage/core/api/hooks/hooks.tags.js.html +232 -232
- package/coverage/core/api/hooks/hooks.users.js.html +304 -256
- package/coverage/core/api/hooks/index.html +172 -172
- package/coverage/core/api/hooks/index.js.html +24 -24
- package/coverage/core/api/index.html +75 -75
- package/coverage/core/api/index.js.html +26 -26
- package/coverage/core/api/marshall.js.html +57 -57
- package/coverage/core/api/models/groups.model.mongodb.js.html +20 -20
- package/coverage/core/api/models/index.html +50 -50
- package/coverage/core/api/models/organisations.model.mongodb.js.html +12 -12
- package/coverage/core/api/models/tags.model.mongodb.js.html +22 -22
- package/coverage/core/api/models/users.model.mongodb.js.html +20 -20
- package/coverage/core/api/oauth2-handler.js.html +18 -18
- package/coverage/core/api/oauth2-verifier.js.html +38 -38
- package/coverage/core/api/services/account/account.hooks.js.html +16 -16
- package/coverage/core/api/services/account/account.service.js.html +108 -108
- package/coverage/core/api/services/account/index.html +32 -32
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +9 -9
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +132 -129
- package/coverage/core/api/services/authorisations/index.html +28 -28
- package/coverage/core/api/services/databases/databases.hooks.js.html +9 -9
- package/coverage/core/api/services/databases/databases.service.js.html +12 -12
- package/coverage/core/api/services/databases/index.html +24 -24
- package/coverage/core/api/services/devices/devices.hooks.js.html +9 -9
- package/coverage/core/api/services/devices/devices.service.js.html +121 -121
- package/coverage/core/api/services/devices/index.html +28 -28
- package/coverage/core/api/services/groups/groups.hooks.js.html +9 -9
- package/coverage/core/api/services/groups/index.html +13 -13
- package/coverage/core/api/services/index.html +21 -21
- package/coverage/core/api/services/index.js.html +137 -137
- package/coverage/core/api/services/mailer/index.html +24 -24
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +9 -9
- package/coverage/core/api/services/mailer/mailer.service.js.html +19 -19
- package/coverage/core/api/services/organisations/index.html +24 -24
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +8 -8
- package/coverage/core/api/services/organisations/organisations.service.js.html +67 -67
- package/coverage/core/api/services/pusher/index.html +34 -34
- package/coverage/core/api/services/pusher/pusher.channels.js.html +8 -8
- package/coverage/core/api/services/pusher/pusher.hooks.js.html +10 -10
- package/coverage/core/api/services/pusher/pusher.service.js.html +414 -414
- package/coverage/core/api/services/storage/index.html +21 -21
- package/coverage/core/api/services/storage/storage.hooks.js.html +35 -35
- package/coverage/core/api/services/tags/index.html +21 -21
- package/coverage/core/api/services/tags/tags.hooks.js.html +25 -25
- package/coverage/core/api/services/users/index.html +21 -21
- package/coverage/core/api/services/users/users.hooks.js.html +33 -33
- package/coverage/core/common/errors.js.html +1 -1
- package/coverage/core/common/index.html +42 -27
- package/coverage/core/common/index.js.html +16 -16
- package/coverage/core/common/permissions.js.html +325 -265
- package/coverage/index.html +182 -182
- package/coverage/lcov-report/core/api/application.js.html +436 -436
- package/coverage/lcov-report/core/api/authentication.js.html +119 -119
- package/coverage/lcov-report/core/api/db.js.html +201 -201
- package/coverage/lcov-report/core/api/hooks/hooks.account.js.html +48 -48
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +64 -64
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +369 -378
- package/coverage/lcov-report/core/api/hooks/hooks.devices.js.html +49 -49
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +37 -37
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +27 -27
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +269 -269
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +183 -231
- package/coverage/lcov-report/core/api/hooks/hooks.pusher.js.html +114 -114
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +234 -198
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +82 -82
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +121 -121
- package/coverage/lcov-report/core/api/hooks/hooks.tags.js.html +232 -232
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +304 -256
- package/coverage/lcov-report/core/api/hooks/index.html +172 -172
- package/coverage/lcov-report/core/api/hooks/index.js.html +24 -24
- package/coverage/lcov-report/core/api/index.html +75 -75
- package/coverage/lcov-report/core/api/index.js.html +26 -26
- package/coverage/lcov-report/core/api/marshall.js.html +57 -57
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +20 -20
- package/coverage/lcov-report/core/api/models/index.html +50 -50
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +12 -12
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +22 -22
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +20 -20
- package/coverage/lcov-report/core/api/oauth2-handler.js.html +18 -18
- package/coverage/lcov-report/core/api/oauth2-verifier.js.html +38 -38
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +16 -16
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +108 -108
- package/coverage/lcov-report/core/api/services/account/index.html +32 -32
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +9 -9
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +132 -129
- package/coverage/lcov-report/core/api/services/authorisations/index.html +28 -28
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +9 -9
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +12 -12
- package/coverage/lcov-report/core/api/services/databases/index.html +24 -24
- package/coverage/lcov-report/core/api/services/devices/devices.hooks.js.html +9 -9
- package/coverage/lcov-report/core/api/services/devices/devices.service.js.html +121 -121
- package/coverage/lcov-report/core/api/services/devices/index.html +28 -28
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +9 -9
- package/coverage/lcov-report/core/api/services/groups/index.html +13 -13
- package/coverage/lcov-report/core/api/services/index.html +21 -21
- package/coverage/lcov-report/core/api/services/index.js.html +137 -137
- package/coverage/lcov-report/core/api/services/mailer/index.html +24 -24
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +9 -9
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +19 -19
- package/coverage/lcov-report/core/api/services/organisations/index.html +24 -24
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +8 -8
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +67 -67
- package/coverage/lcov-report/core/api/services/pusher/index.html +34 -34
- package/coverage/lcov-report/core/api/services/pusher/pusher.channels.js.html +8 -8
- package/coverage/lcov-report/core/api/services/pusher/pusher.hooks.js.html +10 -10
- package/coverage/lcov-report/core/api/services/pusher/pusher.service.js.html +414 -414
- package/coverage/lcov-report/core/api/services/storage/index.html +21 -21
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +35 -35
- package/coverage/lcov-report/core/api/services/tags/index.html +21 -21
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +25 -25
- package/coverage/lcov-report/core/api/services/users/index.html +21 -21
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +33 -33
- package/coverage/lcov-report/core/common/errors.js.html +1 -1
- package/coverage/lcov-report/core/common/index.html +42 -27
- package/coverage/lcov-report/core/common/index.js.html +16 -16
- package/coverage/lcov-report/core/common/permissions.js.html +325 -265
- package/coverage/lcov-report/index.html +182 -182
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +1 -1
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +118 -37
- package/coverage/lcov-report/map/api/hooks/index.html +7 -7
- package/coverage/lcov-report/map/api/hooks/index.js.html +1 -1
- package/coverage/lcov-report/map/api/index.html +1 -1
- package/coverage/lcov-report/map/api/index.js.html +1 -1
- package/coverage/lcov-report/map/api/marshall.js.html +1 -1
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/index.html +1 -1
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +1 -1
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/alerts/index.html +1 -1
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +1 -1
- package/coverage/lcov-report/map/api/services/catalog/index.html +1 -1
- 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 +2 -2
- package/coverage/lcov-report/map/api/services/features/index.html +1 -1
- package/coverage/lcov-report/map/api/services/geocoder/geocoder.hooks.js.html +1 -1
- package/coverage/lcov-report/map/api/services/geocoder/geocoder.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/geocoder/index.html +1 -1
- package/coverage/lcov-report/map/api/services/index.html +1 -1
- package/coverage/lcov-report/map/api/services/index.js.html +1 -1
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/errors.js.html +1 -1
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/grid.js.html +1 -1
- package/coverage/lcov-report/map/common/index.html +12 -12
- package/coverage/lcov-report/map/common/index.js.html +1 -1
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/moment-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/opendap-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/permissions.js.html +1 -1
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/tms-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/wcs-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/wfs-utils.js.html +8 -5
- package/coverage/lcov-report/map/common/wms-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/wmts-utils.js.html +71 -11
- package/coverage/lcov.info +3742 -3949
- package/coverage/map/api/hooks/hooks.catalog.js.html +1 -1
- package/coverage/map/api/hooks/hooks.query.js.html +118 -37
- package/coverage/map/api/hooks/index.html +7 -7
- package/coverage/map/api/hooks/index.js.html +1 -1
- package/coverage/map/api/index.html +1 -1
- package/coverage/map/api/index.js.html +1 -1
- package/coverage/map/api/marshall.js.html +1 -1
- package/coverage/map/api/models/alerts.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/catalog.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/features.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/index.html +1 -1
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +1 -1
- package/coverage/map/api/services/alerts/alerts.service.js.html +1 -1
- package/coverage/map/api/services/alerts/index.html +1 -1
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +1 -1
- package/coverage/map/api/services/catalog/index.html +1 -1
- 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 +2 -2
- package/coverage/map/api/services/features/index.html +1 -1
- package/coverage/map/api/services/geocoder/geocoder.hooks.js.html +1 -1
- package/coverage/map/api/services/geocoder/geocoder.service.js.html +1 -1
- package/coverage/map/api/services/geocoder/index.html +1 -1
- package/coverage/map/api/services/index.html +1 -1
- package/coverage/map/api/services/index.js.html +1 -1
- package/coverage/map/common/dynamic-grid-source.js.html +1 -1
- package/coverage/map/common/errors.js.html +1 -1
- package/coverage/map/common/geotiff-grid-source.js.html +1 -1
- package/coverage/map/common/grid.js.html +1 -1
- package/coverage/map/common/index.html +12 -12
- package/coverage/map/common/index.js.html +1 -1
- package/coverage/map/common/meteo-model-grid-source.js.html +1 -1
- package/coverage/map/common/moment-utils.js.html +1 -1
- package/coverage/map/common/opendap-grid-source.js.html +1 -1
- package/coverage/map/common/opendap-utils.js.html +1 -1
- package/coverage/map/common/permissions.js.html +1 -1
- package/coverage/map/common/time-based-grid-source.js.html +1 -1
- package/coverage/map/common/tms-utils.js.html +1 -1
- package/coverage/map/common/wcs-grid-source.js.html +1 -1
- package/coverage/map/common/wcs-utils.js.html +1 -1
- package/coverage/map/common/weacast-grid-source.js.html +1 -1
- package/coverage/map/common/wfs-utils.js.html +8 -5
- package/coverage/map/common/wms-utils.js.html +1 -1
- package/coverage/map/common/wmts-utils.js.html +71 -11
- package/extras/icons/kanban.png +0 -0
- package/extras/tours/core/add-member.js +10 -1
- package/extras/tours/core/{tag-member.js → edit-member-tags.js} +4 -3
- package/extras/tours/core/groups.js +8 -2
- package/extras/tours/core/members.js +11 -21
- package/extras/tours/core/tags.js +7 -1
- package/extras/tours/map/catalog-categories.js +4 -4
- package/extras/tours/map/catalog-panel.js +16 -16
- package/extras/tours/map/favorite-views.js +3 -3
- package/lib/core/api/hooks/hooks.authorisations.js +149 -140
- package/lib/core/api/hooks/hooks.authorisations.js.map +1 -1
- package/lib/core/api/hooks/hooks.organisations.js +1 -23
- package/lib/core/api/hooks/hooks.organisations.js.map +1 -1
- package/lib/core/api/hooks/hooks.query.js +22 -0
- package/lib/core/api/hooks/hooks.query.js.map +1 -1
- package/lib/core/api/hooks/hooks.users.js +34 -18
- package/lib/core/api/hooks/hooks.users.js.map +1 -1
- package/lib/core/api/services/authorisations/authorisations.service.js +34 -25
- package/lib/core/api/services/authorisations/authorisations.service.js.map +1 -1
- package/lib/core/client/api.js +1 -0
- package/lib/core/client/api.js.map +1 -1
- package/lib/core/client/components/account/KAccountDZ.vue +3 -4
- package/lib/core/client/components/account/KAccountDevices.vue +5 -6
- package/lib/core/client/components/account/KDeviceCard.vue +2 -1
- package/lib/core/client/components/account/KIdentityPanel.vue +1 -7
- package/lib/core/client/components/collection/KBoard.vue +26 -155
- package/lib/core/client/components/collection/KCard.vue +144 -42
- package/lib/core/client/components/collection/KCardSection.vue +52 -0
- package/lib/core/client/components/collection/KColumn.vue +181 -0
- package/lib/core/client/components/collection/KGrid.vue +13 -18
- package/lib/core/client/components/collection/KHistory.vue +61 -89
- package/lib/core/client/components/collection/KHistoryEntry.vue +90 -66
- package/lib/core/client/components/collection/KItem.vue +21 -2
- package/lib/core/client/components/collection/KList.vue +9 -12
- package/lib/core/client/components/collection/KTable.vue +33 -39
- package/lib/core/client/components/collection/index.js +6 -1
- package/lib/core/client/components/collection/index.js.map +1 -1
- package/lib/core/client/components/editor/KEditor.vue +0 -6
- package/lib/core/client/components/editor/KModalEditor.vue +4 -4
- package/lib/core/client/components/editor/KSettingsEditor.vue +49 -0
- package/lib/core/client/components/form/KAttachmentField.vue +10 -10
- package/lib/core/client/components/form/KChipsField.vue +28 -23
- package/lib/core/client/components/form/KColorField.vue +30 -25
- package/lib/core/client/components/form/KFileField.vue +11 -40
- package/lib/core/client/components/form/KForm.vue +0 -12
- package/lib/core/client/components/form/KIconField.vue +1 -0
- package/lib/core/client/components/form/KItemField.vue +6 -2
- package/lib/core/client/components/form/KRoleField.vue +56 -0
- package/lib/core/client/components/form/KSelectField.vue +16 -1
- package/lib/core/client/components/form/KView.vue +5 -14
- package/lib/core/client/components/frame/KAction.vue +18 -12
- package/lib/core/client/components/frame/KAvatar.vue +3 -3
- package/lib/core/client/components/frame/KChart.vue +60 -0
- package/lib/core/client/components/frame/KChipsPane.vue +80 -0
- package/lib/core/client/components/frame/KContent.vue +1 -1
- package/lib/core/client/components/frame/KModal.vue +30 -44
- package/lib/core/client/components/frame/KPanel.vue +1 -1
- package/lib/core/client/components/frame/{KMenu.vue → KPopupAction.vue} +6 -7
- package/lib/core/client/components/frame/KSpot.vue +31 -0
- package/lib/core/client/components/frame/KStamp.vue +62 -0
- package/lib/core/client/components/frame/index.js +56 -1
- package/lib/core/client/components/frame/index.js.map +1 -1
- package/lib/core/client/components/input/KColorChooser.vue +16 -8
- package/lib/core/client/components/input/KIconChooser.vue +2 -1
- package/lib/core/client/components/input/KOptionsChooser.vue +2 -2
- package/lib/core/client/components/input/KUploader.vue +14 -5
- package/lib/core/client/components/layout/KAbout.vue +9 -3
- package/lib/core/client/components/layout/KFab.vue +1 -1
- package/lib/core/client/components/layout/KPage.vue +44 -19
- package/lib/core/client/components/layout/KTour.vue +2 -2
- package/lib/core/client/components/layout/KWelcome.vue +13 -12
- package/lib/core/client/components/layout/KWindow.vue +1 -1
- package/lib/core/client/components/media/KImageViewer.vue +9 -7
- package/lib/core/client/components/media/KMediaBrowser.vue +12 -8
- package/lib/core/client/components/menu/KMenu.vue +103 -0
- package/lib/core/client/components/team/KAddMember.vue +17 -9
- package/lib/core/client/components/team/KChangeRole.vue +5 -7
- package/lib/core/client/components/team/KGroupCard.vue +34 -51
- package/lib/core/client/components/team/KGroupsActivity.vue +9 -2
- package/lib/core/client/components/team/KJoinGroup.vue +5 -7
- package/lib/core/client/components/team/KMemberCard.vue +104 -63
- package/lib/core/client/components/team/KMembersActivity.vue +9 -2
- package/lib/core/client/components/team/KOrganisationsActivity.vue +8 -1
- package/lib/core/client/components/team/KTagCard.vue +26 -26
- package/lib/core/client/components/team/KTagsActivity.vue +9 -2
- package/lib/core/client/components/time/KTimeRange.vue +144 -0
- package/lib/core/client/components/viewer/KModalViewer.vue +6 -0
- package/lib/core/client/components/viewer/KViewer.vue +0 -6
- package/lib/core/client/i18n/core_en.json +138 -94
- package/lib/core/client/i18n/core_fr.json +61 -17
- package/lib/core/client/index.js +46 -14
- package/lib/core/client/index.js.map +1 -1
- package/lib/core/client/layout.js +8 -1
- package/lib/core/client/layout.js.map +1 -1
- package/lib/core/client/mixins/mixin.authorisation.js +28 -18
- package/lib/core/client/mixins/mixin.authorisation.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-collection.js +57 -9
- package/lib/core/client/mixins/mixin.base-collection.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-context.js +1 -1
- package/lib/core/client/mixins/mixin.base-context.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-editor.js +26 -16
- package/lib/core/client/mixins/mixin.base-editor.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-field.js +0 -4
- package/lib/core/client/mixins/mixin.base-field.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-item.js +29 -14
- package/lib/core/client/mixins/mixin.base-item.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-viewer.js +0 -2
- package/lib/core/client/mixins/mixin.base-viewer.js.map +1 -1
- package/lib/core/client/mixins/mixin.object-proxy.js +17 -3
- package/lib/core/client/mixins/mixin.object-proxy.js.map +1 -1
- package/lib/core/client/mixins/mixin.schema-proxy.js +31 -0
- package/lib/core/client/mixins/mixin.schema-proxy.js.map +1 -1
- package/lib/core/client/mixins/mixin.service.js +5 -33
- package/lib/core/client/mixins/mixin.service.js.map +1 -1
- package/lib/core/client/reader.js +54 -0
- package/lib/core/client/reader.js.map +1 -0
- package/lib/core/client/readers/index.js +30 -0
- package/lib/core/client/readers/index.js.map +1 -0
- package/lib/core/client/readers/reader.csv.js +43 -0
- package/lib/core/client/readers/reader.csv.js.map +1 -0
- package/lib/core/client/readers/reader.json.js +38 -0
- package/lib/core/client/readers/reader.json.js.map +1 -0
- package/lib/core/client/services/index.js +23 -0
- package/lib/core/client/services/index.js.map +1 -1
- package/lib/core/client/services/local-settings.service.js +4 -0
- package/lib/core/client/services/local-settings.service.js.map +1 -1
- package/lib/core/client/time.js +131 -0
- package/lib/core/client/time.js.map +1 -0
- package/lib/core/common/permissions.js +65 -23
- package/lib/core/common/permissions.js.map +1 -1
- package/lib/core/common/schemas/groups.create.json +1 -1
- package/lib/core/common/schemas/groups.update.json +1 -1
- package/lib/core/common/schemas/organisations.create.json +1 -1
- package/lib/core/common/schemas/organisations.update.json +2 -2
- package/lib/core/common/schemas/settings.update.json +139 -0
- package/lib/core/common/schemas/tags.update.json +9 -1
- package/lib/map/api/hooks/hooks.query.js +55 -29
- package/lib/map/api/hooks/hooks.query.js.map +1 -1
- package/lib/map/api/services/features/features.hooks.js +1 -1
- package/lib/map/api/services/features/features.hooks.js.map +1 -1
- package/lib/map/client/components/KCaptureToolbar.vue +156 -0
- package/lib/map/client/components/KColorLegend.vue +25 -23
- package/lib/map/client/components/KFavoriteViews.vue +71 -35
- package/lib/map/client/components/KFeaturesChart.vue +11 -9
- package/lib/map/client/components/KFeaturesFilter.vue +18 -8
- package/lib/map/client/components/KFeaturesTable.vue +27 -2
- package/lib/map/client/components/KLayerEditionToolbar.vue +51 -0
- package/lib/map/client/components/KLayerStyleEditor.vue +12 -5
- package/lib/map/client/components/KLayerStyleForm.vue +44 -33
- package/lib/map/client/components/KLocationInput.vue +126 -65
- package/lib/map/client/components/KLocationMap.vue +199 -84
- package/lib/map/client/components/KMeasureTool.vue +340 -0
- package/lib/map/client/components/KPositionIndicator.vue +1 -0
- package/lib/map/client/components/KTimeline.vue +41 -37
- package/lib/map/client/components/KUrlLegend.vue +21 -19
- package/lib/map/client/components/catalog/KBaseLayersSelector.vue +105 -0
- package/lib/map/client/components/catalog/KCatalog.vue +14 -2
- package/lib/map/client/components/catalog/KConnectLayer.vue +31 -11
- package/lib/map/client/components/catalog/KCreateLayer.vue +37 -14
- package/lib/map/client/components/catalog/KImportLayer.vue +33 -40
- package/lib/map/client/components/catalog/KLayerCategories.vue +86 -62
- package/lib/map/client/components/catalog/KLayersSelector.vue +44 -42
- package/lib/map/client/components/catalog/KWeatherLayersSelector.vue +3 -3
- package/lib/map/client/components/form/KLocationField.vue +1 -1
- package/lib/map/client/components/form/KOwsLayerField.vue +7 -0
- package/lib/map/client/components/form/KOwsServiceField.vue +1 -0
- package/lib/map/client/components/widget/KInformationBox.vue +10 -16
- package/lib/map/client/components/widget/KMapillaryViewer.vue +59 -49
- package/lib/map/client/components/widget/KTimeSeries.vue +119 -31
- package/lib/map/client/i18n/map_en.json +105 -20
- package/lib/map/client/i18n/map_fr.json +107 -23
- package/lib/map/client/init.js +24 -7
- package/lib/map/client/init.js.map +1 -1
- package/lib/map/client/leaflet/GSMaPLayer.js +4 -9
- package/lib/map/client/leaflet/GSMaPLayer.js.map +1 -1
- package/lib/map/client/leaflet/MaskLayer.js +73 -0
- package/lib/map/client/leaflet/MaskLayer.js.map +1 -0
- package/lib/map/client/mixins/globe/mixin.base-globe.js +7 -6
- package/lib/map/client/mixins/globe/mixin.base-globe.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.geojson-layers.js +7 -9
- package/lib/map/client/mixins/globe/mixin.geojson-layers.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.popup.js +4 -0
- package/lib/map/client/mixins/globe/mixin.popup.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.tooltip.js +4 -0
- package/lib/map/client/mixins/globe/mixin.tooltip.js.map +1 -1
- package/lib/map/client/mixins/index.js +8 -13
- package/lib/map/client/mixins/index.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.base-map.js +71 -8
- package/lib/map/client/mixins/map/mixin.base-map.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.canvas-layers.js +276 -51
- package/lib/map/client/mixins/map/mixin.canvas-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.edit-layers.js +218 -121
- package/lib/map/client/mixins/map/mixin.edit-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.file-layers.js +46 -93
- package/lib/map/client/mixins/map/mixin.file-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.geojson-layers.js +22 -11
- package/lib/map/client/mixins/map/mixin.geojson-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.georaster-layers.js +7 -4
- package/lib/map/client/mixins/map/mixin.georaster-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.gsmap-layers.js +3 -3
- package/lib/map/client/mixins/map/mixin.gsmap-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.heatmap-layers.js +8 -10
- package/lib/map/client/mixins/map/mixin.heatmap-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.mapillary-layers.js +25 -40
- package/lib/map/client/mixins/map/mixin.mapillary-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.popup.js +4 -0
- package/lib/map/client/mixins/map/mixin.popup.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.tiled-mesh-layers.js +5 -3
- package/lib/map/client/mixins/map/mixin.tiled-mesh-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.tiled-wind-layers.js +5 -3
- package/lib/map/client/mixins/map/mixin.tiled-wind-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.tooltip.js +4 -0
- package/lib/map/client/mixins/map/mixin.tooltip.js.map +1 -1
- package/lib/map/client/mixins/mixin.activity.js +62 -68
- package/lib/map/client/mixins/mixin.activity.js.map +1 -1
- package/lib/map/client/mixins/mixin.context.js +26 -3
- package/lib/map/client/mixins/mixin.context.js.map +1 -1
- package/lib/map/client/mixins/mixin.feature-selection.js +8 -10
- package/lib/map/client/mixins/mixin.feature-selection.js.map +1 -1
- package/lib/map/client/mixins/mixin.feature-service.js +9 -7
- package/lib/map/client/mixins/mixin.feature-service.js.map +1 -1
- package/lib/map/client/mixins/mixin.infobox.js +4 -0
- package/lib/map/client/mixins/mixin.infobox.js.map +1 -1
- package/lib/map/client/mixins/mixin.weacast.js +6 -4
- package/lib/map/client/mixins/mixin.weacast.js.map +1 -1
- package/lib/map/client/pixi-utils.js +9 -0
- package/lib/map/client/pixi-utils.js.map +1 -1
- package/lib/map/client/readers/index.js +42 -0
- package/lib/map/client/readers/index.js.map +1 -0
- package/lib/map/client/readers/reader.geojson.js +59 -0
- package/lib/map/client/readers/reader.geojson.js.map +1 -0
- package/lib/map/client/readers/reader.gpx.js +41 -0
- package/lib/map/client/readers/reader.gpx.js.map +1 -0
- package/lib/map/client/readers/reader.kml.js +41 -0
- package/lib/map/client/readers/reader.kml.js.map +1 -0
- package/lib/map/client/utils.js +52 -1
- package/lib/map/client/utils.js.map +1 -1
- package/lib/map/common/wfs-utils.js +1 -1
- package/lib/map/common/wfs-utils.js.map +1 -1
- package/lib/map/common/wmts-utils.js +31 -7
- package/lib/map/common/wmts-utils.js.map +1 -1
- package/lib/test/client/core/account.js +100 -0
- package/lib/test/client/core/account.js.map +1 -0
- package/lib/test/client/core/api.js +400 -0
- package/lib/test/client/core/api.js.map +1 -0
- package/lib/test/client/core/collection.js +109 -0
- package/lib/test/client/core/collection.js.map +1 -0
- package/lib/test/client/core/index.js +90 -0
- package/lib/test/client/core/index.js.map +1 -0
- package/lib/test/client/core/layout.js +221 -0
- package/lib/test/client/core/layout.js.map +1 -0
- package/lib/test/client/core/runner.js +203 -0
- package/lib/test/client/core/runner.js.map +1 -0
- package/lib/test/client/core/screens.js +68 -0
- package/lib/test/client/core/screens.js.map +1 -0
- package/lib/test/client/core/utils.js +304 -0
- package/lib/test/client/core/utils.js.map +1 -0
- package/lib/test/client/index.js +20 -0
- package/lib/test/client/index.js.map +1 -0
- package/lib/test/client/map/catalog.js +192 -0
- package/lib/test/client/map/catalog.js.map +1 -0
- package/lib/test/client/map/controls.js +54 -0
- package/lib/test/client/map/controls.js.map +1 -0
- package/lib/test/client/map/index.js +30 -0
- package/lib/test/client/map/index.js.map +1 -0
- package/package.json +18 -9
- package/test.client.js +1 -0
- package/tests/core/test-log-2021-09-02.log +47 -0
- package/tests/map/test-log-%DATE%.logYYYY-09-DD +6 -0
- package/tests/map/test-log-2021-09-02.log +3 -0
- package/.nyc_output/5baea3f8-cf8e-4c76-8ccf-0e48b6f16fa4.json +0 -1
- package/.nyc_output/dddde6b5-9024-4b0e-8d8b-4502d437b8a4.json +0 -1
- package/.nyc_output/ef5e94ba-9a99-4fb6-ab1d-1a974112bb83.json +0 -1
- package/.nyc_output/fd4681f8-5f41-4f17-b393-9f399b24c128.json +0 -1
- package/.nyc_output/processinfo/0d403586-0c7c-4336-94d1-a49e9f02a905.json +0 -1
- package/.nyc_output/processinfo/21dd57bd-48c5-41c8-8800-252db32a9366.json +0 -1
- package/.nyc_output/processinfo/3eb3a2ca-53c2-4551-ba6b-adf70f9a53cd.json +0 -1
- package/.nyc_output/processinfo/5baea3f8-cf8e-4c76-8ccf-0e48b6f16fa4.json +0 -1
- package/.nyc_output/processinfo/dddde6b5-9024-4b0e-8d8b-4502d437b8a4.json +0 -1
- package/.nyc_output/processinfo/ef5e94ba-9a99-4fb6-ab1d-1a974112bb83.json +0 -1
- package/.nyc_output/processinfo/fd4681f8-5f41-4f17-b393-9f399b24c128.json +0 -1
- package/extras/testcafe/Dockerfile +0 -48
- package/extras/testcafe/docker-entrypoint.sh +0 -27
- package/extras/testcafe/page-models/core/account.js +0 -75
- package/extras/testcafe/page-models/core/base-collection.js +0 -41
- package/extras/testcafe/page-models/core/base-page.js +0 -25
- package/extras/testcafe/page-models/core/groups.js +0 -36
- package/extras/testcafe/page-models/core/index.js +0 -140
- package/extras/testcafe/page-models/core/layout.js +0 -145
- package/extras/testcafe/page-models/core/members.js +0 -98
- package/extras/testcafe/page-models/core/organisations.js +0 -76
- package/extras/testcafe/page-models/core/screens.js +0 -99
- package/extras/testcafe/page-models/core/tags.js +0 -21
- package/extras/testcafe/page-models/map/add-layer.js +0 -51
- package/extras/testcafe/page-models/map/catalog.js +0 -132
- package/extras/testcafe/page-models/map/index.js +0 -36
- package/extras/testcafe/page-models/map/map-activity.js +0 -42
- package/extras/testcafe/page-models/map/timeline.js +0 -67
- package/lib/core/client/components/frame/KLabel.vue +0 -56
- package/lib/core/client/components/team/KTagsPane.vue +0 -35
- package/lib/map/client/leaflet/TiledMapillaryLayer.js +0 -137
- package/lib/map/client/leaflet/TiledMapillaryLayer.js.map +0 -1
- package/lib/map/client/mixins/mixin.time.js +0 -73
- package/lib/map/client/mixins/mixin.time.js.map +0 -1
- package/tests/core/account.test.js +0 -423
- package/tests/core/client.test.js.skip +0 -37
- package/tests/core/config/default.js +0 -96
- package/tests/core/config/email-templates/confirmInvitation/html.ejs +0 -18
- package/tests/core/config/email-templates/identityChange/html.ejs +0 -12
- package/tests/core/config/email-templates/newDevice/html.ejs +0 -7
- package/tests/core/config/email-templates/passwordChange/html.ejs +0 -5
- package/tests/core/config/email-templates/resendVerifySignup/html.ejs +0 -10
- package/tests/core/config/email-templates/resetPwd/html.ejs +0 -5
- package/tests/core/config/email-templates/sendResetPwd/html.ejs +0 -8
- package/tests/core/config/email-templates/verifySignup/html.ejs +0 -3
- package/tests/core/data/10k_most_common_passwords.txt +0 -10000
- package/tests/core/data/logo.png +0 -0
- package/tests/core/hooks.test.js +0 -175
- package/tests/core/index.test.js +0 -432
- package/tests/core/notifications.test.js +0 -465
- package/tests/core/storage.test.js +0 -134
- package/tests/core/team.test.js +0 -610
- package/tests/core/utils.js +0 -62
- package/tests/map/alerts.test.js +0 -554
- package/tests/map/config/default.js +0 -112
- package/tests/map/config/layers.json +0 -37
- package/tests/map/daptiles.test.js +0 -41
- package/tests/map/data/DescribeCoverage.xml +0 -55
- package/tests/map/data/GetCoverage.tif +0 -0
- package/tests/map/data/adsb.observations.json +0 -132
- package/tests/map/data/dataset.grb.das +0 -55
- package/tests/map/data/dataset.grb.dds +0 -17
- package/tests/map/data/dataset.grb.dods +0 -0
- package/tests/map/data/lat_lon_bounds.grb.dods +0 -0
- package/tests/map/data/subdataset.grb.dods +0 -0
- package/tests/map/data/vigicrues.observations.json +0 -47042
- package/tests/map/data/vigicrues.stations.json +0 -15422
- package/tests/map/data/zones.json +0 -1228
- package/tests/map/forecast-data/gfs-world/u-wind/2021-07-15_12-00-00_2021-07-15_12-00-00.grib +0 -0
- package/tests/map/forecast-data/gfs-world/v-wind/2021-07-15_12-00-00_2021-07-15_12-00-00.grib +0 -0
- package/tests/map/grid-sources.test.js +0 -304
- package/tests/map/hooks.test.js +0 -96
- package/tests/map/index.test.js +0 -333
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>0/273</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>0/129</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>0/39</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>0/255</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
57
|
</div>
|
|
58
|
-
<div class='status-line
|
|
58
|
+
<div class='status-line low'></div>
|
|
59
59
|
<pre><table class="coverage">
|
|
60
60
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
61
61
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -548,31 +548,31 @@
|
|
|
548
548
|
<a name='L489'></a><a href='#L489'>489</a>
|
|
549
549
|
<a name='L490'></a><a href='#L490'>490</a>
|
|
550
550
|
<a name='L491'></a><a href='#L491'>491</a>
|
|
551
|
-
<a name='L492'></a><a href='#L492'>492</a></td><td class="line-coverage quiet"><span class="cline-any cline-
|
|
552
|
-
<span class="cline-any cline-yes">1x</span>
|
|
553
|
-
<span class="cline-any cline-yes">1x</span>
|
|
554
|
-
<span class="cline-any cline-yes">1x</span>
|
|
555
|
-
<span class="cline-any cline-yes">1x</span>
|
|
556
|
-
<span class="cline-any cline-yes">1x</span>
|
|
557
|
-
<span class="cline-any cline-yes">1x</span>
|
|
558
|
-
<span class="cline-any cline-yes">1x</span>
|
|
559
|
-
<span class="cline-any cline-yes">1x</span>
|
|
560
|
-
<span class="cline-any cline-yes">1x</span>
|
|
561
|
-
<span class="cline-any cline-yes">1x</span>
|
|
562
|
-
<span class="cline-any cline-yes">1x</span>
|
|
563
|
-
<span class="cline-any cline-yes">1x</span>
|
|
564
|
-
<span class="cline-any cline-yes">1x</span>
|
|
565
|
-
<span class="cline-any cline-yes">1x</span>
|
|
566
|
-
<span class="cline-any cline-yes">1x</span>
|
|
567
|
-
<span class="cline-any cline-yes">1x</span>
|
|
568
|
-
<span class="cline-any cline-yes">1x</span>
|
|
569
|
-
<span class="cline-any cline-yes">1x</span>
|
|
570
|
-
<span class="cline-any cline-yes">1x</span>
|
|
571
|
-
<span class="cline-any cline-yes">1x</span>
|
|
572
|
-
<span class="cline-any cline-yes">1x</span>
|
|
551
|
+
<a name='L492'></a><a href='#L492'>492</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
573
552
|
<span class="cline-any cline-neutral"> </span>
|
|
574
|
-
<span class="cline-any cline-
|
|
575
|
-
<span class="cline-any cline-
|
|
553
|
+
<span class="cline-any cline-neutral"> </span>
|
|
554
|
+
<span class="cline-any cline-neutral"> </span>
|
|
555
|
+
<span class="cline-any cline-neutral"> </span>
|
|
556
|
+
<span class="cline-any cline-neutral"> </span>
|
|
557
|
+
<span class="cline-any cline-neutral"> </span>
|
|
558
|
+
<span class="cline-any cline-neutral"> </span>
|
|
559
|
+
<span class="cline-any cline-neutral"> </span>
|
|
560
|
+
<span class="cline-any cline-neutral"> </span>
|
|
561
|
+
<span class="cline-any cline-neutral"> </span>
|
|
562
|
+
<span class="cline-any cline-neutral"> </span>
|
|
563
|
+
<span class="cline-any cline-neutral"> </span>
|
|
564
|
+
<span class="cline-any cline-neutral"> </span>
|
|
565
|
+
<span class="cline-any cline-neutral"> </span>
|
|
566
|
+
<span class="cline-any cline-neutral"> </span>
|
|
567
|
+
<span class="cline-any cline-neutral"> </span>
|
|
568
|
+
<span class="cline-any cline-neutral"> </span>
|
|
569
|
+
<span class="cline-any cline-neutral"> </span>
|
|
570
|
+
<span class="cline-any cline-neutral"> </span>
|
|
571
|
+
<span class="cline-any cline-neutral"> </span>
|
|
572
|
+
<span class="cline-any cline-neutral"> </span>
|
|
573
|
+
<span class="cline-any cline-neutral"> </span>
|
|
574
|
+
<span class="cline-any cline-no"> </span>
|
|
575
|
+
<span class="cline-any cline-no"> </span>
|
|
576
576
|
<span class="cline-any cline-neutral"> </span>
|
|
577
577
|
<span class="cline-any cline-neutral"> </span>
|
|
578
578
|
<span class="cline-any cline-no"> </span>
|
|
@@ -583,113 +583,113 @@
|
|
|
583
583
|
<span class="cline-any cline-neutral"> </span>
|
|
584
584
|
<span class="cline-any cline-neutral"> </span>
|
|
585
585
|
<span class="cline-any cline-neutral"> </span>
|
|
586
|
-
<span class="cline-any cline-
|
|
587
|
-
<span class="cline-any cline-
|
|
586
|
+
<span class="cline-any cline-no"> </span>
|
|
587
|
+
<span class="cline-any cline-no"> </span>
|
|
588
588
|
<span class="cline-any cline-neutral"> </span>
|
|
589
|
-
<span class="cline-any cline-
|
|
590
|
-
<span class="cline-any cline-
|
|
589
|
+
<span class="cline-any cline-no"> </span>
|
|
590
|
+
<span class="cline-any cline-no"> </span>
|
|
591
591
|
<span class="cline-any cline-neutral"> </span>
|
|
592
592
|
<span class="cline-any cline-neutral"> </span>
|
|
593
|
-
<span class="cline-any cline-
|
|
594
|
-
<span class="cline-any cline-
|
|
595
|
-
<span class="cline-any cline-
|
|
596
|
-
<span class="cline-any cline-
|
|
597
|
-
<span class="cline-any cline-
|
|
598
|
-
<span class="cline-any cline-
|
|
593
|
+
<span class="cline-any cline-no"> </span>
|
|
594
|
+
<span class="cline-any cline-no"> </span>
|
|
595
|
+
<span class="cline-any cline-no"> </span>
|
|
596
|
+
<span class="cline-any cline-no"> </span>
|
|
597
|
+
<span class="cline-any cline-no"> </span>
|
|
598
|
+
<span class="cline-any cline-no"> </span>
|
|
599
599
|
<span class="cline-any cline-neutral"> </span>
|
|
600
|
-
<span class="cline-any cline-
|
|
600
|
+
<span class="cline-any cline-no"> </span>
|
|
601
601
|
<span class="cline-any cline-neutral"> </span>
|
|
602
602
|
<span class="cline-any cline-neutral"> </span>
|
|
603
603
|
<span class="cline-any cline-neutral"> </span>
|
|
604
|
-
<span class="cline-any cline-
|
|
605
|
-
<span class="cline-any cline-
|
|
606
|
-
<span class="cline-any cline-
|
|
607
|
-
<span class="cline-any cline-
|
|
604
|
+
<span class="cline-any cline-no"> </span>
|
|
605
|
+
<span class="cline-any cline-no"> </span>
|
|
606
|
+
<span class="cline-any cline-no"> </span>
|
|
607
|
+
<span class="cline-any cline-no"> </span>
|
|
608
608
|
<span class="cline-any cline-neutral"> </span>
|
|
609
|
-
<span class="cline-any cline-
|
|
610
|
-
<span class="cline-any cline-
|
|
609
|
+
<span class="cline-any cline-no"> </span>
|
|
610
|
+
<span class="cline-any cline-no"> </span>
|
|
611
611
|
<span class="cline-any cline-neutral"> </span>
|
|
612
612
|
<span class="cline-any cline-no"> </span>
|
|
613
613
|
<span class="cline-any cline-neutral"> </span>
|
|
614
614
|
<span class="cline-any cline-neutral"> </span>
|
|
615
615
|
<span class="cline-any cline-neutral"> </span>
|
|
616
616
|
<span class="cline-any cline-neutral"> </span>
|
|
617
|
-
<span class="cline-any cline-
|
|
618
|
-
<span class="cline-any cline-
|
|
619
|
-
<span class="cline-any cline-
|
|
620
|
-
<span class="cline-any cline-
|
|
617
|
+
<span class="cline-any cline-no"> </span>
|
|
618
|
+
<span class="cline-any cline-no"> </span>
|
|
619
|
+
<span class="cline-any cline-no"> </span>
|
|
620
|
+
<span class="cline-any cline-no"> </span>
|
|
621
621
|
<span class="cline-any cline-no"> </span>
|
|
622
622
|
<span class="cline-any cline-neutral"> </span>
|
|
623
|
-
<span class="cline-any cline-
|
|
623
|
+
<span class="cline-any cline-no"> </span>
|
|
624
624
|
<span class="cline-any cline-neutral"> </span>
|
|
625
|
-
<span class="cline-any cline-
|
|
626
|
-
<span class="cline-any cline-
|
|
625
|
+
<span class="cline-any cline-no"> </span>
|
|
626
|
+
<span class="cline-any cline-no"> </span>
|
|
627
627
|
<span class="cline-any cline-neutral"> </span>
|
|
628
628
|
<span class="cline-any cline-no"> </span>
|
|
629
629
|
<span class="cline-any cline-neutral"> </span>
|
|
630
630
|
<span class="cline-any cline-neutral"> </span>
|
|
631
631
|
<span class="cline-any cline-neutral"> </span>
|
|
632
632
|
<span class="cline-any cline-neutral"> </span>
|
|
633
|
-
<span class="cline-any cline-
|
|
633
|
+
<span class="cline-any cline-no"> </span>
|
|
634
634
|
<span class="cline-any cline-neutral"> </span>
|
|
635
635
|
<span class="cline-any cline-neutral"> </span>
|
|
636
636
|
<span class="cline-any cline-neutral"> </span>
|
|
637
|
-
<span class="cline-any cline-
|
|
637
|
+
<span class="cline-any cline-no"> </span>
|
|
638
638
|
<span class="cline-any cline-neutral"> </span>
|
|
639
|
-
<span class="cline-any cline-
|
|
639
|
+
<span class="cline-any cline-no"> </span>
|
|
640
640
|
<span class="cline-any cline-neutral"> </span>
|
|
641
|
-
<span class="cline-any cline-
|
|
641
|
+
<span class="cline-any cline-no"> </span>
|
|
642
642
|
<span class="cline-any cline-no"> </span>
|
|
643
643
|
<span class="cline-any cline-neutral"> </span>
|
|
644
|
-
<span class="cline-any cline-
|
|
644
|
+
<span class="cline-any cline-no"> </span>
|
|
645
645
|
<span class="cline-any cline-neutral"> </span>
|
|
646
|
-
<span class="cline-any cline-
|
|
647
|
-
<span class="cline-any cline-
|
|
646
|
+
<span class="cline-any cline-no"> </span>
|
|
647
|
+
<span class="cline-any cline-no"> </span>
|
|
648
648
|
<span class="cline-any cline-neutral"> </span>
|
|
649
649
|
<span class="cline-any cline-neutral"> </span>
|
|
650
|
-
<span class="cline-any cline-
|
|
651
|
-
<span class="cline-any cline-
|
|
650
|
+
<span class="cline-any cline-no"> </span>
|
|
651
|
+
<span class="cline-any cline-no"> </span>
|
|
652
652
|
<span class="cline-any cline-neutral"> </span>
|
|
653
653
|
<span class="cline-any cline-neutral"> </span>
|
|
654
|
-
<span class="cline-any cline-
|
|
655
|
-
<span class="cline-any cline-
|
|
654
|
+
<span class="cline-any cline-no"> </span>
|
|
655
|
+
<span class="cline-any cline-no"> </span>
|
|
656
656
|
<span class="cline-any cline-neutral"> </span>
|
|
657
657
|
<span class="cline-any cline-neutral"> </span>
|
|
658
|
-
<span class="cline-any cline-
|
|
659
|
-
<span class="cline-any cline-
|
|
658
|
+
<span class="cline-any cline-no"> </span>
|
|
659
|
+
<span class="cline-any cline-no"> </span>
|
|
660
660
|
<span class="cline-any cline-neutral"> </span>
|
|
661
|
-
<span class="cline-any cline-yes">11x</span>
|
|
662
|
-
<span class="cline-any cline-yes">9x</span>
|
|
663
|
-
<span class="cline-any cline-yes">4x</span>
|
|
664
|
-
<span class="cline-any cline-yes">4x</span>
|
|
665
661
|
<span class="cline-any cline-no"> </span>
|
|
666
|
-
<span class="cline-any cline-
|
|
667
|
-
<span class="cline-any cline-
|
|
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
668
|
<span class="cline-any cline-neutral"> </span>
|
|
669
669
|
<span class="cline-any cline-neutral"> </span>
|
|
670
670
|
<span class="cline-any cline-neutral"> </span>
|
|
671
671
|
<span class="cline-any cline-neutral"> </span>
|
|
672
|
-
<span class="cline-any cline-
|
|
672
|
+
<span class="cline-any cline-no"> </span>
|
|
673
673
|
<span class="cline-any cline-neutral"> </span>
|
|
674
|
-
<span class="cline-any cline-
|
|
675
|
-
<span class="cline-any cline-
|
|
674
|
+
<span class="cline-any cline-no"> </span>
|
|
675
|
+
<span class="cline-any cline-no"> </span>
|
|
676
676
|
<span class="cline-any cline-neutral"> </span>
|
|
677
677
|
<span class="cline-any cline-neutral"> </span>
|
|
678
678
|
<span class="cline-any cline-neutral"> </span>
|
|
679
|
-
<span class="cline-any cline-
|
|
679
|
+
<span class="cline-any cline-no"> </span>
|
|
680
680
|
<span class="cline-any cline-neutral"> </span>
|
|
681
|
-
<span class="cline-any cline-
|
|
681
|
+
<span class="cline-any cline-no"> </span>
|
|
682
682
|
<span class="cline-any cline-neutral"> </span>
|
|
683
|
-
<span class="cline-any cline-
|
|
684
|
-
<span class="cline-any cline-
|
|
685
|
-
<span class="cline-any cline-
|
|
686
|
-
<span class="cline-any cline-
|
|
687
|
-
<span class="cline-any cline-
|
|
688
|
-
<span class="cline-any cline-
|
|
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
689
|
<span class="cline-any cline-neutral"> </span>
|
|
690
690
|
<span class="cline-any cline-neutral"> </span>
|
|
691
|
-
<span class="cline-any cline-
|
|
692
|
-
<span class="cline-any cline-
|
|
691
|
+
<span class="cline-any cline-no"> </span>
|
|
692
|
+
<span class="cline-any cline-no"> </span>
|
|
693
693
|
<span class="cline-any cline-neutral"> </span>
|
|
694
694
|
<span class="cline-any cline-no"> </span>
|
|
695
695
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -698,44 +698,44 @@
|
|
|
698
698
|
<span class="cline-any cline-neutral"> </span>
|
|
699
699
|
<span class="cline-any cline-neutral"> </span>
|
|
700
700
|
<span class="cline-any cline-neutral"> </span>
|
|
701
|
-
<span class="cline-any cline-
|
|
702
|
-
<span class="cline-any cline-
|
|
703
|
-
<span class="cline-any cline-
|
|
704
|
-
<span class="cline-any cline-
|
|
705
|
-
<span class="cline-any cline-
|
|
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
706
|
<span class="cline-any cline-neutral"> </span>
|
|
707
707
|
<span class="cline-any cline-neutral"> </span>
|
|
708
|
-
<span class="cline-any cline-
|
|
708
|
+
<span class="cline-any cline-no"> </span>
|
|
709
709
|
<span class="cline-any cline-neutral"> </span>
|
|
710
|
-
<span class="cline-any cline-
|
|
711
|
-
<span class="cline-any cline-
|
|
710
|
+
<span class="cline-any cline-no"> </span>
|
|
711
|
+
<span class="cline-any cline-no"> </span>
|
|
712
712
|
<span class="cline-any cline-neutral"> </span>
|
|
713
713
|
<span class="cline-any cline-neutral"> </span>
|
|
714
|
-
<span class="cline-any cline-
|
|
714
|
+
<span class="cline-any cline-no"> </span>
|
|
715
715
|
<span class="cline-any cline-neutral"> </span>
|
|
716
716
|
<span class="cline-any cline-neutral"> </span>
|
|
717
717
|
<span class="cline-any cline-neutral"> </span>
|
|
718
|
-
<span class="cline-any cline-
|
|
718
|
+
<span class="cline-any cline-no"> </span>
|
|
719
719
|
<span class="cline-any cline-neutral"> </span>
|
|
720
|
-
<span class="cline-any cline-
|
|
721
|
-
<span class="cline-any cline-
|
|
722
|
-
<span class="cline-any cline-
|
|
720
|
+
<span class="cline-any cline-no"> </span>
|
|
721
|
+
<span class="cline-any cline-no"> </span>
|
|
722
|
+
<span class="cline-any cline-no"> </span>
|
|
723
723
|
<span class="cline-any cline-neutral"> </span>
|
|
724
|
-
<span class="cline-any cline-
|
|
724
|
+
<span class="cline-any cline-no"> </span>
|
|
725
725
|
<span class="cline-any cline-neutral"> </span>
|
|
726
|
-
<span class="cline-any cline-
|
|
726
|
+
<span class="cline-any cline-no"> </span>
|
|
727
727
|
<span class="cline-any cline-neutral"> </span>
|
|
728
|
-
<span class="cline-any cline-
|
|
729
|
-
<span class="cline-any cline-
|
|
730
|
-
<span class="cline-any cline-
|
|
728
|
+
<span class="cline-any cline-no"> </span>
|
|
729
|
+
<span class="cline-any cline-no"> </span>
|
|
730
|
+
<span class="cline-any cline-no"> </span>
|
|
731
731
|
<span class="cline-any cline-neutral"> </span>
|
|
732
|
-
<span class="cline-any cline-
|
|
733
|
-
<span class="cline-any cline-
|
|
732
|
+
<span class="cline-any cline-no"> </span>
|
|
733
|
+
<span class="cline-any cline-no"> </span>
|
|
734
734
|
<span class="cline-any cline-neutral"> </span>
|
|
735
|
-
<span class="cline-any cline-
|
|
735
|
+
<span class="cline-any cline-no"> </span>
|
|
736
736
|
<span class="cline-any cline-neutral"> </span>
|
|
737
|
-
<span class="cline-any cline-
|
|
738
|
-
<span class="cline-any cline-
|
|
737
|
+
<span class="cline-any cline-no"> </span>
|
|
738
|
+
<span class="cline-any cline-no"> </span>
|
|
739
739
|
<span class="cline-any cline-neutral"> </span>
|
|
740
740
|
<span class="cline-any cline-no"> </span>
|
|
741
741
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -743,58 +743,58 @@
|
|
|
743
743
|
<span class="cline-any cline-neutral"> </span>
|
|
744
744
|
<span class="cline-any cline-neutral"> </span>
|
|
745
745
|
<span class="cline-any cline-neutral"> </span>
|
|
746
|
-
<span class="cline-any cline-
|
|
747
|
-
<span class="cline-any cline-
|
|
748
|
-
<span class="cline-any cline-
|
|
749
|
-
<span class="cline-any cline-
|
|
750
|
-
<span class="cline-any cline-
|
|
746
|
+
<span class="cline-any cline-no"> </span>
|
|
747
|
+
<span class="cline-any cline-no"> </span>
|
|
748
|
+
<span class="cline-any cline-no"> </span>
|
|
749
|
+
<span class="cline-any cline-no"> </span>
|
|
750
|
+
<span class="cline-any cline-no"> </span>
|
|
751
751
|
<span class="cline-any cline-neutral"> </span>
|
|
752
752
|
<span class="cline-any cline-neutral"> </span>
|
|
753
|
-
<span class="cline-any cline-
|
|
754
|
-
<span class="cline-any cline-
|
|
755
|
-
<span class="cline-any cline-
|
|
756
|
-
<span class="cline-any cline-
|
|
753
|
+
<span class="cline-any cline-no"> </span>
|
|
754
|
+
<span class="cline-any cline-no"> </span>
|
|
755
|
+
<span class="cline-any cline-no"> </span>
|
|
756
|
+
<span class="cline-any cline-no"> </span>
|
|
757
757
|
<span class="cline-any cline-neutral"> </span>
|
|
758
|
-
<span class="cline-any cline-
|
|
758
|
+
<span class="cline-any cline-no"> </span>
|
|
759
759
|
<span class="cline-any cline-neutral"> </span>
|
|
760
|
-
<span class="cline-any cline-
|
|
761
|
-
<span class="cline-any cline-
|
|
760
|
+
<span class="cline-any cline-no"> </span>
|
|
761
|
+
<span class="cline-any cline-no"> </span>
|
|
762
762
|
<span class="cline-any cline-neutral"> </span>
|
|
763
763
|
<span class="cline-any cline-neutral"> </span>
|
|
764
|
-
<span class="cline-any cline-
|
|
765
|
-
<span class="cline-any cline-
|
|
764
|
+
<span class="cline-any cline-no"> </span>
|
|
765
|
+
<span class="cline-any cline-no"> </span>
|
|
766
766
|
<span class="cline-any cline-neutral"> </span>
|
|
767
|
-
<span class="cline-any cline-
|
|
767
|
+
<span class="cline-any cline-no"> </span>
|
|
768
768
|
<span class="cline-any cline-neutral"> </span>
|
|
769
769
|
<span class="cline-any cline-neutral"> </span>
|
|
770
770
|
<span class="cline-any cline-neutral"> </span>
|
|
771
|
-
<span class="cline-any cline-
|
|
772
|
-
<span class="cline-any cline-
|
|
771
|
+
<span class="cline-any cline-no"> </span>
|
|
772
|
+
<span class="cline-any cline-no"> </span>
|
|
773
773
|
<span class="cline-any cline-no"> </span>
|
|
774
774
|
<span class="cline-any cline-neutral"> </span>
|
|
775
|
-
<span class="cline-any cline-
|
|
775
|
+
<span class="cline-any cline-no"> </span>
|
|
776
776
|
<span class="cline-any cline-neutral"> </span>
|
|
777
777
|
<span class="cline-any cline-no"> </span>
|
|
778
778
|
<span class="cline-any cline-no"> </span>
|
|
779
779
|
<span class="cline-any cline-no"> </span>
|
|
780
780
|
<span class="cline-any cline-neutral"> </span>
|
|
781
781
|
<span class="cline-any cline-neutral"> </span>
|
|
782
|
-
<span class="cline-any cline-
|
|
783
|
-
<span class="cline-any cline-
|
|
784
|
-
<span class="cline-any cline-
|
|
785
|
-
<span class="cline-any cline-
|
|
786
|
-
<span class="cline-any cline-
|
|
787
|
-
<span class="cline-any cline-
|
|
782
|
+
<span class="cline-any cline-no"> </span>
|
|
783
|
+
<span class="cline-any cline-no"> </span>
|
|
784
|
+
<span class="cline-any cline-no"> </span>
|
|
785
|
+
<span class="cline-any cline-no"> </span>
|
|
786
|
+
<span class="cline-any cline-no"> </span>
|
|
787
|
+
<span class="cline-any cline-no"> </span>
|
|
788
788
|
<span class="cline-any cline-neutral"> </span>
|
|
789
|
-
<span class="cline-any cline-
|
|
790
|
-
<span class="cline-any cline-
|
|
791
|
-
<span class="cline-any cline-
|
|
789
|
+
<span class="cline-any cline-no"> </span>
|
|
790
|
+
<span class="cline-any cline-no"> </span>
|
|
791
|
+
<span class="cline-any cline-no"> </span>
|
|
792
792
|
<span class="cline-any cline-no"> </span>
|
|
793
793
|
<span class="cline-any cline-no"> </span>
|
|
794
794
|
<span class="cline-any cline-no"> </span>
|
|
795
795
|
<span class="cline-any cline-neutral"> </span>
|
|
796
796
|
<span class="cline-any cline-neutral"> </span>
|
|
797
|
-
<span class="cline-any cline-
|
|
797
|
+
<span class="cline-any cline-no"> </span>
|
|
798
798
|
<span class="cline-any cline-neutral"> </span>
|
|
799
799
|
<span class="cline-any cline-neutral"> </span>
|
|
800
800
|
<span class="cline-any cline-no"> </span>
|
|
@@ -816,36 +816,36 @@
|
|
|
816
816
|
<span class="cline-any cline-neutral"> </span>
|
|
817
817
|
<span class="cline-any cline-neutral"> </span>
|
|
818
818
|
<span class="cline-any cline-neutral"> </span>
|
|
819
|
-
<span class="cline-any cline-
|
|
819
|
+
<span class="cline-any cline-no"> </span>
|
|
820
820
|
<span class="cline-any cline-neutral"> </span>
|
|
821
821
|
<span class="cline-any cline-neutral"> </span>
|
|
822
822
|
<span class="cline-any cline-neutral"> </span>
|
|
823
|
-
<span class="cline-any cline-
|
|
823
|
+
<span class="cline-any cline-no"> </span>
|
|
824
824
|
<span class="cline-any cline-neutral"> </span>
|
|
825
825
|
<span class="cline-any cline-neutral"> </span>
|
|
826
826
|
<span class="cline-any cline-neutral"> </span>
|
|
827
|
-
<span class="cline-any cline-
|
|
828
|
-
<span class="cline-any cline-
|
|
827
|
+
<span class="cline-any cline-no"> </span>
|
|
828
|
+
<span class="cline-any cline-no"> </span>
|
|
829
829
|
<span class="cline-any cline-neutral"> </span>
|
|
830
|
-
<span class="cline-any cline-
|
|
830
|
+
<span class="cline-any cline-no"> </span>
|
|
831
831
|
<span class="cline-any cline-neutral"> </span>
|
|
832
|
-
<span class="cline-any cline-
|
|
833
|
-
<span class="cline-any cline-
|
|
832
|
+
<span class="cline-any cline-no"> </span>
|
|
833
|
+
<span class="cline-any cline-no"> </span>
|
|
834
834
|
<span class="cline-any cline-neutral"> </span>
|
|
835
835
|
<span class="cline-any cline-neutral"> </span>
|
|
836
836
|
<span class="cline-any cline-no"> </span>
|
|
837
837
|
<span class="cline-any cline-neutral"> </span>
|
|
838
838
|
<span class="cline-any cline-neutral"> </span>
|
|
839
|
-
<span class="cline-any cline-
|
|
839
|
+
<span class="cline-any cline-no"> </span>
|
|
840
840
|
<span class="cline-any cline-neutral"> </span>
|
|
841
|
-
<span class="cline-any cline-
|
|
842
|
-
<span class="cline-any cline-
|
|
841
|
+
<span class="cline-any cline-no"> </span>
|
|
842
|
+
<span class="cline-any cline-no"> </span>
|
|
843
843
|
<span class="cline-any cline-neutral"> </span>
|
|
844
|
-
<span class="cline-any cline-
|
|
845
|
-
<span class="cline-any cline-
|
|
844
|
+
<span class="cline-any cline-no"> </span>
|
|
845
|
+
<span class="cline-any cline-no"> </span>
|
|
846
846
|
<span class="cline-any cline-neutral"> </span>
|
|
847
|
-
<span class="cline-any cline-
|
|
848
|
-
<span class="cline-any cline-
|
|
847
|
+
<span class="cline-any cline-no"> </span>
|
|
848
|
+
<span class="cline-any cline-no"> </span>
|
|
849
849
|
<span class="cline-any cline-neutral"> </span>
|
|
850
850
|
<span class="cline-any cline-neutral"> </span>
|
|
851
851
|
<span class="cline-any cline-no"> </span>
|
|
@@ -854,18 +854,18 @@
|
|
|
854
854
|
<span class="cline-any cline-neutral"> </span>
|
|
855
855
|
<span class="cline-any cline-neutral"> </span>
|
|
856
856
|
<span class="cline-any cline-neutral"> </span>
|
|
857
|
-
<span class="cline-any cline-
|
|
858
|
-
<span class="cline-any cline-
|
|
859
|
-
<span class="cline-any cline-
|
|
857
|
+
<span class="cline-any cline-no"> </span>
|
|
858
|
+
<span class="cline-any cline-no"> </span>
|
|
859
|
+
<span class="cline-any cline-no"> </span>
|
|
860
860
|
<span class="cline-any cline-neutral"> </span>
|
|
861
|
-
<span class="cline-any cline-
|
|
861
|
+
<span class="cline-any cline-no"> </span>
|
|
862
862
|
<span class="cline-any cline-neutral"> </span>
|
|
863
863
|
<span class="cline-any cline-neutral"> </span>
|
|
864
|
-
<span class="cline-any cline-
|
|
865
|
-
<span class="cline-any cline-
|
|
866
|
-
<span class="cline-any cline-
|
|
864
|
+
<span class="cline-any cline-no"> </span>
|
|
865
|
+
<span class="cline-any cline-no"> </span>
|
|
866
|
+
<span class="cline-any cline-no"> </span>
|
|
867
867
|
<span class="cline-any cline-neutral"> </span>
|
|
868
|
-
<span class="cline-any cline-
|
|
868
|
+
<span class="cline-any cline-no"> </span>
|
|
869
869
|
<span class="cline-any cline-no"> </span>
|
|
870
870
|
<span class="cline-any cline-no"> </span>
|
|
871
871
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -947,54 +947,54 @@
|
|
|
947
947
|
<span class="cline-any cline-neutral"> </span>
|
|
948
948
|
<span class="cline-any cline-neutral"> </span>
|
|
949
949
|
<span class="cline-any cline-neutral"> </span>
|
|
950
|
-
<span class="cline-any cline-
|
|
950
|
+
<span class="cline-any cline-no"> </span>
|
|
951
951
|
<span class="cline-any cline-neutral"> </span>
|
|
952
952
|
<span class="cline-any cline-neutral"> </span>
|
|
953
|
-
<span class="cline-any cline-
|
|
953
|
+
<span class="cline-any cline-no"> </span>
|
|
954
954
|
<span class="cline-any cline-neutral"> </span>
|
|
955
|
-
<span class="cline-any cline-
|
|
955
|
+
<span class="cline-any cline-no"> </span>
|
|
956
956
|
<span class="cline-any cline-neutral"> </span>
|
|
957
|
-
<span class="cline-any cline-
|
|
957
|
+
<span class="cline-any cline-no"> </span>
|
|
958
958
|
<span class="cline-any cline-neutral"> </span>
|
|
959
959
|
<span class="cline-any cline-neutral"> </span>
|
|
960
|
-
<span class="cline-any cline-
|
|
960
|
+
<span class="cline-any cline-no"> </span>
|
|
961
961
|
<span class="cline-any cline-no"> </span>
|
|
962
962
|
<span class="cline-any cline-no"> </span>
|
|
963
963
|
<span class="cline-any cline-no"> </span>
|
|
964
964
|
<span class="cline-any cline-neutral"> </span>
|
|
965
965
|
<span class="cline-any cline-neutral"> </span>
|
|
966
|
-
<span class="cline-any cline-
|
|
966
|
+
<span class="cline-any cline-no"> </span>
|
|
967
967
|
<span class="cline-any cline-neutral"> </span>
|
|
968
|
-
<span class="cline-any cline-
|
|
969
|
-
<span class="cline-any cline-
|
|
970
|
-
<span class="cline-any cline-
|
|
968
|
+
<span class="cline-any cline-no"> </span>
|
|
969
|
+
<span class="cline-any cline-no"> </span>
|
|
970
|
+
<span class="cline-any cline-no"> </span>
|
|
971
971
|
<span class="cline-any cline-neutral"> </span>
|
|
972
|
-
<span class="cline-any cline-
|
|
973
|
-
<span class="cline-any cline-
|
|
972
|
+
<span class="cline-any cline-no"> </span>
|
|
973
|
+
<span class="cline-any cline-no"> </span>
|
|
974
974
|
<span class="cline-any cline-neutral"> </span>
|
|
975
|
-
<span class="cline-any cline-
|
|
975
|
+
<span class="cline-any cline-no"> </span>
|
|
976
976
|
<span class="cline-any cline-neutral"> </span>
|
|
977
977
|
<span class="cline-any cline-neutral"> </span>
|
|
978
978
|
<span class="cline-any cline-neutral"> </span>
|
|
979
|
-
<span class="cline-any cline-
|
|
979
|
+
<span class="cline-any cline-no"> </span>
|
|
980
980
|
<span class="cline-any cline-no"> </span>
|
|
981
981
|
<span class="cline-any cline-neutral"> </span>
|
|
982
982
|
<span class="cline-any cline-neutral"> </span>
|
|
983
|
-
<span class="cline-any cline-
|
|
984
|
-
<span class="cline-any cline-
|
|
983
|
+
<span class="cline-any cline-no"> </span>
|
|
984
|
+
<span class="cline-any cline-no"> </span>
|
|
985
985
|
<span class="cline-any cline-neutral"> </span>
|
|
986
986
|
<span class="cline-any cline-neutral"> </span>
|
|
987
|
-
<span class="cline-any cline-
|
|
988
|
-
<span class="cline-any cline-
|
|
987
|
+
<span class="cline-any cline-no"> </span>
|
|
988
|
+
<span class="cline-any cline-no"> </span>
|
|
989
989
|
<span class="cline-any cline-neutral"> </span>
|
|
990
990
|
<span class="cline-any cline-neutral"> </span>
|
|
991
991
|
<span class="cline-any cline-neutral"> </span>
|
|
992
|
-
<span class="cline-any cline-
|
|
993
|
-
<span class="cline-any cline-
|
|
994
|
-
<span class="cline-any cline-
|
|
992
|
+
<span class="cline-any cline-no"> </span>
|
|
993
|
+
<span class="cline-any cline-no"> </span>
|
|
994
|
+
<span class="cline-any cline-no"> </span>
|
|
995
995
|
<span class="cline-any cline-neutral"> </span>
|
|
996
|
-
<span class="cline-any cline-
|
|
997
|
-
<span class="cline-any cline-
|
|
996
|
+
<span class="cline-any cline-no"> </span>
|
|
997
|
+
<span class="cline-any cline-no"> </span>
|
|
998
998
|
<span class="cline-any cline-neutral"> </span>
|
|
999
999
|
<span class="cline-any cline-no"> </span>
|
|
1000
1000
|
<span class="cline-any cline-no"> </span>
|
|
@@ -1021,23 +1021,23 @@
|
|
|
1021
1021
|
<span class="cline-any cline-neutral"> </span>
|
|
1022
1022
|
<span class="cline-any cline-neutral"> </span>
|
|
1023
1023
|
<span class="cline-any cline-neutral"> </span>
|
|
1024
|
-
<span class="cline-any cline-
|
|
1025
|
-
<span class="cline-any cline-
|
|
1026
|
-
<span class="cline-any cline-
|
|
1027
|
-
<span class="cline-any cline-
|
|
1028
|
-
<span class="cline-any cline-
|
|
1029
|
-
<span class="cline-any cline-
|
|
1024
|
+
<span class="cline-any cline-no"> </span>
|
|
1025
|
+
<span class="cline-any cline-no"> </span>
|
|
1026
|
+
<span class="cline-any cline-no"> </span>
|
|
1027
|
+
<span class="cline-any cline-no"> </span>
|
|
1028
|
+
<span class="cline-any cline-no"> </span>
|
|
1029
|
+
<span class="cline-any cline-no"> </span>
|
|
1030
1030
|
<span class="cline-any cline-neutral"> </span>
|
|
1031
1031
|
<span class="cline-any cline-neutral"> </span>
|
|
1032
|
-
<span class="cline-any cline-
|
|
1033
|
-
<span class="cline-any cline-
|
|
1034
|
-
<span class="cline-any cline-
|
|
1035
|
-
<span class="cline-any cline-
|
|
1032
|
+
<span class="cline-any cline-no"> </span>
|
|
1033
|
+
<span class="cline-any cline-no"> </span>
|
|
1034
|
+
<span class="cline-any cline-no"> </span>
|
|
1035
|
+
<span class="cline-any cline-no"> </span>
|
|
1036
1036
|
<span class="cline-any cline-neutral"> </span>
|
|
1037
1037
|
<span class="cline-any cline-neutral"> </span>
|
|
1038
|
-
<span class="cline-any cline-
|
|
1038
|
+
<span class="cline-any cline-no"> </span>
|
|
1039
1039
|
<span class="cline-any cline-neutral"> </span>
|
|
1040
|
-
<span class="cline-any cline-
|
|
1040
|
+
<span class="cline-any cline-no"> </span>
|
|
1041
1041
|
<span class="cline-any cline-neutral"> </span>
|
|
1042
1042
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import path from 'path'
|
|
1043
1043
|
import url from 'url'
|
|
@@ -1062,331 +1062,331 @@ import { ObjectID } from 'mongodb'
|
|
|
1062
1062
|
import { Database, idToString } from './db'
|
|
1063
1063
|
import auth, { authSocket } from './authentication'
|
|
1064
1064
|
|
|
1065
|
-
const debug = makeDebug('kdk:core:application')
|
|
1066
|
-
const debugLimiter = makeDebug('kdk:core:application:limiter')
|
|
1065
|
+
const debug = <span class="cstat-no" title="statement not covered" >makeDebug('kdk:core:application')</span>
|
|
1066
|
+
const debugLimiter = <span class="cstat-no" title="statement not covered" >makeDebug('kdk:core:application:limiter')</span>
|
|
1067
1067
|
|
|
1068
|
-
function <span class="fstat-no" title="function not covered" >tooManyRequests
|
|
1069
|
-
<span class="cstat-no" title="statement not covered" > debug(
|
|
1070
|
-
const error = <span class="cstat-no" title="statement not covered" >new
|
|
1071
|
-
<span class="cstat-no" title="statement not covered" > socket.
|
|
1068
|
+
function <span class="fstat-no" title="function not covered" >tooManyRequests </span>(socket, message, key) {
|
|
1069
|
+
<span class="cstat-no" title="statement not covered" > debug(message)</span>
|
|
1070
|
+
const error = <span class="cstat-no" title="statement not covered" >new TooManyRequests(message, { translation: { key } })</span>
|
|
1071
|
+
<span class="cstat-no" title="statement not covered" > socket.emit('rate-limit', error)</span>
|
|
1072
1072
|
// Add a timeout so that error message is correctly handled
|
|
1073
|
-
<span class="cstat-no" title="statement not covered" > setTimeout(<span class="fstat-no" title="function not covered" >(</span>
|
|
1073
|
+
<span class="cstat-no" title="statement not covered" > setTimeout(<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >socket.disconnect(true),</span> 3000)</span>
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
1076
|
-
export function declareService (path, app, service, middlewares = {}) {
|
|
1077
|
-
const feathersPath = app.get('apiPath') + '/' + path
|
|
1078
|
-
const feathersService = app.service(feathersPath)
|
|
1076
|
+
export function <span class="fstat-no" title="function not covered" >declareService </span>(path, app, service, middlewares = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> {
|
|
1077
|
+
const feathersPath = <span class="cstat-no" title="statement not covered" >app.get('apiPath') + '/' + path</span>
|
|
1078
|
+
const feathersService = <span class="cstat-no" title="statement not covered" >app.service(feathersPath)</span>
|
|
1079
1079
|
// Some internal Feathers service might internally declare the service
|
|
1080
|
-
if (feathersService) {
|
|
1081
|
-
return feathersService
|
|
1080
|
+
<span class="cstat-no" title="statement not covered" > if (feathersService) {</span>
|
|
1081
|
+
<span class="cstat-no" title="statement not covered" > return feathersService</span>
|
|
1082
1082
|
}
|
|
1083
1083
|
// Initialize our service by providing any middleware as well
|
|
1084
|
-
let args = [feathersPath]
|
|
1085
|
-
if (middlewares.before) args = args.concat(middlewares.before)
|
|
1086
|
-
args.push(service)
|
|
1087
|
-
|
|
1088
|
-
app.use.apply(app, args)
|
|
1089
|
-
debug('Service declared on path ' + feathersPath)
|
|
1084
|
+
let args = <span class="cstat-no" title="statement not covered" >[feathersPath]</span>
|
|
1085
|
+
<span class="cstat-no" title="statement not covered" > if (middlewares.before) <span class="cstat-no" title="statement not covered" >args = args.concat(middlewares.before)</span></span>
|
|
1086
|
+
<span class="cstat-no" title="statement not covered" > args.push(service)</span>
|
|
1087
|
+
<span class="cstat-no" title="statement not covered" > if (middlewares.after) <span class="cstat-no" title="statement not covered" >args = args.concat(middlewares.after)</span></span>
|
|
1088
|
+
<span class="cstat-no" title="statement not covered" > app.use.apply(app, args)</span>
|
|
1089
|
+
<span class="cstat-no" title="statement not covered" > debug('Service declared on path ' + feathersPath)</span>
|
|
1090
1090
|
// Return the Feathers service, ie base service + Feathers' internals
|
|
1091
|
-
return app.service(feathersPath)
|
|
1091
|
+
<span class="cstat-no" title="statement not covered" > return app.service(feathersPath)</span>
|
|
1092
1092
|
}
|
|
1093
1093
|
|
|
1094
|
-
export function configureService (name, service, servicesPath) {
|
|
1095
|
-
try {
|
|
1096
|
-
const hooks = require(path.join(servicesPath, name, name + '.hooks'))
|
|
1097
|
-
service.hooks(hooks)
|
|
1098
|
-
debug(name + ' service hooks configured on path ' + servicesPath)
|
|
1094
|
+
export function <span class="fstat-no" title="function not covered" >configureService </span>(name, service, servicesPath) {
|
|
1095
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
1096
|
+
const hooks = <span class="cstat-no" title="statement not covered" >require(path.join(servicesPath, name, name + '.hooks'))</span>
|
|
1097
|
+
<span class="cstat-no" title="statement not covered" > service.hooks(hooks)</span>
|
|
1098
|
+
<span class="cstat-no" title="statement not covered" > debug(name + ' service hooks configured on path ' + servicesPath)</span>
|
|
1099
1099
|
} catch (error) {
|
|
1100
|
-
debug('No ' + name + ' service hooks configured on path ' + servicesPath)
|
|
1101
|
-
|
|
1100
|
+
<span class="cstat-no" title="statement not covered" > debug('No ' + name + ' service hooks configured on path ' + servicesPath)</span>
|
|
1101
|
+
<span class="cstat-no" title="statement not covered" > if (error.code !== 'MODULE_NOT_FOUND') {</span>
|
|
1102
1102
|
// Log error in this case as this might be linked to a syntax error in required file
|
|
1103
|
-
<span class="cstat-no" title="statement not covered" > debug(
|
|
1103
|
+
<span class="cstat-no" title="statement not covered" > debug(error)</span>
|
|
1104
1104
|
}
|
|
1105
1105
|
// As this is optionnal this require has to fail silently
|
|
1106
1106
|
}
|
|
1107
1107
|
|
|
1108
|
-
try {
|
|
1109
|
-
const channels = require(path.join(servicesPath, name, name + '.channels'))
|
|
1110
|
-
_.forOwn(channels, (
|
|
1111
|
-
|
|
1112
|
-
else <span class="cstat-no" title="statement not covered" >service.
|
|
1108
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
1109
|
+
const channels = <span class="cstat-no" title="statement not covered" >require(path.join(servicesPath, name, name + '.channels'))</span>
|
|
1110
|
+
<span class="cstat-no" title="statement not covered" > _.forOwn(channels, <span class="fstat-no" title="function not covered" >(p</span>ublisher, event) => {</span>
|
|
1111
|
+
<span class="cstat-no" title="statement not covered" > if (event === 'all') <span class="cstat-no" title="statement not covered" >service.publish(publisher)</span></span>
|
|
1112
|
+
else <span class="cstat-no" title="statement not covered" >service.publish(event, publisher)</span>
|
|
1113
1113
|
})
|
|
1114
|
-
debug(name + ' service channels configured on path ' + servicesPath)
|
|
1114
|
+
<span class="cstat-no" title="statement not covered" > debug(name + ' service channels configured on path ' + servicesPath)</span>
|
|
1115
1115
|
} catch (error) {
|
|
1116
|
-
debug('No ' + name + ' service channels configured on path ' + servicesPath)
|
|
1117
|
-
|
|
1116
|
+
<span class="cstat-no" title="statement not covered" > debug('No ' + name + ' service channels configured on path ' + servicesPath)</span>
|
|
1117
|
+
<span class="cstat-no" title="statement not covered" > if (error.code !== 'MODULE_NOT_FOUND') {</span>
|
|
1118
1118
|
// Log error in this case as this might be linked to a syntax error in required file
|
|
1119
|
-
<span class="cstat-no" title="statement not covered" > debug(
|
|
1119
|
+
<span class="cstat-no" title="statement not covered" > debug(error)</span>
|
|
1120
1120
|
}
|
|
1121
1121
|
// As this is optionnal this require has to fail silently
|
|
1122
1122
|
}
|
|
1123
1123
|
|
|
1124
|
-
return service
|
|
1124
|
+
<span class="cstat-no" title="statement not covered" > return service</span>
|
|
1125
1125
|
}
|
|
1126
1126
|
|
|
1127
|
-
export function createProxyService (options) {
|
|
1128
|
-
const targetService = options.service
|
|
1129
|
-
function proxyParams (params) {
|
|
1130
|
-
if (options.params) {
|
|
1127
|
+
export function <span class="fstat-no" title="function not covered" >createProxyService </span>(options) {
|
|
1128
|
+
const targetService = <span class="cstat-no" title="statement not covered" >options.service</span>
|
|
1129
|
+
function <span class="fstat-no" title="function not covered" >proxyParams </span>(params) {
|
|
1130
|
+
<span class="cstat-no" title="statement not covered" > if (options.params) {</span>
|
|
1131
1131
|
let proxiedParams
|
|
1132
|
-
|
|
1133
|
-
<span class="cstat-no" title="statement not covered" > proxiedParams =
|
|
1132
|
+
<span class="cstat-no" title="statement not covered" > if (typeof options.params === 'function') {</span>
|
|
1133
|
+
<span class="cstat-no" title="statement not covered" > proxiedParams = options.params(params)</span>
|
|
1134
1134
|
} else {
|
|
1135
|
-
proxiedParams = _.merge(params, options.params)
|
|
1135
|
+
<span class="cstat-no" title="statement not covered" > proxiedParams = _.merge(params, options.params)</span>
|
|
1136
1136
|
}
|
|
1137
|
-
return proxiedParams
|
|
1138
|
-
} else return params
|
|
1137
|
+
<span class="cstat-no" title="statement not covered" > return proxiedParams</span>
|
|
1138
|
+
} else <span class="cstat-no" title="statement not covered" >return params</span>
|
|
1139
1139
|
}
|
|
1140
|
-
function proxyId (id) {
|
|
1141
|
-
if (options.id) return options.id(id)
|
|
1142
|
-
else return id
|
|
1140
|
+
function <span class="fstat-no" title="function not covered" >proxyId </span>(id) {
|
|
1141
|
+
<span class="cstat-no" title="statement not covered" > if (options.id) <span class="cstat-no" title="statement not covered" >return options.id(id)</span></span>
|
|
1142
|
+
else <span class="cstat-no" title="statement not covered" >return id</span>
|
|
1143
1143
|
}
|
|
1144
|
-
function proxyData (data) {
|
|
1145
|
-
if (options.data) return options.data(data)
|
|
1146
|
-
else return data
|
|
1144
|
+
function <span class="fstat-no" title="function not covered" >proxyData </span>(data) {
|
|
1145
|
+
<span class="cstat-no" title="statement not covered" > if (options.data) <span class="cstat-no" title="statement not covered" >return options.data(data)</span></span>
|
|
1146
|
+
else <span class="cstat-no" title="statement not covered" >return data</span>
|
|
1147
1147
|
}
|
|
1148
|
-
function proxyResult (data) {
|
|
1149
|
-
if (options.result) return options.result(data)
|
|
1150
|
-
else return data
|
|
1148
|
+
function <span class="fstat-no" title="function not covered" >proxyResult </span>(data) {
|
|
1149
|
+
<span class="cstat-no" title="statement not covered" > if (options.result) <span class="cstat-no" title="statement not covered" >return options.result(data)</span></span>
|
|
1150
|
+
else <span class="cstat-no" title="statement not covered" >return data</span>
|
|
1151
1151
|
}
|
|
1152
|
-
return {
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1152
|
+
<span class="cstat-no" title="statement not covered" > return {</span>
|
|
1153
|
+
<span class="fstat-no" title="function not covered" > as</span>ync find (params) { <span class="cstat-no" title="statement not covered" >return proxyResult(await targetService.find(proxyParams(params))) </span>},
|
|
1154
|
+
<span class="fstat-no" title="function not covered" > as</span>ync get (id, params) { <span class="cstat-no" title="statement not covered" >return proxyResult(await targetService.get(proxyId(id), proxyParams(params))) </span>},
|
|
1155
|
+
<span class="fstat-no" title="function not covered" > as</span>ync create (data, params) { <span class="cstat-no" title="statement not covered" >return proxyResult(await targetService.create(proxyData(data), proxyParams(params))) </span>},
|
|
1156
|
+
<span class="fstat-no" title="function not covered" > as</span>ync update (id, data, params) { <span class="cstat-no" title="statement not covered" >return proxyResult(await targetService.update(proxyId(id), proxyData(data), proxyParams(params))) </span>},
|
|
1157
|
+
<span class="fstat-no" title="function not covered" > as</span>ync patch (id, data, params) { <span class="cstat-no" title="statement not covered" >return proxyResult(await targetService.patch(proxyId(id), proxyData(data), proxyParams(params))) </span>},
|
|
1158
|
+
<span class="fstat-no" title="function not covered" > as</span>ync remove (id, params) { <span class="cstat-no" title="statement not covered" >return proxyResult(await targetService.remove(proxyId(id), proxyParams(params))) </span>}
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
1161
|
|
|
1162
|
-
export function createService (name, app, options = <span class="branch-0 cbranch-no" title="branch not covered" >{})
|
|
1163
|
-
const createFeathersService = require('feathers-' + app.db.adapter)
|
|
1162
|
+
export function <span class="fstat-no" title="function not covered" >createService </span>(name, app, options = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> {
|
|
1163
|
+
const createFeathersService = <span class="cstat-no" title="statement not covered" >require('feathers-' + app.db.adapter)</span>
|
|
1164
1164
|
|
|
1165
|
-
const paginate = app.get('paginate')
|
|
1166
|
-
const serviceOptions = Object.assign({
|
|
1165
|
+
const paginate = <span class="cstat-no" title="statement not covered" >app.get('paginate')</span>
|
|
1166
|
+
const serviceOptions = <span class="cstat-no" title="statement not covered" >Object.assign({</span>
|
|
1167
1167
|
name: name,
|
|
1168
1168
|
paginate
|
|
1169
1169
|
}, options)
|
|
1170
|
-
|
|
1170
|
+
<span class="cstat-no" title="statement not covered" > if (serviceOptions.disabled) <span class="cstat-no" title="statement not covered" >return undefined</span></span>
|
|
1171
1171
|
// For DB services a model has to be provided
|
|
1172
|
-
const fileName = serviceOptions.fileName || name
|
|
1172
|
+
const fileName = <span class="cstat-no" title="statement not covered" >serviceOptions.fileName || name</span>
|
|
1173
1173
|
|
|
1174
|
-
let dbService = false
|
|
1175
|
-
try {
|
|
1176
|
-
if (serviceOptions.modelsPath) {
|
|
1177
|
-
const configureModel = require(path.join(serviceOptions.modelsPath, fileName + '.model.' + app.db.adapter))
|
|
1178
|
-
configureModel(app, serviceOptions)
|
|
1179
|
-
dbService = true
|
|
1174
|
+
let dbService = <span class="cstat-no" title="statement not covered" >false</span>
|
|
1175
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
1176
|
+
<span class="cstat-no" title="statement not covered" > if (serviceOptions.modelsPath) {</span>
|
|
1177
|
+
const configureModel = <span class="cstat-no" title="statement not covered" >require(path.join(serviceOptions.modelsPath, fileName + '.model.' + app.db.adapter))</span>
|
|
1178
|
+
<span class="cstat-no" title="statement not covered" > configureModel(app, serviceOptions)</span>
|
|
1179
|
+
<span class="cstat-no" title="statement not covered" > dbService = true</span>
|
|
1180
1180
|
}
|
|
1181
1181
|
} catch (error) {
|
|
1182
|
-
debug('No ' + fileName + ' service model configured on path ' + serviceOptions.modelsPath)
|
|
1183
|
-
|
|
1182
|
+
<span class="cstat-no" title="statement not covered" > debug('No ' + fileName + ' service model configured on path ' + serviceOptions.modelsPath)</span>
|
|
1183
|
+
<span class="cstat-no" title="statement not covered" > if (error.code !== 'MODULE_NOT_FOUND') {</span>
|
|
1184
1184
|
// Log error in this case as this might be linked to a syntax error in required file
|
|
1185
|
-
<span class="cstat-no" title="statement not covered" > debug(
|
|
1185
|
+
<span class="cstat-no" title="statement not covered" > debug(error)</span>
|
|
1186
1186
|
}
|
|
1187
1187
|
// As this is optionnal this require has to fail silently
|
|
1188
1188
|
}
|
|
1189
1189
|
|
|
1190
1190
|
// Initialize our service with any options it requires
|
|
1191
1191
|
let service
|
|
1192
|
-
if (dbService) {
|
|
1193
|
-
service = createFeathersService(serviceOptions)
|
|
1194
|
-
dbService = service
|
|
1195
|
-
} else if (serviceOptions.proxy) {
|
|
1196
|
-
service = createProxyService(serviceOptions.proxy)
|
|
1192
|
+
<span class="cstat-no" title="statement not covered" > if (dbService) {</span>
|
|
1193
|
+
<span class="cstat-no" title="statement not covered" > service = createFeathersService(serviceOptions)</span>
|
|
1194
|
+
<span class="cstat-no" title="statement not covered" > dbService = service</span>
|
|
1195
|
+
} else <span class="cstat-no" title="statement not covered" >if (serviceOptions.proxy) {</span>
|
|
1196
|
+
<span class="cstat-no" title="statement not covered" > service = createProxyService(serviceOptions.proxy)</span>
|
|
1197
1197
|
} else {
|
|
1198
1198
|
// Otherwise we expect the service to be provided as a Feathers service interface
|
|
1199
|
-
service = require(path.join(serviceOptions.servicesPath, fileName, fileName + '.service'))
|
|
1199
|
+
<span class="cstat-no" title="statement not covered" > service = require(path.join(serviceOptions.servicesPath, fileName, fileName + '.service'))</span>
|
|
1200
1200
|
// If we get a function try to call it assuming it will return the service object
|
|
1201
|
-
if (typeof service === 'function') {
|
|
1202
|
-
service = service(name, app, serviceOptions)
|
|
1201
|
+
<span class="cstat-no" title="statement not covered" > if (typeof service === 'function') {</span>
|
|
1202
|
+
<span class="cstat-no" title="statement not covered" > service = service(name, app, serviceOptions)</span>
|
|
1203
1203
|
}
|
|
1204
1204
|
// Need to set this manually for services not using class inheritance or default adapters
|
|
1205
|
-
if (serviceOptions.events) service.events = serviceOptions.events
|
|
1205
|
+
<span class="cstat-no" title="statement not covered" > if (serviceOptions.events) <span class="cstat-no" title="statement not covered" >service.events = serviceOptions.events</span></span>
|
|
1206
1206
|
}
|
|
1207
1207
|
|
|
1208
1208
|
// Get our initialized service so that we can register hooks and filters
|
|
1209
|
-
let servicePath = serviceOptions.path || name
|
|
1209
|
+
let servicePath = <span class="cstat-no" title="statement not covered" >serviceOptions.path || name</span>
|
|
1210
1210
|
let contextId
|
|
1211
|
-
if (serviceOptions.context) {
|
|
1212
|
-
contextId = idToString(serviceOptions.context)
|
|
1213
|
-
servicePath = contextId + '/' + servicePath
|
|
1211
|
+
<span class="cstat-no" title="statement not covered" > if (serviceOptions.context) {</span>
|
|
1212
|
+
<span class="cstat-no" title="statement not covered" > contextId = idToString(serviceOptions.context)</span>
|
|
1213
|
+
<span class="cstat-no" title="statement not covered" > servicePath = contextId + '/' + servicePath</span>
|
|
1214
1214
|
}
|
|
1215
|
-
service = declareService(servicePath, app, service, serviceOptions.middlewares)
|
|
1215
|
+
<span class="cstat-no" title="statement not covered" > service = declareService(servicePath, app, service, serviceOptions.middlewares)</span>
|
|
1216
1216
|
// Register hooks and event filters
|
|
1217
|
-
service = configureService(fileName, service, serviceOptions.servicesPath)
|
|
1217
|
+
<span class="cstat-no" title="statement not covered" > service = configureService(fileName, service, serviceOptions.servicesPath)</span>
|
|
1218
1218
|
// Optionnally a specific service mixin can be provided, apply it
|
|
1219
|
-
if (dbService && serviceOptions.servicesPath) {
|
|
1220
|
-
try {
|
|
1221
|
-
let serviceMixin = require(path.join(serviceOptions.servicesPath, fileName, fileName + '.service'))
|
|
1219
|
+
<span class="cstat-no" title="statement not covered" > if (dbService && serviceOptions.servicesPath) {</span>
|
|
1220
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
1221
|
+
let serviceMixin = <span class="cstat-no" title="statement not covered" >require(path.join(serviceOptions.servicesPath, fileName, fileName + '.service'))</span>
|
|
1222
1222
|
// If we get a function try to call it assuming it will return the mixin object
|
|
1223
|
-
|
|
1224
|
-
serviceMixin = serviceMixin.bind(dbService)(fileName, app, serviceOptions)
|
|
1223
|
+
<span class="cstat-no" title="statement not covered" > if (typeof serviceMixin === 'function') {</span>
|
|
1224
|
+
<span class="cstat-no" title="statement not covered" > serviceMixin = serviceMixin.bind(dbService)(fileName, app, serviceOptions)</span>
|
|
1225
1225
|
}
|
|
1226
|
-
service.mixin(serviceMixin)
|
|
1226
|
+
<span class="cstat-no" title="statement not covered" > service.mixin(serviceMixin)</span>
|
|
1227
1227
|
} catch (error) {
|
|
1228
|
-
debug('No ' + fileName + ' service mixin configured on path ' + serviceOptions.servicesPath)
|
|
1229
|
-
|
|
1228
|
+
<span class="cstat-no" title="statement not covered" > debug('No ' + fileName + ' service mixin configured on path ' + serviceOptions.servicesPath)</span>
|
|
1229
|
+
<span class="cstat-no" title="statement not covered" > if (error.code !== 'MODULE_NOT_FOUND') {</span>
|
|
1230
1230
|
// Log error in this case as this might be linked to a syntax error in required file
|
|
1231
|
-
<span class="cstat-no" title="statement not covered" > debug(
|
|
1231
|
+
<span class="cstat-no" title="statement not covered" > debug(error)</span>
|
|
1232
1232
|
}
|
|
1233
1233
|
// As this is optionnal this require has to fail silently
|
|
1234
1234
|
}
|
|
1235
1235
|
}
|
|
1236
1236
|
// Then configuration
|
|
1237
|
-
service.name = name
|
|
1238
|
-
service.app = app
|
|
1239
|
-
service.options = serviceOptions
|
|
1240
|
-
service.path = servicePath
|
|
1241
|
-
service.context = serviceOptions.context
|
|
1237
|
+
<span class="cstat-no" title="statement not covered" > service.name = name</span>
|
|
1238
|
+
<span class="cstat-no" title="statement not covered" > service.app = app</span>
|
|
1239
|
+
<span class="cstat-no" title="statement not covered" > service.options = serviceOptions</span>
|
|
1240
|
+
<span class="cstat-no" title="statement not covered" > service.path = servicePath</span>
|
|
1241
|
+
<span class="cstat-no" title="statement not covered" > service.context = serviceOptions.context</span>
|
|
1242
1242
|
|
|
1243
1243
|
// Add some utility functions
|
|
1244
|
-
service.getPath = function (withApiPrefix) {
|
|
1245
|
-
let path = service.path
|
|
1246
|
-
if (withApiPrefix) {
|
|
1247
|
-
path = app.get('apiPath') + '/' + path
|
|
1244
|
+
<span class="cstat-no" title="statement not covered" > service.getPath = <span class="fstat-no" title="function not covered" >fu</span>nction (withApiPrefix) {</span>
|
|
1245
|
+
let path = <span class="cstat-no" title="statement not covered" >service.path</span>
|
|
1246
|
+
<span class="cstat-no" title="statement not covered" > if (withApiPrefix) {</span>
|
|
1247
|
+
<span class="cstat-no" title="statement not covered" > path = app.get('apiPath') + '/' + path</span>
|
|
1248
1248
|
}
|
|
1249
|
-
return path
|
|
1249
|
+
<span class="cstat-no" title="statement not covered" > return path</span>
|
|
1250
1250
|
}
|
|
1251
|
-
service.getContextId = function () {
|
|
1252
|
-
return contextId
|
|
1251
|
+
<span class="cstat-no" title="statement not covered" > service.getContextId = <span class="fstat-no" title="function not covered" >fu</span>nction () {</span>
|
|
1252
|
+
<span class="cstat-no" title="statement not covered" > return contextId </span>// As string
|
|
1253
1253
|
}
|
|
1254
1254
|
|
|
1255
|
-
debug(service.name + ' service registration completed')
|
|
1256
|
-
app.emit('service', service)
|
|
1255
|
+
<span class="cstat-no" title="statement not covered" > debug(service.name + ' service registration completed')</span>
|
|
1256
|
+
<span class="cstat-no" title="statement not covered" > app.emit('service', service)</span>
|
|
1257
1257
|
|
|
1258
|
-
return service
|
|
1258
|
+
<span class="cstat-no" title="statement not covered" > return service</span>
|
|
1259
1259
|
}
|
|
1260
1260
|
|
|
1261
|
-
export function createWebhook (path, app, options = <span class="branch-0 cbranch-no" title="branch not covered" >{})
|
|
1262
|
-
let webhookPath = path
|
|
1263
|
-
|
|
1264
|
-
<span class="cstat-no" title="statement not covered" > webhookPath =
|
|
1261
|
+
export function <span class="fstat-no" title="function not covered" >createWebhook </span>(path, app, options = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> {
|
|
1262
|
+
let webhookPath = <span class="cstat-no" title="statement not covered" >path</span>
|
|
1263
|
+
<span class="cstat-no" title="statement not covered" > if (options.context) {</span>
|
|
1264
|
+
<span class="cstat-no" title="statement not covered" > webhookPath = idToString(options.context) + '/' + webhookPath</span>
|
|
1265
1265
|
}
|
|
1266
|
-
const isAllowed =
|
|
1266
|
+
const isAllowed = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(p</span>ayload) => {</span>
|
|
1267
1267
|
// Default is to expose all services/operations
|
|
1268
|
-
<span class="cstat-no" title="statement not covered" > if (!options.filter) <span class="cstat-no" title="statement not covered" >return
|
|
1269
|
-
const result = <span class="cstat-no" title="statement not covered" >[
|
|
1270
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
1268
|
+
<span class="cstat-no" title="statement not covered" > if (!options.filter) <span class="cstat-no" title="statement not covered" >return true</span></span>
|
|
1269
|
+
const result = <span class="cstat-no" title="statement not covered" >[payload].filter(sift(options.filter))</span>
|
|
1270
|
+
<span class="cstat-no" title="statement not covered" > return result.length > 0</span>
|
|
1271
1271
|
}
|
|
1272
1272
|
|
|
1273
|
-
app.post(app.get('apiPath') + '/webhooks/' + webhookPath,
|
|
1274
|
-
const payload = req.body
|
|
1275
|
-
const config = app.get('authentication')
|
|
1276
|
-
res.set('Content-Type', 'application/json')
|
|
1277
|
-
const params = {}
|
|
1278
|
-
try {
|
|
1273
|
+
<span class="cstat-no" title="statement not covered" > app.post(app.get('apiPath') + '/webhooks/' + webhookPath, <span class="fstat-no" title="function not covered" >as</span>ync (req, res, next) => {</span>
|
|
1274
|
+
const payload = <span class="cstat-no" title="statement not covered" >req.body</span>
|
|
1275
|
+
const config = <span class="cstat-no" title="statement not covered" >app.get('authentication')</span>
|
|
1276
|
+
<span class="cstat-no" title="statement not covered" > res.set('Content-Type', 'application/json')</span>
|
|
1277
|
+
const params = <span class="cstat-no" title="statement not covered" >{}</span>
|
|
1278
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
1279
1279
|
// Authenticate when required
|
|
1280
|
-
|
|
1281
|
-
try {
|
|
1282
|
-
const tokenPayload = await app.passport.verifyJWT(payload.accessToken, config)
|
|
1280
|
+
<span class="cstat-no" title="statement not covered" > if (config) {</span>
|
|
1281
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
1282
|
+
const tokenPayload = <span class="cstat-no" title="statement not covered" >await app.passport.verifyJWT(payload.accessToken, config)</span>
|
|
1283
1283
|
<span class="cstat-no" title="statement not covered" > if (tokenPayload.userId) {</span>
|
|
1284
|
-
<span class="cstat-no" title="statement not covered" > params.
|
|
1285
|
-
<span class="cstat-no" title="statement not covered" > params.
|
|
1284
|
+
<span class="cstat-no" title="statement not covered" > params.user = await app.getService('users').get(tokenPayload.userId)</span>
|
|
1285
|
+
<span class="cstat-no" title="statement not covered" > params.checkAuthorisation = true</span>
|
|
1286
1286
|
}
|
|
1287
1287
|
} catch (error) {
|
|
1288
|
-
throw new Forbidden('Could not verify webhook')
|
|
1288
|
+
<span class="cstat-no" title="statement not covered" > throw new Forbidden('Could not verify webhook')</span>
|
|
1289
1289
|
}
|
|
1290
1290
|
}
|
|
1291
|
-
<span class="cstat-no" title="statement not covered" > if (!isAllowed(payload)) <span class="cstat-no" title="statement not covered" >throw
|
|
1292
|
-
const service = <span class="cstat-no" title="statement not covered" >app.
|
|
1293
|
-
<span class="cstat-no" title="statement not covered" > if (!service) <span class="cstat-no" title="statement not covered" >throw
|
|
1291
|
+
<span class="cstat-no" title="statement not covered" > if (!isAllowed(payload)) <span class="cstat-no" title="statement not covered" >throw new Forbidden('Service not allowed for webhook')</span></span>
|
|
1292
|
+
const service = <span class="cstat-no" title="statement not covered" >app.getService(payload.service, options.context || payload.context)</span>
|
|
1293
|
+
<span class="cstat-no" title="statement not covered" > if (!service) <span class="cstat-no" title="statement not covered" >throw new BadRequest('Service could not be found')</span></span>
|
|
1294
1294
|
const args = <span class="cstat-no" title="statement not covered" >[]</span>
|
|
1295
1295
|
// Update/Patch/Remove
|
|
1296
|
-
<span class="cstat-no" title="statement not covered" > if (_.has(payload, 'id')) <span class="cstat-no" title="statement not covered" >args.
|
|
1296
|
+
<span class="cstat-no" title="statement not covered" > if (_.has(payload, 'id')) <span class="cstat-no" title="statement not covered" >args.push(_.get(payload, 'id'))</span></span>
|
|
1297
1297
|
// Create/Update/Patch
|
|
1298
|
-
<span class="cstat-no" title="statement not covered" > if (_.has(payload, 'data')) <span class="cstat-no" title="statement not covered" >args.
|
|
1298
|
+
<span class="cstat-no" title="statement not covered" > if (_.has(payload, 'data')) <span class="cstat-no" title="statement not covered" >args.push(_.get(payload, 'data'))</span></span>
|
|
1299
1299
|
// Params
|
|
1300
|
-
<span class="cstat-no" title="statement not covered" > args.
|
|
1300
|
+
<span class="cstat-no" title="statement not covered" > args.push(params)</span>
|
|
1301
1301
|
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
1302
|
-
const result = <span class="cstat-no" title="statement not covered" >await service[
|
|
1302
|
+
const result = <span class="cstat-no" title="statement not covered" >await service[payload.operation].apply(service, args)</span>
|
|
1303
1303
|
// Send back result
|
|
1304
|
-
<span class="cstat-no" title="statement not covered" > res.
|
|
1304
|
+
<span class="cstat-no" title="statement not covered" > res.json(result)</span>
|
|
1305
1305
|
} catch (error) {
|
|
1306
|
-
<span class="cstat-no" title="statement not covered" > throw
|
|
1306
|
+
<span class="cstat-no" title="statement not covered" > throw new BadRequest('Service operation could not be performed')</span>
|
|
1307
1307
|
}
|
|
1308
1308
|
} catch (error) {
|
|
1309
1309
|
// Send back error
|
|
1310
|
-
res.status(error.code).json(error.toJSON())
|
|
1310
|
+
<span class="cstat-no" title="statement not covered" > res.status(error.code).json(error.toJSON())</span>
|
|
1311
1311
|
}
|
|
1312
1312
|
})
|
|
1313
1313
|
|
|
1314
|
-
debug(`Webhook ${webhookPath} registration completed`)
|
|
1314
|
+
<span class="cstat-no" title="statement not covered" > debug(`Webhook ${webhookPath} registration completed`)</span>
|
|
1315
1315
|
}
|
|
1316
1316
|
|
|
1317
|
-
function setupLogger (app) {
|
|
1318
|
-
debug('Setup application loggers')
|
|
1319
|
-
const logsConfig = app.get('logs')
|
|
1317
|
+
function <span class="fstat-no" title="function not covered" >setupLogger </span>(app) {
|
|
1318
|
+
<span class="cstat-no" title="statement not covered" > debug('Setup application loggers')</span>
|
|
1319
|
+
const logsConfig = <span class="cstat-no" title="statement not covered" >app.get('logs')</span>
|
|
1320
1320
|
// Use winston default logger
|
|
1321
|
-
app.logger = logger
|
|
1321
|
+
<span class="cstat-no" title="statement not covered" > app.logger = logger</span>
|
|
1322
1322
|
// Remove winston defaults
|
|
1323
|
-
try {
|
|
1324
|
-
logger.clear()
|
|
1323
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
1324
|
+
<span class="cstat-no" title="statement not covered" > logger.clear()</span>
|
|
1325
1325
|
} catch (error) {
|
|
1326
1326
|
// Logger might be down, use console
|
|
1327
|
-
<span class="cstat-no" title="statement not covered" > console.
|
|
1327
|
+
<span class="cstat-no" title="statement not covered" > console.error('Could not remove default logger transport(s)', error)</span>
|
|
1328
1328
|
}
|
|
1329
1329
|
// We have one entry per log type
|
|
1330
|
-
const logsTypes =
|
|
1330
|
+
const logsTypes = <span class="cstat-no" title="statement not covered" >logsConfig ? Object.getOwnPropertyNames(logsConfig) : []</span>
|
|
1331
1331
|
// Create corresponding winston transports with options
|
|
1332
|
-
logsTypes.forEach(
|
|
1333
|
-
const options = logsConfig[logType]
|
|
1332
|
+
<span class="cstat-no" title="statement not covered" > logsTypes.forEach(<span class="fstat-no" title="function not covered" >lo</span>gType => {</span>
|
|
1333
|
+
const options = <span class="cstat-no" title="statement not covered" >logsConfig[logType]</span>
|
|
1334
1334
|
// Setup default log level if not defined
|
|
1335
|
-
if (!options.level) {
|
|
1336
|
-
options.level = (process.env.NODE_ENV === 'development' ?
|
|
1335
|
+
<span class="cstat-no" title="statement not covered" > if (!options.level) {</span>
|
|
1336
|
+
<span class="cstat-no" title="statement not covered" > options.level = (process.env.NODE_ENV === 'development' ? 'debug' : 'info')</span>
|
|
1337
1337
|
}
|
|
1338
|
-
try {
|
|
1339
|
-
logger.add(new logger.transports[logType](options))
|
|
1338
|
+
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
1339
|
+
<span class="cstat-no" title="statement not covered" > logger.add(new logger.transports[logType](options))</span>
|
|
1340
1340
|
} catch (error) {
|
|
1341
1341
|
// Logger might be down, use console
|
|
1342
|
-
<span class="cstat-no" title="statement not covered" > console.
|
|
1342
|
+
<span class="cstat-no" title="statement not covered" > console.error('Could not setup default log levels', error)</span>
|
|
1343
1343
|
}
|
|
1344
1344
|
})
|
|
1345
1345
|
}
|
|
1346
1346
|
|
|
1347
|
-
function setupSockets (app) {
|
|
1348
|
-
const apiLimiter = app.get('apiLimiter')
|
|
1349
|
-
const connections = {}
|
|
1350
|
-
let nbConnections = 0
|
|
1347
|
+
function <span class="fstat-no" title="function not covered" >setupSockets </span>(app) {
|
|
1348
|
+
const apiLimiter = <span class="cstat-no" title="statement not covered" >app.get('apiLimiter')</span>
|
|
1349
|
+
const connections = <span class="cstat-no" title="statement not covered" >{}</span>
|
|
1350
|
+
let nbConnections = <span class="cstat-no" title="statement not covered" >0</span>
|
|
1351
1351
|
|
|
1352
|
-
return io => {
|
|
1352
|
+
<span class="cstat-no" title="statement not covered" > return <span class="fstat-no" title="function not covered" >io</span> => {</span>
|
|
1353
1353
|
// By default EventEmitters will print a warning if more than 10 listeners are added for a particular event.
|
|
1354
1354
|
// The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.
|
|
1355
|
-
io.sockets.setMaxListeners(0)
|
|
1356
|
-
const maxConnections = _.get(apiLimiter, 'websocket.maxConcurrency', 0)
|
|
1357
|
-
const maxIpConnections = _.get(apiLimiter, 'websocket.concurrency', 0)
|
|
1355
|
+
<span class="cstat-no" title="statement not covered" > io.sockets.setMaxListeners(0)</span>
|
|
1356
|
+
const maxConnections = <span class="cstat-no" title="statement not covered" >_.get(apiLimiter, 'websocket.maxConcurrency', 0)</span>
|
|
1357
|
+
const maxIpConnections = <span class="cstat-no" title="statement not covered" >_.get(apiLimiter, 'websocket.concurrency', 0)</span>
|
|
1358
1358
|
|
|
1359
|
-
io.on('connection', <span class="fstat-no" title="function not covered" >
|
|
1359
|
+
<span class="cstat-no" title="statement not covered" > io.on('connection', <span class="fstat-no" title="function not covered" >so</span>cket => {</span>
|
|
1360
1360
|
<span class="cstat-no" title="statement not covered" > nbConnections++</span>
|
|
1361
|
-
<span class="cstat-no" title="statement not covered" > debug(`
|
|
1361
|
+
<span class="cstat-no" title="statement not covered" > debug(`New socket connection on server with pid ${process.pid}`, socket.id, socket.conn.remoteAddress, nbConnections)</span>
|
|
1362
1362
|
// Setup disconnect handler first
|
|
1363
|
-
<span class="cstat-no" title="statement not covered" > socket.
|
|
1363
|
+
<span class="cstat-no" title="statement not covered" > socket.on('disconnect', <span class="fstat-no" title="function not covered" >(r</span>eason) => {</span>
|
|
1364
1364
|
<span class="cstat-no" title="statement not covered" > nbConnections--</span>
|
|
1365
|
-
<span class="cstat-no" title="statement not covered" > debug(
|
|
1366
|
-
<span class="cstat-no" title="statement not covered" > debug(`
|
|
1365
|
+
<span class="cstat-no" title="statement not covered" > debug(reason)</span>
|
|
1366
|
+
<span class="cstat-no" title="statement not covered" > debug(`Socket disconnection on server with pid ${process.pid}`, socket.id, socket.conn.remoteAddress, nbConnections)</span>
|
|
1367
1367
|
<span class="cstat-no" title="statement not covered" > if (maxIpConnections > 0) {</span>
|
|
1368
1368
|
const nbIpConnections = <span class="cstat-no" title="statement not covered" >_.get(connections, socket.conn.remoteAddress) - 1</span>
|
|
1369
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
1370
|
-
<span class="cstat-no" title="statement not covered" > _.
|
|
1369
|
+
<span class="cstat-no" title="statement not covered" > debug('Total number of connections for', socket.id, socket.conn.remoteAddress, nbIpConnections)</span>
|
|
1370
|
+
<span class="cstat-no" title="statement not covered" > _.set(connections, socket.conn.remoteAddress, nbIpConnections)</span>
|
|
1371
1371
|
}
|
|
1372
1372
|
})
|
|
1373
1373
|
<span class="cstat-no" title="statement not covered" > if (maxConnections > 0) {</span>
|
|
1374
1374
|
<span class="cstat-no" title="statement not covered" > if (nbConnections > maxConnections) {</span>
|
|
1375
|
-
<span class="cstat-no" title="statement not covered" > tooManyRequests(
|
|
1375
|
+
<span class="cstat-no" title="statement not covered" > tooManyRequests(socket, 'Too many concurrent connections (rate limiting)', 'RATE_LIMITING_CONCURRENCY')</span>
|
|
1376
1376
|
<span class="cstat-no" title="statement not covered" > return</span>
|
|
1377
1377
|
}
|
|
1378
1378
|
}
|
|
1379
1379
|
<span class="cstat-no" title="statement not covered" > if (maxIpConnections > 0) {</span>
|
|
1380
1380
|
<span class="cstat-no" title="statement not covered" > if (_.has(connections, socket.conn.remoteAddress)) {</span>
|
|
1381
1381
|
const nbIpConnections = <span class="cstat-no" title="statement not covered" >_.get(connections, socket.conn.remoteAddress) + 1</span>
|
|
1382
|
-
<span class="cstat-no" title="statement not covered" > debug('
|
|
1383
|
-
<span class="cstat-no" title="statement not covered" > _.
|
|
1382
|
+
<span class="cstat-no" title="statement not covered" > debug('Total number of connections for', socket.id, socket.conn.remoteAddress, nbConnections)</span>
|
|
1383
|
+
<span class="cstat-no" title="statement not covered" > _.set(connections, socket.conn.remoteAddress, nbIpConnections)</span>
|
|
1384
1384
|
<span class="cstat-no" title="statement not covered" > if (nbIpConnections > maxIpConnections) {</span>
|
|
1385
|
-
<span class="cstat-no" title="statement not covered" > tooManyRequests(
|
|
1385
|
+
<span class="cstat-no" title="statement not covered" > tooManyRequests(socket, 'Too many concurrent connections (rate limiting)', 'RATE_LIMITING_CONCURRENCY')</span>
|
|
1386
1386
|
<span class="cstat-no" title="statement not covered" > return</span>
|
|
1387
1387
|
}
|
|
1388
1388
|
} else {
|
|
1389
|
-
<span class="cstat-no" title="statement not covered" > _.
|
|
1389
|
+
<span class="cstat-no" title="statement not covered" > _.set(connections, socket.conn.remoteAddress, 1)</span>
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
1392
|
/* For debug purpose: trace all data received
|
|
@@ -1398,24 +1398,24 @@ function setupSockets (app) {
|
|
|
1398
1398
|
<span class="cstat-no" title="statement not covered" > if (apiLimiter && apiLimiter.websocket) {</span>
|
|
1399
1399
|
const { tokensPerInterval, interval } = <span class="cstat-no" title="statement not covered" >apiLimiter.websocket</span>
|
|
1400
1400
|
// Function used to filter whitelisted services, defaults to none
|
|
1401
|
-
const services = <span class="cstat-no" title="statement not covered" >_.
|
|
1402
|
-
<span class="cstat-no" title="statement not covered" > socket.
|
|
1403
|
-
<span class="cstat-no" title="statement not covered" > socket.
|
|
1401
|
+
const services = <span class="cstat-no" title="statement not covered" >_.get(apiLimiter.websocket, 'services', <span class="fstat-no" title="function not covered" >(s</span>ervice) => <span class="cstat-no" title="statement not covered" >false)</span></span>
|
|
1402
|
+
<span class="cstat-no" title="statement not covered" > socket.socketLimiter = new SocketLimiter(tokensPerInterval, interval)</span>
|
|
1403
|
+
<span class="cstat-no" title="statement not covered" > socket.use(<span class="fstat-no" title="function not covered" >(p</span>acket, next) => {</span>
|
|
1404
1404
|
<span class="cstat-no" title="statement not covered" > if (packet.length > 0) {</span>
|
|
1405
1405
|
// Packets are formatted according to service interface,
|
|
1406
1406
|
// e.g. like [service_method, service_path, id or data, params]
|
|
1407
1407
|
// Bypass rate limiting on whitelist
|
|
1408
1408
|
<span class="cstat-no" title="statement not covered" > if ((packet.length > 1) && (typeof packet[1] === 'string')) {</span>
|
|
1409
|
-
const service = <span class="cstat-no" title="statement not covered" >app.
|
|
1409
|
+
const service = <span class="cstat-no" title="statement not covered" >app.service(packet[1])</span>
|
|
1410
1410
|
<span class="cstat-no" title="statement not covered" > if (service && services(service)) {</span>
|
|
1411
|
-
<span class="cstat-no" title="statement not covered" > debugLimiter('
|
|
1411
|
+
<span class="cstat-no" title="statement not covered" > debugLimiter('By-pass rate limiting on whitelisted service operation', socket.id, socket.conn.remoteAddress, packet[0], packet[1])</span>
|
|
1412
1412
|
<span class="cstat-no" title="statement not covered" > next()</span>
|
|
1413
1413
|
<span class="cstat-no" title="statement not covered" > return</span>
|
|
1414
1414
|
}
|
|
1415
1415
|
}
|
|
1416
|
-
<span class="cstat-no" title="statement not covered" > debugLimiter(
|
|
1416
|
+
<span class="cstat-no" title="statement not covered" > debugLimiter(socket.socketLimiter.getTokensRemaining() + ' remaining API token for socket', socket.id, socket.conn.remoteAddress)</span>
|
|
1417
1417
|
<span class="cstat-no" title="statement not covered" > if (!socket.socketLimiter.tryRemoveTokens(1)) { // if exceeded</span>
|
|
1418
|
-
<span class="cstat-no" title="statement not covered" > tooManyRequests(
|
|
1418
|
+
<span class="cstat-no" title="statement not covered" > tooManyRequests(socket, 'Too many requests in a given amount of time (rate limiting)', 'RATE_LIMITING')</span>
|
|
1419
1419
|
// FIXME: calling this causes a client timeout
|
|
1420
1420
|
// next(error)
|
|
1421
1421
|
// Need to normalize the error object as JSON
|
|
@@ -1432,103 +1432,103 @@ function setupSockets (app) {
|
|
|
1432
1432
|
})
|
|
1433
1433
|
}
|
|
1434
1434
|
|
|
1435
|
-
<span class="cstat-no" title="statement not covered" > authSocket(
|
|
1435
|
+
<span class="cstat-no" title="statement not covered" > authSocket(app, socket)</span>
|
|
1436
1436
|
})
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
1439
|
|
|
1440
|
-
export function kalisio () {
|
|
1441
|
-
const app = express(feathers())
|
|
1440
|
+
export function <span class="fstat-no" title="function not covered" >kalisio </span>() {
|
|
1441
|
+
const app = <span class="cstat-no" title="statement not covered" >express(feathers())</span>
|
|
1442
1442
|
// By default EventEmitters will print a warning if more than 10 listeners are added for a particular event.
|
|
1443
1443
|
// The value can be set to Infinity (or 0) to indicate an unlimited number of listeners.
|
|
1444
|
-
app.setMaxListeners(0)
|
|
1444
|
+
<span class="cstat-no" title="statement not covered" > app.setMaxListeners(0)</span>
|
|
1445
1445
|
// Load app configuration first
|
|
1446
|
-
app.configure(configuration())
|
|
1446
|
+
<span class="cstat-no" title="statement not covered" > app.configure(configuration())</span>
|
|
1447
1447
|
// Then setup logger
|
|
1448
|
-
setupLogger(app)
|
|
1448
|
+
<span class="cstat-no" title="statement not covered" > setupLogger(app)</span>
|
|
1449
1449
|
|
|
1450
1450
|
// This retrieve corresponding service options from app config if any
|
|
1451
|
-
app.getServiceOptions = <span class="fstat-no" title="function not covered" >
|
|
1452
|
-
const services = <span class="cstat-no" title="statement not covered" >app.
|
|
1453
|
-
<span class="cstat-no" title="statement not covered" > if (!services) <span class="cstat-no" title="statement not covered" >return {</span></span>
|
|
1454
|
-
<span class="cstat-no" title="statement not covered" > return _
|
|
1451
|
+
<span class="cstat-no" title="statement not covered" > app.getServiceOptions = <span class="fstat-no" title="function not covered" >fu</span>nction (name) {</span>
|
|
1452
|
+
const services = <span class="cstat-no" title="statement not covered" >app.get('services')</span>
|
|
1453
|
+
<span class="cstat-no" title="statement not covered" > if (!services) <span class="cstat-no" title="statement not covered" >return {}</span></span>
|
|
1454
|
+
<span class="cstat-no" title="statement not covered" > return _.get(services, name, {})</span>
|
|
1455
1455
|
}
|
|
1456
1456
|
// This avoid managing the API path before each service name
|
|
1457
|
-
app.getService = function (path, context) {
|
|
1457
|
+
<span class="cstat-no" title="statement not covered" > app.getService = <span class="fstat-no" title="function not covered" >fu</span>nction (path, context) {</span>
|
|
1458
1458
|
// Context is given as string ID
|
|
1459
|
-
if (context && typeof context === 'string') {
|
|
1460
|
-
return app.service(app.get('apiPath') + '/' + context + '/' + path)
|
|
1461
|
-
} else if (context && typeof context === 'object') {
|
|
1459
|
+
<span class="cstat-no" title="statement not covered" > if (context && typeof context === 'string') {</span>
|
|
1460
|
+
<span class="cstat-no" title="statement not covered" > return app.service(app.get('apiPath') + '/' + context + '/' + path)</span>
|
|
1461
|
+
} else <span class="cstat-no" title="statement not covered" >if (context && typeof context === 'object') {</span>
|
|
1462
1462
|
// Could be Object ID or raw object
|
|
1463
|
-
if (ObjectID.isValid(context)) return app.service(app.get('apiPath') + '/' + context.toString() + '/' + path)
|
|
1464
|
-
else return app.service(app.get('apiPath') + '/' + context._id.toString() + '/' + path)
|
|
1463
|
+
<span class="cstat-no" title="statement not covered" > if (ObjectID.isValid(context)) <span class="cstat-no" title="statement not covered" >return app.service(app.get('apiPath') + '/' + context.toString() + '/' + path)</span></span>
|
|
1464
|
+
else <span class="cstat-no" title="statement not covered" >return app.service(app.get('apiPath') + '/' + context._id.toString() + '/' + path)</span>
|
|
1465
1465
|
} else {
|
|
1466
|
-
return app.service(app.get('apiPath') + '/' + path)
|
|
1466
|
+
<span class="cstat-no" title="statement not covered" > return app.service(app.get('apiPath') + '/' + path)</span>
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
1469
1469
|
// This is used to add hooks/filters to services
|
|
1470
|
-
app.configureService = <span class="fstat-no" title="function not covered" >
|
|
1471
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
1470
|
+
<span class="cstat-no" title="statement not covered" > app.configureService = <span class="fstat-no" title="function not covered" >fu</span>nction (name, service, servicesPath) {</span>
|
|
1471
|
+
<span class="cstat-no" title="statement not covered" > return configureService(name, service, servicesPath)</span>
|
|
1472
1472
|
}
|
|
1473
1473
|
// This is used to create standard services
|
|
1474
|
-
app.createService = function (name, options) {
|
|
1475
|
-
return createService(name, app, options)
|
|
1474
|
+
<span class="cstat-no" title="statement not covered" > app.createService = <span class="fstat-no" title="function not covered" >fu</span>nction (name, options) {</span>
|
|
1475
|
+
<span class="cstat-no" title="statement not covered" > return createService(name, app, options)</span>
|
|
1476
1476
|
}
|
|
1477
1477
|
// This is used to create webhooks
|
|
1478
|
-
app.createWebhook = function (path, options) {
|
|
1479
|
-
return createWebhook(path, app, options)
|
|
1478
|
+
<span class="cstat-no" title="statement not covered" > app.createWebhook = <span class="fstat-no" title="function not covered" >fu</span>nction (path, options) {</span>
|
|
1479
|
+
<span class="cstat-no" title="statement not covered" > return createWebhook(path, app, options)</span>
|
|
1480
1480
|
}
|
|
1481
1481
|
// Override Feathers configure that do not manage async operations,
|
|
1482
1482
|
// here we also simply call the function given as parameter but await for it
|
|
1483
|
-
app.configure =
|
|
1484
|
-
await fn.call(this, this)
|
|
1485
|
-
return this
|
|
1483
|
+
<span class="cstat-no" title="statement not covered" > app.configure = <span class="fstat-no" title="function not covered" >as</span>ync function (fn) {</span>
|
|
1484
|
+
<span class="cstat-no" title="statement not covered" > await fn.call(this, this)</span>
|
|
1485
|
+
<span class="cstat-no" title="statement not covered" > return this</span>
|
|
1486
1486
|
}
|
|
1487
|
-
const apiLimiter = app.get('apiLimiter')
|
|
1488
|
-
|
|
1487
|
+
const apiLimiter = <span class="cstat-no" title="statement not covered" >app.get('apiLimiter')</span>
|
|
1488
|
+
<span class="cstat-no" title="statement not covered" > if (apiLimiter && apiLimiter.http) {</span>
|
|
1489
1489
|
// Function used to filter whitelisted services, defaults to none
|
|
1490
|
-
const services = <span class="cstat-no" title="statement not covered" >_.
|
|
1490
|
+
const services = <span class="cstat-no" title="statement not covered" >_.get(apiLimiter.http, 'services', <span class="fstat-no" title="function not covered" >(s</span>ervice) => <span class="cstat-no" title="statement not covered" >false)</span></span>
|
|
1491
1491
|
const handler = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(r</span>eq, res, next) => {</span>
|
|
1492
1492
|
// Bypass rate limiting on whitelist
|
|
1493
1493
|
let service
|
|
1494
1494
|
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
1495
|
-
const serviceUrl = <span class="cstat-no" title="statement not covered" >new
|
|
1496
|
-
<span class="cstat-no" title="statement not covered" > service =
|
|
1495
|
+
const serviceUrl = <span class="cstat-no" title="statement not covered" >new url.URL(req.originalUrl)</span>
|
|
1496
|
+
<span class="cstat-no" title="statement not covered" > service = app.service(serviceUrl.pathname)</span>
|
|
1497
1497
|
} catch (error) {
|
|
1498
|
-
<span class="cstat-no" title="statement not covered" > debugLimiter(
|
|
1498
|
+
<span class="cstat-no" title="statement not covered" > debugLimiter(error)</span>
|
|
1499
1499
|
}
|
|
1500
1500
|
<span class="cstat-no" title="statement not covered" > if (service && services(service)) {</span>
|
|
1501
|
-
<span class="cstat-no" title="statement not covered" > debugLimiter('
|
|
1501
|
+
<span class="cstat-no" title="statement not covered" > debugLimiter('By-pass rate limiting on whitelisted service operation', req.method, path)</span>
|
|
1502
1502
|
<span class="cstat-no" title="statement not covered" > next()</span>
|
|
1503
1503
|
} else {
|
|
1504
|
-
const error = <span class="cstat-no" title="statement not covered" >new
|
|
1504
|
+
const error = <span class="cstat-no" title="statement not covered" >new TooManyRequests('Too many requests in a given amount of time (rate limiting)',</span>
|
|
1505
1505
|
{ translation: { key: 'RATE_LIMITING' } })
|
|
1506
|
-
<span class="cstat-no" title="statement not covered" > res.
|
|
1507
|
-
<span class="cstat-no" title="statement not covered" > res.
|
|
1508
|
-
<span class="cstat-no" title="statement not covered" > res.
|
|
1506
|
+
<span class="cstat-no" title="statement not covered" > res.status(error.code)</span>
|
|
1507
|
+
<span class="cstat-no" title="statement not covered" > res.set('Content-Type', 'application/json')</span>
|
|
1508
|
+
<span class="cstat-no" title="statement not covered" > res.json(Object.assign({}, error.toJSON()))</span>
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
-
<span class="cstat-no" title="statement not covered" > app.
|
|
1511
|
+
<span class="cstat-no" title="statement not covered" > app.use(app.get('apiPath'), new HttpLimiter(Object.assign({ handler }, apiLimiter.http)))</span>
|
|
1512
1512
|
}
|
|
1513
1513
|
|
|
1514
1514
|
// Enable CORS, security, compression, and body parsing
|
|
1515
|
-
app.use(cors(app.get('cors')))
|
|
1516
|
-
app.use(helmet(app.get('helmet')))
|
|
1517
|
-
app.use(compress(app.get('compression')))
|
|
1518
|
-
const bodyParserConfig = app.get('bodyParser')
|
|
1519
|
-
app.use(bodyParser.json(_.get(bodyParserConfig, 'json')))
|
|
1520
|
-
app.use(bodyParser.urlencoded(Object.assign({ extended: true }, _.get(bodyParserConfig, 'urlencoded'))))
|
|
1515
|
+
<span class="cstat-no" title="statement not covered" > app.use(cors(app.get('cors')))</span>
|
|
1516
|
+
<span class="cstat-no" title="statement not covered" > app.use(helmet(app.get('helmet')))</span>
|
|
1517
|
+
<span class="cstat-no" title="statement not covered" > app.use(compress(app.get('compression')))</span>
|
|
1518
|
+
const bodyParserConfig = <span class="cstat-no" title="statement not covered" >app.get('bodyParser')</span>
|
|
1519
|
+
<span class="cstat-no" title="statement not covered" > app.use(bodyParser.json(_.get(bodyParserConfig, 'json')))</span>
|
|
1520
|
+
<span class="cstat-no" title="statement not covered" > app.use(bodyParser.urlencoded(Object.assign({ extended: true }, _.get(bodyParserConfig, 'urlencoded'))))</span>
|
|
1521
1521
|
|
|
1522
1522
|
// Set up plugins and providers
|
|
1523
|
-
app.configure(rest())
|
|
1524
|
-
const socketioConfig = app.get('socketio') || {}
|
|
1525
|
-
app.configure(socketio(Object.assign({ path: app.get('apiPath') + 'ws' }, socketioConfig), setupSockets(app)))
|
|
1526
|
-
app.configure(auth)
|
|
1523
|
+
<span class="cstat-no" title="statement not covered" > app.configure(rest())</span>
|
|
1524
|
+
const socketioConfig = <span class="cstat-no" title="statement not covered" >app.get('socketio') || {}</span>
|
|
1525
|
+
<span class="cstat-no" title="statement not covered" > app.configure(socketio(Object.assign({ path: app.get('apiPath') + 'ws' }, socketioConfig), setupSockets(app)))</span>
|
|
1526
|
+
<span class="cstat-no" title="statement not covered" > app.configure(auth)</span>
|
|
1527
1527
|
|
|
1528
1528
|
// Initialize DB
|
|
1529
|
-
app.db = Database.create(app)
|
|
1529
|
+
<span class="cstat-no" title="statement not covered" > app.db = Database.create(app)</span>
|
|
1530
1530
|
|
|
1531
|
-
return app
|
|
1531
|
+
<span class="cstat-no" title="statement not covered" > return app</span>
|
|
1532
1532
|
}
|
|
1533
1533
|
</pre></td></tr></table></pre>
|
|
1534
1534
|
|
|
@@ -1537,7 +1537,7 @@ export function kalisio () {
|
|
|
1537
1537
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1538
1538
|
Code coverage generated by
|
|
1539
1539
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
1540
|
-
at
|
|
1540
|
+
at Fri Jan 07 2022 19:29:57 GMT+0100 (GMT+01:00)
|
|
1541
1541
|
</div>
|
|
1542
1542
|
</div>
|
|
1543
1543
|
<script src="../../prettify.js"></script>
|