@spfn/core 0.1.0-alpha.83 → 0.1.0-alpha.84
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/codegen/index.d.ts +5 -0
- package/dist/codegen/index.js +15 -11
- package/dist/codegen/index.js.map +1 -1
- package/dist/events/index.d.ts +183 -0
- package/dist/events/index.js +77 -0
- package/dist/events/index.js.map +1 -0
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/server/index.js +14 -2
- package/dist/server/index.js.map +1 -1
- package/package.json +6 -1
package/dist/server/index.js
CHANGED
|
@@ -3405,11 +3405,12 @@ async function initializeInfrastructure(config) {
|
|
|
3405
3405
|
}
|
|
3406
3406
|
function startHttpServer(app, host, port) {
|
|
3407
3407
|
serverLogger2.debug(`Starting server on ${host}:${port}...`);
|
|
3408
|
-
|
|
3408
|
+
const server = serve({
|
|
3409
3409
|
fetch: app.fetch,
|
|
3410
3410
|
port,
|
|
3411
3411
|
hostname: host
|
|
3412
3412
|
});
|
|
3413
|
+
return server;
|
|
3413
3414
|
}
|
|
3414
3415
|
function logServerTimeouts(timeouts) {
|
|
3415
3416
|
serverLogger2.info("Server timeouts configured", {
|
|
@@ -3489,7 +3490,18 @@ function registerShutdownHandlers(shutdown) {
|
|
|
3489
3490
|
process.on("SIGTERM", () => shutdown("SIGTERM"));
|
|
3490
3491
|
process.on("SIGINT", () => shutdown("SIGINT"));
|
|
3491
3492
|
process.on("uncaughtException", (error) => {
|
|
3492
|
-
|
|
3493
|
+
if (error.message?.includes("EADDRINUSE")) {
|
|
3494
|
+
serverLogger2.error("Port conflict detected - detailed trace:", {
|
|
3495
|
+
error: error.message,
|
|
3496
|
+
stack: error.stack,
|
|
3497
|
+
code: error.code,
|
|
3498
|
+
port: error.port,
|
|
3499
|
+
address: error.address,
|
|
3500
|
+
syscall: error.syscall
|
|
3501
|
+
});
|
|
3502
|
+
} else {
|
|
3503
|
+
serverLogger2.error("Uncaught exception", error);
|
|
3504
|
+
}
|
|
3493
3505
|
shutdown("UNCAUGHT_EXCEPTION");
|
|
3494
3506
|
});
|
|
3495
3507
|
process.on("unhandledRejection", (reason, promise) => {
|