@zuplo/cli 3.0.1 → 3.0.3

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.
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="38d29045-67e0-5ebe-8296-471b59ce0ea8")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ab3f5b7b-161d-51d0-839f-49bce40034b1")}catch(e){}}();
3
3
  import ignore from "ignore";
4
4
  import { minimatch } from "minimatch";
5
5
  import { randomBytes } from "node:crypto";
@@ -94,6 +94,7 @@ async function generateMetadata(argv) {
94
94
  }
95
95
  branch = status.current.trim();
96
96
  if (branch === "HEAD") {
97
+ await git.fetch(["--all"]);
97
98
  const branchCommit = await git.branch(["-a"]);
98
99
  const brancheRef = await git.branch([
99
100
  "-r",
@@ -136,4 +137,4 @@ async function writeGeneratedMetadata(dir, metadata) {
136
137
  });
137
138
  }
138
139
  //# sourceMappingURL=archive.js.map
139
- //# debugId=38d29045-67e0-5ebe-8296-471b59ce0ea8
140
+ //# debugId=ab3f5b7b-161d-51d0-839f-49bce40034b1
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a4e07444-c9b0-5d72-9ff0-ddd4f42e802b")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c5ad5812-058b-598b-a3a2-62b383857b12")}catch(e){}}();
3
3
  import { confirm } from "@inquirer/prompts";
4
4
  import jsYaml from "js-yaml";
5
5
  import { existsSync, writeFileSync } from "node:fs";
@@ -9,7 +9,7 @@ import { basename, dirname, extname, join, relative, sep } from "node:path";
9
9
  import prettier from "prettier";
10
10
  import { logger } from "../../common/logger.js";
11
11
  import { printCriticalFailureToConsoleAndExit, printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../../common/output.js";
12
- import { addOperationIdsAsNecessary, generateMergeChangeset, parseOpenApiFile, } from "./utils.js";
12
+ import { addOperationIdsAsNecessary, generateMergeChangeset, mergeOpenApiDocuments, parseOpenApiFile, } from "./utils.js";
13
13
  const BASE_TEMPLATE = `
14
14
  {
15
15
  "openapi": "3.1.0",
@@ -132,8 +132,9 @@ export async function importOpenApi(argv) {
132
132
  await printResultToConsoleAndExitGracefully("Import cancelled.");
133
133
  }
134
134
  }
135
- addOperationIdsAsNecessary(parsedOpenApiSpec);
136
- const formattedOpenApi = await prettier.format(JSON.stringify(parsedOpenApiSpec), {
135
+ const mergedDocument = mergeOpenApiDocuments(originalDocument, parsedOpenApiSpec);
136
+ addOperationIdsAsNecessary(mergedDocument);
137
+ const formattedOpenApi = await prettier.format(JSON.stringify(mergedDocument), {
137
138
  parser: "json-stringify",
138
139
  });
139
140
  writeFileSync(destinationFilePath, formattedOpenApi, {
@@ -142,4 +143,4 @@ export async function importOpenApi(argv) {
142
143
  await printResultToConsoleAndExitGracefully(`Import successful. File written to ${destinationFilePath}`);
143
144
  }
144
145
  //# sourceMappingURL=handler.js.map
145
- //# debugId=a4e07444-c9b0-5d72-9ff0-ddd4f42e802b
146
+ //# debugId=c5ad5812-058b-598b-a3a2-62b383857b12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "type": "module",
5
5
  "repository": "https://github.com/zuplo/cli",
6
6
  "description": "The command-line interface for Zuplo",