Skip to content

New CLI feature needs organizational work #315

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

Closed
cliffhall opened this issue Apr 15, 2025 · 0 comments · Fixed by #316
Closed

New CLI feature needs organizational work #315

cliffhall opened this issue Apr 15, 2025 · 0 comments · Fixed by #316
Assignees
Labels
bug Something isn't working

Comments

@cliffhall
Copy link
Contributor

cliffhall commented Apr 15, 2025

Describe the bug
The new CLI interface added by #177 causes a build issue as well as confusion.

The Issue

  • build-bin currently creates a change to /bin/cli.js which must be reverted.
  • Probably checking these changes in (they are just whitespace differences) would then set this process straight, but still we are left with a very confusing setup.
Image

The Confusion

  • The concept of a build process taking place in a folder called bin which is traditionally the output of a build process is inherently confusing.
  • Previously bin/cli.js was the only file in that folder and was what you ran to start the webclient and proxy server.
  • Now it additionally can start the command line inspector, and contains some .js scripts.
  • This is fine, except that there is also a bin/src folder with an index.ts version of cli.js and a package.json with a build script that builds this one file to bin/build/index.js and then copies that to bin/cli.js, generating the set of change above.
  • There previously was no cli folder, but now their is. Yet we are maintaining scripts and a build for something else called cli.js in bin.
  • With the introduction of a formal CLI, the naming of client/bin/cli.js is also a bit confusing.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the inspector to your local system
  2. npm run build
  3. Observe bin/cli.js has changes

Expected behavior

  • bin/cli.js should not have changes

Also

  • All command line stuff should now be in the cli folder, no bin folder is required.
  • server, client and cli should be enough.
  • The cli/build/index.js can decide whether to launch the webclient or do its own thing. No need to have a separate bin/cli.js that determines whether to run the cli/build/index.js or the client/bin/cli.js
  • client/bin/cli.js should be something like client/bin/launch.js for clarity, since it has nothing to do with the CLI.

Logs
If applicable, add logs to help explain your problem.

Additional context
Add any other context about the problem here.

@cliffhall cliffhall added the bug Something isn't working label Apr 15, 2025
@cliffhall cliffhall self-assigned this Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant