standalone@2.1.4: fixes minor configuration issue

This commit is contained in:
tiago
2026-01-28 18:28:51 +00:00
parent a53cedff86
commit 5b2f529f3d
2 changed files with 14 additions and 11 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cap-standalone",
"version": "2.1.3",
"version": "2.1.4",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "bun run --watch src/index.js",
+13 -10
View File
@@ -70,20 +70,23 @@ new Elysia({
}
const errorId = Bun.randomUUIDv7().split("-").pop();
console.error(`[${error.code || "ERR"} ${errorId}]`, JSON.stringify({
timestamp: new Date().toISOString(),
error,
env: {
bun: process.versions.bun,
platform: process.platform,
mem: process.memoryUsage()
}
}));
if (process.env.DISABLE_ERROR_LOGGING !== "true") {
console.error(`[${error.code || "ERR"} ${errorId}]`, JSON.stringify({
timestamp: new Date().toISOString(),
error,
env: {
bun: process.versions.bun,
platform: process.platform,
mem: process.memoryUsage()
}
}));
}
return {
success: false,
error: error.code || "Internal server error",
detail: {
detail: process.env.SHOW_ERRORS === "true" ? error : {
troubleshooting: "http://capjs.js.org/guide/standalone/options.html#error-messages",
id: errorId
}