@prisma/cli-init 0.1.1 → 0.3.0

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.
@@ -14,7 +14,7 @@ import {
14
14
  platformParameters,
15
15
  poll,
16
16
  printPpgInitOutput
17
- } from "./chunk-BGEDXNS4.js";
17
+ } from "./chunk-IWZZPMCO.js";
18
18
  export {
19
19
  __exports as Accelerate,
20
20
  __exports2 as Auth,
@@ -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.1.1";
348
+ var version = "0.3.0";
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-BGEDXNS4.js";
7
+ } from "./chunk-IWZZPMCO.js";
8
8
 
9
9
  // src/Init.ts
10
10
  import { confirm, input, select } from "@inquirer/prompts";
@@ -89,8 +89,7 @@ function printError(text) {
89
89
  }
90
90
 
91
91
  // src/Init.ts
92
- var PRISMA_DEV_DEFAULT_URL = "prisma+postgres://localhost:51213/?api_key=eyJkYXRhYmFzZVVybCI6InBvc3RncmVzOi8vcG9zdGdyZXM6cG9zdGdyZXNAbG9jYWxob3N0OjUxMjE0L3RlbXBsYXRlMT9jb25uZWN0aW9uX2xpbWl0PTEmY29ubmVjdF90aW1lb3V0PTAmbWF4X2lkbGVfY29ubmVjdGlvbl9saWZldGltZT0wJnBvb2xfdGltZW91dD0wJnNvY2tldF90aW1lb3V0PTAmc3NsbW9kZT1kaXNhYmxlIiwic2hhZG93RGF0YWJhc2VVcmwiOiJwb3N0Z3JlczovL3Bvc3RncmVzOnBvc3RncmVzQGxvY2FsaG9zdDo1MTIxNS90ZW1wbGF0ZTE_Y29ubmVjdGlvbl9saW1pdD0xJmNvbm5lY3RfdGltZW91dD0wJm1heF9pZGxlX2Nvbm5lY3Rpb25fbGlmZXRpbWU9MCZwb29sX3RpbWVvdXQ9MCZzb2NrZXRfdGltZW91dD0wJnNzbG1vZGU9ZGlzYWJsZSJ9";
93
- var { PRISMA_INIT_DEV_PREVIEW } = (typeof process !== "undefined" ? process.env : {}) || {};
92
+ var PRISMA_DEV_DEFAULT_URL = "prisma+postgres://localhost:51213/?api_key=eyJkYXRhYmFzZVVybCI6InBvc3RncmVzOi8vcG9zdGdyZXM6cG9zdGdyZXNAbG9jYWxob3N0OjUxMjE0L3RlbXBsYXRlMT9zc2xtb2RlPWRpc2FibGUmY29ubmVjdGlvbl9saW1pdD0xJmNvbm5lY3RfdGltZW91dD0wJm1heF9pZGxlX2Nvbm5lY3Rpb25fbGlmZXRpbWU9MCZwb29sX3RpbWVvdXQ9MCZzaW5nbGVfdXNlX2Nvbm5lY3Rpb25zPXRydWUmc29ja2V0X3RpbWVvdXQ9MCIsIm5hbWUiOiJkZWZhdWx0Iiwic2hhZG93RGF0YWJhc2VVcmwiOiJwb3N0Z3JlczovL3Bvc3RncmVzOnBvc3RncmVzQGxvY2FsaG9zdDo1MTIxNS90ZW1wbGF0ZTE_c3NsbW9kZT1kaXNhYmxlJmNvbm5lY3Rpb25fbGltaXQ9MSZjb25uZWN0X3RpbWVvdXQ9MCZtYXhfaWRsZV9jb25uZWN0aW9uX2xpZmV0aW1lPTAmcG9vbF90aW1lb3V0PTAmc2luZ2xlX3VzZV9jb25uZWN0aW9ucz10cnVlJnNvY2tldF90aW1lb3V0PTAifQ";
94
93
  var defaultSchema = (props) => {
95
94
  const {
96
95
  datasourceProvider = "postgresql",
@@ -149,14 +148,14 @@ model User {
149
148
  }
150
149
  return schema;
151
150
  };
152
- var defaultEnv = (url = PRISMA_INIT_DEV_PREVIEW ? PRISMA_DEV_DEFAULT_URL : "postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public", comments = true) => {
151
+ var defaultEnv = (url = PRISMA_DEV_DEFAULT_URL, comments = true) => {
153
152
  let env = comments ? `# Environment variables declared in this file are automatically made available to Prisma.
154
153
  # See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
155
154
 
156
155
  # Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
157
156
  # See the documentation for all the connection string options: https://pris.ly/d/connection-strings
158
157
 
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
158
+ ${url === PRISMA_DEV_DEFAULT_URL ? `# The following \`prisma+postgres\` URL is similar to the URL produced by running a local Prisma Postgres
160
159
  # server with the \`prisma dev\` CLI command, when not choosing any non-default ports or settings. The API key, unlike the
161
160
  # one found in a remote Prisma Postgres URL, does not contain any sensitive information.
162
161
 
@@ -234,25 +233,25 @@ var Init = class _Init {
234
233
 
235
234
  ${bold2("Examples")}
236
235
 
237
- Set up a new ${PRISMA_INIT_DEV_PREVIEW ? "local Prisma Postgres project" : "Prisma project with PostgreSQL"} (default)
236
+ Set up a new \`prisma dev\`-ready (local Prisma Postgres) Prisma project
238
237
  ${dim("$")} prisma init
239
238
 
240
239
  Set up a new Prisma project and specify MySQL as the datasource provider to use
241
240
  ${dim("$")} prisma init --datasource-provider mysql
242
241
 
243
- Set up a new Prisma project and specify \`prisma-client-go\` as the generator provider to use
242
+ Set up a new \`prisma dev\`-ready (local Prisma Postgres) Prisma project and specify \`prisma-client-go\` as the generator provider to use
244
243
  ${dim("$")} prisma init --generator-provider prisma-client-go
245
244
 
246
- Set up a new Prisma project and specify \`x\` and \`y\` as the preview features to use
245
+ Set up a new \`prisma dev\`-ready (local Prisma Postgres) Prisma project and specify \`x\` and \`y\` as the preview features to use
247
246
  ${dim("$")} prisma init --preview-feature x --preview-feature y
248
247
 
249
- Set up a new Prisma project and specify \`./generated-client\` as the output path to use
248
+ Set up a new \`prisma dev\`-ready (local Prisma Postgres) Prisma project and specify \`./generated-client\` as the output path to use
250
249
  ${dim("$")} prisma init --output ./generated-client
251
250
 
252
251
  Set up a new Prisma project and specify the url that will be used
253
252
  ${dim("$")} prisma init --url mysql://user:password@localhost:3306/mydb
254
253
 
255
- Set up a new Prisma project with an example model
254
+ Set up a new \`prisma dev\`-ready (local Prisma Postgres) Prisma project with an example model
256
255
  ${dim("$")} prisma init --with-model
257
256
  `);
258
257
  async parse(argv, _config) {
@@ -331,7 +330,7 @@ var Init = class _Init {
331
330
  let generatedSchema;
332
331
  let generatedName;
333
332
  if (isPpgCommand) {
334
- const PlatformCommands = await import("./_-4E3YIM4T.js");
333
+ const PlatformCommands = await import("./_-CMPFZHQW.js");
335
334
  const credentials = await credentialsFile.load();
336
335
  if (internals.isError(credentials))
337
336
  throw credentials;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/cli-init",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "Init CLI for Prisma",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -36,7 +36,7 @@
36
36
  "tsup": "8.0.2",
37
37
  "typescript": "5.8.3",
38
38
  "vitest": "3.1.3",
39
- "@prisma/dev": "0.3.0"
39
+ "@prisma/dev": "0.6.1"
40
40
  },
41
41
  "dependencies": {
42
42
  "@inquirer/prompts": "7.3.3",
@@ -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": "PRISMA_INIT_DEV_PREVIEW=1 vitest",
66
+ "test": "vitest",
67
67
  "typecheck": "tsc --noEmit"
68
68
  }
69
69
  }