create-prisma 0.14.3 → 0.14.4-pr.135.438.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 { a as shouldRelaunchOnBun, i as runCreatePrismaCli, o as ApplicationLayer } from "./src-NjvSqIR6.mjs";
2
+ import { a as shouldRelaunchOnBun, i as runCreatePrismaCli, o as ApplicationLayer } from "./src-CZnzCeW8.mjs";
3
3
  import { Effect } from "effect";
4
4
  import { NodeRuntime } from "@effect/platform-node-shared";
5
5
  import { spawn } from "node:child_process";
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { c as CreateCommandResultSchema, d as CreateCommandInputSchema, f as CreateTemplateSchema, i as runCreatePrismaCli, l as AgentSkillTargetSchema, m as PackageManagerSchema, n as createCreatePrismaCli, p as DatabaseProviderSchema, r as createPrismaCommand, s as CREATE_PRISMA_RESULT_SCHEMA_VERSION, t as create, u as AuthoringStyleSchema } from "./src-NjvSqIR6.mjs";
2
+ import { c as CreateCommandResultSchema, d as CreateCommandInputSchema, f as CreateTemplateSchema, i as runCreatePrismaCli, l as AgentSkillTargetSchema, m as PackageManagerSchema, n as createCreatePrismaCli, p as DatabaseProviderSchema, r as createPrismaCommand, s as CREATE_PRISMA_RESULT_SCHEMA_VERSION, t as create, u as AuthoringStyleSchema } from "./src-CZnzCeW8.mjs";
3
3
  export { AgentSkillTargetSchema, AuthoringStyleSchema, CREATE_PRISMA_RESULT_SCHEMA_VERSION, CreateCommandInputSchema, CreateCommandResultSchema, CreateTemplateSchema, DatabaseProviderSchema, PackageManagerSchema, create, createCreatePrismaCli, createPrismaCommand, runCreatePrismaCli };
@@ -464,20 +464,14 @@ function getPackageManagerErrorCode(command, output) {
464
464
  }
465
465
  //#endregion
466
466
  //#region src/telemetry/client.ts
467
- const TELEMETRY_API_KEY = "phc_cmc85avbWyuJ2JyKdGPdv7dxXli8xLdWDBPbvIXWJfs";
467
+ const TELEMETRY_API_KEY = "";
468
468
  const TELEMETRY_HOST = "https://us.i.posthog.com";
469
469
  const TELEMETRY_CONFIG_FILE = "telemetry.json";
470
470
  const TELEMETRY_TIMEOUT_MS = 2e3;
471
471
  const AnonymousId = Schema.String.check(Schema.isUUID(4));
472
472
  const decodeAnonymousId = Schema.decodeUnknownExit(AnonymousId);
473
- const isTruthyEnvValue = (value) => [
474
- "1",
475
- "true",
476
- "yes",
477
- "on"
478
- ].includes(String(value ?? "").trim().toLowerCase());
479
473
  function shouldDisableTelemetry() {
480
- return isTruthyEnvValue(process.env.CI) || isTruthyEnvValue(process.env.GITHUB_ACTIONS) || process.env.CREATE_PRISMA_DISABLE_TELEMETRY !== void 0 || process.env.CREATE_PRISMA_TELEMETRY_DISABLED !== void 0 || process.env.DO_NOT_TRACK !== void 0;
474
+ return true;
481
475
  }
482
476
  function getTelemetryConfigDir() {
483
477
  if (process.platform === "darwin") return path.join(os.homedir(), "Library", "Application Support", "create-prisma");
@@ -501,7 +495,7 @@ const getAnonymousIdEffect = Effect.fn("Telemetry.getAnonymousId")(function* ()
501
495
  return anonymousId;
502
496
  });
503
497
  const getCommonProperties = () => ({
504
- "cli-version": "0.14.3",
498
+ "cli-version": "0.14.4-pr.135.438.1",
505
499
  "node-version": process.version,
506
500
  platform: process.platform,
507
501
  arch: process.arch
@@ -641,27 +635,27 @@ const trackCreateCancelledEffect = Effect.fn("Telemetry.createCancelled")(functi
641
635
  //#endregion
642
636
  //#region src/constants/dependencies.ts
643
637
  const dependencyVersionMap = {
644
- "@astrojs/node": "^11.1.7",
638
+ "@astrojs/node": "^11.1.9",
645
639
  "@elysia/node": "^1.4.6",
646
- "@prisma/composer": "0.28.0",
647
- "@prisma/composer-prisma-cloud": "0.28.0",
640
+ "@prisma/composer": "0.34.0",
641
+ "@prisma/composer-prisma-cloud": "0.34.0",
648
642
  "@prisma/dev": "0.25.2",
649
- "@prisma/orm-mongo": "8.0.0-rc.16",
650
- "@prisma/orm-postgres": "8.0.0-rc.16",
643
+ "@prisma/orm-mongo": "8.0.0-rc.20",
644
+ "@prisma/orm-postgres": "8.0.0-rc.20",
651
645
  "@sveltejs/adapter-node": "^6.0.0",
652
- "@types/node": "^26.6.4",
646
+ "@types/node": "^26.6.5",
653
647
  "@vitejs/devtools": "0.7.6",
654
- alchemy: "2.0.0-beta.78",
655
- arktype: "^2.2.7",
656
- dotenv: "^18.0.6",
657
- effect: "4.0.0-rc.115",
648
+ alchemy: "2.0.0-beta.83",
649
+ arktype: "^2.2.9",
650
+ dotenv: "^18.0.9",
651
+ effect: "4.0.3",
658
652
  mongodb: "^7.7.0",
659
653
  "mongodb-memory-server": "^11.3.0",
660
654
  nitro: "^3.0.260903-beta",
661
- prisma: "8.0.0-rc.21",
662
- "temporal-polyfill": "^1.0.5",
663
- tsdown: "^0.23.0",
664
- turbo: "2.11.7",
655
+ prisma: "8.0.0-rc.27",
656
+ "temporal-polyfill": "^1.0.6",
657
+ tsdown: "^0.23.1",
658
+ turbo: "2.11.10",
665
659
  tsx: "^4.23.15",
666
660
  typescript: "^6.0.3"
667
661
  };
@@ -2814,7 +2808,7 @@ function isJsonOutputRequested(argv) {
2814
2808
  const writeJsonResult = Effect.fn("JsonOutput.write")((result) => Effect.sync(() => process.stdout.write(`${JSON.stringify(result)}\n`)));
2815
2809
  //#endregion
2816
2810
  //#region src/index.ts
2817
- const CLI_VERSION = "0.14.3";
2811
+ const CLI_VERSION = "0.14.4-pr.135.438.1";
2818
2812
  const optionalArgument = (name, description) => Argument.String(name).pipe(Argument.withDescription(description), Argument.optional, Argument.map(Option.getOrUndefined));
2819
2813
  const optionalBoolean = (name, description) => Flag.Boolean(name).pipe(Flag.withDescription(description), Flag.optional, Flag.map(Option.getOrUndefined));
2820
2814
  const optionalString = (name, description) => Flag.String(name).pipe(Flag.withDescription(description), Flag.optional, Flag.map(Option.getOrUndefined));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma",
3
- "version": "0.14.3",
3
+ "version": "0.14.4-pr.135.438.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",
@@ -17,13 +17,13 @@ allowBuilds:
17
17
  minimumReleaseAgeExclude:
18
18
  - "@prisma/*"
19
19
  overrides:
20
- effect: "4.0.0-rc.115"
21
- "@effect/platform-bun": "4.0.0-rc.115"
22
- "@effect/platform-node": "4.0.0-rc.115"
23
- "@effect/platform-node-shared": "4.0.0-rc.115"
24
- "@effect/sql-d1": "4.0.0-rc.115"
25
- "@effect/sql-sqlite-do": "4.0.0-rc.115"
26
- "@effect/vitest": "4.0.0-rc.115"
20
+ effect: "4.0.3"
21
+ "@effect/platform-bun": "4.0.3"
22
+ "@effect/platform-node": "4.0.3"
23
+ "@effect/platform-node-shared": "4.0.3"
24
+ "@effect/sql-d1": "4.0.3"
25
+ "@effect/sql-sqlite-do": "4.0.3"
26
+ "@effect/vitest": "4.0.3"
27
27
  {{#if (eq provider "mongo")}}
28
28
  peerDependencyRules:
29
29
  allowedVersions:
@@ -1,16 +1,19 @@
1
1
  {{#if (eq provider "postgres")}}
2
2
  import postgres from "@prisma/orm-postgres/runtime";
3
+ import { contractFromJson } from "@prisma/orm-postgres/static";
3
4
 
4
5
  {{#if (eq packageManager "deno")}}
5
6
  import type { Contract } from "./{{#if (eq authoring "typescript")}}generated/{{/if}}contract.d.ts";
6
7
  import contractJson from "./{{#if (eq authoring "typescript")}}generated/{{/if}}contract.json" with { type: "json" };
7
8
 
9
+ export const contract = contractFromJson<Contract>(contractJson);
10
+
8
11
  const databaseUrl = Deno.env.get("DATABASE_URL");
9
12
  if (!databaseUrl) {
10
13
  throw new Error("DATABASE_URL is not set. Add it to .env before starting the app.");
11
14
  }
12
15
 
13
- export const db = postgres<Contract>({ contractJson, url: databaseUrl });
16
+ export const db = postgres({ contract, url: databaseUrl });
14
17
  {{else}}
15
18
  import "temporal-polyfill/global";
16
19
 
@@ -18,6 +21,8 @@ import service from "{{#if (eq template "turborepo")}}../../../service.ts{{else}
18
21
  import type { Contract } from "./{{#if (eq authoring "typescript")}}generated/{{/if}}contract.d.ts";
19
22
  import contractJson from "./{{#if (eq authoring "typescript")}}generated/{{/if}}contract.json" with { type: "json" };
20
23
 
24
+ export const contract = contractFromJson<Contract>(contractJson);
25
+
21
26
  function loadComposerDatabase() {
22
27
  try {
23
28
  return service.load().database.client;
@@ -29,16 +34,19 @@ function loadComposerDatabase() {
29
34
  export const db =
30
35
  loadComposerDatabase() ??
31
36
  (process.env.DATABASE_URL
32
- ? postgres<Contract>({ contractJson, url: process.env.DATABASE_URL })
33
- : postgres<Contract>({ contractJson }));
37
+ ? postgres({ contract, url: process.env.DATABASE_URL })
38
+ : postgres({ contract }));
34
39
  {{/if}}
35
40
  {{else}}
36
41
  import mongo from "@prisma/orm-mongo/runtime";
42
+ import { contractFromJson } from "@prisma/orm-mongo/static";
37
43
 
38
44
  import service from "{{#if (eq template "turborepo")}}../../../service.ts{{else}}../../service.ts{{/if}}";
39
45
  import type { Contract } from "./{{#if (eq authoring "typescript")}}generated/{{/if}}contract.d.ts";
40
46
  import contractJson from "./{{#if (eq authoring "typescript")}}generated/{{/if}}contract.json" with { type: "json" };
41
47
 
48
+ export const contract = contractFromJson<Contract>(contractJson);
49
+
42
50
  function getDatabaseUrl(): string | undefined {
43
51
  try {
44
52
  return service.input().databaseUrl.expose();
@@ -49,9 +57,7 @@ function getDatabaseUrl(): string | undefined {
49
57
 
50
58
  const databaseUrl = getDatabaseUrl();
51
59
 
52
- export const db = databaseUrl
53
- ? mongo<Contract>({ contractJson, url: databaseUrl })
54
- : mongo<Contract>({ contractJson });
60
+ export const db = databaseUrl ? mongo({ contract, url: databaseUrl }) : mongo({ contract });
55
61
  {{/if}}
56
62
 
57
63
  let connection: Promise<void> | undefined;
@@ -8,9 +8,9 @@ export async function listUsers(limit = 10) {
8
8
  {{#if (eq provider "mongo")}}
9
9
  const users = [];
10
10
 
11
- for await (const user of db.orm.users.select("_id", "email", "username", "name").limit(limit).all()) {
11
+ for await (const user of db.orm.users.select("id", "email", "username", "name").limit(limit).all()) {
12
12
  users.push({
13
- id: String(user._id),
13
+ id: String(user.id),
14
14
  email: user.email,
15
15
  username: user.username ?? null,
16
16
  name: user.name ?? null,
@@ -12,12 +12,12 @@
12
12
  "astro": "astro"
13
13
  },
14
14
  "dependencies": {
15
- "astro": "^7.3.6"
15
+ "astro": "^7.4.2"
16
16
  },
17
17
  "devDependencies": {
18
- "@types/node": "^26.6.4",
18
+ "@types/node": "^26.6.5",
19
19
  "tsx": "^4.23.15",
20
20
  "typescript": "^6.0.3",
21
- "vite": "^8.3.3"
21
+ "vite": "^8.3.5"
22
22
  }
23
23
  }
@@ -14,11 +14,11 @@
14
14
  "start": "node dist/server.mjs"
15
15
  },
16
16
  "dependencies": {
17
- "@hono/node-server": "^2.1.3",
17
+ "@hono/node-server": "^2.1.5",
18
18
  "hono": "^4.13.13"
19
19
  },
20
20
  "devDependencies": {
21
- "@types/node": "^26.6.4",
21
+ "@types/node": "^26.6.5",
22
22
  "typescript": "^6.0.3"
23
23
  }
24
24
  }
@@ -14,14 +14,14 @@
14
14
  "start": "node dist/server.mjs"
15
15
  },
16
16
  "dependencies": {
17
- "@nestjs/common": "^12.1.2",
18
- "@nestjs/core": "^12.1.2",
19
- "@nestjs/platform-express": "^12.1.2",
17
+ "@nestjs/common": "^12.2.0",
18
+ "@nestjs/core": "^12.2.0",
19
+ "@nestjs/platform-express": "^12.2.0",
20
20
  "reflect-metadata": "^0.2.2",
21
21
  "rxjs": "^7.8.2"
22
22
  },
23
23
  "devDependencies": {
24
- "@types/node": "^26.6.4",
24
+ "@types/node": "^26.6.5",
25
25
  "typescript": "^6.0.3"
26
26
  }
27
27
  }
@@ -13,16 +13,16 @@
13
13
  "lint": "eslint"
14
14
  },
15
15
  "dependencies": {
16
- "next": "16.4.0",
17
- "react": "19.3.0",
18
- "react-dom": "19.3.0"
16
+ "next": "16.4.2",
17
+ "react": "19.3.1",
18
+ "react-dom": "19.3.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@types/node": "^26.6.4",
21
+ "@types/node": "^26.6.5",
22
22
  "@types/react": "^19.3.0",
23
23
  "@types/react-dom": "^19.3.0",
24
- "eslint": "^10.12.0",
25
- "eslint-config-next": "16.4.0",
24
+ "eslint": "^10.13.0",
25
+ "eslint-config-next": "16.4.2",
26
26
  "tsx": "^4.23.15",
27
27
  "typescript": "^6.0.3"
28
28
  }
@@ -18,15 +18,15 @@
18
18
  "typecheck": "nuxt typecheck"
19
19
  },
20
20
  "dependencies": {
21
- "nuxt": "^4.6.0",
22
- "vue": "^3.5.43",
23
- "vue-router": "^5.3.1"
21
+ "nuxt": "^4.6.2",
22
+ "vue": "^3.5.44",
23
+ "vue-router": "^5.4.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/node": "^26.6.4",
26
+ "@types/node": "^26.6.5",
27
27
  "tsx": "^4.23.15",
28
28
  "typescript": "^6.0.3",
29
- "vite": "^8.3.3",
30
- "vue-tsc": "^3.3.12"
29
+ "vite": "^8.3.5",
30
+ "vue-tsc": "^3.3.13"
31
31
  }
32
32
  }
@@ -19,13 +19,13 @@
19
19
  "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
20
20
  },
21
21
  "devDependencies": {
22
- "@sveltejs/kit": "^3.0.1",
22
+ "@sveltejs/kit": "^3.1.0",
23
23
  "@sveltejs/vite-plugin-svelte": "^7.3.1",
24
- "@types/node": "^26.6.4",
24
+ "@types/node": "^26.6.5",
25
25
  "svelte": "^5.57.2",
26
- "svelte-check": "^4.7.6",
26
+ "svelte-check": "^4.7.7",
27
27
  "tsx": "^4.23.15",
28
28
  "typescript": "^6.0.3",
29
- "vite": "^8.3.3"
29
+ "vite": "^8.3.5"
30
30
  }
31
31
  }
@@ -13,18 +13,18 @@
13
13
  "typecheck": "tsc --noEmit"
14
14
  },
15
15
  "dependencies": {
16
- "@tanstack/react-router": "^1.170.41",
17
- "@tanstack/react-start": "^1.168.60",
18
- "react": "^19.3.0",
19
- "react-dom": "^19.3.0"
16
+ "@tanstack/react-router": "^1.170.46",
17
+ "@tanstack/react-start": "^1.169.4",
18
+ "react": "^19.3.1",
19
+ "react-dom": "^19.3.1"
20
20
  },
21
21
  "devDependencies": {
22
- "@types/node": "^26.6.4",
22
+ "@types/node": "^26.6.5",
23
23
  "@types/react": "^19.3.0",
24
24
  "@types/react-dom": "^19.3.0",
25
25
  "@vitejs/plugin-react": "^6.1.2",
26
26
  "tsx": "^4.23.15",
27
27
  "typescript": "^6.0.3",
28
- "vite": "^8.3.3"
28
+ "vite": "^8.3.5"
29
29
  }
30
30
  }