create-prisma 0.4.2-pr.53.183.1 → 0.4.2-pr.53.184.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/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./create-DIOWKea-.mjs";
2
+ import "./create-DfcHV9O8.mjs";
3
3
  import { createCreatePrismaCli } from "./index.mjs";
4
4
 
5
5
  //#region src/cli.ts
@@ -40,7 +40,7 @@ async function getAnonymousId() {
40
40
  }
41
41
  function getCommonProperties() {
42
42
  return {
43
- "cli-version": "0.4.2-pr.53.183.1",
43
+ "cli-version": "0.4.2-pr.53.184.1",
44
44
  "node-version": process.version,
45
45
  platform: process.platform,
46
46
  arch: process.arch
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as PackageManagerSchema, r as CreateCommandInputSchema, t as runCreateCommand } from "./create-DIOWKea-.mjs";
2
+ import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as PackageManagerSchema, r as CreateCommandInputSchema, t as runCreateCommand } from "./create-DfcHV9O8.mjs";
3
3
  import { os } from "@orpc/server";
4
4
  import { createCli } from "trpc-cli";
5
5
  import { z } from "zod";
6
6
 
7
7
  //#region src/index.ts
8
- const CLI_VERSION = "0.4.2-pr.53.183.1";
8
+ const CLI_VERSION = "0.4.2-pr.53.184.1";
9
9
  const CreateCliInputSchema = z.tuple([z.string().trim().min(1, "Please enter a valid project name").optional().describe("Project name / directory"), CreateCommandInputSchema]);
10
10
  function normalizeCreateCliInput(input) {
11
11
  const [projectName, options] = input;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma",
3
- "version": "0.4.2-pr.53.183.1",
3
+ "version": "0.4.2-pr.53.184.1",
4
4
  "private": false,
5
5
  "description": "Create Prisma Next projects with first-party templates and great DX.",
6
6
  "homepage": "https://github.com/prisma/create-prisma",
@@ -0,0 +1,11 @@
1
+ {{#if (eq authoring "typescript")}}
2
+ src/prisma/generated/contract.json linguist-generated
3
+ src/prisma/generated/contract.d.ts linguist-generated
4
+ {{else}}
5
+ src/prisma/contract.json linguist-generated
6
+ src/prisma/contract.d.ts linguist-generated
7
+ {{/if}}
8
+ src/prisma/ops.json linguist-generated
9
+ src/prisma/migration.json linguist-generated
10
+ migrations/snapshots/**/contract.json linguist-generated
11
+ migrations/snapshots/**/contract.d.ts linguist-generated
@@ -0,0 +1,12 @@
1
+ import "dotenv/config";
2
+ import { defineConfig } from "@prisma/orm-{{#if (eq provider "postgres")}}postgres{{else}}mongo{{/if}}/config";
3
+
4
+ export default defineConfig({
5
+ contract: "./src/prisma/contract{{#if (eq authoring "typescript")}}.ts{{else}}.prisma{{/if}}",
6
+ {{#if (eq authoring "typescript")}}
7
+ output: "./src/prisma/generated",
8
+ {{/if}}
9
+ db: {
10
+ connection: process.env.DATABASE_URL!,
11
+ },
12
+ });
@@ -1,8 +1,8 @@
1
1
  {{#if (eq provider "postgres")}}
2
2
  import { pnContract } from "@prisma/composer-prisma-cloud/prisma-next";
3
3
 
4
- import type { Contract } from "./contract.d.ts";
5
- import contractJson from "./contract.json" with { type: "json" };
4
+ import type { Contract } from "./{{#if (eq authoring "typescript")}}generated/{{/if}}contract.d.ts";
5
+ import contractJson from "./{{#if (eq authoring "typescript")}}generated/{{/if}}contract.json" with { type: "json" };
6
6
 
7
7
  export const appContract = pnContract<Contract>(contractJson);
8
8
  {{/if}}
@@ -2,8 +2,8 @@
2
2
  import postgres from "@prisma/orm-postgres/runtime";
3
3
 
4
4
  import service from "../../service.ts";
5
- import type { Contract } from "./contract.d.ts";
6
- import contractJson from "./contract.json" with { type: "json" };
5
+ import type { Contract } from "./{{#if (eq authoring "typescript")}}generated/{{/if}}contract.d.ts";
6
+ import contractJson from "./{{#if (eq authoring "typescript")}}generated/{{/if}}contract.json" with { type: "json" };
7
7
 
8
8
  function loadComposerDatabase() {
9
9
  try {
@@ -23,8 +23,8 @@ export const db =
23
23
  import mongo from "@prisma/orm-mongo/runtime";
24
24
 
25
25
  import service from "../../service.ts";
26
- import type { Contract } from "./contract.d.ts";
27
- import contractJson from "./contract.json" with { type: "json" };
26
+ import type { Contract } from "./{{#if (eq authoring "typescript")}}generated/{{/if}}contract.d.ts";
27
+ import contractJson from "./{{#if (eq authoring "typescript")}}generated/{{/if}}contract.json" with { type: "json" };
28
28
 
29
29
  function getDatabaseUrl(): string {
30
30
  try {