@honua/react 0.1.2-beta.0 → 0.1.7-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 +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 +88 -19
- package/contract/types.d.ts.map +1 -1
- package/contract/types.js +4 -0
- package/contract/widget-source.d.ts.map +1 -1
- package/core/client.d.ts +51 -21
- package/core/client.d.ts.map +1 -1
- package/core/client.js +234 -54
- package/core/error-classifications.d.ts +23 -0
- package/core/error-classifications.d.ts.map +1 -1
- package/core/error-classifications.js +23 -0
- package/core/error-code-registry.d.ts +24 -1
- package/core/error-code-registry.d.ts.map +1 -1
- package/core/error-code-registry.js +23 -0
- package/core/error-envelope.js +2 -0
- package/core/errors.d.ts +2 -2
- package/core/errors.d.ts.map +1 -1
- package/core/errors.js +1 -1
- package/core/geoparquet-sql.d.ts +69 -5
- package/core/geoparquet-sql.d.ts.map +1 -1
- package/core/geoparquet-sql.js +327 -10
- 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 +32 -0
- package/core/stac.d.ts.map +1 -1
- package/core/stac.js +158 -23
- package/core/surfaces.d.ts.map +1 -1
- package/core/surfaces.js +273 -68
- package/core/types.d.ts +138 -11
- 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/interactions/declarative-contract.d.ts +149 -0
- package/interactions/declarative-contract.d.ts.map +1 -0
- package/interactions/declarative-contract.js +293 -0
- package/interactions/declarative.d.ts +198 -0
- package/interactions/declarative.d.ts.map +1 -0
- package/interactions/declarative.js +470 -0
- package/interactions/feature-state.d.ts +7 -0
- package/interactions/feature-state.d.ts.map +1 -1
- package/interactions/feature-state.js +10 -2
- 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/maplibre-target.js +1 -1
- 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/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/react/honua-map.d.ts +3 -1
- package/react/honua-map.d.ts.map +1 -1
- package/react/honua-map.js +11 -1
- package/react/hooks.d.ts +1 -1
- package/react/hooks.js +1 -1
- package/react/selection.d.ts.map +1 -1
- package/react/selection.js +0 -0
- package/react/use-mounted-source.d.ts +1 -1
- package/react/use-mounted-source.js +1 -1
- 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/contract.d.ts +142 -0
- package/realtime/contract.d.ts.map +1 -0
- package/realtime/contract.js +154 -0
- package/realtime/exploration.d.ts +16 -0
- package/realtime/exploration.d.ts.map +1 -0
- package/realtime/exploration.js +32 -0
- package/realtime/honua-server.d.ts +131 -0
- package/realtime/honua-server.d.ts.map +1 -0
- package/realtime/honua-server.js +302 -0
- package/realtime/index.d.ts +39 -0
- package/realtime/index.d.ts.map +1 -0
- package/realtime/index.js +26 -0
- package/realtime/odata-delta.d.ts +114 -0
- package/realtime/odata-delta.d.ts.map +1 -0
- package/realtime/odata-delta.js +483 -0
- package/realtime/projections.d.ts +30 -0
- package/realtime/projections.d.ts.map +1 -0
- package/realtime/projections.js +51 -0
- package/realtime/reconciliation.d.ts +245 -0
- package/realtime/reconciliation.d.ts.map +1 -0
- package/realtime/reconciliation.js +377 -0
- package/realtime/reducer.d.ts +14 -0
- package/realtime/reducer.d.ts.map +1 -0
- package/realtime/reducer.js +351 -0
- package/realtime/resumable-transport.d.ts +111 -0
- package/realtime/resumable-transport.d.ts.map +1 -0
- package/realtime/resumable-transport.js +406 -0
- package/realtime/resumable.d.ts +104 -0
- package/realtime/resumable.d.ts.map +1 -0
- package/realtime/resumable.js +632 -0
- package/realtime/sse.d.ts +23 -0
- package/realtime/sse.d.ts.map +1 -0
- package/realtime/sse.js +153 -0
- package/realtime/store.d.ts +18 -0
- package/realtime/store.d.ts.map +1 -0
- package/realtime/store.js +63 -0
- package/realtime/types.d.ts +190 -0
- package/realtime/types.d.ts.map +1 -0
- package/realtime/types.js +10 -0
- package/realtime/websocket.d.ts +60 -0
- package/realtime/websocket.d.ts.map +1 -0
- package/realtime/websocket.js +157 -0
- package/realtime/wire.d.ts +28 -0
- package/realtime/wire.d.ts.map +1 -0
- package/realtime/wire.js +73 -0
- 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/runtime/style-compose.d.ts.map +1 -1
- package/runtime/style-compose.js +78 -9
- 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/webmap/convert-label.js +0 -1
- package/webmap/convert-symbol.d.ts.map +1 -1
package/core/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HONUA_DEFAULT_METADATA_STALE_IF_ERROR_MS, createHonuaCacheState, honuaCacheValidatorFromHeaders, honuaMetadataRequestHeaders, isHonuaCacheEntryFresh, normalizeHonuaMetadataRequestOptions, withHonuaCacheState, withoutHonuaCacheState, } from "./cache-state.js";
|
|
2
2
|
import { HONUA_MINIMUM_SUPPORTED_SERVER_VERSION, MINIMUM_SUPPORTED_SERVER_RELEASE_CHANNEL, describeCompatibilityError, evaluateCompatibility, parseCompatibilityEnvelope, } from "./compatibility.js";
|
|
3
|
-
import { HonuaHttpError, HonuaNetworkError, HonuaTimeoutError } from "./errors.js";
|
|
3
|
+
import { HonuaAbortError, 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
6
|
import { honuaFacadeFeaturesLayout, resolveOgcEndpointLayout } from "./ogc-endpoint-layout.js";
|
|
@@ -557,8 +557,18 @@ export class HonuaClient {
|
|
|
557
557
|
wmts(serviceId) {
|
|
558
558
|
return new HonuaWmts({ client: this, serviceId });
|
|
559
559
|
}
|
|
560
|
-
|
|
561
|
-
|
|
560
|
+
/**
|
|
561
|
+
* Construct the OGC API Processes client wrapper.
|
|
562
|
+
*
|
|
563
|
+
* `basePath` pins every describe / execute / job route to a raw third-party
|
|
564
|
+
* service root (as discovered by `discoverOgcProcesses()`); omitting it uses
|
|
565
|
+
* the Honua facade prefix `/ogc/processes`. Pass the discovery result (or a
|
|
566
|
+
* `/conformance` response) as `conformance` — and optionally
|
|
567
|
+
* `capabilityPolicy: "strict"` — to gate execution and dismissal against what
|
|
568
|
+
* the server actually declares.
|
|
569
|
+
*/
|
|
570
|
+
ogcProcesses(options = {}) {
|
|
571
|
+
return new HonuaOgcProcesses({ ...options, client: this });
|
|
562
572
|
}
|
|
563
573
|
stac() {
|
|
564
574
|
return new HonuaStacSearch({ client: this });
|
|
@@ -575,8 +585,8 @@ export class HonuaClient {
|
|
|
575
585
|
processRunner(adapter) {
|
|
576
586
|
return createHonuaProcessRunner(adapter);
|
|
577
587
|
}
|
|
578
|
-
ogcProcessRunner() {
|
|
579
|
-
return createHonuaProcessRunner(createOgcProcessesAdapter(this.ogcProcesses()));
|
|
588
|
+
ogcProcessRunner(options = {}) {
|
|
589
|
+
return createHonuaProcessRunner(createOgcProcessesAdapter(this.ogcProcesses(options)));
|
|
580
590
|
}
|
|
581
591
|
geoprocessingRunner(serviceId, taskName) {
|
|
582
592
|
return createHonuaProcessRunner(createGeoServicesGpAdapter(this.geoprocessing(serviceId, taskName)));
|
|
@@ -801,6 +811,7 @@ export class HonuaClient {
|
|
|
801
811
|
path,
|
|
802
812
|
method,
|
|
803
813
|
init: {
|
|
814
|
+
...init,
|
|
804
815
|
method,
|
|
805
816
|
headers: await this.composeHeaders(init?.headers),
|
|
806
817
|
body: init?.body ?? null,
|
|
@@ -811,17 +822,24 @@ export class HonuaClient {
|
|
|
811
822
|
callerSignal,
|
|
812
823
|
...(options.okStatuses ? { okStatuses: options.okStatuses } : {}),
|
|
813
824
|
...(options.redirect ? { redirect: options.redirect } : {}),
|
|
814
|
-
...(options.
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
+
...(options.beforeAttempt ? { beforeAttempt: options.beforeAttempt } : {}),
|
|
826
|
+
...(options.beforeReplay ? { beforeReplay: options.beforeReplay } : {}),
|
|
827
|
+
...(options.prepareResponse || options.errorBody ? { deadlineThroughFinalize: true } : {}),
|
|
828
|
+
...(options.errorBody
|
|
829
|
+
? { errorBody: options.errorBody }
|
|
830
|
+
: options.discardErrorBody
|
|
831
|
+
? {
|
|
832
|
+
errorBody: (response) => {
|
|
833
|
+
void response.body?.cancel().catch(() => undefined);
|
|
834
|
+
return Promise.resolve({});
|
|
835
|
+
},
|
|
836
|
+
}
|
|
837
|
+
: {}),
|
|
838
|
+
finalize: async (response, _durationMs, _request, runAfter, deadlineSignal) => {
|
|
839
|
+
const candidate = options.prepareResponse ? await options.prepareResponse(response, deadlineSignal) : response;
|
|
840
|
+
const prepared = candidate === response ? response : preserveResponseSemantics(candidate, response);
|
|
841
|
+
await runAfter(prepared);
|
|
842
|
+
return prepared;
|
|
825
843
|
},
|
|
826
844
|
});
|
|
827
845
|
}
|
|
@@ -1334,6 +1352,10 @@ export class HonuaClient {
|
|
|
1334
1352
|
* to reach `fetch` directly.
|
|
1335
1353
|
*/
|
|
1336
1354
|
async requestText(method, path, options) {
|
|
1355
|
+
if (options?.maxResponseBytes !== undefined &&
|
|
1356
|
+
(!Number.isSafeInteger(options.maxResponseBytes) || options.maxResponseBytes <= 0)) {
|
|
1357
|
+
throw new TypeError("maxResponseBytes must be a positive safe integer.");
|
|
1358
|
+
}
|
|
1337
1359
|
const acceptHeader = options?.accept ?? "*/*";
|
|
1338
1360
|
const headers = { Accept: acceptHeader };
|
|
1339
1361
|
if (options?.contentType)
|
|
@@ -1350,14 +1372,26 @@ export class HonuaClient {
|
|
|
1350
1372
|
};
|
|
1351
1373
|
return this.executeRequest(request, {
|
|
1352
1374
|
callerSignal: options?.signal,
|
|
1353
|
-
|
|
1354
|
-
|
|
1375
|
+
deadlineThroughFinalize: options?.maxResponseBytes !== undefined,
|
|
1376
|
+
errorBody: async (response, deadlineSignal) => {
|
|
1377
|
+
const clone = response.clone();
|
|
1378
|
+
const text = options?.maxResponseBytes === undefined
|
|
1379
|
+
? await clone.text()
|
|
1380
|
+
: new TextDecoder().decode(await readBoundedResponseBytes(clone, options.maxResponseBytes, deadlineSignal));
|
|
1355
1381
|
const contentType = response.headers.get("content-type") ?? acceptHeader;
|
|
1356
1382
|
return text ? { raw: text, contentType } : {};
|
|
1357
1383
|
},
|
|
1358
|
-
finalize: async (response, _durationMs, _request, runAfter) => {
|
|
1359
|
-
|
|
1360
|
-
|
|
1384
|
+
finalize: async (response, _durationMs, _request, runAfter, deadlineSignal) => {
|
|
1385
|
+
if (options?.maxResponseBytes === undefined) {
|
|
1386
|
+
await runAfter();
|
|
1387
|
+
const text = await response.text();
|
|
1388
|
+
const contentType = response.headers.get("content-type") ?? acceptHeader;
|
|
1389
|
+
return { text, contentType, status: response.status };
|
|
1390
|
+
}
|
|
1391
|
+
const bytes = await readBoundedResponseBytes(response, options.maxResponseBytes, deadlineSignal);
|
|
1392
|
+
const prepared = preserveResponseSemantics(bufferedResponse(response, bytes), response);
|
|
1393
|
+
await runAfter(prepared);
|
|
1394
|
+
const text = new TextDecoder().decode(bytes);
|
|
1361
1395
|
const contentType = response.headers.get("content-type") ?? acceptHeader;
|
|
1362
1396
|
return { text, contentType, status: response.status };
|
|
1363
1397
|
},
|
|
@@ -1424,14 +1458,17 @@ export class HonuaClient {
|
|
|
1424
1458
|
let refreshedAuth = false;
|
|
1425
1459
|
for (let attempt = 0;; attempt += 1) {
|
|
1426
1460
|
let response;
|
|
1461
|
+
await options.beforeAttempt?.(cloneRequestContext(request), attempt);
|
|
1427
1462
|
const timeout = createTimeoutSignal(options.callerSignal ?? request.init.signal, this.timeoutMs);
|
|
1428
1463
|
const startTime = performance.now();
|
|
1464
|
+
let fetchCompleted = false;
|
|
1429
1465
|
try {
|
|
1430
1466
|
response = await this.fetchWithSafeRedirects(request.url, {
|
|
1431
1467
|
...request.init,
|
|
1432
1468
|
method: request.method,
|
|
1433
1469
|
signal: timeout.signal,
|
|
1434
1470
|
}, options.redirect);
|
|
1471
|
+
fetchCompleted = true;
|
|
1435
1472
|
}
|
|
1436
1473
|
catch (error) {
|
|
1437
1474
|
const durationMs = performance.now() - startTime;
|
|
@@ -1439,6 +1476,7 @@ export class HonuaClient {
|
|
|
1439
1476
|
? new HonuaTimeoutError(this.timeoutMs ?? 0)
|
|
1440
1477
|
: normalizeNetworkError(error);
|
|
1441
1478
|
if (shouldRetryRequest(this.retryOptions, request.method, attempt, undefined, normalizedError)) {
|
|
1479
|
+
await options.beforeReplay?.(cloneRequestContext(request), undefined, "retry");
|
|
1442
1480
|
await this.sleepBeforeRetry(attempt, undefined, retrySignal);
|
|
1443
1481
|
continue;
|
|
1444
1482
|
}
|
|
@@ -1453,46 +1491,98 @@ export class HonuaClient {
|
|
|
1453
1491
|
throw normalizedError;
|
|
1454
1492
|
}
|
|
1455
1493
|
finally {
|
|
1456
|
-
|
|
1494
|
+
if (!fetchCompleted || !options.deadlineThroughFinalize)
|
|
1495
|
+
timeout.dispose();
|
|
1457
1496
|
}
|
|
1458
1497
|
const durationMs = performance.now() - startTime;
|
|
1459
1498
|
const currentRequest = request;
|
|
1460
|
-
|
|
1499
|
+
let terminalErrorNotification;
|
|
1500
|
+
const beginTerminalErrorNotification = (error, errorDurationMs) => {
|
|
1501
|
+
if (terminalErrorNotification) {
|
|
1502
|
+
return { claimed: false, completion: terminalErrorNotification.completion };
|
|
1503
|
+
}
|
|
1504
|
+
const completion = this.applyErrorInterceptorsConcurrently({
|
|
1505
|
+
request: cloneRequestContext(currentRequest),
|
|
1506
|
+
error,
|
|
1507
|
+
durationMs: errorDurationMs,
|
|
1508
|
+
});
|
|
1509
|
+
terminalErrorNotification = { completion };
|
|
1510
|
+
return { claimed: true, completion };
|
|
1511
|
+
};
|
|
1512
|
+
const awaitDeadlineOwned = async (operation) => {
|
|
1513
|
+
const owned = operation.catch(async (error) => {
|
|
1514
|
+
const notification = beginTerminalErrorNotification(error, performance.now() - startTime);
|
|
1515
|
+
if (notification.claimed) {
|
|
1516
|
+
await notification.completion;
|
|
1517
|
+
}
|
|
1518
|
+
throw error;
|
|
1519
|
+
});
|
|
1520
|
+
return await awaitAbortable(owned, timeout.signal);
|
|
1521
|
+
};
|
|
1522
|
+
const runAfter = async (preparedResponse = response) => {
|
|
1461
1523
|
try {
|
|
1462
|
-
await this.applyAfterInterceptors(cloneRequestContext(currentRequest),
|
|
1524
|
+
await this.applyAfterInterceptors(cloneRequestContext(currentRequest), preparedResponse, durationMs, options.deadlineThroughFinalize ? timeout.signal : undefined);
|
|
1463
1525
|
}
|
|
1464
1526
|
catch (error) {
|
|
1527
|
+
if (options.deadlineThroughFinalize)
|
|
1528
|
+
throw error;
|
|
1465
1529
|
await this.applyErrorInterceptors({ request: cloneRequestContext(currentRequest), error, durationMs });
|
|
1466
1530
|
throw error;
|
|
1467
1531
|
}
|
|
1468
1532
|
};
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
if (!response.ok && !options.okStatuses?.includes(response.status)) {
|
|
1475
|
-
const body = options.errorBody ? await options.errorBody(response) : await parseResponseBody(response.clone());
|
|
1476
|
-
const httpError = toHttpError(response.status, body);
|
|
1477
|
-
const authRefreshedRequest = refreshedAuth
|
|
1478
|
-
? undefined
|
|
1479
|
-
: await this.refreshReplaySafeRequestAuth(request, response.status);
|
|
1480
|
-
if (authRefreshedRequest) {
|
|
1481
|
-
request = authRefreshedRequest;
|
|
1482
|
-
refreshedAuth = true;
|
|
1483
|
-
continue;
|
|
1533
|
+
try {
|
|
1534
|
+
if (options.shortCircuit) {
|
|
1535
|
+
const shorted = await options.shortCircuit(response, durationMs, currentRequest, runAfter);
|
|
1536
|
+
if (shorted)
|
|
1537
|
+
return shorted.value;
|
|
1484
1538
|
}
|
|
1485
|
-
if (
|
|
1486
|
-
|
|
1487
|
-
|
|
1539
|
+
if (!response.ok && !options.okStatuses?.includes(response.status)) {
|
|
1540
|
+
const body = options.errorBody
|
|
1541
|
+
? await options.errorBody(response, options.deadlineThroughFinalize ? timeout.signal : undefined)
|
|
1542
|
+
: await parseResponseBody(response.clone());
|
|
1543
|
+
const httpError = toHttpError(response.status, body);
|
|
1544
|
+
if (!refreshedAuth &&
|
|
1545
|
+
(response.status === 401 || response.status === 403) &&
|
|
1546
|
+
this.authProvider &&
|
|
1547
|
+
DEFAULT_RETRY_METHODS.has(request.method)) {
|
|
1548
|
+
await options.beforeReplay?.(cloneRequestContext(request), response.status, "authentication");
|
|
1549
|
+
}
|
|
1550
|
+
const authRefreshedRequest = refreshedAuth
|
|
1551
|
+
? undefined
|
|
1552
|
+
: await this.refreshReplaySafeRequestAuth(request, response.status);
|
|
1553
|
+
if (authRefreshedRequest) {
|
|
1554
|
+
request = authRefreshedRequest;
|
|
1555
|
+
refreshedAuth = true;
|
|
1556
|
+
continue;
|
|
1557
|
+
}
|
|
1558
|
+
if (shouldRetryRequest(this.retryOptions, request.method, attempt, response.status, httpError)) {
|
|
1559
|
+
await options.beforeReplay?.(cloneRequestContext(request), response.status, "retry");
|
|
1560
|
+
await this.sleepBeforeRetry(attempt, response, retrySignal);
|
|
1561
|
+
continue;
|
|
1562
|
+
}
|
|
1563
|
+
const fallback = options.onTerminalError?.(httpError);
|
|
1564
|
+
if (fallback !== undefined)
|
|
1565
|
+
return fallback;
|
|
1566
|
+
if (options.deadlineThroughFinalize) {
|
|
1567
|
+
return await awaitDeadlineOwned(Promise.reject(httpError));
|
|
1568
|
+
}
|
|
1569
|
+
await this.applyErrorInterceptors({ request: cloneRequestContext(request), error: httpError, durationMs });
|
|
1570
|
+
throw httpError;
|
|
1488
1571
|
}
|
|
1489
|
-
const
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1572
|
+
const finalized = options.finalize(response, durationMs, currentRequest, runAfter, timeout.signal);
|
|
1573
|
+
return await (options.deadlineThroughFinalize ? awaitDeadlineOwned(finalized) : finalized);
|
|
1574
|
+
}
|
|
1575
|
+
catch (error) {
|
|
1576
|
+
if (!options.deadlineThroughFinalize || !timeout.signal?.aborted)
|
|
1577
|
+
throw error;
|
|
1578
|
+
const terminalError = timeout.didTimeout ? new HonuaTimeoutError(this.timeoutMs ?? 0) : new HonuaAbortError();
|
|
1579
|
+
beginTerminalErrorNotification(terminalError, performance.now() - startTime);
|
|
1580
|
+
throw terminalError;
|
|
1581
|
+
}
|
|
1582
|
+
finally {
|
|
1583
|
+
if (options.deadlineThroughFinalize)
|
|
1584
|
+
timeout.dispose();
|
|
1494
1585
|
}
|
|
1495
|
-
return options.finalize(response, durationMs, currentRequest, runAfter);
|
|
1496
1586
|
}
|
|
1497
1587
|
}
|
|
1498
1588
|
async applyBeforeInterceptors(request) {
|
|
@@ -1514,7 +1604,7 @@ export class HonuaClient {
|
|
|
1514
1604
|
}
|
|
1515
1605
|
return next;
|
|
1516
1606
|
}
|
|
1517
|
-
async applyAfterInterceptors(request, response, durationMs) {
|
|
1607
|
+
async applyAfterInterceptors(request, response, durationMs, deadlineSignal) {
|
|
1518
1608
|
for (const interceptor of this.interceptors) {
|
|
1519
1609
|
// Only clone the response for interceptors that actually inspect it. This
|
|
1520
1610
|
// keeps the no-after-interceptor hot path free of `Response.clone()` (so
|
|
@@ -1523,12 +1613,16 @@ export class HonuaClient {
|
|
|
1523
1613
|
if (!interceptor.after) {
|
|
1524
1614
|
continue;
|
|
1525
1615
|
}
|
|
1616
|
+
if (deadlineSignal?.aborted)
|
|
1617
|
+
throw new HonuaAbortError();
|
|
1526
1618
|
const context = {
|
|
1527
1619
|
request: cloneRequestContext(request),
|
|
1528
1620
|
response: response.clone(),
|
|
1529
1621
|
durationMs,
|
|
1530
1622
|
};
|
|
1531
1623
|
await interceptor.after(context);
|
|
1624
|
+
if (deadlineSignal?.aborted)
|
|
1625
|
+
throw new HonuaAbortError();
|
|
1532
1626
|
}
|
|
1533
1627
|
}
|
|
1534
1628
|
/** Whether any registered interceptor inspects responses (`after` hook). */
|
|
@@ -1545,6 +1639,21 @@ export class HonuaClient {
|
|
|
1545
1639
|
}
|
|
1546
1640
|
}
|
|
1547
1641
|
}
|
|
1642
|
+
/**
|
|
1643
|
+
* Start every terminal error hook independently so one nonsettling hook
|
|
1644
|
+
* cannot prevent later hooks from observing the same failure. Each hook is
|
|
1645
|
+
* contained so a detached deadline notification can never reject unhandled.
|
|
1646
|
+
*/
|
|
1647
|
+
async applyErrorInterceptorsConcurrently(context) {
|
|
1648
|
+
await Promise.all(this.interceptors.map(async (interceptor) => {
|
|
1649
|
+
try {
|
|
1650
|
+
await interceptor.error?.(context);
|
|
1651
|
+
}
|
|
1652
|
+
catch {
|
|
1653
|
+
// Preserve the terminal request failure; interceptor failures should not mask it.
|
|
1654
|
+
}
|
|
1655
|
+
}));
|
|
1656
|
+
}
|
|
1548
1657
|
async refreshReplaySafeRequestAuth(request, statusCode) {
|
|
1549
1658
|
if ((statusCode !== 401 && statusCode !== 403) ||
|
|
1550
1659
|
!this.authProvider ||
|
|
@@ -1604,13 +1713,17 @@ async function parseResponseBody(response, maxResponseBytes) {
|
|
|
1604
1713
|
return { raw: text };
|
|
1605
1714
|
}
|
|
1606
1715
|
}
|
|
1607
|
-
async function readBoundedResponseBytes(response, maximum) {
|
|
1716
|
+
async function readBoundedResponseBytes(response, maximum, signal) {
|
|
1717
|
+
if (signal?.aborted) {
|
|
1718
|
+
void response.body?.cancel().catch(() => undefined);
|
|
1719
|
+
throw new HonuaAbortError();
|
|
1720
|
+
}
|
|
1608
1721
|
const advertised = response.headers.get("content-length");
|
|
1609
1722
|
if (advertised !== null) {
|
|
1610
1723
|
const length = Number(advertised);
|
|
1611
1724
|
if (Number.isFinite(length) && length > maximum) {
|
|
1612
|
-
|
|
1613
|
-
throw new HonuaNetworkError(`
|
|
1725
|
+
void response.body?.cancel().catch(() => undefined);
|
|
1726
|
+
throw new HonuaNetworkError(`Response body exceeds the configured ${maximum}-byte limit.`, undefined);
|
|
1614
1727
|
}
|
|
1615
1728
|
}
|
|
1616
1729
|
if (!response.body)
|
|
@@ -1618,20 +1731,32 @@ async function readBoundedResponseBytes(response, maximum) {
|
|
|
1618
1731
|
const reader = response.body.getReader();
|
|
1619
1732
|
const chunks = [];
|
|
1620
1733
|
let total = 0;
|
|
1734
|
+
const abort = () => void reader.cancel().catch(() => undefined);
|
|
1735
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
1621
1736
|
try {
|
|
1622
1737
|
for (;;) {
|
|
1738
|
+
if (signal?.aborted)
|
|
1739
|
+
throw new HonuaAbortError();
|
|
1623
1740
|
const { done, value } = await reader.read();
|
|
1741
|
+
if (signal?.aborted)
|
|
1742
|
+
throw new HonuaAbortError();
|
|
1624
1743
|
if (done)
|
|
1625
1744
|
break;
|
|
1626
1745
|
total += value.byteLength;
|
|
1627
1746
|
if (total > maximum) {
|
|
1628
|
-
|
|
1629
|
-
throw new HonuaNetworkError(`
|
|
1747
|
+
void reader.cancel().catch(() => undefined);
|
|
1748
|
+
throw new HonuaNetworkError(`Response body exceeds the configured ${maximum}-byte limit.`, undefined);
|
|
1630
1749
|
}
|
|
1631
1750
|
chunks.push(value);
|
|
1632
1751
|
}
|
|
1633
1752
|
}
|
|
1753
|
+
catch (error) {
|
|
1754
|
+
if (signal?.aborted)
|
|
1755
|
+
throw new HonuaAbortError();
|
|
1756
|
+
throw error;
|
|
1757
|
+
}
|
|
1634
1758
|
finally {
|
|
1759
|
+
signal?.removeEventListener("abort", abort);
|
|
1635
1760
|
reader.releaseLock();
|
|
1636
1761
|
}
|
|
1637
1762
|
const bytes = new Uint8Array(total);
|
|
@@ -1642,6 +1767,14 @@ async function readBoundedResponseBytes(response, maximum) {
|
|
|
1642
1767
|
}
|
|
1643
1768
|
return bytes;
|
|
1644
1769
|
}
|
|
1770
|
+
function bufferedResponse(source, bytes) {
|
|
1771
|
+
const body = source.status === 204 || source.status === 205 || source.status === 304 ? null : bytes.slice();
|
|
1772
|
+
return new Response(body, {
|
|
1773
|
+
status: source.status,
|
|
1774
|
+
statusText: source.statusText,
|
|
1775
|
+
headers: source.headers,
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1645
1778
|
function isObject(value) {
|
|
1646
1779
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1647
1780
|
}
|
|
@@ -1672,6 +1805,53 @@ function cloneRequestContext(request) {
|
|
|
1672
1805
|
},
|
|
1673
1806
|
};
|
|
1674
1807
|
}
|
|
1808
|
+
function awaitAbortable(value, signal) {
|
|
1809
|
+
const pending = Promise.resolve(value);
|
|
1810
|
+
if (!signal)
|
|
1811
|
+
return pending;
|
|
1812
|
+
if (signal.aborted) {
|
|
1813
|
+
void pending.catch(() => undefined);
|
|
1814
|
+
return Promise.reject(new HonuaAbortError());
|
|
1815
|
+
}
|
|
1816
|
+
return new Promise((resolve, reject) => {
|
|
1817
|
+
let settled = false;
|
|
1818
|
+
const finish = (callback) => {
|
|
1819
|
+
if (settled)
|
|
1820
|
+
return;
|
|
1821
|
+
settled = true;
|
|
1822
|
+
signal.removeEventListener("abort", abort);
|
|
1823
|
+
callback();
|
|
1824
|
+
};
|
|
1825
|
+
const abort = () => finish(() => reject(new HonuaAbortError()));
|
|
1826
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
1827
|
+
pending.then((result) => finish(() => resolve(result)), (error) => finish(() => reject(error)));
|
|
1828
|
+
});
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* A response prepared under a tighter body boundary still represents the same
|
|
1832
|
+
* physical fetch. Preserve the fetch-owned semantic properties for public
|
|
1833
|
+
* interceptors and for every defensive clone they receive.
|
|
1834
|
+
*/
|
|
1835
|
+
function preserveResponseSemantics(response, source) {
|
|
1836
|
+
return decorateResponseSemantics(response, Object.freeze({
|
|
1837
|
+
url: source.url,
|
|
1838
|
+
type: source.type,
|
|
1839
|
+
redirected: source.redirected,
|
|
1840
|
+
}));
|
|
1841
|
+
}
|
|
1842
|
+
function decorateResponseSemantics(response, semantics) {
|
|
1843
|
+
const nativeClone = response.clone.bind(response);
|
|
1844
|
+
Object.defineProperties(response, {
|
|
1845
|
+
url: { configurable: true, value: semantics.url },
|
|
1846
|
+
type: { configurable: true, value: semantics.type },
|
|
1847
|
+
redirected: { configurable: true, value: semantics.redirected },
|
|
1848
|
+
clone: {
|
|
1849
|
+
configurable: true,
|
|
1850
|
+
value: () => decorateResponseSemantics(nativeClone(), semantics),
|
|
1851
|
+
},
|
|
1852
|
+
});
|
|
1853
|
+
return response;
|
|
1854
|
+
}
|
|
1675
1855
|
function cloneHeadersInit(headers) {
|
|
1676
1856
|
return mergeHeaders(headers);
|
|
1677
1857
|
}
|
|
@@ -22,6 +22,14 @@ export declare const HONUA_ERROR_RUNTIME_CLASSIFICATIONS: Readonly<{
|
|
|
22
22
|
readonly "core.cancelled": HonuaErrorRuntimeClassification;
|
|
23
23
|
readonly "core.grpc.transient": HonuaErrorRuntimeClassification;
|
|
24
24
|
readonly "core.grpc.rejected": HonuaErrorRuntimeClassification;
|
|
25
|
+
readonly "pmtiles.lifecycle.invalid-request": HonuaErrorRuntimeClassification;
|
|
26
|
+
readonly "pmtiles.lifecycle.invalid-response": HonuaErrorRuntimeClassification;
|
|
27
|
+
readonly "pmtiles.lifecycle.response-too-large": HonuaErrorRuntimeClassification;
|
|
28
|
+
readonly "pmtiles.lifecycle.job-poll-timeout": HonuaErrorRuntimeClassification;
|
|
29
|
+
readonly "pmtiles.lifecycle.job-failed": HonuaErrorRuntimeClassification;
|
|
30
|
+
readonly "pmtiles.lifecycle.job-cancelled": HonuaErrorRuntimeClassification;
|
|
31
|
+
readonly "pmtiles.lifecycle.access-url-expired": HonuaErrorRuntimeClassification;
|
|
32
|
+
readonly "pmtiles.lifecycle.manual-cleanup-unsupported": HonuaErrorRuntimeClassification;
|
|
25
33
|
readonly "core.geometry.unknown-geometry": HonuaErrorRuntimeClassification;
|
|
26
34
|
readonly "core.geometry.malformed-geometry": HonuaErrorRuntimeClassification;
|
|
27
35
|
readonly "core.auth.interaction-required": HonuaErrorRuntimeClassification;
|
|
@@ -33,12 +41,21 @@ export declare const HONUA_ERROR_RUNTIME_CLASSIFICATIONS: Readonly<{
|
|
|
33
41
|
readonly "core.job-failed": HonuaErrorRuntimeClassification;
|
|
34
42
|
readonly "core.wms-capabilities-parse": HonuaErrorRuntimeClassification;
|
|
35
43
|
readonly "core.wmts-capabilities-parse": HonuaErrorRuntimeClassification;
|
|
44
|
+
readonly "core.coverage.invalid-request": HonuaErrorRuntimeClassification;
|
|
45
|
+
readonly "core.coverage.invalid-response": HonuaErrorRuntimeClassification;
|
|
46
|
+
readonly "core.coverage.response-too-large": HonuaErrorRuntimeClassification;
|
|
47
|
+
readonly "core.coverage.unsupported-format": HonuaErrorRuntimeClassification;
|
|
48
|
+
readonly "core.coverage.service-error": HonuaErrorRuntimeClassification;
|
|
49
|
+
readonly "core.coverage.wcs-exception": HonuaErrorRuntimeClassification;
|
|
36
50
|
readonly "discovery.ambiguous-protocol": HonuaErrorRuntimeClassification;
|
|
37
51
|
readonly "discovery.ambiguous-source": HonuaErrorRuntimeClassification;
|
|
52
|
+
readonly "discovery.invalid-cloud-native-input": HonuaErrorRuntimeClassification;
|
|
53
|
+
readonly "discovery.invalid-cloud-native-manifest": HonuaErrorRuntimeClassification;
|
|
38
54
|
readonly "discovery.invalid-endpoint": HonuaErrorRuntimeClassification;
|
|
39
55
|
readonly "discovery.invalid-cache-identity": HonuaErrorRuntimeClassification;
|
|
40
56
|
readonly "discovery.invalid-discovery-cache": HonuaErrorRuntimeClassification;
|
|
41
57
|
readonly "discovery.invalid-capability": HonuaErrorRuntimeClassification;
|
|
58
|
+
readonly "discovery.cloud-native-operation-unavailable": HonuaErrorRuntimeClassification;
|
|
42
59
|
readonly "discovery.unsupported-protocol": HonuaErrorRuntimeClassification;
|
|
43
60
|
readonly "discovery.protocol-mismatch": HonuaErrorRuntimeClassification;
|
|
44
61
|
readonly "query.planning.invalid-query": HonuaErrorRuntimeClassification;
|
|
@@ -48,6 +65,7 @@ export declare const HONUA_ERROR_RUNTIME_CLASSIFICATIONS: Readonly<{
|
|
|
48
65
|
readonly "query.planning.fallback-disabled": HonuaErrorRuntimeClassification;
|
|
49
66
|
readonly "query.planning.unsafe-materialization": HonuaErrorRuntimeClassification;
|
|
50
67
|
readonly "query.execution.invalid-plan": HonuaErrorRuntimeClassification;
|
|
68
|
+
readonly "query.execution.wfs-protocol": HonuaErrorRuntimeClassification;
|
|
51
69
|
readonly "query.execution.plan-context-mismatch": HonuaErrorRuntimeClassification;
|
|
52
70
|
readonly "query.execution.unsafe-materialization": HonuaErrorRuntimeClassification;
|
|
53
71
|
readonly "query.execution.invalid-resource-handle": HonuaErrorRuntimeClassification;
|
|
@@ -102,9 +120,12 @@ export declare const HONUA_ERROR_RUNTIME_CLASSIFICATIONS: Readonly<{
|
|
|
102
120
|
readonly "realtime.checkpoint.invalid": HonuaErrorRuntimeClassification;
|
|
103
121
|
readonly "realtime.sequence.gap": HonuaErrorRuntimeClassification;
|
|
104
122
|
readonly "realtime.protocol.terminal": HonuaErrorRuntimeClassification;
|
|
123
|
+
readonly "realtime.reconciliation.disposed": HonuaErrorRuntimeClassification;
|
|
124
|
+
readonly "realtime.reconciliation.invalid-option": HonuaErrorRuntimeClassification;
|
|
105
125
|
readonly "offline.region.validation": HonuaErrorRuntimeClassification;
|
|
106
126
|
readonly "offline.region.quota": HonuaErrorRuntimeClassification;
|
|
107
127
|
readonly "offline.region.integrity": HonuaErrorRuntimeClassification;
|
|
128
|
+
readonly "offline.region.miss": HonuaErrorRuntimeClassification;
|
|
108
129
|
readonly "offline.cancelled": HonuaErrorRuntimeClassification;
|
|
109
130
|
readonly "offline.transport.failure": HonuaErrorRuntimeClassification;
|
|
110
131
|
readonly "offline.transport.transient": HonuaErrorRuntimeClassification;
|
|
@@ -149,5 +170,7 @@ export declare const HONUA_ERROR_RUNTIME_CLASSIFICATIONS: Readonly<{
|
|
|
149
170
|
readonly "app.data-load-failed": HonuaErrorRuntimeClassification;
|
|
150
171
|
readonly "app.render-failed": HonuaErrorRuntimeClassification;
|
|
151
172
|
readonly "app.disposed": HonuaErrorRuntimeClassification;
|
|
173
|
+
readonly "app.export-unsafe": HonuaErrorRuntimeClassification;
|
|
174
|
+
readonly "app.export-failed": HonuaErrorRuntimeClassification;
|
|
152
175
|
}>;
|
|
153
176
|
//# sourceMappingURL=error-classifications.d.ts.map
|
|
@@ -1 +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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8J6B,CAAC"}
|
|
@@ -7,6 +7,14 @@ export const HONUA_ERROR_RUNTIME_CLASSIFICATIONS = Object.freeze({
|
|
|
7
7
|
"core.cancelled": runtimeClassification("core", "cancellation", false),
|
|
8
8
|
"core.grpc.transient": runtimeClassification("core", "protocol", true),
|
|
9
9
|
"core.grpc.rejected": runtimeClassification("core", "protocol", false),
|
|
10
|
+
"pmtiles.lifecycle.invalid-request": runtimeClassification("pmtiles", "validation", false),
|
|
11
|
+
"pmtiles.lifecycle.invalid-response": runtimeClassification("pmtiles", "validation", false),
|
|
12
|
+
"pmtiles.lifecycle.response-too-large": runtimeClassification("pmtiles", "validation", false),
|
|
13
|
+
"pmtiles.lifecycle.job-poll-timeout": runtimeClassification("pmtiles", "timeout", true),
|
|
14
|
+
"pmtiles.lifecycle.job-failed": runtimeClassification("pmtiles", "protocol", false),
|
|
15
|
+
"pmtiles.lifecycle.job-cancelled": runtimeClassification("pmtiles", "cancellation", false),
|
|
16
|
+
"pmtiles.lifecycle.access-url-expired": runtimeClassification("pmtiles", "validation", false),
|
|
17
|
+
"pmtiles.lifecycle.manual-cleanup-unsupported": runtimeClassification("pmtiles", "capability", false),
|
|
10
18
|
"core.geometry.unknown-geometry": runtimeClassification("core", "validation", false),
|
|
11
19
|
"core.geometry.malformed-geometry": runtimeClassification("core", "validation", false),
|
|
12
20
|
"core.auth.interaction-required": runtimeClassification("core", "authentication", false),
|
|
@@ -18,12 +26,21 @@ export const HONUA_ERROR_RUNTIME_CLASSIFICATIONS = Object.freeze({
|
|
|
18
26
|
"core.job-failed": runtimeClassification("core", "protocol", false),
|
|
19
27
|
"core.wms-capabilities-parse": runtimeClassification("core", "protocol", false),
|
|
20
28
|
"core.wmts-capabilities-parse": runtimeClassification("core", "protocol", false),
|
|
29
|
+
"core.coverage.invalid-request": runtimeClassification("core", "validation", false),
|
|
30
|
+
"core.coverage.invalid-response": runtimeClassification("core", "protocol", false),
|
|
31
|
+
"core.coverage.response-too-large": runtimeClassification("core", "validation", false),
|
|
32
|
+
"core.coverage.unsupported-format": runtimeClassification("core", "capability", false),
|
|
33
|
+
"core.coverage.service-error": runtimeClassification("core", "protocol", false),
|
|
34
|
+
"core.coverage.wcs-exception": runtimeClassification("core", "protocol", false),
|
|
21
35
|
"discovery.ambiguous-protocol": runtimeClassification("discovery", "validation", false),
|
|
22
36
|
"discovery.ambiguous-source": runtimeClassification("discovery", "validation", false),
|
|
37
|
+
"discovery.invalid-cloud-native-input": runtimeClassification("discovery", "validation", false),
|
|
38
|
+
"discovery.invalid-cloud-native-manifest": runtimeClassification("discovery", "validation", false),
|
|
23
39
|
"discovery.invalid-endpoint": runtimeClassification("discovery", "validation", false),
|
|
24
40
|
"discovery.invalid-cache-identity": runtimeClassification("discovery", "validation", false),
|
|
25
41
|
"discovery.invalid-discovery-cache": runtimeClassification("discovery", "validation", false),
|
|
26
42
|
"discovery.invalid-capability": runtimeClassification("discovery", "validation", false),
|
|
43
|
+
"discovery.cloud-native-operation-unavailable": runtimeClassification("discovery", "capability", false),
|
|
27
44
|
"discovery.unsupported-protocol": runtimeClassification("discovery", "capability", false),
|
|
28
45
|
"discovery.protocol-mismatch": runtimeClassification("discovery", "validation", false),
|
|
29
46
|
"query.planning.invalid-query": runtimeClassification("query", "validation", false),
|
|
@@ -33,6 +50,7 @@ export const HONUA_ERROR_RUNTIME_CLASSIFICATIONS = Object.freeze({
|
|
|
33
50
|
"query.planning.fallback-disabled": runtimeClassification("query", "capability", false),
|
|
34
51
|
"query.planning.unsafe-materialization": runtimeClassification("query", "validation", false),
|
|
35
52
|
"query.execution.invalid-plan": runtimeClassification("query", "validation", false),
|
|
53
|
+
"query.execution.wfs-protocol": runtimeClassification("query", "protocol", false),
|
|
36
54
|
"query.execution.plan-context-mismatch": runtimeClassification("query", "validation", false),
|
|
37
55
|
"query.execution.unsafe-materialization": runtimeClassification("query", "validation", false),
|
|
38
56
|
"query.execution.invalid-resource-handle": runtimeClassification("query", "validation", false),
|
|
@@ -87,9 +105,12 @@ export const HONUA_ERROR_RUNTIME_CLASSIFICATIONS = Object.freeze({
|
|
|
87
105
|
"realtime.checkpoint.invalid": runtimeClassification("realtime", "validation", false),
|
|
88
106
|
"realtime.sequence.gap": runtimeClassification("realtime", "protocol", true),
|
|
89
107
|
"realtime.protocol.terminal": runtimeClassification("realtime", "protocol", false),
|
|
108
|
+
"realtime.reconciliation.disposed": runtimeClassification("realtime", "validation", false),
|
|
109
|
+
"realtime.reconciliation.invalid-option": runtimeClassification("realtime", "validation", false),
|
|
90
110
|
"offline.region.validation": runtimeClassification("offline", "validation", false),
|
|
91
111
|
"offline.region.quota": runtimeClassification("offline", "validation", false),
|
|
92
112
|
"offline.region.integrity": runtimeClassification("offline", "protocol", false),
|
|
113
|
+
"offline.region.miss": runtimeClassification("offline", "validation", false),
|
|
93
114
|
"offline.cancelled": runtimeClassification("offline", "cancellation", false),
|
|
94
115
|
"offline.transport.failure": runtimeClassification("offline", "network", false),
|
|
95
116
|
"offline.transport.transient": runtimeClassification("offline", "network", true),
|
|
@@ -134,6 +155,8 @@ export const HONUA_ERROR_RUNTIME_CLASSIFICATIONS = Object.freeze({
|
|
|
134
155
|
"app.data-load-failed": runtimeClassification("app", "internal", false),
|
|
135
156
|
"app.render-failed": runtimeClassification("app", "internal", false),
|
|
136
157
|
"app.disposed": runtimeClassification("app", "validation", false),
|
|
158
|
+
"app.export-unsafe": runtimeClassification("app", "validation", false),
|
|
159
|
+
"app.export-failed": runtimeClassification("app", "internal", false),
|
|
137
160
|
});
|
|
138
161
|
function runtimeClassification(domain, category, retryable) {
|
|
139
162
|
return Object.freeze([domain, category, retryable]);
|