create-prisma 0.4.2-pr.38.96.1 → 0.4.2-pr.38.97.1

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/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./create-Djts97KN.mjs";
2
+ import "./create-CaLi2yDi.mjs";
3
3
  import { createCreatePrismaCli } from "./index.mjs";
4
4
 
5
5
  //#region src/cli.ts
@@ -40,7 +40,7 @@ async function getAnonymousId() {
40
40
  }
41
41
  function getCommonProperties() {
42
42
  return {
43
- "cli-version": "0.4.2-pr.38.96.1",
43
+ "cli-version": "0.4.2-pr.38.97.1",
44
44
  "node-version": process.version,
45
45
  platform: process.platform,
46
46
  arch: process.arch
@@ -820,9 +820,10 @@ import { closeSync, existsSync, mkdirSync, openSync, readFileSync, rmSync, write
820
820
  import path from "node:path";
821
821
 
822
822
  const defaultDatabaseUrl = "mongodb://localhost:27017/mydb?replicaSet=rs0&directConnection=true";
823
- const dbPath = path.resolve(process.env.MONGO_DB_PATH ?? ".mongo-data");
824
- const pidFile = path.join(dbPath, "mongo.pid");
825
- const logFile = path.join(dbPath, "mongo.log");
823
+ const dataRoot = path.resolve(process.env.MONGO_DB_PATH ?? ".mongo-data");
824
+ const dbPath = path.join(dataRoot, "db");
825
+ const pidFile = path.join(dataRoot, "mongo.pid");
826
+ const logFile = path.join(dataRoot, "mongo.log");
826
827
  const readyTimeoutMs = Number(process.env.MONGO_READY_TIMEOUT_MS ?? 60_000);
827
828
 
828
829
  function getMongoConfig() {
@@ -873,7 +874,7 @@ async function runServer() {
873
874
  const memoryServer = await import("mongodb-memory-server");
874
875
  const { MongoMemoryReplSet } = memoryServer.default ?? memoryServer;
875
876
  const replSet = await MongoMemoryReplSet.create({
876
- replSet: { name: config.replSetName, count: 1, storageEngine: "wiredTiger" },
877
+ replSet: { name: config.replSetName, count: 1 },
877
878
  instanceOpts: [{ port: config.port, storageEngine: "wiredTiger", dbPath }],
878
879
  });
879
880
  console.log(\`MongoDB server ready for \${config.databaseUrl}\`);
@@ -887,7 +888,7 @@ async function runServer() {
887
888
  }
888
889
 
889
890
  async function up() {
890
- mkdirSync(dbPath, { recursive: true });
891
+ mkdirSync(dataRoot, { recursive: true });
891
892
  const existing = readPid();
892
893
  if (existing !== null && isAlive(existing)) {
893
894
  console.log(\`MongoDB is already running (PID \${existing}). Use \\\`db:down\\\` to stop.\`);
@@ -966,8 +967,8 @@ async function down(wipe) {
966
967
  }
967
968
  rmSync(pidFile, { force: true });
968
969
  if (wipe) {
969
- rmSync(dbPath, { recursive: true, force: true });
970
- console.log(\`Removed \${dbPath}.\`);
970
+ rmSync(dataRoot, { recursive: true, force: true });
971
+ console.log(\`Removed \${dataRoot}.\`);
971
972
  }
972
973
  }
973
974
 
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as DatabaseUrlSchema, r as CreateCommandInputSchema, s as PackageManagerSchema, t as runCreateCommand } from "./create-Djts97KN.mjs";
2
+ import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as DatabaseUrlSchema, r as CreateCommandInputSchema, s as PackageManagerSchema, t as runCreateCommand } from "./create-CaLi2yDi.mjs";
3
3
  import { os } from "@orpc/server";
4
4
  import { createCli } from "trpc-cli";
5
5
 
6
6
  //#region src/index.ts
7
- const CLI_VERSION = "0.4.2-pr.38.96.1";
7
+ const CLI_VERSION = "0.4.2-pr.38.97.1";
8
8
  const router = os.router({ create: os.meta({
9
9
  description: "Create a new project with Prisma setup",
10
10
  default: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma",
3
- "version": "0.4.2-pr.38.96.1",
3
+ "version": "0.4.2-pr.38.97.1",
4
4
  "private": false,
5
5
  "description": "Create Prisma Next projects with first-party templates and great DX.",
6
6
  "homepage": "https://github.com/prisma/create-prisma",