@prisma/cli-init 0.0.0-dev.202512162225 → 0.0.0-dev.202512170033
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 +56 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2546,33 +2546,79 @@ function getConnectionString(port, queryParams) {
|
|
|
2546
2546
|
return `${BASE_DB_URL}:${port}/${BASE_PGLITE_OPTIONS.database}?${queryParams.toString()}`;
|
|
2547
2547
|
}
|
|
2548
2548
|
async function getDB(dataDir, debug3) {
|
|
2549
|
-
const
|
|
2550
|
-
import("@electric-sql/pglite"),
|
|
2551
|
-
import("@electric-sql/pglite/vector")
|
|
2552
|
-
]);
|
|
2549
|
+
const { PGlite } = await import("@electric-sql/pglite");
|
|
2553
2550
|
return await PGlite.create({
|
|
2554
2551
|
database: BASE_PGLITE_OPTIONS.database,
|
|
2555
2552
|
dataDir,
|
|
2556
2553
|
debug: debug3 ? 5 : void 0,
|
|
2557
|
-
extensions:
|
|
2554
|
+
extensions: await getExtensions(),
|
|
2558
2555
|
relaxedDurability: false,
|
|
2559
2556
|
username: BASE_PGLITE_OPTIONS.username
|
|
2560
2557
|
});
|
|
2561
2558
|
}
|
|
2562
2559
|
async function getShadowDB(_dataDir, debug3) {
|
|
2563
|
-
const
|
|
2564
|
-
import("@electric-sql/pglite"),
|
|
2565
|
-
import("@electric-sql/pglite/vector")
|
|
2566
|
-
]);
|
|
2560
|
+
const { PGlite } = await import("@electric-sql/pglite");
|
|
2567
2561
|
return await PGlite.create({
|
|
2568
2562
|
database: BASE_PGLITE_OPTIONS.database,
|
|
2569
2563
|
dataDir: "memory://",
|
|
2570
2564
|
debug: debug3 ? 5 : void 0,
|
|
2571
|
-
extensions:
|
|
2565
|
+
extensions: await getExtensions(),
|
|
2572
2566
|
relaxedDurability: false,
|
|
2573
2567
|
username: BASE_PGLITE_OPTIONS.username
|
|
2574
2568
|
});
|
|
2575
2569
|
}
|
|
2570
|
+
async function getExtensions() {
|
|
2571
|
+
const importedExtensions = await Promise.all([
|
|
2572
|
+
import("@electric-sql/pglite/contrib/amcheck"),
|
|
2573
|
+
// missing `autoinc` https://www.postgresql.org/docs/current/contrib-spi.html#CONTRIB-SPI-AUTOINC.
|
|
2574
|
+
import("@electric-sql/pglite/contrib/bloom"),
|
|
2575
|
+
import("@electric-sql/pglite/contrib/btree_gin"),
|
|
2576
|
+
import("@electric-sql/pglite/contrib/btree_gist"),
|
|
2577
|
+
import("@electric-sql/pglite/contrib/citext"),
|
|
2578
|
+
import("@electric-sql/pglite/contrib/cube"),
|
|
2579
|
+
// missing `dblink` https://www.postgresql.org/docs/current/dblink.html.
|
|
2580
|
+
import("@electric-sql/pglite/contrib/dict_int"),
|
|
2581
|
+
import("@electric-sql/pglite/contrib/dict_xsyn"),
|
|
2582
|
+
import("@electric-sql/pglite/contrib/earthdistance"),
|
|
2583
|
+
import("@electric-sql/pglite/contrib/file_fdw"),
|
|
2584
|
+
import("@electric-sql/pglite/contrib/fuzzystrmatch"),
|
|
2585
|
+
import("@electric-sql/pglite/contrib/hstore"),
|
|
2586
|
+
// missing `insert_username` https://www.postgresql.org/docs/current/contrib-spi.html#CONTRIB-SPI-INSERT-USERNAME.
|
|
2587
|
+
// missing `intagg` https://www.postgresql.org/docs/current/intagg.html.
|
|
2588
|
+
import("@electric-sql/pglite/contrib/intarray"),
|
|
2589
|
+
import("@electric-sql/pglite/contrib/isn"),
|
|
2590
|
+
import("@electric-sql/pglite/contrib/lo"),
|
|
2591
|
+
import("@electric-sql/pglite/contrib/ltree"),
|
|
2592
|
+
// missing `moddatetime` https://www.postgresql.org/docs/current/contrib-spi.html#CONTRIB-SPI-MODDATETIME.
|
|
2593
|
+
import("@electric-sql/pglite/contrib/pageinspect"),
|
|
2594
|
+
import("@electric-sql/pglite/contrib/pg_buffercache"),
|
|
2595
|
+
import("@electric-sql/pglite/contrib/pg_freespacemap"),
|
|
2596
|
+
// missing `pg_prewarm` https://www.postgresql.org/docs/current/pgprewarm.html.
|
|
2597
|
+
// missing `pg_search` https://pgxn.org/dist/pg_search.
|
|
2598
|
+
// missing `pg_stat_statements` https://www.postgresql.org/docs/current/pgstatstatements.html.
|
|
2599
|
+
import("@electric-sql/pglite/contrib/pg_surgery"),
|
|
2600
|
+
import("@electric-sql/pglite/contrib/pg_trgm"),
|
|
2601
|
+
import("@electric-sql/pglite/contrib/pg_visibility"),
|
|
2602
|
+
import("@electric-sql/pglite/contrib/pg_walinspect"),
|
|
2603
|
+
// `pgcrypto` is included by default in PGLite https://github.com/electric-sql/pglite/pull/129#issuecomment-2260439887.
|
|
2604
|
+
// missing `pgrowlocks` https://www.postgresql.org/docs/current/pgrowlocks.html.
|
|
2605
|
+
// missing `pgstattuple` https://www.postgresql.org/docs/current/pgstattuple.html.
|
|
2606
|
+
// `plpgsql` is included by default in PGLite https://github.com/electric-sql/pglite/blob/c00eaded4a14cdf94ab057b53c2a67674bb5f003/packages/pglite/examples/plpgsql.html#L25.
|
|
2607
|
+
// missing `postgres_fdw` https://www.postgresql.org/docs/current/postgres-fdw.html.
|
|
2608
|
+
// missing `refint` https://www.postgresql.org/docs/current/contrib-spi.html#CONTRIB-SPI-REFINT.
|
|
2609
|
+
import("@electric-sql/pglite/contrib/seg"),
|
|
2610
|
+
// missing `sslinfo` https://www.postgresql.org/docs/current/sslinfo.html.
|
|
2611
|
+
import("@electric-sql/pglite/contrib/tablefunc"),
|
|
2612
|
+
import("@electric-sql/pglite/contrib/tcn"),
|
|
2613
|
+
import("@electric-sql/pglite/contrib/tsm_system_rows"),
|
|
2614
|
+
import("@electric-sql/pglite/contrib/tsm_system_time"),
|
|
2615
|
+
import("@electric-sql/pglite/contrib/unaccent"),
|
|
2616
|
+
import("@electric-sql/pglite/contrib/uuid_ossp"),
|
|
2617
|
+
import("@electric-sql/pglite/vector")
|
|
2618
|
+
// `xml2` is included by default in PGlite https://github.com/electric-sql/pglite/pull/129#issuecomment-2260439887.
|
|
2619
|
+
]);
|
|
2620
|
+
return Object.assign({}, ...importedExtensions);
|
|
2621
|
+
}
|
|
2576
2622
|
async function dumpDB(options) {
|
|
2577
2623
|
const { dataDir, db, debug: debug3, destinationPath } = options;
|
|
2578
2624
|
const pg = db || await getDB(dataDir, debug3);
|