@prisma/cli-init 0.0.0-dev.202505222332 → 0.0.0-dev.202505231510
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.
|
@@ -345,7 +345,7 @@ import internals5 from "@prisma/internals";
|
|
|
345
345
|
import * as Checkpoint from "checkpoint-client";
|
|
346
346
|
|
|
347
347
|
// package.json
|
|
348
|
-
var version = "0.0.0-dev.
|
|
348
|
+
var version = "0.0.0-dev.202505231510";
|
|
349
349
|
|
|
350
350
|
// src/platform/_lib/userAgent.ts
|
|
351
351
|
var debug = Debug("prisma:cli:platform:_lib:userAgent");
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
printPpgInitOutput,
|
|
5
5
|
requestOrThrow,
|
|
6
6
|
successMessage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BWEBNDFB.js";
|
|
8
8
|
|
|
9
9
|
// src/Init.ts
|
|
10
10
|
import { confirm, input, select } from "@inquirer/prompts";
|
|
@@ -90,6 +90,7 @@ function printError(text) {
|
|
|
90
90
|
|
|
91
91
|
// src/Init.ts
|
|
92
92
|
var PRISMA_DEV_DEFAULT_URL = "prisma+postgres://localhost:51213/?api_key=eyJkYXRhYmFzZVVybCI6InBvc3RncmVzOi8vcG9zdGdyZXM6cG9zdGdyZXNAbG9jYWxob3N0OjUxMjE0L3Bvc3RncmVzP2Nvbm5lY3Rpb25fbGltaXQ9MSZjb25uZWN0X3RpbWVvdXQ9MCZtYXhfaWRsZV9jb25uZWN0aW9uX2xpZmV0aW1lPTAmcG9vbF90aW1lb3V0PTAmc29ja2V0X3RpbWVvdXQ9MCZzc2xtb2RlPWRpc2FibGUiLCJzaGFkb3dEYXRhYmFzZVVybCI6InBvc3RncmVzOi8vcG9zdGdyZXM6cG9zdGdyZXNAbG9jYWxob3N0OjUxMjE1L3Bvc3RncmVzP2Nvbm5lY3Rpb25fbGltaXQ9MSZjb25uZWN0X3RpbWVvdXQ9MCZtYXhfaWRsZV9jb25uZWN0aW9uX2xpZmV0aW1lPTAmcG9vbF90aW1lb3V0PTAmc29ja2V0X3RpbWVvdXQ9MCZzc2xtb2RlPWRpc2FibGUifQ";
|
|
93
|
+
var { PRISMA_INIT_DEV_PREVIEW } = (typeof process !== "undefined" ? process.env : {}) || {};
|
|
93
94
|
var defaultSchema = (props) => {
|
|
94
95
|
const {
|
|
95
96
|
datasourceProvider = "postgresql",
|
|
@@ -148,14 +149,14 @@ model User {
|
|
|
148
149
|
}
|
|
149
150
|
return schema;
|
|
150
151
|
};
|
|
151
|
-
var defaultEnv = (url = PRISMA_DEV_DEFAULT_URL, comments = true) => {
|
|
152
|
+
var defaultEnv = (url = PRISMA_INIT_DEV_PREVIEW ? PRISMA_DEV_DEFAULT_URL : "postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public", comments = true) => {
|
|
152
153
|
let env = comments ? `# Environment variables declared in this file are automatically made available to Prisma.
|
|
153
154
|
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
|
|
154
155
|
|
|
155
156
|
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
|
|
156
157
|
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
|
|
157
158
|
|
|
158
|
-
${url === PRISMA_DEV_DEFAULT_URL ? `# The following \`prisma+postgres\` URL is similar to the URL produced by running a local Prisma Postgres
|
|
159
|
+
${PRISMA_INIT_DEV_PREVIEW && url === PRISMA_DEV_DEFAULT_URL ? `# The following \`prisma+postgres\` URL is similar to the URL produced by running a local Prisma Postgres
|
|
159
160
|
# server with the \`prisma dev\` CLI command, when not choosing any non-default ports or settings. The API key, unlike the
|
|
160
161
|
# one found in a remote Prisma Postgres URL, does not contain any sensitive information.
|
|
161
162
|
|
|
@@ -233,7 +234,7 @@ var Init = class _Init {
|
|
|
233
234
|
|
|
234
235
|
${bold2("Examples")}
|
|
235
236
|
|
|
236
|
-
Set up a new local Prisma Postgres project (default)
|
|
237
|
+
Set up a new ${PRISMA_INIT_DEV_PREVIEW ? "local Prisma Postgres project" : "Prisma project with PostgreSQL"} (default)
|
|
237
238
|
${dim("$")} prisma init
|
|
238
239
|
|
|
239
240
|
Set up a new Prisma project and specify MySQL as the datasource provider to use
|
|
@@ -330,7 +331,7 @@ var Init = class _Init {
|
|
|
330
331
|
let generatedSchema;
|
|
331
332
|
let generatedName;
|
|
332
333
|
if (isPpgCommand) {
|
|
333
|
-
const PlatformCommands = await import("./_-
|
|
334
|
+
const PlatformCommands = await import("./_-VY54QE5M.js");
|
|
334
335
|
const credentials = await credentialsFile.load();
|
|
335
336
|
if (internals.isError(credentials))
|
|
336
337
|
throw credentials;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/cli-init",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.202505231510",
|
|
4
4
|
"description": "Init CLI for Prisma",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"check:exports": "attw . --pack --profile esm-only",
|
|
64
64
|
"dev": "tsup --watch",
|
|
65
65
|
"lint": "eslint --fix .",
|
|
66
|
-
"test": "vitest",
|
|
66
|
+
"test": "PRISMA_INIT_DEV_PREVIEW=1 vitest",
|
|
67
67
|
"typecheck": "tsc --noEmit"
|
|
68
68
|
}
|
|
69
69
|
}
|