create-prisma 0.6.0 → 0.7.0
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
|
@@ -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: {},
|
|
@@ -2080,7 +2084,7 @@ async function getAnonymousId() {
|
|
|
2080
2084
|
}
|
|
2081
2085
|
function getCommonProperties() {
|
|
2082
2086
|
return {
|
|
2083
|
-
"cli-version": "0.
|
|
2087
|
+
"cli-version": "0.7.0",
|
|
2084
2088
|
"node-version": process.version,
|
|
2085
2089
|
platform: process.platform,
|
|
2086
2090
|
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-
|
|
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-DGKeNID3.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.
|
|
7
|
+
const CLI_VERSION = "0.7.0";
|
|
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
|
@@ -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": {
|