Skip to content
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(endo): Add command line #398

Merged
merged 8 commits into from
Aug 25, 2020
Merged

feat(endo): Add command line #398

merged 8 commits into from
Aug 25, 2020

Conversation

kriskowal
Copy link
Member

@kriskowal kriskowal commented Jul 31, 2020

This change provides a preliminary command line for endo, mostly because it is convenient for ad-hoc testing, though it will likely grow into something else.

Usage:

# write an archive
$ endo archive mod.agar path/to/module.js

# produce a compartment map
$ endo compartmap path/to/module.js

This is entirely open for discussion.

@kriskowal
Copy link
Member Author

@michaelfig recommended reserving -w for “watch” and @dtribble (I think) recommended parity with tar, so -c instead.

packages/endo/src/cli.js Outdated Show resolved Hide resolved
@kriskowal kriskowal changed the base branch from kris/endo-cjs to kris/endo-module-override August 3, 2020 23:28
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from 5576faa to e61b52b Compare August 5, 2020 01:10
@kriskowal kriskowal force-pushed the kris/endo-cli branch 4 times, most recently from dc44b5b to 95db8a1 Compare August 6, 2020 18:15
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from 827fd6a to 58a77a3 Compare August 7, 2020 22:19
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from 58a77a3 to d3ce297 Compare August 7, 2020 22:43
@kriskowal kriskowal force-pushed the kris/endo-cli branch 2 times, most recently from 5ad291c to f97cf8b Compare August 10, 2020 22:44
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from 1830eba to c753e7f Compare August 11, 2020 00:03
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from c753e7f to 2a8ec4d Compare August 11, 2020 00:07
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from 2a8ec4d to fa49fa3 Compare August 12, 2020 00:31
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from fa49fa3 to 7618077 Compare August 12, 2020 00:32
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from 7618077 to b5fe6ce Compare August 12, 2020 00:35
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from b5fe6ce to 9c6ec13 Compare August 22, 2020 01:32
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from 9c6ec13 to e10970c Compare August 22, 2020 19:13
@kriskowal kriskowal force-pushed the kris/endo-cli branch 2 times, most recently from c2ad82b to dfc0f63 Compare August 22, 2020 20:45
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from 7634bde to d32a609 Compare August 24, 2020 19:03
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from d32a609 to c666cb4 Compare August 24, 2020 19:09
@kriskowal kriskowal force-pushed the kris/endo-cli branch 2 times, most recently from 344f096 to b14638e Compare August 24, 2020 21:12
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from 3282d62 to 64eae5c Compare August 24, 2020 21:21
@kriskowal kriskowal force-pushed the kris/endo-module-override branch from 64eae5c to b3a6786 Compare August 24, 2020 21:24
Base automatically changed from kris/endo-module-override to master August 24, 2020 21:33
@kriskowal kriskowal requested a review from warner August 24, 2020 21:36
@kriskowal kriskowal mentioned this pull request Aug 24, 2020
36 tasks
@kriskowal kriskowal force-pushed the kris/endo-cli branch 2 times, most recently from 7abef39 to 96f990b Compare August 25, 2020 00:34
Copy link
Contributor

@warner warner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I could probably bikeshed on the subcommand names for a while, so I say just land it now and we'll figure out the details later.

@@ -0,0 +1 @@
endo.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does.. this work? Is there some weird pseudo-symlink data format going on here that Node.js recognizes in a bin: property? I would have expected package.json to point at endo.js.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ll point this to endo.js since you’re right that it’s more likely to work depending on what tool you use to install CLI’s. But, Node.js does pierce symlinks such that relative imports are always relative to the canonical location.

@kriskowal kriskowal merged commit 350329a into master Aug 25, 2020
@kriskowal kriskowal deleted the kris/endo-cli branch August 25, 2020 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants