@agoric/internal 0.2.2-dev-f447e3a.0 → 0.2.2-dev-7989b88.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/internal",
3
- "version": "0.2.2-dev-f447e3a.0+f447e3a",
3
+ "version": "0.2.2-dev-7989b88.0+7989b88",
4
4
  "description": "Externally unsupported utilities internal to agoric-sdk",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -20,7 +20,7 @@
20
20
  "lint:types": "tsc -p jsconfig.json"
21
21
  },
22
22
  "dependencies": {
23
- "@agoric/zone": "0.1.1-dev-f447e3a.0+f447e3a",
23
+ "@agoric/zone": "0.1.1-dev-7989b88.0+7989b88",
24
24
  "@endo/far": "^0.2.14",
25
25
  "@endo/marshal": "^0.8.1",
26
26
  "@endo/promise-kit": "^0.2.52",
@@ -38,5 +38,5 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "f447e3a93d1cd19d73b1310158bc4eea4f8bd824"
41
+ "gitHead": "7989b8857a728c7b7b937077757520f0cadeebde"
42
42
  }
@@ -14,7 +14,7 @@ export function makeFakeStorageKit(rootPath: string, rootOptions?: object | unde
14
14
  } | undefined): import("./lib-chainStorage.js").StorageNode;
15
15
  setValue(value: string): Promise<void>;
16
16
  }>;
17
- data: Map<string, any>;
17
+ data: Map<string, any[]>;
18
18
  messages: import("./lib-chainStorage.js").StorageMessage[];
19
19
  toStorage: (message: import('../src/lib-chainStorage.js').StorageMessage) => Promise<number | {
20
20
  storeName: string;
@@ -23,7 +23,7 @@ export function makeFakeStorageKit(rootPath: string, rootOptions?: object | unde
23
23
  };
24
24
  export function makeMockChainStorageRoot(): {
25
25
  /**
26
- * Defaults to deserializing pass-by-presence objects into { iface } representations.
26
+ * Defaults to deserializing pass-by-presence objects into { iface } representations.
27
27
  * Note that this is **not** a null transformation; capdata `@qclass` and `index` properties
28
28
  * are dropped and `iface` is _added_ for repeat references.
29
29
  *
@@ -40,7 +40,7 @@ export function makeMockChainStorageRoot(): {
40
40
  setValue(value: string): Promise<void>;
41
41
  } & import("@endo/eventual-send").RemotableBrand<{}, {
42
42
  /**
43
- * Defaults to deserializing pass-by-presence objects into { iface } representations.
43
+ * Defaults to deserializing pass-by-presence objects into { iface } representations.
44
44
  * Note that this is **not** a null transformation; capdata `@qclass` and `index` properties
45
45
  * are dropped and `iface` is _added_ for repeat references.
46
46
  *
@@ -14,7 +14,7 @@ const { Fail, quote: q } = assert;
14
14
  * @param {object} [rootOptions]
15
15
  */
16
16
  export const makeFakeStorageKit = (rootPath, rootOptions) => {
17
- /** @type {Map<string, any>} */
17
+ /** @type {Map<string, any[]>} */
18
18
  const data = new Map();
19
19
  /** @type {import('../src/lib-chainStorage.js').StorageMessage[]} */
20
20
  const messages = [];
@@ -32,7 +32,7 @@ export const makeFakeStorageKit = (rootPath, rootOptions) => {
32
32
  case 'set':
33
33
  for (const [key, value] of message.args) {
34
34
  if (value !== undefined) {
35
- data.set(key, value);
35
+ data.set(key, [value]);
36
36
  } else {
37
37
  data.delete(key);
38
38
  }
@@ -82,7 +82,7 @@ export const makeMockChainStorageRoot = () => {
82
82
  return Far('mockChainStorage', {
83
83
  ...bindAllMethods(rootNode),
84
84
  /**
85
- * Defaults to deserializing pass-by-presence objects into { iface } representations.
85
+ * Defaults to deserializing pass-by-presence objects into { iface } representations.
86
86
  * Note that this is **not** a null transformation; capdata `@qclass` and `index` properties
87
87
  * are dropped and `iface` is _added_ for repeat references.
88
88
  *
@@ -92,7 +92,7 @@ export const makeMockChainStorageRoot = () => {
92
92
  */
93
93
  getBody: (path, marshaller = defaultMarshaller) => {
94
94
  data.size || Fail`no data in storage`;
95
- const dataStr = data.get(path);
95
+ const dataStr = data.get(path)?.at(-1);
96
96
  if (!dataStr) {
97
97
  console.debug('mockChainStorage data:', data);
98
98
  Fail`no data at ${q(path)}`;