@prisma/cli-init 0.0.0-dev.202510211253 → 0.0.0-dev.202510211457
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.
|
@@ -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.
|
|
347
|
+
var version = "0.0.0-dev.202510211457";
|
|
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-
|
|
31
|
+
} from "./chunk-LCDSWUO6.js";
|
|
32
32
|
import {
|
|
33
33
|
__commonJS,
|
|
34
34
|
__require,
|
|
@@ -3230,9 +3230,8 @@ var defaultEnv = async (url2, debug = false, comments = true) => {
|
|
|
3230
3230
|
url2 = server.ppg.url;
|
|
3231
3231
|
}
|
|
3232
3232
|
let env = comments ? `# Environment variables declared in this file are NOT automatically loaded by Prisma.
|
|
3233
|
-
# Please add \`import
|
|
3234
|
-
# to load environment variables from .env files:
|
|
3235
|
-
# https://www.prisma.io/docs/orm/reference/prisma-config-reference#using-environment-variables.
|
|
3233
|
+
# Please add \`import "dotenv/config";\` to your \`prisma.config.ts\` file, or use the Prisma CLI with Bun
|
|
3234
|
+
# to load environment variables from .env files: https://pris.ly/prisma-config-env-vars.
|
|
3236
3235
|
|
|
3237
3236
|
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
|
|
3238
3237
|
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
|
|
@@ -3292,16 +3291,16 @@ var defaultConfig = (props) => {
|
|
|
3292
3291
|
const { prismaFolder } = props;
|
|
3293
3292
|
const schemaPath = path2.relative(process.cwd(), path2.join(prismaFolder, "schema.prisma"));
|
|
3294
3293
|
const migrationsPath = path2.relative(process.cwd(), path2.join(prismaFolder, "migrations"));
|
|
3295
|
-
return `import { defineConfig, env } from
|
|
3294
|
+
return `import { defineConfig, env } from "prisma/config";
|
|
3296
3295
|
|
|
3297
3296
|
export default defineConfig({
|
|
3298
|
-
schema:
|
|
3297
|
+
schema: ${JSON.stringify(schemaPath)},
|
|
3299
3298
|
migrations: {
|
|
3300
|
-
path:
|
|
3299
|
+
path: ${JSON.stringify(migrationsPath)},
|
|
3301
3300
|
},
|
|
3302
|
-
engine:
|
|
3301
|
+
engine: "classic",
|
|
3303
3302
|
datasource: {
|
|
3304
|
-
url: env(
|
|
3303
|
+
url: env("DATABASE_URL"),
|
|
3305
3304
|
},
|
|
3306
3305
|
});
|
|
3307
3306
|
`;
|
|
@@ -3431,7 +3430,7 @@ var Init = class _Init {
|
|
|
3431
3430
|
let generatedSchema;
|
|
3432
3431
|
let generatedName;
|
|
3433
3432
|
if (isPpgCommand) {
|
|
3434
|
-
const PlatformCommands = await import("./_-
|
|
3433
|
+
const PlatformCommands = await import("./_-NWWIRCZQ.js");
|
|
3435
3434
|
const credentials = await credentialsFile.load();
|
|
3436
3435
|
if (internals.isError(credentials))
|
|
3437
3436
|
throw credentials;
|
|
@@ -3636,7 +3635,7 @@ var Init = class _Init {
|
|
|
3636
3635
|
}
|
|
3637
3636
|
const steps = [];
|
|
3638
3637
|
if (!isBun) {
|
|
3639
|
-
steps.push(`
|
|
3638
|
+
steps.push(`Install \`dotenv\`, and add \`import "dotenv/config";\` to your \`prisma.config.ts\` file to load environment variables from \`.env\`.`);
|
|
3640
3639
|
}
|
|
3641
3640
|
const isPrismaDev = !args["--url"] && (datasourceProvider === "postgres" || datasourceProvider === "postgresql");
|
|
3642
3641
|
if (isPrismaDev) {
|
|
@@ -3674,7 +3673,8 @@ var Init = class _Init {
|
|
|
3674
3673
|
)} with scalable connection pooling, global caching, and a managed serverless Postgres database. Read: https://pris.ly/cli/beyond-orm`
|
|
3675
3674
|
);
|
|
3676
3675
|
if (!isBun) {
|
|
3677
|
-
warnings.push(`Environment variables declared in the \`.env\` file are NOT automatically loaded by Prisma
|
|
3676
|
+
warnings.push(`Environment variables declared in the \`.env\` file are NOT automatically loaded by Prisma.
|
|
3677
|
+
See: https://pris.ly/prisma-config-env-vars.`);
|
|
3678
3678
|
}
|
|
3679
3679
|
const defaultOutput = `
|
|
3680
3680
|
\u2714 Your Prisma schema was created at ${green("prisma/schema.prisma")}
|