diff --git a/packages/deploy-script-support/src/writeCoreEvalParts.js b/packages/deploy-script-support/src/writeCoreEvalParts.js index 06d93a3c1bf1..506e59ecc0d6 100644 --- a/packages/deploy-script-support/src/writeCoreEvalParts.js +++ b/packages/deploy-script-support/src/writeCoreEvalParts.js @@ -1,9 +1,9 @@ // @ts-check import fs from 'fs'; import { E } from '@endo/far'; -import { deeplyFulfilled } from '@endo/marshal'; import { createBundles } from '@agoric/internal/src/node/createBundles.js'; +import { deeplyFulfilledObject } from '@agoric/internal'; import { defangAndTrim, mergePermits, stringify } from './code-gen.js'; import { makeCoreProposalBehavior, @@ -26,7 +26,10 @@ import { /** * * @param {*} homeP - * @param {*} endowments + * @param {{ + * bundleSource: (path: string) => Promise, + * pathResolve: (path: string) => string, + * }} endowments * @param {{ * getBundlerMaker: () => Promise, * getBundleSpec: (...args: *) => Promise, @@ -69,10 +72,10 @@ export const makeWriteCoreEval = ( getManifestCall: [manifestGetterName, ...manifestGetterArgs], } = coreEval; - const moduleRecord = await import(pathResolve(sourceSpec)); + const moduleNamespace = await import(pathResolve(sourceSpec)); // We only care about the manifest, not any restoreRef calls. - const { manifest } = await moduleRecord[manifestGetterName]( + const { manifest } = await moduleNamespace[manifestGetterName]( harden({ restoreRef: x => `restoreRef:${x}` }), ...manifestGetterArgs, ); @@ -146,15 +149,15 @@ export const makeWriteCoreEval = ( }; // Create the eval structure. - const evalParts = await deeplyFulfilled( + const evalDescriptor = await deeplyFulfilledObject( harden(builder({ publishRef, install })), ); - const { sourceSpec, getManifestCall } = evalParts; + const { sourceSpec, getManifestCall } = evalDescriptor; // console.log('created', { filePrefix, sourceSpec, getManifestCall }); // Extract the top-level permit. const { permits: evalPermits, manifest: customManifest } = - await mergeEvalPermit(evalParts, defaultPermits); + await mergeEvalPermit(evalDescriptor, defaultPermits); // Get an install const manifestBundleRef = await publishRef(install(sourceSpec));