@agoric/internal 0.3.3-u11.0 → 0.4.0-getting-started-dev-26244e8.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/CHANGELOG.md +23 -0
- package/package.json +9 -9
- package/src/lib-chainStorage.d.ts.map +1 -1
- package/src/lib-chainStorage.js +1 -0
- package/src/node/createBundles.d.ts.map +1 -1
- package/src/node/createBundles.js +8 -1
- package/src/storage-test-utils.d.ts +4 -2
- package/src/storage-test-utils.d.ts.map +1 -1
- package/src/storage-test-utils.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,29 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.4.0-u12.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/internal@0.3.3-u11wf.0...@agoric/internal@0.4.0-u12.0) (2023-11-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ⚠ BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **vstorage:** Enforce path validation
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **internal:** severe override taming for bundle-source ([9486c77](https://github.com/Agoric/agoric-sdk/commit/9486c772ab7daaebad0a19ac85653307ba461065))
|
|
16
|
+
* **vstorage:** Enforce path validation ([d8db331](https://github.com/Agoric/agoric-sdk/commit/d8db3310fb21a8546388694752889f3563733010)), closes [#8337](https://github.com/Agoric/agoric-sdk/issues/8337)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### [0.3.3-u11wf.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/internal@0.3.3-u11.0...@agoric/internal@0.3.3-u11wf.0) (2023-09-23)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* **internal:** fakeStorage.getBody() supports index other than -1 ([d2e05c4](https://github.com/Agoric/agoric-sdk/commit/d2e05c43dcd5dfa3719feecc0b303b8294efeef0))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
6
29
|
### [0.3.3-u11.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/internal@0.3.2...@agoric/internal@0.3.3-u11.0) (2023-08-24)
|
|
7
30
|
|
|
8
31
|
**Note:** Version bump only for package @agoric/internal
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/internal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-getting-started-dev-26244e8.0+26244e8",
|
|
4
4
|
"description": "Externally unsupported utilities internal to agoric-sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"lint:types": "tsc -p jsconfig.json"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@agoric/zone": "
|
|
24
|
-
"@endo/far": "
|
|
25
|
-
"@endo/marshal": "
|
|
26
|
-
"@endo/patterns": "
|
|
27
|
-
"@endo/promise-kit": "
|
|
28
|
-
"@endo/stream": "
|
|
23
|
+
"@agoric/zone": "0.2.3-getting-started-dev-26244e8.0+26244e8",
|
|
24
|
+
"@endo/far": "0.2.18",
|
|
25
|
+
"@endo/marshal": "0.8.5",
|
|
26
|
+
"@endo/patterns": "0.2.2",
|
|
27
|
+
"@endo/promise-kit": "0.2.56",
|
|
28
|
+
"@endo/stream": "0.3.25",
|
|
29
29
|
"anylogger": "^0.21.0",
|
|
30
30
|
"jessie.js": "^0.3.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@endo/init": "
|
|
33
|
+
"@endo/init": "0.5.56",
|
|
34
34
|
"ava": "^5.2.0",
|
|
35
35
|
"tsd": "^0.28.1"
|
|
36
36
|
},
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "26244e821f1a83cd5868f0c7d54aa480c8c17e5e"
|
|
46
46
|
}
|
|
@@ -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":"AAoPA;;;;;;;;;;;GAWG;AACH,qEATqB,cAAc,KAAK,GAAG,YAGhC,MAAM;;;;IA1DX;;;OAGG;mBADa,QAAQ,WAAW,CAAC;IASpC,qFAAqF;wBAAnE,MAAM;;oBAA8C,WAAW;IAWjF,+CAA+C;oBAA5B,MAAM,GAAK,QAAQ,IAAI,CAAC;;;IAtB3C;;;OAGG;mBADa,QAAQ,WAAW,CAAC;IASpC,qFAAqF;wBAAnE,MAAM;;oBAA8C,WAAW;IAWjF,+CAA+C;oBAA5B,MAAM,GAAK,QAAQ,IAAI,CAAC;GAoDhD;AAUD;;;;;;;;GAQG;AACH,qDAJW,OAAO,WAAW,EAAE,IAAI,CAAC,WAAW,QAAE,aACtC,MAAM,GACJ,QAAQ,WAAW,CAAC,CAMhC;AAnOM,mCAHI,GAAG,+BAQ8B;AASrC,oCAHI,OAAO,2DASjB;AAWM,4CALI,IAAI,MAAM,EAAE,MAAM,CAAC,OACnB,MAAM,eACN,WAAW,cAAc,eAAe,EAAE,WAAW,CAAC,CAAC,aAAa,CAAC,mCAwB/E;AAiBD,qCAAqC;AACrC,uCADkB,MAAM,KAAK,IAAI,CAI/B;AAwBK,8CAFI,OAAO,cAAc,EAAE,IAAI,oDAqBiB,cAAc,KAAK,GAAG;;;;IAcvE;;;OAGG;mBADa,QAAQ,WAAW,CAAC;IASpC,qFAAqF;wBAAnE,MAAM;;oBAA8C,WAAW;IAWjF,+CAA+C;oBAA5B,M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}
|
package/src/lib-chainStorage.js
CHANGED
|
@@ -126,6 +126,7 @@ harden(unmarshalFromVstorage);
|
|
|
126
126
|
// Must be nonempty and disallow (unescaped) `.`, and for simplicity
|
|
127
127
|
// (and future possibility of e.g. escaping) we currently limit to
|
|
128
128
|
// ASCII alphanumeric plus underscore and dash.
|
|
129
|
+
// Should remain consistent with golang/cosmos/x/vstorage/types/path_keys.go
|
|
129
130
|
const pathSegmentPattern = /^[a-zA-Z0-9_-]{1,100}$/;
|
|
130
131
|
|
|
131
132
|
/** @type {(name: string) => void} */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBundles.d.ts","sourceRoot":"","sources":["createBundles.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createBundles.d.ts","sourceRoot":"","sources":["createBundles.js"],"names":[],"mappings":"AAWO,6EA+BN;AAEM,mFAMN;AAEM,iGAkCN"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* global process */
|
|
1
2
|
// Use modules not prefixed with `node:` since some deploy scripts may
|
|
2
3
|
// still be running in esm emulation
|
|
3
4
|
import path from 'path';
|
|
@@ -29,7 +30,13 @@ export const createBundlesFromAbsolute = async sourceBundles => {
|
|
|
29
30
|
|
|
30
31
|
for (const args of cacheToArgs.values()) {
|
|
31
32
|
console.log(BUNDLE_SOURCE_PROGRAM, ...args);
|
|
32
|
-
const
|
|
33
|
+
const env = /** @type {NodeJS.ProcessEnv} */ (
|
|
34
|
+
/** @type {unknown} */ ({
|
|
35
|
+
__proto__: process.env,
|
|
36
|
+
LOCKDOWN_OVERRIDE_TAMING: 'severe',
|
|
37
|
+
})
|
|
38
|
+
);
|
|
39
|
+
const { status } = spawnSync(prog, args, { stdio: 'inherit', env });
|
|
33
40
|
status === 0 ||
|
|
34
41
|
Fail`${q(BUNDLE_SOURCE_PROGRAM)} failed with status ${q(status)}`;
|
|
35
42
|
}
|
|
@@ -44,9 +44,10 @@ export function makeMockChainStorageRoot(): {
|
|
|
44
44
|
*
|
|
45
45
|
* @param {string} path
|
|
46
46
|
* @param {import('./lib-chainStorage.js').Marshaller} marshaller
|
|
47
|
+
* @param {number} [index]
|
|
47
48
|
* @returns {unknown}
|
|
48
49
|
*/
|
|
49
|
-
getBody: (path: string, marshaller?: import('./lib-chainStorage.js').Marshaller) => unknown;
|
|
50
|
+
getBody: (path: string, marshaller?: import('./lib-chainStorage.js').Marshaller, index?: number | undefined) => unknown;
|
|
50
51
|
keys: () => string[];
|
|
51
52
|
getPath(): string;
|
|
52
53
|
getStoreKey(): Promise<import("./lib-chainStorage.js").VStorageKey>;
|
|
@@ -63,9 +64,10 @@ export function makeMockChainStorageRoot(): {
|
|
|
63
64
|
*
|
|
64
65
|
* @param {string} path
|
|
65
66
|
* @param {import('./lib-chainStorage.js').Marshaller} marshaller
|
|
67
|
+
* @param {number} [index]
|
|
66
68
|
* @returns {unknown}
|
|
67
69
|
*/
|
|
68
|
-
getBody: (path: string, marshaller?: import('./lib-chainStorage.js').Marshaller) => unknown;
|
|
70
|
+
getBody: (path: string, marshaller?: import('./lib-chainStorage.js').Marshaller, index?: number | undefined) => unknown;
|
|
69
71
|
keys: () => string[];
|
|
70
72
|
getPath(): string;
|
|
71
73
|
getStoreKey(): Promise<import("./lib-chainStorage.js").VStorageKey>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-test-utils.d.ts","sourceRoot":"","sources":["storage-test-utils.js"],"names":[],"mappings":"AAkCO,yCAHI,MAAM,UACN,MAAM,wDAGC;AAElB;;;GAGG;AACH;;;;;EAEG;AAsBW,+CAAU,GAAG,GAAK,GAAG,CAAA;AAgC5B,6CAHI,MAAM,gBACN;;eAAwC,CAAC,CAAC;;;;;;;;;;;;;;;;;;yBAyBvC,OAAO,4BAA4B,EAAE,cAAc;;;;EAoFhE;AAIM;IAIH
|
|
1
|
+
{"version":3,"file":"storage-test-utils.d.ts","sourceRoot":"","sources":["storage-test-utils.js"],"names":[],"mappings":"AAkCO,yCAHI,MAAM,UACN,MAAM,wDAGC;AAElB;;;GAGG;AACH;;;;;EAEG;AAsBW,+CAAU,GAAG,GAAK,GAAG,CAAA;AAgC5B,6CAHI,MAAM,gBACN;;eAAwC,CAAC,CAAC;;;;;;;;;;;;;;;;;;yBAyBvC,OAAO,4BAA4B,EAAE,cAAc;;;;EAoFhE;AAIM;IAIH;;;;;;;;;;OAUG;oBAJQ,MAAM,eACN,OAAO,uBAAuB,EAAE,UAAU,iCAExC,OAAO;;;;;;;;;IATpB;;;;;;;;;;OAUG;oBAJQ,MAAM,eACN,OAAO,uBAAuB,EAAE,UAAU,iCAExC,OAAO;;;;;;;;GAWvB;;;;;;;;;;;;;;;;;;eApNiF,CAAC,KAAK,CAAC;;;6BA0L3E,WAAY,yBAAyB,CAAC;mCA2BtC,WAAW,+BAA+B,CAAC"}
|
|
@@ -218,14 +218,15 @@ export const makeMockChainStorageRoot = () => {
|
|
|
218
218
|
*
|
|
219
219
|
* @param {string} path
|
|
220
220
|
* @param {import('./lib-chainStorage.js').Marshaller} marshaller
|
|
221
|
+
* @param {number} [index]
|
|
221
222
|
* @returns {unknown}
|
|
222
223
|
*/
|
|
223
|
-
getBody: (path, marshaller = defaultMarshaller) => {
|
|
224
|
+
getBody: (path, marshaller = defaultMarshaller, index = -1) => {
|
|
224
225
|
data.size || Fail`no data in storage`;
|
|
225
226
|
/** @type {ReturnType<typeof import('@endo/marshal').makeMarshal>['fromCapData']} */
|
|
226
227
|
const fromCapData = (...args) =>
|
|
227
228
|
Reflect.apply(marshaller.fromCapData, marshaller, args);
|
|
228
|
-
return unmarshalFromVstorage(data, path, fromCapData);
|
|
229
|
+
return unmarshalFromVstorage(data, path, fromCapData, index);
|
|
229
230
|
},
|
|
230
231
|
keys: () => [...data.keys()],
|
|
231
232
|
});
|