create-prisma 0.4.2-pr.53.196.1 → 0.4.2-pr.53.197.1

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.
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./create-Bpm3olVB.mjs";
2
+ import "./create-BPGG92im.mjs";
3
3
  import { createCreatePrismaCli } from "./index.mjs";
4
4
 
5
5
  //#region src/cli.ts
@@ -40,7 +40,7 @@ async function getAnonymousId() {
40
40
  }
41
41
  function getCommonProperties() {
42
42
  return {
43
- "cli-version": "0.4.2-pr.53.196.1",
43
+ "cli-version": "0.4.2-pr.53.197.1",
44
44
  "node-version": process.version,
45
45
  platform: process.platform,
46
46
  arch: process.arch
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as PackageManagerSchema, r as CreateCommandInputSchema, t as runCreateCommand } from "./create-Bpm3olVB.mjs";
2
+ import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as PackageManagerSchema, r as CreateCommandInputSchema, t as runCreateCommand } from "./create-BPGG92im.mjs";
3
3
  import { os } from "@orpc/server";
4
4
  import { createCli } from "trpc-cli";
5
5
  import { z } from "zod";
6
6
 
7
7
  //#region src/index.ts
8
- const CLI_VERSION = "0.4.2-pr.53.196.1";
8
+ const CLI_VERSION = "0.4.2-pr.53.197.1";
9
9
  const CreateCliInputSchema = z.tuple([z.string().trim().min(1, "Please enter a valid project name").optional().describe("Project name / directory"), CreateCommandInputSchema]);
10
10
  function normalizeCreateCliInput(input) {
11
11
  const [projectName, options] = input;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma",
3
- "version": "0.4.2-pr.53.196.1",
3
+ "version": "0.4.2-pr.53.197.1",
4
4
  "private": false,
5
5
  "description": "Create Prisma 8 projects with first-party templates and great DX.",
6
6
  "homepage": "https://github.com/prisma/create-prisma",
@@ -18,7 +18,7 @@ This builds the app and starts it with Composer. PostgreSQL projects get a local
18
18
 
19
19
  The deploy script builds the framework output, provisions Prisma Postgres when selected, applies migrations, and deploys the app to Prisma Compute.
20
20
 
21
- The starter users are inserted idempotently on the first database query. `{{runScriptCommand packageManager "db:seed"}}` can also seed an explicit `DATABASE_URL`; for local PostgreSQL it reuses the database created by `dev:composer`.
21
+ The starter users are inserted idempotently on the first database query through the Composer service binding. `{{runScriptCommand packageManager "db:seed"}}` is only for seeding an explicit `DATABASE_URL` outside Composer.
22
22
 
23
23
  {{#if (eq provider "mongo")}}
24
24
  MongoDB is not provisioned by Composer. Set `MONGODB_URL` before running Composer locally or deploying.
@@ -1,27 +1,8 @@
1
1
  import "dotenv/config";
2
- {{#if (eq provider "postgres")}}
3
- import { readFile } from "node:fs/promises";
4
-
5
- async function loadComposerDevDatabaseUrl(): Promise<string | undefined> {
6
- try {
7
- const contents = await readFile(
8
- new URL("../../.prisma-composer/dev/env.json", import.meta.url),
9
- "utf8",
10
- );
11
- const env = JSON.parse(contents) as Record<string, unknown>;
12
- const value = env.COMPOSER_APP_DATABASE_URL;
13
- return typeof value === "string" && value.length > 0 ? value : undefined;
14
- } catch {
15
- return undefined;
16
- }
17
- }
18
-
19
- process.env.DATABASE_URL ??= await loadComposerDevDatabaseUrl();
20
- {{/if}}
21
2
 
22
3
  if (!process.env.DATABASE_URL) {
23
4
  throw new Error(
24
- "DATABASE_URL is not set. Run dev:composer once to create the local database, or set DATABASE_URL explicitly.",
5
+ "DATABASE_URL is not set. Set it explicitly for this standalone command. Composer apps seed through their service binding on the first database query.",
25
6
  );
26
7
  }
27
8