@prisma/cli-init 0.0.0-dev.202510131315 → 0.0.0-dev.202510201723
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.202510201723";
|
|
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-RWI52QCK.js";
|
|
32
32
|
import {
|
|
33
33
|
__commonJS,
|
|
34
34
|
__require,
|
|
@@ -2645,7 +2645,7 @@ async function getApp(port, dbServer, serverState) {
|
|
|
2645
2645
|
const { debug } = serverState;
|
|
2646
2646
|
const [{ Hono }, { accelerateRoute }, { utilityRoute }] = await Promise.all([
|
|
2647
2647
|
import("hono/tiny"),
|
|
2648
|
-
import("./accelerate-
|
|
2648
|
+
import("./accelerate-QZ3K5QFP.js"),
|
|
2649
2649
|
import("./utility-W6LOZZIT.js")
|
|
2650
2650
|
]);
|
|
2651
2651
|
const app = new Hono();
|
|
@@ -3176,7 +3176,6 @@ ${previewFeatures.length > 0 ? ` previewFeatures = [${previewFeatures.map((feat
|
|
|
3176
3176
|
|
|
3177
3177
|
datasource db {
|
|
3178
3178
|
provider = "${datasourceProvider}"
|
|
3179
|
-
url = env("DATABASE_URL")
|
|
3180
3179
|
}
|
|
3181
3180
|
`;
|
|
3182
3181
|
if (withModel) {
|
|
@@ -3226,8 +3225,10 @@ var defaultEnv = async (url2, debug = false, comments = true) => {
|
|
|
3226
3225
|
});
|
|
3227
3226
|
url2 = server.ppg.url;
|
|
3228
3227
|
}
|
|
3229
|
-
let env = comments ? `# Environment variables declared in this file are automatically
|
|
3230
|
-
#
|
|
3228
|
+
let env = comments ? `# Environment variables declared in this file are NOT automatically loaded by Prisma.
|
|
3229
|
+
# Please use \`dotenv\` in your \`prisma.config.ts\` file, or configure your JavaScript runtime of choice
|
|
3230
|
+
# to load environment variables from .env files:
|
|
3231
|
+
# https://www.prisma.io/docs/orm/reference/prisma-config-reference#using-environment-variables.
|
|
3231
3232
|
|
|
3232
3233
|
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
|
|
3233
3234
|
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
|
|
@@ -3281,8 +3282,26 @@ var defaultGitIgnore = () => {
|
|
|
3281
3282
|
.env
|
|
3282
3283
|
`;
|
|
3283
3284
|
};
|
|
3284
|
-
var defaultGeneratorProvider = "prisma-client
|
|
3285
|
+
var defaultGeneratorProvider = "prisma-client";
|
|
3285
3286
|
var defaultPreviewFeatures = [];
|
|
3287
|
+
var defaultConfig = (props) => {
|
|
3288
|
+
const { prismaFolder } = props;
|
|
3289
|
+
const schemaPath = path2.relative(process.cwd(), path2.join(prismaFolder, "schema.prisma"));
|
|
3290
|
+
const migrationsPath = path2.relative(process.cwd(), path2.join(prismaFolder, "migrations"));
|
|
3291
|
+
return `import { defineConfig, env } from 'prisma/config';
|
|
3292
|
+
|
|
3293
|
+
export default defineConfig({
|
|
3294
|
+
schema: '${schemaPath}',
|
|
3295
|
+
migrations: {
|
|
3296
|
+
path: '${migrationsPath}',
|
|
3297
|
+
},
|
|
3298
|
+
engine: 'classic',
|
|
3299
|
+
datasource: {
|
|
3300
|
+
url: env('DATABASE_URL'),
|
|
3301
|
+
},
|
|
3302
|
+
});
|
|
3303
|
+
`;
|
|
3304
|
+
};
|
|
3286
3305
|
var Init = class _Init {
|
|
3287
3306
|
static new() {
|
|
3288
3307
|
return new _Init();
|
|
@@ -3408,7 +3427,7 @@ var Init = class _Init {
|
|
|
3408
3427
|
let generatedSchema;
|
|
3409
3428
|
let generatedName;
|
|
3410
3429
|
if (isPpgCommand) {
|
|
3411
|
-
const PlatformCommands = await import("./_-
|
|
3430
|
+
const PlatformCommands = await import("./_-K4YALEO2.js");
|
|
3412
3431
|
const credentials = await credentialsFile.load();
|
|
3413
3432
|
if (internals.isError(credentials))
|
|
3414
3433
|
throw credentials;
|
|
@@ -3561,6 +3580,12 @@ var Init = class _Init {
|
|
|
3561
3580
|
);
|
|
3562
3581
|
const databaseUrl = prismaPostgresDatabaseUrl || url2;
|
|
3563
3582
|
const warnings = [];
|
|
3583
|
+
fs2.writeFileSync(
|
|
3584
|
+
path2.join(outputDir, "prisma.config.ts"),
|
|
3585
|
+
defaultConfig({
|
|
3586
|
+
prismaFolder
|
|
3587
|
+
})
|
|
3588
|
+
);
|
|
3564
3589
|
const envPath = path2.join(outputDir, ".env");
|
|
3565
3590
|
if (!fs2.existsSync(envPath)) {
|
|
3566
3591
|
fs2.writeFileSync(envPath, await defaultEnv(databaseUrl, args["--debug"]));
|
|
@@ -3643,7 +3668,8 @@ var Init = class _Init {
|
|
|
3643
3668
|
);
|
|
3644
3669
|
const defaultOutput = `
|
|
3645
3670
|
\u2714 Your Prisma schema was created at ${green("prisma/schema.prisma")}
|
|
3646
|
-
|
|
3671
|
+
\u2714 Your Prisma config was created at ${green("prisma.config.ts")}
|
|
3672
|
+
You can now open them in your favorite editor.
|
|
3647
3673
|
${warnings.length > 0 && internals.logger.should.warn() ? `
|
|
3648
3674
|
${warnings.join("\n")}
|
|
3649
3675
|
` : ""}
|