@agoric/internal 0.3.3-other-dev-8f8782b.0 → 0.3.3-other-dev-fbe72e7.0.fbe72e7
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 +7 -2
- package/exported.js +2 -0
- package/package.json +41 -19
- package/src/action-types.d.ts +51 -5
- package/src/action-types.d.ts.map +1 -1
- package/src/action-types.js +74 -15
- package/src/batched-deliver.d.ts +9 -6
- package/src/batched-deliver.d.ts.map +1 -1
- package/src/batched-deliver.js +9 -3
- package/src/callback.d.ts +24 -17
- package/src/callback.d.ts.map +1 -1
- package/src/callback.js +55 -61
- package/src/chain-storage-paths.d.ts +2 -3
- package/src/chain-storage-paths.d.ts.map +1 -1
- package/src/chain-storage-paths.js +2 -3
- package/src/chain-utils.d.ts +27 -0
- package/src/chain-utils.d.ts.map +1 -0
- package/src/chain-utils.js +62 -0
- package/src/cli-utils.d.ts +2 -0
- package/src/cli-utils.d.ts.map +1 -0
- package/src/cli-utils.js +21 -0
- package/src/config.d.ts +22 -12
- package/src/config.d.ts.map +1 -1
- package/src/config.js +23 -10
- package/src/debug.d.ts +1 -1
- package/src/errors.d.ts +2 -0
- package/src/errors.d.ts.map +1 -0
- package/src/errors.js +16 -0
- package/src/hex.d.ts +15 -0
- package/src/hex.d.ts.map +1 -0
- package/src/hex.js +105 -0
- package/src/index.d.ts +10 -1
- package/src/index.js +13 -2
- package/src/install-ses-debug.d.ts +2 -0
- package/src/install-ses-debug.d.ts.map +1 -0
- package/src/install-ses-debug.js +6 -0
- package/src/js-utils.d.ts +40 -0
- package/src/js-utils.d.ts.map +1 -0
- package/src/js-utils.js +237 -0
- package/src/lib-chainStorage.d.ts +59 -67
- package/src/lib-chainStorage.d.ts.map +1 -1
- package/src/lib-chainStorage.js +95 -92
- package/src/lib-nodejs/ava-unhandled-rejection.d.ts +13 -0
- package/src/lib-nodejs/ava-unhandled-rejection.d.ts.map +1 -0
- package/src/lib-nodejs/ava-unhandled-rejection.js +66 -0
- package/src/lib-nodejs/engine-gc.d.ts +3 -0
- package/src/lib-nodejs/engine-gc.d.ts.map +1 -0
- package/src/lib-nodejs/engine-gc.js +22 -0
- package/src/lib-nodejs/gc-and-finalize.d.ts +2 -0
- package/src/lib-nodejs/gc-and-finalize.d.ts.map +1 -0
- package/src/lib-nodejs/gc-and-finalize.js +91 -0
- package/src/lib-nodejs/spawnSubprocessWorker.d.ts +15 -0
- package/src/lib-nodejs/spawnSubprocessWorker.d.ts.map +1 -0
- package/src/lib-nodejs/spawnSubprocessWorker.js +89 -0
- package/src/lib-nodejs/waitUntilQuiescent.d.ts +2 -0
- package/src/lib-nodejs/waitUntilQuiescent.d.ts.map +1 -0
- package/src/lib-nodejs/waitUntilQuiescent.js +18 -0
- package/src/lib-nodejs/worker-protocol.d.ts +4 -0
- package/src/lib-nodejs/worker-protocol.d.ts.map +1 -0
- package/src/lib-nodejs/worker-protocol.js +54 -0
- package/src/magic-cookie-test-only.js +2 -2
- package/src/marshal.d.ts +33 -0
- package/src/marshal.d.ts.map +1 -0
- package/src/marshal.js +156 -0
- package/src/method-tools.d.ts +1 -0
- package/src/method-tools.d.ts.map +1 -1
- package/src/method-tools.js +33 -62
- package/src/metrics.d.ts +183 -0
- package/src/metrics.d.ts.map +1 -0
- package/src/metrics.js +476 -0
- package/src/module-utils.d.ts +2 -0
- package/src/module-utils.d.ts.map +1 -0
- package/src/module-utils.js +27 -0
- package/src/natural-sort.d.ts +2 -0
- package/src/natural-sort.d.ts.map +1 -0
- package/src/natural-sort.js +48 -0
- package/src/netstring.d.ts +24 -0
- package/src/netstring.d.ts.map +1 -0
- package/src/netstring.js +125 -0
- package/src/node/buffer-line-transform.d.ts +20 -16
- package/src/node/buffer-line-transform.d.ts.map +1 -1
- package/src/node/buffer-line-transform.js +12 -9
- package/src/node/createBundles.d.ts.map +1 -1
- package/src/node/createBundles.js +12 -3
- package/src/node/fs-stream.d.ts +1 -1
- package/src/node/fs-stream.d.ts.map +1 -1
- package/src/node/fs-stream.js +48 -37
- package/src/node/shutdown.d.ts.map +1 -1
- package/src/node/shutdown.js +0 -1
- package/src/priority-senders.d.ts +2 -1
- package/src/priority-senders.d.ts.map +1 -1
- package/src/priority-senders.js +10 -4
- package/src/queue.d.ts +1 -1
- package/src/queue.d.ts.map +1 -1
- package/src/queue.js +7 -8
- package/src/scratch.d.ts +1 -1
- package/src/scratch.d.ts.map +1 -1
- package/src/ses-utils.d.ts +68 -0
- package/src/ses-utils.d.ts.map +1 -0
- package/src/ses-utils.js +422 -0
- package/src/storage-test-utils.d.ts +49 -84
- package/src/storage-test-utils.d.ts.map +1 -1
- package/src/storage-test-utils.js +234 -116
- package/src/tagged.d.ts +152 -0
- package/src/testing-utils.d.ts +2 -0
- package/src/testing-utils.d.ts.map +1 -1
- package/src/testing-utils.js +44 -5
- package/src/tmpDir.d.ts +2 -0
- package/src/tmpDir.d.ts.map +1 -0
- package/src/tmpDir.js +17 -0
- package/src/tokens.d.ts +34 -0
- package/src/tokens.d.ts.map +1 -0
- package/src/tokens.js +35 -0
- package/src/typeCheck.d.ts +9 -0
- package/src/typeCheck.d.ts.map +1 -0
- package/src/typeCheck.js +23 -0
- package/src/typeGuards.d.ts +17 -0
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +20 -0
- package/src/types-index.d.ts +1 -0
- package/src/types-index.js +2 -0
- package/src/types.d.ts +83 -18
- package/src/types.d.ts.map +1 -0
- package/src/types.ts +129 -0
- package/src/upgrade-api.d.ts +14 -4
- package/src/upgrade-api.d.ts.map +1 -1
- package/src/upgrade-api.js +50 -18
- package/CHANGELOG.md +0 -106
- package/src/utils.d.ts +0 -67
- package/src/utils.d.ts.map +0 -1
- package/src/utils.js +0 -451
package/src/hex.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {object} HexCodec
|
|
3
|
+
* @property {(buf: Uint8Array) => string} encodeHex
|
|
4
|
+
* @property {(hex: string) => Uint8Array} decodeHex
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/** @type {string[]} */
|
|
8
|
+
const encodings = Array.from({ length: 256 }, (_, b) =>
|
|
9
|
+
// Write the hex representation of the byte.
|
|
10
|
+
b.toString(16).padStart(2, '0'),
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Create map entries for all four permutations of lowercase and uppercase
|
|
15
|
+
* transformations of the two hex digits per byte. The map is keyed by the hex
|
|
16
|
+
* string and the value is the byte value. This allows for fast lookups when
|
|
17
|
+
* decoding hex strings.
|
|
18
|
+
*
|
|
19
|
+
* @type {Map<string, number>}
|
|
20
|
+
*/
|
|
21
|
+
const decodings = new Map(
|
|
22
|
+
encodings.flatMap((hexdigits, b) => {
|
|
23
|
+
const lo = hexdigits.toLowerCase();
|
|
24
|
+
const UP = hexdigits.toUpperCase();
|
|
25
|
+
return [
|
|
26
|
+
[lo, b],
|
|
27
|
+
[`${lo[0]}${UP[1]}`, b],
|
|
28
|
+
[`${UP[0]}${lo[1]}`, b],
|
|
29
|
+
[UP, b],
|
|
30
|
+
];
|
|
31
|
+
}),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Create a hex codec that is portable across standard JS environments.
|
|
36
|
+
*
|
|
37
|
+
* @returns {HexCodec}
|
|
38
|
+
*/
|
|
39
|
+
export const makePortableHexCodec = () => {
|
|
40
|
+
/** @type {HexCodec} */
|
|
41
|
+
const portableHexCodec = {
|
|
42
|
+
encodeHex: buf => Array.from(buf, b => encodings[b]).join(''),
|
|
43
|
+
decodeHex: hex => {
|
|
44
|
+
const inputLen = hex.length;
|
|
45
|
+
if (inputLen % 2 !== 0) {
|
|
46
|
+
throw new Error(`Invalid hex string: ${hex}`);
|
|
47
|
+
}
|
|
48
|
+
const buf = new Uint8Array(inputLen / 2);
|
|
49
|
+
for (let i = 0; i < inputLen; i += 2) {
|
|
50
|
+
const b = decodings.get(hex.slice(i, i + 2));
|
|
51
|
+
if (b === undefined) {
|
|
52
|
+
throw new Error(`Invalid hex string: ${hex}`);
|
|
53
|
+
}
|
|
54
|
+
// eslint-disable-next-line no-bitwise
|
|
55
|
+
buf[i >> 1] = b;
|
|
56
|
+
}
|
|
57
|
+
return buf;
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return portableHexCodec;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @typedef {Pick<BufferConstructor, 'from' | 'isBuffer'> & {
|
|
66
|
+
* prototype: Pick<Buffer, 'toString'> & Uint8Array;
|
|
67
|
+
* }} BufferishConstructor
|
|
68
|
+
* is the portion of the Node.js Buffer API we need for hex conversion.
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Create a hex codec using parts of the Node.js Buffer API.
|
|
73
|
+
*
|
|
74
|
+
* @param {BufferishConstructor} Bufferish the object that implements the
|
|
75
|
+
* necessary pieces of Buffer
|
|
76
|
+
* @returns {HexCodec}
|
|
77
|
+
*/
|
|
78
|
+
export const makeBufferishHexCodec = Bufferish => {
|
|
79
|
+
/** @type {HexCodec} */
|
|
80
|
+
const attenuatedBufferHexCodec = {
|
|
81
|
+
encodeHex: buf =>
|
|
82
|
+
(Bufferish.isBuffer?.(buf) ? buf : Bufferish.from(buf)).toString('hex'),
|
|
83
|
+
decodeHex: hex => {
|
|
84
|
+
const buf = Bufferish.from(hex, 'hex');
|
|
85
|
+
|
|
86
|
+
// Coerce to Uint8Array to avoid leaking the abstraction.
|
|
87
|
+
const u8a = new Uint8Array(
|
|
88
|
+
buf.buffer,
|
|
89
|
+
buf.byteOffset,
|
|
90
|
+
buf.byteLength / Uint8Array.BYTES_PER_ELEMENT,
|
|
91
|
+
);
|
|
92
|
+
return u8a;
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
return attenuatedBufferHexCodec;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Export a hex codec that can work with standard JS engines, but takes
|
|
100
|
+
* advantage of optimizations on some platforms (like Node.js's Buffer API).
|
|
101
|
+
*/
|
|
102
|
+
export const { encodeHex, decodeHex } =
|
|
103
|
+
typeof Buffer === 'undefined'
|
|
104
|
+
? makePortableHexCodec()
|
|
105
|
+
: makeBufferishHexCodec(Buffer);
|
package/src/index.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
export * from "./cli-utils.js";
|
|
1
2
|
export * from "./config.js";
|
|
2
3
|
export * from "./debug.js";
|
|
3
|
-
export * from "./
|
|
4
|
+
export * from "./errors.js";
|
|
5
|
+
export * from "./js-utils.js";
|
|
4
6
|
export * from "./method-tools.js";
|
|
7
|
+
export * from "./metrics.js";
|
|
8
|
+
export * from "./natural-sort.js";
|
|
9
|
+
export * from "./ses-utils.js";
|
|
10
|
+
export * from "./tmpDir.js";
|
|
11
|
+
export * from "./typeCheck.js";
|
|
5
12
|
export * from "./typeGuards.js";
|
|
13
|
+
export * from "./types-index.js";
|
|
14
|
+
export { pureDataMarshaller } from "./marshal.js";
|
|
6
15
|
//# sourceMappingURL=index.d.ts.map
|
package/src/index.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
|
|
3
|
-
/// <reference types="ses"/>
|
|
3
|
+
/// <reference types="ses" />
|
|
4
4
|
|
|
5
|
+
export * from './cli-utils.js';
|
|
5
6
|
export * from './config.js';
|
|
6
7
|
export * from './debug.js';
|
|
7
|
-
export * from './
|
|
8
|
+
export * from './errors.js';
|
|
9
|
+
export * from './js-utils.js';
|
|
10
|
+
export { pureDataMarshaller } from './marshal.js';
|
|
8
11
|
export * from './method-tools.js';
|
|
12
|
+
export * from './metrics.js';
|
|
13
|
+
export * from './natural-sort.js';
|
|
14
|
+
export * from './ses-utils.js';
|
|
15
|
+
export * from './tmpDir.js';
|
|
16
|
+
export * from './typeCheck.js';
|
|
9
17
|
export * from './typeGuards.js';
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line import/export -- just types
|
|
20
|
+
export * from './types-index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-ses-debug.d.ts","sourceRoot":"","sources":["install-ses-debug.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This is like `@endo/init` but sacrificing safety to optimize
|
|
2
|
+
// for debugging and testing. The difference is only the lockdown options.
|
|
3
|
+
// The setting below are *unsafe* and should not be used in contact with
|
|
4
|
+
// genuinely malicious code.
|
|
5
|
+
|
|
6
|
+
import '@endo/init/debug.js';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** For overriding TypeScript inferring the type of `true` as boolean. */
|
|
2
|
+
export const TRUE: true;
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {<O extends Record<string, unknown>>(
|
|
5
|
+
* obj: O,
|
|
6
|
+
* ) => { [K in keyof O]: K extends string ? [K, O[K]] : never }[keyof O][]} TypedEntries
|
|
7
|
+
*/
|
|
8
|
+
export const typedEntries: TypedEntries;
|
|
9
|
+
/**
|
|
10
|
+
* @typedef {<
|
|
11
|
+
* const Entries extends ReadonlyArray<readonly [PropertyKey, unknown]>,
|
|
12
|
+
* >(
|
|
13
|
+
* entries: Entries,
|
|
14
|
+
* ) => { [Entry in Entries[number] as Entry[0]]: Entry[1] }} FromTypedEntries
|
|
15
|
+
*/
|
|
16
|
+
export const fromTypedEntries: FromTypedEntries;
|
|
17
|
+
/**
|
|
18
|
+
* @typedef {<A extends unknown[], V>(
|
|
19
|
+
* arr: A,
|
|
20
|
+
* mapper: <K extends number>(el: A[K], idx: K, arr: A) => V,
|
|
21
|
+
* ) => V[]} TypedMap
|
|
22
|
+
*/
|
|
23
|
+
export const typedMap: TypedMap;
|
|
24
|
+
export const logLevels: readonly ["debug", "log", "info", "warn", "error"];
|
|
25
|
+
export function deepCopyJsonable<T>(value: T): T;
|
|
26
|
+
export function deepMapObject<O extends Record<string, unknown>, M>(obj: O, mapper: <T extends Record<string, unknown>, K extends string & keyof T>(value: T[K], name: K, record: T) => T[K] | M): O | { [K_1 in keyof O]: K_1 extends string ? O[K_1] | M : never; };
|
|
27
|
+
export function defineName<F extends Function>(name: string, fn: F): F;
|
|
28
|
+
export function objectMapMutable<O extends Record<string, unknown>, M>(obj: O, mapper: <K extends keyof O>(value: O[K], key: K) => M): { [K in keyof O]: K extends string ? M : never; };
|
|
29
|
+
export function provideLazyMap<K, V>(map: K extends WeakKey ? WeakMap<K, V> : Map<K, V>, key: K, makeValue: (key: K) => V): V;
|
|
30
|
+
export function makeMeasureSeconds(currentTimeMillisec: () => number): <T>(fn: () => Promise<T>) => Promise<{
|
|
31
|
+
result: T;
|
|
32
|
+
duration: number;
|
|
33
|
+
}>;
|
|
34
|
+
export function unprefixedProperties<P extends string, K extends string, V>(obj: Record<`${P}${K}`, V>, prefix: P): Record<K, V>;
|
|
35
|
+
export type TypedEntries = <O extends Record<string, unknown>>(obj: O) => { [K in keyof O]: K extends string ? [K, O[K]] : never; }[keyof O][];
|
|
36
|
+
export type FromTypedEntries = <const Entries extends ReadonlyArray<readonly [PropertyKey, unknown]>>(entries: Entries) => { [Entry in Entries[number] as Entry[0]]: Entry[1]; };
|
|
37
|
+
export type TypedMap = <A extends unknown[], V>(arr: A, mapper: <K extends number>(el: A[K], idx: K, arr: A) => V) => V[];
|
|
38
|
+
export type LogLevel = (typeof logLevels)[keyof readonly ["debug", "log", "info", "warn", "error"] & number];
|
|
39
|
+
export type LimitedConsole = Pick<Console, LogLevel>;
|
|
40
|
+
//# sourceMappingURL=js-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js-utils.d.ts","sourceRoot":"","sources":["js-utils.js"],"names":[],"mappings":"AASA,yEAAyE;AACzE,mBAA0C,IAAI,CAAE;AAEhD;;;;GAIG;AACH,2BAAuC,YAAY,CAAsB;AAEzE;;;;;;GAMG;AACH,+BAA2C,gBAAgB,CA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ible with but not
|
|
5
|
+
* dependent upon a hardened environment.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const { defineProperty } = Object;
|
|
9
|
+
|
|
10
|
+
/** For overriding TypeScript inferring the type of `true` as boolean. */
|
|
11
|
+
export const TRUE = /** @type {const} */ (true);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @typedef {<O extends Record<string, unknown>>(
|
|
15
|
+
* obj: O,
|
|
16
|
+
* ) => { [K in keyof O]: K extends string ? [K, O[K]] : never }[keyof O][]} TypedEntries
|
|
17
|
+
*/
|
|
18
|
+
export const typedEntries = /** @type {TypedEntries} */ (Object.entries);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @typedef {<
|
|
22
|
+
* const Entries extends ReadonlyArray<readonly [PropertyKey, unknown]>,
|
|
23
|
+
* >(
|
|
24
|
+
* entries: Entries,
|
|
25
|
+
* ) => { [Entry in Entries[number] as Entry[0]]: Entry[1] }} FromTypedEntries
|
|
26
|
+
*/
|
|
27
|
+
export const fromTypedEntries = /** @type {FromTypedEntries} */ (
|
|
28
|
+
Object.fromEntries
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @typedef {<A extends unknown[], V>(
|
|
33
|
+
* arr: A,
|
|
34
|
+
* mapper: <K extends number>(el: A[K], idx: K, arr: A) => V,
|
|
35
|
+
* ) => V[]} TypedMap
|
|
36
|
+
*/
|
|
37
|
+
export const typedMap = /** @type {TypedMap} */ (
|
|
38
|
+
Function.prototype.call.bind(Array.prototype.map)
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export const logLevels = /** @type {const} */ ([
|
|
42
|
+
'debug',
|
|
43
|
+
'log',
|
|
44
|
+
'info',
|
|
45
|
+
'warn',
|
|
46
|
+
'error',
|
|
47
|
+
]);
|
|
48
|
+
Object.freeze(logLevels);
|
|
49
|
+
|
|
50
|
+
/** @typedef {(typeof logLevels)[keyof logLevels & number]} LogLevel */
|
|
51
|
+
|
|
52
|
+
/** @typedef {Pick<Console, LogLevel>} LimitedConsole */
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Deep-copy a value by round-tripping it through JSON (which drops
|
|
56
|
+
* function/symbol/undefined values and properties that are non-enumerable
|
|
57
|
+
* and/or symbol-keyed, and rejects bigint values).
|
|
58
|
+
*
|
|
59
|
+
* @template T
|
|
60
|
+
* @param {T} value
|
|
61
|
+
* @returns {T}
|
|
62
|
+
*/
|
|
63
|
+
export const deepCopyJsonable = value => JSON.parse(JSON.stringify(value));
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @template {Record<PropertyKey, unknown>} O
|
|
67
|
+
* @template {string & keyof O} K
|
|
68
|
+
* @template M
|
|
69
|
+
* @param {O[K]} value
|
|
70
|
+
* @param {K | undefined} name
|
|
71
|
+
* @param {O | undefined} container
|
|
72
|
+
* @param {(value: O[K], name: string, record: O) => O[K] | M} mapper
|
|
73
|
+
* @returns {O[K] | M | { [K2 in keyof O[K]]: O[K][K2] | M }}
|
|
74
|
+
*/
|
|
75
|
+
const deepMapObjectInternal = (value, name, container, mapper) => {
|
|
76
|
+
if (container && typeof name === 'string') {
|
|
77
|
+
const mapped = mapper(value, name, container);
|
|
78
|
+
if (mapped !== value) {
|
|
79
|
+
return mapped;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (typeof value !== 'object' || !value) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
let wasMapped = false;
|
|
88
|
+
const valueObj = /** @type {Record<string, unknown>} */ (value);
|
|
89
|
+
/**
|
|
90
|
+
* @type {<T extends typeof value, K2 extends string & keyof T>(
|
|
91
|
+
* entry: [K2, T[K2]],
|
|
92
|
+
* ) => [K2, T[K2] | M]}
|
|
93
|
+
*/
|
|
94
|
+
const mapEntry = ([innerName, innerValue]) => {
|
|
95
|
+
const mappedInnerValue = deepMapObjectInternal(
|
|
96
|
+
innerValue,
|
|
97
|
+
innerName,
|
|
98
|
+
valueObj,
|
|
99
|
+
mapper,
|
|
100
|
+
);
|
|
101
|
+
wasMapped ||= mappedInnerValue !== innerValue;
|
|
102
|
+
return [innerName, /** @type {any} */ (mappedInnerValue)];
|
|
103
|
+
};
|
|
104
|
+
const mappedEntries = typedEntries(valueObj).map(mapEntry);
|
|
105
|
+
|
|
106
|
+
if (!wasMapped) {
|
|
107
|
+
return value;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const mappedObj = fromTypedEntries(mappedEntries);
|
|
111
|
+
return /** @type {any} */ (mappedObj);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Recursively traverses a record object structure, calling a mapper function
|
|
116
|
+
* for each enumerable string-keyed property and returning a record composed of
|
|
117
|
+
* the results. If none of the values are changed, the original object is
|
|
118
|
+
* returned, maintaining its identity.
|
|
119
|
+
*
|
|
120
|
+
* When the property value is an object, it is sent to the mapper like any other
|
|
121
|
+
* value, and then recursively traversed unless replaced with a distinct value.
|
|
122
|
+
*
|
|
123
|
+
* @template {Record<string, unknown>} O
|
|
124
|
+
* @template M
|
|
125
|
+
* @param {O} obj
|
|
126
|
+
* @param {<T extends Record<string, unknown>, K extends string & keyof T>(
|
|
127
|
+
* value: T[K],
|
|
128
|
+
* name: K,
|
|
129
|
+
* record: T,
|
|
130
|
+
* ) => T[K] | M} mapper
|
|
131
|
+
* @returns {O | { [K in keyof O]: K extends string ? O[K] | M : never }}
|
|
132
|
+
*/
|
|
133
|
+
export const deepMapObject = (obj, mapper) =>
|
|
134
|
+
/** @type {any} */ (deepMapObjectInternal(obj, undefined, undefined, mapper));
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Explicitly set a function's name, supporting use of arrow functions for which
|
|
138
|
+
* source text doesn't include a name and no initial name is set by
|
|
139
|
+
* NamedEvaluation
|
|
140
|
+
* https://tc39.es/ecma262/multipage/syntax-directed-operations.html#sec-runtime-semantics-namedevaluation
|
|
141
|
+
*
|
|
142
|
+
* `name` is the first parameter for better readability at call sites (e.g.,
|
|
143
|
+
* `return defineName('foo', () => { ... })`).
|
|
144
|
+
*
|
|
145
|
+
* @template {Function} F
|
|
146
|
+
* @param {string} name
|
|
147
|
+
* @param {F} fn
|
|
148
|
+
* @returns {F}
|
|
149
|
+
*/
|
|
150
|
+
export const defineName = (name, fn) =>
|
|
151
|
+
defineProperty(fn, 'name', { value: name });
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* By analogy with how `Array.prototype.map` will map the elements of an array
|
|
155
|
+
* to transformed elements of an array of the same shape, `objectMapMutable`
|
|
156
|
+
* will do likewise for the enumerable string-keyed properties of an object.
|
|
157
|
+
*
|
|
158
|
+
* Unlike endo's `objectMap`, this function returns a non-hardened object.
|
|
159
|
+
*
|
|
160
|
+
* @template {Record<string, unknown>} O
|
|
161
|
+
* @template M
|
|
162
|
+
* @param {O} obj
|
|
163
|
+
* @param {<K extends keyof O>(value: O[K], key: K) => M} mapper
|
|
164
|
+
* @returns {{ [K in keyof O]: K extends string ? M : never }}
|
|
165
|
+
*/
|
|
166
|
+
export const objectMapMutable = (obj, mapper) => {
|
|
167
|
+
const oldEntries = typedEntries(obj);
|
|
168
|
+
/** @type {<K extends keyof O>(entry: [K, O[K]]) => [K, M]} */
|
|
169
|
+
const mapEntry = ([k, v]) => [k, mapper(v, k)];
|
|
170
|
+
const newEntries = typedMap(oldEntries, mapEntry);
|
|
171
|
+
const newObj = fromTypedEntries(newEntries);
|
|
172
|
+
return /** @type {any} */ (newObj);
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Return the value from `map` associated with `key`. If there is not yet such a
|
|
177
|
+
* value, get one from `makeValue(key)` and update `map` before returning the
|
|
178
|
+
* new value.
|
|
179
|
+
*
|
|
180
|
+
* @template K
|
|
181
|
+
* @template V
|
|
182
|
+
* @param {K extends WeakKey ? WeakMap<K, V> : Map<K, V>} map
|
|
183
|
+
* @param {K} key
|
|
184
|
+
* @param {(key: K) => V} makeValue
|
|
185
|
+
* @returns {V}
|
|
186
|
+
*/
|
|
187
|
+
export const provideLazyMap = (map, key, makeValue) => {
|
|
188
|
+
const found = map.get(key);
|
|
189
|
+
if (found !== undefined || map.has(key)) {
|
|
190
|
+
return /** @type {V} */ (found);
|
|
191
|
+
}
|
|
192
|
+
const value = makeValue(key);
|
|
193
|
+
map.set(key, value);
|
|
194
|
+
return value;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Returns a function that uses a millisecond-based current-time capability
|
|
199
|
+
* (such as `performance.now`) to measure execution duration of an async
|
|
200
|
+
* function and report the result in seconds to match our telemetry standard.
|
|
201
|
+
*
|
|
202
|
+
* @param {() => number} currentTimeMillisec
|
|
203
|
+
*/
|
|
204
|
+
export const makeMeasureSeconds = currentTimeMillisec => {
|
|
205
|
+
/**
|
|
206
|
+
* @template T
|
|
207
|
+
* @param {() => Promise<T>} fn
|
|
208
|
+
* @returns {Promise<{ result: T; duration: number }>}
|
|
209
|
+
*/
|
|
210
|
+
const measureSeconds = async fn => {
|
|
211
|
+
const t0 = currentTimeMillisec();
|
|
212
|
+
const result = await fn();
|
|
213
|
+
const durationMillisec = currentTimeMillisec() - t0;
|
|
214
|
+
return { result, duration: durationMillisec / 1000 };
|
|
215
|
+
};
|
|
216
|
+
return measureSeconds;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Find all of an object's properties whose name starts with a prefix, and
|
|
221
|
+
* return a new object consisting of those properties without that prefix.
|
|
222
|
+
* Useful for filtering environment variables relevant to a particular purpose.
|
|
223
|
+
*
|
|
224
|
+
* @template {string} P
|
|
225
|
+
* @template {string} K
|
|
226
|
+
* @template V
|
|
227
|
+
* @param {Record<`${P}${K}`, V>} obj
|
|
228
|
+
* @param {P} prefix
|
|
229
|
+
*/
|
|
230
|
+
export const unprefixedProperties = (obj, prefix) =>
|
|
231
|
+
/** @type {Record<K, V>} */ (
|
|
232
|
+
fromTypedEntries(
|
|
233
|
+
typedEntries(obj)
|
|
234
|
+
.filter(([key]) => key.startsWith(prefix))
|
|
235
|
+
.map(([key, value]) => [key.slice(prefix.length), value]),
|
|
236
|
+
)
|
|
237
|
+
);
|
|
@@ -1,42 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Create a heap-based root storage node for a given backing function and root
|
|
2
|
+
* Create a heap-based root storage node for a given backing function and root
|
|
3
|
+
* path.
|
|
3
4
|
*
|
|
4
5
|
* @param {(message: StorageMessage) => any} handleStorageMessage a function for
|
|
5
|
-
*
|
|
6
|
-
*
|
|
6
|
+
* sending a storageMessage object to the storage implementation (cf.
|
|
7
|
+
* golang/cosmos/x/vstorage/vstorage.go)
|
|
7
8
|
* @param {string} rootPath
|
|
8
9
|
* @param {object} [rootOptions]
|
|
9
10
|
* @param {boolean} [rootOptions.sequence] employ a wrapping structure that
|
|
10
|
-
*
|
|
11
|
-
*
|
|
11
|
+
* preserves each value set within a single block, and default child nodes to
|
|
12
|
+
* do the same
|
|
12
13
|
*/
|
|
13
14
|
export function makeChainStorageRoot(handleStorageMessage: (message: StorageMessage) => any, rootPath: string, rootOptions?: {
|
|
14
15
|
sequence?: boolean | undefined;
|
|
15
|
-
}
|
|
16
|
+
}): import("@endo/exo").Guarded<{
|
|
16
17
|
getPath(): string;
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated use getPath
|
|
19
|
-
* @type {() => Promise<VStorageKey>}
|
|
20
|
-
*/
|
|
21
18
|
getStoreKey(): Promise<VStorageKey>;
|
|
22
|
-
/** @type {(name: string, childNodeOptions?: {sequence?: boolean}) => StorageNode} */
|
|
23
19
|
makeChildNode(name: string, childNodeOptions?: {
|
|
24
|
-
sequence?: boolean
|
|
25
|
-
}
|
|
26
|
-
/** @type {(value: string) => Promise<void>} */
|
|
27
|
-
setValue(value: string): Promise<void>;
|
|
28
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
29
|
-
getPath(): string;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated use getPath
|
|
32
|
-
* @type {() => Promise<VStorageKey>}
|
|
33
|
-
*/
|
|
34
|
-
getStoreKey(): Promise<VStorageKey>;
|
|
35
|
-
/** @type {(name: string, childNodeOptions?: {sequence?: boolean}) => StorageNode} */
|
|
36
|
-
makeChildNode(name: string, childNodeOptions?: {
|
|
37
|
-
sequence?: boolean | undefined;
|
|
38
|
-
} | undefined): StorageNode;
|
|
39
|
-
/** @type {(value: string) => Promise<void>} */
|
|
20
|
+
sequence?: boolean;
|
|
21
|
+
}): StorageNode;
|
|
40
22
|
setValue(value: string): Promise<void>;
|
|
41
23
|
}>;
|
|
42
24
|
/**
|
|
@@ -44,48 +26,51 @@ export function makeChainStorageRoot(handleStorageMessage: (message: StorageMess
|
|
|
44
26
|
* falling back to an inert object with the correct interface (but incomplete
|
|
45
27
|
* behavior) when that is unavailable.
|
|
46
28
|
*
|
|
47
|
-
* @param {
|
|
29
|
+
* @param {ERef<StorageNode?>} storageNodeRef
|
|
48
30
|
* @param {string} childName
|
|
49
31
|
* @returns {Promise<StorageNode>}
|
|
50
32
|
*/
|
|
51
|
-
export function makeStorageNodeChild(storageNodeRef:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
33
|
+
export function makeStorageNodeChild(storageNodeRef: ERef<StorageNode | null>, childName: string): Promise<StorageNode>;
|
|
34
|
+
/**
|
|
35
|
+
* @import {ERef} from '@endo/far';
|
|
36
|
+
* @import {PassableCap} from '@endo/marshal';
|
|
37
|
+
* @import {TypedPattern} from './types.js';
|
|
38
|
+
*/
|
|
39
|
+
/** @typedef {ReturnType<typeof import('@endo/marshal').makeMarshal>} Marshaller */
|
|
40
|
+
/** @typedef {Pick<Marshaller, 'fromCapData'>} Unserializer */
|
|
41
|
+
/**
|
|
42
|
+
* Defined by vstorageStoreKey in vstorage.go
|
|
43
|
+
*
|
|
44
|
+
* @typedef VStorageKey
|
|
45
|
+
* @property {string} storeName
|
|
46
|
+
* @property {string} storeSubkey
|
|
47
|
+
* @property {string} dataPrefixBytes
|
|
48
|
+
* @property {string} [noDataValue]
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* @template [T=unknown]
|
|
52
|
+
* @typedef StreamCell
|
|
53
|
+
* @property {string} blockHeight decimal representation of a natural number
|
|
54
|
+
* @property {T[]} values
|
|
55
|
+
*/
|
|
56
|
+
/** @type {TypedPattern<StreamCell>} */
|
|
57
|
+
export const StreamCellShape: TypedPattern<StreamCell>;
|
|
58
|
+
export function isStreamCell(cell: any): cell is StreamCell;
|
|
55
59
|
/** @type {(name: string) => void} */
|
|
56
60
|
export const assertPathSegment: (name: string) => void;
|
|
57
|
-
export function prepareChainStorageNode(zone: import(
|
|
61
|
+
export function prepareChainStorageNode(zone: import("@agoric/base-zone").Zone): (messenger: import("./types.js").Callback<(message: StorageMessage) => any>, path: string, args_2?: {
|
|
58
62
|
sequence?: boolean | undefined;
|
|
59
|
-
} | undefined) => {
|
|
63
|
+
} | undefined) => import("@endo/exo").Guarded<{
|
|
60
64
|
getPath(): string;
|
|
61
|
-
/**
|
|
62
|
-
* @deprecated use getPath
|
|
63
|
-
* @type {() => Promise<VStorageKey>}
|
|
64
|
-
*/
|
|
65
65
|
getStoreKey(): Promise<VStorageKey>;
|
|
66
|
-
/** @type {(name: string, childNodeOptions?: {sequence?: boolean}) => StorageNode} */
|
|
67
66
|
makeChildNode(name: string, childNodeOptions?: {
|
|
68
|
-
sequence?: boolean
|
|
69
|
-
}
|
|
70
|
-
/** @type {(value: string) => Promise<void>} */
|
|
71
|
-
setValue(value: string): Promise<void>;
|
|
72
|
-
} & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
73
|
-
getPath(): string;
|
|
74
|
-
/**
|
|
75
|
-
* @deprecated use getPath
|
|
76
|
-
* @type {() => Promise<VStorageKey>}
|
|
77
|
-
*/
|
|
78
|
-
getStoreKey(): Promise<VStorageKey>;
|
|
79
|
-
/** @type {(name: string, childNodeOptions?: {sequence?: boolean}) => StorageNode} */
|
|
80
|
-
makeChildNode(name: string, childNodeOptions?: {
|
|
81
|
-
sequence?: boolean | undefined;
|
|
82
|
-
} | undefined): StorageNode;
|
|
83
|
-
/** @type {(value: string) => Promise<void>} */
|
|
67
|
+
sequence?: boolean;
|
|
68
|
+
}): StorageNode;
|
|
84
69
|
setValue(value: string): Promise<void>;
|
|
85
70
|
}>;
|
|
86
|
-
export function makeSerializeToStorage(storageNode:
|
|
87
|
-
export type Marshaller = ReturnType<typeof import(
|
|
88
|
-
export type Unserializer = Pick<Marshaller,
|
|
71
|
+
export function makeSerializeToStorage(storageNode: ERef<StorageNode>, marshaller: ERef<Marshaller>): (value: PassableCap) => Promise<void>;
|
|
72
|
+
export type Marshaller = ReturnType<typeof import("@endo/marshal").makeMarshal>;
|
|
73
|
+
export type Unserializer = Pick<Marshaller, "fromCapData">;
|
|
89
74
|
/**
|
|
90
75
|
* Defined by vstorageStoreKey in vstorage.go
|
|
91
76
|
*/
|
|
@@ -105,7 +90,8 @@ export type StreamCell<T = unknown> = {
|
|
|
105
90
|
/**
|
|
106
91
|
* This represents a node in an IAVL tree.
|
|
107
92
|
*
|
|
108
|
-
* The active implementation is x/vstorage, an Agoric extension of the Cosmos
|
|
93
|
+
* The active implementation is x/vstorage, an Agoric extension of the Cosmos
|
|
94
|
+
* SDK.
|
|
109
95
|
*
|
|
110
96
|
* Vstorage is a hierarchical externally-reachable storage structure that
|
|
111
97
|
* identifies children by restricted ASCII name and is associated with arbitrary
|
|
@@ -117,7 +103,8 @@ export type StorageNode = {
|
|
|
117
103
|
*/
|
|
118
104
|
setValue: (data: string) => Promise<void>;
|
|
119
105
|
/**
|
|
120
|
-
* the chain storage path at which the node was
|
|
106
|
+
* the chain storage path at which the node was
|
|
107
|
+
* constructed
|
|
121
108
|
*/
|
|
122
109
|
getPath: () => string;
|
|
123
110
|
/**
|
|
@@ -130,26 +117,28 @@ export type StorageNode = {
|
|
|
130
117
|
};
|
|
131
118
|
export type StoredFacet = {
|
|
132
119
|
/**
|
|
133
|
-
* the chain storage path at which the
|
|
120
|
+
* the chain storage path at which the
|
|
121
|
+
* node was constructed
|
|
134
122
|
*/
|
|
135
123
|
getPath: () => Promise<string>;
|
|
136
124
|
/**
|
|
137
125
|
* DEPRECATED use getPath
|
|
138
126
|
*/
|
|
139
|
-
getStoreKey: StorageNode[
|
|
127
|
+
getStoreKey: StorageNode["getStoreKey"];
|
|
140
128
|
/**
|
|
141
|
-
* get the unserializer for the
|
|
129
|
+
* get the unserializer for the
|
|
130
|
+
* stored data
|
|
142
131
|
*/
|
|
143
132
|
getUnserializer: () => Unserializer;
|
|
144
133
|
};
|
|
145
134
|
/**
|
|
146
135
|
* Must match the switch in vstorage.go using `vstorageMessage` type
|
|
147
136
|
*/
|
|
148
|
-
export type StorageGetByPathMessageMethod =
|
|
137
|
+
export type StorageGetByPathMessageMethod = "get" | "getStoreKey" | "has" | "children" | "entries" | "values" | "size";
|
|
149
138
|
/**
|
|
150
139
|
* Must match the switch in vstorage.go using `vstorageMessage` type
|
|
151
140
|
*/
|
|
152
|
-
export type StorageUpdateEntriesMessageMethod =
|
|
141
|
+
export type StorageUpdateEntriesMessageMethod = "set" | "setWithoutNotify" | "append";
|
|
153
142
|
/**
|
|
154
143
|
* Must match the switch in vstorage.go using `vstorageMessage` type
|
|
155
144
|
*/
|
|
@@ -165,15 +154,18 @@ export type StorageEntry = [path: string, value?: string | null];
|
|
|
165
154
|
/**
|
|
166
155
|
* Must match the switch in vstorage.go using `vstorageMessage` type
|
|
167
156
|
*/
|
|
168
|
-
export type StorageUpdateEntriesMessageArgs = [
|
|
157
|
+
export type StorageUpdateEntriesMessageArgs = StorageEntry[];
|
|
169
158
|
/**
|
|
170
159
|
* Must match the switch in vstorage.go using `vstorageMessage` type
|
|
171
160
|
*/
|
|
172
161
|
export type StorageMessage = {
|
|
173
162
|
method: StorageGetByPathMessageMethod;
|
|
174
|
-
args:
|
|
163
|
+
args: StorageGetByPathMessageArgs;
|
|
175
164
|
} | {
|
|
176
165
|
method: StorageUpdateEntriesMessageMethod;
|
|
177
166
|
args: StorageUpdateEntriesMessageArgs;
|
|
178
167
|
};
|
|
168
|
+
import type { ERef } from '@endo/far';
|
|
169
|
+
import type { TypedPattern } from './types.js';
|
|
170
|
+
import type { PassableCap } from '@endo/marshal';
|
|
179
171
|
//# sourceMappingURL=lib-chainStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib-chainStorage.d.ts","sourceRoot":"","sources":["lib-chainStorage.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lib-chainStorage.d.ts","sourceRoot":"","sources":["lib-chainStorage.js"],"names":[],"mappings":"AAiPA;;;;;;;;;;;;GAYG;AACH,2DATW,CAAC,OAAO,EAAE,cAAc,KAAK,GAAG,YAGhC,MAAM,gBAEd;IAA8B,QAAQ;CAGxC;;mBAnEqB,OAAO,CAAC,WAAW,CAAC;wBAWzB,MAAM,qBACO;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GACtC,WAAW;oBAYA,MAAM,GAAK,OAAO,CAAC,IAAI,CAAC;GAqDhD;AAcD;;;;;;;;GAQG;AACH,qDAJW,KAAK,WAAW,OAAC,CAAC,aAClB,MAAM,GACJ,OAAO,CAAC,WAAW,CAAC,CAMhC;AA3RD;;;;GAIG;AAEH,mFAAmF;AACnF,8DAA8D;AAE9D;;;;;;;;GAQG;AAEH;;;;;GAKG;AAEH,uCAAuC;AACvC,8BADW,aAAa,UAAU,CAAC,CAIhC;AAwCI,mCAHI,GAAG,GACD,IAAI,IAAI,UAAU,CAOa;AAmB5C,qCAAqC;AACrC,gCADW,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAI/B;AAyCK,8CAFI,OAAO,mBAAmB,EAAE,IAAI,uDAwBxB,cAAc,KAAK,GAAG;;;;mBAiBnB,OAAO,CAAC,WAAW,CAAC;wBAWzB,MAAM,qBACO;QAAE,QAAQ,CAAC,EAAE,OA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