@prisma/composer-prisma-cloud 0.26.0 → 0.27.0-dev.2
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 +9510 -2309
- package/dist/auth/testing.mjs.map +1 -1
- package/dist/buckets-main.mjs +1 -1
- package/dist/buckets-main.mjs.map +1 -1
- package/dist/{secret-C__qAfZr-CUc_Mgbg.mjs → casts-DpaahrlC-Ykus3kCE.mjs} +42 -2
- package/dist/casts-DpaahrlC-Ykus3kCE.mjs.map +1 -0
- package/dist/compute-main.mjs +1 -1
- package/dist/compute-main.mjs.map +1 -1
- package/dist/control.mjs +23 -7
- package/dist/control.mjs.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/local-target.d.mts +7 -1
- package/dist/local-target.d.mts.map +1 -1
- package/dist/local-target.mjs +108 -10
- package/dist/local-target.mjs.map +1 -1
- package/dist/postgres-main.mjs +1 -1
- package/dist/postgres-main.mjs.map +1 -1
- package/dist/{provisioned-edges-CPrUiJ1K-DKbfx776.mjs → provisioned-edges-CPrUiJ1K--R7PIGoz.mjs} +2 -2
- package/dist/{provisioned-edges-CPrUiJ1K-DKbfx776.mjs.map → provisioned-edges-CPrUiJ1K--R7PIGoz.mjs.map} +1 -1
- package/dist/{s3-credentials-resource-CySVP49N-BQLhUtvi.mjs → s3-credentials-resource-CySVP49N-B91rwV42.mjs} +5 -5
- package/dist/s3-credentials-resource-CySVP49N-B91rwV42.mjs.map +1 -0
- package/dist/{segments-D-anjQ84-BNgikNpo.mjs → segments-DRPHe3kK-BNgikNpo.mjs} +1 -1
- package/dist/{segments-D-anjQ84-BNgikNpo.mjs.map → segments-DRPHe3kK-BNgikNpo.mjs.map} +1 -1
- package/dist/{serializer-CE3hLPYz-BnSjO4w7.mjs → serializer-CE3hLPYz-DfUFvkm9.mjs} +2 -42
- package/dist/serializer-CE3hLPYz-DfUFvkm9.mjs.map +1 -0
- package/dist/testing.mjs +1 -1
- package/package.json +18 -18
- package/dist/s3-credentials-resource-CySVP49N-BQLhUtvi.mjs.map +0 -1
- package/dist/secret-C__qAfZr-CUc_Mgbg.mjs.map +0 -1
- package/dist/serializer-CE3hLPYz-BnSjO4w7.mjs.map +0 -1
package/dist/control.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as
|
|
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-
|
|
3
|
-
import { a as provisionedEdges, n as SELF_ORIGIN, r as STREAMS_API_KEY, t as RESERVED_PROVIDER_PARAMS } from "./provisioned-edges-CPrUiJ1K
|
|
1
|
+
import { c as paramBindingFor, l as paramName } from "./casts-DpaahrlC-Ykus3kCE.mjs";
|
|
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
|
+
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 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-CySVP49N-
|
|
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-CySVP49N-B91rwV42.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";
|
|
@@ -1855,10 +1855,18 @@ async function runPreflight(input, deps) {
|
|
|
1855
1855
|
const collected = collectPreflightNames(input.graph);
|
|
1856
1856
|
const names = /* @__PURE__ */ new Map();
|
|
1857
1857
|
for (const meta of [...collected.secrets, ...collected.envParams]) if (!names.has(meta.name)) names.set(meta.name, meta);
|
|
1858
|
-
if (names.size === 0)
|
|
1858
|
+
if (names.size === 0) {
|
|
1859
|
+
input.report?.({
|
|
1860
|
+
checked: 0,
|
|
1861
|
+
filled: 0,
|
|
1862
|
+
missing: 0
|
|
1863
|
+
});
|
|
1864
|
+
return /* @__PURE__ */ new Map();
|
|
1865
|
+
}
|
|
1859
1866
|
const client = input.credentials?.client ?? deps?.client ?? await managementClient();
|
|
1860
1867
|
const missing = [];
|
|
1861
1868
|
const updatedAt = /* @__PURE__ */ new Map();
|
|
1869
|
+
let filled = 0;
|
|
1862
1870
|
for (const meta of names.values()) {
|
|
1863
1871
|
const platform = await readPlatformVariable(client, projectId, branchId, meta.name);
|
|
1864
1872
|
if (platform.exists) {
|
|
@@ -1867,12 +1875,20 @@ async function runPreflight(input, deps) {
|
|
|
1867
1875
|
}
|
|
1868
1876
|
const shellValue = process.env[meta.name];
|
|
1869
1877
|
if (shellValue !== void 0 && shellValue.length > 0) {
|
|
1870
|
-
const
|
|
1871
|
-
if (
|
|
1878
|
+
const filledAt = await fillMissing(client, projectId, branchId, meta.name, shellValue);
|
|
1879
|
+
if (filledAt !== void 0) {
|
|
1880
|
+
updatedAt.set(meta.name, filledAt);
|
|
1881
|
+
filled += 1;
|
|
1882
|
+
}
|
|
1872
1883
|
continue;
|
|
1873
1884
|
}
|
|
1874
1885
|
missing.push(meta);
|
|
1875
1886
|
}
|
|
1887
|
+
input.report?.({
|
|
1888
|
+
checked: names.size,
|
|
1889
|
+
filled,
|
|
1890
|
+
missing: missing.length
|
|
1891
|
+
});
|
|
1876
1892
|
if (missing.length > 0) throw missingError(missing, projectId, branchId, input.stage);
|
|
1877
1893
|
return updatedAt;
|
|
1878
1894
|
}
|