@interop/was-client 0.68.0 → 0.70.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 +26 -0
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +2 -2
- package/dist/Collection.js.map +1 -1
- package/dist/Space.d.ts +8 -2
- package/dist/Space.d.ts.map +1 -1
- package/dist/Space.js +19 -4
- package/dist/Space.js.map +1 -1
- package/dist/WasClient.d.ts +4 -0
- package/dist/WasClient.d.ts.map +1 -1
- package/dist/WasClient.js +18 -6
- package/dist/WasClient.js.map +1 -1
- package/dist/edv/EdvCodec.d.ts +56 -74
- package/dist/edv/EdvCodec.d.ts.map +1 -1
- package/dist/edv/EdvCodec.js +12 -118
- package/dist/edv/EdvCodec.js.map +1 -1
- package/dist/edv/WasTransport.d.ts +1 -1
- package/dist/edv/WasTransport.d.ts.map +1 -1
- package/dist/edv/WasTransport.js +1 -1
- package/dist/edv/WasTransport.js.map +1 -1
- package/dist/edv/core.d.ts +81 -0
- package/dist/edv/core.d.ts.map +1 -0
- package/dist/edv/core.js +74 -0
- package/dist/edv/core.js.map +1 -0
- package/dist/edv/docCipher.d.ts.map +1 -1
- package/dist/edv/docCipher.js +16 -8
- package/dist/edv/docCipher.js.map +1 -1
- package/dist/edv/encryption.d.ts +71 -0
- package/dist/edv/encryption.d.ts.map +1 -0
- package/dist/edv/encryption.js +92 -0
- package/dist/edv/encryption.js.map +1 -0
- package/dist/edv/index.d.ts +17 -58
- package/dist/edv/index.d.ts.map +1 -1
- package/dist/edv/index.js +20 -51
- package/dist/edv/index.js.map +1 -1
- package/dist/edv/transportFactory.d.ts +17 -0
- package/dist/edv/transportFactory.d.ts.map +1 -0
- package/dist/edv/transportFactory.js +32 -0
- package/dist/edv/transportFactory.js.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/codec.js +2 -1
- package/dist/internal/codec.js.map +1 -1
- package/dist/internal/describe.d.ts +1 -43
- package/dist/internal/describe.d.ts.map +1 -1
- package/dist/internal/describe.js +23 -28
- package/dist/internal/describe.js.map +1 -1
- package/dist/internal/grant.d.ts +2 -0
- package/dist/internal/grant.d.ts.map +1 -1
- package/dist/internal/grant.js +11 -0
- package/dist/internal/grant.js.map +1 -1
- package/dist/internal/meta.d.ts +22 -0
- package/dist/internal/meta.d.ts.map +1 -1
- package/dist/internal/meta.js +40 -4
- package/dist/internal/meta.js.map +1 -1
- package/dist/internal/paths.d.ts +9 -2
- package/dist/internal/paths.d.ts.map +1 -1
- package/dist/internal/paths.js +9 -2
- package/dist/internal/paths.js.map +1 -1
- package/dist/internal/request.d.ts +8 -1
- package/dist/internal/request.d.ts.map +1 -1
- package/dist/internal/request.js.map +1 -1
- package/dist/paths.d.ts +1 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/sync/index.d.ts +17 -8
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +17 -8
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/predicates.d.ts +24 -11
- package/dist/sync/predicates.d.ts.map +1 -1
- package/dist/sync/predicates.js +24 -11
- package/dist/sync/predicates.js.map +1 -1
- package/package.json +9 -3
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
|
|
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;AACvE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA"}
|
package/dist/sync/index.d.ts
CHANGED
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
* - `createPlaintextDocCipher` / `isEncryptedEnvelope` -- the identity cipher
|
|
14
14
|
* for a plaintext content-addressed collection, and the envelope predicate,
|
|
15
15
|
* both free of the `@interop/was-client/edv` crypto graph.
|
|
16
|
+
* - `requireResourceId` -- the guard both built-in ciphers run first, exported
|
|
17
|
+
* so a consumer writing its own `DocCipher` refuses a missing resource id
|
|
18
|
+
* the same way instead of hand-rolling the check. It raises a
|
|
19
|
+
* `ValidationError`, which reports a caller passing no id rather than a
|
|
20
|
+
* condition to classify and recover from, so no predicate ships for it.
|
|
16
21
|
* - `ensureSpaceAndCollection` / `ensureSpace` -- idempotent Space +
|
|
17
22
|
* Collection provisioning, and its Space half alone (ensure the Space once,
|
|
18
23
|
* then thread the returned description through every collection).
|
|
@@ -20,10 +25,11 @@
|
|
|
20
25
|
* `isUnknownEpochError` / `isKeyUnwrapError` / `isIntegrityError` /
|
|
21
26
|
* `isNotSupportedError` -- the classification contract for the signals
|
|
22
27
|
* below. A consumer matches by `err.name` and never with `instanceof`,
|
|
23
|
-
* because
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
28
|
+
* because these errors are raised inside a seam the app injects (the port,
|
|
29
|
+
* the caller's `DocCipher`) and that seam can resolve to a second copy of
|
|
30
|
+
* this package. The affordance gate is raised outside a seam but matched the
|
|
31
|
+
* same way, so the rule has no exceptions. Reading a property off the
|
|
32
|
+
* matched value, such as `status` on an auth error, is the intended shape.
|
|
27
33
|
*
|
|
28
34
|
* The 412 conflict / 404 not-found port signals (`WasSyncConflictError` /
|
|
29
35
|
* `WasSyncNotFoundError`), and the opt-in revoked-access signal
|
|
@@ -38,16 +44,19 @@
|
|
|
38
44
|
* (`IntegrityError`: the stored body does not verify against the resource id
|
|
39
45
|
* it was read under). `EncryptionError`, the fail-closed umbrella both
|
|
40
46
|
* `KeyUnwrapError` and `IntegrityError` fall under, rides along. So does the
|
|
41
|
-
* affordance gate (`NotSupportedError`),
|
|
42
|
-
*
|
|
43
|
-
*
|
|
47
|
+
* affordance gate (`NotSupportedError`), a permanent refusal raised before any
|
|
48
|
+
* request: by a guarded write whose pinned read returned no `ETag` validator
|
|
49
|
+
* (`/log`, `/edv`, and the client's own content-addressed store), and by a
|
|
50
|
+
* cipher handed a chunked envelope it has no route to (`/edv`). This subpath
|
|
51
|
+
* raises it on neither a push nor a pull, and is where the predicate for it
|
|
52
|
+
* ships, so a consumer of those entries can match it by name too.
|
|
44
53
|
* The classes are exported
|
|
45
54
|
* for construction and for a caller inside one resolved copy; across a package
|
|
46
55
|
* boundary the predicates are the contract
|
|
47
56
|
* (`decisions/0001-cross-package-errors-match-by-name.md`).
|
|
48
57
|
*/
|
|
49
58
|
export { createWasSyncPort, KEY_EPOCH_HEADER, parseEtag } from './port.js';
|
|
50
|
-
export { httpStatus as errorStatus, errorMessage } from '../errors.js';
|
|
59
|
+
export { httpStatus as errorStatus, errorMessage, requireResourceId } from '../errors.js';
|
|
51
60
|
export { contentCid, cidFrom, deriveSpaceId } from './cid.js';
|
|
52
61
|
export { isEncryptedEnvelope } from './envelope.js';
|
|
53
62
|
export { createPlaintextDocCipher } from './plaintextCipher.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
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAI1E,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
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
* - `createPlaintextDocCipher` / `isEncryptedEnvelope` -- the identity cipher
|
|
14
14
|
* for a plaintext content-addressed collection, and the envelope predicate,
|
|
15
15
|
* both free of the `@interop/was-client/edv` crypto graph.
|
|
16
|
+
* - `requireResourceId` -- the guard both built-in ciphers run first, exported
|
|
17
|
+
* so a consumer writing its own `DocCipher` refuses a missing resource id
|
|
18
|
+
* the same way instead of hand-rolling the check. It raises a
|
|
19
|
+
* `ValidationError`, which reports a caller passing no id rather than a
|
|
20
|
+
* condition to classify and recover from, so no predicate ships for it.
|
|
16
21
|
* - `ensureSpaceAndCollection` / `ensureSpace` -- idempotent Space +
|
|
17
22
|
* Collection provisioning, and its Space half alone (ensure the Space once,
|
|
18
23
|
* then thread the returned description through every collection).
|
|
@@ -20,10 +25,11 @@
|
|
|
20
25
|
* `isUnknownEpochError` / `isKeyUnwrapError` / `isIntegrityError` /
|
|
21
26
|
* `isNotSupportedError` -- the classification contract for the signals
|
|
22
27
|
* below. A consumer matches by `err.name` and never with `instanceof`,
|
|
23
|
-
* because
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
28
|
+
* because these errors are raised inside a seam the app injects (the port,
|
|
29
|
+
* the caller's `DocCipher`) and that seam can resolve to a second copy of
|
|
30
|
+
* this package. The affordance gate is raised outside a seam but matched the
|
|
31
|
+
* same way, so the rule has no exceptions. Reading a property off the
|
|
32
|
+
* matched value, such as `status` on an auth error, is the intended shape.
|
|
27
33
|
*
|
|
28
34
|
* The 412 conflict / 404 not-found port signals (`WasSyncConflictError` /
|
|
29
35
|
* `WasSyncNotFoundError`), and the opt-in revoked-access signal
|
|
@@ -38,9 +44,12 @@
|
|
|
38
44
|
* (`IntegrityError`: the stored body does not verify against the resource id
|
|
39
45
|
* it was read under). `EncryptionError`, the fail-closed umbrella both
|
|
40
46
|
* `KeyUnwrapError` and `IntegrityError` fall under, rides along. So does the
|
|
41
|
-
* affordance gate (`NotSupportedError`),
|
|
42
|
-
*
|
|
43
|
-
*
|
|
47
|
+
* affordance gate (`NotSupportedError`), a permanent refusal raised before any
|
|
48
|
+
* request: by a guarded write whose pinned read returned no `ETag` validator
|
|
49
|
+
* (`/log`, `/edv`, and the client's own content-addressed store), and by a
|
|
50
|
+
* cipher handed a chunked envelope it has no route to (`/edv`). This subpath
|
|
51
|
+
* raises it on neither a push nor a pull, and is where the predicate for it
|
|
52
|
+
* ships, so a consumer of those entries can match it by name too.
|
|
44
53
|
* The classes are exported
|
|
45
54
|
* for construction and for a caller inside one resolved copy; across a package
|
|
46
55
|
* boundary the predicates are the contract
|
|
@@ -50,7 +59,7 @@ export { createWasSyncPort, KEY_EPOCH_HEADER, parseEtag } from './port.js';
|
|
|
50
59
|
// The sync subpath's names for the client's own error accessors, so a
|
|
51
60
|
// sync-only consumer reads a raw ky/ezcap failure without importing the core
|
|
52
61
|
// entry.
|
|
53
|
-
export { httpStatus as errorStatus, errorMessage } from '../errors.js';
|
|
62
|
+
export { httpStatus as errorStatus, errorMessage, requireResourceId } from '../errors.js';
|
|
54
63
|
export { contentCid, cidFrom, deriveSpaceId } from './cid.js';
|
|
55
64
|
export { isEncryptedEnvelope } from './envelope.js';
|
|
56
65
|
export { createPlaintextDocCipher } from './plaintextCipher.js';
|
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
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sync/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAC1E,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"}
|
|
@@ -6,10 +6,13 @@
|
|
|
6
6
|
* meet: the port's two wire signals (`WasSyncConflictError` /
|
|
7
7
|
* `WasSyncNotFoundError`), its opt-in revoked-access signal
|
|
8
8
|
* (`WasSyncAuthError`), the cipher's two no-key signals (the stale-descriptor
|
|
9
|
-
* `UnknownEpochError` and the not-a-recipient `KeyUnwrapError`), its
|
|
10
|
-
* signal (`IntegrityError`)
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* `UnknownEpochError` and the not-a-recipient `KeyUnwrapError`), and its
|
|
10
|
+
* tamper signal (`IntegrityError`).
|
|
11
|
+
*
|
|
12
|
+
* `isNotSupportedError` rides along for the client's affordance gate. That
|
|
13
|
+
* refusal belongs to the rest of the package rather than to this subpath,
|
|
14
|
+
* which raises it on neither a push nor a pull. The predicate's own doc says
|
|
15
|
+
* where it does come from.
|
|
13
16
|
*
|
|
14
17
|
* They live beside the classes that assign the names they match (`errors.ts`)
|
|
15
18
|
* because every one of those errors is raised inside a seam the consuming app
|
|
@@ -99,13 +102,23 @@ export declare function isKeyUnwrapError(err: unknown): boolean;
|
|
|
99
102
|
export declare function isIntegrityError(err: unknown): boolean;
|
|
100
103
|
/**
|
|
101
104
|
* Whether an error is the client's affordance-gate refusal
|
|
102
|
-
* (`NotSupportedError`): the operation cannot be carried out as asked.
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
105
|
+
* (`NotSupportedError`): the operation cannot be carried out as asked.
|
|
106
|
+
* Permanent, since nothing about a later attempt changes the answer. Raised
|
|
107
|
+
* before the request, so the matched value carries no `status`.
|
|
108
|
+
*
|
|
109
|
+
* It takes two forms. A guarded write refuses when the read it is pinned to
|
|
110
|
+
* returned no `ETag` validator, so the write would go out unconditionally;
|
|
111
|
+
* every such gate builds the error through `unenforcedPreconditionError`, in
|
|
112
|
+
* `log/logStore.ts`, `edv/logGovernedDescriptorStore.ts` and
|
|
113
|
+
* `internal/cas.ts`. A cipher refuses a chunked envelope it was built with no
|
|
114
|
+
* route to, in `edv/EdvCodec.ts` and `edv/WasTransport.ts`.
|
|
115
|
+
*
|
|
116
|
+
* Neither form arises on this subpath. Conditional writes are a baseline
|
|
117
|
+
* server requirement, so the sync port passes `ifMatch` / `ifNoneMatch`
|
|
118
|
+
* through with no gate in front of them, and it moves stored bodies verbatim
|
|
119
|
+
* without the codec. The predicate is exported here so a consumer of `/log` or
|
|
120
|
+
* `/edv` can classify the refusal by the same `err.name` rule as every other
|
|
121
|
+
* signal, not because a replication driver can meet it.
|
|
109
122
|
*
|
|
110
123
|
* @param err {unknown} the caught error
|
|
111
124
|
* @returns {boolean}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../src/sync/predicates.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../src/sync/predicates.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAaH;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAErD;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEtD;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEtD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEzD"}
|
package/dist/sync/predicates.js
CHANGED
|
@@ -6,10 +6,13 @@
|
|
|
6
6
|
* meet: the port's two wire signals (`WasSyncConflictError` /
|
|
7
7
|
* `WasSyncNotFoundError`), its opt-in revoked-access signal
|
|
8
8
|
* (`WasSyncAuthError`), the cipher's two no-key signals (the stale-descriptor
|
|
9
|
-
* `UnknownEpochError` and the not-a-recipient `KeyUnwrapError`), its
|
|
10
|
-
* signal (`IntegrityError`)
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* `UnknownEpochError` and the not-a-recipient `KeyUnwrapError`), and its
|
|
10
|
+
* tamper signal (`IntegrityError`).
|
|
11
|
+
*
|
|
12
|
+
* `isNotSupportedError` rides along for the client's affordance gate. That
|
|
13
|
+
* refusal belongs to the rest of the package rather than to this subpath,
|
|
14
|
+
* which raises it on neither a push nor a pull. The predicate's own doc says
|
|
15
|
+
* where it does come from.
|
|
13
16
|
*
|
|
14
17
|
* They live beside the classes that assign the names they match (`errors.ts`)
|
|
15
18
|
* because every one of those errors is raised inside a seam the consuming app
|
|
@@ -121,13 +124,23 @@ export function isIntegrityError(err) {
|
|
|
121
124
|
}
|
|
122
125
|
/**
|
|
123
126
|
* Whether an error is the client's affordance-gate refusal
|
|
124
|
-
* (`NotSupportedError`): the operation cannot be carried out as asked.
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
127
|
+
* (`NotSupportedError`): the operation cannot be carried out as asked.
|
|
128
|
+
* Permanent, since nothing about a later attempt changes the answer. Raised
|
|
129
|
+
* before the request, so the matched value carries no `status`.
|
|
130
|
+
*
|
|
131
|
+
* It takes two forms. A guarded write refuses when the read it is pinned to
|
|
132
|
+
* returned no `ETag` validator, so the write would go out unconditionally;
|
|
133
|
+
* every such gate builds the error through `unenforcedPreconditionError`, in
|
|
134
|
+
* `log/logStore.ts`, `edv/logGovernedDescriptorStore.ts` and
|
|
135
|
+
* `internal/cas.ts`. A cipher refuses a chunked envelope it was built with no
|
|
136
|
+
* route to, in `edv/EdvCodec.ts` and `edv/WasTransport.ts`.
|
|
137
|
+
*
|
|
138
|
+
* Neither form arises on this subpath. Conditional writes are a baseline
|
|
139
|
+
* server requirement, so the sync port passes `ifMatch` / `ifNoneMatch`
|
|
140
|
+
* through with no gate in front of them, and it moves stored bodies verbatim
|
|
141
|
+
* without the codec. The predicate is exported here so a consumer of `/log` or
|
|
142
|
+
* `/edv` can classify the refusal by the same `err.name` rule as every other
|
|
143
|
+
* signal, not because a replication driver can meet it.
|
|
131
144
|
*
|
|
132
145
|
* @param err {unknown} the caught error
|
|
133
146
|
* @returns {boolean}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicates.js","sourceRoot":"","sources":["../../src/sync/predicates.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"predicates.js","sourceRoot":"","sources":["../../src/sync/predicates.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;;;;GAMG;AACH,SAAS,MAAM,CAAC,GAAY;IAC1B,OAAQ,GAAiC,EAAE,IAAI,CAAA;AACjD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,sBAAsB,CAAA;AAC/C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,sBAAsB,CAAA;AAC/C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,GAAY;IAC1C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,kBAAkB,CAAA;AAC3C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,mBAAmB,CAAA;AAC5C,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAA;AACzC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAA;AACzC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,mBAAmB,CAAA;AAC5C,CAAC"}
|
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.70.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "pnpm run clear && tsc",
|
|
@@ -37,6 +37,12 @@
|
|
|
37
37
|
"import": "./dist/edv/index.js",
|
|
38
38
|
"default": "./dist/edv/index.js"
|
|
39
39
|
},
|
|
40
|
+
"./edv/core": {
|
|
41
|
+
"types": "./dist/edv/core.d.ts",
|
|
42
|
+
"react-native": "./dist/edv/core.js",
|
|
43
|
+
"import": "./dist/edv/core.js",
|
|
44
|
+
"default": "./dist/edv/core.js"
|
|
45
|
+
},
|
|
40
46
|
"./paths": {
|
|
41
47
|
"types": "./dist/paths.d.ts",
|
|
42
48
|
"react-native": "./dist/paths.js",
|
|
@@ -70,12 +76,12 @@
|
|
|
70
76
|
"@interop/capability-agent": "^0.2.0",
|
|
71
77
|
"@interop/data-integrity-core": "^8.7.1",
|
|
72
78
|
"@interop/ed25519-signature": "^7.2.2",
|
|
73
|
-
"@interop/edv-client": "^17.
|
|
79
|
+
"@interop/edv-client": "^17.9.0",
|
|
74
80
|
"@interop/ezcap": "^7.4.9",
|
|
75
81
|
"@interop/http-client": "^1.0.5",
|
|
76
82
|
"@interop/minimal-cipher": "^7.10.2",
|
|
77
83
|
"@interop/storage-core": "^0.18.0",
|
|
78
|
-
"@interop/vh-resource-log": "^0.5.
|
|
84
|
+
"@interop/vh-resource-log": "^0.5.2",
|
|
79
85
|
"@interop/x25519-key-agreement-key": "^5.4.0",
|
|
80
86
|
"@noble/hashes": "^2.3.0",
|
|
81
87
|
"@scure/base": "^2.3.0",
|