@warp-drive/core 5.6.0-alpha.17 → 5.6.0-alpha.5
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/README.md +7 -8
- package/declarations/index.d.ts +3 -14
- package/declarations/index.d.ts.map +1 -0
- package/declarations/request/-private/context.d.ts +35 -34
- package/declarations/request/-private/context.d.ts.map +1 -0
- package/declarations/request/-private/debug.d.ts +3 -2
- package/declarations/request/-private/debug.d.ts.map +1 -0
- package/declarations/request/-private/fetch.d.ts +36 -24
- package/declarations/request/-private/fetch.d.ts.map +1 -0
- package/declarations/request/-private/future.d.ts +4 -3
- package/declarations/request/-private/future.d.ts.map +1 -0
- package/declarations/request/-private/manager.d.ts +132 -159
- package/declarations/request/-private/manager.d.ts.map +1 -0
- package/declarations/request/-private/promise-cache.d.ts +13 -21
- package/declarations/request/-private/promise-cache.d.ts.map +1 -0
- package/declarations/request/-private/types.d.ts +123 -124
- package/declarations/request/-private/types.d.ts.map +1 -0
- package/declarations/request/-private/utils.d.ts +9 -8
- package/declarations/request/-private/utils.d.ts.map +1 -0
- package/declarations/request.d.ts +433 -5
- package/declarations/request.d.ts.map +1 -0
- package/declarations/types/-private.d.ts +8 -16
- package/declarations/types/-private.d.ts.map +1 -0
- package/declarations/types/cache/aliases.d.ts +1 -11
- package/declarations/types/cache/aliases.d.ts.map +1 -0
- package/declarations/types/cache/change.d.ts +5 -4
- package/declarations/types/cache/change.d.ts.map +1 -0
- package/declarations/types/cache/mutations.d.ts +28 -51
- package/declarations/types/cache/mutations.d.ts.map +1 -0
- package/declarations/types/cache/operations.d.ts +47 -60
- package/declarations/types/cache/operations.d.ts.map +1 -0
- package/declarations/types/cache/relationship.d.ts +9 -11
- package/declarations/types/cache/relationship.d.ts.map +1 -0
- package/declarations/types/cache.d.ts +484 -495
- package/declarations/types/cache.d.ts.map +1 -0
- package/declarations/types/graph.d.ts +40 -31
- package/declarations/types/graph.d.ts.map +1 -0
- package/declarations/types/identifier.d.ts +82 -83
- package/declarations/types/identifier.d.ts.map +1 -0
- package/declarations/types/json/raw.d.ts +2 -1
- package/declarations/types/json/raw.d.ts.map +1 -0
- package/declarations/types/params.d.ts +5 -4
- package/declarations/types/params.d.ts.map +1 -0
- package/declarations/types/record.d.ts +76 -117
- package/declarations/types/record.d.ts.map +1 -0
- package/declarations/types/record.type-test.d.ts +2 -0
- package/declarations/types/record.type-test.d.ts.map +1 -0
- package/declarations/types/request.d.ts +266 -289
- package/declarations/types/request.d.ts.map +1 -0
- package/declarations/types/request.type-test.d.ts +2 -0
- package/declarations/types/request.type-test.d.ts.map +1 -0
- package/declarations/types/runtime.d.ts +9 -8
- package/declarations/types/runtime.d.ts.map +1 -0
- package/declarations/types/schema/concepts.d.ts +13 -19
- package/declarations/types/schema/concepts.d.ts.map +1 -0
- package/declarations/types/schema/fields.d.ts +1741 -1712
- package/declarations/types/schema/fields.d.ts.map +1 -0
- package/declarations/types/schema/fields.type-test.d.ts +1 -0
- package/declarations/types/schema/fields.type-test.d.ts.map +1 -0
- package/declarations/types/spec/document.d.ts +22 -28
- package/declarations/types/spec/document.d.ts.map +1 -0
- package/declarations/types/spec/error.d.ts +17 -16
- package/declarations/types/spec/error.d.ts.map +1 -0
- package/declarations/types/spec/json-api-raw.d.ts +102 -102
- package/declarations/types/spec/json-api-raw.d.ts.map +1 -0
- package/declarations/types/symbols.d.ts +75 -74
- package/declarations/types/symbols.d.ts.map +1 -0
- package/declarations/types/utils.d.ts +5 -5
- package/declarations/types/utils.d.ts.map +1 -0
- package/declarations/types.d.ts +7 -10
- package/declarations/types.d.ts.map +1 -0
- package/dist/{context-COmAnXUQ.js → context-DE5sFezZ.js} +2 -2
- package/dist/context-DE5sFezZ.js.map +1 -0
- package/dist/index.js +104 -37
- package/dist/index.js.map +1 -0
- package/dist/request.js +1 -1
- package/dist/request.js.map +1 -0
- package/dist/types/-private.js +3 -3
- package/dist/types/-private.js.map +1 -0
- package/dist/types/cache/aliases.js.map +1 -0
- package/dist/types/cache/change.js.map +1 -0
- package/dist/types/cache/mutations.js.map +1 -0
- package/dist/types/cache/operations.js.map +1 -0
- package/dist/types/cache/relationship.js.map +1 -0
- package/dist/types/cache.js.map +1 -0
- package/dist/types/graph.js.map +1 -0
- package/dist/types/identifier.js.map +1 -0
- package/dist/types/json/raw.js.map +1 -0
- package/dist/types/params.js.map +1 -0
- package/dist/types/record.js +1 -1
- package/dist/types/record.js.map +1 -0
- package/dist/types/request.js +2 -2
- package/dist/types/request.js.map +1 -0
- package/dist/types/runtime.js +1 -1
- package/dist/types/runtime.js.map +1 -0
- package/dist/types/schema/concepts.js.map +1 -0
- package/dist/types/schema/fields.js +41 -8
- package/dist/types/schema/fields.js.map +1 -0
- package/dist/types/schema/fields.type-test.js.map +1 -0
- package/dist/types/spec/document.js.map +1 -0
- package/dist/types/spec/error.js.map +1 -0
- package/dist/types/spec/json-api-raw.js.map +1 -0
- package/dist/types/symbols.js +3 -3
- package/dist/types/symbols.js.map +1 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/types.js.map +1 -0
- package/package.json +8 -11
- package/cjs-dist/addon-shim.cjs +0 -1
- package/cjs-dist/cjs-set-config.cjs +0 -1
- package/declarations/build-config/babel-macros.d.ts +0 -1
- package/declarations/build-config/canary-features.d.ts +0 -1
- package/declarations/build-config/debugging.d.ts +0 -1
- package/declarations/build-config/deprecations.d.ts +0 -1
- package/declarations/build-config/env.d.ts +0 -1
- package/declarations/build-config/macros.d.ts +0 -1
- package/declarations/build-config.d.ts +0 -1
- package/declarations/configure.d.ts +0 -7
- package/declarations/graph/-private/-diff.d.ts +0 -32
- package/declarations/graph/-private/-edge-definition.d.ts +0 -148
- package/declarations/graph/-private/-state.d.ts +0 -96
- package/declarations/graph/-private/-utils.d.ts +0 -31
- package/declarations/graph/-private/coerce-id.d.ts +0 -10
- package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +0 -18
- package/declarations/graph/-private/edges/collection.d.ts +0 -39
- package/declarations/graph/-private/edges/implicit.d.ts +0 -43
- package/declarations/graph/-private/edges/resource.d.ts +0 -24
- package/declarations/graph/-private/graph.d.ts +0 -90
- package/declarations/graph/-private/normalize-link.d.ts +0 -8
- package/declarations/graph/-private/operations/add-to-related-records.d.ts +0 -4
- package/declarations/graph/-private/operations/merge-identifier.d.ts +0 -3
- package/declarations/graph/-private/operations/remove-from-related-records.d.ts +0 -4
- package/declarations/graph/-private/operations/replace-related-record.d.ts +0 -3
- package/declarations/graph/-private/operations/replace-related-records.d.ts +0 -62
- package/declarations/graph/-private/operations/update-relationship.d.ts +0 -13
- package/declarations/graph/-private.d.ts +0 -13
- package/declarations/reactive/-private/document.d.ts +0 -146
- package/declarations/reactive/-private/fields/compute.d.ts +0 -43
- package/declarations/reactive/-private/fields/extension.d.ts +0 -8
- package/declarations/reactive/-private/fields/managed-array.d.ts +0 -22
- package/declarations/reactive/-private/fields/managed-object.d.ts +0 -21
- package/declarations/reactive/-private/fields/many-array-manager.d.ts +0 -19
- package/declarations/reactive/-private/hooks.d.ts +0 -5
- package/declarations/reactive/-private/record.d.ts +0 -64
- package/declarations/reactive/-private/schema.d.ts +0 -271
- package/declarations/reactive/-private/symbols.d.ts +0 -36
- package/declarations/reactive/-private.d.ts +0 -1
- package/declarations/reactive.d.ts +0 -4
- package/declarations/store/-private/cache-handler/handler.d.ts +0 -62
- package/declarations/store/-private/cache-handler/types.d.ts +0 -98
- package/declarations/store/-private/cache-handler/utils.d.ts +0 -32
- package/declarations/store/-private/caches/cache-utils.d.ts +0 -12
- package/declarations/store/-private/caches/identifier-cache.d.ts +0 -304
- package/declarations/store/-private/caches/instance-cache.d.ts +0 -65
- package/declarations/store/-private/caches/resource-utils.d.ts +0 -9
- package/declarations/store/-private/debug/utils.d.ts +0 -6
- package/declarations/store/-private/default-cache-policy.d.ts +0 -384
- package/declarations/store/-private/legacy-model-support/record-reference.d.ts +0 -159
- package/declarations/store/-private/legacy-model-support/shim-model-class.d.ts +0 -17
- package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +0 -25
- package/declarations/store/-private/managers/cache-manager.d.ts +0 -443
- package/declarations/store/-private/managers/notification-manager.d.ts +0 -98
- package/declarations/store/-private/managers/record-array-manager.d.ts +0 -97
- package/declarations/store/-private/network/request-cache.d.ts +0 -107
- package/declarations/store/-private/new-core-tmp/promise-state.d.ts +0 -263
- package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +0 -176
- package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +0 -169
- package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +0 -35
- package/declarations/store/-private/new-core-tmp/request-state.d.ts +0 -277
- package/declarations/store/-private/new-core-tmp/request-subscription.d.ts +0 -261
- package/declarations/store/-private/record-arrays/identifier-array.d.ts +0 -147
- package/declarations/store/-private/record-arrays/many-array.d.ts +0 -197
- package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +0 -126
- package/declarations/store/-private/store-service.d.ts +0 -1605
- package/declarations/store/-private/utils/coerce-id.d.ts +0 -10
- package/declarations/store/-private/utils/construct-resource.d.ts +0 -6
- package/declarations/store/-private/utils/is-non-empty-string.d.ts +0 -1
- package/declarations/store/-private/utils/normalize-model-name.d.ts +0 -1
- package/declarations/store/-private/utils/uuid-polyfill.d.ts +0 -1
- package/declarations/store/-private.d.ts +0 -31
- package/declarations/store/-types/q/cache-capabilities-manager.d.ts +0 -99
- package/declarations/store/-types/q/ds-model.d.ts +0 -21
- package/declarations/store/-types/q/identifier.d.ts +0 -20
- package/declarations/store/-types/q/record-instance.d.ts +0 -23
- package/declarations/store/-types/q/schema-service.d.ts +0 -354
- package/declarations/store/-types/q/store.d.ts +0 -32
- package/declarations/store.d.ts +0 -1
- package/declarations/utils/string.d.ts +0 -48
- package/dist/build-config/babel-macros.js +0 -1
- package/dist/build-config/canary-features.js +0 -1
- package/dist/build-config/debugging.js +0 -1
- package/dist/build-config/deprecations.js +0 -1
- package/dist/build-config/env.js +0 -1
- package/dist/build-config/macros.js +0 -1
- package/dist/build-config.js +0 -1
- package/dist/configure-B48bFHOl.js +0 -181
- package/dist/configure.js +0 -1
- package/dist/graph/-private.js +0 -3372
- package/dist/handler-C2T-IyJK.js +0 -339
- package/dist/reactive/-private.js +0 -1
- package/dist/reactive.js +0 -1988
- package/dist/request-state-CjLph1LP.js +0 -8139
- package/dist/store/-private.js +0 -3
- package/dist/store.js +0 -545
- package/dist/symbols-SIstXMLI.js +0 -44
- package/dist/utils/string.js +0 -92
- package/logos/NCC-1701-a-blue.svg +0 -4
- package/logos/NCC-1701-a-gold.svg +0 -4
- package/logos/NCC-1701-a-gold_100.svg +0 -1
- package/logos/NCC-1701-a-gold_base-64.txt +0 -1
- package/logos/NCC-1701-a.svg +0 -4
- package/logos/README.md +0 -4
- package/logos/docs-badge.svg +0 -2
- package/logos/ember-data-logo-dark.svg +0 -12
- package/logos/ember-data-logo-light.svg +0 -12
- package/logos/github-header.svg +0 -444
- package/logos/social1.png +0 -0
- package/logos/social2.png +0 -0
- package/logos/warp-drive-logo-dark.svg +0 -4
- package/logos/warp-drive-logo-gold.svg +0 -4
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<h1 align="center">
|
|
2
2
|
<img
|
|
3
|
-
class="project-logo
|
|
4
|
-
src="
|
|
3
|
+
class="project-logo"
|
|
4
|
+
src="https://github.com/emberjs/data/blob/main/logos/github-header.svg#gh-light-mode-only"
|
|
5
5
|
alt="WarpDrive | Boldly go where no app has gone before"
|
|
6
6
|
title="WarpDrive | Boldly go where no app has gone before"
|
|
7
7
|
/>
|
|
8
8
|
<img
|
|
9
|
-
class="project-logo
|
|
10
|
-
src="
|
|
9
|
+
class="project-logo"
|
|
10
|
+
src="https://github.com/emberjs/data/blob/main/logos/github-header.svg#gh-dark-mode-only"
|
|
11
11
|
alt="WarpDrive | Boldly go where no app has gone before"
|
|
12
12
|
title="WarpDrive | Boldly go where no app has gone before"
|
|
13
13
|
/>
|
|
@@ -25,9 +25,8 @@
|
|
|
25
25
|
<a href="https://warp-drive.io">WarpDrive</a> is a lightweight data library for web apps —
|
|
26
26
|
<br>
|
|
27
27
|
universal, typed, reactive, and ready to scale.
|
|
28
|
-
<br
|
|
29
|
-
|
|
30
|
-
</p>
|
|
28
|
+
<br/><br/>
|
|
29
|
+
<p>
|
|
31
30
|
|
|
32
31
|
WarpDrive provides features that make it easy to build scalable, fast, feature
|
|
33
32
|
rich application — letting you ship better experiences more quickly without re-architecting your app or API. WarpDrive is:
|
|
@@ -54,7 +53,7 @@ rich application — letting you ship better experiences more quickly withou
|
|
|
54
53
|
## Installation
|
|
55
54
|
|
|
56
55
|
```sh
|
|
57
|
-
pnpm add
|
|
56
|
+
pnpm add @warp-drive/core
|
|
58
57
|
```
|
|
59
58
|
|
|
60
59
|
<br>
|
package/declarations/index.d.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
import type { ReactiveDocument } from "./reactive/-private/document.js";
|
|
6
|
-
export { Fetch } from "./request/-private/fetch.js";
|
|
7
|
-
export { RequestManager } from "./request/-private/manager.js";
|
|
8
|
-
export { Store, type StoreRequestContext, CacheHandler, type CachePolicy, type StoreRequestInput, recordIdentifierFor, storeFor } from "./store/-private.js";
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated use `ReactiveDocument` instead
|
|
11
|
-
*/
|
|
12
|
-
export type Document<T> = ReactiveDocument<T>;
|
|
13
|
-
export type { DocumentCacheOperation, CacheOperation, NotificationType } from "./store/-private/managers/notification-manager.js";
|
|
14
|
-
export { setIdentifierGenerationMethod, setIdentifierUpdateMethod, setIdentifierForgetMethod, setIdentifierResetMethod, setKeyInfoForResource } from "./store/-private/caches/identifier-cache.js";
|
|
1
|
+
export { Fetch } from './request/-private/fetch.ts';
|
|
2
|
+
export { RequestManager } from './request/-private/manager.ts';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import type { StableDocumentIdentifier } from
|
|
2
|
-
import type { ImmutableHeaders, ImmutableRequestInfo, RequestInfo, ResponseInfo } from
|
|
3
|
-
import type { DeferredStream, GodContext } from
|
|
1
|
+
import type { StableDocumentIdentifier } from '../../types/identifier';
|
|
2
|
+
import type { ImmutableHeaders, ImmutableRequestInfo, RequestInfo, ResponseInfo } from '../../types/request';
|
|
3
|
+
import type { DeferredStream, GodContext } from './types';
|
|
4
4
|
export declare function upgradeHeaders(headers: Headers | ImmutableHeaders): ImmutableHeaders;
|
|
5
5
|
export declare function cloneResponseProperties(response: Response): ResponseInfo;
|
|
6
6
|
export declare class ContextOwner {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
7
|
+
hasSetStream: boolean;
|
|
8
|
+
hasSetResponse: boolean;
|
|
9
|
+
hasSubscribers: boolean;
|
|
10
|
+
stream: DeferredStream;
|
|
11
|
+
response: ResponseInfo | null;
|
|
12
|
+
request: ImmutableRequestInfo;
|
|
13
|
+
enhancedRequest: ImmutableRequestInfo;
|
|
14
|
+
nextCalled: number;
|
|
15
|
+
god: GodContext;
|
|
16
|
+
controller: AbortController;
|
|
17
|
+
requestId: number;
|
|
18
|
+
isRoot: boolean;
|
|
19
|
+
constructor(request: RequestInfo, god: GodContext, isRoot?: boolean);
|
|
20
|
+
get hasRequestedStream(): boolean;
|
|
21
|
+
getResponse(): ResponseInfo | null;
|
|
22
|
+
getStream(): Promise<ReadableStream | null>;
|
|
23
|
+
abort(reason: DOMException): void;
|
|
24
|
+
setStream(stream: ReadableStream | Promise<ReadableStream | null> | null): void;
|
|
25
|
+
resolveStream(): void;
|
|
26
|
+
setResponse(response: ResponseInfo | Response | null): void;
|
|
27
27
|
}
|
|
28
28
|
export declare class Context {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
#private;
|
|
30
|
+
request: ImmutableRequestInfo;
|
|
31
|
+
id: number;
|
|
32
|
+
private _isCacheHandler;
|
|
33
|
+
private _finalized;
|
|
34
|
+
constructor(owner: ContextOwner, isCacheHandler: boolean);
|
|
35
|
+
setStream(stream: ReadableStream | Promise<ReadableStream | null>): void;
|
|
36
|
+
setResponse(response: ResponseInfo | Response | null): void;
|
|
37
|
+
setIdentifier(identifier: StableDocumentIdentifier): void;
|
|
38
|
+
get hasRequestedStream(): boolean;
|
|
39
|
+
_finalize(): void;
|
|
40
40
|
}
|
|
41
41
|
export type HandlerRequestContext = Context;
|
|
42
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/request/-private/context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAI7G,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1D,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,gBAAgB,GAAG,gBAAgB,CAQpF;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,CAYxE;AAED,qBAAa,YAAY;IACvB,YAAY,UAAS;IACrB,cAAc,UAAS;IACvB,cAAc,UAAS;IACvB,MAAM,EAAE,cAAc,CAA2C;IACjE,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAQ;IAC7B,OAAO,EAAE,oBAAoB,CAAC;IAC9B,eAAe,EAAE,oBAAoB,CAAC;IAC9C,UAAU,SAAK;IACP,GAAG,EAAE,UAAU,CAAC;IAChB,UAAU,EAAE,eAAe,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;gBAEZ,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,UAAQ;IAuCjE,IAAI,kBAAkB,IAAI,OAAO,CAEhC;IAED,WAAW,IAAI,YAAY,GAAG,IAAI;IASlC,SAAS,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAW3C,KAAK,CAAC,MAAM,EAAE,YAAY;IAI1B,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,IAAI;IAYxE,aAAa;IAIb,WAAW,CAAC,QAAQ,EAAE,YAAY,GAAG,QAAQ,GAAG,IAAI;CAwBrD;AAED,qBAAa,OAAO;;IAEV,OAAO,EAAE,oBAAoB,CAAC;IAC9B,EAAE,EAAE,MAAM,CAAC;IACnB,QAAgB,eAAe,CAAU;IACzC,QAAgB,UAAU,CAAU;gBAExB,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO;IAOxD,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAGjE,WAAW,CAAC,QAAQ,EAAE,YAAY,GAAG,QAAQ,GAAG,IAAI;IAIpD,aAAa,CAAC,UAAU,EAAE,wBAAwB;IAQlD,IAAI,kBAAkB,YAErB;IAED,SAAS;CAGV;AACD,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { RequestInfo } from
|
|
2
|
-
import { Context } from
|
|
1
|
+
import type { RequestInfo } from '../../types/request';
|
|
2
|
+
import { Context } from './context';
|
|
3
3
|
export declare function deepFreeze<T = unknown>(value: T): T;
|
|
4
4
|
export declare function assertValidRequest(request: RequestInfo | Context, isTopLevel: boolean): asserts request is RequestInfo;
|
|
5
|
+
//# sourceMappingURL=debug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../src/request/-private/debug.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAkB,MAAM,WAAW,CAAC;AAmFpD,wBAAgB,UAAU,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAuDnD;AAmJD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,GAAG,OAAO,EAC9B,UAAU,EAAE,OAAO,GAClB,OAAO,CAAC,OAAO,IAAI,WAAW,CA8DhC"}
|
|
@@ -1,31 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A basic Fetch Handler which converts a request into a
|
|
3
|
+
* `fetch` call presuming the response to be `json`.
|
|
4
|
+
*
|
|
5
|
+
* ```ts
|
|
6
|
+
* import Fetch from '@ember-data/request/fetch';
|
|
7
|
+
*
|
|
8
|
+
* manager.use([Fetch]);
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
import { type Context } from './context';
|
|
2
14
|
interface FastbootRequest extends Request {
|
|
3
|
-
|
|
4
|
-
|
|
15
|
+
protocol: string;
|
|
16
|
+
host: string;
|
|
17
|
+
}
|
|
18
|
+
interface FastBoot {
|
|
19
|
+
require(moduleName: string): unknown;
|
|
20
|
+
isFastBoot: boolean;
|
|
21
|
+
request: FastbootRequest;
|
|
5
22
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
isFastBoot: boolean;
|
|
9
|
-
request: FastbootRequest;
|
|
23
|
+
declare global {
|
|
24
|
+
const FastBoot: undefined | FastBoot;
|
|
10
25
|
}
|
|
11
26
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
27
|
+
* A basic handler which converts a request into a
|
|
28
|
+
* `fetch` call presuming the response to be `json`.
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* import Fetch from '@ember-data/request/fetch';
|
|
32
|
+
*
|
|
33
|
+
* manager.use([Fetch]);
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @class Fetch
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
28
39
|
declare const Fetch: {
|
|
29
|
-
|
|
40
|
+
request<T>(context: Context): Promise<T>;
|
|
30
41
|
};
|
|
31
42
|
export { Fetch };
|
|
43
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/request/-private/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,EAA2B,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAGlE,UAAU,eAAgB,SAAQ,OAAO;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AACD,UAAU,QAAQ;IAChB,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,MAAM,QAAQ,EAAE,SAAS,GAAG,QAAQ,CAAC;CACtC;AA6ED;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,KAAK;YACK,CAAC,WAAW,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;CAoJ/C,CAAC;AAMF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type StructuredDocument } from
|
|
2
|
-
import type { ContextOwner } from
|
|
3
|
-
import type { Deferred, DeferredFuture, Future } from
|
|
1
|
+
import { type StructuredDocument } from '../../types/request';
|
|
2
|
+
import type { ContextOwner } from './context';
|
|
3
|
+
import type { Deferred, DeferredFuture, Future } from './types';
|
|
4
4
|
export declare function isFuture<T>(maybe: unknown): maybe is Future<T>;
|
|
5
5
|
export declare function createDeferred<T>(): Deferred<T>;
|
|
6
6
|
export declare function upgradePromise<T>(promise: Promise<StructuredDocument<T>>, future: Future<T>): Future<T>;
|
|
7
7
|
export declare function createFuture<T>(owner: ContextOwner): DeferredFuture<T>;
|
|
8
|
+
//# sourceMappingURL=future.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"future.d.ts","sourceRoot":"","sources":["../../../src/request/-private/future.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGhE,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,CAE9D;AAED,wBAAgB,cAAc,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAQ/C;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAYvG;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,GAAG,cAAc,CAAC,CAAC,CAAC,CA0BtE"}
|
|
@@ -1,162 +1,135 @@
|
|
|
1
|
-
import type { StableDocumentIdentifier } from
|
|
2
|
-
import type { RequestInfo } from
|
|
3
|
-
import type { CacheHandler, Future, GenericCreateArgs, Handler, ManagedRequestPriority } from
|
|
4
|
-
import { IS_CACHE_HANDLER } from
|
|
1
|
+
import type { StableDocumentIdentifier } from '../../types/identifier';
|
|
2
|
+
import type { RequestInfo } from '../../types/request';
|
|
3
|
+
import type { CacheHandler, Future, GenericCreateArgs, Handler, ManagedRequestPriority } from './types';
|
|
4
|
+
import { IS_CACHE_HANDLER } from './utils';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* ```
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* A
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
* interface StructuredDataDocument<T> {
|
|
81
|
-
* request: ImmutableRequestInfo;
|
|
82
|
-
* response: ImmutableResponseInfo;
|
|
83
|
-
* content: T;
|
|
84
|
-
* }
|
|
85
|
-
* interface StructuredErrorDocument extends Error {
|
|
86
|
-
* request: ImmutableRequestInfo;
|
|
87
|
-
* response: ImmutableResponseInfo;
|
|
88
|
-
* error: string | object;
|
|
89
|
-
* }
|
|
90
|
-
* type StructuredDocument<T> = StructuredDataDocument<T> | StructuredErrorDocument;
|
|
91
|
-
* ```
|
|
92
|
-
*
|
|
93
|
-
* @class RequestManager
|
|
94
|
-
* @public
|
|
95
|
-
*/
|
|
6
|
+
* ```js
|
|
7
|
+
* import RequestManager from '@ember-data/request';
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* A RequestManager provides a request/response flow in which configured
|
|
11
|
+
* handlers are successively given the opportunity to handle, modify, or
|
|
12
|
+
* pass-along a request.
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* interface RequestManager {
|
|
16
|
+
* request<T>(req: RequestInfo): Future<T>;
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* For example:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* import RequestManager from '@ember-data/request';
|
|
24
|
+
* import Fetch from '@ember-data/request/fetch';
|
|
25
|
+
* import Auth from 'ember-simple-auth/ember-data-handler';
|
|
26
|
+
* import Config from './config';
|
|
27
|
+
*
|
|
28
|
+
* const { apiUrl } = Config;
|
|
29
|
+
*
|
|
30
|
+
* // ... create manager
|
|
31
|
+
* const manager = new RequestManager().use([Auth, Fetch]);
|
|
32
|
+
*
|
|
33
|
+
* // ... execute a request
|
|
34
|
+
* const response = await manager.request({
|
|
35
|
+
* url: `${apiUrl}/users`
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* ### Futures
|
|
40
|
+
*
|
|
41
|
+
* The return value of `manager.request` is a `Future`, which allows
|
|
42
|
+
* access to limited information about the request while it is still
|
|
43
|
+
* pending and fulfills with the final state when the request completes.
|
|
44
|
+
*
|
|
45
|
+
* A `Future` is cancellable via `abort`.
|
|
46
|
+
*
|
|
47
|
+
* Handlers may optionally expose a `ReadableStream` to the `Future` for
|
|
48
|
+
* streaming data; however, when doing so the future should not resolve
|
|
49
|
+
* until the response stream is fully read.
|
|
50
|
+
*
|
|
51
|
+
* ```ts
|
|
52
|
+
* interface Future<T> extends Promise<StructuredDocument<T>> {
|
|
53
|
+
* abort(): void;
|
|
54
|
+
*
|
|
55
|
+
* async getStream(): ReadableStream | null;
|
|
56
|
+
* }
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* ### StructuredDocuments
|
|
60
|
+
*
|
|
61
|
+
* A Future resolves with a `StructuredDataDocument` or rejects with a `StructuredErrorDocument`.
|
|
62
|
+
*
|
|
63
|
+
* ```ts
|
|
64
|
+
* interface StructuredDataDocument<T> {
|
|
65
|
+
* request: ImmutableRequestInfo;
|
|
66
|
+
* response: ImmutableResponseInfo;
|
|
67
|
+
* content: T;
|
|
68
|
+
* }
|
|
69
|
+
* interface StructuredErrorDocument extends Error {
|
|
70
|
+
* request: ImmutableRequestInfo;
|
|
71
|
+
* response: ImmutableResponseInfo;
|
|
72
|
+
* error: string | object;
|
|
73
|
+
* }
|
|
74
|
+
* type StructuredDocument<T> = StructuredDataDocument<T> | StructuredErrorDocument;
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @class RequestManager
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
96
80
|
export declare class RequestManager {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
T = unknown
|
|
151
|
-
>(request: RequestInfo<RT, T>): Future<RT>;
|
|
152
|
-
/**
|
|
153
|
-
* This method exists so that the RequestManager can be created
|
|
154
|
-
* can be created by container/factory systems that expect to
|
|
155
|
-
* call a static `create` method to instantiate the class.
|
|
156
|
-
*
|
|
157
|
-
* Using `new RequestManager()` directly is preferred.
|
|
158
|
-
*
|
|
159
|
-
* @private
|
|
160
|
-
*/
|
|
161
|
-
static create(options?: GenericCreateArgs): RequestManager;
|
|
81
|
+
#private;
|
|
82
|
+
_hasCacheHandler: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* A map of pending requests from request.id to their
|
|
85
|
+
* associated CacheHandler promise.
|
|
86
|
+
*
|
|
87
|
+
* This queue is managed by the CacheHandler
|
|
88
|
+
*
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
_pending: Map<number, Promise<unknown>>;
|
|
92
|
+
_deduped: Map<StableDocumentIdentifier, {
|
|
93
|
+
priority: ManagedRequestPriority;
|
|
94
|
+
promise: Promise<unknown>;
|
|
95
|
+
}>;
|
|
96
|
+
constructor(options?: GenericCreateArgs);
|
|
97
|
+
/**
|
|
98
|
+
* Register a handler to use for primary cache intercept.
|
|
99
|
+
*
|
|
100
|
+
* Only one such handler may exist. If using the same
|
|
101
|
+
* RequestManager as the Store instance the Store
|
|
102
|
+
* registers itself as a Cache handler.
|
|
103
|
+
*
|
|
104
|
+
* @public
|
|
105
|
+
* @param {Handler[]} cacheHandler
|
|
106
|
+
* @return {ThisType}
|
|
107
|
+
*/
|
|
108
|
+
useCache(cacheHandler: CacheHandler & {
|
|
109
|
+
[IS_CACHE_HANDLER]?: true;
|
|
110
|
+
}): this;
|
|
111
|
+
/**
|
|
112
|
+
* Register handler(s) to use when a request is issued.
|
|
113
|
+
*
|
|
114
|
+
* Handlers will be invoked in the order they are registered.
|
|
115
|
+
* Each Handler is given the opportunity to handle the request,
|
|
116
|
+
* curry the request, or pass along a modified request.
|
|
117
|
+
*
|
|
118
|
+
* @public
|
|
119
|
+
* @param {Handler[]} newHandlers
|
|
120
|
+
* @return {ThisType}
|
|
121
|
+
*/
|
|
122
|
+
use(newHandlers: Handler[]): this;
|
|
123
|
+
/**
|
|
124
|
+
* Issue a Request.
|
|
125
|
+
*
|
|
126
|
+
* Returns a Future that fulfills with a StructuredDocument
|
|
127
|
+
*
|
|
128
|
+
* @public
|
|
129
|
+
* @param {RequestInfo} request
|
|
130
|
+
* @return {Future}
|
|
131
|
+
*/
|
|
132
|
+
request<RT, T = unknown>(request: RequestInfo<RT, T>): Future<RT>;
|
|
133
|
+
static create(options?: GenericCreateArgs): RequestManager;
|
|
162
134
|
}
|
|
135
|
+
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../src/request/-private/manager.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAA2B,MAAM,qBAAqB,CAAC;AAIhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACxG,OAAO,EAAsB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH,qBAAa,cAAc;;IAEjB,gBAAgB,EAAE,OAAO,CAAC;IAClC;;;;;;;OAOG;IACK,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IACxC,QAAQ,EAAE,GAAG,CAAC,wBAAwB,EAAE;QAAE,QAAQ,EAAE,sBAAsB,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;gBAErG,OAAO,CAAC,EAAE,iBAAiB;IAMvC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,YAAY,EAAE,YAAY,GAAG;QAAE,CAAC,gBAAgB,CAAC,CAAC,EAAE,IAAI,CAAA;KAAE,GAAG,IAAI;IAiB1E;;;;;;;;;;OAUG;IACH,GAAG,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,IAAI;IAuBjC;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,EAAE,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC;IA0FjE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,iBAAiB;CAG1C"}
|
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
export type CacheResult<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
> = {
|
|
5
|
-
isError: true;
|
|
6
|
-
result: E;
|
|
1
|
+
export type CacheResult<T = unknown, E = unknown> = {
|
|
2
|
+
isError: true;
|
|
3
|
+
result: E;
|
|
7
4
|
} | {
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
isError: false;
|
|
6
|
+
result: T;
|
|
10
7
|
};
|
|
11
|
-
export type Awaitable<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
then: (onFulfilled: (value: T) => unknown, onRejected: (reason: E) => unknown) => unknown;
|
|
16
|
-
catch: (onRejected: (reason: E) => unknown) => unknown;
|
|
17
|
-
finally: (onFinally: () => unknown) => unknown;
|
|
8
|
+
export type Awaitable<T = unknown, E = unknown> = {
|
|
9
|
+
then: (onFulfilled: (value: T) => unknown, onRejected: (reason: E) => unknown) => unknown;
|
|
10
|
+
catch: (onRejected: (reason: E) => unknown) => unknown;
|
|
11
|
+
finally: (onFinally: () => unknown) => unknown;
|
|
18
12
|
};
|
|
19
|
-
export declare const PromiseCache: WeakMap<Awaitable, CacheResult
|
|
20
|
-
export declare const RequestMap: Map<number, CacheResult
|
|
13
|
+
export declare const PromiseCache: WeakMap<Awaitable<unknown, unknown>, CacheResult<unknown, unknown>>;
|
|
14
|
+
export declare const RequestMap: Map<number, CacheResult<unknown, unknown>>;
|
|
21
15
|
export declare function setRequestResult(requestId: number, result: CacheResult): void;
|
|
22
16
|
export declare function clearRequestResult(requestId: number): void;
|
|
23
17
|
export declare function getRequestResult(requestId: number): CacheResult | undefined;
|
|
24
18
|
export declare function setPromiseResult(promise: Promise<unknown> | Awaitable, result: CacheResult): void;
|
|
25
|
-
export declare function getPromiseResult<
|
|
26
|
-
|
|
27
|
-
E
|
|
28
|
-
>(promise: Promise<T> | Awaitable<T, E>): CacheResult<T, E> | undefined;
|
|
19
|
+
export declare function getPromiseResult<T, E>(promise: Promise<T> | Awaitable<T, E>): CacheResult<T, E> | undefined;
|
|
20
|
+
//# sourceMappingURL=promise-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promise-cache.d.ts","sourceRoot":"","sources":["../../../src/request/-private/promise-cache.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,IAAI;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,CAAC,CAAA;CAAE,CAAC;AAEjH,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,IAAI;IAChD,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,EAAE,UAAU,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,KAAK,OAAO,CAAC;IAC1F,KAAK,EAAE,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,KAAK,OAAO,CAAC;IACvD,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,OAAO,KAAK,OAAO,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,YAAY,qEAA2E,CAAC;AACrG,eAAO,MAAM,UAAU,4CAAkE,CAAC;AAE1F,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,QAEtE;AACD,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,QAEnD;AACD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAE3E;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS,EAAE,MAAM,EAAE,WAAW,QAE1F;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,CAE3G"}
|