@prisma/composer-prisma-cloud 0.3.0-dev.8 → 0.3.0

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 (66) hide show
  1. package/dist/compute-main.mjs +4 -20
  2. package/dist/compute-main.mjs.map +1 -1
  3. package/dist/control.d.mts +1 -1
  4. package/dist/control.mjs +17 -28
  5. package/dist/control.mjs.map +1 -1
  6. package/dist/cron/index.d.mts +26 -33
  7. package/dist/cron/index.d.mts.map +1 -1
  8. package/dist/cron/index.mjs +77 -202
  9. package/dist/cron/index.mjs.map +1 -1
  10. package/dist/cron/scheduler-entrypoint.mjs +114 -133
  11. package/dist/cron/scheduler-entrypoint.mjs.map +1 -1
  12. package/dist/cron/scheduler-service.mjs +76 -200
  13. package/dist/cron/scheduler-service.mjs.map +1 -1
  14. package/dist/email/email-entrypoint.mjs +126 -162
  15. package/dist/email/email-entrypoint.mjs.map +1 -1
  16. package/dist/email/email-service.mjs +79 -230
  17. package/dist/email/email-service.mjs.map +1 -1
  18. package/dist/email/index.d.mts +29 -33
  19. package/dist/email/index.d.mts.map +1 -1
  20. package/dist/email/index.mjs +84 -236
  21. package/dist/email/index.mjs.map +1 -1
  22. package/dist/email/testing.mjs +89 -112
  23. package/dist/email/testing.mjs.map +1 -1
  24. package/dist/index.d.mts +43 -51
  25. package/dist/index.d.mts.map +1 -1
  26. package/dist/index.mjs +51 -47
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/local-target.mjs +1 -1
  29. package/dist/local-target.mjs.map +1 -1
  30. package/dist/{secret-BVGxqHxY-DYDfiULl.mjs → param-BTzY0ne5-CW6ojZ3E.mjs} +4 -45
  31. package/dist/param-BTzY0ne5-CW6ojZ3E.mjs.map +1 -0
  32. package/dist/{preflight-names-CpJUd9ZA-BCU-W3cT.mjs → preflight-names-BPL-qsZF-BfoRgbgb.mjs} +14 -30
  33. package/dist/{preflight-names-CpJUd9ZA-BCU-W3cT.mjs.map → preflight-names-BPL-qsZF-BfoRgbgb.mjs.map} +1 -1
  34. package/dist/{provisioned-edges-Cxy18aoh-CUnaY96r.mjs → provisioned-edges-C1wSO3cx-YC5C19f9.mjs} +3 -3
  35. package/dist/{provisioned-edges-Cxy18aoh-CUnaY96r.mjs.map → provisioned-edges-C1wSO3cx-YC5C19f9.mjs.map} +1 -1
  36. package/dist/secret-rz_ZqNeq-_xd97Jd9.mjs +47 -0
  37. package/dist/secret-rz_ZqNeq-_xd97Jd9.mjs.map +1 -0
  38. package/dist/serializer-CJiOhF2d-DJUjQj1i.mjs +251 -0
  39. package/dist/serializer-CJiOhF2d-DJUjQj1i.mjs.map +1 -0
  40. package/dist/{serializer-BD_6nkr4-DWn5NNTC.d.mts → serializer-Cx5slrV4-xJfH6EWS.d.mts} +2 -2
  41. package/dist/serializer-Cx5slrV4-xJfH6EWS.d.mts.map +1 -0
  42. package/dist/storage/index.d.mts +26 -31
  43. package/dist/storage/index.d.mts.map +1 -1
  44. package/dist/storage/index.mjs +89 -215
  45. package/dist/storage/index.mjs.map +1 -1
  46. package/dist/storage/storage-entrypoint.mjs +122 -147
  47. package/dist/storage/storage-entrypoint.mjs.map +1 -1
  48. package/dist/storage/storage-service.mjs +87 -212
  49. package/dist/storage/storage-service.mjs.map +1 -1
  50. package/dist/streams/index.d.mts +22 -29
  51. package/dist/streams/index.d.mts.map +1 -1
  52. package/dist/streams/index.mjs +88 -213
  53. package/dist/streams/index.mjs.map +1 -1
  54. package/dist/streams/streams-entrypoint.mjs +118 -139
  55. package/dist/streams/streams-entrypoint.mjs.map +1 -1
  56. package/dist/streams/streams-service.mjs +87 -212
  57. package/dist/streams/streams-service.mjs.map +1 -1
  58. package/dist/testing.d.mts +5 -19
  59. package/dist/testing.d.mts.map +1 -1
  60. package/dist/testing.mjs +3 -11
  61. package/dist/testing.mjs.map +1 -1
  62. package/package.json +18 -18
  63. package/dist/secret-BVGxqHxY-DYDfiULl.mjs.map +0 -1
  64. package/dist/serializer-BD_6nkr4-DWn5NNTC.d.mts.map +0 -1
  65. package/dist/serializer-sVE4UAmg-CikRngbR.mjs +0 -475
  66. package/dist/serializer-sVE4UAmg-CikRngbR.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"provisioned-edges-Cxy18aoh-CUnaY96r.mjs","names":[],"sources":["../../../1-prisma-cloud/1-extensions/target/dist/provisioned-edges-Cxy18aoh.mjs"],"sourcesContent":["import { n as configKey, t as ORIGIN_KEY_NAME } from \"./serializer-sVE4UAmg.mjs\";\nimport { provisionNeed } from \"@internal/core\";\nimport { type } from \"arktype\";\nimport { RPC_PEER_KEY } from \"@internal/service-rpc\";\n//#region src/origin-key.ts\n/**\n* The service's own origin as a reserved provider param (ADR-0031): the ONE\n* brand and the ONE entry — shared by control.ts (which registers the\n* deploy-side value function that resolves the provisioned service's\n* `endpointDomain` — see its `selfOriginValue`) and compute.ts (which\n* validates and stashes the row at boot through the generic\n* `stashProviderParams` loop), so writer and reader cannot drift.\n*\n* Unlike the key-minting brands (`service-keys.ts`, `streams-keys.ts`) this\n* brand has no provisioner and no consumer edges: the value derives from the\n* service's OWN provisioned attributes, so control.ts registers it as a\n* service-derived provider param (`descriptors/shared.ts`'s\n* `ServiceProviderParam`) and the descriptor writes it for EVERY compute\n* service, exposing or not.\n*\n* This module is reachable from the RUNTIME/authoring side — it must never\n* import `@internal/lowering` or `effect`, or those tokens leak into a user\n* service's bundle (the deploy-side value function lives in control.ts, the\n* control-plane-only entry).\n*/\n/** ADR-0031's brand for the service's own origin — control.ts registers the deploy-side value function under this. */\nconst SELF_ORIGIN = Symbol.for(\"prisma:self-origin\");\n/**\n* The reserved provider param for the origin row: the var name is `ORIGIN`,\n* derived through `configKey` at both ends (`configKey(address, …)` at\n* deploy, `configKey('', …)` — `COMPOSER_ORIGIN` — at boot, where\n* `readOrigin` reads it back). `brand` is `SELF_ORIGIN` — control.ts looks\n* its deploy-side value function up by this field.\n*/\nconst ORIGIN_PARAM = {\n\tname: ORIGIN_KEY_NAME,\n\tschema: type(\"string\"),\n\tbrand: SELF_ORIGIN\n};\n//#endregion\n//#region src/service-keys.ts\n/**\n* RPC's reserved provider param (ADR-0030/ADR-0031): the declaration —\n* name + schema + brand — for the accepted-keys set a provider stores, shared\n* by `control.ts` (which registers the deploy-side `value(refs)` that mints\n* and aggregates it — see its `rpcAcceptedKeysValue`) and `compute.ts` (which\n* validates and stashes it at boot), so writer and reader cannot drift.\n* Finding the edges themselves is `provisioned-edges.ts`'s generic,\n* brand-blind scan — RPC is not special-cased anywhere in this target.\n*\n* This module is reachable from the RUNTIME/authoring side — it must never\n* import `@internal/lowering` or `effect`, or those tokens leak into a user\n* service's bundle (the deploy-side `value(refs)` lives in control.ts, the\n* control-plane-only entry).\n*/\n/**\n* The reserved provider param for RPC's accepted-keys set: the var name is\n* `RPC_ACCEPTED_KEYS`, derived through `configKey` at both ends\n* (`configKey(address, …)` at deploy, `configKey('', …)` at boot — the\n* address-free form is `@internal/service-rpc`'s `RPC_ACCEPTED_KEYS_ENV`). `brand` is\n* `RPC_PEER_KEY`, the same brand `perBindingToken()`'s need carries — control.ts\n* looks its `value(refs)` up by this field.\n*/\nconst RPC_ACCEPTED_KEYS_PARAM = {\n\tname: \"RPC_ACCEPTED_KEYS\",\n\tschema: type(\"string[]\"),\n\tbrand: RPC_PEER_KEY\n};\n//#endregion\n//#region src/streams-keys.ts\n/** ADR-0031's need brand for the streams module's bearer key — control.ts registers the provisioner under this. */\nconst STREAMS_API_KEY = Symbol.for(\"prisma:streams/api-key\");\n/**\n* The provisioning need `durableStreams()`'s `apiKey` param declares: an\n* unguessable value the target mints ONCE PER PROVIDER (not per edge) —\n* `@prisma/streams-server` authenticates a single `API_KEY`, so every\n* consumer of one streams module must present the same value. Per-provider\n* cardinality is provisioner policy (ADR-0031), invisible to core.\n*/\nconst streamsApiKeyNeed = () => provisionNeed(STREAMS_API_KEY);\n/**\n* The reserved provider param for the streams bearer key: the var name is\n* `STREAMS_API_KEY`. `brand` is `STREAMS_API_KEY` itself (the same symbol\n* `streamsApiKeyNeed()`'s need carries) — control.ts looks its `value(refs)`\n* up by this field.\n*/\nconst STREAMS_API_KEY_PARAM = {\n\tname: \"STREAMS_API_KEY\",\n\tschema: type(\"string\"),\n\tbrand: STREAMS_API_KEY\n};\n/** The address-free name compute.ts re-stashes to and the streams entrypoint reads. */\nconst STREAMS_API_KEY_ENV = configKey(\"\", {\n\towner: \"service\",\n\tname: STREAMS_API_KEY_PARAM.name\n});\n//#endregion\n//#region src/provider-params.ts\n/**\n* The list of provider-side reserved params the boot path validates and\n* stashes (ADR-0031): every brand's `{name, schema, brand}` declaration,\n* collected from that brand's own module (`service-keys.ts`,\n* `streams-keys.ts`, `origin-key.ts`) so `compute.ts` names no brand itself.\n*\n* This list exists separately from `control.ts`'s deploy-side registry\n* (`PROVIDER_PARAMS`) because `control.ts` is deploy-only code — it imports\n* `@internal/lowering` and `effect` to mint values — and a booted service\n* must never import it. This module is reachable from a user service's\n* bundle through `compute.ts`, so it must never import `@internal/lowering`,\n* `effect`, `alchemy`, or `control.ts`.\n*\n* This is the single source of which reserved provider params exist:\n* control.ts builds `PROVIDER_PARAMS` by mapping over this list and looking\n* up each entry's deploy-side value function (edge-derived `value(refs)` or\n* service-derived `valueForService(provisioned, address)`) by its `brand`,\n* throwing at module load if one is missing. Adding a brand means adding its\n* entry here, plus its deploy-side value function in control.ts — a brand\n* registered for deploy but absent here is no longer expressible, because\n* deploy no longer names its own param set independently.\n*/\nconst RESERVED_PROVIDER_PARAMS = [\n\tRPC_ACCEPTED_KEYS_PARAM,\n\tSTREAMS_API_KEY_PARAM,\n\tORIGIN_PARAM\n];\n//#endregion\n//#region src/provisioned-edges.ts\n/**\n* Every provisioned edge in the graph. Core resolves and mints these (one\n* value per edge, keyed by `edgeId`); this scan is how the target finds them\n* again when it gathers a provider's inbound values.\n*/\nfunction provisionedEdges(graph) {\n\tconst edges = [];\n\tfor (const edge of graph.edges) {\n\t\tif (edge.kind !== \"dependency\") continue;\n\t\tconst consumer = graph.nodes.find((n) => n.id === edge.to)?.node;\n\t\tif (consumer === void 0 || consumer.kind !== \"service\") continue;\n\t\tconst slot = consumer.inputs[edge.input];\n\t\tif (slot === void 0) continue;\n\t\tfor (const param of Object.values(slot.connection.params)) {\n\t\t\tconst brand = param.provision?.brand;\n\t\t\tif (brand === void 0) continue;\n\t\t\tedges.push({\n\t\t\t\tedgeId: `${edge.to}.${edge.input}`,\n\t\t\t\tconsumerAddress: edge.to,\n\t\t\t\tinput: edge.input,\n\t\t\t\tproviderAddress: edge.from,\n\t\t\t\tbrand\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn edges;\n}\n//#endregion\nexport { streamsApiKeyNeed as a, STREAMS_API_KEY_ENV as i, RESERVED_PROVIDER_PARAMS as n, SELF_ORIGIN as o, STREAMS_API_KEY as r, provisionedEdges as t };\n\n//# sourceMappingURL=provisioned-edges-Cxy18aoh.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAM,cAAc,OAAO,IAAI,oBAAoB;;;;;;;;AAQnD,MAAM,eAAe;CACpB,MAAM;CACN,QAAQ,KAAK,QAAQ;CACrB,OAAO;AACR;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,0BAA0B;CAC/B,MAAM;CACN,QAAQ,KAAK,UAAU;CACvB,OAAO;AACR;;AAIA,MAAM,kBAAkB,OAAO,IAAI,wBAAwB;;;;;;;;AAQ3D,MAAM,0BAA0B,cAAc,eAAe;;;;;;;AAO7D,MAAM,wBAAwB;CAC7B,MAAM;CACN,QAAQ,KAAK,QAAQ;CACrB,OAAO;AACR;;AAEA,MAAM,sBAAsB,UAAU,IAAI;CACzC,OAAO;CACP,MAAM,sBAAsB;AAC7B,CAAC;;;;;;;;;;;;;;;;;;;;;;;AAyBD,MAAM,2BAA2B;CAChC;CACA;CACA;AACD;;;;;;AAQA,SAAS,iBAAiB,OAAO;CAChC,MAAM,QAAQ,CAAC;CACf,KAAK,MAAM,QAAQ,MAAM,OAAO;EAC/B,IAAI,KAAK,SAAS,cAAc;EAChC,MAAM,WAAW,MAAM,MAAM,MAAM,MAAM,EAAE,OAAO,KAAK,EAAE,CAAC,EAAE;EAC5D,IAAI,aAAa,KAAK,KAAK,SAAS,SAAS,WAAW;EACxD,MAAM,OAAO,SAAS,OAAO,KAAK;EAClC,IAAI,SAAS,KAAK,GAAG;EACrB,KAAK,MAAM,SAAS,OAAO,OAAO,KAAK,WAAW,MAAM,GAAG;GAC1D,MAAM,QAAQ,MAAM,WAAW;GAC/B,IAAI,UAAU,KAAK,GAAG;GACtB,MAAM,KAAK;IACV,QAAQ,GAAG,KAAK,GAAG,GAAG,KAAK;IAC3B,iBAAiB,KAAK;IACtB,OAAO,KAAK;IACZ,iBAAiB,KAAK;IACtB;GACD,CAAC;GACD;EACD;CACD;CACA,OAAO;AACR"}
1
+ {"version":3,"file":"provisioned-edges-C1wSO3cx-YC5C19f9.mjs","names":[],"sources":["../../../1-prisma-cloud/1-extensions/target/dist/provisioned-edges-C1wSO3cx.mjs"],"sourcesContent":["import { n as configKey, t as ORIGIN_KEY_NAME } from \"./serializer-CJiOhF2d.mjs\";\nimport { provisionNeed } from \"@internal/core\";\nimport { type } from \"arktype\";\nimport { RPC_PEER_KEY } from \"@internal/service-rpc\";\n//#region src/origin-key.ts\n/**\n* The service's own origin as a reserved provider param (ADR-0031): the ONE\n* brand and the ONE entry — shared by control.ts (which registers the\n* deploy-side value function that resolves the provisioned service's\n* `endpointDomain` — see its `selfOriginValue`) and compute.ts (which\n* validates and stashes the row at boot through the generic\n* `stashProviderParams` loop), so writer and reader cannot drift.\n*\n* Unlike the key-minting brands (`service-keys.ts`, `streams-keys.ts`) this\n* brand has no provisioner and no consumer edges: the value derives from the\n* service's OWN provisioned attributes, so control.ts registers it as a\n* service-derived provider param (`descriptors/shared.ts`'s\n* `ServiceProviderParam`) and the descriptor writes it for EVERY compute\n* service, exposing or not.\n*\n* This module is reachable from the RUNTIME/authoring side — it must never\n* import `@internal/lowering` or `effect`, or those tokens leak into a user\n* service's bundle (the deploy-side value function lives in control.ts, the\n* control-plane-only entry).\n*/\n/** ADR-0031's brand for the service's own origin — control.ts registers the deploy-side value function under this. */\nconst SELF_ORIGIN = Symbol.for(\"prisma:self-origin\");\n/**\n* The reserved provider param for the origin row: the var name is `ORIGIN`,\n* derived through `configKey` at both ends (`configKey(address, …)` at\n* deploy, `configKey('', …)` — `COMPOSER_ORIGIN` — at boot, where\n* `readOrigin` reads it back). `brand` is `SELF_ORIGIN` — control.ts looks\n* its deploy-side value function up by this field.\n*/\nconst ORIGIN_PARAM = {\n\tname: ORIGIN_KEY_NAME,\n\tschema: type(\"string\"),\n\tbrand: SELF_ORIGIN\n};\n//#endregion\n//#region src/service-keys.ts\n/**\n* RPC's reserved provider param (ADR-0030/ADR-0031): the declaration —\n* name + schema + brand — for the accepted-keys set a provider stores, shared\n* by `control.ts` (which registers the deploy-side `value(refs)` that mints\n* and aggregates it — see its `rpcAcceptedKeysValue`) and `compute.ts` (which\n* validates and stashes it at boot), so writer and reader cannot drift.\n* Finding the edges themselves is `provisioned-edges.ts`'s generic,\n* brand-blind scan — RPC is not special-cased anywhere in this target.\n*\n* This module is reachable from the RUNTIME/authoring side — it must never\n* import `@internal/lowering` or `effect`, or those tokens leak into a user\n* service's bundle (the deploy-side `value(refs)` lives in control.ts, the\n* control-plane-only entry).\n*/\n/**\n* The reserved provider param for RPC's accepted-keys set: the var name is\n* `RPC_ACCEPTED_KEYS`, derived through `configKey` at both ends\n* (`configKey(address, …)` at deploy, `configKey('', …)` at boot — the\n* address-free form is `@internal/service-rpc`'s `RPC_ACCEPTED_KEYS_ENV`). `brand` is\n* `RPC_PEER_KEY`, the same brand `perBindingToken()`'s need carries — control.ts\n* looks its `value(refs)` up by this field.\n*/\nconst RPC_ACCEPTED_KEYS_PARAM = {\n\tname: \"RPC_ACCEPTED_KEYS\",\n\tschema: type(\"string[]\"),\n\tbrand: RPC_PEER_KEY\n};\n//#endregion\n//#region src/streams-keys.ts\n/** ADR-0031's need brand for the streams module's bearer key — control.ts registers the provisioner under this. */\nconst STREAMS_API_KEY = Symbol.for(\"prisma:streams/api-key\");\n/**\n* The provisioning need `durableStreams()`'s `apiKey` param declares: an\n* unguessable value the target mints ONCE PER PROVIDER (not per edge) —\n* `@prisma/streams-server` authenticates a single `API_KEY`, so every\n* consumer of one streams module must present the same value. Per-provider\n* cardinality is provisioner policy (ADR-0031), invisible to core.\n*/\nconst streamsApiKeyNeed = () => provisionNeed(STREAMS_API_KEY);\n/**\n* The reserved provider param for the streams bearer key: the var name is\n* `STREAMS_API_KEY`. `brand` is `STREAMS_API_KEY` itself (the same symbol\n* `streamsApiKeyNeed()`'s need carries) — control.ts looks its `value(refs)`\n* up by this field.\n*/\nconst STREAMS_API_KEY_PARAM = {\n\tname: \"STREAMS_API_KEY\",\n\tschema: type(\"string\"),\n\tbrand: STREAMS_API_KEY\n};\n/** The address-free name compute.ts re-stashes to and the streams entrypoint reads. */\nconst STREAMS_API_KEY_ENV = configKey(\"\", {\n\towner: \"service\",\n\tname: STREAMS_API_KEY_PARAM.name\n});\n//#endregion\n//#region src/provider-params.ts\n/**\n* The list of provider-side reserved params the boot path validates and\n* stashes (ADR-0031): every brand's `{name, schema, brand}` declaration,\n* collected from that brand's own module (`service-keys.ts`,\n* `streams-keys.ts`, `origin-key.ts`) so `compute.ts` names no brand itself.\n*\n* This list exists separately from `control.ts`'s deploy-side registry\n* (`PROVIDER_PARAMS`) because `control.ts` is deploy-only code — it imports\n* `@internal/lowering` and `effect` to mint values — and a booted service\n* must never import it. This module is reachable from a user service's\n* bundle through `compute.ts`, so it must never import `@internal/lowering`,\n* `effect`, `alchemy`, or `control.ts`.\n*\n* This is the single source of which reserved provider params exist:\n* control.ts builds `PROVIDER_PARAMS` by mapping over this list and looking\n* up each entry's deploy-side value function (edge-derived `value(refs)` or\n* service-derived `valueForService(provisioned, address)`) by its `brand`,\n* throwing at module load if one is missing. Adding a brand means adding its\n* entry here, plus its deploy-side value function in control.ts — a brand\n* registered for deploy but absent here is no longer expressible, because\n* deploy no longer names its own param set independently.\n*/\nconst RESERVED_PROVIDER_PARAMS = [\n\tRPC_ACCEPTED_KEYS_PARAM,\n\tSTREAMS_API_KEY_PARAM,\n\tORIGIN_PARAM\n];\n//#endregion\n//#region src/provisioned-edges.ts\n/**\n* Every provisioned edge in the graph. Core resolves and mints these (one\n* value per edge, keyed by `edgeId`); this scan is how the target finds them\n* again when it gathers a provider's inbound values.\n*/\nfunction provisionedEdges(graph) {\n\tconst edges = [];\n\tfor (const edge of graph.edges) {\n\t\tif (edge.kind !== \"dependency\") continue;\n\t\tconst consumer = graph.nodes.find((n) => n.id === edge.to)?.node;\n\t\tif (consumer === void 0 || consumer.kind !== \"service\") continue;\n\t\tconst slot = consumer.inputs[edge.input];\n\t\tif (slot === void 0) continue;\n\t\tfor (const param of Object.values(slot.connection.params)) {\n\t\t\tconst brand = param.provision?.brand;\n\t\t\tif (brand === void 0) continue;\n\t\t\tedges.push({\n\t\t\t\tedgeId: `${edge.to}.${edge.input}`,\n\t\t\t\tconsumerAddress: edge.to,\n\t\t\t\tinput: edge.input,\n\t\t\t\tproviderAddress: edge.from,\n\t\t\t\tbrand\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn edges;\n}\n//#endregion\nexport { streamsApiKeyNeed as a, STREAMS_API_KEY_ENV as i, RESERVED_PROVIDER_PARAMS as n, SELF_ORIGIN as o, STREAMS_API_KEY as r, provisionedEdges as t };\n\n//# sourceMappingURL=provisioned-edges-C1wSO3cx.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAM,cAAc,OAAO,IAAI,oBAAoB;;;;;;;;AAQnD,MAAM,eAAe;CACpB,MAAM;CACN,QAAQ,KAAK,QAAQ;CACrB,OAAO;AACR;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,0BAA0B;CAC/B,MAAM;CACN,QAAQ,KAAK,UAAU;CACvB,OAAO;AACR;;AAIA,MAAM,kBAAkB,OAAO,IAAI,wBAAwB;;;;;;;;AAQ3D,MAAM,0BAA0B,cAAc,eAAe;;;;;;;AAO7D,MAAM,wBAAwB;CAC7B,MAAM;CACN,QAAQ,KAAK,QAAQ;CACrB,OAAO;AACR;;AAEA,MAAM,sBAAsB,UAAU,IAAI;CACzC,OAAO;CACP,MAAM,sBAAsB;AAC7B,CAAC;;;;;;;;;;;;;;;;;;;;;;;AAyBD,MAAM,2BAA2B;CAChC;CACA;CACA;AACD;;;;;;AAQA,SAAS,iBAAiB,OAAO;CAChC,MAAM,QAAQ,CAAC;CACf,KAAK,MAAM,QAAQ,MAAM,OAAO;EAC/B,IAAI,KAAK,SAAS,cAAc;EAChC,MAAM,WAAW,MAAM,MAAM,MAAM,MAAM,EAAE,OAAO,KAAK,EAAE,CAAC,EAAE;EAC5D,IAAI,aAAa,KAAK,KAAK,SAAS,SAAS,WAAW;EACxD,MAAM,OAAO,SAAS,OAAO,KAAK;EAClC,IAAI,SAAS,KAAK,GAAG;EACrB,KAAK,MAAM,SAAS,OAAO,OAAO,KAAK,WAAW,MAAM,GAAG;GAC1D,MAAM,QAAQ,MAAM,WAAW;GAC/B,IAAI,UAAU,KAAK,GAAG;GACtB,MAAM,KAAK;IACV,QAAQ,GAAG,KAAK,GAAG,GAAG,KAAK;IAC3B,iBAAiB,KAAK;IACtB,OAAO,KAAK;IACZ,iBAAiB,KAAK;IACtB;GACD,CAAC;GACD;EACD;CACD;CACA,OAAO;AACR"}
@@ -0,0 +1,47 @@
1
+ import { secretSource } from "@prisma/composer";
2
+ import { blindCast } from "@prisma/composer/casts";
3
+ //#region ../../1-prisma-cloud/1-extensions/target/dist/secret-rz_ZqNeq.mjs
4
+ /**
5
+ * Brands the payload `envSecret` builds. Core's `secretSource()` is a public
6
+ * SPI, so a user could bypass `envSecret` and bind a raw `secretSource('x')`;
7
+ * the brand lets `secretName` reject such a source (or another target's) with a
8
+ * clear error instead of reading an absent `.name`.
9
+ */
10
+ const PRISMA_CLOUD_SECRET_SOURCE = blindCast(Symbol.for("prisma:prisma-cloud-secret-source"));
11
+ const RESERVED_SECRET_PREFIX = "COMPOSER_";
12
+ const POISONED_SECRET_NAMES = /* @__PURE__ */ new Set(["DATABASE_URL", "DATABASE_URL_POOLED"]);
13
+ /**
14
+ * Binds a secret slot to a named Prisma Cloud platform env var (ADR-0029). The
15
+ * value is provisioned out-of-band; only the name is carried. The name may not
16
+ * use the framework's reserved `COMPOSER_` prefix or the poisoned
17
+ * `DATABASE_URL(_POOLED)` keys.
18
+ */
19
+ function envSecret(name) {
20
+ if (typeof name !== "string" || name.length === 0) throw new Error("envSecret() requires a non-empty platform env-var name, e.g. envSecret('STRIPE_SECRET_KEY').");
21
+ if (name.startsWith(RESERVED_SECRET_PREFIX)) throw new Error(`envSecret name "${name}" may not start with "${RESERVED_SECRET_PREFIX}" — that prefix is reserved for the framework's own generated config keys.`);
22
+ if (POISONED_SECRET_NAMES.has(name)) throw new Error(`envSecret name "${name}" is reserved — ${[...POISONED_SECRET_NAMES].join(" and ")} are poisoned at project provision and cannot back a secret.`);
23
+ return secretSource({
24
+ [PRISMA_CLOUD_SECRET_SOURCE]: true,
25
+ name
26
+ });
27
+ }
28
+ /** True only for a payload that `envSecret` built — i.e. one carrying the brand. */
29
+ function isEnvSecretPayload(payload) {
30
+ return typeof payload === "object" && payload !== null && blindCast(payload)[PRISMA_CLOUD_SECRET_SOURCE] === true;
31
+ }
32
+ /**
33
+ * Reads the Prisma Cloud env-var name back out of a secret binding's opaque
34
+ * source. A source not built by `envSecret` (a raw `secretSource(...)` or
35
+ * another target's source) carries no name — reject it here. `secretName` runs
36
+ * in preflight before any provisioning, so a foreign source fails early and
37
+ * clearly rather than producing a broken deploy with an undefined name.
38
+ */
39
+ function secretName(binding) {
40
+ const payload = binding.source.payload;
41
+ if (!isEnvSecretPayload(payload)) throw new Error(`secret slot "${binding.slot}" of service "${binding.serviceAddress}" is bound to a source not created by envSecret() — bind secrets with envSecret('NAME') from @prisma/composer-prisma-cloud.`);
42
+ return payload.name;
43
+ }
44
+ //#endregion
45
+ export { secretName as n, envSecret as t };
46
+
47
+ //# sourceMappingURL=secret-rz_ZqNeq-_xd97Jd9.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secret-rz_ZqNeq-_xd97Jd9.mjs","names":[],"sources":["../../../1-prisma-cloud/1-extensions/target/dist/secret-rz_ZqNeq.mjs"],"sourcesContent":["import { secretSource } from \"@internal/core\";\nimport { blindCast } from \"@internal/foundation/casts\";\n//#region src/secret.ts\n/**\n* Brands the payload `envSecret` builds. Core's `secretSource()` is a public\n* SPI, so a user could bypass `envSecret` and bind a raw `secretSource('x')`;\n* the brand lets `secretName` reject such a source (or another target's) with a\n* clear error instead of reading an absent `.name`.\n*/\nconst PRISMA_CLOUD_SECRET_SOURCE = blindCast(Symbol.for(\"prisma:prisma-cloud-secret-source\"));\nconst RESERVED_SECRET_PREFIX = \"COMPOSER_\";\nconst POISONED_SECRET_NAMES = /* @__PURE__ */ new Set([\"DATABASE_URL\", \"DATABASE_URL_POOLED\"]);\n/**\n* Binds a secret slot to a named Prisma Cloud platform env var (ADR-0029). The\n* value is provisioned out-of-band; only the name is carried. The name may not\n* use the framework's reserved `COMPOSER_` prefix or the poisoned\n* `DATABASE_URL(_POOLED)` keys.\n*/\nfunction envSecret(name) {\n\tif (typeof name !== \"string\" || name.length === 0) throw new Error(\"envSecret() requires a non-empty platform env-var name, e.g. envSecret('STRIPE_SECRET_KEY').\");\n\tif (name.startsWith(RESERVED_SECRET_PREFIX)) throw new Error(`envSecret name \"${name}\" may not start with \"${RESERVED_SECRET_PREFIX}\" — that prefix is reserved for the framework's own generated config keys.`);\n\tif (POISONED_SECRET_NAMES.has(name)) throw new Error(`envSecret name \"${name}\" is reserved — ${[...POISONED_SECRET_NAMES].join(\" and \")} are poisoned at project provision and cannot back a secret.`);\n\treturn secretSource({\n\t\t[PRISMA_CLOUD_SECRET_SOURCE]: true,\n\t\tname\n\t});\n}\n/** True only for a payload that `envSecret` built — i.e. one carrying the brand. */\nfunction isEnvSecretPayload(payload) {\n\treturn typeof payload === \"object\" && payload !== null && blindCast(payload)[PRISMA_CLOUD_SECRET_SOURCE] === true;\n}\n/**\n* Reads the Prisma Cloud env-var name back out of a secret binding's opaque\n* source. A source not built by `envSecret` (a raw `secretSource(...)` or\n* another target's source) carries no name — reject it here. `secretName` runs\n* in preflight before any provisioning, so a foreign source fails early and\n* clearly rather than producing a broken deploy with an undefined name.\n*/\nfunction secretName(binding) {\n\tconst payload = binding.source.payload;\n\tif (!isEnvSecretPayload(payload)) throw new Error(`secret slot \"${binding.slot}\" of service \"${binding.serviceAddress}\" is bound to a source not created by envSecret() — bind secrets with envSecret('NAME') from @prisma/composer-prisma-cloud.`);\n\treturn payload.name;\n}\n//#endregion\nexport { secretName as n, envSecret as t };\n\n//# sourceMappingURL=secret-rz_ZqNeq.mjs.map"],"mappings":";;;;;;;;;AASA,MAAM,6BAA6B,UAAU,OAAO,IAAI,mCAAmC,CAAC;AAC5F,MAAM,yBAAyB;AAC/B,MAAM,wCAAwC,IAAI,IAAI,CAAC,gBAAgB,qBAAqB,CAAC;;;;;;;AAO7F,SAAS,UAAU,MAAM;CACxB,IAAI,OAAO,SAAS,YAAY,KAAK,WAAW,GAAG,MAAM,IAAI,MAAM,8FAA8F;CACjK,IAAI,KAAK,WAAW,sBAAsB,GAAG,MAAM,IAAI,MAAM,mBAAmB,KAAK,wBAAwB,uBAAuB,2EAA2E;CAC/M,IAAI,sBAAsB,IAAI,IAAI,GAAG,MAAM,IAAI,MAAM,mBAAmB,KAAK,kBAAkB,CAAC,GAAG,qBAAqB,CAAC,CAAC,KAAK,OAAO,EAAE,6DAA6D;CACrM,OAAO,aAAa;GAClB,6BAA6B;EAC9B;CACD,CAAC;AACF;;AAEA,SAAS,mBAAmB,SAAS;CACpC,OAAO,OAAO,YAAY,YAAY,YAAY,QAAQ,UAAU,OAAO,CAAC,CAAC,gCAAgC;AAC9G;;;;;;;;AAQA,SAAS,WAAW,SAAS;CAC5B,MAAM,UAAU,QAAQ,OAAO;CAC/B,IAAI,CAAC,mBAAmB,OAAO,GAAG,MAAM,IAAI,MAAM,gBAAgB,QAAQ,KAAK,gBAAgB,QAAQ,eAAe,4HAA4H;CAClP,OAAO,QAAQ;AAChB"}
@@ -0,0 +1,251 @@
1
+ import { n as secretName } from "./secret-rz_ZqNeq-_xd97Jd9.mjs";
2
+ import { blindCast } from "@prisma/composer/casts";
3
+ import { type } from "arktype";
4
+ //#region ../../1-prisma-cloud/1-extensions/target/dist/serializer-CJiOhF2d.mjs
5
+ /**
6
+ * Walks a node's own params, then each dependency input's connection params —
7
+ * the same enumeration order `configOf` uses, but carrying the raw
8
+ * `ConfigParam` (with its `serialize`/`deserialize`) instead of a pure-data
9
+ * projection.
10
+ */
11
+ function paramEntries(node) {
12
+ const entries = [];
13
+ for (const [input, value] of Object.entries(node.inputs)) {
14
+ if (typeof value !== "object" || value === null) continue;
15
+ const params = blindCast(value).connection.params;
16
+ for (const [name, param] of Object.entries(params)) entries.push({
17
+ owner: { input },
18
+ name,
19
+ param
20
+ });
21
+ }
22
+ for (const [name, param] of Object.entries(node.params)) entries.push({
23
+ owner: "service",
24
+ name,
25
+ param
26
+ });
27
+ return entries;
28
+ }
29
+ const configKey = (address, d) => {
30
+ const segments = address.split(".").filter((s) => s.length > 0);
31
+ const owner = d.owner === "service" ? [] : [d.owner.input];
32
+ return [
33
+ "COMPOSER",
34
+ ...segments,
35
+ ...owner,
36
+ d.name
37
+ ].join("_").toUpperCase();
38
+ };
39
+ /**
40
+ * Typed value → its stored string. Service-own literals are JSON-encoded; a
41
+ * dependency-input value is a provisioning ref at deploy (and a resolved
42
+ * string at boot) and passes through untouched — LANDMINE: JSON-encoding it
43
+ * would break the ordering edge Alchemy resolves through it.
44
+ */
45
+ function encode(owner, value) {
46
+ return owner === "service" ? JSON.stringify(value) : blindCast(value);
47
+ }
48
+ /** Reverses `encode`: JSON-parse a service-own value, take a dependency-input value raw. */
49
+ function decode(owner, raw) {
50
+ return owner === "service" ? JSON.parse(raw) : raw;
51
+ }
52
+ const PARAM_POINTER_PREFIX = "@composer-param-pointer:";
53
+ /** True iff `raw` is a param pointer row (as opposed to a JSON-encoded literal). */
54
+ const isParamPointerRow = (raw) => raw.startsWith(PARAM_POINTER_PREFIX);
55
+ /** Builds a param pointer row's stored value from the platform var NAME it points to. */
56
+ const encodeParamPointer = (name) => `${PARAM_POINTER_PREFIX}${name}`;
57
+ /** Reverses `encodeParamPointer`: the platform var NAME a pointer row points to. */
58
+ const decodeParamPointer = (raw) => raw.slice(24);
59
+ function coerce(raw, d, key) {
60
+ if (!(raw !== void 0 && raw !== "")) {
61
+ if (d.param.default !== void 0) return d.param.default;
62
+ if (d.param.optional === true) return void 0;
63
+ throw new Error(`missing required config param "${d.name}" (env ${key})`);
64
+ }
65
+ if (d.owner === "service" && isParamPointerRow(raw)) return coerceEnvSourcedParam(raw, d, key);
66
+ try {
67
+ return standardValidateSync(d.param.schema, decode(d.owner, raw));
68
+ } catch (cause) {
69
+ const message = cause instanceof Error ? cause.message : String(cause);
70
+ throw new Error(`invalid value for config param "${d.name}" (env ${key}): ${message}`);
71
+ }
72
+ }
73
+ /**
74
+ * Boot resolution for an env-sourced param: double-lookup (pointer → platform
75
+ * var), then the param's own schema on the raw string — no JSON decode, and
76
+ * no redaction (it's config, not a secret). An UNSET platform var is a loud
77
+ * boot failure naming both the param and the platform var; an EMPTY string is
78
+ * not special-cased here — it reaches the schema like any other value, so it
79
+ * passes iff the schema accepts it (deliberately unlike a literal param's own
80
+ * ""-means-absent rule, and unlike a secret's non-empty requirement).
81
+ */
82
+ function coerceEnvSourcedParam(raw, d, key) {
83
+ const platformVar = decodeParamPointer(raw);
84
+ const value = process.env[platformVar];
85
+ if (value === void 0) throw new Error(`env-sourced config param "${d.name}" (env ${key} → ${platformVar}) is unset: the platform variable "${platformVar}" was not injected — the deploy did not provision it.`);
86
+ try {
87
+ return standardValidateSync(d.param.schema, value);
88
+ } catch (cause) {
89
+ const message = cause instanceof Error ? cause.message : String(cause);
90
+ throw new Error(`invalid value for env-sourced config param "${d.name}" (env ${key} → ${platformVar}): ${message}`);
91
+ }
92
+ }
93
+ /**
94
+ * Boot: read each declared param from env by its key, reverse the param's own
95
+ * serialization (missing/invalid fails loudly), assemble the typed Config.
96
+ * Secrets ride a separate channel (deserializeSecrets), not this one.
97
+ */
98
+ const deserialize = (node, address) => {
99
+ const service = {};
100
+ const inputs = {};
101
+ for (const d of paramEntries(node)) {
102
+ const key = configKey(address, d);
103
+ const value = coerce(process.env[key], d, key);
104
+ if (d.owner === "service") service[d.name] = value;
105
+ else {
106
+ let bucket = inputs[d.owner.input];
107
+ if (bucket === void 0) {
108
+ bucket = {};
109
+ inputs[d.owner.input] = bucket;
110
+ }
111
+ bucket[d.name] = value;
112
+ }
113
+ }
114
+ return {
115
+ service,
116
+ inputs
117
+ };
118
+ };
119
+ /**
120
+ * run()'s setup step: write the resolved config to the environment under
121
+ * address-free keys (configKey("", d) + each serialize suffix), which load()
122
+ * reads back with no address. Uses env, not a module variable, because a
123
+ * framework may fork worker processes that inherit env but not memory.
124
+ * Writes only these keys; nothing else is touched.
125
+ */
126
+ const stash = (node, config) => {
127
+ for (const d of paramEntries(node)) {
128
+ const value = d.owner === "service" ? config.service[d.name] : config.inputs[d.owner.input]?.[d.name];
129
+ if (value === void 0) continue;
130
+ process.env[configKey("", d)] = encode(d.owner, value);
131
+ }
132
+ };
133
+ /** The pointer-row key for a secret slot: COMPOSER_<addr>_<slot> (secrets are service-level). */
134
+ const secretKey = (address, slot) => configKey(address, {
135
+ owner: "service",
136
+ name: slot
137
+ });
138
+ /**
139
+ * Deploy: the pointer rows for a node's secret slots — each slot's key mapped to
140
+ * the platform NAME the root bound it to (looked up in `graph.secrets`). Never a
141
+ * value. A declared slot with no binding is a Load-invariant violation (Load
142
+ * binds every slot), surfaced loudly here rather than written as a blank row.
143
+ */
144
+ function secretPointerRows(node, address, bindings) {
145
+ const rows = [];
146
+ for (const slot of Object.keys(node.secretSlots)) {
147
+ const binding = bindings.find((b) => b.serviceAddress === address && b.slot === slot);
148
+ if (binding === void 0) throw new Error(`secret slot "${slot}" of "${address}" has no bound platform name — Load should have bound it (ADR-0029).`);
149
+ rows.push({
150
+ key: secretKey(address, slot),
151
+ name: secretName(binding)
152
+ });
153
+ }
154
+ return rows;
155
+ }
156
+ /**
157
+ * Boot: resolve every secret slot to its value by double-lookup — read the
158
+ * pointer key (the platform NAME), then read that platform var. A missing
159
+ * pointer or a missing/empty platform value is a loud failure naming both keys.
160
+ * Returns a plain Record for core's `hydrateSecrets` to box.
161
+ */
162
+ const deserializeSecrets = (node, address) => {
163
+ const values = {};
164
+ for (const slot of Object.keys(node.secretSlots)) {
165
+ const key = secretKey(address, slot);
166
+ const name = process.env[key];
167
+ if (name === void 0 || name === "") throw new Error(`missing secret pointer for slot "${slot}" (env ${key}) — the deploy did not write it.`);
168
+ const value = process.env[name];
169
+ if (value === void 0 || value === "") throw new Error(`secret "${slot}" is not provisioned (env ${key} → ${name}): the platform var "${name}" is unset or empty.`);
170
+ values[slot] = value;
171
+ }
172
+ return values;
173
+ };
174
+ /**
175
+ * run()'s setup step for secrets: re-emit each slot's pointer NAME under its
176
+ * address-free key, so the address-free `deserializeSecrets` double-looks-up
177
+ * identically. Never the value — the value stays only in the platform var.
178
+ */
179
+ const stashSecrets = (node, address) => {
180
+ for (const slot of Object.keys(node.secretSlots)) {
181
+ const name = process.env[secretKey(address, slot)];
182
+ if (name === void 0) continue;
183
+ process.env[secretKey("", slot)] = name;
184
+ }
185
+ };
186
+ /**
187
+ * Boot: for each reserved provider param, read its address-scoped row through
188
+ * the same `coerce` a declared param uses (JSON-decode, schema-validate), and
189
+ * re-emit it address-free — `stash`'s counterpart for this separate
190
+ * declaration space. A param is declared optional here unconditionally: an
191
+ * absent row means "never provisioned" (local dev, tests, a provider with no
192
+ * registered value for this deploy), never a boot failure, so nothing is
193
+ * stashed and the runtime reader that owns this slot falls back to its own
194
+ * pass-through behavior.
195
+ */
196
+ function stashProviderParams(entries, address) {
197
+ for (const entry of entries) {
198
+ const d = {
199
+ owner: "service",
200
+ name: entry.name,
201
+ param: {
202
+ schema: entry.schema,
203
+ optional: true
204
+ }
205
+ };
206
+ const key = configKey(address, d);
207
+ const value = coerce(process.env[key], d, key);
208
+ if (value === void 0) continue;
209
+ process.env[configKey("", d)] = encode("service", value);
210
+ }
211
+ }
212
+ /** The framework-resolved origin row: COMPOSER_<addr>_ORIGIN. Written per
213
+ * compute service at serialize — the service's own provisioned endpoint URL,
214
+ * riding the reserved-provider-param machinery (`origin-key.ts`'s
215
+ * `ORIGIN_PARAM`); never a declared param, never in config(). A harness with
216
+ * no deploy behind it supplies it by setting `COMPOSER_ORIGIN` to the
217
+ * JSON-encoded origin URL — exactly how the existing entrypoint tests supply
218
+ * their other `COMPOSER_*` rows. */
219
+ const ORIGIN_KEY_NAME = "ORIGIN";
220
+ /**
221
+ * Reads this service's origin back out of the address-free stash
222
+ * `stashProviderParams` wrote for the ORIGIN entry. `COMPOSER_ORIGIN` unset is
223
+ * a loud failure — a deployed environment always writes it, so an unset row
224
+ * means either a local harness that hasn't supplied it or a boot() called
225
+ * before run().
226
+ */
227
+ function readOrigin() {
228
+ const d = {
229
+ owner: "service",
230
+ name: ORIGIN_KEY_NAME,
231
+ param: {
232
+ schema: type("string"),
233
+ optional: true
234
+ }
235
+ };
236
+ const key = configKey("", d);
237
+ const value = coerce(process.env[key], d, key);
238
+ if (value === void 0) throw new Error("this service's origin is not available (env COMPOSER_ORIGIN is unset) — a deployed environment writes it automatically; a local harness must supply it like any other config value (set COMPOSER_ORIGIN to the JSON-encoded origin URL).");
239
+ return blindCast(value);
240
+ }
241
+ /** Synchronous Standard Schema validation — see the matching note in core's `config.ts`. */
242
+ function standardValidateSync(schema, value) {
243
+ const result = schema["~standard"].validate(value);
244
+ if (result instanceof Promise) throw new Error("config param schema validation must be synchronous — async Standard Schema validators are not supported for config params");
245
+ if (result.issues !== void 0) throw new Error(`config param validation failed: ${result.issues.map((issue) => issue.message).join("; ")}`);
246
+ return result.value;
247
+ }
248
+ //#endregion
249
+ export { encode as a, readOrigin as c, stashProviderParams as d, stashSecrets as f, deserializeSecrets as i, secretPointerRows as l, configKey as n, encodeParamPointer as o, deserialize as r, paramEntries as s, ORIGIN_KEY_NAME as t, stash as u };
250
+
251
+ //# sourceMappingURL=serializer-CJiOhF2d-DJUjQj1i.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializer-CJiOhF2d-DJUjQj1i.mjs","names":[],"sources":["../../../1-prisma-cloud/1-extensions/target/dist/serializer-CJiOhF2d.mjs"],"sourcesContent":["import { n as secretName } from \"./secret-rz_ZqNeq.mjs\";\nimport { blindCast } from \"@internal/foundation/casts\";\nimport { type } from \"arktype\";\n//#region src/serializer.ts\n/**\n* Walks a node's own params, then each dependency input's connection params —\n* the same enumeration order `configOf` uses, but carrying the raw\n* `ConfigParam` (with its `serialize`/`deserialize`) instead of a pure-data\n* projection.\n*/\nfunction paramEntries(node) {\n\tconst entries = [];\n\tfor (const [input, value] of Object.entries(node.inputs)) {\n\t\tif (typeof value !== \"object\" || value === null) continue;\n\t\tconst params = blindCast(value).connection.params;\n\t\tfor (const [name, param] of Object.entries(params)) entries.push({\n\t\t\towner: { input },\n\t\t\tname,\n\t\t\tparam\n\t\t});\n\t}\n\tfor (const [name, param] of Object.entries(node.params)) entries.push({\n\t\towner: \"service\",\n\t\tname,\n\t\tparam\n\t});\n\treturn entries;\n}\nconst configKey = (address, d) => {\n\tconst segments = address.split(\".\").filter((s) => s.length > 0);\n\tconst owner = d.owner === \"service\" ? [] : [d.owner.input];\n\treturn [\n\t\t\"COMPOSER\",\n\t\t...segments,\n\t\t...owner,\n\t\td.name\n\t].join(\"_\").toUpperCase();\n};\n/**\n* Typed value → its stored string. Service-own literals are JSON-encoded; a\n* dependency-input value is a provisioning ref at deploy (and a resolved\n* string at boot) and passes through untouched — LANDMINE: JSON-encoding it\n* would break the ordering edge Alchemy resolves through it.\n*/\nfunction encode(owner, value) {\n\treturn owner === \"service\" ? JSON.stringify(value) : blindCast(value);\n}\n/** Reverses `encode`: JSON-parse a service-own value, take a dependency-input value raw. */\nfunction decode(owner, raw) {\n\treturn owner === \"service\" ? JSON.parse(raw) : raw;\n}\nconst PARAM_POINTER_PREFIX = \"@composer-param-pointer:\";\n/** True iff `raw` is a param pointer row (as opposed to a JSON-encoded literal). */\nconst isParamPointerRow = (raw) => raw.startsWith(PARAM_POINTER_PREFIX);\n/** Builds a param pointer row's stored value from the platform var NAME it points to. */\nconst encodeParamPointer = (name) => `${PARAM_POINTER_PREFIX}${name}`;\n/** Reverses `encodeParamPointer`: the platform var NAME a pointer row points to. */\nconst decodeParamPointer = (raw) => raw.slice(24);\nfunction coerce(raw, d, key) {\n\tif (!(raw !== void 0 && raw !== \"\")) {\n\t\tif (d.param.default !== void 0) return d.param.default;\n\t\tif (d.param.optional === true) return void 0;\n\t\tthrow new Error(`missing required config param \"${d.name}\" (env ${key})`);\n\t}\n\tif (d.owner === \"service\" && isParamPointerRow(raw)) return coerceEnvSourcedParam(raw, d, key);\n\ttry {\n\t\treturn standardValidateSync(d.param.schema, decode(d.owner, raw));\n\t} catch (cause) {\n\t\tconst message = cause instanceof Error ? cause.message : String(cause);\n\t\tthrow new Error(`invalid value for config param \"${d.name}\" (env ${key}): ${message}`);\n\t}\n}\n/**\n* Boot resolution for an env-sourced param: double-lookup (pointer → platform\n* var), then the param's own schema on the raw string — no JSON decode, and\n* no redaction (it's config, not a secret). An UNSET platform var is a loud\n* boot failure naming both the param and the platform var; an EMPTY string is\n* not special-cased here — it reaches the schema like any other value, so it\n* passes iff the schema accepts it (deliberately unlike a literal param's own\n* \"\"-means-absent rule, and unlike a secret's non-empty requirement).\n*/\nfunction coerceEnvSourcedParam(raw, d, key) {\n\tconst platformVar = decodeParamPointer(raw);\n\tconst value = process.env[platformVar];\n\tif (value === void 0) throw new Error(`env-sourced config param \"${d.name}\" (env ${key} → ${platformVar}) is unset: the platform variable \"${platformVar}\" was not injected — the deploy did not provision it.`);\n\ttry {\n\t\treturn standardValidateSync(d.param.schema, value);\n\t} catch (cause) {\n\t\tconst message = cause instanceof Error ? cause.message : String(cause);\n\t\tthrow new Error(`invalid value for env-sourced config param \"${d.name}\" (env ${key} → ${platformVar}): ${message}`);\n\t}\n}\n/**\n* Boot: read each declared param from env by its key, reverse the param's own\n* serialization (missing/invalid fails loudly), assemble the typed Config.\n* Secrets ride a separate channel (deserializeSecrets), not this one.\n*/\nconst deserialize = (node, address) => {\n\tconst service = {};\n\tconst inputs = {};\n\tfor (const d of paramEntries(node)) {\n\t\tconst key = configKey(address, d);\n\t\tconst value = coerce(process.env[key], d, key);\n\t\tif (d.owner === \"service\") service[d.name] = value;\n\t\telse {\n\t\t\tlet bucket = inputs[d.owner.input];\n\t\t\tif (bucket === void 0) {\n\t\t\t\tbucket = {};\n\t\t\t\tinputs[d.owner.input] = bucket;\n\t\t\t}\n\t\t\tbucket[d.name] = value;\n\t\t}\n\t}\n\treturn {\n\t\tservice,\n\t\tinputs\n\t};\n};\n/**\n* run()'s setup step: write the resolved config to the environment under\n* address-free keys (configKey(\"\", d) + each serialize suffix), which load()\n* reads back with no address. Uses env, not a module variable, because a\n* framework may fork worker processes that inherit env but not memory.\n* Writes only these keys; nothing else is touched.\n*/\nconst stash = (node, config) => {\n\tfor (const d of paramEntries(node)) {\n\t\tconst value = d.owner === \"service\" ? config.service[d.name] : config.inputs[d.owner.input]?.[d.name];\n\t\tif (value === void 0) continue;\n\t\tprocess.env[configKey(\"\", d)] = encode(d.owner, value);\n\t}\n};\n/** The pointer-row key for a secret slot: COMPOSER_<addr>_<slot> (secrets are service-level). */\nconst secretKey = (address, slot) => configKey(address, {\n\towner: \"service\",\n\tname: slot\n});\n/**\n* Deploy: the pointer rows for a node's secret slots — each slot's key mapped to\n* the platform NAME the root bound it to (looked up in `graph.secrets`). Never a\n* value. A declared slot with no binding is a Load-invariant violation (Load\n* binds every slot), surfaced loudly here rather than written as a blank row.\n*/\nfunction secretPointerRows(node, address, bindings) {\n\tconst rows = [];\n\tfor (const slot of Object.keys(node.secretSlots)) {\n\t\tconst binding = bindings.find((b) => b.serviceAddress === address && b.slot === slot);\n\t\tif (binding === void 0) throw new Error(`secret slot \"${slot}\" of \"${address}\" has no bound platform name — Load should have bound it (ADR-0029).`);\n\t\trows.push({\n\t\t\tkey: secretKey(address, slot),\n\t\t\tname: secretName(binding)\n\t\t});\n\t}\n\treturn rows;\n}\n/**\n* Boot: resolve every secret slot to its value by double-lookup — read the\n* pointer key (the platform NAME), then read that platform var. A missing\n* pointer or a missing/empty platform value is a loud failure naming both keys.\n* Returns a plain Record for core's `hydrateSecrets` to box.\n*/\nconst deserializeSecrets = (node, address) => {\n\tconst values = {};\n\tfor (const slot of Object.keys(node.secretSlots)) {\n\t\tconst key = secretKey(address, slot);\n\t\tconst name = process.env[key];\n\t\tif (name === void 0 || name === \"\") throw new Error(`missing secret pointer for slot \"${slot}\" (env ${key}) — the deploy did not write it.`);\n\t\tconst value = process.env[name];\n\t\tif (value === void 0 || value === \"\") throw new Error(`secret \"${slot}\" is not provisioned (env ${key} → ${name}): the platform var \"${name}\" is unset or empty.`);\n\t\tvalues[slot] = value;\n\t}\n\treturn values;\n};\n/**\n* run()'s setup step for secrets: re-emit each slot's pointer NAME under its\n* address-free key, so the address-free `deserializeSecrets` double-looks-up\n* identically. Never the value — the value stays only in the platform var.\n*/\nconst stashSecrets = (node, address) => {\n\tfor (const slot of Object.keys(node.secretSlots)) {\n\t\tconst name = process.env[secretKey(address, slot)];\n\t\tif (name === void 0) continue;\n\t\tprocess.env[secretKey(\"\", slot)] = name;\n\t}\n};\n/**\n* Boot: for each reserved provider param, read its address-scoped row through\n* the same `coerce` a declared param uses (JSON-decode, schema-validate), and\n* re-emit it address-free — `stash`'s counterpart for this separate\n* declaration space. A param is declared optional here unconditionally: an\n* absent row means \"never provisioned\" (local dev, tests, a provider with no\n* registered value for this deploy), never a boot failure, so nothing is\n* stashed and the runtime reader that owns this slot falls back to its own\n* pass-through behavior.\n*/\nfunction stashProviderParams(entries, address) {\n\tfor (const entry of entries) {\n\t\tconst d = {\n\t\t\towner: \"service\",\n\t\t\tname: entry.name,\n\t\t\tparam: {\n\t\t\t\tschema: entry.schema,\n\t\t\t\toptional: true\n\t\t\t}\n\t\t};\n\t\tconst key = configKey(address, d);\n\t\tconst value = coerce(process.env[key], d, key);\n\t\tif (value === void 0) continue;\n\t\tprocess.env[configKey(\"\", d)] = encode(\"service\", value);\n\t}\n}\n/** The framework-resolved origin row: COMPOSER_<addr>_ORIGIN. Written per\n* compute service at serialize — the service's own provisioned endpoint URL,\n* riding the reserved-provider-param machinery (`origin-key.ts`'s\n* `ORIGIN_PARAM`); never a declared param, never in config(). A harness with\n* no deploy behind it supplies it by setting `COMPOSER_ORIGIN` to the\n* JSON-encoded origin URL — exactly how the existing entrypoint tests supply\n* their other `COMPOSER_*` rows. */\nconst ORIGIN_KEY_NAME = \"ORIGIN\";\n/**\n* Reads this service's origin back out of the address-free stash\n* `stashProviderParams` wrote for the ORIGIN entry. `COMPOSER_ORIGIN` unset is\n* a loud failure — a deployed environment always writes it, so an unset row\n* means either a local harness that hasn't supplied it or a boot() called\n* before run().\n*/\nfunction readOrigin() {\n\tconst d = {\n\t\towner: \"service\",\n\t\tname: ORIGIN_KEY_NAME,\n\t\tparam: {\n\t\t\tschema: type(\"string\"),\n\t\t\toptional: true\n\t\t}\n\t};\n\tconst key = configKey(\"\", d);\n\tconst value = coerce(process.env[key], d, key);\n\tif (value === void 0) throw new Error(\"this service's origin is not available (env COMPOSER_ORIGIN is unset) — a deployed environment writes it automatically; a local harness must supply it like any other config value (set COMPOSER_ORIGIN to the JSON-encoded origin URL).\");\n\treturn blindCast(value);\n}\n/** Synchronous Standard Schema validation — see the matching note in core's `config.ts`. */\nfunction standardValidateSync(schema, value) {\n\tconst result = schema[\"~standard\"].validate(value);\n\tif (result instanceof Promise) throw new Error(\"config param schema validation must be synchronous — async Standard Schema validators are not supported for config params\");\n\tif (result.issues !== void 0) throw new Error(`config param validation failed: ${result.issues.map((issue) => issue.message).join(\"; \")}`);\n\treturn result.value;\n}\n//#endregion\nexport { encode as a, readOrigin as c, stashProviderParams as d, stashSecrets as f, deserializeSecrets as i, secretPointerRows as l, configKey as n, encodeParamPointer as o, deserialize as r, paramEntries as s, ORIGIN_KEY_NAME as t, stash as u };\n\n//# sourceMappingURL=serializer-CJiOhF2d.mjs.map"],"mappings":"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"}
@@ -1,6 +1,6 @@
1
1
  import { ConfigParam } from "@prisma/composer";
2
2
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
- //#region ../../1-prisma-cloud/1-extensions/target/dist/serializer-BD_6nkr4.d.mts
3
+ //#region ../../1-prisma-cloud/1-extensions/target/dist/serializer-Cx5slrV4.d.mts
4
4
  //#region src/serializer.d.ts
5
5
  /** One declared param, paired with its owner and the raw ConfigParam (functions included). */
6
6
  interface ParamEntry {
@@ -33,4 +33,4 @@ interface ProviderParamEntry {
33
33
  }
34
34
  //#endregion
35
35
  export { configKey as n, ProviderParamEntry as t };
36
- //# sourceMappingURL=serializer-BD_6nkr4-DWn5NNTC.d.mts.map
36
+ //# sourceMappingURL=serializer-Cx5slrV4-xJfH6EWS.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializer-Cx5slrV4-xJfH6EWS.d.mts","names":[],"sources":["../../../1-prisma-cloud/1-extensions/target/dist/serializer-Cx5slrV4.d.mts"],"mappings":";;;;;UAIU;WACC;aACE;;WAEF;WACA,OAAO;;cAEJ,YAAY,iBAAiB;EACzC,OAAO;EACP;;;;;;;;;;;;;;UAcQ;WACC;WACA,QAAQ;WACR"}
@@ -1,38 +1,34 @@
1
- import { BuildAdapter, Contract, DependencyEnd, Deps, Expose, HydratedDeps, InputValueOf, ModuleNode, NODE, RunnableServiceNode, ServiceNode } from "@prisma/composer";
2
- import { StandardSchemaV1 } from "@standard-schema/spec";
1
+ import { BuildAdapter, Contract, DependencyEnd, Deps, Expose, HydratedDeps, ModuleNode, NODE, Params, RunnableServiceNode, SecretValues, Secrets, ServiceNode, Values } from "@prisma/composer";
2
+ import "@standard-schema/spec";
3
3
  //#region ../../1-prisma-cloud/1-extensions/target/dist/index.d.mts
4
4
  //#endregion
5
5
  //#region src/compute.d.ts
6
6
  declare const reservedParams: {
7
- readonly port: import("@prisma/composer").ConfigParam<StandardSchemaV1<number, number>>;
7
+ readonly port: import("@prisma/composer").ConfigParam<import("@standard-schema/spec").StandardSchemaV1<number, number>>;
8
8
  };
9
9
  type ReservedParams = typeof reservedParams;
10
10
  /**
11
- * A Prisma Compute service — declarations only (deps + one input schema +
12
- * build + the ports it exposes), no descriptor. The reserved `port` param
13
- * rides its own channel (ADR-0042 leaves it untouched); a dependency named
14
- * like it fails at authoring.
11
+ * A Prisma Compute service — declarations only (deps + params + build + the
12
+ * ports it exposes), no descriptor. `params` merges with the reserved
13
+ * `ReservedParams` (`port`); a user param whose name collides with a reserved
14
+ * one fails at authoring, the same way a colliding dependency name does.
15
15
  *
16
16
  * · run(address, boot) — the process controller: deserialize the platform
17
17
  * environment (keyed off `address`, the extension's ONE env read) into a
18
- * typed Config, re-emit it (and the input document row) under address-free
19
- * process-local stash keys, then call boot() to start the app's entry.
20
- * · load() / input() — called from inside the app's entry: read the stash;
21
- * load() hydrates + memoizes the deps, input() parses the input document,
22
- * replaces each `$secret` pointer with a redacting box over the named
23
- * platform var, validates with the declared schema, and memoizes (ADR-0042).
18
+ * typed Config, re-emit it under address-free process-local stash keys,
19
+ * then call boot() to start the app's entry.
20
+ * · load() / config() — called from inside the app's entry: read the stash;
21
+ * load() hydrates + memoizes the deps, config() returns the typed params.
22
+ * Separate accessors so a dep and a param never share a namespace (ADR-0021).
24
23
  * · origin() — this service's platform-assigned public origin, read from the
25
24
  * stash `run()` populates; memoized per process.
26
- * · port() — this service's resolved reserved port (the value `run()` routes
27
- * to and exports as PORT), read from that same stash via #processConfig();
28
- * defaults to 3000 when the platform binds none.
29
25
  *
30
26
  * The underlying node carries `extension: '@prisma/composer-prisma-cloud'` —
31
27
  * the control-plane registry key `prisma-composer deploy` resolves through the
32
28
  * app's `prisma-composer.config.ts` (ADR-0017). This module loads nothing at
33
29
  * deploy time; nodes are pure data until run() or load() is called.
34
30
  */
35
- declare class ComputeService<D extends Deps, I extends StandardSchemaV1 | undefined, E extends Expose> implements RunnableServiceNode<D, ReservedParams, E, I> {
31
+ declare class ComputeService<D extends Deps, P extends Params, E extends Expose, S extends Secrets> implements RunnableServiceNode<D, P & ReservedParams, E, S> {
36
32
  #private;
37
33
  readonly [NODE]: true;
38
34
  readonly kind: 'service';
@@ -40,22 +36,19 @@ declare class ComputeService<D extends Deps, I extends StandardSchemaV1 | undefi
40
36
  readonly extension: string;
41
37
  readonly type: string;
42
38
  readonly inputs: D;
43
- readonly params: ReservedParams;
44
- readonly inputSchema: I;
39
+ readonly params: P & ReservedParams;
40
+ readonly secretSlots: S;
45
41
  readonly build: BuildAdapter;
46
42
  readonly expose: E | undefined;
47
- constructor(node: ServiceNode<D, ReservedParams, E, I>);
43
+ constructor(node: ServiceNode<D, P & ReservedParams, E, S>);
48
44
  run(address: string, boot: () => Promise<unknown>): Promise<unknown>;
49
45
  load(): HydratedDeps<D>;
50
- input(): InputValueOf<I>;
46
+ config(): Values<P & ReservedParams>;
47
+ secrets(): SecretValues<S>;
51
48
  /** This service's platform-assigned public origin — read from the stash
52
49
  * run() populates and memoized per process. Throws if called before run()
53
50
  * has stashed it (readOrigin's pinned message). */
54
51
  origin(): string;
55
- /** This service's resolved reserved port — the value run() routes to and
56
- * exports as PORT — read the same way load() reads the stash. Defaults to
57
- * 3000 when the platform binds none. */
58
- port(): number;
59
52
  }
60
53
  //#endregion
61
54
  //#region src/postgres.d.ts
@@ -69,7 +62,7 @@ interface CredentialsConfig {
69
62
  readonly secretAccessKey: string;
70
63
  }
71
64
  //#endregion
72
- //#region ../../1-prisma-cloud/2-shared-modules/storage/dist/storage-service-zDshPwCj.d.mts
65
+ //#region ../../1-prisma-cloud/2-shared-modules/storage/dist/storage-service-CVf6j3HC.d.mts
73
66
  //#region src/contract.d.ts
74
67
  interface S3Config {
75
68
  readonly url: string;
@@ -86,14 +79,16 @@ type S3Contract = typeof s3Contract;
86
79
  declare function s3(): DependencyEnd<S3Config, typeof s3Contract>;
87
80
  //#endregion
88
81
  //#region src/storage-service.d.ts
89
- declare function storageService(): ComputeService<{
82
+ declare function storageService(opts: {
83
+ bucket: string;
84
+ }): ComputeService<{
90
85
  db: import("@prisma/composer").DependencyEnd<PostgresConfig, import("@prisma/composer").Contract<"postgres", PostgresConfig>>;
91
86
  credentials: import("@prisma/composer").DependencyEnd<CredentialsConfig, import("@prisma/composer").Contract<"credentials", CredentialsConfig>>;
92
- }, import("arktype/internal/variants/object.ts").ObjectType<{
93
- bucket: string;
94
- }, {}>, {
87
+ }, {
88
+ bucket: import("@prisma/composer").ConfigParam<import("@standard-schema/spec").StandardSchemaV1<string, string>>;
89
+ }, {
95
90
  store: import("@prisma/composer").Contract<"s3", S3Config>;
96
- }>;
91
+ }, Record<never, never>>;
97
92
  //#endregion
98
93
  //#region ../../1-prisma-cloud/2-shared-modules/storage/dist/index.d.mts
99
94
  //#region src/storage-module.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../../../1-prisma-cloud/1-extensions/target/dist/index.d.mts","../../../../1-prisma-cloud/2-shared-modules/storage/dist/storage-service-zDshPwCj.d.mts","../../../../1-prisma-cloud/2-shared-modules/storage/dist/index.d.mts"],"mappings":";;;;;cA2Cc;WACH,+BAA+B,YAAY;;KAEjD,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;cA0Bf,eAAe,UAAU,MAAM,UAAU,8BAA8B,UAAU,mBAAmB,oBAAoB,GAAG,gBAAgB,GAAG;;YAEhJ;WACD;WACA;WACA;WACA;WACA,QAAQ;WACR,QAAQ;WACR,aAAa;WACb,OAAO;WACP,QAAQ;EACjB,YAAY,MAAM,YAAY,GAAG,gBAAgB,GAAG;EACpD,IAAI,iBAAiB,YAAY,mBAAmB;EACpD,QAAQ,aAAa;EACrB,SAAS,aAAa;;;;EAItB;;;;EAIA;;;;UA8DQ;WACC;;;;UAiDD;WACC;WACA;;;;;UC/MD;WACC;WACA;WACA;WACA;;cAEG,YAAY,eAAe;KACpC,oBAAoB;;;;;iBAKR,MAAM,cAAc,iBAAiB;;;iBAGrC,kBAMgC;EAL/C,6BAA6B,cADd,yCACsG,qBAAzC;EAC5E,sCAAsC,cADqI,4CAC1C,wBAA5C;iDACtC;EAC/C;;EAEA,gCAAgC,eAAe;;;;;iBCpBhC,QAAQ;EACvB;EACA;IACE,WAAW;EACb,cAAc;GACb"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../../1-prisma-cloud/1-extensions/target/dist/index.d.mts","../../../../1-prisma-cloud/2-shared-modules/storage/dist/storage-service-CVf6j3HC.d.mts","../../../../1-prisma-cloud/2-shared-modules/storage/dist/index.d.mts"],"mappings":";;;;;cA0Cc;WACH,+BAA+B,4CAA4C;;KAEjF,wBAAwB;;;;;;;;;;;;;;;;;;;;;;cAsBf,eAAe,UAAU,MAAM,UAAU,QAAQ,UAAU,QAAQ,UAAU,oBAAoB,oBAAoB,GAAG,IAAI,gBAAgB,GAAG;;YAEjJ;WACD;WACA;WACA;WACA;WACA,QAAQ;WACR,QAAQ,IAAI;WACZ,aAAa;WACb,OAAO;WACP,QAAQ;EACjB,YAAY,MAAM,YAAY,GAAG,IAAI,gBAAgB,GAAG;EACxD,IAAI,iBAAiB,YAAY,mBAAmB;EACpD,QAAQ,aAAa;EACrB,UAAU,OAAO,IAAI;EACrB,WAAW,aAAa;;;;EAIxB;;;;UA+DQ;WACC;;;;UAiDD;WACC;WACA;;;;;UCxMD;WACC;WACA;WACA;WACA;;cAEG,YAAY,eAAe;KACpC,oBAAoB;;;;;iBAKR,MAAM,cAAc,iBAAiB;;;iBAGrC,eAAe;EAC9B;IAQC;EAND,6BAA6B,cAHd,yCAGsG,qBAAzC;EAC5E,sCAAsC,cADqI,4CAC1C,wBAA5C;;EAErF,iCAAiC,4CAA4C;;EAE7E,gCAAgC,eAAe;GAC9C;;;;iBCvBc,QAAQ;EACvB;EACA;IACE,WAAW;EACb,cAAc;GACb"}