bump-cli 2.9.9 → 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.
@@ -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, overlays?: string[] | undefined): Promise<DiffResponse | 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: string | undefined, overlays: string[] | undefined): Promise<DiffResponse | undefined>;
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, overlays) {
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, overlays);
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, overlays);
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, overlays) {
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, overlays);
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, overlays);
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, overlays);
114
+ diffVersion = await this.createVersion(file2, documentation, token, hub, branch, diffVersion && diffVersion.id, overlays2 || overlays1);
115
115
  }
116
116
  }
117
117
  if (diffVersion) {
@@ -294,5 +294,5 @@
294
294
  "strict": true
295
295
  }
296
296
  },
297
- "version": "2.9.9"
297
+ "version": "2.9.10"
298
298
  }
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.sh by using the API of developers.bump.sh",
4
- "version": "2.9.9",
4
+ "version": "2.9.10",
5
5
  "author": "Paul Bonaud <paulr@bump.sh>",
6
6
  "bin": {
7
7
  "bump": "./bin/run.js"
@@ -92,7 +92,7 @@
92
92
  "dependencies": {
93
93
  "@apidevtools/json-schema-ref-parser": "^11.7.2",
94
94
  "@asyncapi/specs": "^6.8.0",
95
- "@clack/prompts": "^0.10.0",
95
+ "@clack/prompts": "^0.11.0",
96
96
  "@oclif/core": "^4",
97
97
  "@oclif/plugin-help": "^6",
98
98
  "@oclif/plugin-warn-if-update-available": "^3.1.20",