@kalisio/kdk 2.2.2 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +1 -0
- package/.github/workflows/main.yaml +67 -0
- package/.gitmodules +3 -0
- package/README.md +1 -2
- package/core/api/hooks/hooks.query.js +15 -2
- package/core/api/marshall.js +35 -4
- package/core/client/api.js +1 -1
- package/core/client/components/KActivity.vue +73 -0
- package/core/client/components/KContent.vue +1 -1
- package/core/client/components/KSponsor.vue +2 -13
- package/core/client/components/account/KDeleteAccountManager.vue +1 -1
- package/core/client/components/account/KPasswordManager.vue +1 -1
- package/core/client/components/action/KAction.vue +294 -0
- package/core/client/components/action/KBugReportAction.vue +37 -0
- package/core/client/components/action/index.js +7 -0
- package/core/client/components/app/KAbout.vue +16 -63
- package/core/client/components/app/KPlatform.vue +1 -1
- package/core/client/components/app/KSettings.vue +14 -14
- package/core/client/components/app/KTour.vue +6 -8
- package/core/client/components/app/KWelcome.vue +1 -1
- package/core/client/components/app/index.js +4 -0
- package/core/client/components/chart/KDataTable.vue +40 -25
- package/core/client/components/chart/KTimeSeriesChart.vue +20 -12
- package/core/client/components/collection/KCard.vue +1 -1
- package/core/client/components/collection/KCardSection.vue +3 -2
- package/core/client/components/collection/KColumn.vue +1 -1
- package/core/client/components/collection/KFilter.vue +6 -1
- package/core/client/components/document/KDocument.vue +83 -0
- package/core/client/components/document/KHtml.vue +23 -0
- package/core/client/components/document/KMarkdown.vue +37 -0
- package/core/client/components/document/index.js +9 -0
- package/core/client/components/form/KForm.vue +6 -2
- package/core/client/components/form/KSelectField.vue +1 -1
- package/core/client/components/index.js +1 -4
- package/core/client/components/input/KOptionsChooser.vue +1 -1
- package/core/client/components/layout/KFab.vue +1 -1
- package/core/client/components/layout/KPage.vue +3 -2
- package/core/client/components/layout/KWindow.vue +1 -1
- package/core/client/components/media/KColorScale.vue +16 -6
- package/core/client/components/screen/KLoginScreen.vue +1 -1
- package/core/client/components/screen/KRegisterScreen.vue +1 -1
- package/core/client/components/team/KAddMember.vue +7 -7
- package/core/client/components/team/KGroupCard.vue +1 -1
- package/core/client/components/team/KMemberFilter.vue +1 -1
- package/core/client/components/team/KTagCard.vue +1 -1
- package/core/client/components/time/KRelativeTimeRanges.vue +16 -1
- package/core/client/components/time/KTimeControl.vue +1 -0
- package/core/client/components/tool/KExportTool.vue +1 -1
- package/core/client/composables/collection.js +1 -1
- package/core/client/composables/index.js +1 -0
- package/core/client/composables/layout.js +50 -0
- package/core/client/composables/session.js +6 -0
- package/core/client/filter.js +9 -6
- package/core/client/guards.js +29 -6
- package/core/client/i18n/core_en.json +4 -1
- package/core/client/i18n/core_fr.json +8 -5
- package/core/client/i18n.js +14 -0
- package/core/client/layout.js +25 -14
- package/core/client/mixins/mixin.base-activity.js +16 -0
- package/core/client/services/index.js +27 -26
- package/core/client/services/local-settings.service.js +2 -3
- package/core/client/units.js +6 -1
- package/core/client/utils/index.js +3 -0
- package/core/client/utils/utils.actions.js +93 -0
- package/core/client/utils/utils.colors.js +1 -1
- package/core/client/utils/utils.data.js +22 -0
- package/core/client/utils/utils.shapes.js +16 -6
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/core/api/application.js.html +1870 -0
- package/coverage/core/api/authentication.js.html +742 -0
- package/coverage/core/api/db.js.html +778 -0
- package/coverage/core/api/hooks/hooks.authentication.js.html +313 -0
- package/coverage/core/api/hooks/hooks.authorisations.js.html +1243 -0
- package/coverage/core/api/hooks/hooks.groups.js.html +229 -0
- package/coverage/core/api/hooks/hooks.logger.js.html +163 -0
- package/coverage/core/api/hooks/hooks.model.js.html +955 -0
- package/coverage/core/api/hooks/hooks.organisations.js.html +541 -0
- package/coverage/core/api/hooks/hooks.push.js.html +253 -0
- package/coverage/core/api/hooks/hooks.query.js.html +862 -0
- package/coverage/core/api/hooks/hooks.schemas.js.html +304 -0
- package/coverage/core/api/hooks/hooks.service.js.html +319 -0
- package/coverage/core/api/hooks/hooks.storage.js.html +193 -0
- package/coverage/core/api/hooks/hooks.users.js.html +868 -0
- package/coverage/core/api/hooks/index.html +296 -0
- package/coverage/core/api/hooks/index.js.html +121 -0
- package/coverage/core/api/index.html +191 -0
- package/coverage/core/api/index.js.html +148 -0
- package/coverage/core/api/marshall.js.html +448 -0
- package/coverage/core/api/models/groups.model.mongodb.js.html +109 -0
- package/coverage/core/api/models/index.html +161 -0
- package/coverage/core/api/models/organisations.model.mongodb.js.html +94 -0
- package/coverage/core/api/models/tags.model.mongodb.js.html +115 -0
- package/coverage/core/api/models/users.model.mongodb.js.html +115 -0
- package/coverage/core/api/services/account/account.hooks.js.html +208 -0
- package/coverage/core/api/services/account/account.service.js.html +436 -0
- package/coverage/core/api/services/account/index.html +131 -0
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +502 -0
- package/coverage/core/api/services/authorisations/index.html +131 -0
- package/coverage/core/api/services/databases/databases.hooks.js.html +193 -0
- package/coverage/core/api/services/databases/databases.service.js.html +100 -0
- package/coverage/core/api/services/databases/index.html +131 -0
- package/coverage/core/api/services/groups/groups.hooks.js.html +178 -0
- package/coverage/core/api/services/groups/index.html +116 -0
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +184 -0
- package/coverage/core/api/services/import-export/import-export.service.js.html +118 -0
- package/coverage/core/api/services/import-export/index.html +131 -0
- package/coverage/core/api/services/index.html +116 -0
- package/coverage/core/api/services/index.js.html +499 -0
- package/coverage/core/api/services/mailer/index.html +131 -0
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +190 -0
- package/coverage/core/api/services/mailer/mailer.service.js.html +118 -0
- package/coverage/core/api/services/organisations/index.html +131 -0
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +178 -0
- package/coverage/core/api/services/organisations/organisations.service.js.html +343 -0
- package/coverage/core/api/services/push/index.html +131 -0
- package/coverage/core/api/services/push/push.hooks.js.html +190 -0
- package/coverage/core/api/services/push/push.service.js.html +121 -0
- package/coverage/core/api/services/storage/index.html +131 -0
- package/coverage/core/api/services/storage/storage.hooks.js.html +190 -0
- package/coverage/core/api/services/storage/storage.service.js.html +172 -0
- package/coverage/core/api/services/tags/index.html +116 -0
- package/coverage/core/api/services/tags/tags.hooks.js.html +178 -0
- package/coverage/core/api/services/users/index.html +116 -0
- package/coverage/core/api/services/users/users.hooks.js.html +307 -0
- package/coverage/core/api/utils.js.html +118 -0
- package/coverage/core/common/errors.js.html +88 -0
- package/coverage/core/common/index.html +176 -0
- package/coverage/core/common/index.js.html +115 -0
- package/coverage/core/common/permissions.js.html +1048 -0
- package/coverage/core/common/schema.js.html +190 -0
- package/coverage/core/common/utils.js.html +220 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +491 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/core/api/application.js.html +1870 -0
- package/coverage/lcov-report/core/api/authentication.js.html +742 -0
- package/coverage/lcov-report/core/api/db.js.html +778 -0
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +313 -0
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +1243 -0
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +229 -0
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +163 -0
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +955 -0
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +541 -0
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +253 -0
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +862 -0
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +304 -0
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +319 -0
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +193 -0
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +868 -0
- package/coverage/lcov-report/core/api/hooks/index.html +296 -0
- package/coverage/lcov-report/core/api/hooks/index.js.html +121 -0
- package/coverage/lcov-report/core/api/index.html +191 -0
- package/coverage/lcov-report/core/api/index.js.html +148 -0
- package/coverage/lcov-report/core/api/marshall.js.html +448 -0
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +109 -0
- package/coverage/lcov-report/core/api/models/index.html +161 -0
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +94 -0
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +115 -0
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +115 -0
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +208 -0
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +436 -0
- package/coverage/lcov-report/core/api/services/account/index.html +131 -0
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +184 -0
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +502 -0
- package/coverage/lcov-report/core/api/services/authorisations/index.html +131 -0
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +193 -0
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +100 -0
- package/coverage/lcov-report/core/api/services/databases/index.html +131 -0
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +178 -0
- package/coverage/lcov-report/core/api/services/groups/index.html +116 -0
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +184 -0
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +118 -0
- package/coverage/lcov-report/core/api/services/import-export/index.html +131 -0
- package/coverage/lcov-report/core/api/services/index.html +116 -0
- package/coverage/lcov-report/core/api/services/index.js.html +499 -0
- package/coverage/lcov-report/core/api/services/mailer/index.html +131 -0
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +190 -0
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +118 -0
- package/coverage/lcov-report/core/api/services/organisations/index.html +131 -0
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +178 -0
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +343 -0
- package/coverage/lcov-report/core/api/services/push/index.html +131 -0
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +190 -0
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +121 -0
- package/coverage/lcov-report/core/api/services/storage/index.html +131 -0
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +190 -0
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +172 -0
- package/coverage/lcov-report/core/api/services/tags/index.html +116 -0
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +178 -0
- package/coverage/lcov-report/core/api/services/users/index.html +116 -0
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +307 -0
- package/coverage/lcov-report/core/api/utils.js.html +118 -0
- package/coverage/lcov-report/core/common/errors.js.html +88 -0
- package/coverage/lcov-report/core/common/index.html +176 -0
- package/coverage/lcov-report/core/common/index.js.html +115 -0
- package/coverage/lcov-report/core/common/permissions.js.html +1048 -0
- package/coverage/lcov-report/core/common/schema.js.html +190 -0
- package/coverage/lcov-report/core/common/utils.js.html +220 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +491 -0
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +457 -0
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +397 -0
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +1309 -0
- package/coverage/lcov-report/map/api/hooks/index.html +161 -0
- package/coverage/lcov-report/map/api/hooks/index.js.html +94 -0
- package/coverage/lcov-report/map/api/index.html +131 -0
- package/coverage/lcov-report/map/api/index.js.html +139 -0
- package/coverage/lcov-report/map/api/marshall.js.html +178 -0
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +106 -0
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +127 -0
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +196 -0
- package/coverage/lcov-report/map/api/models/index.html +161 -0
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +109 -0
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +274 -0
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +610 -0
- package/coverage/lcov-report/map/api/services/alerts/index.html +131 -0
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +316 -0
- package/coverage/lcov-report/map/api/services/catalog/index.html +116 -0
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1510 -0
- package/coverage/lcov-report/map/api/services/daptiles/index.html +116 -0
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +241 -0
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +241 -0
- package/coverage/lcov-report/map/api/services/features/index.html +131 -0
- package/coverage/lcov-report/map/api/services/index.html +116 -0
- package/coverage/lcov-report/map/api/services/index.js.html +817 -0
- package/coverage/lcov-report/map/api/services/projects/index.html +116 -0
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +439 -0
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +466 -0
- package/coverage/lcov-report/map/common/errors.js.html +94 -0
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +541 -0
- package/coverage/lcov-report/map/common/grid.js.html +1612 -0
- package/coverage/lcov-report/map/common/index.html +371 -0
- package/coverage/lcov-report/map/common/index.js.html +172 -0
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +556 -0
- package/coverage/lcov-report/map/common/moment-utils.js.html +157 -0
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +868 -0
- package/coverage/lcov-report/map/common/opendap-utils.js.html +826 -0
- package/coverage/lcov-report/map/common/permissions.js.html +124 -0
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +418 -0
- package/coverage/lcov-report/map/common/tms-utils.js.html +274 -0
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +364 -0
- package/coverage/lcov-report/map/common/wcs-utils.js.html +586 -0
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +1033 -0
- package/coverage/lcov-report/map/common/wfs-utils.js.html +574 -0
- package/coverage/lcov-report/map/common/wms-utils.js.html +451 -0
- package/coverage/lcov-report/map/common/wmts-utils.js.html +547 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +11128 -0
- package/coverage/map/api/hooks/hooks.catalog.js.html +457 -0
- package/coverage/map/api/hooks/hooks.features.js.html +397 -0
- package/coverage/map/api/hooks/hooks.query.js.html +1309 -0
- package/coverage/map/api/hooks/index.html +161 -0
- package/coverage/map/api/hooks/index.js.html +94 -0
- package/coverage/map/api/index.html +131 -0
- package/coverage/map/api/index.js.html +139 -0
- package/coverage/map/api/marshall.js.html +178 -0
- package/coverage/map/api/models/alerts.model.mongodb.js.html +106 -0
- package/coverage/map/api/models/catalog.model.mongodb.js.html +127 -0
- package/coverage/map/api/models/features.model.mongodb.js.html +196 -0
- package/coverage/map/api/models/index.html +161 -0
- package/coverage/map/api/models/projects.model.mongodb.js.html +109 -0
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +274 -0
- package/coverage/map/api/services/alerts/alerts.service.js.html +610 -0
- package/coverage/map/api/services/alerts/index.html +131 -0
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +316 -0
- package/coverage/map/api/services/catalog/index.html +116 -0
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +1510 -0
- package/coverage/map/api/services/daptiles/index.html +116 -0
- package/coverage/map/api/services/features/features.hooks.js.html +241 -0
- package/coverage/map/api/services/features/features.service.js.html +241 -0
- package/coverage/map/api/services/features/index.html +131 -0
- package/coverage/map/api/services/index.html +116 -0
- package/coverage/map/api/services/index.js.html +817 -0
- package/coverage/map/api/services/projects/index.html +116 -0
- package/coverage/map/api/services/projects/projects.hooks.js.html +439 -0
- package/coverage/map/common/dynamic-grid-source.js.html +466 -0
- package/coverage/map/common/errors.js.html +94 -0
- package/coverage/map/common/geotiff-grid-source.js.html +541 -0
- package/coverage/map/common/grid.js.html +1612 -0
- package/coverage/map/common/index.html +371 -0
- package/coverage/map/common/index.js.html +172 -0
- package/coverage/map/common/meteo-model-grid-source.js.html +556 -0
- package/coverage/map/common/moment-utils.js.html +157 -0
- package/coverage/map/common/opendap-grid-source.js.html +868 -0
- package/coverage/map/common/opendap-utils.js.html +826 -0
- package/coverage/map/common/permissions.js.html +124 -0
- package/coverage/map/common/time-based-grid-source.js.html +418 -0
- package/coverage/map/common/tms-utils.js.html +274 -0
- package/coverage/map/common/wcs-grid-source.js.html +364 -0
- package/coverage/map/common/wcs-utils.js.html +586 -0
- package/coverage/map/common/weacast-grid-source.js.html +1033 -0
- package/coverage/map/common/wfs-utils.js.html +574 -0
- package/coverage/map/common/wms-utils.js.html +451 -0
- package/coverage/map/common/wmts-utils.js.html +547 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/coverage/tmp/coverage-137435-1719398750767-0.json +1 -0
- package/coverage/tmp/coverage-137447-1719398750752-0.json +1 -0
- package/coverage/tmp/coverage-137458-1719398750740-0.json +1 -0
- package/coverage/tmp/coverage-137470-1719398750728-0.json +1 -0
- package/coverage/tmp/coverage-137477-1719398750691-0.json +1 -0
- package/map/api/hooks/hooks.query.js +5 -2
- package/map/api/services/catalog/catalog.hooks.js +4 -5
- package/map/client/cesium/utils/index.js +2 -1
- package/map/client/cesium/utils/utils.cesium.js +8 -0
- package/map/client/cesium/utils/utils.features.js +2 -2
- package/map/client/cesium/utils/utils.style.js +19 -17
- package/map/client/components/KCompass.vue +25 -3
- package/map/client/components/KEditLayerData.vue +1 -1
- package/map/client/components/KPositionIndicator.vue +1 -1
- package/map/client/components/catalog/KConnectLayer.vue +2 -2
- package/map/client/components/catalog/KCreateView.vue +2 -2
- package/map/client/components/form/KDirectionField.vue +4 -0
- package/map/client/components/form/KOwsLayerField.vue +4 -4
- package/map/client/components/form/KOwsServiceField.vue +3 -4
- package/map/client/components/legend/KLegend.vue +13 -15
- package/map/client/components/tools/KGeolocateTool.vue +1 -1
- package/map/client/components/widget/KStackableTimeSeries.vue +3 -0
- package/map/client/composables/highlight.js +4 -1
- package/map/client/elevation-utils.js +2 -2
- package/map/client/i18n/map_en.json +3 -1
- package/map/client/i18n/map_fr.json +3 -1
- package/map/client/mixins/globe/mixin.base-globe.js +121 -80
- package/map/client/mixins/globe/mixin.file-layers.js +2 -2
- package/map/client/mixins/globe/mixin.geojson-layers.js +24 -19
- package/map/client/mixins/globe/mixin.globe-activity.js +3 -3
- package/map/client/mixins/globe/mixin.opendap-layers.js +3 -3
- package/map/client/mixins/globe/mixin.style.js +5 -5
- package/map/client/mixins/globe/mixin.tooltip.js +5 -3
- package/map/client/mixins/map/mixin.base-map.js +42 -4
- package/map/client/mixins/map/mixin.canvas-layers.js +0 -1
- package/map/client/mixins/map/mixin.geojson-layers.js +10 -5
- package/map/client/mixins/mixin.activity.js +2 -2
- package/map/client/mixins/mixin.feature-selection.js +7 -5
- package/map/client/mixins/mixin.levels.js +1 -1
- package/map/client/utils/utils.catalog.js +15 -0
- package/map/client/utils/utils.location.js +2 -1
- package/map/client/utils/utils.style.js +1 -1
- package/map/common/geotiff-grid-source.js +5 -3
- package/map/common/grid.js +2 -2
- package/map/common/meteo-model-grid-source.js +1 -1
- package/map/common/time-based-grid-source.js +1 -1
- package/map/common/wmts-utils.js +11 -11
- package/package.json +12 -8
- package/scripts/build_docs.sh +37 -0
- package/scripts/init_runner.sh +30 -0
- package/scripts/kash/.github/workflows/run_tests.yaml +33 -0
- package/scripts/kash/README.md +2 -0
- package/scripts/kash/kash.sh +1657 -0
- package/scripts/kash/scripts/run_tests.sh +151 -0
- package/scripts/run_tests.sh +48 -0
- package/scripts/setup_workspace.sh +42 -0
- package/test/api/core/hooks.test.js +31 -0
- package/test/api/core/test-log-2023-12-19.log +7 -0
- package/test/api/core/test-log-2024-01-04.log +14 -0
- package/test/api/core/test-log-2024-05-14.log +6 -0
- package/test/api/core/test-log-2024-06-06.log +23 -0
- package/test/api/core/test-log-2024-06-26.log +25 -0
- package/test/api/core/test-log-2024-06-28.log +2 -0
- package/test/api/map/grid-sources.test.js +3 -1
- package/test/api/map/hooks.test.js +58 -12
- package/test/api/map/test-log-2023-11-24.log +121 -0
- package/test/api/map/test-log-2023-12-12.log +29 -0
- package/test/api/map/test-log-2023-12-13.log +5 -0
- package/test/api/map/test-log-2024-01-04.log +2 -0
- package/test/api/map/test-log-2024-01-11.log +1 -0
- package/test/api/map/test-log-2024-01-25.log +19 -0
- package/test/api/map/test-log-2024-06-06.log +39 -0
- package/test/client/core/collection.js +2 -2
- package/test/client/core/dialogs.js +13 -0
- package/test/client/core/index.js +6 -5
- package/test/client/core/layout.js +1 -13
- package/test/client/core/runner.js +41 -20
- package/test/client/core/screens.js +6 -0
- package/test/client/core/utils.js +23 -19
- package/.travis.doc.sh +0 -8
- package/.travis.test.sh +0 -72
- package/core/client/components/KAction.vue +0 -393
- package/core/client/components/KBlock.vue +0 -67
- package/core/client/components/app/KTerms.vue +0 -41
|
@@ -159,7 +159,12 @@ export const baseMap = {
|
|
|
159
159
|
let zIndex
|
|
160
160
|
if (typeof paneOrZIndex === 'object') zIndex = paneOrZIndex.zIndex || 400
|
|
161
161
|
else if (typeof paneOrZIndex === 'number') zIndex = paneOrZIndex
|
|
162
|
-
pane
|
|
162
|
+
// Check for parent pane if any, useful for leaflet-rotate plugin
|
|
163
|
+
let container = paneOrZIndex.container
|
|
164
|
+
// Defaults to rotate pane
|
|
165
|
+
if (this.map._rotate && !container) container = 'rotatePane'
|
|
166
|
+
container = this.map.getPane(container)
|
|
167
|
+
pane = this.map.createPane(paneName, container)
|
|
163
168
|
_.set(pane, 'style.zIndex', zIndex || 400) // Defaults for overlay in Leaflet
|
|
164
169
|
}
|
|
165
170
|
this.leafletPanes[paneName] = pane
|
|
@@ -202,7 +207,9 @@ export const baseMap = {
|
|
|
202
207
|
// This is why Leaflet 1.0 introduced panes: https://leafletjs.com/reference.html#map-pane & https://leafletjs.com/examples/map-panes/
|
|
203
208
|
// By implicitely create a pane for each provided z-index makes this transparent for the user
|
|
204
209
|
let zIndex = _.has(leafletOptions, 'zIndex')
|
|
205
|
-
|
|
210
|
+
let pane = _.has(leafletOptions, 'pane')
|
|
211
|
+
// Avoid erasing any existing pane, if so the pane should have been created taken into account the layer zIndex up-front
|
|
212
|
+
if (zIndex && !pane) {
|
|
206
213
|
zIndex = _.get(leafletOptions, 'zIndex')
|
|
207
214
|
this.createLeafletPane(zIndex)
|
|
208
215
|
// Set layer to use target pane
|
|
@@ -438,6 +445,15 @@ export const baseMap = {
|
|
|
438
445
|
if (geoJson.type === 'FeatureCollection') _.forEach(geoJson.features, feature => { feature._id = uid().toString() })
|
|
439
446
|
else geoJson._id = uid().toString()
|
|
440
447
|
}
|
|
448
|
+
// Check for panes to be created
|
|
449
|
+
const panes = []
|
|
450
|
+
_.forEach(geoJson.features, feature => {
|
|
451
|
+
const pane = _.get(feature, 'style.pane')
|
|
452
|
+
if (pane) panes.push({
|
|
453
|
+
name: pane
|
|
454
|
+
})
|
|
455
|
+
})
|
|
456
|
+
if (!_.isEmpty(panes)) _.set(layerSpec, 'leaflet.panes', panes)
|
|
441
457
|
// Create an empty layer used as a container
|
|
442
458
|
await this.addLayer(layerSpec)
|
|
443
459
|
// Set the content
|
|
@@ -515,8 +531,16 @@ export const baseMap = {
|
|
|
515
531
|
zoomToBBox (bbox) {
|
|
516
532
|
this.zoomToBounds([[bbox[1], bbox[0]], [bbox[3], bbox[2]]])
|
|
517
533
|
},
|
|
518
|
-
center (longitude, latitude, zoomLevel, options) {
|
|
519
|
-
|
|
534
|
+
center (longitude, latitude, zoomLevel, bearing, options = {}) {
|
|
535
|
+
if (typeof this.map.getBearing === 'function') {
|
|
536
|
+
this.setBearing(_.isNil(bearing) ? this.map.getBearing() : bearing)
|
|
537
|
+
}
|
|
538
|
+
const duration = _.get(options, 'duration', 0)
|
|
539
|
+
if (duration) {
|
|
540
|
+
this.map.flyTo(new L.LatLng(latitude, longitude), _.isNil(zoomLevel) ? this.map.getZoom() : zoomLevel, options)
|
|
541
|
+
} else {
|
|
542
|
+
this.map.setView(new L.LatLng(latitude, longitude), _.isNil(zoomLevel) ? this.map.getZoom() : zoomLevel, options)
|
|
543
|
+
}
|
|
520
544
|
},
|
|
521
545
|
getCenter () {
|
|
522
546
|
const center = this.map.getCenter()
|
|
@@ -527,6 +551,20 @@ export const baseMap = {
|
|
|
527
551
|
zoomLevel: zoom
|
|
528
552
|
}
|
|
529
553
|
},
|
|
554
|
+
setBearing(bearing) {
|
|
555
|
+
if (typeof this.map.setBearing !== 'function') {
|
|
556
|
+
logger.warn(`[KDK] Map not configured to handle bearing, ignoring`)
|
|
557
|
+
return
|
|
558
|
+
}
|
|
559
|
+
this.map.setBearing(bearing)
|
|
560
|
+
},
|
|
561
|
+
getBearing () {
|
|
562
|
+
if (typeof this.map.getBearing !== 'function') {
|
|
563
|
+
logger.warn(`[KDK] Map not configured to handle bearing, ignoring`)
|
|
564
|
+
return 0
|
|
565
|
+
}
|
|
566
|
+
return this.map.getBearing()
|
|
567
|
+
},
|
|
530
568
|
getBounds () {
|
|
531
569
|
this.viewBounds = this.map.getBounds()
|
|
532
570
|
const south = this.viewBounds.getSouth()
|
|
@@ -361,7 +361,6 @@ export const canvasLayers = {
|
|
|
361
361
|
|
|
362
362
|
// Check for valid type
|
|
363
363
|
if (layerOptions.type !== 'kanvasLayer') return
|
|
364
|
-
|
|
365
364
|
const layer = this.createLeafletLayer(options)
|
|
366
365
|
this.setCanvasLayerDrawCode(layer, layerOptions.draw)
|
|
367
366
|
if (layerOptions.userData) this.setCanvasLayerUserData(layer, layerOptions.userData)
|
|
@@ -56,7 +56,10 @@ L.GeoJSON.geometryToLayer = function (geojson, options) {
|
|
|
56
56
|
return new MaskLayer(geojson, options.style(geojson))
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
// As we do so this breaks leaflet-arrowheads plugin
|
|
60
|
+
const layer = geometryToLayer(geojson, options)
|
|
61
|
+
if (options.arrowheads && (layer instanceof L.Polyline)) layer.arrowheads(options.arrowheads)
|
|
62
|
+
return layer
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
export const geojsonLayers = {
|
|
@@ -260,15 +263,17 @@ export const geojsonLayers = {
|
|
|
260
263
|
// on non-tiled layers we need to use a pane to manage it
|
|
261
264
|
const hasMinZoom = !!_.get(leafletOptions, 'minZoom')
|
|
262
265
|
const hasMaxZoom = !!_.get(leafletOptions, 'maxZoom')
|
|
266
|
+
const hasZIndex = !!_.get(leafletOptions, 'zIndex')
|
|
263
267
|
if (!leafletOptions.tiled && (hasMinZoom || hasMaxZoom)) {
|
|
264
268
|
const pane = { name: options.name }
|
|
265
269
|
if (hasMinZoom) pane.minZoom = _.get(leafletOptions, 'minZoom')
|
|
266
270
|
if (hasMaxZoom) pane.maxZoom = _.get(leafletOptions, 'maxZoom')
|
|
271
|
+
if (hasZIndex) pane.zIndex = _.get(leafletOptions, 'zIndex')
|
|
267
272
|
leafletOptions.panes = [pane]
|
|
268
273
|
leafletOptions.pane = options.name
|
|
269
274
|
leafletOptions.shadowPane = options.name
|
|
270
275
|
// Make pane available to styles as well as eg shape markers are created from here
|
|
271
|
-
for (const type
|
|
276
|
+
for (const type of ['point', 'line', 'polygon']) {
|
|
272
277
|
if (_.has(leafletOptions, `style.${type}`)) {
|
|
273
278
|
_.set(leafletOptions, `style.${type}.pane`, options.name)
|
|
274
279
|
_.set(leafletOptions, `style.${type}.shadowPane`, options.name)
|
|
@@ -331,7 +336,7 @@ export const geojsonLayers = {
|
|
|
331
336
|
// Indeed the style property must be overriden to install the Leaflet function style
|
|
332
337
|
if (!_.has(leafletOptions, key) || (key === 'style')) _.set(leafletOptions, key, _.get(geoJsonOptions, key))
|
|
333
338
|
})
|
|
334
|
-
// Create the layer
|
|
339
|
+
// Create the layer
|
|
335
340
|
let layer = this.createLeafletLayer(options)
|
|
336
341
|
// Specific case of realtime layer where the underlying container also need to be added to map
|
|
337
342
|
if (leafletOptions.realtime) {
|
|
@@ -479,8 +484,8 @@ export const geojsonLayers = {
|
|
|
479
484
|
}
|
|
480
485
|
},
|
|
481
486
|
onLayerUpdated (layer, leafletLayer, data) {
|
|
482
|
-
this.$emit('layer-updated',
|
|
483
|
-
this.$engineEvents.emit('layer-updated',
|
|
487
|
+
this.$emit('layer-updated', layer, leafletLayer, data)
|
|
488
|
+
this.$engineEvents.emit('layer-updated', layer, leafletLayer, data)
|
|
484
489
|
},
|
|
485
490
|
onCurrentTimeChangedGeoJsonLayers (time) {
|
|
486
491
|
const geoJsonlayers = _.values(this.layers).filter(sift({
|
|
@@ -184,8 +184,8 @@ export const activity = {
|
|
|
184
184
|
// Otherwise simply save in catalog
|
|
185
185
|
createdLayer = await layers.saveLayer(layer)
|
|
186
186
|
}
|
|
187
|
-
// Add layer to current project ?
|
|
188
|
-
if (this.project) {
|
|
187
|
+
// Add layer to current project ? Check if not coming from another planet first
|
|
188
|
+
if (this.project && (this.project.getPlanetApi() === this.$api)) {
|
|
189
189
|
this.project.layers.push({ _id: createdLayer._id })
|
|
190
190
|
await this.$api.getService('projects').patch(this.project._id, {
|
|
191
191
|
layers: this.project.layers
|
|
@@ -3,16 +3,13 @@ export const featureSelection = {
|
|
|
3
3
|
'selection.items': {
|
|
4
4
|
handler () {
|
|
5
5
|
this.updateHighlights()
|
|
6
|
-
|
|
7
|
-
// If window already open on another widget keep it
|
|
8
|
-
if (widget && !this.isWidgetWindowVisible(widget)) this.openWidget(widget)
|
|
6
|
+
this.handleWidget(this.getWidgetForSelection())
|
|
9
7
|
}
|
|
10
8
|
},
|
|
11
9
|
'probe.item': {
|
|
12
10
|
handler () {
|
|
13
11
|
this.updateHighlights()
|
|
14
|
-
|
|
15
|
-
if (widget) this.openWidget(widget)
|
|
12
|
+
this.handleWidget(this.getWidgetForProbe())
|
|
16
13
|
}
|
|
17
14
|
}
|
|
18
15
|
},
|
|
@@ -23,6 +20,11 @@ export const featureSelection = {
|
|
|
23
20
|
this.highlight(item.feature || item.location, item.layer)
|
|
24
21
|
})
|
|
25
22
|
if (this.hasProbedLocation()) this.highlight(this.getProbedLocation(), this.getProbedLayer())
|
|
23
|
+
},
|
|
24
|
+
handleWidget (widget) {
|
|
25
|
+
// If window already open on another widget keep it
|
|
26
|
+
if (widget && (widget !== 'none') && !this.isWidgetWindowVisible(widget)) this.openWidget(widget)
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
}
|
|
30
|
+
|
|
@@ -27,9 +27,9 @@ export const levels = {
|
|
|
27
27
|
},
|
|
28
28
|
clearSelectableLevels (layer) {
|
|
29
29
|
if (this.selectableLevelsLayer) {
|
|
30
|
-
this.setSelectedLevel(null)
|
|
31
30
|
this.selectableLevels = {}
|
|
32
31
|
this.selectableLevelsLayer = null
|
|
32
|
+
this.setSelectedLevel(null)
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
setSelectedLevel (level) {
|
|
@@ -148,6 +148,21 @@ export async function getSublegends (options = {}) {
|
|
|
148
148
|
return sublegends
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
+
export function getLayersBySublegend (layers, sublegends) {
|
|
152
|
+
const categorizedLayers = _.clone(layers)
|
|
153
|
+
const layersBySublegend = {}
|
|
154
|
+
_.forEach(sublegends, sublegend => {
|
|
155
|
+
// Built-in legends use filtering
|
|
156
|
+
let filter = null
|
|
157
|
+
if (_.has(sublegend, 'options.filter')) {
|
|
158
|
+
filter = _.get(sublegend, 'options.filter')
|
|
159
|
+
}
|
|
160
|
+
// If the list of layers in a sublegend is empty we can have a null filter
|
|
161
|
+
layersBySublegend[sublegend.name] = filter ? _.remove(categorizedLayers, sift(filter)) : []
|
|
162
|
+
})
|
|
163
|
+
return layersBySublegend
|
|
164
|
+
}
|
|
165
|
+
|
|
151
166
|
export async function getViews (options = {}) {
|
|
152
167
|
_.defaults(options, {
|
|
153
168
|
query: {},
|
|
@@ -49,7 +49,8 @@ export async function queryGeocoder(planetConfig, path, query = '') {
|
|
|
49
49
|
const jwt = await api.get('storage').getItem(planetConfig.gatewayJwt)
|
|
50
50
|
let url = `${endpoint}/${path}`
|
|
51
51
|
if (query) url += `?${query}`
|
|
52
|
-
const
|
|
52
|
+
const response = await fetch(url, { headers: { Authorization: `Bearer ${jwt}` } })
|
|
53
|
+
const results = await response.json()
|
|
53
54
|
return results
|
|
54
55
|
}
|
|
55
56
|
|
|
@@ -113,7 +113,7 @@ export const SimpleStyleToPolygonStyle = {
|
|
|
113
113
|
stroke: 'stroke.color',
|
|
114
114
|
'stroke-color': 'stroke.color',
|
|
115
115
|
'stroke-opacity': 'stroke.opacity',
|
|
116
|
-
'stroke-width': '
|
|
116
|
+
'stroke-width': 'stroke.width',
|
|
117
117
|
fill: 'color',
|
|
118
118
|
'fill-color': 'color',
|
|
119
119
|
'fill-opacity': 'opacity',
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as GeoTIFF from 'geotiff'
|
|
2
|
+
import _ from 'lodash'
|
|
2
3
|
import { unitConverters, SortOrder, GridSource, Grid1D } from './grid.js'
|
|
3
4
|
|
|
4
5
|
// pack r,g,b in an uint32
|
|
@@ -56,7 +57,8 @@ export class GeoTiffGridSource extends GridSource {
|
|
|
56
57
|
this.rgb = config.rgb
|
|
57
58
|
|
|
58
59
|
try {
|
|
59
|
-
|
|
60
|
+
// forceXHR is useful for tests because nock doesn't know how to intercept fetch
|
|
61
|
+
this.geotiff = await GeoTIFF.fromUrl(config.url, { forceXHR: _.get(config, 'forceXHR', false) })
|
|
60
62
|
} catch (error) {
|
|
61
63
|
// fetching may fail, in this case the source
|
|
62
64
|
// will remain in unusable state
|
|
@@ -127,8 +129,8 @@ export class GeoTiffGridSource extends GridSource {
|
|
|
127
129
|
// readRasters will fetch [left, right[ and [bottom, top[ hence the + 1
|
|
128
130
|
const window = [left, bottom, right + 1, top + 1]
|
|
129
131
|
const bands = this.rgb
|
|
130
|
-
? await usedImage.readRGB({ window
|
|
131
|
-
: await usedImage.readRasters({ window
|
|
132
|
+
? await usedImage.readRGB({ window })
|
|
133
|
+
: await usedImage.readRasters({ window, fillValue: this.nodata })
|
|
132
134
|
const data = this.rgb ? mergeRgb(bands) : bands[0]
|
|
133
135
|
|
|
134
136
|
if (rx < 0) [left, right] = [right, left]
|
package/map/common/grid.js
CHANGED
|
@@ -314,7 +314,7 @@ export class GridSource {
|
|
|
314
314
|
|
|
315
315
|
emit (event) {
|
|
316
316
|
const callbacks = _.get(this.events, event, [])
|
|
317
|
-
const ctx = { source: this, event
|
|
317
|
+
const ctx = { source: this, event }
|
|
318
318
|
for (const cb of callbacks) {
|
|
319
319
|
cb(ctx)
|
|
320
320
|
}
|
|
@@ -461,7 +461,7 @@ export class TiledGrid extends BaseGrid {
|
|
|
461
461
|
for (const tile of tiles) {
|
|
462
462
|
const bbox = tile.getBBox()
|
|
463
463
|
const meta = {
|
|
464
|
-
tile
|
|
464
|
+
tile,
|
|
465
465
|
iLatMin: Math.floor((bbox[0] - this.bbox[0]) / this.resolution[0]),
|
|
466
466
|
iLatMax: Math.floor((bbox[2] - this.bbox[0]) / this.resolution[0]),
|
|
467
467
|
iLonMin: Math.floor((bbox[1] - this.bbox[1]) / this.resolution[1]),
|
|
@@ -48,7 +48,7 @@ export class MeteoModelGridSource extends DynamicGridSource {
|
|
|
48
48
|
|
|
49
49
|
const [key, conf] = extractGridSourceConfig(item)
|
|
50
50
|
const candidate = {
|
|
51
|
-
key
|
|
51
|
+
key,
|
|
52
52
|
staticProps: conf,
|
|
53
53
|
dynamicProps: {},
|
|
54
54
|
from: item.from ? readAsTimeOrDuration(item.from) : null,
|
|
@@ -30,7 +30,7 @@ export class TimeBasedGridSource extends DynamicGridSource {
|
|
|
30
30
|
|
|
31
31
|
const [key, conf] = extractGridSourceConfig(item)
|
|
32
32
|
const candidate = {
|
|
33
|
-
key
|
|
33
|
+
key,
|
|
34
34
|
staticProps: conf,
|
|
35
35
|
dynamicProps: {},
|
|
36
36
|
from: item.from ? readAsTimeOrDuration(item.from) : null,
|
package/map/common/wmts-utils.js
CHANGED
|
@@ -139,16 +139,16 @@ export function buildLeafletUrl (baseUrl, layer, { version = '', style = '', crs
|
|
|
139
139
|
const ext = _.get(fmt2ext, format.toLowerCase(), 'png')
|
|
140
140
|
return useKvpEncoding
|
|
141
141
|
? buildUrl(baseUrl, Object.assign({
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
142
|
+
SERVICE: 'WMTS',
|
|
143
|
+
REQUEST: 'GetTile',
|
|
144
|
+
VERSION: version,
|
|
145
|
+
LAYER: layer.id,
|
|
146
|
+
STYLE: style,
|
|
147
|
+
FORMAT: format,
|
|
148
|
+
TILEMATRIXSET: layer.crs[crs],
|
|
149
|
+
TILEMATRIX: '{z}',
|
|
150
|
+
TILEROW: '{y}',
|
|
151
|
+
TILECOL: '{x}'
|
|
152
|
+
}, searchParams))
|
|
153
153
|
: buildUrl(`${baseUrl}/${layer.id}/${style}/${layer.crs[crs]}/{z}/{y}/{x}.${ext}`, searchParams)
|
|
154
154
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kalisio/kdk",
|
|
3
3
|
"description": "Kalisio Development Kit",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.1",
|
|
5
5
|
"homepage": "https://github.com/kalisio/kdk",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"keywords": [
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"standard": {
|
|
44
44
|
"parser": "vue-eslint-parser",
|
|
45
45
|
"parserOptions": {
|
|
46
|
-
"sourceType": "module"
|
|
46
|
+
"sourceType": "module",
|
|
47
|
+
"ecmaVersion": "latest"
|
|
47
48
|
},
|
|
48
49
|
"plugins": [
|
|
49
50
|
"vue"
|
|
@@ -89,8 +90,8 @@
|
|
|
89
90
|
"@feathersjs/feathers": "^5.0.8",
|
|
90
91
|
"@feathersjs/schema": "^5.0.8",
|
|
91
92
|
"@feathersjs/socketio": "^5.0.8",
|
|
92
|
-
"@kalisio/feathers-import-export": "^1.0
|
|
93
|
-
"@kalisio/feathers-s3": "^1.
|
|
93
|
+
"@kalisio/feathers-import-export": "^1.2.0",
|
|
94
|
+
"@kalisio/feathers-s3": "^1.4.0",
|
|
94
95
|
"@kalisio/feathers-webpush": "^1.0.1",
|
|
95
96
|
"@turf/bbox": "^6.0.1",
|
|
96
97
|
"@weacast/core": "^2.1.5",
|
|
@@ -112,7 +113,7 @@
|
|
|
112
113
|
"feathers-mongodb": "^6.0.0",
|
|
113
114
|
"feathers-mongodb-fuzzy-search": "^2.0.1",
|
|
114
115
|
"feathers-mongodb-management": "^2.0.1",
|
|
115
|
-
"geotiff": "^2.
|
|
116
|
+
"geotiff": "^2.1.3",
|
|
116
117
|
"helmet": "^3.5.0",
|
|
117
118
|
"jsdap": "^8.1.0",
|
|
118
119
|
"limiter": "^1.1.3",
|
|
@@ -132,6 +133,9 @@
|
|
|
132
133
|
"winston-daily-rotate-file": "^3.10.0",
|
|
133
134
|
"xml2js": "^0.4.22"
|
|
134
135
|
},
|
|
136
|
+
"resolutions": {
|
|
137
|
+
"typed-function": "4.1.1"
|
|
138
|
+
},
|
|
135
139
|
"devDependencies": {
|
|
136
140
|
"@feathersjs/authentication-client": "^5.0.8",
|
|
137
141
|
"@feathersjs/memory": "^5.0.8",
|
|
@@ -146,17 +150,17 @@
|
|
|
146
150
|
"chai-spies": "^0.7.1",
|
|
147
151
|
"containerized": "^1.0.2",
|
|
148
152
|
"cross-env": "^5.2.0",
|
|
149
|
-
"eslint-plugin-vue": "^9.
|
|
153
|
+
"eslint-plugin-vue": "^9.26.0",
|
|
150
154
|
"esm": "^3.2.25",
|
|
151
155
|
"fs-extra": "^8.1.0",
|
|
152
156
|
"googleapis": "^21.3.0",
|
|
153
157
|
"mocha": "^9.1.1",
|
|
154
|
-
"nock": "^
|
|
158
|
+
"nock": "^13.5.4",
|
|
155
159
|
"npm-run-all": "^4.1.1",
|
|
156
160
|
"pixelmatch": "^5.2.0",
|
|
157
161
|
"pngjs": "^5.0.0",
|
|
158
162
|
"puppeteer": "^20.5.0",
|
|
159
163
|
"shx": "^0.3.2",
|
|
160
|
-
"standard": "^
|
|
164
|
+
"standard": "^17.1.0"
|
|
161
165
|
}
|
|
162
166
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
# set -x
|
|
4
|
+
|
|
5
|
+
THIS_FILE=$(readlink -f "${BASH_SOURCE[0]}")
|
|
6
|
+
THIS_DIR=$(dirname "$THIS_FILE")
|
|
7
|
+
ROOT_DIR=$(dirname "$THIS_DIR")
|
|
8
|
+
WORKSPACE_DIR="$(dirname "$ROOT_DIR")"
|
|
9
|
+
|
|
10
|
+
. "$THIS_DIR/kash/kash.sh"
|
|
11
|
+
|
|
12
|
+
## Parse options
|
|
13
|
+
##
|
|
14
|
+
|
|
15
|
+
PUBLISH=false
|
|
16
|
+
CI_STEP_NAME="Build docs"
|
|
17
|
+
while getopts "pr:" OPT; do
|
|
18
|
+
case $OPT in
|
|
19
|
+
p) # publish doc
|
|
20
|
+
PUBLISH=true
|
|
21
|
+
;;
|
|
22
|
+
r) # report outcome to slack
|
|
23
|
+
CI_STEP_NAME=$OPTARG
|
|
24
|
+
load_env_files "$WORKSPACE_DIR/development/common/SLACK_WEBHOOK_LIBS.enc.env"
|
|
25
|
+
trap 'slack_ci_report "$ROOT_DIR" "$CI_STEP_NAME" "$?" "$SLACK_WEBHOOK_LIBS"' EXIT
|
|
26
|
+
;;
|
|
27
|
+
*)
|
|
28
|
+
;;
|
|
29
|
+
esac
|
|
30
|
+
done
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Build docs
|
|
34
|
+
##
|
|
35
|
+
|
|
36
|
+
build_docs "$ROOT_DIR" "kalisio/kdk" "$PUBLISH"
|
|
37
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
# set -x
|
|
4
|
+
|
|
5
|
+
JOB_ID=$1
|
|
6
|
+
|
|
7
|
+
THIS_FILE=$(readlink -f "${BASH_SOURCE[0]}")
|
|
8
|
+
THIS_DIR=$(dirname "$THIS_FILE")
|
|
9
|
+
|
|
10
|
+
. "$THIS_DIR/kash/kash.sh"
|
|
11
|
+
|
|
12
|
+
### Github Actions
|
|
13
|
+
|
|
14
|
+
init_github_run_tests() {
|
|
15
|
+
install_reqs age sops nvm node16 mongo4 cc_test_reporter
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
init_github_additional_tests() {
|
|
19
|
+
install_reqs age sops nvm node18 node20 mongo5 mongo6 mongo7
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
init_github_build_docs() {
|
|
23
|
+
install_reqs age sops nvm node18
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
begin_group "Init $CI_ID for $JOB_ID"
|
|
27
|
+
|
|
28
|
+
init_"${CI_ID}_${JOB_ID}"
|
|
29
|
+
|
|
30
|
+
end_group "Init $CI_ID for $JOB_ID"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Run tests
|
|
2
|
+
on: [push]
|
|
3
|
+
|
|
4
|
+
jobs:
|
|
5
|
+
run_tests:
|
|
6
|
+
name: Run tests
|
|
7
|
+
runs-on: ubuntu-22.04
|
|
8
|
+
steps:
|
|
9
|
+
- name: Checkout repo
|
|
10
|
+
uses: actions/checkout@v4
|
|
11
|
+
- name: Run tests
|
|
12
|
+
# env:
|
|
13
|
+
# SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
|
|
14
|
+
run: bash ./scripts/run_tests.sh
|
|
15
|
+
|
|
16
|
+
# run_container_tests:
|
|
17
|
+
# name: Run tests in containers
|
|
18
|
+
# runs-on: ubuntu-22.04
|
|
19
|
+
# strategy:
|
|
20
|
+
# matrix:
|
|
21
|
+
# image: [ "debian:12", "alpine:3.18" ]
|
|
22
|
+
# container:
|
|
23
|
+
# image: ${{ matrix.image }}
|
|
24
|
+
# steps:
|
|
25
|
+
# - name: Checkout repo
|
|
26
|
+
# uses: actions/checkout@v4
|
|
27
|
+
# - name: Add bash to alpine
|
|
28
|
+
# if: ${{ contains(matrix.image, 'alpine') }}
|
|
29
|
+
# run: apk add bash
|
|
30
|
+
# - name: Run tests
|
|
31
|
+
# # env:
|
|
32
|
+
# # SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
|
|
33
|
+
# run: bash ./scripts/run_tests.sh
|