@heroku/heroku-cli-util 9.0.0 → 9.0.1-beta.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/README.md +15 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.js +5 -1
- package/dist/ux/styled-json.d.ts +1 -1
- package/dist/ux/styled-json.js +2 -2
- package/dist/ux/table.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,10 +30,24 @@ import { hux } from '@heroku/heroku-cli-util';
|
|
|
30
30
|
hux.styledHeader('My CLI Header');
|
|
31
31
|
|
|
32
32
|
// Styled JSON
|
|
33
|
-
hux.
|
|
33
|
+
hux.styledJSON({ foo: 'bar' });
|
|
34
34
|
|
|
35
35
|
// Styled object
|
|
36
36
|
hux.styledObject({ foo: 'bar' });
|
|
37
|
+
|
|
38
|
+
// Table output
|
|
39
|
+
hux.table([
|
|
40
|
+
{name: 'Alice', age: 30},
|
|
41
|
+
{name: 'Bob', age: 25},
|
|
42
|
+
], {
|
|
43
|
+
name: {header: 'Name'},
|
|
44
|
+
age: {header: 'Age'},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// Wait indicator
|
|
48
|
+
const stop = hux.wait('Processing...');
|
|
49
|
+
// ...do async work...
|
|
50
|
+
stop();
|
|
37
51
|
```
|
|
38
52
|
|
|
39
53
|
### User Interaction
|
package/dist/index.d.ts
CHANGED
|
@@ -10,8 +10,10 @@ import { exec } from './utils/pg/psql';
|
|
|
10
10
|
import { confirm } from './ux/confirm';
|
|
11
11
|
import { prompt } from './ux/prompt';
|
|
12
12
|
import { styledHeader } from './ux/styled-header';
|
|
13
|
-
import {
|
|
13
|
+
import { styledJSON } from './ux/styled-json';
|
|
14
14
|
import { styledObject } from './ux/styled-object';
|
|
15
|
+
import { table } from './ux/table';
|
|
16
|
+
import { wait } from './ux/wait';
|
|
15
17
|
export declare const testHelpers: {
|
|
16
18
|
expectOutput: (actual: string, expected: string) => Chai.Assertion;
|
|
17
19
|
initCliTest: typeof initCliTest;
|
|
@@ -48,6 +50,8 @@ export declare const hux: {
|
|
|
48
50
|
confirm: typeof confirm;
|
|
49
51
|
prompt: typeof prompt;
|
|
50
52
|
styledHeader: typeof styledHeader;
|
|
51
|
-
|
|
53
|
+
styledJSON: typeof styledJSON;
|
|
52
54
|
styledObject: typeof styledObject;
|
|
55
|
+
table: typeof table;
|
|
56
|
+
wait: typeof wait;
|
|
53
57
|
};
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,8 @@ const prompt_1 = require("./ux/prompt");
|
|
|
15
15
|
const styled_header_1 = require("./ux/styled-header");
|
|
16
16
|
const styled_json_1 = require("./ux/styled-json");
|
|
17
17
|
const styled_object_1 = require("./ux/styled-object");
|
|
18
|
+
const table_1 = require("./ux/table");
|
|
19
|
+
const wait_1 = require("./ux/wait");
|
|
18
20
|
exports.testHelpers = {
|
|
19
21
|
expectOutput: expect_output_1.default,
|
|
20
22
|
initCliTest: init_1.initCliTest,
|
|
@@ -51,6 +53,8 @@ exports.hux = {
|
|
|
51
53
|
confirm: confirm_1.confirm,
|
|
52
54
|
prompt: prompt_1.prompt,
|
|
53
55
|
styledHeader: styled_header_1.styledHeader,
|
|
54
|
-
|
|
56
|
+
styledJSON: styled_json_1.styledJSON,
|
|
55
57
|
styledObject: styled_object_1.styledObject,
|
|
58
|
+
table: table_1.table,
|
|
59
|
+
wait: wait_1.wait,
|
|
56
60
|
};
|
package/dist/ux/styled-json.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function styledJSON(obj: unknown): void;
|
package/dist/ux/styled-json.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.styledJSON = styledJSON;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
function
|
|
5
|
+
function styledJSON(obj) {
|
|
6
6
|
return core_1.ux.styledJSON(obj);
|
|
7
7
|
}
|
package/dist/ux/table.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function table<T extends Record<string, unknown>>(data: T[], columns: Parameters<typeof
|
|
1
|
+
import { table as cliTable } from '@oclif/core/lib/cli-ux';
|
|
2
|
+
export declare function table<T extends Record<string, unknown>>(data: T[], columns: Parameters<typeof cliTable>[1], options?: Parameters<typeof cliTable>[2]): void;
|