vercel 47.0.6 → 47.0.7
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/index.js +21 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -148453,6 +148453,25 @@ function displayBuildLogs(client2, deployment, follow = true) {
|
|
|
148453
148453
|
);
|
|
148454
148454
|
return { promise, abortController };
|
|
148455
148455
|
}
|
|
148456
|
+
async function displayBuildLogsUntilFinalError(client2, deployment, error3) {
|
|
148457
|
+
const abortController = new AbortController();
|
|
148458
|
+
return events_default(
|
|
148459
|
+
client2,
|
|
148460
|
+
deployment.id,
|
|
148461
|
+
{
|
|
148462
|
+
mode: "logs",
|
|
148463
|
+
onEvent: (event) => {
|
|
148464
|
+
printBuildLog(event, output_manager_default.print);
|
|
148465
|
+
if (event.level === "error" && event.text?.includes(error3)) {
|
|
148466
|
+
abortController.abort();
|
|
148467
|
+
}
|
|
148468
|
+
},
|
|
148469
|
+
quiet: false,
|
|
148470
|
+
findOpts: { direction: "forward", follow: true }
|
|
148471
|
+
},
|
|
148472
|
+
abortController
|
|
148473
|
+
);
|
|
148474
|
+
}
|
|
148456
148475
|
async function displayRuntimeLogs(client2, options, abortController) {
|
|
148457
148476
|
const { log: log2, debug: debug2, print, spinner, stopSpinner, warn } = output_manager_default;
|
|
148458
148477
|
const { projectId, deploymentId, parse: parse11 } = options;
|
|
@@ -150170,8 +150189,6 @@ ${err.stack}`);
|
|
|
150170
150189
|
return 1;
|
|
150171
150190
|
}
|
|
150172
150191
|
if (err instanceof BuildError) {
|
|
150173
|
-
output_manager_default.error(err.message || "Build failed");
|
|
150174
|
-
output_manager_default.print("\n");
|
|
150175
150192
|
if (withLogs === false) {
|
|
150176
150193
|
try {
|
|
150177
150194
|
if (now.url) {
|
|
@@ -150180,12 +150197,11 @@ ${err.stack}`);
|
|
|
150180
150197
|
contextName,
|
|
150181
150198
|
now.url
|
|
150182
150199
|
);
|
|
150183
|
-
|
|
150200
|
+
await displayBuildLogsUntilFinalError(
|
|
150184
150201
|
client2,
|
|
150185
150202
|
failedDeployment,
|
|
150186
|
-
|
|
150203
|
+
err.message
|
|
150187
150204
|
);
|
|
150188
|
-
await promise;
|
|
150189
150205
|
}
|
|
150190
150206
|
} catch (_) {
|
|
150191
150207
|
output_manager_default.log(
|