@prisma/composer 0.3.0-dev.6 → 0.3.0-dev.7
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/{app-config-Dw3r7sUa-D3dr8rg2.d.mts → app-config-C_AkdBtt-D0rtdLlj.d.mts} +4 -4
- package/dist/{app-config-Dw3r7sUa-D3dr8rg2.d.mts.map → app-config-C_AkdBtt-D0rtdLlj.d.mts.map} +1 -1
- package/dist/arktype.d.mts +16 -0
- package/dist/arktype.d.mts.map +1 -0
- package/dist/arktype.mjs +22 -0
- package/dist/arktype.mjs.map +1 -0
- package/dist/bin.mjs +56 -32
- package/dist/bin.mjs.map +1 -1
- package/dist/{casts-Ci5rYYaR.mjs → casts-DpaahrlC-C5XMnP9S.mjs} +2 -2
- package/dist/casts-DpaahrlC-C5XMnP9S.mjs.map +1 -0
- package/dist/casts.mjs +1 -1
- package/dist/config-B1rI-XeI.d.mts +1 -0
- package/dist/config.d.mts +2 -2
- package/dist/deploy-B1rI-XeI.d.mts +1 -0
- package/dist/{deploy-H3PKi0ZR-Chgm12Bn.mjs → deploy-C4DxNkJ9-D73lmBqy.mjs} +3 -3
- package/dist/{deploy-H3PKi0ZR-Chgm12Bn.mjs.map → deploy-C4DxNkJ9-D73lmBqy.mjs.map} +1 -1
- package/dist/deploy.d.mts +2 -2
- package/dist/deploy.mjs +1 -1
- package/dist/{dist-BkSJOwTm.mjs → dist-CG0jqp27.mjs} +11 -75
- package/dist/dist-CG0jqp27.mjs.map +1 -0
- package/dist/{graph-DUSgjmzA-DhtkTqoz.d.mts → graph-CNZcSnM6-Do0zmuzA.d.mts} +3 -3
- package/dist/graph-CNZcSnM6-Do0zmuzA.d.mts.map +1 -0
- package/dist/{graph-CP16cJyH-D5IW87Y-.mjs → graph-DgbALPDo-BEHF94BN.mjs} +60 -41
- package/dist/graph-DgbALPDo-BEHF94BN.mjs.map +1 -0
- package/dist/{graph-types-BcbVhojU-C3fhxjPK.d.mts → graph-types-DcBX92Gs-Dnhu7wre.d.mts} +86 -86
- package/dist/graph-types-DcBX92Gs-Dnhu7wre.d.mts.map +1 -0
- package/dist/index-BkJ2OjXF.d.mts +22 -0
- package/dist/index-BkJ2OjXF.d.mts.map +1 -0
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +4 -3
- package/dist/local-target.d.mts +1 -1
- package/dist/local-target.mjs +1 -1
- package/dist/local-target.mjs.map +1 -1
- package/dist/{nextjs-DLyeRR7M-DwnBjryZ.d.mts → nextjs-DLyeRR7M-xWd8GKgK.d.mts} +3 -3
- package/dist/{nextjs-DLyeRR7M-DwnBjryZ.d.mts.map → nextjs-DLyeRR7M-xWd8GKgK.d.mts.map} +1 -1
- package/dist/nextjs-control.d.mts +4 -4
- package/dist/nextjs.d.mts +1 -1
- package/dist/node-control.d.mts +3 -3
- package/dist/node.d.mts +2 -2
- package/dist/report.d.mts +2 -2
- package/dist/report.mjs +4 -0
- package/dist/report.mjs.map +1 -1
- package/dist/secret-CHOw4LBU-C8yXoC9N.d.mts +25 -0
- package/dist/secret-CHOw4LBU-C8yXoC9N.d.mts.map +1 -0
- package/dist/secret-DoWGmN7m-DO5Brq1Y.mjs +55 -0
- package/dist/secret-DoWGmN7m-DO5Brq1Y.mjs.map +1 -0
- package/dist/service-rpc.d.mts +2 -2
- package/dist/service-rpc.mjs +3 -3
- package/dist/testing.d.mts +17 -11
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +12 -20
- package/dist/testing.mjs.map +1 -1
- package/package.json +11 -10
- package/src/exports/arktype.ts +1 -0
- package/dist/casts-Ci5rYYaR.mjs.map +0 -1
- package/dist/config-121C4hAb.d.mts +0 -1
- package/dist/deploy-121C4hAb.d.mts +0 -1
- package/dist/dist-BkSJOwTm.mjs.map +0 -1
- package/dist/graph-CP16cJyH-D5IW87Y-.mjs.map +0 -1
- package/dist/graph-DUSgjmzA-DhtkTqoz.d.mts.map +0 -1
- package/dist/graph-types-BcbVhojU-C3fhxjPK.d.mts.map +0 -1
- package/dist/index-BFBNz7Aw.d.mts +0 -32
- package/dist/index-BFBNz7Aw.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-DgbALPDo-BEHF94BN.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/graph-DgbALPDo.mjs"],"sourcesContent":["import { blindCast } from \"@internal/foundation/casts\";\n//#region src/graph-types.ts\n/** Thrown by Load when the graph is malformed. */\nvar LoadError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"LoadError\";\n\t}\n};\n//#endregion\n//#region src/node.ts\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 SECRET_NEED = blindCast(Symbol.for(\"prisma:secret-need\"));\nconst SECRET_SOURCE = blindCast(Symbol.for(\"prisma:secret-source\"));\n/** Declares a secret NEED. Nameless — the platform name is bound at the root via `envSecret`. */\nfunction secret() {\n\treturn Object.freeze({\n\t\t[SECRET_NEED]: true,\n\t\tkind: \"secret\"\n\t});\n}\n/** Builds an opaque secret source from a target-defined payload — the SPI a deploy target's own source constructor (e.g. `envSecret`) calls. Core forwards the source and never inspects the payload. */\nfunction secretSource(payload) {\n\treturn Object.freeze({\n\t\t[SECRET_SOURCE]: true,\n\t\tpayload\n\t});\n}\n/** True if `value` is a secret source (an `envSecret` result or a forwarded ctx.secrets ref). */\nfunction isSecretSource(value) {\n\treturn typeof value === \"object\" && value !== null && blindCast(value)[SECRET_SOURCE] === true;\n}\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}\n/** True if `value` is a provisioning need (a `provisionNeed()` result). */\nfunction isProvisionNeed(value) {\n\treturn typeof value === \"object\" && value !== null && blindCast(value)[PROVISION_NEED] === true;\n}\nconst PARAM_SOURCE = blindCast(Symbol.for(\"prisma:param-source\"));\nconst PARAM_NEED = blindCast(Symbol.for(\"prisma:param-need\"));\n/** Builds an opaque param source from a target-defined payload — the SPI a deploy target's own source constructor (e.g. `envParam`) calls. Core forwards the source and never inspects the payload. */\nfunction paramSource(payload) {\n\treturn Object.freeze({\n\t\t[PARAM_SOURCE]: true,\n\t\tpayload\n\t});\n}\n/** True if `value` is a param source (an `envParam` result or a forwarded ctx.params ref). */\nfunction isParamSource(value) {\n\treturn typeof value === \"object\" && value !== null && blindCast(value)[PARAM_SOURCE] === true;\n}\n/** Declares a module param-forwarding NEED. Nameless — bound to a `ParamSource` by an enclosing scope and forwarded into a child's real param. */\nfunction paramNeed() {\n\treturn Object.freeze({\n\t\t[PARAM_NEED]: true,\n\t\tkind: \"param\"\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* Seals a node instance after its constructor has assigned all fields — the\n* last statement of a concrete node class's constructor. A free function, not\n* a base-class method, so an instance stays structurally a plain frozen node.\n*/\nfunction freezeNode(node) {\n\tObject.freeze(node);\n\treturn node;\n}\n/**\n* Everything `resource()` establishes, minus the freeze — an extension\n* whose resource node carries extra fields extends this, assigns them, and\n* calls `freezeNode(this)` as its constructor's last statement.\n*/\nvar ResourceNodeBase = class {\n\t[NODE] = true;\n\tkind = \"resource\";\n\tname;\n\textension;\n\ttype;\n\tprovides;\n\tconstructor(def) {\n\t\trequireName(def.name, \"resource\");\n\t\trequireExtension(def.extension, \"resource\");\n\t\tconst provides = def.provides;\n\t\tif (typeof provides !== \"object\" || provides === null || typeof provides.kind !== \"string\" || provides.kind.length === 0 || typeof provides.satisfies !== \"function\") throw new Error(\"resource() requires `provides` — the Contract this resource offers (a non-empty `kind` plus its `satisfies()`).\");\n\t\tthis.name = def.name;\n\t\tthis.extension = def.extension;\n\t\tthis.type = provides.kind;\n\t\tthis.provides = provides;\n\t}\n};\n/** The core leaf: exactly the base, frozen. */\nvar FrozenResourceNode = class extends ResourceNodeBase {\n\tconstructor(def) {\n\t\tsuper(def);\n\t\tfreezeNode(this);\n\t}\n};\n/**\n* Constructs a branded, frozen Resource node — an identity plus the Contract\n* it provides; the routing `type` is the contract's `kind`. Pure — nothing\n* is provisioned until a module provisions it.\n*/\nfunction resource(def) {\n\treturn new FrozenResourceNode(def);\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/**\n* Constructs a branded, frozen Module node. Construction is INERT — the body is\n* wiring, not user code, and runs only when the module is Loaded.\n*/\nfunction module(name, boundaryOrBody, maybeBody) {\n\trequireName(name, \"module\");\n\tconst closedRoot = typeof boundaryOrBody === \"function\";\n\tconst boundary = closedRoot ? {} : boundaryOrBody;\n\tconst deps = frozenShallowCopy(boundary.deps ?? {});\n\tconst secretSlots = frozenShallowCopy(boundary.secrets ?? {});\n\tconst paramSlots = frozenShallowCopy(boundary.params ?? {});\n\tconst expose = frozenShallowCopy(boundary.expose ?? {});\n\tconst body = closedRoot ? (ctx) => {\n\t\tboundaryOrBody(ctx);\n\t\treturn {};\n\t} : maybeBody;\n\treturn Object.freeze({\n\t\t[NODE]: true,\n\t\tkind: \"module\",\n\t\tname,\n\t\tdeps,\n\t\tsecretSlots,\n\t\tparamSlots,\n\t\texpose,\n\t\tbody\n\t});\n}\n/**\n* True if `value` was constructed by this module's factories. Checks the\n* brand only, never a prototype — a graph may mix nodes from a different\n* installed copy of core (dual-package hazard).\n*/\nfunction isNode(value) {\n\treturn typeof value === \"object\" && value !== null && value[NODE] === true;\n}\n//#endregion\n//#region src/toposort.ts\n/**\n* Stable topological sort: every edge's `from` precedes its `to` in the\n* result. Ties (nodes with no ordering constraint between them) keep their\n* relative order from `nodes` — so a graph already authored producer-first\n* comes out byte-identical to its pre-sort layout; only a graph that\n* genuinely needs reordering (e.g. a module wired via a forged ref pointing at a\n* not-yet-provisioned producer) actually moves. A Kahn's-algorithm variant\n* that always picks the ready node with the smallest original index. Edges\n* whose endpoint falls outside `nodes` (e.g. a service-root's input edges\n* targeting the root, which is appended separately) are ignored. Cycles\n* cannot reach here: `assertDependencyDag` already rejects them for\n* dependency edges, and input edges never cycle.\n*/\nfunction topoSort(nodes, edges) {\n\tconst byId = new Map(nodes.map((n) => [n.id, n]));\n\tconst indexOf = new Map(nodes.map((n, i) => [n.id, i]));\n\tconst indegree = new Map(nodes.map((n) => [n.id, 0]));\n\tconst successors = /* @__PURE__ */ new Map();\n\tfor (const edge of edges) {\n\t\tif (!byId.has(edge.from) || !byId.has(edge.to)) continue;\n\t\tconst targets = successors.get(edge.from) ?? [];\n\t\ttargets.push(edge.to);\n\t\tsuccessors.set(edge.from, targets);\n\t\tindegree.set(edge.to, (indegree.get(edge.to) ?? 0) + 1);\n\t}\n\tconst ready = new Set(nodes.filter((n) => indegree.get(n.id) === 0).map((n) => n.id));\n\tconst order = [];\n\twhile (ready.size > 0) {\n\t\tlet next;\n\t\tlet bestIndex = Number.POSITIVE_INFINITY;\n\t\tfor (const id of ready) {\n\t\t\tconst index = indexOf.get(id) ?? Number.POSITIVE_INFINITY;\n\t\t\tif (index < bestIndex) {\n\t\t\t\tbestIndex = index;\n\t\t\t\tnext = id;\n\t\t\t}\n\t\t}\n\t\tif (next === void 0) break;\n\t\tready.delete(next);\n\t\torder.push(next);\n\t\tfor (const target of successors.get(next) ?? []) {\n\t\t\tconst remaining = (indegree.get(target) ?? 0) - 1;\n\t\t\tindegree.set(target, remaining);\n\t\t\tif (remaining === 0) ready.add(target);\n\t\t}\n\t}\n\tif (order.length !== nodes.length) throw new LoadError(`topological sort processed ${order.length} of ${nodes.length} nodes — the graph contains a cycle that slipped past the DAG validation.`);\n\treturn order.map((id) => byId.get(id)).filter((n) => n !== void 0);\n}\n//#endregion\n//#region src/load-service.ts\nfunction serviceInputs(service, serviceId) {\n\tif (typeof service.inputs !== \"object\" || service.inputs === null) throw new LoadError(`Service \"${serviceId}\" has no inputs map.`);\n\tconst nodes = [];\n\tconst edges = [];\n\tfor (const [input, value] of Object.entries(service.inputs)) {\n\t\tconst kind = isNode(value) ? value.kind : void 0;\n\t\tif (kind === \"resource\") throw new LoadError(`Input \"${input}\" of \"${serviceId}\" is a resource node — a resource is provisioned by the composing module, never created for a service that mentions it. Declare the input as a dependency (the pack's dependency factory) and wire the module-provisioned resource's ref into it.`);\n\t\tif (kind !== \"dependency\") throw new LoadError(`Input \"${input}\" of \"${serviceId}\" is not a branded dependency end (construct it with the dependency() factory).`);\n\t\tif (value.type.length === 0) throw new LoadError(`Input \"${input}\" of \"${serviceId}\" has an empty node type.`);\n\t\tconst id = `${serviceId}.${input}`;\n\t\tnodes.push({\n\t\t\tid,\n\t\t\tnode: value\n\t\t});\n\t\tedges.push({\n\t\t\tfrom: id,\n\t\t\tto: serviceId,\n\t\t\tinput,\n\t\t\tkind: \"input\"\n\t\t});\n\t}\n\treturn {\n\t\tnodes,\n\t\tedges\n\t};\n}\nfunction loadService(root, rootId) {\n\tfor (const [input, value] of Object.entries(root.inputs)) if (isNode(value) && value.kind === \"dependency\") throw new LoadError(`Service \"${rootId}\" has an unwired dependency input \"${input}\" — this service is composed by a module; deploy the module instead of loading \"${rootId}\" directly.`);\n\tif (root.inputSchema !== void 0) throw new LoadError(`Service \"${rootId}\" declares an input schema but is being loaded directly — a lone service has no enclosing scope to bind its input. Compose it inside a module whose provision() call binds \\`input: { … }\\` (ADR-0042).`);\n\tconst rootGraphNode = {\n\t\tid: rootId,\n\t\tnode: root\n\t};\n\tconst { nodes, edges } = serviceInputs(root, rootId);\n\treturn {\n\t\troot: rootGraphNode,\n\t\tnodes: [...topoSort(nodes, edges), rootGraphNode],\n\t\tedges,\n\t\tinputBindings: [],\n\t\tparams: []\n\t};\n}\n//#endregion\n//#region src/load-module.ts\n/**\n* Builds the ref a provision() call hands back: the id (so a producer with no\n* exposed ports — or an untyped slot — can still be wired wholesale) plus one\n* ref-port per exposed contract, each the contract's own runtime value (so\n* its `satisfies()` still works) tagged with the provider's id.\n*/\nfunction refFor(id, service) {\n\tconst ports = {};\n\tfor (const [port, contract] of Object.entries(service.expose ?? {})) ports[port] = {\n\t\t...contract,\n\t\t__providerId: id\n\t};\n\treturn blindCast({\n\t\tid,\n\t\t...ports\n\t});\n}\n/**\n* The resource variant of refFor: a resource has exactly one port — the\n* contract it provides — flattened onto the ref itself, tagged with the\n* provider id. `id` is written last so a hostile contract value cannot\n* clobber it.\n*/\nfunction refForResource(id, resource) {\n\treturn blindCast({\n\t\t...resource.provides,\n\t\t__providerId: id,\n\t\tid\n\t});\n}\n/** A wired value's producer id: a ref-port's `__providerId`, or a bare ref's `id`. */\nfunction producerIdOf(ref) {\n\tif (typeof ref !== \"object\" || ref === null) return void 0;\n\tif (\"__providerId\" in ref && typeof ref.__providerId === \"string\") return ref.__providerId;\n\tif (\"id\" in ref && typeof ref.id === \"string\") return ref.id;\n}\n/**\n* Brands each `ctx.inputs` entry with the input key it stands for (see\n* flatten): diagnostic only — usage attribution relies on the per-key object\n* identity the branding copy creates, never on reading this back.\n*/\nconst MODULE_INPUT_KEY = Symbol(\"prisma:module-input-key\");\n/** Same per-key identity trick as MODULE_INPUT_KEY, for the parallel `ctx.secrets` forwarding channel. */\nconst MODULE_SECRET_KEY = Symbol(\"prisma:module-secret-key\");\n/** Same per-key identity trick as MODULE_INPUT_KEY, for the parallel `ctx.params` forwarding channel. */\nconst MODULE_PARAM_KEY = Symbol(\"prisma:module-param-key\");\n/** Whether `ref` carries a callable `satisfies` that accepts `required` truthily. */\nfunction satisfiesRequired(ref, required) {\n\treturn typeof ref === \"object\" && ref !== null && \"satisfies\" in ref && typeof ref.satisfies === \"function\" && ref.satisfies(required);\n}\n/**\n* Checks one recorded `wiring` object against the Deps it was wired against:\n* every named input exists and is a dependency slot, every referenced\n* producer is a real (by-now-provisioned) address, and a wired ref whose\n* slot declares a required contract must satisfy() it — no producer-kind\n* branching, the contract alone determines validity, whether the producer is\n* a service port or a resource. Shared by both provisioned kinds so a\n* module-as-child gets exactly the checks a service gets, and run once per\n* entry against the one `byId` shared by the whole recursive flatten, so a\n* forwarded ref resolves through to its real producer address regardless of\n* which ancestor scope provisioned it.\n*/\nfunction validateWiring(pending, byId) {\n\tconst { deps, wiring, targetId, targetKind, enclosingModuleName } = pending;\n\tfor (const [input, ref] of Object.entries(wiring)) {\n\t\tconst declared = blindCast(deps[input]);\n\t\tif (declared === void 0 || !isNode(declared) || declared.kind !== \"dependency\") throw new LoadError(`The deps for \"${targetId}\" name \"${input}\", which is not a dependency slot of that ${targetKind}.`);\n\t\tconst producerId = producerIdOf(ref);\n\t\tconst producer = producerId !== void 0 ? byId.get(producerId) : void 0;\n\t\tif (producerId === void 0 || producer === void 0) throw new LoadError(`The deps for \"${targetId}.${input}\" reference \"${String(producerId)}\", which is not provisioned in module \"${enclosingModuleName}\".`);\n\t\tconst required = declared.required;\n\t\tif (required !== void 0 && !satisfiesRequired(ref, required)) throw new LoadError(`The deps for \"${targetId}.${input}\" do not satisfy the slot's required contract.`);\n\t}\n\tfor (const [input, rawValue] of Object.entries(deps)) {\n\t\tconst value = blindCast(rawValue);\n\t\tif (!isNode(value) || wiring[input] !== void 0) continue;\n\t\tif (value.kind === \"dependency\") throw new LoadError(`Dependency input \"${input}\" of provisioned ${targetKind} \"${targetId}\" is not wired to a producer (module \"${enclosingModuleName}\").`);\n\t}\n}\n/**\n* Flattens a value into itself plus every nested object/array member value —\n* identity fodder for the ctx.secrets/ctx.params usage marking, which must\n* see a forwarded source wherever it sits inside an input binding (ADR-0042).\n* A secret/param source is an opaque leaf: it is pushed (a forwarded ref IS\n* such a source, so identity-matching still needs it) but never descended\n* into, so a ref buried in an unrelated source's payload is not falsely seen\n* as used. `seen` guards object cycles so a self-referential binding cannot\n* recurse forever.\n*/\nfunction deepValues(value, out, seen = /* @__PURE__ */ new WeakSet()) {\n\tout.push(value);\n\tif (typeof value !== \"object\" || value === null) return;\n\tif (isSecretSource(value) || isParamSource(value)) return;\n\tif (seen.has(value)) return;\n\tseen.add(value);\n\tconst members = Array.isArray(value) ? value : Object.values(value);\n\tfor (const member of members) deepValues(member, out, seen);\n}\n/** The (unvalidated) edges a `wiring` object implies — one dependency edge per entry; `validateWiring` does the real checking. */\nfunction wiringEdges(wiring, targetId) {\n\treturn Object.entries(wiring).map(([input, ref]) => ({\n\t\tfrom: producerIdOf(ref) ?? \"\",\n\t\tto: targetId,\n\t\tinput,\n\t\tkind: \"dependency\"\n\t}));\n}\n/**\n* Checks the secrets wired into one provisioned child MODULE: every declared\n* forwarding slot is bound to a real secret source (an `envSecret` or a\n* forwarded ctx.secrets ref), and no wired key names a slot the module\n* doesn't declare — the secret analog of `validateWiring`'s per-input checks,\n* but resolved inline (a source carries its own name, so no whole-graph pass\n* is needed).\n*/\nfunction validateSecretBinding(child, id, secretWiring, enclosingModuleName) {\n\tconst { kind } = child;\n\tfor (const slot of Object.keys(child.secretSlots)) {\n\t\tconst bound = secretWiring[slot];\n\t\tif (bound === void 0) throw new LoadError(`Secret slot \"${slot}\" of provisioned ${kind} \"${id}\" is not bound (module \"${enclosingModuleName}\") — bind it with envSecret('NAME') or forward ctx.secrets.`);\n\t\tif (!isSecretSource(bound)) throw new LoadError(`Secret slot \"${slot}\" of \"${id}\" (module \"${enclosingModuleName}\") was wired with a non-secret value — use envSecret('NAME') or a forwarded ctx.secrets ref.`);\n\t}\n\tfor (const slot of Object.keys(secretWiring)) if (!Object.hasOwn(child.secretSlots, slot)) throw new LoadError(`The secrets for \"${id}\" name \"${slot}\", which is not a secret slot of that ${kind} (module \"${enclosingModuleName}\").`);\n}\n/**\n* Checks the params wired into a provisioned SERVICE: unlike a secret slot, a\n* declared param is never required to be bound here — it may fall back to its\n* own `default` (checked later, at `buildConfig`) — so this only rejects a\n* wired key that names something other than a real declared param.\n*/\nfunction validateServiceParamBinding(child, id, paramWiring, enclosingModuleName) {\n\tfor (const slot of Object.keys(paramWiring)) if (!Object.hasOwn(child.params, slot)) throw new LoadError(`The params for \"${id}\" name \"${slot}\", which is not a param of that service (module \"${enclosingModuleName}\").`);\n}\n/**\n* Checks the params wired into a provisioned MODULE: every declared\n* param-forwarding slot must be bound to a real `ParamSource` — a slot has no\n* schema of its own, so (unlike a service param) it cannot fall back to a\n* literal or a default; the param analog of `validateSecretBinding`.\n*/\nfunction validateParamNeedBinding(child, id, paramWiring, enclosingModuleName) {\n\tfor (const slot of Object.keys(child.paramSlots)) {\n\t\tconst bound = paramWiring[slot];\n\t\tif (bound === void 0) throw new LoadError(`Param slot \"${slot}\" of provisioned module \"${id}\" is not bound (module \"${enclosingModuleName}\") — bind it with a param source (e.g. envParam('NAME')) or forward ctx.params.`);\n\t\tif (!isParamSource(bound)) throw new LoadError(`Param slot \"${slot}\" of \"${id}\" (module \"${enclosingModuleName}\") was wired with a non-source value — a module param-forwarding slot carries no schema to validate a literal against; use envParam('NAME') or a forwarded ctx.params ref.`);\n\t}\n\tfor (const slot of Object.keys(paramWiring)) if (!Object.hasOwn(child.paramSlots, slot)) throw new LoadError(`The params for \"${id}\" name \"${slot}\", which is not a param slot of that module (module \"${enclosingModuleName}\").`);\n}\n/**\n* Recursively flattens one module's body into the shared graph state and\n* returns its resolved ModuleOutputs (one ref-port per expose key) for the\n* caller (the enclosing provision() call, or Load itself for the root) to\n* use. `address` is this module's OWN full address, or `undefined` for the root\n* scope — its direct children then get bare (unprefixed) addresses, keeping\n* a single-level module identical to before nesting existed. `wiring` supplies a\n* resolved producer ref-port for each of this module's OWN declared deps (empty\n* for the root, which may not declare any — see the root non-empty-deps\n* check in loadModule). `nodes`, `edges`, `pending`, and `byId` are shared\n* across the ENTIRE recursive flatten, not per scope — a nested module may\n* forward in a producer provisioned by an ancestor scope, and it is the\n* shared `byId` (keyed by full address) that lets that resolve.\n*/\nfunction flatten(moduleNode, address, wiring, secretWiring, paramWiring, nodes, edges, pending, inputBindings, paramBindings, byId) {\n\tconst localIds = /* @__PURE__ */ new Set();\n\tconst used = /* @__PURE__ */ new Set();\n\tconst usedSecrets = /* @__PURE__ */ new Set();\n\tconst usedParams = /* @__PURE__ */ new Set();\n\tconst ctxInputs = {};\n\tfor (const key of Object.keys(moduleNode.deps)) {\n\t\tconst wired = wiring[key];\n\t\tctxInputs[key] = typeof wired === \"object\" && wired !== null ? {\n\t\t\t...wired,\n\t\t\t[MODULE_INPUT_KEY]: key\n\t\t} : wired;\n\t}\n\tconst markUsed = (values) => {\n\t\tfor (const value of values) for (const key of Object.keys(ctxInputs)) if (value === ctxInputs[key]) used.add(key);\n\t};\n\tconst ctxSecrets = {};\n\tfor (const key of Object.keys(moduleNode.secretSlots)) {\n\t\tconst bound = secretWiring[key];\n\t\tctxSecrets[key] = typeof bound === \"object\" && bound !== null ? {\n\t\t\t...bound,\n\t\t\t[MODULE_SECRET_KEY]: key\n\t\t} : bound;\n\t}\n\tconst markSecretsUsed = (values) => {\n\t\tfor (const value of values) for (const key of Object.keys(ctxSecrets)) if (value === ctxSecrets[key]) usedSecrets.add(key);\n\t};\n\tconst ctxParams = {};\n\tfor (const key of Object.keys(moduleNode.paramSlots)) {\n\t\tconst bound = paramWiring[key];\n\t\tctxParams[key] = typeof bound === \"object\" && bound !== null ? {\n\t\t\t...bound,\n\t\t\t[MODULE_PARAM_KEY]: key\n\t\t} : bound;\n\t}\n\tconst markParamsUsed = (values) => {\n\t\tfor (const value of values) for (const key of Object.keys(ctxParams)) if (value === ctxParams[key]) usedParams.add(key);\n\t};\n\tconst provision = (child, opts) => {\n\t\tconst id = opts?.id ?? child.name;\n\t\tconst provisionWiring = opts?.deps;\n\t\tconst provisionSecrets = opts?.secrets;\n\t\tconst provisionInput = opts?.input;\n\t\tconst provisionParams = opts?.params;\n\t\tif (typeof id !== \"string\" || id.length === 0) throw new LoadError(`provision() requires a non-empty id (module \"${moduleNode.name}\").`);\n\t\tif (!isConfigKeySegment(id)) throw new LoadError(`provision() id \"${id}\" (module \"${moduleNode.name}\") must contain only ASCII letters and digits ([A-Za-z0-9]) — the id becomes an address segment, and addresses derive deterministic config keys (segments uppercased and joined with \"_\"). \"${id}\" would put \"${id.toUpperCase()}\" inside the derived key. (\"_\" collides with the key separator and \".\" with the address separator.)`);\n\t\tif (localIds.has(id)) throw new LoadError(`Duplicate provision id \"${id}\" in module \"${moduleNode.name}\".`);\n\t\tconst untrusted = child;\n\t\tif (!isNode(untrusted) || untrusted.kind !== \"service\" && untrusted.kind !== \"resource\" && untrusted.kind !== \"module\") throw new LoadError(`provision(\"${id}\") expects a branded service, resource, or module node (construct it with the service()/resource()/module() factories or a pack's own).`);\n\t\tlocalIds.add(id);\n\t\tconst fullAddress = address === void 0 ? id : `${address}.${id}`;\n\t\tif (child.kind === \"resource\") {\n\t\t\tif (provisionWiring !== void 0) throw new LoadError(`provision(\"${id}\") received deps for a resource — a resource has no dependency slots to satisfy.`);\n\t\t\tif (provisionSecrets !== void 0) throw new LoadError(`provision(\"${id}\") received secrets for a resource — a resource has no secret slots to satisfy.`);\n\t\t\tif (provisionInput !== void 0) throw new LoadError(`provision(\"${id}\") received an input binding for a resource — a resource declares no input schema.`);\n\t\t\tif (provisionParams !== void 0) throw new LoadError(`provision(\"${id}\") received params for a resource — a resource has no params to satisfy.`);\n\t\t\tif (child.type.length === 0) throw new LoadError(`provision(\"${id}\") received a resource with an empty node type.`);\n\t\t\tbyId.set(fullAddress, child);\n\t\t\tnodes.push({\n\t\t\t\tid: fullAddress,\n\t\t\t\tnode: child\n\t\t\t});\n\t\t\treturn refForResource(fullAddress, child);\n\t\t}\n\t\tconst localWiring = { ...provisionWiring ?? {} };\n\t\tmarkUsed(Object.values(localWiring));\n\t\tconst localSecrets = { ...provisionSecrets ?? {} };\n\t\tmarkSecretsUsed(Object.values(localSecrets));\n\t\tconst localParams = { ...provisionParams ?? {} };\n\t\tmarkParamsUsed(Object.values(localParams));\n\t\tif (child.kind === \"service\") {\n\t\t\tif (provisionSecrets !== void 0) throw new LoadError(`provision(\"${id}\") received secrets for a service — a service takes its secrets as envSecret(...) leaves of its \\`input\\` binding (ADR-0042), not a secrets map.`);\n\t\t\tif (child.inputSchema !== void 0 && provisionInput === void 0) throw new LoadError(`Input of provisioned service \"${id}\" is not bound (module \"${moduleNode.name}\") — the service declares an input schema; bind it with \\`input: { … }\\` on its provision() call.`);\n\t\t\tif (child.inputSchema === void 0 && provisionInput !== void 0) throw new LoadError(`provision(\"${id}\") received an input binding, but the service declares no input schema (module \"${moduleNode.name}\").`);\n\t\t\tif (provisionInput !== void 0) {\n\t\t\t\tconst leaves = [];\n\t\t\t\tdeepValues(provisionInput, leaves);\n\t\t\t\tmarkSecretsUsed(leaves);\n\t\t\t\tmarkParamsUsed(leaves);\n\t\t\t\tinputBindings.push({\n\t\t\t\t\tserviceAddress: fullAddress,\n\t\t\t\t\tbinding: blindCast(provisionInput)\n\t\t\t\t});\n\t\t\t}\n\t\t\tvalidateServiceParamBinding(child, id, localParams, moduleNode.name);\n\t\t\tfor (const [slot, binding] of Object.entries(localParams)) paramBindings.push({\n\t\t\t\tserviceAddress: fullAddress,\n\t\t\t\tslot,\n\t\t\t\tbinding\n\t\t\t});\n\t\t\tconst inputs = serviceInputs(child, fullAddress);\n\t\t\tnodes.push(...inputs.nodes, {\n\t\t\t\tid: fullAddress,\n\t\t\t\tnode: child\n\t\t\t});\n\t\t\tedges.push(...inputs.edges, ...wiringEdges(localWiring, fullAddress));\n\t\t\tpending.push({\n\t\t\t\tdeps: child.inputs,\n\t\t\t\twiring: localWiring,\n\t\t\t\ttargetId: fullAddress,\n\t\t\t\ttargetKind: \"service\",\n\t\t\t\tenclosingModuleName: moduleNode.name\n\t\t\t});\n\t\t\tbyId.set(fullAddress, child);\n\t\t\treturn refFor(fullAddress, child);\n\t\t}\n\t\tif (provisionInput !== void 0) throw new LoadError(`provision(\"${id}\") received an input binding for a module — a module has no input schema; bind the input on the service that declares it.`);\n\t\tvalidateSecretBinding(child, id, localSecrets, moduleNode.name);\n\t\tvalidateParamNeedBinding(child, id, localParams, moduleNode.name);\n\t\tedges.push(...wiringEdges(localWiring, fullAddress));\n\t\tpending.push({\n\t\t\tdeps: child.deps,\n\t\t\twiring: localWiring,\n\t\t\ttargetId: fullAddress,\n\t\t\ttargetKind: \"module\",\n\t\t\tenclosingModuleName: moduleNode.name\n\t\t});\n\t\tconst childOutputs = flatten(child, fullAddress, localWiring, localSecrets, localParams, nodes, edges, pending, inputBindings, paramBindings, byId);\n\t\tnodes.push({\n\t\t\tid: fullAddress,\n\t\t\tnode: child\n\t\t});\n\t\tbyId.set(fullAddress, child);\n\t\treturn blindCast({\n\t\t\tid: fullAddress,\n\t\t\t...childOutputs\n\t\t});\n\t};\n\tconst ctx = blindCast({\n\t\tinputs: ctxInputs,\n\t\tsecrets: ctxSecrets,\n\t\tparams: ctxParams,\n\t\tprovision: blindCast(provision)\n\t});\n\tconst outputs = blindCast(moduleNode.body(ctx) ?? {});\n\tmarkUsed(Object.values(outputs));\n\tfor (const key of Object.keys(moduleNode.deps)) if (!used.has(key)) throw new LoadError(`Module \"${moduleNode.name}\" declares input \"${key}\" but never forwards it into a provision nor returns it as an output.`);\n\tfor (const key of Object.keys(moduleNode.secretSlots)) if (!usedSecrets.has(key)) throw new LoadError(`Module \"${moduleNode.name}\" declares secret \"${key}\" but never forwards it into a provision.`);\n\tfor (const key of Object.keys(moduleNode.paramSlots)) if (!usedParams.has(key)) throw new LoadError(`Module \"${moduleNode.name}\" declares param \"${key}\" but never forwards it into a provision.`);\n\tfor (const [key, contract] of Object.entries(moduleNode.expose)) {\n\t\tconst port = outputs[key];\n\t\tif (port === void 0) throw new LoadError(`Module \"${moduleNode.name}\" declares expose \"${key}\" but its body did not return a port for it.`);\n\t\tif (!satisfiesRequired(port, contract)) throw new LoadError(`Module \"${moduleNode.name}\"'s returned port for expose \"${key}\" does not satisfy its declared contract.`);\n\t}\n\treturn outputs;\n}\nfunction loadModule(root, opts) {\n\tconst rootId = opts?.id ?? root.name;\n\tconst rootDepKeys = Object.keys(root.deps);\n\tif (rootDepKeys.length > 0) {\n\t\tconst names = rootDepKeys.map((k) => `\"${k}\"`).join(\", \");\n\t\tthrow new LoadError(`Module \"${root.name}\" declares input${rootDepKeys.length > 1 ? \"s\" : \"\"} ${names} but is being deployed as the root — a root has no enclosing scope to wire them; compose \"${root.name}\" from another module that provisions and wires it instead.`);\n\t}\n\tconst rootSecretKeys = Object.keys(root.secretSlots);\n\tif (rootSecretKeys.length > 0) {\n\t\tconst names = rootSecretKeys.map((k) => `\"${k}\"`).join(\", \");\n\t\tthrow new LoadError(`Module \"${root.name}\" declares secret${rootSecretKeys.length > 1 ? \"s\" : \"\"} ${names} but is being deployed as the root — a root has no enclosing scope to bind them; the root binds secrets with envSecret('NAME'), it does not declare secret slots of its own.`);\n\t}\n\tconst rootParamKeys = Object.keys(root.paramSlots);\n\tif (rootParamKeys.length > 0) {\n\t\tconst names = rootParamKeys.map((k) => `\"${k}\"`).join(\", \");\n\t\tthrow new LoadError(`Module \"${root.name}\" declares param${rootParamKeys.length > 1 ? \"s\" : \"\"} ${names} but is being deployed as the root — a root has no enclosing scope to bind them; the root binds params directly on each provision() call, it does not declare param-forwarding slots of its own.`);\n\t}\n\tconst nodes = [];\n\tconst edges = [];\n\tconst pending = [];\n\tconst inputBindings = [];\n\tconst paramBindings = [];\n\tconst byId = /* @__PURE__ */ new Map();\n\tflatten(root, void 0, {}, {}, {}, nodes, edges, pending, inputBindings, paramBindings, byId);\n\tfor (const entry of pending) validateWiring(entry, byId);\n\tassertDependencyDag(edges);\n\tconst rootGraphNode = {\n\t\tid: rootId,\n\t\tnode: root\n\t};\n\treturn {\n\t\troot: rootGraphNode,\n\t\tnodes: [...topoSort(nodes, edges), rootGraphNode],\n\t\tedges,\n\t\tinputBindings,\n\t\tparams: paramBindings\n\t};\n}\n/**\n* The dependency edges must form a DAG — a cycle means neither producer can\n* deploy first. Resources take no wiring, so only service/module-to-service/module\n* edges can ever participate in a cycle; no special-casing needed.\n*/\nfunction assertDependencyDag(edges) {\n\tconst adjacency = /* @__PURE__ */ new Map();\n\tfor (const edge of edges) {\n\t\tif (edge.kind !== \"dependency\") continue;\n\t\tconst targets = adjacency.get(edge.from) ?? [];\n\t\ttargets.push(edge.to);\n\t\tadjacency.set(edge.from, targets);\n\t}\n\tconst visiting = /* @__PURE__ */ new Set();\n\tconst done = /* @__PURE__ */ new Set();\n\tconst stack = [];\n\tconst visit = (id) => {\n\t\tif (done.has(id)) return;\n\t\tif (visiting.has(id)) throw new LoadError(`Dependency cycle: ${[...stack.slice(stack.indexOf(id)), id].join(\" → \")} — no deploy order exists.`);\n\t\tvisiting.add(id);\n\t\tstack.push(id);\n\t\tfor (const next of adjacency.get(id) ?? []) visit(next);\n\t\tstack.pop();\n\t\tvisiting.delete(id);\n\t\tdone.add(id);\n\t};\n\tfor (const id of adjacency.keys()) visit(id);\n}\n//#endregion\n//#region src/graph.ts\n/**\n* Builds the in-memory graph from a root node. A service root walks its own\n* `inputs`; a module root executes its body (wiring, not user code — the\n* designed exception to imports-run-nothing) and recursively flattens every\n* module it provisions into one graph of hierarchical addresses. A malformed\n* graph is a `LoadError` that names its fix; the individual validation rules\n* live with `loadService` / `loadModule` and are covered by name in the Load\n* tests. Executes nothing of the user's own code beyond module bodies.\n*/\nfunction Load(root, opts) {\n\tif (!isNode(root)) throw new LoadError(\"Load expects a branded service or module node (construct it with the service()/module() factories).\");\n\tif (root.kind === \"module\") return loadModule(root, opts);\n\tif (root.kind === \"service\") return loadService(root, opts?.id ?? \"root\");\n\tthrow new LoadError(\"Load expects a service or module root (received another node kind).\");\n}\n//#endregion\nexport { LoadError as _, isNode as a, isSecretSource as c, paramSource as d, provisionNeed as f, service as g, secretSource as h, freezeNode as i, module as l, secret as m, ResourceNodeBase as n, isParamSource as o, resource as p, dependency as r, isProvisionNeed as s, Load as t, paramNeed as u };\n\n//# sourceMappingURL=graph-DgbALPDo.mjs.map"],"mappings":";;;AAGA,IAAI,YAAY,cAAc,MAAM;CACnC,YAAY,SAAS;EACpB,MAAM,OAAO;EACb,KAAK,OAAO;CACb;AACD;;;;;AAOA,MAAM,OAAO,OAAO,IAAI,aAAa;AACrC,MAAM,cAAc,UAAU,OAAO,IAAI,oBAAoB,CAAC;AAC9D,MAAM,gBAAgB,UAAU,OAAO,IAAI,sBAAsB,CAAC;;AAElE,SAAS,SAAS;CACjB,OAAO,OAAO,OAAO;GACnB,cAAc;EACf,MAAM;CACP,CAAC;AACF;;AAEA,SAAS,aAAa,SAAS;CAC9B,OAAO,OAAO,OAAO;GACnB,gBAAgB;EACjB;CACD,CAAC;AACF;;AAEA,SAAS,eAAe,OAAO;CAC9B,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU,KAAK,CAAC,CAAC,mBAAmB;AAC3F;AACA,MAAM,iBAAiB,UAAU,OAAO,IAAI,u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AK,KAAK,EAAE;EACpB,UAAU,IAAI,KAAK,MAAM,OAAO;CACjC;CACA,MAAM,2BAA2B,IAAI,IAAI;CACzC,MAAM,uBAAuB,IAAI,IAAI;CACrC,MAAM,QAAQ,CAAC;CACf,MAAM,SAAS,OAAO;EACrB,IAAI,KAAK,IAAI,EAAE,GAAG;EAClB,IAAI,SAAS,IAAI,EAAE,GAAG,MAAM,IAAI,UAAU,qBAAqB,CAAC,GAAG,MAAM,MAAM,MAAM,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,KAAK,EAAE,2BAA2B;EAC9I,SAAS,IAAI,EAAE;EACf,MAAM,KAAK,EAAE;EACb,KAAK,MAAM,QAAQ,UAAU,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,IAAI;EACtD,MAAM,IAAI;EACV,SAAS,OAAO,EAAE;EAClB,KAAK,IAAI,EAAE;CACZ;CACA,KAAK,MAAM,MAAM,UAAU,KAAK,GAAG,MAAM,EAAE;AAC5C;;;;;;;;;;AAYA,SAAS,KAAK,MAAM,MAAM;CACzB,IAAI,CAAC,OAAO,IAAI,GAAG,MAAM,IAAI,UAAU,qGAAqG;CAC5I,IAAI,KAAK,SAAS,UAAU,OAAO,WAAW,MAAM,IAAI;CACxD,IAAI,KAAK,SAAS,WAAW,OAAO,YAAY,MAAM,MAAM,MAAM,MAAM;CACxE,MAAM,IAAI,UAAU,qEAAqE;AAC1F"}
|
|
@@ -1,30 +1,5 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
2
|
-
//#region ../../0-framework/
|
|
3
|
-
//#region src/secret.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* A value wrapper that redacts everywhere except the one explicit reader,
|
|
6
|
-
* `expose()`. Sensitivity is carried by the TYPE (`SecretBox<T>`), not a flag a
|
|
7
|
-
* sink must remember to check: `String(box)`, template interpolation,
|
|
8
|
-
* `JSON.stringify`, and `console.log`/`util.inspect` all print `[REDACTED]`, so
|
|
9
|
-
* a secret can't leak through an accidental log or serialization.
|
|
10
|
-
*
|
|
11
|
-
* Shape matches the platform's own `secrecy` type (pdp-control-plane). The class
|
|
12
|
-
* is nominal enough on its own — no phantom brand.
|
|
13
|
-
*/
|
|
14
|
-
declare class SecretBox<T> {
|
|
15
|
-
#private;
|
|
16
|
-
constructor(value: T);
|
|
17
|
-
/** The sole explicit door to the wrapped value. */
|
|
18
|
-
expose(): T;
|
|
19
|
-
toString(): string;
|
|
20
|
-
toJSON(): string;
|
|
21
|
-
valueOf(): string;
|
|
22
|
-
[Symbol.toPrimitive](): string;
|
|
23
|
-
}
|
|
24
|
-
/** The common case: a secret string. */
|
|
25
|
-
type SecretString = SecretBox<string>;
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region ../../0-framework/1-core/core/dist/graph-types-BcbVhojU.d.mts
|
|
2
|
+
//#region ../../0-framework/1-core/core/dist/graph-types-DcBX92Gs.d.mts
|
|
28
3
|
//#region src/config.d.ts
|
|
29
4
|
/**
|
|
30
5
|
* A declared config param — pure data: a caller-owned Standard Schema
|
|
@@ -99,13 +74,13 @@ interface Config {
|
|
|
99
74
|
*/
|
|
100
75
|
declare function configOf(root: ServiceNode): readonly ConfigDeclaration[];
|
|
101
76
|
/**
|
|
102
|
-
* The app's
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
77
|
+
* The app's input manifest: every service input binding a `provision()` call
|
|
78
|
+
* supplied (ADR-0042). Pure graph introspection, TARGET-AGNOSTIC — a deploy
|
|
79
|
+
* target's recursive descent classifies the binding's leaves (its preflight
|
|
80
|
+
* verifies each `envSecret` leaf's platform var exists before deploy; the
|
|
81
|
+
* values are provisioned out-of-band).
|
|
107
82
|
*/
|
|
108
|
-
declare function
|
|
83
|
+
declare function inputManifest(graph: Graph): readonly ServiceInputBinding[];
|
|
109
84
|
/**
|
|
110
85
|
* The app's param-binding manifest: every param a `provision()` call bound —
|
|
111
86
|
* literal or an opaque, target-defined `ParamSource` — at the address that
|
|
@@ -152,7 +127,7 @@ interface SecretNeed {
|
|
|
152
127
|
readonly [SECRET_NEED]: true;
|
|
153
128
|
readonly kind: 'secret';
|
|
154
129
|
}
|
|
155
|
-
/** A
|
|
130
|
+
/** A module's secret-forwarding slots: name → the need it declares. */
|
|
156
131
|
type Secrets = Record<string, SecretNeed>;
|
|
157
132
|
/** The wiring value bound to a secret slot: a target-defined payload core forwards but never inspects. A target (e.g. @prisma/composer-prisma-cloud's `envSecret`) builds one via `secretSource()`. */
|
|
158
133
|
interface SecretSource<T = unknown> {
|
|
@@ -160,10 +135,8 @@ interface SecretSource<T = unknown> {
|
|
|
160
135
|
/** Target-defined. Core never reads this; the target that authored the source reads it back. */
|
|
161
136
|
readonly payload: T;
|
|
162
137
|
}
|
|
163
|
-
/** What `provision(
|
|
138
|
+
/** What `provision(moduleChild, { secrets })` supplies: one source per declared secret slot. */
|
|
164
139
|
type SecretBindings<S extends Secrets> = { [K in keyof S]: SecretSource; };
|
|
165
|
-
/** What `secrets()` returns: one redacting SecretBox per declared slot. */
|
|
166
|
-
type SecretValues<S extends Secrets> = { readonly [K in keyof S]: SecretString; };
|
|
167
140
|
/** Declares a secret NEED. Nameless — the platform name is bound at the root via `envSecret`. */
|
|
168
141
|
declare function secret(): SecretNeed;
|
|
169
142
|
/** Builds an opaque secret source from a target-defined payload — the SPI a deploy target's own source constructor (e.g. `envSecret`) calls. Core forwards the source and never inspects the payload. */
|
|
@@ -208,6 +181,19 @@ declare function paramNeed(): ParamNeed;
|
|
|
208
181
|
type ParamBindings<P extends Params> = { readonly [K in keyof P]?: StandardSchemaV1.InferOutput<P[K]['schema']> | ParamSource; };
|
|
209
182
|
/** What `provision(moduleChild, { params })` accepts per declared `ParamNeed`: a `ParamSource` only — a need carries no schema to validate a literal against. */
|
|
210
183
|
type ParamNeedBindings<PN extends ParamNeeds> = { readonly [K in keyof PN]?: ParamSource; };
|
|
184
|
+
/**
|
|
185
|
+
* What `provision(service, { input })` accepts (ADR-0042): a plain object
|
|
186
|
+
* mirroring the service's input schema, whose leaves are literals,
|
|
187
|
+
* `envParam(...)` sources, or `envSecret(...)` sources. Deliberately a
|
|
188
|
+
* best-effort structural type: the framework never introspects a Standard
|
|
189
|
+
* Schema, so the binding's exact shape cannot be derived from it — deploy-time
|
|
190
|
+
* validation of the resolved binding is the real check.
|
|
191
|
+
*/
|
|
192
|
+
type InputBinding = string | number | boolean | null | ParamSource | SecretSource | readonly InputBinding[] | {
|
|
193
|
+
readonly [key: string]: InputBinding;
|
|
194
|
+
};
|
|
195
|
+
/** What `input()` returns: the schema's validated output type; `never` on a service that declares no input schema. */
|
|
196
|
+
type InputValueOf<I> = I extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<I> : never;
|
|
211
197
|
/** Opaque `Contract<any, any>` bound shared by every node/port type that doesn't care which contract. */
|
|
212
198
|
type AnyContract = Contract<any, any>;
|
|
213
199
|
/** How a service's app becomes a runnable artifact — the build descriptor's routing key (`extension`/`type`) plus paths resolved relative to the authoring module. */
|
|
@@ -242,7 +228,7 @@ interface ResourceNode<C extends AnyContract = AnyContract> {
|
|
|
242
228
|
* inert until run, and carries NO runtime behavior — an extension's factory
|
|
243
229
|
* wraps it into a runnable/loadable shape (see RunnableServiceNode).
|
|
244
230
|
*/
|
|
245
|
-
interface ServiceNode<D extends Deps = Deps, P extends Params = Params, E extends Expose = Expose,
|
|
231
|
+
interface ServiceNode<D extends Deps = Deps, P extends Params = Params, E extends Expose = Expose, I extends StandardSchemaV1 | undefined = StandardSchemaV1 | undefined> {
|
|
246
232
|
readonly [NODE]: true;
|
|
247
233
|
readonly kind: 'service';
|
|
248
234
|
/** Human-readable, given at authoring — logs/diagnostics only; identity remains the deploy address (ADR-0006). */
|
|
@@ -251,10 +237,10 @@ interface ServiceNode<D extends Deps = Deps, P extends Params = Params, E extend
|
|
|
251
237
|
readonly extension: string;
|
|
252
238
|
readonly type: string;
|
|
253
239
|
readonly inputs: D;
|
|
254
|
-
/**
|
|
240
|
+
/** Extension-reserved config declarations (e.g. compute's `port`) — never user-authored (ADR-0042). */
|
|
255
241
|
readonly params: P;
|
|
256
|
-
/**
|
|
257
|
-
readonly
|
|
242
|
+
/** The service's whole incoming configuration as ONE Standard Schema (authored as `input`, ADR-0042), or `undefined` when it takes none. The framework never introspects it — it only calls `~standard.validate`. Named `inputSchema` on the node so the data field does not collide with the `input()` accessor. */
|
|
243
|
+
readonly inputSchema: I;
|
|
258
244
|
/** How the app's entry is built + assembled. */
|
|
259
245
|
readonly build: BuildAdapter;
|
|
260
246
|
/** Named output ports this service exposes — the Contracts a consumer's `rpc(contract)` can require. `undefined` when the service exposes nothing. */
|
|
@@ -262,15 +248,14 @@ interface ServiceNode<D extends Deps = Deps, P extends Params = Params, E extend
|
|
|
262
248
|
}
|
|
263
249
|
/**
|
|
264
250
|
* The extension's runnable/loadable service node. `run` boots the app after
|
|
265
|
-
* deserializing its
|
|
266
|
-
*
|
|
251
|
+
* deserializing its environment; `load` reads the hydrated deps and `input`
|
|
252
|
+
* the validated, typed input object (ADR-0042).
|
|
267
253
|
*/
|
|
268
|
-
interface RunnableServiceNode<D extends Deps = Deps, P extends Params = Params, E extends Expose = Expose,
|
|
254
|
+
interface RunnableServiceNode<D extends Deps = Deps, P extends Params = Params, E extends Expose = Expose, I extends StandardSchemaV1 | undefined = StandardSchemaV1 | undefined> extends ServiceNode<D, P, E, I> {
|
|
269
255
|
run(address: string, boot: () => Promise<unknown>): Promise<unknown>;
|
|
270
256
|
load(): HydratedDeps<D>;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
secrets(): SecretValues<S>;
|
|
257
|
+
/** The service's validated input — one typed object, secrets as redacting `SecretString` boxes (ADR-0042). */
|
|
258
|
+
input(): InputValueOf<I>;
|
|
274
259
|
}
|
|
275
260
|
/**
|
|
276
261
|
* A service's dependency slot. At Load the enclosing module wires a
|
|
@@ -349,19 +334,36 @@ type ReqOf<DE> = DE extends DependencyEnd<any, infer Req> ? Req : never;
|
|
|
349
334
|
*/
|
|
350
335
|
type DepBindings<D extends Deps> = { [K in keyof D]: NoInfer<ReqOf<D[K]>> | InputRef<D[K]>; };
|
|
351
336
|
/**
|
|
352
|
-
*
|
|
353
|
-
* `name`)
|
|
354
|
-
*
|
|
355
|
-
* `
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
337
|
+
* A SERVICE provision's trailing options: an explicit `id` (default: the
|
|
338
|
+
* node's own `name`); `deps` required exactly when the node declares
|
|
339
|
+
* dependency slots (`[keyof D] extends [never]` is the "no slots" test);
|
|
340
|
+
* `input` required exactly when the node declares an input schema (ADR-0042).
|
|
341
|
+
* `params` is always optional — it binds only extension-reserved params (e.g.
|
|
342
|
+
* compute's `port`), which fall back to their own defaults.
|
|
343
|
+
*/
|
|
344
|
+
type ServiceProvisionArgs<D extends Deps, I extends StandardSchemaV1 | undefined, PB> = [keyof D] extends [never] ? I extends undefined ? [opts?: {
|
|
345
|
+
id?: string;
|
|
346
|
+
params?: PB;
|
|
347
|
+
}] : [opts: {
|
|
348
|
+
id?: string;
|
|
349
|
+
input: InputBinding;
|
|
350
|
+
params?: PB;
|
|
351
|
+
}] : I extends undefined ? [opts: {
|
|
352
|
+
id?: string;
|
|
353
|
+
deps: DepBindings<D>;
|
|
354
|
+
params?: PB;
|
|
355
|
+
}] : [opts: {
|
|
356
|
+
id?: string;
|
|
357
|
+
deps: DepBindings<D>;
|
|
358
|
+
input: InputBinding;
|
|
359
|
+
params?: PB;
|
|
360
|
+
}];
|
|
361
|
+
/**
|
|
362
|
+
* A child-MODULE provision's trailing options: `deps`/`secrets` required
|
|
363
|
+
* exactly when the module declares the slots; a declared param-forwarding
|
|
364
|
+
* slot may be bound to a `ParamSource`.
|
|
363
365
|
*/
|
|
364
|
-
type
|
|
366
|
+
type ModuleProvisionArgs<D extends Deps, S extends Secrets, PB> = [keyof D] extends [never] ? [keyof S] extends [never] ? [opts?: {
|
|
365
367
|
id?: string;
|
|
366
368
|
params?: PB;
|
|
367
369
|
}] : [opts: {
|
|
@@ -385,22 +387,22 @@ interface ModuleBuilder {
|
|
|
385
387
|
}): {
|
|
386
388
|
readonly id: string;
|
|
387
389
|
} & RefPort<C>;
|
|
388
|
-
/** Registers an owned service; its id defaults to the node's `name`; `deps`/`
|
|
389
|
-
provision<D extends Deps, P extends Params, E extends Expose,
|
|
390
|
+
/** Registers an owned service; its id defaults to the node's `name`; `deps`/`input` are required iff it declares them; a reserved param may be bound (literal or `ParamSource`), overriding its default. */
|
|
391
|
+
provision<D extends Deps, P extends Params, E extends Expose, I extends StandardSchemaV1 | undefined>(service: ServiceNode<D, P, E, I>, ...args: ServiceProvisionArgs<D, I, ParamBindings<P>>): ProvisionedRef<E>;
|
|
390
392
|
/**
|
|
391
|
-
* The service call with `deps`/`
|
|
392
|
-
* cannot resolve while `D`/`
|
|
393
|
-
* wrapper like `cron()` provisioning a caller-supplied service — so
|
|
394
|
-
* site resolves to this concrete overload instead.
|
|
393
|
+
* The service call with `deps`/`input` spelled out. `ServiceProvisionArgs`
|
|
394
|
+
* above cannot resolve while `D`/`I` are still unbound type parameters — a
|
|
395
|
+
* generic wrapper like `cron()` provisioning a caller-supplied service — so
|
|
396
|
+
* that call site resolves to this concrete overload instead.
|
|
395
397
|
*/
|
|
396
|
-
provision<D extends Deps, P extends Params, E extends Expose,
|
|
398
|
+
provision<D extends Deps, P extends Params, E extends Expose, I extends StandardSchemaV1 | undefined>(service: ServiceNode<D, P, E, I>, opts: {
|
|
397
399
|
id?: string;
|
|
398
400
|
deps: DepBindings<D>;
|
|
399
|
-
|
|
401
|
+
input?: InputBinding;
|
|
400
402
|
params?: ParamBindings<P>;
|
|
401
403
|
}): ProvisionedRef<E>;
|
|
402
404
|
/** Registers an owned child module; its id defaults to the node's `name`; `deps`/`secrets` are required iff it declares them; a declared param-forwarding slot may be bound to a `ParamSource`. */
|
|
403
|
-
provision<D extends Deps, E extends Expose, S extends Secrets, PN extends ParamNeeds>(child: ModuleNode<D, E, S, PN>, ...args:
|
|
405
|
+
provision<D extends Deps, E extends Expose, S extends Secrets, PN extends ParamNeeds>(child: ModuleNode<D, E, S, PN>, ...args: ModuleProvisionArgs<D, S, ParamNeedBindings<PN>>): ProvisionedRef<E>;
|
|
404
406
|
/** The child-module call with `deps`/`secrets` spelled out — the same generic-wrapper escape as the service overload above. */
|
|
405
407
|
provision<D extends Deps, E extends Expose, S extends Secrets, PN extends ParamNeeds>(child: ModuleNode<D, E, S, PN>, opts: {
|
|
406
408
|
id?: string;
|
|
@@ -451,18 +453,19 @@ declare function resource<C extends AnyContract>(def: {
|
|
|
451
453
|
}): ResourceNode<C>;
|
|
452
454
|
/**
|
|
453
455
|
* Constructs a branded, frozen Service node — declarations only (inputs,
|
|
454
|
-
* params, build adapter, and the ports it exposes). Pure;
|
|
456
|
+
* params, the input schema, build adapter, and the ports it exposes). Pure;
|
|
457
|
+
* carries no runtime behavior.
|
|
455
458
|
*/
|
|
456
|
-
declare function service<D extends Deps, P extends Params, E extends Expose = Record<never, never>,
|
|
459
|
+
declare function service<D extends Deps, P extends Params, E extends Expose = Record<never, never>, I extends StandardSchemaV1 | undefined = undefined>(def: {
|
|
457
460
|
name: string;
|
|
458
461
|
extension: string;
|
|
459
462
|
type: string;
|
|
460
463
|
inputs: D;
|
|
461
464
|
params: P;
|
|
462
|
-
|
|
465
|
+
input?: I;
|
|
463
466
|
build: BuildAdapter;
|
|
464
467
|
expose?: E;
|
|
465
|
-
}): ServiceNode<D, P, E,
|
|
468
|
+
}): ServiceNode<D, P, E, I>;
|
|
466
469
|
/**
|
|
467
470
|
* Constructs a branded, frozen DependencyEnd. `required` (if given) is the
|
|
468
471
|
* contract Load compares a wired ref against via `satisfies()`; an unnamed
|
|
@@ -519,19 +522,16 @@ interface Edge {
|
|
|
519
522
|
readonly kind: 'input' | 'dependency';
|
|
520
523
|
}
|
|
521
524
|
/**
|
|
522
|
-
* A
|
|
523
|
-
*
|
|
524
|
-
* address
|
|
525
|
-
*
|
|
526
|
-
* preflight manifest aggregates the sources.
|
|
525
|
+
* A service's provision-time input binding (ADR-0042): the plain object a
|
|
526
|
+
* `provision(service, { input })` call supplied, recorded at that service's
|
|
527
|
+
* address. Core never walks it beyond usage tracking; the deploy target's
|
|
528
|
+
* recursive descent classifies its leaves (literals, `envParam`, `envSecret`).
|
|
527
529
|
*/
|
|
528
|
-
interface
|
|
529
|
-
/** The graph address of the service that declares the
|
|
530
|
+
interface ServiceInputBinding {
|
|
531
|
+
/** The graph address of the service that declares the input schema. */
|
|
530
532
|
readonly serviceAddress: NodeId;
|
|
531
|
-
/** The
|
|
532
|
-
readonly
|
|
533
|
-
/** The opaque source the root bound the slot to. Core never inspects it; the deploy target reads back its own payload. */
|
|
534
|
-
readonly source: SecretSource;
|
|
533
|
+
/** The binding object supplied at provision. */
|
|
534
|
+
readonly binding: InputBinding;
|
|
535
535
|
}
|
|
536
536
|
/**
|
|
537
537
|
* A resolved param binding: a `provision()` call bound a service's param
|
|
@@ -554,8 +554,8 @@ interface Graph {
|
|
|
554
554
|
/** Root + one per input, topo-ordered (deps first). */
|
|
555
555
|
readonly nodes: readonly GraphNode[];
|
|
556
556
|
readonly edges: readonly Edge[];
|
|
557
|
-
/** Every service
|
|
558
|
-
readonly
|
|
557
|
+
/** Every service input binding a `provision()` call supplied (ADR-0042). */
|
|
558
|
+
readonly inputBindings: readonly ServiceInputBinding[];
|
|
559
559
|
/** Every service param bound at provision — literal or source; unbound params are absent here and fall back to their `default` (see `buildConfig`). */
|
|
560
560
|
readonly params: readonly ParamBinding[];
|
|
561
561
|
}
|
|
@@ -564,5 +564,5 @@ declare class LoadError extends Error {
|
|
|
564
564
|
constructor(message: string);
|
|
565
565
|
}
|
|
566
566
|
//#endregion
|
|
567
|
-
export {
|
|
568
|
-
//# sourceMappingURL=graph-types-
|
|
567
|
+
export { module as $, ParamSource as A, SecretSource as B, NODE as C, ParamNeed as D, ParamBindings as E, ResourceNode as F, configOf as G, ServiceInputBinding as H, ResourceNodeBase as I, inputManifest as J, dependency as K, RunnableServiceNode as L, ProvisionNeed as M, ProvisionedRef as N, ParamNeedBindings as O, RefPort as P, isSecretSource as Q, SecretBindings as R, ModuleOutputs as S, ParamBinding as T, ServiceNode as U, Secrets as V, Values as W, isParamSource as X, isNode as Y, isProvisionNeed as Z, InputValueOf as _, Connection as a, provisionNeed as at, ModuleContext as b, Deps as c, secretSource as ct, Graph as d, number as et, GraphNode as f, InputRef as g, InputBinding as h, ConfigParam as i, paramSource as it, Params as j, ParamNeeds as k, Edge as l, service as lt, HydratedDeps as m, Config as n, paramManifest as nt, Contract as o, resource as ot, Hydrated as p, freezeNode as q, ConfigDeclaration as r, paramNeed as rt, DependencyEnd as s, secret as st, BuildAdapter as t, param as tt, Expose as u, string as ut, LoadError as v, NodeId as w, ModuleNode as x, ModuleBuilder as y, SecretNeed as z };
|
|
568
|
+
//# sourceMappingURL=graph-types-DcBX92Gs-Dnhu7wre.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-types-DcBX92Gs-Dnhu7wre.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/graph-types-DcBX92Gs.d.mts"],"mappings":";;;;;;;;;;;UAUU,YAAY,UAAU,mBAAmB;WACxC,QAAQ;WACR;WACA,UAAU,iBAAiB,YAAY;;;;;;;WAOvC,YAAY;;KAElB,SAAS,eAAe;;KAExB,OAAO,UAAU,sBAAsB,WAAW,IAAI,EAAE,gDAAgD,EAAE,gBAAgB,iBAAiB,YAAY,EAAE,4BAA4B,iBAAiB,YAAY,EAAE,gBAAgB,iBAAiB,YAAY,EAAE;;;;;;;UAO9P,WAAW,UAAU,SAAS,QAAQ;WACrC,QAAQ;EACjB,QAAQ,QAAQ,OAAO,KAAK,IAAI,QAAQ;;;;;;;;;;UAUhC;WACC;aACE;;WAEF;WACA,QAAQ,SAAS;WACjB;WACA;;;;;;;;;;UAUD;WACC,SAA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,gBAAgB;;WAEhB,wBAAwB;;WAExB,iBAAiB;;;cAGd,kBAAkB;EAC9B,YAAY"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { U as ServiceNode, c as Deps, m as HydratedDeps, n as Config } from "./graph-types-DcBX92Gs-Dnhu7wre.mjs";
|
|
2
|
+
import "./graph-CNZcSnM6-Do0zmuzA.mjs";
|
|
3
|
+
//#region ../../0-framework/1-core/core/dist/index.d.mts
|
|
4
|
+
//#region src/hydrate.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Given a service and a concrete typed Config, hydrate every input
|
|
7
|
+
* (connection.hydrate with its typed value slice). A resource dep and a
|
|
8
|
+
* connection dep hydrate through identical machinery — the loaded client is
|
|
9
|
+
* indistinguishable. The service's own params ride alongside in
|
|
10
|
+
* `config.service`; the node's `load()` merges the two.
|
|
11
|
+
*/
|
|
12
|
+
declare function hydrate(root: ServiceNode, config: Config): Promise<HydratedDeps<Deps>>;
|
|
13
|
+
/**
|
|
14
|
+
* Synchronous hydrate — what the node's `load()` uses so
|
|
15
|
+
* `const { db } = service.load()` reads without `await`. Requires every
|
|
16
|
+
* connection.hydrate to return synchronously; a Promise return is a loud error
|
|
17
|
+
* naming the input (an async client factory must use the async `hydrate` path).
|
|
18
|
+
*/
|
|
19
|
+
declare function hydrateSync(root: ServiceNode, config: Config): HydratedDeps<Deps>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { hydrateSync as n, hydrate as t };
|
|
22
|
+
//# sourceMappingURL=index-BkJ2OjXF.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BkJ2OjXF.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/index.d.mts"],"mappings":";;;;;;;;;;;iBAWiB,QAAQ,MAAM,aAAa,QAAQ,SAAS,QAAQ,aAAa;;;;;;;iBAOjE,YAAY,MAAM,aAAa,QAAQ,SAAS,aAAa"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { n as SecretString, r as isSecretString, t as SecretBox } from "./secret-CHOw4LBU-C8yXoC9N.mjs";
|
|
2
|
+
import { $ as module, A as ParamSource, B as SecretSource, C as NODE, D as ParamNeed, E as ParamBindings, F as ResourceNode, G as configOf, H as ServiceInputBinding, I as ResourceNodeBase, J as inputManifest, K as dependency, L as RunnableServiceNode, M as ProvisionNeed, N as ProvisionedRef, O as ParamNeedBindings, P as RefPort, Q as isSecretSource, R as SecretBindings, S as ModuleOutputs, T as ParamBinding, U as ServiceNode, V as Secrets, W as Values, X as isParamSource, Y as isNode, Z as isProvisionNeed, _ as InputValueOf, a as Connection, at as provisionNeed, b as ModuleContext, c as Deps, ct as secretSource, d as Graph, et as number, f as GraphNode, g as InputRef, h as InputBinding, i as ConfigParam, it as paramSource, j as Params, k as ParamNeeds, l as Edge, lt as service, m as HydratedDeps, n as Config, nt as paramManifest, o as Contract, ot as resource, p as Hydrated, q as freezeNode, r as ConfigDeclaration, rt as paramNeed, s as DependencyEnd, st as secret, t as BuildAdapter, tt as param, u as Expose, ut as string, v as LoadError, w as NodeId, x as ModuleNode, y as ModuleBuilder, z as SecretNeed } from "./graph-types-DcBX92Gs-Dnhu7wre.mjs";
|
|
3
|
+
import { t as Load } from "./graph-CNZcSnM6-Do0zmuzA.mjs";
|
|
4
|
+
import { n as hydrateSync, t as hydrate } from "./index-BkJ2OjXF.mjs";
|
|
5
|
+
export { type BuildAdapter, type Config, type ConfigDeclaration, type ConfigParam, type Connection, type Contract, type DependencyEnd, type Deps, type Edge, type Expose, type Graph, type GraphNode, type Hydrated, type HydratedDeps, type InputBinding, type InputRef, type InputValueOf, Load, LoadError, type ModuleBuilder, type ModuleContext, type ModuleNode, type ModuleOutputs, type NODE, type NodeId, type ParamBinding, type ParamBindings, type ParamNeed, type ParamNeedBindings, type ParamNeeds, type ParamSource, type Params, type ProvisionNeed, type ProvisionedRef, type RefPort, type ResourceNode, ResourceNodeBase, type RunnableServiceNode, type SecretBindings, SecretBox, type SecretNeed, type SecretSource, type SecretString, type Secrets, type ServiceInputBinding, type ServiceNode, type Values, configOf, dependency, freezeNode, hydrate, hydrateSync, inputManifest, isNode, isParamSource, isProvisionNeed, isSecretSource, isSecretString, module, number, param, paramManifest, paramNeed, paramSource, provisionNeed, resource, secret, secretSource, service, string };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { _ as service, a as freezeNode, c as isProvisionNeed, d as paramNeed, f as paramSource, g as secretSource, h as secret, i as dependency, l as isSecretSource, m as resource, n as LoadError, o as isNode, p as provisionNeed, r as ResourceNodeBase, s as isParamSource, t as Load, u as module } from "./graph-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { _ as service, a as freezeNode, c as isProvisionNeed, d as paramNeed, f as paramSource, g as secretSource, h as secret, i as dependency, l as isSecretSource, m as resource, n as LoadError, o as isNode, p as provisionNeed, r as ResourceNodeBase, s as isParamSource, t as Load, u as module } from "./graph-DgbALPDo-BEHF94BN.mjs";
|
|
2
|
+
import { n as isSecretString, t as SecretBox } from "./secret-DoWGmN7m-DO5Brq1Y.mjs";
|
|
3
|
+
import { a as number, c as string, i as inputManifest, n as hydrate, o as param, r as hydrateSync, s as paramManifest, t as configOf } from "./dist-CG0jqp27.mjs";
|
|
4
|
+
export { Load, LoadError, ResourceNodeBase, SecretBox, configOf, dependency, freezeNode, hydrate, hydrateSync, inputManifest, isNode, isParamSource, isProvisionNeed, isSecretSource, isSecretString, module, number, param, paramManifest, paramNeed, paramSource, provisionNeed, resource, secret, secretSource, service, string };
|
package/dist/local-target.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as PrismaAppConfig, _ as LocalTargetProvidersInput, c as DEV_DIR, g as LocalTargetEmulatorsInput, h as LocalTargetDescriptor, m as LocalTargetAttachment, p as LocalTargetAttachInput, s as ContainerInstance } from "./app-config-
|
|
1
|
+
import { O as PrismaAppConfig, _ as LocalTargetProvidersInput, c as DEV_DIR, g as LocalTargetEmulatorsInput, h as LocalTargetDescriptor, m as LocalTargetAttachment, p as LocalTargetAttachInput, s as ContainerInstance } from "./app-config-C_AkdBtt-D0rtdLlj.mjs";
|
|
2
2
|
import * as Layer from "effect/Layer";
|
|
3
3
|
//#region ../../0-framework/1-core/core/dist/local-target.d.mts
|
|
4
4
|
//#region src/control/local-target.d.ts
|
package/dist/local-target.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as isBuildOnlyExtension, t as DEV_DIR } from "./app-config-joXc-BKm-CdcXqNMD.mjs";
|
|
2
|
-
import { t as LowerError } from "./deploy-
|
|
2
|
+
import { t as LowerError } from "./deploy-C4DxNkJ9-D73lmBqy.mjs";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
4
|
//#region ../../0-framework/1-core/core/dist/local-target.mjs
|
|
5
5
|
/** The local-target stack's own provider aggregation (ADR-0041; naming, operator 2026-07-23 — the seam is `localTarget`, "dev" names the user-facing feature only) — the local-target counterpart of `deploy.ts`'s `mergedProviders`, kept in its own module so `lower()` learns nothing about it (deploy.ts's REVISED — operator review of #162). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-target.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/local-target.mjs"],"sourcesContent":["import { t as LowerError } from \"./deploy-
|
|
1
|
+
{"version":3,"file":"local-target.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/local-target.mjs"],"sourcesContent":["import { t as LowerError } from \"./deploy-C4DxNkJ9.mjs\";\nimport { r as isBuildOnlyExtension, t as DEV_DIR } from \"./app-config-joXc-BKm.mjs\";\nimport * as Layer from \"effect/Layer\";\n//#region src/control/local-target.ts\n/** The local-target stack's own provider aggregation (ADR-0041; naming, operator 2026-07-23 — the seam is `localTarget`, \"dev\" names the user-facing feature only) — the local-target counterpart of `deploy.ts`'s `mergedProviders`, kept in its own module so `lower()` learns nothing about it (deploy.ts's REVISED — operator review of #162). */\nfunction noLocalTargetSupportError(id) {\n\treturn new LowerError(`extension \"${id}\" has no dev support — it declares no \\`localTarget\\` descriptor (ADR-0041).`);\n}\n/**\n* Resolves every non-build-only configured extension's lazy `localTarget`\n* thunk, once (ADR-0041's lazy local-target reference — operator directive:\n* the production control entry carries only the thunk, never the\n* descriptor, so resolving it is this module's job, not something a deploy\n* path ever does). A build-only extension (`isBuildOnlyExtension`) owns no\n* resources or services and is skipped entirely — never even checked for a\n* `localTarget` thunk. Every other configured extension must be\n* local-target-capable, or the dev command cannot bring the app up at all,\n* so a missing thunk throws naming the extension. The generated dev stack\n* module calls this once and threads the resolved map through every\n* subsequent hook, including `localTargetProviders`.\n*/\nasync function resolveLocalTargets(config) {\n\tconst entries = await Promise.all(config.extensions.flatMap((extension) => {\n\t\tif (isBuildOnlyExtension(extension)) return [];\n\t\tif (extension.localTarget === void 0) throw noLocalTargetSupportError(extension.id);\n\t\treturn [extension.localTarget().then((descriptor) => [extension.id, descriptor])];\n\t}));\n\treturn new Map(entries);\n}\n/**\n* All configured extensions' local-target providers merged, config array\n* order (ADR-0041), from the ALREADY-RESOLVED descriptor map\n* (`resolveLocalTargets`'s product — this function itself never touches a\n* `localTarget` thunk). The generated dev stack module is this\n* aggregator's one caller, passing the result as `LowerOptions.providers`.\n*/\nfunction localTargetProviders(resolved, containers, devDir) {\n\tconst [first, ...rest] = [...resolved.entries()].map(([id, descriptor]) => descriptor.providers({\n\t\tcontainer: containers.get(id),\n\t\tdevDir\n\t}));\n\treturn first === void 0 ? Layer.empty : Layer.mergeAll(first, ...rest);\n}\n//#endregion\nexport { DEV_DIR, localTargetProviders, resolveLocalTargets };\n\n//# sourceMappingURL=local-target.mjs.map"],"mappings":";;;;;AAKA,SAAS,0BAA0B,IAAI;CACtC,OAAO,IAAI,WAAW,cAAc,GAAG,6EAA6E;AACrH;;;;;;;;;;;;;;AAcA,eAAe,oBAAoB,QAAQ;CAC1C,MAAM,UAAU,MAAM,QAAQ,IAAI,OAAO,WAAW,SAAS,cAAc;EAC1E,IAAI,qBAAqB,SAAS,GAAG,OAAO,CAAC;EAC7C,IAAI,UAAU,gBAAgB,KAAK,GAAG,MAAM,0BAA0B,UAAU,EAAE;EAClF,OAAO,CAAC,UAAU,YAAY,CAAC,CAAC,MAAM,eAAe,CAAC,UAAU,IAAI,UAAU,CAAC,CAAC;CACjF,CAAC,CAAC;CACF,OAAO,IAAI,IAAI,OAAO;AACvB;;;;;;;;AAQA,SAAS,qBAAqB,UAAU,YAAY,QAAQ;CAC3D,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG,SAAS,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,gBAAgB,WAAW,UAAU;EAC/F,WAAW,WAAW,IAAI,EAAE;EAC5B;CACD,CAAC,CAAC;CACF,OAAO,UAAU,KAAK,IAAI,MAAM,QAAQ,MAAM,SAAS,OAAO,GAAG,IAAI;AACtE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BuildAdapter } from "./graph-types-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { t as BuildAdapter } from "./graph-types-DcBX92Gs-Dnhu7wre.mjs";
|
|
2
|
+
import "./index-BkJ2OjXF.mjs";
|
|
3
3
|
//#region ../../0-framework/2-authoring/nextjs/dist/nextjs-DLyeRR7M.d.mts
|
|
4
4
|
//#region src/nextjs.d.ts
|
|
5
5
|
/** The nextjs build adapter's descriptor — `appDir` is this kind's own extra path input (the Next app root), beyond the shared `{ extension, type, module, entry }`. `entry` is a placeholder; the assembler locates `server.js` in the standalone tree. */
|
|
@@ -13,4 +13,4 @@ declare const nextjsBuild: (opts: {
|
|
|
13
13
|
}) => NextjsBuildAdapter;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { nextjsBuild as n, NextjsBuildAdapter as t };
|
|
16
|
-
//# sourceMappingURL=nextjs-DLyeRR7M-
|
|
16
|
+
//# sourceMappingURL=nextjs-DLyeRR7M-xWd8GKgK.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs-DLyeRR7M-
|
|
1
|
+
{"version":3,"file":"nextjs-DLyeRR7M-xWd8GKgK.d.mts","names":[],"sources":["../../../0-framework/2-authoring/nextjs/dist/nextjs-DLyeRR7M.d.mts"],"mappings":";;;;;UAGU,2BAA2B;WAC1B;WACA;;cAEG,cAAc;EAC1B;EACA;MACI"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as Bundle, f as ExtensionDescriptor, i as AssembleInput } from "./app-config-
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./deploy-
|
|
4
|
-
import { t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-
|
|
1
|
+
import { a as Bundle, f as ExtensionDescriptor, i as AssembleInput } from "./app-config-C_AkdBtt-D0rtdLlj.mjs";
|
|
2
|
+
import "./config-B1rI-XeI.mjs";
|
|
3
|
+
import "./deploy-B1rI-XeI.mjs";
|
|
4
|
+
import { t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-xWd8GKgK.mjs";
|
|
5
5
|
//#region ../../0-framework/2-authoring/nextjs/dist/control.d.mts
|
|
6
6
|
//#region src/control/build.d.ts
|
|
7
7
|
/** The built standalone server.js for a nextjs build — `appDir`'s standalone root plus the app subpath Next recorded. Single-sourced so `assemble()` (deploy) and the integration-test seam can't drift. */
|
package/dist/nextjs.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as nextjsBuild, t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-
|
|
1
|
+
import { n as nextjsBuild, t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-xWd8GKgK.mjs";
|
|
2
2
|
export { type NextjsBuildAdapter, nextjsBuild as default };
|
package/dist/node-control.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as Bundle, f as ExtensionDescriptor, i as AssembleInput } from "./app-config-
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./deploy-
|
|
1
|
+
import { a as Bundle, f as ExtensionDescriptor, i as AssembleInput } from "./app-config-C_AkdBtt-D0rtdLlj.mjs";
|
|
2
|
+
import "./config-B1rI-XeI.mjs";
|
|
3
|
+
import "./deploy-B1rI-XeI.mjs";
|
|
4
4
|
//#region ../../0-framework/2-authoring/node/dist/control.d.mts
|
|
5
5
|
//#region src/control/build.d.ts
|
|
6
6
|
declare function assemble(input: AssembleInput): Promise<Bundle>;
|
package/dist/node.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BuildAdapter } from "./graph-types-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { t as BuildAdapter } from "./graph-types-DcBX92Gs-Dnhu7wre.mjs";
|
|
2
|
+
import "./index-BkJ2OjXF.mjs";
|
|
3
3
|
//#region ../../0-framework/2-authoring/node/dist/index.d.mts
|
|
4
4
|
//#region src/node.d.ts
|
|
5
5
|
/** The node build adapter's descriptor. `dir` is the directory form's own extra path input (the built tree to copy verbatim), beyond the shared `{ extension, type, module, entry }`; absent, `entry` is the whole built runnable. */
|