create-prisma 0.5.0 → 0.5.1-pr.43.127.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
@@ -145,6 +145,7 @@ Prisma Compute deployment is currently supported for:
145
145
  - Prisma IDE extension install
146
146
 
147
147
  These can be selected interactively or enabled with flags.
148
+ When Prisma Compute deploy is selected, the skills add-on recommends the `prisma-compute` skill too.
148
149
 
149
150
  ## Deploy to Prisma Compute
150
151
 
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./create-DH7xp0g_.mjs";
2
+ import "./create-C_V714rK.mjs";
3
3
  import { createCreatePrismaCli } from "./index.mjs";
4
4
 
5
5
  //#region src/cli.ts
@@ -107,6 +107,7 @@ const extensionTargets = [
107
107
  const prismaSkillNames = [
108
108
  "prisma-cli",
109
109
  "prisma-client-api",
110
+ "prisma-compute",
110
111
  "prisma-database-setup",
111
112
  "prisma-upgrade-v7",
112
113
  "prisma-postgres"
@@ -1382,8 +1383,9 @@ const SHARED_PRISMA_SKILLS = [
1382
1383
  "prisma-upgrade-v7"
1383
1384
  ];
1384
1385
  function getAvailablePrismaSkills(provider) {
1385
- if (provider === "postgresql") return [...SHARED_PRISMA_SKILLS, "prisma-postgres"];
1386
- return [...SHARED_PRISMA_SKILLS];
1386
+ const skills = [...SHARED_PRISMA_SKILLS, "prisma-compute"];
1387
+ if (provider === "postgresql") return [...skills, "prisma-postgres"];
1388
+ return skills;
1387
1389
  }
1388
1390
  function getSkillOptions(provider) {
1389
1391
  const available = getAvailablePrismaSkills(provider);
@@ -1398,6 +1400,11 @@ function getSkillOptions(provider) {
1398
1400
  label: "prisma-client-api",
1399
1401
  hint: "Prisma Client query patterns"
1400
1402
  },
1403
+ "prisma-compute": {
1404
+ value: "prisma-compute",
1405
+ label: "prisma-compute",
1406
+ hint: "Prisma Compute deploy and hosting workflows"
1407
+ },
1401
1408
  "prisma-database-setup": {
1402
1409
  value: "prisma-database-setup",
1403
1410
  label: "prisma-database-setup",
@@ -1443,9 +1450,10 @@ const EXTENSION_TARGET_OPTIONS = [
1443
1450
  function uniqueValues(values) {
1444
1451
  return Array.from(new Set(values));
1445
1452
  }
1446
- function getRecommendedPrismaSkills(provider, shouldUsePrismaPostgres) {
1447
- const skills = [...getAvailablePrismaSkills(provider)];
1448
- if (!shouldUsePrismaPostgres) return skills.filter((skill) => skill !== "prisma-postgres");
1453
+ function getRecommendedPrismaSkills(provider, shouldUsePrismaPostgres, shouldUseComputeDeploy) {
1454
+ const skills = [...SHARED_PRISMA_SKILLS];
1455
+ if (provider === "postgresql" && shouldUsePrismaPostgres) skills.push("prisma-postgres");
1456
+ if (shouldUseComputeDeploy) skills.push("prisma-compute");
1449
1457
  return uniqueValues(skills);
1450
1458
  }
1451
1459
  async function promptForAddons() {
@@ -1543,7 +1551,7 @@ async function collectCreateAddonSetupContext(input, options) {
1543
1551
  if (addons.length === 0) return null;
1544
1552
  const scope = addons.includes("skills") || addons.includes("mcp") ? options.useDefaults ? DEFAULT_ADDON_SCOPE : await promptForAddonScope() : DEFAULT_ADDON_SCOPE;
1545
1553
  if (!scope) return;
1546
- const recommendedSkills = getRecommendedPrismaSkills(options.provider, options.shouldUsePrismaPostgres);
1554
+ const recommendedSkills = getRecommendedPrismaSkills(options.provider, options.shouldUsePrismaPostgres, options.shouldUseComputeDeploy);
1547
1555
  const skills = !addons.includes("skills") ? [] : options.useDefaults ? recommendedSkills : await promptForPrismaSkills(options.provider, recommendedSkills);
1548
1556
  if (!skills) return;
1549
1557
  const skillsAgents = !addons.includes("skills") ? [] : options.useDefaults ? [...DEFAULT_SKILLS_AGENTS] : await promptForSkillsAgents();
@@ -1994,21 +2002,12 @@ async function executeComputeDeployContext(params) {
1994
2002
 
1995
2003
  //#endregion
1996
2004
  //#region src/telemetry/client.ts
1997
- const TELEMETRY_API_KEY = "phc_cmc85avbWyuJ2JyKdGPdv7dxXli8xLdWDBPbvIXWJfs";
2005
+ const TELEMETRY_API_KEY = "";
1998
2006
  const TELEMETRY_HOST = "https://us.i.posthog.com";
1999
2007
  const TELEMETRY_CONFIG_FILE = "telemetry.json";
2000
2008
  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;
2001
- function isTruthyEnvValue(value) {
2002
- return [
2003
- "1",
2004
- "true",
2005
- "yes",
2006
- "on"
2007
- ].includes(String(value ?? "").trim().toLowerCase());
2008
- }
2009
2009
  function shouldDisableTelemetry() {
2010
- if (isTruthyEnvValue(process.env.CI) || isTruthyEnvValue(process.env.GITHUB_ACTIONS)) return true;
2011
- return process.env.CREATE_PRISMA_DISABLE_TELEMETRY !== void 0 || process.env.CREATE_PRISMA_TELEMETRY_DISABLED !== void 0 || process.env.DO_NOT_TRACK !== void 0;
2010
+ return true;
2012
2011
  }
2013
2012
  function getTelemetryConfigDir() {
2014
2013
  if (process.platform === "darwin") return path.join(os.homedir(), "Library", "Application Support", "create-prisma");
@@ -2030,7 +2029,7 @@ async function getAnonymousId() {
2030
2029
  }
2031
2030
  function getCommonProperties() {
2032
2031
  return {
2033
- "cli-version": "0.5.0",
2032
+ "cli-version": "0.5.1-pr.43.127.1",
2034
2033
  "node-version": process.version,
2035
2034
  platform: process.platform,
2036
2035
  arch: process.arch
@@ -2325,7 +2324,8 @@ async function collectCreateContext(input) {
2325
2324
  const addonSetupContext = await collectCreateAddonSetupContext(input, {
2326
2325
  useDefaults,
2327
2326
  provider: prismaSetupContext.databaseProvider,
2328
- shouldUsePrismaPostgres: prismaSetupContext.shouldUsePrismaPostgres
2327
+ shouldUsePrismaPostgres: prismaSetupContext.shouldUsePrismaPostgres,
2328
+ shouldUseComputeDeploy: Boolean(computeDeployContext)
2329
2329
  });
2330
2330
  if (addonSetupContext === void 0) return;
2331
2331
  return {
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { a as DatabaseUrlSchema, i as DatabaseProviderSchema, n as CreateCommandInputSchema, o as PackageManagerSchema, r as CreateTemplateSchema, s as SchemaPresetSchema, t as runCreateCommand } from "./create-DH7xp0g_.mjs";
2
+ import { a as DatabaseUrlSchema, i as DatabaseProviderSchema, n as CreateCommandInputSchema, o as PackageManagerSchema, r as CreateTemplateSchema, s as SchemaPresetSchema, t as runCreateCommand } from "./create-C_V714rK.mjs";
3
3
  import { os } from "@orpc/server";
4
4
  import { createCli } from "trpc-cli";
5
5
 
6
6
  //#region src/index.ts
7
- const CLI_VERSION = "0.5.0";
7
+ const CLI_VERSION = "0.5.1-pr.43.127.1";
8
8
  const router = os.router({ create: os.meta({
9
9
  description: "Create a new project with Prisma setup",
10
10
  default: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma",
3
- "version": "0.5.0",
3
+ "version": "0.5.1-pr.43.127.1",
4
4
  "private": false,
5
5
  "description": "Create Prisma 7 projects with first-party templates and great DX.",
6
6
  "homepage": "https://github.com/prisma/create-prisma",