fastify-cli icon indicating copy to clipboard operation
fastify-cli copied to clipboard

feat(WIP): rebuild

Open climba03003 opened this issue 3 years ago • 10 comments

Fixes #194 This rebuild the CLI functionality from scratch using @oclif/core. Currently, I need some helps on the Github Actions. Which stale forever when I run the test.

  1. ~~For generate command, plugin still pending to do.~~
  2. For start command, I removed some of the option since it is duplicated from export option.

Notable Change

  1. It is using TypeScript currently, as I am more familiar with the assist of typings.
  2. help and readme is auto generated.
  3. options now autoload.

How to Test

  1. Clone the Repo
  2. Install dependency
  3. Build the source using npm run build.
  4. node bin/run <command>

Checklist

climba03003 avatar May 27 '22 08:05 climba03003

is this PR going anywhere?

simoneb avatar Sep 06 '22 10:09 simoneb

is this PR going anywhere?

Yes, I need some GitHub experts to help me on the GitHub Actions. The test stale on GitHub Actions but works on local machine.

Moreover, I need more feedback on how the template should look like.

climba03003 avatar Sep 06 '22 10:09 climba03003

as far as I can see there are no checks being run in gh actions in the PR. see the checks tab, it says 0. as for the structure, my wild guess is that landing a PR with 150 changes files will be challenging

simoneb avatar Sep 06 '22 10:09 simoneb

as far as I can see there are no checks being run in gh actions in the PR. see the checks tab, it says 0.

I run it before and I see it stale forever. Then, I removed the ci files.

as for the structure, my wild guess is that landing a PR with 150 changes files will be challenging

It is a complete rewrite. So, it will be large different anyway.

climba03003 avatar Sep 06 '22 10:09 climba03003

ok. well without seeing the output of ci hard to say what might be the cause

simoneb avatar Sep 06 '22 10:09 simoneb

ok. well without seeing the output of ci hard to say what might be the cause

Here is the clean repo. https://github.com/kaka-repo/fastify-cli

~~You can check the CI in here. I have push the CI file again for testing. https://github.com/kaka-repo/fastify-cli/runs/8204969713~~

I may need some update before you can see the actual error.

climba03003 avatar Sep 06 '22 10:09 climba03003

that's not a hang. the operation was canceled because another job failed https://github.com/kaka-repo/fastify-cli/runs/8204970017?check_suite_focus=true

simoneb avatar Sep 06 '22 10:09 simoneb

that's not a hang. the operation was canceled because another job failed https://github.com/kaka-repo/fastify-cli/runs/8204970017?check_suite_focus=true

Here is the hanging one https://github.com/kaka-repo/fastify-cli/runs/8205522639?check_suite_focus=true

climba03003 avatar Sep 06 '22 11:09 climba03003

I know it's a bit late for this given the work already done, but I'm a bit sad to see this change as the CLI was previously quite fast to install and lightweight: not trying to start a debate regarding features here, but oclif is quite heavy and brings in 92 (!) dependencies just on its core: https://npmgraph.js.org/?q=%40oclif%2Fcore For the sake of comparison, commander brings similar benefits than oclif, with no added dependencies: https://npmgraph.js.org/?q=commander

Just sharing my maintainer experience here, but besides the bloat, added dependencies (even transitive ones) adds burden to the maintainers because of frequent updates and potential security issues.

sinedied avatar Jan 13 '23 07:01 sinedied

Hey @climba03003, @sinedied. Any updates here?

Oclif would be an amazing feature! We know that oclif can be "bloated", however, the DX features it brings make it so valuable. Autocompletion of commands, ability to add plugins, cli validation and many other things that previously would have to be done manually will now be generated by oclif for us.

This will drastically reduce the amount of bugs to fix and code we would have to write.

arthurfiorette avatar Oct 24 '23 13:10 arthurfiorette