Skip to content

New CLI feature needs organizational work #315

@cliffhall

Description

@cliffhall

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions