@agoric/deploy-script-support 0.10.4-dev-c50674b.0 → 0.10.4-dev-3a87a12.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 +10 -10
- package/src/coreProposalBehavior.js +7 -5
- package/src/externalTypes.js +4 -5
- package/src/extract-proposal.js +10 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/deploy-script-support",
|
|
3
|
-
"version": "0.10.4-dev-
|
|
3
|
+
"version": "0.10.4-dev-3a87a12.0+3a87a12",
|
|
4
4
|
"description": "Helpers and other support for writing deploy scripts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/helpers.js",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@agoric/assert": "0.6.1-dev-
|
|
38
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
39
|
-
"@agoric/import-manager": "0.3.12-dev-
|
|
40
|
-
"@agoric/internal": "0.3.3-dev-
|
|
41
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
42
|
-
"@agoric/store": "0.9.3-dev-
|
|
43
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
37
|
+
"@agoric/assert": "0.6.1-dev-3a87a12.0+3a87a12",
|
|
38
|
+
"@agoric/ertp": "0.16.3-dev-3a87a12.0+3a87a12",
|
|
39
|
+
"@agoric/import-manager": "0.3.12-dev-3a87a12.0+3a87a12",
|
|
40
|
+
"@agoric/internal": "0.3.3-dev-3a87a12.0+3a87a12",
|
|
41
|
+
"@agoric/notifier": "0.6.3-dev-3a87a12.0+3a87a12",
|
|
42
|
+
"@agoric/store": "0.9.3-dev-3a87a12.0+3a87a12",
|
|
43
|
+
"@agoric/zoe": "0.26.3-dev-3a87a12.0+3a87a12",
|
|
44
44
|
"@endo/base64": "^0.2.31",
|
|
45
45
|
"@endo/bundle-source": "^2.5.1",
|
|
46
46
|
"@endo/far": "^0.2.18",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@endo/zip": "^0.2.31"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@agoric/vats": "0.15.2-dev-
|
|
53
|
+
"@agoric/vats": "0.15.2-dev-3a87a12.0+3a87a12",
|
|
54
54
|
"@endo/init": "^0.5.56",
|
|
55
55
|
"ava": "^5.3.0",
|
|
56
56
|
"import-meta-resolve": "^2.2.1"
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "3a87a12543172552103fcd16082d4382d9fa0bd5"
|
|
72
72
|
}
|
|
@@ -24,12 +24,12 @@ export const permits = {
|
|
|
24
24
|
* definitions.
|
|
25
25
|
*
|
|
26
26
|
* @param {object} opts
|
|
27
|
-
* @param {
|
|
27
|
+
* @param {import('./externalTypes.js').ManifestBundleRef} opts.manifestBundleRef
|
|
28
28
|
* @param {[string, ...unknown[]]} opts.getManifestCall
|
|
29
29
|
* @param {Record<string, Record<string, unknown>>} [opts.overrideManifest]
|
|
30
30
|
* @param {typeof import('@endo/far').E} opts.E
|
|
31
31
|
* @param {(...args: unknown[]) => void} [opts.log]
|
|
32
|
-
* @param {(ref:
|
|
32
|
+
* @param {(ref: import('./externalTypes.js').ManifestBundleRef) => Promise<import('@agoric/zoe/src/zoeService/utils.js').Installation<unknown>>} [opts.restoreRef]
|
|
33
33
|
* @returns {(vatPowers: unknown) => Promise<unknown>}
|
|
34
34
|
*/
|
|
35
35
|
export const makeCoreProposalBehavior = ({
|
|
@@ -70,13 +70,15 @@ export const makeCoreProposalBehavior = ({
|
|
|
70
70
|
} = allPowers;
|
|
71
71
|
const [exportedGetManifest, ...manifestArgs] = getManifestCall;
|
|
72
72
|
|
|
73
|
+
/** @type {(ref: import('./externalTypes.js').ManifestBundleRef) => Promise<Installation<unknown>>} */
|
|
73
74
|
const defaultRestoreRef = async ref => {
|
|
74
75
|
// extract-proposal.js creates these records, and bundleName is
|
|
75
76
|
// the name under which the bundle was installed into
|
|
76
77
|
// config.bundles
|
|
77
|
-
const p =
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
const p =
|
|
79
|
+
'bundleName' in ref
|
|
80
|
+
? E(vatAdminSvc).getBundleIDByName(ref.bundleName)
|
|
81
|
+
: ref.bundleID;
|
|
80
82
|
const bundleID = await p;
|
|
81
83
|
const label = bundleID.slice(0, 8);
|
|
82
84
|
return E(zoe).installBundleID(bundleID, label);
|
package/src/externalTypes.js
CHANGED
|
@@ -16,14 +16,13 @@ export {};
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* @typedef
|
|
20
|
-
* @property {string} [bundleName]
|
|
19
|
+
* @typedef {{ bundleName: string } | { bundleID: string} } ManifestBundleRef
|
|
21
20
|
*/
|
|
22
21
|
|
|
23
22
|
/**
|
|
24
23
|
* @callback PublishBundleRef
|
|
25
|
-
* @param {ERef<
|
|
26
|
-
* @returns {Promise<
|
|
24
|
+
* @param {ERef<ManifestBundleRef>} bundle
|
|
25
|
+
* @returns {Promise<ManifestBundleRef>}
|
|
27
26
|
*/
|
|
28
27
|
|
|
29
28
|
/**
|
|
@@ -31,7 +30,7 @@ export {};
|
|
|
31
30
|
* @param {string} srcSpec
|
|
32
31
|
* @param {string} bundlePath
|
|
33
32
|
* @param {any} [opts]
|
|
34
|
-
* @returns {
|
|
33
|
+
* @returns {ManifestBundleRef}
|
|
35
34
|
*/
|
|
36
35
|
|
|
37
36
|
/**
|
package/src/extract-proposal.js
CHANGED
|
@@ -135,11 +135,20 @@ export const extractCoreProposalBundles = async (
|
|
|
135
135
|
/** @type {import('./externalTypes.js').PublishBundleRef} */
|
|
136
136
|
const publishRef = async handleP => {
|
|
137
137
|
const handle = await handleP;
|
|
138
|
+
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error -- https://github.com/Agoric/agoric-sdk/issues/4620 */
|
|
139
|
+
// @ts-ignore xxx types
|
|
138
140
|
bundleHandleToAbsolutePaths.has(handle) ||
|
|
139
141
|
Fail`${handle} not in installed bundles`;
|
|
140
142
|
return handle;
|
|
141
143
|
};
|
|
142
|
-
const proposal = await ns[entrypoint](
|
|
144
|
+
const proposal = await ns[entrypoint](
|
|
145
|
+
{
|
|
146
|
+
publishRef,
|
|
147
|
+
// @ts-expect-error not statically verified to return a full obj
|
|
148
|
+
install,
|
|
149
|
+
},
|
|
150
|
+
...args,
|
|
151
|
+
);
|
|
143
152
|
|
|
144
153
|
// Add the proposal bundle handles in sorted order.
|
|
145
154
|
const bundleSpecEntries = [...thisProposalBundleHandles.keys()]
|