@optique/core 1.2.0-dev.2316 → 1.2.0-dev.2318
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/valueparser.cjs +10 -1
- package/dist/valueparser.js +10 -1
- package/package.json +2 -2
package/dist/valueparser.cjs
CHANGED
|
@@ -339,9 +339,18 @@ function transform(parser, mapping) {
|
|
|
339
339
|
const validate = parser.validate.bind(parser);
|
|
340
340
|
Object.defineProperty(transformed, "validate", {
|
|
341
341
|
value(value) {
|
|
342
|
+
let unmapped;
|
|
343
|
+
try {
|
|
344
|
+
unmapped = mapping.unmap(value);
|
|
345
|
+
} catch {
|
|
346
|
+
return {
|
|
347
|
+
success: true,
|
|
348
|
+
value
|
|
349
|
+
};
|
|
350
|
+
}
|
|
342
351
|
let result;
|
|
343
352
|
try {
|
|
344
|
-
result = validate(
|
|
353
|
+
result = validate(unmapped);
|
|
345
354
|
} catch {
|
|
346
355
|
return transformMappingFailure();
|
|
347
356
|
}
|
package/dist/valueparser.js
CHANGED
|
@@ -339,9 +339,18 @@ function transform(parser, mapping) {
|
|
|
339
339
|
const validate = parser.validate.bind(parser);
|
|
340
340
|
Object.defineProperty(transformed, "validate", {
|
|
341
341
|
value(value) {
|
|
342
|
+
let unmapped;
|
|
343
|
+
try {
|
|
344
|
+
unmapped = mapping.unmap(value);
|
|
345
|
+
} catch {
|
|
346
|
+
return {
|
|
347
|
+
success: true,
|
|
348
|
+
value
|
|
349
|
+
};
|
|
350
|
+
}
|
|
342
351
|
let result;
|
|
343
352
|
try {
|
|
344
|
-
result = validate(
|
|
353
|
+
result = validate(unmapped);
|
|
345
354
|
} catch {
|
|
346
355
|
return transformMappingFailure();
|
|
347
356
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optique/core",
|
|
3
|
-
"version": "1.2.0-dev.
|
|
3
|
+
"version": "1.2.0-dev.2318",
|
|
4
4
|
"description": "Type-safe combinatorial command-line interface parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
"fast-check": "^4.7.0",
|
|
226
226
|
"tsdown": "^0.13.0",
|
|
227
227
|
"typescript": "^5.8.3",
|
|
228
|
-
"@optique/env": "1.2.0-dev.
|
|
228
|
+
"@optique/env": "1.2.0-dev.2318+be3862ce"
|
|
229
229
|
},
|
|
230
230
|
"scripts": {
|
|
231
231
|
"build": "tsdown",
|