bump-cli 2.9.6 → 2.9.8

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.
@@ -19,7 +19,7 @@ export default class Deploy extends BaseCommand<typeof Deploy> {
19
19
  preview: import("@oclif/core/interfaces").BooleanFlag<boolean>;
20
20
  token: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
21
21
  };
22
- protected deployDirectory(dir: string, dryRun: boolean, token: string, hub: string, autoCreate: boolean, interactive: boolean, filenamePattern: string, documentationName: string | undefined, branch: string | undefined): Promise<void>;
22
+ protected deployDirectory(dir: string, dryRun: boolean, token: string, hub: string, autoCreate: boolean, interactive: boolean, filenamePattern: string, documentationName: string | undefined, branch: string | undefined, overlays?: string[] | undefined): Promise<void>;
23
23
  protected deploySingleFile(api: API, dryRun: boolean, documentation: string, token: string, hub: string | undefined, autoCreate: boolean, documentationName: string | undefined, branch: string | undefined, overlay?: string[] | undefined, temporary?: boolean | undefined): Promise<void>;
24
24
  run(): Promise<void>;
25
25
  }
@@ -61,7 +61,7 @@ ${chalk.dim('$ bump deploy FILE --dry-run --doc <doc_slug> --token <your_doc_tok
61
61
  preview: flagsBuilder.preview(),
62
62
  token: flagsBuilder.token(),
63
63
  };
64
- async deployDirectory(dir, dryRun, token, hub, autoCreate, interactive, filenamePattern, documentationName, branch) {
64
+ async deployDirectory(dir, dryRun, token, hub, autoCreate, interactive, filenamePattern, documentationName, branch, overlays) {
65
65
  const definitionDirectory = new DefinitionDirectory(dir, filenamePattern);
66
66
  await definitionDirectory.readDefinitions();
67
67
  await ux.action.pauseAsync(async () => {
@@ -92,7 +92,7 @@ ${chalk.dim('$ bump deploy FILE --dry-run --doc <doc_slug> --token <your_doc_tok
92
92
  });
93
93
  ux.action.status = `...to your ${hub} hub on Bump.sh`;
94
94
  await definitionDirectory.sequentialMap(async (definition) => {
95
- await this.deploySingleFile(definition.definition, dryRun, definition.slug, token, hub, autoCreate, definition.slug || documentationName, branch);
95
+ await this.deploySingleFile(definition.definition, dryRun, definition.slug, token, hub, autoCreate, definition.slug || documentationName, branch, overlays);
96
96
  });
97
97
  }
98
98
  else {
@@ -142,7 +142,7 @@ ${chalk.dim('$ bump deploy FILE --dry-run --doc <doc_slug> --token <your_doc_tok
142
142
  ux.action.start(`Let's ${action} on Bump.sh`);
143
143
  if (isDir(args.file)) {
144
144
  if (hub) {
145
- await this.deployDirectory(args.file, dryRun, token, hub, autoCreate, interactive, filenamePattern, documentationName, branch);
145
+ await this.deployDirectory(args.file, dryRun, token, hub, autoCreate, interactive, filenamePattern, documentationName, branch, overlay);
146
146
  }
147
147
  else {
148
148
  throw new CLIError('Missing required flag --hub when deploying an entire directory');
package/dist/core/diff.js CHANGED
@@ -109,9 +109,9 @@ export class Diff {
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);
112
+ diffVersion = await this.createVersion(file1, documentation, token, hub, branch, undefined, overlays);
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, overlays);
115
115
  }
116
116
  }
117
117
  if (diffVersion) {
@@ -138,6 +138,7 @@ class API {
138
138
  // Alternatively we can apply all overlays in parallel
139
139
  // https://stackoverflow.com/questions/48957022/unexpected-await-inside-a-loop-no-await-in-loop
140
140
  for (const overlayFile of overlays) {
141
+ debug('bump-cli:definition')(`Applying overlay (${overlayFile}) to definition (location: ${this.location})`);
141
142
  await this.applyOverlay(overlayFile);
142
143
  }
143
144
  /* eslint-enable no-await-in-loop */
@@ -292,5 +292,5 @@
292
292
  "strict": true
293
293
  }
294
294
  },
295
- "version": "2.9.6"
295
+ "version": "2.9.8"
296
296
  }
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.6",
4
+ "version": "2.9.8",
5
5
  "author": "Paul Bonaud <paulr@bump.sh>",
6
6
  "bin": {
7
7
  "bump": "./bin/run.js"