create-prisma 0.4.2-next.37.104.1 → 0.4.2-next.37.105.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
|
@@ -131,7 +131,7 @@ async function getAnonymousId() {
|
|
|
131
131
|
}
|
|
132
132
|
function getCommonProperties() {
|
|
133
133
|
return {
|
|
134
|
-
"cli-version": "0.4.2-next.37.
|
|
134
|
+
"cli-version": "0.4.2-next.37.105.1",
|
|
135
135
|
"node-version": process.version,
|
|
136
136
|
platform: process.platform,
|
|
137
137
|
arch: process.arch
|
|
@@ -866,7 +866,7 @@ const DEFAULT_AUTHORING = "psl";
|
|
|
866
866
|
const DEFAULT_INSTALL = true;
|
|
867
867
|
const DEFAULT_EMIT = true;
|
|
868
868
|
const DEFAULT_INTERACTIVE_PRISMA_POSTGRES = true;
|
|
869
|
-
const DEFAULT_AUTOMATED_PRISMA_POSTGRES =
|
|
869
|
+
const DEFAULT_AUTOMATED_PRISMA_POSTGRES = true;
|
|
870
870
|
const MONGO_MEMORY_SERVER_SCRIPT = `import { spawn } from "node:child_process";
|
|
871
871
|
import { closeSync, existsSync, mkdirSync, openSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
872
872
|
import path from "node:path";
|
|
@@ -1128,6 +1128,12 @@ async function promptForPrismaPostgres() {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
return Boolean(shouldUsePrismaPostgres);
|
|
1130
1130
|
}
|
|
1131
|
+
async function resolvePrismaPostgresChoice(options) {
|
|
1132
|
+
const { explicitChoice, databaseProvider, databaseUrl, useDefaults } = options;
|
|
1133
|
+
if (explicitChoice !== void 0) return explicitChoice;
|
|
1134
|
+
if (databaseProvider !== "postgres" || databaseUrl) return false;
|
|
1135
|
+
return useDefaults ? DEFAULT_AUTOMATED_PRISMA_POSTGRES : await promptForPrismaPostgres();
|
|
1136
|
+
}
|
|
1131
1137
|
function getPackageManagerHint(option, detected) {
|
|
1132
1138
|
const hint = {
|
|
1133
1139
|
npm: "Node.js default",
|
|
@@ -1211,7 +1217,12 @@ async function collectPrismaSetupContext(input, options = {}) {
|
|
|
1211
1217
|
const databaseProvider = input.provider ?? (useDefaults ? DEFAULT_DATABASE_PROVIDER : await promptForDatabaseProvider());
|
|
1212
1218
|
if (!databaseProvider) return;
|
|
1213
1219
|
const databaseUrl = input.databaseUrl;
|
|
1214
|
-
const shouldUsePrismaPostgres =
|
|
1220
|
+
const shouldUsePrismaPostgres = await resolvePrismaPostgresChoice({
|
|
1221
|
+
explicitChoice: input.prismaPostgres,
|
|
1222
|
+
databaseProvider,
|
|
1223
|
+
databaseUrl,
|
|
1224
|
+
useDefaults
|
|
1225
|
+
});
|
|
1215
1226
|
if (shouldUsePrismaPostgres === void 0) return;
|
|
1216
1227
|
if (shouldUsePrismaPostgres && databaseProvider !== "postgres") {
|
|
1217
1228
|
cancel("--prisma-postgres is only supported with --provider postgres.");
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as DatabaseUrlSchema, r as CreateCommandInputSchema, s as PackageManagerSchema, t as runCreateCommand } from "./create-
|
|
2
|
+
import { a as DatabaseProviderSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as DatabaseUrlSchema, r as CreateCommandInputSchema, s as PackageManagerSchema, t as runCreateCommand } from "./create-BIV2KC9D.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.4.2-next.37.
|
|
7
|
+
const CLI_VERSION = "0.4.2-next.37.105.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.4.2-next.37.
|
|
3
|
+
"version": "0.4.2-next.37.105.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",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dev": "tsdown --watch",
|
|
38
38
|
"start": "bun run ./dist/cli.mjs",
|
|
39
39
|
"test": "bun run test:unit && bun run test:e2e",
|
|
40
|
-
"test:unit": "bun test ./tests/dependencies.test.ts ./tests/install.test.ts ./tests/telemetry.test.ts",
|
|
40
|
+
"test:unit": "bun test ./tests/dependencies.test.ts ./tests/install.test.ts ./tests/setup-prisma.test.ts ./tests/telemetry.test.ts",
|
|
41
41
|
"test:e2e": "bun test --timeout 180000 ./tests/e2e/create-prisma.e2e.test.ts",
|
|
42
42
|
"check": "bun run format:check && bun run lint",
|
|
43
43
|
"lint": "oxlint . --deny-warnings",
|