@prisma/composer-prisma-cloud 0.30.0-dev.6 → 0.30.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 +33 -12
- package/dist/control.mjs.map +1 -1
- package/dist/local-target.mjs +1 -1
- package/dist/{s3-credentials-resource-D4jcpAZp-X6h7aZcG.mjs → s3-credentials-resource-D4jcpAZp-BX2VnLue.mjs} +4 -4
- package/dist/{s3-credentials-resource-D4jcpAZp-X6h7aZcG.mjs.map → s3-credentials-resource-D4jcpAZp-BX2VnLue.mjs.map} +1 -1
- package/package.json +18 -18
package/dist/control.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { c as paramBindingFor, l as paramName } from "./casts-DpaahrlC-Ykus3kCE.
|
|
|
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-CE3hLPYz-DfUFvkm9.mjs";
|
|
3
3
|
import { a as provisionedEdges, n as SELF_ORIGIN, r as STREAMS_API_KEY, t as RESERVED_PROVIDER_PARAMS } from "./provisioned-edges-CPrUiJ1K--R7PIGoz.mjs";
|
|
4
4
|
import { n as requiredPackHeadOf } from "./required-pack-head-CMMJ2LaU-CfWu5JMj.mjs";
|
|
5
|
-
import { A as PrismaApiError, B as managementApiBaseUrl, D as appAfterEnvironment, E as ServiceKeyProvider, F as drivePagesAsync, I as layer, L as resolveDefaultBranchId, M as call, N as claimDatabaseUrlKeys, O as isWithin, P as collectPages, R as PrismaCredentials, T as ServiceKey, _ as resolveOrmConfig, a as OrmMigrationProvider, b as serviceAppName, c as PgWarmProvider, d as S3CredentialsProvider, f as collectPreflightNames, g as prismaCloudContainerOf, h as packHeadRefHashes, i as OrmMigration, j as RESERVED_DATABASE_URL_KEYS, k as ManagementClient, n as GeneratedParamProvider, o as PRISMA_CLOUD_EXTENSION_ID, p as containerDescriptor, s as PgWarm, t as GeneratedParam, u as S3Credentials, v as resolveTargetRef, w as providers, x as targetStorageHash, y as resourceName, z as fromEnv } from "./s3-credentials-resource-D4jcpAZp-
|
|
5
|
+
import { A as PrismaApiError, B as managementApiBaseUrl, D as appAfterEnvironment, E as ServiceKeyProvider, F as drivePagesAsync, I as layer, L as resolveDefaultBranchId, M as call, N as claimDatabaseUrlKeys, O as isWithin, P as collectPages, R as PrismaCredentials, T as ServiceKey, _ as resolveOrmConfig, a as OrmMigrationProvider, b as serviceAppName, c as PgWarmProvider, d as S3CredentialsProvider, f as collectPreflightNames, g as prismaCloudContainerOf, h as packHeadRefHashes, i as OrmMigration, j as RESERVED_DATABASE_URL_KEYS, k as ManagementClient, n as GeneratedParamProvider, o as PRISMA_CLOUD_EXTENSION_ID, p as containerDescriptor, s as PgWarm, t as GeneratedParam, u as S3Credentials, v as resolveTargetRef, w as providers, x as targetStorageHash, y as resourceName, z as fromEnv } from "./s3-credentials-resource-D4jcpAZp-BX2VnLue.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";
|
|
@@ -1068,7 +1068,29 @@ const stateLayerAgainst = (apiOrigin, ids) => {
|
|
|
1068
1068
|
*/
|
|
1069
1069
|
/** The producer out-ports whose edges are request/response communication (@prisma/composer/service-rpc's contract kind). */
|
|
1070
1070
|
const REQUEST_RESPONSE_CONTRACT_KINDS = /* @__PURE__ */ new Set(["rpc"]);
|
|
1071
|
-
|
|
1071
|
+
/** A map keyed by a port endpoint's node, direction and name. */
|
|
1072
|
+
var EndpointMap = class {
|
|
1073
|
+
#byNode = /* @__PURE__ */ new Map();
|
|
1074
|
+
set(endpoint, value) {
|
|
1075
|
+
let byDirection = this.#byNode.get(endpoint.node);
|
|
1076
|
+
if (byDirection === void 0) {
|
|
1077
|
+
byDirection = /* @__PURE__ */ new Map();
|
|
1078
|
+
this.#byNode.set(endpoint.node, byDirection);
|
|
1079
|
+
}
|
|
1080
|
+
let byName = byDirection.get(endpoint.direction);
|
|
1081
|
+
if (byName === void 0) {
|
|
1082
|
+
byName = /* @__PURE__ */ new Map();
|
|
1083
|
+
byDirection.set(endpoint.direction, byName);
|
|
1084
|
+
}
|
|
1085
|
+
byName.set(endpoint.name, value);
|
|
1086
|
+
}
|
|
1087
|
+
get(endpoint) {
|
|
1088
|
+
return this.#byNode.get(endpoint.node)?.get(endpoint.direction)?.get(endpoint.name);
|
|
1089
|
+
}
|
|
1090
|
+
has(endpoint) {
|
|
1091
|
+
return this.#byNode.get(endpoint.node)?.get(endpoint.direction)?.has(endpoint.name) ?? false;
|
|
1092
|
+
}
|
|
1093
|
+
};
|
|
1072
1094
|
const endpointBody = (endpoint) => ({
|
|
1073
1095
|
logicalId: endpoint.node,
|
|
1074
1096
|
direction: endpoint.direction,
|
|
@@ -1104,18 +1126,17 @@ function composeApplicationTopology(graph) {
|
|
|
1104
1126
|
name: port.name,
|
|
1105
1127
|
...port.contractKind !== void 0 ? { contractKind: port.contractKind } : {}
|
|
1106
1128
|
}));
|
|
1107
|
-
const incoming =
|
|
1108
|
-
for (const edge of graph.authoredEdges) incoming.set(
|
|
1109
|
-
const contractKindByPort =
|
|
1110
|
-
for (const port of graph.ports) contractKindByPort.set(
|
|
1129
|
+
const incoming = new EndpointMap();
|
|
1130
|
+
for (const edge of graph.authoredEdges) incoming.set(edge.to, edge);
|
|
1131
|
+
const contractKindByPort = new EndpointMap();
|
|
1132
|
+
for (const port of graph.ports) contractKindByPort.set(port, port.contractKind);
|
|
1111
1133
|
const resolveProducer = (from) => {
|
|
1112
1134
|
let current = from;
|
|
1113
|
-
const seen =
|
|
1135
|
+
const seen = new EndpointMap();
|
|
1114
1136
|
while (kinds.get(current.node) === "module") {
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
const feeding = incoming.get(key);
|
|
1137
|
+
if (seen.has(current)) return void 0;
|
|
1138
|
+
seen.set(current, true);
|
|
1139
|
+
const feeding = incoming.get(current);
|
|
1119
1140
|
if (feeding === void 0) return void 0;
|
|
1120
1141
|
current = feeding.from;
|
|
1121
1142
|
}
|
|
@@ -1126,7 +1147,7 @@ function composeApplicationTopology(graph) {
|
|
|
1126
1147
|
ports,
|
|
1127
1148
|
edges: graph.authoredEdges.map((edge) => {
|
|
1128
1149
|
const producer = resolveProducer(edge.from);
|
|
1129
|
-
const producerContractKind = producer === void 0 ? void 0 : contractKindByPort.get(
|
|
1150
|
+
const producerContractKind = producer === void 0 ? void 0 : contractKindByPort.get(producer);
|
|
1130
1151
|
const style = producerContractKind !== void 0 && REQUEST_RESPONSE_CONTRACT_KINDS.has(producerContractKind) ? "request-response" : void 0;
|
|
1131
1152
|
return {
|
|
1132
1153
|
from: endpointBody(edge.from),
|