@optique/logtape 1.1.0-dev.1998 → 1.1.0-dev.2053
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/dist/index.cjs +1 -6
- package/dist/index.js +1 -6
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -107,10 +107,6 @@ const VERBOSITY_LEVELS = [
|
|
|
107
107
|
"trace"
|
|
108
108
|
];
|
|
109
109
|
/**
|
|
110
|
-
* Index of "warning" in VERBOSITY_LEVELS (the default base level).
|
|
111
|
-
*/
|
|
112
|
-
const WARNING_INDEX = 2;
|
|
113
|
-
/**
|
|
114
110
|
* Creates a parser for verbosity flags (`-v`, `-vv`, `-vvv`, etc.).
|
|
115
111
|
*
|
|
116
112
|
* This parser accumulates `-v` flags to determine the log level.
|
|
@@ -161,8 +157,7 @@ function verbosity(options = {}) {
|
|
|
161
157
|
const long = options.long ?? "--verbose";
|
|
162
158
|
const baseLevel = options.baseLevel ?? "warning";
|
|
163
159
|
validateLogLevel(baseLevel, "baseLevel");
|
|
164
|
-
const
|
|
165
|
-
const effectiveBaseIndex = baseIndex >= 0 ? baseIndex : WARNING_INDEX;
|
|
160
|
+
const effectiveBaseIndex = VERBOSITY_LEVELS.indexOf(baseLevel);
|
|
166
161
|
const flagParser = (0, __optique_core_primitives.flag)(short, long, { description: options.description ?? __optique_core_message.message`Be more verbose. Can be repeated.` });
|
|
167
162
|
const multipleFlags = (0, __optique_core_modifiers.multiple)(flagParser);
|
|
168
163
|
return (0, __optique_core_modifiers.map)(multipleFlags, (flags) => {
|
package/dist/index.js
CHANGED
|
@@ -84,10 +84,6 @@ const VERBOSITY_LEVELS = [
|
|
|
84
84
|
"trace"
|
|
85
85
|
];
|
|
86
86
|
/**
|
|
87
|
-
* Index of "warning" in VERBOSITY_LEVELS (the default base level).
|
|
88
|
-
*/
|
|
89
|
-
const WARNING_INDEX = 2;
|
|
90
|
-
/**
|
|
91
87
|
* Creates a parser for verbosity flags (`-v`, `-vv`, `-vvv`, etc.).
|
|
92
88
|
*
|
|
93
89
|
* This parser accumulates `-v` flags to determine the log level.
|
|
@@ -138,8 +134,7 @@ function verbosity(options = {}) {
|
|
|
138
134
|
const long = options.long ?? "--verbose";
|
|
139
135
|
const baseLevel = options.baseLevel ?? "warning";
|
|
140
136
|
validateLogLevel(baseLevel, "baseLevel");
|
|
141
|
-
const
|
|
142
|
-
const effectiveBaseIndex = baseIndex >= 0 ? baseIndex : WARNING_INDEX;
|
|
137
|
+
const effectiveBaseIndex = VERBOSITY_LEVELS.indexOf(baseLevel);
|
|
143
138
|
const flagParser = flag(short, long, { description: options.description ?? message`Be more verbose. Can be repeated.` });
|
|
144
139
|
const multipleFlags = multiple(flagParser);
|
|
145
140
|
return map(multipleFlags, (flags) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optique/logtape",
|
|
3
|
-
"version": "1.1.0-dev.
|
|
3
|
+
"version": "1.1.0-dev.2053",
|
|
4
4
|
"description": "LogTape logging integration for Optique CLI parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@optique/core": "1.1.0-dev.
|
|
66
|
+
"@optique/core": "1.1.0-dev.2053+ed892f45"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@logtape/file": "^2.0.4",
|