create-prisma 0.12.0-pr.98.331.1 → 0.12.0-pr.99.335.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/README.md CHANGED
@@ -15,6 +15,11 @@ bunx create-prisma@latest my-app
15
15
 
16
16
  The CLI initializes Prisma 8 with `prisma@latest`, installs dependencies, emits the contract, and generates a deployable Composer app. PostgreSQL projects use Composer's native Prisma Postgres provider, including migrations and a typed runtime client.
17
17
 
18
+ For npm, use 11.6.0 or newer, which includes the [upstream resolver fix](https://github.com/npm/cli/pull/8448).
19
+ Older npm releases can crash resolving the dependency tree (`Cannot read properties of null (reading 'edgesOut')`). Run
20
+ `npm install --global npm@11` to update. create-prisma checks the selected npm
21
+ version before writing project files and never upgrades your package manager automatically.
22
+
18
23
  The deployment prompt is:
19
24
 
20
25
  ```text
@@ -23,6 +28,11 @@ Deploy to Prisma now?
23
28
 
24
29
  Choose no to deploy later with the generated `deploy` script.
25
30
 
31
+ New apps explicitly use `us-east-1` in `prisma-composer.config.ts`. Change the
32
+ `prismaCloud({ region })` option before deploying if you need another region.
33
+ Composer requires a region when creating a new project; leaving it unspecified
34
+ only works when deploying into an existing project whose region can be inherited.
35
+
26
36
  When multiple Prisma workspace sessions are available, the CLI asks which workspace should receive
27
37
  the deployment. For unattended usage, pass `--workspace <id-or-name>` or omit it to use the active
28
38
  workspace. Choosing another workspace also updates the Prisma CLI's active workspace session.
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as ApplicationLayer } from "./json-output-DBA3pj0a.mjs";
2
+ import { a as ApplicationLayer } from "./json-output-D4NXLr8N.mjs";
3
3
  import { runCreatePrismaCli } from "./index.mjs";
4
4
  import { Effect } from "effect";
5
5
  import { NodeRuntime } from "@effect/platform-node-shared";
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { _ as authoringStyles, b as normalizeDatabaseProvider, c as CreateCommandResultSchema, d as AuthoringStyleSchema, f as CreateCommandInputSchema, g as agentSkillTargets, h as PackageManagerSchema, i as getErrorMessage, l as createCommandFailureResult, m as DatabaseProviderSchema, n as writeJsonResult, o as applicationRuntime, p as CreateTemplateSchema, r as runCreateCommandEffect, s as CREATE_PRISMA_RESULT_SCHEMA_VERSION, t as isJsonOutputRequested, u as AgentSkillTargetSchema, v as createTemplates, x as packageManagers, y as databaseProviderInputs } from "./json-output-DBA3pj0a.mjs";
2
+ import { _ as authoringStyles, b as normalizeDatabaseProvider, c as CreateCommandResultSchema, d as AuthoringStyleSchema, f as CreateCommandInputSchema, g as agentSkillTargets, h as PackageManagerSchema, i as getErrorMessage, l as createCommandFailureResult, m as DatabaseProviderSchema, n as writeJsonResult, o as applicationRuntime, p as CreateTemplateSchema, r as runCreateCommandEffect, s as CREATE_PRISMA_RESULT_SCHEMA_VERSION, t as isJsonOutputRequested, u as AgentSkillTargetSchema, v as createTemplates, x as packageManagers, y as databaseProviderInputs } from "./json-output-D4NXLr8N.mjs";
3
3
  import { Console, Effect, Option } from "effect";
4
4
  import { Argument, CliError, Command, Flag } from "effect/unstable/cli";
5
5
 
6
6
  //#region src/index.ts
7
- const CLI_VERSION = "0.12.0-pr.98.331.1";
7
+ const CLI_VERSION = "0.12.0-pr.99.335.1";
8
8
  const optionalArgument = (name, description) => Argument.string(name).pipe(Argument.withDescription(description), Argument.optional, Argument.map(Option.getOrUndefined));
9
9
  const optionalBoolean = (name, description) => Flag.boolean(name).pipe(Flag.withDescription(description), Flag.optional, Flag.map(Option.getOrUndefined));
10
10
  const optionalString = (name, description) => Flag.string(name).pipe(Flag.withDescription(description), Flag.optional, Flag.map(Option.getOrUndefined));
@@ -35,6 +35,7 @@ const CreateFailureStageSchema = Schema.Literals([
35
35
  const CreateFailureReasonSchema = Schema.Literals([
36
36
  "invalid_input",
37
37
  "unsupported_node_version",
38
+ "unsupported_package_manager_version",
38
39
  "invalid_project_name",
39
40
  "target_path_not_directory",
40
41
  "target_directory_not_empty",
@@ -381,7 +382,7 @@ const getAnonymousIdEffect = Effect.fn("Telemetry.getAnonymousId")(function* ()
381
382
  return anonymousId;
382
383
  });
383
384
  const getCommonProperties = () => ({
384
- "cli-version": "0.12.0-pr.98.331.1",
385
+ "cli-version": "0.12.0-pr.99.335.1",
385
386
  "node-version": process.version,
386
387
  platform: process.platform,
387
388
  arch: process.arch
@@ -420,6 +421,7 @@ const CREATE_PRISMA_NEXT_CANCELLED_EVENT = "cli:create_prisma_next_command_cance
420
421
  const expectedRejectionReasons = new Set([
421
422
  "invalid_input",
422
423
  "unsupported_node_version",
424
+ "unsupported_package_manager_version",
423
425
  "invalid_project_name",
424
426
  "target_path_not_directory",
425
427
  "target_directory_not_empty",
@@ -502,11 +504,27 @@ const trackCreateCancelledEffect = Effect.fn("Telemetry.createCancelled")(functi
502
504
  //#region src/utils/package-manager.ts
503
505
  const DENO_ALLOW_FRESH_DEPENDENCIES = "--minimum-dependency-age=0";
504
506
  const packageManagerManifestValues = {
505
- npm: "npm@10.9.0",
507
+ npm: "npm@11.6.0",
506
508
  pnpm: "pnpm@11.21.0",
507
509
  yarn: "yarn@4.13.0",
508
510
  bun: "bun@1.3.9"
509
511
  };
512
+ const verifyPackageManagerEffect = Effect.fn("PackageManager.verify")(function* (packageManager) {
513
+ if (packageManager !== "npm") return;
514
+ const version = (yield* (yield* CommandRunner).runChecked({
515
+ command: "npm",
516
+ args: ["--version"],
517
+ cwd: process.cwd()
518
+ })).stdout.trim();
519
+ const parts = version.split(".").map(Number);
520
+ if (parts.length !== 3 || parts.some((part) => !Number.isInteger(part) || part < 0)) return yield* Effect.fail(/* @__PURE__ */ new Error(`Could not determine the installed npm version: ${version}`));
521
+ const [major, minor] = parts;
522
+ if (major < 11 || major === 11 && minor < 6) return yield* new CreateFailure({
523
+ stage: "validate_input",
524
+ reason: "unsupported_package_manager_version",
525
+ message: `npm ${version} is unsupported. Required: npm 11.6.0 or newer. Older npm releases can crash while resolving Prisma dependencies. Run npm install --global npm@11, then retry create-prisma.`
526
+ });
527
+ });
510
528
  function parseUserAgent(userAgent) {
511
529
  if (userAgent?.startsWith("pnpm")) return "pnpm";
512
530
  if (userAgent?.startsWith("yarn")) return "yarn";
@@ -2166,6 +2184,7 @@ const createProjectEffect = Effect.fn("Create.project")(function* (rawInput, inp
2166
2184
  yield* Effect.sync(() => intro(getCreatePrismaIntro(), { output }));
2167
2185
  const context = yield* atCreateStage(collectCreateContext(input), "collect_context", "unexpected_error");
2168
2186
  yield* Ref.set(contextRef, Option.some(context));
2187
+ yield* atCreateStage(verifyPackageManagerEffect(context.prismaSetupContext.packageManager), "install_dependencies", "dependency_install_failed");
2169
2188
  return {
2170
2189
  input,
2171
2190
  context,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma",
3
- "version": "0.12.0-pr.98.331.1",
3
+ "version": "0.12.0-pr.99.335.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",
@@ -7,7 +7,7 @@ import { nextjsBuild } from "@prisma/composer/nextjs/control";
7
7
  import { prismaCloud, prismaState } from "@prisma/composer-prisma-cloud/control";
8
8
 
9
9
  export default defineConfig({
10
- extensions: [prismaCloud(), nodeBuild(){{#if (eq template "next")}}, nextjsBuild(){{/if}}],
10
+ extensions: [prismaCloud({ region: "us-east-1" }), nodeBuild(){{#if (eq template "next")}}, nextjsBuild(){{/if}}],
11
11
  state: prismaState(),
12
12
  });
13
13
  {{/unless}}