@interop/was-client 0.78.0 → 0.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/internal/conditional.d.ts +25 -2
- package/dist/internal/conditional.d.ts.map +1 -1
- package/dist/internal/conditional.js +33 -2
- package/dist/internal/conditional.js.map +1 -1
- package/dist/sync/index.d.ts +1 -1
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +1 -1
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/port.d.ts +8 -1
- package/dist/sync/port.d.ts.map +1 -1
- package/dist/sync/port.js +31 -13
- package/dist/sync/port.js.map +1 -1
- package/dist/sync/types.d.ts +34 -12
- package/dist/sync/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -17,6 +17,13 @@ import { NotSupportedError } from '../errors.js';
|
|
|
17
17
|
* stamp). HTTP header names are case-insensitive; the wire form is `Key-Epoch`.
|
|
18
18
|
*/
|
|
19
19
|
export declare const KEY_EPOCH_HEADER = "Key-Epoch";
|
|
20
|
+
/**
|
|
21
|
+
* The request header a content write or delete declares its writer-attribution
|
|
22
|
+
* label under (spec "Writer attribution"), stamping it onto the Resource
|
|
23
|
+
* Metadata `writerId` property (an absent header clears any prior label). HTTP
|
|
24
|
+
* header names are case-insensitive; the wire form is `Writer-Id`.
|
|
25
|
+
*/
|
|
26
|
+
export declare const WRITER_ID_HEADER = "Writer-Id";
|
|
20
27
|
/**
|
|
21
28
|
* A conditional-write precondition: `ifMatch` is the quoted ETag an
|
|
22
29
|
* update-if-unchanged write must match; `ifNoneMatch` requests a create-if-absent
|
|
@@ -61,12 +68,23 @@ export declare function namedPrecondition(precondition?: WritePrecondition): Wri
|
|
|
61
68
|
* @returns {void}
|
|
62
69
|
*/
|
|
63
70
|
export declare function assertSinglePrecondition(precondition?: WritePrecondition): void;
|
|
71
|
+
/**
|
|
72
|
+
* Throws `ValidationError` when a writer-attribution label is present but
|
|
73
|
+
* empty. Per the spec, `writerId` is an opaque non-empty string; a present but
|
|
74
|
+
* empty value is a caller bug, refused locally rather than sent as an
|
|
75
|
+
* `invalid-request-body` the server would otherwise have to reject.
|
|
76
|
+
*
|
|
77
|
+
* @param [writerId] {string}
|
|
78
|
+
* @returns {void}
|
|
79
|
+
*/
|
|
80
|
+
export declare function assertWriterId(writerId?: string): void;
|
|
64
81
|
/**
|
|
65
82
|
* Builds the headers for a write request: the content-type (when present) and
|
|
66
83
|
* the conditional-write precondition headers (`If-Match` / `If-None-Match: *`).
|
|
67
84
|
* Returns `undefined` when no header is needed, matching the request layer's
|
|
68
85
|
* optional `headers`. Throws `ValidationError` when the precondition names both
|
|
69
|
-
* `ifMatch` and `ifNoneMatch`, a pair no server state can satisfy
|
|
86
|
+
* `ifMatch` and `ifNoneMatch`, a pair no server state can satisfy, or when
|
|
87
|
+
* `writerId` is present but empty.
|
|
70
88
|
*
|
|
71
89
|
* @param options {object}
|
|
72
90
|
* @param [options.contentType] {string} the body content-type, if any
|
|
@@ -76,12 +94,17 @@ export declare function assertSinglePrecondition(precondition?: WritePreconditio
|
|
|
76
94
|
* encrypted this write under; emitted as the `Key-Epoch` header so the
|
|
77
95
|
* server stamps the Resource's epoch. Omitted when absent (which clears any
|
|
78
96
|
* prior stamp on the server).
|
|
97
|
+
* @param [options.writerId] {string} the writer-attribution label this
|
|
98
|
+
* write declares; emitted as the `Writer-Id` header. Omitted when absent
|
|
99
|
+
* (which clears any prior label on the server, per the spec's
|
|
100
|
+
* declare-or-clear rule).
|
|
79
101
|
* @returns {Record<string, string> | undefined}
|
|
80
102
|
*/
|
|
81
|
-
export declare function writeHeaders({ contentType, precondition, epoch }: {
|
|
103
|
+
export declare function writeHeaders({ contentType, precondition, epoch, writerId }: {
|
|
82
104
|
contentType?: string;
|
|
83
105
|
precondition?: WritePrecondition;
|
|
84
106
|
epoch?: string;
|
|
107
|
+
writerId?: string;
|
|
85
108
|
}): Record<string, string> | undefined;
|
|
86
109
|
/**
|
|
87
110
|
* The refusal for a guarded write whose pin the read it is based on never
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditional.d.ts","sourceRoot":"","sources":["../../src/internal/conditional.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EACL,iBAAiB,EAGlB,MAAM,cAAc,CAAA;AAErB;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,cAAc,CAAA;AAE3C;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,iBAAiB,CAE5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,CAAC,EAAE,iBAAiB,GAC/B,iBAAiB,GAAG,SAAS,CAK/B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,CAAC,EAAE,iBAAiB,GAC/B,IAAI,CAQN;AAED
|
|
1
|
+
{"version":3,"file":"conditional.d.ts","sourceRoot":"","sources":["../../src/internal/conditional.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EACL,iBAAiB,EAGlB,MAAM,cAAc,CAAA;AAErB;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,cAAc,CAAA;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,cAAc,CAAA;AAE3C;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED;;;;;;;;GAQG;AACH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FailedError, ValidationError } from '../
|
|
|
5
5
|
* stamp). HTTP header names are case-insensitive; the wire form is `Key-Epoch`.
|
|
6
6
|
*/
|
|
7
7
|
export const KEY_EPOCH_HEADER = 'Key-Epoch';
|
|
8
|
+
/**
|
|
9
|
+
* The request header a content write or delete declares its writer-attribution
|
|
10
|
+
* label under (spec "Writer attribution"), stamping it onto the Resource
|
|
11
|
+
* Metadata `writerId` property (an absent header clears any prior label). HTTP
|
|
12
|
+
* header names are case-insensitive; the wire form is `Writer-Id`.
|
|
13
|
+
*/
|
|
14
|
+
export const WRITER_ID_HEADER = 'Writer-Id';
|
|
8
15
|
/**
|
|
9
16
|
* Extracts the conditional-write precondition a codec attached to its encoded
|
|
10
17
|
* write (`EncodedWrite.ifMatch` / `ifNoneMatch`). The one mapping shared by
|
|
@@ -52,12 +59,28 @@ export function assertSinglePrecondition(precondition) {
|
|
|
52
59
|
'`ifMatch` to update or `ifNoneMatch: true` to create.');
|
|
53
60
|
}
|
|
54
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Throws `ValidationError` when a writer-attribution label is present but
|
|
64
|
+
* empty. Per the spec, `writerId` is an opaque non-empty string; a present but
|
|
65
|
+
* empty value is a caller bug, refused locally rather than sent as an
|
|
66
|
+
* `invalid-request-body` the server would otherwise have to reject.
|
|
67
|
+
*
|
|
68
|
+
* @param [writerId] {string}
|
|
69
|
+
* @returns {void}
|
|
70
|
+
*/
|
|
71
|
+
export function assertWriterId(writerId) {
|
|
72
|
+
if (writerId !== undefined && writerId.length === 0) {
|
|
73
|
+
throw new ValidationError('A `writerId` must be a non-empty string: pass a label to declare it, ' +
|
|
74
|
+
'or omit the option to send no `Writer-Id` header.');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
55
77
|
/**
|
|
56
78
|
* Builds the headers for a write request: the content-type (when present) and
|
|
57
79
|
* the conditional-write precondition headers (`If-Match` / `If-None-Match: *`).
|
|
58
80
|
* Returns `undefined` when no header is needed, matching the request layer's
|
|
59
81
|
* optional `headers`. Throws `ValidationError` when the precondition names both
|
|
60
|
-
* `ifMatch` and `ifNoneMatch`, a pair no server state can satisfy
|
|
82
|
+
* `ifMatch` and `ifNoneMatch`, a pair no server state can satisfy, or when
|
|
83
|
+
* `writerId` is present but empty.
|
|
61
84
|
*
|
|
62
85
|
* @param options {object}
|
|
63
86
|
* @param [options.contentType] {string} the body content-type, if any
|
|
@@ -67,10 +90,15 @@ export function assertSinglePrecondition(precondition) {
|
|
|
67
90
|
* encrypted this write under; emitted as the `Key-Epoch` header so the
|
|
68
91
|
* server stamps the Resource's epoch. Omitted when absent (which clears any
|
|
69
92
|
* prior stamp on the server).
|
|
93
|
+
* @param [options.writerId] {string} the writer-attribution label this
|
|
94
|
+
* write declares; emitted as the `Writer-Id` header. Omitted when absent
|
|
95
|
+
* (which clears any prior label on the server, per the spec's
|
|
96
|
+
* declare-or-clear rule).
|
|
70
97
|
* @returns {Record<string, string> | undefined}
|
|
71
98
|
*/
|
|
72
|
-
export function writeHeaders({ contentType, precondition = {}, epoch }) {
|
|
99
|
+
export function writeHeaders({ contentType, precondition = {}, epoch, writerId }) {
|
|
73
100
|
assertSinglePrecondition(precondition);
|
|
101
|
+
assertWriterId(writerId);
|
|
74
102
|
const headers = {};
|
|
75
103
|
if (contentType) {
|
|
76
104
|
headers['content-type'] = contentType;
|
|
@@ -85,6 +113,9 @@ export function writeHeaders({ contentType, precondition = {}, epoch }) {
|
|
|
85
113
|
// This record keys every header in lower case; the name is case-insensitive.
|
|
86
114
|
headers[KEY_EPOCH_HEADER.toLowerCase()] = epoch;
|
|
87
115
|
}
|
|
116
|
+
if (writerId !== undefined) {
|
|
117
|
+
headers[WRITER_ID_HEADER.toLowerCase()] = writerId;
|
|
118
|
+
}
|
|
88
119
|
return Object.keys(headers).length > 0 ? headers : undefined;
|
|
89
120
|
}
|
|
90
121
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditional.js","sourceRoot":"","sources":["../../src/internal/conditional.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EAChB,MAAM,cAAc,CAAA;AAErB;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAA;AAa3C;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAqB;IACvD,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAA;AACvE,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAC/B,YAAgC;IAEhC,OAAO,YAAY,KAAK,SAAS;QAC/B,CAAC,YAAY,CAAC,OAAO,KAAK,SAAS,IAAI,YAAY,CAAC,WAAW,CAAC;QAChE,CAAC,CAAC,YAAY;QACd,CAAC,CAAC,SAAS,CAAA;AACf,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,wBAAwB,CACtC,YAAgC;IAEhC,IAAI,YAAY,EAAE,OAAO,KAAK,SAAS,IAAI,YAAY,CAAC,WAAW,EAAE,CAAC;QACpE,MAAM,IAAI,eAAe,CACvB,yEAAyE;YACvE,gEAAgE;YAChE,uDAAuD,CAC1D,CAAA;IACH,CAAC;AACH,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"conditional.js","sourceRoot":"","sources":["../../src/internal/conditional.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EAChB,MAAM,cAAc,CAAA;AAErB;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAA;AAE3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAA;AAa3C;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAqB;IACvD,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,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CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACvC,OAAM;IACR,CAAC;IACD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,uBAAuB,CAC/B,kCAAkC,IAAI,8BAA8B;YAClE,gEAAgE;YAChE,iEAAiE;YACjE,mEAAmE,EACrE,EAAE,MAAM,EAAE,GAAG,EAAE,CAChB,CAAA;IACH,CAAC;IACD,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC9B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,YAAY,CAAC,OAAO,EAAE,CAAC;QACxD,MAAM,IAAI,uBAAuB,CAC/B,kCAAkC,IAAI,yBAAyB;YAC7D,IAAI,IAAI,2CAA2C;YACnD,IAAI,YAAY,CAAC,OAAO,8CAA8C;YACtE,yCAAyC,EAC3C,EAAE,MAAM,EAAE,GAAG,EAAE,CAChB,CAAA;IACH,CAAC;AACH,CAAC"}
|
package/dist/sync/index.d.ts
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
* boundary the predicates are the contract
|
|
56
56
|
* (`decisions/0001-cross-package-errors-match-by-name.md`).
|
|
57
57
|
*/
|
|
58
|
-
export { createWasSyncPort, KEY_EPOCH_HEADER, parseEtag } from './port.js';
|
|
58
|
+
export { createWasSyncPort, KEY_EPOCH_HEADER, parseEtag, WRITER_ID_HEADER } from './port.js';
|
|
59
59
|
export { httpStatus as errorStatus, errorMessage, requireResourceId } from '../errors.js';
|
|
60
60
|
export { contentCid, cidFrom, deriveSpaceId } from './cid.js';
|
|
61
61
|
export { isEncryptedEnvelope } from './envelope.js';
|
package/dist/sync/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EACjB,MAAM,WAAW,CAAA;AAIlB,OAAO,EACL,UAAU,IAAI,WAAW,EACzB,YAAY,EACZ,iBAAiB,EAClB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,cAAc,CAAA;AAErB,YAAY,EACV,IAAI,EACJ,cAAc,EACd,OAAO,EACP,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,UAAU,EACV,WAAW,EACX,SAAS,EACV,MAAM,YAAY,CAAA"}
|
package/dist/sync/index.js
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
* boundary the predicates are the contract
|
|
56
56
|
* (`decisions/0001-cross-package-errors-match-by-name.md`).
|
|
57
57
|
*/
|
|
58
|
-
export { createWasSyncPort, KEY_EPOCH_HEADER, parseEtag } from './port.js';
|
|
58
|
+
export { createWasSyncPort, KEY_EPOCH_HEADER, parseEtag, WRITER_ID_HEADER } from './port.js';
|
|
59
59
|
// The sync subpath's names for the client's own error accessors, so a
|
|
60
60
|
// sync-only consumer reads a raw ky/ezcap failure without importing the core
|
|
61
61
|
// entry.
|
package/dist/sync/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EACjB,MAAM,WAAW,CAAA;AAClB,sEAAsE;AACtE,6EAA6E;AAC7E,SAAS;AACT,OAAO,EACL,UAAU,IAAI,WAAW,EACzB,YAAY,EACZ,iBAAiB,EAClB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,cAAc,CAAA"}
|
package/dist/sync/port.d.ts
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* port has no signal for still leaves this subpath as a typed `WasError`.
|
|
39
39
|
*/
|
|
40
40
|
import type { WasClient } from '../WasClient.js';
|
|
41
|
-
import { KEY_EPOCH_HEADER } from '../internal/conditional.js';
|
|
41
|
+
import { KEY_EPOCH_HEADER, WRITER_ID_HEADER } from '../internal/conditional.js';
|
|
42
42
|
import type { IZcap } from '../types.js';
|
|
43
43
|
import type { WasSyncPort } from './types.js';
|
|
44
44
|
/**
|
|
@@ -48,6 +48,13 @@ import type { WasSyncPort } from './types.js';
|
|
|
48
48
|
* of the sync subpath's public surface.
|
|
49
49
|
*/
|
|
50
50
|
export { KEY_EPOCH_HEADER };
|
|
51
|
+
/**
|
|
52
|
+
* The request header a content write or delete declares its writer-attribution
|
|
53
|
+
* label under, stamping it onto the Resource Metadata `writerId` property.
|
|
54
|
+
* Defined next to the header assembly it drives (`internal/conditional.ts`)
|
|
55
|
+
* and re-exported here as part of the sync subpath's public surface.
|
|
56
|
+
*/
|
|
57
|
+
export { WRITER_ID_HEADER };
|
|
51
58
|
/**
|
|
52
59
|
* Parses a quoted strong `ETag` into its numeric revision: the decimal
|
|
53
60
|
* integer after the LAST `.` inside the quotes (`"3mJr7AoUXx2.3"` to `3`).
|
package/dist/sync/port.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"port.d.ts","sourceRoot":"","sources":["../../src/sync/port.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,OAAO,
|
|
1
|
+
{"version":3,"file":"port.d.ts","sourceRoot":"","sources":["../../src/sync/port.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,OAAO,EAEL,gBAAgB,EAGhB,gBAAgB,EACjB,MAAM,4BAA4B,CAAA;AAYnC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,EAIV,WAAW,EAEZ,MAAM,YAAY,CAAA;AAEnB;;;;;GAKG;AACH,OAAO,EAAE,gBAAgB,EAAE,CAAA;AAE3B;;;;;GAKG;AACH,OAAO,EAAE,gBAAgB,EAAE,CAAA;AAyG3B;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAW7E;AAwBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,GAAG,EACH,OAAO,EACP,YAAY,EACZ,UAAU,EACV,aAAqB,EACtB,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,GAAG,WAAW,CAwPd"}
|
package/dist/sync/port.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KEY_EPOCH_HEADER, readEtag, writeHeaders } from '../internal/conditional.js';
|
|
1
|
+
import { assertWriterId, KEY_EPOCH_HEADER, readEtag, writeHeaders, WRITER_ID_HEADER } from '../internal/conditional.js';
|
|
2
2
|
import { resourceMeta, resourcePath } from '../internal/paths.js';
|
|
3
3
|
import { mapError, NotFoundError, PreconditionFailedError, WasSyncAuthError, WasSyncConflictError, WasSyncNotFoundError, WasServerError } from '../errors.js';
|
|
4
4
|
/**
|
|
@@ -8,6 +8,13 @@ import { mapError, NotFoundError, PreconditionFailedError, WasSyncAuthError, Was
|
|
|
8
8
|
* of the sync subpath's public surface.
|
|
9
9
|
*/
|
|
10
10
|
export { KEY_EPOCH_HEADER };
|
|
11
|
+
/**
|
|
12
|
+
* The request header a content write or delete declares its writer-attribution
|
|
13
|
+
* label under, stamping it onto the Resource Metadata `writerId` property.
|
|
14
|
+
* Defined next to the header assembly it drives (`internal/conditional.ts`)
|
|
15
|
+
* and re-exported here as part of the sync subpath's public surface.
|
|
16
|
+
*/
|
|
17
|
+
export { WRITER_ID_HEADER };
|
|
11
18
|
/**
|
|
12
19
|
* The placeholder `updatedAt` for a 412-conflict re-read whose resource has no
|
|
13
20
|
* `/meta` document yet (its server-managed timestamp is unknown). An epoch-zero
|
|
@@ -271,7 +278,7 @@ export function createWasSyncPort({ was, spaceId, collectionId, capability, mapA
|
|
|
271
278
|
throw mapped;
|
|
272
279
|
}
|
|
273
280
|
},
|
|
274
|
-
async putContent({ id, data, ifMatch, ifNoneMatch, epoch }) {
|
|
281
|
+
async putContent({ id, data, ifMatch, ifNoneMatch, epoch, writerId }) {
|
|
275
282
|
try {
|
|
276
283
|
const response = await was.request({
|
|
277
284
|
capability,
|
|
@@ -280,7 +287,8 @@ export function createWasSyncPort({ was, spaceId, collectionId, capability, mapA
|
|
|
280
287
|
json: data,
|
|
281
288
|
headers: writeHeaders({
|
|
282
289
|
precondition: { ifMatch, ifNoneMatch },
|
|
283
|
-
epoch
|
|
290
|
+
epoch,
|
|
291
|
+
writerId
|
|
284
292
|
})
|
|
285
293
|
});
|
|
286
294
|
return writeAck(response);
|
|
@@ -289,13 +297,13 @@ export function createWasSyncPort({ was, spaceId, collectionId, capability, mapA
|
|
|
289
297
|
mapWriteError(err, { authErrors: mapAuthErrors });
|
|
290
298
|
}
|
|
291
299
|
},
|
|
292
|
-
async deleteContent({ id, ifMatch }) {
|
|
300
|
+
async deleteContent({ id, ifMatch, writerId }) {
|
|
293
301
|
try {
|
|
294
302
|
const response = await was.request({
|
|
295
303
|
capability,
|
|
296
304
|
path: contentPath(id),
|
|
297
305
|
method: 'DELETE',
|
|
298
|
-
headers: writeHeaders({ precondition: { ifMatch } })
|
|
306
|
+
headers: writeHeaders({ precondition: { ifMatch }, writerId })
|
|
299
307
|
});
|
|
300
308
|
return writeAck(response);
|
|
301
309
|
}
|
|
@@ -313,7 +321,8 @@ export function createWasSyncPort({ was, spaceId, collectionId, capability, mapA
|
|
|
313
321
|
mapWriteError(mapped, writeSignals);
|
|
314
322
|
}
|
|
315
323
|
},
|
|
316
|
-
async putMeta({ id, custom, ifMatch, ifNoneMatch }) {
|
|
324
|
+
async putMeta({ id, custom, ifMatch, ifNoneMatch, writerId }) {
|
|
325
|
+
assertWriterId(writerId);
|
|
317
326
|
try {
|
|
318
327
|
const response = await was.request({
|
|
319
328
|
capability,
|
|
@@ -321,10 +330,15 @@ export function createWasSyncPort({ was, spaceId, collectionId, capability, mapA
|
|
|
321
330
|
method: 'PUT',
|
|
322
331
|
// The `/meta` PUT fully replaces `custom`: a body omitting it writes
|
|
323
332
|
// the CLEARED state (the server clears every property the body
|
|
324
|
-
// leaves out), which is how a metadata clear replicates.
|
|
325
|
-
//
|
|
326
|
-
//
|
|
327
|
-
|
|
333
|
+
// leaves out), which is how a metadata clear replicates. `writerId`
|
|
334
|
+
// rides as a top-level member beside `custom`, on the same
|
|
335
|
+
// declare-or-clear terms: an omitted value clears the stored label.
|
|
336
|
+
// Byte-identical on the wire to the `{ custom: undefined }` this
|
|
337
|
+
// used to send, since `JSON.stringify` drops an `undefined` member.
|
|
338
|
+
json: {
|
|
339
|
+
...(custom !== undefined ? { custom } : {}),
|
|
340
|
+
...(writerId !== undefined ? { writerId } : {})
|
|
341
|
+
},
|
|
328
342
|
headers: writeHeaders({ precondition: { ifMatch, ifNoneMatch } })
|
|
329
343
|
});
|
|
330
344
|
const { etag, version } = versionedEtag(response);
|
|
@@ -352,9 +366,10 @@ export function createWasSyncPort({ was, spaceId, collectionId, capability, mapA
|
|
|
352
366
|
return null; // absent or tombstoned; the metadata read is discarded
|
|
353
367
|
}
|
|
354
368
|
// Metadata (best-effort): the `/meta` body carries the server-managed
|
|
355
|
-
// `updatedAt`, the creator DID, the key-epoch id,
|
|
356
|
-
// `custom`, plus its own
|
|
357
|
-
//
|
|
369
|
+
// `updatedAt`, the creator DID, the key-epoch id, the writer-attribution
|
|
370
|
+
// label, and the user-writable `custom`, plus its own
|
|
371
|
+
// `metaVersion`/`metaEtag` ETag. A resource with no metadata yet 404s
|
|
372
|
+
// here; only a hard error propagates.
|
|
358
373
|
const meta = await metaRead;
|
|
359
374
|
if (!meta.ok) {
|
|
360
375
|
const mapped = mapError(meta.err);
|
|
@@ -379,6 +394,9 @@ export function createWasSyncPort({ was, spaceId, collectionId, capability, mapA
|
|
|
379
394
|
if (metaBody?.epoch !== undefined) {
|
|
380
395
|
master.epoch = metaBody.epoch;
|
|
381
396
|
}
|
|
397
|
+
if (metaBody?.writerId !== undefined) {
|
|
398
|
+
master.writerId = metaBody.writerId;
|
|
399
|
+
}
|
|
382
400
|
if (metaBody?.custom !== undefined) {
|
|
383
401
|
master.custom = metaBody.custom;
|
|
384
402
|
}
|
package/dist/sync/port.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"port.js","sourceRoot":"","sources":["../../src/sync/port.ts"],"names":[],"mappings":"AAyCA,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,YAAY,
|
|
1
|
+
{"version":3,"file":"port.js","sourceRoot":"","sources":["../../src/sync/port.ts"],"names":[],"mappings":"AAyCA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,gBAAgB,EACjB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,EACL,QAAQ,EACR,aAAa,EACb,uBAAuB,EACvB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACf,MAAM,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IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAA;YAC5B,CAAC;YACD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;gBAC9B,MAAM,CAAC,WAAW,GAAG,WAAW,CAAA;YAClC,CAAC;YAED,OAAO,MAAM,CAAA;QACf,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/sync/types.d.ts
CHANGED
|
@@ -38,7 +38,12 @@ export type SyncCheckpoint = ChangesCheckpoint;
|
|
|
38
38
|
* `Json`, the parsed JSON they always are on the wire (the shared type leaves
|
|
39
39
|
* them `unknown`); on an encrypted collection `data`/`custom` are the opaque
|
|
40
40
|
* stored envelope, moved verbatim (decrypt is a projection-time concern the
|
|
41
|
-
* engine's `DocCipher` handles, never the port).
|
|
41
|
+
* engine's `DocCipher` handles, never the port). `writerId` (optional) rides
|
|
42
|
+
* along on `ChangeDocument` unchanged: the writing agent's attribution label,
|
|
43
|
+
* present when the writer declared one, and carried on a tombstone too as the
|
|
44
|
+
* deleting request's own label, if any. Advisory and never server-verified; a
|
|
45
|
+
* puller uses it to recognize its own writes echoed back and to break
|
|
46
|
+
* same-`updatedAt` ties on a shared `(updatedAt, writerId)` key.
|
|
42
47
|
*/
|
|
43
48
|
export interface WireDoc extends Omit<ChangeDocument, 'data' | 'custom'> {
|
|
44
49
|
data?: Json;
|
|
@@ -57,10 +62,10 @@ export interface SyncPage extends Omit<ChangesPage, 'documents'> {
|
|
|
57
62
|
* The current master state of a single resource, read back for the 412-conflict
|
|
58
63
|
* path ({@link WasSyncPort.get}). An absent or tombstoned resource surfaces as
|
|
59
64
|
* `get` resolving `null`, never as a `MasterState`. `updatedAt`, `metaVersion`,
|
|
60
|
-
* `metaEtag`, `custom`, `createdBy`, and `
|
|
61
|
-
* resource's `/meta` document when it exists; a resource with no metadata
|
|
62
|
-
* reports an epoch-zero `updatedAt` placeholder (a valid, sortable
|
|
63
|
-
* the change feed remains the authority on ordering).
|
|
65
|
+
* `metaEtag`, `custom`, `createdBy`, `epoch`, and `writerId` are populated from
|
|
66
|
+
* the resource's `/meta` document when it exists; a resource with no metadata
|
|
67
|
+
* yet reports an epoch-zero `updatedAt` placeholder (a valid, sortable
|
|
68
|
+
* timestamp -- the change feed remains the authority on ordering).
|
|
64
69
|
*
|
|
65
70
|
* `etag` and `metaEtag` are the raw, opaque `ETag` validators the content and
|
|
66
71
|
* `/meta` reads returned (absent only where the header did not reach the
|
|
@@ -78,6 +83,7 @@ export interface MasterState {
|
|
|
78
83
|
custom?: Json;
|
|
79
84
|
createdBy?: string;
|
|
80
85
|
epoch?: string;
|
|
86
|
+
writerId?: string;
|
|
81
87
|
}
|
|
82
88
|
/**
|
|
83
89
|
* The acknowledgment a conditional write returns: the new `version` plus the
|
|
@@ -114,8 +120,12 @@ export interface WasSyncPort {
|
|
|
114
120
|
* `ifNoneMatch: true` for create-if-absent, or `ifMatch` (the opaque `ETag`
|
|
115
121
|
* from a prior read/write, echoed back verbatim) for update-if-unchanged.
|
|
116
122
|
* `epoch` stamps the opaque key-epoch id the body was encrypted under
|
|
117
|
-
* (absent clears any prior stamp).
|
|
118
|
-
*
|
|
123
|
+
* (absent clears any prior stamp). `writerId` declares the writing agent's
|
|
124
|
+
* attribution label (sent as the `Writer-Id` header); per the spec's
|
|
125
|
+
* declare-or-clear rule, omitting it clears any label already stored for
|
|
126
|
+
* this resource, so a caller that wants to keep a prior label must resend
|
|
127
|
+
* it. Returns the new {@link WriteAck}. Throws {@link WasSyncConflictError}
|
|
128
|
+
* on `412`.
|
|
119
129
|
*/
|
|
120
130
|
putContent(options: {
|
|
121
131
|
id: string;
|
|
@@ -123,11 +133,15 @@ export interface WasSyncPort {
|
|
|
123
133
|
ifMatch?: string;
|
|
124
134
|
ifNoneMatch?: boolean;
|
|
125
135
|
epoch?: string;
|
|
136
|
+
writerId?: string;
|
|
126
137
|
}): Promise<WriteAck>;
|
|
127
138
|
/**
|
|
128
139
|
* Conditionally deletes a resource (writes a tombstone; `DELETE /:id`). Pass
|
|
129
140
|
* `ifMatch` (the opaque `ETag` from a prior read/write, echoed back
|
|
130
|
-
* verbatim) to delete only if unchanged.
|
|
141
|
+
* verbatim) to delete only if unchanged. `writerId` declares the deleting
|
|
142
|
+
* agent's attribution label (sent as the `Writer-Id` header), attributing
|
|
143
|
+
* the tombstone; per the spec's declare-or-clear rule, omitting it clears
|
|
144
|
+
* any label already stored for this resource. Returns the tombstone's new
|
|
131
145
|
* {@link WriteAck}. Throws {@link WasSyncConflictError} on `412`,
|
|
132
146
|
* {@link WasSyncNotFoundError} on `404` (already gone -- a settled outcome
|
|
133
147
|
* for a delete).
|
|
@@ -139,16 +153,23 @@ export interface WasSyncPort {
|
|
|
139
153
|
deleteContent(options: {
|
|
140
154
|
id: string;
|
|
141
155
|
ifMatch?: string;
|
|
156
|
+
writerId?: string;
|
|
142
157
|
}): Promise<WriteAck | undefined>;
|
|
143
158
|
/**
|
|
144
159
|
* Conditionally writes the user-writable metadata `custom` (`PUT /:id/meta`).
|
|
145
160
|
* The write fully
|
|
146
161
|
* replaces `custom`, so omitting it writes the CLEARED state (the server
|
|
147
162
|
* clears every property the body leaves out) -- that is how a metadata clear
|
|
148
|
-
* replicates.
|
|
149
|
-
* the
|
|
150
|
-
*
|
|
151
|
-
*
|
|
163
|
+
* replicates. `writerId` declares the writing agent's attribution label as
|
|
164
|
+
* the request body's top-level `writerId` member; per the spec's
|
|
165
|
+
* declare-or-clear rule for a metadata write, omitting it clears any label
|
|
166
|
+
* already stored for this resource -- a metadata write is itself a
|
|
167
|
+
* revision, and on an encrypted collection it replaces the `custom`
|
|
168
|
+
* envelope wholesale, so keeping a previous writer's label would
|
|
169
|
+
* misattribute it. Returns the new metadata {@link WriteAck}, or `undefined`
|
|
170
|
+
* when the response carried no `ETag`. Throws {@link WasSyncConflictError}
|
|
171
|
+
* on `412`, and {@link WasSyncNotFoundError} on `404` (the resource is gone:
|
|
172
|
+
* a delete race the caller corroborates). A port built with
|
|
152
173
|
* `mapAuthErrors: true` raises {@link WasSyncAuthError} with `status: 404`
|
|
153
174
|
* there instead, since the masked `404` is ambiguous.
|
|
154
175
|
*/
|
|
@@ -157,6 +178,7 @@ export interface WasSyncPort {
|
|
|
157
178
|
custom?: Json;
|
|
158
179
|
ifMatch?: string;
|
|
159
180
|
ifNoneMatch?: boolean;
|
|
181
|
+
writerId?: string;
|
|
160
182
|
}): Promise<WriteAck | undefined>;
|
|
161
183
|
/**
|
|
162
184
|
* Re-reads a single resource's current master state for the 412-conflict
|
package/dist/sync/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sync/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,YAAY,EAAE,IAAI,EAAE,CAAA;AAEpB;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAA;AAE9C
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sync/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,WAAW,EACZ,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,YAAY,EAAE,IAAI,EAAE,CAAA;AAEpB;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAA;AAE9C;;;;;;;;;;;;;;;;;;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AAC,CAAA;IAC3D,OAAO,CAAC,OAAO,EAAE;QACf,EAAE,EAAE,MAAM,CAAA;QACV,QAAQ,EAAE,IAAI,CAAA;QACd,OAAO,CAAC,EAAE,mBAAmB,CAAA;KAC9B,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAA;CACzB;AAED;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA"}
|
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.79.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "pnpm run clear && tsc",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@interop/ezcap": "^7.5.0",
|
|
87
87
|
"@interop/http-client": "^1.0.5",
|
|
88
88
|
"@interop/minimal-cipher": "^7.10.3",
|
|
89
|
-
"@interop/storage-core": "^0.
|
|
89
|
+
"@interop/storage-core": "^0.22.0",
|
|
90
90
|
"@interop/vh-resource-log": "^0.5.4",
|
|
91
91
|
"@interop/x25519-key-agreement-key": "^5.4.1",
|
|
92
92
|
"@noble/hashes": "^2.3.0",
|