@kaynooo/cli-wt 0.1.3 → 0.1.5

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.
Files changed (2) hide show
  1. package/dist/cli.js +8 -1
  2. package/package.json +3 -3
package/dist/cli.js CHANGED
@@ -466,7 +466,7 @@ function nearestOption(message, options, allowNegative) {
466
466
  const meant = closest(word, known.map((flag) => flag.replace(DASHES, "")));
467
467
  return meant === undefined ? undefined : `did you mean ${known.find((flag) => flag.replace(DASHES, "") === meant)}?`;
468
468
  }
469
- var DASHES, Exit, UsageError, HelpShown, completion, OUTPUT_OPTIONS, UNKNOWN_OPTION;
469
+ var DASHES, EXIT, Exit, UsageError, HelpShown, completion, OUTPUT_OPTIONS, UNKNOWN_OPTION;
470
470
  var init_args = __esm(() => {
471
471
  init_format();
472
472
  init_help();
@@ -474,14 +474,21 @@ var init_args = __esm(() => {
474
474
  init_help();
475
475
  init_input();
476
476
  DASHES = /^-+/;
477
+ EXIT = Symbol.for("@kaynooo/cli-kit/Exit");
477
478
  Exit = class Exit extends Error {
478
479
  code;
479
480
  hint;
481
+ [EXIT] = true;
480
482
  constructor(message, code, hint) {
481
483
  super(message);
482
484
  this.code = code;
483
485
  this.hint = hint;
484
486
  }
487
+ static [Symbol.hasInstance](value) {
488
+ if (this !== Exit)
489
+ return Function.prototype[Symbol.hasInstance].call(this, value);
490
+ return typeof value === "object" && value !== null && value[EXIT] === true;
491
+ }
485
492
  };
486
493
  UsageError = class UsageError extends Exit {
487
494
  constructor(message, hint) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kaynooo/cli-wt",
3
3
  "type": "module",
4
- "version": "0.1.3",
4
+ "version": "0.1.5",
5
5
  "description": "wt: git worktrees of a compose project, each with its own stack, data and <task>.<host> subdomains beside main.",
6
6
  "author": "Kaynooo <contact@kaynooo.fr>",
7
7
  "license": "MIT",
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@kaynooo/cli-env": "0.15.0",
35
- "@kaynooo/cli-kit": "0.45.0",
36
- "@kaynooo/devproxy": "0.2.0",
35
+ "@kaynooo/cli-kit": "0.45.1",
36
+ "@kaynooo/devproxy": "0.2.1",
37
37
  "@kaynooo/utils": "3.1.0"
38
38
  }
39
39
  }