@interop/was-client 0.62.0 → 0.62.2
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/Collection.d.ts +7 -2
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +11 -3
- package/dist/Collection.js.map +1 -1
- package/dist/Space.d.ts +5 -1
- package/dist/Space.d.ts.map +1 -1
- package/dist/Space.js +3 -0
- package/dist/Space.js.map +1 -1
- package/dist/edv/EdvCodec.d.ts +4 -5
- package/dist/edv/EdvCodec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.js +14 -11
- package/dist/edv/EdvCodec.js.map +1 -1
- package/dist/edv/epochRoster.d.ts +7 -32
- package/dist/edv/epochRoster.d.ts.map +1 -1
- package/dist/edv/epochRoster.js +10 -35
- package/dist/edv/epochRoster.js.map +1 -1
- package/dist/edv/recipients.d.ts +5 -0
- package/dist/edv/recipients.d.ts.map +1 -1
- package/dist/edv/recipients.js +15 -2
- package/dist/edv/recipients.js.map +1 -1
- package/dist/index.d.ts +1 -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/cas.d.ts +10 -7
- package/dist/internal/cas.d.ts.map +1 -1
- package/dist/internal/cas.js +18 -7
- package/dist/internal/cas.js.map +1 -1
- package/dist/internal/describe.d.ts +15 -2
- package/dist/internal/describe.d.ts.map +1 -1
- package/dist/internal/describe.js +38 -4
- package/dist/internal/describe.js.map +1 -1
- package/dist/internal/pagination.d.ts +24 -1
- package/dist/internal/pagination.d.ts.map +1 -1
- package/dist/internal/pagination.js +77 -9
- package/dist/internal/pagination.js.map +1 -1
- package/dist/paths.d.ts +5 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +5 -1
- package/dist/paths.js.map +1 -1
- package/dist/types.d.ts +10 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { send } from './request.js';
|
|
2
2
|
import { dataOrNull } from './content.js';
|
|
3
|
+
import { WasServerError } from '../errors.js';
|
|
4
|
+
/**
|
|
5
|
+
* The default page-count bound on one listing walk. Generous enough for any
|
|
6
|
+
* real listing, but it stops a server whose every page returns a fresh cursor
|
|
7
|
+
* from driving an unbounded number of requests.
|
|
8
|
+
*/
|
|
9
|
+
export const DEFAULT_MAX_PAGES = 10_000;
|
|
3
10
|
/**
|
|
4
11
|
* Builds a {@link PageWalk} by fetching the first page with the same
|
|
5
12
|
* `fetchPage` used for every following page -- the shared shape of the signed
|
|
@@ -36,6 +43,50 @@ export async function signedPageWalk(context, { firstUrl, capability }) {
|
|
|
36
43
|
fetchPage: async (url) => dataOrNull(await send(context, { url, method: 'GET', capability, read: true }))
|
|
37
44
|
});
|
|
38
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Resolves a server-supplied `next` against the URL of the page that produced
|
|
48
|
+
* it, and checks that the result stays within the listing: the same origin as
|
|
49
|
+
* the first page, a path equal to or under the first page's path, and no
|
|
50
|
+
* username or password. A `next` that fails any check is never fetched, because
|
|
51
|
+
* the fetch would carry the caller's signed invocation to wherever the server
|
|
52
|
+
* pointed it.
|
|
53
|
+
*
|
|
54
|
+
* @param options {object}
|
|
55
|
+
* @param options.next {unknown} the `next` value from the page
|
|
56
|
+
* @param options.baseUrl {string} the URL of the page that produced it
|
|
57
|
+
* @param options.firstUrl {URL} the canonicalized first page URL
|
|
58
|
+
* @returns {string} the absolute, canonicalized page URL
|
|
59
|
+
* @throws {WasServerError} when `next` is not a URL or leaves the listing
|
|
60
|
+
*/
|
|
61
|
+
function resolveNext({ next, baseUrl, firstUrl }) {
|
|
62
|
+
const listingUrl = firstUrl.toString();
|
|
63
|
+
let pageUrl;
|
|
64
|
+
try {
|
|
65
|
+
// A parsed body is untrusted: a non-string `next` would otherwise be
|
|
66
|
+
// coerced into a relative path and followed.
|
|
67
|
+
if (typeof next !== 'string') {
|
|
68
|
+
throw new TypeError(`\`next\` is a ${typeof next}, not a string.`);
|
|
69
|
+
}
|
|
70
|
+
pageUrl = new URL(next, baseUrl);
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
throw new WasServerError(`The listing at "${listingUrl}" served a \`next\` link that is not a ` +
|
|
74
|
+
`URL: ${JSON.stringify(next)}.`, { requestUrl: listingUrl, cause: err });
|
|
75
|
+
}
|
|
76
|
+
const basePath = firstUrl.pathname.endsWith('/')
|
|
77
|
+
? firstUrl.pathname
|
|
78
|
+
: `${firstUrl.pathname}/`;
|
|
79
|
+
const sameOrigin = pageUrl.origin !== 'null' && pageUrl.origin === firstUrl.origin;
|
|
80
|
+
const underBasePath = pageUrl.pathname === firstUrl.pathname ||
|
|
81
|
+
pageUrl.pathname.startsWith(basePath);
|
|
82
|
+
const hasCredentials = pageUrl.username !== '' || pageUrl.password !== '';
|
|
83
|
+
if (!sameOrigin || !underBasePath || hasCredentials) {
|
|
84
|
+
throw new WasServerError(`The listing at "${listingUrl}" served a \`next\` link ` +
|
|
85
|
+
`("${pageUrl.toString()}") outside its origin or base path, or ` +
|
|
86
|
+
'with credentials in it. It was not followed.', { requestUrl: listingUrl });
|
|
87
|
+
}
|
|
88
|
+
return pageUrl.toString();
|
|
89
|
+
}
|
|
39
90
|
/**
|
|
40
91
|
* Lazily walks a list response page by page, yielding the first page and then
|
|
41
92
|
* each page reached by following `next`. Each `next` is resolved relative to the
|
|
@@ -43,29 +94,46 @@ export async function signedPageWalk(context, { firstUrl, capability }) {
|
|
|
43
94
|
* `next` ends the traversal defensively rather than looping forever. Yields one
|
|
44
95
|
* page at a time, so a consumer can stop early without fetching the rest.
|
|
45
96
|
*
|
|
97
|
+
* A `next` outside the first page's origin or base path, a `next` carrying a
|
|
98
|
+
* username or password, or a walk that would
|
|
99
|
+
* exceed `maxPages` pages, fails with a `WasServerError` naming the listing URL
|
|
100
|
+
* instead of fetching.
|
|
101
|
+
*
|
|
46
102
|
* @param walk {PageWalk<T>}
|
|
103
|
+
* @param [options] {object}
|
|
104
|
+
* @param [options.maxPages] {number} the most pages to yield, counting the
|
|
105
|
+
* first (defaults to {@link DEFAULT_MAX_PAGES})
|
|
47
106
|
* @returns {AsyncGenerator<T>}
|
|
107
|
+
* @throws {WasServerError} when `next` leaves the listing or the bound is hit
|
|
48
108
|
*/
|
|
49
|
-
export async function* walkPages(walk) {
|
|
50
|
-
const { first,
|
|
109
|
+
export async function* walkPages(walk, { maxPages = DEFAULT_MAX_PAGES } = {}) {
|
|
110
|
+
const { first, fetchPage } = walk;
|
|
111
|
+
// Canonicalize the first URL once: it is both the scope every `next` is
|
|
112
|
+
// checked against and the seed of the cycle guard. Every followed `next` is
|
|
113
|
+
// canonicalized via `new URL(...)`, so an equivalent-but-unequal seed (e.g.
|
|
114
|
+
// an explicit default port) would let a next-link back to page 1 defeat the
|
|
115
|
+
// guard and yield its items twice.
|
|
116
|
+
const firstUrl = new URL(walk.firstUrl);
|
|
51
117
|
yield first;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
// defeat the guard and yield its items twice.
|
|
56
|
-
const seen = new Set([new URL(firstUrl).toString()]);
|
|
57
|
-
let baseUrl = firstUrl;
|
|
118
|
+
const seen = new Set([firstUrl.toString()]);
|
|
119
|
+
let pageCount = 1;
|
|
120
|
+
let baseUrl = firstUrl.toString();
|
|
58
121
|
let next = first.next;
|
|
59
122
|
while (next) {
|
|
60
|
-
const pageUrl =
|
|
123
|
+
const pageUrl = resolveNext({ next, baseUrl, firstUrl });
|
|
61
124
|
if (seen.has(pageUrl)) {
|
|
62
125
|
break;
|
|
63
126
|
}
|
|
127
|
+
if (pageCount >= maxPages) {
|
|
128
|
+
throw new WasServerError(`The listing at "${firstUrl.toString()}" did not end within ` +
|
|
129
|
+
`${maxPages} pages.`, { requestUrl: firstUrl.toString() });
|
|
130
|
+
}
|
|
64
131
|
seen.add(pageUrl);
|
|
65
132
|
const page = await fetchPage(pageUrl);
|
|
66
133
|
if (page === null) {
|
|
67
134
|
break;
|
|
68
135
|
}
|
|
136
|
+
pageCount += 1;
|
|
69
137
|
yield page;
|
|
70
138
|
baseUrl = pageUrl;
|
|
71
139
|
next = page.next;
|
|
@@ -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":"AA6BA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAA;AAoBvC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAEjC,EACA,QAAQ,EACR,SAAS,EAIV;IACC,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,CAAA;IACvC,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAA;AAC/D,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAGlC,OAAsB,EACtB,EAAE,QAAQ,EAAE,UAAU,EAA4C;IAElE,OAAO,aAAa,CAAI;QACtB,QAAQ;QACR,SAAS,EAAE,KAAK,EAAC,GAAG,EAAC,EAAE,CACrB,UAAU,CACR,MAAM,IAAI,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CACpE;KACJ,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAS,WAAW,CAAC,EACnB,IAAI,EACJ,OAAO,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H,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,SAAS,CAC9B,KAA6C;IAE7C,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC/B,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;AACH,CAAC"}
|
package/dist/paths.d.ts
CHANGED
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
* `collectionMeta`) instead of at the container URL.
|
|
18
18
|
*
|
|
19
19
|
* `parseSpacePath` / `parseSpaceTarget` are the inverse grammar (a pathname or
|
|
20
|
-
* an absolute URL back to the containment depth it addresses),
|
|
20
|
+
* an absolute URL back to the containment depth it addresses),
|
|
21
|
+
* `isReservedCollectionId` / `isReservedResourceId` report whether a segment is
|
|
22
|
+
* in the Reserved Path Segment Registry (the builders throw on one, so a caller
|
|
23
|
+
* forming a path out of a value it did not choose asks first), and
|
|
21
24
|
* `rootCapabilityId` / `rootCapability` mint the `urn:zcap:root:` capability a
|
|
22
25
|
* target's own root invocation names -- the id form for parenting an unparented
|
|
23
26
|
* grant, the object form for invoking it (`@interop/ezcap` accepts a bare root
|
|
@@ -28,6 +31,7 @@
|
|
|
28
31
|
* function with no I/O and no client state.
|
|
29
32
|
*/
|
|
30
33
|
export { spacePath, spaceMeta, collectionPath, collectionMeta, collectionLog, collectionQuery, resourcePath, resourceMeta, toUrl, parseSpacePath, parseSpaceTarget } from './internal/paths.js';
|
|
34
|
+
export { isReservedCollectionId, isReservedResourceId } from './internal/reserved.js';
|
|
31
35
|
export type { ParsedSpacePath } from './internal/paths.js';
|
|
32
36
|
export { rootCapabilityId, rootCapability } from './internal/revoke.js';
|
|
33
37
|
//# sourceMappingURL=paths.d.ts.map
|
package/dist/paths.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EACL,SAAS,EACT,SAAS,EACT,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,cAAc,EACd,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
|
package/dist/paths.js
CHANGED
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
* `collectionMeta`) instead of at the container URL.
|
|
18
18
|
*
|
|
19
19
|
* `parseSpacePath` / `parseSpaceTarget` are the inverse grammar (a pathname or
|
|
20
|
-
* an absolute URL back to the containment depth it addresses),
|
|
20
|
+
* an absolute URL back to the containment depth it addresses),
|
|
21
|
+
* `isReservedCollectionId` / `isReservedResourceId` report whether a segment is
|
|
22
|
+
* in the Reserved Path Segment Registry (the builders throw on one, so a caller
|
|
23
|
+
* forming a path out of a value it did not choose asks first), and
|
|
21
24
|
* `rootCapabilityId` / `rootCapability` mint the `urn:zcap:root:` capability a
|
|
22
25
|
* target's own root invocation names -- the id form for parenting an unparented
|
|
23
26
|
* grant, the object form for invoking it (`@interop/ezcap` accepts a bare root
|
|
@@ -28,5 +31,6 @@
|
|
|
28
31
|
* function with no I/O and no client state.
|
|
29
32
|
*/
|
|
30
33
|
export { spacePath, spaceMeta, collectionPath, collectionMeta, collectionLog, collectionQuery, resourcePath, resourceMeta, toUrl, parseSpacePath, parseSpaceTarget } from './internal/paths.js';
|
|
34
|
+
export { isReservedCollectionId, isReservedResourceId } from './internal/reserved.js';
|
|
31
35
|
export { rootCapabilityId, rootCapability } from './internal/revoke.js';
|
|
32
36
|
//# sourceMappingURL=paths.js.map
|
package/dist/paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EACL,SAAS,EACT,SAAS,EACT,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,cAAc,EACd,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAG/B,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import type { IZcap, IDelegatedZcap, IRootZcap } from '@interop/data-integrity-core/zcap';
|
|
16
16
|
import type { IDID, ISigner } from '@interop/data-integrity-core';
|
|
17
|
-
import type { ActionInput } from '@interop/storage-core';
|
|
17
|
+
import type { ActionInput, CollectionMetadata } from '@interop/storage-core';
|
|
18
18
|
export type { IZcap, IDelegatedZcap, IRootZcap, IDID, ISigner };
|
|
19
19
|
/**
|
|
20
20
|
* Re-export the shared WAS wire model from `@interop/storage-core`. A
|
|
@@ -90,6 +90,15 @@ export interface CollectionWritableFields {
|
|
|
90
90
|
*/
|
|
91
91
|
generator?: IDID;
|
|
92
92
|
generatorOrigin?: string;
|
|
93
|
+
/**
|
|
94
|
+
* The server-side processing declared for a plaintext Collection (its
|
|
95
|
+
* `indexes` for the `equality` query profile); the served member's own type.
|
|
96
|
+
* The one configuration member with keep-if-omitted wire semantics: a
|
|
97
|
+
* supplied object replaces the stored one whole, and a write that leaves it
|
|
98
|
+
* out carries the stored one forward rather than clearing it. Mutually
|
|
99
|
+
* exclusive with `encryption` by presence, which the server enforces.
|
|
100
|
+
*/
|
|
101
|
+
plaintext?: CollectionMetadata['plaintext'];
|
|
93
102
|
}
|
|
94
103
|
/**
|
|
95
104
|
* A JSON-serializable value, the shape stored for JSON resources and
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACd,SAAS,EACV,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACd,SAAS,EACV,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE5E,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA;AAE/D;;;;;;;;GAQG;AACH,YAAY,EACV,MAAM,EACN,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,yBAAyB,EACzB,6BAA6B,EAC7B,cAAc,EACd,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,e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