create-prisma 0.13.4-pr.120.390.1 → 0.13.4

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 { a as ApplicationLayer } from "./json-output-B-u5ximm.mjs";
2
+ import { a as ApplicationLayer } from "./json-output-XQcNl0Dz.mjs";
3
3
  import { runCreatePrismaCli } from "./index.mjs";
4
4
  import { Effect } from "effect";
5
5
  import { NodeRuntime } from "@effect/platform-node-shared";
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { _ as authoringStyles, b as normalizeDatabaseProvider, c as CreateCommandResultSchema, d as AuthoringStyleSchema, f as CreateCommandInputSchema, g as agentSkillTargets, h as PackageManagerSchema, i as getErrorMessage, l as createCommandFailureResult, m as DatabaseProviderSchema, n as writeJsonResult, o as applicationRuntime, p as CreateTemplateSchema, r as runCreateCommandEffect, s as CREATE_PRISMA_RESULT_SCHEMA_VERSION, t as isJsonOutputRequested, u as AgentSkillTargetSchema, v as createTemplates, x as packageManagers, y as databaseProviderInputs } from "./json-output-B-u5ximm.mjs";
2
+ import { _ as authoringStyles, b as normalizeDatabaseProvider, c as CreateCommandResultSchema, d as AuthoringStyleSchema, f as CreateCommandInputSchema, g as agentSkillTargets, h as PackageManagerSchema, i as getErrorMessage, l as createCommandFailureResult, m as DatabaseProviderSchema, n as writeJsonResult, o as applicationRuntime, p as CreateTemplateSchema, r as runCreateCommandEffect, s as CREATE_PRISMA_RESULT_SCHEMA_VERSION, t as isJsonOutputRequested, u as AgentSkillTargetSchema, v as createTemplates, x as packageManagers, y as databaseProviderInputs } from "./json-output-XQcNl0Dz.mjs";
3
3
  import { Console, Effect, Option } from "effect";
4
4
  import { Argument, CliError, Command, Flag } from "effect/unstable/cli";
5
5
 
6
6
  //#region src/index.ts
7
- const CLI_VERSION = "0.13.4-pr.120.390.1";
7
+ const CLI_VERSION = "0.13.4";
8
8
  const optionalArgument = (name, description) => Argument.string(name).pipe(Argument.withDescription(description), Argument.optional, Argument.map(Option.getOrUndefined));
9
9
  const optionalBoolean = (name, description) => Flag.boolean(name).pipe(Flag.withDescription(description), Flag.optional, Flag.map(Option.getOrUndefined));
10
10
  const optionalString = (name, description) => Flag.string(name).pipe(Flag.withDescription(description), Flag.optional, Flag.map(Option.getOrUndefined));
@@ -450,14 +450,20 @@ function getPackageManagerErrorCode(command, output) {
450
450
 
451
451
  //#endregion
452
452
  //#region src/telemetry/client.ts
453
- const TELEMETRY_API_KEY = "";
453
+ const TELEMETRY_API_KEY = "phc_cmc85avbWyuJ2JyKdGPdv7dxXli8xLdWDBPbvIXWJfs";
454
454
  const TELEMETRY_HOST = "https://us.i.posthog.com";
455
455
  const TELEMETRY_CONFIG_FILE = "telemetry.json";
456
456
  const TELEMETRY_TIMEOUT_MS = 2e3;
457
457
  const AnonymousId = Schema.String.check(Schema.isUUID(4));
458
458
  const decodeAnonymousId = Schema.decodeUnknownExit(AnonymousId);
459
+ const isTruthyEnvValue = (value) => [
460
+ "1",
461
+ "true",
462
+ "yes",
463
+ "on"
464
+ ].includes(String(value ?? "").trim().toLowerCase());
459
465
  function shouldDisableTelemetry() {
460
- return true;
466
+ return isTruthyEnvValue(process.env.CI) || isTruthyEnvValue(process.env.GITHUB_ACTIONS) || process.env.CREATE_PRISMA_DISABLE_TELEMETRY !== void 0 || process.env.CREATE_PRISMA_TELEMETRY_DISABLED !== void 0 || process.env.DO_NOT_TRACK !== void 0;
461
467
  }
462
468
  function getTelemetryConfigDir() {
463
469
  if (process.platform === "darwin") return path.join(os.homedir(), "Library", "Application Support", "create-prisma");
@@ -480,7 +486,7 @@ const getAnonymousIdEffect = Effect.fn("Telemetry.getAnonymousId")(function* ()
480
486
  return anonymousId;
481
487
  });
482
488
  const getCommonProperties = () => ({
483
- "cli-version": "0.13.4-pr.120.390.1",
489
+ "cli-version": "0.13.4",
484
490
  "node-version": process.version,
485
491
  platform: process.platform,
486
492
  arch: process.arch
@@ -638,15 +644,6 @@ const dependencyVersionMap = {
638
644
  tsx: "^4.21.0",
639
645
  typescript: "^5.9.3"
640
646
  };
641
- const effectPackages = [
642
- "effect",
643
- "@effect/platform-bun",
644
- "@effect/platform-node",
645
- "@effect/platform-node-shared",
646
- "@effect/sql-d1",
647
- "@effect/sql-sqlite-do",
648
- "@effect/vitest"
649
- ];
650
647
  const PRISMA_PLATFORM_CLI_PACKAGE = `prisma@${dependencyVersionMap.prisma}`;
651
648
  const PRISMA_DENO_CLI_PACKAGE = PRISMA_PLATFORM_CLI_PACKAGE;
652
649
  function getDependencyVersion(packageName) {
@@ -1245,15 +1242,6 @@ const addPackageDependencyEffect = Effect.fn("Dependencies.add")(function* (opts
1245
1242
  packageJson.scripts = sortRecord(packageJson.scripts);
1246
1243
  yield* writePackageJson(packageJsonPath, packageJson);
1247
1244
  });
1248
- const resolveAlchemyMongoPeerForNpm = Effect.fn("Dependencies.resolveAlchemyMongoPeerForNpm")(function* (projectDir) {
1249
- const packageJsonPath = path.join(projectDir, "package.json");
1250
- const packageJson = yield* readPackageJson(packageJsonPath);
1251
- packageJson.overrides = {
1252
- ...packageJson.overrides,
1253
- alchemy: { mongodb: dependencyVersionMap.mongodb }
1254
- };
1255
- yield* writePackageJson(packageJsonPath, packageJson);
1256
- });
1257
1245
  const writePrismaDependenciesEffect = Effect.fn("Dependencies.writePrisma")(function* (provider, packageManager, _authoring, projectDir = process.cwd(), options = {}) {
1258
1246
  const databaseDependencies = [getDbPackages(provider)];
1259
1247
  const devDependencies = ["@types/node", "prisma"];
@@ -1274,7 +1262,6 @@ const writePrismaDependenciesEffect = Effect.fn("Dependencies.writePrisma")(func
1274
1262
  dependencies: databaseDependencies,
1275
1263
  projectDir: path.join(projectDir, "packages/database")
1276
1264
  });
1277
- if (provider === "mongo" && packageManager === "npm") yield* resolveAlchemyMongoPeerForNpm(projectDir);
1278
1265
  });
1279
1266
  const writeCreateTemplateDependenciesEffect = Effect.fn("Dependencies.writeTemplate")(function* (opts) {
1280
1267
  const projectDir = opts.projectDir ?? process.cwd();
@@ -1290,14 +1277,13 @@ const writeCreateTemplateDependenciesEffect = Effect.fn("Dependencies.writeTempl
1290
1277
  const packageJson = yield* readPackageJson(packageJsonPath);
1291
1278
  const effectVersion = getDependencyVersion("effect");
1292
1279
  if (!effectVersion) return yield* Effect.fail(/* @__PURE__ */ new Error("Dependency effect is missing from the version map."));
1293
- const effectPins = Object.fromEntries(effectPackages.map((name) => [name, effectVersion]));
1294
1280
  if (opts.packageManager === "yarn") packageJson.resolutions = {
1295
1281
  ...packageJson.resolutions,
1296
- ...effectPins
1282
+ effect: effectVersion
1297
1283
  };
1298
1284
  else if (opts.packageManager !== "pnpm") packageJson.overrides = {
1299
1285
  ...packageJson.overrides,
1300
- ...effectPins
1286
+ effect: effectVersion
1301
1287
  };
1302
1288
  yield* writePackageJson(packageJsonPath, packageJson);
1303
1289
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma",
3
- "version": "0.13.4-pr.120.390.1",
3
+ "version": "0.13.4",
4
4
  "private": false,
5
5
  "description": "Create Prisma 8 projects with first-party templates and great DX.",
6
6
  "homepage": "https://github.com/prisma/create-prisma",
@@ -18,15 +18,4 @@ minimumReleaseAgeExclude:
18
18
  - "@prisma/*"
19
19
  overrides:
20
20
  effect: "4.0.0-rc.115"
21
- "@effect/platform-bun": "4.0.0-rc.115"
22
- "@effect/platform-node": "4.0.0-rc.115"
23
- "@effect/platform-node-shared": "4.0.0-rc.115"
24
- "@effect/sql-d1": "4.0.0-rc.115"
25
- "@effect/sql-sqlite-do": "4.0.0-rc.115"
26
- "@effect/vitest": "4.0.0-rc.115"
27
- {{#if (eq provider "mongo")}}
28
- peerDependencyRules:
29
- allowedVersions:
30
- "alchemy>mongodb": "7"
31
- {{/if}}
32
21
  {{/if}}