create-prisma 0.9.1 → 0.9.2-pr.62.229.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-C2KUxZsd.mjs";
2
+ import "./create-V-NkNn-8.mjs";
3
3
  import { createCreatePrismaCli } from "./index.mjs";
4
4
 
5
5
  //#region src/cli.ts
@@ -13,21 +13,12 @@ import { execa } from "execa";
13
13
  import { styleText } from "node:util";
14
14
 
15
15
  //#region src/telemetry/client.ts
16
- const TELEMETRY_API_KEY = "phc_cmc85avbWyuJ2JyKdGPdv7dxXli8xLdWDBPbvIXWJfs";
16
+ const TELEMETRY_API_KEY = "";
17
17
  const TELEMETRY_HOST = "https://us.i.posthog.com";
18
18
  const TELEMETRY_CONFIG_FILE = "telemetry.json";
19
19
  const UUID_V4_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
20
- function isTruthyEnvValue(value) {
21
- return [
22
- "1",
23
- "true",
24
- "yes",
25
- "on"
26
- ].includes(String(value ?? "").trim().toLowerCase());
27
- }
28
20
  function shouldDisableTelemetry() {
29
- if (isTruthyEnvValue(process.env.CI) || isTruthyEnvValue(process.env.GITHUB_ACTIONS)) return true;
30
- return process.env.CREATE_PRISMA_DISABLE_TELEMETRY !== void 0 || process.env.CREATE_PRISMA_TELEMETRY_DISABLED !== void 0 || process.env.DO_NOT_TRACK !== void 0;
21
+ return true;
31
22
  }
32
23
  function getTelemetryConfigDir() {
33
24
  if (process.platform === "darwin") return path.join(os.homedir(), "Library", "Application Support", "create-prisma");
@@ -49,7 +40,7 @@ async function getAnonymousId() {
49
40
  }
50
41
  function getCommonProperties() {
51
42
  return {
52
- "cli-version": "0.9.1",
43
+ "cli-version": "0.9.2-pr.62.229.1",
53
44
  "node-version": process.version,
54
45
  platform: process.platform,
55
46
  arch: process.arch
@@ -479,21 +470,21 @@ async function scaffoldCreateFrameworkTemplate(opts) {
479
470
  const dependencyVersionMap = {
480
471
  "@astrojs/node": "^10.0.2",
481
472
  "@elysiajs/node": "^1.4.5",
482
- "@prisma/cli-engine": "0.2.0",
483
- "@prisma/composer": "0.10.0",
484
- "@prisma/composer-prisma-cloud": "0.10.0",
473
+ "@prisma/composer": "0.12.0",
474
+ "@prisma/composer-prisma-cloud": "0.12.0",
485
475
  "@prisma/orm-mongo": "8.0.0-rc.4",
486
476
  "@prisma/orm-postgres": "8.0.0-rc.4",
487
477
  "@sveltejs/adapter-node": "^5.3.2",
488
478
  "@types/node": "^25.6.2",
489
- alchemy: "2.0.0-beta.67",
479
+ alchemy: "2.0.0-beta.74",
490
480
  arktype: "^2.2.3",
491
481
  dotenv: "^17.4.2",
492
482
  esbuild: "^0.28.1",
493
- effect: "4.0.0-beta.103",
483
+ effect: "4.0.0-rc.111",
494
484
  mongodb: "^7.1.0",
495
485
  "mongodb-memory-server": "^11.1.0",
496
486
  nitro: "^3.0.260610-beta",
487
+ prisma: "next",
497
488
  tsx: "^4.21.0",
498
489
  typescript: "^5.9.3"
499
490
  };
@@ -511,7 +502,7 @@ function getCreateTemplateDependencies(template, _packageManager) {
511
502
  "@prisma/composer-prisma-cloud",
512
503
  "alchemy"
513
504
  ];
514
- const devDependencies = ["@prisma/cli-engine"];
505
+ const devDependencies = [];
515
506
  if (usesEsbuild(template)) devDependencies.push("esbuild");
516
507
  if (template === "minimal" || usesEsbuild(template)) devDependencies.push("tsx");
517
508
  if (template === "minimal") devDependencies.push("typescript");
@@ -559,7 +550,7 @@ function getPrismaScriptMap(packageManager) {
559
550
  "migration:show": prismaCommand(true, "migration", "show")
560
551
  };
561
552
  }
562
- const prismaCommand = (...args) => getPackageExecutionCommand(packageManager, [PRISMA_PLATFORM_CLI_PACKAGE, ...args]);
553
+ const prismaCommand = (...args) => ["prisma", ...args].join(" ");
563
554
  return {
564
555
  "contract:emit": prismaCommand("contract", "emit"),
565
556
  "db:init": prismaCommand("db", "init"),
@@ -568,16 +559,17 @@ function getPrismaScriptMap(packageManager) {
568
559
  "migration:plan": prismaCommand("migration", "plan"),
569
560
  migrate: prismaCommand("db", "migrate"),
570
561
  "migration:status": prismaCommand("migration", "status"),
571
- "migration:show": prismaCommand("migration", "show")
562
+ "migration:show": prismaCommand("migration", "show"),
563
+ "skills:sync": `${prismaCommand("skills", "sync")} || exit 0`
572
564
  };
573
565
  }
574
566
  function getComposerScriptMap(packageManager) {
575
567
  if (packageManager === "deno") return {};
576
- const composerCommand = (subcommand) => getPackageExecutionCommand(packageManager, [
577
- PRISMA_PLATFORM_CLI_PACKAGE,
568
+ const composerCommand = (subcommand) => [
569
+ "prisma",
578
570
  subcommand,
579
571
  "module.ts"
580
- ]);
572
+ ].join(" ");
581
573
  return {
582
574
  "composer:dev": composerCommand("dev"),
583
575
  "composer:deploy": composerCommand("deploy"),
@@ -625,7 +617,7 @@ async function writePrismaDependencies(provider, packageManager, _authoring, pro
625
617
  if (packageManager === "deno") dependencies.push("dotenv");
626
618
  await addPackageDependency({
627
619
  dependencies,
628
- devDependencies: packageManager === "deno" ? ["@types/node"] : ["@prisma/cli-engine", "@types/node"],
620
+ devDependencies: packageManager === "deno" ? ["@types/node"] : ["@types/node", "prisma"],
629
621
  scripts: getPrismaScriptMap(packageManager),
630
622
  projectDir
631
623
  });
@@ -1077,6 +1069,23 @@ async function runPrismaInit(context, projectDir) {
1077
1069
  });
1078
1070
  if (context.packageManager === "deno") await fs.remove(path.join(projectDir, "prisma-next.md"));
1079
1071
  }
1072
+ async function initializeAgentSkills(context, projectDir) {
1073
+ if (context.packageManager === "deno") return;
1074
+ const invocation = getPrismaCliInvocation(context.packageManager, [
1075
+ "init",
1076
+ "--yes",
1077
+ "--no-interactive"
1078
+ ]);
1079
+ if (context.verbose) log.step(`Running ${[invocation.command, ...invocation.args].join(" ")}`);
1080
+ await execa(invocation.command, invocation.args, {
1081
+ cwd: projectDir,
1082
+ stdio: context.verbose ? "inherit" : "pipe",
1083
+ env: {
1084
+ ...process.env,
1085
+ CI: "1"
1086
+ }
1087
+ });
1088
+ }
1080
1089
  async function ensureGitignoreEntry(projectDir, entry) {
1081
1090
  const gitignorePath = path.join(projectDir, ".gitignore");
1082
1091
  const existing = await fs.pathExists(gitignorePath) ? await fs.readFile(gitignorePath, "utf8") : "";
@@ -1165,6 +1174,8 @@ async function executePrismaSetupContext(context, options = {}) {
1165
1174
  if (context.databaseProvider === "mongo") await ensureMongoEnvironment(projectDir);
1166
1175
  progress?.message(`Installing dependencies with ${getInstallCommand(context.packageManager)}...`);
1167
1176
  await installProjectDependencies(context.packageManager, projectDir, { verbose: context.verbose });
1177
+ progress?.message("Installing Prisma agent skills...");
1178
+ await initializeAgentSkills(context, projectDir);
1168
1179
  progress?.message("Generating Prisma 8 contract artifacts...");
1169
1180
  await emitContract(context, projectDir);
1170
1181
  progress?.stop("Prisma 8 project ready.");
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-C2KUxZsd.mjs";
2
+ import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as PackageManagerSchema, r as CreateCommandInputSchema, t as runCreateCommand } from "./create-V-NkNn-8.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.9.1";
8
+ const CLI_VERSION = "0.9.2-pr.62.229.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.9.1",
3
+ "version": "0.9.2-pr.62.229.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",
@@ -12,5 +12,5 @@ allowBuilds:
12
12
  minimumReleaseAgeExclude:
13
13
  - "@prisma/*"
14
14
  overrides:
15
- effect: "4.0.0-beta.103"
15
+ effect: "4.0.0-rc.111"
16
16
  {{/if}}
@@ -1,8 +1,11 @@
1
1
  {{#unless (eq packageManager "deno")}}
2
- import { definePrismaConfig } from "@prisma/cli-engine";
2
+ import { definePrismaConfig } from "prisma/config";
3
3
  import { defineConfig as ormConfig } from "@prisma/orm-{{#if (eq provider "postgres")}}postgres{{else}}mongo{{/if}}/config";
4
4
 
5
5
  export default definePrismaConfig({
6
+ skills: {
7
+ agents: ["claude", "cursor", "agents", "devin"],
8
+ },
6
9
  orm: ormConfig({
7
10
  contract: "./src/prisma/contract{{#if (eq authoring "typescript")}}.ts{{else}}.prisma{{/if}}",
8
11
  {{#if (eq authoring "typescript")}}
@@ -11,7 +11,7 @@
11
11
  "dev": "nuxt dev",
12
12
  "generate": "nuxt generate",
13
13
  "preview": "nuxt preview",
14
- "postinstall": "nuxt prepare",
14
+ "postinstall": "nuxt prepare && {{runScriptCommand packageManager "skills:sync"}}",
15
15
  "typecheck": "nuxt typecheck"
16
16
  },
17
17
  "dependencies": {