create-prisma 0.4.2-next.37.81.1 → 0.4.2-pr.37.78.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-C-bVmrxB.mjs";
2
+ import "./create-BiY_Ivsa.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-next.37.81.1",
43
+ "cli-version": "0.4.2-pr.37.78.1",
44
44
  "node-version": process.version,
45
45
  platform: process.platform,
46
46
  arch: process.arch
@@ -819,8 +819,6 @@ const DEFAULT_AUTHORING = "psl";
819
819
  const DEFAULT_SCHEMA_PRESET$1 = "basic";
820
820
  const DEFAULT_INSTALL = true;
821
821
  const DEFAULT_EMIT = true;
822
- const DEFAULT_INTERACTIVE_PRISMA_POSTGRES = true;
823
- const DEFAULT_AUTOMATED_PRISMA_POSTGRES = false;
824
822
  const MONGO_DOCKER_COMPOSE = `services:
825
823
  mongodb:
826
824
  image: mongo:latest
@@ -908,19 +906,6 @@ async function promptForAuthoringStyle() {
908
906
  }
909
907
  return AuthoringStyleSchema.parse(authoring);
910
908
  }
911
- async function promptForPrismaPostgres() {
912
- const shouldUsePrismaPostgres = await confirm({
913
- message: "Provision a Prisma Postgres database?",
914
- active: "Provision Prisma Postgres",
915
- inactive: "Use my own database",
916
- initialValue: DEFAULT_INTERACTIVE_PRISMA_POSTGRES
917
- });
918
- if (isCancel(shouldUsePrismaPostgres)) {
919
- cancel("Operation cancelled.");
920
- return;
921
- }
922
- return Boolean(shouldUsePrismaPostgres);
923
- }
924
909
  function getPackageManagerHint(option, detected) {
925
910
  const hint = {
926
911
  npm: "Node.js default",
@@ -996,9 +981,11 @@ async function collectPrismaSetupContext(input, options = {}) {
996
981
  const shouldEmit = input.emit ?? DEFAULT_EMIT;
997
982
  const databaseProvider = input.provider ?? (useDefaults ? DEFAULT_DATABASE_PROVIDER : await promptForDatabaseProvider());
998
983
  if (!databaseProvider) return;
984
+ const authoring = input.authoring ?? (useDefaults ? DEFAULT_AUTHORING : await promptForAuthoringStyle());
985
+ if (!authoring) return;
986
+ const schemaPreset = input.schemaPreset ?? options.defaultSchemaPreset ?? DEFAULT_SCHEMA_PRESET$1;
999
987
  const databaseUrl = input.databaseUrl;
1000
- const shouldUsePrismaPostgres = input.prismaPostgres ?? (databaseProvider === "postgres" && !databaseUrl && !useDefaults ? await promptForPrismaPostgres() : DEFAULT_AUTOMATED_PRISMA_POSTGRES);
1001
- if (shouldUsePrismaPostgres === void 0) return;
988
+ const shouldUsePrismaPostgres = input.prismaPostgres === true;
1002
989
  if (shouldUsePrismaPostgres && databaseProvider !== "postgres") {
1003
990
  cancel("--prisma-postgres is only supported with --provider postgres.");
1004
991
  return;
@@ -1007,9 +994,6 @@ async function collectPrismaSetupContext(input, options = {}) {
1007
994
  cancel("Use either --database-url or --prisma-postgres, not both.");
1008
995
  return;
1009
996
  }
1010
- const authoring = input.authoring ?? (useDefaults ? DEFAULT_AUTHORING : await promptForAuthoringStyle());
1011
- if (!authoring) return;
1012
- const schemaPreset = input.schemaPreset ?? options.defaultSchemaPreset ?? DEFAULT_SCHEMA_PRESET$1;
1013
997
  const detectedPackageManager = await detectPackageManager(projectDir);
1014
998
  const packageManager = input.packageManager ?? (useDefaults ? detectedPackageManager : await promptForPackageManager(detectedPackageManager));
1015
999
  if (!packageManager) return;
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { a as DatabaseProviderSchema, c as SchemaPresetSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as DatabaseUrlSchema, r as CreateCommandInputSchema, s as PackageManagerSchema, t as runCreateCommand } from "./create-C-bVmrxB.mjs";
2
+ import { a as DatabaseProviderSchema, c as SchemaPresetSchema, i as CreateTemplateSchema, n as AuthoringStyleSchema, o as DatabaseUrlSchema, r as CreateCommandInputSchema, s as PackageManagerSchema, t as runCreateCommand } from "./create-BiY_Ivsa.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.81.1";
7
+ const CLI_VERSION = "0.4.2-pr.37.78.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.81.1",
3
+ "version": "0.4.2-pr.37.78.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",