Skip to content

Commit

Permalink
fix(bundle): use the same HandledPromise
Browse files Browse the repository at this point in the history
Refs #606

Fixes TypeError: o["install"] is not a function
  • Loading branch information
michaelfig committed Feb 29, 2020
1 parent 32b94d3 commit e668d3c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/cosmic-swingset/lib/ag-solo/bundle.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable no-await-in-loop */
import parseArgs from 'minimist';
import WebSocket from 'ws';
import { E } from '@agoric/eventual-send';
import { E, HandledPromise } from '@agoric/eventual-send';
import { evaluateProgram } from '@agoric/evaluate';
import { makeCapTP } from '@agoric/captp';
import { makeCapTP } from '@agoric/captp/lib/captp';
import fs from 'fs';
import path from 'path';

Expand Down Expand Up @@ -135,7 +135,10 @@ export default async function bundle(insistIsBasedir, args) {
for (const bundled of bundles) {
const actualSources = `(${bundled.main.source}\n)\n${bundled.main.sourceMap}`;
// console.log(actualSources);
const mainNS = evaluateProgram(actualSources, { require })();
const mainNS = evaluateProgram(actualSources, {
require,
HandledPromise,
})();
const main = mainNS.default;
if (typeof main !== 'function') {
console.error(`Bundle main does not have an export default function`);
Expand Down

0 comments on commit e668d3c

Please sign in to comment.