@optique/run 1.0.0-dev.1901 → 1.0.0-dev.1970

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/run.cjs CHANGED
@@ -33,7 +33,7 @@ function run(parserOrProgram, options = {}) {
33
33
  }
34
34
  function runSync(parserOrProgram, options = {}) {
35
35
  const parserToCheck = "parser" in parserOrProgram && "metadata" in parserOrProgram ? parserOrProgram.parser : parserOrProgram;
36
- if (parserToCheck.$mode !== "sync") throw new TypeError("Cannot use an async parser with runSync(). Use run() or runAsync() instead.");
36
+ if (parserToCheck.mode !== "sync") throw new TypeError("Cannot use an async parser with runSync(). Use run() or runAsync() instead.");
37
37
  const contexts = options.contexts;
38
38
  if (contexts && contexts.length > 0) {
39
39
  const resolved = resolveProgramInput(parserOrProgram, options);
package/dist/run.js CHANGED
@@ -32,7 +32,7 @@ function run(parserOrProgram, options = {}) {
32
32
  }
33
33
  function runSync(parserOrProgram, options = {}) {
34
34
  const parserToCheck = "parser" in parserOrProgram && "metadata" in parserOrProgram ? parserOrProgram.parser : parserOrProgram;
35
- if (parserToCheck.$mode !== "sync") throw new TypeError("Cannot use an async parser with runSync(). Use run() or runAsync() instead.");
35
+ if (parserToCheck.mode !== "sync") throw new TypeError("Cannot use an async parser with runSync(). Use run() or runAsync() instead.");
36
36
  const contexts = options.contexts;
37
37
  if (contexts && contexts.length > 0) {
38
38
  const resolved = resolveProgramInput(parserOrProgram, options);
@@ -68,7 +68,7 @@ function path(options = {}) {
68
68
  const mustNotExist = "mustNotExist" in options ? options.mustNotExist : false;
69
69
  if (mustExist && mustNotExist) throw new TypeError("Options mustExist and mustNotExist are mutually exclusive.");
70
70
  return {
71
- $mode: "sync",
71
+ mode: "sync",
72
72
  metavar,
73
73
  placeholder: options.placeholder ?? ".",
74
74
  parse(input) {
@@ -67,7 +67,7 @@ function path(options = {}) {
67
67
  const mustNotExist = "mustNotExist" in options ? options.mustNotExist : false;
68
68
  if (mustExist && mustNotExist) throw new TypeError("Options mustExist and mustNotExist are mutually exclusive.");
69
69
  return {
70
- $mode: "sync",
70
+ mode: "sync",
71
71
  metavar,
72
72
  placeholder: options.placeholder ?? ".",
73
73
  parse(input) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/run",
3
- "version": "1.0.0-dev.1901+a2ce4da0",
3
+ "version": "1.0.0-dev.1970+0182ae32",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "sideEffects": false,
72
72
  "dependencies": {
73
- "@optique/core": "1.0.0-dev.1901+a2ce4da0"
73
+ "@optique/core": "1.0.0-dev.1970+0182ae32"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/node": "^20.19.9",