@honua/app-platform 0.1.2-beta.0 → 0.1.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/collaboration/client.d.ts.map +1 -1
- package/connect-url-safety.d.ts +53 -0
- package/connect-url-safety.js +189 -0
- package/contract/discovery.d.ts +34 -0
- package/contract/discovery.d.ts.map +1 -1
- package/contract/index.d.ts +7 -5
- package/contract/index.d.ts.map +1 -1
- package/contract/index.js +3 -2
- package/contract/pmtiles.d.ts +10 -1
- package/contract/pmtiles.d.ts.map +1 -1
- package/contract/pmtiles.js +10 -2
- package/contract/protocol-module.d.ts +84 -9
- package/contract/protocol-module.d.ts.map +1 -1
- package/contract/query-filter-fes.d.ts +18 -0
- package/contract/query-filter-fes.d.ts.map +1 -0
- package/contract/query-filter-fes.js +122 -0
- package/contract/query-filter.d.ts +300 -0
- package/contract/query-filter.d.ts.map +1 -0
- package/contract/query-filter.js +883 -0
- package/contract/schema.d.ts +12 -0
- package/contract/schema.d.ts.map +1 -1
- package/contract/schema.js +34 -0
- package/contract/source-capability-support.d.ts.map +1 -1
- package/contract/source-capability-support.js +15 -3
- package/contract/source.d.ts +45 -25
- package/contract/source.d.ts.map +1 -1
- package/contract/source.js +719 -479
- package/contract/types.d.ts +87 -18
- package/contract/types.d.ts.map +1 -1
- package/contract/widget-source.d.ts.map +1 -1
- package/controls/basemap-switcher.d.ts +19 -11
- package/controls/basemap-switcher.d.ts.map +1 -1
- package/controls/basemap-switcher.js +58 -25
- package/controls/catalog.d.ts +105 -0
- package/controls/catalog.d.ts.map +1 -0
- package/controls/catalog.js +341 -0
- package/controls/element-utils.d.ts +9 -0
- package/controls/element-utils.d.ts.map +1 -1
- package/controls/element-utils.js +17 -0
- package/controls/index.d.ts +29 -8
- package/controls/index.d.ts.map +1 -1
- package/controls/index.js +26 -8
- package/controls/layer-list.d.ts +13 -5
- package/controls/layer-list.d.ts.map +1 -1
- package/controls/layer-list.js +72 -15
- package/controls/legend.d.ts +32 -5
- package/controls/legend.d.ts.map +1 -1
- package/controls/legend.js +95 -25
- package/controls/qualification.d.ts +152 -0
- package/controls/qualification.d.ts.map +1 -0
- package/controls/qualification.js +1265 -0
- package/controls/registry.d.ts +104 -0
- package/controls/registry.d.ts.map +1 -0
- package/controls/registry.js +150 -0
- package/controls/swipe-control.d.ts +6 -1
- package/controls/swipe-control.d.ts.map +1 -1
- package/controls/swipe-control.js +82 -20
- package/core/client.d.ts +45 -21
- package/core/client.d.ts.map +1 -1
- package/core/client.js +224 -46
- package/core/error-classifications.d.ts +6 -0
- package/core/error-classifications.d.ts.map +1 -1
- package/core/error-classifications.js +6 -0
- package/core/error-code-registry.d.ts +6 -0
- package/core/error-code-registry.d.ts.map +1 -1
- package/core/error-code-registry.js +6 -0
- package/core/error-envelope.js +2 -0
- package/core/errors.d.ts +1 -1
- package/core/errors.js +1 -1
- package/core/geoparquet-sql.d.ts +68 -4
- package/core/geoparquet-sql.d.ts.map +1 -1
- package/core/geoparquet-sql.js +325 -8
- package/core/odata-write-codec.d.ts.map +1 -1
- package/core/odata-write-codec.js +0 -1
- package/core/odata.d.ts +6 -0
- package/core/odata.d.ts.map +1 -1
- package/core/odata.js +6 -1
- package/core/ogc-processes.d.ts +182 -25
- package/core/ogc-processes.d.ts.map +1 -1
- package/core/ogc-processes.js +602 -30
- package/core/process-runner.d.ts +8 -1
- package/core/process-runner.d.ts.map +1 -1
- package/core/process-runner.js +1 -0
- package/core/protocol-transport.d.ts +2 -0
- package/core/protocol-transport.d.ts.map +1 -1
- package/core/stac.d.ts +31 -0
- package/core/stac.d.ts.map +1 -1
- package/core/stac.js +136 -19
- package/core/surfaces.d.ts.map +1 -1
- package/core/surfaces.js +273 -68
- package/core/types.d.ts +123 -9
- package/core/types.d.ts.map +1 -1
- package/core/wfs-axis-order.d.ts +18 -0
- package/core/wfs-axis-order.d.ts.map +1 -0
- package/core/wfs-axis-order.js +108 -0
- package/core/wfs-capabilities.d.ts +65 -24
- package/core/wfs-capabilities.d.ts.map +1 -1
- package/core/wfs-capabilities.js +237 -27
- package/core/wfs-filter.d.ts +26 -3
- package/core/wfs-filter.d.ts.map +1 -1
- package/core/wfs-filter.js +48 -53
- package/core/wfs-protocol-error.d.ts +12 -0
- package/core/wfs-protocol-error.d.ts.map +1 -0
- package/core/wfs-protocol-error.js +13 -0
- package/core/wfs.d.ts +53 -1
- package/core/wfs.d.ts.map +1 -1
- package/core/wfs.js +251 -29
- package/core/wms-feature-info.d.ts +92 -0
- package/core/wms-feature-info.d.ts.map +1 -0
- package/core/wms-feature-info.js +285 -0
- package/core/wms.d.ts +9 -0
- package/core/wms.d.ts.map +1 -1
- package/core/wms.js +17 -5
- package/esri-compat/event-bus.d.ts +20 -0
- package/esri-compat/event-bus.d.ts.map +1 -1
- package/esri-compat/feature-filter.d.ts +46 -1
- package/esri-compat/feature-filter.d.ts.map +1 -1
- package/esri-compat/feature-filter.js +49 -0
- package/esri-compat/geojson-layer.d.ts +4 -2
- package/esri-compat/geojson-layer.d.ts.map +1 -1
- package/esri-compat/geojson-layer.js +4 -2
- package/esri-compat/identity-manager.js +2 -2
- package/esri-compat/imagery-layer.d.ts +2 -1
- package/esri-compat/imagery-layer.d.ts.map +1 -1
- package/esri-compat/imagery-layer.js +2 -1
- package/esri-compat/layer-list.d.ts +8 -1
- package/esri-compat/layer-list.d.ts.map +1 -1
- package/esri-compat/layer-list.js +11 -4
- package/esri-compat/legend.d.ts.map +1 -1
- package/esri-compat/legend.js +1 -1
- package/esri-compat/locator.d.ts +297 -0
- package/esri-compat/locator.d.ts.map +1 -0
- package/esri-compat/locator.js +579 -0
- package/esri-compat/map-image-layer.d.ts.map +1 -1
- package/esri-compat/map-view.d.ts.map +1 -1
- package/esri-compat/map-view.js +1 -1
- package/esri-compat/scene-view.d.ts.map +1 -1
- package/esri-compat/time-slider.d.ts +29 -0
- package/esri-compat/time-slider.d.ts.map +1 -1
- package/esri-compat/time-slider.js +117 -0
- package/esri-compat/wfs-layer.d.ts +2 -1
- package/esri-compat/wfs-layer.d.ts.map +1 -1
- package/esri-compat/wfs-layer.js +2 -1
- package/esri-compat/widget-host.d.ts +42 -6
- package/esri-compat/widget-host.d.ts.map +1 -1
- package/esri-compat/widget-host.js +99 -10
- package/generated-app/projection.d.ts.map +1 -1
- package/generated-app/runtime.d.ts.map +1 -1
- package/map/data-to-map-bridge.d.ts +1 -1
- package/map/data-to-map-bridge.d.ts.map +1 -1
- package/map/data-to-map-bridge.js +1 -2
- package/map/honua-map.d.ts.map +1 -1
- package/map/honua-map.js +1 -1
- package/map/index.d.ts +2 -0
- package/map/index.d.ts.map +1 -1
- package/map/index.js +2 -0
- package/map/realtime-reconciliation-adapter.d.ts +98 -0
- package/map/realtime-reconciliation-adapter.d.ts.map +1 -0
- package/map/realtime-reconciliation-adapter.js +84 -0
- package/map/temporal-playback.d.ts +25 -0
- package/map/temporal-playback.d.ts.map +1 -1
- package/map/temporal-playback.js +29 -1
- package/operator/workspace/workspace.d.ts.map +1 -1
- package/operator/workspace/workspace.js +0 -2
- package/package.json +4 -3
- package/query-planner/canonical-filter.d.ts +30 -0
- package/query-planner/canonical-filter.d.ts.map +1 -0
- package/query-planner/canonical-filter.js +30 -0
- package/query-planner/columnar-plan.d.ts +63 -0
- package/query-planner/columnar-plan.d.ts.map +1 -0
- package/query-planner/columnar-plan.js +94 -0
- package/query-planner/diagnostics.d.ts +3 -3
- package/query-planner/diagnostics.d.ts.map +1 -1
- package/query-planner/diagnostics.js +17 -4
- package/query-planner/duckdb.d.ts.map +1 -1
- package/query-planner/duckdb.js +16 -2
- package/query-planner/execution-context.d.ts.map +1 -1
- package/query-planner/execution-context.js +3 -1
- package/query-planner/executor.d.ts.map +1 -1
- package/query-planner/executor.js +7 -1
- package/query-planner/geoservices.d.ts.map +1 -1
- package/query-planner/geoservices.js +24 -5
- package/query-planner/grpc.d.ts.map +1 -1
- package/query-planner/grpc.js +29 -5
- package/query-planner/index.d.ts +20 -5
- package/query-planner/index.d.ts.map +1 -1
- package/query-planner/index.js +16 -3
- package/query-planner/ir.d.ts +6 -1
- package/query-planner/ir.d.ts.map +1 -1
- package/query-planner/ir.js +63 -1
- package/query-planner/odata-protocol-module.d.ts +54 -0
- package/query-planner/odata-protocol-module.d.ts.map +1 -0
- package/query-planner/odata-protocol-module.js +199 -0
- package/query-planner/odata-v1.d.ts +23 -0
- package/query-planner/odata-v1.d.ts.map +1 -0
- package/query-planner/odata-v1.js +202 -0
- package/query-planner/odata.d.ts +0 -3
- package/query-planner/odata.d.ts.map +1 -1
- package/query-planner/odata.js +0 -143
- package/query-planner/ogc-features.d.ts.map +1 -1
- package/query-planner/ogc-features.js +23 -1
- package/query-planner/planner.d.ts +2 -2
- package/query-planner/planner.d.ts.map +1 -1
- package/query-planner/planner.js +146 -27
- package/query-planner/representation.d.ts +59 -0
- package/query-planner/representation.d.ts.map +1 -0
- package/query-planner/representation.js +140 -0
- package/query-planner/types.d.ts +153 -3
- package/query-planner/types.d.ts.map +1 -1
- package/query-planner/wfs-protocol-module.d.ts +57 -0
- package/query-planner/wfs-protocol-module.d.ts.map +1 -0
- package/query-planner/wfs-protocol-module.js +731 -0
- package/query-planner/wfs-v1.d.ts +41 -0
- package/query-planner/wfs-v1.d.ts.map +1 -0
- package/query-planner/wfs-v1.js +366 -0
- package/query-planner/wfs.d.ts +1 -3
- package/query-planner/wfs.d.ts.map +1 -1
- package/query-planner/wfs.js +1 -70
- package/realtime/checkpoint-store.d.ts +206 -0
- package/realtime/checkpoint-store.d.ts.map +1 -0
- package/realtime/checkpoint-store.js +504 -0
- package/realtime/honua-server.d.ts +8 -0
- package/realtime/honua-server.d.ts.map +1 -1
- package/realtime/honua-server.js +123 -14
- package/realtime/index.d.ts +4 -0
- package/realtime/index.d.ts.map +1 -1
- package/realtime/index.js +2 -0
- package/realtime/reconciliation.d.ts +245 -0
- package/realtime/reconciliation.d.ts.map +1 -0
- package/realtime/reconciliation.js +377 -0
- package/realtime/resumable-transport.d.ts.map +1 -1
- package/realtime/sse.d.ts.map +1 -1
- package/realtime/websocket.d.ts.map +1 -1
- package/realtime/wire.d.ts +2 -1
- package/realtime/wire.d.ts.map +1 -1
- package/realtime/wire.js +24 -8
- package/replica-sync/errors.d.ts +19 -1
- package/replica-sync/errors.d.ts.map +1 -1
- package/replica-sync/errors.js +16 -0
- package/replica-sync/geoservices.d.ts +260 -0
- package/replica-sync/geoservices.d.ts.map +1 -0
- package/replica-sync/geoservices.js +1093 -0
- package/replica-sync/index.d.ts +5 -1
- package/replica-sync/index.d.ts.map +1 -1
- package/replica-sync/index.js +3 -1
- package/replica-sync/transport-conformance.d.ts +58 -0
- package/replica-sync/transport-conformance.d.ts.map +1 -0
- package/replica-sync/transport-conformance.js +265 -0
- package/replica-sync/types.d.ts +22 -0
- package/replica-sync/types.d.ts.map +1 -1
- package/runtime/index.d.ts +6 -2
- package/runtime/index.d.ts.map +1 -1
- package/runtime/index.js +3 -1
- package/runtime/load-package.d.ts +24 -0
- package/runtime/load-package.d.ts.map +1 -1
- package/runtime/load-package.js +45 -1
- package/runtime/maplibre-renderer.d.ts +11 -0
- package/runtime/maplibre-renderer.d.ts.map +1 -1
- package/runtime/maplibre-renderer.js +32 -7
- package/runtime/offline-region-protocol.d.ts +73 -0
- package/runtime/offline-region-protocol.d.ts.map +1 -0
- package/runtime/offline-region-protocol.js +63 -0
- package/runtime/offline-region-style.d.ts +78 -0
- package/runtime/offline-region-style.d.ts.map +1 -0
- package/runtime/offline-region-style.js +147 -0
- package/runtime/pmtiles-protocol.d.ts +7 -8
- package/runtime/pmtiles-protocol.d.ts.map +1 -1
- package/runtime/pmtiles-protocol.js +19 -66
- package/runtime/protocol-registry.d.ts +55 -0
- package/runtime/protocol-registry.d.ts.map +1 -0
- package/runtime/protocol-registry.js +103 -0
- package/runtime/runtime.d.ts +2 -0
- package/runtime/runtime.d.ts.map +1 -1
- package/runtime/runtime.js +6 -1
- package/scene-workspace/analysis-widgets.d.ts +4 -2
- package/scene-workspace/analysis-widgets.d.ts.map +1 -1
- package/scene-workspace/analysis-widgets.js +4 -2
- package/scene-workspace/camera-correspondence.d.ts +151 -0
- package/scene-workspace/camera-correspondence.d.ts.map +1 -0
- package/scene-workspace/camera-correspondence.js +220 -0
- package/scene-workspace/cesium-adapter.d.ts +230 -29
- package/scene-workspace/cesium-adapter.d.ts.map +1 -1
- package/scene-workspace/cesium-adapter.js +741 -56
- package/scene-workspace/cesium-mount.d.ts +205 -0
- package/scene-workspace/cesium-mount.d.ts.map +1 -0
- package/scene-workspace/cesium-mount.js +392 -0
- package/scene-workspace/cesium-scene-owner.d.ts +160 -0
- package/scene-workspace/cesium-scene-owner.d.ts.map +1 -0
- package/scene-workspace/cesium-scene-owner.js +205 -0
- package/scene-workspace/cesium-state-sync.d.ts +101 -0
- package/scene-workspace/cesium-state-sync.d.ts.map +1 -0
- package/scene-workspace/cesium-state-sync.js +432 -0
- package/scene-workspace/cesium-time.d.ts +346 -0
- package/scene-workspace/cesium-time.d.ts.map +1 -0
- package/scene-workspace/cesium-time.js +403 -0
- package/scene-workspace/index.d.ts +42 -10
- package/scene-workspace/index.d.ts.map +1 -1
- package/scene-workspace/index.js +32 -7
- package/scene-workspace/maplibre-state-sync.d.ts +112 -0
- package/scene-workspace/maplibre-state-sync.d.ts.map +1 -0
- package/scene-workspace/maplibre-state-sync.js +400 -0
- package/scene-workspace/primitives.d.ts +237 -3
- package/scene-workspace/primitives.d.ts.map +1 -1
- package/scene-workspace/primitives.js +1087 -17
- package/scene-workspace/scene-discovery.d.ts +5 -2
- package/scene-workspace/scene-discovery.d.ts.map +1 -1
- package/scene-workspace/scene-discovery.js +5 -2
- package/scene-workspace/scene-view.d.ts +5 -2
- package/scene-workspace/scene-view.d.ts.map +1 -1
- package/scene-workspace/scene-view.js +5 -2
- package/scene-workspace/source-to-cesium.d.ts +141 -8
- package/scene-workspace/source-to-cesium.d.ts.map +1 -1
- package/scene-workspace/source-to-cesium.js +497 -72
- package/scene-workspace/state-sync-port-kit.d.ts +156 -0
- package/scene-workspace/state-sync-port-kit.d.ts.map +1 -0
- package/scene-workspace/state-sync-port-kit.js +319 -0
- package/scene-workspace/state-sync.d.ts +34 -1
- package/scene-workspace/state-sync.d.ts.map +1 -1
- package/scene-workspace/state-sync.js +48 -0
- package/scene-workspace/types.d.ts +8 -0
- package/scene-workspace/types.d.ts.map +1 -1
- package/scene-workspace/types.js +2 -0
- package/scene-workspace/workspace.d.ts +12 -1
- package/scene-workspace/workspace.d.ts.map +1 -1
- package/scene-workspace/workspace.js +13 -0
- package/studio/index.d.ts +24 -7
- package/studio/index.d.ts.map +1 -1
- package/studio/index.js +21 -7
- package/studio/lifecycle-client.d.ts +164 -0
- package/studio/lifecycle-client.d.ts.map +1 -0
- package/studio/lifecycle-client.js +299 -0
- package/studio/lifecycle-errors.d.ts +91 -0
- package/studio/lifecycle-errors.d.ts.map +1 -0
- package/studio/lifecycle-errors.js +77 -0
- package/studio/lifecycle-types.d.ts +321 -0
- package/studio/lifecycle-types.d.ts.map +1 -0
- package/studio/lifecycle-types.js +22 -0
- package/web-components/controller.d.ts.map +1 -1
- package/web-components/csp-styles.d.ts +6 -0
- package/web-components/csp-styles.d.ts.map +1 -0
- package/web-components/csp-styles.js +53 -0
- package/web-components/elements.d.ts +158 -2
- package/web-components/elements.d.ts.map +1 -1
- package/web-components/elements.js +1302 -215
- package/web-components/export-redaction.d.ts +252 -0
- package/web-components/export-redaction.d.ts.map +1 -0
- package/web-components/export-redaction.js +588 -0
- package/web-components/export.d.ts +417 -0
- package/web-components/export.d.ts.map +1 -0
- package/web-components/export.js +719 -0
- package/web-components/feature-editor-model.d.ts +265 -0
- package/web-components/feature-editor-model.d.ts.map +1 -0
- package/web-components/feature-editor-model.js +438 -0
- package/web-components/feature-editor-sketch.d.ts +125 -0
- package/web-components/feature-editor-sketch.d.ts.map +1 -0
- package/web-components/feature-editor-sketch.js +194 -0
- package/web-components/feature-editor-workflow.d.ts +286 -0
- package/web-components/feature-editor-workflow.d.ts.map +1 -0
- package/web-components/feature-editor-workflow.js +889 -0
- package/web-components/feature-editor.d.ts +83 -0
- package/web-components/feature-editor.d.ts.map +1 -0
- package/web-components/feature-editor.js +829 -0
- package/web-components/feature-table-engine.d.ts +465 -0
- package/web-components/feature-table-engine.d.ts.map +1 -0
- package/web-components/feature-table-engine.js +1360 -0
- package/web-components/feature-table-view.d.ts +95 -0
- package/web-components/feature-table-view.d.ts.map +1 -0
- package/web-components/feature-table-view.js +343 -0
- package/web-components/index.d.ts +34 -3
- package/web-components/index.d.ts.map +1 -1
- package/web-components/index.js +35 -2
- package/web-components/maplibre-renderer.d.ts.map +1 -1
- package/web-components/maplibre-renderer.js +13 -4
- package/web-components/measurement.d.ts +3 -1
- package/web-components/measurement.d.ts.map +1 -1
- package/web-components/measurement.js +62 -18
- package/web-components/time-slider.d.ts +122 -0
- package/web-components/time-slider.d.ts.map +1 -0
- package/web-components/time-slider.js +740 -0
- package/web-components/types.d.ts +310 -0
- package/web-components/types.d.ts.map +1 -1
- package/webmap/convert-label.js +0 -1
- package/webmap/convert-symbol.d.ts.map +1 -1
package/replica-sync/index.d.ts
CHANGED
|
@@ -14,9 +14,13 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export { HonuaReplicaSyncClient, createHonuaReplicaSync } from "./client.js";
|
|
16
16
|
export type { HonuaReplicaSyncClientOptions } from "./client.js";
|
|
17
|
-
export { HonuaReplicaSyncError, isHonuaReplicaSyncError, isUnsupportedReplicaSyncError, } from "./errors.js";
|
|
17
|
+
export { HonuaReplicaSyncError, isHonuaReplicaSyncError, isReplicaSyncCapabilityRefusal, isUnsupportedReplicaSyncError, } from "./errors.js";
|
|
18
18
|
export type { ReplicaSyncErrorCode } from "./errors.js";
|
|
19
19
|
export { FixtureReplicaSyncTransport, createFixtureReplicaSyncTransport, defaultSeed as defaultReplicaSyncSeed, } from "./fixture.js";
|
|
20
20
|
export type { FixtureReplicaSyncSeed, FixtureReplicaSyncTransportOptions, } from "./fixture.js";
|
|
21
|
+
export { GEOSERVICES_EDIT_ERROR_CODES, GEOSERVICES_REPLICA_SYNC_CAPABILITY, GEOSERVICES_REPLICA_SYNC_PROTOCOL, GEOSERVICES_SYNC_CAPABILITY_TOKEN, GeoServicesReplicaSyncTransport, classifyGeoServicesEditResult, createGeoServicesReplicaSyncTransport, } from "./geoservices.js";
|
|
22
|
+
export type { GeoServicesConflictClassification, GeoServicesCreateReplicaRequest, GeoServicesCreateReplicaResult, GeoServicesEditKind, GeoServicesEditOutcome, GeoServicesEditResultClassification, GeoServicesLayerEdits, GeoServicesReplicaSyncHttpPort, GeoServicesReplicaSyncTransportOptions, GeoServicesSyncConflict, GeoServicesSyncDirection, GeoServicesSynchronizeRequest, GeoServicesSynchronizeResult, } from "./geoservices.js";
|
|
23
|
+
export { HONUA_REPLICA_SYNC_TRANSPORT_CONFORMANCE_KIND, HONUA_REPLICA_SYNC_TRANSPORT_CONFORMANCE_VERSION, REPLICA_SYNC_TRANSPORT_CONFORMANCE_CASES, runReplicaSyncTransportConformance, } from "./transport-conformance.js";
|
|
24
|
+
export type { ReplicaSyncTransportConformanceCaseResultV1, ReplicaSyncTransportConformanceOptions, ReplicaSyncTransportConformanceReportV1, } from "./transport-conformance.js";
|
|
21
25
|
export type { BatchConflictResolutionResult, ConflictFeatureState, FeatureId, SourceId, ConflictResolutionChoice, ConflictResolutionOption, DisconnectedReplica, FieldConflict, GeometryConflictSummary, ListConflictsRequest, ListReplicasRequest, ReplicaConflictPolicy, ReplicaId, ReplicaState, ReplicaSyncCapabilities, ReplicaSyncDirection, ReplicaSyncStatus, ReplicaSyncTransport, ServerGenerationCursor, SyncActor, SyncConflictDetail, SyncConflictId, SyncConflictKind, SyncConflictOperation, SyncConflictResolution, SyncConflictResolutionRecord, SyncConflictStatus, SyncConflictSummary, SyncDevice, SyncPage, } from "./types.js";
|
|
22
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/replica-sync/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC7E,YAAY,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,EACjC,WAAW,IAAI,sBAAsB,GACtC,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,sBAAsB,EACtB,kCAAkC,GACnC,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,6BAA6B,EAC7B,oBAAoB,EACpB,SAAS,EACT,QAAQ,EACR,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,aAAa,EACb,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,SAAS,EACT,YAAY,EACZ,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,4BAA4B,EAC5B,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,QAAQ,GACT,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/replica-sync/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC7E,YAAY,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,aAA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GED
|
@@ -13,5 +13,7 @@
|
|
|
13
13
|
* @module
|
|
14
14
|
*/
|
|
15
15
|
export { HonuaReplicaSyncClient, createHonuaReplicaSync } from "./client.js";
|
|
16
|
-
export { HonuaReplicaSyncError, isHonuaReplicaSyncError, isUnsupportedReplicaSyncError, } from "./errors.js";
|
|
16
|
+
export { HonuaReplicaSyncError, isHonuaReplicaSyncError, isReplicaSyncCapabilityRefusal, isUnsupportedReplicaSyncError, } from "./errors.js";
|
|
17
17
|
export { FixtureReplicaSyncTransport, createFixtureReplicaSyncTransport, defaultSeed as defaultReplicaSyncSeed, } from "./fixture.js";
|
|
18
|
+
export { GEOSERVICES_EDIT_ERROR_CODES, GEOSERVICES_REPLICA_SYNC_CAPABILITY, GEOSERVICES_REPLICA_SYNC_PROTOCOL, GEOSERVICES_SYNC_CAPABILITY_TOKEN, GeoServicesReplicaSyncTransport, classifyGeoServicesEditResult, createGeoServicesReplicaSyncTransport, } from "./geoservices.js";
|
|
19
|
+
export { HONUA_REPLICA_SYNC_TRANSPORT_CONFORMANCE_KIND, HONUA_REPLICA_SYNC_TRANSPORT_CONFORMANCE_VERSION, REPLICA_SYNC_TRANSPORT_CONFORMANCE_CASES, runReplicaSyncTransportConformance, } from "./transport-conformance.js";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One conformance suite every {@link ReplicaSyncTransport} must pass.
|
|
3
|
+
*
|
|
4
|
+
* `FixtureReplicaSyncTransport` defines the reference semantics and
|
|
5
|
+
* `GeoServicesReplicaSyncTransport` speaks to a real server; the suite is what
|
|
6
|
+
* proves the two agree on vocabulary rather than merely on type shape. It is
|
|
7
|
+
* written as plain async functions rather than against a test framework so the
|
|
8
|
+
* identical cases can run under vitest, inside a live evidence lane, or from a
|
|
9
|
+
* downstream package verifying its own transport.
|
|
10
|
+
*
|
|
11
|
+
* The cases assert only what a transport can honestly guarantee: identity,
|
|
12
|
+
* typed refusals, and the composition points other contracts depend on. They
|
|
13
|
+
* deliberately do **not** assert seeded values, counts, or ordering, because
|
|
14
|
+
* those are properties of a deployment's data, not of the contract.
|
|
15
|
+
*
|
|
16
|
+
* @experimental
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
import type { ReplicaSyncTransport } from "./types.js";
|
|
20
|
+
export declare const HONUA_REPLICA_SYNC_TRANSPORT_CONFORMANCE_KIND: "honua.replica-sync-transport-conformance";
|
|
21
|
+
export declare const HONUA_REPLICA_SYNC_TRANSPORT_CONFORMANCE_VERSION: "1.0";
|
|
22
|
+
export interface ReplicaSyncTransportConformanceOptions {
|
|
23
|
+
/** The transport under test. Called once per case; may return a fresh instance. */
|
|
24
|
+
readonly createTransport: () => ReplicaSyncTransport | Promise<ReplicaSyncTransport>;
|
|
25
|
+
/** Optional teardown for the transport a case finished with. */
|
|
26
|
+
readonly disposeTransport?: (transport: ReplicaSyncTransport) => void | Promise<void>;
|
|
27
|
+
/** A dataset the deployment offers disconnected sync for. */
|
|
28
|
+
readonly datasetId: string;
|
|
29
|
+
/**
|
|
30
|
+
* A dataset the deployment does **not** offer disconnected sync for. When
|
|
31
|
+
* omitted the capability-refusal case is reported as skipped rather than
|
|
32
|
+
* silently passing.
|
|
33
|
+
*/
|
|
34
|
+
readonly unsupportedDatasetId?: string;
|
|
35
|
+
/** Human label recorded on the report (for example `geoservices`). */
|
|
36
|
+
readonly label?: string;
|
|
37
|
+
/** Run a subset by name. Unknown names fail the report rather than passing silently. */
|
|
38
|
+
readonly only?: readonly string[];
|
|
39
|
+
}
|
|
40
|
+
export interface ReplicaSyncTransportConformanceCaseResultV1 {
|
|
41
|
+
readonly name: string;
|
|
42
|
+
readonly status: "passed" | "failed" | "skipped";
|
|
43
|
+
readonly detail?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface ReplicaSyncTransportConformanceReportV1 {
|
|
46
|
+
readonly kind: typeof HONUA_REPLICA_SYNC_TRANSPORT_CONFORMANCE_KIND;
|
|
47
|
+
readonly version: typeof HONUA_REPLICA_SYNC_TRANSPORT_CONFORMANCE_VERSION;
|
|
48
|
+
readonly label?: string;
|
|
49
|
+
readonly total: number;
|
|
50
|
+
readonly passed: number;
|
|
51
|
+
readonly failed: number;
|
|
52
|
+
readonly skipped: number;
|
|
53
|
+
readonly cases: readonly ReplicaSyncTransportConformanceCaseResultV1[];
|
|
54
|
+
}
|
|
55
|
+
/** Names of every case in the suite, in execution order. */
|
|
56
|
+
export declare const REPLICA_SYNC_TRANSPORT_CONFORMANCE_CASES: readonly string[];
|
|
57
|
+
export declare function runReplicaSyncTransportConformance(options: ReplicaSyncTransportConformanceOptions): Promise<ReplicaSyncTransportConformanceReportV1>;
|
|
58
|
+
//# sourceMappingURL=transport-conformance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport-conformance.d.ts","sourceRoot":"","sources":["../../../src/replica-sync/transport-conformance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAA2D,MAAM,YAAY,CAAC;AAEhH,eAAO,MAAM,6CAA6C,EAAG,0CAAmD,CAAC;AACjH,eAAO,MAAM,gDAAgD,EAAG,KAAc,CAAC;AAE/E,MAAM,WAAW,sCAAsC;IACrD,mFAAmF;IACnF,QAAQ,CAAC,eAAe,EAAE,MAAM,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACrF,gEAAgE;IAChE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,oBAAoB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtF,6DAA6D;IAC7D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC,sEAAsE;IACtE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,2CAA2C;IAC1D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,IAAI,EAAE,OAAO,6CAA6C,CAAC;IACpE,QAAQ,CAAC,OAAO,EAAE,OAAO,gDAAgD,CAAC;IAC1E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,2CAA2C,EAAE,CAAC;CACxE;AAcD,4DAA4D;AAC5D,eAAO,MAAM,wCAAwC,EAAE,SAAS,MAAM,EAYrE,CAAC;AAgLF,wBAAsB,kCAAkC,CACtD,OAAO,EAAE,sCAAsC,GAC9C,OAAO,CAAC,uCAAuC,CAAC,CA4ClD"}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One conformance suite every {@link ReplicaSyncTransport} must pass.
|
|
3
|
+
*
|
|
4
|
+
* `FixtureReplicaSyncTransport` defines the reference semantics and
|
|
5
|
+
* `GeoServicesReplicaSyncTransport` speaks to a real server; the suite is what
|
|
6
|
+
* proves the two agree on vocabulary rather than merely on type shape. It is
|
|
7
|
+
* written as plain async functions rather than against a test framework so the
|
|
8
|
+
* identical cases can run under vitest, inside a live evidence lane, or from a
|
|
9
|
+
* downstream package verifying its own transport.
|
|
10
|
+
*
|
|
11
|
+
* The cases assert only what a transport can honestly guarantee: identity,
|
|
12
|
+
* typed refusals, and the composition points other contracts depend on. They
|
|
13
|
+
* deliberately do **not** assert seeded values, counts, or ordering, because
|
|
14
|
+
* those are properties of a deployment's data, not of the contract.
|
|
15
|
+
*
|
|
16
|
+
* @experimental
|
|
17
|
+
* @module
|
|
18
|
+
*/
|
|
19
|
+
import { isHonuaReplicaSyncError, isReplicaSyncCapabilityRefusal } from "./errors.js";
|
|
20
|
+
export const HONUA_REPLICA_SYNC_TRANSPORT_CONFORMANCE_KIND = "honua.replica-sync-transport-conformance";
|
|
21
|
+
export const HONUA_REPLICA_SYNC_TRANSPORT_CONFORMANCE_VERSION = "1.0";
|
|
22
|
+
/** Signalled by a case that cannot reach a verdict on this deployment. */
|
|
23
|
+
class ConformanceSkip extends Error {
|
|
24
|
+
}
|
|
25
|
+
function skip(reason) {
|
|
26
|
+
throw new ConformanceSkip(reason);
|
|
27
|
+
}
|
|
28
|
+
/** Names of every case in the suite, in execution order. */
|
|
29
|
+
export const REPLICA_SYNC_TRANSPORT_CONFORMANCE_CASES = [
|
|
30
|
+
"capabilities-are-explicit",
|
|
31
|
+
"unsupported-sync-is-a-typed-refusal",
|
|
32
|
+
"replica-listing-is-well-formed",
|
|
33
|
+
"replica-listing-paginates-with-a-cursor",
|
|
34
|
+
"unknown-replica-is-replica-not-found",
|
|
35
|
+
"conflict-listing-is-well-formed",
|
|
36
|
+
"conflict-detail-carries-three-way-state",
|
|
37
|
+
"unknown-conflict-is-conflict-not-found",
|
|
38
|
+
"conflict-detail-round-trips-its-summary",
|
|
39
|
+
"resolution-options-are-declared",
|
|
40
|
+
"batch-resolution-reports-per-conflict-failures",
|
|
41
|
+
];
|
|
42
|
+
const CASES = {
|
|
43
|
+
"capabilities-are-explicit": async (transport, options) => {
|
|
44
|
+
const capabilities = await transport.capabilities(options.datasetId);
|
|
45
|
+
assert(capabilities.sync === true, "a supported dataset must report sync: true");
|
|
46
|
+
assert(typeof capabilities.createReplica === "boolean", "createReplica must be a boolean");
|
|
47
|
+
assert(typeof capabilities.synchronizeReplica === "boolean", "synchronizeReplica must be a boolean");
|
|
48
|
+
assert(typeof capabilities.conflictReview === "boolean", "conflictReview must be a boolean");
|
|
49
|
+
assert(typeof capabilities.conflictResolution === "boolean", "conflictResolution must be a boolean");
|
|
50
|
+
assert(capabilities.directions.length > 0, "at least one sync direction must be advertised");
|
|
51
|
+
assert(capabilities.conflictPolicies.length > 0, "at least one conflict policy must be advertised");
|
|
52
|
+
},
|
|
53
|
+
"unsupported-sync-is-a-typed-refusal": async (transport, options) => {
|
|
54
|
+
const datasetId = options.unsupportedDatasetId;
|
|
55
|
+
if (datasetId === undefined)
|
|
56
|
+
skip("no unsupportedDatasetId was supplied");
|
|
57
|
+
// A dataset without disconnected sync must be refused, never answered with
|
|
58
|
+
// an empty or all-false capability record that reads as "supported but idle".
|
|
59
|
+
let caught;
|
|
60
|
+
try {
|
|
61
|
+
await transport.capabilities(datasetId);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
caught = error;
|
|
65
|
+
}
|
|
66
|
+
assert(caught !== undefined, "capabilities() must refuse an unsupported dataset");
|
|
67
|
+
assert(isReplicaSyncCapabilityRefusal(caught), "the refusal must be a typed capability refusal naming the missing capability");
|
|
68
|
+
},
|
|
69
|
+
"replica-listing-is-well-formed": async (transport, options) => {
|
|
70
|
+
const page = await transport.listReplicas({ datasetId: options.datasetId });
|
|
71
|
+
for (const replica of page.items) {
|
|
72
|
+
assert(typeof replica.id === "string" && replica.id.length > 0, "replica.id must be a non-empty string");
|
|
73
|
+
assert(replica.datasetId === options.datasetId, "replica.datasetId must match the requested dataset");
|
|
74
|
+
assert(typeof replica.createdAt === "string", "replica.createdAt must be an ISO timestamp");
|
|
75
|
+
assert(!Number.isNaN(Date.parse(replica.createdAt)), "replica.createdAt must parse as a date");
|
|
76
|
+
assert(typeof replica.status.inProgress === "boolean", "status.inProgress must be a boolean");
|
|
77
|
+
assert(Number.isInteger(replica.status.openConflicts) && replica.status.openConflicts >= 0, "status.openConflicts must be a non-negative integer");
|
|
78
|
+
// A generation cursor is opaque, but it must be a string when present so
|
|
79
|
+
// it composes with the offline replay projection's ServerGenerationCursor.
|
|
80
|
+
assert(replica.status.serverGen === undefined || typeof replica.status.serverGen === "string", "status.serverGen must be an opaque string cursor when present");
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"replica-listing-paginates-with-a-cursor": async (transport, options) => {
|
|
84
|
+
const all = await transport.listReplicas({ datasetId: options.datasetId });
|
|
85
|
+
if (all.items.length < 2)
|
|
86
|
+
skip("the deployment has fewer than two replicas");
|
|
87
|
+
const first = await transport.listReplicas({ datasetId: options.datasetId, limit: 1 });
|
|
88
|
+
assert(first.items.length === 1, "a limit of 1 must return exactly one replica");
|
|
89
|
+
assert(first.cursor !== undefined, "a truncated page must carry a continuation cursor");
|
|
90
|
+
const second = await transport.listReplicas({ datasetId: options.datasetId, limit: 1, cursor: first.cursor });
|
|
91
|
+
assert(second.items[0]?.id !== first.items[0]?.id, "the continuation must not repeat the first page");
|
|
92
|
+
},
|
|
93
|
+
"unknown-replica-is-replica-not-found": async (transport) => {
|
|
94
|
+
let caught;
|
|
95
|
+
try {
|
|
96
|
+
await transport.getReplica(ABSENT_ID);
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
caught = error;
|
|
100
|
+
}
|
|
101
|
+
assert(caught !== undefined, "an unknown replica must be refused, not answered");
|
|
102
|
+
assert(isHonuaReplicaSyncError(caught) && caught.code === "replica-not-found", 'an unknown replica must raise code "replica-not-found"');
|
|
103
|
+
},
|
|
104
|
+
"conflict-listing-is-well-formed": async (transport, options) => {
|
|
105
|
+
const page = await conflictPage(transport, options);
|
|
106
|
+
if (page === undefined)
|
|
107
|
+
skip("conflict review is not available on this deployment");
|
|
108
|
+
for (const conflict of page) {
|
|
109
|
+
assertSummary(conflict, options.datasetId);
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"conflict-detail-carries-three-way-state": async (transport, options) => {
|
|
113
|
+
const detail = await firstConflictDetail(transport, options);
|
|
114
|
+
if (detail === undefined)
|
|
115
|
+
skip("no conflict is available to inspect");
|
|
116
|
+
// The three-way comparison is the whole point of the review contract; a
|
|
117
|
+
// transport that cannot produce all three sides cannot back a reviewer UI.
|
|
118
|
+
assert(typeof detail.base.operation === "string", "base.operation must be present");
|
|
119
|
+
assert(typeof detail.clientState.operation === "string", "clientState.operation must be present");
|
|
120
|
+
assert(typeof detail.serverState.operation === "string", "serverState.operation must be present");
|
|
121
|
+
assert(Array.isArray(detail.fieldConflicts), "fieldConflicts must be an array");
|
|
122
|
+
assert(detail.fieldConflictCount === detail.fieldConflicts.length, "fieldConflictCount must agree with the fieldConflicts array");
|
|
123
|
+
assert(detail.serverGen === undefined || typeof detail.serverGen === "string", "serverGen must be an opaque string cursor when present");
|
|
124
|
+
assert(detail.hasGeometryConflict === (detail.geometryConflict !== undefined), "hasGeometryConflict must agree with the presence of geometryConflict");
|
|
125
|
+
},
|
|
126
|
+
"unknown-conflict-is-conflict-not-found": async (transport, options) => {
|
|
127
|
+
const page = await conflictPage(transport, options);
|
|
128
|
+
if (page === undefined)
|
|
129
|
+
skip("conflict review is not available on this deployment");
|
|
130
|
+
let caught;
|
|
131
|
+
try {
|
|
132
|
+
await transport.getConflict(ABSENT_ID);
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
caught = error;
|
|
136
|
+
}
|
|
137
|
+
assert(caught !== undefined, "an unknown conflict must be refused, not answered");
|
|
138
|
+
assert(isHonuaReplicaSyncError(caught) && caught.code === "conflict-not-found", 'an unknown conflict must raise code "conflict-not-found"');
|
|
139
|
+
},
|
|
140
|
+
"conflict-detail-round-trips-its-summary": async (transport, options) => {
|
|
141
|
+
const page = await conflictPage(transport, options);
|
|
142
|
+
if (page === undefined || page.length === 0)
|
|
143
|
+
skip("no conflict is available to inspect");
|
|
144
|
+
const summary = page[0];
|
|
145
|
+
const detail = await transport.getConflict(summary.id);
|
|
146
|
+
// A detail read must describe the same event the listing announced, or a
|
|
147
|
+
// reviewer's list selection silently opens a different conflict.
|
|
148
|
+
assert(detail.id === summary.id, "detail.id must match the summary");
|
|
149
|
+
assert(detail.replicaId === summary.replicaId, "detail.replicaId must match the summary");
|
|
150
|
+
assert(detail.featureId === summary.featureId, "detail.featureId must match the summary");
|
|
151
|
+
assert(detail.kind === summary.kind, "detail.kind must match the summary");
|
|
152
|
+
assert(detail.datasetId === summary.datasetId, "detail.datasetId must match the summary");
|
|
153
|
+
},
|
|
154
|
+
"resolution-options-are-declared": async (transport, options) => {
|
|
155
|
+
const detail = await firstConflictDetail(transport, options);
|
|
156
|
+
if (detail === undefined)
|
|
157
|
+
skip("no conflict is available to inspect");
|
|
158
|
+
assert(detail.resolutionOptions.length > 0, "a reviewable conflict must declare its resolution options");
|
|
159
|
+
for (const option of detail.resolutionOptions) {
|
|
160
|
+
assert(typeof option.available === "boolean", "every resolution option must declare availability");
|
|
161
|
+
// An unavailable option without a reason is indistinguishable from a bug.
|
|
162
|
+
assert(option.available || (typeof option.reason === "string" && option.reason.length > 0), "an unavailable resolution option must state why");
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"batch-resolution-reports-per-conflict-failures": async (transport, options) => {
|
|
166
|
+
const page = await conflictPage(transport, options);
|
|
167
|
+
if (page === undefined)
|
|
168
|
+
skip("conflict review is not available on this deployment");
|
|
169
|
+
// A batch must partition into records and failures rather than throwing on
|
|
170
|
+
// the first bad member, so a reviewer sees which resolutions landed.
|
|
171
|
+
const result = await transport.resolveConflicts([{ conflictId: ABSENT_ID, choice: "accept-server" }]);
|
|
172
|
+
assert(Array.isArray(result.records), "records must be an array");
|
|
173
|
+
assert(result.records.length === 0, "an unresolvable batch must produce no records");
|
|
174
|
+
assert(result.failures.length === 1, "an unresolvable batch member must be reported as a failure");
|
|
175
|
+
assert(result.failures[0]?.conflictId === ABSENT_ID, "the failure must name the conflict it belongs to");
|
|
176
|
+
assert(typeof result.failures[0]?.reason === "string" && result.failures[0].reason.length > 0, "a batch failure must carry a reason");
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* An identifier no deployment issues. Both the fixture and the server mint
|
|
181
|
+
* opaque ids (GUID hex on the server); this value is shaped so it cannot
|
|
182
|
+
* collide while still being a legal path segment.
|
|
183
|
+
*/
|
|
184
|
+
const ABSENT_ID = "honua-conformance-absent-00000000000000000000000000000000";
|
|
185
|
+
export async function runReplicaSyncTransportConformance(options) {
|
|
186
|
+
const selected = options.only ?? REPLICA_SYNC_TRANSPORT_CONFORMANCE_CASES;
|
|
187
|
+
const cases = [];
|
|
188
|
+
for (const name of selected) {
|
|
189
|
+
const body = CASES[name];
|
|
190
|
+
if (!body) {
|
|
191
|
+
cases.push({ name, status: "failed", detail: "unknown conformance case" });
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
let transport;
|
|
195
|
+
try {
|
|
196
|
+
transport = await options.createTransport();
|
|
197
|
+
await body(transport, options);
|
|
198
|
+
cases.push({ name, status: "passed" });
|
|
199
|
+
}
|
|
200
|
+
catch (error) {
|
|
201
|
+
cases.push(error instanceof ConformanceSkip
|
|
202
|
+
? { name, status: "skipped", detail: error.message }
|
|
203
|
+
: { name, status: "failed", detail: describe(error) });
|
|
204
|
+
}
|
|
205
|
+
finally {
|
|
206
|
+
if (transport && options.disposeTransport) {
|
|
207
|
+
try {
|
|
208
|
+
await options.disposeTransport(transport);
|
|
209
|
+
}
|
|
210
|
+
catch {
|
|
211
|
+
// Teardown failures must not rewrite a case's own verdict.
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
const failed = cases.filter((entry) => entry.status === "failed").length;
|
|
217
|
+
const skipped = cases.filter((entry) => entry.status === "skipped").length;
|
|
218
|
+
return {
|
|
219
|
+
kind: HONUA_REPLICA_SYNC_TRANSPORT_CONFORMANCE_KIND,
|
|
220
|
+
version: HONUA_REPLICA_SYNC_TRANSPORT_CONFORMANCE_VERSION,
|
|
221
|
+
...(options.label ? { label: options.label } : {}),
|
|
222
|
+
total: cases.length,
|
|
223
|
+
passed: cases.length - failed - skipped,
|
|
224
|
+
failed,
|
|
225
|
+
skipped,
|
|
226
|
+
cases,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
async function conflictPage(transport, options) {
|
|
230
|
+
try {
|
|
231
|
+
const page = await transport.listConflicts({ datasetId: options.datasetId });
|
|
232
|
+
return page.items;
|
|
233
|
+
}
|
|
234
|
+
catch (error) {
|
|
235
|
+
if (isHonuaReplicaSyncError(error) && error.code === "unsupported-conflict-review")
|
|
236
|
+
return undefined;
|
|
237
|
+
throw error;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
async function firstConflictDetail(transport, options) {
|
|
241
|
+
const page = await conflictPage(transport, options);
|
|
242
|
+
const summary = page?.[0];
|
|
243
|
+
if (summary === undefined)
|
|
244
|
+
return undefined;
|
|
245
|
+
const conflictId = summary.id;
|
|
246
|
+
return transport.getConflict(conflictId);
|
|
247
|
+
}
|
|
248
|
+
function assertSummary(conflict, datasetId) {
|
|
249
|
+
assert(typeof conflict.id === "string" && conflict.id.length > 0, "conflict.id must be a non-empty string");
|
|
250
|
+
assert(typeof conflict.replicaId === "string", "conflict.replicaId must be a string");
|
|
251
|
+
assert(conflict.datasetId === datasetId, "conflict.datasetId must match the requested dataset");
|
|
252
|
+
// The shared FeatureId alias is what lets a conflict feed a temporal timeline.
|
|
253
|
+
assert(typeof conflict.featureId === "string" && conflict.featureId.length > 0, "conflict.featureId must be present");
|
|
254
|
+
assert(conflict.kind === "replica-sync" || conflict.kind === "version-reconcile", "conflict.kind must be one of the two declared conflict models");
|
|
255
|
+
assert(!Number.isNaN(Date.parse(conflict.detectedAt)), "conflict.detectedAt must parse as a date");
|
|
256
|
+
assert(Number.isInteger(conflict.fieldConflictCount) && conflict.fieldConflictCount >= 0, "fieldConflictCount must be a non-negative integer");
|
|
257
|
+
assert(typeof conflict.hasGeometryConflict === "boolean", "hasGeometryConflict must be a boolean");
|
|
258
|
+
}
|
|
259
|
+
function assert(condition, message) {
|
|
260
|
+
if (!condition)
|
|
261
|
+
throw new Error(message);
|
|
262
|
+
}
|
|
263
|
+
function describe(error) {
|
|
264
|
+
return error instanceof Error ? error.message : String(error);
|
|
265
|
+
}
|
package/replica-sync/types.d.ts
CHANGED
|
@@ -36,6 +36,28 @@ export type ReplicaState = "provisioning" | "active" | "syncing" | "out-of-date"
|
|
|
36
36
|
/**
|
|
37
37
|
* How a replica reconciles concurrent edits when synchronizing. Mirrors Esri
|
|
38
38
|
* `createReplica` conflict behavior without binding to its wire spelling.
|
|
39
|
+
*
|
|
40
|
+
* A policy describes what the *replica* does; carrying one out is a different
|
|
41
|
+
* question for each surface. The offline edit queue can carry out a policy only
|
|
42
|
+
* when the complete effect on the queue follows from queue-side state alone —
|
|
43
|
+
* the queued edit, its conflict record, and the local clock — with no remote
|
|
44
|
+
* content and no server decision. That test splits the union in two, and
|
|
45
|
+
* `replayOfflineEditPass` refuses the server-adjudicated half by name rather
|
|
46
|
+
* than silently behaving like `manual`:
|
|
47
|
+
*
|
|
48
|
+
* | Policy | SDK disposition | Replay action | Reason |
|
|
49
|
+
* | --- | --- | --- | --- |
|
|
50
|
+
* | `manual` | locally-honoured | retain-for-review | queue-side-outcome |
|
|
51
|
+
* | `server-wins` | locally-honoured | discard-local-edit | queue-side-outcome |
|
|
52
|
+
* | `client-wins` | server-adjudicated | refuse | needs-server-override |
|
|
53
|
+
* | `last-writer-wins` | server-adjudicated | refuse | needs-remote-edit-time |
|
|
54
|
+
*
|
|
55
|
+
* `server-wins` is honourable for the *outbound queue only*: the queued edit
|
|
56
|
+
* lost, so it is abandoned. Adopting the server's row into local state needs
|
|
57
|
+
* the remote content and is not what this does. The machine-readable form of
|
|
58
|
+
* this table is `OFFLINE_REPLAY_CONFLICT_POLICIES` in
|
|
59
|
+
* `@honua/sdk-js/offline`, and a test fails if the two disagree; the prose is
|
|
60
|
+
* in `docs/offline-regions.md`.
|
|
39
61
|
*/
|
|
40
62
|
export type ReplicaConflictPolicy = "server-wins" | "client-wins" | "manual" | "last-writer-wins";
|
|
41
63
|
/** Direction(s) of data flow a replica supports. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/replica-sync/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhE;;;;;;GAMG;AACH,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhE,oDAAoD;AACpD,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,6DAA6D;AAC7D,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE5C,iDAAiD;AACjD,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAEzG
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/replica-sync/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhE;;;;;;GAMG;AACH,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhE,oDAAoD;AACpD,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,6DAA6D;AAC7D,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE5C,iDAAiD;AACjD,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG,QAAQ,G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AAa,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;CAC9G"}
|
package/runtime/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* ```ts
|
|
8
8
|
* import { HonuaClient } from "@honua/sdk-js";
|
|
9
9
|
* import { loadMapPackage } from "@honua/sdk-js/runtime";
|
|
10
|
-
* import maplibregl from "maplibre-gl";
|
|
10
|
+
* import * as maplibregl from "maplibre-gl";
|
|
11
11
|
*
|
|
12
12
|
* const map = new maplibregl.Map({ container: "map" });
|
|
13
13
|
* const runtime = await loadMapPackage(pkg, map, {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* @packageDocumentation
|
|
22
22
|
*/
|
|
23
23
|
export { loadMapPackage } from "./load-package.js";
|
|
24
|
-
export type { LoadMapPackageOptions, SourceErrorPolicy } from "./load-package.js";
|
|
24
|
+
export type { LoadMapPackageOfflineRegion, LoadMapPackageOptions, SourceErrorPolicy } from "./load-package.js";
|
|
25
25
|
export { maplibreRenderer } from "./maplibre-renderer.js";
|
|
26
26
|
export type { MapLibreRendererFactoryOptions, MapLibreRendererMap, MapLibreRendererOptions, MapLibreRendererPeer, } from "./maplibre-renderer.js";
|
|
27
27
|
export { BoundedMapPackageFetchCache, DEFAULT_MAP_PACKAGE_CACHE_LIMIT, DEFAULT_MAP_PACKAGE_PATH_PREFIX, defaultMapPackagePath, fetchMapPackage, loadMapPackageFromId, mapPackageFingerprint, resolveMapPackagePath, } from "./map-package-fetch.js";
|
|
@@ -46,6 +46,10 @@ export { applyStyleRefs, applyTheme, composeStyle } from "./style-compose.js";
|
|
|
46
46
|
export type { StyleComposeOptions, StyleRefResolver, ThemeResolver } from "./style-compose.js";
|
|
47
47
|
export { PMTILES_PROTOCOL_SCHEME, ensurePmtilesProtocol, isPmtilesProtocolRegistered, resetPmtilesProtocol, styleUsesPmtiles, } from "./pmtiles-protocol.js";
|
|
48
48
|
export type { EnsurePmtilesProtocolDeps, MaplibreProtocolRegistrar, PmtilesProtocolLike, PmtilesProtocolModuleLike, } from "./pmtiles-protocol.js";
|
|
49
|
+
export { ensureOfflineRegionProtocol, isOfflineRegionProtocolRegistered, OFFLINE_REGION_PROTOCOL_SCHEME, resetOfflineRegionProtocol, styleUsesOfflineRegion, } from "./offline-region-protocol.js";
|
|
50
|
+
export type { EnsureOfflineRegionProtocolDeps, OfflineRegionTileHandler } from "./offline-region-protocol.js";
|
|
51
|
+
export { revertOfflineRegionStyleRewrite, rewriteStyleTilesForOfflineRegion } from "./offline-region-style.js";
|
|
52
|
+
export type { OfflineRegionStyleRefusalReason, OfflineRegionStyleRefusalV1, OfflineRegionStyleRewriteEntryV1, OfflineRegionStyleRewriteV1, RewriteStyleTilesForOfflineRegionOptions, } from "./offline-region-style.js";
|
|
49
53
|
export { DEFAULT_OGC_STYLES_PATH_PREFIX, MAPLIBRE_STYLE_MEDIA_TYPE, OgcStylesClient, createOgcStyleRefResolver, styleDocumentToRefBody, } from "./ogc-styles.js";
|
|
50
54
|
export type { OgcStyleLink, OgcStyleList, OgcStyleListEntry, OgcStyleRefResolverOptions, OgcStylesClientOptions, OgcStylesRequestOptions, } from "./ogc-styles.js";
|
|
51
55
|
export { prepareRuntimeStyleSpecValidation, validateRuntimeFilterStyleSpec, validateRuntimeLayerStyleSpec, validateRuntimeSourceStyleSpec, validateRuntimeStyleExpressionStyleSpec, validateRuntimeStyleSpec, } from "./style-spec-validation.js";
|
package/runtime/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../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BAA8B,EAC9B,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB,EACzB,kCAAkC,EAClC,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,YAAY,EACV,6BAA6B,EAC7B,8BAA8B,EAC9B,wBAAwB,EACxB,wBAAwB,EACxB,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,EAC9B,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC"}
|
package/runtime/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* ```ts
|
|
8
8
|
* import { HonuaClient } from "@honua/sdk-js";
|
|
9
9
|
* import { loadMapPackage } from "@honua/sdk-js/runtime";
|
|
10
|
-
* import maplibregl from "maplibre-gl";
|
|
10
|
+
* import * as maplibregl from "maplibre-gl";
|
|
11
11
|
*
|
|
12
12
|
* const map = new maplibregl.Map({ container: "map" });
|
|
13
13
|
* const runtime = await loadMapPackage(pkg, map, {
|
|
@@ -33,6 +33,8 @@ export { buildLegend } from "./legend.js";
|
|
|
33
33
|
export { bindPopup, defaultPopupRenderer } from "./popups.js";
|
|
34
34
|
export { applyStyleRefs, applyTheme, composeStyle } from "./style-compose.js";
|
|
35
35
|
export { PMTILES_PROTOCOL_SCHEME, ensurePmtilesProtocol, isPmtilesProtocolRegistered, resetPmtilesProtocol, styleUsesPmtiles, } from "./pmtiles-protocol.js";
|
|
36
|
+
export { ensureOfflineRegionProtocol, isOfflineRegionProtocolRegistered, OFFLINE_REGION_PROTOCOL_SCHEME, resetOfflineRegionProtocol, styleUsesOfflineRegion, } from "./offline-region-protocol.js";
|
|
37
|
+
export { revertOfflineRegionStyleRewrite, rewriteStyleTilesForOfflineRegion } from "./offline-region-style.js";
|
|
36
38
|
export { DEFAULT_OGC_STYLES_PATH_PREFIX, MAPLIBRE_STYLE_MEDIA_TYPE, OgcStylesClient, createOgcStyleRefResolver, styleDocumentToRefBody, } from "./ogc-styles.js";
|
|
37
39
|
export { prepareRuntimeStyleSpecValidation, validateRuntimeFilterStyleSpec, validateRuntimeLayerStyleSpec, validateRuntimeSourceStyleSpec, validateRuntimeStyleExpressionStyleSpec, validateRuntimeStyleSpec, } from "./style-spec-validation.js";
|
|
38
40
|
export { buildWmsRasterSourceSpec, buildWmtsRasterSourceSpec, projectSourceBindings, toHonuaSourceSpec, } from "./source-bridge.js";
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
import { type SourceResolver } from "../contract/index.js";
|
|
11
11
|
import type { HonuaClient } from "../core/client.js";
|
|
12
12
|
import { type HonuaMapPackage } from "./map-package.js";
|
|
13
|
+
import { type OfflineRegionTileHandler } from "./offline-region-protocol.js";
|
|
14
|
+
import { type MaplibreProtocolRegistrar } from "./pmtiles-protocol.js";
|
|
13
15
|
import type { PopupFactory, PopupRenderer } from "./popups.js";
|
|
14
16
|
import { HonuaMapRuntime, type HonuaRuntimeEventListener, type HonuaRuntimeTelemetry, type MaplibreMap } from "./runtime.js";
|
|
15
17
|
import { type StyleRefResolver, type ThemeResolver } from "./style-compose.js";
|
|
@@ -103,6 +105,28 @@ export interface LoadMapPackageOptions {
|
|
|
103
105
|
* style-spec checks and let the renderer report invalid style values.
|
|
104
106
|
*/
|
|
105
107
|
styleSpecValidationMode?: RuntimeStyleSpecValidationMode;
|
|
108
|
+
/**
|
|
109
|
+
* Serve the named style sources from a persisted offline region.
|
|
110
|
+
*
|
|
111
|
+
* The handler comes from `@honua/sdk-js/offline` because it is bound to one
|
|
112
|
+
* region manifest, one store, and one authorization scope — none of which the
|
|
113
|
+
* runtime can invent. When `sourceIds` are given the composed style's tile
|
|
114
|
+
* templates are rewritten onto `offline-region://` before `map.setStyle`, and
|
|
115
|
+
* a source that cannot be rewritten exactly fails the load rather than
|
|
116
|
+
* quietly continuing to render live tiles.
|
|
117
|
+
*/
|
|
118
|
+
offlineRegion?: LoadMapPackageOfflineRegion;
|
|
119
|
+
}
|
|
120
|
+
/** Binding between a composed style and one persisted offline region. */
|
|
121
|
+
export interface LoadMapPackageOfflineRegion {
|
|
122
|
+
/** Handler from `createOfflineRegionTileProtocol()` in `@honua/sdk-js/offline`. */
|
|
123
|
+
readonly tileHandler: OfflineRegionTileHandler;
|
|
124
|
+
/** Style source ids to rewrite onto the region. Omit to bind an already-rewritten style. */
|
|
125
|
+
readonly sourceIds?: readonly string[];
|
|
126
|
+
/** Tile-matrix-set segment of the rewritten URLs. Defaults to `"default"`. */
|
|
127
|
+
readonly tileMatrixSetId?: string;
|
|
128
|
+
/** Injected MapLibre registrar; defaults to the lazily imported peer. */
|
|
129
|
+
readonly maplibre?: MaplibreProtocolRegistrar;
|
|
106
130
|
}
|
|
107
131
|
/**
|
|
108
132
|
* Load a `MapPackage` onto a caller-provided `MaplibreMap`. Returns a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-package.d.ts","sourceRoot":"","sources":["../../../src/runtime/load-package.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAuC,KAAK,cAAc,EAAiB,MAAM,sBAAsB,CAAC;AAC/G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,EAA+B,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"load-package.d.ts","sourceRoot":"","sources":["../../../src/runtime/load-package.ts"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