@cratis/arc 21.4.0 → 21.6.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/dist/cjs/queries/QueryFor.js +50 -11
- package/dist/cjs/queries/QueryFor.js.map +1 -1
- package/dist/cjs/queries/QueryHttpRequest.js +0 -0
- package/dist/cjs/queries/QueryHttpRequest.js.map +1 -1
- package/dist/cjs/queries/isAbortError.js +18 -0
- package/dist/cjs/queries/isAbortError.js.map +1 -0
- package/dist/esm/queries/QueryFor.d.ts.map +1 -1
- package/dist/esm/queries/QueryFor.js +50 -11
- package/dist/esm/queries/QueryFor.js.map +1 -1
- package/dist/esm/queries/QueryHttpRequest.d.ts.map +1 -1
- package/dist/esm/queries/QueryHttpRequest.js +0 -0
- package/dist/esm/queries/QueryHttpRequest.js.map +1 -1
- package/dist/esm/queries/for_QueryFor/when_performing/with_a_nullish_transport_rejection.d.ts +2 -0
- package/dist/esm/queries/for_QueryFor/when_performing/with_a_nullish_transport_rejection.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryFor/when_performing/with_a_nullish_transport_rejection.js +22 -0
- package/dist/esm/queries/for_QueryFor/when_performing/with_a_nullish_transport_rejection.js.map +1 -0
- package/dist/esm/queries/for_QueryFor/when_performing/with_an_aborted_request.d.ts +2 -0
- package/dist/esm/queries/for_QueryFor/when_performing/with_an_aborted_request.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryFor/when_performing/with_an_aborted_request.js +21 -0
- package/dist/esm/queries/for_QueryFor/when_performing/with_an_aborted_request.js.map +1 -0
- package/dist/esm/queries/for_QueryFor/when_performing/with_fetch_error.js +7 -18
- package/dist/esm/queries/for_QueryFor/when_performing/with_fetch_error.js.map +1 -1
- package/dist/esm/queries/isAbortError.d.ts +2 -0
- package/dist/esm/queries/isAbortError.d.ts.map +1 -0
- package/dist/esm/queries/isAbortError.js +16 -0
- package/dist/esm/queries/isAbortError.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/queries/QueryFor.ts +51 -11
- package/queries/QueryHttpRequest.ts +0 -0
- package/queries/for_QueryFor/when_performing/with_a_nullish_transport_rejection.ts +40 -0
- package/queries/for_QueryFor/when_performing/with_an_aborted_request.ts +34 -0
- package/queries/for_QueryFor/when_performing/with_fetch_error.ts +13 -20
- package/queries/isAbortError.ts +15 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
/**
|
|
4
|
+
* Determines whether an error is the rejection produced by aborting a request through an
|
|
5
|
+
* {@link AbortSignal} - as opposed to a genuine transport failure.
|
|
6
|
+
*
|
|
7
|
+
* Deliberately kept out of the `queries` barrel: it is an internal detail shared by the query
|
|
8
|
+
* transport and {@link QueryFor}, not public surface for consumers to depend on.
|
|
9
|
+
* @param error The error to inspect.
|
|
10
|
+
* @returns True if the error represents an aborted request, false otherwise.
|
|
11
|
+
*/ function isAbortError(error) {
|
|
12
|
+
return error?.name === 'AbortError';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { isAbortError };
|
|
16
|
+
//# sourceMappingURL=isAbortError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isAbortError.js","sources":["../../../queries/isAbortError.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * Determines whether an error is the rejection produced by aborting a request through an\n * {@link AbortSignal} - as opposed to a genuine transport failure.\n *\n * Deliberately kept out of the `queries` barrel: it is an internal detail shared by the query\n * transport and {@link QueryFor}, not public surface for consumers to depend on.\n * @param error The error to inspect.\n * @returns True if the error represents an aborted request, false otherwise.\n */\nexport function isAbortError(error: unknown): boolean {\n return (error as { name?: string })?.name === 'AbortError';\n}\n"],"names":["isAbortError","error","name"],"mappings":"AAAA;AACA;AAEA;;;;;;;;IASO,SAASA,YAAAA,CAAaC,KAAc,EAAA;IACvC,OAAQA,OAA6BC,IAAAA,KAAS,YAAA;AAClD;;;;"}
|