@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.
package/dist/deploy/archive.js
CHANGED
|
@@ -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]="
|
|
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=
|
|
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]="
|
|
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
|
-
|
|
136
|
-
|
|
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=
|
|
146
|
+
//# debugId=c5ad5812-058b-598b-a3a2-62b383857b12
|