@prisma/cli-init 0.0.0-dev.202506171847 → 0.0.0-dev.202506172001

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.
@@ -15,7 +15,7 @@ import {
15
15
  platformParameters,
16
16
  poll,
17
17
  printPpgInitOutput
18
- } from "./chunk-O3JCNL5E.js";
18
+ } from "./chunk-IMR2VP2D.js";
19
19
  import "./chunk-YX4UTTNJ.js";
20
20
  export {
21
21
  __exports as Accelerate,
@@ -344,7 +344,7 @@ import internals5 from "@prisma/internals";
344
344
  import * as Checkpoint from "checkpoint-client";
345
345
 
346
346
  // package.json
347
- var version = "0.0.0-dev.202506171847";
347
+ var version = "0.0.0-dev.202506172001";
348
348
 
349
349
  // src/platform/_lib/userAgent.ts
350
350
  var debug = Debug("prisma:cli:platform:_lib:userAgent");
package/dist/index.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  printPpgInitOutput,
29
29
  requestOrThrow,
30
30
  successMessage
31
- } from "./chunk-O3JCNL5E.js";
31
+ } from "./chunk-IMR2VP2D.js";
32
32
  import {
33
33
  __commonJS,
34
34
  __require,
@@ -3205,8 +3205,11 @@ model User {
3205
3205
  };
3206
3206
  var defaultEnv = async (url2, comments = true) => {
3207
3207
  if (url2 === void 0) {
3208
- const state = await ServerState.createExclusively({ persistenceMode: "stateful" });
3209
- await state.close();
3208
+ let created = false;
3209
+ const state = await ServerState.fromServerDump() || (created = true, await ServerState.createExclusively({ persistenceMode: "stateful" }));
3210
+ if (created) {
3211
+ await state.close();
3212
+ }
3210
3213
  const server = await unstable_startServer({
3211
3214
  databasePort: state.databasePort,
3212
3215
  dryRun: true,
@@ -3215,19 +3218,18 @@ var defaultEnv = async (url2, comments = true) => {
3215
3218
  });
3216
3219
  url2 = server.ppg.url;
3217
3220
  }
3218
- url2 = new URL(url2);
3219
3221
  let env = comments ? `# Environment variables declared in this file are automatically made available to Prisma.
3220
3222
  # See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
3221
3223
 
3222
3224
  # Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
3223
3225
  # See the documentation for all the connection string options: https://pris.ly/d/connection-strings
3224
3226
 
3225
- ${url2.protocol === "prisma+postgres:" && url2.hostname === "localhost" ? `# The following \`prisma+postgres\` URL is similar to the URL produced by running a local Prisma Postgres
3227
+ ${url2.startsWith("prisma+postgres:") && url2.includes("localhost") ? `# The following \`prisma+postgres\` URL is similar to the URL produced by running a local Prisma Postgres
3226
3228
  # server with the \`prisma dev\` CLI command, when not choosing any non-default ports or settings. The API key, unlike the
3227
3229
  # one found in a remote Prisma Postgres URL, does not contain any sensitive information.
3228
3230
 
3229
3231
  ` : ""}` : "";
3230
- env += `DATABASE_URL="${url2.toString()}"`;
3232
+ env += `DATABASE_URL="${url2}"`;
3231
3233
  return env;
3232
3234
  };
3233
3235
  var defaultPort = (datasourceProvider) => {
@@ -3397,7 +3399,7 @@ var Init = class _Init {
3397
3399
  let generatedSchema;
3398
3400
  let generatedName;
3399
3401
  if (isPpgCommand) {
3400
- const PlatformCommands = await import("./_-NAIH7KVL.js");
3402
+ const PlatformCommands = await import("./_-APV4DZD5.js");
3401
3403
  const credentials = await credentialsFile.load();
3402
3404
  if (internals.isError(credentials))
3403
3405
  throw credentials;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/cli-init",
3
- "version": "0.0.0-dev.202506171847",
3
+ "version": "0.0.0-dev.202506172001",
4
4
  "description": "Init CLI for Prisma",
5
5
  "type": "module",
6
6
  "sideEffects": false,