-
Notifications
You must be signed in to change notification settings - Fork 21
CLI output modes and progress indicators #1153
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
Open
mphstudios
wants to merge
12
commits into
main
Choose a base branch
from
feature/lib-reporter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ce40331 to
7a20274
Compare
4076c5f to
b785111
Compare
60c0f14 to
5ede249
Compare
f7a805d to
52e304e
Compare
f7f290e to
2c4421b
Compare
- Import reporter module in create.js and installer/index.js - Add --quiet option to suppress progress output - Add reporter.configure(), fail(), and succeed() calls - Add reporter.start() and update() calls in installer Preserves security fixes: - DirectoryNotEmptyError for non-empty directory handling - Array-based execa() to prevent command injection - Auto-deletion disabled with Nota bene comments
* Rewrites calls to use execa with array-syntax for sub-process arguments * Captures git command errors and calls the debug logger * Captures npm command errors and calls the debug logger
The tests for quiet option and engine config override were failing because mockReporter was referenced from t.context but never set up in the beforeEach hook.
52e304e to
480d484
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instrument progress reporting and add global
--verboseand--debugflags for cli output.Purpose
Output modes:
debug,verboseReconcile program (
bin/cli.js,main.js) and command flags that control cli output to present a consistent interface and address the requirements of the Quire user groups: non-technical (editors); technical (developers, maintainers); and programmatic use.Semantic Model
-q, --quiet-v, --verbose--debugSee the CLI Output Modes documentation included in this pull-request.
Progress Indicators
The
lib/reportermodule provides and abstraction for commands that instrument progress output (such as a "spinner").The Quire commands that instrument the reporter either have stages, such as
newandbuild, or an extended delay without any terminal output, such as thepdfandepubcommands. Instrumentation of a progress reporter addresses this issue, providing the user with information about slow or staged processes.The
reportermodule is a thin façade around the chosen progress reporter libraryora, which was chosen for its simplicity, stability, small bundle size (~30K), and out-of-the-box feature that benefit the four primary Quire user groups and use cases (non-technical/editors, developers, maintainers, programmatic).The key features that
oraprovides are:--debug,--quiet)