@palbase/backend 24.1.1 → 24.2.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.
- package/dist/bin/palbase-backend.cjs +3 -2
- package/dist/bin/palbase-backend.cjs.map +1 -1
- package/dist/bin/palbase-backend.js +1 -1
- package/dist/{chunk-2A62DDVO.js → chunk-EIXCY4SS.js} +4 -3
- package/dist/{chunk-2A62DDVO.js.map → chunk-EIXCY4SS.js.map} +1 -1
- package/dist/engine/index.cjs +3 -2
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
package/dist/engine/index.cjs
CHANGED
|
@@ -2857,7 +2857,7 @@ async function createApp(opts) {
|
|
|
2857
2857
|
const completions = new CompletionLedger();
|
|
2858
2858
|
function buildServices(db) {
|
|
2859
2859
|
return {
|
|
2860
|
-
Database: db
|
|
2860
|
+
Database: db?.client ?? stubModule("Database (a start hook runs before any request \u2014 open your own connection here)"),
|
|
2861
2861
|
Cache: cache,
|
|
2862
2862
|
Log: log,
|
|
2863
2863
|
Documents: modules.Documents ?? stubModule("Documents"),
|
|
@@ -3236,9 +3236,10 @@ async function createApp(opts) {
|
|
|
3236
3236
|
return envelope("internal_error", "The request could not be completed", 500, requestId);
|
|
3237
3237
|
}
|
|
3238
3238
|
}
|
|
3239
|
+
const bootServices = buildServices(null);
|
|
3239
3240
|
let runShutdownHooks;
|
|
3240
3241
|
try {
|
|
3241
|
-
runShutdownHooks = await __runStartHooks();
|
|
3242
|
+
runShutdownHooks = await runWithRuntime(bootServices, () => __runStartHooks());
|
|
3242
3243
|
} catch (err) {
|
|
3243
3244
|
await closeDriver(sql);
|
|
3244
3245
|
throw err;
|