@youcan/cli-kit 1.1.0-beta.13 → 1.1.0-beta.16

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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { Command as BaseCommand, ux } from '@oclif/core';
2
3
  import prompts from 'prompts';
3
4
  interface ExecOptions {
@@ -13,6 +14,8 @@ export declare const commonFlags: {
13
14
  export declare abstract class Command extends BaseCommand {
14
15
  output: typeof ux;
15
16
  prompt: typeof prompts;
17
+ controller: AbortController;
16
18
  clear(): void;
19
+ exit(code?: number | undefined): never;
17
20
  }
18
21
  export {};
package/dist/node/cli.js CHANGED
@@ -56,9 +56,14 @@ const commonFlags = {
56
56
  class Command extends Command$1 {
57
57
  output = ux;
58
58
  prompt = prompts;
59
+ controller = new AbortController();
59
60
  clear() {
60
61
  console.clear();
61
62
  }
63
+ exit(code) {
64
+ this.controller.abort();
65
+ return super.exit(code);
66
+ }
62
67
  }
63
68
 
64
69
  export { Command, commonFlags, exec, execCreate };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@youcan/cli-kit",
3
3
  "type": "module",
4
- "version": "1.1.0-beta.13",
4
+ "version": "1.1.0-beta.16",
5
5
  "description": "Utilities for the YouCan CLI",
6
6
  "author": "YouCan <contact@youcan.shop> (https://youcan.shop)",
7
7
  "license": "MIT",