create-prisma 0.14.2-pr.129.424.1 → 0.14.2

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/README.md CHANGED
@@ -4,9 +4,9 @@ Create a Prisma 8 app with Prisma Composer built in.
4
4
 
5
5
  ## Supported versions
6
6
 
7
- create-prisma supports exactly what Prisma ORM supports: Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 and newer (`^22.18.0 || ^24.11.0 || >=26.0.0`). create-prisma refuses unsupported Node.js versions before it writes any files, and the generated minimal, hono, elysia, nest and turborepo projects declare the same range in `engines.node`. The next, svelte, astro and tanstack-start templates declare no `engines` field.
7
+ create-prisma supports exactly what Prisma ORM supports: Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 and newer (`^22.18.0 || ^24.11.0 || >=26.0.0`). Node.js 23 and 24.0 to 24.10 are not supported. create-prisma refuses unsupported Node.js versions before it writes any files, and the generated minimal, hono, elysia, nest and turborepo projects declare the same range in `engines.node`.
8
8
 
9
- Each supported Node.js release works with the npm it ships, including npm 10 on Node.js 22. pnpm, Yarn 4.10 or newer, Bun and Deno (local minimal PostgreSQL apps only, see below) are also supported. Yarn 1 is not supported. When create-prisma runs on Bun or Deno instead of Node.js, it skips the Node.js check.
9
+ Each supported Node.js release works with the npm it ships, including npm 10 on Node.js 22. pnpm, Yarn 4.10 or newer, Bun and Deno are also supported. Yarn 1 is not supported. When create-prisma runs on Bun or Deno instead of Node.js, it skips the Node.js check.
10
10
 
11
11
  The one exception is the `nuxt` template. Nuxt itself requires Node.js `^22.22.3 || ^24.15.0 || >=26.0.0`, so Nuxt projects declare that narrower range.
12
12
 
@@ -59,7 +59,7 @@ workspace. Choosing another workspace also updates the Prisma CLI's active works
59
59
  - `nuxt`
60
60
  - `tanstack-start`
61
61
 
62
- PostgreSQL and MongoDB are supported with PSL or TypeScript contract authoring. For supported package managers, see [Supported versions](#supported-versions).
62
+ PostgreSQL and MongoDB are supported with PSL or TypeScript contract authoring. npm, pnpm, Yarn, and Bun are supported.
63
63
 
64
64
  Deno is supported for local minimal PostgreSQL apps:
65
65
 
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as ApplicationLayer, i as runCreatePrismaCli } from "./src-89sRHnGt.mjs";
2
+ import { a as ApplicationLayer, i as runCreatePrismaCli } from "./src-Cg1gEAgT.mjs";
3
3
  import { Effect } from "effect";
4
4
  import { NodeRuntime } from "@effect/platform-node-shared";
5
5
  //#region src/cli.ts
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { c as AgentSkillTargetSchema, d as CreateTemplateSchema, f as DatabaseProviderSchema, i as runCreatePrismaCli, l as AuthoringStyleSchema, n as createCreatePrismaCli, o as CREATE_PRISMA_RESULT_SCHEMA_VERSION, p as PackageManagerSchema, r as createPrismaCommand, s as CreateCommandResultSchema, t as create, u as CreateCommandInputSchema } from "./src-89sRHnGt.mjs";
2
+ import { c as AgentSkillTargetSchema, d as CreateTemplateSchema, f as DatabaseProviderSchema, i as runCreatePrismaCli, l as AuthoringStyleSchema, n as createCreatePrismaCli, o as CREATE_PRISMA_RESULT_SCHEMA_VERSION, p as PackageManagerSchema, r as createPrismaCommand, s as CreateCommandResultSchema, t as create, u as CreateCommandInputSchema } from "./src-Cg1gEAgT.mjs";
3
3
  export { AgentSkillTargetSchema, AuthoringStyleSchema, CREATE_PRISMA_RESULT_SCHEMA_VERSION, CreateCommandInputSchema, CreateCommandResultSchema, CreateTemplateSchema, DatabaseProviderSchema, PackageManagerSchema, create, createCreatePrismaCli, createPrismaCommand, runCreatePrismaCli };
@@ -464,14 +464,20 @@ function getPackageManagerErrorCode(command, output) {
464
464
  }
465
465
  //#endregion
466
466
  //#region src/telemetry/client.ts
467
- const TELEMETRY_API_KEY = "";
467
+ const TELEMETRY_API_KEY = "phc_cmc85avbWyuJ2JyKdGPdv7dxXli8xLdWDBPbvIXWJfs";
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());
473
479
  function shouldDisableTelemetry() {
474
- return true;
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;
475
481
  }
476
482
  function getTelemetryConfigDir() {
477
483
  if (process.platform === "darwin") return path.join(os.homedir(), "Library", "Application Support", "create-prisma");
@@ -495,7 +501,7 @@ const getAnonymousIdEffect = Effect.fn("Telemetry.getAnonymousId")(function* ()
495
501
  return anonymousId;
496
502
  });
497
503
  const getCommonProperties = () => ({
498
- "cli-version": "0.14.2-pr.129.424.1",
504
+ "cli-version": "0.14.2",
499
505
  "node-version": process.version,
500
506
  platform: process.platform,
501
507
  arch: process.arch
@@ -2296,33 +2302,24 @@ function getCreatePrismaIntro() {
2296
2302
  }
2297
2303
  //#endregion
2298
2304
  //#region src/utils/node-version.ts
2299
- const supportedNodeLines = [{
2300
- major: 22,
2301
- minimum: [
2302
- 22,
2303
- 18,
2304
- 0
2305
- ]
2306
- }, {
2307
- major: 24,
2308
- minimum: [
2309
- 24,
2310
- 11,
2311
- 0
2312
- ]
2313
- }];
2305
+ const minimumByMajor = /* @__PURE__ */ new Map([[22, [
2306
+ 22,
2307
+ 18,
2308
+ 0
2309
+ ]], [24, [
2310
+ 24,
2311
+ 11,
2312
+ 0
2313
+ ]]]);
2314
2314
  const FIRST_MAJOR_WITH_EVERY_RELEASE_SUPPORTED = 26;
2315
- [...supportedNodeLines.map(({ minimum }) => `^${minimum.join(".")}`), `>=${FIRST_MAJOR_WITH_EVERY_RELEASE_SUPPORTED}.0.0`].join(" || ");
2316
- supportedNodeLines[0].minimum;
2317
- const SUPPORTED_NODE_DESCRIPTION = `${supportedNodeLines.map(({ major, minimum }) => `${minimum[0]}.${minimum[1]} or newer on the ${major} line`).join(", ")}, or ${FIRST_MAJOR_WITH_EVERY_RELEASE_SUPPORTED} and newer`;
2318
- const RELEASE_VERSION_PATTERN = /^v?(\d+)\.(\d+)\.(\d+)(?:\+[0-9A-Za-z.-]+)?$/;
2319
- function parseReleaseVersion(version) {
2320
- const match = RELEASE_VERSION_PATTERN.exec(version);
2321
- return match ? [
2322
- Number(match[1]),
2323
- Number(match[2]),
2324
- Number(match[3])
2325
- ] : void 0;
2315
+ minimumByMajor.get(22);
2316
+ function parseVersion(version) {
2317
+ const [major = "0", minor = "0", patch = "0"] = version.replace(/^v/, "").split(".");
2318
+ return [
2319
+ Number(major),
2320
+ Number(minor),
2321
+ Number.parseInt(patch, 10)
2322
+ ];
2326
2323
  }
2327
2324
  function isAtLeast(current, minimum) {
2328
2325
  for (const [index, part] of current.entries()) if (part !== minimum[index]) return part > minimum[index];
@@ -2332,16 +2329,15 @@ function runsOnNode(versions = process.versions) {
2332
2329
  return versions.bun === void 0 && versions.deno === void 0;
2333
2330
  }
2334
2331
  function supportsPrisma(nodeVersion = process.versions.node) {
2335
- const current = parseReleaseVersion(nodeVersion);
2336
- if (!current) return false;
2332
+ const current = parseVersion(nodeVersion);
2337
2333
  if (current[0] >= FIRST_MAJOR_WITH_EVERY_RELEASE_SUPPORTED) return true;
2338
- const line = supportedNodeLines.find(({ major }) => major === current[0]);
2339
- return line !== void 0 && isAtLeast(current, line.minimum);
2334
+ const minimum = minimumByMajor.get(current[0]);
2335
+ return minimum !== void 0 && isAtLeast(current, minimum);
2340
2336
  }
2341
2337
  function getUnsupportedNodeMessage(nodeVersion = process.versions.node) {
2342
2338
  return [
2343
2339
  `Node.js ${nodeVersion} is unsupported by create-prisma@latest.`,
2344
- `Required: Node.js ${SUPPORTED_NODE_DESCRIPTION}.`,
2340
+ "Required: Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 and newer.",
2345
2341
  "Update Node.js and run the command again."
2346
2342
  ].join("\n");
2347
2343
  }
@@ -2800,7 +2796,7 @@ function isJsonOutputRequested(argv) {
2800
2796
  const writeJsonResult = Effect.fn("JsonOutput.write")((result) => Effect.sync(() => process.stdout.write(`${JSON.stringify(result)}\n`)));
2801
2797
  //#endregion
2802
2798
  //#region src/index.ts
2803
- const CLI_VERSION = "0.14.2-pr.129.424.1";
2799
+ const CLI_VERSION = "0.14.2";
2804
2800
  const optionalArgument = (name, description) => Argument.String(name).pipe(Argument.withDescription(description), Argument.optional, Argument.map(Option.getOrUndefined));
2805
2801
  const optionalBoolean = (name, description) => Flag.Boolean(name).pipe(Flag.withDescription(description), Flag.optional, Flag.map(Option.getOrUndefined));
2806
2802
  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.2-pr.129.424.1",
3
+ "version": "0.14.2",
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",