@prisma/composer-prisma-cloud 0.6.0-dev.10 → 0.6.0-dev.11
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 +1 -1
- package/dist/local-target.mjs.map +1 -1
- package/dist/{s3-credentials-resource-BMsm9nho-Cpc28adr.mjs → s3-credentials-resource-DOjmcHZh-D4jQK_9K.mjs} +10 -5
- package/dist/{s3-credentials-resource-BMsm9nho-Cpc28adr.mjs.map → s3-credentials-resource-DOjmcHZh-D4jQK_9K.mjs.map} +1 -1
- package/package.json +18 -18
|
@@ -849,7 +849,7 @@ function mintKeyPair() {
|
|
|
849
849
|
};
|
|
850
850
|
}
|
|
851
851
|
//#endregion
|
|
852
|
-
//#region ../../1-prisma-cloud/1-extensions/target/dist/s3-credentials-resource-
|
|
852
|
+
//#region ../../1-prisma-cloud/1-extensions/target/dist/s3-credentials-resource-DOjmcHZh.mjs
|
|
853
853
|
const PRISMA_CLOUD_EXTENSION_ID = "@prisma/composer-prisma-cloud";
|
|
854
854
|
/** Accepts exactly what Alchemy's own `--stage` validation accepts (pinned 2.0.0-beta.59, `Cli/commands/_shared.ts`), rewritten without overlapping quantifiers so it cannot backtrack catastrophically. Asserted before a Branch id is exposed as a stage. */
|
|
855
855
|
const ALCHEMY_STAGE_PATTERN = /^[a-z0-9][-_a-z0-9]*$/i;
|
|
@@ -1090,17 +1090,22 @@ const GeneratedParamProvider = () => Provider.effect(GeneratedParam, Effect.succ
|
|
|
1090
1090
|
*/
|
|
1091
1091
|
/** The `PgWarm` resource constructor — `yield* PgWarm(id, { url })` in a lowering. */
|
|
1092
1092
|
const PgWarm = Resource("PrismaCloud.PgWarm");
|
|
1093
|
-
/**
|
|
1094
|
-
|
|
1093
|
+
/**
|
|
1094
|
+
* Connect (retrying the cold-start) and run `select 1`, then release the
|
|
1095
|
+
* connection. Exported so tests can drive it directly; `retry` overrides the
|
|
1096
|
+
* bounded retry's defaults.
|
|
1097
|
+
*/
|
|
1098
|
+
async function warmDatabase(url, retry = {}) {
|
|
1095
1099
|
await withConnectionRetry(async () => {
|
|
1096
1100
|
const client = new pg.Client({ connectionString: normalizeSslMode(url) });
|
|
1101
|
+
client.on("error", (error) => console.error("pg warm client socket error", error));
|
|
1097
1102
|
await client.connect();
|
|
1098
1103
|
try {
|
|
1099
1104
|
await client.query("select 1");
|
|
1100
1105
|
} finally {
|
|
1101
1106
|
await client.end();
|
|
1102
1107
|
}
|
|
1103
|
-
});
|
|
1108
|
+
}, retry);
|
|
1104
1109
|
}
|
|
1105
1110
|
/**
|
|
1106
1111
|
* The `PgWarm` provider service. `reconcile` warms the DB (retrying the
|
|
@@ -1453,4 +1458,4 @@ const S3CredentialsProvider = () => Provider.effect(S3Credentials, Effect.succee
|
|
|
1453
1458
|
//#endregion
|
|
1454
1459
|
export { packageComputeArtifact as A, call as B, Project as C, EnvironmentVariable as D, Deployment as E, resolveDefaultBranchId as F, layer as H, MANAGEMENT_API_ORIGIN as I, ManagementClient as L, BucketKey as M, collectPages as N, ServiceKey as O, drivePagesAsync as P, PrismaApiError as R, Database as S, ComputeService as T, fromEnv as V, resolveTargetRef as _, PgWarmProvider as a, providers as b, PrismaCloudContainer as c, collectPreflightNames as d, containerDescriptor as f, resolvePrismaNextConfig as g, prismaCloudContainerOf as h, PgWarm as i, Bucket as j, ServiceKeyProvider as k, S3Credentials as l, packHeadRefHashes as m, GeneratedParamProvider as n, PnMigration as o, deserialize as p, PRISMA_CLOUD_EXTENSION_ID as r, PnMigrationProvider as s, GeneratedParam as t, S3CredentialsProvider as u, mintKeyPair as v, COMPUTE_REGIONS as w, Connection as x, Providers as y, PrismaCredentials as z };
|
|
1455
1460
|
|
|
1456
|
-
//# sourceMappingURL=s3-credentials-resource-
|
|
1461
|
+
//# sourceMappingURL=s3-credentials-resource-DOjmcHZh-D4jQK_9K.mjs.map
|