Adding unpack as cli command and exposing via index.ts for typescript#5
Adding unpack as cli command and exposing via index.ts for typescript#5felixrieseberg merged 1 commit intomodelcontextprotocol:mainfrom Flux159:dxt-unpack
Conversation
felixrieseberg
left a comment
There was a problem hiding this comment.
Oh wonderful, thank you so much!
|
@Flux159 We require all commits to be signed, would you be able to force push with signed commits? I'd love merge this in, this was actually on my todo list 🙇 |
|
@felixrieseberg Thanks, just signed & squashed the commits. |
| // Ensure the CLI is built | ||
| execSync("yarn build", { cwd: join(__dirname, "..") }); |
There was a problem hiding this comment.
@felixrieseberg - not sure if this is only on my machine, but if I do a clean git clone, sometimes I'm getting test failures because this yarn build doesn't actually build & create a dist/cli.js. Doing yarn build && yarn test via cli works fine & all tests pass.
Unsure if this is due to a conflict with the other yarn build on line 19 in this file or something else. Edit: Could be because of tsconfig.tsbuildinfo / something around incremental builds not creating dist - I have to rm tsconfig.tsbuildinfo && yarn build sometimes. Still unclear if this is just my environment.
Wanted to give a heads up incase it's failing some internal CI tests. I guess separate question: Do you want a PR for running tests in github actions?
There was a problem hiding this comment.
I've seen this too and I can't quite figure out under what conditions TypeScript ends up with a borked tsbuildinfo. It's for sure not just you.
Summary:
Adding an unpack command that allows users to unpack dxts. References #4.
Test plan:
Added an automated test in cli.test.ts that checks that pack and unpack work for a test directory with a manifest file.
Feel free to close out if you don't intend on adding this to the API, just thought it would be easy enough to get working that I might as well open up a PR.