@prisma/cli-init 0.0.0-dev.202512162210 → 0.0.0-dev.202512170028
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 +54 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2547,28 +2547,78 @@ function getConnectionString(port, queryParams) {
|
|
|
2547
2547
|
}
|
|
2548
2548
|
async function getDB(dataDir, debug3) {
|
|
2549
2549
|
const { PGlite } = await import("@electric-sql/pglite");
|
|
2550
|
-
const { vector } = await import("@electric-sql/pglite/vector");
|
|
2551
2550
|
return await PGlite.create({
|
|
2552
2551
|
database: BASE_PGLITE_OPTIONS.database,
|
|
2553
2552
|
dataDir,
|
|
2554
2553
|
debug: debug3 ? 5 : void 0,
|
|
2555
|
-
extensions:
|
|
2554
|
+
extensions: await getExtensions(),
|
|
2556
2555
|
relaxedDurability: false,
|
|
2557
2556
|
username: BASE_PGLITE_OPTIONS.username
|
|
2558
2557
|
});
|
|
2559
2558
|
}
|
|
2560
2559
|
async function getShadowDB(_dataDir, debug3) {
|
|
2561
2560
|
const { PGlite } = await import("@electric-sql/pglite");
|
|
2562
|
-
const { vector } = await import("@electric-sql/pglite/vector");
|
|
2563
2561
|
return await PGlite.create({
|
|
2564
2562
|
database: BASE_PGLITE_OPTIONS.database,
|
|
2565
2563
|
dataDir: "memory://",
|
|
2566
2564
|
debug: debug3 ? 5 : void 0,
|
|
2567
|
-
extensions:
|
|
2565
|
+
extensions: await getExtensions(),
|
|
2568
2566
|
relaxedDurability: false,
|
|
2569
2567
|
username: BASE_PGLITE_OPTIONS.username
|
|
2570
2568
|
});
|
|
2571
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
|
+
}
|
|
2572
2622
|
async function dumpDB(options) {
|
|
2573
2623
|
const { dataDir, db, debug: debug3, destinationPath } = options;
|
|
2574
2624
|
const pg = db || await getDB(dataDir, debug3);
|