@interop/was-client 0.99.0 → 0.100.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/README.md +94 -71
- package/dist/Collection.d.ts +20 -8
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +89 -69
- package/dist/Collection.js.map +1 -1
- package/dist/Resource.d.ts +14 -3
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +38 -27
- package/dist/Resource.js.map +1 -1
- package/dist/Space.d.ts +18 -4
- package/dist/Space.d.ts.map +1 -1
- package/dist/Space.js +64 -61
- package/dist/Space.js.map +1 -1
- package/dist/WasClient.d.ts +105 -58
- package/dist/WasClient.d.ts.map +1 -1
- package/dist/WasClient.js +216 -142
- package/dist/WasClient.js.map +1 -1
- package/dist/codec.d.ts +3 -2
- package/dist/codec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.js +37 -26
- package/dist/edv/EdvCodec.js.map +1 -1
- package/dist/edv/WasTransport.d.ts +7 -4
- package/dist/edv/WasTransport.d.ts.map +1 -1
- package/dist/edv/WasTransport.js +39 -20
- package/dist/edv/WasTransport.js.map +1 -1
- package/dist/edv/acquire.d.ts +3 -3
- package/dist/edv/acquire.d.ts.map +1 -1
- package/dist/edv/acquire.js +3 -3
- package/dist/edv/acquire.js.map +1 -1
- package/dist/edv/cipher.d.ts +7 -4
- package/dist/edv/cipher.d.ts.map +1 -1
- package/dist/edv/cipher.js +7 -4
- package/dist/edv/cipher.js.map +1 -1
- package/dist/edv/core.d.ts +1 -1
- package/dist/edv/core.d.ts.map +1 -1
- package/dist/edv/core.js +1 -1
- package/dist/edv/core.js.map +1 -1
- package/dist/edv/docCipher.d.ts +10 -7
- package/dist/edv/docCipher.d.ts.map +1 -1
- package/dist/edv/docCipher.js +12 -8
- package/dist/edv/docCipher.js.map +1 -1
- package/dist/edv/encryption.d.ts +2 -2
- package/dist/edv/encryption.d.ts.map +1 -1
- package/dist/edv/encryption.js +8 -6
- package/dist/edv/encryption.js.map +1 -1
- package/dist/edv/epochCrypto.d.ts +12 -4
- package/dist/edv/epochCrypto.d.ts.map +1 -1
- package/dist/edv/epochCrypto.js +37 -10
- package/dist/edv/epochCrypto.js.map +1 -1
- package/dist/edv/epochKeys.d.ts +6 -2
- package/dist/edv/epochKeys.d.ts.map +1 -1
- package/dist/edv/epochKeys.js +25 -14
- package/dist/edv/epochKeys.js.map +1 -1
- package/dist/edv/hmacKey.d.ts +7 -1
- package/dist/edv/hmacKey.d.ts.map +1 -1
- package/dist/edv/hmacKey.js +9 -3
- package/dist/edv/hmacKey.js.map +1 -1
- package/dist/edv/index.d.ts +1 -1
- package/dist/edv/index.d.ts.map +1 -1
- package/dist/edv/index.js +1 -1
- package/dist/edv/index.js.map +1 -1
- package/dist/edv/recipients.d.ts.map +1 -1
- package/dist/edv/recipients.js +2 -0
- package/dist/edv/recipients.js.map +1 -1
- package/dist/edv/refreshingDocCipher.d.ts +3 -3
- package/dist/edv/refreshingDocCipher.d.ts.map +1 -1
- package/dist/edv/refreshingDocCipher.js +3 -3
- package/dist/edv/refreshingDocCipher.js.map +1 -1
- package/dist/edv/transportFactory.d.ts +3 -3
- package/dist/edv/transportFactory.d.ts.map +1 -1
- package/dist/edv/transportFactory.js +3 -3
- package/dist/edv/transportFactory.js.map +1 -1
- package/dist/errors.d.ts +6 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +6 -4
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/codec.d.ts +7 -7
- package/dist/internal/codec.d.ts.map +1 -1
- package/dist/internal/codec.js +19 -18
- package/dist/internal/codec.js.map +1 -1
- package/dist/internal/conditional.d.ts +3 -3
- package/dist/internal/conditional.d.ts.map +1 -1
- package/dist/internal/conditional.js +5 -5
- package/dist/internal/conditional.js.map +1 -1
- package/dist/internal/grant.d.ts +15 -26
- package/dist/internal/grant.d.ts.map +1 -1
- package/dist/internal/grant.js +95 -29
- package/dist/internal/grant.js.map +1 -1
- package/dist/internal/memo.d.ts +13 -4
- package/dist/internal/memo.d.ts.map +1 -1
- package/dist/internal/memo.js +18 -7
- package/dist/internal/memo.js.map +1 -1
- package/dist/internal/meta.d.ts +8 -8
- package/dist/internal/meta.d.ts.map +1 -1
- package/dist/internal/meta.js +13 -10
- package/dist/internal/meta.js.map +1 -1
- package/dist/internal/pagination.d.ts +30 -15
- package/dist/internal/pagination.d.ts.map +1 -1
- package/dist/internal/pagination.js +31 -17
- package/dist/internal/pagination.js.map +1 -1
- package/dist/internal/paths.d.ts +332 -195
- package/dist/internal/paths.d.ts.map +1 -1
- package/dist/internal/paths.js +400 -367
- package/dist/internal/paths.js.map +1 -1
- package/dist/internal/policy.d.ts +23 -23
- package/dist/internal/policy.d.ts.map +1 -1
- package/dist/internal/policy.js +20 -20
- package/dist/internal/policy.js.map +1 -1
- package/dist/internal/request.d.ts +17 -21
- package/dist/internal/request.d.ts.map +1 -1
- package/dist/internal/request.js +10 -21
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/revoke.d.ts +34 -13
- package/dist/internal/revoke.d.ts.map +1 -1
- package/dist/internal/revoke.js +97 -28
- package/dist/internal/revoke.js.map +1 -1
- package/dist/internal/service.d.ts +25 -7
- package/dist/internal/service.d.ts.map +1 -1
- package/dist/internal/service.js +49 -45
- package/dist/internal/service.js.map +1 -1
- package/dist/internal/write.d.ts +18 -18
- package/dist/internal/write.d.ts.map +1 -1
- package/dist/internal/write.js +27 -27
- package/dist/internal/write.js.map +1 -1
- package/dist/paths.d.ts +32 -25
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +32 -25
- package/dist/paths.js.map +1 -1
- package/dist/sync/index.d.ts +4 -2
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +4 -2
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/port.d.ts +3 -3
- package/dist/sync/port.d.ts.map +1 -1
- package/dist/sync/port.js +12 -12
- package/dist/sync/port.js.map +1 -1
- package/dist/sync/provisioning.d.ts +10 -9
- package/dist/sync/provisioning.d.ts.map +1 -1
- package/dist/sync/provisioning.js +19 -18
- package/dist/sync/provisioning.js.map +1 -1
- package/dist/sync/types.d.ts +2 -2
- package/dist/types.d.ts +13 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grant.js","sourceRoot":"","sources":["../../src/internal/grant.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"grant.js","sourceRoot":"","sources":["../../src/internal/grant.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAG9C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAS,WAAW,CAAC,EACnB,QAAQ,EACR,MAAM,EAIP;IACC,MAAM,SAAS,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAA;IAC7C,sEAAsE;IACtE,qEAAqE;IACrE,0EAA0E;IAC1E,6DAA6D;IAC7D,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IACnC,IACE,MAAM,KAAK,IAAI;QACf,CAAC,aAAa,CAAC;YACb,gBAAgB,EAAE,MAAM;YACxB,oBAAoB,EAAE,SAAS;YAC/B,sBAAsB,EAAE,IAAI;SAC7B,CAAC,EACF,CAAC;QACD,MAAM,IAAI,eAAe,CACvB,iBAAiB,MAAM,mCAAmC;YACxD,IAAI,SAAS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AU,IAAI,UAAU;KAC7C,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/internal/memo.d.ts
CHANGED
|
@@ -8,21 +8,30 @@
|
|
|
8
8
|
* properties: concurrent callers share one round-trip, a rejection is not
|
|
9
9
|
* cached (so the next call retries rather than replaying a stale failure), and
|
|
10
10
|
* a reset drops whatever is held. Written once here so the three cannot drift
|
|
11
|
-
* apart, which they had.
|
|
11
|
+
* apart, which they had. A user whose input cannot change under it may name
|
|
12
|
+
* the rejections it wants kept, so a permanent failure is raised once and then
|
|
13
|
+
* replayed instead of re-attempted.
|
|
12
14
|
*/
|
|
13
15
|
/**
|
|
14
16
|
* A memo of one lazily-resolved value. Holds the in-flight promise so
|
|
15
17
|
* concurrent callers share a single resolution, drops it on rejection so a
|
|
16
|
-
* transient failure does not permanently poison the memo
|
|
17
|
-
* {@link Memo.reset} for when the
|
|
18
|
+
* transient failure does not permanently poison the memo (unless `retain`
|
|
19
|
+
* claims that rejection), and exposes {@link Memo.reset} for when the
|
|
20
|
+
* underlying answer is known to have changed.
|
|
18
21
|
*/
|
|
19
22
|
export declare class Memo<T> {
|
|
20
23
|
#private;
|
|
21
24
|
/**
|
|
22
25
|
* @param resolve {function} resolves a fresh value; re-invoked after a
|
|
23
26
|
* rejection or a `reset()`, else called at most once
|
|
27
|
+
* @param [options] {object}
|
|
28
|
+
* @param [options.retain] {function} given a rejection's reason, whether
|
|
29
|
+
* to keep that rejection memoized (a failure a retry cannot change);
|
|
30
|
+
* default: keep none
|
|
24
31
|
*/
|
|
25
|
-
constructor(resolve: () => Promise<T
|
|
32
|
+
constructor(resolve: () => Promise<T>, { retain }?: {
|
|
33
|
+
retain?: (err: unknown) => boolean;
|
|
34
|
+
});
|
|
26
35
|
/**
|
|
27
36
|
* Whether a resolution is already held -- in flight or settled. Lets a caller
|
|
28
37
|
* tell, synchronously and before calling {@link Memo.get}, whether its own
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memo.d.ts","sourceRoot":"","sources":["../../src/internal/memo.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"memo.d.ts","sourceRoot":"","sources":["../../src/internal/memo.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AAEH;;;;;;GAMG;AACH,qBAAa,IAAI,CAAC,CAAC;;IAKjB;;;;;;;OAOG;gBAED,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,EAAE,MAAoB,EAAE,GAAE;QAAE,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAA;KAAO;IAMvE;;;;;;OAMG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;OAIG;IACH,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC;IAmBjB;;;;OAIG;IACH,KAAK,IAAI,IAAI;CAGd"}
|
package/dist/internal/memo.js
CHANGED
|
@@ -8,23 +8,32 @@
|
|
|
8
8
|
* properties: concurrent callers share one round-trip, a rejection is not
|
|
9
9
|
* cached (so the next call retries rather than replaying a stale failure), and
|
|
10
10
|
* a reset drops whatever is held. Written once here so the three cannot drift
|
|
11
|
-
* apart, which they had.
|
|
11
|
+
* apart, which they had. A user whose input cannot change under it may name
|
|
12
|
+
* the rejections it wants kept, so a permanent failure is raised once and then
|
|
13
|
+
* replayed instead of re-attempted.
|
|
12
14
|
*/
|
|
13
15
|
/**
|
|
14
16
|
* A memo of one lazily-resolved value. Holds the in-flight promise so
|
|
15
17
|
* concurrent callers share a single resolution, drops it on rejection so a
|
|
16
|
-
* transient failure does not permanently poison the memo
|
|
17
|
-
* {@link Memo.reset} for when the
|
|
18
|
+
* transient failure does not permanently poison the memo (unless `retain`
|
|
19
|
+
* claims that rejection), and exposes {@link Memo.reset} for when the
|
|
20
|
+
* underlying answer is known to have changed.
|
|
18
21
|
*/
|
|
19
22
|
export class Memo {
|
|
20
23
|
#promise;
|
|
21
24
|
#resolve;
|
|
25
|
+
#retain;
|
|
22
26
|
/**
|
|
23
27
|
* @param resolve {function} resolves a fresh value; re-invoked after a
|
|
24
28
|
* rejection or a `reset()`, else called at most once
|
|
29
|
+
* @param [options] {object}
|
|
30
|
+
* @param [options.retain] {function} given a rejection's reason, whether
|
|
31
|
+
* to keep that rejection memoized (a failure a retry cannot change);
|
|
32
|
+
* default: keep none
|
|
25
33
|
*/
|
|
26
|
-
constructor(resolve) {
|
|
34
|
+
constructor(resolve, { retain = () => false } = {}) {
|
|
27
35
|
this.#resolve = resolve;
|
|
36
|
+
this.#retain = retain;
|
|
28
37
|
}
|
|
29
38
|
/**
|
|
30
39
|
* Whether a resolution is already held -- in flight or settled. Lets a caller
|
|
@@ -48,10 +57,12 @@ export class Memo {
|
|
|
48
57
|
const promise = this.#resolve();
|
|
49
58
|
// Memoize the in-flight promise so concurrent callers share one round-trip,
|
|
50
59
|
// but drop it on rejection so a transient failure does not permanently
|
|
51
|
-
// poison the memo.
|
|
60
|
+
// poison the memo. A rejection `retain` claims stays, so the next `get()`
|
|
61
|
+
// replays it rather than paying for an attempt that can only fail the same
|
|
62
|
+
// way. The identity guard avoids clobbering a newer promise.
|
|
52
63
|
this.#promise = promise;
|
|
53
|
-
promise.catch(() => {
|
|
54
|
-
if (this.#promise === promise) {
|
|
64
|
+
promise.catch((err) => {
|
|
65
|
+
if (this.#promise === promise && !this.#retain(err)) {
|
|
55
66
|
this.#promise = undefined;
|
|
56
67
|
}
|
|
57
68
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memo.js","sourceRoot":"","sources":["../../src/internal/memo.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"memo.js","sourceRoot":"","sources":["../../src/internal/memo.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AAEH;;;;;;GAMG;AACH,MAAM,OAAO,IAAI;IACf,QAAQ,CAAa;IACZ,QAAQ,CAAkB;IAC1B,OAAO,CAA2B;IAE3C;;;;;;;OAOG;IACH,YACE,OAAyB,EACzB,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC,KAAK,KAA6C,EAAE;QAErE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;QACvB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;IACvB,CAAC;IAED;;;;;;OAMG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAA;IACpC,CAAC;IAED;;;;OAIG;IACH,GAAG;QACD,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC,QAAQ,CAAA;QACtB,CAAC;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAA;QAC/B,4EAA4E;QAC5E,uEAAuE;QACvE,0EAA0E;QAC1E,2EAA2E;QAC3E,6DAA6D;QAC7D,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;QACvB,OAAO,CAAC,KAAK,CAAC,CAAC,GAAY,EAAQ,EAAE;YACnC,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;gBACpD,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAA;YAC3B,CAAC;QACH,CAAC,CAAC,CAAA;QACF,OAAO,OAAO,CAAA;IAChB,CAAC;IAED;;;;OAIG;IACH,KAAK;QACH,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAA;IAC3B,CAAC;CACF"}
|
package/dist/internal/meta.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import type { IZcap, ResourceMetadataCustom, ResourceMetadataCustomInput } from
|
|
|
9
9
|
*
|
|
10
10
|
* @param context {ClientContext}
|
|
11
11
|
* @param options {object}
|
|
12
|
-
* @param options.
|
|
12
|
+
* @param options.metaUrl {string} the `/meta` sub-resource URL
|
|
13
13
|
* @param options.codec {Promise<ResourceCodec>} the resolving codec, awaited
|
|
14
14
|
* concurrently with the read
|
|
15
15
|
* @param options.subject {string} the metadata's owner as it reads in the
|
|
@@ -27,8 +27,8 @@ import type { IZcap, ResourceMetadataCustom, ResourceMetadataCustomInput } from
|
|
|
27
27
|
*/
|
|
28
28
|
export declare function readMeta<Metadata extends {
|
|
29
29
|
custom?: ResourceMetadataCustom;
|
|
30
|
-
}>(context: ClientContext, {
|
|
31
|
-
|
|
30
|
+
}>(context: ClientContext, { metaUrl, codec: codecPromise, subject, slot, capability, onStored }: {
|
|
31
|
+
metaUrl: string;
|
|
32
32
|
codec: Promise<ResourceCodec>;
|
|
33
33
|
subject: string;
|
|
34
34
|
slot: MetaReadSlot;
|
|
@@ -50,7 +50,7 @@ export declare function readMeta<Metadata extends {
|
|
|
50
50
|
*
|
|
51
51
|
* @param context {ClientContext}
|
|
52
52
|
* @param options {object}
|
|
53
|
-
* @param options.
|
|
53
|
+
* @param options.metaUrl {string} the `meta` sub-resource URL
|
|
54
54
|
* @param options.codec {Promise<ResourceCodec>} the resolving codec
|
|
55
55
|
* @param options.custom {ResourceMetadataCustomInput} the user-writable
|
|
56
56
|
* properties, as a full replacement
|
|
@@ -61,8 +61,8 @@ export declare function readMeta<Metadata extends {
|
|
|
61
61
|
* @param [options.capability] {IZcap}
|
|
62
62
|
* @returns {Promise<{ etag?: string }>} the metadata's new ETag
|
|
63
63
|
*/
|
|
64
|
-
export declare function writeMeta(context: ClientContext, {
|
|
65
|
-
|
|
64
|
+
export declare function writeMeta(context: ClientContext, { metaUrl, codec: codecPromise, custom, slot, ifMatch, ifNoneMatch, capability }: {
|
|
65
|
+
metaUrl: string;
|
|
66
66
|
codec: Promise<ResourceCodec>;
|
|
67
67
|
custom: ResourceMetadataCustomInput;
|
|
68
68
|
slot: MetaWriteSlot;
|
|
@@ -136,13 +136,13 @@ export declare function patchCustom(handle: {
|
|
|
136
136
|
*
|
|
137
137
|
* @param context {ClientContext}
|
|
138
138
|
* @param options {object}
|
|
139
|
-
* @param options.
|
|
139
|
+
* @param options.spaceUrl {string}
|
|
140
140
|
* @param options.collectionId {string}
|
|
141
141
|
* @param [options.capability] {IZcap} capability attached to the request
|
|
142
142
|
* @returns {Promise<{ metadata: StoredCollectionMetadata; etag?: string } | null>}
|
|
143
143
|
*/
|
|
144
144
|
export declare function readCollectionMetadata(context: ClientContext, options: {
|
|
145
|
-
|
|
145
|
+
spaceUrl: string;
|
|
146
146
|
collectionId: string;
|
|
147
147
|
capability?: IZcap;
|
|
148
148
|
}): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../src/internal/meta.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAIjD,OAAO,KAAK,EACV,KAAK,EACL,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,aAAa,CAAA;AAEpB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,QAAQ,CAC5B,QAAQ,SAAS;IAAE,MAAM,CAAC,EAAE,sBAAsB,CAAA;CAAE,EAEpD,OAAO,EAAE,aAAa,EACtB,EACE,
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../src/internal/meta.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAIjD,OAAO,KAAK,EACV,KAAK,EACL,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,aAAa,CAAA;AAEpB;;;;;;;;;;;;;;;;;;;;;;GAsB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;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE;IACN,IAAI,IAAI,OAAO,CAAC;QACd,MAAM,CAAC,EAAE,sBAAsB,CAAA;QAC/B,IAAI,CAAC,EAAE,OAAO,CAAA;QACd,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,GAAG,IAAI,CAAC,CAAA;IACT,OAAO,CACL,IAAI,EAAE;QAAE,MAAM,CAAC,EAAE,sBAAsB,CAAA;KAAE,EACzC,OAAO,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,GACnD,OAAO,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC9B,EACD,KAAK,EAAE,sBAAsB,EAC7B,EACE,SAA6B,EAC7B,MAAc,EACf,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/C,OAAO,CAAC,IAAI,CAAC,CAuCf;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GACtE,OAAO,CAAC;IAAE,QAAQ,EAAE,wBAAwB,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CAevE"}
|
package/dist/internal/meta.js
CHANGED
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
* left as stored, because the codec that would decode it is itself resolved
|
|
18
18
|
* from the same object's `encryption` member. It lives here rather than beside
|
|
19
19
|
* the Collection Metadata helpers in `describe.ts` so those stay free of the
|
|
20
|
-
* transport layer; the request shape (
|
|
20
|
+
* transport layer; the request shape (URL, capability, null-unwrap,
|
|
21
21
|
* validator) is still stated in one place, shared by `Collection`'s read and
|
|
22
22
|
* write paths and by the codec resolver's descriptor discovery.
|
|
23
23
|
*/
|
|
24
24
|
import { NotFoundError, WasServerError } from '../errors.js';
|
|
25
25
|
import { compareAndSwap } from './cas.js';
|
|
26
|
-
import {
|
|
26
|
+
import { collectionMetaUrl } from './paths.js';
|
|
27
27
|
import { readDataWithEtag, send } from './request.js';
|
|
28
28
|
import { readEtag, writeHeaders } from './conditional.js';
|
|
29
29
|
import { withCodec } from './withCodec.js';
|
|
@@ -34,7 +34,7 @@ import { withCodec } from './withCodec.js';
|
|
|
34
34
|
*
|
|
35
35
|
* @param context {ClientContext}
|
|
36
36
|
* @param options {object}
|
|
37
|
-
* @param options.
|
|
37
|
+
* @param options.metaUrl {string} the `/meta` sub-resource URL
|
|
38
38
|
* @param options.codec {Promise<ResourceCodec>} the resolving codec, awaited
|
|
39
39
|
* concurrently with the read
|
|
40
40
|
* @param options.subject {string} the metadata's owner as it reads in the
|
|
@@ -50,11 +50,11 @@ import { withCodec } from './withCodec.js';
|
|
|
50
50
|
* decode fails: a read that throws is no baseline
|
|
51
51
|
* @returns {Promise<(Metadata & { etag?: string }) | null>}
|
|
52
52
|
*/
|
|
53
|
-
export async function readMeta(context, {
|
|
53
|
+
export async function readMeta(context, { metaUrl, codec: codecPromise, subject, slot, capability, onStored }) {
|
|
54
54
|
// The metadata GET does not depend on the codec (only its `custom` decode
|
|
55
55
|
// below does), so the two overlap.
|
|
56
56
|
const [codec, response] = await withCodec(codecPromise, send(context, {
|
|
57
|
-
|
|
57
|
+
url: metaUrl,
|
|
58
58
|
method: 'GET',
|
|
59
59
|
capability,
|
|
60
60
|
read: true
|
|
@@ -100,7 +100,7 @@ export async function readMeta(context, { metaPath, codec: codecPromise, subject
|
|
|
100
100
|
*
|
|
101
101
|
* @param context {ClientContext}
|
|
102
102
|
* @param options {object}
|
|
103
|
-
* @param options.
|
|
103
|
+
* @param options.metaUrl {string} the `meta` sub-resource URL
|
|
104
104
|
* @param options.codec {Promise<ResourceCodec>} the resolving codec
|
|
105
105
|
* @param options.custom {ResourceMetadataCustomInput} the user-writable
|
|
106
106
|
* properties, as a full replacement
|
|
@@ -111,11 +111,11 @@ export async function readMeta(context, { metaPath, codec: codecPromise, subject
|
|
|
111
111
|
* @param [options.capability] {IZcap}
|
|
112
112
|
* @returns {Promise<{ etag?: string }>} the metadata's new ETag
|
|
113
113
|
*/
|
|
114
|
-
export async function writeMeta(context, {
|
|
114
|
+
export async function writeMeta(context, { metaUrl, codec: codecPromise, custom, slot, ifMatch, ifNoneMatch, capability }) {
|
|
115
115
|
const codec = await codecPromise;
|
|
116
116
|
const { custom: encoded } = await codec.encodeMeta({ custom, slot });
|
|
117
117
|
const response = await send(context, {
|
|
118
|
-
|
|
118
|
+
url: metaUrl,
|
|
119
119
|
method: 'PUT',
|
|
120
120
|
capability,
|
|
121
121
|
json: { custom: encoded },
|
|
@@ -205,14 +205,17 @@ export async function patchCustom(handle, patch, { operation = 'Metadata update'
|
|
|
205
205
|
*
|
|
206
206
|
* @param context {ClientContext}
|
|
207
207
|
* @param options {object}
|
|
208
|
-
* @param options.
|
|
208
|
+
* @param options.spaceUrl {string}
|
|
209
209
|
* @param options.collectionId {string}
|
|
210
210
|
* @param [options.capability] {IZcap} capability attached to the request
|
|
211
211
|
* @returns {Promise<{ metadata: StoredCollectionMetadata; etag?: string } | null>}
|
|
212
212
|
*/
|
|
213
213
|
export async function readCollectionMetadata(context, options) {
|
|
214
214
|
const read = await readDataWithEtag(context, {
|
|
215
|
-
|
|
215
|
+
url: collectionMetaUrl({
|
|
216
|
+
spaceUrl: options.spaceUrl,
|
|
217
|
+
collectionId: options.collectionId
|
|
218
|
+
}),
|
|
216
219
|
capability: options.capability
|
|
217
220
|
});
|
|
218
221
|
if (read === null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../src/internal/meta.ts"],"names":[],"mappings":"AAAA;;GAEG;A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,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;gBACrB,MAAM,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAA;YACzD,CAAC;YACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;gBACrC,MAAM,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAA;YAC/C,CAAC;SACF;QACD,SAAS;QACT,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;KAC5C,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAAsB,EACtB,OAAuE;IAEvE,MAAM,IAAI,GAAG,MAAM,gBAAgB,CAA2B,OAAO,EAAE;QACrE,GAAG,EAAE,iBAAiB,CAAC;YACrB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,YAAY,EAAE,OAAO,CAAC,YAAY;SACnC,CAAC;QACF,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAA;IACF,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO;QACL,QAAQ,EAAE,IAAI,CAAC,IAAI;QACnB,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;KACpD,CAAA;AACH,CAAC"}
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* The helpers are generic over the listing envelope, so they serve all three
|
|
20
20
|
* paginated WAS listings: List Collection items (`CollectionResourcesList`),
|
|
21
21
|
* List Collections (`CollectionsList`), and List Spaces (`SpaceListing`). Each
|
|
22
|
-
* envelope shares the `{ items, next? }` shape
|
|
22
|
+
* envelope shares the `{ items, next?, totalItems? }` shape (`PageEnvelope`)
|
|
23
|
+
* that the traversal and the aggregation rely on.
|
|
23
24
|
*/
|
|
24
25
|
import type { CollectionResourcesList, IZcap, ResourceSummary } from '../types.js';
|
|
25
26
|
import type { ClientContext } from './request.js';
|
|
@@ -30,18 +31,22 @@ import type { ClientContext } from './request.js';
|
|
|
30
31
|
*/
|
|
31
32
|
export declare const DEFAULT_MAX_PAGES = 10000;
|
|
32
33
|
/**
|
|
33
|
-
* The shared shape of every paginated listing envelope: an `items` array
|
|
34
|
-
* optional `next` continuation URL
|
|
35
|
-
*
|
|
34
|
+
* The shared shape of every paginated listing envelope: an `items` array, an
|
|
35
|
+
* optional `next` continuation URL, and the whole listing's `totalItems` count
|
|
36
|
+
* (required on some listing types upstream, optional on others). The traversal
|
|
37
|
+
* core only touches `items` and `next`; `collectPages` also sets `totalItems`.
|
|
36
38
|
*/
|
|
37
39
|
type PageEnvelope = {
|
|
38
40
|
items: unknown[];
|
|
39
41
|
next?: string;
|
|
42
|
+
totalItems?: number;
|
|
40
43
|
};
|
|
41
44
|
/**
|
|
42
45
|
* The first page (already read) plus the means to fetch each following page.
|
|
43
46
|
* The `fetchPage` callback fetches a single page by absolute URL, returning
|
|
44
|
-
* `null` if it is missing/unauthorized
|
|
47
|
+
* `null` if it is missing/unauthorized. A `null` first page makes the walk
|
|
48
|
+
* itself `null`; a `null` page mid-walk fails the walk, since a `next` the
|
|
49
|
+
* server handed out has to resolve.
|
|
45
50
|
*/
|
|
46
51
|
export interface PageWalk<T extends PageEnvelope = CollectionResourcesList> {
|
|
47
52
|
first: T;
|
|
@@ -85,33 +90,43 @@ export declare function signedPageWalk<T extends PageEnvelope = CollectionResour
|
|
|
85
90
|
/**
|
|
86
91
|
* Lazily walks a list response page by page, yielding the first page and then
|
|
87
92
|
* each page reached by following `next`. Each `next` is resolved relative to the
|
|
88
|
-
* URL of the page that produced it
|
|
89
|
-
*
|
|
90
|
-
* page at a time, so a consumer can stop early without fetching the rest.
|
|
93
|
+
* URL of the page that produced it. Yields one page at a time, so a consumer
|
|
94
|
+
* can stop early without fetching the rest.
|
|
91
95
|
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
+
* The walk either reaches the server's end-of-list signal (a page with no
|
|
97
|
+
* `next`) or fails. A `next` outside the first page's origin or base path, a
|
|
98
|
+
* `next` carrying a username or password, a `next` pointing at an already-seen
|
|
99
|
+
* page (a cycle), a page that walks past `maxPages`, or a followed page that
|
|
100
|
+
* comes back `null` (missing/unauthorized) each fail with a `WasServerError`
|
|
101
|
+
* naming the listing URL. Ending silently on any of these would hand the
|
|
102
|
+
* consumer a short listing it cannot tell from a complete one.
|
|
96
103
|
*
|
|
97
104
|
* @param walk {PageWalk<T>}
|
|
98
105
|
* @param [options] {object}
|
|
99
106
|
* @param [options.maxPages] {number} the most pages to yield, counting the
|
|
100
107
|
* first (defaults to {@link DEFAULT_MAX_PAGES})
|
|
101
108
|
* @returns {AsyncGenerator<T>}
|
|
102
|
-
* @throws {WasServerError} when `next` leaves the listing
|
|
109
|
+
* @throws {WasServerError} when `next` leaves the listing, repeats a page, or
|
|
110
|
+
* fails to resolve, or when the page bound is hit
|
|
103
111
|
*/
|
|
104
112
|
export declare function walkPages<T extends PageEnvelope = CollectionResourcesList>(walk: PageWalk<T>, { maxPages }?: {
|
|
105
113
|
maxPages?: number;
|
|
106
114
|
}): AsyncGenerator<T>;
|
|
107
115
|
/**
|
|
108
116
|
* Eagerly follows every `next` link, aggregating all pages' items into a single
|
|
109
|
-
* envelope shaped like the first page
|
|
110
|
-
* has been collected
|
|
117
|
+
* envelope shaped like the first page, with `next` dropped since the whole list
|
|
118
|
+
* has been collected. Buffers the entire collection in memory; for a large
|
|
111
119
|
* collection prefer `walkPages` (one page at a time) or an item iterator.
|
|
112
120
|
*
|
|
121
|
+
* `totalItems` on the aggregate is always the count of the collected items.
|
|
122
|
+
* The server's value is not used, since a paginating server may omit it on a
|
|
123
|
+
* truncated page and the first page's value may be stale by the time the last
|
|
124
|
+
* page is read. The count is sound because `walkPages` either completes the
|
|
125
|
+
* listing or throws.
|
|
126
|
+
*
|
|
113
127
|
* @param walk {PageWalk<T>}
|
|
114
128
|
* @returns {Promise<T>}
|
|
129
|
+
* @throws {WasServerError} when the walk cannot complete the listing
|
|
115
130
|
*/
|
|
116
131
|
export declare function collectPages<T extends PageEnvelope = CollectionResourcesList>(walk: PageWalk<T>): Promise<T>;
|
|
117
132
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/internal/pagination.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/internal/pagination.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EACV,uBAAuB,EACvB,KAAK,EACL,eAAe,EAChB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAKjD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAS,CAAA;AAEvC;;;;;GAKG;AACH,KAAK,YAAY,GAAG;IAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE5E;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,YAAY,GAAG,uBAAuB;IACxE,KAAK,EAAE,CAAC,CAAA;IACR,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA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,gBAAgB,CACrC,CAAC,SAAS,YAAY,GAAG,uBAAuB,EAChD,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,cAAc,CAAC,CAAC,CAAC,CAI7C;AAED;;;;;;;GAOG;AACH,wBAAuB,SAAS,CAC9B,KAAK,EAAE,aAAa,CAAC,uBAAuB,CAAC,GAC5C,cAAc,CAAC,eAAe,CAAC,CAIjC"}
|
|
@@ -90,21 +90,24 @@ function resolveNext({ next, baseUrl, firstUrl }) {
|
|
|
90
90
|
/**
|
|
91
91
|
* Lazily walks a list response page by page, yielding the first page and then
|
|
92
92
|
* each page reached by following `next`. Each `next` is resolved relative to the
|
|
93
|
-
* URL of the page that produced it
|
|
94
|
-
*
|
|
95
|
-
* page at a time, so a consumer can stop early without fetching the rest.
|
|
93
|
+
* URL of the page that produced it. Yields one page at a time, so a consumer
|
|
94
|
+
* can stop early without fetching the rest.
|
|
96
95
|
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
96
|
+
* The walk either reaches the server's end-of-list signal (a page with no
|
|
97
|
+
* `next`) or fails. A `next` outside the first page's origin or base path, a
|
|
98
|
+
* `next` carrying a username or password, a `next` pointing at an already-seen
|
|
99
|
+
* page (a cycle), a page that walks past `maxPages`, or a followed page that
|
|
100
|
+
* comes back `null` (missing/unauthorized) each fail with a `WasServerError`
|
|
101
|
+
* naming the listing URL. Ending silently on any of these would hand the
|
|
102
|
+
* consumer a short listing it cannot tell from a complete one.
|
|
101
103
|
*
|
|
102
104
|
* @param walk {PageWalk<T>}
|
|
103
105
|
* @param [options] {object}
|
|
104
106
|
* @param [options.maxPages] {number} the most pages to yield, counting the
|
|
105
107
|
* first (defaults to {@link DEFAULT_MAX_PAGES})
|
|
106
108
|
* @returns {AsyncGenerator<T>}
|
|
107
|
-
* @throws {WasServerError} when `next` leaves the listing
|
|
109
|
+
* @throws {WasServerError} when `next` leaves the listing, repeats a page, or
|
|
110
|
+
* fails to resolve, or when the page bound is hit
|
|
108
111
|
*/
|
|
109
112
|
export async function* walkPages(walk, { maxPages = DEFAULT_MAX_PAGES } = {}) {
|
|
110
113
|
const { first, fetchPage } = walk;
|
|
@@ -114,24 +117,28 @@ export async function* walkPages(walk, { maxPages = DEFAULT_MAX_PAGES } = {}) {
|
|
|
114
117
|
// an explicit default port) would let a next-link back to page 1 defeat the
|
|
115
118
|
// guard and yield its items twice.
|
|
116
119
|
const firstUrl = new URL(walk.firstUrl);
|
|
120
|
+
const listingUrl = firstUrl.toString();
|
|
117
121
|
yield first;
|
|
118
|
-
const seen = new Set([
|
|
122
|
+
const seen = new Set([listingUrl]);
|
|
119
123
|
let pageCount = 1;
|
|
120
|
-
let baseUrl =
|
|
124
|
+
let baseUrl = listingUrl;
|
|
121
125
|
let next = first.next;
|
|
122
126
|
while (next) {
|
|
123
127
|
const pageUrl = resolveNext({ next, baseUrl, firstUrl });
|
|
124
128
|
if (seen.has(pageUrl)) {
|
|
125
|
-
|
|
129
|
+
throw new WasServerError(`The listing at "${listingUrl}" served a \`next\` link ` +
|
|
130
|
+
`("${pageUrl}") back to a page already walked.`, { requestUrl: listingUrl });
|
|
126
131
|
}
|
|
127
132
|
if (pageCount >= maxPages) {
|
|
128
|
-
throw new WasServerError(`The listing at "${
|
|
129
|
-
`${maxPages} pages.`, { requestUrl:
|
|
133
|
+
throw new WasServerError(`The listing at "${listingUrl}" did not end within ` +
|
|
134
|
+
`${maxPages} pages.`, { requestUrl: listingUrl });
|
|
130
135
|
}
|
|
131
136
|
seen.add(pageUrl);
|
|
132
137
|
const page = await fetchPage(pageUrl);
|
|
133
138
|
if (page === null) {
|
|
134
|
-
|
|
139
|
+
throw new WasServerError(`The listing at "${listingUrl}" served a \`next\` link ` +
|
|
140
|
+
`("${pageUrl}") that answered with no listing (missing or ` +
|
|
141
|
+
'unauthorized).', { requestUrl: pageUrl });
|
|
135
142
|
}
|
|
136
143
|
pageCount += 1;
|
|
137
144
|
yield page;
|
|
@@ -141,12 +148,19 @@ export async function* walkPages(walk, { maxPages = DEFAULT_MAX_PAGES } = {}) {
|
|
|
141
148
|
}
|
|
142
149
|
/**
|
|
143
150
|
* Eagerly follows every `next` link, aggregating all pages' items into a single
|
|
144
|
-
* envelope shaped like the first page
|
|
145
|
-
* has been collected
|
|
151
|
+
* envelope shaped like the first page, with `next` dropped since the whole list
|
|
152
|
+
* has been collected. Buffers the entire collection in memory; for a large
|
|
146
153
|
* collection prefer `walkPages` (one page at a time) or an item iterator.
|
|
147
154
|
*
|
|
155
|
+
* `totalItems` on the aggregate is always the count of the collected items.
|
|
156
|
+
* The server's value is not used, since a paginating server may omit it on a
|
|
157
|
+
* truncated page and the first page's value may be stale by the time the last
|
|
158
|
+
* page is read. The count is sound because `walkPages` either completes the
|
|
159
|
+
* listing or throws.
|
|
160
|
+
*
|
|
148
161
|
* @param walk {PageWalk<T>}
|
|
149
162
|
* @returns {Promise<T>}
|
|
163
|
+
* @throws {WasServerError} when the walk cannot complete the listing
|
|
150
164
|
*/
|
|
151
165
|
export async function collectPages(walk) {
|
|
152
166
|
let aggregate;
|
|
@@ -160,7 +174,7 @@ export async function collectPages(walk) {
|
|
|
160
174
|
}
|
|
161
175
|
}
|
|
162
176
|
// `walkPages` always yields `first`, so `aggregate` is set here.
|
|
163
|
-
const result = { ...aggregate, items };
|
|
177
|
+
const result = { ...aggregate, items, totalItems: items.length };
|
|
164
178
|
delete result.next;
|
|
165
179
|
return result;
|
|
166
180
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/internal/pagination.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/internal/pagination.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MA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