bump-cli 2.2.1 → 2.2.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.
- package/README.md +11 -1
- package/lib/api/error.js +3 -3
- package/lib/api/index.js +3 -3
- package/lib/api/models.d.ts +1 -0
- package/lib/args.d.ts +5 -1
- package/lib/args.js +7 -2
- package/lib/cli/index.js +2 -2
- package/lib/cli/styled/success.js +1 -1
- package/lib/command.js +3 -3
- package/lib/commands/deploy.js +2 -2
- package/lib/commands/diff.d.ts +2 -1
- package/lib/commands/diff.js +52 -27
- package/lib/commands/preview.js +3 -3
- package/lib/definition.js +6 -4
- package/lib/flags.js +1 -1
- package/lib/index.js +3 -3
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -114,12 +114,22 @@ From a Bump documentation, the `diff` command will retrieve a comparaison change
|
|
|
114
114
|
|
|
115
115
|
```sh-session
|
|
116
116
|
$ bump diff path/to/your/file.yml --doc DOC_ID_OR_SLUG --token DOC_TOKEN
|
|
117
|
-
* Let's compare the given definition
|
|
117
|
+
* Let's compare the given definition file with the currently deployed one... done
|
|
118
118
|
|
|
119
119
|
Updated: POST /validations
|
|
120
120
|
Body attribute modified: documentation
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
+
If you want to compare two unpublished versions of your definition file, the `diff` command can retrieve a comparaison changelog between two given file or URL, “as simple as `git diff`”:
|
|
124
|
+
|
|
125
|
+
```sh-session
|
|
126
|
+
$ bump diff path/to/your/file.yml path/to/your/next-file.yml --doc <doc_slug> --token <your_doc_token>
|
|
127
|
+
* Let's compare the two given definition files... done
|
|
128
|
+
|
|
129
|
+
Updated: POST /versions
|
|
130
|
+
Body attribute added: previous_version_id
|
|
131
|
+
```
|
|
132
|
+
|
|
123
133
|
_Note: you can use the `--open` flag to open the visual diff URL in your browser directly._
|
|
124
134
|
|
|
125
135
|
Please check `bump diff --help` for full usage details.
|
package/lib/api/error.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const errors_1 = require("@oclif/errors");
|
|
5
|
-
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
|
-
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
7
|
-
const debug = debug_1.default('bump-cli:api-client');
|
|
5
|
+
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
6
|
+
const debug_1 = (0, tslib_1.__importDefault)(require("debug"));
|
|
7
|
+
const debug = (0, debug_1.default)('bump-cli:api-client');
|
|
8
8
|
class APIError extends errors_1.CLIError {
|
|
9
9
|
constructor(httpError, info = [], exit = 100) {
|
|
10
10
|
var _a, _b;
|
package/lib/api/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.APIError = exports.BumpApi = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
5
|
+
const axios_1 = (0, tslib_1.__importDefault)(require("axios"));
|
|
6
6
|
const vars_1 = require("./vars");
|
|
7
|
-
const error_1 = tslib_1.__importDefault(require("./error"));
|
|
7
|
+
const error_1 = (0, tslib_1.__importDefault)(require("./error"));
|
|
8
8
|
exports.APIError = error_1.default;
|
|
9
9
|
class BumpApi {
|
|
10
10
|
// Check https://oclif.io/docs/config for details about Config.IConfig
|
|
@@ -53,4 +53,4 @@ class BumpApi {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
exports.BumpApi = BumpApi;
|
|
56
|
-
tslib_1.__exportStar(require("./models"), exports);
|
|
56
|
+
(0, tslib_1.__exportStar)(require("./models"), exports);
|
package/lib/api/models.d.ts
CHANGED
package/lib/args.d.ts
CHANGED
package/lib/args.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fileArg = void 0;
|
|
3
|
+
exports.otherFileArg = exports.fileArg = void 0;
|
|
4
4
|
const fileArg = {
|
|
5
5
|
name: 'FILE',
|
|
6
6
|
required: true,
|
|
7
|
-
description: 'Path or URL to your API documentation file. OpenAPI (2.0 to 3.1.0) and AsyncAPI (2.0) specifications are currently supported.',
|
|
7
|
+
description: 'Path or URL to your API documentation file. OpenAPI (2.0 to 3.1.0) and AsyncAPI (2.0 to 2.2) specifications are currently supported.',
|
|
8
8
|
};
|
|
9
9
|
exports.fileArg = fileArg;
|
|
10
|
+
const otherFileArg = {
|
|
11
|
+
name: 'FILE2',
|
|
12
|
+
description: 'Path or URL to a second API documentation file to compute its diff',
|
|
13
|
+
};
|
|
14
|
+
exports.otherFileArg = otherFileArg;
|
package/lib/cli/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.cli = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const cli_ux_1 = tslib_1.__importDefault(require("cli-ux"));
|
|
6
|
-
const success_1 = tslib_1.__importDefault(require("./styled/success"));
|
|
5
|
+
const cli_ux_1 = (0, tslib_1.__importDefault)(require("cli-ux"));
|
|
6
|
+
const success_1 = (0, tslib_1.__importDefault)(require("./styled/success"));
|
|
7
7
|
if (process.env.BUMP_LOG_LEVEL) {
|
|
8
8
|
const logLevel = process.env.BUMP_LOG_LEVEL;
|
|
9
9
|
cli_ux_1.default.config['outputLevel'] = logLevel;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
4
|
+
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
5
5
|
function styledSuccess(message) {
|
|
6
6
|
const lines = message.split('\n');
|
|
7
7
|
for (let i = 0; i < lines.length; i++) {
|
package/lib/command.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const command_1 = require("@oclif/command");
|
|
5
|
-
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
5
|
+
const debug_1 = (0, tslib_1.__importDefault)(require("debug"));
|
|
6
6
|
const definition_1 = require("./definition");
|
|
7
7
|
const api_1 = require("./api");
|
|
8
|
-
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
8
|
+
const package_json_1 = (0, tslib_1.__importDefault)(require("../package.json"));
|
|
9
9
|
class Command extends command_1.Command {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
@@ -29,7 +29,7 @@ class Command extends command_1.Command {
|
|
|
29
29
|
// Debugger(formatter: any, ...args: any[]): void;
|
|
30
30
|
/* eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */
|
|
31
31
|
d(formatter, ...args) {
|
|
32
|
-
return debug_1.default(`bump-cli:command:${this.constructor.name.toLowerCase()}`)(formatter, ...args);
|
|
32
|
+
return (0, debug_1.default)(`bump-cli:command:${this.constructor.name.toLowerCase()}`)(formatter, ...args);
|
|
33
33
|
}
|
|
34
34
|
async pollingDelay() {
|
|
35
35
|
return await this.delay(this.pollingPeriod);
|
package/lib/commands/deploy.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const command_1 = tslib_1.__importDefault(require("../command"));
|
|
5
|
-
const flags = tslib_1.__importStar(require("../flags"));
|
|
4
|
+
const command_1 = (0, tslib_1.__importDefault)(require("../command"));
|
|
5
|
+
const flags = (0, tslib_1.__importStar)(require("../flags"));
|
|
6
6
|
const args_1 = require("../args");
|
|
7
7
|
const cli_1 = require("../cli");
|
|
8
8
|
class Deploy extends command_1.default {
|
package/lib/commands/diff.d.ts
CHANGED
|
@@ -13,10 +13,11 @@ export default class Diff extends Command {
|
|
|
13
13
|
};
|
|
14
14
|
static args: {
|
|
15
15
|
name: string;
|
|
16
|
-
required: boolean;
|
|
17
16
|
description: string;
|
|
18
17
|
}[];
|
|
19
18
|
run(): Promise<VersionResponse | void>;
|
|
19
|
+
createVersion(file: string, documentation: string, token: string, hub: string | undefined, previous_version_id?: string | undefined): Promise<VersionResponse | undefined>;
|
|
20
|
+
displayCompareResult(result: VersionResponse, token: string, open: boolean): Promise<void>;
|
|
20
21
|
waitChangesResult(versionId: string, token: string, opts: {
|
|
21
22
|
timeout: number;
|
|
22
23
|
}): Promise<VersionResponse>;
|
package/lib/commands/diff.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const errors_1 = require("@oclif/errors");
|
|
5
|
-
const command_1 = tslib_1.__importDefault(require("../command"));
|
|
6
|
-
const flags = tslib_1.__importStar(require("../flags"));
|
|
5
|
+
const command_1 = (0, tslib_1.__importDefault)(require("../command"));
|
|
6
|
+
const flags = (0, tslib_1.__importStar)(require("../flags"));
|
|
7
7
|
const args_1 = require("../args");
|
|
8
8
|
const cli_1 = require("../cli");
|
|
9
9
|
class Diff extends command_1.default {
|
|
@@ -15,44 +15,62 @@ class Diff extends command_1.default {
|
|
|
15
15
|
*/
|
|
16
16
|
async run() {
|
|
17
17
|
const { args, flags } = this.parse(Diff);
|
|
18
|
-
const [definition, references] = await this.prepareDefinition(args.FILE);
|
|
19
18
|
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
20
|
-
const [documentation, token] = [flags.doc, flags.token];
|
|
21
|
-
|
|
19
|
+
const [documentation, hub, token] = [flags.doc, flags.hub, flags.token];
|
|
20
|
+
if (args.FILE2) {
|
|
21
|
+
cli_1.cli.action.start("* Let's compare the two given definition files");
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
cli_1.cli.action.start("* Let's compare the given definition file with the currently deployed one");
|
|
25
|
+
}
|
|
26
|
+
const version = await this.createVersion(args.FILE, documentation, token, hub);
|
|
27
|
+
let diffVersion = undefined;
|
|
28
|
+
if (args.FILE2) {
|
|
29
|
+
diffVersion = await this.createVersion(args.FILE2, documentation, token, hub, version && version.id);
|
|
30
|
+
}
|
|
31
|
+
diffVersion = diffVersion || version;
|
|
32
|
+
if (diffVersion) {
|
|
33
|
+
diffVersion = await this.waitChangesResult(diffVersion.id, token, {
|
|
34
|
+
timeout: 30,
|
|
35
|
+
});
|
|
36
|
+
await this.displayCompareResult(diffVersion, token, flags.open);
|
|
37
|
+
}
|
|
38
|
+
cli_1.cli.action.stop();
|
|
39
|
+
return diffVersion;
|
|
40
|
+
}
|
|
41
|
+
async createVersion(file, documentation, token, hub, previous_version_id = undefined) {
|
|
42
|
+
const [definition, references] = await this.prepareDefinition(file);
|
|
22
43
|
const request = {
|
|
23
44
|
documentation,
|
|
24
|
-
hub
|
|
45
|
+
hub,
|
|
25
46
|
definition,
|
|
26
47
|
references,
|
|
27
48
|
unpublished: true,
|
|
49
|
+
previous_version_id,
|
|
28
50
|
};
|
|
29
51
|
const response = await this.bump.postVersion(request, token);
|
|
30
52
|
switch (response.status) {
|
|
31
53
|
case 201:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
version = await this.waitChangesResult(version.id, token, {
|
|
35
|
-
timeout: 30,
|
|
36
|
-
});
|
|
37
|
-
cli_1.cli.action.stop();
|
|
38
|
-
if (version && version.diff_summary) {
|
|
39
|
-
await cli_1.cli.log(version.diff_summary);
|
|
40
|
-
if (flags.open && version.diff_public_url) {
|
|
41
|
-
await cli_1.cli.open(version.diff_public_url);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
this.warn('There were no structural changes in your new definition');
|
|
46
|
-
}
|
|
47
|
-
return version;
|
|
54
|
+
this.d(`Unpublished version created with ID ${response.data.id}`);
|
|
55
|
+
return response.data;
|
|
48
56
|
break;
|
|
49
57
|
case 204:
|
|
50
|
-
cli_1.cli.action.stop();
|
|
51
58
|
this.warn('Your documentation has not changed');
|
|
52
59
|
break;
|
|
53
60
|
}
|
|
54
61
|
return;
|
|
55
62
|
}
|
|
63
|
+
async displayCompareResult(result, token, open) {
|
|
64
|
+
if (result && result.diff_summary) {
|
|
65
|
+
await cli_1.cli.log(result.diff_summary);
|
|
66
|
+
if (open && result.diff_public_url) {
|
|
67
|
+
await cli_1.cli.open(result.diff_public_url);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.warn('There were no structural changes in your new definition');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
56
74
|
async waitChangesResult(versionId, token, opts) {
|
|
57
75
|
const diffResponse = await this.bump.getVersion(versionId, token);
|
|
58
76
|
if (opts.timeout <= 0) {
|
|
@@ -82,14 +100,14 @@ Diff.examples = [
|
|
|
82
100
|
`Compare a potential new version with the currently published one:
|
|
83
101
|
|
|
84
102
|
$ bump diff FILE --doc <your_doc_id_or_slug> --token <your_doc_token>
|
|
85
|
-
* Let's compare the given definition
|
|
103
|
+
* Let's compare the given definition file with the currently deployed one... done
|
|
86
104
|
Removed: GET /compare
|
|
87
105
|
Added: GET /versions/{versionId}
|
|
88
106
|
`,
|
|
89
107
|
`Store the diff in a dedicated file:
|
|
90
108
|
|
|
91
109
|
$ bump diff FILE --doc <doc_slug> --token <doc_token> > /tmp/my-saved-diff
|
|
92
|
-
* Let's compare the given definition
|
|
110
|
+
* Let's compare the given definition file with the currently deployed one... done
|
|
93
111
|
|
|
94
112
|
$ cat /tmp/my-saved-diff
|
|
95
113
|
Removed: GET /compare
|
|
@@ -98,8 +116,15 @@ Diff.examples = [
|
|
|
98
116
|
`In case of a non modified definition FILE compared to your existing documentation, no changes are output:
|
|
99
117
|
|
|
100
118
|
$ bump diff FILE --doc <doc_slug> --token <your_doc_token>
|
|
101
|
-
* Let's compare the given definition
|
|
119
|
+
* Let's compare the given definition file with the currently deployed one... done
|
|
102
120
|
› Warning: Your documentation has not changed
|
|
121
|
+
`,
|
|
122
|
+
`Compare two different input files or URL independently to the one published on bump.sh
|
|
123
|
+
|
|
124
|
+
$ bump diff FILE FILE2 --doc <doc_slug> --token <your_doc_token>
|
|
125
|
+
* Let's compare the two given definition files... done
|
|
126
|
+
Updated: POST /versions
|
|
127
|
+
Body attribute added: previous_version_id
|
|
103
128
|
`,
|
|
104
129
|
];
|
|
105
130
|
Diff.flags = {
|
|
@@ -109,4 +134,4 @@ Diff.flags = {
|
|
|
109
134
|
token: flags.token(),
|
|
110
135
|
open: flags.open({ description: 'Open the visual diff in your browser' }),
|
|
111
136
|
};
|
|
112
|
-
Diff.args = [args_1.fileArg];
|
|
137
|
+
Diff.args = [args_1.fileArg, args_1.otherFileArg];
|
package/lib/commands/preview.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const command_1 = tslib_1.__importDefault(require("../command"));
|
|
5
|
-
const flags = tslib_1.__importStar(require("../flags"));
|
|
4
|
+
const command_1 = (0, tslib_1.__importDefault)(require("../command"));
|
|
5
|
+
const flags = (0, tslib_1.__importStar)(require("../flags"));
|
|
6
6
|
const args_1 = require("../args");
|
|
7
7
|
const cli_1 = require("../cli");
|
|
8
8
|
const fs_1 = require("fs");
|
|
@@ -43,7 +43,7 @@ class Preview extends command_1.default {
|
|
|
43
43
|
const mutex = new async_mutex_1.Mutex();
|
|
44
44
|
let currentPreview = undefined;
|
|
45
45
|
cli_1.cli.action.start(`Waiting for changes on file ${file}...`);
|
|
46
|
-
fs_1.watch(file, async () => {
|
|
46
|
+
(0, fs_1.watch)(file, async () => {
|
|
47
47
|
if (!mutex.isLocked()) {
|
|
48
48
|
const release = await mutex.acquire();
|
|
49
49
|
const firstOpen = !currentPreview && open;
|
package/lib/definition.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.API = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const errors_1 = require("@oclif/errors");
|
|
6
|
-
const json_schema_ref_parser_1 = tslib_1.__importDefault(require("@apidevtools/json-schema-ref-parser"));
|
|
6
|
+
const json_schema_ref_parser_1 = (0, tslib_1.__importDefault)(require("@apidevtools/json-schema-ref-parser"));
|
|
7
7
|
const options_1 = require("@apidevtools/json-schema-ref-parser/lib/options");
|
|
8
|
-
const specs_1 = tslib_1.__importDefault(require("@asyncapi/specs"));
|
|
9
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
8
|
+
const specs_1 = (0, tslib_1.__importDefault)(require("@asyncapi/specs"));
|
|
9
|
+
const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
10
10
|
class SupportedFormat {
|
|
11
11
|
}
|
|
12
12
|
SupportedFormat.openapi = {
|
|
@@ -16,6 +16,8 @@ SupportedFormat.openapi = {
|
|
|
16
16
|
};
|
|
17
17
|
SupportedFormat.asyncapi = {
|
|
18
18
|
'2.0.0': specs_1.default['2.0.0'],
|
|
19
|
+
'2.1.0': specs_1.default['2.1.0'],
|
|
20
|
+
'2.2.0': specs_1.default['2.2.0'],
|
|
19
21
|
};
|
|
20
22
|
class UnsupportedFormat extends errors_1.CLIError {
|
|
21
23
|
constructor(message = '') {
|
|
@@ -23,7 +25,7 @@ class UnsupportedFormat extends errors_1.CLIError {
|
|
|
23
25
|
const compatAsyncAPI = Object.keys(SupportedFormat.asyncapi).join(', ');
|
|
24
26
|
const errorMsgs = [
|
|
25
27
|
`Unsupported API specification (${message})`,
|
|
26
|
-
`Please try again with an OpenAPI ${compatOpenAPI} or AsyncAPI ${compatAsyncAPI}
|
|
28
|
+
`Please try again with an OpenAPI ${compatOpenAPI} or AsyncAPI ${compatAsyncAPI} file.`,
|
|
27
29
|
];
|
|
28
30
|
super(errorMsgs.join('\n'));
|
|
29
31
|
}
|
package/lib/flags.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.live = exports.open = exports.dryRun = exports.autoCreate = exports.toke
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const command_1 = require("@oclif/command");
|
|
6
6
|
// Re-export oclif flags https://oclif.io/docs/flags
|
|
7
|
-
tslib_1.__exportStar(require("@oclif/command/lib/flags"), exports);
|
|
7
|
+
(0, tslib_1.__exportStar)(require("@oclif/command/lib/flags"), exports);
|
|
8
8
|
// Custom flags for bum-cli
|
|
9
9
|
const doc = command_1.flags.build({
|
|
10
10
|
char: 'd',
|
package/lib/index.js
CHANGED
|
@@ -4,9 +4,9 @@ exports.Preview = exports.Diff = exports.Deploy = exports.run = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const command_1 = require("@oclif/command");
|
|
6
6
|
Object.defineProperty(exports, "run", { enumerable: true, get: function () { return command_1.run; } });
|
|
7
|
-
const diff_1 = tslib_1.__importDefault(require("./commands/diff"));
|
|
7
|
+
const diff_1 = (0, tslib_1.__importDefault)(require("./commands/diff"));
|
|
8
8
|
exports.Diff = diff_1.default;
|
|
9
|
-
const deploy_1 = tslib_1.__importDefault(require("./commands/deploy"));
|
|
9
|
+
const deploy_1 = (0, tslib_1.__importDefault)(require("./commands/deploy"));
|
|
10
10
|
exports.Deploy = deploy_1.default;
|
|
11
|
-
const preview_1 = tslib_1.__importDefault(require("./commands/preview"));
|
|
11
|
+
const preview_1 = (0, tslib_1.__importDefault)(require("./commands/preview"));
|
|
12
12
|
exports.Preview = preview_1.default;
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.2.
|
|
1
|
+
{"version":"2.2.5","commands":{"deploy":{"id":"deploy","description":"create a new version of your documentation from the given file or URL","pluginName":"bump-cli","pluginType":"core","aliases":[],"examples":["Deploy a new version of an existing documentation\n\n$ bump deploy FILE --doc <your_doc_id_or_slug> --token <your_doc_token>\n* Let's deploy a new documentation version on Bump... done\n* Your new documentation version will soon be ready\n","Deploy a new version of an existing documentation attached to a hub\n\n$ bump deploy FILE --doc <doc_slug> --hub <your_hub_id_or_slug> --token <your_doc_token>\n* Let's deploy a new documentation version on Bump... done\n* Your new documentation version will soon be ready\n","Validate a new documentation version before deploying it\n\n$ bump deploy FILE --dry-run --doc <doc_slug> --token <your_doc_token>\n* Let's validate a new documentation version on Bump... done\n* Definition is valid\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"doc":{"name":"doc","type":"option","char":"d","description":"Documentation public id or slug. Can be provided via BUMP_ID environment variable","required":true},"doc-name":{"name":"doc-name","type":"option","char":"n","description":"Documentation name. Used with --auto-create flag."},"hub":{"name":"hub","type":"option","char":"b","description":"Hub id or slug. Can be provided via BUMP_HUB_ID environment variable"},"token":{"name":"token","type":"option","char":"t","description":"Documentation or Hub token. Can be provided via BUMP_TOKEN environment variable","required":true},"auto-create":{"name":"auto-create","type":"boolean","description":"Automatically create the documentation if needed (only available with a --hub flag). Documentation name can be provided with --doc-name flag. Default: false","allowNo":false},"dry-run":{"name":"dry-run","type":"boolean","description":"Validate a new documentation version. Does everything a normal deploy would do except publishing the new version. Useful in automated environments such as test platforms or continuous integration. Default: false","allowNo":false}},"args":[{"name":"FILE","description":"Path or URL to your API documentation file. OpenAPI (2.0 to 3.1.0) and AsyncAPI (2.0 to 2.2) specifications are currently supported.","required":true}]},"diff":{"id":"diff","description":"Get a comparaison diff with your documentation from the given file or URL","pluginName":"bump-cli","pluginType":"core","aliases":[],"examples":["Compare a potential new version with the currently published one:\n\n $ bump diff FILE --doc <your_doc_id_or_slug> --token <your_doc_token>\n * Let's compare the given definition file with the currently deployed one... done\n Removed: GET /compare\n Added: GET /versions/{versionId}\n","Store the diff in a dedicated file:\n\n $ bump diff FILE --doc <doc_slug> --token <doc_token> > /tmp/my-saved-diff\n * Let's compare the given definition file with the currently deployed one... done\n\n $ cat /tmp/my-saved-diff\n Removed: GET /compare\n Added: GET /versions/{versionId}\n","In case of a non modified definition FILE compared to your existing documentation, no changes are output:\n\n $ bump diff FILE --doc <doc_slug> --token <your_doc_token>\n * Let's compare the given definition file with the currently deployed one... done\n › Warning: Your documentation has not changed\n","Compare two different input files or URL independently to the one published on bump.sh\n\n $ bump diff FILE FILE2 --doc <doc_slug> --token <your_doc_token>\n * Let's compare the two given definition files... done\n Updated: POST /versions\n Body attribute added: previous_version_id\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"doc":{"name":"doc","type":"option","char":"d","description":"Documentation public id or slug. Can be provided via BUMP_ID environment variable","required":true},"hub":{"name":"hub","type":"option","char":"b","description":"Hub id or slug. Can be provided via BUMP_HUB_ID environment variable"},"token":{"name":"token","type":"option","char":"t","description":"Documentation or Hub token. Can be provided via BUMP_TOKEN environment variable","required":true},"open":{"name":"open","type":"boolean","char":"o","description":"Open the visual diff in your browser","allowNo":false}},"args":[{"name":"FILE","description":"Path or URL to your API documentation file. OpenAPI (2.0 to 3.1.0) and AsyncAPI (2.0 to 2.2) specifications are currently supported.","required":true},{"name":"FILE2","description":"Path or URL to a second API documentation file to compute its diff"}]},"preview":{"id":"preview","description":"create a documentation preview from the given file or URL","pluginName":"bump-cli","pluginType":"core","aliases":[],"examples":["$ bump preview FILE\n* Your preview is visible at: https://bump.sh/preview/45807371-9a32-48a7-b6e4-1cb7088b5b9b\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"live":{"name":"live","type":"boolean","char":"l","description":"Generate a preview each time you save the given file","allowNo":false},"open":{"name":"open","type":"boolean","char":"o","description":"Open the generated preview URL in your browser","allowNo":false}},"args":[{"name":"FILE","description":"Path or URL to your API documentation file. OpenAPI (2.0 to 3.1.0) and AsyncAPI (2.0 to 2.2) specifications are currently supported.","required":true}]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bump-cli",
|
|
3
3
|
"description": "The Bump CLI is used to interact with your API documentation hosted on Bump by using the API of developers.bump.sh",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.5",
|
|
5
5
|
"author": "Paul Bonaud <paulr@bump.sh>",
|
|
6
6
|
"bin": {
|
|
7
7
|
"bump": "./bin/run"
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"types": "lib/index.d.ts",
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@apidevtools/json-schema-ref-parser": "^9.0.7",
|
|
80
|
-
"@asyncapi/specs": "^2.
|
|
80
|
+
"@asyncapi/specs": "^2.9.0",
|
|
81
81
|
"@oclif/command": "^1.8.0",
|
|
82
82
|
"@oclif/config": "^1.17.0",
|
|
83
83
|
"@oclif/plugin-help": "^3.2.2",
|