create-prisma 0.13.0 → 0.13.1-pr.106.361.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 ApplicationLayer } from "./json-output-Bpk7rG2T.mjs";
2
+ import { a as ApplicationLayer } from "./json-output-DnIQeFmP.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.d.mts CHANGED
@@ -4,6 +4,10 @@ import { Command } from "effect/unstable/cli";
4
4
  import * as effect_FileSystem0 from "effect/FileSystem";
5
5
  import * as effect_Cause0 from "effect/Cause";
6
6
 
7
+ //#region src/utils/child-process-failure.d.ts
8
+ declare const ChildProcessFailureSchema: Schema.Literals<readonly ["cancelled", "command_not_found", "interrupted", "max_buffer", "non_zero_exit", "permission_denied", "spawn_failed", "terminated", "timed_out"]>;
9
+ type ChildProcessFailure = typeof ChildProcessFailureSchema.Type;
10
+ //#endregion
7
11
  //#region src/services/command-runner.d.ts
8
12
  type CommandSpec = {
9
13
  command: string;
@@ -17,6 +21,7 @@ type CommandResult = {
17
21
  exitCode: number;
18
22
  stdout: string;
19
23
  stderr: string;
24
+ childProcessFailure?: ChildProcessFailure;
20
25
  };
21
26
  declare const CommandExecutionError_base: Schema.Class<CommandExecutionError, Schema.TaggedStruct<"CommandExecutionError", {
22
27
  readonly command: Schema.String;
@@ -25,6 +30,7 @@ declare const CommandExecutionError_base: Schema.Class<CommandExecutionError, Sc
25
30
  readonly stdout: Schema.String;
26
31
  readonly stderr: Schema.String;
27
32
  readonly cause: Schema.optionalKey<Schema.Defect>;
33
+ readonly childProcessFailure: Schema.optional<Schema.Literals<readonly ["cancelled", "command_not_found", "interrupted", "max_buffer", "non_zero_exit", "permission_denied", "spawn_failed", "terminated", "timed_out"]>>;
28
34
  }>, effect_Cause0.YieldableError>;
29
35
  declare class CommandExecutionError extends CommandExecutionError_base {
30
36
  get message(): string;
@@ -62,7 +68,7 @@ type CreateCommandInput = typeof CreateCommandInputSchema.Type;
62
68
  //#region src/create-outcome.d.ts
63
69
  declare const CreateFailureStageSchema: Schema.Literals<readonly ["validate_input", "collect_context", "scaffold_template", "initialize_prisma", "configure_project", "install_dependencies", "initialize_agent_skills", "emit_contract", "plan_migration", "initialize_git", "authenticate", "select_workspace", "check_project_name", "build", "composer_deploy", "unknown"]>;
64
70
  type CreateFailureStage = typeof CreateFailureStageSchema.Type;
65
- declare const CreateCancellationStageSchema: Schema.Literals<readonly ["project_name", "template", "database_provider", "authoring_style", "package_manager", "agent_skills", "deployment_intent", "select_workspace"]>;
71
+ declare const CreateCancellationStageSchema: Schema.Literals<readonly ["project_name", "template", "database_provider", "authoring_style", "package_manager", "agent_skills", "deployment_intent", "authenticate", "select_workspace"]>;
66
72
  type CreateCancellationStage = typeof CreateCancellationStageSchema.Type;
67
73
  //#endregion
68
74
  //#region src/result.d.ts
@@ -118,7 +124,7 @@ declare const CreateCommandFailureResultSchema: Schema.Struct<{
118
124
  readonly schemaVersion: Schema.Literal<1>;
119
125
  readonly ok: Schema.Literal<false>;
120
126
  readonly error: Schema.Struct<{
121
- readonly stage: Schema.Union<readonly [Schema.Literals<readonly ["validate_input", "collect_context", "scaffold_template", "initialize_prisma", "configure_project", "install_dependencies", "initialize_agent_skills", "emit_contract", "plan_migration", "initialize_git", "authenticate", "select_workspace", "check_project_name", "build", "composer_deploy", "unknown"]>, Schema.Literals<readonly ["project_name", "template", "database_provider", "authoring_style", "package_manager", "agent_skills", "deployment_intent", "select_workspace"]>, Schema.Literal<"parse_arguments">]>;
127
+ readonly stage: Schema.Union<readonly [Schema.Literals<readonly ["validate_input", "collect_context", "scaffold_template", "initialize_prisma", "configure_project", "install_dependencies", "initialize_agent_skills", "emit_contract", "plan_migration", "initialize_git", "authenticate", "select_workspace", "check_project_name", "build", "composer_deploy", "unknown"]>, Schema.Literals<readonly ["project_name", "template", "database_provider", "authoring_style", "package_manager", "agent_skills", "deployment_intent", "authenticate", "select_workspace"]>, Schema.Literal<"parse_arguments">]>;
122
128
  readonly message: Schema.String;
123
129
  }>;
124
130
  readonly project: Schema.optionalKey<Schema.Struct<{
@@ -165,7 +171,7 @@ declare const CreateCommandResultSchema: Schema.Union<readonly [Schema.Struct<{
165
171
  readonly schemaVersion: Schema.Literal<1>;
166
172
  readonly ok: Schema.Literal<false>;
167
173
  readonly error: Schema.Struct<{
168
- readonly stage: Schema.Union<readonly [Schema.Literals<readonly ["validate_input", "collect_context", "scaffold_template", "initialize_prisma", "configure_project", "install_dependencies", "initialize_agent_skills", "emit_contract", "plan_migration", "initialize_git", "authenticate", "select_workspace", "check_project_name", "build", "composer_deploy", "unknown"]>, Schema.Literals<readonly ["project_name", "template", "database_provider", "authoring_style", "package_manager", "agent_skills", "deployment_intent", "select_workspace"]>, Schema.Literal<"parse_arguments">]>;
174
+ readonly stage: Schema.Union<readonly [Schema.Literals<readonly ["validate_input", "collect_context", "scaffold_template", "initialize_prisma", "configure_project", "install_dependencies", "initialize_agent_skills", "emit_contract", "plan_migration", "initialize_git", "authenticate", "select_workspace", "check_project_name", "build", "composer_deploy", "unknown"]>, Schema.Literals<readonly ["project_name", "template", "database_provider", "authoring_style", "package_manager", "agent_skills", "deployment_intent", "authenticate", "select_workspace"]>, Schema.Literal<"parse_arguments">]>;
169
175
  readonly message: Schema.String;
170
176
  }>;
171
177
  readonly project: Schema.optionalKey<Schema.Struct<{
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-Bpk7rG2T.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-DnIQeFmP.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.13.0";
7
+ const CLI_VERSION = "0.13.1-pr.106.361.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));
@@ -13,6 +13,36 @@ import { fileURLToPath } from "node:url";
13
13
  import { Writable } from "node:stream";
14
14
  import { styleText } from "node:util";
15
15
 
16
+ //#region src/utils/child-process-failure.ts
17
+ const ChildProcessFailureSchema = Schema.Literals([
18
+ "cancelled",
19
+ "command_not_found",
20
+ "interrupted",
21
+ "max_buffer",
22
+ "non_zero_exit",
23
+ "permission_denied",
24
+ "spawn_failed",
25
+ "terminated",
26
+ "timed_out"
27
+ ]);
28
+ const WINDOWS_CONTROL_C_EXIT_CODE = 3221225786;
29
+ function getChildProcessFailure(error) {
30
+ if (typeof error !== "object" || error === null) return void 0;
31
+ if (Reflect.get(error, "name") !== "ExecaError" || Reflect.get(error, "failed") !== true) return;
32
+ if (Reflect.get(error, "timedOut") === true) return "timed_out";
33
+ if (Reflect.get(error, "isCanceled") === true) return "cancelled";
34
+ if (Reflect.get(error, "isMaxBuffer") === true) return "max_buffer";
35
+ const exitCode = Reflect.get(error, "exitCode");
36
+ if (Reflect.get(error, "signal") === "SIGINT" || exitCode === 130 || exitCode === WINDOWS_CONTROL_C_EXIT_CODE) return "interrupted";
37
+ if (Reflect.get(error, "isTerminated") === true) return "terminated";
38
+ const code = Reflect.get(error, "code");
39
+ if (code === "ENOENT") return "command_not_found";
40
+ if (code === "EACCES" || code === "EPERM") return "permission_denied";
41
+ if (typeof exitCode === "number") return "non_zero_exit";
42
+ return "spawn_failed";
43
+ }
44
+
45
+ //#endregion
16
46
  //#region src/create-outcome.ts
17
47
  const CreateFailureStageSchema = Schema.Literals([
18
48
  "validate_input",
@@ -69,6 +99,7 @@ const CreateCancellationStageSchema = Schema.Literals([
69
99
  "package_manager",
70
100
  "agent_skills",
71
101
  "deployment_intent",
102
+ "authenticate",
72
103
  "select_workspace"
73
104
  ]);
74
105
  var CreateCancellationError = class extends Schema.TaggedError()("CreateCancellationError", {
@@ -94,7 +125,8 @@ var PrismaCliCommandError = class extends Schema.TaggedError()("PrismaCliCommand
94
125
  command: Schema.optionalKey(Schema.String),
95
126
  code: Schema.optionalKey(Schema.String),
96
127
  stderr: Schema.optionalKey(Schema.String),
97
- exitCode: Schema.optionalKey(Schema.Number)
128
+ exitCode: Schema.optionalKey(Schema.Number),
129
+ childProcessFailure: Schema.optional(ChildProcessFailureSchema)
98
130
  }) {
99
131
  prismaCliCommand = this.command;
100
132
  prismaCliErrorCode = this.code;
@@ -284,7 +316,8 @@ var CommandExecutionError = class extends Schema.TaggedError()("CommandExecution
284
316
  exitCode: Schema.optionalKey(Schema.Number),
285
317
  stdout: Schema.String,
286
318
  stderr: Schema.String,
287
- cause: Schema.optionalKey(Schema.Defect())
319
+ cause: Schema.optionalKey(Schema.Defect()),
320
+ childProcessFailure: Schema.optional(ChildProcessFailureSchema)
288
321
  }) {
289
322
  get message() {
290
323
  const detail = this.stderr.trim() || this.stdout.trim();
@@ -320,7 +353,8 @@ var CommandRunner = class CommandRunner extends Context.Service()("create-prisma
320
353
  return {
321
354
  exitCode: result.exitCode ?? 1,
322
355
  stdout: typeof result.stdout === "string" ? result.stdout : "",
323
- stderr: typeof result.stderr === "string" ? result.stderr : ""
356
+ stderr: typeof result.stderr === "string" ? result.stderr : "",
357
+ childProcessFailure: getChildProcessFailure(result)
324
358
  };
325
359
  },
326
360
  catch: (cause) => new CommandExecutionError({
@@ -328,7 +362,8 @@ var CommandRunner = class CommandRunner extends Context.Service()("create-prisma
328
362
  args: [...spec.args],
329
363
  stdout: "",
330
364
  stderr: "",
331
- cause
365
+ cause,
366
+ childProcessFailure: getChildProcessFailure(cause)
332
367
  })
333
368
  }));
334
369
  const runChecked = Effect.fn("CommandRunner.runChecked")((spec) => Effect.flatMap(run(spec), (result) => result.exitCode === 0 ? Effect.succeed(result) : Effect.fail(new CommandExecutionError({
@@ -336,7 +371,8 @@ var CommandRunner = class CommandRunner extends Context.Service()("create-prisma
336
371
  args: [...spec.args],
337
372
  exitCode: result.exitCode,
338
373
  stdout: result.stdout,
339
- stderr: result.stderr
374
+ stderr: result.stderr,
375
+ childProcessFailure: result.childProcessFailure
340
376
  }))));
341
377
  return CommandRunner.of({
342
378
  run,
@@ -353,20 +389,14 @@ const applicationRuntime = ManagedRuntime.make(ApplicationLayer);
353
389
 
354
390
  //#endregion
355
391
  //#region src/telemetry/client.ts
356
- const TELEMETRY_API_KEY = "phc_cmc85avbWyuJ2JyKdGPdv7dxXli8xLdWDBPbvIXWJfs";
392
+ const TELEMETRY_API_KEY = "";
357
393
  const TELEMETRY_HOST = "https://us.i.posthog.com";
358
394
  const TELEMETRY_CONFIG_FILE = "telemetry.json";
359
395
  const TELEMETRY_TIMEOUT_MS = 2e3;
360
396
  const AnonymousId = Schema.String.check(Schema.isUUID(4));
361
397
  const decodeAnonymousId = Schema.decodeUnknownExit(AnonymousId);
362
- const isTruthyEnvValue = (value) => [
363
- "1",
364
- "true",
365
- "yes",
366
- "on"
367
- ].includes(String(value ?? "").trim().toLowerCase());
368
398
  function shouldDisableTelemetry() {
369
- 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;
399
+ return true;
370
400
  }
371
401
  function getTelemetryConfigDir() {
372
402
  if (process.platform === "darwin") return path.join(os.homedir(), "Library", "Application Support", "create-prisma");
@@ -389,7 +419,7 @@ const getAnonymousIdEffect = Effect.fn("Telemetry.getAnonymousId")(function* ()
389
419
  return anonymousId;
390
420
  });
391
421
  const getCommonProperties = () => ({
392
- "cli-version": "0.13.0",
422
+ "cli-version": "0.13.1-pr.106.361.1",
393
423
  "node-version": process.version,
394
424
  platform: process.platform,
395
425
  arch: process.arch
@@ -475,6 +505,9 @@ function getErrorCode(error) {
475
505
  const code = Reflect.get(error, "code");
476
506
  return typeof code === "number" || typeof code === "string" ? code : null;
477
507
  }
508
+ function getChildProcessFailureProperty(error) {
509
+ return error instanceof CommandExecutionError || error instanceof PrismaCliCommandError ? error.childProcessFailure ?? null : null;
510
+ }
478
511
  function getPrismaCliFailureProperty(error, property) {
479
512
  if (typeof error !== "object" || error === null) return null;
480
513
  const value = Reflect.get(error, property);
@@ -495,6 +528,7 @@ const trackCreateFailedEffect = Effect.fn("Telemetry.createFailed")(function* (p
495
528
  "failure-reason": params.reason,
496
529
  "error-name": getErrorName(params.error),
497
530
  "error-code": getErrorCode(params.error),
531
+ "child-process-failure": getChildProcessFailureProperty(params.error),
498
532
  "prisma-cli-command": getPrismaCliFailureProperty(params.error, "prismaCliCommand"),
499
533
  "prisma-cli-error-code": getPrismaCliFailureProperty(params.error, "prismaCliErrorCode")
500
534
  }).pipe(Effect.scoped, Effect.timeout(TELEMETRY_TIMEOUT_MS), Effect.catch(() => Effect.void));
@@ -507,6 +541,86 @@ const trackCreateCancelledEffect = Effect.fn("Telemetry.createCancelled")(functi
507
541
  }).pipe(Effect.scoped, Effect.timeout(TELEMETRY_TIMEOUT_MS), Effect.catch(() => Effect.void));
508
542
  });
509
543
 
544
+ //#endregion
545
+ //#region src/constants/dependencies.ts
546
+ const dependencyVersionMap = {
547
+ "@astrojs/node": "^10.0.2",
548
+ "@elysiajs/node": "^1.4.5",
549
+ "@prisma/composer": "0.20.0",
550
+ "@prisma/composer-prisma-cloud": "0.20.0",
551
+ "@prisma/dev": "0.25.2",
552
+ "@prisma/orm-mongo": "8.0.0-rc.11",
553
+ "@prisma/orm-postgres": "8.0.0-rc.11",
554
+ "@sveltejs/adapter-node": "^5.3.2",
555
+ "@types/node": "^25.6.2",
556
+ alchemy: "2.0.0-beta.74",
557
+ arktype: "^2.2.3",
558
+ dotenv: "^17.4.2",
559
+ effect: "4.0.0-rc.112",
560
+ mongodb: "^7.1.0",
561
+ "mongodb-memory-server": "^11.1.0",
562
+ nitro: "^3.0.260610-beta",
563
+ prisma: "8.0.0-rc.15",
564
+ "temporal-polyfill": "^1.0.4",
565
+ tsdown: "^0.22.14",
566
+ turbo: "2.10.12",
567
+ tsx: "^4.21.0",
568
+ typescript: "^5.9.3"
569
+ };
570
+ const PRISMA_PLATFORM_CLI_PACKAGE = `prisma@${dependencyVersionMap.prisma}`;
571
+ const PRISMA_DENO_CLI_PACKAGE = PRISMA_PLATFORM_CLI_PACKAGE;
572
+ function getDependencyVersion(packageName) {
573
+ return dependencyVersionMap[packageName];
574
+ }
575
+ function usesTsdown(template) {
576
+ return template === "minimal" || template === "hono" || template === "elysia" || template === "nest";
577
+ }
578
+ function getCreateTemplateDependencies(template, packageManager) {
579
+ const dependencies = [
580
+ "@prisma/composer",
581
+ "@prisma/composer-prisma-cloud",
582
+ "alchemy"
583
+ ];
584
+ const devDependencies = [];
585
+ if (usesTsdown(template)) {
586
+ devDependencies.push("tsdown");
587
+ devDependencies.push("tsx");
588
+ }
589
+ if (template === "minimal") devDependencies.push("typescript");
590
+ if (template === "elysia") {
591
+ dependencies.push("@elysiajs/node");
592
+ devDependencies.push("@types/node");
593
+ }
594
+ if (template === "svelte") devDependencies.push("@sveltejs/adapter-node");
595
+ if (template === "astro") dependencies.push("@astrojs/node");
596
+ if (template === "tanstack-start") devDependencies.push("nitro");
597
+ if (template === "turborepo") devDependencies.push("turbo", "typescript");
598
+ const targets = [{
599
+ packageJsonPath: "package.json",
600
+ dependencies,
601
+ devDependencies
602
+ }];
603
+ if (template === "turborepo") {
604
+ targets.push({
605
+ packageJsonPath: "apps/server/package.json",
606
+ dependencies: [],
607
+ devDependencies: [
608
+ "@types/node",
609
+ "tsdown",
610
+ "tsx",
611
+ "typescript"
612
+ ],
613
+ customDependencies: { "@repo/database": packageManager === "npm" ? "*" : "workspace:*" }
614
+ });
615
+ targets.push({
616
+ packageJsonPath: "packages/database/package.json",
617
+ dependencies: [],
618
+ devDependencies: ["typescript"]
619
+ });
620
+ }
621
+ return targets;
622
+ }
623
+
510
624
  //#endregion
511
625
  //#region src/utils/package-manager.ts
512
626
  const DENO_ALLOW_FRESH_DEPENDENCIES = "--minimum-dependency-age=0";
@@ -657,7 +771,7 @@ function getLocalPackageBinaryArgs(packageManager, binaryName, binaryArgs) {
657
771
  "run",
658
772
  "-A",
659
773
  "--frozen",
660
- `npm:${binaryName}@latest`,
774
+ `npm:${binaryName}@${getDependencyVersion(binaryName) ?? "latest"}`,
661
775
  ...binaryArgs
662
776
  ]
663
777
  };
@@ -836,86 +950,6 @@ const scaffoldCreateTemplateEffect = Effect.fn("Templates.scaffold")(function* (
836
950
  yield* scaffoldCreateSharedTemplatesEffect(options);
837
951
  });
838
952
 
839
- //#endregion
840
- //#region src/constants/dependencies.ts
841
- const dependencyVersionMap = {
842
- "@astrojs/node": "^10.0.2",
843
- "@elysiajs/node": "^1.4.5",
844
- "@prisma/composer": "0.19.0",
845
- "@prisma/composer-prisma-cloud": "0.19.0",
846
- "@prisma/dev": "0.25.2",
847
- "@prisma/orm-mongo": "8.0.0-rc.10",
848
- "@prisma/orm-postgres": "8.0.0-rc.10",
849
- "@sveltejs/adapter-node": "^5.3.2",
850
- "@types/node": "^25.6.2",
851
- alchemy: "2.0.0-beta.74",
852
- arktype: "^2.2.3",
853
- dotenv: "^17.4.2",
854
- effect: "4.0.0-rc.112",
855
- mongodb: "^7.1.0",
856
- "mongodb-memory-server": "^11.1.0",
857
- nitro: "^3.0.260610-beta",
858
- prisma: "latest",
859
- "temporal-polyfill": "^1.0.4",
860
- tsdown: "^0.22.14",
861
- turbo: "2.10.12",
862
- tsx: "^4.21.0",
863
- typescript: "^5.9.3"
864
- };
865
- const PRISMA_PLATFORM_CLI_PACKAGE = "prisma@latest";
866
- const PRISMA_DENO_CLI_PACKAGE = PRISMA_PLATFORM_CLI_PACKAGE;
867
- function getDependencyVersion(packageName) {
868
- return dependencyVersionMap[packageName];
869
- }
870
- function usesTsdown(template) {
871
- return template === "minimal" || template === "hono" || template === "elysia" || template === "nest";
872
- }
873
- function getCreateTemplateDependencies(template, packageManager) {
874
- const dependencies = [
875
- "@prisma/composer",
876
- "@prisma/composer-prisma-cloud",
877
- "alchemy"
878
- ];
879
- const devDependencies = [];
880
- if (usesTsdown(template)) {
881
- devDependencies.push("tsdown");
882
- devDependencies.push("tsx");
883
- }
884
- if (template === "minimal") devDependencies.push("typescript");
885
- if (template === "elysia") {
886
- dependencies.push("@elysiajs/node");
887
- devDependencies.push("@types/node");
888
- }
889
- if (template === "svelte") devDependencies.push("@sveltejs/adapter-node");
890
- if (template === "astro") dependencies.push("@astrojs/node");
891
- if (template === "tanstack-start") devDependencies.push("nitro");
892
- if (template === "turborepo") devDependencies.push("turbo", "typescript");
893
- const targets = [{
894
- packageJsonPath: "package.json",
895
- dependencies,
896
- devDependencies
897
- }];
898
- if (template === "turborepo") {
899
- targets.push({
900
- packageJsonPath: "apps/server/package.json",
901
- dependencies: [],
902
- devDependencies: [
903
- "@types/node",
904
- "tsdown",
905
- "tsx",
906
- "typescript"
907
- ],
908
- customDependencies: { "@repo/database": packageManager === "npm" ? "*" : "workspace:*" }
909
- });
910
- targets.push({
911
- packageJsonPath: "packages/database/package.json",
912
- dependencies: [],
913
- devDependencies: ["typescript"]
914
- });
915
- }
916
- return targets;
917
- }
918
-
919
953
  //#endregion
920
954
  //#region src/constants/db-packages.ts
921
955
  function getDbPackages(provider) {
@@ -1156,7 +1190,8 @@ const runPrismaJsonCommandEffect = Effect.fn("PrismaCli.runJson")(function* (opt
1156
1190
  return yield* new PrismaCliCommandError({
1157
1191
  message: redactSecrets(result.stderr.trim() || result.stdout.trim()) || getErrorMessage(cause),
1158
1192
  stderr: redactSecrets(result.stderr),
1159
- exitCode: result.exitCode
1193
+ exitCode: result.exitCode,
1194
+ childProcessFailure: result.childProcessFailure
1160
1195
  });
1161
1196
  }
1162
1197
  if (result.exitCode !== 0 || !envelope.ok || envelope.result === void 0) return yield* new PrismaCliCommandError({
@@ -1164,7 +1199,8 @@ const runPrismaJsonCommandEffect = Effect.fn("PrismaCli.runJson")(function* (opt
1164
1199
  ...envelope.commandId || envelope.command ? { command: envelope.commandId ?? envelope.command } : {},
1165
1200
  ...envelope.error?.code ? { code: envelope.error.code } : {},
1166
1201
  stderr: redactSecrets(result.stderr),
1167
- exitCode: result.exitCode
1202
+ exitCode: result.exitCode,
1203
+ childProcessFailure: result.childProcessFailure
1168
1204
  });
1169
1205
  return envelope.result;
1170
1206
  });
@@ -1215,7 +1251,7 @@ const ensureAuthentication = Effect.fn("Deployment.ensureAuthentication")(functi
1215
1251
  cwd: options.projectDir,
1216
1252
  env: process.env,
1217
1253
  stdio: "inherit"
1218
- });
1254
+ }).pipe(Effect.mapError((error) => error.childProcessFailure === "interrupted" || error.childProcessFailure === "cancelled" ? new CreateCancellationError({ stage: "authenticate" }) : error));
1219
1255
  const authenticatedState = yield* whoami();
1220
1256
  if (!authenticatedState.authenticated) return yield* new CreateFailure({
1221
1257
  stage: "authenticate",
@@ -1280,10 +1316,7 @@ const selectDeploymentWorkspace = Effect.fn("Deployment.selectWorkspace")(functi
1280
1316
  })),
1281
1317
  output: options.output
1282
1318
  }));
1283
- if (isCancel(selectedWorkspaceId)) {
1284
- yield* Effect.sync(() => cancel("Operation cancelled.", { output: options.output }));
1285
- return yield* new CreateCancellationError({ stage: "select_workspace" });
1286
- }
1319
+ if (isCancel(selectedWorkspaceId)) return yield* new CreateCancellationError({ stage: "select_workspace" });
1287
1320
  yield* Effect.sync(() => options.afterPrompt?.());
1288
1321
  if (selectedWorkspaceId === activeWorkspace.id) return activeWorkspace;
1289
1322
  return yield* useWorkspace({
@@ -1487,12 +1520,17 @@ const deployNewProjectWithComposerEffect = Effect.fn("Deployment.deploy")(functi
1487
1520
  };
1488
1521
  }).pipe(Effect.tapCause((cause) => Effect.sync(() => {
1489
1522
  const error = Cause.squash(cause);
1523
+ if (error instanceof CreateCancellationError) {
1524
+ clearProgress();
1525
+ cancel(error.message ?? "Operation cancelled.", { output });
1526
+ return;
1527
+ }
1490
1528
  if (deploymentLog) {
1491
1529
  deploymentLog.error("Deployment failed.");
1492
1530
  deploymentLog = void 0;
1493
1531
  } else progress?.error("Deployment failed.");
1494
1532
  progressRunning = false;
1495
- if (!(error instanceof CreateCancellationError)) log.error(`Deploy failed: ${getErrorMessage(error)}`, { output });
1533
+ log.error(`Deploy failed: ${getErrorMessage(error)}`, { output });
1496
1534
  })), Effect.mapError((error) => error instanceof CreateFailure ? new CreateFailure({
1497
1535
  stage: error.stage,
1498
1536
  reason: error.reason,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma",
3
- "version": "0.13.0",
3
+ "version": "0.13.1-pr.106.361.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",
@@ -45,6 +45,7 @@
45
45
  "format": "oxfmt --write .",
46
46
  "format:check": "oxfmt --check .",
47
47
  "typecheck": "tsc --noEmit",
48
+ "check:pins": "bun run scripts/check-pins.ts",
48
49
  "bump": "bun run scripts/bump-version.ts",
49
50
  "release": "bun run bump",
50
51
  "release-notes": "bunx changelogithub"