@prisma/cli-init 0.0.0-dev.202512221324 → 0.0.0-dev.202512221426
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 +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2566,7 +2566,7 @@ async function getDB(dataDir, debug3) {
|
|
|
2566
2566
|
}
|
|
2567
2567
|
async function getShadowDB(_dataDir, debug3) {
|
|
2568
2568
|
const { PGlite } = await import("@electric-sql/pglite");
|
|
2569
|
-
|
|
2569
|
+
return await PGlite.create({
|
|
2570
2570
|
database: BASE_PGLITE_OPTIONS.database,
|
|
2571
2571
|
dataDir: "memory://",
|
|
2572
2572
|
debug: debug3 ? 5 : void 0,
|
|
@@ -2574,7 +2574,6 @@ async function getShadowDB(_dataDir, debug3) {
|
|
|
2574
2574
|
relaxedDurability: false,
|
|
2575
2575
|
username: BASE_PGLITE_OPTIONS.username
|
|
2576
2576
|
});
|
|
2577
|
-
return db;
|
|
2578
2577
|
}
|
|
2579
2578
|
async function getExtensions() {
|
|
2580
2579
|
const importedExtensions = await Promise.all([
|
|
@@ -2650,7 +2649,10 @@ function applyIdleTimeout(idleTimeout, db, PGLiteSocketHandlerConstructor) {
|
|
|
2650
2649
|
const resetIdleTimeout = () => {
|
|
2651
2650
|
clearIdleTimeout();
|
|
2652
2651
|
idleTimeoutId = setTimeout(
|
|
2653
|
-
() =>
|
|
2652
|
+
() => {
|
|
2653
|
+
this.dispatchEvent(new CustomEvent("close"));
|
|
2654
|
+
this.detach(true);
|
|
2655
|
+
},
|
|
2654
2656
|
// @ts-expect-error shhhh!
|
|
2655
2657
|
this.db.__IDLE_TIMEOUT__
|
|
2656
2658
|
);
|