@honua/react 0.0.20-alpha.0 → 0.1.1-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/contract/discovery.d.ts +231 -0
- package/contract/discovery.d.ts.map +1 -0
- package/contract/discovery.js +554 -0
- package/contract/edit-sketch.d.ts +8 -0
- package/contract/edit-sketch.d.ts.map +1 -1
- package/contract/edit-sketch.js +15 -0
- package/contract/edit-snapping.d.ts +160 -0
- package/contract/edit-snapping.d.ts.map +1 -0
- package/contract/edit-snapping.js +675 -0
- package/contract/generated/projjson-v0.7-crs-validator.d.ts +35 -0
- package/contract/generated/projjson-v0.7-crs-validator.d.ts.map +1 -0
- package/contract/generated/projjson-v0.7-crs-validator.js +3941 -0
- package/contract/index.d.ts +12 -1
- package/contract/index.d.ts.map +1 -1
- package/contract/index.js +4 -0
- package/contract/pmtiles.d.ts +193 -0
- package/contract/pmtiles.d.ts.map +1 -0
- package/contract/pmtiles.js +195 -0
- package/contract/protocol-module.d.ts +70 -0
- package/contract/protocol-module.d.ts.map +1 -0
- package/contract/protocol-module.js +1 -0
- package/contract/schema-envelope.d.ts +26 -0
- package/contract/schema-envelope.d.ts.map +1 -0
- package/contract/schema-envelope.js +25 -0
- package/contract/schema.d.ts +582 -0
- package/contract/schema.d.ts.map +1 -0
- package/contract/schema.js +2483 -0
- package/contract/source-capability-support.d.ts +6 -0
- package/contract/source-capability-support.d.ts.map +1 -0
- package/contract/source-capability-support.js +154 -0
- package/contract/source.d.ts +57 -15
- package/contract/source.d.ts.map +1 -1
- package/contract/source.js +368 -65
- package/contract/types.d.ts +171 -6
- package/contract/types.d.ts.map +1 -1
- package/contract/types.js +14 -14
- package/core/auth/client-credentials-provider.d.ts +51 -0
- package/core/auth/client-credentials-provider.d.ts.map +1 -0
- package/core/auth/client-credentials-provider.js +115 -0
- package/core/auth/credential-store.d.ts +52 -0
- package/core/auth/credential-store.d.ts.map +1 -0
- package/core/auth/credential-store.js +82 -0
- package/core/auth/index.d.ts +23 -0
- package/core/auth/index.d.ts.map +1 -0
- package/core/auth/index.js +20 -0
- package/core/auth/oauth2-provider.d.ts +114 -0
- package/core/auth/oauth2-provider.d.ts.map +1 -0
- package/core/auth/oauth2-provider.js +408 -0
- package/core/auth/pkce.d.ts +25 -0
- package/core/auth/pkce.d.ts.map +1 -0
- package/core/auth/pkce.js +46 -0
- package/core/auth/static-providers.d.ts +20 -0
- package/core/auth/static-providers.d.ts.map +1 -0
- package/core/auth/static-providers.js +26 -0
- package/core/auth/token-endpoint.d.ts +40 -0
- package/core/auth/token-endpoint.d.ts.map +1 -0
- package/core/auth/token-endpoint.js +133 -0
- package/core/auth/types.d.ts +144 -0
- package/core/auth/types.d.ts.map +1 -0
- package/core/auth/types.js +8 -0
- package/core/bounded-json.d.ts +4 -0
- package/core/bounded-json.d.ts.map +1 -0
- package/core/bounded-json.js +38 -0
- package/core/cache-state.d.ts +9 -0
- package/core/cache-state.d.ts.map +1 -1
- package/core/cache-state.js +10 -0
- package/core/capabilities-xml.d.ts +33 -0
- package/core/capabilities-xml.d.ts.map +1 -0
- package/core/capabilities-xml.js +331 -0
- package/core/client.d.ts +35 -2
- package/core/client.d.ts.map +1 -1
- package/core/client.js +167 -29
- package/core/error-classifications.d.ts +153 -0
- package/core/error-classifications.d.ts.map +1 -0
- package/core/error-classifications.js +140 -0
- package/core/error-code-registry.d.ts +158 -0
- package/core/error-code-registry.d.ts.map +1 -0
- package/core/error-code-registry.js +143 -0
- package/core/error-envelope.d.ts +68 -0
- package/core/error-envelope.d.ts.map +1 -0
- package/core/error-envelope.js +357 -0
- package/core/errors.d.ts +73 -25
- package/core/errors.d.ts.map +1 -1
- package/core/errors.js +113 -46
- package/core/geoparquet-sql.d.ts +190 -0
- package/core/geoparquet-sql.d.ts.map +1 -0
- package/core/geoparquet-sql.js +368 -0
- package/core/odata-key-path.d.ts +12 -0
- package/core/odata-key-path.d.ts.map +1 -0
- package/core/odata-key-path.js +28 -0
- package/core/odata-write-codec.d.ts +66 -0
- package/core/odata-write-codec.d.ts.map +1 -0
- package/core/odata-write-codec.js +1083 -0
- package/core/odata.d.ts +59 -7
- package/core/odata.d.ts.map +1 -1
- package/core/odata.js +431 -99
- package/core/ogc-endpoint-layout.d.ts +70 -0
- package/core/ogc-endpoint-layout.d.ts.map +1 -0
- package/core/ogc-endpoint-layout.js +173 -0
- package/core/ogc-features.d.ts.map +1 -1
- package/core/ogc-features.js +35 -17
- package/core/ogc-maps.d.ts +7 -0
- package/core/ogc-maps.d.ts.map +1 -1
- package/core/ogc-maps.js +46 -7
- package/core/ogc-processes.d.ts +2 -1
- package/core/ogc-processes.d.ts.map +1 -1
- package/core/ogc-processes.js +33 -5
- package/core/ogc-records.d.ts +9 -0
- package/core/ogc-records.d.ts.map +1 -1
- package/core/ogc-records.js +78 -29
- package/core/ogc-tiles.d.ts +10 -1
- package/core/ogc-tiles.d.ts.map +1 -1
- package/core/ogc-tiles.js +56 -17
- package/core/path-utils.d.ts +9 -0
- package/core/path-utils.d.ts.map +1 -1
- package/core/path-utils.js +19 -0
- package/core/protocol-transport.d.ts +1 -0
- package/core/protocol-transport.d.ts.map +1 -1
- package/core/request-pipeline.d.ts.map +1 -1
- package/core/request-pipeline.js +1 -1
- package/core/spatial-filter.d.ts +8 -4
- package/core/spatial-filter.d.ts.map +1 -1
- package/core/spatial-filter.js +206 -16
- package/core/stac-static.d.ts +55 -0
- package/core/stac-static.d.ts.map +1 -0
- package/core/stac-static.js +386 -0
- package/core/stac.d.ts +12 -0
- package/core/stac.d.ts.map +1 -1
- package/core/stac.js +45 -15
- package/core/surfaces.d.ts +13 -0
- package/core/surfaces.d.ts.map +1 -1
- package/core/surfaces.js +127 -16
- package/core/types.d.ts +174 -7
- package/core/types.d.ts.map +1 -1
- package/core/wfs-capabilities.d.ts +12 -0
- package/core/wfs-capabilities.d.ts.map +1 -1
- package/core/wfs-capabilities.js +22 -3
- package/core/wfs.d.ts +13 -0
- package/core/wfs.d.ts.map +1 -1
- package/core/wfs.js +35 -5
- package/core/wms-capabilities.d.ts +56 -84
- package/core/wms-capabilities.d.ts.map +1 -1
- package/core/wms-capabilities.js +212 -509
- package/core/wmts-capabilities.d.ts +62 -62
- package/core/wmts-capabilities.d.ts.map +1 -1
- package/core/wmts-capabilities.js +224 -371
- package/esri-compat/editor.d.ts +8 -0
- package/esri-compat/editor.d.ts.map +1 -1
- package/esri-compat/editor.js +13 -0
- package/esri-compat/feature-layer.d.ts +2 -0
- package/esri-compat/feature-layer.d.ts.map +1 -1
- package/esri-compat/feature-layer.js +1 -0
- package/esri-compat/identity-manager.d.ts +43 -0
- package/esri-compat/identity-manager.d.ts.map +1 -1
- package/esri-compat/identity-manager.js +131 -1
- package/esri-compat/layer-list.d.ts +11 -0
- package/esri-compat/layer-list.d.ts.map +1 -1
- package/esri-compat/layer-list.js +49 -0
- package/esri-compat/legend.d.ts +10 -0
- package/esri-compat/legend.d.ts.map +1 -1
- package/esri-compat/legend.js +27 -0
- package/esri-compat/oauth-info.d.ts +15 -0
- package/esri-compat/oauth-info.d.ts.map +1 -1
- package/esri-compat/oauth-info.js +27 -0
- package/esri-compat/portal.d.ts +197 -0
- package/esri-compat/portal.d.ts.map +1 -0
- package/esri-compat/portal.js +251 -0
- package/esri-compat/renderer-objects.d.ts +40 -0
- package/esri-compat/renderer-objects.d.ts.map +1 -0
- package/esri-compat/renderer-objects.js +62 -0
- package/esri-compat/sketch.d.ts +43 -0
- package/esri-compat/sketch.d.ts.map +1 -1
- package/esri-compat/sketch.js +46 -0
- package/esri-compat/snapping.d.ts +43 -0
- package/esri-compat/snapping.d.ts.map +1 -0
- package/esri-compat/snapping.js +45 -0
- package/esri-compat/url.d.ts.map +1 -1
- package/esri-compat/url.js +1 -1
- package/esri-compat/widget-host.d.ts +84 -0
- package/esri-compat/widget-host.d.ts.map +1 -0
- package/esri-compat/widget-host.js +159 -0
- package/filter-registry/index.d.ts +145 -0
- package/filter-registry/index.d.ts.map +1 -0
- package/filter-registry/index.js +531 -0
- package/generated-app/errors.d.ts +18 -2
- package/generated-app/errors.d.ts.map +1 -1
- package/generated-app/errors.js +44 -11
- package/map/automatic-mount-integration.d.ts +134 -0
- package/map/automatic-mount-integration.d.ts.map +1 -0
- package/map/automatic-mount-integration.js +305 -0
- package/map/automatic-source-strategy.d.ts +125 -0
- package/map/automatic-source-strategy.d.ts.map +1 -0
- package/map/automatic-source-strategy.js +494 -0
- package/map/data-to-map-bridge.d.ts +293 -0
- package/map/data-to-map-bridge.d.ts.map +1 -0
- package/map/data-to-map-bridge.js +817 -0
- package/map/geojson-projection.d.ts +33 -0
- package/map/geojson-projection.d.ts.map +1 -0
- package/map/geojson-projection.js +118 -0
- package/map/index.d.ts +14 -0
- package/map/index.d.ts.map +1 -1
- package/map/index.js +8 -0
- package/map/raster-source-spec.d.ts +30 -0
- package/map/raster-source-spec.d.ts.map +1 -0
- package/map/raster-source-spec.js +190 -0
- package/map/raster-source-strategy.d.ts +65 -0
- package/map/raster-source-strategy.d.ts.map +1 -0
- package/map/raster-source-strategy.js +232 -0
- package/map/source-to-maplibre.d.ts +91 -0
- package/map/source-to-maplibre.d.ts.map +1 -0
- package/map/source-to-maplibre.js +454 -0
- package/map/temporal-playback.d.ts +139 -0
- package/map/temporal-playback.d.ts.map +1 -0
- package/map/temporal-playback.js +247 -0
- package/package.json +19 -1
- package/query-planner/canonical.d.ts +7 -0
- package/query-planner/canonical.d.ts.map +1 -0
- package/query-planner/canonical.js +145 -0
- package/query-planner/cql2-json.d.ts +17 -0
- package/query-planner/cql2-json.d.ts.map +1 -0
- package/query-planner/cql2-json.js +646 -0
- package/query-planner/diagnostics.d.ts +35 -0
- package/query-planner/diagnostics.d.ts.map +1 -0
- package/query-planner/diagnostics.js +373 -0
- package/query-planner/duckdb.d.ts +79 -0
- package/query-planner/duckdb.d.ts.map +1 -0
- package/query-planner/duckdb.js +758 -0
- package/query-planner/execution-context.d.ts +5 -0
- package/query-planner/execution-context.d.ts.map +1 -0
- package/query-planner/execution-context.js +50 -0
- package/query-planner/executor.d.ts +5 -0
- package/query-planner/executor.d.ts.map +1 -0
- package/query-planner/executor.js +223 -0
- package/query-planner/geoservices.d.ts +91 -0
- package/query-planner/geoservices.d.ts.map +1 -0
- package/query-planner/geoservices.js +667 -0
- package/query-planner/grpc.d.ts +100 -0
- package/query-planner/grpc.d.ts.map +1 -0
- package/query-planner/grpc.js +736 -0
- package/query-planner/index.d.ts +44 -0
- package/query-planner/index.d.ts.map +1 -0
- package/query-planner/index.js +30 -0
- package/query-planner/ir.d.ts +20 -0
- package/query-planner/ir.d.ts.map +1 -0
- package/query-planner/ir.js +417 -0
- package/query-planner/local-aggregate.d.ts +5 -0
- package/query-planner/local-aggregate.d.ts.map +1 -0
- package/query-planner/local-aggregate.js +126 -0
- package/query-planner/odata.d.ts +48 -0
- package/query-planner/odata.d.ts.map +1 -0
- package/query-planner/odata.js +662 -0
- package/query-planner/ogc-compiler.d.ts +55 -0
- package/query-planner/ogc-compiler.d.ts.map +1 -0
- package/query-planner/ogc-compiler.js +480 -0
- package/query-planner/ogc-features.d.ts +53 -0
- package/query-planner/ogc-features.d.ts.map +1 -0
- package/query-planner/ogc-features.js +617 -0
- package/query-planner/planner.d.ts +17 -0
- package/query-planner/planner.d.ts.map +1 -0
- package/query-planner/planner.js +818 -0
- package/query-planner/resource.d.ts +94 -0
- package/query-planner/resource.d.ts.map +1 -0
- package/query-planner/resource.js +526 -0
- package/query-planner/semantic-canonical.d.ts +15 -0
- package/query-planner/semantic-canonical.d.ts.map +1 -0
- package/query-planner/semantic-canonical.js +62 -0
- package/query-planner/semantic-compat.d.ts +10 -0
- package/query-planner/semantic-compat.d.ts.map +1 -0
- package/query-planner/semantic-compat.js +35 -0
- package/query-planner/semantic-compiler.d.ts +64 -0
- package/query-planner/semantic-compiler.d.ts.map +1 -0
- package/query-planner/semantic-compiler.js +81 -0
- package/query-planner/semantic-literals.d.ts +30 -0
- package/query-planner/semantic-literals.d.ts.map +1 -0
- package/query-planner/semantic-literals.js +133 -0
- package/query-planner/semantic-types.d.ts +265 -0
- package/query-planner/semantic-types.d.ts.map +1 -0
- package/query-planner/semantic-types.js +1 -0
- package/query-planner/semantic.d.ts +54 -0
- package/query-planner/semantic.d.ts.map +1 -0
- package/query-planner/semantic.js +1421 -0
- package/query-planner/types.d.ts +560 -0
- package/query-planner/types.d.ts.map +1 -0
- package/query-planner/types.js +49 -0
- package/query-planner/wfs-semantic.d.ts +58 -0
- package/query-planner/wfs-semantic.d.ts.map +1 -0
- package/query-planner/wfs-semantic.js +547 -0
- package/query-planner/wfs.d.ts +6 -0
- package/query-planner/wfs.d.ts.map +1 -0
- package/query-planner/wfs.js +71 -0
- package/react/external-map.d.ts +67 -0
- package/react/external-map.d.ts.map +1 -0
- package/react/external-map.js +63 -0
- package/react/honua-map.d.ts.map +1 -1
- package/react/honua-map.js +3 -2
- package/react/honua-source-layer.d.ts +110 -0
- package/react/honua-source-layer.d.ts.map +1 -0
- package/react/honua-source-layer.js +101 -0
- package/react/hooks.d.ts +28 -0
- package/react/hooks.d.ts.map +1 -1
- package/react/hooks.js +26 -4
- package/react/index.d.ts +8 -0
- package/react/index.d.ts.map +1 -1
- package/react/index.js +5 -0
- package/react/query-cache.d.ts +26 -4
- package/react/query-cache.d.ts.map +1 -1
- package/react/query-cache.js +51 -8
- package/react/selection.d.ts +177 -0
- package/react/selection.d.ts.map +1 -0
- package/react/selection.js +0 -0
- package/react/use-mounted-source.d.ts +69 -0
- package/react/use-mounted-source.d.ts.map +1 -0
- package/react/use-mounted-source.js +346 -0
- package/runtime/edit-snapping.d.ts +107 -0
- package/runtime/edit-snapping.d.ts.map +1 -0
- package/runtime/edit-snapping.js +190 -0
- package/runtime/errors.d.ts +3 -2
- package/runtime/errors.d.ts.map +1 -1
- package/runtime/errors.js +19 -2
- package/runtime/index.d.ts +8 -2
- package/runtime/index.d.ts.map +1 -1
- package/runtime/index.js +4 -4
- package/runtime/load-package.d.ts.map +1 -1
- package/runtime/load-package.js +8 -0
- package/runtime/map-package-validation.d.ts +0 -13
- package/runtime/map-package-validation.d.ts.map +1 -1
- package/runtime/map-package-validation.js +0 -12
- package/runtime/map-package.d.ts +1 -1
- package/runtime/map-package.d.ts.map +1 -1
- package/runtime/maplibre-renderer.d.ts +41 -0
- package/runtime/maplibre-renderer.d.ts.map +1 -0
- package/runtime/maplibre-renderer.js +322 -0
- package/runtime/pmtiles-protocol.d.ts +77 -0
- package/runtime/pmtiles-protocol.d.ts.map +1 -0
- package/runtime/pmtiles-protocol.js +120 -0
- package/runtime/query-tiles.d.ts +2 -1
- package/runtime/query-tiles.d.ts.map +1 -1
- package/runtime/query-tiles.js +6 -2
- package/runtime/source-bridge.d.ts +4 -4
- package/runtime/source-bridge.d.ts.map +1 -1
- package/runtime/source-bridge.js +36 -56
- package/runtime/style-interactions.d.ts +3 -2
- package/runtime/style-interactions.d.ts.map +1 -1
- package/runtime/style-interactions.js +11 -3
- package/runtime/terra-draw-sketch.d.ts +275 -0
- package/runtime/terra-draw-sketch.d.ts.map +1 -0
- package/runtime/terra-draw-sketch.js +404 -0
- package/source-capability-registry.d.ts +1 -0
- package/source-capability-registry.js +1 -0
- package/source-capability-types.d.ts +186 -0
- package/source-capability-types.js +7 -0
- package/style/index.d.ts +2 -0
- package/style/index.d.ts.map +1 -1
- package/style/index.js +2 -0
- package/style/renderers.d.ts +326 -0
- package/style/renderers.d.ts.map +1 -0
- package/style/renderers.js +517 -0
- package/webmap/convert-renderer.d.ts +24 -3
- package/webmap/convert-renderer.d.ts.map +1 -1
- package/webmap/convert-renderer.js +93 -112
- package/webmap/index.d.ts +1 -1
- package/webmap/index.d.ts.map +1 -1
- package/webmap/index.js +1 -1
package/core/client.js
CHANGED
|
@@ -3,6 +3,7 @@ import { HONUA_MINIMUM_SUPPORTED_SERVER_VERSION, MINIMUM_SUPPORTED_SERVER_RELEAS
|
|
|
3
3
|
import { HonuaHttpError, HonuaNetworkError, HonuaTimeoutError } from "./errors.js";
|
|
4
4
|
import { applyEdits, exportMap, findMap, getFeatureServiceMetadata, getLayerMetadata, getMapLayerMetadata, getMapLegend, getMapServiceMetadata, identifyMap, listServices, queryFeaturesRest, queryMapLayer, queryMapRelatedRecords, queryRelatedRecords, } from "./geoservices.js";
|
|
5
5
|
import { HonuaOdataEntitySet } from "./odata.js";
|
|
6
|
+
import { honuaFacadeFeaturesLayout, resolveOgcEndpointLayout } from "./ogc-endpoint-layout.js";
|
|
6
7
|
import { createOgcItem, deleteOgcItem, getOgcCollection, getOgcFeaturesConformance, getOgcFeaturesLanding, getOgcItem, getOgcQueryables, listOgcCollections, listOgcItems, patchOgcItem, replaceOgcItem, } from "./ogc-features.js";
|
|
7
8
|
import { HonuaOgcMaps, getOgcMapImage, getOgcMapsConformance, getOgcMapsLanding } from "./ogc-maps.js";
|
|
8
9
|
import { HonuaOgcProcesses, cancelOgcProcessJob, executeOgcProcess, getOgcProcess, getOgcProcessJob, getOgcProcessJobResults, getOgcProcessesConformance, getOgcProcessesLanding, listOgcProcesses, } from "./ogc-processes.js";
|
|
@@ -170,7 +171,10 @@ export class HonuaClient {
|
|
|
170
171
|
authCredentialsCache;
|
|
171
172
|
authRefreshPromise;
|
|
172
173
|
connectClient;
|
|
174
|
+
connectClientPromise;
|
|
173
175
|
metadataCache = new Map();
|
|
176
|
+
ogcLayoutCache = new Map();
|
|
177
|
+
wfsRootCache = new Map();
|
|
174
178
|
/**
|
|
175
179
|
* Create a new `HonuaClient`.
|
|
176
180
|
*
|
|
@@ -224,9 +228,6 @@ export class HonuaClient {
|
|
|
224
228
|
pipelineFetch: (method, path, init, callerSignal, pipelineOptions) => this.pipelineFetch(method, path, init, callerSignal, pipelineOptions),
|
|
225
229
|
requestBinaryWithJsonFallback: (method, path, params, signal) => this.requestBinaryWithJsonFallback(method, path, params, signal),
|
|
226
230
|
};
|
|
227
|
-
if (this.transport === "grpc-web") {
|
|
228
|
-
this.initConnectClient();
|
|
229
|
-
}
|
|
230
231
|
}
|
|
231
232
|
/**
|
|
232
233
|
* Connect interceptor that injects the same credentials the REST pipeline
|
|
@@ -298,26 +299,36 @@ export class HonuaClient {
|
|
|
298
299
|
...(this.timeoutMs !== undefined ? { defaultTimeoutMs: this.timeoutMs } : {}),
|
|
299
300
|
};
|
|
300
301
|
}
|
|
301
|
-
initConnectClient() {
|
|
302
|
-
// Dynamic imports are used to avoid bundling Connect dependencies
|
|
303
|
-
// when only the REST transport is used. The imports are resolved
|
|
304
|
-
// at module level since they are static ESM imports.
|
|
305
|
-
import("@connectrpc/connect").then(({ createClient }) => import("@connectrpc/connect-web").then(({ createGrpcWebTransport }) => import("../gen/honua/v1/feature_service_pb.js").then(({ FeatureService }) => {
|
|
306
|
-
const transport = createGrpcWebTransport(this.connectTransportOptions());
|
|
307
|
-
this.connectClient = createClient(FeatureService, transport);
|
|
308
|
-
})));
|
|
309
|
-
}
|
|
310
302
|
async ensureConnectClient() {
|
|
311
303
|
if (this.connectClient) {
|
|
312
304
|
return this.connectClient;
|
|
313
305
|
}
|
|
314
|
-
//
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
306
|
+
// Keep optional Connect peers out of the module graph until the first
|
|
307
|
+
// gRPC operation is actually awaited. Caching the in-flight promise also
|
|
308
|
+
// prevents concurrent first calls from constructing competing clients.
|
|
309
|
+
let initPromise = this.connectClientPromise;
|
|
310
|
+
if (!initPromise) {
|
|
311
|
+
initPromise = Promise.all([
|
|
312
|
+
import("@connectrpc/connect"),
|
|
313
|
+
import("@connectrpc/connect-web"),
|
|
314
|
+
import("../gen/honua/v1/feature_service_pb.js"),
|
|
315
|
+
]).then(([{ createClient }, { createGrpcWebTransport }, { FeatureService }]) => {
|
|
316
|
+
const transport = createGrpcWebTransport(this.connectTransportOptions());
|
|
317
|
+
this.connectClient = createClient(FeatureService, transport);
|
|
318
|
+
return this.connectClient;
|
|
319
|
+
});
|
|
320
|
+
this.connectClientPromise = initPromise;
|
|
321
|
+
}
|
|
322
|
+
try {
|
|
323
|
+
return await initPromise;
|
|
324
|
+
}
|
|
325
|
+
catch (error) {
|
|
326
|
+
// A transient module-loader failure must not poison every later call.
|
|
327
|
+
if (this.connectClientPromise === initPromise) {
|
|
328
|
+
this.connectClientPromise = undefined;
|
|
329
|
+
}
|
|
330
|
+
throw error;
|
|
331
|
+
}
|
|
321
332
|
}
|
|
322
333
|
/**
|
|
323
334
|
* Perform a fetch that never auto-follows a cross-origin redirect.
|
|
@@ -330,11 +341,24 @@ export class HonuaClient {
|
|
|
330
341
|
* base origin (re-running the {@link resolveRequestUrl} origin guard).
|
|
331
342
|
* Cross-origin redirects throw before the credentialed request is replayed.
|
|
332
343
|
*/
|
|
333
|
-
async fetchWithSafeRedirects(url, init) {
|
|
344
|
+
async fetchWithSafeRedirects(url, init, redirectPolicy = "safe-follow") {
|
|
334
345
|
let currentUrl = url;
|
|
335
346
|
let currentInit = init;
|
|
336
347
|
for (let redirects = 0;; redirects += 1) {
|
|
337
|
-
const response = await this.fetchFn(currentUrl, {
|
|
348
|
+
const response = await this.fetchFn(currentUrl, {
|
|
349
|
+
...currentInit,
|
|
350
|
+
redirect: redirectPolicy === "error" ? "error" : "manual",
|
|
351
|
+
});
|
|
352
|
+
if (redirectPolicy === "error") {
|
|
353
|
+
if (response.type === "opaqueredirect" ||
|
|
354
|
+
response.redirected ||
|
|
355
|
+
REDIRECT_STATUSES.has(response.status) ||
|
|
356
|
+
(response.url !== "" && response.url !== currentUrl)) {
|
|
357
|
+
await response.body?.cancel().catch(() => undefined);
|
|
358
|
+
throw new HonuaNetworkError("Redirects are not allowed for this bounded request.", undefined);
|
|
359
|
+
}
|
|
360
|
+
return response;
|
|
361
|
+
}
|
|
338
362
|
// `redirect: "manual"` surfaces redirects as status 3xx with a usable
|
|
339
363
|
// `Location` header (and, in fetch, an "opaqueredirect" type with status 0
|
|
340
364
|
// in some runtimes — treated as a same-origin-unverifiable redirect we
|
|
@@ -342,9 +366,13 @@ export class HonuaClient {
|
|
|
342
366
|
if (response.type === "opaqueredirect") {
|
|
343
367
|
throw new HonuaNetworkError("Refusing to follow an opaque cross-origin redirect; the request's API key would be leaked to the redirect target.", undefined);
|
|
344
368
|
}
|
|
345
|
-
if (!REDIRECT_STATUSES.has(response.status))
|
|
369
|
+
if (!REDIRECT_STATUSES.has(response.status))
|
|
370
|
+
return response;
|
|
371
|
+
// Some bounded metadata callers need the untouched 3xx response so
|
|
372
|
+
// their protocol facade can preserve its typed redirect diagnostic.
|
|
373
|
+
// Credentials are still never replayed because fetch remains manual.
|
|
374
|
+
if (redirectPolicy === "manual")
|
|
346
375
|
return response;
|
|
347
|
-
}
|
|
348
376
|
if (redirects >= MAX_SAFE_REDIRECTS) {
|
|
349
377
|
throw new HonuaNetworkError(`Exceeded the maximum of ${MAX_SAFE_REDIRECTS} redirects.`, undefined);
|
|
350
378
|
}
|
|
@@ -391,6 +419,33 @@ export class HonuaClient {
|
|
|
391
419
|
});
|
|
392
420
|
return cached?.credentials;
|
|
393
421
|
}
|
|
422
|
+
/**
|
|
423
|
+
* Resolve the auth headers the client would attach to an outgoing request
|
|
424
|
+
* right now, refreshing provider credentials first if they are expiring.
|
|
425
|
+
*
|
|
426
|
+
* Transports that build their own connection outside the REST/gRPC pipeline —
|
|
427
|
+
* notably realtime SSE streams, which must re-authenticate on every
|
|
428
|
+
* (re)connect so a refreshed token is picked up after a drop — call this per
|
|
429
|
+
* connect to obtain fresh credentials. Returns an empty object when no
|
|
430
|
+
* credentials are configured.
|
|
431
|
+
*/
|
|
432
|
+
async getAuthHeaders() {
|
|
433
|
+
return this.composeHeaders();
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Resolve just the current bearer/authorization token value (without the
|
|
437
|
+
* `Bearer ` scheme prefix when a plain bearer token is configured), or
|
|
438
|
+
* `undefined` if none. Convenience for realtime transports that must carry the
|
|
439
|
+
* token as a query parameter (native `EventSource` cannot set headers).
|
|
440
|
+
*/
|
|
441
|
+
async getAuthToken() {
|
|
442
|
+
const headers = await this.composeHeaders();
|
|
443
|
+
const authorization = headers.Authorization ?? headers.authorization;
|
|
444
|
+
if (authorization) {
|
|
445
|
+
return authorization.startsWith("Bearer ") ? authorization.slice("Bearer ".length) : authorization;
|
|
446
|
+
}
|
|
447
|
+
return headers["X-API-Key"] ?? headers["x-api-key"];
|
|
448
|
+
}
|
|
394
449
|
/** Drop cached provider credentials without calling a revocation endpoint. */
|
|
395
450
|
clearAuthCredentials() {
|
|
396
451
|
this.authCredentialsCache = undefined;
|
|
@@ -530,7 +585,14 @@ export class HonuaClient {
|
|
|
530
585
|
return createHonuaProcessRunner(createGeospatialGrpcProcessAdapter(processClient));
|
|
531
586
|
}
|
|
532
587
|
wfs(endpointUrl = "/wfs", options = {}) {
|
|
533
|
-
|
|
588
|
+
const version = options.version ?? "2.0.0";
|
|
589
|
+
const key = `${endpointUrl}\u0000${version}`;
|
|
590
|
+
const cached = this.wfsRootCache.get(key);
|
|
591
|
+
if (cached)
|
|
592
|
+
return cached;
|
|
593
|
+
const root = new HonuaWfs({ client: this, endpointUrl, version });
|
|
594
|
+
this.wfsRootCache.set(key, root);
|
|
595
|
+
return root;
|
|
534
596
|
}
|
|
535
597
|
odata(entitySet, options = {}) {
|
|
536
598
|
return new HonuaOdataEntitySet({ client: this, entitySet, basePath: options.basePath });
|
|
@@ -748,6 +810,15 @@ export class HonuaClient {
|
|
|
748
810
|
return this.executeRequest(request, {
|
|
749
811
|
callerSignal,
|
|
750
812
|
...(options.okStatuses ? { okStatuses: options.okStatuses } : {}),
|
|
813
|
+
...(options.redirect ? { redirect: options.redirect } : {}),
|
|
814
|
+
...(options.discardErrorBody
|
|
815
|
+
? {
|
|
816
|
+
errorBody: (response) => {
|
|
817
|
+
void response.body?.cancel().catch(() => undefined);
|
|
818
|
+
return Promise.resolve({});
|
|
819
|
+
},
|
|
820
|
+
}
|
|
821
|
+
: {}),
|
|
751
822
|
finalize: async (response, _durationMs, _request, runAfter) => {
|
|
752
823
|
await runAfter();
|
|
753
824
|
return response;
|
|
@@ -756,7 +827,11 @@ export class HonuaClient {
|
|
|
756
827
|
}
|
|
757
828
|
async requestCachedMetadataJson(cacheKey, path, options = {}) {
|
|
758
829
|
const metadataOptions = normalizeHonuaMetadataRequestOptions(options);
|
|
759
|
-
|
|
830
|
+
// A byte-bounded trust boundary must never reuse an entry populated by an
|
|
831
|
+
// unbounded or more-permissive request. Partitioning preserves normal cache
|
|
832
|
+
// reuse for callers that share the same ceiling without retaining bodies
|
|
833
|
+
// that were admitted under different limits.
|
|
834
|
+
const keyFingerprint = `metadata:${cacheKey}${metadataOptions.maxResponseBytes === undefined ? "" : `:max-response-bytes:${metadataOptions.maxResponseBytes}`}`;
|
|
760
835
|
const cached = this.metadataCache.get(keyFingerprint);
|
|
761
836
|
const bypass = metadataOptions.cache === "bypass";
|
|
762
837
|
const now = Date.now();
|
|
@@ -810,7 +885,7 @@ export class HonuaClient {
|
|
|
810
885
|
};
|
|
811
886
|
},
|
|
812
887
|
finalize: async (response, durationMs, currentRequest, runAfter) => {
|
|
813
|
-
const body = await parseResponseBody(this.hasAfterInterceptors() ? response.clone() : response);
|
|
888
|
+
const body = await parseResponseBody(this.hasAfterInterceptors() ? response.clone() : response, metadataOptions.maxResponseBytes);
|
|
814
889
|
// GeoServices reports metadata failures (layer not found, invalid token
|
|
815
890
|
// => code 499, …) as HTTP 200 with a top-level `{error}` envelope.
|
|
816
891
|
// Detect it before caching so a transient auth/permission error is never
|
|
@@ -882,6 +957,29 @@ export class HonuaClient {
|
|
|
882
957
|
async getFeatureServiceMetadata(serviceId, options = {}) {
|
|
883
958
|
return getFeatureServiceMetadata(this.protocolTransport, serviceId, options);
|
|
884
959
|
}
|
|
960
|
+
/**
|
|
961
|
+
* Resolve (and memoize) the OGC API Features endpoint layout for the
|
|
962
|
+
* given discovery `mode`. `honua-facade` (default) returns the fixed
|
|
963
|
+
* `/ogc/features/...` fast path with no network access; `ogc-api` and
|
|
964
|
+
* `auto` discover the layout from the server's landing page per OGC API
|
|
965
|
+
* - Common so the same typed surface works against pygeoapi / ldproxy /
|
|
966
|
+
* GeoServer. Discovery is cached per mode for the life of the client
|
|
967
|
+
* (the layout is a function of the fixed `baseUrl`).
|
|
968
|
+
*/
|
|
969
|
+
resolveOgcFeaturesLayout(mode = "honua-facade") {
|
|
970
|
+
if (mode === "honua-facade")
|
|
971
|
+
return Promise.resolve(honuaFacadeFeaturesLayout());
|
|
972
|
+
let cached = this.ogcLayoutCache.get(mode);
|
|
973
|
+
if (!cached) {
|
|
974
|
+
cached = resolveOgcEndpointLayout(this.protocolTransport, mode).catch((err) => {
|
|
975
|
+
// Allow a later retry after a transient discovery failure.
|
|
976
|
+
this.ogcLayoutCache.delete(mode);
|
|
977
|
+
throw err;
|
|
978
|
+
});
|
|
979
|
+
this.ogcLayoutCache.set(mode, cached);
|
|
980
|
+
}
|
|
981
|
+
return cached;
|
|
982
|
+
}
|
|
885
983
|
async getOgcFeaturesLanding(request = {}) {
|
|
886
984
|
return getOgcFeaturesLanding(this.protocolTransport, request);
|
|
887
985
|
}
|
|
@@ -1333,7 +1431,7 @@ export class HonuaClient {
|
|
|
1333
1431
|
...request.init,
|
|
1334
1432
|
method: request.method,
|
|
1335
1433
|
signal: timeout.signal,
|
|
1336
|
-
});
|
|
1434
|
+
}, options.redirect);
|
|
1337
1435
|
}
|
|
1338
1436
|
catch (error) {
|
|
1339
1437
|
const durationMs = performance.now() - startTime;
|
|
@@ -1492,8 +1590,10 @@ function geoServicesEnvelopeError(httpStatus, body) {
|
|
|
1492
1590
|
const message = hasMessage ? error.message : "Request failed";
|
|
1493
1591
|
return new HonuaHttpError(statusCode, message, body);
|
|
1494
1592
|
}
|
|
1495
|
-
async function parseResponseBody(response) {
|
|
1496
|
-
const text =
|
|
1593
|
+
async function parseResponseBody(response, maxResponseBytes) {
|
|
1594
|
+
const text = maxResponseBytes === undefined
|
|
1595
|
+
? await response.text()
|
|
1596
|
+
: new TextDecoder().decode(await readBoundedResponseBytes(response, maxResponseBytes));
|
|
1497
1597
|
if (!text) {
|
|
1498
1598
|
return {};
|
|
1499
1599
|
}
|
|
@@ -1504,6 +1604,44 @@ async function parseResponseBody(response) {
|
|
|
1504
1604
|
return { raw: text };
|
|
1505
1605
|
}
|
|
1506
1606
|
}
|
|
1607
|
+
async function readBoundedResponseBytes(response, maximum) {
|
|
1608
|
+
const advertised = response.headers.get("content-length");
|
|
1609
|
+
if (advertised !== null) {
|
|
1610
|
+
const length = Number(advertised);
|
|
1611
|
+
if (Number.isFinite(length) && length > maximum) {
|
|
1612
|
+
await response.body?.cancel().catch(() => undefined);
|
|
1613
|
+
throw new HonuaNetworkError(`Metadata response exceeds the configured ${maximum}-byte limit.`, undefined);
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
if (!response.body)
|
|
1617
|
+
return new Uint8Array();
|
|
1618
|
+
const reader = response.body.getReader();
|
|
1619
|
+
const chunks = [];
|
|
1620
|
+
let total = 0;
|
|
1621
|
+
try {
|
|
1622
|
+
for (;;) {
|
|
1623
|
+
const { done, value } = await reader.read();
|
|
1624
|
+
if (done)
|
|
1625
|
+
break;
|
|
1626
|
+
total += value.byteLength;
|
|
1627
|
+
if (total > maximum) {
|
|
1628
|
+
await reader.cancel().catch(() => undefined);
|
|
1629
|
+
throw new HonuaNetworkError(`Metadata response exceeds the configured ${maximum}-byte limit.`, undefined);
|
|
1630
|
+
}
|
|
1631
|
+
chunks.push(value);
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
finally {
|
|
1635
|
+
reader.releaseLock();
|
|
1636
|
+
}
|
|
1637
|
+
const bytes = new Uint8Array(total);
|
|
1638
|
+
let offset = 0;
|
|
1639
|
+
for (const chunk of chunks) {
|
|
1640
|
+
bytes.set(chunk, offset);
|
|
1641
|
+
offset += chunk.byteLength;
|
|
1642
|
+
}
|
|
1643
|
+
return bytes;
|
|
1644
|
+
}
|
|
1507
1645
|
function isObject(value) {
|
|
1508
1646
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1509
1647
|
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import type { HonuaErrorCategory, HonuaErrorDomain } from "./error-code-registry.js";
|
|
2
|
+
/**
|
|
3
|
+
* The classification state required by the error base at runtime.
|
|
4
|
+
*
|
|
5
|
+
* Human-readable summaries intentionally live only in
|
|
6
|
+
* `error-code-registry.ts`. Keep this table private to SDK internals and use
|
|
7
|
+
* `check:error-codes` to prove exact parity with the canonical registry.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export type HonuaErrorRuntimeClassification = readonly [
|
|
12
|
+
domain: HonuaErrorDomain,
|
|
13
|
+
category: HonuaErrorCategory,
|
|
14
|
+
retryable: boolean
|
|
15
|
+
];
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const HONUA_ERROR_RUNTIME_CLASSIFICATIONS: Readonly<{
|
|
18
|
+
readonly "core.http.transient": HonuaErrorRuntimeClassification;
|
|
19
|
+
readonly "core.http.rejected": HonuaErrorRuntimeClassification;
|
|
20
|
+
readonly "core.timeout": HonuaErrorRuntimeClassification;
|
|
21
|
+
readonly "core.network": HonuaErrorRuntimeClassification;
|
|
22
|
+
readonly "core.cancelled": HonuaErrorRuntimeClassification;
|
|
23
|
+
readonly "core.grpc.transient": HonuaErrorRuntimeClassification;
|
|
24
|
+
readonly "core.grpc.rejected": HonuaErrorRuntimeClassification;
|
|
25
|
+
readonly "core.geometry.unknown-geometry": HonuaErrorRuntimeClassification;
|
|
26
|
+
readonly "core.geometry.malformed-geometry": HonuaErrorRuntimeClassification;
|
|
27
|
+
readonly "core.auth.interaction-required": HonuaErrorRuntimeClassification;
|
|
28
|
+
readonly "core.auth.refresh-failed": HonuaErrorRuntimeClassification;
|
|
29
|
+
readonly "core.auth.invalid-grant": HonuaErrorRuntimeClassification;
|
|
30
|
+
readonly "core.capability-not-supported": HonuaErrorRuntimeClassification;
|
|
31
|
+
readonly "core.exploration-context": HonuaErrorRuntimeClassification;
|
|
32
|
+
readonly "core.wfs-exception": HonuaErrorRuntimeClassification;
|
|
33
|
+
readonly "core.job-failed": HonuaErrorRuntimeClassification;
|
|
34
|
+
readonly "core.wms-capabilities-parse": HonuaErrorRuntimeClassification;
|
|
35
|
+
readonly "core.wmts-capabilities-parse": HonuaErrorRuntimeClassification;
|
|
36
|
+
readonly "discovery.ambiguous-protocol": HonuaErrorRuntimeClassification;
|
|
37
|
+
readonly "discovery.ambiguous-source": HonuaErrorRuntimeClassification;
|
|
38
|
+
readonly "discovery.invalid-endpoint": HonuaErrorRuntimeClassification;
|
|
39
|
+
readonly "discovery.invalid-cache-identity": HonuaErrorRuntimeClassification;
|
|
40
|
+
readonly "discovery.invalid-discovery-cache": HonuaErrorRuntimeClassification;
|
|
41
|
+
readonly "discovery.invalid-capability": HonuaErrorRuntimeClassification;
|
|
42
|
+
readonly "discovery.unsupported-protocol": HonuaErrorRuntimeClassification;
|
|
43
|
+
readonly "discovery.protocol-mismatch": HonuaErrorRuntimeClassification;
|
|
44
|
+
readonly "query.planning.invalid-query": HonuaErrorRuntimeClassification;
|
|
45
|
+
readonly "query.planning.unsupported-compiler": HonuaErrorRuntimeClassification;
|
|
46
|
+
readonly "query.planning.unsupported-query": HonuaErrorRuntimeClassification;
|
|
47
|
+
readonly "query.planning.capability-not-supported": HonuaErrorRuntimeClassification;
|
|
48
|
+
readonly "query.planning.fallback-disabled": HonuaErrorRuntimeClassification;
|
|
49
|
+
readonly "query.planning.unsafe-materialization": HonuaErrorRuntimeClassification;
|
|
50
|
+
readonly "query.execution.invalid-plan": HonuaErrorRuntimeClassification;
|
|
51
|
+
readonly "query.execution.plan-context-mismatch": HonuaErrorRuntimeClassification;
|
|
52
|
+
readonly "query.execution.unsafe-materialization": HonuaErrorRuntimeClassification;
|
|
53
|
+
readonly "query.execution.invalid-resource-handle": HonuaErrorRuntimeClassification;
|
|
54
|
+
readonly "query.execution.resource-unavailable": HonuaErrorRuntimeClassification;
|
|
55
|
+
readonly "query.execution.resource-expired": HonuaErrorRuntimeClassification;
|
|
56
|
+
readonly "query.execution.resource-resolution-failed": HonuaErrorRuntimeClassification;
|
|
57
|
+
readonly "query.execution.resource-execution-failed": HonuaErrorRuntimeClassification;
|
|
58
|
+
readonly "map.source-adapter.disposed": HonuaErrorRuntimeClassification;
|
|
59
|
+
readonly "map.source-adapter.source-conflict": HonuaErrorRuntimeClassification;
|
|
60
|
+
readonly "map.source-adapter.layer-conflict": HonuaErrorRuntimeClassification;
|
|
61
|
+
readonly "map.source-adapter.unsupported-plan": HonuaErrorRuntimeClassification;
|
|
62
|
+
readonly "map.source-adapter.invalid-option": HonuaErrorRuntimeClassification;
|
|
63
|
+
readonly "map.source-adapter.map-mutation-failed": HonuaErrorRuntimeClassification;
|
|
64
|
+
readonly "map.data-bridge.invalid-option": HonuaErrorRuntimeClassification;
|
|
65
|
+
readonly "map.data-bridge.disposed": HonuaErrorRuntimeClassification;
|
|
66
|
+
readonly "map.data-bridge.source-conflict": HonuaErrorRuntimeClassification;
|
|
67
|
+
readonly "map.data-bridge.layer-conflict": HonuaErrorRuntimeClassification;
|
|
68
|
+
readonly "map.data-bridge.map-mutation-failed": HonuaErrorRuntimeClassification;
|
|
69
|
+
readonly "map.data-bridge.interaction-unsupported": HonuaErrorRuntimeClassification;
|
|
70
|
+
readonly "map.data-bridge.filter-unsupported": HonuaErrorRuntimeClassification;
|
|
71
|
+
readonly "map.automatic-strategy.no-eligible-strategy": HonuaErrorRuntimeClassification;
|
|
72
|
+
readonly "map.automatic-strategy.stale-plan": HonuaErrorRuntimeClassification;
|
|
73
|
+
readonly "map.automatic-strategy.source-conflict": HonuaErrorRuntimeClassification;
|
|
74
|
+
readonly "map.automatic-strategy.layer-conflict": HonuaErrorRuntimeClassification;
|
|
75
|
+
readonly "map.automatic-strategy.map-mutation-failed": HonuaErrorRuntimeClassification;
|
|
76
|
+
readonly "map.automatic-strategy.cancelled": HonuaErrorRuntimeClassification;
|
|
77
|
+
readonly "map.automatic-strategy.disposed": HonuaErrorRuntimeClassification;
|
|
78
|
+
readonly "map.raster-strategy.unsupported-strategy": HonuaErrorRuntimeClassification;
|
|
79
|
+
readonly "map.raster-strategy.capability-mismatch": HonuaErrorRuntimeClassification;
|
|
80
|
+
readonly "map.raster-strategy.missing-metadata": HonuaErrorRuntimeClassification;
|
|
81
|
+
readonly "map.raster-strategy.invalid-option": HonuaErrorRuntimeClassification;
|
|
82
|
+
readonly "map.raster-strategy.source-conflict": HonuaErrorRuntimeClassification;
|
|
83
|
+
readonly "map.raster-strategy.layer-conflict": HonuaErrorRuntimeClassification;
|
|
84
|
+
readonly "map.raster-strategy.map-mutation-failed": HonuaErrorRuntimeClassification;
|
|
85
|
+
readonly "map.automatic-integration.disposed": HonuaErrorRuntimeClassification;
|
|
86
|
+
readonly "map.automatic-integration.invalid-target": HonuaErrorRuntimeClassification;
|
|
87
|
+
readonly "map.temporal-playback.invalid-option": HonuaErrorRuntimeClassification;
|
|
88
|
+
readonly "runtime.map-package.fetch": HonuaErrorRuntimeClassification;
|
|
89
|
+
readonly "runtime.map-package.load": HonuaErrorRuntimeClassification;
|
|
90
|
+
readonly "runtime.map-package.validate": HonuaErrorRuntimeClassification;
|
|
91
|
+
readonly "runtime.map-package.update": HonuaErrorRuntimeClassification;
|
|
92
|
+
readonly "runtime.map-package.style-compose": HonuaErrorRuntimeClassification;
|
|
93
|
+
readonly "runtime.map-package.source-bind": HonuaErrorRuntimeClassification;
|
|
94
|
+
readonly "runtime.map-package.view": HonuaErrorRuntimeClassification;
|
|
95
|
+
readonly "runtime.map-package.popup": HonuaErrorRuntimeClassification;
|
|
96
|
+
readonly "runtime.map-package.dispose": HonuaErrorRuntimeClassification;
|
|
97
|
+
readonly "runtime.diagnostic": HonuaErrorRuntimeClassification;
|
|
98
|
+
readonly "runtime.query-tiles.transient": HonuaErrorRuntimeClassification;
|
|
99
|
+
readonly "runtime.query-tiles.rejected": HonuaErrorRuntimeClassification;
|
|
100
|
+
readonly "realtime.cancelled": HonuaErrorRuntimeClassification;
|
|
101
|
+
readonly "realtime.transport.reconnectable": HonuaErrorRuntimeClassification;
|
|
102
|
+
readonly "realtime.checkpoint.invalid": HonuaErrorRuntimeClassification;
|
|
103
|
+
readonly "realtime.sequence.gap": HonuaErrorRuntimeClassification;
|
|
104
|
+
readonly "realtime.protocol.terminal": HonuaErrorRuntimeClassification;
|
|
105
|
+
readonly "offline.region.validation": HonuaErrorRuntimeClassification;
|
|
106
|
+
readonly "offline.region.quota": HonuaErrorRuntimeClassification;
|
|
107
|
+
readonly "offline.region.integrity": HonuaErrorRuntimeClassification;
|
|
108
|
+
readonly "offline.cancelled": HonuaErrorRuntimeClassification;
|
|
109
|
+
readonly "offline.transport.failure": HonuaErrorRuntimeClassification;
|
|
110
|
+
readonly "offline.transport.transient": HonuaErrorRuntimeClassification;
|
|
111
|
+
readonly "offline.storage.concurrent": HonuaErrorRuntimeClassification;
|
|
112
|
+
readonly "offline.storage.failure": HonuaErrorRuntimeClassification;
|
|
113
|
+
readonly "offline.replica-sync.capability": HonuaErrorRuntimeClassification;
|
|
114
|
+
readonly "offline.replica-sync.validation": HonuaErrorRuntimeClassification;
|
|
115
|
+
readonly "offline.replica-sync.permission-denied": HonuaErrorRuntimeClassification;
|
|
116
|
+
readonly "plugin.registry.validation": HonuaErrorRuntimeClassification;
|
|
117
|
+
readonly "plugin.compatibility": HonuaErrorRuntimeClassification;
|
|
118
|
+
readonly "plugin.execution.policy-denied": HonuaErrorRuntimeClassification;
|
|
119
|
+
readonly "plugin.capability-unavailable": HonuaErrorRuntimeClassification;
|
|
120
|
+
readonly "plugin.lifecycle.activation": HonuaErrorRuntimeClassification;
|
|
121
|
+
readonly "plugin.execution.validation": HonuaErrorRuntimeClassification;
|
|
122
|
+
readonly "plugin.lifecycle.cleanup": HonuaErrorRuntimeClassification;
|
|
123
|
+
readonly "plugin.cancelled": HonuaErrorRuntimeClassification;
|
|
124
|
+
readonly "plugin.internal": HonuaErrorRuntimeClassification;
|
|
125
|
+
readonly "agent.tool.unknown-tool": HonuaErrorRuntimeClassification;
|
|
126
|
+
readonly "agent.tool.missing-runtime": HonuaErrorRuntimeClassification;
|
|
127
|
+
readonly "agent.tool.unqualified-selection": HonuaErrorRuntimeClassification;
|
|
128
|
+
readonly "agent.tool.missing-runtime-method": HonuaErrorRuntimeClassification;
|
|
129
|
+
readonly "agent.tool.internal": HonuaErrorRuntimeClassification;
|
|
130
|
+
readonly "agent.safety.aborted": HonuaErrorRuntimeClassification;
|
|
131
|
+
readonly "agent.safety.invalid-input": HonuaErrorRuntimeClassification;
|
|
132
|
+
readonly "agent.safety.policy-denied": HonuaErrorRuntimeClassification;
|
|
133
|
+
readonly "agent.safety.integrity-failed": HonuaErrorRuntimeClassification;
|
|
134
|
+
readonly "agent.safety.approval-expired": HonuaErrorRuntimeClassification;
|
|
135
|
+
readonly "agent.safety.context-mismatch": HonuaErrorRuntimeClassification;
|
|
136
|
+
readonly "agent.safety.signature-invalid": HonuaErrorRuntimeClassification;
|
|
137
|
+
readonly "agent.safety.execution-failed": HonuaErrorRuntimeClassification;
|
|
138
|
+
readonly "agent.safety.audit-failed": HonuaErrorRuntimeClassification;
|
|
139
|
+
readonly "agent.safety.receipt-failed": HonuaErrorRuntimeClassification;
|
|
140
|
+
readonly "app.unsupported-profile": HonuaErrorRuntimeClassification;
|
|
141
|
+
readonly "app.unsupported-widget": HonuaErrorRuntimeClassification;
|
|
142
|
+
readonly "app.missing-manifest": HonuaErrorRuntimeClassification;
|
|
143
|
+
readonly "app.missing-manifest-artifact": HonuaErrorRuntimeClassification;
|
|
144
|
+
readonly "app.missing-map-package": HonuaErrorRuntimeClassification;
|
|
145
|
+
readonly "app.map-package-mismatch": HonuaErrorRuntimeClassification;
|
|
146
|
+
readonly "app.missing-widget": HonuaErrorRuntimeClassification;
|
|
147
|
+
readonly "app.missing-binding": HonuaErrorRuntimeClassification;
|
|
148
|
+
readonly "app.map-load-failed": HonuaErrorRuntimeClassification;
|
|
149
|
+
readonly "app.data-load-failed": HonuaErrorRuntimeClassification;
|
|
150
|
+
readonly "app.render-failed": HonuaErrorRuntimeClassification;
|
|
151
|
+
readonly "app.disposed": HonuaErrorRuntimeClassification;
|
|
152
|
+
}>;
|
|
153
|
+
//# sourceMappingURL=error-classifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-classifications.d.ts","sourceRoot":"","sources":["../../../src/core/error-classifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAkB,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAErG;;;;;;;;GAQG;AACH,MAAM,MAAM,+BAA+B,GAAG,SAAS;IACrD,MAAM,EAAE,gBAAgB;IACxB,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,OAAO;CACnB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuI6B,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/** @internal */
|
|
2
|
+
export const HONUA_ERROR_RUNTIME_CLASSIFICATIONS = Object.freeze({
|
|
3
|
+
"core.http.transient": runtimeClassification("core", "protocol", true),
|
|
4
|
+
"core.http.rejected": runtimeClassification("core", "protocol", false),
|
|
5
|
+
"core.timeout": runtimeClassification("core", "timeout", true),
|
|
6
|
+
"core.network": runtimeClassification("core", "network", true),
|
|
7
|
+
"core.cancelled": runtimeClassification("core", "cancellation", false),
|
|
8
|
+
"core.grpc.transient": runtimeClassification("core", "protocol", true),
|
|
9
|
+
"core.grpc.rejected": runtimeClassification("core", "protocol", false),
|
|
10
|
+
"core.geometry.unknown-geometry": runtimeClassification("core", "validation", false),
|
|
11
|
+
"core.geometry.malformed-geometry": runtimeClassification("core", "validation", false),
|
|
12
|
+
"core.auth.interaction-required": runtimeClassification("core", "authentication", false),
|
|
13
|
+
"core.auth.refresh-failed": runtimeClassification("core", "authentication", true),
|
|
14
|
+
"core.auth.invalid-grant": runtimeClassification("core", "authentication", false),
|
|
15
|
+
"core.capability-not-supported": runtimeClassification("core", "capability", false),
|
|
16
|
+
"core.exploration-context": runtimeClassification("core", "validation", false),
|
|
17
|
+
"core.wfs-exception": runtimeClassification("core", "protocol", false),
|
|
18
|
+
"core.job-failed": runtimeClassification("core", "protocol", false),
|
|
19
|
+
"core.wms-capabilities-parse": runtimeClassification("core", "protocol", false),
|
|
20
|
+
"core.wmts-capabilities-parse": runtimeClassification("core", "protocol", false),
|
|
21
|
+
"discovery.ambiguous-protocol": runtimeClassification("discovery", "validation", false),
|
|
22
|
+
"discovery.ambiguous-source": runtimeClassification("discovery", "validation", false),
|
|
23
|
+
"discovery.invalid-endpoint": runtimeClassification("discovery", "validation", false),
|
|
24
|
+
"discovery.invalid-cache-identity": runtimeClassification("discovery", "validation", false),
|
|
25
|
+
"discovery.invalid-discovery-cache": runtimeClassification("discovery", "validation", false),
|
|
26
|
+
"discovery.invalid-capability": runtimeClassification("discovery", "validation", false),
|
|
27
|
+
"discovery.unsupported-protocol": runtimeClassification("discovery", "capability", false),
|
|
28
|
+
"discovery.protocol-mismatch": runtimeClassification("discovery", "validation", false),
|
|
29
|
+
"query.planning.invalid-query": runtimeClassification("query", "validation", false),
|
|
30
|
+
"query.planning.unsupported-compiler": runtimeClassification("query", "capability", false),
|
|
31
|
+
"query.planning.unsupported-query": runtimeClassification("query", "capability", false),
|
|
32
|
+
"query.planning.capability-not-supported": runtimeClassification("query", "capability", false),
|
|
33
|
+
"query.planning.fallback-disabled": runtimeClassification("query", "capability", false),
|
|
34
|
+
"query.planning.unsafe-materialization": runtimeClassification("query", "validation", false),
|
|
35
|
+
"query.execution.invalid-plan": runtimeClassification("query", "validation", false),
|
|
36
|
+
"query.execution.plan-context-mismatch": runtimeClassification("query", "validation", false),
|
|
37
|
+
"query.execution.unsafe-materialization": runtimeClassification("query", "validation", false),
|
|
38
|
+
"query.execution.invalid-resource-handle": runtimeClassification("query", "validation", false),
|
|
39
|
+
"query.execution.resource-unavailable": runtimeClassification("query", "authentication", false),
|
|
40
|
+
"query.execution.resource-expired": runtimeClassification("query", "authentication", false),
|
|
41
|
+
"query.execution.resource-resolution-failed": runtimeClassification("query", "internal", false),
|
|
42
|
+
"query.execution.resource-execution-failed": runtimeClassification("query", "internal", false),
|
|
43
|
+
"map.source-adapter.disposed": runtimeClassification("map", "validation", false),
|
|
44
|
+
"map.source-adapter.source-conflict": runtimeClassification("map", "validation", false),
|
|
45
|
+
"map.source-adapter.layer-conflict": runtimeClassification("map", "validation", false),
|
|
46
|
+
"map.source-adapter.unsupported-plan": runtimeClassification("map", "capability", false),
|
|
47
|
+
"map.source-adapter.invalid-option": runtimeClassification("map", "validation", false),
|
|
48
|
+
"map.source-adapter.map-mutation-failed": runtimeClassification("map", "internal", false),
|
|
49
|
+
"map.data-bridge.invalid-option": runtimeClassification("map", "validation", false),
|
|
50
|
+
"map.data-bridge.disposed": runtimeClassification("map", "validation", false),
|
|
51
|
+
"map.data-bridge.source-conflict": runtimeClassification("map", "validation", false),
|
|
52
|
+
"map.data-bridge.layer-conflict": runtimeClassification("map", "validation", false),
|
|
53
|
+
"map.data-bridge.map-mutation-failed": runtimeClassification("map", "internal", false),
|
|
54
|
+
"map.data-bridge.interaction-unsupported": runtimeClassification("map", "capability", false),
|
|
55
|
+
"map.data-bridge.filter-unsupported": runtimeClassification("map", "capability", false),
|
|
56
|
+
"map.automatic-strategy.no-eligible-strategy": runtimeClassification("map", "capability", false),
|
|
57
|
+
"map.automatic-strategy.stale-plan": runtimeClassification("map", "validation", false),
|
|
58
|
+
"map.automatic-strategy.source-conflict": runtimeClassification("map", "validation", false),
|
|
59
|
+
"map.automatic-strategy.layer-conflict": runtimeClassification("map", "validation", false),
|
|
60
|
+
"map.automatic-strategy.map-mutation-failed": runtimeClassification("map", "internal", false),
|
|
61
|
+
"map.automatic-strategy.cancelled": runtimeClassification("map", "cancellation", false),
|
|
62
|
+
"map.automatic-strategy.disposed": runtimeClassification("map", "validation", false),
|
|
63
|
+
"map.raster-strategy.unsupported-strategy": runtimeClassification("map", "capability", false),
|
|
64
|
+
"map.raster-strategy.capability-mismatch": runtimeClassification("map", "capability", false),
|
|
65
|
+
"map.raster-strategy.missing-metadata": runtimeClassification("map", "validation", false),
|
|
66
|
+
"map.raster-strategy.invalid-option": runtimeClassification("map", "validation", false),
|
|
67
|
+
"map.raster-strategy.source-conflict": runtimeClassification("map", "validation", false),
|
|
68
|
+
"map.raster-strategy.layer-conflict": runtimeClassification("map", "validation", false),
|
|
69
|
+
"map.raster-strategy.map-mutation-failed": runtimeClassification("map", "internal", false),
|
|
70
|
+
"map.automatic-integration.disposed": runtimeClassification("map", "validation", false),
|
|
71
|
+
"map.automatic-integration.invalid-target": runtimeClassification("map", "validation", false),
|
|
72
|
+
"map.temporal-playback.invalid-option": runtimeClassification("map", "validation", false),
|
|
73
|
+
"runtime.map-package.fetch": runtimeClassification("runtime", "network", true),
|
|
74
|
+
"runtime.map-package.load": runtimeClassification("runtime", "internal", false),
|
|
75
|
+
"runtime.map-package.validate": runtimeClassification("runtime", "validation", false),
|
|
76
|
+
"runtime.map-package.update": runtimeClassification("runtime", "internal", false),
|
|
77
|
+
"runtime.map-package.style-compose": runtimeClassification("runtime", "validation", false),
|
|
78
|
+
"runtime.map-package.source-bind": runtimeClassification("runtime", "internal", false),
|
|
79
|
+
"runtime.map-package.view": runtimeClassification("runtime", "internal", false),
|
|
80
|
+
"runtime.map-package.popup": runtimeClassification("runtime", "validation", false),
|
|
81
|
+
"runtime.map-package.dispose": runtimeClassification("runtime", "internal", true),
|
|
82
|
+
"runtime.diagnostic": runtimeClassification("runtime", "validation", false),
|
|
83
|
+
"runtime.query-tiles.transient": runtimeClassification("runtime", "protocol", true),
|
|
84
|
+
"runtime.query-tiles.rejected": runtimeClassification("runtime", "protocol", false),
|
|
85
|
+
"realtime.cancelled": runtimeClassification("realtime", "cancellation", false),
|
|
86
|
+
"realtime.transport.reconnectable": runtimeClassification("realtime", "network", true),
|
|
87
|
+
"realtime.checkpoint.invalid": runtimeClassification("realtime", "validation", false),
|
|
88
|
+
"realtime.sequence.gap": runtimeClassification("realtime", "protocol", true),
|
|
89
|
+
"realtime.protocol.terminal": runtimeClassification("realtime", "protocol", false),
|
|
90
|
+
"offline.region.validation": runtimeClassification("offline", "validation", false),
|
|
91
|
+
"offline.region.quota": runtimeClassification("offline", "validation", false),
|
|
92
|
+
"offline.region.integrity": runtimeClassification("offline", "protocol", false),
|
|
93
|
+
"offline.cancelled": runtimeClassification("offline", "cancellation", false),
|
|
94
|
+
"offline.transport.failure": runtimeClassification("offline", "network", false),
|
|
95
|
+
"offline.transport.transient": runtimeClassification("offline", "network", true),
|
|
96
|
+
"offline.storage.concurrent": runtimeClassification("offline", "internal", true),
|
|
97
|
+
"offline.storage.failure": runtimeClassification("offline", "internal", false),
|
|
98
|
+
"offline.replica-sync.capability": runtimeClassification("offline", "capability", false),
|
|
99
|
+
"offline.replica-sync.validation": runtimeClassification("offline", "validation", false),
|
|
100
|
+
"offline.replica-sync.permission-denied": runtimeClassification("offline", "authentication", false),
|
|
101
|
+
"plugin.registry.validation": runtimeClassification("plugin", "validation", false),
|
|
102
|
+
"plugin.compatibility": runtimeClassification("plugin", "capability", false),
|
|
103
|
+
"plugin.execution.policy-denied": runtimeClassification("plugin", "capability", false),
|
|
104
|
+
"plugin.capability-unavailable": runtimeClassification("plugin", "capability", false),
|
|
105
|
+
"plugin.lifecycle.activation": runtimeClassification("plugin", "internal", false),
|
|
106
|
+
"plugin.execution.validation": runtimeClassification("plugin", "validation", false),
|
|
107
|
+
"plugin.lifecycle.cleanup": runtimeClassification("plugin", "internal", false),
|
|
108
|
+
"plugin.cancelled": runtimeClassification("plugin", "cancellation", false),
|
|
109
|
+
"plugin.internal": runtimeClassification("plugin", "internal", false),
|
|
110
|
+
"agent.tool.unknown-tool": runtimeClassification("agent", "validation", false),
|
|
111
|
+
"agent.tool.missing-runtime": runtimeClassification("agent", "validation", false),
|
|
112
|
+
"agent.tool.unqualified-selection": runtimeClassification("agent", "validation", false),
|
|
113
|
+
"agent.tool.missing-runtime-method": runtimeClassification("agent", "capability", false),
|
|
114
|
+
"agent.tool.internal": runtimeClassification("agent", "internal", false),
|
|
115
|
+
"agent.safety.aborted": runtimeClassification("agent", "cancellation", false),
|
|
116
|
+
"agent.safety.invalid-input": runtimeClassification("agent", "validation", false),
|
|
117
|
+
"agent.safety.policy-denied": runtimeClassification("agent", "capability", false),
|
|
118
|
+
"agent.safety.integrity-failed": runtimeClassification("agent", "protocol", false),
|
|
119
|
+
"agent.safety.approval-expired": runtimeClassification("agent", "authentication", false),
|
|
120
|
+
"agent.safety.context-mismatch": runtimeClassification("agent", "validation", false),
|
|
121
|
+
"agent.safety.signature-invalid": runtimeClassification("agent", "validation", false),
|
|
122
|
+
"agent.safety.execution-failed": runtimeClassification("agent", "internal", false),
|
|
123
|
+
"agent.safety.audit-failed": runtimeClassification("agent", "internal", false),
|
|
124
|
+
"agent.safety.receipt-failed": runtimeClassification("agent", "internal", false),
|
|
125
|
+
"app.unsupported-profile": runtimeClassification("app", "capability", false),
|
|
126
|
+
"app.unsupported-widget": runtimeClassification("app", "capability", false),
|
|
127
|
+
"app.missing-manifest": runtimeClassification("app", "validation", false),
|
|
128
|
+
"app.missing-manifest-artifact": runtimeClassification("app", "validation", false),
|
|
129
|
+
"app.missing-map-package": runtimeClassification("app", "validation", false),
|
|
130
|
+
"app.map-package-mismatch": runtimeClassification("app", "validation", false),
|
|
131
|
+
"app.missing-widget": runtimeClassification("app", "validation", false),
|
|
132
|
+
"app.missing-binding": runtimeClassification("app", "validation", false),
|
|
133
|
+
"app.map-load-failed": runtimeClassification("app", "internal", false),
|
|
134
|
+
"app.data-load-failed": runtimeClassification("app", "internal", false),
|
|
135
|
+
"app.render-failed": runtimeClassification("app", "internal", false),
|
|
136
|
+
"app.disposed": runtimeClassification("app", "validation", false),
|
|
137
|
+
});
|
|
138
|
+
function runtimeClassification(domain, category, retryable) {
|
|
139
|
+
return Object.freeze([domain, category, retryable]);
|
|
140
|
+
}
|