create-prisma 0.6.0 → 0.7.0-pr.47.144.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
@@ -101,6 +101,7 @@ Prisma Compute deployment is currently supported for:
101
101
 
102
102
  - `hono`
103
103
  - `elysia`
104
+ - `nest`
104
105
  - `next`
105
106
  - `astro`
106
107
  - `nuxt`
@@ -152,7 +153,7 @@ When Prisma Compute deploy is selected, the skills add-on recommends the `prisma
152
153
 
153
154
  ## Deploy to Prisma Compute
154
155
 
155
- After scaffolding, `create-prisma` can deploy your app to [Prisma Compute](https://www.prisma.io/docs/compute), the serverless hosting for TypeScript apps that runs next to your Prisma Postgres database. It is offered for the templates the Prisma CLI can deploy today: `hono`, `elysia`, `next`, `astro`, `nuxt`, `tanstack-start`, and `turborepo`.
156
+ After scaffolding, `create-prisma` can deploy your app to [Prisma Compute](https://www.prisma.io/docs/compute), the serverless hosting for TypeScript apps that runs next to your Prisma Postgres database. It is offered for the templates the Prisma CLI can deploy today: `hono`, `elysia`, `nest`, `next`, `astro`, `nuxt`, `tanstack-start`, and `turborepo`.
156
157
 
157
158
  Accept the deploy prompt when it appears, or pass the flag:
158
159
 
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./create-CMPeveWE.mjs";
2
+ import "./create-D5lRzcra.mjs";
3
3
  import { createCreatePrismaCli } from "./index.mjs";
4
4
 
5
5
  //#region src/cli.ts
@@ -42,6 +42,7 @@ const dependencyVersionMap = {
42
42
  const computeConfigTemplates = new Set([
43
43
  "hono",
44
44
  "elysia",
45
+ "nest",
45
46
  "next",
46
47
  "astro",
47
48
  "nuxt",
@@ -163,6 +164,7 @@ const CreateScaffoldOptionsSchema = z.object({
163
164
  const COMPUTE_DEPLOYABLE_TEMPLATES = new Set([
164
165
  "hono",
165
166
  "elysia",
167
+ "nest",
166
168
  "next",
167
169
  "astro",
168
170
  "nuxt",
@@ -289,7 +291,7 @@ function joinCommandParts(parts) {
289
291
  return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
290
292
  }
291
293
  function getRuntimeScriptCommand(packageManager, kind, options) {
292
- const { sourceEntrypoint, builtEntrypoint, denoFlags = [] } = options;
294
+ const { sourceEntrypoint, builtEntrypoint, denoFlags = [], emit = false } = options;
293
295
  if (packageManager === "deno") switch (kind) {
294
296
  case "dev": return joinCommandParts([
295
297
  "deno",
@@ -312,7 +314,7 @@ function getRuntimeScriptCommand(packageManager, kind, options) {
312
314
  }
313
315
  if (packageManager === "bun") switch (kind) {
314
316
  case "dev": return `bun --watch ${sourceEntrypoint}`;
315
- case "build": return "tsc --noEmit";
317
+ case "build": return emit ? "tsc" : "tsc --noEmit";
316
318
  case "start": return `bun ${sourceEntrypoint}`;
317
319
  }
318
320
  switch (kind) {
@@ -453,7 +455,8 @@ Handlebars.registerHelper("runtimeScript", (packageManager, kind, sourceEntrypoi
453
455
  return getRuntimeScriptCommand(packageManager, kind, {
454
456
  sourceEntrypoint,
455
457
  builtEntrypoint,
456
- denoFlags: getOptionalHashStringList(hash, "denoFlags")
458
+ denoFlags: getOptionalHashStringList(hash, "denoFlags"),
459
+ emit: hash.emit === true
457
460
  });
458
461
  });
459
462
  function findPackageRoot(startDir) {
@@ -1775,6 +1778,7 @@ const PRISMA_CLI_PACKAGE = "@prisma/cli@latest";
1775
1778
  const DEPLOY_OPTIONS_BY_TEMPLATE = {
1776
1779
  hono: {},
1777
1780
  elysia: {},
1781
+ nest: {},
1778
1782
  next: {},
1779
1783
  astro: {},
1780
1784
  nuxt: {},
@@ -2044,21 +2048,12 @@ async function executeComputeDeployContext(params) {
2044
2048
 
2045
2049
  //#endregion
2046
2050
  //#region src/telemetry/client.ts
2047
- const TELEMETRY_API_KEY = "phc_cmc85avbWyuJ2JyKdGPdv7dxXli8xLdWDBPbvIXWJfs";
2051
+ const TELEMETRY_API_KEY = "";
2048
2052
  const TELEMETRY_HOST = "https://us.i.posthog.com";
2049
2053
  const TELEMETRY_CONFIG_FILE = "telemetry.json";
2050
2054
  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;
2051
- function isTruthyEnvValue(value) {
2052
- return [
2053
- "1",
2054
- "true",
2055
- "yes",
2056
- "on"
2057
- ].includes(String(value ?? "").trim().toLowerCase());
2058
- }
2059
2055
  function shouldDisableTelemetry() {
2060
- if (isTruthyEnvValue(process.env.CI) || isTruthyEnvValue(process.env.GITHUB_ACTIONS)) return true;
2061
- return process.env.CREATE_PRISMA_DISABLE_TELEMETRY !== void 0 || process.env.CREATE_PRISMA_TELEMETRY_DISABLED !== void 0 || process.env.DO_NOT_TRACK !== void 0;
2056
+ return true;
2062
2057
  }
2063
2058
  function getTelemetryConfigDir() {
2064
2059
  if (process.platform === "darwin") return path.join(os.homedir(), "Library", "Application Support", "create-prisma");
@@ -2080,7 +2075,7 @@ async function getAnonymousId() {
2080
2075
  }
2081
2076
  function getCommonProperties() {
2082
2077
  return {
2083
- "cli-version": "0.6.0",
2078
+ "cli-version": "0.7.0-pr.47.144.1",
2084
2079
  "node-version": process.version,
2085
2080
  platform: process.platform,
2086
2081
  arch: process.arch
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-CMPeveWE.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-D5lRzcra.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.6.0";
7
+ const CLI_VERSION = "0.7.0-pr.47.144.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.6.0",
3
+ "version": "0.7.0-pr.47.144.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",
@@ -7,7 +7,7 @@
7
7
  "type": "module",
8
8
  "scripts": {
9
9
  "dev": "{{runtimeScript packageManager "dev" "src/main.ts" "dist/main.js"}}",
10
- "build": "{{runtimeScript packageManager "build" "src/main.ts" "dist/main.js"}}",
10
+ "build": "{{runtimeScript packageManager "build" "src/main.ts" "dist/main.js" emit=true}}",
11
11
  "start": "{{runtimeScript packageManager "start" "src/main.ts" "dist/main.js"}}"
12
12
  },
13
13
  "dependencies": {
@@ -0,0 +1,9 @@
1
+ import { defineComputeConfig } from "@prisma/compute-sdk/config";
2
+
3
+ export default defineComputeConfig({
4
+ app: {
5
+ name: "{{projectName}}",
6
+ framework: "nestjs",
7
+ env: ".env",
8
+ },
9
+ });