@oclif/core 3.0.0-beta.6 → 3.0.0-beta.8

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/lib/index.d.ts CHANGED
@@ -13,7 +13,7 @@ import * as Parser from './parser';
13
13
  import { Hook } from './interfaces/hooks';
14
14
  import settings, { Settings } from './settings';
15
15
  import { HelpSection, HelpSectionRenderer, HelpSectionKeyValueTable } from './help/formatter';
16
- import ux from './ux';
16
+ import * as ux from './ux';
17
17
  import { stderr, stdout } from './ux/stream';
18
18
  import Performance from './performance';
19
19
  import flush from './ux/flush';
package/lib/index.js CHANGED
@@ -34,8 +34,8 @@ const Parser = require("./parser");
34
34
  exports.Parser = Parser;
35
35
  const settings_1 = require("./settings");
36
36
  exports.settings = settings_1.default;
37
- const ux_1 = require("./ux");
38
- exports.ux = ux_1.default;
37
+ const ux = require("./ux");
38
+ exports.ux = ux;
39
39
  const stream_1 = require("./ux/stream");
40
40
  Object.defineProperty(exports, "stderr", { enumerable: true, get: function () { return stream_1.stderr; } });
41
41
  Object.defineProperty(exports, "stdout", { enumerable: true, get: function () { return stream_1.stdout; } });
@@ -5,7 +5,7 @@ export type { HelpOptions } from './help';
5
5
  export type { Hook, Hooks } from './hooks';
6
6
  export type { Manifest } from './manifest';
7
7
  export type { S3Manifest } from './s3-manifest';
8
- export type { Arg, BooleanFlag, Flag, OptionFlag, Deprecation, CustomOptions } from './parser';
8
+ export type { Arg, BooleanFlag, CustomOptions, Deprecation, Flag, FlagDefinition, OptionFlag, } from './parser';
9
9
  export type { PJSON } from './pjson';
10
10
  export type { Plugin, PluginOptions, Options } from './plugin';
11
11
  export type { Topic } from './topic';
package/lib/ux/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
+ import * as Errors from '../errors';
1
2
  import { ActionBase } from './action/base';
2
3
  import { config, Config } from './config';
3
4
  import { ExitError } from './exit';
4
5
  import { IPromptOptions } from './prompt';
5
6
  import * as styled from './styled';
6
7
  import { Table } from './styled';
8
+ export * from './styled/table';
7
9
  import * as uxPrompt from './prompt';
8
10
  import uxWait from './wait';
9
11
  export default class ux {
@@ -37,4 +39,26 @@ export default class ux {
37
39
  static exit(code?: number): never;
38
40
  static warn(err: Error | string): void;
39
41
  }
40
- export { ActionBase, config, Config, ExitError, IPromptOptions, Table, };
42
+ declare const action: ActionBase;
43
+ declare const annotation: typeof ux.annotation;
44
+ declare const anykey: typeof uxPrompt.anykey;
45
+ declare const confirm: typeof uxPrompt.confirm;
46
+ declare const debug: typeof ux.debug;
47
+ declare const done: typeof ux.done;
48
+ declare const error: typeof Errors.error;
49
+ declare const exit: typeof Errors.exit;
50
+ declare const flush: typeof ux.flush;
51
+ declare const info: typeof ux.info;
52
+ declare const log: typeof ux.log;
53
+ declare const progress: typeof styled.progress;
54
+ declare const prompt: typeof uxPrompt.prompt;
55
+ declare const styledHeader: typeof ux.styledHeader;
56
+ declare const styledJSON: typeof styled.styledJSON;
57
+ declare const styledObject: typeof ux.styledObject;
58
+ declare const table: typeof styled.Table.table;
59
+ declare const trace: typeof ux.trace;
60
+ declare const tree: typeof styled.tree;
61
+ declare const url: typeof ux.url;
62
+ declare const wait: (ms?: number) => Promise<void>;
63
+ declare const warn: typeof Errors.warn;
64
+ export { action, annotation, anykey, confirm, debug, done, error, exit, flush, info, log, progress, prompt, styledHeader, styledJSON, styledObject, table, trace, tree, url, wait, warn, ActionBase, config, Config, ExitError, IPromptOptions, Table, };
package/lib/ux/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Table = exports.ExitError = exports.Config = exports.config = exports.ActionBase = void 0;
3
+ exports.Table = exports.ExitError = exports.Config = exports.config = exports.ActionBase = exports.warn = exports.wait = exports.url = exports.tree = exports.trace = exports.table = exports.styledObject = exports.styledJSON = exports.styledHeader = exports.prompt = exports.progress = exports.log = exports.info = exports.flush = exports.exit = exports.error = exports.done = exports.debug = exports.confirm = exports.anykey = exports.annotation = exports.action = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const Errors = require("../errors");
5
6
  const util = require("util");
6
7
  const chalk = require("chalk");
@@ -14,10 +15,11 @@ Object.defineProperty(exports, "ExitError", { enumerable: true, get: function ()
14
15
  const styled = require("./styled");
15
16
  const styled_1 = require("./styled");
16
17
  Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return styled_1.Table; } });
18
+ tslib_1.__exportStar(require("./styled/table"), exports);
17
19
  const uxPrompt = require("./prompt");
18
20
  const wait_1 = require("./wait");
19
21
  const stream_1 = require("./stream");
20
- const flush_1 = require("./flush");
22
+ const _flush = require("./flush");
21
23
  const hyperlinker = require('hyperlinker');
22
24
  class ux {
23
25
  static get prompt() {
@@ -96,7 +98,7 @@ class ux {
96
98
  }
97
99
  }
98
100
  static async flush(ms = 10000) {
99
- await (0, flush_1.default)(ms);
101
+ await _flush.default(ms);
100
102
  }
101
103
  static error(err, options = {}) {
102
104
  throw Errors.error(err, options);
@@ -110,6 +112,50 @@ class ux {
110
112
  }
111
113
  exports.default = ux;
112
114
  ux.config = config_1.config;
115
+ const action = ux.action;
116
+ exports.action = action;
117
+ const annotation = ux.annotation;
118
+ exports.annotation = annotation;
119
+ const anykey = ux.anykey;
120
+ exports.anykey = anykey;
121
+ const confirm = ux.confirm;
122
+ exports.confirm = confirm;
123
+ const debug = ux.debug;
124
+ exports.debug = debug;
125
+ const done = ux.done;
126
+ exports.done = done;
127
+ const error = Errors.error;
128
+ exports.error = error;
129
+ const exit = Errors.exit;
130
+ exports.exit = exit;
131
+ const flush = ux.flush;
132
+ exports.flush = flush;
133
+ const info = ux.info;
134
+ exports.info = info;
135
+ const log = ux.log;
136
+ exports.log = log;
137
+ const progress = ux.progress;
138
+ exports.progress = progress;
139
+ const prompt = ux.prompt;
140
+ exports.prompt = prompt;
141
+ const styledHeader = ux.styledHeader;
142
+ exports.styledHeader = styledHeader;
143
+ const styledJSON = ux.styledJSON;
144
+ exports.styledJSON = styledJSON;
145
+ const styledObject = ux.styledObject;
146
+ exports.styledObject = styledObject;
147
+ const table = ux.table;
148
+ exports.table = table;
149
+ const trace = ux.trace;
150
+ exports.trace = trace;
151
+ const tree = ux.tree;
152
+ exports.tree = tree;
153
+ const url = ux.url;
154
+ exports.url = url;
155
+ const wait = ux.wait;
156
+ exports.wait = wait;
157
+ const warn = Errors.warn;
158
+ exports.warn = warn;
113
159
  const uxProcessExitHandler = async () => {
114
160
  try {
115
161
  await ux.done();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "3.0.0-beta.6",
4
+ "version": "3.0.0-beta.8",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -96,10 +96,8 @@
96
96
  "./execute": "./lib/execute.js",
97
97
  "./flush": "./lib/ux/flush.js",
98
98
  "./handle": "./lib/errors/handle.js",
99
- "./interfaces": "./lib/interfaces/index.js",
100
99
  "./run": "./lib/main.js",
101
- "./settings": "./lib/settings.js",
102
- "./ux": "./lib/ux/index.js"
100
+ "./settings": "./lib/settings.js"
103
101
  },
104
102
  "repository": "oclif/core",
105
103
  "oclif": {