@prisma/composer-prisma-cloud 0.20.0-dev.7 → 0.20.0-dev.8

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.
@@ -1,4 +1,4 @@
1
- import { C as ServiceKeyProvider, T as isWithin, b as Providers, c as PrismaCloudContainer, d as collectPreflightNames, h as prismaCloudContainerOf, i as OrmMigrationProvider, n as GeneratedParamProvider, p as deserialize, s as PgWarmProvider, u as S3CredentialsProvider, y as mintKeyPair } from "./s3-credentials-resource-CLB5qGGZ-BmJk3di4.mjs";
1
+ import { C as ServiceKeyProvider, T as isWithin, b as Providers, c as PrismaCloudContainer, d as collectPreflightNames, h as prismaCloudContainerOf, i as OrmMigrationProvider, n as GeneratedParamProvider, p as deserialize, s as PgWarmProvider, u as S3CredentialsProvider, y as mintKeyPair } from "./s3-credentials-resource-CLB5qGGZ-xfBgEp66.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import { blindCast } from "@prisma/composer/casts";
4
4
  import * as Effect from "effect/Effect";
@@ -5985,28 +5985,23 @@ function databaseIdOfInput(value) {
5985
5985
  if (typeof value === "string") return value;
5986
5986
  if (Predicate.isObject(value) && typeof value["databaseId"] === "string") return value["databaseId"];
5987
5987
  }
5988
- function noPrismaDevError() {
5989
- return /* @__PURE__ */ new Error("local dev needs @prisma/dev for its local Postgres emulator — add \"@prisma/dev\" to the devDependencies of the project where you run Composer.");
5988
+ function noPrismaDevError(cause) {
5989
+ return /* @__PURE__ */ new Error(`local dev needs @prisma/dev for its local Postgres emulator — @prisma/composer-prisma-cloud declares it as a dependency, but it did not resolve from Composer's own installation; reinstall your dependencies. (${cause instanceof Error ? cause.message : String(cause)})`);
5990
5990
  }
5991
5991
  /**
5992
- * Two-step resolution, pinned (local-dev spec § 4): (1) resolve
5993
- * `@prisma/dev` directly from the app's own `node_modules`; (2) on failure,
5994
- * resolve `prisma/package.json` and check that installation for `@prisma/dev`
5995
- * (older CLI releases carry it; Prisma 8 does not). The daemon imports the
5996
- * returned path dynamically, so the app owns its local Postgres runtime.
5997
- * `cwd` is the one place a local provider legitimately
5998
- * reads `process.cwd()` — finding the app's own installed version is
5999
- * inherently cwd-relative.
5992
+ * Composer owns the local Postgres emulator's version: `@prisma/dev` is a
5993
+ * dependency of `@prisma/composer-prisma-cloud` and is resolved from
5994
+ * Composer's own package, never from the app. The app's copy (if any) is
5995
+ * ignored on purpose — an old `@prisma/dev` pulled in transitively (alchemy
5996
+ * pins `^0.20.0`, whose pglite-socket crashes on any message over 64 KiB)
5997
+ * would otherwise silently replace the version Composer tested against.
5998
+ * The daemon imports the returned path dynamically.
6000
5999
  */
6001
- function resolvePrismaDevModulePath(cwd) {
6002
- const appRequire = createRequire(path$1.join(cwd, "package.json"));
6000
+ function resolvePrismaDevModulePath() {
6003
6001
  try {
6004
- return appRequire.resolve("@prisma/dev");
6005
- } catch {}
6006
- try {
6007
- return createRequire(appRequire.resolve("prisma/package.json")).resolve("@prisma/dev");
6008
- } catch {
6009
- throw noPrismaDevError();
6002
+ return createRequire(import.meta.url).resolve("@prisma/dev");
6003
+ } catch (cause) {
6004
+ throw noPrismaDevError(cause);
6010
6005
  }
6011
6006
  }
6012
6007
  /**
@@ -6020,7 +6015,7 @@ function LocalDatabaseProvider(input) {
6020
6015
  try: async () => {
6021
6016
  const app = appNameOf(input.container);
6022
6017
  const name = news.name ?? id;
6023
- const prismaDevModulePath = resolvePrismaDevModulePath(process.cwd());
6018
+ const prismaDevModulePath = resolvePrismaDevModulePath();
6024
6019
  const { url } = await postgresClient().ensureDatabase(app, slug(name), prismaDevModulePath);
6025
6020
  const direct = Redacted.make(url);
6026
6021
  return {