@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.
- package/dist/compute-main.mjs +4 -20
- package/dist/compute-main.mjs.map +1 -1
- package/dist/control.d.mts +1 -1
- package/dist/control.mjs +17 -28
- package/dist/control.mjs.map +1 -1
- package/dist/cron/index.d.mts +26 -33
- package/dist/cron/index.d.mts.map +1 -1
- package/dist/cron/index.mjs +77 -202
- package/dist/cron/index.mjs.map +1 -1
- package/dist/cron/scheduler-entrypoint.mjs +114 -133
- package/dist/cron/scheduler-entrypoint.mjs.map +1 -1
- package/dist/cron/scheduler-service.mjs +76 -200
- package/dist/cron/scheduler-service.mjs.map +1 -1
- package/dist/email/email-entrypoint.mjs +126 -162
- package/dist/email/email-entrypoint.mjs.map +1 -1
- package/dist/email/email-service.mjs +79 -230
- package/dist/email/email-service.mjs.map +1 -1
- package/dist/email/index.d.mts +29 -33
- package/dist/email/index.d.mts.map +1 -1
- package/dist/email/index.mjs +84 -236
- package/dist/email/index.mjs.map +1 -1
- package/dist/email/testing.mjs +89 -112
- package/dist/email/testing.mjs.map +1 -1
- package/dist/index.d.mts +43 -51
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +51 -47
- package/dist/index.mjs.map +1 -1
- package/dist/local-target.mjs +1 -1
- package/dist/local-target.mjs.map +1 -1
- package/dist/{secret-BVGxqHxY-DYDfiULl.mjs → param-BTzY0ne5-CW6ojZ3E.mjs} +4 -45
- package/dist/param-BTzY0ne5-CW6ojZ3E.mjs.map +1 -0
- package/dist/{preflight-names-CpJUd9ZA-BCU-W3cT.mjs → preflight-names-BPL-qsZF-BfoRgbgb.mjs} +14 -30
- package/dist/{preflight-names-CpJUd9ZA-BCU-W3cT.mjs.map → preflight-names-BPL-qsZF-BfoRgbgb.mjs.map} +1 -1
- package/dist/{provisioned-edges-Cxy18aoh-CUnaY96r.mjs → provisioned-edges-C1wSO3cx-YC5C19f9.mjs} +3 -3
- package/dist/{provisioned-edges-Cxy18aoh-CUnaY96r.mjs.map → provisioned-edges-C1wSO3cx-YC5C19f9.mjs.map} +1 -1
- package/dist/secret-rz_ZqNeq-_xd97Jd9.mjs +47 -0
- package/dist/secret-rz_ZqNeq-_xd97Jd9.mjs.map +1 -0
- package/dist/serializer-CJiOhF2d-DJUjQj1i.mjs +251 -0
- package/dist/serializer-CJiOhF2d-DJUjQj1i.mjs.map +1 -0
- package/dist/{serializer-BD_6nkr4-DWn5NNTC.d.mts → serializer-Cx5slrV4-xJfH6EWS.d.mts} +2 -2
- package/dist/serializer-Cx5slrV4-xJfH6EWS.d.mts.map +1 -0
- package/dist/storage/index.d.mts +26 -31
- package/dist/storage/index.d.mts.map +1 -1
- package/dist/storage/index.mjs +89 -215
- package/dist/storage/index.mjs.map +1 -1
- package/dist/storage/storage-entrypoint.mjs +122 -147
- package/dist/storage/storage-entrypoint.mjs.map +1 -1
- package/dist/storage/storage-service.mjs +87 -212
- package/dist/storage/storage-service.mjs.map +1 -1
- package/dist/streams/index.d.mts +22 -29
- package/dist/streams/index.d.mts.map +1 -1
- package/dist/streams/index.mjs +88 -213
- package/dist/streams/index.mjs.map +1 -1
- package/dist/streams/streams-entrypoint.mjs +118 -139
- package/dist/streams/streams-entrypoint.mjs.map +1 -1
- package/dist/streams/streams-service.mjs +87 -212
- package/dist/streams/streams-service.mjs.map +1 -1
- package/dist/testing.d.mts +5 -19
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +3 -11
- package/dist/testing.mjs.map +1 -1
- package/package.json +18 -18
- package/dist/secret-BVGxqHxY-DYDfiULl.mjs.map +0 -1
- package/dist/serializer-BD_6nkr4-DWn5NNTC.d.mts.map +0 -1
- package/dist/serializer-sVE4UAmg-CikRngbR.mjs +0 -475
- package/dist/serializer-sVE4UAmg-CikRngbR.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","names":["#value","#resolved","#loadedDeps","#processConfig","#loadedInput","#origin"],"sources":["../../../../1-prisma-cloud/2-shared-modules/email/dist/testing.mjs"],"sourcesContent":["import { type } from \"arktype\";\n//#region ../../../0-framework/2-authoring/node/dist/index.mjs\nconst nodeBuild = (opts) => ({\n\textension: \"@prisma/composer/node\",\n\ttype: \"node\",\n\tmodule: opts.module,\n\tentry: opts.entry,\n\t...opts.dir === void 0 ? {} : { dir: opts.dir }\n});\n//#endregion\n//#region ../../../0-framework/0-foundation/foundation/dist/casts-DpaahrlC.mjs\n/**\n* **Last-resort escape hatch for unsafe type assertions. Not a sanctioned tool to reach for.**\n*\n* Before reaching for `blindCast`, **rewrite the surrounding code so the cast becomes\n* unnecessary**: tighten an input type, add a runtime check that narrows via a type\n* predicate, restructure a generic so the compiler can see the relationship you're\n* asserting, or use {@link castAs} when the value already satisfies the target type.\n* Only when no rewrite is feasible does `blindCast` become the right answer — and at\n* that point, the `Reason` literal you supply must articulate the compromise in\n* language a reviewer can evaluate.\n*\n* The reviewer **will** validate the `Reason`. If it doesn't hold up under scrutiny,\n* that is not a signal to soften the reason; it is a signal to go back and solve the\n* underlying type-system problem properly. An unconvincing justification is rework,\n* not a free pass.\n*\n* `blindCast` is the auditable form of `as Foo` / `as unknown as Foo`: it bypasses\n* the compiler's checks (the input type is `unknown`, the output type is whatever the\n* caller asks for), but it forces the unsafety to be named at the call site instead of\n* smuggled in via a bare `as`. The `Reason` type parameter exists only at compile\n* time — it is not present in the emitted JavaScript — but it is grep-able and\n* visible to future readers.\n*\n* @example\n* ```typescript\n* const stringValue = blindCast<\n* string,\n* \"JSON.parse returns `unknown`; this field is documented to be a string in the API contract\"\n* >(parsed[key]);\n* ```\n*\n* @typeParam TargetType - The type the caller is asserting the input has.\n* @typeParam _Reason - A string literal describing why bypassing the type system is necessary here.\n* Only meaningful at compile time. The reviewer evaluates whether it justifies the unsafety.\n*/\nfunction blindCast(input) {\n\treturn input;\n}\n//#endregion\n//#region ../../../0-framework/1-core/core/dist/graph-DgbALPDo.mjs\n/**\n* Core model: node types and the factories that construct them, plain frozen\n* data objects. A node's `extension` + `type` form its deploy-time registry key (ADR-0017).\n*/\nconst NODE = Symbol.for(\"prisma:node\");\nconst PROVISION_NEED = blindCast(Symbol.for(\"prisma:provision-need\"));\n/** Builds an opaque provisioning need — the declaring package's own brand plus whatever payload its provisioner reads back. */\nfunction provisionNeed(brand, payload) {\n\treturn blindCast(Object.freeze({\n\t\t[PROVISION_NEED]: true,\n\t\tbrand,\n\t\tpayload\n\t}));\n}\nfunction requireType(type, factory) {\n\tif (typeof type !== \"string\" || type.length === 0) throw new Error(`${factory}() requires a non-empty node type.`);\n}\nfunction requireName(name, factory) {\n\tif (typeof name !== \"string\" || name.length === 0) throw new Error(`${factory}() requires a non-empty name.`);\n}\nfunction requireExtension(extension, factory) {\n\tif (typeof extension !== \"string\" || extension.length === 0) throw new Error(`${factory}() requires a non-empty extension (the authoring extension's package name).`);\n}\n/**\n* Core's grammar for every name that becomes a config-key segment —\n* addresses, input/param/secret names: ASCII letters and digits only.\n* Conservative by design so any target medium — POSIX env-var keys\n* included — can uppercase and \"_\"-join segments without escaping.\n*/\nfunction isConfigKeySegment(name) {\n\treturn /^[A-Za-z0-9]+$/.test(name);\n}\nfunction requireConfigKeySegmentName(name, kind, factory) {\n\tif (!isConfigKeySegment(name)) throw new Error(`${factory}() ${kind} name \"${name}\" must contain only ASCII letters and digits ([A-Za-z0-9]) — declared names derive deterministic config keys, uppercased and joined with \"_\" (an input \"db\"'s param \"url\" becomes config key \"DB_URL\"), so an underscore inside a name collides with that separator and any other character has no place in a config key. \"${name}\" would put \"${name.toUpperCase()}\" inside the derived key.`);\n}\nfunction requireConfigKeySegmentNames(names, kind, factory) {\n\tfor (const name of names) requireConfigKeySegmentName(name, kind, factory);\n}\nfunction freezeParams(params) {\n\tconst frozen = {};\n\tfor (const [name, param] of Object.entries(params)) frozen[name] = Object.freeze({ ...param });\n\treturn Object.freeze(frozen);\n}\n/** A frozen shallow copy that keeps the caller's declared type. */\nfunction frozenShallowCopy(obj) {\n\treturn blindCast(Object.freeze({ ...obj }));\n}\n/**\n* Constructs a branded, frozen Service node — declarations only (inputs,\n* params, the input schema, build adapter, and the ports it exposes). Pure;\n* carries no runtime behavior.\n*/\nfunction service(def) {\n\trequireName(def.name, \"service\");\n\trequireExtension(def.extension, \"service\");\n\trequireType(def.type, \"service\");\n\trequireConfigKeySegmentNames(Object.keys(def.inputs), \"input\", \"service\");\n\trequireConfigKeySegmentNames(Object.keys(def.params), \"param\", \"service\");\n\tif (def.input !== void 0 && typeof def.input[\"~standard\"]?.validate !== \"function\") throw new Error(\"service() `input` must be a Standard Schema (an object with a \\\"~standard\\\".validate function) — see https://standardschema.dev (ADR-0042).\");\n\treturn Object.freeze({\n\t\t[NODE]: true,\n\t\tkind: \"service\",\n\t\tname: def.name,\n\t\textension: def.extension,\n\t\ttype: def.type,\n\t\tinputs: frozenShallowCopy(def.inputs),\n\t\tparams: freezeParams(def.params),\n\t\tinputSchema: blindCast(def.input),\n\t\tbuild: Object.freeze({ ...def.build }),\n\t\texpose: def.expose !== void 0 ? frozenShallowCopy(def.expose) : void 0\n\t});\n}\n/**\n* Constructs a branded, frozen DependencyEnd. `required` (if given) is the\n* contract Load compares a wired ref against via `satisfies()`; an unnamed\n* end's diagnostic `name` falls back to its `type`.\n*/\nfunction dependency(def) {\n\trequireType(def.type, \"dependency\");\n\trequireConfigKeySegmentNames(Object.keys(def.connection.params), \"param\", \"dependency\");\n\tconst connection = Object.freeze({\n\t\tparams: freezeParams(def.connection.params),\n\t\thydrate: def.connection.hydrate\n\t});\n\treturn Object.freeze({\n\t\t[NODE]: true,\n\t\tkind: \"dependency\",\n\t\tname: def.name !== void 0 && def.name.length > 0 ? def.name : def.type,\n\t\ttype: def.type,\n\t\tconnection,\n\t\trequired: def.required\n\t});\n}\n//#endregion\n//#region ../../../0-framework/0-foundation/foundation/dist/secret-DoWGmN7m.mjs\n/**\n* A value wrapper that redacts everywhere except the one explicit reader,\n* `expose()`. Sensitivity is carried by the TYPE (`SecretBox<T>`), not a flag a\n* sink must remember to check: `String(box)`, template interpolation,\n* `JSON.stringify`, and `console.log`/`util.inspect` all print `[REDACTED]`, so\n* a secret can't leak through an accidental log or serialization.\n*\n* Every box carries a brand property keyed by the registered symbol\n* `Symbol.for('prisma:secret-box')`, which is what `isSecretString` checks. A\n* symbol key is invisible to `JSON.stringify` and `Object.keys`, so the box's\n* public shape still matches the platform's own `secrecy` type\n* (pdp-control-plane).\n*/\nconst REDACTED = \"[REDACTED]\";\nconst SECRET_BOX = blindCast(Symbol.for(\"prisma:secret-box\"));\nvar SecretBox = class {\n\t[SECRET_BOX] = true;\n\t#value;\n\tconstructor(value) {\n\t\tthis.#value = value;\n\t}\n\t/** The sole explicit door to the wrapped value. */\n\texpose() {\n\t\treturn this.#value;\n\t}\n\ttoString() {\n\t\treturn REDACTED;\n\t}\n\ttoJSON() {\n\t\treturn REDACTED;\n\t}\n\tvalueOf() {\n\t\treturn REDACTED;\n\t}\n\t[Symbol.toPrimitive]() {\n\t\treturn REDACTED;\n\t}\n\t[Symbol.for(\"nodejs.util.inspect.custom\")]() {\n\t\treturn REDACTED;\n\t}\n};\n//#endregion\n//#region ../../../0-framework/1-core/core/dist/index.mjs\nfunction scalarSchema(name, check) {\n\treturn { \"~standard\": {\n\t\tversion: 1,\n\t\tvendor: \"@prisma/composer\",\n\t\tvalidate: (value) => check(value) ? { value } : { issues: [{ message: `expected ${name}, got ${typeof value}` }] }\n\t} };\n}\nconst stringSchema = scalarSchema(\"string\", (v) => typeof v === \"string\");\nconst numberSchema = scalarSchema(\"number\", (v) => typeof v === \"number\" && Number.isFinite(v));\nfunction withFacets(schema, opts) {\n\treturn {\n\t\tschema,\n\t\t...opts.optional !== void 0 ? { optional: opts.optional } : {},\n\t\t...opts.default !== void 0 ? { default: opts.default } : {},\n\t\t...opts.provision !== void 0 ? { provision: opts.provision } : {}\n\t};\n}\n/** A string-valued param. */\nfunction string(opts = {}) {\n\treturn withFacets(stringSchema, opts);\n}\n/** A number-valued param. */\nfunction number(opts = {}) {\n\treturn withFacets(numberSchema, opts);\n}\n/**\n* Synchronous hydrate — what the node's `load()` uses so\n* `const { db } = service.load()` reads without `await`. Requires every\n* connection.hydrate to return synchronously; a Promise return is a loud error\n* naming the input (an async client factory must use the async `hydrate` path).\n*/\nfunction hydrateSync(root, config) {\n\tconst deps = {};\n\tfor (const [name, inputNode] of Object.entries(root.inputs)) {\n\t\tconst values = config.inputs[name] ?? {};\n\t\tconst client = inputNode.connection.hydrate(values);\n\t\tif (client instanceof Promise) throw new Error(`Connection hydrate for input \"${name}\" returned a Promise; load() requires a synchronous client factory.`);\n\t\tdeps[name] = client;\n\t}\n\treturn deps;\n}\n//#endregion\n//#region ../../1-extensions/target/dist/serializer-sVE4UAmg.mjs\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/** 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* The input document rides its own channel (readInput), 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 input document's own row name; its full key is COMPOSER_<addr>_INPUT. */\nconst INPUT_KEY_NAME = \"INPUT\";\n/** The input document row's key for a service address. */\nconst inputKey = (address) => configKey(address, {\n\towner: \"service\",\n\tname: INPUT_KEY_NAME\n});\nconst SECRET_MARKER = \"$secret\";\nconst ESCAPED_KEY = /^\\$\\$+secret$/;\n/** True for the framework's secret pointer: `{ \"$secret\": \"<PLATFORM_VAR>\" }` and nothing else. */\nfunction isSecretPointer(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value) && Object.keys(value).length === 1 && SECRET_MARKER in value && typeof value[SECRET_MARKER] === \"string\";\n}\n/** A plain data object (not an array, not a class instance) — the only object shape a binding/document may nest. */\nfunction isPlainObject(value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\tconst proto = Object.getPrototypeOf(value);\n\treturn proto === Object.prototype || proto === null;\n}\n/**\n* Boot: read the one input document row (address-free after run()'s\n* re-stash), swap each `$secret` pointer for a redacting box over the named\n* platform var, unescape reserved keys, validate with the service's own\n* schema, and return the typed object. A missing row is a loud failure naming\n* the env var — a deployed environment always writes it; a local harness must\n* supply it (set the row to the serialized input document).\n*/\nfunction readInput(node, address) {\n\tconst schema = node.inputSchema;\n\tif (schema === void 0) throw new Error(`input() called on service \"${node.name}\", which declares no input schema — declare \\`input: <schema>\\` on compute() to use it (ADR-0042).`);\n\tconst key = inputKey(address);\n\tconst raw = process.env[key];\n\tif (raw === void 0 || raw === \"\") throw new Error(`this service's input is not available (env ${key} is unset) — a deployed environment writes it automatically; a local harness must supply it like any other config value (set ${key} to the serialized input document).`);\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(raw);\n\t} catch (cause) {\n\t\tconst message = cause instanceof Error ? cause.message : String(cause);\n\t\tthrow new Error(`this service's input document is not valid JSON (env ${key}): ${message} — a deployed environment writes it automatically; a local harness must supply the serialized input document (set ${key} to it).`);\n\t}\n\tconst hydrated = hydrateInputDocument(parsed, key);\n\ttry {\n\t\treturn standardValidateSync(schema, hydrated);\n\t} catch (cause) {\n\t\tconst message = cause instanceof Error ? cause.message : String(cause);\n\t\tthrow new Error(`invalid input document (env ${key}): ${message}`);\n\t}\n}\n/** Reverses the document encoding: `$secret` pointers become redacting boxes over the named platform vars; escaped reserved keys drop one \"$\". */\nfunction hydrateInputDocument(value, key) {\n\tif (isSecretPointer(value)) {\n\t\tconst name = value[SECRET_MARKER];\n\t\tconst secret = process.env[name];\n\t\tif (secret === void 0 || secret === \"\") throw new Error(`secret input is not provisioned (env ${key} → ${name}): the platform var \"${name}\" is unset or empty.`);\n\t\treturn new SecretBox(secret);\n\t}\n\tif (Array.isArray(value)) return value.map((member) => hydrateInputDocument(member, key));\n\tif (isPlainObject(value)) {\n\t\tconst out = {};\n\t\tfor (const [k, member] of Object.entries(value)) {\n\t\t\tconst read = ESCAPED_KEY.test(k) ? k.slice(1) : k;\n\t\t\tout[read] = hydrateInputDocument(member, key);\n\t\t}\n\t\treturn out;\n\t}\n\treturn value;\n}\n/**\n* run()'s setup step for the input document: re-emit the row under its\n* address-free key, so the address-free `readInput` reads identically. The\n* document carries pointers, never values — the values stay only in their\n* platform vars.\n*/\nconst stashInput = (node, address) => {\n\tif (node.inputSchema === void 0) return;\n\tconst raw = process.env[inputKey(address)];\n\tif (raw === void 0) return;\n\tprocess.env[inputKey(\"\")] = raw;\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\n//#region ../../../0-framework/2-authoring/service-rpc/dist/index.mjs\n/** Bounded jittered backoff for retrying a dropped call. `maxRetries` is retries after the first attempt. */\nconst RETRY = {\n\tinitialDelayMs: 250,\n\tmultiplier: 2,\n\tmaxDelayMs: 5e3,\n\tmaxRetries: 5\n};\nconst IDEMPOTENCY_KEY_HEADER$1 = \"Idempotency-Key\";\nfunction sleep(ms) {\n\treturn new Promise((resolve) => setTimeout(resolve, ms));\n}\n/** Whether a non-OK response is safe to retry: 429 or any 5xx, never another 4xx. */\nfunction isRetryableStatus(status) {\n\treturn status === 429 || status >= 500;\n}\n/** The server's `{ error }` body, if the response has one — undefined otherwise. */\nasync function errorDetail(res) {\n\ttry {\n\t\tconst body = await res.json();\n\t\treturn typeof body === \"object\" && body !== null && \"error\" in body ? String(body.error) : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\n/** `<base>/rpc/<method>`, preserving a base URL's own path (e.g. a mount point). */\nfunction methodUrl(base, method) {\n\tconst normalizedBase = base.endsWith(\"/\") ? base : `${base}/`;\n\treturn new URL(`rpc/${method}`, normalizedBase).toString();\n}\n/**\n* Sends one call over `send`, retrying a thrown error, 429, or 5xx with\n* full-jitter backoff. `buildRequest` runs per attempt but carries the same\n* idempotency key each time — only the transport call repeats, not the key.\n*/\nasync function callWithRetry(send, buildRequest, method) {\n\tlet delay = RETRY.initialDelayMs;\n\tlet retries = 0;\n\tfor (;;) {\n\t\tlet res;\n\t\ttry {\n\t\t\tres = await send(buildRequest());\n\t\t} catch (err) {\n\t\t\tif (retries >= RETRY.maxRetries) throw err;\n\t\t\tretries += 1;\n\t\t\tawait sleep(Math.random() * delay);\n\t\t\tdelay = Math.min(delay * RETRY.multiplier, RETRY.maxDelayMs);\n\t\t\tcontinue;\n\t\t}\n\t\tif (res.ok) return res.json();\n\t\tif (!isRetryableStatus(res.status) || retries >= RETRY.maxRetries) {\n\t\t\tconst detail = await errorDetail(res);\n\t\t\tthrow new Error(`RPC call \"${method}\" failed: ${res.status} ${res.statusText}` + (detail !== void 0 ? ` — ${detail}` : \"\"));\n\t\t}\n\t\tretries += 1;\n\t\tawait sleep(Math.random() * delay);\n\t\tdelay = Math.min(delay * RETRY.multiplier, RETRY.maxDelayMs);\n\t}\n}\nfunction makeClient(contract, url, opts) {\n\tconst send = opts?.fetch ?? fetch;\n\tconst baseHeaders = { \"content-type\": \"application/json\" };\n\tif (opts?.serviceKey !== void 0) baseHeaders[\"Authorization\"] = `Bearer ${opts.serviceKey}`;\n\tconst client = {};\n\tfor (const method of Object.keys(contract.__cmp)) client[method] = async (input) => {\n\t\tconst idempotencyKey = crypto.randomUUID();\n\t\tconst body = JSON.stringify(input);\n\t\treturn callWithRetry(send, () => new Request(methodUrl(url, method), {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: {\n\t\t\t\t...baseHeaders,\n\t\t\t\t[IDEMPOTENCY_KEY_HEADER$1]: idempotencyKey\n\t\t\t},\n\t\t\tbody\n\t\t}), method);\n\t};\n\treturn blindCast(client);\n}\nfunction contract(fns) {\n\tconst value = {\n\t\tkind: \"rpc\",\n\t\t__cmp: fns,\n\t\tsatisfies: (required) => value === required\n\t};\n\treturn Object.freeze(value);\n}\n/** ADR-0031's need brand for RPC's per-binding service key — the target registers a provisioner under this. */\nconst RPC_PEER_KEY = Symbol.for(\"prisma:rpc/per-binding-key\");\n/** The provisioning need `rpc()`'s `serviceKey` param declares (ADR-0030): a shared, unguessable value the target mints per consumer edge. */\nconst perBindingToken = () => provisionNeed(RPC_PEER_KEY);\nfunction rpc(arg) {\n\tif (!isRpcContract(arg)) return arg;\n\treturn dependency({\n\t\ttype: \"rpc\",\n\t\tconnection: {\n\t\t\tparams: {\n\t\t\t\turl: string(),\n\t\t\t\tserviceKey: string({\n\t\t\t\t\toptional: true,\n\t\t\t\t\tprovision: perBindingToken()\n\t\t\t\t})\n\t\t\t},\n\t\t\thydrate: ({ url, serviceKey }) => makeClient(arg, url, { serviceKey })\n\t\t},\n\t\trequired: arg\n\t});\n}\nfunction isRpcContract(value) {\n\treturn typeof value === \"object\" && value !== null && \"kind\" in value && value.kind === \"rpc\" && \"__cmp\" in value && \"satisfies\" in value;\n}\nasync function standardValidate(schema, value) {\n\tconst result = await schema[\"~standard\"].validate(value);\n\tif (result.issues !== void 0) throw new Error(`Schema validation failed: ${result.issues.map((issue) => issue.message).join(\"; \")}`);\n\treturn result.value;\n}\n/** The reserved env var the target (slice 2) writes the accepted key set to. */\nconst RPC_ACCEPTED_KEYS_ENV = \"COMPOSER_RPC_ACCEPTED_KEYS\";\nfunction outcome(body, status = 200) {\n\treturn {\n\t\tstatus,\n\t\tbodyText: JSON.stringify(body)\n\t};\n}\nfunction toResponse(o) {\n\treturn new Response(o.bodyText, {\n\t\tstatus: o.status,\n\t\theaders: { \"content-type\": \"application/json\" }\n\t});\n}\n/** The generic message every caller-facing 500 carries — the real error goes to `console.error` instead. */\nconst INTERNAL_ERROR_MESSAGE = \"Internal server error\";\n/** Request body cap. Internal RPC payloads are small records, not uploads; 1 MiB bounds a slow request's memory. */\nconst MAX_BODY_BYTES = 1048576;\nvar RequestBodyTooLargeError = class extends Error {};\n/** Reads the body as text, aborting past `maxBytes` of bytes actually read — `content-length` is caller-supplied, so untrusted. */\nasync function readBoundedBody(req, maxBytes) {\n\tconst reader = req.body?.getReader();\n\tif (reader === void 0) return \"\";\n\tconst decoder = new TextDecoder();\n\tlet text = \"\";\n\tlet total = 0;\n\tfor (;;) {\n\t\tconst { done, value } = await reader.read();\n\t\tif (done) break;\n\t\ttotal += value.byteLength;\n\t\tif (total > maxBytes) {\n\t\t\tawait reader.cancel();\n\t\t\tthrow new RequestBodyTooLargeError();\n\t\t}\n\t\ttext += decoder.decode(value, { stream: true });\n\t}\n\ttext += decoder.decode();\n\treturn text;\n}\n/** How long a completed 2xx/4xx answer stays replayable for a repeated key. */\nconst REPLAY_TTL_MS = 6e4;\n/**\n* Per-method, per-key deduplication. A duplicate arriving mid-execution\n* single-flights onto the same promise; a completed 2xx/4xx replays for\n* REPLAY_TTL_MS; a 5xx is never kept, since that is what a retry re-executes.\n* Keyed by method first, so a replay can never answer a different method.\n*/\nvar IdempotencyStore = class {\n\tbyMethod = /* @__PURE__ */ new Map();\n\tlru = /* @__PURE__ */ new Set();\n\tasync dispatch(method, key, run) {\n\t\tconst bucket = this.bucketFor(method);\n\t\tconst existing = bucket.get(key);\n\t\tif (existing?.kind === \"pending\") return existing.promise;\n\t\tif (existing?.kind === \"completed\") {\n\t\t\tif (Date.now() - existing.completedAt < REPLAY_TTL_MS) {\n\t\t\t\tthis.lru.delete(existing);\n\t\t\t\tthis.lru.add(existing);\n\t\t\t\treturn existing.outcome;\n\t\t\t}\n\t\t\tbucket.delete(key);\n\t\t\tthis.lru.delete(existing);\n\t\t}\n\t\tconst promise = run();\n\t\tbucket.set(key, {\n\t\t\tkind: \"pending\",\n\t\t\tpromise\n\t\t});\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await promise;\n\t\t} catch (err) {\n\t\t\tbucket.delete(key);\n\t\t\tthrow err;\n\t\t}\n\t\tif (result.status >= 500) bucket.delete(key);\n\t\telse {\n\t\t\tconst entry = {\n\t\t\t\tkind: \"completed\",\n\t\t\t\toutcome: result,\n\t\t\t\tcompletedAt: Date.now(),\n\t\t\t\tmethod,\n\t\t\t\tkey\n\t\t\t};\n\t\t\tbucket.set(key, entry);\n\t\t\tthis.lru.add(entry);\n\t\t\tthis.evictOverflow();\n\t\t}\n\t\treturn result;\n\t}\n\tbucketFor(method) {\n\t\tlet bucket = this.byMethod.get(method);\n\t\tif (bucket === void 0) {\n\t\t\tbucket = /* @__PURE__ */ new Map();\n\t\t\tthis.byMethod.set(method, bucket);\n\t\t}\n\t\treturn bucket;\n\t}\n\tevictOverflow() {\n\t\tif (this.lru.size <= 1e3) return;\n\t\tconst oldest = this.lru.values().next().value;\n\t\tif (oldest !== void 0) {\n\t\t\tthis.lru.delete(oldest);\n\t\t\tthis.byMethod.get(oldest.method)?.delete(oldest.key);\n\t\t}\n\t}\n};\n/** The provisioned accepted key set, or undefined when the deploy never provisioned one (local/test — enforcement off). */\nfunction acceptedKeys() {\n\tconst raw = process.env[RPC_ACCEPTED_KEYS_ENV];\n\tif (raw === void 0 || raw === \"\") return void 0;\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(raw);\n\t} catch {\n\t\treturn [];\n\t}\n\treturn Array.isArray(parsed) && parsed.every((key) => typeof key === \"string\") ? parsed : [];\n}\n/**\n* Length-independent constant-time string equality — no early exit on the\n* first mismatched character or on a length difference, so a caller cannot\n* time its way toward a valid key. No `node:crypto`, to keep this module\n* runtime-agnostic.\n*/\nfunction constantTimeEquals(a, b) {\n\tconst length = Math.max(a.length, b.length);\n\tlet diff = a.length ^ b.length;\n\tfor (let i = 0; i < length; i++) diff |= (i < a.length ? a.charCodeAt(i) : 0) ^ (i < b.length ? b.charCodeAt(i) : 0);\n\treturn diff === 0;\n}\n/** Whether `presented` is a member of `accepted` — always compares against every key. */\nfunction isAcceptedKey(presented, accepted) {\n\tlet matched = false;\n\tfor (const key of accepted) matched = constantTimeEquals(presented, key) || matched;\n\treturn matched;\n}\nconst BEARER_PREFIX = \"Bearer \";\n/** The bearer token on `Authorization`, or `''` if the header is missing or malformed. */\nfunction bearerToken(req) {\n\tconst header = req.headers.get(\"authorization\");\n\treturn header?.startsWith(BEARER_PREFIX) ? header.slice(7) : \"\";\n}\nconst IDEMPOTENCY_KEY_HEADER = \"Idempotency-Key\";\n/**\n* Flattens every exposed port's methods into one method → {schemas, handler}\n* table. RPC dispatch is flat (`/rpc/<method>`), so a method name exposed by\n* more than one port is a construction-time error, as is a missing handler.\n*/\nfunction methodTable(expose, handlers) {\n\tconst table = /* @__PURE__ */ new Map();\n\tfor (const [port, contract] of Object.entries(expose)) {\n\t\tconst portHandlers = handlers[port] ?? {};\n\t\tfor (const [method, fn] of Object.entries(contract.__cmp)) {\n\t\t\tif (table.has(method)) throw new Error(`serve(): method \"${method}\" is exposed by more than one port — RPC dispatch is flat (POST /rpc/<method>), so method names must be unique across a service's exposed ports.`);\n\t\t\tconst handler = portHandlers[method];\n\t\t\tif (handler === void 0) throw new Error(`serve(): no handler supplied for exposed method \"${port}.${method}\".`);\n\t\t\tconst { input, output } = blindCast(fn);\n\t\t\ttable.set(method, {\n\t\t\t\tinput,\n\t\t\t\toutput,\n\t\t\t\thandler\n\t\t\t});\n\t\t}\n\t}\n\treturn table;\n}\n/**\n* Routes `POST /rpc/<method>`: checks the service key, requires an\n* Idempotency-Key, single-flights/replays through `IdempotencyStore`, and —\n* per call — parses JSON within the body cap, validates input, calls the\n* handler with `service.load()`'s deps plus `{ idempotencyKey }`, validates\n* the output, and responds JSON. A handler or output-validation failure\n* masks its message behind a generic 500 and logs the real error; an\n* unknown method or invalid input is a 4xx. `load()` is called exactly\n* once, here, before the handler ever runs.\n*/\nfunction serve(service, handlers) {\n\tconst table = methodTable(service.expose ?? {}, blindCast(handlers));\n\tconst deps = service.load();\n\tconst idempotency = new IdempotencyStore();\n\treturn async (req) => {\n\t\tconst accepted = acceptedKeys();\n\t\tif (accepted !== void 0 && !isAcceptedKey(bearerToken(req), accepted)) return toResponse(outcome({ error: \"Unauthorized: missing or invalid service key\" }, 401));\n\t\tconst { pathname } = new URL(req.url);\n\t\tconst methodName = /^\\/rpc\\/([^/]+)$/.exec(pathname)?.[1];\n\t\tif (methodName === void 0) return toResponse(outcome({ error: `Not found: ${pathname}` }, 404));\n\t\tconst method = table.get(methodName);\n\t\tif (method === void 0) return toResponse(outcome({ error: `Unknown RPC method \"${methodName}\"` }, 404));\n\t\tif (req.method !== \"POST\") return toResponse(outcome({ error: `Method \"${methodName}\" requires POST` }, 405));\n\t\tconst idempotencyKey = req.headers.get(IDEMPOTENCY_KEY_HEADER.toLowerCase()) || void 0;\n\t\tconst ctx = { idempotencyKey };\n\t\tconst run = async () => {\n\t\t\tlet bodyText;\n\t\t\ttry {\n\t\t\t\tbodyText = await readBoundedBody(req, MAX_BODY_BYTES);\n\t\t\t} catch (err) {\n\t\t\t\tif (err instanceof RequestBodyTooLargeError) return outcome({ error: `Request body exceeds the ${MAX_BODY_BYTES}-byte limit` }, 413);\n\t\t\t\tconsole.error(`serve(): reading the request body for \"${methodName}\" failed:`, err);\n\t\t\t\treturn outcome({ error: INTERNAL_ERROR_MESSAGE }, 500);\n\t\t\t}\n\t\t\tlet body;\n\t\t\ttry {\n\t\t\t\tbody = JSON.parse(bodyText);\n\t\t\t} catch {\n\t\t\t\treturn outcome({ error: \"Request body must be JSON\" }, 400);\n\t\t\t}\n\t\t\tlet input;\n\t\t\ttry {\n\t\t\t\tinput = await standardValidate(method.input, body);\n\t\t\t} catch (err) {\n\t\t\t\treturn outcome({ error: err instanceof Error ? err.message : String(err) }, 400);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst result = await method.handler(input, deps, ctx);\n\t\t\t\tlet output;\n\t\t\t\ttry {\n\t\t\t\t\toutput = await standardValidate(method.output, result);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tconsole.error(`serve(): handler for \"${methodName}\" returned output that failed schema validation — this is a provider bug:`, err);\n\t\t\t\t\treturn outcome({ error: INTERNAL_ERROR_MESSAGE }, 500);\n\t\t\t\t}\n\t\t\t\treturn outcome(output);\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error(`serve(): handler for \"${methodName}\" threw:`, err);\n\t\t\t\treturn outcome({ error: INTERNAL_ERROR_MESSAGE }, 500);\n\t\t\t}\n\t\t};\n\t\treturn toResponse(idempotencyKey === void 0 ? await run() : await idempotency.dispatch(methodName, idempotencyKey, run));\n\t};\n}\n//#endregion\n//#region ../../1-extensions/target/dist/provisioned-edges-Cxy18aoh.mjs\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/**\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/** 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 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};\nconfigKey(\"\", {\n\towner: \"service\",\n\tname: STREAMS_API_KEY_PARAM.name\n});\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];\nObject.freeze({\n\tkind: \"s3\",\n\t__cmp: {\n\t\turl: \"\",\n\t\tbucket: \"\",\n\t\taccessKeyId: \"\",\n\t\tsecretAccessKey: \"\"\n\t},\n\tsatisfies: (required) => required.kind === \"s3\"\n});\nconst reservedParams = { port: number({ default: 3e3 }) };\n/**\n* A Prisma Compute service — declarations only (deps + one input schema +\n* build + the ports it exposes), no descriptor. The reserved `port` param\n* rides its own channel (ADR-0042 leaves it untouched); a dependency named\n* like it fails at authoring.\n*\n* · run(address, boot) — the process controller: deserialize the platform\n* environment (keyed off `address`, the extension's ONE env read) into a\n* typed Config, re-emit it (and the input document row) under address-free\n* process-local stash keys, then call boot() to start the app's entry.\n* · load() / input() — called from inside the app's entry: read the stash;\n* load() hydrates + memoizes the deps, input() parses the input document,\n* replaces each `$secret` pointer with a redacting box over the named\n* platform var, validates with the declared schema, and memoizes (ADR-0042).\n* · origin() — this service's platform-assigned public origin, read from the\n* stash `run()` populates; memoized per process.\n* · port() — this service's resolved reserved port (the value `run()` routes\n* to and exports as PORT), read from that same stash via #processConfig();\n* defaults to 3000 when the platform binds none.\n*\n* The underlying node carries `extension: '@prisma/composer-prisma-cloud'` —\n* the control-plane registry key `prisma-composer deploy` resolves through the\n* app's `prisma-composer.config.ts` (ADR-0017). This module loads nothing at\n* deploy time; nodes are pure data until run() or load() is called.\n*/\nvar ComputeService = class {\n\t#resolved;\n\t#loadedDeps;\n\t#loadedInput;\n\t#origin;\n\tconstructor(node) {\n\t\tObject.assign(this, node);\n\t}\n\t#processConfig() {\n\t\tif (this.#resolved === void 0) this.#resolved = deserialize(this, \"\");\n\t\treturn this.#resolved;\n\t}\n\tasync run(address, boot) {\n\t\tconst config = deserialize(this, address);\n\t\tstash(this, config);\n\t\tstashProviderParams(RESERVED_PROVIDER_PARAMS, address);\n\t\tstashInput(this, address);\n\t\tconst port = config.service[\"port\"];\n\t\tif (typeof port === \"number\") process.env[\"PORT\"] = String(port);\n\t\treturn boot();\n\t}\n\tload() {\n\t\tif (this.#loadedDeps === void 0) this.#loadedDeps = blindCast(hydrateSync(this, this.#processConfig()));\n\t\treturn this.#loadedDeps;\n\t}\n\tinput() {\n\t\tif (this.#loadedInput === void 0) this.#loadedInput = blindCast(readInput(this, \"\"));\n\t\treturn this.#loadedInput;\n\t}\n\t/** This service's platform-assigned public origin — read from the stash\n\t* run() populates and memoized per process. Throws if called before run()\n\t* has stashed it (readOrigin's pinned message). */\n\torigin() {\n\t\tthis.#origin ??= readOrigin();\n\t\treturn this.#origin;\n\t}\n\t/** This service's resolved reserved port — the value run() routes to and\n\t* exports as PORT — read the same way load() reads the stash. Defaults to\n\t* 3000 when the platform binds none. */\n\tport() {\n\t\tconst port = this.#processConfig().service[\"port\"];\n\t\tif (typeof port !== \"number\") throw new Error(`service \"${this.name}\" resolved a non-numeric port — the reserved port param is number({ default: 3000 }), so a stashed config always carries a number here.`);\n\t\treturn port;\n\t}\n};\nconst compute = (def) => {\n\tfor (const reserved of Object.keys(reservedParams)) if (reserved in def.deps) throw new Error(`compute(): dependency \"${reserved}\" collides with the reserved service param of the same name — rename the dependency.`);\n\tconst instance = new ComputeService(service({\n\t\tname: def.name,\n\t\textension: \"@prisma/composer-prisma-cloud\",\n\t\ttype: \"compute\",\n\t\tinputs: def.deps,\n\t\tparams: reservedParams,\n\t\t...def.input !== void 0 ? { input: def.input } : {},\n\t\tbuild: def.build,\n\t\t...def.expose !== void 0 ? { expose: def.expose } : {}\n\t}));\n\tObject.freeze(instance);\n\treturn instance;\n};\nObject.freeze({\n\tkind: \"postgres\",\n\t__cmp: { url: \"\" },\n\tsatisfies: (required) => required.kind === \"postgres\"\n});\nObject.freeze({\n\tkind: \"credentials\",\n\t__cmp: {\n\t\taccessKeyId: \"\",\n\t\tsecretAccessKey: \"\"\n\t},\n\tsatisfies: (required) => required.kind === \"credentials\"\n});\n//#endregion\n//#region src/contract.ts\nconst emailStatus = type(\"'stored'|'queued'|'sent'|'failed'\");\nconst emailSendContract = contract({ send: rpc({\n\tinput: type({\n\t\ttemplateId: \"string\",\n\t\tto: \"1<=string[]<=50\",\n\t\t\"cc?\": \"string[]\",\n\t\t\"bcc?\": \"string[]\",\n\t\t\"replyTo?\": \"string\",\n\t\tsubject: \"string\",\n\t\thtml: \"string\",\n\t\t\"text?\": \"string\",\n\t\tidempotencyKey: \"1<=string<=256\"\n\t}),\n\toutput: type({\n\t\tid: \"string\",\n\t\tstatus: emailStatus,\n\t\t\"error?\": \"string\"\n\t})\n}) });\nconst emailRecord = type({\n\tid: \"string\",\n\ttemplateId: \"string\",\n\tto: \"string[]\",\n\tcc: \"string[]\",\n\tbcc: \"string[]\",\n\treplyTo: \"string | null\",\n\tfrom: \"string\",\n\tsubject: \"string\",\n\thtml: \"string\",\n\ttext: \"string | null\",\n\tstatus: emailStatus,\n\tproviderMessageId: \"string | null\",\n\terror: \"string | null\",\n\tattempts: \"number\",\n\tcreatedAt: \"string\",\n\tupdatedAt: \"string\"\n});\nconst emailOutboxContract = contract({\n\tgetEmail: rpc({\n\t\tinput: type({ id: \"string\" }),\n\t\toutput: type({ email: emailRecord.or(\"null\") })\n\t}),\n\tlistEmails: rpc({\n\t\tinput: type({\n\t\t\t\"to?\": \"string\",\n\t\t\t\"templateId?\": \"string\",\n\t\t\t\"status?\": emailStatus,\n\t\t\t\"cursor?\": \"string\",\n\t\t\t\"limit?\": \"1<=number.integer<=200\"\n\t\t}),\n\t\toutput: type({\n\t\t\temails: emailRecord.array(),\n\t\t\t\"nextCursor?\": \"string\"\n\t\t})\n\t})\n});\n//#endregion\n//#region src/delivery.ts\n/** Mode `none` never calls `Delivery` (`handlers.ts`'s `send` returns before it) — this placeholder satisfies the required config slot in the entrypoint and the local test server without a real backing. */\nconst noneDelivery = { deliver: () => {\n\tthrow new Error(\"unreachable: deliveryMode \\\"none\\\" never calls Delivery.deliver\");\n} };\n//#endregion\n//#region src/outbox-store.ts\n/** Not documented to consumers as parseable (spec) — treat the string as opaque outside this pair. */\nfunction encodeCursor(cursor) {\n\treturn Buffer.from(`${cursor.createdAt}|${cursor.id}`, \"utf-8\").toString(\"base64\");\n}\nfunction decodeCursor(value) {\n\tconst decoded = Buffer.from(value, \"base64\").toString(\"utf-8\");\n\tconst separatorIndex = decoded.indexOf(\"|\");\n\tif (separatorIndex === -1) throw new Error(`invalid outbox cursor: ${value}`);\n\treturn {\n\t\tcreatedAt: decoded.slice(0, separatorIndex),\n\t\tid: decoded.slice(separatorIndex + 1)\n\t};\n}\n//#endregion\n//#region src/handlers.ts\nconst DEFAULT_LIST_LIMIT = 50;\nfunction toEmailRecord(row) {\n\treturn {\n\t\tid: row.id,\n\t\ttemplateId: row.templateId,\n\t\tto: [...row.to],\n\t\tcc: [...row.cc],\n\t\tbcc: [...row.bcc],\n\t\treplyTo: row.replyTo,\n\t\tfrom: row.from,\n\t\tsubject: row.subject,\n\t\thtml: row.html,\n\t\ttext: row.text,\n\t\tstatus: row.status,\n\t\tproviderMessageId: row.providerMessageId,\n\t\terror: row.error,\n\t\tattempts: row.attempts,\n\t\tcreatedAt: row.createdAt,\n\t\tupdatedAt: row.updatedAt\n\t};\n}\nfunction toSendResult(row) {\n\treturn row.error === null ? {\n\t\tid: row.id,\n\t\tstatus: row.status\n\t} : {\n\t\tid: row.id,\n\t\tstatus: row.status,\n\t\terror: row.error\n\t};\n}\nfunction createHandlers(config) {\n\tconst { store, delivery, deliveryMode, from } = config;\n\tasync function send(input) {\n\t\tconst status = deliveryMode === \"none\" ? \"stored\" : \"queued\";\n\t\tconst outcome = await store.insert({\n\t\t\tid: crypto.randomUUID(),\n\t\t\ttemplateId: input.templateId,\n\t\t\tto: input.to,\n\t\t\tcc: input.cc ?? [],\n\t\t\tbcc: input.bcc ?? [],\n\t\t\treplyTo: input.replyTo ?? null,\n\t\t\tfrom,\n\t\t\tsubject: input.subject,\n\t\t\thtml: input.html,\n\t\t\ttext: input.text ?? null,\n\t\t\tstatus,\n\t\t\tidempotencyKey: input.idempotencyKey\n\t\t});\n\t\tif (!outcome.inserted || deliveryMode === \"none\") return toSendResult(outcome.row);\n\t\tconst result = await delivery.deliver(outcome.row).catch((caught) => ({\n\t\t\tok: false,\n\t\t\terror: caught instanceof Error ? caught.message : String(caught),\n\t\t\tattempts: 1\n\t\t}));\n\t\treturn toSendResult(await store.updateDelivery(outcome.row.id, result.ok ? {\n\t\t\tstatus: \"sent\",\n\t\t\tproviderMessageId: result.providerMessageId,\n\t\t\tattempts: result.attempts\n\t\t} : {\n\t\t\tstatus: \"failed\",\n\t\t\terror: result.error,\n\t\t\tattempts: result.attempts\n\t\t}));\n\t}\n\tasync function getEmail(input) {\n\t\tconst row = await store.getById(input.id);\n\t\treturn { email: row === null ? null : toEmailRecord(row) };\n\t}\n\tasync function listEmails(input) {\n\t\tconst limit = input.limit ?? DEFAULT_LIST_LIMIT;\n\t\tconst after = input.cursor === void 0 ? void 0 : decodeCursor(input.cursor);\n\t\tconst page = await store.list({\n\t\t\t...input.to !== void 0 ? { to: input.to } : {},\n\t\t\t...input.templateId !== void 0 ? { templateId: input.templateId } : {},\n\t\t\t...input.status !== void 0 ? { status: input.status } : {},\n\t\t\t...after !== void 0 ? { after } : {},\n\t\t\tlimit\n\t\t});\n\t\tconst last = page.rows.at(-1);\n\t\treturn {\n\t\t\temails: page.rows.map(toEmailRecord),\n\t\t\t...page.hasMore && last !== void 0 ? { nextCursor: encodeCursor({\n\t\t\t\tcreatedAt: last.createdAt,\n\t\t\t\tid: last.id\n\t\t\t}) } : {}\n\t\t};\n\t}\n\treturn {\n\t\tsend,\n\t\tgetEmail,\n\t\tlistEmails\n\t};\n}\n//#endregion\n//#region src/memory-outbox-store.ts\nvar MemoryOutboxStore = class {\n\trowsById = /* @__PURE__ */ new Map();\n\tidByIdempotencyKey = /* @__PURE__ */ new Map();\n\tasync insert(row) {\n\t\tconst existingId = this.idByIdempotencyKey.get(row.idempotencyKey);\n\t\tif (existingId !== void 0) {\n\t\t\tconst existing = this.rowsById.get(existingId);\n\t\t\tif (existing === void 0) throw new Error(`outbox insert: idempotency index pointed at a missing row ${existingId}`);\n\t\t\treturn {\n\t\t\t\trow: existing,\n\t\t\t\tinserted: false\n\t\t\t};\n\t\t}\n\t\tconst now = (/* @__PURE__ */ new Date()).toISOString();\n\t\tconst inserted = {\n\t\t\tid: row.id,\n\t\t\ttemplateId: row.templateId,\n\t\t\tto: [...row.to],\n\t\t\tcc: [...row.cc],\n\t\t\tbcc: [...row.bcc],\n\t\t\treplyTo: row.replyTo,\n\t\t\tfrom: row.from,\n\t\t\tsubject: row.subject,\n\t\t\thtml: row.html,\n\t\t\ttext: row.text,\n\t\t\tstatus: row.status,\n\t\t\tproviderMessageId: null,\n\t\t\terror: null,\n\t\t\tidempotencyKey: row.idempotencyKey,\n\t\t\tattempts: 0,\n\t\t\tcreatedAt: now,\n\t\t\tupdatedAt: now\n\t\t};\n\t\tthis.rowsById.set(row.id, inserted);\n\t\tthis.idByIdempotencyKey.set(row.idempotencyKey, row.id);\n\t\treturn {\n\t\t\trow: inserted,\n\t\t\tinserted: true\n\t\t};\n\t}\n\tasync updateDelivery(id, update) {\n\t\tconst existing = this.rowsById.get(id);\n\t\tif (existing === void 0) throw new Error(`outbox updateDelivery: no row found for id ${id}`);\n\t\tconst updated = {\n\t\t\t...existing,\n\t\t\tstatus: update.status,\n\t\t\tproviderMessageId: update.status === \"sent\" ? update.providerMessageId : null,\n\t\t\terror: update.status === \"failed\" ? update.error : null,\n\t\t\tattempts: existing.attempts + update.attempts,\n\t\t\tupdatedAt: (/* @__PURE__ */ new Date()).toISOString()\n\t\t};\n\t\tthis.rowsById.set(id, updated);\n\t\treturn updated;\n\t}\n\tasync getById(id) {\n\t\treturn this.rowsById.get(id) ?? null;\n\t}\n\tasync list(filters) {\n\t\tconst matches = [...this.rowsById.values()].filter((row) => filters.to === void 0 || row.to.includes(filters.to)).filter((row) => filters.templateId === void 0 || row.templateId === filters.templateId).filter((row) => filters.status === void 0 || row.status === filters.status).sort((a, b) => {\n\t\t\tif (a.createdAt !== b.createdAt) return a.createdAt < b.createdAt ? 1 : -1;\n\t\t\treturn a.id < b.id ? 1 : -1;\n\t\t}).filter((row) => {\n\t\t\tconst after = filters.after;\n\t\t\tif (after === void 0) return true;\n\t\t\tif (row.createdAt !== after.createdAt) return row.createdAt < after.createdAt;\n\t\t\treturn row.id < after.id;\n\t\t});\n\t\tconst hasMore = matches.length > filters.limit;\n\t\treturn {\n\t\t\trows: hasMore ? matches.slice(0, filters.limit) : matches,\n\t\t\thasMore\n\t\t};\n\t}\n};\nfunction createMemoryOutboxStore() {\n\treturn new MemoryOutboxStore();\n}\n//#endregion\n//#region src/execution/testing.ts\n/**\n* The local stand-in: boots `handlers.ts` over the in-memory store with\n* `deliveryMode: 'none'`, loopback only, no auth (`serve()`'s accepted-keys\n* pass-through when the env set is absent — the same as any un-deployed\n* service). `serve()` needs a service node with the right `expose`, so this\n* wraps a bare `compute()` whose `build` is inert (never assembled or\n* deployed) — mirrors the auth module's test fake\n* (`examples/storefront-auth/modules/auth/testing/fake.ts`), promoted here\n* to the module's own official local-dev surface.\n*/\nasync function startLocalEmailServer(opts) {\n\tconst localService = compute({\n\t\tname: \"emailLocal\",\n\t\tdeps: {},\n\t\tbuild: nodeBuild({\n\t\t\tmodule: import.meta.url,\n\t\t\tentry: \"testing.ts\"\n\t\t}),\n\t\texpose: {\n\t\t\tsend: emailSendContract,\n\t\t\toutbox: emailOutboxContract\n\t\t}\n\t});\n\tconst handlers = createHandlers({\n\t\tstore: createMemoryOutboxStore(),\n\t\tdelivery: noneDelivery,\n\t\tdeliveryMode: \"none\",\n\t\tfrom: \"local@example.com\"\n\t});\n\tconst fetchHandler = serve(localService, {\n\t\tsend: { send: handlers.send },\n\t\toutbox: {\n\t\t\tgetEmail: handlers.getEmail,\n\t\t\tlistEmails: handlers.listEmails\n\t\t}\n\t});\n\tconst server = Bun.serve({\n\t\tport: opts?.port ?? 0,\n\t\thostname: \"127.0.0.1\",\n\t\tfetch: fetchHandler\n\t});\n\treturn {\n\t\turl: `http://127.0.0.1:${server.port}`,\n\t\tstop: async () => {\n\t\t\tserver.stop(true);\n\t\t}\n\t};\n}\n//#endregion\nexport { startLocalEmailServer };\n\n//# sourceMappingURL=testing.mjs.map"],"mappings":";;AAEA,MAAM,aAAa,UAAU;CAC5B,WAAW;CACX,MAAM;CACN,QAAQ,KAAK;CACb,OAAO,KAAK;CACZ,GAAG,KAAK,QAAQ,KAAK,IAAI,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI;AAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,SAA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,QAAQ;GACtB,IAAI,UAAU,KAAK,GAAG,OAAO;GAC7B,IAAI,IAAI,cAAc,MAAM,WAAW,OAAO,IAAI,YAAY,MAAM;GACpE,OAAO,IAAI,KAAK,MAAM;EACvB,CAAC;EACD,MAAM,UAAU,QAAQ,SAAS,QAAQ;EACzC,OAAO;GACN,MAAM,UAAU,QAAQ,MAAM,GAAG,QAAQ,KAAK,IAAI;GAClD;EACD;CACD;AACD;AACA,SAAS,0BAA0B;CAClC,OAAO,IAAI,kBAAkB;AAC9B;;;;;;;;;;;AAaA,eAAe,sBAAsB,MAAM;CAC1C,MAAM,eAAe,QAAQ;EAC5B,MAAM;EACN,MAAM,CAAC;EACP,OAAO,UAAU;GAChB,QAAQ,OAAO,KAAK;GACpB,OAAO;EACR,CAAC;EACD,QAAQ;GACP,MAAM;GACN,QAAQ;EACT;CACD,CAAC;CACD,MAAM,WAAW,eAAe;EAC/B,OAAO,wBAAwB;EAC/B,UAAU;EACV,cAAc;EACd,MAAM;CACP,CAAC;CACD,MAAM,eAAe,MAAM,cAAc;EACxC,MAAM,EAAE,MAAM,SAAS,KAAK;EAC5B,QAAQ;GACP,UAAU,SAAS;GACnB,YAAY,SAAS;EACtB;CACD,CAAC;CACD,MAAM,SAAS,IAAI,MAAM;EACxB,MAAM,MAAM,QAAQ;EACpB,UAAU;EACV,OAAO;CACR,CAAC;CACD,OAAO;EACN,KAAK,oBAAoB,OAAO;EAChC,MAAM,YAAY;GACjB,OAAO,KAAK,IAAI;EACjB;CACD;AACD"}
|
|
1
|
+
{"version":3,"file":"testing.mjs","names":["#value","#resolved","#loadedDeps","#processConfig","#loadedParams","#loadedSecrets","#origin"],"sources":["../../../../1-prisma-cloud/2-shared-modules/email/dist/testing.mjs"],"sourcesContent":["import { type } from \"arktype\";\n//#region ../../../0-framework/2-authoring/node/dist/index.mjs\nconst nodeBuild = (opts) => ({\n\textension: \"@prisma/composer/node\",\n\ttype: \"node\",\n\tmodule: opts.module,\n\tentry: opts.entry,\n\t...opts.dir === void 0 ? {} : { dir: opts.dir }\n});\n//#endregion\n//#region ../../../0-framework/0-foundation/foundation/dist/casts.mjs\n/**\n* **Last-resort escape hatch for unsafe type assertions. Not a sanctioned tool to reach for.**\n*\n* Before reaching for `blindCast`, **rewrite the surrounding code so the cast becomes\n* unnecessary**: tighten an input type, add a runtime check that narrows via a type\n* predicate, restructure a generic so the compiler can see the relationship you're\n* asserting, or use {@link castAs} when the value already satisfies the target type.\n* Only when no rewrite is feasible does `blindCast` become the right answer — and at\n* that point, the `Reason` literal you supply must articulate the compromise in\n* language a reviewer can evaluate.\n*\n* The reviewer **will** validate the `Reason`. If it doesn't hold up under scrutiny,\n* that is not a signal to soften the reason; it is a signal to go back and solve the\n* underlying type-system problem properly. An unconvincing justification is rework,\n* not a free pass.\n*\n* `blindCast` is the auditable form of `as Foo` / `as unknown as Foo`: it bypasses\n* the compiler's checks (the input type is `unknown`, the output type is whatever the\n* caller asks for), but it forces the unsafety to be named at the call site instead of\n* smuggled in via a bare `as`. The `Reason` type parameter exists only at compile\n* time — it is not present in the emitted JavaScript — but it is grep-able and\n* visible to future readers.\n*\n* @example\n* ```typescript\n* const stringValue = blindCast<\n* string,\n* \"JSON.parse returns `unknown`; this field is documented to be a string in the API contract\"\n* >(parsed[key]);\n* ```\n*\n* @typeParam TargetType - The type the caller is asserting the input has.\n* @typeParam _Reason - A string literal describing why bypassing the type system is necessary here.\n* Only meaningful at compile time. The reviewer evaluates whether it justifies the unsafety.\n*/\nfunction blindCast(input) {\n\treturn input;\n}\n//#endregion\n//#region ../../../0-framework/1-core/core/dist/graph-CP16cJyH.mjs\n/**\n* Core model: node types and the factories that construct them, plain frozen\n* data objects. A node's `extension` + `type` form its deploy-time registry key (ADR-0017).\n*/\nconst NODE = Symbol.for(\"prisma:node\");\nconst PROVISION_NEED = blindCast(Symbol.for(\"prisma:provision-need\"));\n/** Builds an opaque provisioning need — the declaring package's own brand plus whatever payload its provisioner reads back. */\nfunction provisionNeed(brand, payload) {\n\treturn blindCast(Object.freeze({\n\t\t[PROVISION_NEED]: true,\n\t\tbrand,\n\t\tpayload\n\t}));\n}\nfunction requireType(type, factory) {\n\tif (typeof type !== \"string\" || type.length === 0) throw new Error(`${factory}() requires a non-empty node type.`);\n}\nfunction requireName(name, factory) {\n\tif (typeof name !== \"string\" || name.length === 0) throw new Error(`${factory}() requires a non-empty name.`);\n}\nfunction requireExtension(extension, factory) {\n\tif (typeof extension !== \"string\" || extension.length === 0) throw new Error(`${factory}() requires a non-empty extension (the authoring extension's package name).`);\n}\n/**\n* Core's grammar for every name that becomes a config-key segment —\n* addresses, input/param/secret names: ASCII letters and digits only.\n* Conservative by design so any target medium — POSIX env-var keys\n* included — can uppercase and \"_\"-join segments without escaping.\n*/\nfunction isConfigKeySegment(name) {\n\treturn /^[A-Za-z0-9]+$/.test(name);\n}\nfunction requireConfigKeySegmentName(name, kind, factory) {\n\tif (!isConfigKeySegment(name)) throw new Error(`${factory}() ${kind} name \"${name}\" must contain only ASCII letters and digits ([A-Za-z0-9]) — declared names derive deterministic config keys, uppercased and joined with \"_\" (an input \"db\"'s param \"url\" becomes config key \"DB_URL\"), so an underscore inside a name collides with that separator and any other character has no place in a config key. \"${name}\" would put \"${name.toUpperCase()}\" inside the derived key.`);\n}\nfunction requireConfigKeySegmentNames(names, kind, factory) {\n\tfor (const name of names) requireConfigKeySegmentName(name, kind, factory);\n}\nfunction freezeParams(params) {\n\tconst frozen = {};\n\tfor (const [name, param] of Object.entries(params)) frozen[name] = Object.freeze({ ...param });\n\treturn Object.freeze(frozen);\n}\nfunction freezeSecrets(secrets) {\n\tconst frozen = {};\n\tfor (const [name, need] of Object.entries(secrets)) frozen[name] = Object.freeze({ ...need });\n\treturn blindCast(Object.freeze(frozen));\n}\n/** A frozen shallow copy that keeps the caller's declared type. */\nfunction frozenShallowCopy(obj) {\n\treturn blindCast(Object.freeze({ ...obj }));\n}\n/**\n* Constructs a branded, frozen Service node — declarations only (inputs,\n* params, build adapter, and the ports it exposes). Pure; carries no runtime behavior.\n*/\nfunction service(def) {\n\trequireName(def.name, \"service\");\n\trequireExtension(def.extension, \"service\");\n\trequireType(def.type, \"service\");\n\trequireConfigKeySegmentNames(Object.keys(def.inputs), \"input\", \"service\");\n\trequireConfigKeySegmentNames(Object.keys(def.params), \"param\", \"service\");\n\trequireConfigKeySegmentNames(Object.keys(def.secrets ?? {}), \"secret\", \"service\");\n\tfor (const slot of Object.keys(def.secrets ?? {})) if (Object.hasOwn(def.params, slot)) throw new Error(`service() secret slot \"${slot}\" collides with a param of the same name — a secret slot and a service param derive the same config key (COMPOSER_<addr>_${slot.toUpperCase()}); rename one.`);\n\treturn Object.freeze({\n\t\t[NODE]: true,\n\t\tkind: \"service\",\n\t\tname: def.name,\n\t\textension: def.extension,\n\t\ttype: def.type,\n\t\tinputs: frozenShallowCopy(def.inputs),\n\t\tparams: freezeParams(def.params),\n\t\tsecretSlots: freezeSecrets(def.secrets ?? blindCast({})),\n\t\tbuild: Object.freeze({ ...def.build }),\n\t\texpose: def.expose !== void 0 ? frozenShallowCopy(def.expose) : void 0\n\t});\n}\n/**\n* Constructs a branded, frozen DependencyEnd. `required` (if given) is the\n* contract Load compares a wired ref against via `satisfies()`; an unnamed\n* end's diagnostic `name` falls back to its `type`.\n*/\nfunction dependency(def) {\n\trequireType(def.type, \"dependency\");\n\trequireConfigKeySegmentNames(Object.keys(def.connection.params), \"param\", \"dependency\");\n\tconst connection = Object.freeze({\n\t\tparams: freezeParams(def.connection.params),\n\t\thydrate: def.connection.hydrate\n\t});\n\treturn Object.freeze({\n\t\t[NODE]: true,\n\t\tkind: \"dependency\",\n\t\tname: def.name !== void 0 && def.name.length > 0 ? def.name : def.type,\n\t\ttype: def.type,\n\t\tconnection,\n\t\trequired: def.required\n\t});\n}\n//#endregion\n//#region ../../../0-framework/0-foundation/foundation/dist/secret.mjs\n/**\n* A value wrapper that redacts everywhere except the one explicit reader,\n* `expose()`. Sensitivity is carried by the TYPE (`SecretBox<T>`), not a flag a\n* sink must remember to check: `String(box)`, template interpolation,\n* `JSON.stringify`, and `console.log`/`util.inspect` all print `[REDACTED]`, so\n* a secret can't leak through an accidental log or serialization.\n*\n* Shape matches the platform's own `secrecy` type (pdp-control-plane). The class\n* is nominal enough on its own — no phantom brand.\n*/\nconst REDACTED = \"[REDACTED]\";\nvar SecretBox = class {\n\t#value;\n\tconstructor(value) {\n\t\tthis.#value = value;\n\t}\n\t/** The sole explicit door to the wrapped value. */\n\texpose() {\n\t\treturn this.#value;\n\t}\n\ttoString() {\n\t\treturn REDACTED;\n\t}\n\ttoJSON() {\n\t\treturn REDACTED;\n\t}\n\tvalueOf() {\n\t\treturn REDACTED;\n\t}\n\t[Symbol.toPrimitive]() {\n\t\treturn REDACTED;\n\t}\n\t[Symbol.for(\"nodejs.util.inspect.custom\")]() {\n\t\treturn REDACTED;\n\t}\n};\n//#endregion\n//#region ../../../0-framework/1-core/core/dist/index.mjs\nfunction scalarSchema(name, check) {\n\treturn { \"~standard\": {\n\t\tversion: 1,\n\t\tvendor: \"@prisma/composer\",\n\t\tvalidate: (value) => check(value) ? { value } : { issues: [{ message: `expected ${name}, got ${typeof value}` }] }\n\t} };\n}\nconst stringSchema = scalarSchema(\"string\", (v) => typeof v === \"string\");\nconst numberSchema = scalarSchema(\"number\", (v) => typeof v === \"number\" && Number.isFinite(v));\nfunction withFacets(schema, opts) {\n\treturn {\n\t\tschema,\n\t\t...opts.optional !== void 0 ? { optional: opts.optional } : {},\n\t\t...opts.default !== void 0 ? { default: opts.default } : {},\n\t\t...opts.provision !== void 0 ? { provision: opts.provision } : {}\n\t};\n}\n/** A string-valued param. */\nfunction string(opts = {}) {\n\treturn withFacets(stringSchema, opts);\n}\n/** A number-valued param. */\nfunction number(opts = {}) {\n\treturn withFacets(numberSchema, opts);\n}\n/**\n* Synchronous hydrate — what the node's `load()` uses so\n* `const { db } = service.load()` reads without `await`. Requires every\n* connection.hydrate to return synchronously; a Promise return is a loud error\n* naming the input (an async client factory must use the async `hydrate` path).\n*/\nfunction hydrateSync(root, config) {\n\tconst deps = {};\n\tfor (const [name, inputNode] of Object.entries(root.inputs)) {\n\t\tconst values = config.inputs[name] ?? {};\n\t\tconst client = inputNode.connection.hydrate(values);\n\t\tif (client instanceof Promise) throw new Error(`Connection hydrate for input \"${name}\" returned a Promise; load() requires a synchronous client factory.`);\n\t\tdeps[name] = client;\n\t}\n\treturn deps;\n}\n/**\n* Wraps each of a service's resolved secret values in a redacting `SecretBox`\n* — what the node's `secrets()` accessor returns (ADR-0021, sibling to\n* `load()`/`config()`). The RESOLUTION of a secret's value (the boot\n* double-lookup that reads the platform var the pointer names) is the target\n* pack's job; core is handed the already-resolved strings and only boxes them,\n* so a secret is redacted by TYPE from here on. A declared slot missing from\n* `values` is a target contract violation, named loudly.\n*/\nfunction hydrateSecrets(root, values) {\n\tconst boxed = {};\n\tfor (const slot of Object.keys(root.secretSlots)) {\n\t\tconst value = values[slot];\n\t\tif (value === void 0) throw new Error(`secret slot \"${slot}\" has no resolved value — the target must resolve every declared secret before hydrateSecrets().`);\n\t\tboxed[slot] = new SecretBox(value);\n\t}\n\treturn blindCast(boxed);\n}\n//#endregion\n//#region ../../1-extensions/target/dist/serializer-CJiOhF2d.mjs\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/** 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* 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\n//#region ../../../0-framework/2-authoring/service-rpc/dist/index.mjs\n/** Bounded jittered backoff for retrying a dropped call. `maxRetries` is retries after the first attempt. */\nconst RETRY = {\n\tinitialDelayMs: 250,\n\tmultiplier: 2,\n\tmaxDelayMs: 5e3,\n\tmaxRetries: 5\n};\nconst IDEMPOTENCY_KEY_HEADER$1 = \"Idempotency-Key\";\nfunction sleep(ms) {\n\treturn new Promise((resolve) => setTimeout(resolve, ms));\n}\n/** Whether a non-OK response is safe to retry: 429 or any 5xx, never another 4xx. */\nfunction isRetryableStatus(status) {\n\treturn status === 429 || status >= 500;\n}\n/** The server's `{ error }` body, if the response has one — undefined otherwise. */\nasync function errorDetail(res) {\n\ttry {\n\t\tconst body = await res.json();\n\t\treturn typeof body === \"object\" && body !== null && \"error\" in body ? String(body.error) : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\n/** `<base>/rpc/<method>`, preserving a base URL's own path (e.g. a mount point). */\nfunction methodUrl(base, method) {\n\tconst normalizedBase = base.endsWith(\"/\") ? base : `${base}/`;\n\treturn new URL(`rpc/${method}`, normalizedBase).toString();\n}\n/**\n* Sends one call over `send`, retrying a thrown error, 429, or 5xx with\n* full-jitter backoff. `buildRequest` runs per attempt but carries the same\n* idempotency key each time — only the transport call repeats, not the key.\n*/\nasync function callWithRetry(send, buildRequest, method) {\n\tlet delay = RETRY.initialDelayMs;\n\tlet retries = 0;\n\tfor (;;) {\n\t\tlet res;\n\t\ttry {\n\t\t\tres = await send(buildRequest());\n\t\t} catch (err) {\n\t\t\tif (retries >= RETRY.maxRetries) throw err;\n\t\t\tretries += 1;\n\t\t\tawait sleep(Math.random() * delay);\n\t\t\tdelay = Math.min(delay * RETRY.multiplier, RETRY.maxDelayMs);\n\t\t\tcontinue;\n\t\t}\n\t\tif (res.ok) return res.json();\n\t\tif (!isRetryableStatus(res.status) || retries >= RETRY.maxRetries) {\n\t\t\tconst detail = await errorDetail(res);\n\t\t\tthrow new Error(`RPC call \"${method}\" failed: ${res.status} ${res.statusText}` + (detail !== void 0 ? ` — ${detail}` : \"\"));\n\t\t}\n\t\tretries += 1;\n\t\tawait sleep(Math.random() * delay);\n\t\tdelay = Math.min(delay * RETRY.multiplier, RETRY.maxDelayMs);\n\t}\n}\nfunction makeClient(contract, url, opts) {\n\tconst send = opts?.fetch ?? fetch;\n\tconst baseHeaders = { \"content-type\": \"application/json\" };\n\tif (opts?.serviceKey !== void 0) baseHeaders[\"Authorization\"] = `Bearer ${opts.serviceKey}`;\n\tconst client = {};\n\tfor (const method of Object.keys(contract.__cmp)) client[method] = async (input) => {\n\t\tconst idempotencyKey = crypto.randomUUID();\n\t\tconst body = JSON.stringify(input);\n\t\treturn callWithRetry(send, () => new Request(methodUrl(url, method), {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: {\n\t\t\t\t...baseHeaders,\n\t\t\t\t[IDEMPOTENCY_KEY_HEADER$1]: idempotencyKey\n\t\t\t},\n\t\t\tbody\n\t\t}), method);\n\t};\n\treturn blindCast(client);\n}\nfunction contract(fns) {\n\tconst value = {\n\t\tkind: \"rpc\",\n\t\t__cmp: fns,\n\t\tsatisfies: (required) => value === required\n\t};\n\treturn Object.freeze(value);\n}\n/** ADR-0031's need brand for RPC's per-binding service key — the target registers a provisioner under this. */\nconst RPC_PEER_KEY = Symbol.for(\"prisma:rpc/per-binding-key\");\n/** The provisioning need `rpc()`'s `serviceKey` param declares (ADR-0030): a shared, unguessable value the target mints per consumer edge. */\nconst perBindingToken = () => provisionNeed(RPC_PEER_KEY);\nfunction rpc(arg) {\n\tif (!isRpcContract(arg)) return arg;\n\treturn dependency({\n\t\ttype: \"rpc\",\n\t\tconnection: {\n\t\t\tparams: {\n\t\t\t\turl: string(),\n\t\t\t\tserviceKey: string({\n\t\t\t\t\toptional: true,\n\t\t\t\t\tprovision: perBindingToken()\n\t\t\t\t})\n\t\t\t},\n\t\t\thydrate: ({ url, serviceKey }) => makeClient(arg, url, { serviceKey })\n\t\t},\n\t\trequired: arg\n\t});\n}\nfunction isRpcContract(value) {\n\treturn typeof value === \"object\" && value !== null && \"kind\" in value && value.kind === \"rpc\" && \"__cmp\" in value && \"satisfies\" in value;\n}\nasync function standardValidate(schema, value) {\n\tconst result = await schema[\"~standard\"].validate(value);\n\tif (result.issues !== void 0) throw new Error(`Schema validation failed: ${result.issues.map((issue) => issue.message).join(\"; \")}`);\n\treturn result.value;\n}\n/** The reserved env var the target (slice 2) writes the accepted key set to. */\nconst RPC_ACCEPTED_KEYS_ENV = \"COMPOSER_RPC_ACCEPTED_KEYS\";\nfunction outcome(body, status = 200) {\n\treturn {\n\t\tstatus,\n\t\tbodyText: JSON.stringify(body)\n\t};\n}\nfunction toResponse(o) {\n\treturn new Response(o.bodyText, {\n\t\tstatus: o.status,\n\t\theaders: { \"content-type\": \"application/json\" }\n\t});\n}\n/** The generic message every caller-facing 500 carries — the real error goes to `console.error` instead. */\nconst INTERNAL_ERROR_MESSAGE = \"Internal server error\";\n/** Request body cap. Internal RPC payloads are small records, not uploads; 1 MiB bounds a slow request's memory. */\nconst MAX_BODY_BYTES = 1048576;\nvar RequestBodyTooLargeError = class extends Error {};\n/** Reads the body as text, aborting past `maxBytes` of bytes actually read — `content-length` is caller-supplied, so untrusted. */\nasync function readBoundedBody(req, maxBytes) {\n\tconst reader = req.body?.getReader();\n\tif (reader === void 0) return \"\";\n\tconst decoder = new TextDecoder();\n\tlet text = \"\";\n\tlet total = 0;\n\tfor (;;) {\n\t\tconst { done, value } = await reader.read();\n\t\tif (done) break;\n\t\ttotal += value.byteLength;\n\t\tif (total > maxBytes) {\n\t\t\tawait reader.cancel();\n\t\t\tthrow new RequestBodyTooLargeError();\n\t\t}\n\t\ttext += decoder.decode(value, { stream: true });\n\t}\n\ttext += decoder.decode();\n\treturn text;\n}\n/** How long a completed 2xx/4xx answer stays replayable for a repeated key. */\nconst REPLAY_TTL_MS = 6e4;\n/**\n* Per-method, per-key deduplication. A duplicate arriving mid-execution\n* single-flights onto the same promise; a completed 2xx/4xx replays for\n* REPLAY_TTL_MS; a 5xx is never kept, since that is what a retry re-executes.\n* Keyed by method first, so a replay can never answer a different method.\n*/\nvar IdempotencyStore = class {\n\tbyMethod = /* @__PURE__ */ new Map();\n\tlru = /* @__PURE__ */ new Set();\n\tasync dispatch(method, key, run) {\n\t\tconst bucket = this.bucketFor(method);\n\t\tconst existing = bucket.get(key);\n\t\tif (existing?.kind === \"pending\") return existing.promise;\n\t\tif (existing?.kind === \"completed\") {\n\t\t\tif (Date.now() - existing.completedAt < REPLAY_TTL_MS) {\n\t\t\t\tthis.lru.delete(existing);\n\t\t\t\tthis.lru.add(existing);\n\t\t\t\treturn existing.outcome;\n\t\t\t}\n\t\t\tbucket.delete(key);\n\t\t\tthis.lru.delete(existing);\n\t\t}\n\t\tconst promise = run();\n\t\tbucket.set(key, {\n\t\t\tkind: \"pending\",\n\t\t\tpromise\n\t\t});\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await promise;\n\t\t} catch (err) {\n\t\t\tbucket.delete(key);\n\t\t\tthrow err;\n\t\t}\n\t\tif (result.status >= 500) bucket.delete(key);\n\t\telse {\n\t\t\tconst entry = {\n\t\t\t\tkind: \"completed\",\n\t\t\t\toutcome: result,\n\t\t\t\tcompletedAt: Date.now(),\n\t\t\t\tmethod,\n\t\t\t\tkey\n\t\t\t};\n\t\t\tbucket.set(key, entry);\n\t\t\tthis.lru.add(entry);\n\t\t\tthis.evictOverflow();\n\t\t}\n\t\treturn result;\n\t}\n\tbucketFor(method) {\n\t\tlet bucket = this.byMethod.get(method);\n\t\tif (bucket === void 0) {\n\t\t\tbucket = /* @__PURE__ */ new Map();\n\t\t\tthis.byMethod.set(method, bucket);\n\t\t}\n\t\treturn bucket;\n\t}\n\tevictOverflow() {\n\t\tif (this.lru.size <= 1e3) return;\n\t\tconst oldest = this.lru.values().next().value;\n\t\tif (oldest !== void 0) {\n\t\t\tthis.lru.delete(oldest);\n\t\t\tthis.byMethod.get(oldest.method)?.delete(oldest.key);\n\t\t}\n\t}\n};\n/** The provisioned accepted key set, or undefined when the deploy never provisioned one (local/test — enforcement off). */\nfunction acceptedKeys() {\n\tconst raw = process.env[RPC_ACCEPTED_KEYS_ENV];\n\tif (raw === void 0 || raw === \"\") return void 0;\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(raw);\n\t} catch {\n\t\treturn [];\n\t}\n\treturn Array.isArray(parsed) && parsed.every((key) => typeof key === \"string\") ? parsed : [];\n}\n/**\n* Length-independent constant-time string equality — no early exit on the\n* first mismatched character or on a length difference, so a caller cannot\n* time its way toward a valid key. No `node:crypto`, to keep this module\n* runtime-agnostic.\n*/\nfunction constantTimeEquals(a, b) {\n\tconst length = Math.max(a.length, b.length);\n\tlet diff = a.length ^ b.length;\n\tfor (let i = 0; i < length; i++) diff |= (i < a.length ? a.charCodeAt(i) : 0) ^ (i < b.length ? b.charCodeAt(i) : 0);\n\treturn diff === 0;\n}\n/** Whether `presented` is a member of `accepted` — always compares against every key. */\nfunction isAcceptedKey(presented, accepted) {\n\tlet matched = false;\n\tfor (const key of accepted) matched = constantTimeEquals(presented, key) || matched;\n\treturn matched;\n}\nconst BEARER_PREFIX = \"Bearer \";\n/** The bearer token on `Authorization`, or `''` if the header is missing or malformed. */\nfunction bearerToken(req) {\n\tconst header = req.headers.get(\"authorization\");\n\treturn header?.startsWith(BEARER_PREFIX) ? header.slice(7) : \"\";\n}\nconst IDEMPOTENCY_KEY_HEADER = \"Idempotency-Key\";\n/**\n* Flattens every exposed port's methods into one method → {schemas, handler}\n* table. RPC dispatch is flat (`/rpc/<method>`), so a method name exposed by\n* more than one port is a construction-time error, as is a missing handler.\n*/\nfunction methodTable(expose, handlers) {\n\tconst table = /* @__PURE__ */ new Map();\n\tfor (const [port, contract] of Object.entries(expose)) {\n\t\tconst portHandlers = handlers[port] ?? {};\n\t\tfor (const [method, fn] of Object.entries(contract.__cmp)) {\n\t\t\tif (table.has(method)) throw new Error(`serve(): method \"${method}\" is exposed by more than one port — RPC dispatch is flat (POST /rpc/<method>), so method names must be unique across a service's exposed ports.`);\n\t\t\tconst handler = portHandlers[method];\n\t\t\tif (handler === void 0) throw new Error(`serve(): no handler supplied for exposed method \"${port}.${method}\".`);\n\t\t\tconst { input, output } = blindCast(fn);\n\t\t\ttable.set(method, {\n\t\t\t\tinput,\n\t\t\t\toutput,\n\t\t\t\thandler\n\t\t\t});\n\t\t}\n\t}\n\treturn table;\n}\n/**\n* Routes `POST /rpc/<method>`: checks the service key, requires an\n* Idempotency-Key, single-flights/replays through `IdempotencyStore`, and —\n* per call — parses JSON within the body cap, validates input, calls the\n* handler with `service.load()`'s deps plus `{ idempotencyKey }`, validates\n* the output, and responds JSON. A handler or output-validation failure\n* masks its message behind a generic 500 and logs the real error; an\n* unknown method or invalid input is a 4xx. `load()` is called exactly\n* once, here, before the handler ever runs.\n*/\nfunction serve(service, handlers) {\n\tconst table = methodTable(service.expose ?? {}, blindCast(handlers));\n\tconst deps = service.load();\n\tconst idempotency = new IdempotencyStore();\n\treturn async (req) => {\n\t\tconst accepted = acceptedKeys();\n\t\tif (accepted !== void 0 && !isAcceptedKey(bearerToken(req), accepted)) return toResponse(outcome({ error: \"Unauthorized: missing or invalid service key\" }, 401));\n\t\tconst { pathname } = new URL(req.url);\n\t\tconst methodName = /^\\/rpc\\/([^/]+)$/.exec(pathname)?.[1];\n\t\tif (methodName === void 0) return toResponse(outcome({ error: `Not found: ${pathname}` }, 404));\n\t\tconst method = table.get(methodName);\n\t\tif (method === void 0) return toResponse(outcome({ error: `Unknown RPC method \"${methodName}\"` }, 404));\n\t\tif (req.method !== \"POST\") return toResponse(outcome({ error: `Method \"${methodName}\" requires POST` }, 405));\n\t\tconst idempotencyKey = req.headers.get(IDEMPOTENCY_KEY_HEADER.toLowerCase()) || void 0;\n\t\tconst ctx = { idempotencyKey };\n\t\tconst run = async () => {\n\t\t\tlet bodyText;\n\t\t\ttry {\n\t\t\t\tbodyText = await readBoundedBody(req, MAX_BODY_BYTES);\n\t\t\t} catch (err) {\n\t\t\t\tif (err instanceof RequestBodyTooLargeError) return outcome({ error: `Request body exceeds the ${MAX_BODY_BYTES}-byte limit` }, 413);\n\t\t\t\tconsole.error(`serve(): reading the request body for \"${methodName}\" failed:`, err);\n\t\t\t\treturn outcome({ error: INTERNAL_ERROR_MESSAGE }, 500);\n\t\t\t}\n\t\t\tlet body;\n\t\t\ttry {\n\t\t\t\tbody = JSON.parse(bodyText);\n\t\t\t} catch {\n\t\t\t\treturn outcome({ error: \"Request body must be JSON\" }, 400);\n\t\t\t}\n\t\t\tlet input;\n\t\t\ttry {\n\t\t\t\tinput = await standardValidate(method.input, body);\n\t\t\t} catch (err) {\n\t\t\t\treturn outcome({ error: err instanceof Error ? err.message : String(err) }, 400);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst result = await method.handler(input, deps, ctx);\n\t\t\t\tlet output;\n\t\t\t\ttry {\n\t\t\t\t\toutput = await standardValidate(method.output, result);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tconsole.error(`serve(): handler for \"${methodName}\" returned output that failed schema validation — this is a provider bug:`, err);\n\t\t\t\t\treturn outcome({ error: INTERNAL_ERROR_MESSAGE }, 500);\n\t\t\t\t}\n\t\t\t\treturn outcome(output);\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error(`serve(): handler for \"${methodName}\" threw:`, err);\n\t\t\t\treturn outcome({ error: INTERNAL_ERROR_MESSAGE }, 500);\n\t\t\t}\n\t\t};\n\t\treturn toResponse(idempotencyKey === void 0 ? await run() : await idempotency.dispatch(methodName, idempotencyKey, run));\n\t};\n}\n//#endregion\n//#region ../../1-extensions/target/dist/provisioned-edges-C1wSO3cx.mjs\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/**\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/** 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 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};\nconfigKey(\"\", {\n\towner: \"service\",\n\tname: STREAMS_API_KEY_PARAM.name\n});\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];\nObject.freeze({\n\tkind: \"s3\",\n\t__cmp: {\n\t\turl: \"\",\n\t\tbucket: \"\",\n\t\taccessKeyId: \"\",\n\t\tsecretAccessKey: \"\"\n\t},\n\tsatisfies: (required) => required.kind === \"s3\"\n});\nconst reservedParams = { port: number({ default: 3e3 }) };\n/**\n* A Prisma Compute service — declarations only (deps + params + build + the\n* ports it exposes), no descriptor. `params` merges with the reserved\n* `ReservedParams` (`port`); a user param whose name collides with a reserved\n* one fails at authoring, the same way a colliding dependency name does.\n*\n* · run(address, boot) — the process controller: deserialize the platform\n* environment (keyed off `address`, the extension's ONE env read) into a\n* typed Config, re-emit it under address-free process-local stash keys,\n* then call boot() to start the app's entry.\n* · load() / config() — called from inside the app's entry: read the stash;\n* load() hydrates + memoizes the deps, config() returns the typed params.\n* Separate accessors so a dep and a param never share a namespace (ADR-0021).\n* · origin() — this service's platform-assigned public origin, read from the\n* stash `run()` populates; memoized per process.\n*\n* The underlying node carries `extension: '@prisma/composer-prisma-cloud'` —\n* the control-plane registry key `prisma-composer deploy` resolves through the\n* app's `prisma-composer.config.ts` (ADR-0017). This module loads nothing at\n* deploy time; nodes are pure data until run() or load() is called.\n*/\nvar ComputeService = class {\n\t#resolved;\n\t#loadedDeps;\n\t#loadedParams;\n\t#loadedSecrets;\n\t#origin;\n\tconstructor(node) {\n\t\tObject.assign(this, node);\n\t}\n\t#processConfig() {\n\t\tif (this.#resolved === void 0) this.#resolved = deserialize(this, \"\");\n\t\treturn this.#resolved;\n\t}\n\tasync run(address, boot) {\n\t\tconst config = deserialize(this, address);\n\t\tstash(this, config);\n\t\tstashProviderParams(RESERVED_PROVIDER_PARAMS, address);\n\t\tstashSecrets(this, address);\n\t\tconst port = config.service[\"port\"];\n\t\tif (typeof port === \"number\") process.env[\"PORT\"] = String(port);\n\t\treturn boot();\n\t}\n\tload() {\n\t\tif (this.#loadedDeps === void 0) this.#loadedDeps = blindCast(hydrateSync(this, this.#processConfig()));\n\t\treturn this.#loadedDeps;\n\t}\n\tconfig() {\n\t\tif (this.#loadedParams === void 0) this.#loadedParams = blindCast(this.#processConfig().service);\n\t\treturn this.#loadedParams;\n\t}\n\tsecrets() {\n\t\tif (this.#loadedSecrets === void 0) this.#loadedSecrets = blindCast(hydrateSecrets(this, deserializeSecrets(this, \"\")));\n\t\treturn this.#loadedSecrets;\n\t}\n\t/** This service's platform-assigned public origin — read from the stash\n\t* run() populates and memoized per process. Throws if called before run()\n\t* has stashed it (readOrigin's pinned message). */\n\torigin() {\n\t\tthis.#origin ??= readOrigin();\n\t\treturn this.#origin;\n\t}\n};\nconst compute = (def) => {\n\tconst userParams = def.params ?? blindCast({});\n\tfor (const reserved of Object.keys(reservedParams)) {\n\t\tif (reserved in def.deps) throw new Error(`compute(): dependency \"${reserved}\" collides with the reserved service param of the same name — rename the dependency.`);\n\t\tif (reserved in userParams) throw new Error(`compute(): param \"${reserved}\" collides with the reserved service param of the same name — rename the param.`);\n\t}\n\tfor (const name of Object.keys(userParams)) if (name.toUpperCase() === \"ORIGIN\") throw new Error(`compute(): param \"${name}\" collides with the framework-written origin row — rename the param.`);\n\tfor (const name of Object.keys(def.secrets ?? {})) if (name.toUpperCase() === \"ORIGIN\") throw new Error(`compute(): secret \"${name}\" collides with the framework-written origin row — rename the secret.`);\n\tconst params = blindCast({\n\t\t...userParams,\n\t\t...reservedParams\n\t});\n\tconst instance = new ComputeService(service({\n\t\tname: def.name,\n\t\textension: \"@prisma/composer-prisma-cloud\",\n\t\ttype: \"compute\",\n\t\tinputs: def.deps,\n\t\tparams,\n\t\t...def.secrets !== void 0 ? { secrets: def.secrets } : {},\n\t\tbuild: def.build,\n\t\t...def.expose !== void 0 ? { expose: def.expose } : {}\n\t}));\n\tObject.freeze(instance);\n\treturn instance;\n};\nObject.freeze({\n\tkind: \"postgres\",\n\t__cmp: { url: \"\" },\n\tsatisfies: (required) => required.kind === \"postgres\"\n});\nObject.freeze({\n\tkind: \"credentials\",\n\t__cmp: {\n\t\taccessKeyId: \"\",\n\t\tsecretAccessKey: \"\"\n\t},\n\tsatisfies: (required) => required.kind === \"credentials\"\n});\n//#endregion\n//#region src/contract.ts\nconst emailStatus = type(\"'stored'|'queued'|'sent'|'failed'\");\nconst emailSendContract = contract({ send: rpc({\n\tinput: type({\n\t\ttemplateId: \"string\",\n\t\tto: \"1<=string[]<=50\",\n\t\t\"cc?\": \"string[]\",\n\t\t\"bcc?\": \"string[]\",\n\t\t\"replyTo?\": \"string\",\n\t\tsubject: \"string\",\n\t\thtml: \"string\",\n\t\t\"text?\": \"string\",\n\t\tidempotencyKey: \"1<=string<=256\"\n\t}),\n\toutput: type({\n\t\tid: \"string\",\n\t\tstatus: emailStatus,\n\t\t\"error?\": \"string\"\n\t})\n}) });\nconst emailRecord = type({\n\tid: \"string\",\n\ttemplateId: \"string\",\n\tto: \"string[]\",\n\tcc: \"string[]\",\n\tbcc: \"string[]\",\n\treplyTo: \"string | null\",\n\tfrom: \"string\",\n\tsubject: \"string\",\n\thtml: \"string\",\n\ttext: \"string | null\",\n\tstatus: emailStatus,\n\tproviderMessageId: \"string | null\",\n\terror: \"string | null\",\n\tattempts: \"number\",\n\tcreatedAt: \"string\",\n\tupdatedAt: \"string\"\n});\nconst emailOutboxContract = contract({\n\tgetEmail: rpc({\n\t\tinput: type({ id: \"string\" }),\n\t\toutput: type({ email: emailRecord.or(\"null\") })\n\t}),\n\tlistEmails: rpc({\n\t\tinput: type({\n\t\t\t\"to?\": \"string\",\n\t\t\t\"templateId?\": \"string\",\n\t\t\t\"status?\": emailStatus,\n\t\t\t\"cursor?\": \"string\",\n\t\t\t\"limit?\": \"1<=number.integer<=200\"\n\t\t}),\n\t\toutput: type({\n\t\t\temails: emailRecord.array(),\n\t\t\t\"nextCursor?\": \"string\"\n\t\t})\n\t})\n});\n//#endregion\n//#region src/delivery.ts\n/** Mode `none` never calls `Delivery` (`handlers.ts`'s `send` returns before it) — this placeholder satisfies the required config slot in the entrypoint and the local test server without a real backing. */\nconst noneDelivery = { deliver: () => {\n\tthrow new Error(\"unreachable: deliveryMode \\\"none\\\" never calls Delivery.deliver\");\n} };\n//#endregion\n//#region src/outbox-store.ts\n/** Not documented to consumers as parseable (spec) — treat the string as opaque outside this pair. */\nfunction encodeCursor(cursor) {\n\treturn Buffer.from(`${cursor.createdAt}|${cursor.id}`, \"utf-8\").toString(\"base64\");\n}\nfunction decodeCursor(value) {\n\tconst decoded = Buffer.from(value, \"base64\").toString(\"utf-8\");\n\tconst separatorIndex = decoded.indexOf(\"|\");\n\tif (separatorIndex === -1) throw new Error(`invalid outbox cursor: ${value}`);\n\treturn {\n\t\tcreatedAt: decoded.slice(0, separatorIndex),\n\t\tid: decoded.slice(separatorIndex + 1)\n\t};\n}\n//#endregion\n//#region src/handlers.ts\nconst DEFAULT_LIST_LIMIT = 50;\nfunction toEmailRecord(row) {\n\treturn {\n\t\tid: row.id,\n\t\ttemplateId: row.templateId,\n\t\tto: [...row.to],\n\t\tcc: [...row.cc],\n\t\tbcc: [...row.bcc],\n\t\treplyTo: row.replyTo,\n\t\tfrom: row.from,\n\t\tsubject: row.subject,\n\t\thtml: row.html,\n\t\ttext: row.text,\n\t\tstatus: row.status,\n\t\tproviderMessageId: row.providerMessageId,\n\t\terror: row.error,\n\t\tattempts: row.attempts,\n\t\tcreatedAt: row.createdAt,\n\t\tupdatedAt: row.updatedAt\n\t};\n}\nfunction toSendResult(row) {\n\treturn row.error === null ? {\n\t\tid: row.id,\n\t\tstatus: row.status\n\t} : {\n\t\tid: row.id,\n\t\tstatus: row.status,\n\t\terror: row.error\n\t};\n}\nfunction createHandlers(config) {\n\tconst { store, delivery, deliveryMode, from } = config;\n\tasync function send(input) {\n\t\tconst status = deliveryMode === \"none\" ? \"stored\" : \"queued\";\n\t\tconst outcome = await store.insert({\n\t\t\tid: crypto.randomUUID(),\n\t\t\ttemplateId: input.templateId,\n\t\t\tto: input.to,\n\t\t\tcc: input.cc ?? [],\n\t\t\tbcc: input.bcc ?? [],\n\t\t\treplyTo: input.replyTo ?? null,\n\t\t\tfrom,\n\t\t\tsubject: input.subject,\n\t\t\thtml: input.html,\n\t\t\ttext: input.text ?? null,\n\t\t\tstatus,\n\t\t\tidempotencyKey: input.idempotencyKey\n\t\t});\n\t\tif (!outcome.inserted || deliveryMode === \"none\") return toSendResult(outcome.row);\n\t\tconst result = await delivery.deliver(outcome.row).catch((caught) => ({\n\t\t\tok: false,\n\t\t\terror: caught instanceof Error ? caught.message : String(caught),\n\t\t\tattempts: 1\n\t\t}));\n\t\treturn toSendResult(await store.updateDelivery(outcome.row.id, result.ok ? {\n\t\t\tstatus: \"sent\",\n\t\t\tproviderMessageId: result.providerMessageId,\n\t\t\tattempts: result.attempts\n\t\t} : {\n\t\t\tstatus: \"failed\",\n\t\t\terror: result.error,\n\t\t\tattempts: result.attempts\n\t\t}));\n\t}\n\tasync function getEmail(input) {\n\t\tconst row = await store.getById(input.id);\n\t\treturn { email: row === null ? null : toEmailRecord(row) };\n\t}\n\tasync function listEmails(input) {\n\t\tconst limit = input.limit ?? DEFAULT_LIST_LIMIT;\n\t\tconst after = input.cursor === void 0 ? void 0 : decodeCursor(input.cursor);\n\t\tconst page = await store.list({\n\t\t\t...input.to !== void 0 ? { to: input.to } : {},\n\t\t\t...input.templateId !== void 0 ? { templateId: input.templateId } : {},\n\t\t\t...input.status !== void 0 ? { status: input.status } : {},\n\t\t\t...after !== void 0 ? { after } : {},\n\t\t\tlimit\n\t\t});\n\t\tconst last = page.rows.at(-1);\n\t\treturn {\n\t\t\temails: page.rows.map(toEmailRecord),\n\t\t\t...page.hasMore && last !== void 0 ? { nextCursor: encodeCursor({\n\t\t\t\tcreatedAt: last.createdAt,\n\t\t\t\tid: last.id\n\t\t\t}) } : {}\n\t\t};\n\t}\n\treturn {\n\t\tsend,\n\t\tgetEmail,\n\t\tlistEmails\n\t};\n}\n//#endregion\n//#region src/memory-outbox-store.ts\nvar MemoryOutboxStore = class {\n\trowsById = /* @__PURE__ */ new Map();\n\tidByIdempotencyKey = /* @__PURE__ */ new Map();\n\tasync insert(row) {\n\t\tconst existingId = this.idByIdempotencyKey.get(row.idempotencyKey);\n\t\tif (existingId !== void 0) {\n\t\t\tconst existing = this.rowsById.get(existingId);\n\t\t\tif (existing === void 0) throw new Error(`outbox insert: idempotency index pointed at a missing row ${existingId}`);\n\t\t\treturn {\n\t\t\t\trow: existing,\n\t\t\t\tinserted: false\n\t\t\t};\n\t\t}\n\t\tconst now = (/* @__PURE__ */ new Date()).toISOString();\n\t\tconst inserted = {\n\t\t\tid: row.id,\n\t\t\ttemplateId: row.templateId,\n\t\t\tto: [...row.to],\n\t\t\tcc: [...row.cc],\n\t\t\tbcc: [...row.bcc],\n\t\t\treplyTo: row.replyTo,\n\t\t\tfrom: row.from,\n\t\t\tsubject: row.subject,\n\t\t\thtml: row.html,\n\t\t\ttext: row.text,\n\t\t\tstatus: row.status,\n\t\t\tproviderMessageId: null,\n\t\t\terror: null,\n\t\t\tidempotencyKey: row.idempotencyKey,\n\t\t\tattempts: 0,\n\t\t\tcreatedAt: now,\n\t\t\tupdatedAt: now\n\t\t};\n\t\tthis.rowsById.set(row.id, inserted);\n\t\tthis.idByIdempotencyKey.set(row.idempotencyKey, row.id);\n\t\treturn {\n\t\t\trow: inserted,\n\t\t\tinserted: true\n\t\t};\n\t}\n\tasync updateDelivery(id, update) {\n\t\tconst existing = this.rowsById.get(id);\n\t\tif (existing === void 0) throw new Error(`outbox updateDelivery: no row found for id ${id}`);\n\t\tconst updated = {\n\t\t\t...existing,\n\t\t\tstatus: update.status,\n\t\t\tproviderMessageId: update.status === \"sent\" ? update.providerMessageId : null,\n\t\t\terror: update.status === \"failed\" ? update.error : null,\n\t\t\tattempts: existing.attempts + update.attempts,\n\t\t\tupdatedAt: (/* @__PURE__ */ new Date()).toISOString()\n\t\t};\n\t\tthis.rowsById.set(id, updated);\n\t\treturn updated;\n\t}\n\tasync getById(id) {\n\t\treturn this.rowsById.get(id) ?? null;\n\t}\n\tasync list(filters) {\n\t\tconst matches = [...this.rowsById.values()].filter((row) => filters.to === void 0 || row.to.includes(filters.to)).filter((row) => filters.templateId === void 0 || row.templateId === filters.templateId).filter((row) => filters.status === void 0 || row.status === filters.status).sort((a, b) => {\n\t\t\tif (a.createdAt !== b.createdAt) return a.createdAt < b.createdAt ? 1 : -1;\n\t\t\treturn a.id < b.id ? 1 : -1;\n\t\t}).filter((row) => {\n\t\t\tconst after = filters.after;\n\t\t\tif (after === void 0) return true;\n\t\t\tif (row.createdAt !== after.createdAt) return row.createdAt < after.createdAt;\n\t\t\treturn row.id < after.id;\n\t\t});\n\t\tconst hasMore = matches.length > filters.limit;\n\t\treturn {\n\t\t\trows: hasMore ? matches.slice(0, filters.limit) : matches,\n\t\t\thasMore\n\t\t};\n\t}\n};\nfunction createMemoryOutboxStore() {\n\treturn new MemoryOutboxStore();\n}\n//#endregion\n//#region src/execution/testing.ts\n/**\n* The local stand-in: boots `handlers.ts` over the in-memory store with\n* `deliveryMode: 'none'`, loopback only, no auth (`serve()`'s accepted-keys\n* pass-through when the env set is absent — the same as any un-deployed\n* service). `serve()` needs a service node with the right `expose`, so this\n* wraps a bare `compute()` whose `build` is inert (never assembled or\n* deployed) — mirrors the auth module's test fake\n* (`examples/storefront-auth/modules/auth/testing/fake.ts`), promoted here\n* to the module's own official local-dev surface.\n*/\nasync function startLocalEmailServer(opts) {\n\tconst localService = compute({\n\t\tname: \"emailLocal\",\n\t\tdeps: {},\n\t\tbuild: nodeBuild({\n\t\t\tmodule: import.meta.url,\n\t\t\tentry: \"testing.ts\"\n\t\t}),\n\t\texpose: {\n\t\t\tsend: emailSendContract,\n\t\t\toutbox: emailOutboxContract\n\t\t}\n\t});\n\tconst handlers = createHandlers({\n\t\tstore: createMemoryOutboxStore(),\n\t\tdelivery: noneDelivery,\n\t\tdeliveryMode: \"none\",\n\t\tfrom: \"local@example.com\"\n\t});\n\tconst fetchHandler = serve(localService, {\n\t\tsend: { send: handlers.send },\n\t\toutbox: {\n\t\t\tgetEmail: handlers.getEmail,\n\t\t\tlistEmails: handlers.listEmails\n\t\t}\n\t});\n\tconst server = Bun.serve({\n\t\tport: opts?.port ?? 0,\n\t\thostname: \"127.0.0.1\",\n\t\tfetch: fetchHandler\n\t});\n\treturn {\n\t\turl: `http://127.0.0.1:${server.port}`,\n\t\tstop: async () => {\n\t\t\tserver.stop(true);\n\t\t}\n\t};\n}\n//#endregion\nexport { startLocalEmailServer };\n\n//# sourceMappingURL=testing.mjs.map"],"mappings":";;AAEA,MAAM,aAAa,UAAU;CAC5B,WAAW;CACX,MAAM;CACN,QAAQ,KAAK;CACb,OAAO,KAAK;CACZ,GAAG,KAAK,QAAQ,KAAK,IAAI,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI;AAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,SAAS,UAAU,OAAO;CACzB,OAAO;AACR;;;;;AAOA,MAAM,OAAO,OAAO,IAAI,aAAa;AACrC,MAAM,iBAAiB,UAAU,OAAO,IAAI,uBAAuB,CAAC;;AAEpE,SAAS,cAAc,OAAO,SAAS;CACtC,OAAO,UAAU,OAAO,OAAO;GAC7B,iBAAiB;EAClB;EACA;CACD,CAAC,CAAC;AACH;AACA,SAAS,YAAY,MAAM,SAAS;CACnC,IAAI,OAAO,SAAS,YAAY,KAAK,WAAW,GAAG,MAAM,IAAI,MAAM,GAAG,QAAQ,mCAAmC;AAClH;AACA,SAAS,YAAY,MAAM,SAAS;CACnC,IAAI,OAAO,SAAS,YAAY,KAAK,WAAW,GAAG,MAAM,IAAI,MAAM,GAAG,QAAQ,8BAA8B;AAC7G;AACA,SAAS,iBAAiB,WAAW,SAAS;CAC7C,IAAI,OAAO,cAAc,YAAY,UAAU,WAAW,GAAG,MAAM,IAAI,MAAM,GAAG,QAAQ,4EAA4E;AACrK;;;;;;;AAOA,SAAS,mBAAmB,MAAM;CACjC,OAAO,iBAAiB,KAAK,IAAI;AAClC;AACA,SAAS,4BAA4B,MAAM,MAAM,SAAS;CACzD,IAAI,CAAC,mBAAmB,IAAI,GAAG,MAAM,IAAI,MAAM,GAAG,QAAQ,KAAK,KAAK,SAAS,KAAK,6TAA6T,KAAK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EAAE,cAAc,EAAE,WAAW,OAAO,EAAE,YAAY,EAAE,YAAY,IAAI;GACxE,OAAO,EAAE,KAAK,EAAE,KAAK,IAAI;EAC1B,CAAC,CAAC,CAAC,QAAQ,QAAQ;GAClB,MAAM,QAAQ,QAAQ;GACtB,IAAI,UAAU,KAAK,GAAG,OAAO;GAC7B,IAAI,IAAI,cAAc,MAAM,WAAW,OAAO,IAAI,YAAY,MAAM;GACpE,OAAO,IAAI,KAAK,MAAM;EACvB,CAAC;EACD,MAAM,UAAU,QAAQ,SAAS,QAAQ;EACzC,OAAO;GACN,MAAM,UAAU,QAAQ,MAAM,GAAG,QAAQ,KAAK,IAAI;GAClD;EACD;CACD;AACD;AACA,SAAS,0BAA0B;CAClC,OAAO,IAAI,kBAAkB;AAC9B;;;;;;;;;;;AAaA,eAAe,sBAAsB,MAAM;CAC1C,MAAM,eAAe,QAAQ;EAC5B,MAAM;EACN,MAAM,CAAC;EACP,OAAO,UAAU;GAChB,QAAQ,OAAO,KAAK;GACpB,OAAO;EACR,CAAC;EACD,QAAQ;GACP,MAAM;GACN,QAAQ;EACT;CACD,CAAC;CACD,MAAM,WAAW,eAAe;EAC/B,OAAO,wBAAwB;EAC/B,UAAU;EACV,cAAc;EACd,MAAM;CACP,CAAC;CACD,MAAM,eAAe,MAAM,cAAc;EACxC,MAAM,EAAE,MAAM,SAAS,KAAK;EAC5B,QAAQ;GACP,UAAU,SAAS;GACnB,YAAY,SAAS;EACtB;CACD,CAAC;CACD,MAAM,SAAS,IAAI,MAAM;EACxB,MAAM,MAAM,QAAQ;EACpB,UAAU;EACV,OAAO;CACR,CAAC;CACD,OAAO;EACN,KAAK,oBAAoB,OAAO;EAChC,MAAM,YAAY;GACjB,OAAO,KAAK,IAAI;EACjB;CACD;AACD"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { n as configKey } from "./serializer-
|
|
2
|
-
import { BuildAdapter, Contract, DependencyEnd, Deps, Expose, Graph, HydratedDeps,
|
|
3
|
-
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
1
|
+
import { n as configKey } from "./serializer-Cx5slrV4-xJfH6EWS.mjs";
|
|
2
|
+
import { BuildAdapter, Contract, DependencyEnd, Deps, Expose, Graph, HydratedDeps, NODE, ParamBinding, ParamSource, Params, ProvisionNeed, ResourceNode, RunnableServiceNode, SecretBinding, SecretSource, SecretValues, Secrets, ServiceNode, Values } from "@prisma/composer";
|
|
4
3
|
//#region ../../1-prisma-cloud/1-extensions/target/dist/index.d.mts
|
|
5
4
|
//#region src/bucket.d.ts
|
|
6
5
|
interface BucketConfig {
|
|
@@ -43,35 +42,31 @@ declare function bucket(): DependencyEnd<BucketConfig, typeof bucketContract>;
|
|
|
43
42
|
//#endregion
|
|
44
43
|
//#region src/compute.d.ts
|
|
45
44
|
declare const reservedParams: {
|
|
46
|
-
readonly port: import("@prisma/composer").ConfigParam<StandardSchemaV1<number, number>>;
|
|
45
|
+
readonly port: import("@prisma/composer").ConfigParam<import("@standard-schema/spec").StandardSchemaV1<number, number>>;
|
|
47
46
|
};
|
|
48
47
|
type ReservedParams = typeof reservedParams;
|
|
49
48
|
/**
|
|
50
|
-
* A Prisma Compute service — declarations only (deps +
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
49
|
+
* A Prisma Compute service — declarations only (deps + params + build + the
|
|
50
|
+
* ports it exposes), no descriptor. `params` merges with the reserved
|
|
51
|
+
* `ReservedParams` (`port`); a user param whose name collides with a reserved
|
|
52
|
+
* one fails at authoring, the same way a colliding dependency name does.
|
|
54
53
|
*
|
|
55
54
|
* · run(address, boot) — the process controller: deserialize the platform
|
|
56
55
|
* environment (keyed off `address`, the extension's ONE env read) into a
|
|
57
|
-
* typed Config, re-emit it
|
|
58
|
-
*
|
|
59
|
-
* · load() /
|
|
60
|
-
* load() hydrates + memoizes the deps,
|
|
61
|
-
*
|
|
62
|
-
* platform var, validates with the declared schema, and memoizes (ADR-0042).
|
|
56
|
+
* typed Config, re-emit it under address-free process-local stash keys,
|
|
57
|
+
* then call boot() to start the app's entry.
|
|
58
|
+
* · load() / config() — called from inside the app's entry: read the stash;
|
|
59
|
+
* load() hydrates + memoizes the deps, config() returns the typed params.
|
|
60
|
+
* Separate accessors so a dep and a param never share a namespace (ADR-0021).
|
|
63
61
|
* · origin() — this service's platform-assigned public origin, read from the
|
|
64
62
|
* stash `run()` populates; memoized per process.
|
|
65
|
-
* · port() — this service's resolved reserved port (the value `run()` routes
|
|
66
|
-
* to and exports as PORT), read from that same stash via #processConfig();
|
|
67
|
-
* defaults to 3000 when the platform binds none.
|
|
68
63
|
*
|
|
69
64
|
* The underlying node carries `extension: '@prisma/composer-prisma-cloud'` —
|
|
70
65
|
* the control-plane registry key `prisma-composer deploy` resolves through the
|
|
71
66
|
* app's `prisma-composer.config.ts` (ADR-0017). This module loads nothing at
|
|
72
67
|
* deploy time; nodes are pure data until run() or load() is called.
|
|
73
68
|
*/
|
|
74
|
-
declare class ComputeService<D extends Deps,
|
|
69
|
+
declare class ComputeService<D extends Deps, P extends Params, E extends Expose, S extends Secrets> implements RunnableServiceNode<D, P & ReservedParams, E, S> {
|
|
75
70
|
#private;
|
|
76
71
|
readonly [NODE]: true;
|
|
77
72
|
readonly kind: 'service';
|
|
@@ -79,30 +74,28 @@ declare class ComputeService<D extends Deps, I extends StandardSchemaV1 | undefi
|
|
|
79
74
|
readonly extension: string;
|
|
80
75
|
readonly type: string;
|
|
81
76
|
readonly inputs: D;
|
|
82
|
-
readonly params: ReservedParams;
|
|
83
|
-
readonly
|
|
77
|
+
readonly params: P & ReservedParams;
|
|
78
|
+
readonly secretSlots: S;
|
|
84
79
|
readonly build: BuildAdapter;
|
|
85
80
|
readonly expose: E | undefined;
|
|
86
|
-
constructor(node: ServiceNode<D, ReservedParams, E,
|
|
81
|
+
constructor(node: ServiceNode<D, P & ReservedParams, E, S>);
|
|
87
82
|
run(address: string, boot: () => Promise<unknown>): Promise<unknown>;
|
|
88
83
|
load(): HydratedDeps<D>;
|
|
89
|
-
|
|
84
|
+
config(): Values<P & ReservedParams>;
|
|
85
|
+
secrets(): SecretValues<S>;
|
|
90
86
|
/** This service's platform-assigned public origin — read from the stash
|
|
91
87
|
* run() populates and memoized per process. Throws if called before run()
|
|
92
88
|
* has stashed it (readOrigin's pinned message). */
|
|
93
89
|
origin(): string;
|
|
94
|
-
/** This service's resolved reserved port — the value run() routes to and
|
|
95
|
-
* exports as PORT — read the same way load() reads the stash. Defaults to
|
|
96
|
-
* 3000 when the platform binds none. */
|
|
97
|
-
port(): number;
|
|
98
90
|
}
|
|
99
|
-
declare const compute: <D extends Deps,
|
|
91
|
+
declare const compute: <D extends Deps, P extends Params = Record<never, never>, E extends Expose = Record<never, never>, S extends Secrets = Record<never, never>>(def: {
|
|
100
92
|
name: string;
|
|
101
93
|
deps: D;
|
|
102
|
-
|
|
94
|
+
params?: P;
|
|
95
|
+
secrets?: S;
|
|
103
96
|
build: BuildAdapter;
|
|
104
97
|
expose?: E;
|
|
105
|
-
}) => ComputeService<D,
|
|
98
|
+
}) => ComputeService<D, P, E, S>;
|
|
106
99
|
//#endregion
|
|
107
100
|
//#region src/http.d.ts
|
|
108
101
|
/** A service-to-service dependency's client: a thin URL-anchored fetch wrapper. */
|
|
@@ -236,23 +229,23 @@ declare function s3Credentials(): DependencyEnd<CredentialsConfig, typeof creden
|
|
|
236
229
|
/**
|
|
237
230
|
* The storage service authoring factory — a `compute` service routed to the
|
|
238
231
|
* `s3-store` lowering instead of `compute`'s. It is exactly `compute`'s
|
|
239
|
-
* runnable (run/load/
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
232
|
+
* runnable (run/load/config, deps, params, build, expose) with the routing
|
|
233
|
+
* `type` overridden to `'s3-store'`: nothing at runtime keys off `type` (the
|
|
234
|
+
* serializer keys off the deployment address and each param's owner/name, and
|
|
235
|
+
* `load`/`config` off deps/params), so only the deploy-time descriptor lookup
|
|
236
|
+
* sees the override and routes to the extended-output lowering (§ 5). The
|
|
237
|
+
* return type is compute's exactly (including the reserved `port` param). The
|
|
238
|
+
* storage module (D4b) calls this with its `db`/`credentials` deps, a `bucket`
|
|
239
|
+
* param, and `expose: { store: s3Contract }`.
|
|
247
240
|
*
|
|
248
|
-
* `compute()`'s result is a `ComputeService` instance — its run/load/
|
|
249
|
-
* origin methods live on the class prototype, not as the instance's
|
|
250
|
-
* properties, so a plain object spread (`{ ...node }`) would silently
|
|
251
|
-
* them. Building a fresh `ComputeService` from the same data fields
|
|
252
|
-
* `{ ...node }` DOES copy — they're the node's own enumerable
|
|
253
|
-
* with `type` overridden keeps every method intact.
|
|
241
|
+
* `compute()`'s result is a `ComputeService` instance — its run/load/config/
|
|
242
|
+
* secrets/origin methods live on the class prototype, not as the instance's
|
|
243
|
+
* own properties, so a plain object spread (`{ ...node }`) would silently
|
|
244
|
+
* drop them. Building a fresh `ComputeService` from the same data fields
|
|
245
|
+
* (which `{ ...node }` DOES copy — they're the node's own enumerable
|
|
246
|
+
* properties) with `type` overridden keeps every method intact.
|
|
254
247
|
*/
|
|
255
|
-
declare function s3StoreService<D extends Deps,
|
|
248
|
+
declare function s3StoreService<D extends Deps, P extends Params = Record<never, never>, E extends Expose = Record<never, never>>(def: Parameters<typeof compute<D, P, E>>[0]): ReturnType<typeof compute<D, P, E>>;
|
|
256
249
|
//#endregion
|
|
257
250
|
//#region src/secret.d.ts
|
|
258
251
|
/**
|
|
@@ -275,14 +268,13 @@ interface EnvSecretPayload {
|
|
|
275
268
|
*/
|
|
276
269
|
declare function envSecret(name: string): SecretSource<EnvSecretPayload>;
|
|
277
270
|
/**
|
|
278
|
-
* Reads the Prisma Cloud env-var name back out of
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
* deploy with an undefined name.
|
|
271
|
+
* Reads the Prisma Cloud env-var name back out of a secret binding's opaque
|
|
272
|
+
* source. A source not built by `envSecret` (a raw `secretSource(...)` or
|
|
273
|
+
* another target's source) carries no name — reject it here. `secretName` runs
|
|
274
|
+
* in preflight before any provisioning, so a foreign source fails early and
|
|
275
|
+
* clearly rather than producing a broken deploy with an undefined name.
|
|
284
276
|
*/
|
|
285
|
-
declare function secretName(
|
|
277
|
+
declare function secretName(binding: SecretBinding): string;
|
|
286
278
|
//#endregion
|
|
287
279
|
//#region src/streams-keys.d.ts
|
|
288
280
|
/** ADR-0031's need brand for the streams module's bearer key — control.ts registers the provisioner under this. */
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../1-prisma-cloud/1-extensions/target/dist/index.d.mts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../1-prisma-cloud/1-extensions/target/dist/index.d.mts"],"mappings":";;;;UAGU;WACC;WACA;WACA;WACA;;;;;;;;;;;;cAYG,gBAAgB,eAAe;;;;;;;;iBAQ5B,OAAO;EACtB;IACE,oBAAoB;;;;;;;;;;iBAUP,UAAU,cAAc,qBAAqB;;;cAGhD;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;;cAEY,UAAU,UAAU,MAAM,UAAU,SAAS,sBAAsB,UAAU,SAAS,sBAAsB,UAAU,UAAU,s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