create-prisma 0.3.2 → 0.4.0-pr.32.60.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 +86 -117
- package/dist/cli.mjs +1 -1
- package/dist/{create-DOr8R2_6.mjs → create-Dm_HiTCj.mjs} +221 -120
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/templates/create/astro/src/pages/index.astro.hbs +39 -49
- package/templates/create/elysia/README.md.hbs +32 -0
- package/templates/create/elysia/deno.json.hbs +5 -0
- package/templates/create/elysia/package.json.hbs +21 -0
- package/templates/create/elysia/prisma/schema.prisma.hbs +25 -0
- package/templates/create/elysia/prisma/seed.ts.hbs +42 -0
- package/templates/create/elysia/prisma.config.ts.hbs +15 -0
- package/templates/create/elysia/src/index.ts.hbs +43 -0
- package/templates/create/elysia/src/lib/prisma.ts.hbs +56 -0
- package/templates/create/elysia/tsconfig.json +14 -0
- package/templates/create/hono/README.md.hbs +3 -2
- package/templates/create/hono/package.json.hbs +3 -4
- package/templates/create/hono/prisma/schema.prisma.hbs +4 -0
- package/templates/create/hono/prisma/seed.ts.hbs +5 -1
- package/templates/create/hono/prisma.config.ts.hbs +15 -0
- package/templates/create/hono/src/index.ts.hbs +8 -2
- package/templates/create/hono/src/lib/prisma.ts.hbs +6 -3
- package/templates/create/nest/.yarnrc.yml.hbs +3 -0
- package/templates/create/nest/README.md.hbs +32 -0
- package/templates/create/nest/deno.json.hbs +5 -0
- package/templates/create/nest/package.json.hbs +24 -0
- package/templates/create/nest/prisma/schema.prisma.hbs +25 -0
- package/templates/create/nest/prisma/seed.ts.hbs +44 -0
- package/templates/create/nest/prisma.config.ts.hbs +15 -0
- package/templates/create/nest/src/app.controller.ts.hbs +11 -0
- package/templates/create/nest/src/app.module.ts.hbs +20 -0
- package/templates/create/nest/src/lib/prisma.ts.hbs +58 -0
- package/templates/create/nest/src/main.ts.hbs +27 -0
- package/templates/create/nest/src/prisma.service.ts.hbs +10 -0
- package/templates/create/nest/src/users.controller.ts.hbs +15 -0
- package/templates/create/nest/src/users.service.ts.hbs +19 -0
- package/templates/create/nest/tsconfig.json +16 -0
- package/templates/create/next/src/app/globals.css +38 -46
- package/templates/create/nuxt/app/pages/index.vue.hbs +45 -55
- package/templates/create/svelte/src/routes/+page.svelte.hbs +78 -99
- package/templates/create/tanstack-start/prisma/schema.prisma.hbs +0 -1
- package/templates/create/tanstack-start/src/routes/index.tsx.hbs +28 -30
- package/templates/create/tanstack-start/src/styles.css +80 -121
- package/templates/create/turborepo/apps/api/package.json.hbs +0 -2
- package/templates/create/turborepo/apps/api/src/index.ts.hbs +7 -1
- package/templates/create/hono/prisma.config.ts +0 -13
|
@@ -10,12 +10,10 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@hono/node-server": "^1.19.9",
|
|
13
|
-
"@repo/db": "{{#if (eq packageManager "npm")}}*{{else}}workspace:*{{/if}}",
|
|
14
13
|
"hono": "^4.12.2"
|
|
15
14
|
},
|
|
16
15
|
"devDependencies": {
|
|
17
16
|
"@types/node": "^24.3.0",
|
|
18
|
-
"tsx": "^4.7.1",
|
|
19
17
|
"typescript": "^5.9.3"
|
|
20
18
|
}
|
|
21
19
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
{{#if (requiresDotenvConfigImport packageManager)}}
|
|
2
|
+
import "dotenv/config";
|
|
3
|
+
{{/if}}
|
|
1
4
|
import { serve } from "@hono/node-server";
|
|
2
5
|
import { Hono } from "hono";
|
|
3
6
|
{{#if (eq schemaPreset "basic")}}
|
|
@@ -40,6 +43,9 @@ app.get("/users", async (c) => {
|
|
|
40
43
|
});
|
|
41
44
|
{{/if}}
|
|
42
45
|
|
|
43
|
-
const
|
|
46
|
+
const rawPort = (process.env.PORT ?? "").trim();
|
|
47
|
+
const parsedPort = rawPort.length > 0 ? Number(rawPort) : Number.NaN;
|
|
48
|
+
const port =
|
|
49
|
+
Number.isFinite(parsedPort) && parsedPort >= 0 && parsedPort <= 65535 ? parsedPort : 3000;
|
|
44
50
|
console.log(`API listening at http://localhost:${port}`);
|
|
45
51
|
serve({ fetch: app.fetch, port });
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import "dotenv/config";
|
|
2
|
-
import { defineConfig, env } from "prisma/config";
|
|
3
|
-
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
schema: "prisma/schema.prisma",
|
|
6
|
-
migrations: {
|
|
7
|
-
path: "prisma/migrations",
|
|
8
|
-
seed: "tsx prisma/seed.ts",
|
|
9
|
-
},
|
|
10
|
-
datasource: {
|
|
11
|
-
url: env("DATABASE_URL"),
|
|
12
|
-
},
|
|
13
|
-
});
|