@optique/core 1.3.0-dev.2385 → 1.3.0-dev.2388
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/constructs.cjs +277 -59
- package/dist/constructs.js +278 -60
- package/dist/dependency-runtime.cjs +86 -11
- package/dist/dependency-runtime.d.cts +128 -7
- package/dist/dependency-runtime.d.ts +128 -7
- package/dist/dependency-runtime.js +83 -11
- package/dist/facade.cjs +2 -1
- package/dist/facade.js +2 -1
- package/dist/internal/parser.cjs +2 -1
- package/dist/internal/parser.d.cts +10 -0
- package/dist/internal/parser.d.ts +10 -0
- package/dist/internal/parser.js +2 -1
- package/dist/primitives.cjs +10 -0
- package/dist/primitives.js +11 -1
- package/package.json +2 -2
package/dist/facade.js
CHANGED
|
@@ -144,7 +144,8 @@ function createRunWithSessions() {
|
|
|
144
144
|
...seedSession,
|
|
145
145
|
policy: "eager",
|
|
146
146
|
effectfulSources: /* @__PURE__ */ new Set(),
|
|
147
|
-
completedByPath: /* @__PURE__ */ new Map()
|
|
147
|
+
completedByPath: /* @__PURE__ */ new Map(),
|
|
148
|
+
preparedByPath: /* @__PURE__ */ new Map()
|
|
148
149
|
};
|
|
149
150
|
return {
|
|
150
151
|
seedSession,
|
package/dist/internal/parser.cjs
CHANGED
|
@@ -25,7 +25,8 @@ function createEffectfulCompletionSession(policy = "eager") {
|
|
|
25
25
|
results: /* @__PURE__ */ new Map(),
|
|
26
26
|
demanded: /* @__PURE__ */ new Set(),
|
|
27
27
|
effectfulSources: /* @__PURE__ */ new Set(),
|
|
28
|
-
completedByPath: /* @__PURE__ */ new Map()
|
|
28
|
+
completedByPath: /* @__PURE__ */ new Map(),
|
|
29
|
+
preparedByPath: /* @__PURE__ */ new Map()
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
@@ -470,6 +470,16 @@ interface EffectfulCompletionSession {
|
|
|
470
470
|
* the field's final value.
|
|
471
471
|
*/
|
|
472
472
|
readonly completedByPath: Map<string, ValueParserResult<unknown>>;
|
|
473
|
+
/**
|
|
474
|
+
* Prepared branch selections for `conditional()` parsers whose branch
|
|
475
|
+
* was resolved during the scheduling pass, keyed by parser occurrence
|
|
476
|
+
* and serialized path. Scoped to a single pass like
|
|
477
|
+
* {@link completedByPath}: phase-two bindings may change the
|
|
478
|
+
* selection, so the final pass of a `runWith()` run re-prepares.
|
|
479
|
+
* Final completion consumes the prepared decision instead of
|
|
480
|
+
* re-completing the discriminator or re-selecting a branch.
|
|
481
|
+
*/
|
|
482
|
+
readonly preparedByPath: Map<string, unknown>;
|
|
473
483
|
}
|
|
474
484
|
/**
|
|
475
485
|
* Creates a fresh {@link EffectfulCompletionSession}.
|
|
@@ -470,6 +470,16 @@ interface EffectfulCompletionSession {
|
|
|
470
470
|
* the field's final value.
|
|
471
471
|
*/
|
|
472
472
|
readonly completedByPath: Map<string, ValueParserResult<unknown>>;
|
|
473
|
+
/**
|
|
474
|
+
* Prepared branch selections for `conditional()` parsers whose branch
|
|
475
|
+
* was resolved during the scheduling pass, keyed by parser occurrence
|
|
476
|
+
* and serialized path. Scoped to a single pass like
|
|
477
|
+
* {@link completedByPath}: phase-two bindings may change the
|
|
478
|
+
* selection, so the final pass of a `runWith()` run re-prepares.
|
|
479
|
+
* Final completion consumes the prepared decision instead of
|
|
480
|
+
* re-completing the discriminator or re-selecting a branch.
|
|
481
|
+
*/
|
|
482
|
+
readonly preparedByPath: Map<string, unknown>;
|
|
473
483
|
}
|
|
474
484
|
/**
|
|
475
485
|
* Creates a fresh {@link EffectfulCompletionSession}.
|
package/dist/internal/parser.js
CHANGED
|
@@ -25,7 +25,8 @@ function createEffectfulCompletionSession(policy = "eager") {
|
|
|
25
25
|
results: /* @__PURE__ */ new Map(),
|
|
26
26
|
demanded: /* @__PURE__ */ new Set(),
|
|
27
27
|
effectfulSources: /* @__PURE__ */ new Set(),
|
|
28
|
-
completedByPath: /* @__PURE__ */ new Map()
|
|
28
|
+
completedByPath: /* @__PURE__ */ new Map(),
|
|
29
|
+
preparedByPath: /* @__PURE__ */ new Map()
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
/**
|
package/dist/primitives.cjs
CHANGED
|
@@ -1720,6 +1720,16 @@ function command(name, parser, options = {}) {
|
|
|
1720
1720
|
configurable: true,
|
|
1721
1721
|
enumerable: false
|
|
1722
1722
|
});
|
|
1723
|
+
Object.defineProperty(result, require_dependency_runtime.sourceCollectionExpansionKey, {
|
|
1724
|
+
value: true,
|
|
1725
|
+
configurable: true,
|
|
1726
|
+
enumerable: false
|
|
1727
|
+
});
|
|
1728
|
+
Object.defineProperty(result, require_dependency_runtime.staticSourceScopeKey, {
|
|
1729
|
+
value: [parser],
|
|
1730
|
+
configurable: true,
|
|
1731
|
+
enumerable: false
|
|
1732
|
+
});
|
|
1723
1733
|
return require_modifiers.fluent(result);
|
|
1724
1734
|
}
|
|
1725
1735
|
/**
|
package/dist/primitives.js
CHANGED
|
@@ -4,7 +4,7 @@ import { validateCommandNames, validateOptionNames } from "./validate.js";
|
|
|
4
4
|
import { extractOptionNames, isDocHidden, isSuggestionHidden } from "./usage.js";
|
|
5
5
|
import { dispatchByMode, dispatchIterableByMode, wrapForMode } from "./internal/mode-dispatch.js";
|
|
6
6
|
import { getDefaultValuesFunction, getDependencyIds, getSnapshottedDefaultDependencyValues, isDerivedValueParser, suggestWithDependency } from "./internal/dependency.js";
|
|
7
|
-
import { effectfulSchedulingNodesKey, replayDerivedParser, replayDerivedParserAsync } from "./dependency-runtime.js";
|
|
7
|
+
import { effectfulSchedulingNodesKey, replayDerivedParser, replayDerivedParserAsync, sourceCollectionExpansionKey, staticSourceScopeKey } from "./dependency-runtime.js";
|
|
8
8
|
import { getWrappedChildParseState, getWrappedChildState, isAnnotationWrappedInitialState, normalizeInjectedAnnotationState } from "./annotation-state.js";
|
|
9
9
|
import { hiddenCommandAliasesKey } from "./internal/command-alias.js";
|
|
10
10
|
import { mergeChildExec, withChildContext, withChildExecPath } from "./execution-context.js";
|
|
@@ -1720,6 +1720,16 @@ function command(name, parser, options = {}) {
|
|
|
1720
1720
|
configurable: true,
|
|
1721
1721
|
enumerable: false
|
|
1722
1722
|
});
|
|
1723
|
+
Object.defineProperty(result, sourceCollectionExpansionKey, {
|
|
1724
|
+
value: true,
|
|
1725
|
+
configurable: true,
|
|
1726
|
+
enumerable: false
|
|
1727
|
+
});
|
|
1728
|
+
Object.defineProperty(result, staticSourceScopeKey, {
|
|
1729
|
+
value: [parser],
|
|
1730
|
+
configurable: true,
|
|
1731
|
+
enumerable: false
|
|
1732
|
+
});
|
|
1723
1733
|
return fluent(result);
|
|
1724
1734
|
}
|
|
1725
1735
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optique/core",
|
|
3
|
-
"version": "1.3.0-dev.
|
|
3
|
+
"version": "1.3.0-dev.2388",
|
|
4
4
|
"description": "Type-safe combinatorial command-line interface parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
},
|
|
222
222
|
"sideEffects": false,
|
|
223
223
|
"devDependencies": {
|
|
224
|
-
"@optique/env": "1.3.0-dev.
|
|
224
|
+
"@optique/env": "1.3.0-dev.2388+055f7a0d",
|
|
225
225
|
"@types/node": "^24.0.0",
|
|
226
226
|
"fast-check": "^4.7.0",
|
|
227
227
|
"tsdown": "^0.13.0",
|