@oclif/core 3.6.0 → 3.7.0
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/cli-ux/index.d.ts +1 -1
- package/lib/cli-ux/index.js +3 -3
- package/package.json +2 -2
- package/lib/cli-ux/stub.d.ts +0 -32
- package/lib/cli-ux/stub.js +0 -39
package/lib/cli-ux/index.d.ts
CHANGED
|
@@ -36,5 +36,5 @@ export { ActionBase } from './action/base';
|
|
|
36
36
|
export { Config, config } from './config';
|
|
37
37
|
export { ExitError } from './exit';
|
|
38
38
|
export { IPromptOptions } from './prompt';
|
|
39
|
-
export { makeStubs } from './stub';
|
|
40
39
|
export { Table } from './styled';
|
|
40
|
+
export { default as write } from './write';
|
package/lib/cli-ux/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.write = 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.logToStderr = exports.log = exports.info = exports.flush = exports.exit = exports.error = exports.done = exports.debug = exports.confirm = exports.anykey = exports.annotation = exports.action = exports.ux = void 0;
|
|
30
30
|
const chalk_1 = __importDefault(require("chalk"));
|
|
31
31
|
const node_util_1 = require("node:util");
|
|
32
32
|
const Errors = __importStar(require("../errors"));
|
|
@@ -175,7 +175,7 @@ Object.defineProperty(exports, "Config", { enumerable: true, get: function () {
|
|
|
175
175
|
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return config_2.config; } });
|
|
176
176
|
var exit_1 = require("./exit");
|
|
177
177
|
Object.defineProperty(exports, "ExitError", { enumerable: true, get: function () { return exit_1.ExitError; } });
|
|
178
|
-
var stub_1 = require("./stub");
|
|
179
|
-
Object.defineProperty(exports, "makeStubs", { enumerable: true, get: function () { return stub_1.makeStubs; } });
|
|
180
178
|
var styled_1 = require("./styled");
|
|
181
179
|
Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return styled_1.Table; } });
|
|
180
|
+
var write_2 = require("./write");
|
|
181
|
+
Object.defineProperty(exports, "write", { enumerable: true, get: function () { return __importDefault(write_2).default; } });
|
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.
|
|
4
|
+
"version": "3.7.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/core/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@oclif/plugin-help": "^5.2.8",
|
|
37
37
|
"@oclif/plugin-plugins": "^3.3.0",
|
|
38
38
|
"@oclif/prettier-config": "^0.2.1",
|
|
39
|
-
"@oclif/test": "^3.0.
|
|
39
|
+
"@oclif/test": "^3.0.3",
|
|
40
40
|
"@types/ansi-styles": "^3.2.1",
|
|
41
41
|
"@types/benchmark": "^2.1.2",
|
|
42
42
|
"@types/chai": "^4.3.8",
|
package/lib/cli-ux/stub.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { SinonSandbox, SinonStub } from 'sinon';
|
|
2
|
-
type Stubs = {
|
|
3
|
-
stderr: SinonStub;
|
|
4
|
-
stdout: SinonStub;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Create sinon stubs for writing to stdout and stderr.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* import {ux} from '@oclif/core'
|
|
11
|
-
*
|
|
12
|
-
* describe('example', () => {
|
|
13
|
-
* let sandbox: SinonSandbox
|
|
14
|
-
* let stubs: ReturnType<typeof ux.makeStubs>
|
|
15
|
-
*
|
|
16
|
-
* beforeEach(() => {
|
|
17
|
-
* sandbox = createSandbox()
|
|
18
|
-
* stubs = ux.makeStubs(sandbox)
|
|
19
|
-
* })
|
|
20
|
-
*
|
|
21
|
-
* afterEach(() => {
|
|
22
|
-
* sandbox.restore()
|
|
23
|
-
* })
|
|
24
|
-
*
|
|
25
|
-
* it('should log text to the console', () => {
|
|
26
|
-
* ux.log('Hello, world!')
|
|
27
|
-
* expect(stubs.stdout.firstCall.firstArg).to.equal('Hello, world!\n')
|
|
28
|
-
* })
|
|
29
|
-
* })
|
|
30
|
-
*/
|
|
31
|
-
export declare function makeStubs(sandbox: SinonSandbox): Stubs;
|
|
32
|
-
export {};
|
package/lib/cli-ux/stub.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.makeStubs = void 0;
|
|
7
|
-
const write_1 = __importDefault(require("./write"));
|
|
8
|
-
/**
|
|
9
|
-
* Create sinon stubs for writing to stdout and stderr.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* import {ux} from '@oclif/core'
|
|
13
|
-
*
|
|
14
|
-
* describe('example', () => {
|
|
15
|
-
* let sandbox: SinonSandbox
|
|
16
|
-
* let stubs: ReturnType<typeof ux.makeStubs>
|
|
17
|
-
*
|
|
18
|
-
* beforeEach(() => {
|
|
19
|
-
* sandbox = createSandbox()
|
|
20
|
-
* stubs = ux.makeStubs(sandbox)
|
|
21
|
-
* })
|
|
22
|
-
*
|
|
23
|
-
* afterEach(() => {
|
|
24
|
-
* sandbox.restore()
|
|
25
|
-
* })
|
|
26
|
-
*
|
|
27
|
-
* it('should log text to the console', () => {
|
|
28
|
-
* ux.log('Hello, world!')
|
|
29
|
-
* expect(stubs.stdout.firstCall.firstArg).to.equal('Hello, world!\n')
|
|
30
|
-
* })
|
|
31
|
-
* })
|
|
32
|
-
*/
|
|
33
|
-
function makeStubs(sandbox) {
|
|
34
|
-
return {
|
|
35
|
-
stderr: sandbox.stub(write_1.default, 'stderr'),
|
|
36
|
-
stdout: sandbox.stub(write_1.default, 'stdout'),
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
exports.makeStubs = makeStubs;
|