@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.
- package/dist/auth/pack.mjs +1 -1
- package/dist/auth/pack.mjs.map +1 -1
- package/dist/auth/testing.mjs +1 -1
- package/dist/auth/testing.mjs.map +1 -1
- package/dist/control.mjs +1 -1
- package/dist/control.mjs.map +1 -1
- package/dist/local-target.mjs +15 -20
- package/dist/local-target.mjs.map +1 -1
- package/dist/postgres-main.mjs +5 -4
- package/dist/postgres-main.mjs.map +1 -1
- package/dist/{s3-credentials-resource-CLB5qGGZ-BmJk3di4.mjs → s3-credentials-resource-CLB5qGGZ-xfBgEp66.mjs} +4 -4
- package/dist/{s3-credentials-resource-CLB5qGGZ-BmJk3di4.mjs.map → s3-credentials-resource-CLB5qGGZ-xfBgEp66.mjs.map} +1 -1
- package/package.json +19 -18
package/dist/local-target.mjs
CHANGED
|
@@ -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-
|
|
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(
|
|
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
|
-
*
|
|
5993
|
-
* `@prisma/
|
|
5994
|
-
*
|
|
5995
|
-
*
|
|
5996
|
-
*
|
|
5997
|
-
*
|
|
5998
|
-
*
|
|
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(
|
|
6002
|
-
const appRequire = createRequire(path$1.join(cwd, "package.json"));
|
|
6000
|
+
function resolvePrismaDevModulePath() {
|
|
6003
6001
|
try {
|
|
6004
|
-
return
|
|
6005
|
-
} catch {
|
|
6006
|
-
|
|
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(
|
|
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 {
|