@ngageoint/mage.service 6.2.2
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/bin/mage.service.js +230 -0
- package/bin/migration.js +60 -0
- package/bin/poststop.sh +1 -0
- package/bin/prestart.sh +1 -0
- package/lib/@types/express/index.d.ts +18 -0
- package/lib/@types/geojson-validation/index.d.ts +15 -0
- package/lib/@types/mongodb-migrations/index.d.ts +99 -0
- package/lib/access/index.d.ts +21 -0
- package/lib/access/index.d.ts.map +1 -0
- package/lib/access/index.js +40 -0
- package/lib/access/index.js.map +1 -0
- package/lib/adapters/adapters.controllers.web.d.ts +22 -0
- package/lib/adapters/adapters.controllers.web.d.ts.map +1 -0
- package/lib/adapters/adapters.controllers.web.js +55 -0
- package/lib/adapters/adapters.controllers.web.js.map +1 -0
- package/lib/adapters/adapters.db.mongoose.d.ts +5 -0
- package/lib/adapters/adapters.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/adapters.db.mongoose.js +70 -0
- package/lib/adapters/adapters.db.mongoose.js.map +1 -0
- package/lib/adapters/adapters.simple_id_factory.d.ts +5 -0
- package/lib/adapters/adapters.simple_id_factory.d.ts.map +1 -0
- package/lib/adapters/adapters.simple_id_factory.js +24 -0
- package/lib/adapters/adapters.simple_id_factory.js.map +1 -0
- package/lib/adapters/base/adapters.base.db.mongoose.d.ts +59 -0
- package/lib/adapters/base/adapters.base.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/base/adapters.base.db.mongoose.js +143 -0
- package/lib/adapters/base/adapters.base.db.mongoose.js.map +1 -0
- package/lib/adapters/events/adapters.events.controllers.web.d.ts +14 -0
- package/lib/adapters/events/adapters.events.controllers.web.d.ts.map +1 -0
- package/lib/adapters/events/adapters.events.controllers.web.js +83 -0
- package/lib/adapters/events/adapters.events.controllers.web.js.map +1 -0
- package/lib/adapters/events/adapters.events.db.mongoose.d.ts +27 -0
- package/lib/adapters/events/adapters.events.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/events/adapters.events.db.mongoose.js +127 -0
- package/lib/adapters/events/adapters.events.db.mongoose.js.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.controllers.web.d.ts +25 -0
- package/lib/adapters/feeds/adapters.feeds.controllers.web.d.ts.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.controllers.web.js +234 -0
- package/lib/adapters/feeds/adapters.feeds.controllers.web.js.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.d.ts +63 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.js +199 -0
- package/lib/adapters/feeds/adapters.feeds.db.mongoose.js.map +1 -0
- package/lib/adapters/icons/adapters.icons.content_store.file_system.d.ts +7 -0
- package/lib/adapters/icons/adapters.icons.content_store.file_system.d.ts.map +1 -0
- package/lib/adapters/icons/adapters.icons.content_store.file_system.js +13 -0
- package/lib/adapters/icons/adapters.icons.content_store.file_system.js.map +1 -0
- package/lib/adapters/icons/adapters.icons.controllers.web.d.ts +10 -0
- package/lib/adapters/icons/adapters.icons.controllers.web.d.ts.map +1 -0
- package/lib/adapters/icons/adapters.icons.controllers.web.js +118 -0
- package/lib/adapters/icons/adapters.icons.controllers.web.js.map +1 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.d.ts +38 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.js +287 -0
- package/lib/adapters/icons/adapters.icons.db.mongoose.js.map +1 -0
- package/lib/adapters/observations/adapters.observations.attachment_store.file_system.d.ts +29 -0
- package/lib/adapters/observations/adapters.observations.attachment_store.file_system.d.ts.map +1 -0
- package/lib/adapters/observations/adapters.observations.attachment_store.file_system.js +274 -0
- package/lib/adapters/observations/adapters.observations.attachment_store.file_system.js.map +1 -0
- package/lib/adapters/observations/adapters.observations.controllers.web.d.ts +40 -0
- package/lib/adapters/observations/adapters.observations.controllers.web.d.ts.map +1 -0
- package/lib/adapters/observations/adapters.observations.controllers.web.js +196 -0
- package/lib/adapters/observations/adapters.observations.controllers.web.js.map +1 -0
- package/lib/adapters/observations/adapters.observations.db.mongoose.d.ts +30 -0
- package/lib/adapters/observations/adapters.observations.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/observations/adapters.observations.db.mongoose.js +294 -0
- package/lib/adapters/observations/adapters.observations.db.mongoose.js.map +1 -0
- package/lib/adapters/plugins/adapters.plugins.db.mongoose.d.ts +17 -0
- package/lib/adapters/plugins/adapters.plugins.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/plugins/adapters.plugins.db.mongoose.js +59 -0
- package/lib/adapters/plugins/adapters.plugins.db.mongoose.js.map +1 -0
- package/lib/adapters/url_schemes/adapters.url_schemes.plugin.d.ts +38 -0
- package/lib/adapters/url_schemes/adapters.url_schemes.plugin.d.ts.map +1 -0
- package/lib/adapters/url_schemes/adapters.url_schemes.plugin.js +110 -0
- package/lib/adapters/url_schemes/adapters.url_schemes.plugin.js.map +1 -0
- package/lib/adapters/users/adapters.users.controllers.web.d.ts +7 -0
- package/lib/adapters/users/adapters.users.controllers.web.d.ts.map +1 -0
- package/lib/adapters/users/adapters.users.controllers.web.js +37 -0
- package/lib/adapters/users/adapters.users.controllers.web.js.map +1 -0
- package/lib/adapters/users/adapters.users.db.mongoose.d.ts +19 -0
- package/lib/adapters/users/adapters.users.db.mongoose.d.ts.map +1 -0
- package/lib/adapters/users/adapters.users.db.mongoose.js +126 -0
- package/lib/adapters/users/adapters.users.db.mongoose.js.map +1 -0
- package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.d.ts +3 -0
- package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.d.ts.map +1 -0
- package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.js +53 -0
- package/lib/adapters/web_ui_plugins/adapters.web_ui_plugins.controllers.web.js.map +1 -0
- package/lib/api/attachment.d.ts +12 -0
- package/lib/api/attachment.d.ts.map +1 -0
- package/lib/api/attachment.js +81 -0
- package/lib/api/attachment.js.map +1 -0
- package/lib/api/event.d.ts +20 -0
- package/lib/api/event.d.ts.map +1 -0
- package/lib/api/event.js +185 -0
- package/lib/api/event.js.map +1 -0
- package/lib/api/events/location.d.ts +11 -0
- package/lib/api/events/location.d.ts.map +1 -0
- package/lib/api/events/location.js +13 -0
- package/lib/api/events/location.js.map +1 -0
- package/lib/api/events/observation.d.ts +15 -0
- package/lib/api/events/observation.d.ts.map +1 -0
- package/lib/api/events/observation.js +21 -0
- package/lib/api/events/observation.js.map +1 -0
- package/lib/api/feature.d.ts +8 -0
- package/lib/api/feature.d.ts.map +1 -0
- package/lib/api/feature.js +15 -0
- package/lib/api/feature.js.map +1 -0
- package/lib/api/field/attachmentField.d.ts +12 -0
- package/lib/api/field/attachmentField.d.ts.map +1 -0
- package/lib/api/field/attachmentField.js +40 -0
- package/lib/api/field/attachmentField.js.map +1 -0
- package/lib/api/field/checkboxField.d.ts +7 -0
- package/lib/api/field/checkboxField.d.ts.map +1 -0
- package/lib/api/field/checkboxField.js +19 -0
- package/lib/api/field/checkboxField.js.map +1 -0
- package/lib/api/field/dateField.d.ts +8 -0
- package/lib/api/field/dateField.d.ts.map +1 -0
- package/lib/api/field/dateField.js +21 -0
- package/lib/api/field/dateField.js.map +1 -0
- package/lib/api/field/emailField.d.ts +7 -0
- package/lib/api/field/emailField.d.ts.map +1 -0
- package/lib/api/field/emailField.js +19 -0
- package/lib/api/field/emailField.js.map +1 -0
- package/lib/api/field/field.d.ts +12 -0
- package/lib/api/field/field.d.ts.map +1 -0
- package/lib/api/field/field.js +12 -0
- package/lib/api/field/field.js.map +1 -0
- package/lib/api/field/geometryField.d.ts +7 -0
- package/lib/api/field/geometryField.d.ts.map +1 -0
- package/lib/api/field/geometryField.js +35 -0
- package/lib/api/field/geometryField.js.map +1 -0
- package/lib/api/field/index.d.ts +7 -0
- package/lib/api/field/index.d.ts.map +1 -0
- package/lib/api/field/index.js +30 -0
- package/lib/api/field/index.js.map +1 -0
- package/lib/api/field/multiSelectField.d.ts +7 -0
- package/lib/api/field/multiSelectField.d.ts.map +1 -0
- package/lib/api/field/multiSelectField.js +27 -0
- package/lib/api/field/multiSelectField.js.map +1 -0
- package/lib/api/field/numberField.d.ts +7 -0
- package/lib/api/field/numberField.d.ts.map +1 -0
- package/lib/api/field/numberField.js +27 -0
- package/lib/api/field/numberField.js.map +1 -0
- package/lib/api/field/selectField.d.ts +7 -0
- package/lib/api/field/selectField.d.ts.map +1 -0
- package/lib/api/field/selectField.js +22 -0
- package/lib/api/field/selectField.js.map +1 -0
- package/lib/api/field/textField.d.ts +7 -0
- package/lib/api/field/textField.d.ts.map +1 -0
- package/lib/api/field/textField.js +21 -0
- package/lib/api/field/textField.js.map +1 -0
- package/lib/api/form.d.ts +12 -0
- package/lib/api/form.d.ts.map +1 -0
- package/lib/api/form.js +239 -0
- package/lib/api/form.js.map +1 -0
- package/lib/api/icon.d.ts +22 -0
- package/lib/api/icon.d.ts.map +1 -0
- package/lib/api/icon.js +178 -0
- package/lib/api/icon.js.map +1 -0
- package/lib/api/index.d.ts +10 -0
- package/lib/api/index.d.ts.map +1 -0
- package/lib/api/index.js +11 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/layer.d.ts +14 -0
- package/lib/api/layer.d.ts.map +1 -0
- package/lib/api/layer.js +70 -0
- package/lib/api/layer.js.map +1 -0
- package/lib/api/location.d.ts +14 -0
- package/lib/api/location.d.ts.map +1 -0
- package/lib/api/location.js +35 -0
- package/lib/api/location.js.map +1 -0
- package/lib/api/observation.d.ts +25 -0
- package/lib/api/observation.d.ts.map +1 -0
- package/lib/api/observation.js +224 -0
- package/lib/api/observation.js.map +1 -0
- package/lib/api/user.d.ts +16 -0
- package/lib/api/user.d.ts.map +1 -0
- package/lib/api/user.js +250 -0
- package/lib/api/user.js.map +1 -0
- package/lib/app.api/app.api.errors.d.ts +42 -0
- package/lib/app.api/app.api.errors.d.ts.map +1 -0
- package/lib/app.api/app.api.errors.js +43 -0
- package/lib/app.api/app.api.errors.js.map +1 -0
- package/lib/app.api/app.api.global.d.ts +74 -0
- package/lib/app.api/app.api.global.d.ts.map +1 -0
- package/lib/app.api/app.api.global.js +59 -0
- package/lib/app.api/app.api.global.js.map +1 -0
- package/lib/app.api/events/app.api.events.d.ts +31 -0
- package/lib/app.api/events/app.api.events.d.ts.map +1 -0
- package/lib/app.api/events/app.api.events.js +3 -0
- package/lib/app.api/events/app.api.events.js.map +1 -0
- package/lib/app.api/feeds/app.api.feeds.d.ts +139 -0
- package/lib/app.api/feeds/app.api.feeds.d.ts.map +1 -0
- package/lib/app.api/feeds/app.api.feeds.js +26 -0
- package/lib/app.api/feeds/app.api.feeds.js.map +1 -0
- package/lib/app.api/icons/app.api.icons.d.ts +60 -0
- package/lib/app.api/icons/app.api.icons.d.ts.map +1 -0
- package/lib/app.api/icons/app.api.icons.js +29 -0
- package/lib/app.api/icons/app.api.icons.js.map +1 -0
- package/lib/app.api/observations/app.api.observations.d.ts +126 -0
- package/lib/app.api/observations/app.api.observations.d.ts.map +1 -0
- package/lib/app.api/observations/app.api.observations.js +61 -0
- package/lib/app.api/observations/app.api.observations.js.map +1 -0
- package/lib/app.api/users/app.api.users.d.ts +24 -0
- package/lib/app.api/users/app.api.users.d.ts.map +1 -0
- package/lib/app.api/users/app.api.users.js +3 -0
- package/lib/app.api/users/app.api.users.js.map +1 -0
- package/lib/app.d.ts +38 -0
- package/lib/app.d.ts.map +1 -0
- package/lib/app.impl/events/app.impl.events.d.ts +8 -0
- package/lib/app.impl/events/app.impl.events.d.ts.map +1 -0
- package/lib/app.impl/events/app.impl.events.js +107 -0
- package/lib/app.impl/events/app.impl.events.js.map +1 -0
- package/lib/app.impl/feeds/app.impl.feeds.d.ts +21 -0
- package/lib/app.impl/feeds/app.impl.feeds.d.ts.map +1 -0
- package/lib/app.impl/feeds/app.impl.feeds.js +527 -0
- package/lib/app.impl/feeds/app.impl.feeds.js.map +1 -0
- package/lib/app.impl/icons/app.impl.icons.d.ts +7 -0
- package/lib/app.impl/icons/app.impl.icons.d.ts.map +1 -0
- package/lib/app.impl/icons/app.impl.icons.js +81 -0
- package/lib/app.impl/icons/app.impl.icons.js.map +1 -0
- package/lib/app.impl/observations/app.impl.observations.d.ts +11 -0
- package/lib/app.impl/observations/app.impl.observations.d.ts.map +1 -0
- package/lib/app.impl/observations/app.impl.observations.js +357 -0
- package/lib/app.impl/observations/app.impl.observations.js.map +1 -0
- package/lib/app.impl/users/app.impl.users.d.ts +4 -0
- package/lib/app.impl/users/app.impl.users.d.ts.map +1 -0
- package/lib/app.impl/users/app.impl.users.js +37 -0
- package/lib/app.impl/users/app.impl.users.js.map +1 -0
- package/lib/app.js +507 -0
- package/lib/app.js.map +1 -0
- package/lib/assets/default-icon.png +0 -0
- package/lib/authentication/anonymous.d.ts +6 -0
- package/lib/authentication/anonymous.d.ts.map +1 -0
- package/lib/authentication/anonymous.js +17 -0
- package/lib/authentication/anonymous.js.map +1 -0
- package/lib/authentication/index.d.ts +24 -0
- package/lib/authentication/index.d.ts.map +1 -0
- package/lib/authentication/index.js +104 -0
- package/lib/authentication/index.js.map +1 -0
- package/lib/authentication/ldap.d.ts +2 -0
- package/lib/authentication/ldap.d.ts.map +1 -0
- package/lib/authentication/ldap.js +130 -0
- package/lib/authentication/ldap.js.map +1 -0
- package/lib/authentication/local.d.ts +2 -0
- package/lib/authentication/local.d.ts.map +1 -0
- package/lib/authentication/local.js +77 -0
- package/lib/authentication/local.js.map +1 -0
- package/lib/authentication/oauth.d.ts +2 -0
- package/lib/authentication/oauth.d.ts.map +1 -0
- package/lib/authentication/oauth.js +197 -0
- package/lib/authentication/oauth.js.map +1 -0
- package/lib/authentication/openidconnect.d.ts +2 -0
- package/lib/authentication/openidconnect.d.ts.map +1 -0
- package/lib/authentication/openidconnect.js +148 -0
- package/lib/authentication/openidconnect.js.map +1 -0
- package/lib/authentication/saml.d.ts +2 -0
- package/lib/authentication/saml.d.ts.map +1 -0
- package/lib/authentication/saml.js +287 -0
- package/lib/authentication/saml.js.map +1 -0
- package/lib/authentication/verification.d.ts +33 -0
- package/lib/authentication/verification.d.ts.map +1 -0
- package/lib/authentication/verification.js +144 -0
- package/lib/authentication/verification.js.map +1 -0
- package/lib/config.d.ts +15 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +20 -0
- package/lib/config.js.map +1 -0
- package/lib/dist-package.json +203 -0
- package/lib/docs/auth/local.yaml +90 -0
- package/lib/docs/geojson.yaml +375 -0
- package/lib/docs/openapi.yaml +4591 -0
- package/lib/entities/authentication/entities.authentication.d.ts +14 -0
- package/lib/entities/authentication/entities.authentication.d.ts.map +1 -0
- package/lib/entities/authentication/entities.authentication.js +3 -0
- package/lib/entities/authentication/entities.authentication.js.map +1 -0
- package/lib/entities/authorization/entities.authorization.d.ts +7 -0
- package/lib/entities/authorization/entities.authorization.d.ts.map +1 -0
- package/lib/entities/authorization/entities.authorization.js +3 -0
- package/lib/entities/authorization/entities.authorization.js.map +1 -0
- package/lib/entities/authorization/entities.permissions.d.ts +143 -0
- package/lib/entities/authorization/entities.permissions.d.ts.map +1 -0
- package/lib/entities/authorization/entities.permissions.js +101 -0
- package/lib/entities/authorization/entities.permissions.js.map +1 -0
- package/lib/entities/entities.domain_events.d.ts +1 -0
- package/lib/entities/entities.domain_events.d.ts.map +1 -0
- package/lib/entities/entities.domain_events.js +20 -0
- package/lib/entities/entities.domain_events.js.map +1 -0
- package/lib/entities/entities.global.d.ts +107 -0
- package/lib/entities/entities.global.d.ts.map +1 -0
- package/lib/entities/entities.global.js +67 -0
- package/lib/entities/entities.global.js.map +1 -0
- package/lib/entities/entities.i18n.d.ts +78 -0
- package/lib/entities/entities.i18n.d.ts.map +1 -0
- package/lib/entities/entities.i18n.js +69 -0
- package/lib/entities/entities.i18n.js.map +1 -0
- package/lib/entities/entities.json_types.d.ts +42 -0
- package/lib/entities/entities.json_types.d.ts.map +1 -0
- package/lib/entities/entities.json_types.js +3 -0
- package/lib/entities/entities.json_types.js.map +1 -0
- package/lib/entities/events/entities.events.d.ts +118 -0
- package/lib/entities/events/entities.events.d.ts.map +1 -0
- package/lib/entities/events/entities.events.forms.d.ts +132 -0
- package/lib/entities/events/entities.events.forms.d.ts.map +1 -0
- package/lib/entities/events/entities.events.forms.js +102 -0
- package/lib/entities/events/entities.events.forms.js.map +1 -0
- package/lib/entities/events/entities.events.js +146 -0
- package/lib/entities/events/entities.events.js.map +1 -0
- package/lib/entities/feeds/entities.feeds.d.ts +340 -0
- package/lib/entities/feeds/entities.feeds.d.ts.map +1 -0
- package/lib/entities/feeds/entities.feeds.js +213 -0
- package/lib/entities/feeds/entities.feeds.js.map +1 -0
- package/lib/entities/icons/entities.icons.d.ts +106 -0
- package/lib/entities/icons/entities.icons.d.ts.map +1 -0
- package/lib/entities/icons/entities.icons.js +26 -0
- package/lib/entities/icons/entities.icons.js.map +1 -0
- package/lib/entities/observations/entities.observations.d.ts +569 -0
- package/lib/entities/observations/entities.observations.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.attachment.d.ts +5 -0
- package/lib/entities/observations/entities.observations.fields.attachment.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.attachment.js +24 -0
- package/lib/entities/observations/entities.observations.fields.attachment.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.checkbox.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.checkbox.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.checkbox.js +17 -0
- package/lib/entities/observations/entities.observations.fields.checkbox.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.d.ts +20 -0
- package/lib/entities/observations/entities.observations.fields.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.date.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.date.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.date.js +21 -0
- package/lib/entities/observations/entities.observations.fields.date.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.email.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.email.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.email.js +20 -0
- package/lib/entities/observations/entities.observations.fields.email.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.geometry.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.geometry.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.geometry.js +62 -0
- package/lib/entities/observations/entities.observations.fields.geometry.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.js +37 -0
- package/lib/entities/observations/entities.observations.fields.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.multiselect.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.multiselect.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.multiselect.js +24 -0
- package/lib/entities/observations/entities.observations.fields.multiselect.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.numeric.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.numeric.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.numeric.js +24 -0
- package/lib/entities/observations/entities.observations.fields.numeric.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.required.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.required.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.required.js +14 -0
- package/lib/entities/observations/entities.observations.fields.required.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.select.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.select.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.select.js +17 -0
- package/lib/entities/observations/entities.observations.fields.select.js.map +1 -0
- package/lib/entities/observations/entities.observations.fields.text.d.ts +3 -0
- package/lib/entities/observations/entities.observations.fields.text.d.ts.map +1 -0
- package/lib/entities/observations/entities.observations.fields.text.js +15 -0
- package/lib/entities/observations/entities.observations.fields.text.js.map +1 -0
- package/lib/entities/observations/entities.observations.js +873 -0
- package/lib/entities/observations/entities.observations.js.map +1 -0
- package/lib/entities/ogcapi-features/entities.ogcapi-features.d.ts +98 -0
- package/lib/entities/ogcapi-features/entities.ogcapi-features.d.ts.map +1 -0
- package/lib/entities/ogcapi-features/entities.ogcapi-features.js +30 -0
- package/lib/entities/ogcapi-features/entities.ogcapi-features.js.map +1 -0
- package/lib/entities/teams/entities.teams.d.ts +26 -0
- package/lib/entities/teams/entities.teams.d.ts.map +1 -0
- package/lib/entities/teams/entities.teams.js +3 -0
- package/lib/entities/teams/entities.teams.js.map +1 -0
- package/lib/entities/users/entities.users.d.ts +66 -0
- package/lib/entities/users/entities.users.d.ts.map +1 -0
- package/lib/entities/users/entities.users.js +10 -0
- package/lib/entities/users/entities.users.js.map +1 -0
- package/lib/environment/env.d.ts +29 -0
- package/lib/environment/env.d.ts.map +1 -0
- package/lib/environment/env.js +106 -0
- package/lib/environment/env.js.map +1 -0
- package/lib/export/csv.d.ts +11 -0
- package/lib/export/csv.d.ts.map +1 -0
- package/lib/export/csv.js +243 -0
- package/lib/export/csv.js.map +1 -0
- package/lib/export/exporter.d.ts +12 -0
- package/lib/export/exporter.d.ts.map +1 -0
- package/lib/export/exporter.js +38 -0
- package/lib/export/exporter.js.map +1 -0
- package/lib/export/exporterFactory.d.ts +11 -0
- package/lib/export/exporterFactory.d.ts.map +1 -0
- package/lib/export/exporterFactory.js +17 -0
- package/lib/export/exporterFactory.js.map +1 -0
- package/lib/export/geojson.d.ts +10 -0
- package/lib/export/geojson.d.ts.map +1 -0
- package/lib/export/geojson.js +167 -0
- package/lib/export/geojson.js.map +1 -0
- package/lib/export/geopackage.d.ts +25 -0
- package/lib/export/geopackage.d.ts.map +1 -0
- package/lib/export/geopackage.js +687 -0
- package/lib/export/geopackage.js.map +1 -0
- package/lib/export/kml.d.ts +10 -0
- package/lib/export/kml.d.ts.map +1 -0
- package/lib/export/kml.js +128 -0
- package/lib/export/kml.js.map +1 -0
- package/lib/export/kmlWriter.d.ts +24 -0
- package/lib/export/kmlWriter.d.ts.map +1 -0
- package/lib/export/kmlWriter.js +431 -0
- package/lib/export/kmlWriter.js.map +1 -0
- package/lib/express.d.ts +9 -0
- package/lib/express.d.ts.map +1 -0
- package/lib/express.js +70 -0
- package/lib/express.js.map +1 -0
- package/lib/format/geoJsonFormat.d.ts +3 -0
- package/lib/format/geoJsonFormat.d.ts.map +1 -0
- package/lib/format/geoJsonFormat.js +65 -0
- package/lib/format/geoJsonFormat.js.map +1 -0
- package/lib/logger.d.ts +2 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +21 -0
- package/lib/logger.js.map +1 -0
- package/lib/main.impl/main.impl.plugins.d.ts +12 -0
- package/lib/main.impl/main.impl.plugins.d.ts.map +1 -0
- package/lib/main.impl/main.impl.plugins.js +41 -0
- package/lib/main.impl/main.impl.plugins.js.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.d.ts +3 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.d.ts.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.js +32 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.events.js.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.d.ts +4 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.d.ts.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.js +26 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.feeds.js.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.d.ts +4 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.d.ts.map +1 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.js +41 -0
- package/lib/main.impl/plugin_hooks/main.impl.plugin_hooks.icons.js.map +1 -0
- package/lib/migrate.d.ts +4 -0
- package/lib/migrate.d.ts.map +1 -0
- package/lib/migrate.js +96 -0
- package/lib/migrate.js.map +1 -0
- package/lib/migrations/002-create-user-role.d.ts +4 -0
- package/lib/migrations/002-create-user-role.d.ts.map +1 -0
- package/lib/migrations/002-create-user-role.js +30 -0
- package/lib/migrations/002-create-user-role.js.map +1 -0
- package/lib/migrations/003-create-admin-role.d.ts +4 -0
- package/lib/migrations/003-create-admin-role.d.ts.map +1 -0
- package/lib/migrations/003-create-admin-role.js +31 -0
- package/lib/migrations/003-create-admin-role.js.map +1 -0
- package/lib/migrations/005-create-osm-layer.d.ts +4 -0
- package/lib/migrations/005-create-osm-layer.d.ts.map +1 -0
- package/lib/migrations/005-create-osm-layer.js +51 -0
- package/lib/migrations/005-create-osm-layer.js.map +1 -0
- package/lib/migrations/006-event-teams.d.ts +4 -0
- package/lib/migrations/006-event-teams.d.ts.map +1 -0
- package/lib/migrations/006-event-teams.js +40 -0
- package/lib/migrations/006-event-teams.js.map +1 -0
- package/lib/migrations/007-user-icon.d.ts +4 -0
- package/lib/migrations/007-user-icon.d.ts.map +1 -0
- package/lib/migrations/007-user-icon.js +21 -0
- package/lib/migrations/007-user-icon.js.map +1 -0
- package/lib/migrations/008-create-user-no-edit-role.d.ts +4 -0
- package/lib/migrations/008-create-user-no-edit-role.d.ts.map +1 -0
- package/lib/migrations/008-create-user-no-edit-role.js +34 -0
- package/lib/migrations/008-create-user-no-edit-role.js.map +1 -0
- package/lib/migrations/009-create-manager-role.d.ts +4 -0
- package/lib/migrations/009-create-manager-role.d.ts.map +1 -0
- package/lib/migrations/009-create-manager-role.js +50 -0
- package/lib/migrations/009-create-manager-role.js.map +1 -0
- package/lib/migrations/010-add-user-device-manager-role.d.ts +4 -0
- package/lib/migrations/010-add-user-device-manager-role.d.ts.map +1 -0
- package/lib/migrations/010-add-user-device-manager-role.js +38 -0
- package/lib/migrations/010-add-user-device-manager-role.js.map +1 -0
- package/lib/migrations/011-multiple-forms.d.ts +4 -0
- package/lib/migrations/011-multiple-forms.d.ts.map +1 -0
- package/lib/migrations/011-multiple-forms.js +161 -0
- package/lib/migrations/011-multiple-forms.js.map +1 -0
- package/lib/migrations/012-user-role-remove-delete.d.ts +4 -0
- package/lib/migrations/012-user-role-remove-delete.d.ts.map +1 -0
- package/lib/migrations/012-user-role-remove-delete.js +15 -0
- package/lib/migrations/012-user-role-remove-delete.js.map +1 -0
- package/lib/migrations/013-ensure-event-indexes.d.ts +4 -0
- package/lib/migrations/013-ensure-event-indexes.d.ts.map +1 -0
- package/lib/migrations/013-ensure-event-indexes.js +50 -0
- package/lib/migrations/013-ensure-event-indexes.js.map +1 -0
- package/lib/migrations/014-add-role-update-permission.d.ts +4 -0
- package/lib/migrations/014-add-role-update-permission.d.ts.map +1 -0
- package/lib/migrations/014-add-role-update-permission.js +15 -0
- package/lib/migrations/014-add-role-update-permission.js.map +1 -0
- package/lib/migrations/015-manager-role-add-user-create.d.ts +4 -0
- package/lib/migrations/015-manager-role-add-user-create.d.ts.map +1 -0
- package/lib/migrations/015-manager-role-add-user-create.js +15 -0
- package/lib/migrations/015-manager-role-add-user-create.js.map +1 -0
- package/lib/migrations/016-set-feed-primary-secondary.d.ts +4 -0
- package/lib/migrations/016-set-feed-primary-secondary.d.ts.map +1 -0
- package/lib/migrations/016-set-feed-primary-secondary.js +36 -0
- package/lib/migrations/016-set-feed-primary-secondary.js.map +1 -0
- package/lib/migrations/017-make-layers-available.d.ts +4 -0
- package/lib/migrations/017-make-layers-available.d.ts.map +1 -0
- package/lib/migrations/017-make-layers-available.js +48 -0
- package/lib/migrations/017-make-layers-available.js.map +1 -0
- package/lib/migrations/018-feeds-admin-permissions.d.ts +4 -0
- package/lib/migrations/018-feeds-admin-permissions.d.ts.map +1 -0
- package/lib/migrations/018-feeds-admin-permissions.js +32 -0
- package/lib/migrations/018-feeds-admin-permissions.js.map +1 -0
- package/lib/migrations/018-set-default-password-policy.d.ts +4 -0
- package/lib/migrations/018-set-default-password-policy.d.ts.map +1 -0
- package/lib/migrations/018-set-default-password-policy.js +58 -0
- package/lib/migrations/018-set-default-password-policy.js.map +1 -0
- package/lib/migrations/019-move-user-authentication.d.ts +4 -0
- package/lib/migrations/019-move-user-authentication.d.ts.map +1 -0
- package/lib/migrations/019-move-user-authentication.js +68 -0
- package/lib/migrations/019-move-user-authentication.js.map +1 -0
- package/lib/migrations/020-add-export-permissions.d.ts +4 -0
- package/lib/migrations/020-add-export-permissions.d.ts.map +1 -0
- package/lib/migrations/020-add-export-permissions.js +36 -0
- package/lib/migrations/020-add-export-permissions.js.map +1 -0
- package/lib/migrations/022-copy-auth-from-config-to-db.d.ts +4 -0
- package/lib/migrations/022-copy-auth-from-config-to-db.d.ts.map +1 -0
- package/lib/migrations/022-copy-auth-from-config-to-db.js +86 -0
- package/lib/migrations/022-copy-auth-from-config-to-db.js.map +1 -0
- package/lib/migrations/023-move-local-auth-from-settings.d.ts +4 -0
- package/lib/migrations/023-move-local-auth-from-settings.d.ts.map +1 -0
- package/lib/migrations/023-move-local-auth-from-settings.js +54 -0
- package/lib/migrations/023-move-local-auth-from-settings.js.map +1 -0
- package/lib/migrations/024-link-auth-to-auth-config.d.ts +4 -0
- package/lib/migrations/024-link-auth-to-auth-config.d.ts.map +1 -0
- package/lib/migrations/024-link-auth-to-auth-config.js +59 -0
- package/lib/migrations/024-link-auth-to-auth-config.js.map +1 -0
- package/lib/migrations/025-add-auth-config-permissions.d.ts +4 -0
- package/lib/migrations/025-add-auth-config-permissions.d.ts.map +1 -0
- package/lib/migrations/025-add-auth-config-permissions.js +32 -0
- package/lib/migrations/025-add-auth-config-permissions.js.map +1 -0
- package/lib/migrations/028-move-security-settings-to-secret-store.d.ts +4 -0
- package/lib/migrations/028-move-security-settings-to-secret-store.d.ts.map +1 -0
- package/lib/migrations/028-move-security-settings-to-secret-store.js +59 -0
- package/lib/migrations/028-move-security-settings-to-secret-store.js.map +1 -0
- package/lib/migrations/029-attachment-form-field.d.ts +4 -0
- package/lib/migrations/029-attachment-form-field.d.ts.map +1 -0
- package/lib/migrations/029-attachment-form-field.js +130 -0
- package/lib/migrations/029-attachment-form-field.js.map +1 -0
- package/lib/models/authentication.d.ts +17 -0
- package/lib/models/authentication.d.ts.map +1 -0
- package/lib/models/authentication.js +174 -0
- package/lib/models/authentication.js.map +1 -0
- package/lib/models/authenticationconfiguration.d.ts +15 -0
- package/lib/models/authenticationconfiguration.d.ts.map +1 -0
- package/lib/models/authenticationconfiguration.js +105 -0
- package/lib/models/authenticationconfiguration.js.map +1 -0
- package/lib/models/cappedLocation.d.ts +8 -0
- package/lib/models/cappedLocation.d.ts.map +1 -0
- package/lib/models/cappedLocation.js +78 -0
- package/lib/models/cappedLocation.js.map +1 -0
- package/lib/models/counter.d.ts +3 -0
- package/lib/models/counter.d.ts.map +1 -0
- package/lib/models/counter.js +37 -0
- package/lib/models/counter.js.map +1 -0
- package/lib/models/device.d.ts +14 -0
- package/lib/models/device.d.ts.map +1 -0
- package/lib/models/device.js +220 -0
- package/lib/models/device.js.map +1 -0
- package/lib/models/event.d.ts +75 -0
- package/lib/models/event.d.ts.map +1 -0
- package/lib/models/event.js +839 -0
- package/lib/models/event.js.map +1 -0
- package/lib/models/export.d.ts +18 -0
- package/lib/models/export.d.ts.map +1 -0
- package/lib/models/export.js +107 -0
- package/lib/models/export.js.map +1 -0
- package/lib/models/feature.d.ts +4 -0
- package/lib/models/feature.d.ts.map +1 -0
- package/lib/models/feature.js +43 -0
- package/lib/models/feature.js.map +1 -0
- package/lib/models/icon.d.ts +9 -0
- package/lib/models/icon.d.ts.map +1 -0
- package/lib/models/icon.js +69 -0
- package/lib/models/icon.js.map +1 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/index.d.ts.map +1 -0
- package/lib/models/index.js +12 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/layer.d.ts +13 -0
- package/lib/models/layer.d.ts.map +1 -0
- package/lib/models/layer.js +149 -0
- package/lib/models/layer.js.map +1 -0
- package/lib/models/location.d.ts +8 -0
- package/lib/models/location.d.ts.map +1 -0
- package/lib/models/location.js +96 -0
- package/lib/models/location.js.map +1 -0
- package/lib/models/login.d.ts +4 -0
- package/lib/models/login.d.ts.map +1 -0
- package/lib/models/login.js +90 -0
- package/lib/models/login.js.map +1 -0
- package/lib/models/observation.d.ts +93 -0
- package/lib/models/observation.d.ts.map +1 -0
- package/lib/models/observation.js +461 -0
- package/lib/models/observation.js.map +1 -0
- package/lib/models/role.d.ts +22 -0
- package/lib/models/role.d.ts.map +1 -0
- package/lib/models/role.js +80 -0
- package/lib/models/role.js.map +1 -0
- package/lib/models/setting.d.ts +6 -0
- package/lib/models/setting.d.ts.map +1 -0
- package/lib/models/setting.js +31 -0
- package/lib/models/setting.js.map +1 -0
- package/lib/models/team.d.ts +31 -0
- package/lib/models/team.d.ts.map +1 -0
- package/lib/models/team.js +511 -0
- package/lib/models/team.js.map +1 -0
- package/lib/models/token.d.ts +6 -0
- package/lib/models/token.d.ts.map +1 -0
- package/lib/models/token.js +68 -0
- package/lib/models/token.js.map +1 -0
- package/lib/models/user.d.ts +60 -0
- package/lib/models/user.d.ts.map +1 -0
- package/lib/models/user.js +400 -0
- package/lib/models/user.js.map +1 -0
- package/lib/permissions/permissions.events.d.ts +69 -0
- package/lib/permissions/permissions.events.d.ts.map +1 -0
- package/lib/permissions/permissions.events.js +154 -0
- package/lib/permissions/permissions.events.js.map +1 -0
- package/lib/permissions/permissions.feeds.d.ts +19 -0
- package/lib/permissions/permissions.feeds.d.ts.map +1 -0
- package/lib/permissions/permissions.feeds.js +58 -0
- package/lib/permissions/permissions.feeds.js.map +1 -0
- package/lib/permissions/permissions.icons.d.ts +9 -0
- package/lib/permissions/permissions.icons.d.ts.map +1 -0
- package/lib/permissions/permissions.icons.js +28 -0
- package/lib/permissions/permissions.icons.js.map +1 -0
- package/lib/permissions/permissions.observations.d.ts +14 -0
- package/lib/permissions/permissions.observations.d.ts.map +1 -0
- package/lib/permissions/permissions.observations.js +113 -0
- package/lib/permissions/permissions.observations.js.map +1 -0
- package/lib/permissions/permissions.role-based.base.d.ts +15 -0
- package/lib/permissions/permissions.role-based.base.d.ts.map +1 -0
- package/lib/permissions/permissions.role-based.base.js +14 -0
- package/lib/permissions/permissions.role-based.base.js.map +1 -0
- package/lib/permissions/permissions.users.d.ts +8 -0
- package/lib/permissions/permissions.users.d.ts.map +1 -0
- package/lib/permissions/permissions.users.js +23 -0
- package/lib/permissions/permissions.users.js.map +1 -0
- package/lib/plugins.api/index.d.ts +55 -0
- package/lib/plugins.api/index.d.ts.map +1 -0
- package/lib/plugins.api/index.js +5 -0
- package/lib/plugins.api/index.js.map +1 -0
- package/lib/plugins.api/plugins.api.db.d.ts +7 -0
- package/lib/plugins.api/plugins.api.db.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.db.js +5 -0
- package/lib/plugins.api/plugins.api.db.js.map +1 -0
- package/lib/plugins.api/plugins.api.events.d.ts +24 -0
- package/lib/plugins.api/plugins.api.events.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.events.js +5 -0
- package/lib/plugins.api/plugins.api.events.js.map +1 -0
- package/lib/plugins.api/plugins.api.feeds.d.ts +35 -0
- package/lib/plugins.api/plugins.api.feeds.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.feeds.js +12 -0
- package/lib/plugins.api/plugins.api.feeds.js.map +1 -0
- package/lib/plugins.api/plugins.api.icons.d.ts +21 -0
- package/lib/plugins.api/plugins.api.icons.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.icons.js +5 -0
- package/lib/plugins.api/plugins.api.icons.js.map +1 -0
- package/lib/plugins.api/plugins.api.observations.d.ts +10 -0
- package/lib/plugins.api/plugins.api.observations.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.observations.js +11 -0
- package/lib/plugins.api/plugins.api.observations.js.map +1 -0
- package/lib/plugins.api/plugins.api.users.d.ts +4 -0
- package/lib/plugins.api/plugins.api.users.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.users.js +5 -0
- package/lib/plugins.api/plugins.api.users.js.map +1 -0
- package/lib/plugins.api/plugins.api.web.d.ts +10 -0
- package/lib/plugins.api/plugins.api.web.d.ts.map +1 -0
- package/lib/plugins.api/plugins.api.web.js +3 -0
- package/lib/plugins.api/plugins.api.web.js.map +1 -0
- package/lib/provision/index.d.ts +23 -0
- package/lib/provision/index.d.ts.map +1 -0
- package/lib/provision/index.js +60 -0
- package/lib/provision/index.js.map +1 -0
- package/lib/provision/none.d.ts +3 -0
- package/lib/provision/none.d.ts.map +1 -0
- package/lib/provision/none.js +41 -0
- package/lib/provision/none.js.map +1 -0
- package/lib/provision/strategies/none.d.ts +9 -0
- package/lib/provision/strategies/none.d.ts.map +1 -0
- package/lib/provision/strategies/none.js +25 -0
- package/lib/provision/strategies/none.js.map +1 -0
- package/lib/provision/strategies/uid.d.ts +9 -0
- package/lib/provision/strategies/uid.d.ts.map +1 -0
- package/lib/provision/strategies/uid.js +28 -0
- package/lib/provision/strategies/uid.js.map +1 -0
- package/lib/provision/uid.d.ts +3 -0
- package/lib/provision/uid.d.ts.map +1 -0
- package/lib/provision/uid.js +43 -0
- package/lib/provision/uid.js.map +1 -0
- package/lib/routes/authenticationconfigurations.d.ts +3 -0
- package/lib/routes/authenticationconfigurations.d.ts.map +1 -0
- package/lib/routes/authenticationconfigurations.js +209 -0
- package/lib/routes/authenticationconfigurations.js.map +1 -0
- package/lib/routes/devices.d.ts +3 -0
- package/lib/routes/devices.d.ts.map +1 -0
- package/lib/routes/devices.js +201 -0
- package/lib/routes/devices.js.map +1 -0
- package/lib/routes/events.d.ts +47 -0
- package/lib/routes/events.d.ts.map +1 -0
- package/lib/routes/events.js +495 -0
- package/lib/routes/events.js.map +1 -0
- package/lib/routes/exports.d.ts +3 -0
- package/lib/routes/exports.d.ts.map +1 -0
- package/lib/routes/exports.js +204 -0
- package/lib/routes/exports.js.map +1 -0
- package/lib/routes/imports.d.ts +3 -0
- package/lib/routes/imports.d.ts.map +1 -0
- package/lib/routes/imports.js +41 -0
- package/lib/routes/imports.js.map +1 -0
- package/lib/routes/index.d.ts +3 -0
- package/lib/routes/index.d.ts.map +1 -0
- package/lib/routes/index.js +151 -0
- package/lib/routes/index.js.map +1 -0
- package/lib/routes/layers.d.ts +3 -0
- package/lib/routes/layers.d.ts.map +1 -0
- package/lib/routes/layers.js +433 -0
- package/lib/routes/layers.js.map +1 -0
- package/lib/routes/locations.d.ts +3 -0
- package/lib/routes/locations.d.ts.map +1 -0
- package/lib/routes/locations.js +124 -0
- package/lib/routes/locations.js.map +1 -0
- package/lib/routes/logins.d.ts +3 -0
- package/lib/routes/logins.d.ts.map +1 -0
- package/lib/routes/logins.js +64 -0
- package/lib/routes/logins.js.map +1 -0
- package/lib/routes/observations.d.ts +3 -0
- package/lib/routes/observations.d.ts.map +1 -0
- package/lib/routes/observations.js +363 -0
- package/lib/routes/observations.js.map +1 -0
- package/lib/routes/plugins.d.ts +3 -0
- package/lib/routes/plugins.d.ts.map +1 -0
- package/lib/routes/plugins.js +29 -0
- package/lib/routes/plugins.js.map +1 -0
- package/lib/routes/roles.d.ts +3 -0
- package/lib/routes/roles.d.ts.map +1 -0
- package/lib/routes/roles.js +64 -0
- package/lib/routes/roles.js.map +1 -0
- package/lib/routes/settings.d.ts +3 -0
- package/lib/routes/settings.d.ts.map +1 -0
- package/lib/routes/settings.js +21 -0
- package/lib/routes/settings.js.map +1 -0
- package/lib/routes/setup.d.ts +3 -0
- package/lib/routes/setup.d.ts.map +1 -0
- package/lib/routes/setup.js +90 -0
- package/lib/routes/setup.js.map +1 -0
- package/lib/routes/teams.d.ts +3 -0
- package/lib/routes/teams.d.ts.map +1 -0
- package/lib/routes/teams.js +213 -0
- package/lib/routes/teams.js.map +1 -0
- package/lib/routes/users.d.ts +3 -0
- package/lib/routes/users.d.ts.map +1 -0
- package/lib/routes/users.js +478 -0
- package/lib/routes/users.js.map +1 -0
- package/lib/schedule/export/export-task.d.ts +14 -0
- package/lib/schedule/export/export-task.d.ts.map +1 -0
- package/lib/schedule/export/export-task.js +70 -0
- package/lib/schedule/export/export-task.js.map +1 -0
- package/lib/schedule/index.d.ts +2 -0
- package/lib/schedule/index.d.ts.map +1 -0
- package/lib/schedule/index.js +27 -0
- package/lib/schedule/index.js.map +1 -0
- package/lib/security/key-mgt/key-mgt-factory.d.ts +7 -0
- package/lib/security/key-mgt/key-mgt-factory.d.ts.map +1 -0
- package/lib/security/key-mgt/key-mgt-factory.js +10 -0
- package/lib/security/key-mgt/key-mgt-factory.js.map +1 -0
- package/lib/security/key-mgt/plaintext-key-manager.d.ts +42 -0
- package/lib/security/key-mgt/plaintext-key-manager.d.ts.map +1 -0
- package/lib/security/key-mgt/plaintext-key-manager.js +52 -0
- package/lib/security/key-mgt/plaintext-key-manager.js.map +1 -0
- package/lib/security/responses/data-response.d.ts +13 -0
- package/lib/security/responses/data-response.d.ts.map +1 -0
- package/lib/security/responses/data-response.js +25 -0
- package/lib/security/responses/data-response.js.map +1 -0
- package/lib/security/secret-store-service.d.ts +39 -0
- package/lib/security/secret-store-service.d.ts.map +1 -0
- package/lib/security/secret-store-service.js +94 -0
- package/lib/security/secret-store-service.js.map +1 -0
- package/lib/security/storage/file-system-secret-store.d.ts +17 -0
- package/lib/security/storage/file-system-secret-store.d.ts.map +1 -0
- package/lib/security/storage/file-system-secret-store.js +46 -0
- package/lib/security/storage/file-system-secret-store.js.map +1 -0
- package/lib/security/storage/json-provider.d.ts +6 -0
- package/lib/security/storage/json-provider.d.ts.map +1 -0
- package/lib/security/storage/json-provider.js +17 -0
- package/lib/security/storage/json-provider.js.map +1 -0
- package/lib/security/utilities/secure-property-appender.d.ts +8 -0
- package/lib/security/utilities/secure-property-appender.d.ts.map +1 -0
- package/lib/security/utilities/secure-property-appender.js +39 -0
- package/lib/security/utilities/secure-property-appender.js.map +1 -0
- package/lib/transformers/authenticationconfiguration.d.ts +2 -0
- package/lib/transformers/authenticationconfiguration.d.ts.map +1 -0
- package/lib/transformers/authenticationconfiguration.js +22 -0
- package/lib/transformers/authenticationconfiguration.js.map +1 -0
- package/lib/transformers/export.d.ts +2 -0
- package/lib/transformers/export.d.ts.map +1 -0
- package/lib/transformers/export.js +13 -0
- package/lib/transformers/export.js.map +1 -0
- package/lib/transformers/geojson.d.ts +2 -0
- package/lib/transformers/geojson.d.ts.map +1 -0
- package/lib/transformers/geojson.js +24 -0
- package/lib/transformers/geojson.js.map +1 -0
- package/lib/transformers/layer.d.ts +2 -0
- package/lib/transformers/layer.d.ts.map +1 -0
- package/lib/transformers/layer.js +13 -0
- package/lib/transformers/layer.js.map +1 -0
- package/lib/transformers/observation.d.ts +2 -0
- package/lib/transformers/observation.d.ts.map +1 -0
- package/lib/transformers/observation.js +13 -0
- package/lib/transformers/observation.js.map +1 -0
- package/lib/transformers/pageinfo.d.ts +2 -0
- package/lib/transformers/pageinfo.d.ts.map +1 -0
- package/lib/transformers/pageinfo.js +27 -0
- package/lib/transformers/pageinfo.js.map +1 -0
- package/lib/transformers/user.d.ts +2 -0
- package/lib/transformers/user.d.ts.map +1 -0
- package/lib/transformers/user.js +21 -0
- package/lib/transformers/user.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/upload.d.ts +8 -0
- package/lib/upload.d.ts.map +1 -0
- package/lib/upload.js +30 -0
- package/lib/upload.js.map +1 -0
- package/lib/utilities/authenticationApiAppender.d.ts +10 -0
- package/lib/utilities/authenticationApiAppender.d.ts.map +1 -0
- package/lib/utilities/authenticationApiAppender.js +48 -0
- package/lib/utilities/authenticationApiAppender.js.map +1 -0
- package/lib/utilities/filterParser.d.ts +2 -0
- package/lib/utilities/filterParser.d.ts.map +1 -0
- package/lib/utilities/filterParser.js +87 -0
- package/lib/utilities/filterParser.js.map +1 -0
- package/lib/utilities/geopackage.d.ts +56 -0
- package/lib/utilities/geopackage.d.ts.map +1 -0
- package/lib/utilities/geopackage.js +335 -0
- package/lib/utilities/geopackage.js.map +1 -0
- package/lib/utilities/loader.d.ts +9 -0
- package/lib/utilities/loader.d.ts.map +1 -0
- package/lib/utilities/loader.js +25 -0
- package/lib/utilities/loader.js.map +1 -0
- package/lib/utilities/paging.d.ts +15 -0
- package/lib/utilities/paging.d.ts.map +1 -0
- package/lib/utilities/paging.js +56 -0
- package/lib/utilities/paging.js.map +1 -0
- package/lib/utilities/passwordValidator.d.ts +8 -0
- package/lib/utilities/passwordValidator.d.ts.map +1 -0
- package/lib/utilities/passwordValidator.js +175 -0
- package/lib/utilities/passwordValidator.js.map +1 -0
- package/lib/utilities/pbkdf2.d.ts +6 -0
- package/lib/utilities/pbkdf2.d.ts.map +1 -0
- package/lib/utilities/pbkdf2.js +79 -0
- package/lib/utilities/pbkdf2.js.map +1 -0
- package/lib/utilities/togeojson.d.ts +2 -0
- package/lib/utilities/togeojson.d.ts.map +1 -0
- package/lib/utilities/togeojson.js +308 -0
- package/lib/utilities/togeojson.js.map +1 -0
- package/lib/utilities/waitForMongooseConnection.d.ts +3 -0
- package/lib/utilities/waitForMongooseConnection.d.ts.map +1 -0
- package/lib/utilities/waitForMongooseConnection.js +34 -0
- package/lib/utilities/waitForMongooseConnection.js.map +1 -0
- package/lib/utilities/whitelist.d.ts +2 -0
- package/lib/utilities/whitelist.d.ts.map +1 -0
- package/lib/utilities/whitelist.js +18 -0
- package/lib/utilities/whitelist.js.map +1 -0
- package/lib/views/authentication.pug +10 -0
- package/lib/views/oauth.pug +12 -0
- package/lib/views/observation.pug +137 -0
- package/package.json +203 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { GeoPackage } from '@ngageoint/geopackage';
|
|
2
|
+
import { GeoPackageValidationError } from '@ngageoint/geopackage/dist/lib/validate/geoPackageValidate';
|
|
3
|
+
import { Feature, GeoJsonProperties, Geometry } from 'geojson';
|
|
4
|
+
export declare class GeoPackageUtility {
|
|
5
|
+
static readonly tileSize: number;
|
|
6
|
+
private static instance;
|
|
7
|
+
private styleKeyMap;
|
|
8
|
+
private cachedGeoPackageConnections;
|
|
9
|
+
private constructor();
|
|
10
|
+
static getInstance(): GeoPackageUtility;
|
|
11
|
+
/**
|
|
12
|
+
* Sets up an expiring geopackage connection wrapper.
|
|
13
|
+
* @param filePath
|
|
14
|
+
* @returns {*}
|
|
15
|
+
*/
|
|
16
|
+
private getExpiringGeoPackageConnection;
|
|
17
|
+
open(file: string): Promise<{
|
|
18
|
+
geoPackage?: GeoPackage;
|
|
19
|
+
validationErrors?: {
|
|
20
|
+
error: string;
|
|
21
|
+
fatal: boolean;
|
|
22
|
+
}[];
|
|
23
|
+
}>;
|
|
24
|
+
validate(file: string): Promise<GeoPackageValidationError[]>;
|
|
25
|
+
getTables(file: string): Promise<{
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
bbox: number[];
|
|
29
|
+
minZoom?: Number | undefined;
|
|
30
|
+
maxZoom?: Number | undefined;
|
|
31
|
+
}[]>;
|
|
32
|
+
optimize(path: string, progress?: Function): Promise<boolean>;
|
|
33
|
+
tile(layer: any, tableName: string, { stroke, width: lineWidth, fill }: {
|
|
34
|
+
stroke: string;
|
|
35
|
+
width: number;
|
|
36
|
+
fill: string;
|
|
37
|
+
}, { x, y, z }: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
z: number;
|
|
41
|
+
}): Promise<any>;
|
|
42
|
+
features(layer: any, tableName: string, { x, y, z }: {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
z: number;
|
|
46
|
+
}): Promise<{
|
|
47
|
+
type: string;
|
|
48
|
+
features: Feature<Geometry, GeoJsonProperties>[];
|
|
49
|
+
}>;
|
|
50
|
+
getClosestFeatures(layers: any[], lat: number, lng: number, { x, y, z }: {
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
z: number;
|
|
54
|
+
}): Promise<(Feature<Geometry, GeoJsonProperties> & import("@ngageoint/geopackage").ClosestFeature)[]>;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=geopackage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geopackage.d.ts","sourceRoot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M,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAC,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,EAAE,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAC,EAAE;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAyC/K,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAC,EAAE;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,iBAAiB,CAAC,EAAE,CAAA;KAAC,CAAC;IA2BhK,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAC,EAAE;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;CAiCtH"}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.GeoPackageUtility = void 0;
|
|
16
|
+
const geopackage_1 = require("@ngageoint/geopackage");
|
|
17
|
+
const path_1 = __importDefault(require("path"));
|
|
18
|
+
const env_1 = __importDefault(require("../environment/env"));
|
|
19
|
+
class ExpiringGeoPackageConnection {
|
|
20
|
+
constructor(filePath, expiryMs = 5000) {
|
|
21
|
+
this.featureTiles = {};
|
|
22
|
+
this.expiryId = undefined;
|
|
23
|
+
this.styleKey = 0;
|
|
24
|
+
this.creatingConnection = false;
|
|
25
|
+
this.filePath = filePath;
|
|
26
|
+
this.expiryMs = expiryMs;
|
|
27
|
+
}
|
|
28
|
+
expire() {
|
|
29
|
+
if (this.geoPackageConnection) {
|
|
30
|
+
console.log('xxxxxxxxxxxxxxxxxxxx Expiring the GeoPackage connection xxxxxxxxxxxxxxxxxxxx');
|
|
31
|
+
try {
|
|
32
|
+
this.geoPackageConnection.close();
|
|
33
|
+
Object.values(this.featureTiles).forEach(featureTile => {
|
|
34
|
+
try {
|
|
35
|
+
featureTile.cleanup();
|
|
36
|
+
// eslint-disable-next-line no-empty
|
|
37
|
+
}
|
|
38
|
+
catch (e) { }
|
|
39
|
+
});
|
|
40
|
+
this.featureTiles = {};
|
|
41
|
+
// eslint-disable-next-line no-empty
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
this.geoPackageConnection = undefined;
|
|
47
|
+
this.expiryId = undefined;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
startExpiry() {
|
|
52
|
+
this.expiryId = setTimeout(() => {
|
|
53
|
+
this.expire();
|
|
54
|
+
}, this.expiryMs);
|
|
55
|
+
}
|
|
56
|
+
cancelExpiry() {
|
|
57
|
+
if (this.expiryId) {
|
|
58
|
+
clearTimeout(this.expiryId);
|
|
59
|
+
this.expiryId = undefined;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
__delay__(timer) {
|
|
63
|
+
return new Promise(resolve => {
|
|
64
|
+
timer = timer || 2000;
|
|
65
|
+
setTimeout(function () {
|
|
66
|
+
resolve(null);
|
|
67
|
+
}, timer);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
;
|
|
71
|
+
accessConnection() {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
this.cancelExpiry();
|
|
74
|
+
// wait for a connection to the GeoPackage
|
|
75
|
+
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (!this.geoPackageConnection && !this.creatingConnection) {
|
|
77
|
+
this.creatingConnection = true;
|
|
78
|
+
console.log('Creating new connection to GeoPackage');
|
|
79
|
+
try {
|
|
80
|
+
this.geoPackageConnection = yield geopackage_1.GeoPackageAPI.open(this.filePath);
|
|
81
|
+
// this geopackage has issues apparently
|
|
82
|
+
if (!this.geoPackageConnection) {
|
|
83
|
+
console.log('no connection rejecting');
|
|
84
|
+
reject(new Error("Could not open the GeoPackage"));
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
resolve(this.geoPackageConnection);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
reject(error);
|
|
92
|
+
}
|
|
93
|
+
finally {
|
|
94
|
+
this.creatingConnection = false;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
// we could still be creating a connection so if that is the case, delay until it is created
|
|
99
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
while (this.creatingConnection) {
|
|
101
|
+
yield this.__delay__(100);
|
|
102
|
+
}
|
|
103
|
+
if (this.geoPackageConnection) {
|
|
104
|
+
resolve(this.geoPackageConnection);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
reject(new Error("Could not open the GeoPackage"));
|
|
108
|
+
}
|
|
109
|
+
}), 1);
|
|
110
|
+
console.log('Using cache connection to GeoPackage');
|
|
111
|
+
}
|
|
112
|
+
}));
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
accessFeatureTiles(tableName, maxFeatures) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
if (!this.featureTiles[tableName]) {
|
|
118
|
+
const geoPackageConnection = yield this.accessConnection();
|
|
119
|
+
this.featureTiles[tableName] = new geopackage_1.FeatureTiles(geoPackageConnection.getFeatureDao(tableName), 256, 256);
|
|
120
|
+
this.featureTiles[tableName].maxFeaturesPerTile = maxFeatures;
|
|
121
|
+
this.featureTiles[tableName].simplifyTolerance = 1.0;
|
|
122
|
+
this.featureTiles[tableName].maxFeaturesTileDraw = new geopackage_1.ShadedFeaturesTile();
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
this.cancelExpiry();
|
|
126
|
+
}
|
|
127
|
+
return this.featureTiles[tableName];
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
finished() {
|
|
131
|
+
this.startExpiry();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
class GeoPackageUtility {
|
|
135
|
+
constructor() {
|
|
136
|
+
// track style changes, anytime the style changes, the cached connection will need to be reset
|
|
137
|
+
this.styleKeyMap = {};
|
|
138
|
+
// cache geopackage connections
|
|
139
|
+
this.cachedGeoPackageConnections = {};
|
|
140
|
+
const pathToGeoPackageModule = path_1.default.resolve(path_1.default.dirname(require.resolve('@ngageoint/geopackage/package.json')));
|
|
141
|
+
(0, geopackage_1.setCanvasKitWasmLocateFile)(file => `${pathToGeoPackageModule}/dist/canvaskit/${file}`);
|
|
142
|
+
}
|
|
143
|
+
static getInstance() {
|
|
144
|
+
return this.instance || (this.instance = new GeoPackageUtility());
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Sets up an expiring geopackage connection wrapper.
|
|
148
|
+
* @param filePath
|
|
149
|
+
* @returns {*}
|
|
150
|
+
*/
|
|
151
|
+
getExpiringGeoPackageConnection(filePath) {
|
|
152
|
+
if (!this.cachedGeoPackageConnections[filePath]) {
|
|
153
|
+
console.log('Creating a new expiring connection');
|
|
154
|
+
this.cachedGeoPackageConnections[filePath] = new ExpiringGeoPackageConnection(filePath, 60000);
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
console.log('Using old expiring connection');
|
|
158
|
+
}
|
|
159
|
+
return this.cachedGeoPackageConnections[filePath];
|
|
160
|
+
}
|
|
161
|
+
open(file) {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
try {
|
|
164
|
+
const geoPackage = yield geopackage_1.GeoPackageAPI.open(file);
|
|
165
|
+
return {
|
|
166
|
+
geoPackage: geoPackage
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
catch (e) {
|
|
170
|
+
return {
|
|
171
|
+
validationErrors: [{
|
|
172
|
+
error: String(e),
|
|
173
|
+
fatal: true
|
|
174
|
+
}]
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
validate(file) {
|
|
180
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
+
let connection = this.getExpiringGeoPackageConnection(file);
|
|
182
|
+
const errors = (yield connection.accessConnection()).validate();
|
|
183
|
+
connection.finished();
|
|
184
|
+
return errors;
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
getTables(file) {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
+
let connection = this.getExpiringGeoPackageConnection(file);
|
|
190
|
+
console.log("opening the geopackage");
|
|
191
|
+
const geoPackage = yield connection.accessConnection();
|
|
192
|
+
const tables = geoPackage.contentsDao.getContentsForTableType('features').map(tableInfo => {
|
|
193
|
+
return {
|
|
194
|
+
name: tableInfo.table_name,
|
|
195
|
+
type: 'feature',
|
|
196
|
+
bbox: [tableInfo.min_x, tableInfo.min_y, tableInfo.max_x, tableInfo.max_y],
|
|
197
|
+
};
|
|
198
|
+
});
|
|
199
|
+
const tileTables = geoPackage.contentsDao.getContentsForTableType('tiles').map(tableInfo => {
|
|
200
|
+
const tileDao = geoPackage.getTileDao(tableInfo.table_name);
|
|
201
|
+
return {
|
|
202
|
+
name: tableInfo.table_name,
|
|
203
|
+
type: 'tile',
|
|
204
|
+
minZoom: tileDao.minWebMapZoom,
|
|
205
|
+
maxZoom: tileDao.maxWebMapZoom,
|
|
206
|
+
bbox: [tableInfo.min_x, tableInfo.min_y, tableInfo.max_x, tableInfo.max_y],
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
tables.concat(tileTables);
|
|
210
|
+
connection.finished();
|
|
211
|
+
return tables;
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
optimize(path, progress) {
|
|
215
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
216
|
+
return new Promise(resolve => {
|
|
217
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
218
|
+
const geoPackage = yield geopackage_1.GeoPackageAPI.open(path);
|
|
219
|
+
const featureTables = geoPackage.getFeatureTables();
|
|
220
|
+
let success = true;
|
|
221
|
+
for (let i = 0; i < featureTables.length; i++) {
|
|
222
|
+
const table = featureTables[i];
|
|
223
|
+
const featureDao = geoPackage.getFeatureDao(table);
|
|
224
|
+
success = success && (yield featureDao.index(progress));
|
|
225
|
+
}
|
|
226
|
+
geoPackage.close();
|
|
227
|
+
resolve(success);
|
|
228
|
+
}), 0);
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
// TODO: any needs to be GeoPackageSchema I think
|
|
233
|
+
tile(layer, tableName, { stroke, width: lineWidth, fill }, { x, y, z }) {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
+
const geopackagePath = path_1.default.join(env_1.default.layerBaseDirectory, layer.file.relativePath);
|
|
236
|
+
const table = layer.tables.find((table) => table.name === tableName);
|
|
237
|
+
if (!table)
|
|
238
|
+
throw new Error(`Table ${tableName} does not exist in the GeoPackage`);
|
|
239
|
+
let connection = this.getExpiringGeoPackageConnection(geopackagePath);
|
|
240
|
+
let tile;
|
|
241
|
+
switch (table.type) {
|
|
242
|
+
case 'tile':
|
|
243
|
+
const geopackage = yield connection.accessConnection();
|
|
244
|
+
tile = yield geopackage.xyzTile(table.name, x, y, z, GeoPackageUtility.tileSize, GeoPackageUtility.tileSize);
|
|
245
|
+
break;
|
|
246
|
+
case 'feature':
|
|
247
|
+
const ft = yield connection.accessFeatureTiles(table.name, 10000);
|
|
248
|
+
if (stroke) {
|
|
249
|
+
ft.pointColor = stroke;
|
|
250
|
+
ft.lineColor = stroke;
|
|
251
|
+
ft.polygonColor = stroke;
|
|
252
|
+
}
|
|
253
|
+
if (fill) {
|
|
254
|
+
ft.polygonFillColor = fill;
|
|
255
|
+
}
|
|
256
|
+
if (lineWidth) {
|
|
257
|
+
ft.pointRadius = lineWidth;
|
|
258
|
+
ft.polygonStrokeWidth = lineWidth;
|
|
259
|
+
ft.lineStrokeWidth = lineWidth;
|
|
260
|
+
}
|
|
261
|
+
ft.maxFeaturesPerTile = 10000;
|
|
262
|
+
const shadedFeaturesTile = new geopackage_1.ShadedFeaturesTile();
|
|
263
|
+
ft.maxFeaturesTileDraw = shadedFeaturesTile;
|
|
264
|
+
tile = yield ft.drawTile(x, y, z);
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
connection.finished();
|
|
268
|
+
return tile;
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
features(layer, tableName, { x, y, z }) {
|
|
272
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
273
|
+
const geopackagePath = path_1.default.join(env_1.default.layerBaseDirectory, layer.file.relativePath);
|
|
274
|
+
let connection = this.getExpiringGeoPackageConnection(geopackagePath);
|
|
275
|
+
const geopackage = yield connection.accessConnection();
|
|
276
|
+
if (!geopackage)
|
|
277
|
+
throw new Error('Cannot open geopackage');
|
|
278
|
+
const table = layer.tables.find((table) => table.name === tableName);
|
|
279
|
+
if (!table)
|
|
280
|
+
throw new Error(`Table ${tableName} does not exist in the GeoPackage`);
|
|
281
|
+
const features = yield geopackage.getGeoJSONFeaturesInTile(table.name, x, y, z);
|
|
282
|
+
connection.finished();
|
|
283
|
+
return {
|
|
284
|
+
type: 'FeatureCollection',
|
|
285
|
+
features: features
|
|
286
|
+
};
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
// public async vectorTile(layer: any, tableName: string, {x, y, z}: {x: number, y: number, z: number}) {
|
|
290
|
+
// const geopackagePath = path.join(environment.layerBaseDirectory, layer.file.relativePath);
|
|
291
|
+
// const geopackage = await this.getExpiringGeoPackageConnection(geoPackagePath).accessConnection()
|
|
292
|
+
// if (!geopackage) throw new Error('Cannot open geopackage');
|
|
293
|
+
// const table = layer.tables.find((table : any) => table.name === tableName);
|
|
294
|
+
// if (!table) throw new Error(`Table ${tableName} does not exist in the GeoPackage`);
|
|
295
|
+
// return GeoPackageAPI.getVectorTileProtobuf(geopackage, table.name, x, y, z);
|
|
296
|
+
// }
|
|
297
|
+
getClosestFeatures(layers, lat, lng, { x, y, z }) {
|
|
298
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
+
const closestFeatures = [];
|
|
300
|
+
for (let i = 0; i < layers.length; i++) {
|
|
301
|
+
const layer = layers[i].layer;
|
|
302
|
+
const tableName = layers[i].table;
|
|
303
|
+
const geopackagePath = path_1.default.join(env_1.default.layerBaseDirectory, layer.file.relativePath);
|
|
304
|
+
let connection = this.getExpiringGeoPackageConnection(geopackagePath);
|
|
305
|
+
const geopackage = yield connection.accessConnection();
|
|
306
|
+
if (!geopackage)
|
|
307
|
+
throw new Error('Cannot open geopackage');
|
|
308
|
+
const table = layer.tables.find((table) => table.name === tableName);
|
|
309
|
+
if (!table)
|
|
310
|
+
throw new Error(`Table ${tableName} does not exist in the GeoPackage`);
|
|
311
|
+
const closestFeature = geopackage.getClosestFeatureInXYZTile(table.name, x, y, z, lat, lng);
|
|
312
|
+
if (closestFeature) {
|
|
313
|
+
// @ts-ignore
|
|
314
|
+
closestFeature.layerId = layer._id;
|
|
315
|
+
closestFeatures.push(closestFeature);
|
|
316
|
+
}
|
|
317
|
+
connection.finished();
|
|
318
|
+
}
|
|
319
|
+
closestFeatures.sort((first, second) => {
|
|
320
|
+
var _a, _b;
|
|
321
|
+
if (first.coverage && second.coverage)
|
|
322
|
+
return 0;
|
|
323
|
+
if (first.coverage)
|
|
324
|
+
return 1;
|
|
325
|
+
if (second.coverage)
|
|
326
|
+
return -1;
|
|
327
|
+
return ((_a = first.distance) !== null && _a !== void 0 ? _a : 0) - ((_b = second.distance) !== null && _b !== void 0 ? _b : 0);
|
|
328
|
+
});
|
|
329
|
+
return closestFeatures;
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
exports.GeoPackageUtility = GeoPackageUtility;
|
|
334
|
+
GeoPackageUtility.tileSize = 256;
|
|
335
|
+
//# sourceMappingURL=geopackage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geopackage.js","sourceRoot":"","sources":["../../src/utilities/geopackage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAAgI;AAGhI,gDAAwB;AACxB,6DAA6C;AAE7C,MAAM,4BAA4B;IAShC,YAAY,QAAgB,EAAE,QAAQ,GAAG,IAAI;QAP7C,iBAAY,GAAkC,EAAE,CAAA;QAGhD,aAAQ,GAAoB,SAAS,CAAA;QACrC,aAAQ,GAAG,CAAC,CAAA;QACZ,uBAAkB,GAAG,KAAK,CAAA;QAGxB,IAAI,CAA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A,KAAK,CAAC,QAAQ,mCAAI,CAAC,CAAC,GAAG,CAAC,MAAA,MAAM,CAAC,QAAQ,mCAAI,CAAC,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;YAEH,OAAO,eAAe,CAAC;QACzB,CAAC;KAAA;;AA9MH,8CA+MC;AA9MiB,0BAAQ,GAAW,GAAG,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return an array of module paths located under the given directory. The
|
|
3
|
+
* result will not contain the index file or any source map or TypeScript
|
|
4
|
+
* declaration files. The returned paths are relative to the given parent
|
|
5
|
+
* directory.
|
|
6
|
+
* @param dir path to a directory containing JS or TS module files
|
|
7
|
+
*/
|
|
8
|
+
export declare function modulesPathsInDir(dir: string): string[];
|
|
9
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/utilities/loader.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAUvD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.modulesPathsInDir = void 0;
|
|
7
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
|
+
/**
|
|
9
|
+
* Return an array of module paths located under the given directory. The
|
|
10
|
+
* result will not contain the index file or any source map or TypeScript
|
|
11
|
+
* declaration files. The returned paths are relative to the given parent
|
|
12
|
+
* directory.
|
|
13
|
+
* @param dir path to a directory containing JS or TS module files
|
|
14
|
+
*/
|
|
15
|
+
function modulesPathsInDir(dir) {
|
|
16
|
+
return fs_extra_1.default.readdirSync(dir).filter(file => {
|
|
17
|
+
return !(file[0] === '.' ||
|
|
18
|
+
!/\.(ts|js|json)$/.test(file) ||
|
|
19
|
+
/^index\./.test(file) ||
|
|
20
|
+
/\.d\.ts/.test(file) ||
|
|
21
|
+
/\.map$/.test(file));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.modulesPathsInDir = modulesPathsInDir;
|
|
25
|
+
//# sourceMappingURL=loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/utilities/loader.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAE1B;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAAC,GAAW;IAC3C,OAAO,kBAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QACvC,OAAO,CAAC,CACN,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG;YACf,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;YAC7B,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;YACrB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;YACpB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CACpB,CAAA;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAVD,8CAUC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function page(count: any, query: any, options: any, dataKey: any, dataConverter: any): any;
|
|
2
|
+
export function countAndPage(countQuery: any, query: any, options: any, dataKey: any): any;
|
|
3
|
+
export class PageInfo {
|
|
4
|
+
links: {
|
|
5
|
+
base: string;
|
|
6
|
+
context: string;
|
|
7
|
+
next: null;
|
|
8
|
+
prev: null;
|
|
9
|
+
self: string;
|
|
10
|
+
};
|
|
11
|
+
limit: number;
|
|
12
|
+
size: number;
|
|
13
|
+
start: number;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=paging.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paging.d.ts","sourceRoot":"","sources":["../../src/utilities/paging.js"],"names":[],"mappings":"AAgBA,kGAoCC;AAED,2FAIC;AAzDD;IAEI;;;;;;MAMC;IACD,cAAc;IACd,aAAa;IACb,cAAc;CAEjB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
class PageInfo {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.links = {
|
|
5
|
+
base: '',
|
|
6
|
+
context: '',
|
|
7
|
+
next: null,
|
|
8
|
+
prev: null,
|
|
9
|
+
self: ''
|
|
10
|
+
};
|
|
11
|
+
this.limit = 0;
|
|
12
|
+
this.size = 0;
|
|
13
|
+
this.start = 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function page(count, query, options, dataKey, dataConverter) {
|
|
17
|
+
const sort = {};
|
|
18
|
+
if (options.sort) {
|
|
19
|
+
const json = JSON.parse(options.sort);
|
|
20
|
+
for (const [key, value] of Object.entries(json)) {
|
|
21
|
+
sort[key] = value;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const limit = Math.abs(options.limit) || 10;
|
|
25
|
+
const start = (Math.abs(options.start) || 0);
|
|
26
|
+
const page = Math.ceil(start / limit);
|
|
27
|
+
return query.sort(sort).limit(limit).skip(limit * page).exec().then(data => {
|
|
28
|
+
if (dataConverter) {
|
|
29
|
+
data = dataConverter(data);
|
|
30
|
+
}
|
|
31
|
+
const pageInfo = new PageInfo();
|
|
32
|
+
pageInfo.start = start;
|
|
33
|
+
pageInfo.limit = limit;
|
|
34
|
+
pageInfo[dataKey] = data;
|
|
35
|
+
pageInfo.size = data.length;
|
|
36
|
+
const estimatedNext = start + limit;
|
|
37
|
+
if (estimatedNext < count) {
|
|
38
|
+
pageInfo.links.next = estimatedNext;
|
|
39
|
+
}
|
|
40
|
+
if (start > 0) {
|
|
41
|
+
pageInfo.links.prev = Math.abs(options.start - options.limit);
|
|
42
|
+
}
|
|
43
|
+
return Promise.resolve(pageInfo);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function countAndPage(countQuery, query, options, dataKey) {
|
|
47
|
+
return countQuery.count().then(count => {
|
|
48
|
+
return page(count, query, options, dataKey, null);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
module.exports = {
|
|
52
|
+
page,
|
|
53
|
+
countAndPage,
|
|
54
|
+
PageInfo
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=paging.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paging.js","sourceRoot":"","sources":["../../src/utilities/paging.js"],"names":[],"mappings":";AACA,MAAM,QAAQ;IACZ;QACE,IAAI,CAAC,KAAK,GAAG;YACX,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,EAAE;SACT,CAAC;QACF,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACjB,CAAC;CACF;AAED,SAAS,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa;IACzD,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,IAAI,OAAO,CAAC,IAAI,EAAE;QAChB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEtC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC/C,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SACnB;KACF;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAC5C,MAAM,KAAK,GAAG,C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