heartbeat-monitor/node_modules/next/dist/server/app-render/prospective-render-utils.js
Matt Bruce bed1169443 Initial commit: Heartbeat Monitor dashboard
- Full-featured monitoring dashboard for local web apps
- Real-time status tracking with uptime percentages
- Visual sparklines for status history
- Add/Edit/Delete apps dynamically
- Categories and color coding
- Auto-refresh every 30 seconds
- API endpoints for apps and status management
2026-02-18 11:16:01 -06:00

46 lines
2.1 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "printDebugThrownValueForProspectiveRender", {
enumerable: true,
get: function() {
return printDebugThrownValueForProspectiveRender;
}
});
const _createerrorhandler = require("./create-error-handler");
function printDebugThrownValueForProspectiveRender(thrownValue, route) {
// We don't need to print well-known Next.js errors.
if ((0, _createerrorhandler.getDigestForWellKnownError)(thrownValue)) {
return;
}
let message;
if (typeof thrownValue === 'object' && thrownValue !== null && typeof thrownValue.message === 'string') {
message = thrownValue.message;
if (typeof thrownValue.stack === 'string') {
const originalErrorStack = thrownValue.stack;
const stackStart = originalErrorStack.indexOf('\n');
if (stackStart > -1) {
const error = new Error(`Route ${route} errored during the prospective render. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled.
Original Error: ${message}`);
error.stack = 'Error: ' + error.message + originalErrorStack.slice(stackStart);
console.error(error);
return;
}
}
} else if (typeof thrownValue === 'string') {
message = thrownValue;
}
if (message) {
console.error(`Route ${route} errored during the prospective render. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. No stack was provided.
Original Message: ${message}`);
return;
}
console.error(`Route ${route} errored during the prospective render. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. The thrown value is logged just following this message`);
console.error(thrownValue);
return;
}
//# sourceMappingURL=prospective-render-utils.js.map