@interop/was-client 0.60.0 → 0.62.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 +124 -48
- package/dist/Collection.d.ts +135 -94
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +612 -194
- package/dist/Collection.js.map +1 -1
- package/dist/Resource.d.ts +1 -1
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +0 -3
- package/dist/Resource.js.map +1 -1
- package/dist/Space.d.ts +17 -16
- package/dist/Space.d.ts.map +1 -1
- package/dist/Space.js +41 -24
- package/dist/Space.js.map +1 -1
- package/dist/WasClient.d.ts +51 -6
- package/dist/WasClient.d.ts.map +1 -1
- package/dist/WasClient.js +84 -14
- package/dist/WasClient.js.map +1 -1
- package/dist/codec.d.ts +3 -3
- package/dist/edv/EdvCodec.js +1 -1
- package/dist/edv/descriptorStore.d.ts +16 -14
- package/dist/edv/descriptorStore.d.ts.map +1 -1
- package/dist/edv/descriptorStore.js +17 -14
- package/dist/edv/descriptorStore.js.map +1 -1
- package/dist/edv/index.d.ts +1 -1
- package/dist/edv/index.js +1 -1
- package/dist/edv/logGovernedDescriptorStore.d.ts +2 -2
- package/dist/edv/logGovernedDescriptorStore.d.ts.map +1 -1
- package/dist/edv/logGovernedDescriptorStore.js +10 -9
- package/dist/edv/logGovernedDescriptorStore.js.map +1 -1
- package/dist/edv/recipients.d.ts +1 -1
- package/dist/edv/recipients.js +2 -2
- package/dist/edv/recipients.js.map +1 -1
- package/dist/edv/refresh.d.ts +1 -1
- package/dist/edv/refresh.js +1 -1
- package/dist/errors.d.ts +14 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +16 -3
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -2
- 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 +22 -1
- package/dist/internal/codec.d.ts.map +1 -1
- package/dist/internal/codec.js +117 -46
- package/dist/internal/codec.js.map +1 -1
- package/dist/internal/describe.d.ts +98 -24
- package/dist/internal/describe.d.ts.map +1 -1
- package/dist/internal/describe.js +125 -18
- package/dist/internal/describe.js.map +1 -1
- package/dist/internal/meta.d.ts +32 -17
- package/dist/internal/meta.d.ts.map +1 -1
- package/dist/internal/meta.js +64 -35
- package/dist/internal/meta.js.map +1 -1
- package/dist/internal/paths.d.ts +33 -21
- package/dist/internal/paths.d.ts.map +1 -1
- package/dist/internal/paths.js +93 -46
- package/dist/internal/paths.js.map +1 -1
- package/dist/internal/request.d.ts +22 -6
- package/dist/internal/request.d.ts.map +1 -1
- package/dist/internal/request.js +31 -13
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/reserved.d.ts +14 -0
- package/dist/internal/reserved.d.ts.map +1 -1
- package/dist/internal/reserved.js +23 -4
- package/dist/internal/reserved.js.map +1 -1
- package/dist/internal/service.d.ts +61 -0
- package/dist/internal/service.d.ts.map +1 -0
- package/dist/internal/service.js +259 -0
- package/dist/internal/service.js.map +1 -0
- package/dist/paths.d.ts +8 -5
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +8 -5
- package/dist/paths.js.map +1 -1
- package/dist/sync/provisioning.d.ts +5 -5
- package/dist/sync/provisioning.d.ts.map +1 -1
- package/dist/sync/provisioning.js +2 -2
- package/dist/sync/provisioning.js.map +1 -1
- package/dist/types.d.ts +43 -10
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { IncompatibleServerError, mapError } from '../errors.js';
|
|
2
|
+
import { fetchMapped } from './request.js';
|
|
3
|
+
/**
|
|
4
|
+
* The WAS specification's identifier, the `specs` key its version entries sit
|
|
5
|
+
* under. Provisional until the spec's rename registers it.
|
|
6
|
+
*/
|
|
7
|
+
export const PWS_SPEC_ID = 'https://w3id.org/pws';
|
|
8
|
+
/**
|
|
9
|
+
* The WAS specification versions this client speaks, newest first. Selection
|
|
10
|
+
* takes the first one the server lists.
|
|
11
|
+
*/
|
|
12
|
+
export const SUPPORTED_PWS_VERSIONS = ['0.5'];
|
|
13
|
+
/**
|
|
14
|
+
* The link relation that names the service description.
|
|
15
|
+
*/
|
|
16
|
+
const SERVICE_RELATION = 'service';
|
|
17
|
+
/**
|
|
18
|
+
* Splits a `Link` header value into its link-values: on commas outside a
|
|
19
|
+
* `<...>` target and outside a quoted parameter value.
|
|
20
|
+
*
|
|
21
|
+
* @param header {string}
|
|
22
|
+
* @returns {string[]}
|
|
23
|
+
*/
|
|
24
|
+
function splitLinkValues(header) {
|
|
25
|
+
const values = [];
|
|
26
|
+
let current = '';
|
|
27
|
+
let inTarget = false;
|
|
28
|
+
let inQuotes = false;
|
|
29
|
+
for (let index = 0; index < header.length; index++) {
|
|
30
|
+
const char = header[index];
|
|
31
|
+
if (inQuotes) {
|
|
32
|
+
current += char;
|
|
33
|
+
if (char === '\\' && index + 1 < header.length) {
|
|
34
|
+
current += header[++index];
|
|
35
|
+
}
|
|
36
|
+
else if (char === '"') {
|
|
37
|
+
inQuotes = false;
|
|
38
|
+
}
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (char === '<') {
|
|
42
|
+
inTarget = true;
|
|
43
|
+
}
|
|
44
|
+
else if (char === '>') {
|
|
45
|
+
inTarget = false;
|
|
46
|
+
}
|
|
47
|
+
else if (char === '"' && !inTarget) {
|
|
48
|
+
inQuotes = true;
|
|
49
|
+
}
|
|
50
|
+
else if (char === ',' && !inTarget) {
|
|
51
|
+
values.push(current);
|
|
52
|
+
current = '';
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
current += char;
|
|
56
|
+
}
|
|
57
|
+
values.push(current);
|
|
58
|
+
return values;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Reads the target of the first `service` link in a `Link` header (RFC 8288),
|
|
62
|
+
* resolved against the URL of the response that carried it. Relation types
|
|
63
|
+
* compare case-insensitively, a `rel` may list several space-separated types,
|
|
64
|
+
* and only the first `rel` parameter of a link-value counts.
|
|
65
|
+
*
|
|
66
|
+
* @param options {object}
|
|
67
|
+
* @param options.header {string | null} the `Link` header value
|
|
68
|
+
* @param options.baseUrl {string} the URL the response came from
|
|
69
|
+
* @returns {string | undefined} the absolute service description URL
|
|
70
|
+
*/
|
|
71
|
+
export function serviceLinkTarget({ header, baseUrl }) {
|
|
72
|
+
if (header === null) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
for (const linkValue of splitLinkValues(header)) {
|
|
76
|
+
const match = /^\s*<([^>]*)>(.*)$/s.exec(linkValue);
|
|
77
|
+
if (match === null) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const [, target, rest] = match;
|
|
81
|
+
const relParam = rest
|
|
82
|
+
.split(';')
|
|
83
|
+
.map(param => /^\s*rel\s*=\s*(?:"((?:[^"\\]|\\.)*)"|([^\s;]*))/i.exec(param))
|
|
84
|
+
.find(paramMatch => paramMatch !== null);
|
|
85
|
+
const relValue = relParam?.[1] ?? relParam?.[2] ?? '';
|
|
86
|
+
const relations = relValue.toLowerCase().split(/\s+/);
|
|
87
|
+
if (relations.includes(SERVICE_RELATION)) {
|
|
88
|
+
try {
|
|
89
|
+
return new URL(target, baseUrl).toString();
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Whether a value is a JSON object (not `null`, not an array).
|
|
100
|
+
*
|
|
101
|
+
* @param value {unknown}
|
|
102
|
+
* @returns {boolean}
|
|
103
|
+
*/
|
|
104
|
+
function isObject(value) {
|
|
105
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Whether a value parses as an absolute URL.
|
|
109
|
+
*
|
|
110
|
+
* @param value {string}
|
|
111
|
+
* @returns {boolean}
|
|
112
|
+
*/
|
|
113
|
+
function isAbsoluteUrl(value) {
|
|
114
|
+
try {
|
|
115
|
+
new URL(value);
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Applies the spec's version-selection rules to a service description: a
|
|
124
|
+
* `specs` key other than the WAS identifier is ignored, a version entry
|
|
125
|
+
* without a string `version` is ignored, and the newest version this client
|
|
126
|
+
* speaks is chosen. The members the client acts on are checked before they are
|
|
127
|
+
* used: `spaces` must be an absolute URL and `features` an array of strings.
|
|
128
|
+
*
|
|
129
|
+
* @param description {unknown} the parsed service description
|
|
130
|
+
* @returns {ServiceInfo}
|
|
131
|
+
* @throws {IncompatibleServerError} when the document lacks `url` or `specs`,
|
|
132
|
+
* when no entry names a version this client speaks, or when the chosen
|
|
133
|
+
* entry's `spaces` or `features` is malformed
|
|
134
|
+
*/
|
|
135
|
+
export function selectServiceVersion(description) {
|
|
136
|
+
if (!isObject(description) ||
|
|
137
|
+
typeof description.url !== 'string' ||
|
|
138
|
+
!isObject(description.specs)) {
|
|
139
|
+
throw new IncompatibleServerError('The service description is not a JSON object with `url` and `specs`.');
|
|
140
|
+
}
|
|
141
|
+
const candidates = description.specs[PWS_SPEC_ID];
|
|
142
|
+
const entries = (Array.isArray(candidates) ? candidates : []).filter((entry) => isObject(entry) && typeof entry.version === 'string');
|
|
143
|
+
let chosen;
|
|
144
|
+
for (const version of SUPPORTED_PWS_VERSIONS) {
|
|
145
|
+
chosen = entries.find(entry => entry.version === version);
|
|
146
|
+
if (chosen !== undefined) {
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (chosen === undefined) {
|
|
151
|
+
const offered = entries.map(entry => entry.version);
|
|
152
|
+
throw new IncompatibleServerError(`The server at "${description.url}" lists no version of ` +
|
|
153
|
+
`${PWS_SPEC_ID} this client speaks (offered: ` +
|
|
154
|
+
`${offered.length === 0 ? 'none' : offered.join(', ')}; supported: ` +
|
|
155
|
+
`${SUPPORTED_PWS_VERSIONS.join(', ')}).`);
|
|
156
|
+
}
|
|
157
|
+
const { spaces, features } = chosen;
|
|
158
|
+
if (spaces !== undefined &&
|
|
159
|
+
(typeof spaces !== 'string' || !isAbsoluteUrl(spaces))) {
|
|
160
|
+
throw new IncompatibleServerError(`The ${PWS_SPEC_ID} ${chosen.version} entry's \`spaces\` is not an ` +
|
|
161
|
+
'absolute URL.');
|
|
162
|
+
}
|
|
163
|
+
if (features !== undefined &&
|
|
164
|
+
(!Array.isArray(features) ||
|
|
165
|
+
!features.every(token => typeof token === 'string'))) {
|
|
166
|
+
throw new IncompatibleServerError(`The ${PWS_SPEC_ID} ${chosen.version} entry's \`features\` is not an ` +
|
|
167
|
+
'array of strings.');
|
|
168
|
+
}
|
|
169
|
+
const tokens = [...(features ?? [])];
|
|
170
|
+
return {
|
|
171
|
+
description: description,
|
|
172
|
+
version: chosen.version,
|
|
173
|
+
entry: chosen,
|
|
174
|
+
...(spaces !== undefined && { spacesUrl: spaces }),
|
|
175
|
+
features: tokens,
|
|
176
|
+
hasFeature(token) {
|
|
177
|
+
return tokens.includes(token);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* The statuses that signal a transient failure (rate limiting, or a gateway
|
|
183
|
+
* or server that is temporarily unavailable) rather than an answer about the
|
|
184
|
+
* server's protocol. A lasting refusal such as 501, 505, or 507 is not in
|
|
185
|
+
* this set.
|
|
186
|
+
*/
|
|
187
|
+
const TRANSIENT_STATUSES = new Set([429, 502, 503, 504]);
|
|
188
|
+
/**
|
|
189
|
+
* Rejects a discovery step that answered `status` without what discovery
|
|
190
|
+
* needs: with the mapped transport error when the status is transient, since
|
|
191
|
+
* it says nothing about the protocol the server speaks, and with an
|
|
192
|
+
* `IncompatibleServerError` carrying `message` otherwise.
|
|
193
|
+
*
|
|
194
|
+
* @param options {object}
|
|
195
|
+
* @param options.status {number}
|
|
196
|
+
* @param options.requestUrl {string}
|
|
197
|
+
* @param options.message {string}
|
|
198
|
+
* @returns {never}
|
|
199
|
+
*/
|
|
200
|
+
function refuse({ status, requestUrl, message }) {
|
|
201
|
+
if (TRANSIENT_STATUSES.has(status)) {
|
|
202
|
+
throw mapError({ status, requestUrl });
|
|
203
|
+
}
|
|
204
|
+
throw new IncompatibleServerError(message, { requestUrl });
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Discovers the service description from a URL the client holds and selects
|
|
208
|
+
* the version to speak: an unsigned `HEAD` of `url` for its `service` link
|
|
209
|
+
* (the response status does not matter), then an unsigned `GET` of the linked
|
|
210
|
+
* document.
|
|
211
|
+
*
|
|
212
|
+
* A network failure, and a rate limit or temporary outage (429, 502, 503,
|
|
213
|
+
* 504) that comes without the link, reject with the mapped transport error,
|
|
214
|
+
* since they say nothing about the protocol the server speaks.
|
|
215
|
+
*
|
|
216
|
+
* @param options {object}
|
|
217
|
+
* @param options.url {string} any WAS URL, typically the client's `serverUrl`
|
|
218
|
+
* @returns {Promise<ServiceInfo>}
|
|
219
|
+
* @throws {IncompatibleServerError} when the response carries no `service`
|
|
220
|
+
* link, the linked document cannot be read or parsed, or version selection
|
|
221
|
+
* refuses it (see {@link selectServiceVersion})
|
|
222
|
+
*/
|
|
223
|
+
export async function discoverService({ url }) {
|
|
224
|
+
const probe = await fetchMapped(url, { method: 'HEAD' });
|
|
225
|
+
const serviceUrl = serviceLinkTarget({
|
|
226
|
+
header: probe.headers.get('link'),
|
|
227
|
+
baseUrl: probe.url || url
|
|
228
|
+
});
|
|
229
|
+
if (serviceUrl === undefined) {
|
|
230
|
+
refuse({
|
|
231
|
+
status: probe.status,
|
|
232
|
+
requestUrl: url,
|
|
233
|
+
message: `The response from "${url}" (${probe.status}) carries no ` +
|
|
234
|
+
'rel="service" link, so the server predates WAS v0.5, which this ' +
|
|
235
|
+
'client requires.'
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
const response = await fetchMapped(serviceUrl, {
|
|
239
|
+
method: 'GET',
|
|
240
|
+
headers: { accept: 'application/json' }
|
|
241
|
+
});
|
|
242
|
+
if (!response.ok) {
|
|
243
|
+
refuse({
|
|
244
|
+
status: response.status,
|
|
245
|
+
requestUrl: serviceUrl,
|
|
246
|
+
message: `The service description at "${serviceUrl}" answered ` +
|
|
247
|
+
`${response.status}.`
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
let description;
|
|
251
|
+
try {
|
|
252
|
+
description = await response.json();
|
|
253
|
+
}
|
|
254
|
+
catch (err) {
|
|
255
|
+
throw new IncompatibleServerError(`The service description at "${serviceUrl}" is not valid JSON.`, { requestUrl: serviceUrl, cause: err });
|
|
256
|
+
}
|
|
257
|
+
return selectServiceVersion(description);
|
|
258
|
+
}
|
|
259
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/internal/service.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAG1C;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,sBAAsB,CAAA;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAK,CAAC,CAAA;AAE7C;;GAEG;AACH,MAAM,gBAAgB,GAAG,SAAS,CAAA;AAElC;;;;;;GAMG;AACH,SAAS,eAAe,CAAC,MAAc;IACrC,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,IAAI,OAAO,GAAG,EAAE,CAAA;IAChB,IAAI,QAAQ,GAAG,KAAK,CAAA;IACpB,IAAI,QAAQ,GAAG,KAAK,CAAA;IACpB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,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xB,CAAC,CAAA;IACJ,CAAC;IACD,IAAI,WAAoB,CAAA;IACxB,IAAI,CAAC;QACH,WAAW,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;IACrC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,uBAAuB,CAC/B,+BAA+B,UAAU,sBAAsB,EAC/D,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,CACvC,CAAA;IACH,CAAC;IACD,OAAO,oBAAoB,CAAC,WAAW,CAAC,CAAA;AAC1C,CAAC"}
|
package/dist/paths.d.ts
CHANGED
|
@@ -6,12 +6,15 @@
|
|
|
6
6
|
* standalone functions, for a consumer that has to form a WAS path or a zcap
|
|
7
7
|
* `invocationTarget` without going through a navigational handle.
|
|
8
8
|
*
|
|
9
|
-
* The path builders own the trailing-slash canonicalization (
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* The path builders own the trailing-slash canonicalization (a trailing slash
|
|
10
|
+
* marks a container in canonical form -- `/space/{s}/`, `/space/{s}/{c}/` --
|
|
11
|
+
* everything else has none, and no two paths differ only by a trailing slash)
|
|
12
|
+
* and the per-segment percent-encoding, and the zcap `invocationTarget` is
|
|
12
13
|
* derived from the request URL -- so a caller that hand-assembles a path is
|
|
13
14
|
* re-deriving rules that must match the server's `allowedTarget` byte for byte.
|
|
14
|
-
* Exporting the builders instead is what keeps that from happening.
|
|
15
|
+
* Exporting the builders instead is what keeps that from happening. A
|
|
16
|
+
* container's description lives at its `meta` segment (`spaceMeta`,
|
|
17
|
+
* `collectionMeta`) instead of at the container URL.
|
|
15
18
|
*
|
|
16
19
|
* `parseSpacePath` / `parseSpaceTarget` are the inverse grammar (a pathname or
|
|
17
20
|
* an absolute URL back to the containment depth it addresses), and
|
|
@@ -24,7 +27,7 @@
|
|
|
24
27
|
* Kept off the core entry so a consumer opts in; every export here is a pure
|
|
25
28
|
* function with no I/O and no client state.
|
|
26
29
|
*/
|
|
27
|
-
export { spacePath,
|
|
30
|
+
export { spacePath, spaceMeta, collectionPath, collectionMeta, collectionLog, collectionQuery, resourcePath, resourceMeta, toUrl, parseSpacePath, parseSpaceTarget } from './internal/paths.js';
|
|
28
31
|
export type { ParsedSpacePath } from './internal/paths.js';
|
|
29
32
|
export { rootCapabilityId, rootCapability } from './internal/revoke.js';
|
|
30
33
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;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,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
|
package/dist/paths.js
CHANGED
|
@@ -6,12 +6,15 @@
|
|
|
6
6
|
* standalone functions, for a consumer that has to form a WAS path or a zcap
|
|
7
7
|
* `invocationTarget` without going through a navigational handle.
|
|
8
8
|
*
|
|
9
|
-
* The path builders own the trailing-slash canonicalization (
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* The path builders own the trailing-slash canonicalization (a trailing slash
|
|
10
|
+
* marks a container in canonical form -- `/space/{s}/`, `/space/{s}/{c}/` --
|
|
11
|
+
* everything else has none, and no two paths differ only by a trailing slash)
|
|
12
|
+
* and the per-segment percent-encoding, and the zcap `invocationTarget` is
|
|
12
13
|
* derived from the request URL -- so a caller that hand-assembles a path is
|
|
13
14
|
* re-deriving rules that must match the server's `allowedTarget` byte for byte.
|
|
14
|
-
* Exporting the builders instead is what keeps that from happening.
|
|
15
|
+
* Exporting the builders instead is what keeps that from happening. A
|
|
16
|
+
* container's description lives at its `meta` segment (`spaceMeta`,
|
|
17
|
+
* `collectionMeta`) instead of at the container URL.
|
|
15
18
|
*
|
|
16
19
|
* `parseSpacePath` / `parseSpaceTarget` are the inverse grammar (a pathname or
|
|
17
20
|
* an absolute URL back to the containment depth it addresses), and
|
|
@@ -24,6 +27,6 @@
|
|
|
24
27
|
* Kept off the core entry so a consumer opts in; every export here is a pure
|
|
25
28
|
* function with no I/O and no client state.
|
|
26
29
|
*/
|
|
27
|
-
export { spacePath,
|
|
30
|
+
export { spacePath, spaceMeta, collectionPath, collectionMeta, collectionLog, collectionQuery, resourcePath, resourceMeta, toUrl, parseSpacePath, parseSpaceTarget } from './internal/paths.js';
|
|
28
31
|
export { rootCapabilityId, rootCapability } from './internal/revoke.js';
|
|
29
32
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;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;AAG5B,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* collection is created descriptor-less here and declared governed afterwards,
|
|
23
23
|
* by the caller's guarded create of the log.
|
|
24
24
|
*/
|
|
25
|
-
import type { IDID, IZcap,
|
|
25
|
+
import type { IDID, IZcap, SpaceMetadata } from '../types.js';
|
|
26
26
|
import type { WasClient } from '../WasClient.js';
|
|
27
27
|
/**
|
|
28
28
|
* Ensures the controller's Space exists and one synced collection is
|
|
@@ -78,7 +78,7 @@ import type { WasClient } from '../WasClient.js';
|
|
|
78
78
|
* Space creation; defaults to `'WAS Space'`
|
|
79
79
|
* @param [options.collectionName] {string} the collection display name,
|
|
80
80
|
* applied only at collection creation; defaults to the collection id
|
|
81
|
-
* @param [options.spaceDescription] {
|
|
81
|
+
* @param [options.spaceDescription] {SpaceMetadata} the Space's
|
|
82
82
|
* description, when the caller has already ensured the Space (with
|
|
83
83
|
* {@link ensureSpace}). Supplying it skips the Space half entirely, which is
|
|
84
84
|
* what keeps a caller provisioning N collections from ensuring one Space N
|
|
@@ -111,7 +111,7 @@ export declare function ensureSpaceAndCollection({ was, spaceId, controllerDid,
|
|
|
111
111
|
isPublic?: boolean;
|
|
112
112
|
spaceName?: string;
|
|
113
113
|
collectionName?: string;
|
|
114
|
-
spaceDescription?:
|
|
114
|
+
spaceDescription?: SpaceMetadata;
|
|
115
115
|
capability?: IZcap;
|
|
116
116
|
generator?: IDID;
|
|
117
117
|
generatorOrigin?: string;
|
|
@@ -138,7 +138,7 @@ export declare function ensureSpaceAndCollection({ was, spaceId, controllerDid,
|
|
|
138
138
|
* Space creation; defaults to `'WAS Space'`
|
|
139
139
|
* @param [options.capability] {IZcap} an invocation capability both
|
|
140
140
|
* requests ride; the root capability is invoked otherwise
|
|
141
|
-
* @returns {Promise<
|
|
141
|
+
* @returns {Promise<SpaceMetadata>} the Space's description, existing or
|
|
142
142
|
* just written -- pass it to {@link ensureSpaceAndCollection} as
|
|
143
143
|
* `spaceDescription` so each collection skips the Space ensure
|
|
144
144
|
*/
|
|
@@ -148,5 +148,5 @@ export declare function ensureSpace({ was, spaceId, controllerDid, spaceName, ca
|
|
|
148
148
|
controllerDid: string;
|
|
149
149
|
spaceName?: string;
|
|
150
150
|
capability?: IZcap;
|
|
151
|
-
}): Promise<
|
|
151
|
+
}): Promise<SpaceMetadata>;
|
|
152
152
|
//# sourceMappingURL=provisioning.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provisioning.d.ts","sourceRoot":"","sources":["../../src/sync/provisioning.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAEV,IAAI,EACJ,KAAK,EACL,
|
|
1
|
+
{"version":3,"file":"provisioning.d.ts","sourceRoot":"","sources":["../../src/sync/provisioning.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAEV,IAAI,EACJ,KAAK,EACL,aAAa,EACd,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AA+GhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,wBAAsB,wBAAwB,CAAC,EAC7C,GAAG,EACH,OAAO,EACP,aAAa,EACb,YAAY,EACZ,UAAkB,EAClB,QAAgB,EAChB,SAA8B,EAC9B,cAA6B,EAC7B,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,eAAe,EAChB,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,KAAK,GAAG,WAAW,GAAG,UAAU,CAAA;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,aAAa,CAAA;IAChC,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsHhB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,WAAW,CAAC,EAChC,GAAG,EACH,OAAO,EACP,aAAa,EACb,SAA8B,EAC9B,UAAU,EACX,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,GAAG,OAAO,CAAC,aAAa,CAAC,CAqBzB"}
|
|
@@ -151,7 +151,7 @@ async function readOrCreate({ read, create, unreadable }) {
|
|
|
151
151
|
* Space creation; defaults to `'WAS Space'`
|
|
152
152
|
* @param [options.collectionName] {string} the collection display name,
|
|
153
153
|
* applied only at collection creation; defaults to the collection id
|
|
154
|
-
* @param [options.spaceDescription] {
|
|
154
|
+
* @param [options.spaceDescription] {SpaceMetadata} the Space's
|
|
155
155
|
* description, when the caller has already ensured the Space (with
|
|
156
156
|
* {@link ensureSpace}). Supplying it skips the Space half entirely, which is
|
|
157
157
|
* what keeps a caller provisioning N collections from ensuring one Space N
|
|
@@ -297,7 +297,7 @@ export async function ensureSpaceAndCollection({ was, spaceId, controllerDid, co
|
|
|
297
297
|
* Space creation; defaults to `'WAS Space'`
|
|
298
298
|
* @param [options.capability] {IZcap} an invocation capability both
|
|
299
299
|
* requests ride; the root capability is invoked otherwise
|
|
300
|
-
* @returns {Promise<
|
|
300
|
+
* @returns {Promise<SpaceMetadata>} the Space's description, existing or
|
|
301
301
|
* just written -- pass it to {@link ensureSpaceAndCollection} as
|
|
302
302
|
* `spaceDescription` so each collection skips the Space ensure
|
|
303
303
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|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O,EAAE,EAAE,UAAU,EAAE,CAAC,CAAA;IAChD,IAAI,CAAC;QACH,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,YAAY,CAAC;YACnC,IAAI,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC5B,MAAM,EAAE,KAAK,IAAI,EAAE,CACjB,CACE,MAAM,KAAK,CAAC,kBAAkB,CAC5B,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,EAC9C,EAAE,WAAW,EAAE,IAAI,EAAE,CACtB,CACF,CAAC,WAAW;YACf,UAAU,EAAE,UAAU,OAAO,wCAAwC;SACtE,CAAC,CAAA;QACF,OAAO,KAAK,CAAA;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,0BAA0B,CACxB,GAAG,EACH,kCAAkC,OAAO,UAAU,aAAa,IAAI,CACrE,CAAA;IACH,CAAC;AACH,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -17,13 +17,16 @@ import type { IDID, ISigner } from '@interop/data-integrity-core';
|
|
|
17
17
|
import type { ActionInput } from '@interop/storage-core';
|
|
18
18
|
export type { IZcap, IDelegatedZcap, IRootZcap, IDID, ISigner };
|
|
19
19
|
/**
|
|
20
|
-
* Re-export the shared WAS wire model from `@interop/storage-core`.
|
|
21
|
-
*
|
|
22
|
-
* `
|
|
23
|
-
*
|
|
20
|
+
* Re-export the shared WAS wire model from `@interop/storage-core`. A
|
|
21
|
+
* container's description is its Metadata object: `SpaceMetadata` for a Space
|
|
22
|
+
* and `CollectionMetadata` for a Collection, the latter carrying the
|
|
23
|
+
* configuration members beside `custom` and the timestamps under one
|
|
24
|
+
* validator. The resources-in-a-collection listing is
|
|
25
|
+
* `CollectionResourcesList` and the collections-in-a-space listing is
|
|
26
|
+
* `CollectionsList`.
|
|
24
27
|
*/
|
|
25
|
-
export type { Action, ActionInput, ChangeDocument, ChangesCheckpoint, ChangesPage,
|
|
26
|
-
import type { BackendReference, CollectionEncryption, ResourceMetadataCustom } from '@interop/storage-core';
|
|
28
|
+
export type { Action, ActionInput, ChangeDocument, ChangesCheckpoint, ChangesPage, SpaceMetadata, CollectionEncryption, CollectionEncryptionEpoch, CollectionEncryptionRecipient, PolicyDocument, LinkSet, LinkSetEntry, CollectionSummary, CollectionsList, SpaceSummary, SpaceListing, ResourceSummary, CollectionResourcesList, ResourceMetadata, ResourceMetadataCustom, CollectionMetadata, ImportStats, BackendReference, BackendDescriptor, BackendRegistration, BackendConnectionInput, BackendConnectionPublic, StorageLimit, CollectionUsage, BackendUsage, SpaceQuotaReport, ServiceDescription, ServiceDescriptionVersionEntry, PwsVersionEntry } from '@interop/storage-core';
|
|
29
|
+
import type { BackendReference, CollectionEncryption, PwsVersionEntry, ResourceMetadataCustom, ServiceDescription } from '@interop/storage-core';
|
|
27
30
|
/**
|
|
28
31
|
* The user-writable metadata `custom` value as a caller passes it in. The
|
|
29
32
|
* second arm keeps `name` / `tags` checked at their stored types on an object
|
|
@@ -65,10 +68,14 @@ export type CollectionEncryptionHmac = NonNullable<CollectionEncryption['hmac']>
|
|
|
65
68
|
*/
|
|
66
69
|
export type EncryptionWithHmac = CollectionEncryption;
|
|
67
70
|
/**
|
|
68
|
-
* The client-writable
|
|
69
|
-
* by `Collection.configure` and
|
|
70
|
-
* place a new writable
|
|
71
|
-
* in `
|
|
71
|
+
* The client-writable configuration members of a Collection Metadata object --
|
|
72
|
+
* the shape shared by `Collection.configure` and
|
|
73
|
+
* `Collection.replaceDescription` and the single place a new writable member is
|
|
74
|
+
* declared (the inclusion rule lives in `collectionWritableFields`).
|
|
75
|
+
*
|
|
76
|
+
* The object's other writable members are not configuration and are not listed
|
|
77
|
+
* here: `custom` (and its `epoch` stamp) is written through `setMeta`, which
|
|
78
|
+
* preserves these, exactly as a configuration write preserves `custom`.
|
|
72
79
|
*/
|
|
73
80
|
export interface CollectionWritableFields {
|
|
74
81
|
name?: string;
|
|
@@ -152,6 +159,32 @@ export interface FindPage {
|
|
|
152
159
|
export type EncryptionOverride = (CollectionEncryption & {
|
|
153
160
|
keys?: unknown;
|
|
154
161
|
}) | 'plaintext';
|
|
162
|
+
/**
|
|
163
|
+
* What service discovery learned about the server (`was.service()`): the
|
|
164
|
+
* service description as read, and the WAS version entry this client chose
|
|
165
|
+
* from it.
|
|
166
|
+
*
|
|
167
|
+
* - `description` -- the whole document, including `specs` entries for other
|
|
168
|
+
* specifications and the optional `instance` disclosure. The client gates no
|
|
169
|
+
* behavior on `instance`.
|
|
170
|
+
* - `version` -- the chosen WAS specification version, such as `"0.5"`.
|
|
171
|
+
* - `entry` -- the chosen version entry.
|
|
172
|
+
* - `spacesUrl` -- the absolute Spaces Repository URL from the entry's
|
|
173
|
+
* `spaces` member. Absent when the server does not implement the Spaces
|
|
174
|
+
* Repository.
|
|
175
|
+
* - `features` -- the entry's `features` tokens. The vocabulary is open: a
|
|
176
|
+
* token this client does not know is carried here and otherwise ignored.
|
|
177
|
+
* - `hasFeature(token)` -- whether the entry advertises `token`. An absent
|
|
178
|
+
* token (or an absent array) reads as unsupported.
|
|
179
|
+
*/
|
|
180
|
+
export interface ServiceInfo {
|
|
181
|
+
description: ServiceDescription;
|
|
182
|
+
version: string;
|
|
183
|
+
entry: PwsVersionEntry;
|
|
184
|
+
spacesUrl?: string;
|
|
185
|
+
features: string[];
|
|
186
|
+
hasFeature(token: string): boolean;
|
|
187
|
+
}
|
|
155
188
|
/**
|
|
156
189
|
* Options accepted by every handle factory (`space()`, `collection()`,
|
|
157
190
|
* `resource()`). A bound `capability` is attached to every request the handle
|
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,EA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,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,IAAI,GAAG,UAAU,CAAA;IACxB,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interop/was-client",
|
|
3
3
|
"description": "A developer-friendly client for Wallet Attached Storage (WAS) servers.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.62.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "pnpm run clear && tsc",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@interop/ezcap": "^7.4.8",
|
|
75
75
|
"@interop/http-client": "^1.0.5",
|
|
76
76
|
"@interop/minimal-cipher": "^7.10.2",
|
|
77
|
-
"@interop/storage-core": "^0.
|
|
77
|
+
"@interop/storage-core": "^0.15.0",
|
|
78
78
|
"@interop/vh-resource-log": "^0.5.1",
|
|
79
79
|
"@interop/x25519-key-agreement-key": "^5.4.0",
|
|
80
80
|
"@noble/hashes": "^2.3.0",
|