@optique/env 1.2.8 → 1.2.9

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 CHANGED
@@ -388,7 +388,7 @@ function bindEnv(parser, options) {
388
388
  parse: (context) => {
389
389
  const annotations = (0, __optique_core_annotations.getAnnotations)(context.state);
390
390
  const hadCliValue = isEnvBindState(context.state) && context.state.hasCliValue;
391
- const innerState = isEnvBindState(context.state) ? context.state.hasCliValue ? context.state.cliState : (0, __optique_core_extension.inheritAnnotations)(context.state, parser.initialState) : context.state;
391
+ const innerState = getInnerState(context.state);
392
392
  const innerContext = innerState !== context.state ? {
393
393
  ...context,
394
394
  state: innerState
@@ -490,6 +490,7 @@ function bindEnv(parser, options) {
490
490
  configurable: true,
491
491
  enumerable: false
492
492
  });
493
+ (0, __optique_core_extension.delegateOptionParsing)(boundParser, parser, getInnerState);
493
494
  return (0, __optique_core_fluent.fluent)(boundParser);
494
495
  }
495
496
  /**
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { readFileSync } from "node:fs";
2
2
  import { resolve } from "node:path";
3
3
  import { getAnnotations } from "@optique/core/annotations";
4
- import { defineTraits, delegateSuggestNodes, dispatchByMode, getTraits, inheritAnnotations, injectAnnotations, isInjectedAnnotationState, mapModeValue, mapSourceMetadata, wrapForMode } from "@optique/core/extension";
4
+ import { defineTraits, delegateOptionParsing, delegateSuggestNodes, dispatchByMode, getTraits, inheritAnnotations, injectAnnotations, isInjectedAnnotationState, mapModeValue, mapSourceMetadata, wrapForMode } from "@optique/core/extension";
5
5
  import { fluent } from "@optique/core/fluent";
6
6
  import { envVar, message, valueSet } from "@optique/core/message";
7
7
  import { ensureNonEmptyString, isValueParser } from "@optique/core/valueparser";
@@ -365,7 +365,7 @@ function bindEnv(parser, options) {
365
365
  parse: (context) => {
366
366
  const annotations = getAnnotations(context.state);
367
367
  const hadCliValue = isEnvBindState(context.state) && context.state.hasCliValue;
368
- const innerState = isEnvBindState(context.state) ? context.state.hasCliValue ? context.state.cliState : inheritAnnotations(context.state, parser.initialState) : context.state;
368
+ const innerState = getInnerState(context.state);
369
369
  const innerContext = innerState !== context.state ? {
370
370
  ...context,
371
371
  state: innerState
@@ -467,6 +467,7 @@ function bindEnv(parser, options) {
467
467
  configurable: true,
468
468
  enumerable: false
469
469
  });
470
+ delegateOptionParsing(boundParser, parser, getInnerState);
470
471
  return fluent(boundParser);
471
472
  }
472
473
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/env",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "Environment variable support for Optique",
5
5
  "keywords": [
6
6
  "CLI",
@@ -60,10 +60,10 @@
60
60
  },
61
61
  "sideEffects": false,
62
62
  "dependencies": {
63
- "@optique/core": "1.2.8"
63
+ "@optique/core": "1.2.9"
64
64
  },
65
65
  "devDependencies": {
66
- "@optique/config": "1.2.8",
66
+ "@optique/config": "1.2.9",
67
67
  "@types/node": "^24.0.0",
68
68
  "fast-check": "^4.7.0",
69
69
  "tsdown": "^0.13.0",