bump-cli 2.9.8 → 2.9.10
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 +1 -1
- package/dist/core/diff.d.ts +2 -2
- package/dist/core/diff.js +7 -7
- package/dist/core/schemas/oas-schemas/index.d.ts +10 -0
- package/dist/core/schemas/oas-schemas/index.js +14 -0
- package/dist/core/schemas/oas-schemas/v2.0/schema.json +1607 -0
- package/dist/core/schemas/oas-schemas/v3.0/schema.json +1651 -0
- package/dist/core/schemas/oas-schemas/v3.1/schema.json +1411 -0
- package/dist/core/schemas/oas-schemas/v3.2/schema.json +1666 -0
- package/dist/definition.js +5 -6
- package/oclif.manifest.json +3 -1
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ $ bump --help
|
|
|
88
88
|
The Bump.sh CLI is used to interact with your API documentation hosted on Bump.sh by using the API of developers.bump.sh
|
|
89
89
|
|
|
90
90
|
VERSION
|
|
91
|
-
bump-cli/
|
|
91
|
+
bump-cli/x.y.z linux-x64 node-v20+
|
|
92
92
|
|
|
93
93
|
USAGE
|
|
94
94
|
$ bump [COMMAND]
|
package/dist/core/diff.d.ts
CHANGED
|
@@ -8,14 +8,14 @@ export declare class Diff {
|
|
|
8
8
|
constructor(config?: Config);
|
|
9
9
|
get bumpClient(): BumpApi;
|
|
10
10
|
get pollingPeriod(): number;
|
|
11
|
-
createDiff(file1: string, file2: string, expires: string | undefined,
|
|
11
|
+
createDiff(file1: string, file2: string, expires: string | undefined, overlays1?: string[] | undefined, overlays2?: string[] | undefined): Promise<DiffResponse | undefined>;
|
|
12
12
|
createVersion(file: string, documentation: string, token: string, hub: string | undefined, branch_name: string | undefined, previous_version_id?: string | undefined, overlays?: string[] | undefined): Promise<VersionResponse | undefined>;
|
|
13
13
|
d(formatter: any, ...args: any[]): void;
|
|
14
14
|
extractDiff(versionWithDiff: VersionResponse & WithDiff): DiffResponse;
|
|
15
15
|
isVersion(result: DiffResponse | VersionResponse): result is VersionResponse;
|
|
16
16
|
isVersionWithDiff(result: DiffResponse | (VersionResponse & WithDiff)): result is VersionResponse & WithDiff;
|
|
17
17
|
pollingDelay(): Promise<void>;
|
|
18
|
-
run(file1: string, file2: string | undefined, documentation: string | undefined, hub: string | undefined, branch: string | undefined, token: string | undefined, format: string, expires
|
|
18
|
+
run(file1: string, file2: string | undefined, documentation: string | undefined, hub: string | undefined, branch: string | undefined, token: string | undefined, format: string, expires?: string | undefined, overlays1?: string[] | undefined, overlays2?: string[] | undefined): Promise<DiffResponse | undefined>;
|
|
19
19
|
waitResult(result: DiffResponse | VersionResponse, token: string | undefined, opts: {
|
|
20
20
|
format: string;
|
|
21
21
|
timeout: number;
|
package/dist/core/diff.js
CHANGED
|
@@ -22,11 +22,11 @@ export class Diff {
|
|
|
22
22
|
get pollingPeriod() {
|
|
23
23
|
return process.env.BUMP_POLLING_PERIOD ? Number(process.env.BUMP_POLLING_PERIOD) : 1000;
|
|
24
24
|
}
|
|
25
|
-
async createDiff(file1, file2, expires,
|
|
25
|
+
async createDiff(file1, file2, expires, overlays1, overlays2) {
|
|
26
26
|
const api = await API.load(file1);
|
|
27
|
-
const [previous_definition, previous_references] = await api.extractDefinition(undefined,
|
|
27
|
+
const [previous_definition, previous_references] = await api.extractDefinition(undefined, overlays1);
|
|
28
28
|
const api2 = await API.load(file2);
|
|
29
|
-
const [definition, references] = await api2.extractDefinition(undefined,
|
|
29
|
+
const [definition, references] = await api2.extractDefinition(undefined, overlays2 || overlays1);
|
|
30
30
|
const request = {
|
|
31
31
|
definition,
|
|
32
32
|
expires_at: expires,
|
|
@@ -98,20 +98,20 @@ export class Diff {
|
|
|
98
98
|
async pollingDelay() {
|
|
99
99
|
await this.delay(this.pollingPeriod);
|
|
100
100
|
}
|
|
101
|
-
async run(file1, file2, documentation, hub, branch, token, format, expires,
|
|
101
|
+
async run(file1, file2, documentation, hub, branch, token, format, expires, overlays1, overlays2) {
|
|
102
102
|
if (!this._config)
|
|
103
103
|
this._config = await Config.load(resolve(import.meta.dirname, './../../'));
|
|
104
104
|
let diffVersion;
|
|
105
105
|
if (file2 && (!documentation || !token)) {
|
|
106
|
-
diffVersion = await this.createDiff(file1, file2, expires,
|
|
106
|
+
diffVersion = await this.createDiff(file1, file2, expires, overlays1, overlays2);
|
|
107
107
|
}
|
|
108
108
|
else {
|
|
109
109
|
if (!documentation || !token) {
|
|
110
110
|
throw new Error('Please login to bump (with documentation & token) when using a single file argument');
|
|
111
111
|
}
|
|
112
|
-
diffVersion = await this.createVersion(file1, documentation, token, hub, branch, undefined,
|
|
112
|
+
diffVersion = await this.createVersion(file1, documentation, token, hub, branch, undefined, overlays1);
|
|
113
113
|
if (file2) {
|
|
114
|
-
diffVersion = await this.createVersion(file2, documentation, token, hub, branch, diffVersion && diffVersion.id,
|
|
114
|
+
diffVersion = await this.createVersion(file2, documentation, token, hub, branch, diffVersion && diffVersion.id, overlays2 || overlays1);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
if (diffVersion) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// All spec version definitions are copied from the official
|
|
2
|
+
// spec repo https://spec.openapis.org/oas/
|
|
3
|
+
import schemaV20 from './v2.0/schema.json' with { type: 'json' };
|
|
4
|
+
import schemaV30 from './v3.0/schema.json' with { type: 'json' };
|
|
5
|
+
import schemaV31 from './v3.1/schema.json' with { type: 'json' };
|
|
6
|
+
import schemaV32 from './v3.2/schema.json' with { type: 'json' };
|
|
7
|
+
export default {
|
|
8
|
+
schemas: {
|
|
9
|
+
'2.0': schemaV20,
|
|
10
|
+
'3.0': schemaV30,
|
|
11
|
+
'3.1': schemaV31,
|
|
12
|
+
'3.2': schemaV32,
|
|
13
|
+
},
|
|
14
|
+
};
|