-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: deploy-contract tooling; e2e testing support #16
Changes from all commits
9325502
47f39cd
08fce36
6154866
e2ce242
8bdd13b
cf2cf3a
96518b1
f43c86f
84a5aa1
f5085b1
89cbca3
275a577
f6dce3e
cda7961
7929ebc
50e774e
3a5fbbf
509ebf5
bd836c2
488a6dd
d6f62c2
e90ef73
41224b0
fe020d8
1b547ff
ea21af1
3eb57fe
8381d82
304a713
fea0dce
40227a0
928559a
7f7bd9f
254bc44
beb49b7
cb35008
4c1b5aa
eb3a265
b66a00c
e2fd20d
1e6090c
3aebc1b
ee3edda
02dc48d
45d1154
bdbec11
73b7a18
60730e0
c91a125
0cbcb4c
54d1503
e820ba3
9e16cbc
759e2d9
f84108a
206547e
928f656
53182f1
05eed68
17f6d97
ea81a5d
c28930e
8b0fe52
703dc40
f60d038
c2ed737
df116c4
8ae203a
e6d36d7
3484e2b
00288fc
99892d9
bce098a
d218449
3e66520
c39825f
6dfb66b
63b8d64
43b28ba
7f8035c
b259b62
0551642
8b8b104
86e91f1
5b6b4ea
c9391c3
5070508
b543eb8
22cbc22
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/** | ||
* @file rollup configuration to bundle core-eval script | ||
* | ||
* Supports developing core-eval script, permit as a module: | ||
* - import { E } from '@endo/far' | ||
* We can strip this declaration during bundling | ||
* since the core-eval scope includes exports of @endo/far | ||
* - `bundleID = ...` is replaced using updated/cached bundle hash | ||
* - `main` export is appended as script completion value | ||
* - `permit` export is emitted as JSON | ||
*/ | ||
// @ts-check | ||
import { | ||
coreEvalGlobals, | ||
moduleToScript, | ||
configureBundleID, | ||
emitPermit, | ||
} from './tools/rollup-plugin-core-eval.js'; | ||
import { permit as postalServicePermit } from './src/postal-service.proposal.js'; | ||
import { permit as swapPermit } from './src/swaparoo.proposal.js'; | ||
import { permit as sellPermit } from './src/sell-concert-tickets.proposal.js'; | ||
import { permit as boardAuxPermit } from './src/platform-goals/board-aux.core.js'; | ||
|
||
/** | ||
* @param {*} opts | ||
* @returns {import('rollup').RollupOptions} | ||
*/ | ||
const config1 = ({ | ||
name, | ||
coreEntry = `./src/${name}.proposal.js`, | ||
contractEntry = `./src/${name}.contract.js`, | ||
Comment on lines
+30
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😍 module type suffixes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd prefer Or maybe it should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like "deploy" as it's a deployment script, yeah? |
||
coreScript = `bundles/deploy-${name}.js`, | ||
permitFile = `deploy-${name}-permit.json`, | ||
permit, | ||
}) => ({ | ||
input: coreEntry, | ||
output: { | ||
globals: coreEvalGlobals, | ||
file: coreScript, | ||
format: 'es', | ||
footer: 'main', | ||
}, | ||
external: ['@endo/far'], | ||
plugins: [ | ||
...(contractEntry | ||
? [ | ||
configureBundleID({ | ||
name, | ||
rootModule: contractEntry, | ||
cache: 'bundles', | ||
}), | ||
] | ||
: []), | ||
moduleToScript(), | ||
emitPermit({ permit, file: permitFile }), | ||
], | ||
}); | ||
|
||
/** @type {import('rollup').RollupOptions[]} */ | ||
const config = [ | ||
config1({ | ||
name: 'board-aux', | ||
permit: boardAuxPermit, | ||
coreEntry: `./src/platform-goals/board-aux.core.js`, | ||
contractEntry: null, | ||
}), | ||
config1({ | ||
name: 'sell-concert-tickets', | ||
permit: sellPermit, | ||
}), | ||
config1({ name: 'swaparoo', permit: swapPermit }), | ||
config1({ | ||
name: 'postal-service', | ||
permit: postalServicePermit, | ||
}), | ||
]; | ||
export default config; |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for docs