create-prisma 0.7.1-pr.52.181.1 → 0.7.2
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 +25 -19
- package/dist/cli.mjs +2 -32
- package/dist/index.d.mts +25 -1
- package/dist/index.mjs +2 -2290
- package/dist/src-B3hRLZ0U.mjs +2527 -0
- package/package.json +2 -4
- package/templates/create/astro/README.md.hbs +14 -7
- package/templates/create/astro/astro.config.mjs.hbs +0 -11
- package/templates/create/astro/deno.json.hbs +5 -0
- package/templates/create/astro/prisma/schema.prisma.hbs +5 -0
- package/templates/create/astro/prisma/seed.ts.hbs +5 -1
- package/templates/create/astro/prisma.compute.ts.hbs +10 -0
- package/templates/create/astro/src/lib/prisma.ts.hbs +4 -18
- package/templates/create/astro/src/pages/api/users.ts.hbs +11 -1
- package/templates/create/astro/src/pages/index.astro.hbs +176 -36
- package/templates/create/elysia/README.md.hbs +13 -7
- package/templates/create/elysia/deno.json.hbs +5 -0
- package/templates/create/elysia/package.json.hbs +3 -4
- package/templates/create/elysia/prisma/schema.prisma.hbs +6 -0
- package/templates/create/elysia/prisma/seed.ts.hbs +5 -1
- package/templates/create/elysia/prisma.compute.ts.hbs +11 -0
- package/templates/create/elysia/src/index.ts.hbs +17 -13
- package/templates/create/elysia/src/lib/prisma.ts.hbs +4 -18
- package/templates/create/elysia/tsconfig.json +0 -1
- package/templates/create/hono/README.md.hbs +13 -7
- package/templates/create/hono/deno.json.hbs +5 -0
- package/templates/create/hono/package.json.hbs +2 -2
- package/templates/create/hono/prisma/schema.prisma.hbs +6 -0
- package/templates/create/hono/prisma/seed.ts.hbs +5 -1
- package/templates/create/hono/prisma.compute.ts.hbs +10 -0
- package/templates/create/hono/src/index.ts.hbs +7 -9
- package/templates/create/hono/src/lib/prisma.ts.hbs +4 -18
- package/templates/create/hono/tsconfig.json +0 -1
- package/templates/create/nest/README.md.hbs +12 -6
- package/templates/create/nest/deno.json.hbs +5 -0
- package/templates/create/nest/package.json.hbs +2 -2
- package/templates/create/nest/prisma/schema.prisma.hbs +6 -0
- package/templates/create/nest/prisma/seed.ts.hbs +5 -1
- package/templates/create/nest/prisma.compute.ts.hbs +10 -0
- package/templates/create/nest/src/app.controller.ts.hbs +1 -6
- package/templates/create/nest/src/app.module.ts.hbs +14 -7
- package/templates/create/nest/src/lib/prisma.ts.hbs +4 -17
- package/templates/create/nest/src/main.ts.hbs +6 -2
- package/templates/create/nest/src/prisma.service.ts.hbs +2 -2
- package/templates/create/nest/src/users.controller.ts.hbs +3 -1
- package/templates/create/nest/src/users.service.ts.hbs +3 -1
- package/templates/create/nest/tsconfig.json +0 -1
- package/templates/create/next/README.md.hbs +11 -7
- package/templates/create/next/deno.json.hbs +12 -0
- package/templates/create/next/prisma/schema.prisma.hbs +5 -0
- package/templates/create/next/prisma/seed.ts.hbs +5 -1
- package/templates/create/next/prisma.compute.ts.hbs +9 -0
- package/templates/create/next/src/app/globals.css +122 -0
- package/templates/create/next/src/app/layout.tsx.hbs +2 -2
- package/templates/create/next/src/app/page.tsx.hbs +58 -34
- package/templates/create/next/src/lib/prisma.ts.hbs +4 -18
- package/templates/create/nuxt/README.md.hbs +11 -7
- package/templates/create/nuxt/app/pages/index.vue.hbs +175 -43
- package/templates/create/nuxt/deno.json.hbs +5 -0
- package/templates/create/nuxt/nuxt.config.ts +0 -1
- package/templates/create/nuxt/prisma/schema.prisma.hbs +5 -0
- package/templates/create/nuxt/prisma/seed.ts.hbs +5 -1
- package/templates/create/nuxt/prisma.compute.ts.hbs +9 -0
- package/templates/create/nuxt/server/api/users.get.ts.hbs +6 -0
- package/templates/create/nuxt/server/utils/prisma.ts.hbs +4 -18
- package/templates/create/svelte/README.md.hbs +13 -4
- package/templates/create/svelte/deno.json.hbs +5 -0
- package/templates/create/svelte/package.json.hbs +1 -2
- package/templates/create/svelte/prisma/schema.prisma.hbs +5 -0
- package/templates/create/svelte/prisma/seed.ts.hbs +5 -1
- package/templates/create/svelte/src/lib/server/prisma.ts.hbs +2 -18
- package/templates/create/svelte/src/routes/+layout.svelte +0 -1
- package/templates/create/svelte/src/routes/+page.server.ts.hbs +7 -1
- package/templates/create/svelte/src/routes/+page.svelte.hbs +297 -41
- package/templates/create/svelte/svelte.config.js +13 -0
- package/templates/create/svelte/vite.config.ts +0 -3
- package/templates/create/tanstack-start/README.md.hbs +11 -7
- package/templates/create/tanstack-start/deno.json.hbs +13 -0
- package/templates/create/tanstack-start/prisma/schema.prisma.hbs +5 -0
- package/templates/create/tanstack-start/prisma/seed.ts.hbs +5 -1
- package/templates/create/tanstack-start/prisma.compute.ts.hbs +9 -0
- package/templates/create/tanstack-start/src/lib/prisma.server.ts.hbs +4 -18
- package/templates/create/tanstack-start/src/routes/__root.tsx.hbs +29 -4
- package/templates/create/tanstack-start/src/routes/index.tsx.hbs +76 -35
- package/templates/create/tanstack-start/src/styles.css +146 -0
- package/templates/create/tanstack-start/tsconfig.json +1 -1
- package/templates/create/turborepo/README.md.hbs +9 -7
- package/templates/create/turborepo/apps/api/package.json.hbs +9 -2
- package/templates/create/turborepo/apps/api/src/index.ts.hbs +12 -28
- package/templates/create/turborepo/apps/api/tsconfig.json +0 -1
- package/templates/create/turborepo/deno.json.hbs +5 -0
- package/templates/create/turborepo/package.json.hbs +6 -0
- package/templates/create/turborepo/packages/db/package.json.hbs +5 -4
- package/templates/create/turborepo/packages/db/prisma/schema.prisma.hbs +5 -0
- package/templates/create/turborepo/packages/db/prisma/seed.ts.hbs +5 -1
- package/templates/create/turborepo/packages/db/src/client.ts.hbs +5 -2
- package/templates/create/turborepo/packages/db/tsconfig.json +0 -1
- package/templates/create/turborepo/prisma.compute.ts.hbs +14 -0
- package/templates/create/astro/module.ts.hbs +0 -30
- package/templates/create/astro/prisma-composer.config.ts.hbs +0 -8
- package/templates/create/astro/service.ts.hbs +0 -19
- package/templates/create/elysia/.yarnrc.yml.hbs +0 -3
- package/templates/create/elysia/module.ts.hbs +0 -30
- package/templates/create/elysia/prisma-composer.config.ts.hbs +0 -8
- package/templates/create/elysia/service.ts.hbs +0 -19
- package/templates/create/hono/module.ts.hbs +0 -30
- package/templates/create/hono/prisma-composer.config.ts.hbs +0 -8
- package/templates/create/hono/service.ts.hbs +0 -19
- package/templates/create/nest/module.ts.hbs +0 -30
- package/templates/create/nest/prisma-composer.config.ts.hbs +0 -8
- package/templates/create/nest/src/service.ts.hbs +0 -19
- package/templates/create/next/module.ts.hbs +0 -30
- package/templates/create/next/prisma-composer.config.ts.hbs +0 -8
- package/templates/create/next/service.ts.hbs +0 -19
- package/templates/create/nuxt/module.ts.hbs +0 -30
- package/templates/create/nuxt/prisma-composer.config.ts.hbs +0 -8
- package/templates/create/nuxt/service.ts.hbs +0 -19
- package/templates/create/svelte/module.ts.hbs +0 -30
- package/templates/create/svelte/prisma-composer.config.ts.hbs +0 -8
- package/templates/create/svelte/service.ts.hbs +0 -19
- package/templates/create/svelte/svelte.config.js.hbs +0 -10
- package/templates/create/tanstack-start/module.ts.hbs +0 -30
- package/templates/create/tanstack-start/prisma-composer.config.ts.hbs +0 -8
- package/templates/create/tanstack-start/service.ts.hbs +0 -19
- package/templates/create/turborepo/apps/api/src/service.ts.hbs +0 -19
- package/templates/create/turborepo/module.ts.hbs +0 -30
- package/templates/create/turborepo/prisma-composer.config.ts.hbs +0 -8
- package/templates/shared/setup-composer-postgres.mjs.hbs +0 -179
- package/templates/shared/starter.css +0 -276
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineComputeConfig } from "@prisma/compute-sdk/config";
|
|
2
|
+
|
|
3
|
+
export default defineComputeConfig({
|
|
4
|
+
apps: {
|
|
5
|
+
api: {
|
|
6
|
+
name: "{{projectName}}",
|
|
7
|
+
root: "apps/api",
|
|
8
|
+
framework: "hono",
|
|
9
|
+
entry: "src/index.ts",
|
|
10
|
+
httpPort: 3000,
|
|
11
|
+
env: "packages/db/.env",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { module } from "@prisma/composer";
|
|
2
|
-
import { {{#if composerPostgres}}postgres{{else}}envSecret{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
3
|
-
{{#unless composerPostgres}}
|
|
4
|
-
import { config } from "dotenv";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
{{/unless}}
|
|
7
|
-
|
|
8
|
-
// @ts-ignore Composer loads this TypeScript module directly and requires the extension.
|
|
9
|
-
import app from "./service.ts";
|
|
10
|
-
|
|
11
|
-
{{#unless composerPostgres}}
|
|
12
|
-
config({
|
|
13
|
-
path: [fileURLToPath(new URL("./.env", import.meta.url)), fileURLToPath(new URL("./packages/db/.env", import.meta.url))],
|
|
14
|
-
quiet: true,
|
|
15
|
-
});
|
|
16
|
-
process.env.PRISMA_APP_DATABASE_URL ??= process.env.DATABASE_URL;
|
|
17
|
-
{{/unless}}
|
|
18
|
-
|
|
19
|
-
export default module("{{projectName}}", ({ provision }) => {
|
|
20
|
-
{{#if composerPostgres}}
|
|
21
|
-
const database = provision(postgres({ name: "database" }), { id: "database" });
|
|
22
|
-
provision(app, { deps: { database } });
|
|
23
|
-
{{else}}
|
|
24
|
-
provision(app, {
|
|
25
|
-
input: {
|
|
26
|
-
databaseUrl: envSecret("PRISMA_APP_DATABASE_URL"),
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
{{/if}}
|
|
30
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "@prisma/composer/config";
|
|
2
|
-
import { nodeBuild } from "@prisma/composer/node/control";
|
|
3
|
-
import { prismaCloud, prismaState } from "@prisma/composer-prisma-cloud/control";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
extensions: [prismaCloud(), nodeBuild()],
|
|
7
|
-
state: prismaState(),
|
|
8
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{{#unless composerPostgres}}
|
|
2
|
-
import { secretString } from "@prisma/composer/arktype";
|
|
3
|
-
{{/unless}}
|
|
4
|
-
import node from "@prisma/composer/node";
|
|
5
|
-
import { compute{{#if composerPostgres}}, postgres{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
6
|
-
{{#unless composerPostgres}}
|
|
7
|
-
import { type } from "arktype";
|
|
8
|
-
{{/unless}}
|
|
9
|
-
|
|
10
|
-
export default compute({
|
|
11
|
-
name: "app",
|
|
12
|
-
{{#if composerPostgres}}
|
|
13
|
-
deps: { database: postgres() },
|
|
14
|
-
{{else}}
|
|
15
|
-
deps: {},
|
|
16
|
-
input: type({ databaseUrl: secretString() }),
|
|
17
|
-
{{/if}}
|
|
18
|
-
build: node({ module: import.meta.url, dir: "./dist", entry: "server/entry.mjs" }),
|
|
19
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { module } from "@prisma/composer";
|
|
2
|
-
import { {{#if composerPostgres}}postgres{{else}}envSecret{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
3
|
-
{{#unless composerPostgres}}
|
|
4
|
-
import { config } from "dotenv";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
{{/unless}}
|
|
7
|
-
|
|
8
|
-
// @ts-ignore Composer loads this TypeScript module directly and requires the extension.
|
|
9
|
-
import app from "./service.ts";
|
|
10
|
-
|
|
11
|
-
{{#unless composerPostgres}}
|
|
12
|
-
config({
|
|
13
|
-
path: [fileURLToPath(new URL("./.env", import.meta.url)), fileURLToPath(new URL("./packages/db/.env", import.meta.url))],
|
|
14
|
-
quiet: true,
|
|
15
|
-
});
|
|
16
|
-
process.env.PRISMA_APP_DATABASE_URL ??= process.env.DATABASE_URL;
|
|
17
|
-
{{/unless}}
|
|
18
|
-
|
|
19
|
-
export default module("{{projectName}}", ({ provision }) => {
|
|
20
|
-
{{#if composerPostgres}}
|
|
21
|
-
const database = provision(postgres({ name: "database" }), { id: "database" });
|
|
22
|
-
provision(app, { deps: { database } });
|
|
23
|
-
{{else}}
|
|
24
|
-
provision(app, {
|
|
25
|
-
input: {
|
|
26
|
-
databaseUrl: envSecret("PRISMA_APP_DATABASE_URL"),
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
{{/if}}
|
|
30
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "@prisma/composer/config";
|
|
2
|
-
import { nodeBuild } from "@prisma/composer/node/control";
|
|
3
|
-
import { prismaCloud, prismaState } from "@prisma/composer-prisma-cloud/control";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
extensions: [prismaCloud(), nodeBuild()],
|
|
7
|
-
state: prismaState(),
|
|
8
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{{#unless composerPostgres}}
|
|
2
|
-
import { secretString } from "@prisma/composer/arktype";
|
|
3
|
-
{{/unless}}
|
|
4
|
-
import node from "@prisma/composer/node";
|
|
5
|
-
import { compute{{#if composerPostgres}}, postgres{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
6
|
-
{{#unless composerPostgres}}
|
|
7
|
-
import { type } from "arktype";
|
|
8
|
-
{{/unless}}
|
|
9
|
-
|
|
10
|
-
export default compute({
|
|
11
|
-
name: "app",
|
|
12
|
-
{{#if composerPostgres}}
|
|
13
|
-
deps: { database: postgres() },
|
|
14
|
-
{{else}}
|
|
15
|
-
deps: {},
|
|
16
|
-
input: type({ databaseUrl: secretString() }),
|
|
17
|
-
{{/if}}
|
|
18
|
-
build: node({ module: import.meta.url, entry: "./dist/server.mjs" }),
|
|
19
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { module } from "@prisma/composer";
|
|
2
|
-
import { {{#if composerPostgres}}postgres{{else}}envSecret{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
3
|
-
{{#unless composerPostgres}}
|
|
4
|
-
import { config } from "dotenv";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
{{/unless}}
|
|
7
|
-
|
|
8
|
-
// @ts-ignore Composer loads this TypeScript module directly and requires the extension.
|
|
9
|
-
import app from "./service.ts";
|
|
10
|
-
|
|
11
|
-
{{#unless composerPostgres}}
|
|
12
|
-
config({
|
|
13
|
-
path: [fileURLToPath(new URL("./.env", import.meta.url)), fileURLToPath(new URL("./packages/db/.env", import.meta.url))],
|
|
14
|
-
quiet: true,
|
|
15
|
-
});
|
|
16
|
-
process.env.PRISMA_APP_DATABASE_URL ??= process.env.DATABASE_URL;
|
|
17
|
-
{{/unless}}
|
|
18
|
-
|
|
19
|
-
export default module("{{projectName}}", ({ provision }) => {
|
|
20
|
-
{{#if composerPostgres}}
|
|
21
|
-
const database = provision(postgres({ name: "database" }), { id: "database" });
|
|
22
|
-
provision(app, { deps: { database } });
|
|
23
|
-
{{else}}
|
|
24
|
-
provision(app, {
|
|
25
|
-
input: {
|
|
26
|
-
databaseUrl: envSecret("PRISMA_APP_DATABASE_URL"),
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
{{/if}}
|
|
30
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "@prisma/composer/config";
|
|
2
|
-
import { nodeBuild } from "@prisma/composer/node/control";
|
|
3
|
-
import { prismaCloud, prismaState } from "@prisma/composer-prisma-cloud/control";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
extensions: [prismaCloud(), nodeBuild()],
|
|
7
|
-
state: prismaState(),
|
|
8
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{{#unless composerPostgres}}
|
|
2
|
-
import { secretString } from "@prisma/composer/arktype";
|
|
3
|
-
{{/unless}}
|
|
4
|
-
import node from "@prisma/composer/node";
|
|
5
|
-
import { compute{{#if composerPostgres}}, postgres{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
6
|
-
{{#unless composerPostgres}}
|
|
7
|
-
import { type } from "arktype";
|
|
8
|
-
{{/unless}}
|
|
9
|
-
|
|
10
|
-
export default compute({
|
|
11
|
-
name: "app",
|
|
12
|
-
{{#if composerPostgres}}
|
|
13
|
-
deps: { database: postgres() },
|
|
14
|
-
{{else}}
|
|
15
|
-
deps: {},
|
|
16
|
-
input: type({ databaseUrl: secretString() }),
|
|
17
|
-
{{/if}}
|
|
18
|
-
build: node({ module: import.meta.url, entry: "./dist/server.mjs" }),
|
|
19
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { module } from "@prisma/composer";
|
|
2
|
-
import { {{#if composerPostgres}}postgres{{else}}envSecret{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
3
|
-
{{#unless composerPostgres}}
|
|
4
|
-
import { config } from "dotenv";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
{{/unless}}
|
|
7
|
-
|
|
8
|
-
// @ts-ignore Composer loads this TypeScript module directly and requires the extension.
|
|
9
|
-
import app from "./src/service.ts";
|
|
10
|
-
|
|
11
|
-
{{#unless composerPostgres}}
|
|
12
|
-
config({
|
|
13
|
-
path: [fileURLToPath(new URL("./.env", import.meta.url)), fileURLToPath(new URL("./packages/db/.env", import.meta.url))],
|
|
14
|
-
quiet: true,
|
|
15
|
-
});
|
|
16
|
-
process.env.PRISMA_APP_DATABASE_URL ??= process.env.DATABASE_URL;
|
|
17
|
-
{{/unless}}
|
|
18
|
-
|
|
19
|
-
export default module("{{projectName}}", ({ provision }) => {
|
|
20
|
-
{{#if composerPostgres}}
|
|
21
|
-
const database = provision(postgres({ name: "database" }), { id: "database" });
|
|
22
|
-
provision(app, { deps: { database } });
|
|
23
|
-
{{else}}
|
|
24
|
-
provision(app, {
|
|
25
|
-
input: {
|
|
26
|
-
databaseUrl: envSecret("PRISMA_APP_DATABASE_URL"),
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
{{/if}}
|
|
30
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "@prisma/composer/config";
|
|
2
|
-
import { nodeBuild } from "@prisma/composer/node/control";
|
|
3
|
-
import { prismaCloud, prismaState } from "@prisma/composer-prisma-cloud/control";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
extensions: [prismaCloud(), nodeBuild()],
|
|
7
|
-
state: prismaState(),
|
|
8
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{{#unless composerPostgres}}
|
|
2
|
-
import { secretString } from "@prisma/composer/arktype";
|
|
3
|
-
{{/unless}}
|
|
4
|
-
import node from "@prisma/composer/node";
|
|
5
|
-
import { compute{{#if composerPostgres}}, postgres{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
6
|
-
{{#unless composerPostgres}}
|
|
7
|
-
import { type } from "arktype";
|
|
8
|
-
{{/unless}}
|
|
9
|
-
|
|
10
|
-
export default compute({
|
|
11
|
-
name: "app",
|
|
12
|
-
{{#if composerPostgres}}
|
|
13
|
-
deps: { database: postgres() },
|
|
14
|
-
{{else}}
|
|
15
|
-
deps: {},
|
|
16
|
-
input: type({ databaseUrl: secretString() }),
|
|
17
|
-
{{/if}}
|
|
18
|
-
build: node({ module: import.meta.url, entry: "../dist-composer/server.mjs" }),
|
|
19
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { module } from "@prisma/composer";
|
|
2
|
-
import { {{#if composerPostgres}}postgres{{else}}envSecret{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
3
|
-
{{#unless composerPostgres}}
|
|
4
|
-
import { config } from "dotenv";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
{{/unless}}
|
|
7
|
-
|
|
8
|
-
// @ts-ignore Composer loads this TypeScript module directly and requires the extension.
|
|
9
|
-
import app from "./service.ts";
|
|
10
|
-
|
|
11
|
-
{{#unless composerPostgres}}
|
|
12
|
-
config({
|
|
13
|
-
path: [fileURLToPath(new URL("./.env", import.meta.url)), fileURLToPath(new URL("./packages/db/.env", import.meta.url))],
|
|
14
|
-
quiet: true,
|
|
15
|
-
});
|
|
16
|
-
process.env.PRISMA_APP_DATABASE_URL ??= process.env.DATABASE_URL;
|
|
17
|
-
{{/unless}}
|
|
18
|
-
|
|
19
|
-
export default module("{{projectName}}", ({ provision }) => {
|
|
20
|
-
{{#if composerPostgres}}
|
|
21
|
-
const database = provision(postgres({ name: "database" }), { id: "database" });
|
|
22
|
-
provision(app, { deps: { database } });
|
|
23
|
-
{{else}}
|
|
24
|
-
provision(app, {
|
|
25
|
-
input: {
|
|
26
|
-
databaseUrl: envSecret("PRISMA_APP_DATABASE_URL"),
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
{{/if}}
|
|
30
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "@prisma/composer/config";
|
|
2
|
-
import { nextjsBuild } from "@prisma/composer/nextjs/control";
|
|
3
|
-
import { prismaCloud, prismaState } from "@prisma/composer-prisma-cloud/control";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
extensions: [prismaCloud(), nextjsBuild()],
|
|
7
|
-
state: prismaState(),
|
|
8
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{{#unless composerPostgres}}
|
|
2
|
-
import { secretString } from "@prisma/composer/arktype";
|
|
3
|
-
{{/unless}}
|
|
4
|
-
import nextjs from "@prisma/composer/nextjs";
|
|
5
|
-
import { compute{{#if composerPostgres}}, postgres{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
6
|
-
{{#unless composerPostgres}}
|
|
7
|
-
import { type } from "arktype";
|
|
8
|
-
{{/unless}}
|
|
9
|
-
|
|
10
|
-
export default compute({
|
|
11
|
-
name: "app",
|
|
12
|
-
{{#if composerPostgres}}
|
|
13
|
-
deps: { database: postgres() },
|
|
14
|
-
{{else}}
|
|
15
|
-
deps: {},
|
|
16
|
-
input: type({ databaseUrl: secretString() }),
|
|
17
|
-
{{/if}}
|
|
18
|
-
build: nextjs({ module: import.meta.url, appDir: "." }),
|
|
19
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { module } from "@prisma/composer";
|
|
2
|
-
import { {{#if composerPostgres}}postgres{{else}}envSecret{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
3
|
-
{{#unless composerPostgres}}
|
|
4
|
-
import { config } from "dotenv";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
{{/unless}}
|
|
7
|
-
|
|
8
|
-
// @ts-ignore Composer loads this TypeScript module directly and requires the extension.
|
|
9
|
-
import app from "./service.ts";
|
|
10
|
-
|
|
11
|
-
{{#unless composerPostgres}}
|
|
12
|
-
config({
|
|
13
|
-
path: [fileURLToPath(new URL("./.env", import.meta.url)), fileURLToPath(new URL("./packages/db/.env", import.meta.url))],
|
|
14
|
-
quiet: true,
|
|
15
|
-
});
|
|
16
|
-
process.env.PRISMA_APP_DATABASE_URL ??= process.env.DATABASE_URL;
|
|
17
|
-
{{/unless}}
|
|
18
|
-
|
|
19
|
-
export default module("{{projectName}}", ({ provision }) => {
|
|
20
|
-
{{#if composerPostgres}}
|
|
21
|
-
const database = provision(postgres({ name: "database" }), { id: "database" });
|
|
22
|
-
provision(app, { deps: { database } });
|
|
23
|
-
{{else}}
|
|
24
|
-
provision(app, {
|
|
25
|
-
input: {
|
|
26
|
-
databaseUrl: envSecret("PRISMA_APP_DATABASE_URL"),
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
{{/if}}
|
|
30
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "@prisma/composer/config";
|
|
2
|
-
import { nodeBuild } from "@prisma/composer/node/control";
|
|
3
|
-
import { prismaCloud, prismaState } from "@prisma/composer-prisma-cloud/control";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
extensions: [prismaCloud(), nodeBuild()],
|
|
7
|
-
state: prismaState(),
|
|
8
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{{#unless composerPostgres}}
|
|
2
|
-
import { secretString } from "@prisma/composer/arktype";
|
|
3
|
-
{{/unless}}
|
|
4
|
-
import node from "@prisma/composer/node";
|
|
5
|
-
import { compute{{#if composerPostgres}}, postgres{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
6
|
-
{{#unless composerPostgres}}
|
|
7
|
-
import { type } from "arktype";
|
|
8
|
-
{{/unless}}
|
|
9
|
-
|
|
10
|
-
export default compute({
|
|
11
|
-
name: "app",
|
|
12
|
-
{{#if composerPostgres}}
|
|
13
|
-
deps: { database: postgres() },
|
|
14
|
-
{{else}}
|
|
15
|
-
deps: {},
|
|
16
|
-
input: type({ databaseUrl: secretString() }),
|
|
17
|
-
{{/if}}
|
|
18
|
-
build: node({ module: import.meta.url, dir: "./.output", entry: "server/index.mjs" }),
|
|
19
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { module } from "@prisma/composer";
|
|
2
|
-
import { {{#if composerPostgres}}postgres{{else}}envSecret{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
3
|
-
{{#unless composerPostgres}}
|
|
4
|
-
import { config } from "dotenv";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
{{/unless}}
|
|
7
|
-
|
|
8
|
-
// @ts-ignore Composer loads this TypeScript module directly and requires the extension.
|
|
9
|
-
import app from "./service.ts";
|
|
10
|
-
|
|
11
|
-
{{#unless composerPostgres}}
|
|
12
|
-
config({
|
|
13
|
-
path: fileURLToPath(new URL("./.env", import.meta.url)),
|
|
14
|
-
quiet: true,
|
|
15
|
-
});
|
|
16
|
-
process.env.PRISMA_APP_DATABASE_URL ??= process.env.DATABASE_URL;
|
|
17
|
-
{{/unless}}
|
|
18
|
-
|
|
19
|
-
export default module("{{projectName}}", ({ provision }) => {
|
|
20
|
-
{{#if composerPostgres}}
|
|
21
|
-
const database = provision(postgres({ name: "database" }), { id: "database" });
|
|
22
|
-
provision(app, { deps: { database } });
|
|
23
|
-
{{else}}
|
|
24
|
-
provision(app, {
|
|
25
|
-
input: {
|
|
26
|
-
databaseUrl: envSecret("PRISMA_APP_DATABASE_URL"),
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
{{/if}}
|
|
30
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "@prisma/composer/config";
|
|
2
|
-
import { nodeBuild } from "@prisma/composer/node/control";
|
|
3
|
-
import { prismaCloud, prismaState } from "@prisma/composer-prisma-cloud/control";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
extensions: [prismaCloud(), nodeBuild()],
|
|
7
|
-
state: prismaState(),
|
|
8
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{{#unless composerPostgres}}
|
|
2
|
-
import { secretString } from "@prisma/composer/arktype";
|
|
3
|
-
{{/unless}}
|
|
4
|
-
import node from "@prisma/composer/node";
|
|
5
|
-
import { compute{{#if composerPostgres}}, postgres{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
6
|
-
{{#unless composerPostgres}}
|
|
7
|
-
import { type } from "arktype";
|
|
8
|
-
{{/unless}}
|
|
9
|
-
|
|
10
|
-
export default compute({
|
|
11
|
-
name: "app",
|
|
12
|
-
{{#if composerPostgres}}
|
|
13
|
-
deps: { database: postgres() },
|
|
14
|
-
{{else}}
|
|
15
|
-
deps: {},
|
|
16
|
-
input: type({ databaseUrl: secretString() }),
|
|
17
|
-
{{/if}}
|
|
18
|
-
build: node({ module: import.meta.url, dir: "./build", entry: "index.js" }),
|
|
19
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { module } from "@prisma/composer";
|
|
2
|
-
import { {{#if composerPostgres}}postgres{{else}}envSecret{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
3
|
-
{{#unless composerPostgres}}
|
|
4
|
-
import { config } from "dotenv";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
{{/unless}}
|
|
7
|
-
|
|
8
|
-
// @ts-ignore Composer loads this TypeScript module directly and requires the extension.
|
|
9
|
-
import app from "./service.ts";
|
|
10
|
-
|
|
11
|
-
{{#unless composerPostgres}}
|
|
12
|
-
config({
|
|
13
|
-
path: [fileURLToPath(new URL("./.env", import.meta.url)), fileURLToPath(new URL("./packages/db/.env", import.meta.url))],
|
|
14
|
-
quiet: true,
|
|
15
|
-
});
|
|
16
|
-
process.env.PRISMA_APP_DATABASE_URL ??= process.env.DATABASE_URL;
|
|
17
|
-
{{/unless}}
|
|
18
|
-
|
|
19
|
-
export default module("{{projectName}}", ({ provision }) => {
|
|
20
|
-
{{#if composerPostgres}}
|
|
21
|
-
const database = provision(postgres({ name: "database" }), { id: "database" });
|
|
22
|
-
provision(app, { deps: { database } });
|
|
23
|
-
{{else}}
|
|
24
|
-
provision(app, {
|
|
25
|
-
input: {
|
|
26
|
-
databaseUrl: envSecret("PRISMA_APP_DATABASE_URL"),
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
{{/if}}
|
|
30
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "@prisma/composer/config";
|
|
2
|
-
import { nodeBuild } from "@prisma/composer/node/control";
|
|
3
|
-
import { prismaCloud, prismaState } from "@prisma/composer-prisma-cloud/control";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
extensions: [prismaCloud(), nodeBuild()],
|
|
7
|
-
state: prismaState(),
|
|
8
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{{#unless composerPostgres}}
|
|
2
|
-
import { secretString } from "@prisma/composer/arktype";
|
|
3
|
-
{{/unless}}
|
|
4
|
-
import node from "@prisma/composer/node";
|
|
5
|
-
import { compute{{#if composerPostgres}}, postgres{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
6
|
-
{{#unless composerPostgres}}
|
|
7
|
-
import { type } from "arktype";
|
|
8
|
-
{{/unless}}
|
|
9
|
-
|
|
10
|
-
export default compute({
|
|
11
|
-
name: "app",
|
|
12
|
-
{{#if composerPostgres}}
|
|
13
|
-
deps: { database: postgres() },
|
|
14
|
-
{{else}}
|
|
15
|
-
deps: {},
|
|
16
|
-
input: type({ databaseUrl: secretString() }),
|
|
17
|
-
{{/if}}
|
|
18
|
-
build: node({ module: import.meta.url, dir: "./.output", entry: "server/index.mjs" }),
|
|
19
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{{#unless composerPostgres}}
|
|
2
|
-
import { secretString } from "@prisma/composer/arktype";
|
|
3
|
-
{{/unless}}
|
|
4
|
-
import node from "@prisma/composer/node";
|
|
5
|
-
import { compute{{#if composerPostgres}}, postgres{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
6
|
-
{{#unless composerPostgres}}
|
|
7
|
-
import { type } from "arktype";
|
|
8
|
-
{{/unless}}
|
|
9
|
-
|
|
10
|
-
export default compute({
|
|
11
|
-
name: "app",
|
|
12
|
-
{{#if composerPostgres}}
|
|
13
|
-
deps: { database: postgres() },
|
|
14
|
-
{{else}}
|
|
15
|
-
deps: {},
|
|
16
|
-
input: type({ databaseUrl: secretString() }),
|
|
17
|
-
{{/if}}
|
|
18
|
-
build: node({ module: import.meta.url, entry: "../dist/server.mjs" }),
|
|
19
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { module } from "@prisma/composer";
|
|
2
|
-
import { {{#if composerPostgres}}postgres{{else}}envSecret{{/if}} } from "@prisma/composer-prisma-cloud";
|
|
3
|
-
{{#unless composerPostgres}}
|
|
4
|
-
import { config } from "dotenv";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
{{/unless}}
|
|
7
|
-
|
|
8
|
-
// @ts-ignore Composer loads this TypeScript module directly and requires the extension.
|
|
9
|
-
import app from "./apps/api/src/service.ts";
|
|
10
|
-
|
|
11
|
-
{{#unless composerPostgres}}
|
|
12
|
-
config({
|
|
13
|
-
path: [fileURLToPath(new URL("./.env", import.meta.url)), fileURLToPath(new URL("./packages/db/.env", import.meta.url))],
|
|
14
|
-
quiet: true,
|
|
15
|
-
});
|
|
16
|
-
process.env.PRISMA_APP_DATABASE_URL ??= process.env.DATABASE_URL;
|
|
17
|
-
{{/unless}}
|
|
18
|
-
|
|
19
|
-
export default module("{{projectName}}", ({ provision }) => {
|
|
20
|
-
{{#if composerPostgres}}
|
|
21
|
-
const database = provision(postgres({ name: "database" }), { id: "database" });
|
|
22
|
-
provision(app, { deps: { database } });
|
|
23
|
-
{{else}}
|
|
24
|
-
provision(app, {
|
|
25
|
-
input: {
|
|
26
|
-
databaseUrl: envSecret("PRISMA_APP_DATABASE_URL"),
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
{{/if}}
|
|
30
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "@prisma/composer/config";
|
|
2
|
-
import { nodeBuild } from "@prisma/composer/node/control";
|
|
3
|
-
import { prismaCloud, prismaState } from "@prisma/composer-prisma-cloud/control";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
extensions: [prismaCloud(), nodeBuild()],
|
|
7
|
-
state: prismaState(),
|
|
8
|
-
});
|