@thegetty/quire-cli 1.0.0-rc.38 → 1.0.0-rc.39
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/package.json +3 -1
- package/src/commands/help.js +60 -0
- package/src/commands/help.test.js +132 -0
- package/src/errors/help/help-topic-not-found-error.js +22 -0
- package/src/errors/help/index.js +8 -0
- package/src/errors/index.js +6 -0
- package/src/errors/input/index.js +8 -0
- package/src/errors/input/invalid-input-error.js +21 -0
- package/src/helpers/pager.js +59 -0
- package/src/helpers/pager.test.js +85 -0
- package/src/lib/help/frontmatter.js +77 -0
- package/src/lib/help/frontmatter.test.js +139 -0
- package/src/lib/help/index.js +135 -0
- package/src/lib/help/index.test.js +160 -0
- package/src/lib/help/topics/configuration.md +77 -0
- package/src/lib/help/topics/debugging.md +69 -0
- package/src/lib/help/topics/epub.md +74 -0
- package/src/lib/help/topics/pdf.md +74 -0
- package/src/lib/help/topics/publishing.md +80 -0
- package/src/lib/help/topics/workflows.md +50 -0
- package/src/main.js +14 -1
package/src/main.js
CHANGED
|
@@ -34,7 +34,14 @@ Output Modes:
|
|
|
34
34
|
|
|
35
35
|
Set defaults: quire settings set verbose true
|
|
36
36
|
|
|
37
|
+
Paging:
|
|
38
|
+
--no-pager Disable paging for long output
|
|
39
|
+
NO_PAGER=1 Disable paging via environment variable
|
|
40
|
+
PAGER=cat Traditional Unix alternative (passes output through)
|
|
41
|
+
|
|
37
42
|
Environment Variables:
|
|
43
|
+
NO_PAGER=1 Disable paging for long output
|
|
44
|
+
PAGER=<program> Set pager program (default: less). Use PAGER=cat to disable
|
|
38
45
|
DEBUG=quire:* Enable debug output for all modules
|
|
39
46
|
DEBUG=quire:lib:pdf Enable debug output for PDF module only
|
|
40
47
|
DEBUG=quire:lib:* Enable debug output for all lib modules
|
|
@@ -49,7 +56,7 @@ Examples:
|
|
|
49
56
|
/**
|
|
50
57
|
* Quire CLI implements the command pattern.
|
|
51
58
|
*
|
|
52
|
-
* The
|
|
59
|
+
* The \`main\` module acts as the _receiver_, parsing input from the client,
|
|
53
60
|
* calling the appropriate command module(s), managing messages between modules,
|
|
54
61
|
* and sending formatted messages to the client for display.
|
|
55
62
|
*/
|
|
@@ -62,6 +69,7 @@ program
|
|
|
62
69
|
.addOption(arrayToOption(quietOption))
|
|
63
70
|
.addOption(arrayToOption(verboseOption))
|
|
64
71
|
.addOption(arrayToOption(debugOption))
|
|
72
|
+
.option('--no-pager', 'disable paging for long output')
|
|
65
73
|
.addHelpText('after', mainHelpText)
|
|
66
74
|
.configureHelp({
|
|
67
75
|
helpWidth: 80,
|
|
@@ -92,6 +100,11 @@ program.hook('preAction', (thisCommand) => {
|
|
|
92
100
|
if (opts.debug ?? config.get('debug')) {
|
|
93
101
|
enableDebug('quire:*')
|
|
94
102
|
}
|
|
103
|
+
|
|
104
|
+
// --no-pager sets pager to false; propagate via env var for pager utility
|
|
105
|
+
if (opts.pager === false) {
|
|
106
|
+
process.env.NO_PAGER = '1'
|
|
107
|
+
}
|
|
95
108
|
})
|
|
96
109
|
|
|
97
110
|
/**
|