@optique/env 1.0.0-dev.1499 → 1.0.0-dev.1502
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 +10 -1
- package/dist/index.js +10 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -122,7 +122,7 @@ function bindEnv(parser, options) {
|
|
|
122
122
|
return value != null && typeof value === "object" && envBindStateKey in value;
|
|
123
123
|
}
|
|
124
124
|
const deferPromptUntilConfigResolves = parser.shouldDeferCompletion;
|
|
125
|
-
|
|
125
|
+
const boundParser = {
|
|
126
126
|
$mode: parser.$mode,
|
|
127
127
|
$valueType: parser.$valueType,
|
|
128
128
|
$stateType: parser.$stateType,
|
|
@@ -185,6 +185,14 @@ function bindEnv(parser, options) {
|
|
|
185
185
|
return parser.getDocFragments(state, defaultValue);
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
|
+
if ("placeholder" in parser) Object.defineProperty(boundParser, "placeholder", {
|
|
189
|
+
get() {
|
|
190
|
+
return parser.placeholder;
|
|
191
|
+
},
|
|
192
|
+
configurable: true,
|
|
193
|
+
enumerable: false
|
|
194
|
+
});
|
|
195
|
+
return boundParser;
|
|
188
196
|
}
|
|
189
197
|
function getEnvOrDefault(state, options, mode, innerParser, innerState) {
|
|
190
198
|
const annotations = (0, __optique_core_annotations.getAnnotations)(state);
|
|
@@ -246,6 +254,7 @@ function bool(options = {}) {
|
|
|
246
254
|
return {
|
|
247
255
|
$mode: "sync",
|
|
248
256
|
metavar,
|
|
257
|
+
placeholder: false,
|
|
249
258
|
choices: [true, false],
|
|
250
259
|
parse(input) {
|
|
251
260
|
const normalized = input.trim().toLowerCase();
|
package/dist/index.js
CHANGED
|
@@ -99,7 +99,7 @@ function bindEnv(parser, options) {
|
|
|
99
99
|
return value != null && typeof value === "object" && envBindStateKey in value;
|
|
100
100
|
}
|
|
101
101
|
const deferPromptUntilConfigResolves = parser.shouldDeferCompletion;
|
|
102
|
-
|
|
102
|
+
const boundParser = {
|
|
103
103
|
$mode: parser.$mode,
|
|
104
104
|
$valueType: parser.$valueType,
|
|
105
105
|
$stateType: parser.$stateType,
|
|
@@ -162,6 +162,14 @@ function bindEnv(parser, options) {
|
|
|
162
162
|
return parser.getDocFragments(state, defaultValue);
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
|
+
if ("placeholder" in parser) Object.defineProperty(boundParser, "placeholder", {
|
|
166
|
+
get() {
|
|
167
|
+
return parser.placeholder;
|
|
168
|
+
},
|
|
169
|
+
configurable: true,
|
|
170
|
+
enumerable: false
|
|
171
|
+
});
|
|
172
|
+
return boundParser;
|
|
165
173
|
}
|
|
166
174
|
function getEnvOrDefault(state, options, mode, innerParser, innerState) {
|
|
167
175
|
const annotations = getAnnotations(state);
|
|
@@ -223,6 +231,7 @@ function bool(options = {}) {
|
|
|
223
231
|
return {
|
|
224
232
|
$mode: "sync",
|
|
225
233
|
metavar,
|
|
234
|
+
placeholder: false,
|
|
226
235
|
choices: [true, false],
|
|
227
236
|
parse(input) {
|
|
228
237
|
const normalized = input.trim().toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optique/env",
|
|
3
|
-
"version": "1.0.0-dev.
|
|
3
|
+
"version": "1.0.0-dev.1502+fda779c7",
|
|
4
4
|
"description": "Environment variable support for Optique",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"sideEffects": false,
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@optique/core": "1.0.0-dev.
|
|
57
|
+
"@optique/core": "1.0.0-dev.1502+fda779c7"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/node": "^20.19.9",
|