@thegetty/quire-cli 1.0.0-rc.40 → 1.0.0-rc.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +14 -0
- package/package.json +1 -1
- package/src/commands/config.js +6 -21
- package/src/commands/config.test.js +109 -20
- package/src/errors/help/help-topic-not-found-error.js +12 -4
- package/src/errors/index.js +5 -1
- package/src/errors/validation/index.js +3 -0
- package/src/errors/validation/unknown-config-key-error.js +27 -0
- package/src/errors/validation/unknown-config-operation-error.js +24 -0
- package/src/helpers/suggest-similar.js +124 -0
- package/src/helpers/suggest-similar.test.js +108 -0
- package/src/lib/commander/index.js +1 -0
- package/src/lib/commander/options.js +18 -0
- package/src/lib/commander/options.test.js +52 -1
- package/src/lib/conf/defaults.js +7 -0
- package/src/lib/conf/schema.js +4 -0
- package/src/lib/help/index.js +12 -1
- package/src/lib/help/index.test.js +29 -1
- package/src/lib/reporter/index.js +96 -1
- package/src/lib/reporter/index.test.js +269 -0
- package/src/main.js +24 -4
package/src/main.js
CHANGED
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
noColorOption,
|
|
7
7
|
quietOption,
|
|
8
8
|
verboseOption,
|
|
9
|
-
debugOption
|
|
9
|
+
debugOption,
|
|
10
|
+
reducedMotionOption,
|
|
10
11
|
} from '#lib/commander/index.js'
|
|
11
12
|
import commands from '#src/commands/index.js'
|
|
12
13
|
import config from '#lib/conf/config.js'
|
|
@@ -30,12 +31,20 @@ Common Workflows:
|
|
|
30
31
|
Run 'quire help workflows' for detailed workflow documentation.
|
|
31
32
|
|
|
32
33
|
Output Modes:
|
|
33
|
-
-q, --quiet
|
|
34
|
-
-v, --verbose
|
|
35
|
-
--debug
|
|
34
|
+
-q, --quiet Suppress progress output (for CI/scripts)
|
|
35
|
+
-v, --verbose Show detailed progress (paths, timing, steps)
|
|
36
|
+
--debug Enable debug output for developers/troubleshooting
|
|
37
|
+
--reduced-motion Disable spinner animation and line overwriting
|
|
36
38
|
|
|
37
39
|
Set defaults: quire settings set verbose true
|
|
38
40
|
|
|
41
|
+
Accessibility:
|
|
42
|
+
--reduced-motion disables animated spinners and line overwriting.
|
|
43
|
+
Each stage prints on a new line as static text, making output
|
|
44
|
+
compatible with screen readers and reduced-motion preferences.
|
|
45
|
+
|
|
46
|
+
Set default: quire settings set reducedMotion true
|
|
47
|
+
|
|
39
48
|
Color Output:
|
|
40
49
|
--no-color Disable colored output
|
|
41
50
|
--color Force colored output (overrides NO_COLOR env var)
|
|
@@ -49,6 +58,7 @@ Paging:
|
|
|
49
58
|
PAGER=cat Traditional Unix alternative (passes output through)
|
|
50
59
|
|
|
51
60
|
Environment Variables:
|
|
61
|
+
REDUCED_MOTION Disable spinner animation and line overwriting
|
|
52
62
|
NO_COLOR Disable colored output (https://no-color.org/)
|
|
53
63
|
NO_PAGER=1 Disable paging for long output
|
|
54
64
|
PAGER=<program> Set pager program (default: less). Use PAGER=cat to disable
|
|
@@ -60,6 +70,8 @@ Examples:
|
|
|
60
70
|
$ quire build Build the publication
|
|
61
71
|
$ quire build --verbose Build with detailed progress
|
|
62
72
|
$ quire build --debug Build with debug output
|
|
73
|
+
$ quire build --reduced-motion Build without animated spinners
|
|
74
|
+
$ REDUCED_MOTION=1 quire build Build without animated spinners
|
|
63
75
|
$ quire build --no-color Build without colored output
|
|
64
76
|
$ NO_COLOR=1 quire build Build without colored output
|
|
65
77
|
$ DEBUG=quire:* quire pdf Generate PDF with debug output
|
|
@@ -83,6 +95,7 @@ program
|
|
|
83
95
|
.addOption(arrayToOption(quietOption))
|
|
84
96
|
.addOption(arrayToOption(verboseOption))
|
|
85
97
|
.addOption(arrayToOption(debugOption))
|
|
98
|
+
.addOption(arrayToOption(reducedMotionOption))
|
|
86
99
|
.option('--no-pager', 'disable paging for long output')
|
|
87
100
|
.addHelpText('after', mainHelpText)
|
|
88
101
|
.configureHelp({
|
|
@@ -102,6 +115,7 @@ program
|
|
|
102
115
|
* - --quiet: Suppress progress spinners (for CI/scripts)
|
|
103
116
|
* - --verbose: Show detailed progress (paths, timing, steps)
|
|
104
117
|
* - --debug: Enable DEBUG namespace + tool debug modes (for developers)
|
|
118
|
+
* - --reduced-motion: Disable animated spinners, use static text on new lines
|
|
105
119
|
* - --no-color: Disable colored output (sets NO_COLOR env var)
|
|
106
120
|
* - --color: Force colored output (overrides NO_COLOR env var)
|
|
107
121
|
*
|
|
@@ -127,6 +141,12 @@ program.hook('preAction', (thisCommand) => {
|
|
|
127
141
|
enableDebug('quire:*')
|
|
128
142
|
}
|
|
129
143
|
|
|
144
|
+
// --reduced-motion sets REDUCED_MOTION env var for reporter to read
|
|
145
|
+
// CLI flag takes precedence over env var and config setting
|
|
146
|
+
if (opts.reducedMotion) {
|
|
147
|
+
process.env.REDUCED_MOTION = '1'
|
|
148
|
+
}
|
|
149
|
+
|
|
130
150
|
// --no-pager sets pager to false; propagate via env var for pager utility
|
|
131
151
|
if (opts.pager === false) {
|
|
132
152
|
process.env.NO_PAGER = '1'
|