@zuplo/cli 1.96.0 → 1.97.0
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 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 Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="df049bf3-685f-5110-ad16-56cbf1132b2c")}catch(e){}}();
|
|
3
3
|
import { confirm } from "@inquirer/prompts";
|
|
4
4
|
import jsYaml from "js-yaml";
|
|
5
5
|
import { existsSync, writeFileSync } from "node:fs";
|
|
@@ -39,6 +39,9 @@ export async function importOpenApi(argv) {
|
|
|
39
39
|
await mkdir(dirname(normalizedFilePath), { recursive: true });
|
|
40
40
|
try {
|
|
41
41
|
const response = await fetch(parsedUrl);
|
|
42
|
+
if (!response.ok) {
|
|
43
|
+
await printCriticalFailureToConsoleAndExit(`Failed to download the remote OpenAPI file. Server responded with ${response.status} ${response.statusText}`);
|
|
44
|
+
}
|
|
42
45
|
const text = await response.text();
|
|
43
46
|
try {
|
|
44
47
|
const _json = JSON.parse(text);
|
|
@@ -127,4 +130,4 @@ export async function importOpenApi(argv) {
|
|
|
127
130
|
await printResultToConsoleAndExitGracefully(`Import successful. File written to ${destinationFilePath}`);
|
|
128
131
|
}
|
|
129
132
|
//# sourceMappingURL=handler.js.map
|
|
130
|
-
//# debugId=
|
|
133
|
+
//# debugId=df049bf3-685f-5110-ad16-56cbf1132b2c
|