@bandeira-tech/b3nd-save 0.8.1 → 0.13.1
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/esm/clients/save-client.d.ts +63 -29
- package/esm/clients/save-client.d.ts.map +1 -1
- package/esm/clients/save-client.js +148 -68
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/mod.d.ts +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/client-console/client.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/encoding/encoding.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/encrypt/mod.d.ts +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/encrypt/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/encrypt/mod.js +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/encrypt/utils.d.ts +6 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/encrypt/utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/encrypt/utils.js +12 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/functional-client/functional-client.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/match-pattern/match-pattern.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/decorators.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/network.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/peer.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/flood.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/path-vector.d.ts +3 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/network/policies/path-vector.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/path-vector.js +3 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/tell-and-read.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/types.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/observe-emitter/observe-emitter.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/connection.d.ts +13 -5
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/connection.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/connection.js +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/events.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/hooks.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/identity.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/operation-handle.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/reactions.d.ts.map +1 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/rig.d.ts +3 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/rig.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/rig.js +46 -4
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/types.d.ts +4 -4
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/rig/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/types/types.d.ts +119 -80
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/types/types.d.ts.map +1 -0
- package/esm/dispatch.d.ts +116 -3
- package/esm/dispatch.d.ts.map +1 -1
- package/esm/dispatch.js +381 -5
- package/esm/elasticsearch/store.d.ts +124 -25
- package/esm/elasticsearch/store.d.ts.map +1 -1
- package/esm/elasticsearch/store.js +451 -92
- package/esm/entity-store.d.ts +1 -1
- package/esm/errors.d.ts +1 -1
- package/esm/errors.js +1 -1
- package/esm/fs/mod.d.ts +26 -0
- package/esm/fs/mod.d.ts.map +1 -1
- package/esm/fs/store.d.ts +100 -23
- package/esm/fs/store.d.ts.map +1 -1
- package/esm/fs/store.js +250 -66
- package/esm/glob.d.ts +114 -0
- package/esm/glob.d.ts.map +1 -0
- package/esm/glob.js +352 -0
- package/esm/identifiers.d.ts +18 -0
- package/esm/identifiers.d.ts.map +1 -0
- package/esm/identifiers.js +19 -0
- package/esm/indexeddb/fields.d.ts +32 -0
- package/esm/indexeddb/fields.d.ts.map +1 -0
- package/esm/indexeddb/fields.js +51 -0
- package/esm/indexeddb/store.d.ts +72 -17
- package/esm/indexeddb/store.d.ts.map +1 -1
- package/esm/indexeddb/store.js +362 -106
- package/esm/ipfs/mod.d.ts +19 -0
- package/esm/ipfs/mod.d.ts.map +1 -1
- package/esm/ipfs/mod.js +19 -0
- package/esm/ipfs/store.d.ts +82 -21
- package/esm/ipfs/store.d.ts.map +1 -1
- package/esm/ipfs/store.js +269 -68
- package/esm/json-fields.d.ts +61 -0
- package/esm/json-fields.d.ts.map +1 -0
- package/esm/json-fields.js +121 -0
- package/esm/localstorage/store.d.ts +89 -21
- package/esm/localstorage/store.d.ts.map +1 -1
- package/esm/localstorage/store.js +247 -54
- package/esm/memory/store.d.ts +35 -4
- package/esm/memory/store.d.ts.map +1 -1
- package/esm/memory/store.js +69 -47
- package/esm/mod.d.ts +2 -0
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +1 -0
- package/esm/mongo/fields.d.ts +53 -0
- package/esm/mongo/fields.d.ts.map +1 -0
- package/esm/mongo/fields.js +71 -0
- package/esm/mongo/mod.d.ts +19 -4
- package/esm/mongo/mod.d.ts.map +1 -1
- package/esm/mongo/mod.js +4 -2
- package/esm/mongo/store.d.ts +114 -25
- package/esm/mongo/store.d.ts.map +1 -1
- package/esm/mongo/store.js +355 -102
- package/esm/postgres/store.d.ts +50 -1
- package/esm/postgres/store.d.ts.map +1 -1
- package/esm/postgres/store.js +133 -13
- package/esm/read.d.ts +54 -7
- package/esm/read.d.ts.map +1 -1
- package/esm/read.js +141 -16
- package/esm/s3/store.d.ts +125 -23
- package/esm/s3/store.d.ts.map +1 -1
- package/esm/s3/store.js +313 -57
- package/esm/sqlite/columns.d.ts +33 -0
- package/esm/sqlite/columns.d.ts.map +1 -0
- package/esm/sqlite/columns.js +51 -0
- package/esm/sqlite/store.d.ts +73 -25
- package/esm/sqlite/store.d.ts.map +1 -1
- package/esm/sqlite/store.js +411 -107
- package/esm/types.d.ts +1 -1
- package/esm/url.d.ts +122 -19
- package/esm/url.d.ts.map +1 -1
- package/esm/url.js +218 -24
- package/esm/walk-via-ls.d.ts +122 -0
- package/esm/walk-via-ls.d.ts.map +1 -0
- package/esm/walk-via-ls.js +178 -0
- package/package.json +1 -1
- package/esm/byte-entity-shim.d.ts +0 -47
- package/esm/byte-entity-shim.d.ts.map +0 -1
- package/esm/byte-entity-shim.js +0 -138
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/src/encrypt/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/src/network/policies/path-vector.d.ts.map +0 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/src/rig/connection.d.ts.map +0 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/src/rig/rig.d.ts.map +0 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/src/rig/types.d.ts.map +0 -1
- package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.22.0/src/types/types.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/mod.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/client-console/client.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/client-console/client.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/encoding/encoding.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/encoding/encoding.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/functional-client/functional-client.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/functional-client/functional-client.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/match-pattern/match-pattern.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/match-pattern/match-pattern.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/decorators.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/decorators.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/network.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/network.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/peer.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/peer.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/flood.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/flood.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/tell-and-read.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/policies/tell-and-read.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/types.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/types.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/observe-emitter/observe-emitter.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/observe-emitter/observe-emitter.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/events.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/events.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/hooks.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/hooks.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/identity.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/identity.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/operation-handle.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/operation-handle.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/reactions.d.ts +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/reactions.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/rig/types.js +0 -0
- /package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/types/types.js +0 -0
|
@@ -9,13 +9,14 @@
|
|
|
9
9
|
* store on S". All three are explicit; the client does not invent
|
|
10
10
|
* defaults.
|
|
11
11
|
*
|
|
12
|
-
* - **mapper** — a {@link SaveMapper}:
|
|
13
|
-
* wire payload
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
12
|
+
* - **mapper** — a {@link SaveMapper}: a bidirectional codec between
|
|
13
|
+
* wire (uri, payload) and store (uri, record). Runs on every URI hop
|
|
14
|
+
* in both directions. {@link mapToBytes} and {@link passThroughRecord}
|
|
15
|
+
* cover the common identity-URI cases.
|
|
16
|
+
* - **entity** — the {@link EntitySchema} of the *store record*. This
|
|
17
|
+
* is what the store's `entitySupport` inspects and what
|
|
18
|
+
* `mapper.toStore` must produce records matching. Use
|
|
19
|
+
* {@link BYTES_ENTITY} for opaque-bytes stores.
|
|
19
20
|
* - **store** — any {@link EntityStore}. Every backend in this
|
|
20
21
|
* package implements it.
|
|
21
22
|
*
|
|
@@ -36,41 +37,73 @@
|
|
|
36
37
|
* for read) — same as calling any other `EntityStore` method against
|
|
37
38
|
* an unprovisioned entity.
|
|
38
39
|
*
|
|
40
|
+
* ## URI translation
|
|
41
|
+
*
|
|
42
|
+
* Every wire URI hitting SaveClient goes through `mapper.toStore` before
|
|
43
|
+
* reaching the store; every URI coming back out goes through
|
|
44
|
+
* `mapper.fromStore`. The store never sees wire URIs — it only ever
|
|
45
|
+
* sees store URIs. Observe emissions are keyed on the wire URI so
|
|
46
|
+
* downstream consumers see the vocabulary the rig routes in.
|
|
47
|
+
*
|
|
39
48
|
* Wire shape: a `receive` message is `Output<TIn | null>` —
|
|
40
49
|
* `[uri, payload]` where `payload === null` is the delete-by-convention.
|
|
41
|
-
* Reads come back as the stored records (or raw bytes when `entity`
|
|
42
|
-
* is `BYTES_ENTITY`); the mapper is receive-only.
|
|
43
50
|
*
|
|
44
51
|
* A `SaveClient` is a one-shot, isolated thing: each one routes one
|
|
45
52
|
* entity, and routing a different entity means constructing a
|
|
46
53
|
* different client.
|
|
47
54
|
*/
|
|
48
|
-
import type { Output, ProtocolInterfaceNode, ReceiveResult, StatusResult } from "../deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
49
|
-
import { ObserveEmitter } from "../deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
55
|
+
import type { Output, ProtocolInterfaceNode, ReceiveResult, StatusResult } from "../deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/types/types.js";
|
|
56
|
+
import { ObserveEmitter } from "../deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/mod.js";
|
|
50
57
|
import type { EntityStore } from "../entity-store.js";
|
|
51
|
-
import {
|
|
58
|
+
import type { EntityMeta, EntityRecord, EntitySchema } from "../entity.js";
|
|
52
59
|
import type { StorePayload } from "../types.js";
|
|
60
|
+
/** A value or a Promise for that value. */
|
|
61
|
+
type MaybeAsync<T> = T | Promise<T>;
|
|
53
62
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
63
|
+
* Bidirectional codec between the wire vocabulary
|
|
64
|
+
* `(wireUri, wirePayload)` and the store vocabulary
|
|
65
|
+
* `(storeUri, storeRecord)`.
|
|
66
|
+
*
|
|
67
|
+
* - **`toStore(wireUri, payload?)`** runs on every request going into
|
|
68
|
+
* the store (write, read, delete). When `payload` is present, both
|
|
69
|
+
* URI and record are transformed; when absent (URI-only ops), only
|
|
70
|
+
* the URI is meaningful and `record` MAY be omitted from the return.
|
|
71
|
+
* - **`fromStore(storeUri, record?)`** runs on every result coming out
|
|
72
|
+
* of the store. Return `null` to drop a foreign entry (a store URI
|
|
73
|
+
* the mapper does not recognize — e.g. a stray file the app did not
|
|
74
|
+
* write). When `record` is absent (URI-only op / miss), only the
|
|
75
|
+
* translated URI is meaningful.
|
|
76
|
+
*
|
|
77
|
+
* The mapper is the single "opinion" locus: URI shape choices,
|
|
78
|
+
* on-medium encoding, and any per-schema validation all live here.
|
|
79
|
+
* The store below never sees a wire URI and never coerces its bytes.
|
|
58
80
|
*/
|
|
59
|
-
export
|
|
81
|
+
export interface SaveMapper<TIn = unknown, TOut = TIn> {
|
|
82
|
+
toStore(wireUri: string, payload?: TIn): MaybeAsync<{
|
|
83
|
+
uri: string;
|
|
84
|
+
record?: EntityRecord;
|
|
85
|
+
}>;
|
|
86
|
+
fromStore(storeUri: string, record?: EntityRecord): MaybeAsync<{
|
|
87
|
+
uri: string;
|
|
88
|
+
payload?: TOut;
|
|
89
|
+
} | null>;
|
|
90
|
+
}
|
|
60
91
|
/**
|
|
61
|
-
* Built-in mapper
|
|
62
|
-
*
|
|
63
|
-
* the
|
|
92
|
+
* Built-in mapper for opaque-bytes wires. URI passes through
|
|
93
|
+
* unchanged; the wire byte payload is wrapped as `{ payload: bytes }`
|
|
94
|
+
* on the way in, unwrapped on the way out. Pair with
|
|
95
|
+
* {@link BYTES_ENTITY}.
|
|
64
96
|
*/
|
|
65
|
-
export declare const mapToBytes: SaveMapper<StorePayload>;
|
|
97
|
+
export declare const mapToBytes: SaveMapper<StorePayload, StorePayload>;
|
|
66
98
|
/**
|
|
67
|
-
* Built-in mapper that
|
|
68
|
-
*
|
|
69
|
-
* protocol upstream
|
|
99
|
+
* Built-in mapper for wires that already carry the store's record
|
|
100
|
+
* shape. URI and record pass through unchanged in both directions.
|
|
101
|
+
* Use when the protocol upstream produces a valid `EntityRecord`
|
|
102
|
+
* matching the target schema.
|
|
70
103
|
*/
|
|
71
|
-
export declare const passThroughRecord: SaveMapper<EntityRecord>;
|
|
72
|
-
export declare class SaveClient<TIn = unknown> extends ObserveEmitter implements ProtocolInterfaceNode {
|
|
73
|
-
readonly mapper: SaveMapper<TIn>;
|
|
104
|
+
export declare const passThroughRecord: SaveMapper<EntityRecord, EntityRecord>;
|
|
105
|
+
export declare class SaveClient<TIn = unknown, TOut = TIn> extends ObserveEmitter implements ProtocolInterfaceNode {
|
|
106
|
+
readonly mapper: SaveMapper<TIn, TOut>;
|
|
74
107
|
readonly target: EntitySchema;
|
|
75
108
|
readonly store: EntityStore;
|
|
76
109
|
/**
|
|
@@ -79,9 +112,10 @@ export declare class SaveClient<TIn = unknown> extends ObserveEmitter implements
|
|
|
79
112
|
* inspect `meta.support` to see which fields the medium accepted.
|
|
80
113
|
*/
|
|
81
114
|
readonly meta: EntityMeta;
|
|
82
|
-
constructor(mapper: SaveMapper<TIn>, target: EntitySchema, store: EntityStore);
|
|
115
|
+
constructor(mapper: SaveMapper<TIn, TOut>, target: EntitySchema, store: EntityStore);
|
|
83
116
|
receive(msgs: Output<TIn | null>[]): Promise<ReceiveResult[]>;
|
|
84
|
-
read<T =
|
|
117
|
+
read<T = TOut | undefined>(urls: string[]): Promise<Output<T>[]>;
|
|
85
118
|
status(): Promise<StatusResult>;
|
|
86
119
|
}
|
|
120
|
+
export {};
|
|
87
121
|
//# sourceMappingURL=save-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-client.d.ts","sourceRoot":"","sources":["../../src/clients/save-client.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"save-client.d.ts","sourceRoot":"","sources":["../../src/clients/save-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,KAAK,EACV,MAAM,EACN,qBAAqB,EACrB,aAAa,EACb,YAAY,EACb,MAAM,mEAAmE,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,uDAAuD,CAAC;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,2CAA2C;AAC3C,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAEpC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,UAAU,CAAC,GAAG,GAAG,OAAO,EAAE,IAAI,GAAG,GAAG;IACnD,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,UAAU,CAAC;QAClD,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,CAAC,EAAE,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apper** — a {@link SaveMapper}:
|
|
13
|
-
* wire payload
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
12
|
+
* - **mapper** — a {@link SaveMapper}: a bidirectional codec between
|
|
13
|
+
* wire (uri, payload) and store (uri, record). Runs on every URI hop
|
|
14
|
+
* in both directions. {@link mapToBytes} and {@link passThroughRecord}
|
|
15
|
+
* cover the common identity-URI cases.
|
|
16
|
+
* - **entity** — the {@link EntitySchema} of the *store record*. This
|
|
17
|
+
* is what the store's `entitySupport` inspects and what
|
|
18
|
+
* `mapper.toStore` must produce records matching. Use
|
|
19
|
+
* {@link BYTES_ENTITY} for opaque-bytes stores.
|
|
19
20
|
* - **store** — any {@link EntityStore}. Every backend in this
|
|
20
21
|
* package implements it.
|
|
21
22
|
*
|
|
@@ -36,63 +37,66 @@
|
|
|
36
37
|
* for read) — same as calling any other `EntityStore` method against
|
|
37
38
|
* an unprovisioned entity.
|
|
38
39
|
*
|
|
40
|
+
* ## URI translation
|
|
41
|
+
*
|
|
42
|
+
* Every wire URI hitting SaveClient goes through `mapper.toStore` before
|
|
43
|
+
* reaching the store; every URI coming back out goes through
|
|
44
|
+
* `mapper.fromStore`. The store never sees wire URIs — it only ever
|
|
45
|
+
* sees store URIs. Observe emissions are keyed on the wire URI so
|
|
46
|
+
* downstream consumers see the vocabulary the rig routes in.
|
|
47
|
+
*
|
|
39
48
|
* Wire shape: a `receive` message is `Output<TIn | null>` —
|
|
40
49
|
* `[uri, payload]` where `payload === null` is the delete-by-convention.
|
|
41
|
-
* Reads come back as the stored records (or raw bytes when `entity`
|
|
42
|
-
* is `BYTES_ENTITY`); the mapper is receive-only.
|
|
43
50
|
*
|
|
44
51
|
* A `SaveClient` is a one-shot, isolated thing: each one routes one
|
|
45
52
|
* entity, and routing a different entity means constructing a
|
|
46
53
|
* different client.
|
|
47
54
|
*/
|
|
48
|
-
import { ObserveEmitter } from "../deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
49
|
-
import { BYTES_ENTITY, } from "../entity.js";
|
|
55
|
+
import { ObserveEmitter } from "../deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/mod.js";
|
|
50
56
|
/**
|
|
51
|
-
* Built-in mapper
|
|
52
|
-
*
|
|
53
|
-
* the
|
|
57
|
+
* Built-in mapper for opaque-bytes wires. URI passes through
|
|
58
|
+
* unchanged; the wire byte payload is wrapped as `{ payload: bytes }`
|
|
59
|
+
* on the way in, unwrapped on the way out. Pair with
|
|
60
|
+
* {@link BYTES_ENTITY}.
|
|
54
61
|
*/
|
|
55
|
-
export const mapToBytes =
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
export const mapToBytes = {
|
|
63
|
+
toStore: (uri, bytes) => ({
|
|
64
|
+
uri,
|
|
65
|
+
record: bytes !== undefined ? { payload: bytes } : undefined,
|
|
66
|
+
}),
|
|
67
|
+
fromStore: (uri, record) => ({
|
|
68
|
+
uri,
|
|
69
|
+
payload: record === undefined
|
|
70
|
+
? undefined
|
|
71
|
+
: record.payload,
|
|
72
|
+
}),
|
|
73
|
+
};
|
|
58
74
|
/**
|
|
59
|
-
* Built-in mapper that
|
|
60
|
-
*
|
|
61
|
-
* protocol upstream
|
|
75
|
+
* Built-in mapper for wires that already carry the store's record
|
|
76
|
+
* shape. URI and record pass through unchanged in both directions.
|
|
77
|
+
* Use when the protocol upstream produces a valid `EntityRecord`
|
|
78
|
+
* matching the target schema.
|
|
62
79
|
*/
|
|
63
|
-
export const passThroughRecord =
|
|
80
|
+
export const passThroughRecord = {
|
|
81
|
+
toStore: (uri, record) => ({ uri, record }),
|
|
82
|
+
fromStore: (uri, record) => ({ uri, payload: record }),
|
|
83
|
+
};
|
|
64
84
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* - `fn=read`: a single `EntityRecord` (or `undefined` for a miss).
|
|
69
|
-
* - `fn=ls&format=full`: `Output<EntityRecord | undefined>[]`.
|
|
70
|
-
* - `fn=ls&format=uris`: `string[]`.
|
|
71
|
-
* - `fn=count`: `number`.
|
|
72
|
-
*
|
|
73
|
-
* Record-shaped payloads carry `{ payload: bytes }`; we surface the
|
|
74
|
-
* inner bytes. Other shapes pass through unchanged.
|
|
85
|
+
* True when `row` looks like an `Output` tuple `[uri, payload]`.
|
|
86
|
+
* Used in `read` to distinguish tuple results from `format=uris`
|
|
87
|
+
* (`string[]`) or `fn=count` (`number[]`) return shapes.
|
|
75
88
|
*/
|
|
76
|
-
function
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return row;
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
if (typeof value === "object") {
|
|
91
|
-
const rec = value;
|
|
92
|
-
if ("payload" in rec)
|
|
93
|
-
return rec.payload;
|
|
94
|
-
}
|
|
95
|
-
return value;
|
|
89
|
+
function isOutputTuple(row) {
|
|
90
|
+
return (Array.isArray(row) &&
|
|
91
|
+
row.length === 2 &&
|
|
92
|
+
typeof row[0] === "string");
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* True when `arr` is a list of `Output` tuples — the shape ls/find
|
|
96
|
+
* return in their outer payload slot (`[[uri, record], ...]`).
|
|
97
|
+
*/
|
|
98
|
+
function isOutputArray(arr) {
|
|
99
|
+
return Array.isArray(arr) && (arr.length === 0 || isOutputTuple(arr[0]));
|
|
96
100
|
}
|
|
97
101
|
export class SaveClient extends ObserveEmitter {
|
|
98
102
|
mapper;
|
|
@@ -116,18 +120,30 @@ export class SaveClient extends ObserveEmitter {
|
|
|
116
120
|
const writes = [];
|
|
117
121
|
const deletes = [];
|
|
118
122
|
for (let i = 0; i < msgs.length; i++) {
|
|
119
|
-
const [
|
|
120
|
-
if (!
|
|
123
|
+
const [wireUri, wirePayload] = msgs[i];
|
|
124
|
+
if (!wireUri || typeof wireUri !== "string") {
|
|
121
125
|
results[i] = { accepted: false, error: "URI is required" };
|
|
122
126
|
continue;
|
|
123
127
|
}
|
|
124
|
-
if (payload === null) {
|
|
125
|
-
deletes.push({ uri, index: i });
|
|
126
|
-
continue;
|
|
127
|
-
}
|
|
128
128
|
try {
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
if (wirePayload === null) {
|
|
130
|
+
// Delete — URI-only translation.
|
|
131
|
+
const { uri: storeUri } = await this.mapper.toStore(wireUri);
|
|
132
|
+
deletes.push({ wireUri, storeUri, index: i });
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
const { uri: storeUri, record } = await this.mapper.toStore(wireUri, wirePayload);
|
|
136
|
+
if (record === undefined) {
|
|
137
|
+
throw new Error("mapper.toStore returned no record for a non-null payload");
|
|
138
|
+
}
|
|
139
|
+
writes.push({
|
|
140
|
+
wireUri,
|
|
141
|
+
storeUri,
|
|
142
|
+
record,
|
|
143
|
+
wire: wirePayload,
|
|
144
|
+
index: i,
|
|
145
|
+
});
|
|
146
|
+
}
|
|
131
147
|
}
|
|
132
148
|
catch (e) {
|
|
133
149
|
results[i] = {
|
|
@@ -137,24 +153,24 @@ export class SaveClient extends ObserveEmitter {
|
|
|
137
153
|
}
|
|
138
154
|
}
|
|
139
155
|
if (writes.length > 0) {
|
|
140
|
-
const writeResults = await this.store.write(this.meta, writes.map(({
|
|
156
|
+
const writeResults = await this.store.write(this.meta, writes.map(({ storeUri, record }) => ({ uri: storeUri, record })));
|
|
141
157
|
for (let j = 0; j < writeResults.length; j++) {
|
|
142
158
|
const w = writes[j];
|
|
143
159
|
const r = writeResults[j];
|
|
144
160
|
results[w.index] = { accepted: r.success, error: r.error };
|
|
145
161
|
if (r.success)
|
|
146
|
-
this._emit(w.
|
|
162
|
+
this._emit(w.wireUri, w.wire);
|
|
147
163
|
}
|
|
148
164
|
}
|
|
149
165
|
if (deletes.length > 0) {
|
|
150
|
-
const delResults = await this.store.delete(this.meta, deletes.map((d) => d.
|
|
166
|
+
const delResults = await this.store.delete(this.meta, deletes.map((d) => d.storeUri));
|
|
151
167
|
const deletedUris = [];
|
|
152
168
|
for (let j = 0; j < delResults.length; j++) {
|
|
153
169
|
const d = deletes[j];
|
|
154
170
|
const r = delResults[j];
|
|
155
171
|
results[d.index] = { accepted: r.success, error: r.error };
|
|
156
172
|
if (r.success)
|
|
157
|
-
deletedUris.push(d.
|
|
173
|
+
deletedUris.push(d.wireUri);
|
|
158
174
|
}
|
|
159
175
|
if (deletedUris.length > 0)
|
|
160
176
|
this._emitDeletes(deletedUris);
|
|
@@ -162,11 +178,75 @@ export class SaveClient extends ObserveEmitter {
|
|
|
162
178
|
return results;
|
|
163
179
|
}
|
|
164
180
|
async read(urls) {
|
|
165
|
-
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
181
|
+
// Translate each wire URI to a store URI up front.
|
|
182
|
+
const storeUris = await Promise.all(urls.map(async (u) => (await this.mapper.toStore(u)).uri));
|
|
183
|
+
const rows = await this.store.read(this.meta, storeUris);
|
|
184
|
+
const out = [];
|
|
185
|
+
for (const row of rows) {
|
|
186
|
+
// Output-tuple shape: `[storeUri, payload]`. `payload` is either
|
|
187
|
+
// a leaf (an `EntityRecord` for fn=read; a `string[]` for
|
|
188
|
+
// fn=ls&format=uris; a number for fn=count) or an inner
|
|
189
|
+
// Output-array (fn=ls&format=full / fn=find&format=full).
|
|
190
|
+
if (isOutputTuple(row)) {
|
|
191
|
+
const [storeUri, storePayload] = row;
|
|
192
|
+
// Nested Output-array (ls/find with format=full) — recurse
|
|
193
|
+
// into each inner tuple so wire URIs and payloads come back
|
|
194
|
+
// out of the mapper on both levels.
|
|
195
|
+
if (isOutputArray(storePayload)) {
|
|
196
|
+
const inner = [];
|
|
197
|
+
for (const [innerStoreUri, innerRecord] of storePayload) {
|
|
198
|
+
const innerBack = await this.mapper.fromStore(innerStoreUri, innerRecord);
|
|
199
|
+
if (innerBack === null)
|
|
200
|
+
continue;
|
|
201
|
+
inner.push([innerBack.uri, innerBack.payload]);
|
|
202
|
+
}
|
|
203
|
+
// The outer URI is typically a prefix (`store://…/`) and the
|
|
204
|
+
// mapper's URI mapping applies to it too. Callers only care
|
|
205
|
+
// about the inner rows on this path but we still translate
|
|
206
|
+
// for symmetry with the leaf branch.
|
|
207
|
+
const outerBack = await this.mapper.fromStore(storeUri);
|
|
208
|
+
if (outerBack === null)
|
|
209
|
+
continue;
|
|
210
|
+
out.push([outerBack.uri, inner]);
|
|
211
|
+
continue;
|
|
212
|
+
}
|
|
213
|
+
// format=uris leaves the outer payload as `string[]` — inner
|
|
214
|
+
// strings are store URIs we need to translate back.
|
|
215
|
+
if (Array.isArray(storePayload) &&
|
|
216
|
+
storePayload.every((x) => typeof x === "string")) {
|
|
217
|
+
const inner = [];
|
|
218
|
+
for (const innerStoreUri of storePayload) {
|
|
219
|
+
const innerBack = await this.mapper.fromStore(innerStoreUri);
|
|
220
|
+
if (innerBack === null)
|
|
221
|
+
continue;
|
|
222
|
+
inner.push(innerBack.uri);
|
|
223
|
+
}
|
|
224
|
+
const outerBack = await this.mapper.fromStore(storeUri);
|
|
225
|
+
if (outerBack === null)
|
|
226
|
+
continue;
|
|
227
|
+
out.push([outerBack.uri, inner]);
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
// Leaf case: single-URI read.
|
|
231
|
+
const back = await this.mapper.fromStore(storeUri, storePayload);
|
|
232
|
+
if (back === null)
|
|
233
|
+
continue;
|
|
234
|
+
out.push([back.uri, back.payload]);
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
// Bare-string result (rare — some ls implementations return
|
|
238
|
+
// `string[]` at the top level instead of `[[prefix, uris]]`).
|
|
239
|
+
if (typeof row === "string") {
|
|
240
|
+
const back = await this.mapper.fromStore(row);
|
|
241
|
+
if (back === null)
|
|
242
|
+
continue;
|
|
243
|
+
out.push([back.uri, undefined]);
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
// Anything else (aggregate numbers, etc.) passes through.
|
|
247
|
+
out.push(row);
|
|
248
|
+
}
|
|
249
|
+
return out;
|
|
170
250
|
}
|
|
171
251
|
status() {
|
|
172
252
|
return this.store.status();
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* network: types, encoding, clients, Rig, Identity, connection,
|
|
7
7
|
* hooks, events, reactions, and network primitives.
|
|
8
8
|
*/
|
|
9
|
-
export type { B3ndError, ClientError, CodeHandler, DeleteResult, HealthStatus, Output, Program, ProgramResult, ProtocolInterfaceNode, ReadFn, ReceiveResult, StatusResult, WriteResult, } from "./src/types/types.js";
|
|
9
|
+
export type { B3ndError, ClientError, CodeHandler, DeleteResult, HealthStatus, NodeStatus, Output, Program, ProgramResult, ProtocolInterfaceNode, ProtocolObserve, ProtocolObserveNode, ProtocolRead, ProtocolReadNode, ProtocolReceive, ProtocolReceiveNode, ReadFn, ReceiveFn, ReceiveResult, ResourceCapabilities, StatusResult, WriteResult, } from "./src/types/types.js";
|
|
10
10
|
export { ErrorCode, Errors } from "./src/types/types.js";
|
|
11
11
|
export { decodeBase64, decodeHex, encodeBase64, encodeHex, } from "./src/encoding/encoding.js";
|
|
12
12
|
export { FunctionalClient } from "./src/functional-client/functional-client.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,YAAY,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,MAAM,EACN,OAAO,EACP,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,MAAM,EACN,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,WAAW,GACZ,MAAM,sBAAsB,CAAC;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eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/E,YAAY,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAI7E,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,YAAY,EACV,UAAU,EACV,cAAc,EACd,IAAI,EACJ,aAAa,EACb,MAAM,EACN,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,yCAAyC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/client-console/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EACV,MAAM,EACN,qBAAqB,EACrB,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAC;AAc3B,qBAAa,aAAc,YAAW,qBAAqB;IACzD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA4B;gBAEpC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI;IAK1D,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAcjD,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAKxD,OAAO,CACL,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,CAAC,EAAE,WAAW,GACpB,aAAa,CAAC,SAAS,MAAM,EAAE,CAAC;IAcnC,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC;CAMhC"}
|
package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/encoding/encoding.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/encoding/encoding.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAEnD;AAED,kEAAkE;AAClE,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CAU9D;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAMtD;AAED,8BAA8B;AAC9B,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CASpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.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E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,gBAAgB,CAAC,CAqB3B;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,UAAU,CAAC,CAmBrB;AAED;;GAEG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,KAAK,CAAC;IAAE,UAAU,EAAE,SAAS,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC,EAC/D,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,sBAAsB,CAAC,CAiBjC;AAED;;;GAGG;AACH,wBAAsB,IAAI,CACxB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,CAejB;AAED;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,OAAO,CAAC,CA8ElB;AAED;;;;;GAKG;AACH,wBAAsB,+BAA+B,CACnD,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,iBAAiB,CAAC,CA2E5B;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,SAAS,GACpB,OAAO,CAAC,MAAM,CAAC,CAWjB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAI7C;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CAMjB"}
|
|
@@ -2,6 +2,7 @@ import { decodeBase64, decodeHex, encodeBase64, encodeHex, } from "../encoding/e
|
|
|
2
2
|
import _canonicalize from "canonicalize";
|
|
3
3
|
// CJS/ESM interop: cast to callable
|
|
4
4
|
const canonicalize = _canonicalize;
|
|
5
|
+
export { deriveObfuscatedPath } from "./utils.js";
|
|
5
6
|
export class IdentityKey {
|
|
6
7
|
privateKey;
|
|
7
8
|
publicKeyHex;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derive a deterministic obfuscated path from arbitrary parts.
|
|
3
|
+
* Uses HMAC-SHA256 over the pipe-joined parts, returns a hex string.
|
|
4
|
+
*/
|
|
5
|
+
export declare function deriveObfuscatedPath(secret: string, ...parts: string[]): Promise<string>;
|
|
6
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/encrypt/utils.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,GAAG,KAAK,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,MAAM,CAAC,CAkBjB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { encodeHex } from "../encoding/encoding.js";
|
|
2
|
+
/**
|
|
3
|
+
* Derive a deterministic obfuscated path from arbitrary parts.
|
|
4
|
+
* Uses HMAC-SHA256 over the pipe-joined parts, returns a hex string.
|
|
5
|
+
*/
|
|
6
|
+
export async function deriveObfuscatedPath(secret, ...parts) {
|
|
7
|
+
const encoder = new TextEncoder();
|
|
8
|
+
const input = parts.join("|");
|
|
9
|
+
const key = await crypto.subtle.importKey("raw", encoder.encode(secret), { name: "HMAC", hash: "SHA-256" }, false, ["sign"]);
|
|
10
|
+
const signature = await crypto.subtle.sign("HMAC", key, encoder.encode(input));
|
|
11
|
+
return encodeHex(new Uint8Array(signature)).substring(0, 32);
|
|
12
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functional-client.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"functional-client.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/functional-client/functional-client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,MAAM,EACN,qBAAqB,EACrB,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAC;AAE3B;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACvD,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7D,OAAO,CAAC,EAAE,CACR,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,WAAW,KAChB,aAAa,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;CACtC;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,gBAAiB,YAAW,qBAAqB;IAC5D,OAAO,CAAC,MAAM,CAAyB;gBAE3B,MAAM,EAAE,sBAAsB;IAI1C,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IASjD,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAQhD,OAAO,CACZ,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,WAAW,GAClB,aAAa,CAAC,SAAS,MAAM,EAAE,CAAC;IAOnC,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC;CAMhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match-pattern.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"match-pattern.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/match-pattern/match-pattern.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAcvD;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAE7D"}
|
package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/decorators.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/network/decorators.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,EAAE,aAiBvB,CAAC"}
|
package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/network.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/network/network.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAU,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAc,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAE3E;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAC9C,KAAK,EAAE,IAAI,EAAE,EACb,QAAQ,GAAE,MAAM,EAAO,EACvB,IAAI,GAAE,cAAmB,GACxB,MAAM,OAAO,CAAC,IAAI,CAAC,CAiBrB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,IAAI,EAAE,GACZ;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAA;CAAE,CAe9C"}
|
package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/peer.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peer.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"peer.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/network/peer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAClB,MAAM,EAAE,qBAAqB,EAC7B,IAAI,GAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,aAAa,EAAE,CAAA;CAAO,GAChD,IAAI,CAON"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flood.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"flood.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/network/policies/flood.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EACV,MAAM,EACN,qBAAqB,EAGtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGxC;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,qBAAqB,CAG1D;AAmBD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CACvB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,KAAK,MAAM,EAAE,GAClD,qBAAqB,CAsHvB"}
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Handles arbitrary-length cycles (A → B → C → A) without any state,
|
|
12
12
|
* because the chain grows with every relay that re-signs. Works "for
|
|
13
|
-
* free" when messages are signed with `Identity.sign()` + `message()
|
|
13
|
+
* free" when messages are signed with `Identity.sign()` + `message()`
|
|
14
|
+
* (`message()` is not in b3nd-core — import it from b3nd-canon:
|
|
15
|
+
* `import { message } from "@bandeira-tech/b3nd-canon"`).
|
|
14
16
|
*
|
|
15
17
|
* ## Peer id convention
|
|
16
18
|
*
|
package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/network/policies/path-vector.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-vector.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/network/policies/path-vector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAU,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxC,wBAAgB,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,qBAAqB,CAO/D"}
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Handles arbitrary-length cycles (A → B → C → A) without any state,
|
|
12
12
|
* because the chain grows with every relay that re-signs. Works "for
|
|
13
|
-
* free" when messages are signed with `Identity.sign()` + `message()
|
|
13
|
+
* free" when messages are signed with `Identity.sign()` + `message()`
|
|
14
|
+
* (`message()` is not in b3nd-core — import it from b3nd-canon:
|
|
15
|
+
* `import { message } from "@bandeira-tech/b3nd-canon"`).
|
|
14
16
|
*
|
|
15
17
|
* ## Peer id convention
|
|
16
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tell-and-read.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"tell-and-read.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/network/policies/tell-and-read.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIhD,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,KAAK,MAAM,EAAE,CAAC;IAEpD;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,CACX,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,EACnB,MAAM,EAAE,IAAI,KACT,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;CACjD;AAED,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,qBAAqB,CAAC;IACnD,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,iBAAiB,CAwCvE"}
|
package/esm/deps/jsr.io/@bandeira-tech/b3nd-core/{0.22.0 → 0.25.0}/src/network/types.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/network/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEvE;;;;;;;;;GASG;AACH,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;CACxC;AAED;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,MAAM,EAAE,qBAAqB,KAC1B,qBAAqB,CAAC;AAE3B;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;4BAEwB;IACxB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,CACN,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,EACnB,MAAM,EAAE,IAAI,EACZ,GAAG,EAAE,UAAU,GACd,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC1D;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe-emitter.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.
|
|
1
|
+
{"version":3,"file":"observe-emitter.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@bandeira-tech/b3nd-core/0.25.0/src/observe-emitter/observe-emitter.ts"],"names":[],"mappings":"AAwBA,MAAM,MAAM,eAAe,GAAG,CAC5B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,OAAO,KACV,IAAI,CAAC;AAEV;;;;;;;;GAQG;AACH,qBAAa,cAAc;IACzB,SAAS,CAAC,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,CAA8B;IAExE;;;;OAIG;IACH,SAAS,CAAC,KAAK,CACb,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,OAAO,GACZ,IAAI;IAUP,sDAAsD;IACtD,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI;IAIrD;;;;;;;;;;;OAWG;IACI,OAAO,CACZ,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,WAAW,GAClB,aAAa,CAAC,SAAS,MAAM,EAAE,CAAC;CA2CpC"}
|