@honua/app-platform 0.1.1-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
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Credential-safe redaction primitives for the Honua component kit's export
|
|
3
|
+
* pipeline (issue #683, parent epic #678 "app-platform component production
|
|
4
|
+
* readiness"; REQ-002).
|
|
5
|
+
*
|
|
6
|
+
* The export pipeline is **redact-by-default in two independent layers**, and
|
|
7
|
+
* both layers run on every export regardless of who supplied the state:
|
|
8
|
+
*
|
|
9
|
+
* 1. **Allowlist projection.** {@link sanitizeHonuaExportState} never walks a
|
|
10
|
+
* caller's state object generically. It projects a fixed, enumerated set of
|
|
11
|
+
* presentation fields (viewport, layer identity/visibility/opacity, legend
|
|
12
|
+
* labels, filter text, selection identity, source identity + attribution)
|
|
13
|
+
* into a new object. Anything the projection does not name — arbitrary
|
|
14
|
+
* `metadata` bags, request headers, credential stores, feature attributes,
|
|
15
|
+
* locator query strings — simply has no path into the output. New fields
|
|
16
|
+
* added to `HonuaWebComponentState` upstream are therefore *excluded* until
|
|
17
|
+
* somebody deliberately allowlists them, which is the safe default
|
|
18
|
+
* direction for a security boundary.
|
|
19
|
+
* 2. **Outbound scrub + assertion.** Every string that survives projection is
|
|
20
|
+
* passed through {@link redactHonuaExportText}, URLs are reduced to
|
|
21
|
+
* origin+path, and the finished payload is re-scanned by
|
|
22
|
+
* {@link assertCredentialFreeExportText}. A scan hit is a *hard failure*
|
|
23
|
+
* (`HonuaExportSafetyError`), not a silent scrub — a leak that reaches the
|
|
24
|
+
* assertion means the projection has a bug, and failing closed is the only
|
|
25
|
+
* honest response.
|
|
26
|
+
*
|
|
27
|
+
* The same primitives are applied to filenames ({@link
|
|
28
|
+
* sanitizeHonuaExportFilename}) and to every human-readable message the export
|
|
29
|
+
* pipeline puts on an event or a log line ({@link redactHonuaExportText}),
|
|
30
|
+
* because REQ-002 covers "exported bytes, serialized state, logs, events, or
|
|
31
|
+
* filenames" — a token leaked through a download filename or an error string
|
|
32
|
+
* is exactly as disclosed as one leaked through the payload.
|
|
33
|
+
*
|
|
34
|
+
* This module is deliberately dependency-free apart from the SDK's shared
|
|
35
|
+
* error base: no `node:crypto` (unlike `src/diagnostics/sanitize.ts`, which is
|
|
36
|
+
* a Node-side bundle helper), no DOM, no renderer, no localization framework.
|
|
37
|
+
* It is safe to import in a browser, a worker, or an SSR render pass, and
|
|
38
|
+
* carries no weight that NFR-001 forbids in the component bundles.
|
|
39
|
+
*
|
|
40
|
+
* @module
|
|
41
|
+
*/
|
|
42
|
+
import { HonuaSdkError } from "../core/error-envelope.js";
|
|
43
|
+
import type { HonuaViewportState, HonuaWebComponentState } from "./types.js";
|
|
44
|
+
/** Schema id stamped on every sanitized state document. */
|
|
45
|
+
export declare const HONUA_EXPORT_STATE_SCHEMA = "honua.app-platform.export-state.v1";
|
|
46
|
+
/** Placeholder substituted for any value the export pipeline refuses to emit. */
|
|
47
|
+
export declare const HONUA_EXPORT_REDACTED = "[REDACTED]";
|
|
48
|
+
/** Why a value was withheld from an export. */
|
|
49
|
+
export type HonuaExportRedactionReason =
|
|
50
|
+
/** The property name itself named a credential (`token`, `apiKey`, `cookie`, ...). */
|
|
51
|
+
"sensitive-key"
|
|
52
|
+
/** A URL carried a signature, SAS, or token query parameter, or embedded userinfo. */
|
|
53
|
+
| "signed-url"
|
|
54
|
+
/** A free-text value matched a credential shape (bearer token, JWT, provider key, ...). */
|
|
55
|
+
| "credential-pattern"
|
|
56
|
+
/** A request-header map was dropped because it is not on the export allowlist. */
|
|
57
|
+
| "private-header"
|
|
58
|
+
/** OAuth/authorization scope, audience, tenant, or grant detail. */
|
|
59
|
+
| "authorization-scope"
|
|
60
|
+
/** A source explicitly marked as not exportable by the plan or the source itself. */
|
|
61
|
+
| "non-exportable-source"
|
|
62
|
+
/** A value could not be represented safely (unserializable, cyclic, over budget). */
|
|
63
|
+
| "unsupported-value";
|
|
64
|
+
/** One withheld value, addressed by its path in the sanitized document. */
|
|
65
|
+
export interface HonuaExportRedaction {
|
|
66
|
+
/** Dotted/bracketed path in the *sanitized* document, e.g. `sources[0].endpoint`. */
|
|
67
|
+
readonly path: string;
|
|
68
|
+
readonly reason: HonuaExportRedactionReason;
|
|
69
|
+
}
|
|
70
|
+
/** Thrown when the export pipeline cannot produce a provably credential-free artifact. */
|
|
71
|
+
export declare class HonuaExportSafetyError extends HonuaSdkError {
|
|
72
|
+
readonly reason: HonuaExportRedactionReason | "assertion";
|
|
73
|
+
constructor(message: string, reason?: HonuaExportRedactionReason | "assertion");
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Redacts credential material from arbitrary human-readable text: adapter
|
|
77
|
+
* error messages, titles, status strings, log lines, event detail messages.
|
|
78
|
+
*
|
|
79
|
+
* Percent-encoded payloads are decoded (twice, bounded) before matching so a
|
|
80
|
+
* `%42earer%20abc` style evasion cannot slip a token past the scan; the
|
|
81
|
+
* returned string is the redacted *decoded* form when decoding changed
|
|
82
|
+
* anything, because emitting the still-encoded original would defeat the
|
|
83
|
+
* point.
|
|
84
|
+
*/
|
|
85
|
+
export declare function redactHonuaExportText(value: string): string;
|
|
86
|
+
/** Whether `value` still looks like it carries credential material. */
|
|
87
|
+
export declare function containsCredentialMaterial(value: string): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Fail-closed assertion for finished export payloads (REQ-002). Throws
|
|
90
|
+
* {@link HonuaExportSafetyError} rather than scrubbing, because reaching this
|
|
91
|
+
* point with credential material means an earlier layer is broken.
|
|
92
|
+
*/
|
|
93
|
+
export declare function assertCredentialFreeExportText(value: string, label: string): void;
|
|
94
|
+
/**
|
|
95
|
+
* Extracts runs of printable ASCII from a binary buffer, joined by newlines.
|
|
96
|
+
*
|
|
97
|
+
* This is the `strings(1)` idea, and it exists because "binary" is not a
|
|
98
|
+
* security boundary. A PNG `tEXt`/`iTXt` chunk, a JPEG `COM` marker, PDF
|
|
99
|
+
* metadata or an embedded XMP packet, an EXIF `UserComment`, a ZIP comment —
|
|
100
|
+
* all carry plainly readable text inside a buffer that will never decode as
|
|
101
|
+
* UTF-8 as a whole. Scanning only whole-buffer-decodable artifacts would let a
|
|
102
|
+
* token ride out inside any of them.
|
|
103
|
+
*
|
|
104
|
+
* Runs shorter than {@link MIN_PRINTABLE_RUN} are dropped: they are the
|
|
105
|
+
* incidental byte values that fall in the ASCII range inside compressed data,
|
|
106
|
+
* and keeping them would produce noise without ever forming a credential.
|
|
107
|
+
*/
|
|
108
|
+
export declare function extractPrintableRuns(bytes: Uint8Array, start?: number, end?: number): string;
|
|
109
|
+
/**
|
|
110
|
+
* Fail-closed credential scan over a binary artifact (REQ-002).
|
|
111
|
+
*
|
|
112
|
+
* Scans in bounded chunks with an overlap, so an arbitrarily large artifact
|
|
113
|
+
* costs bounded memory while a token that straddles a chunk boundary is still
|
|
114
|
+
* caught. Throws {@link HonuaExportSafetyError} on a hit, like the text scan —
|
|
115
|
+
* a credential surviving to this point means an earlier layer is broken, and
|
|
116
|
+
* emitting the bytes anyway is the one outcome that cannot be walked back.
|
|
117
|
+
*/
|
|
118
|
+
export declare function assertCredentialFreeExportBytes(bytes: Uint8Array, label: string): void;
|
|
119
|
+
/** Result of reducing an endpoint URL to its exportable form. */
|
|
120
|
+
export interface HonuaExportEndpointProjection {
|
|
121
|
+
/** `scheme://host[:port]/path` with query, fragment, and userinfo removed, or `undefined` when nothing is safe to emit. */
|
|
122
|
+
readonly endpoint: string | undefined;
|
|
123
|
+
readonly reason?: HonuaExportRedactionReason;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Reduces a source URL to `origin + pathname`, always dropping the query
|
|
127
|
+
* string and fragment.
|
|
128
|
+
*
|
|
129
|
+
* Query strings are where every practical map-service credential lives (Esri
|
|
130
|
+
* `?token=`, Azure SAS `?sv=...&sig=`, S3/GCS presigned `?X-Amz-Signature=`,
|
|
131
|
+
* tile-provider `?api_key=`), and a partial per-parameter allowlist has to be
|
|
132
|
+
* right about every provider forever. Dropping the whole query is the only
|
|
133
|
+
* rule that is right by construction; the origin+path that remains is what an
|
|
134
|
+
* attribution/provenance block legitimately needs.
|
|
135
|
+
*
|
|
136
|
+
* Non-HTTP(S) schemes (`data:`, `blob:`, `file:`), URLs with embedded
|
|
137
|
+
* `user:password@` userinfo, and unparseable strings yield no endpoint at all.
|
|
138
|
+
*/
|
|
139
|
+
export declare function projectExportEndpoint(url: string): HonuaExportEndpointProjection;
|
|
140
|
+
export interface SanitizeHonuaExportFilenameOptions {
|
|
141
|
+
/** Caller-supplied title (map title, package id, adapter hint). May be untrusted. */
|
|
142
|
+
readonly title?: string;
|
|
143
|
+
/** Media type used to pick the extension. */
|
|
144
|
+
readonly mediaType?: string;
|
|
145
|
+
/** Stable prefix, defaults to `honua`. */
|
|
146
|
+
readonly prefix?: string;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Produces a download filename that cannot disclose a credential (REQ-002
|
|
150
|
+
* "…or filenames").
|
|
151
|
+
*
|
|
152
|
+
* A title that matches any credential shape is **discarded wholesale** rather
|
|
153
|
+
* than partially redacted: emitting `map-REDACTED_TOKEN-tiles.png` still tells
|
|
154
|
+
* an observer that a token was present and can preserve unmatched prefixes of
|
|
155
|
+
* it. The result is always confined to `[A-Za-z0-9._-]`, never begins with a
|
|
156
|
+
* dot, contains no path separators, and is length-bounded.
|
|
157
|
+
*/
|
|
158
|
+
export declare function sanitizeHonuaExportFilename(options?: SanitizeHonuaExportFilenameOptions): string;
|
|
159
|
+
/** Exportable projection of one layer. */
|
|
160
|
+
export interface HonuaSanitizedExportLayer {
|
|
161
|
+
readonly id: string;
|
|
162
|
+
readonly title: string;
|
|
163
|
+
readonly visible: boolean;
|
|
164
|
+
readonly opacity?: number;
|
|
165
|
+
readonly sourceId?: string;
|
|
166
|
+
readonly type?: string;
|
|
167
|
+
}
|
|
168
|
+
/** Exportable projection of one legend entry. */
|
|
169
|
+
export interface HonuaSanitizedExportLegendItem {
|
|
170
|
+
readonly id: string;
|
|
171
|
+
readonly label: string;
|
|
172
|
+
readonly color?: string;
|
|
173
|
+
readonly layerId?: string;
|
|
174
|
+
}
|
|
175
|
+
/** Exportable projection of one bound source: identity and attribution only. */
|
|
176
|
+
export interface HonuaSanitizedExportSource {
|
|
177
|
+
readonly sourceId: string;
|
|
178
|
+
readonly protocol?: string;
|
|
179
|
+
/** `scheme://host[:port]/path` — never a query string. Omitted when nothing was safe. */
|
|
180
|
+
readonly endpoint?: string;
|
|
181
|
+
readonly attribution?: string;
|
|
182
|
+
/** `true` when the source was withheld entirely (see `redactions`). */
|
|
183
|
+
readonly omitted?: boolean;
|
|
184
|
+
}
|
|
185
|
+
/** Exportable projection of the active filter for one source. */
|
|
186
|
+
export interface HonuaSanitizedExportFilter {
|
|
187
|
+
readonly sourceId?: string;
|
|
188
|
+
readonly text?: string;
|
|
189
|
+
readonly expression?: string;
|
|
190
|
+
}
|
|
191
|
+
/** Exportable projection of the current selection: identity, never attributes. */
|
|
192
|
+
export interface HonuaSanitizedExportSelection {
|
|
193
|
+
readonly sourceId?: string;
|
|
194
|
+
readonly sourceLayer?: string;
|
|
195
|
+
readonly featureId?: string | number;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* The credential-free state document an export emits. Deliberately a *new*
|
|
199
|
+
* shape rather than a `Partial<HonuaWebComponentState>`: an export document is
|
|
200
|
+
* a published artifact with its own compatibility story, and reusing the
|
|
201
|
+
* live-state type would silently widen the export whenever the live state
|
|
202
|
+
* grows a field.
|
|
203
|
+
*/
|
|
204
|
+
export interface HonuaSanitizedExportState {
|
|
205
|
+
readonly schema: typeof HONUA_EXPORT_STATE_SCHEMA;
|
|
206
|
+
readonly packageId?: string;
|
|
207
|
+
readonly viewport?: HonuaViewportState;
|
|
208
|
+
readonly layers: readonly HonuaSanitizedExportLayer[];
|
|
209
|
+
readonly legend: readonly HonuaSanitizedExportLegendItem[];
|
|
210
|
+
readonly sources: readonly HonuaSanitizedExportSource[];
|
|
211
|
+
readonly filters: readonly HonuaSanitizedExportFilter[];
|
|
212
|
+
readonly selection?: HonuaSanitizedExportSelection;
|
|
213
|
+
/** Data-freshness timestamp carried through from controller state (REQ-003). */
|
|
214
|
+
readonly refreshedAt?: string;
|
|
215
|
+
readonly stale?: boolean;
|
|
216
|
+
/** Every value withheld from this document, with the reason. */
|
|
217
|
+
readonly redactions: readonly HonuaExportRedaction[];
|
|
218
|
+
}
|
|
219
|
+
export interface SanitizeHonuaExportStateOptions {
|
|
220
|
+
/**
|
|
221
|
+
* Sources the accepted plan or the source itself marks non-exportable. Their
|
|
222
|
+
* identity is preserved as `{ sourceId, omitted: true }` — an export that
|
|
223
|
+
* silently dropped a layer would misrepresent the map — but no endpoint,
|
|
224
|
+
* attribution, or filter detail is emitted, and every layer bound to them is
|
|
225
|
+
* withheld too.
|
|
226
|
+
*/
|
|
227
|
+
readonly nonExportableSourceIds?: readonly string[];
|
|
228
|
+
}
|
|
229
|
+
export interface HonuaExportStateSanitizationResult {
|
|
230
|
+
readonly state: HonuaSanitizedExportState;
|
|
231
|
+
readonly redactions: readonly HonuaExportRedaction[];
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Projects live component state into the credential-free export document
|
|
235
|
+
* (REQ-002). Never throws for hostile input — hostile values are withheld and
|
|
236
|
+
* recorded — but the finished document is asserted credential-free by
|
|
237
|
+
* {@link assertCredentialFreeExportText} in the export runner before any byte
|
|
238
|
+
* reaches a caller.
|
|
239
|
+
*/
|
|
240
|
+
export declare function sanitizeHonuaExportState(state: HonuaWebComponentState<unknown> | undefined, options?: SanitizeHonuaExportStateOptions): HonuaExportStateSanitizationResult;
|
|
241
|
+
/**
|
|
242
|
+
* Filters a header map down to the export allowlist, recording every drop.
|
|
243
|
+
* Exposed so adapters can prove — in their own tests — that no `Authorization`,
|
|
244
|
+
* `Cookie`, or provider-specific key header rides along with export metadata.
|
|
245
|
+
*/
|
|
246
|
+
export declare function sanitizeHonuaExportHeaders(headers: Readonly<Record<string, string>> | undefined): {
|
|
247
|
+
headers: Readonly<Record<string, string>>;
|
|
248
|
+
redactions: readonly HonuaExportRedaction[];
|
|
249
|
+
};
|
|
250
|
+
/** Whether a property name is refused outright by the export pipeline. */
|
|
251
|
+
export declare function isSensitiveExportKey(name: string): boolean;
|
|
252
|
+
//# sourceMappingURL=export-redaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-redaction.d.ts","sourceRoot":"","sources":["../../../src/web-components/export-redaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,KAAK,EAKV,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAEpB,2DAA2D;AAC3D,eAAO,MAAM,yBAAyB,uCAAuC,CAAC;AAE9E,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD,+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