-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(transform-eventual-send): pass HandledPromise endowment to evalu…
…ator
- Loading branch information
1 parent
97fc1e7
commit 7a5b74d
Showing
5 changed files
with
91 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#! /usr/bin/env node | ||
import fs from 'fs'; | ||
import process from 'process'; | ||
import bundleSource from '@agoric/bundle-source'; | ||
|
||
async function main() { | ||
const esend = require.resolve(`@agoric/eventual-send`); | ||
const bundle = await bundleSource(esend); | ||
const fileContents = `export default ${JSON.stringify(bundle)};`; | ||
try { | ||
await fs.promises.mkdir('src/bundles'); | ||
} catch (e) { | ||
if (!e || e.code !== 'EEXIST') { | ||
throw e; | ||
} | ||
} | ||
await fs.promises.writeFile('src/bundles/eventual-send.js', fileContents); | ||
} | ||
|
||
main().then( | ||
_ => process.exit(0), | ||
err => { | ||
console.log('error creating src/bundles/eventual-send.js:'); | ||
console.log(err); | ||
process.exit(1); | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bundles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters