@optique/env 1.4.0-dev.2638 → 1.4.0-dev.2661

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
@@ -396,7 +396,7 @@ function bindEnv(parser, options) {
396
396
  parse: (context) => {
397
397
  const annotations = (0, __optique_core_annotations.getAnnotations)(context.state);
398
398
  const hadCliValue = isEnvBindState(context.state) && context.state.hasCliValue;
399
- const innerState = isEnvBindState(context.state) ? context.state.hasCliValue ? context.state.cliState : (0, __optique_core_extension.inheritAnnotations)(context.state, parser.initialState) : context.state;
399
+ const innerState = getInnerState(context.state);
400
400
  const innerContext = innerState !== context.state ? {
401
401
  ...context,
402
402
  state: innerState
@@ -523,6 +523,7 @@ function bindEnv(parser, options) {
523
523
  configurable: true,
524
524
  enumerable: false
525
525
  });
526
+ (0, __optique_core_extension.delegateOptionParsing)(boundParser, parser, getInnerState);
526
527
  return (0, __optique_core_fluent.fluent)(boundParser);
527
528
  }
528
529
  /**
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { formatUsageTerm, isDocHidden } from "@optique/core/usage";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { resolve } from "node:path";
5
5
  import { getAnnotations } from "@optique/core/annotations";
6
- import { defineTraits, delegateSuggestNodes, dispatchByMode, getTraits, inheritAnnotations, inheritOptionScope, injectAnnotations, isInjectedAnnotationState, mapModeValue, mapSourceMetadata, wrapForMode } from "@optique/core/extension";
6
+ import { defineTraits, delegateOptionParsing, delegateSuggestNodes, dispatchByMode, getTraits, inheritAnnotations, inheritOptionScope, injectAnnotations, isInjectedAnnotationState, mapModeValue, mapSourceMetadata, wrapForMode } from "@optique/core/extension";
7
7
  import { fluent } from "@optique/core/fluent";
8
8
  import { envVar, message, valueSet } from "@optique/core/message";
9
9
  import { ensureNonEmptyString, isValueParser } from "@optique/core/valueparser";
@@ -373,7 +373,7 @@ function bindEnv(parser, options) {
373
373
  parse: (context) => {
374
374
  const annotations = getAnnotations(context.state);
375
375
  const hadCliValue = isEnvBindState(context.state) && context.state.hasCliValue;
376
- const innerState = isEnvBindState(context.state) ? context.state.hasCliValue ? context.state.cliState : inheritAnnotations(context.state, parser.initialState) : context.state;
376
+ const innerState = getInnerState(context.state);
377
377
  const innerContext = innerState !== context.state ? {
378
378
  ...context,
379
379
  state: innerState
@@ -500,6 +500,7 @@ function bindEnv(parser, options) {
500
500
  configurable: true,
501
501
  enumerable: false
502
502
  });
503
+ delegateOptionParsing(boundParser, parser, getInnerState);
503
504
  return fluent(boundParser);
504
505
  }
505
506
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/env",
3
- "version": "1.4.0-dev.2638",
3
+ "version": "1.4.0-dev.2661",
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.4.0-dev.2638+75cb8142"
63
+ "@optique/core": "1.4.0-dev.2661+04e7de36"
64
64
  },
65
65
  "devDependencies": {
66
- "@optique/config": "1.4.0-dev.2638+75cb8142",
66
+ "@optique/config": "1.4.0-dev.2661+04e7de36",
67
67
  "@types/node": "^24.0.0",
68
68
  "fast-check": "^4.7.0",
69
69
  "tsdown": "^0.13.0",