@prisma/composer-prisma-cloud 0.2.0-dev.1 → 0.2.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.
Files changed (50) hide show
  1. package/dist/control.d.mts.map +1 -0
  2. package/dist/control.mjs +34 -20
  3. package/dist/control.mjs.map +1 -1
  4. package/dist/cron/index.d.mts.map +1 -0
  5. package/dist/cron/scheduler-entrypoint.mjs +15 -11
  6. package/dist/cron/scheduler-entrypoint.mjs.map +1 -1
  7. package/dist/email/email-entrypoint.mjs +19738 -0
  8. package/dist/email/email-entrypoint.mjs.map +1 -0
  9. package/dist/email/email-service.mjs +566 -0
  10. package/dist/email/email-service.mjs.map +1 -0
  11. package/dist/email/index.d.mts +282 -0
  12. package/dist/email/index.d.mts.map +1 -0
  13. package/dist/email/index.mjs +653 -0
  14. package/dist/email/index.mjs.map +1 -0
  15. package/dist/email/testing.d.mts +22 -0
  16. package/dist/email/testing.d.mts.map +1 -0
  17. package/dist/email/testing.mjs +1321 -0
  18. package/dist/email/testing.mjs.map +1 -0
  19. package/dist/index.d.mts.map +1 -0
  20. package/dist/{prisma-next-DlU01kXJ-2sP5mQb6.mjs → prisma-next-BvBwGCIt-CSauMX4l.mjs} +19 -3
  21. package/dist/prisma-next-BvBwGCIt-CSauMX4l.mjs.map +1 -0
  22. package/dist/prisma-next.d.mts +14 -5
  23. package/dist/prisma-next.d.mts.map +1 -0
  24. package/dist/prisma-next.mjs +1 -1
  25. package/dist/serializer-Cx5slrV4-xJfH6EWS.d.mts.map +1 -0
  26. package/dist/storage/index.d.mts.map +1 -0
  27. package/dist/storage/storage-entrypoint.mjs +19 -32
  28. package/dist/storage/storage-entrypoint.mjs.map +1 -1
  29. package/dist/storage/testing.d.mts +7 -6
  30. package/dist/storage/testing.d.mts.map +1 -0
  31. package/dist/storage/testing.mjs +4 -21
  32. package/dist/storage/testing.mjs.map +1 -1
  33. package/dist/streams/index.d.mts.map +1 -0
  34. package/dist/streams/streams-entrypoint.mjs +15 -11
  35. package/dist/streams/streams-entrypoint.mjs.map +1 -1
  36. package/dist/streams/testing.d.mts.map +1 -0
  37. package/dist/testing.d.mts.map +1 -0
  38. package/package.json +28 -20
  39. package/src/exports/control.ts +1 -0
  40. package/src/exports/cron.ts +1 -0
  41. package/src/exports/email-testing.ts +1 -0
  42. package/src/exports/email.ts +1 -0
  43. package/src/exports/index.ts +1 -0
  44. package/src/exports/prisma-next.ts +1 -0
  45. package/src/exports/storage-testing.ts +1 -0
  46. package/src/exports/storage.ts +1 -0
  47. package/src/exports/streams-testing.ts +1 -0
  48. package/src/exports/streams.ts +1 -0
  49. package/src/exports/testing.ts +1 -0
  50. package/dist/prisma-next-DlU01kXJ-2sP5mQb6.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control.d.mts","names":[],"sources":["../../../1-prisma-cloud/0-lowering/lowering/dist/compute.d.mts","../../../1-prisma-cloud/1-extensions/target/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;cAkDc;KACT,wBAAwB;;;;;;;;;;;;;;;;;;;UC/BnB,sBAAsB;;;;;;;;WAQrB,QAAQ,6BAA6B,OAAO;;;;;;;;UAQ7C;WACC,gBAAgB,OAAO;;;;;;;;;;;;UAYxB,6BAA6B;WAC5B,kBAAkB,aAAa,8BAA8B,oBAAoB,OAAO;;;;;cAKrF,mBAAmB;UACvB;;EAER;;EAEA,SAAS;;;;;;;;KAQN,qBAAqB,KAAK,0BAA0B,KAAK;;;;;;;;;;iBAU7C,oBAAoB,kBAAkB,sBAAsB,QAAQ,oBAAoB,sBAAsB,oBAAoB,gBAAgB;cACrJ,iBAAiB,oBAAoB,gBAAgB;;cAErD,cAAc,OAAO,uBAAuB"}
package/dist/control.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as encode, c as paramEntries, d as secretPointerRows, n as configKey, o as encodeParamPointer, u as secretName } from "./serializer-D8_84XWO-DA2B6YbX.mjs";
2
2
  import { c as paramName, l as provisionedEdges, n as SELF_ORIGIN, o as isEnvParamSource, r as STREAMS_API_KEY, s as paramBindingFor, t as RESERVED_PROVIDER_PARAMS } from "./provisioned-edges-B_XS1Mz--NFJgcXK7.mjs";
3
- import { a as normalizeSslMode, n as isPnPostgresResourceNode, o as withConnectionRetry } from "./prisma-next-DlU01kXJ-2sP5mQb6.mjs";
3
+ import { a as normalizeSslMode, n as isPnPostgresResourceNode, o as withConnectionRetry } from "./prisma-next-BvBwGCIt-CSauMX4l.mjs";
4
4
  import { isParamSource, paramManifest, provisionManifest } from "@prisma/composer";
5
5
  import { blindCast } from "@prisma/composer/casts";
6
6
  import { RPC_PEER_KEY } from "@prisma/composer/service-rpc";
@@ -1403,6 +1403,32 @@ const prismaStateLayer = (ids) => {
1403
1403
  })).pipe(Layer.orDie);
1404
1404
  };
1405
1405
  //#endregion
1406
+ //#region ../../1-prisma-cloud/0-lowering/s3-protocol/dist/index.mjs
1407
+ /**
1408
+ * AWS SigV4 verification for the S3 wire protocol (spec § 2 auth). The payload
1409
+ * hash comes from the client — `x-amz-content-sha256` (a real hash or
1410
+ * `UNSIGNED-PAYLOAD`) for header auth, `UNSIGNED-PAYLOAD` for presign — and is
1411
+ * never re-hashed; the verifier trusts what was signed, like a real S3 endpoint.
1412
+ * Runtime engine code (`node:crypto`); not re-exported from the authoring barrel.
1413
+ *
1414
+ * Also owns `mintKeyPair` (local-dev spec § 1) — the one key-pair generator
1415
+ * both the deploy-time `S3Credentials` resource and the local dev bucket
1416
+ * emulator's credential provisioning use.
1417
+ */
1418
+ function randomBytes(n) {
1419
+ return crypto.getRandomValues(new Uint8Array(n));
1420
+ }
1421
+ function toHexUpper(bytes) {
1422
+ return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("").toUpperCase();
1423
+ }
1424
+ /** A fresh SigV4 key pair: an AKIA-prefixed id and a 40-char base64 secret. */
1425
+ function mintKeyPair() {
1426
+ return {
1427
+ accessKeyId: `AKIA${toHexUpper(randomBytes(8))}`,
1428
+ secretAccessKey: btoa(String.fromCharCode(...randomBytes(30)))
1429
+ };
1430
+ }
1431
+ //#endregion
1406
1432
  //#region ../../1-prisma-cloud/1-extensions/target/dist/control.mjs
1407
1433
  const PRISMA_CLOUD_EXTENSION_ID = "@prisma/composer-prisma-cloud";
1408
1434
  var PrismaCloudContainer = class {
@@ -2093,31 +2119,19 @@ function prismaNextDescriptor(o) {
2093
2119
  /**
2094
2120
  * The `S3Credentials` Alchemy resource (S5) — mints a random SigV4 key pair
2095
2121
  * ONCE at create and keeps it STABLE across deploys, so an unchanged module
2096
- * no-ops on redeploy. The pair is generated with the Web Crypto global
2097
- * (`crypto.getRandomValues` no `node:` import, matching this package's
2098
- * runtime-coupling invariant) and persisted in Alchemy state; on every later
2099
- * apply the provider returns the persisted attributes (`reconcile`'s `output`)
2100
- * unchanged — the same way the postgres resource keeps a Connection stable.
2101
- * Rotation is destroy/recreate (a platform ask, not solved here).
2122
+ * no-ops on redeploy. The pair is generated by `@internal/s3-protocol`'s
2123
+ * `mintKeyPair` (moved there per the local-dev spec § 1, so deploy and local
2124
+ * dev credential minting share one implementation) and persisted in Alchemy
2125
+ * state; on every later apply the provider returns the persisted attributes
2126
+ * (`reconcile`'s `output`) unchanged — the same way the postgres resource
2127
+ * keeps a Connection stable. Rotation is destroy/recreate (a platform ask,
2128
+ * not solved here).
2102
2129
  *
2103
2130
  * Deploy-time only: imports `alchemy`. Imported by `control.ts` and tests,
2104
2131
  * never by `index.ts` / the authoring entry.
2105
2132
  */
2106
2133
  /** The `S3Credentials` resource constructor — `yield* S3Credentials(id, {})` in the lowering. */
2107
2134
  const S3Credentials = Resource("PrismaCloud.S3Credentials");
2108
- function randomBytes(n) {
2109
- return crypto.getRandomValues(new Uint8Array(n));
2110
- }
2111
- function toHexUpper(bytes) {
2112
- return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("").toUpperCase();
2113
- }
2114
- /** A fresh SigV4 key pair: an AKIA-prefixed id and a 40-char base64 secret. */
2115
- function mintKeyPair() {
2116
- return {
2117
- accessKeyId: `AKIA${toHexUpper(randomBytes(8))}`,
2118
- secretAccessKey: btoa(String.fromCharCode(...randomBytes(30)))
2119
- };
2120
- }
2121
2135
  /**
2122
2136
  * The `S3Credentials` provider service. `reconcile` runs for create and update;
2123
2137
  * it returns the persisted `output` when present (a redeploy reuses the stored