@optique/core 1.0.0-dev.1697 → 1.0.0-dev.1699

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.
@@ -1627,9 +1627,18 @@ function object(labelOrParsers, maybeParsersOrOptions, maybeOptions) {
1627
1627
  if (currentContext.buffer.length === 0) {
1628
1628
  let allCanComplete = true;
1629
1629
  const getFieldState = createFieldStateGetter(currentContext.state);
1630
+ const probeExec = currentContext.exec ? {
1631
+ ...currentContext.exec,
1632
+ phase: "parse"
1633
+ } : {
1634
+ usage: [],
1635
+ path: [],
1636
+ trace: void 0,
1637
+ phase: "parse"
1638
+ };
1630
1639
  for (const [field, parser] of parserPairs) {
1631
1640
  const fieldState = getFieldState(field, parser);
1632
- const completeResult = parser.complete(fieldState, withChildExecPath(currentContext.exec, field));
1641
+ const completeResult = parser.complete(fieldState, withChildExecPath(probeExec, field));
1633
1642
  if (!completeResult.success) {
1634
1643
  allCanComplete = false;
1635
1644
  break;
@@ -1716,9 +1725,18 @@ function object(labelOrParsers, maybeParsersOrOptions, maybeOptions) {
1716
1725
  if (currentContext.buffer.length === 0) {
1717
1726
  let allCanComplete = true;
1718
1727
  const getFieldState = createFieldStateGetter(currentContext.state);
1728
+ const probeExec = currentContext.exec ? {
1729
+ ...currentContext.exec,
1730
+ phase: "parse"
1731
+ } : {
1732
+ usage: [],
1733
+ path: [],
1734
+ trace: void 0,
1735
+ phase: "parse"
1736
+ };
1719
1737
  for (const [field, parser] of parserPairs) {
1720
1738
  const fieldState = getFieldState(field, parser);
1721
- const completeResult = await parser.complete(fieldState, withChildExecPath(currentContext.exec, field));
1739
+ const completeResult = await parser.complete(fieldState, withChildExecPath(probeExec, field));
1722
1740
  if (!completeResult.success) {
1723
1741
  allCanComplete = false;
1724
1742
  break;
@@ -1627,9 +1627,18 @@ function object(labelOrParsers, maybeParsersOrOptions, maybeOptions) {
1627
1627
  if (currentContext.buffer.length === 0) {
1628
1628
  let allCanComplete = true;
1629
1629
  const getFieldState = createFieldStateGetter(currentContext.state);
1630
+ const probeExec = currentContext.exec ? {
1631
+ ...currentContext.exec,
1632
+ phase: "parse"
1633
+ } : {
1634
+ usage: [],
1635
+ path: [],
1636
+ trace: void 0,
1637
+ phase: "parse"
1638
+ };
1630
1639
  for (const [field, parser] of parserPairs) {
1631
1640
  const fieldState = getFieldState(field, parser);
1632
- const completeResult = parser.complete(fieldState, withChildExecPath(currentContext.exec, field));
1641
+ const completeResult = parser.complete(fieldState, withChildExecPath(probeExec, field));
1633
1642
  if (!completeResult.success) {
1634
1643
  allCanComplete = false;
1635
1644
  break;
@@ -1716,9 +1725,18 @@ function object(labelOrParsers, maybeParsersOrOptions, maybeOptions) {
1716
1725
  if (currentContext.buffer.length === 0) {
1717
1726
  let allCanComplete = true;
1718
1727
  const getFieldState = createFieldStateGetter(currentContext.state);
1728
+ const probeExec = currentContext.exec ? {
1729
+ ...currentContext.exec,
1730
+ phase: "parse"
1731
+ } : {
1732
+ usage: [],
1733
+ path: [],
1734
+ trace: void 0,
1735
+ phase: "parse"
1736
+ };
1719
1737
  for (const [field, parser] of parserPairs) {
1720
1738
  const fieldState = getFieldState(field, parser);
1721
- const completeResult = await parser.complete(fieldState, withChildExecPath(currentContext.exec, field));
1739
+ const completeResult = await parser.complete(fieldState, withChildExecPath(probeExec, field));
1722
1740
  if (!completeResult.success) {
1723
1741
  allCanComplete = false;
1724
1742
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.0.0-dev.1697+ea94a9ac",
3
+ "version": "1.0.0-dev.1699+b919c678",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",