@prisma/composer-prisma-cloud 0.17.0-dev.3 → 0.17.0-dev.5

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/control.mjs CHANGED
@@ -2,7 +2,7 @@ import { o as paramBindingFor, s as paramName } from "./secret-Dgyg1WyG-Dzz95fGI
2
2
  import { a as encode, c as paramEntries, d as serializeInput, n as configKey, o as encodeParamPointer, r as decodeParamPointer, s as isParamPointerRow } from "./serializer-DTCrRl7S-CN0q1ZFB.mjs";
3
3
  import { a as provisionedEdges, n as SELF_ORIGIN, r as STREAMS_API_KEY, t as RESERVED_PROVIDER_PARAMS } from "./provisioned-edges-DKsBi7uK-BmsYKWZI.mjs";
4
4
  import { n as requiredPackHeadOf } from "./required-pack-head-CMMJ2LaU-CfWu5JMj.mjs";
5
- import { A as collectPages, C as appAfterEnvironment, D as RESERVED_DATABASE_URL_KEYS, E as PrismaApiError, F as fromEnv, I as managementApiBaseUrl, M as layer, N as resolveDefaultBranchId, O as call, P as PrismaCredentials, S as ServiceKeyProvider, T as ManagementClient, _ as resolveTargetRef, a as PRISMA_CLOUD_EXTENSION_ID, b as providers, d as collectPreflightNames, f as containerDescriptor, g as resolveOrmConfig, h as prismaCloudContainerOf, i as OrmMigrationProvider, j as drivePagesAsync, k as claimDatabaseUrlKeys, l as S3Credentials, m as packHeadRefHashes, n as GeneratedParamProvider, o as PgWarm, r as OrmMigration, s as PgWarmProvider, t as GeneratedParam, u as S3CredentialsProvider, w as isWithin, x as ServiceKey } from "./s3-credentials-resource-CDab6Xhp-DhYo1-tR.mjs";
5
+ import { A as claimDatabaseUrlKeys, C as ServiceKeyProvider, D as PrismaApiError, E as ManagementClient, F as PrismaCredentials, I as fromEnv, L as managementApiBaseUrl, M as drivePagesAsync, N as layer, O as RESERVED_DATABASE_URL_KEYS, P as resolveDefaultBranchId, S as ServiceKey, T as isWithin, _ as resolveTargetRef, a as PRISMA_CLOUD_EXTENSION_ID, d as collectPreflightNames, f as containerDescriptor, g as resolveOrmConfig, h as prismaCloudContainerOf, i as OrmMigrationProvider, j as collectPages, k as call, l as S3Credentials, m as packHeadRefHashes, n as GeneratedParamProvider, o as PgWarm, r as OrmMigration, s as PgWarmProvider, t as GeneratedParam, u as S3CredentialsProvider, v as targetStorageHash, w as appAfterEnvironment, x as providers } from "./s3-credentials-resource-CLB5qGGZ-BA7MT-Tb.mjs";
6
6
  import { r as isPostgresResourceNode } from "./orm-postgres-ChW2Ewj7-Dnas0G3L.mjs";
7
7
  import { isParamSource } from "@prisma/composer";
8
8
  import { blindCast } from "@prisma/composer/casts";
@@ -1910,14 +1910,15 @@ function postgresDescriptor(o) {
1910
1910
  });
1911
1911
  if (!isPostgresResourceNode(node)) throw new Error(`postgres lowering received a non-postgres node (${id}).`);
1912
1912
  const contractJson = node.provides.__cmp.contractJson;
1913
+ const currentContractHash = targetStorageHash(contractJson);
1913
1914
  const { migrationsDir, extensionPacks } = yield* Effect.promise(() => resolveOrmConfig(node.config));
1914
1915
  const ref = yield* Effect.promise(() => resolveTargetRef(migrationsDir, contractJson, node.targetRef));
1915
1916
  yield* Effect.promise(() => runPackPreflight(graph));
1916
1917
  const warm = yield* PgWarm(`${id}-warm`, { url });
1917
1918
  yield* OrmMigration(`${id}-migrate`, {
1918
1919
  url: warm.url,
1919
- contractJson,
1920
1920
  migrationsDir,
1921
+ currentContractHash,
1921
1922
  targetHash: ref.hash,
1922
1923
  invariants: [...ref.invariants].sort(),
1923
1924
  packHeadRefHashes: packHeadRefHashes(extensionPacks),