@optique/core 1.3.0-dev.2390 → 1.3.0-dev.2394
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 +14 -3
- package/dist/constructs.js +14 -3
- package/package.json +2 -2
package/dist/constructs.cjs
CHANGED
|
@@ -104,13 +104,19 @@ function expandEffectfulRuntimeNodes(nodes) {
|
|
|
104
104
|
const expanded = [];
|
|
105
105
|
const visit = (node) => {
|
|
106
106
|
const meta = node.parser.dependencyMetadata;
|
|
107
|
-
|
|
107
|
+
const schedulingNodes = node.parser[require_dependency_runtime.effectfulSchedulingNodesKey];
|
|
108
|
+
const expandsThroughHook = schedulingNodes != null && meta?.derived == null && node.parser[require_dependency_runtime.sourceCollectionExpansionKey] === true;
|
|
109
|
+
if (!expandsThroughHook && (meta?.source?.completeSource != null || meta?.derived != null)) {
|
|
108
110
|
expanded.push(node);
|
|
109
111
|
return;
|
|
110
112
|
}
|
|
111
|
-
const schedulingNodes = node.parser[require_dependency_runtime.effectfulSchedulingNodesKey];
|
|
112
113
|
if (schedulingNodes != null) {
|
|
113
|
-
|
|
114
|
+
const children = schedulingNodes(node.state, node.path);
|
|
115
|
+
if (children.length === 0 && meta?.source != null) {
|
|
116
|
+
expanded.push(node);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
for (const child of children) visit(child);
|
|
114
120
|
return;
|
|
115
121
|
}
|
|
116
122
|
const pairs = node.parser[fieldParsersKey];
|
|
@@ -994,6 +1000,11 @@ function getNoMatchError(options, noMatchContext) {
|
|
|
994
1000
|
* when the committed branch completes.
|
|
995
1001
|
*/
|
|
996
1002
|
function defineExclusiveSchedulingNodes(exclusiveParser, parsers) {
|
|
1003
|
+
if (parsers.some((parser) => parser[require_dependency_runtime.sourceCollectionExpansionKey] === true)) Object.defineProperty(exclusiveParser, require_dependency_runtime.sourceCollectionExpansionKey, {
|
|
1004
|
+
value: true,
|
|
1005
|
+
configurable: true,
|
|
1006
|
+
enumerable: false
|
|
1007
|
+
});
|
|
997
1008
|
Object.defineProperty(exclusiveParser, require_dependency_runtime.staticSourceScopeKey, {
|
|
998
1009
|
value: parsers,
|
|
999
1010
|
configurable: true,
|
package/dist/constructs.js
CHANGED
|
@@ -104,13 +104,19 @@ function expandEffectfulRuntimeNodes(nodes) {
|
|
|
104
104
|
const expanded = [];
|
|
105
105
|
const visit = (node) => {
|
|
106
106
|
const meta = node.parser.dependencyMetadata;
|
|
107
|
-
|
|
107
|
+
const schedulingNodes = node.parser[effectfulSchedulingNodesKey];
|
|
108
|
+
const expandsThroughHook = schedulingNodes != null && meta?.derived == null && node.parser[sourceCollectionExpansionKey] === true;
|
|
109
|
+
if (!expandsThroughHook && (meta?.source?.completeSource != null || meta?.derived != null)) {
|
|
108
110
|
expanded.push(node);
|
|
109
111
|
return;
|
|
110
112
|
}
|
|
111
|
-
const schedulingNodes = node.parser[effectfulSchedulingNodesKey];
|
|
112
113
|
if (schedulingNodes != null) {
|
|
113
|
-
|
|
114
|
+
const children = schedulingNodes(node.state, node.path);
|
|
115
|
+
if (children.length === 0 && meta?.source != null) {
|
|
116
|
+
expanded.push(node);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
for (const child of children) visit(child);
|
|
114
120
|
return;
|
|
115
121
|
}
|
|
116
122
|
const pairs = node.parser[fieldParsersKey];
|
|
@@ -994,6 +1000,11 @@ function getNoMatchError(options, noMatchContext) {
|
|
|
994
1000
|
* when the committed branch completes.
|
|
995
1001
|
*/
|
|
996
1002
|
function defineExclusiveSchedulingNodes(exclusiveParser, parsers) {
|
|
1003
|
+
if (parsers.some((parser) => parser[sourceCollectionExpansionKey] === true)) Object.defineProperty(exclusiveParser, sourceCollectionExpansionKey, {
|
|
1004
|
+
value: true,
|
|
1005
|
+
configurable: true,
|
|
1006
|
+
enumerable: false
|
|
1007
|
+
});
|
|
997
1008
|
Object.defineProperty(exclusiveParser, staticSourceScopeKey, {
|
|
998
1009
|
value: parsers,
|
|
999
1010
|
configurable: true,
|
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.2394",
|
|
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.2394+c9cc5af6",
|
|
225
225
|
"@types/node": "^24.0.0",
|
|
226
226
|
"fast-check": "^4.7.0",
|
|
227
227
|
"tsdown": "^0.13.0",
|