@prisma/composer-prisma-cloud 0.21.0-dev.2 → 0.21.0-dev.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/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 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-C8gbgTdB.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-CIMtcFo5.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";
@@ -1362,28 +1362,25 @@ async function beginSession(input, options) {
1362
1362
  return session(api, topologyApi, buildId, submission, options.refsOf, warn);
1363
1363
  }
1364
1364
  /**
1365
- * The app this run deployed and where it can be reached — but only when the
1366
- * run deployed exactly one compute service.
1365
+ * Where the deployed app can be reached — but only when the run deployed
1366
+ * exactly one compute service with a public address.
1367
1367
  *
1368
- * `Build.appId` and `Build.deployedUrl` are each one value, and an app with
1369
- * several services has no single answer. Picking the first would put an
1370
- * arbitrary service's address in the Console and quietly imply it was the
1371
- * app's. Single-service apps are the common case and get a working link;
1372
- * multi-service apps get neither, and their services are all reported through
1373
- * the resources endpoint regardless.
1368
+ * `Build.deployedUrl` is one value, and an app with several services has no
1369
+ * single answer. Picking the first would put an arbitrary service's address
1370
+ * in the Console and quietly imply it was the app's. Single-service apps are
1371
+ * the common case and get a working link; multi-service apps get none. Which
1372
+ * apps the run deployed is reported through the resources endpoint either
1373
+ * way, so nothing is lost here.
1374
1374
  *
1375
- * Both fields are fill-only, so this is safe to send on a build whose creator
1376
- * already set them to the same values, and a genuine disagreement is a 409
1377
- * the caller logs.
1375
+ * The field can be set once and never changed, so this is safe to send on a
1376
+ * build whose creator already set it to the same value, and a genuine
1377
+ * disagreement is a 409 the caller logs.
1378
1378
  */
1379
- function deployedApp(entities) {
1379
+ function deployedUrl(entities) {
1380
1380
  const services = entities.filter((entity) => entity.kind === "compute-service");
1381
1381
  const only = services.length === 1 ? services[0] : void 0;
1382
- if (only === void 0) return {};
1383
- return {
1384
- appId: only.id,
1385
- ...only.url !== void 0 ? { deployedUrl: only.url } : {}
1386
- };
1382
+ if (only?.url === void 0) return {};
1383
+ return { deployedUrl: only.url };
1387
1384
  }
1388
1385
  /**
1389
1386
  * The topology half of `attach`, shared with build-less sessions: replaces
@@ -1452,7 +1449,7 @@ function session(api, topologyApi, buildId, submission, refsOf, warn) {
1452
1449
  state: outcome.ok ? "succeeded" : outcome.cancelled ? "cancelled" : "failed",
1453
1450
  ...outcome.failingStep !== void 0 && !outcome.cancelled ? { failingStep: outcome.failingStep } : {},
1454
1451
  ...outcome.errorMessage !== void 0 && !outcome.cancelled ? { errorMessage: outcome.errorMessage } : {},
1455
- ...deployedApp(outcome.entities)
1452
+ ...deployedUrl(outcome.entities)
1456
1453
  });
1457
1454
  } catch (error) {
1458
1455
  warn(`Could not report this deploy's outcome: ${error instanceof Error ? error.message : String(error)}`);