create-prisma 0.9.3 → 0.9.4-pr.67.242.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-CJa0JTWf.mjs";
2
+ import "./create-CVr4xGc4.mjs";
3
3
  import { createCreatePrismaCli } from "./index.mjs";
4
4
 
5
5
  //#region src/cli.ts
@@ -14,21 +14,12 @@ import { createInterface } from "node:readline";
14
14
  import { styleText } from "node:util";
15
15
 
16
16
  //#region src/telemetry/client.ts
17
- const TELEMETRY_API_KEY = "phc_cmc85avbWyuJ2JyKdGPdv7dxXli8xLdWDBPbvIXWJfs";
17
+ const TELEMETRY_API_KEY = "";
18
18
  const TELEMETRY_HOST = "https://us.i.posthog.com";
19
19
  const TELEMETRY_CONFIG_FILE = "telemetry.json";
20
20
  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;
21
- function isTruthyEnvValue(value) {
22
- return [
23
- "1",
24
- "true",
25
- "yes",
26
- "on"
27
- ].includes(String(value ?? "").trim().toLowerCase());
28
- }
29
21
  function shouldDisableTelemetry() {
30
- if (isTruthyEnvValue(process.env.CI) || isTruthyEnvValue(process.env.GITHUB_ACTIONS)) return true;
31
- return process.env.CREATE_PRISMA_DISABLE_TELEMETRY !== void 0 || process.env.CREATE_PRISMA_TELEMETRY_DISABLED !== void 0 || process.env.DO_NOT_TRACK !== void 0;
22
+ return true;
32
23
  }
33
24
  function getTelemetryConfigDir() {
34
25
  if (process.platform === "darwin") return path.join(os.homedir(), "Library", "Application Support", "create-prisma");
@@ -50,7 +41,7 @@ async function getAnonymousId() {
50
41
  }
51
42
  function getCommonProperties() {
52
43
  return {
53
- "cli-version": "0.9.3",
44
+ "cli-version": "0.9.4-pr.67.242.1",
54
45
  "node-version": process.version,
55
46
  platform: process.platform,
56
47
  arch: process.arch
@@ -480,9 +471,9 @@ async function scaffoldCreateFrameworkTemplate(opts) {
480
471
  const dependencyVersionMap = {
481
472
  "@astrojs/node": "^10.0.2",
482
473
  "@elysiajs/node": "^1.4.5",
483
- "@prisma/composer": "0.12.0",
484
- "@prisma/composer-prisma-cloud": "0.12.0",
485
- "@prisma/orm-mongo": "8.0.0-rc.4",
474
+ "@prisma/composer": "0.14.0",
475
+ "@prisma/composer-prisma-cloud": "0.14.0",
476
+ "@prisma/orm-mongo": "8.0.0-rc.6",
486
477
  "@prisma/orm-postgres": "8.0.0-rc.4",
487
478
  "@sveltejs/adapter-node": "^5.3.2",
488
479
  "@types/node": "^25.6.2",
@@ -494,11 +485,11 @@ const dependencyVersionMap = {
494
485
  mongodb: "^7.1.0",
495
486
  "mongodb-memory-server": "^11.1.0",
496
487
  nitro: "^3.0.260610-beta",
497
- prisma: "next",
488
+ prisma: "8.0.0-rc.9",
498
489
  tsx: "^4.21.0",
499
490
  typescript: "^5.9.3"
500
491
  };
501
- const PRISMA_PLATFORM_CLI_PACKAGE = "prisma@next";
492
+ const PRISMA_PLATFORM_CLI_PACKAGE = "prisma@8.0.0-rc.9";
502
493
  const PRISMA_DENO_CLI_PACKAGE = "prisma-next";
503
494
  function getDependencyVersion(packageName) {
504
495
  return dependencyVersionMap[packageName];
@@ -1228,14 +1219,29 @@ async function ensureComposerTypeScriptOptions(projectDir) {
1228
1219
  if (updated === tsconfig) throw new Error("tsconfig.json is missing compilerOptions.");
1229
1220
  await fs.writeFile(tsconfigPath, updated, "utf8");
1230
1221
  }
1231
- async function emitContract(context, projectDir) {
1232
- const invocation = getPrismaCliInvocation(context.packageManager, ["contract", "emit"]);
1222
+ async function runPrismaCli(context, projectDir, args) {
1223
+ const invocation = getPrismaCliInvocation(context.packageManager, args);
1233
1224
  if (context.verbose) log.step([invocation.command, ...invocation.args].join(" "));
1234
1225
  await execa(invocation.command, invocation.args, {
1235
1226
  cwd: projectDir,
1236
- stdio: context.verbose ? "inherit" : "pipe"
1227
+ stdio: context.verbose ? "inherit" : "pipe",
1228
+ env: {
1229
+ ...process.env,
1230
+ CI: "1"
1231
+ }
1237
1232
  });
1238
1233
  }
1234
+ async function emitContract(context, projectDir) {
1235
+ await runPrismaCli(context, projectDir, ["contract", "emit"]);
1236
+ }
1237
+ async function planBaselineMigration(context, projectDir) {
1238
+ await runPrismaCli(context, projectDir, [
1239
+ "migration",
1240
+ "plan",
1241
+ "--name",
1242
+ "init"
1243
+ ]);
1244
+ }
1239
1245
  function formatNextSteps(steps) {
1240
1246
  return steps.map((step) => `${step.command}\n ${step.description}`).join("\n\n");
1241
1247
  }
@@ -1302,6 +1308,10 @@ async function executePrismaSetupContext(context, options = {}) {
1302
1308
  await initializeAgentSkills(context, projectDir);
1303
1309
  progress?.message("Generating Prisma 8 contract artifacts...");
1304
1310
  await emitContract(context, projectDir);
1311
+ if (context.databaseProvider === "postgres") {
1312
+ progress?.message("Authoring the baseline migration...");
1313
+ await planBaselineMigration(context, projectDir);
1314
+ }
1305
1315
  if (options.initializeGit) {
1306
1316
  progress?.message("Initializing Git repository...");
1307
1317
  gitInitialization = await initializeGitRepository(projectDir);
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-CJa0JTWf.mjs";
2
+ import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as PackageManagerSchema, r as CreateCommandInputSchema, t as runCreateCommand } from "./create-CVr4xGc4.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.3";
8
+ const CLI_VERSION = "0.9.4-pr.67.242.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.3",
3
+ "version": "0.9.4-pr.67.242.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",