@prisma/composer-cli 0.36.0-dev.3 → 0.36.0-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/config-adapters-BA_IeiX0-CiRnz7z8.mjs +590 -0
  2. package/dist/config-adapters-BA_IeiX0-CiRnz7z8.mjs.map +1 -0
  3. package/dist/{dev-current-BNoPkDRU-DGd_7FDS.mjs → dev-current-BurA9uhA-BWYAftn9.mjs} +6 -6
  4. package/dist/{dev-current-BNoPkDRU-DGd_7FDS.mjs.map → dev-current-BurA9uhA-BWYAftn9.mjs.map} +1 -1
  5. package/dist/{dev-environment-name-6eEr5PW8-lIZmJjfr.mjs → dev-environment-name-6eEr5PW8-YyPDRApO.mjs} +2 -2
  6. package/dist/dev-environment-name-6eEr5PW8-YyPDRApO.mjs.map +1 -0
  7. package/dist/{dist-B9-nLeho.mjs → dist-BsONwZNR.mjs} +3 -6
  8. package/dist/{dist-B9-nLeho.mjs.map → dist-BsONwZNR.mjs.map} +1 -1
  9. package/dist/{execute-deploy-destroy-BIqwt1RF-D3F6yxLV.mjs → execute-deploy-destroy-Cww6zOSC-CmOmzLiB.mjs} +50 -11
  10. package/dist/execute-deploy-destroy-Cww6zOSC-CmOmzLiB.mjs.map +1 -0
  11. package/dist/{execute-dev-DIEyloWn-CjtRM3-x.mjs → execute-dev-4KYkqSMh-uh7gnPyS.mjs} +33 -17
  12. package/dist/{execute-dev-DIEyloWn-CjtRM3-x.mjs.map → execute-dev-4KYkqSMh-uh7gnPyS.mjs.map} +1 -1
  13. package/dist/{execute-dev-current-CeKI-tiC-fd62IW2Y.mjs → execute-dev-current-Cd4YEUZk-b2L-LwbT.mjs} +6 -6
  14. package/dist/{execute-dev-current-CeKI-tiC-fd62IW2Y.mjs.map → execute-dev-current-Cd4YEUZk-b2L-LwbT.mjs.map} +1 -1
  15. package/dist/{family-Dy3ZQOxG-CcELNRXg.d.mts → family-DACJfaA5-CBuEC2B3.d.mts} +103 -61
  16. package/dist/family-DACJfaA5-CBuEC2B3.d.mts.map +1 -0
  17. package/dist/family.d.mts +1 -1
  18. package/dist/family.mjs +12 -4
  19. package/dist/family.mjs.map +1 -1
  20. package/dist/{generate-dev-stack-BkkU2HLE-Dek3CkAQ.mjs → generate-dev-stack-DS6U_JHX-wDTViqdg.mjs} +9 -4
  21. package/dist/generate-dev-stack-DS6U_JHX-wDTViqdg.mjs.map +1 -0
  22. package/dist/{list-deployed-2Xs64YAh.mjs → list-deployed-CH3SMsQ4.mjs} +4 -4
  23. package/dist/{list-deployed-2Xs64YAh.mjs.map → list-deployed-CH3SMsQ4.mjs.map} +1 -1
  24. package/dist/result-sR7PBi61.mjs +229 -0
  25. package/dist/result-sR7PBi61.mjs.map +1 -0
  26. package/dist/run-alchemy-B-Z6i3cD-f0MXFCG8.mjs +219 -0
  27. package/dist/run-alchemy-B-Z6i3cD-f0MXFCG8.mjs.map +1 -0
  28. package/dist/testing.d.mts +1 -1
  29. package/dist/testing.mjs +3 -2
  30. package/dist/testing.mjs.map +1 -1
  31. package/dist/{validate-environment-CEhUSEg2-BohWFcgr.mjs → validate-environment-BNZC6W46-DY_7cPQJ.mjs} +449 -342
  32. package/dist/validate-environment-BNZC6W46-DY_7cPQJ.mjs.map +1 -0
  33. package/package.json +7 -7
  34. package/dist/dev-environment-name-6eEr5PW8-lIZmJjfr.mjs.map +0 -1
  35. package/dist/execute-deploy-destroy-BIqwt1RF-D3F6yxLV.mjs.map +0 -1
  36. package/dist/family-Dy3ZQOxG-CcELNRXg.d.mts.map +0 -1
  37. package/dist/generate-dev-stack-BkkU2HLE-Dek3CkAQ.mjs.map +0 -1
  38. package/dist/run-alchemy-Dl_MWw4g-DaWV9tkH.mjs +0 -667
  39. package/dist/run-alchemy-Dl_MWw4g-DaWV9tkH.mjs.map +0 -1
  40. package/dist/validate-environment-CEhUSEg2-BohWFcgr.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-environment-BNZC6W46-DY_7cPQJ.mjs","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/describe-kind-Cpm_euxo.mjs","../../../0-framework/3-tooling/cli/dist/config-pools-DiYw7wMu.mjs","../../../0-framework/3-tooling/assemble/dist/index.mjs","../../../0-framework/0-foundation/foundation/dist/pointer-Cw3E-nrh.mjs","../../../0-framework/0-foundation/foundation/dist/secret-DoWGmN7m.mjs","../../../0-framework/1-core/core/dist/graph-gE31_ToO.mjs","../../../0-framework/1-core/core/dist/index.mjs","../../../0-framework/3-tooling/cli/dist/validate-environment-BNZC6W46.mjs"],"sourcesContent":["//#region src/describe-kind.ts\n/** How an error names the kind of a value it did not expect, without printing the value. */\nfunction describeKind(value) {\n\tif (value === void 0) return \"nothing\";\n\tif (value === null) return \"null\";\n\tif (Array.isArray(value)) return \"an array\";\n\tif (typeof value === \"function\") return \"a function\";\n\tif (typeof value === \"object\") return \"an object\";\n\treturn `a ${typeof value}`;\n}\n//#endregion\nexport { describeKind as t };\n\n//# sourceMappingURL=describe-kind-Cpm_euxo.mjs.map","import { r as environmentVariables } from \"./config-adapters-BA_IeiX0.mjs\";\nimport * as path from \"node:path\";\nimport { CliStructuredError, InternalError, describeKind } from \"@internal/foundation/errors\";\n//#region src/config-pools.ts\nfunction adapterInvalid(list, index, input, summary, fix) {\n\treturn new CliStructuredError(\"CONFIG.ADAPTER_INVALID\", summary, {\n\t\tfix,\n\t\twhere: { path: input.configFile },\n\t\tmeta: { field: `${list}[${index}]` }\n\t});\n}\nfunction isValues(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction isText(pool) {\n\treturn Object.values(pool).every((value) => typeof value === \"string\");\n}\nasync function readPool(list, adapters, input) {\n\tconst adapterInput = Object.freeze({\n\t\tenvironment: input.environment,\n\t\tconfigDirectory: path.dirname(input.configFile)\n\t});\n\tconst pool = Object.create(null);\n\tfor (const [index, adapter] of adapters.entries()) {\n\t\tconst field = `composer.${list}[${index}]`;\n\t\tlet values;\n\t\ttry {\n\t\t\tvalues = await adapter(adapterInput);\n\t\t} catch (thrown) {\n\t\t\tthrow new CliStructuredError(\"CONFIG.ADAPTER_FAILED\", `\\`${field}\\` failed to read the values for the environment \"${input.environment}\".`, {\n\t\t\t\twhy: `It threw: ${thrown instanceof Error ? thrown.message : String(thrown)}`,\n\t\t\t\tfix: `Fix the adapter, or remove it from \\`composer.${list}\\` in prisma.config.ts.`,\n\t\t\t\twhere: { path: input.configFile },\n\t\t\t\tmeta: { field: `${list}[${index}]` },\n\t\t\t\tcause: thrown\n\t\t\t});\n\t\t}\n\t\tif (typeof values === \"function\") throw adapterInvalid(list, index, input, `\\`${field}\\` returned a function, not an object of values.`, \"An adapter factory was put in the list instead of the adapter it makes: write `dotenv()`, not `dotenv`.\");\n\t\tif (!isValues(values)) throw adapterInvalid(list, index, input, `\\`${field}\\` returned ${describeKind(values)}, not an object of values.`, \"Return an object whose keys are the names of the values, e.g. `{ EMAIL_FROM: 'shop@example.com' }`.\");\n\t\tfor (const [key, value] of Object.entries(values)) {\n\t\t\tif (value === void 0) continue;\n\t\t\tif (list === \"secrets\" && typeof value !== \"string\") throw adapterInvalid(list, index, input, `\\`${field}\\` returned ${describeKind(value)} for \"${key}\", but a secret is text.`, \"Return the secret as a string. A platform variable holds text.\");\n\t\t\tpool[key] = value;\n\t\t}\n\t}\n\treturn Object.freeze(pool);\n}\n/** Calls the section's `config` adapters (default `[environmentVariables()]`) and merges what they return: the config pool. */\nfunction readConfigPool(section, input) {\n\treturn readPool(\"config\", section.config ?? [environmentVariables()], input);\n}\n/** Calls the section's `secrets` adapters (default `[environmentVariables()]`) and merges what they return: the secrets pool. Every value must be text. */\nasync function readSecretsPool(section, input) {\n\tconst pool = await readPool(\"secrets\", section.secrets ?? [environmentVariables()], input);\n\tif (!isText(pool)) throw new InternalError(\"readPool admitted a secret that is not text\");\n\treturn pool;\n}\n//#endregion\nexport { readSecretsPool as n, readConfigPool as t };\n\n//# sourceMappingURL=config-pools-DiYw7wMu.mjs.map","import { CliStructuredError } from \"@internal/foundation/errors\";\n//#region src/assemble-error.ts\n/**\n* A user-facing assembly failure, structured at origin (base-type rule 6):\n* a `CliStructuredError` whose code names which way assembly went wrong.\n* This package's second consumer is the programmatic deploy API, not just\n* the CLI — hosts branch on `error.code`, the CLI renders the envelope.\n*/\nvar AssembleError = class extends CliStructuredError {\n\tconstructor(code, summary, options) {\n\t\tsuper(code, summary, options);\n\t}\n};\n//#endregion\n//#region src/assemble-services.ts\n/**\n* The registry route for one service's build: extension by\n* `build.extension`, node descriptor by `build.type`, kind must be \"build\".\n* The CLI's coverage validation reports the same misses earlier with the\n* config fix; these errors are the backstop for programmatic callers.\n*/\nfunction buildDescriptorAssemble(config, node, address, cwd, report) {\n\tconst { extension, type } = node.build;\n\tconst extensionDescriptor = config.extensions.find((candidate) => candidate.id === extension);\n\tif (extensionDescriptor === void 0) throw new AssembleError(\"ASSEMBLE.EXTENSION_MISSING\", `No extension \"${extension}\" is configured (needed by service \"${node.name}\"'s build).`, { fix: \"Add it to `extensions` in the `composer` section of prisma.config.ts.\" });\n\tconst nodeDescriptor = extensionDescriptor.nodes[type];\n\tif (nodeDescriptor === void 0) throw new AssembleError(\"ASSEMBLE.DESCRIPTOR_MISSING\", `Extension \"${extension}\" has no descriptor for build type \"${type}\".`, { why: `Known types: ${Object.keys(extensionDescriptor.nodes).join(\", \")}.` });\n\tif (nodeDescriptor.kind !== \"build\") throw new AssembleError(\"ASSEMBLE.DESCRIPTOR_KIND_MISMATCH\", `Extension \"${extension}\"'s descriptor for type \"${type}\" is a \"${nodeDescriptor.kind}\" descriptor.`, { why: \"Assembling a service build needs a \\\"build\\\" descriptor.\" });\n\treturn nodeDescriptor.assemble({\n\t\tbuild: node.build,\n\t\taddress,\n\t\tcwd,\n\t\treport\n\t});\n}\n/**\n* The dev server a service's build descriptor declares, or `undefined` when it\n* declares none — including when the registry route misses, which the\n* assemble that follows reports with its own pinned error.\n*/\nasync function buildDescriptorServe(config, node, address) {\n\tconst { extension, type } = node.build;\n\tconst nodeDescriptor = config.extensions.find((candidate) => candidate.id === extension)?.nodes[type];\n\tif (nodeDescriptor?.kind !== \"build\" || nodeDescriptor.serve === void 0) return void 0;\n\ttry {\n\t\treturn await nodeDescriptor.serve({\n\t\t\tbuild: node.build,\n\t\t\taddress\n\t\t});\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) throw error;\n\t\tthrow new CliStructuredError(\"DEV.DEV_SERVER_UNAVAILABLE\", `service \"${address}\" cannot run its dev server: ${error instanceof Error ? error.message : String(error)}`, {\n\t\t\tmeta: { address },\n\t\t\tcause: error\n\t\t});\n\t}\n}\nasync function assembleServices(graph, config, cwd, run, onEvent, options = {}) {\n\tconst runAssembler = run ?? ((node, address, nodeCwd, report) => buildDescriptorAssemble(config, node, address, nodeCwd, report));\n\tconst serviceNodes = graph.nodes.filter((n) => n.node.kind === \"service\");\n\tif (serviceNodes.length === 0) throw new AssembleError(\"ASSEMBLE.SERVICE_MISSING\", \"The loaded graph has no service to assemble.\");\n\tconst bundles = {};\n\tconst devServers = {};\n\tfor (const { id, node } of serviceNodes) {\n\t\tif (options.devServers === true) {\n\t\t\tconst server = await buildDescriptorServe(config, node, id);\n\t\t\tif (server !== void 0) {\n\t\t\t\tdevServers[id] = server;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tonEvent?.({\n\t\t\tkind: \"service-started\",\n\t\t\taddress: id\n\t\t});\n\t\tconst data = {};\n\t\tlet artifact;\n\t\ttry {\n\t\t\tartifact = await runAssembler(node, id, cwd, (reported) => Object.assign(data, reported));\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) throw error;\n\t\t\tthrow new AssembleError(\"ASSEMBLE.BUILD_FAILED\", error instanceof Error ? error.message : String(error), {\n\t\t\t\tmeta: { address: id },\n\t\t\t\tcause: error\n\t\t\t});\n\t\t}\n\t\tbundles[id] = artifact;\n\t\tonEvent?.({\n\t\t\tkind: \"service-assembled\",\n\t\t\taddress: id,\n\t\t\tdata\n\t\t});\n\t}\n\treturn {\n\t\tbundles,\n\t\tdevServers\n\t};\n}\n//#endregion\nexport { AssembleError, assembleServices };\n\n//# sourceMappingURL=index.mjs.map","import { t as blindCast } from \"./casts-DpaahrlC.mjs\";\n//#region src/pointer.ts\n/** A pointer: what a value known only at boot holds at deploy. It names the platform variable the service reads at boot, and records whether that variable holds a secret. */\nconst POINTER = blindCast(Symbol.for(\"prisma:pointer\"));\nfunction kindOf(value) {\n\tif (typeof value !== \"object\" || value === null) return void 0;\n\treturn Reflect.get(value, POINTER);\n}\n/** True for a plain pointer: a value known only at boot whose variable holds plain text. */\nfunction isPlainPointer(value) {\n\treturn kindOf(value) === \"plain\";\n}\n/** True for a secret pointer: a value known only at boot whose variable holds a secret. */\nfunction isSecretPointer(value) {\n\treturn kindOf(value) === \"secret\";\n}\n//#endregion\nexport { isPlainPointer as n, isSecretPointer as r, POINTER as t };\n\n//# sourceMappingURL=pointer-Cw3E-nrh.mjs.map","import { t as blindCast } from \"./casts-DpaahrlC.mjs\";\n//#region src/secret.ts\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/**\n* True for a redacting secret box — what a schema's secret leaf checks\n* (ADR-0042). Reads the brand rather than `instanceof`, so a box from a\n* duplicated module copy in a bundle counts and a look-alike does not.\n*/\nfunction isSecretString(value) {\n\treturn typeof value === \"object\" && value !== null && blindCast(value)[SECRET_BOX] === true;\n}\n//#endregion\nexport { isSecretString as n, SecretBox as t };\n\n//# sourceMappingURL=secret-DoWGmN7m.mjs.map","import { POINTER, isSecretPointer } from \"@internal/foundation/pointer\";\nimport { isSecretString } from \"@internal/foundation/secret\";\nimport { CliStructuredError, InternalError, describeKind } from \"@internal/foundation/errors\";\nimport { blindCast } from \"@internal/foundation/casts\";\n//#region src/graph-types.ts\n/** The reserved name of a resource's single anonymous output port. Rejected as a user-declared port name (node.ts). */\nconst RESOURCE_OUT_PORT = \"$out\";\n/**\n* Thrown by Load when the graph is malformed. Structured at origin\n* (base-type rule 6): one type-level code covers every raise site until a\n* finer per-site taxonomy is carved out. The `name` stays\n* `CliStructuredError` — structural recognition depends on it.\n*/\nvar LoadError = class extends CliStructuredError {\n\tconstructor(message, options) {\n\t\tsuper(\"COMPOSE.GRAPH_INVALID\", message, options);\n\t}\n};\n//#endregion\n//#region src/contract.ts\n/** The declared style of an untrusted contract value, or `undefined` when it declares none. */\nfunction contractStyleOf(contract) {\n\tif (typeof contract !== \"object\" || contract === null || !(\"style\" in contract)) return void 0;\n\treturn contract.style === \"request-response\" || contract.style === \"stream\" ? contract.style : void 0;\n}\n//#endregion\n//#region src/value.ts\nconst VALUE = blindCast(Symbol.for(\"prisma:value\"));\nconst VALUE_ORIGIN = blindCast(Symbol.for(\"prisma:value-origin\"));\n/**\n* A value computed from other values. `fn` receives the dependencies' real\n* values as one tuple, in order, and returns plain data. Each dependency must\n* be a deploy-time value: listing a runtime value or a field wrapped with\n* `field()` fails to compile, and Load refuses a dependency whose real value\n* holds a pointer. Load runs `fn` after every module body, with `provision`\n* disabled (ADR-0062). `fn` must be a pure function of its dependencies: a\n* deploy runs it in two processes.\n*/\nfunction resolve(dependencies, fn) {\n\tif (!Array.isArray(dependencies)) throw new Error(\"resolve() requires a tuple of values as its first argument.\");\n\tconst checked = dependencies.map((dependency, index) => {\n\t\tif (!isValue(dependency)) throw new Error(`resolve() dependency at index ${index} is not a value — list environment.name or another resolve() result.`);\n\t\treturn dependency;\n\t});\n\tif (typeof fn !== \"function\") throw new Error(\"resolve() requires a function as its second argument.\");\n\tconst frozenDependencies = Object.freeze(checked);\n\tconst compute = blindCast(fn);\n\treturn Object.freeze({\n\t\t[VALUE]: true,\n\t\t[VALUE_ORIGIN]: Object.freeze({\n\t\t\tkind: \"computed\",\n\t\t\tdependencies: frozenDependencies,\n\t\t\tcompute\n\t\t})\n\t});\n}\n/** True if `value` is a `Value`, a source included (checks the brand only, never a prototype). */\nfunction isValue(value) {\n\treturn typeof value === \"object\" && value !== null && blindCast(value)[VALUE] === true;\n}\n/** True for an object whose prototype is `Object.prototype` or `null`: the only objects Load walks into. */\nfunction isPlainObject(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n}\n/** Where Load gets `value`'s real value. Internal to core. */\nfunction originOf(value) {\n\treturn value[VALUE_ORIGIN];\n}\n/** The one `environment` object every module body receives. */\nconst environmentFacts = Object.freeze({ name: Object.freeze({\n\t[VALUE]: true,\n\t[VALUE_ORIGIN]: Object.freeze({\n\t\tkind: \"environment\",\n\t\tfact: \"name\"\n\t})\n}) });\n//#endregion\n//#region src/module-input.ts\nconst INSPECT = Symbol.for(\"nodejs.util.inspect.custom\");\n/** `input` or `input.a.b`: how an error names an input field. */\nfunction inputFieldLabel(origin) {\n\treturn origin.path.length === 0 ? \"input\" : `input.${origin.path.join(\".\")}`;\n}\nfunction misuse(origin, what) {\n\tconst field = inputFieldLabel(origin);\n\treturn new LoadError(`${field} of module \"${origin.module}\" is a value, not its real value, and ${what}. A module body can only pass an input field on: into a provision() binding or as a resolve() dependency. To compute with it, it must be a plain field, not a wrapped or secret one; list it: resolve([${field}], ([v]) => …).`);\n}\n/** What a coercion with `hint` did to a value, worded for a misuse error. */\nfunction primitiveMisuse(hint) {\n\tswitch (hint) {\n\t\tcase \"string\": return \"it was turned into text (a template literal or String())\";\n\t\tcase \"number\": return \"it was turned into a number (arithmetic, or a comparison such as <)\";\n\t\tdefault: return \"it was combined with + or compared with ==\";\n\t}\n}\n/**\n* Builds the `input` a module body receives. Every property access returns a\n* value recording its key path, and the same path always returns the same\n* object, so Load's identity-keyed maps see one value per field. Any way of\n* reading the real value throws a LoadError naming the field.\n*/\nfunction buildModuleInput(moduleAddress) {\n\tconst byPath = /* @__PURE__ */ new Map();\n\tconst valueAt = (path) => {\n\t\tconst key = JSON.stringify(path);\n\t\tconst existing = byPath.get(key);\n\t\tif (existing !== void 0) return existing;\n\t\tconst origin = Object.freeze({\n\t\t\tkind: \"input\",\n\t\t\tmodule: moduleAddress,\n\t\t\tpath: Object.freeze([...path])\n\t\t});\n\t\tconst thrower = (what) => () => {\n\t\t\tthrow misuse(origin, what);\n\t\t};\n\t\tconst handler = {\n\t\t\tget(_target, property) {\n\t\t\t\tif (property === VALUE) return true;\n\t\t\t\tif (property === VALUE_ORIGIN) return origin;\n\t\t\t\tif (property === Symbol.toPrimitive) return (hint) => {\n\t\t\t\t\tthrow misuse(origin, primitiveMisuse(hint));\n\t\t\t\t};\n\t\t\t\tif (property === \"toString\") return thrower(\"its toString() was called\");\n\t\t\t\tif (property === \"valueOf\") return thrower(\"its valueOf() was called\");\n\t\t\t\tif (property === \"toJSON\") return thrower(\"it was serialized with JSON.stringify\");\n\t\t\t\tif (property === Symbol.iterator || property === Symbol.asyncIterator) return thrower(\"it was iterated (array spread, for…of or array destructuring)\");\n\t\t\t\tif (typeof property === \"symbol\") return void 0;\n\t\t\t\treturn valueAt([...path, property]);\n\t\t\t},\n\t\t\thas(_target, property) {\n\t\t\t\tif (property === VALUE || property === VALUE_ORIGIN) return true;\n\t\t\t\tif (typeof property === \"symbol\") return false;\n\t\t\t\tthrow misuse(origin, `it was checked with the in operator (\"${property}\" in …)`);\n\t\t\t},\n\t\t\townKeys() {\n\t\t\t\tthrow misuse(origin, \"its keys were listed (Object.keys, object spread, for…in or Object.entries)\");\n\t\t\t},\n\t\t\tgetOwnPropertyDescriptor() {\n\t\t\t\tthrow misuse(origin, \"its properties were inspected\");\n\t\t\t},\n\t\t\tset(_target, property) {\n\t\t\t\tthrow misuse(origin, `its field \"${String(property)}\" was assigned to`);\n\t\t\t},\n\t\t\tdefineProperty(_target, property) {\n\t\t\t\tthrow misuse(origin, `its field \"${String(property)}\" was assigned to`);\n\t\t\t},\n\t\t\tdeleteProperty() {\n\t\t\t\tthrow misuse(origin, \"a property was deleted from it\");\n\t\t\t},\n\t\t\tsetPrototypeOf() {\n\t\t\t\tthrow misuse(origin, \"its prototype was changed\");\n\t\t\t},\n\t\t\tpreventExtensions() {\n\t\t\t\tthrow misuse(origin, \"it was frozen or sealed\");\n\t\t\t}\n\t\t};\n\t\tconst target = Object.create(null);\n\t\tObject.defineProperty(target, INSPECT, {\n\t\t\tvalue: () => `[${inputFieldLabel(origin)} of module \"${origin.module}\"]`,\n\t\t\tconfigurable: true\n\t\t});\n\t\tconst proxy = new Proxy(target, handler);\n\t\tbyPath.set(key, proxy);\n\t\treturn proxy;\n\t};\n\treturn blindCast(valueAt([]));\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_SOURCE = blindCast(Symbol.for(\"prisma:secret-source\"));\n/** Builds a secret source from a target-defined payload: the SPI a deploy target's own constructor (e.g. `envSecret`) calls. The source is a value whose real value at deploy is itself, a pointer. Core forwards it and never inspects the payload. */\nfunction secretSource(payload, options) {\n\tconst label = sourceLabel(\"secretSource\", options?.label, \"a secret source\");\n\treturn blindCast(buildSource(SECRET_SOURCE, payload, {\n\t\tkind: \"source\",\n\t\tlabel,\n\t\tpoolKey: void 0\n\t}, \"secret\"));\n}\n/** True if `value` is a secret source, such as an `envSecret()` result. */\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\"));\n/** Builds a param source from a target-defined payload: the SPI a deploy target's own constructor (e.g. `envParam`) calls. Core forwards it and never inspects the payload. */\nfunction paramSource(payload, options) {\n\tconst label = sourceLabel(\"paramSource\", options?.label, \"a param source\");\n\tconst poolKey = options?.poolKey;\n\tif (poolKey !== void 0 && (typeof poolKey !== \"string\" || poolKey.length === 0)) throw new Error(\"paramSource() poolKey must be a non-empty string.\");\n\tconst redacted = options?.redacted === true;\n\tif (poolKey !== void 0 && redacted) throw new Error(\"paramSource() takes poolKey, for a value known at deploy, or redacted, for a secret known only at boot, not both.\");\n\treturn blindCast(buildSource(PARAM_SOURCE, payload, {\n\t\tkind: \"source\",\n\t\tlabel,\n\t\tpoolKey\n\t}, poolKey !== void 0 ? void 0 : redacted ? \"secret\" : \"plain\"));\n}\nfunction sourceLabel(factory, label, fallback) {\n\tif (label === void 0) return fallback;\n\tif (typeof label !== \"string\" || label.length === 0) throw new Error(`${factory}() label must be a non-empty string.`);\n\treturn label;\n}\nfunction buildSource(brand, payload, origin, kind) {\n\tconst source = {\n\t\t[VALUE]: true,\n\t\t[VALUE_ORIGIN]: origin,\n\t\t[brand]: true,\n\t\t...kind === void 0 ? {} : { [POINTER]: kind },\n\t\tpayload\n\t};\n\tObject.defineProperty(origin, \"source\", { value: source });\n\tObject.defineProperties(source, coercions(origin));\n\tObject.freeze(origin);\n\treturn Object.freeze(source);\n}\nfunction coercions(origin) {\n\tconst thrower = (what) => () => {\n\t\tthrow sourceMisuse(origin, what);\n\t};\n\treturn {\n\t\ttoString: { value: thrower(\"its toString() was called\") },\n\t\tvalueOf: { value: thrower(\"its valueOf() was called\") },\n\t\t[Symbol.toPrimitive]: { value: (hint) => {\n\t\t\tthrow sourceMisuse(origin, primitiveMisuse(hint));\n\t\t} }\n\t};\n}\nconst sourceMisuses = /* @__PURE__ */ new WeakSet();\nfunction sourceMisuse(origin, what) {\n\tconst { label } = origin;\n\tconst error = new LoadError(origin.poolKey === void 0 ? `${label} is known only at boot: the deploy holds a pointer to it, never its value, and ${what}. A module body can only pass it on, into a provision() binding; to compute with the value, do it in the service that reads it.` : `${label} is a value, not its real value, and ${what}. A module body can only pass it on: into a provision() binding or as a resolve() dependency. To compute with it, list it: resolve([${label}], ([v]) => …).`);\n\tsourceMisuses.add(error);\n\treturn error;\n}\n/** True for the error a source throws when code turns it into text or a number. Internal to core. */\nfunction isSourceMisuse(error) {\n\treturn error instanceof LoadError && sourceMisuses.has(error);\n}\n/** A source's origin; `undefined` for a source another installed copy of core built without one. Internal to core. */\nfunction sourceOriginOf(source) {\n\tif (!isValue(source)) return void 0;\n\tconst origin = originOf(source);\n\treturn origin.kind === \"source\" ? origin : void 0;\n}\n/** True if `value` is a param source, such as an `envParam()` result. */\nfunction isParamSource(value) {\n\treturn typeof value === \"object\" && value !== null && blindCast(value)[PARAM_SOURCE] === true;\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}\n/**\n* `$out` names a resource's single anonymous output on the wire (the\n* application topology's reserved port name), so no declared port — a dep\n* slot or an expose entry — may claim it. Input names are already confined\n* to [A-Za-z0-9] by the config-key rule; expose and module-dep names are\n* not, so the reservation is checked wherever a port name is declared.\n*/\nfunction requireNotReservedPortNames(names, factory) {\n\tfor (const name of names) if (name === \"$out\") throw new Error(`${factory}() declares a port named \"$out\" — that name is reserved for a resource's anonymous output; choose another name.`);\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/** The slots, wiring and configuration a resource may carry, checked once for `resource()` and `ResourceNodeBase`. */\nfunction requireResourceWiring(def) {\n\tconst inputs = def.inputs ?? {};\n\tconst deps = def.deps ?? {};\n\trequireConfigKeySegmentNames(Object.keys(inputs), \"input\", \"resource\");\n\tfor (const [input, slot] of Object.entries(inputs)) {\n\t\tconst declared = slot;\n\t\tif (!isNode(declared) || declared.kind !== \"dependency\") throw new Error(`resource() dependency \"${input}\" is not a branded dependency end (construct it with the dependency() factory).`);\n\t}\n\tfor (const input of Object.keys(inputs)) if (deps[input] === void 0) throw new Error(`resource() declares dependency \"${input}\" but its deps leave it unwired. A resource is wired when it is constructed.`);\n\tfor (const [input, producer] of Object.entries(deps)) {\n\t\tif (!Object.hasOwn(inputs, input)) throw new Error(`resource() deps name \"${input}\", which is not a declared input.`);\n\t\tif (isValue(producer)) throw new Error(`resource() deps wire \"${input}\" to a value. A value can configure a node, never decide its edges (ADR-0062).`);\n\t}\n\tif (def.props !== void 0 && !isPlainObject(def.props)) throw new Error(\"resource() props must be a plain object.\");\n}\n/** A resource's routing `type`: its contract's `kind`, or the `type` named by a resource that offers nothing. */\nfunction resourceType(def) {\n\tconst provides = def.provides;\n\tif (provides === void 0) {\n\t\tif (typeof def.type !== \"string\" || def.type.length === 0) throw new Error(\"resource() requires provides, the contract it offers, or type, for a resource that offers nothing.\");\n\t\treturn def.type;\n\t}\n\tif (def.type !== void 0) throw new Error(\"resource() takes either provides or type, not both — type is the contract's kind when a contract is provided.\");\n\tif (typeof provides !== \"object\" || provides === null || !(\"kind\" in provides) || typeof provides.kind !== \"string\" || provides.kind.length === 0 || !(\"satisfies\" in provides) || typeof provides.satisfies !== \"function\") throw new Error(\"resource() requires `provides` — the Contract this resource offers (a non-empty `kind` plus its `satisfies()`).\");\n\treturn provides.kind;\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* A class built on this base must not use #private fields: Load copies a node whose props hold a value, and a copy carries own properties only.\n*/\nvar ResourceNodeBase = class {\n\t[NODE] = true;\n\tkind = \"resource\";\n\tname;\n\textension;\n\ttype;\n\tprovides;\n\tinputs;\n\tdeps;\n\tprops;\n\tconstructor(def) {\n\t\trequireName(def.name, \"resource\");\n\t\trequireExtension(def.extension, \"resource\");\n\t\tthis.type = resourceType(def);\n\t\trequireResourceWiring(def);\n\t\tthis.name = def.name;\n\t\tthis.extension = def.extension;\n\t\tthis.provides = blindCast(def.provides);\n\t\tthis.inputs = blindCast(frozenShallowCopy(def.inputs ?? {}));\n\t\tthis.deps = blindCast(frozenShallowCopy(def.deps ?? {}));\n\t\tthis.props = blindCast(frozenShallowCopy(def.props ?? {}));\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`. A resource that\n* offers nothing omits `provides` and names its `type`. Pure — nothing is\n* 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.expose !== void 0) requireNotReservedPortNames(Object.keys(def.expose), \"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\tif (Object.hasOwn(boundary, \"params\")) throw new Error(`module(\"${name}\") declares \\`params\\`, which a module no longer takes. Declare each value as a field of the module's \\`input\\` schema, and bind it with provision(module, { input: { … } }) (ADR-0061).`);\n\tif (Object.hasOwn(boundary, \"secrets\")) throw new Error(`module(\"${name}\") declares \\`secrets\\`, which a module no longer takes. Declare each secret as a secretString() field of the module's \\`input\\` schema, and bind it with provision(module, { input: { … } }) (ADR-0061).`);\n\trequireNotReservedPortNames(Object.keys(boundary.deps ?? {}), \"module\");\n\trequireNotReservedPortNames(Object.keys(boundary.expose ?? {}), \"module\");\n\tif (boundary.input !== void 0 && typeof boundary.input[\"~standard\"]?.validate !== \"function\") throw new Error(\"module() `input` must be a Standard Schema (an object with a \\\"~standard\\\".validate function) — see https://standardschema.dev (ADR-0061).\");\n\tconst deps = frozenShallowCopy(boundary.deps ?? {});\n\tconst expose = frozenShallowCopy(boundary.expose ?? {});\n\tconst body = closedRoot ? (ctx) => {\n\t\tboundaryOrBody({\n\t\t\t...ctx,\n\t\t\tinput: void 0\n\t\t});\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\tinputSchema: boundary.input,\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/** A node's dependency slots. A resource node built by another installed copy of core may have no `inputs`; that means none. */\nfunction slotsOf(node) {\n\treturn node.kind === \"resource\" ? node.inputs ?? {} : node.inputs;\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 InternalError(`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\n/**\n* The declared boundary ports of a module, service or resource node at `id`:\n* dep slots as `in` ports (contractKind = the slot's `type`), exposed\n* contracts as `out` ports (contractKind = the contract's `kind`, style = its\n* declared style). A resource's one `$out` port is recorded at its provision\n* site instead (load-module.ts).\n*/\nfunction boundaryPortsOf(id, node) {\n\tconst ports = [];\n\tconst slots = node.kind === \"module\" ? node.deps : slotsOf(node);\n\tfor (const [name, slot] of Object.entries(slots)) {\n\t\tconst type = typeof slot === \"object\" && slot !== null && \"type\" in slot && typeof slot.type === \"string\" ? slot.type : void 0;\n\t\tports.push({\n\t\t\tnode: id,\n\t\t\tdirection: \"in\",\n\t\t\tname,\n\t\t\tcontractKind: type,\n\t\t\tstyle: void 0\n\t\t});\n\t}\n\tconst expose = node.kind === \"resource\" ? {} : node.expose ?? {};\n\tfor (const [name, contract] of Object.entries(expose)) {\n\t\tconst kind = typeof contract === \"object\" && contract !== null && \"kind\" in contract && typeof contract.kind === \"string\" ? contract.kind : void 0;\n\t\tports.push({\n\t\t\tnode: id,\n\t\t\tdirection: \"out\",\n\t\t\tname,\n\t\t\tcontractKind: kind,\n\t\t\tstyle: contractStyleOf(contract)\n\t\t});\n\t}\n\treturn ports;\n}\n/** A resource node built by another installed copy of core may have no `inputs`; it has no slots. */\nfunction slotNodesAndEdges(node, nodeId) {\n\tconst inputs = slotsOf(node);\n\tif (typeof inputs !== \"object\" || inputs === null) throw new LoadError(`Node \"${nodeId}\" has no inputs map.`);\n\tconst nodes = [];\n\tconst edges = [];\n\tfor (const [input, value] of Object.entries(inputs)) {\n\t\tconst kind = isNode(value) ? value.kind : void 0;\n\t\tif (kind === \"resource\") throw new LoadError(`Dependency \"${input}\" of \"${nodeId}\" 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(`Dependency \"${input}\" of \"${nodeId}\" is not a branded dependency end (construct it with the dependency() factory).`);\n\t\tif (value.type.length === 0) throw new LoadError(`Dependency \"${input}\" of \"${nodeId}\" has an empty node type.`);\n\t\tconst id = `${nodeId}.${input}`;\n\t\tnodes.push({\n\t\t\tid,\n\t\t\tparent: nodeId,\n\t\t\tnode: value\n\t\t});\n\t\tedges.push({\n\t\t\tfrom: id,\n\t\t\tto: nodeId,\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}\" — 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\tparent: void 0,\n\t\tnode: root\n\t};\n\tconst { nodes, edges } = slotNodesAndEdges(root, rootId);\n\treturn {\n\t\troot: rootGraphNode,\n\t\tnodes: [...topoSort(nodes, edges), rootGraphNode],\n\t\tedges,\n\t\tports: boundaryPortsOf(rootId, root),\n\t\tauthoredEdges: [],\n\t\tinputBindings: [],\n\t\tparams: [],\n\t\tsecretSources: []\n\t};\n}\n//#endregion\n//#region src/resolve-values.ts\nfunction joinPath(path, key) {\n\treturn path === \"\" ? String(key) : `${path}.${key}`;\n}\nfunction describeSite(site) {\n\tswitch (site.kind) {\n\t\tcase \"serviceInput\": return site.path === \"\" ? `the input binding of service \"${site.address}\"` : `input key \"${site.path}\" of service \"${site.address}\"`;\n\t\tcase \"moduleInput\": return site.path === \"\" ? `the input binding of module \"${site.address}\"` : `input key \"${site.path}\" of module \"${site.address}\"`;\n\t\tcase \"param\": return `param \"${site.path}\" of service \"${site.address}\"`;\n\t\tcase \"props\": return site.path === \"\" ? `the props of resource \"${site.address}\"` : `prop \"${site.path}\" of resource \"${site.address}\"`;\n\t}\n}\nfunction collect(value, site, found, seen, recordSecret) {\n\tif (isSecretSource(value) || isParamSource(value)) {\n\t\tif (isSecretSource(value) && site.kind !== \"props\") recordSecret(value, site);\n\t\tif (site.kind === \"serviceInput\" || site.kind === \"param\" || !isValue(value)) return;\n\t\tfound.push({\n\t\t\tvalue,\n\t\t\tsite\n\t\t});\n\t\treturn;\n\t}\n\tif (isValue(value)) {\n\t\tfound.push({\n\t\t\tvalue,\n\t\t\tsite\n\t\t});\n\t\treturn;\n\t}\n\tif (!Array.isArray(value) && !isPlainObject(value)) return;\n\tif (seen.has(value)) return;\n\tseen.add(value);\n\tconst entries = Array.isArray(value) ? value.map((member, index) => [index, member]) : Object.entries(value);\n\tfor (const [key, member] of entries) {\n\t\tconst path = site.kind === \"param\" ? site.path : joinPath(site.path, key);\n\t\tcollect(member, {\n\t\t\t...site,\n\t\t\tpath\n\t\t}, found, seen, recordSecret);\n\t}\n}\nfunction describeNotPlain(value) {\n\tswitch (typeof value) {\n\t\tcase \"function\": return \"a function\";\n\t\tcase \"symbol\": return \"a symbol\";\n\t\tcase \"bigint\": return \"a bigint\";\n\t\tcase \"number\": return Number.isFinite(value) ? void 0 : \"a non-finite number\";\n\t\tcase \"object\": return value === null || Array.isArray(value) || isPlainObject(value) ? void 0 : \"an object that is not plain data\";\n\t\tdefault: return;\n\t}\n}\nfunction isThenable(value) {\n\tif (isValue(value)) return false;\n\treturn typeof value === \"object\" && value !== null && \"then\" in value && typeof value.then === \"function\";\n}\nfunction canonicalSecret(source) {\n\tconst original = sourceOriginOf(source)?.source;\n\treturn isSecretSource(original) ? original : source;\n}\nfunction nodeKindOf(site) {\n\tswitch (site.kind) {\n\t\tcase \"serviceInput\":\n\t\tcase \"param\": return \"service\";\n\t\tcase \"moduleInput\": return \"module\";\n\t\tcase \"props\": return \"resource\";\n\t}\n}\nfunction pointersIn(values) {\n\tconst pointers = /* @__PURE__ */ new Set();\n\tconst seen = /* @__PURE__ */ new WeakSet();\n\tconst walk = (value) => {\n\t\tif (isSecretSource(value) || isParamSource(value)) {\n\t\t\tpointers.add(value);\n\t\t\treturn;\n\t\t}\n\t\tif (!Array.isArray(value) && !isPlainObject(value)) return;\n\t\tif (seen.has(value)) return;\n\t\tseen.add(value);\n\t\tfor (const member of Array.isArray(value) ? value : Object.values(value)) walk(member);\n\t};\n\twalk(values);\n\treturn pointers;\n}\nfunction checkResult(result, fnLabel) {\n\tif (isThenable(result)) throw new LoadError(`${fnLabel} returned a Promise. resolve() runs synchronously at Load.`);\n\tconst seen = /* @__PURE__ */ new WeakSet();\n\tconst walk = (value, path) => {\n\t\tconst atPath = path === \"\" ? \"\" : ` at \"${path}\"`;\n\t\tif (value === void 0) throw new LoadError(`${fnLabel} returned undefined${atPath}. Return a result for every environment; Composer never picks a default.`);\n\t\tif (isSecretSource(value) || isParamSource(value)) throw new LoadError(`${fnLabel} returned a source${atPath}, such as envSecret() or envParam() called inside the function. resolve() returns plain data; bind a source directly.`);\n\t\tif (isValue(value)) throw new LoadError(`${fnLabel} returned a value${atPath}, not a real value. List that value as a dependency; fn receives its real value.`);\n\t\tconst notPlain = describeNotPlain(value);\n\t\tif (notPlain !== void 0) throw new LoadError(`${fnLabel} returned ${notPlain}${atPath}. resolve() returns plain data: strings, finite numbers, booleans, null, arrays and plain objects.`);\n\t\tif (typeof value !== \"object\" || value === null || seen.has(value)) return;\n\t\tseen.add(value);\n\t\tconst entries = Array.isArray(value) ? value.map((member, index) => [index, member]) : Object.entries(value);\n\t\tfor (const [key, member] of entries) walk(member, joinPath(path, key));\n\t};\n\twalk(result, \"\");\n}\n/** The first pointer in `value`, at any depth through arrays and plain objects, with its key path; `undefined` when there is none. */\nfunction firstPointer(value, path = [], seen = /* @__PURE__ */ new WeakSet()) {\n\tif (isSecretSource(value) || isParamSource(value)) return {\n\t\tpointer: value,\n\t\tpath\n\t};\n\tif (!Array.isArray(value) && !isPlainObject(value)) return void 0;\n\tif (seen.has(value)) return void 0;\n\tseen.add(value);\n\tconst entries = Array.isArray(value) ? value.map((member, index) => [String(index), member]) : Object.entries(value);\n\tfor (const [key, member] of entries) {\n\t\tconst found = firstPointer(member, [...path, key], seen);\n\t\tif (found !== void 0) return found;\n\t}\n}\n/** Refuses a resolve() dependency whose real value is a pointer or holds one at any depth: `fn` computes with deploy-time data only. */\nfunction refusePointerDependency(fnLabel, dependency, real) {\n\tconst found = firstPointer(real);\n\tif (found === void 0) return;\n\tconst label = sourceOriginOf(found.pointer)?.label ?? \"a value known only at boot\";\n\tconst origin = originOf(dependency);\n\tif (origin.kind !== \"input\") throw new LoadError(`${fnLabel} lists ${label}, which is known only at boot. A resolve() dependency must be a deploy-time value. Bind ${label} directly into the input of the service that reads it.`);\n\tconst listed = `${inputFieldLabel(origin)} of module \"${origin.module}\"`;\n\tconst field = inputFieldLabel({\n\t\t...origin,\n\t\tpath: [...origin.path, ...found.path]\n\t});\n\tthrow new LoadError(`${fnLabel} lists ${listed}, ${found.path.length === 0 ? `whose real value is ${label}` : `which holds ${label} at ${field}`}, a value known only at boot. A resolve() dependency must be a deploy-time value. ${isSecretPointer(found.pointer) ? `A secret has no deploy-time value: pass ${field} on into a binding, and read it in the service.` : `To compute with ${field}, declare it plain, without field(), and bind it to deploy-time data.`}`);\n}\nfunction substitute(value, results, inProgress, sources) {\n\tif (isSecretSource(value) || isParamSource(value)) return sources === \"keep\" || !isValue(value) ? value : results.get(value);\n\tif (isValue(value)) return results.get(value);\n\tif (Array.isArray(value)) {\n\t\tif (inProgress.has(value)) return value;\n\t\tinProgress.add(value);\n\t\tconst rebuilt = value.map((member) => substitute(member, results, inProgress, sources));\n\t\tinProgress.delete(value);\n\t\treturn rebuilt.every((member, index) => member === value[index]) ? value : rebuilt;\n\t}\n\tif (isPlainObject(value)) {\n\t\tif (inProgress.has(value)) return value;\n\t\tinProgress.add(value);\n\t\tconst rebuilt = {};\n\t\tlet changed = false;\n\t\tfor (const [key, member] of Object.entries(value)) {\n\t\t\tconst real = substitute(member, results, inProgress, sources);\n\t\t\tif (real === void 0 && isValue(member)) {\n\t\t\t\tchanged = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\trebuilt[key] = real;\n\t\t\tif (real !== member) changed = true;\n\t\t}\n\t\tinProgress.delete(value);\n\t\treturn changed ? rebuilt : value;\n\t}\n\treturn value;\n}\nfunction describeData(value) {\n\tif (Array.isArray(value)) return \"an array\";\n\tif (typeof value === \"object\") return \"an object that is not plain data\";\n\treturn `a ${typeof value}`;\n}\n/** The data at `origin`'s path inside a validated input; `undefined` where a key or a parent is absent. */\nfunction readPath(data, origin) {\n\tlet current = data;\n\tfor (const [index, key] of origin.path.entries()) {\n\t\tif (current === void 0 || current === null) return void 0;\n\t\tconst missing = `${inputFieldLabel(origin)} of module \"${origin.module}\" does not exist`;\n\t\tconst parent = inputFieldLabel({\n\t\t\t...origin,\n\t\t\tpath: origin.path.slice(0, index)\n\t\t});\n\t\tif (isSecretSource(current) || isParamSource(current)) throw new LoadError(`${missing}: ${parent} stands for a value only the platform has at boot, so it has no fields and can only be passed on unchanged.`);\n\t\tif (!isPlainObject(current)) throw new LoadError(`${missing}: ${parent} is ${describeData(current)}, not a plain object, so it has no fields. To compute with it, it must be a plain field, not a wrapped or secret one; list it: resolve([${parent}], ([v]) => …).`);\n\t\tif (!Object.hasOwn(current, key)) return void 0;\n\t\tcurrent = current[key];\n\t}\n\treturn current;\n}\nfunction refuseSecretBoxes(address, value, path) {\n\tif (isSecretSource(value) || isParamSource(value)) return;\n\tif (isSecretString(value)) throw new LoadError(`${describeSite({\n\t\taddress,\n\t\tkind: \"moduleInput\",\n\t\tpath\n\t})} is bound to a SecretString. A secret's value never appears in the code; bind envSecret('NAME'), or pass on an input field typed secretString().`);\n\tif (Array.isArray(value)) {\n\t\tfor (const [index, member] of value.entries()) refuseSecretBoxes(address, member, joinPath(path, index));\n\t\treturn;\n\t}\n\tif (isPlainObject(value)) for (const [key, member] of Object.entries(value)) refuseSecretBoxes(address, member, joinPath(path, key));\n}\n/** The original source each runtime value in `value` names, by its path. */\nfunction sourcesByPath(value, path = \"\", found = /* @__PURE__ */ new Map()) {\n\tif (isSecretSource(value) || isParamSource(value)) found.set(path, sourceOriginOf(value)?.source ?? value);\n\telse if (Array.isArray(value)) for (const [index, member] of value.entries()) sourcesByPath(member, joinPath(path, index), found);\n\telse if (isPlainObject(value)) for (const [key, member] of Object.entries(value)) sourcesByPath(member, joinPath(path, key), found);\n\treturn found;\n}\nfunction validateModuleInput(entry, resolved, environment) {\n\tconst address = entry.moduleAddress;\n\trefuseSecretBoxes(address, resolved, \"\");\n\tconst result = entry.schema[\"~standard\"].validate(resolved);\n\tif (result instanceof Promise) throw new LoadError(`The input schema of module \"${address}\" returned a Promise from validate(). A module's input is validated synchronously at Load; use a schema with no asynchronous checks.`);\n\tif (result.issues !== void 0) {\n\t\tconst messages = result.issues.map((issue) => issue.message).join(\"; \");\n\t\tif (entry.fromConfigPool) throw new LoadError(`The input of root module \"${address}\" does not match its input schema: ${messages}. A root's input is the values the \\`config\\` adapters in prisma.config.ts return${environment === void 0 ? \"\" : ` for the environment \"${environment.name}\"`}.`);\n\t\tthrow new LoadError(`The input binding of module \"${address}\" does not match the module's input schema: ${messages}`);\n\t}\n\tconst bound = sourcesByPath(resolved);\n\tconst onlyChecked = \"Its value is known only at boot, so a module's schema may check the field but never replace or move it.\";\n\tconst restore = (value, path) => {\n\t\tconst expected = bound.get(path);\n\t\tif (isSecretSource(value) || isParamSource(value)) {\n\t\t\tconst source = sourceOriginOf(value)?.source ?? value;\n\t\t\tif (source !== expected) throw new LoadError(`The input schema of module \"${address}\" moved ${sourceOriginOf(source)?.label} to input key \"${path}\". ${onlyChecked}`);\n\t\t\treturn source;\n\t\t}\n\t\tif (expected !== void 0 && value !== void 0) throw new LoadError(`The input schema of module \"${address}\" replaced input key \"${path}\", which is bound to ${sourceOriginOf(expected)?.label}. ${onlyChecked}`);\n\t\tif (isSecretString(value)) {\n\t\t\tconst atPath = path === \"\" ? \"\" : ` at \"${path}\"`;\n\t\t\tthrow new LoadError(`The input schema of module \"${address}\" produced a SecretString${atPath} that its binding did not supply. A module's schema may check a secret field, never create one.`);\n\t\t}\n\t\tif (Array.isArray(value)) return value.map((member, index) => restore(member, joinPath(path, index)));\n\t\tif (isPlainObject(value)) return Object.fromEntries(Object.entries(value).map(([key, member]) => [key, restore(member, joinPath(path, key))]));\n\t\treturn value;\n\t};\n\treturn restore(result.value, \"\");\n}\nfunction refusePointersInProps(address, props) {\n\tconst seen = /* @__PURE__ */ new WeakSet();\n\tconst walk = (value, path) => {\n\t\tif (isSecretSource(value) || isParamSource(value)) {\n\t\t\tconst label = sourceOriginOf(value)?.label ?? (isSecretSource(value) ? \"a secret source\" : \"a param source\");\n\t\t\tthrow new LoadError(`${describeSite({\n\t\t\t\taddress,\n\t\t\t\tkind: \"props\",\n\t\t\t\tpath\n\t\t\t})} is bound to ${label}, which is known only at boot. A resource's props are read at deploy; bind a value known at deploy.`);\n\t\t}\n\t\tif (!Array.isArray(value) && !isPlainObject(value)) return;\n\t\tif (seen.has(value)) return;\n\t\tseen.add(value);\n\t\tconst entries = Array.isArray(value) ? value.map((member, index) => [index, member]) : Object.entries(value);\n\t\tfor (const [key, member] of entries) walk(member, joinPath(path, key));\n\t};\n\twalk(props, \"\");\n}\n/**\n* Resolves every value the graph binds, dependency-first, once each, and\n* returns each binding with its values replaced by their real values.\n*/\nfunction resolveValues(input) {\n\tconst { environment, configPool } = input;\n\tconst secretUses = /* @__PURE__ */ new Map();\n\tconst recordSecret = (source, site) => {\n\t\tconst canonical = canonicalSecret(source);\n\t\tif (secretUses.has(canonical)) return;\n\t\tsecretUses.set(canonical, {\n\t\t\tsource: canonical,\n\t\t\taddress: site.address,\n\t\t\tnodeKind: nodeKindOf(site)\n\t\t});\n\t};\n\tconst secretSourcesReceivedBy = (inputBindings, params) => {\n\t\tfor (const { serviceAddress, binding } of [...inputBindings, ...params]) for (const pointer of pointersIn(binding)) {\n\t\t\tif (!isSecretSource(pointer)) continue;\n\t\t\tconst canonical = canonicalSecret(pointer);\n\t\t\tif (secretUses.get(canonical)?.nodeKind === \"service\") continue;\n\t\t\tsecretUses.set(canonical, {\n\t\t\t\tsource: canonical,\n\t\t\t\taddress: serviceAddress,\n\t\t\t\tnodeKind: \"service\"\n\t\t\t});\n\t\t}\n\t\treturn [...secretUses.values()];\n\t};\n\tconst found = [];\n\tfor (const { serviceAddress, binding } of input.inputBindings) collect(binding, {\n\t\taddress: serviceAddress,\n\t\tkind: \"serviceInput\",\n\t\tpath: \"\"\n\t}, found, /* @__PURE__ */ new WeakSet(), recordSecret);\n\tfor (const { serviceAddress, slot, binding } of input.params) collect(binding, {\n\t\taddress: serviceAddress,\n\t\tkind: \"param\",\n\t\tpath: slot\n\t}, found, /* @__PURE__ */ new WeakSet(), recordSecret);\n\tfor (const [address, resource] of input.resources) {\n\t\tconst site = {\n\t\t\taddress,\n\t\t\tkind: \"props\",\n\t\t\tpath: \"\"\n\t\t};\n\t\tcollect(resource.props, site, found, /* @__PURE__ */ new WeakSet(), recordSecret);\n\t}\n\tconst moduleInputByAddress = new Map(input.moduleInputs.map((entry) => [entry.moduleAddress, entry]));\n\tconst validatedInputs = /* @__PURE__ */ new Map();\n\tconst validating = /* @__PURE__ */ new Set();\n\tconst results = /* @__PURE__ */ new Map();\n\tconst visiting = [];\n\tconst fnLabelFor = (site) => visiting.length === 1 ? `The resolve() function for ${describeSite(site)}` : `A resolve() function that ${describeSite(site)} depends on`;\n\tconst resolveOne = (value, site) => {\n\t\tif (results.has(value)) return results.get(value);\n\t\tif (visiting.includes(value)) throw new LoadError(`${describeSite(site)} depends on itself: a computed value's dependencies lead back to it. Remove the cycle.`);\n\t\tvisiting.push(value);\n\t\tconst origin = originOf(value);\n\t\tlet result;\n\t\tswitch (origin.kind) {\n\t\t\tcase \"environment\":\n\t\t\t\tif (environment === void 0) throw new LoadError(`${describeSite(site)} depends on environment.name, but Load was given no environment. Pass { environment: { name } } to Load; the deploy and dev commands do.`);\n\t\t\t\tresult = environment[origin.fact];\n\t\t\t\tbreak;\n\t\t\tcase \"source\":\n\t\t\t\tif (isSecretSource(origin.source)) recordSecret(origin.source, site);\n\t\t\t\tif (origin.poolKey === void 0) result = origin.source;\n\t\t\t\telse if (configPool === void 0) throw new LoadError(`${describeSite(site)} depends on ${origin.label}, but Load was given no values from the \\`config\\` adapters to read \"${origin.poolKey}\" from. Pass { configPool } to Load; the deploy and dev commands pass the values the \\`config\\` adapters return.`);\n\t\t\t\telse {\n\t\t\t\t\tconst raw = configPool[origin.poolKey];\n\t\t\t\t\tif (raw === void 0 || raw === \"\") result = void 0;\n\t\t\t\t\telse if (typeof raw === \"string\") result = raw;\n\t\t\t\t\telse throw new LoadError(`${describeSite(site)} depends on ${origin.label}, which reads \"${origin.poolKey}\" from the values the \\`config\\` adapters return, but they return ${describeKind(raw)} for it, not text. ${origin.label} reads text; to pass other data, declare it in the root module's input.`);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"computed\": {\n\t\t\t\tconst args = origin.dependencies.map((dependency) => {\n\t\t\t\t\tconst real = resolveOne(dependency, site);\n\t\t\t\t\tconst source = originOf(dependency);\n\t\t\t\t\tif (real === void 0 && source.kind === \"source\") throw new LoadError(`${fnLabelFor(site)} lists ${source.label}, but \"${source.poolKey}\" is unset or empty, so it has no real value. Set \"${source.poolKey}\", or bind ${source.label} directly into an input binding, where an absent value leaves the key out and the schema decides.`);\n\t\t\t\t\trefusePointerDependency(fnLabelFor(site), dependency, real);\n\t\t\t\t\treturn real;\n\t\t\t\t});\n\t\t\t\ttry {\n\t\t\t\t\tresult = origin.compute(args);\n\t\t\t\t} catch (thrown) {\n\t\t\t\t\tif (thrown instanceof LoadError && !isSourceMisuse(thrown)) throw thrown;\n\t\t\t\t\tconst message = thrown instanceof Error ? thrown.message : String(thrown);\n\t\t\t\t\tthrow new LoadError(`${fnLabelFor(site)} threw: ${message}`, { cause: thrown });\n\t\t\t\t}\n\t\t\t\tcheckResult(result, fnLabelFor(site));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"input\": {\n\t\t\t\tconst entry = moduleInputByAddress.get(origin.module);\n\t\t\t\tif (entry === void 0) throw new LoadError(`${describeSite(site)} depends on ${inputFieldLabel(origin)} of module \"${origin.module}\", which this Load does not provision. An input field can be passed on only inside the body of the module that received it.`);\n\t\t\t\tif (entry.fromConfigPool && origin.path.length === 0) throw new LoadError(`${describeSite(site)} depends on the whole input of root module \"${origin.module}\". The root's input is every value the \\`config\\` adapters return, which by default is every variable of the process environment, secrets included. Pass on the fields the root declares one by one, such as input.EMAIL_FROM.`);\n\t\t\t\tresult = readPath(validatedInputOf(entry), origin);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tvisiting.pop();\n\t\tresults.set(value, result);\n\t\treturn result;\n\t};\n\tconst validatedInputOf = (entry) => {\n\t\tif (validatedInputs.has(entry.moduleAddress)) return validatedInputs.get(entry.moduleAddress);\n\t\tif (validating.has(entry.moduleAddress)) throw new LoadError(`The input binding of module \"${entry.moduleAddress}\" depends on that module's own input. Remove the cycle.`);\n\t\tvalidating.add(entry.moduleAddress);\n\t\tconst site = {\n\t\t\taddress: entry.moduleAddress,\n\t\t\tkind: \"moduleInput\",\n\t\t\tpath: \"\"\n\t\t};\n\t\tconst values = [];\n\t\tcollect(entry.binding, site, values, /* @__PURE__ */ new WeakSet(), recordSecret);\n\t\tfor (const { value, site: valueSite } of values) resolveOne(value, valueSite);\n\t\tconst validated = validateModuleInput(entry, substitute(entry.binding, results, /* @__PURE__ */ new WeakSet(), \"resolve\"), environment);\n\t\tvalidating.delete(entry.moduleAddress);\n\t\tvalidatedInputs.set(entry.moduleAddress, validated);\n\t\treturn validated;\n\t};\n\tfor (const entry of input.moduleInputs) validatedInputOf(entry);\n\tfor (const { value, site } of found) resolveOne(value, site);\n\tconst authoredProps = new Map([...input.resources].map(([address, resource]) => [address, resource.props]));\n\tif (found.length === 0) {\n\t\tfor (const [address, props] of authoredProps) refusePointersInProps(address, props);\n\t\treturn {\n\t\t\tinputBindings: input.inputBindings,\n\t\t\tparams: input.params,\n\t\t\tresourceProps: authoredProps,\n\t\t\tsecretSources: secretSourcesReceivedBy(input.inputBindings, input.params)\n\t\t};\n\t}\n\tconst inProgress = /* @__PURE__ */ new WeakSet();\n\tconst resourceProps = /* @__PURE__ */ new Map();\n\tfor (const [address, props] of authoredProps) {\n\t\tconst substituted = substitute(props, results, inProgress, \"resolve\");\n\t\trefusePointersInProps(address, substituted);\n\t\tconst resolvedProps = substituted === props ? props : blindCast(substituted);\n\t\tresourceProps.set(address, resolvedProps);\n\t}\n\tconst inputBindings = input.inputBindings.map((entry) => {\n\t\tconst binding = substitute(entry.binding, results, inProgress, \"keep\");\n\t\treturn binding === entry.binding ? entry : {\n\t\t\tserviceAddress: entry.serviceAddress,\n\t\t\tbinding: blindCast(binding)\n\t\t};\n\t});\n\tconst params = input.params.flatMap((entry) => {\n\t\tconst binding = substitute(entry.binding, results, inProgress, \"keep\");\n\t\tif (binding === void 0 && isValue(entry.binding)) return [];\n\t\treturn [binding === entry.binding ? entry : {\n\t\t\t...entry,\n\t\t\tbinding\n\t\t}];\n\t});\n\treturn {\n\t\tresourceProps,\n\t\tinputBindings,\n\t\tparams,\n\t\tsecretSources: secretSourcesReceivedBy(inputBindings, params)\n\t};\n}\n//#endregion\n//#region src/load-module.ts\n/**\n* Brands a ref-port with the AUTHORED endpoint it stands for — which port of\n* which node the author wired, before any forwarding chain resolves. Read\n* only by `authoredSourceOf`; `__providerId` keeps carrying the resolved\n* producer for the flat (post-dereference) edges.\n*/\nconst AUTHORED_PORT = Symbol(\"prisma:authored-port\");\n/** The authored out-port brand carried by `ref`, if any. */\nfunction authoredPortOf(ref) {\n\tif (typeof ref !== \"object\" || ref === null) return void 0;\n\tconst brand = blindCast(ref)[AUTHORED_PORT];\n\tif (typeof brand !== \"object\" || brand === null) return void 0;\n\tconst { node, name } = blindCast(brand);\n\treturn typeof node === \"string\" && typeof name === \"string\" ? {\n\t\tnode,\n\t\tname\n\t} : void 0;\n}\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\t[AUTHORED_PORT]: {\n\t\t\tnode: id,\n\t\t\tname: port\n\t\t}\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 at most one port — the\n* contract it provides — flattened onto the ref itself, tagged with the\n* provider id. `id` and the authored brand are written last so a hostile\n* contract value cannot clobber them. A resource that exposes nothing gets\n* only its id.\n*/\nfunction refForResource(id, resource) {\n\tconst provides = resource.provides;\n\tif (provides === void 0) return { id };\n\treturn blindCast({\n\t\t...provides,\n\t\t__providerId: id,\n\t\tid,\n\t\t[AUTHORED_PORT]: {\n\t\t\tnode: id,\n\t\t\tname: RESOURCE_OUT_PORT\n\t\t}\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.deps` 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/** 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}\" of provisioned ${targetKind} \"${targetId}\" is not wired to a producer (module \"${enclosingModuleName}\").`);\n\t}\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 params wired into a provisioned SERVICE: a declared param is never\n* required to be bound here — it may fall back to its own `default` (checked\n* later, at `buildConfig`) — so this only rejects a wired key that names\n* 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* 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. `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*\n* `selfId` is this module's own full address — for the root, the deployed app\n* name (ADR-0057). Every child's address is `selfId` plus its provision id, so\n* every address starts with the app name. It also anchors the authored view:\n* children carry it as their `parent`, and this module's own boundary ports\n* (and the authored edges touching them) are recorded against it.\n*/\nfunction flatten(moduleNode, selfId, wiring, nodes, edges, pending, inputBindings, paramBindings, moduleInputs, byId, ports, authoredEdges, loading) {\n\tports.push(...boundaryPortsOf(selfId, moduleNode));\n\tconst localIds = /* @__PURE__ */ new Set();\n\tconst used = /* @__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 authoredSourceOf = (value) => {\n\t\tfor (const key of Object.keys(ctxInputs)) if (value === ctxInputs[key]) return {\n\t\t\tnode: selfId,\n\t\t\tdirection: \"in\",\n\t\t\tname: key\n\t\t};\n\t\tconst brand = authoredPortOf(value);\n\t\treturn brand === void 0 ? void 0 : {\n\t\t\tnode: brand.node,\n\t\t\tdirection: \"out\",\n\t\t\tname: brand.name\n\t\t};\n\t};\n\t/** Records the authored edge each wiring entry declares: source port → the target's own `in` port. */\n\tconst recordAuthoredWiring = (targetId, targetWiring) => {\n\t\tfor (const [input, ref] of Object.entries(targetWiring)) {\n\t\t\tconst from = authoredSourceOf(ref);\n\t\t\tif (from !== void 0) authoredEdges.push({\n\t\t\t\tfrom,\n\t\t\t\tto: {\n\t\t\t\t\tnode: targetId,\n\t\t\t\t\tdirection: \"in\",\n\t\t\t\t\tname: input\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\tconst provision = (child, opts) => {\n\t\tif (loading.sealed) throw new LoadError(`provision() was called after module \"${moduleNode.name}\" was loaded, from inside a resolve() function. resolve() computes values, never structure: the graph is the same whatever inputs Composer is given (ADR-0062). Provision the node in the module body and pass the value into it.`);\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 (isValue(id)) throw new LoadError(`provision() received a value as its id (module \"${moduleNode.name}\"). A value can configure a node, never decide its address: the graph is the same whatever inputs Composer is given (ADR-0062).`);\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 = `${selfId}.${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's slots are wired when it is constructed, not at provision().`);\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\tconst localWiring = { ...child.deps };\n\t\t\tmarkUsed(Object.values(localWiring));\n\t\t\tbyId.set(fullAddress, child);\n\t\t\tconst slots = slotNodesAndEdges(child, fullAddress);\n\t\t\tnodes.push(...slots.nodes, {\n\t\t\t\tid: fullAddress,\n\t\t\t\tparent: selfId,\n\t\t\t\tnode: child\n\t\t\t});\n\t\t\tedges.push(...slots.edges, ...wiringEdges(localWiring, fullAddress));\n\t\t\tports.push(...boundaryPortsOf(fullAddress, child));\n\t\t\tconst provides = child.provides;\n\t\t\tif (provides !== void 0) ports.push({\n\t\t\t\tnode: fullAddress,\n\t\t\t\tdirection: \"out\",\n\t\t\t\tname: RESOURCE_OUT_PORT,\n\t\t\t\tcontractKind: provides.kind,\n\t\t\t\tstyle: contractStyleOf(provides)\n\t\t\t});\n\t\t\trecordAuthoredWiring(fullAddress, localWiring);\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: \"resource\",\n\t\t\t\tenclosingModuleName: moduleNode.name\n\t\t\t});\n\t\t\treturn refForResource(fullAddress, child);\n\t\t}\n\t\tfor (const [input, ref] of Object.entries(provisionWiring ?? {})) if (isValue(ref)) throw new LoadError(`The deps for \"${fullAddress}.${input}\" are bound to a value. A value can configure a node, never decide its edges: the graph is the same whatever inputs Composer is given (ADR-0062).`);\n\t\tconst localWiring = { ...provisionWiring ?? {} };\n\t\tmarkUsed(Object.values(localWiring));\n\t\tconst localParams = { ...provisionParams ?? {} };\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) inputBindings.push({\n\t\t\t\tserviceAddress: fullAddress,\n\t\t\t\tbinding: blindCast(provisionInput)\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 = slotNodesAndEdges(child, fullAddress);\n\t\t\tnodes.push(...inputs.nodes, {\n\t\t\t\tid: fullAddress,\n\t\t\t\tparent: selfId,\n\t\t\t\tnode: child\n\t\t\t});\n\t\t\tedges.push(...inputs.edges, ...wiringEdges(localWiring, fullAddress));\n\t\t\tports.push(...boundaryPortsOf(fullAddress, child));\n\t\t\trecordAuthoredWiring(fullAddress, localWiring);\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 (provisionSecrets !== void 0) throw new LoadError(`provision(\"${id}\") received secrets for a module, which a module no longer takes. A module takes a secret as a secretString() field of its \\`input\\` binding (ADR-0061), not a secrets map.`);\n\t\tif (provisionParams !== void 0) throw new LoadError(`provision(\"${id}\") received params for a module, which a module no longer takes. A module takes its values as fields of its \\`input\\` binding (ADR-0061), not a params map.`);\n\t\tconst childInputSchema = child.inputSchema;\n\t\tif (childInputSchema === void 0 && provisionInput !== void 0) throw new LoadError(`provision(\"${id}\") received an input binding, but the module declares no input schema (module \"${moduleNode.name}\").`);\n\t\tif (childInputSchema !== void 0 && provisionInput === void 0) throw new LoadError(`Input of provisioned module \"${id}\" is not bound (module \"${moduleNode.name}\") — the module declares an input schema; bind it with \\`input: { … }\\` on its provision() call.`);\n\t\tif (childInputSchema !== void 0) moduleInputs.push({\n\t\t\tmoduleAddress: fullAddress,\n\t\t\tschema: childInputSchema,\n\t\t\tbinding: provisionInput,\n\t\t\tfromConfigPool: false\n\t\t});\n\t\tedges.push(...wiringEdges(localWiring, fullAddress));\n\t\trecordAuthoredWiring(fullAddress, localWiring);\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, nodes, edges, pending, inputBindings, paramBindings, moduleInputs, byId, ports, authoredEdges, loading);\n\t\tnodes.push({\n\t\t\tid: fullAddress,\n\t\t\tparent: selfId,\n\t\t\tnode: child\n\t\t});\n\t\tbyId.set(fullAddress, child);\n\t\tconst brandedOutputs = {};\n\t\tfor (const [key, value] of Object.entries(childOutputs)) brandedOutputs[key] = typeof value === \"object\" && value !== null ? {\n\t\t\t...value,\n\t\t\t[AUTHORED_PORT]: {\n\t\t\t\tnode: fullAddress,\n\t\t\t\tname: key\n\t\t\t}\n\t\t} : value;\n\t\treturn blindCast({\n\t\t\tid: fullAddress,\n\t\t\t...brandedOutputs\n\t\t});\n\t};\n\tconst ctx = blindCast({\n\t\tdeps: ctxInputs,\n\t\tinput: moduleNode.inputSchema === void 0 ? void 0 : buildModuleInput(selfId),\n\t\tenvironment: environmentFacts,\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 dependency \"${key}\" but never forwards it into a provision nor returns it as an exposed interface.`);\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 (isValue(port)) throw new LoadError(`Module \"${moduleNode.name}\" returned a value for expose \"${key}\". A value can configure a node, never decide its edges: return a port of a node the body provisions.`);\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\tconst from = authoredSourceOf(port);\n\t\tif (from !== void 0) authoredEdges.push({\n\t\t\tfrom,\n\t\t\tto: {\n\t\t\t\tnode: selfId,\n\t\t\t\tdirection: \"out\",\n\t\t\t\tname: key\n\t\t\t}\n\t\t});\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 ${rootDepKeys.length > 1 ? \"dependencies\" : \"dependency\"} ${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 moduleInputs = [];\n\tif (root.inputSchema !== void 0) {\n\t\tif (opts?.configPool === void 0) throw new LoadError(`Module \"${root.name}\" declares input and is being deployed as the root, but Load was given no values from the \\`config\\` adapters to fill it from. Pass { configPool } to Load; prisma deploy and prisma dev pass the values the \\`config\\` adapters return.`);\n\t\tmoduleInputs.push({\n\t\t\tmoduleAddress: rootId,\n\t\t\tschema: root.inputSchema,\n\t\t\tbinding: opts.configPool,\n\t\t\tfromConfigPool: true\n\t\t});\n\t}\n\tconst nodes = [];\n\tconst edges = [];\n\tconst pending = [];\n\tconst inputBindings = [];\n\tconst paramBindings = [];\n\tconst byId = /* @__PURE__ */ new Map();\n\tconst ports = [];\n\tconst authoredEdges = [];\n\tconst loading = { sealed: false };\n\ttry {\n\t\tflatten(root, rootId, {}, nodes, edges, pending, inputBindings, paramBindings, moduleInputs, byId, ports, authoredEdges, loading);\n\t\tfor (const entry of pending) validateWiring(entry, byId);\n\t\tassertDependencyDag(edges);\n\t} finally {\n\t\tloading.sealed = true;\n\t}\n\tconst resources = /* @__PURE__ */ new Map();\n\tfor (const [address, node] of byId) if (node.kind === \"resource\") resources.set(address, node);\n\tconst resolved = resolveValues({\n\t\tenvironment: opts?.environment,\n\t\tconfigPool: opts?.configPool,\n\t\tinputBindings,\n\t\tparams: paramBindings,\n\t\tmoduleInputs,\n\t\tresources\n\t});\n\tconst resolvedNodes = nodes.map((entry) => {\n\t\tconst props = resolved.resourceProps.get(entry.id);\n\t\tif (entry.node.kind !== \"resource\" || props === void 0 || props === entry.node.props) return entry;\n\t\treturn {\n\t\t\t...entry,\n\t\t\tnode: withResolvedProps(entry.node, props)\n\t\t};\n\t});\n\tconst rootGraphNode = {\n\t\tid: rootId,\n\t\tparent: void 0,\n\t\tnode: root\n\t};\n\treturn {\n\t\troot: rootGraphNode,\n\t\tnodes: [...topoSort(resolvedNodes, edges), rootGraphNode],\n\t\tedges,\n\t\tports,\n\t\tauthoredEdges,\n\t\tinputBindings: resolved.inputBindings,\n\t\tparams: resolved.params,\n\t\tsecretSources: resolved.secretSources\n\t};\n}\n/**\n* A frozen copy of `node` holding `props`, keeping its prototype (a class built\n* on `ResourceNodeBase` keeps its methods) and its own properties, the brand included.\n*/\nfunction withResolvedProps(node, props) {\n\treturn Object.freeze(Object.create(Object.getPrototypeOf(node), {\n\t\t...Object.getOwnPropertyDescriptors(node),\n\t\tprops: {\n\t\t\tvalue: Object.freeze(props),\n\t\t\tenumerable: true,\n\t\t\twritable: false,\n\t\t\tconfigurable: false\n\t\t}\n\t}));\n}\n/**\n* The dependency edges must form a DAG — a cycle means neither producer can\n* deploy first. A resource with dependency slots can take part in a cycle too.\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\nconst APP_NAME = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;\n/**\n* Throws unless `name` can be an app name: the root's address and the first segment of every\n* other address (ADR-0057). A `.` would split it, and it becomes part of every `COMPOSER_` key.\n*/\nfunction assertAppName(name) {\n\tif (!APP_NAME.test(name)) throw new LoadError(`The app name \"${name}\" is not valid. An app name (the root module's name, or --name) must start with a letter or digit and contain only letters, digits, \"-\" and \"_\".`);\n}\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 and `resolve()`\n* functions.\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\") {\n\t\tassertAppName(opts?.id ?? root.name);\n\t\treturn loadModule(root, opts);\n\t}\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 { isValue as _, freezeNode as a, RESOURCE_OUT_PORT as b, isProvisionNeed as c, paramSource as d, provisionNeed as f, slotsOf as g, service as h, dependency as i, isSecretSource as l, secretSource as m, assertAppName as n, isNode as o, resource as p, ResourceNodeBase as r, isParamSource as s, Load as t, module as u, resolve as v, LoadError as y };\n\n//# sourceMappingURL=graph-gE31_ToO.mjs.map","import { _ as isValue, a as freezeNode, b as RESOURCE_OUT_PORT, c as isProvisionNeed, d as paramSource, f as provisionNeed, g as slotsOf, h as service, i as dependency, l as isSecretSource, m as secretSource, n as assertAppName, o as isNode, p as resource, r as ResourceNodeBase, s as isParamSource, t as Load, u as module, v as resolve, y as LoadError } from \"./graph-gE31_ToO.mjs\";\nimport { isPlainPointer, isSecretPointer } from \"@internal/foundation/pointer\";\nimport { SecretBox, isSecretString } from \"@internal/foundation/secret\";\n//#region src/config.ts\n/**\n* A data-only descriptor of a param's schema for introspection — the\n* validator's vendor tag, never the schema's own `validate`. `configOf`\n* reports it where the old model reported `type: 'string' | 'number'`, so the\n* config surface stays enumerable without leaking a function. Nothing consumes\n* more than the vendor tag yet; a richer projection (e.g. a JSON-Schema export\n* when the vendor offers one) is an additive change if a consumer needs it.\n*/\nfunction projectSchema(schema) {\n\treturn { vendor: schema[\"~standard\"].vendor };\n}\n/**\n* Enumerates every config param the service declares: each input's connection\n* params, then the service's own params. Pure — reads `root.inputs`/`params`\n* directly, executes nothing but the (also pure) schema projection. Deliberately\n* does not go through `Load`: a service's connection-end inputs are legitimately\n* unwired from its own point of view (wiring is an enclosing module's concern),\n* and this introspects one service's declared shape regardless of how — or\n* whether — it composes into a larger graph.\n*/\nfunction configOf(root) {\n\tconst entries = [];\n\tfor (const [input, value] of Object.entries(root.inputs)) {\n\t\tif (typeof value !== \"object\" || value === null) continue;\n\t\tfor (const [name, param] of Object.entries(value.connection.params)) entries.push({\n\t\t\towner: { input },\n\t\t\tname,\n\t\t\tschema: projectSchema(param.schema),\n\t\t\toptional: param.optional === true,\n\t\t\tdefault: param.default\n\t\t});\n\t}\n\tfor (const [name, param] of Object.entries(root.params)) entries.push({\n\t\towner: \"service\",\n\t\tname,\n\t\tschema: projectSchema(param.schema),\n\t\toptional: param.optional === true,\n\t\tdefault: param.default\n\t});\n\treturn entries;\n}\n/**\n* The app's input manifest: every service input binding a `provision()` call\n* supplied (ADR-0042). Pure graph introspection, TARGET-AGNOSTIC — a deploy\n* target's recursive descent classifies the binding's leaves (its preflight\n* verifies each `envSecret` leaf's platform var exists before deploy; the\n* values are provisioned out-of-band).\n*/\nfunction inputManifest(graph) {\n\treturn graph.inputBindings;\n}\n/**\n* The app's param-binding manifest: every param a `provision()` call bound —\n* literal or an opaque, target-defined `ParamSource` — at the address that\n* declared it. The param sibling of `provisionManifest`, for a deploy\n* target's own preflight to consume. Pure graph introspection,\n* TARGET-AGNOSTIC; a param this manifest omits simply falls back to its own\n* `default` at `buildConfig`.\n*/\nfunction paramManifest(graph) {\n\treturn graph.params;\n}\n/**\n* Every secret source a binding in the graph names, wherever it sits: what a\n* deploy target's preflight checks.\n* Pure graph introspection, TARGET-AGNOSTIC.\n*/\nfunction secretSourceManifest(graph) {\n\treturn graph.secretSources;\n}\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/** A param over any caller-supplied Standard Schema — a structured `jobs`, say. */\nfunction param(schema, opts = {}) {\n\treturn withFacets(schema, opts);\n}\n//#endregion\n//#region src/hydrate.ts\n/**\n* Given a service and a concrete typed Config, hydrate every input\n* (connection.hydrate with its typed value slice). A resource dep and a\n* connection dep hydrate through identical machinery — the loaded client is\n* indistinguishable. The service's own params ride alongside in\n* `config.service`; the node's `load()` merges the two.\n*/\nasync function hydrate(root, config) {\n\tconst deps = {};\n\tfor (const [name, inputNode] of Object.entries(root.inputs)) {\n\t\tconst values = config.inputs[name] ?? {};\n\t\tdeps[name] = await inputNode.connection.hydrate(values);\n\t}\n\treturn deps;\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\nexport { Load, LoadError, RESOURCE_OUT_PORT, ResourceNodeBase, SecretBox, assertAppName, configOf, dependency, freezeNode, hydrate, hydrateSync, inputManifest, isNode, isParamSource, isPlainPointer, isProvisionNeed, isSecretPointer, isSecretSource, isSecretString, isValue, module, number, param, paramManifest, paramSource, provisionNeed, resolve, resource, secretSource, secretSourceManifest, service, slotsOf, string };\n\n//# sourceMappingURL=index.mjs.map","import { n as configFileMissing, r as entryMissing, t as checkComposerConfig } from \"./composer-config-DO_iG0iR.mjs\";\nimport { n as readSecretsPool, t as readConfigPool } from \"./config-pools-DiYw7wMu.mjs\";\nimport * as mod from \"node:module\";\nimport * as fs from \"node:fs\";\nimport { existsSync } from \"node:fs\";\nimport * as path from \"node:path\";\nimport { assembleServices } from \"@internal/assemble\";\nimport { Load, assertAppName, isNode } from \"@internal/core\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport { blindCast } from \"@internal/foundation/casts\";\nimport { spawnSync } from \"node:child_process\";\n//#region src/entry-resolution.ts\n/**\n* Synchronous Node resolve hook so that entry modules may import relative\n* files using the specifier forms TypeScript accepts by default —\n* extensionless `./service` and `./service.js` for a `.ts` source file —\n* without requiring `allowImportingTsExtensions` in every consumer's tsconfig.\n*\n* Resolution only; uses TypeScript's own documented mapping: for a specifier\n* Node could not resolve, strip any JS-family extension and probe the\n* corresponding TypeScript source; first candidate that exists on disk wins.\n* Format-specific rules: `.mjs` → `.mts`; `.cjs` → `.cts`; `.js` and\n* extensionless → `.ts`, `.mts`, `.tsx`, then `./index.ts`. Bare and package\n* specifiers are never touched. Existing `./x.ts` imports keep working —\n* Node resolves them before the hook fires (ADR-0005: no transform, no\n* guessing, deterministic TypeScript rule).\n*\n* Bun resolves `./x.js` and `./x` to `x.ts` natively, so the hook is a\n* no-op under Bun. Nothing is registered there.\n*/\nlet registered = false;\n/**\n* Registers the resolve hook once (idempotent). Call at the start of\n* `loadEntry` so every module in the entry graph benefits, including those\n* imported lazily after the entry itself loads.\n*/\nfunction registerEntryResolution() {\n\tif (registered || typeof process.versions.bun === \"string\") return;\n\tif (typeof mod.registerHooks !== \"function\") return;\n\tregistered = true;\n\tmod.registerHooks({ resolve(specifier, context, nextResolve) {\n\t\ttry {\n\t\t\treturn nextResolve(specifier, context);\n\t\t} catch (error) {\n\t\t\tif (!isRelativeSpecifier(specifier) || context.parentURL === void 0 || !isModuleNotFoundError(error)) throw error;\n\t\t\tfor (const candidate of sourceCandidates(new URL(specifier, context.parentURL))) if (existsSync(fileURLToPath(candidate))) return nextResolve(candidate.href, context);\n\t\t\tthrow error;\n\t\t}\n\t} });\n}\n/**\n* TypeScript's extension mapping: for a JS-family or extensionless URL,\n* produce the source candidates to probe. Format-specific: `.mjs` maps only\n* to `.mts`; `.cjs` maps only to `.cts`; `.js` and extensionless probe\n* `.ts`, `.mts`, `.tsx` (keeping `.tsx` so the JSX diagnostic fires), then\n* `./index.ts`.\n*/\nfunction sourceCandidates(resolved) {\n\tconst href = resolved.href;\n\tif (href.endsWith(\".mjs\")) {\n\t\tconst base = href.slice(0, -4);\n\t\treturn [new URL(`${base}.mts`)];\n\t}\n\tif (href.endsWith(\".cjs\")) {\n\t\tconst base = href.slice(0, -4);\n\t\treturn [new URL(`${base}.cts`)];\n\t}\n\tconst base = href.endsWith(\".js\") ? href.slice(0, -3) : href;\n\treturn [\n\t\tnew URL(`${base}.ts`),\n\t\tnew URL(`${base}.mts`),\n\t\tnew URL(`${base}.tsx`),\n\t\tnew URL(`${base}/index.ts`)\n\t];\n}\nfunction isRelativeSpecifier(specifier) {\n\treturn specifier.startsWith(\"./\") || specifier.startsWith(\"../\");\n}\nfunction isModuleNotFoundError(error) {\n\tif (!(error instanceof Error)) return false;\n\tif (!(\"code\" in error)) return false;\n\treturn error.code === \"ERR_MODULE_NOT_FOUND\";\n}\n//#endregion\n//#region src/jsx-load-error.ts\n/**\n* `loadEntry` imports a user's topology with the host runtime's own module\n* loader — under node (the CLI's shebang runtime), that loader strips\n* TypeScript types but has no JSX transform (ADR-0005: the framework\n* doesn't bundle or transform the app's code; deploy loading is no\n* exception). A `.tsx`/`.jsx` file anywhere in the topology's import graph\n* dies with node's raw `ERR_UNKNOWN_FILE_EXTENSION`, which names the file\n* but not the cause or the fix. This turns that one case into structured\n* error parts (summary/why/fix) that do — every other load failure (syntax\n* errors, missing files, non-JSX unknown extensions) is untouched.\n*/\nconst UNKNOWN_EXTENSION_CODE = \"ERR_UNKNOWN_FILE_EXTENSION\";\nconst JSX_EXTENSIONS = [\".tsx\", \".jsx\"];\nfunction errorCode(error) {\n\treturn \"code\" in error && typeof error.code === \"string\" ? error.code : void 0;\n}\nfunction unknownExtensionPath(error) {\n\tif (!(error instanceof Error)) return void 0;\n\tif (errorCode(error) !== UNKNOWN_EXTENSION_CODE) return void 0;\n\treturn /Unknown file extension \"\\.\\w+\" for (.+)$/.exec(error.message)?.[1];\n}\n/**\n* Returns structured error parts when `error` is node's\n* `ERR_UNKNOWN_FILE_EXTENSION` for a `.tsx`/`.jsx` file — `undefined` for\n* every other error (including unknown-extension failures for some other\n* extension), so the caller can fall through to its normal rethrow.\n*/\nfunction explainJsxLoadError(error, entryPath) {\n\tconst offendingPath = unknownExtensionPath(error);\n\tif (offendingPath === void 0) return void 0;\n\tif (!JSX_EXTENSIONS.some((ext) => offendingPath.endsWith(ext))) return void 0;\n\treturn {\n\t\tsummary: `\"${offendingPath}\" can't be loaded.`,\n\t\twhy: `deploy loads \"${entryPath}\"'s topology with node's own module loader, which strips TypeScript types but has no JSX transform — so a .tsx/.jsx file can't sit anywhere in that import graph.`,\n\t\tfix: \"Precompile that file in your own build (transform the JSX away, keep the real npm packages external) and import the compiled output instead of the raw .tsx/.jsx — see examples/email/scripts/build.ts in the prisma/composer repo for a worked example.\"\n\t};\n}\n//#endregion\n//#region src/load-entry.ts\n/**\n* Pipeline step 2 (deploy-cli.md § The pipeline): import the entry module\n* (resolved against cwd) and require its default export to be a node — a\n* service or module, branded by core's factories. Whatever this module exports\n* IS the application; nothing else marks a root (ADR-0003).\n*/\n/** `unloadableFix`, when given, says where the path came from, so a wrong path names its source. */\nasync function loadEntry(entryArg, cwd, unloadableFix) {\n\tregisterEntryResolution();\n\tconst resolvedPath = path.resolve(cwd, entryArg);\n\tlet mod;\n\ttry {\n\t\tmod = await import(pathToFileURL(resolvedPath).href);\n\t} catch (error) {\n\t\tconst explained = explainJsxLoadError(error, resolvedPath);\n\t\tif (explained !== void 0) throw new CliStructuredError(\"COMPOSE.ENTRY_UNLOADABLE\", explained.summary, {\n\t\t\twhy: explained.why,\n\t\t\tfix: explained.fix,\n\t\t\twhere: { path: resolvedPath },\n\t\t\tcause: error\n\t\t});\n\t\tthrow new CliStructuredError(\"COMPOSE.ENTRY_UNLOADABLE\", `Failed to import entry module \"${resolvedPath}\": ${error instanceof Error ? error.message : String(error)}`, {\n\t\t\t...unloadableFix === void 0 ? {} : { fix: unloadableFix },\n\t\t\twhere: { path: resolvedPath },\n\t\t\tcause: error\n\t\t});\n\t}\n\tconst root = blindCast(mod).default;\n\tif (!isNode(root) || root.kind === \"dependency\" || root.kind === \"resource\") throw new CliStructuredError(\"COMPOSE.ENTRY_EXPORT_INVALID\", `Entry module \"${resolvedPath}\" must default-export a node (a service or a module).`, {\n\t\tfix: \"Construct it with service() or module() from @prisma/composer.\",\n\t\twhere: { path: resolvedPath }\n\t});\n\treturn {\n\t\tpath: resolvedPath,\n\t\troot: blindCast(root)\n\t};\n}\n//#endregion\n//#region src/validate-coverage.ts\nfunction lookup(extensions, extension, type, expectedKind, what) {\n\tconst ext = extensions.get(extension);\n\tif (ext === void 0) throw new CliStructuredError(\"CONFIG.EXTENSION_MISSING\", `No extension \"${extension}\" is configured (needed by ${what}).`, {\n\t\tfix: \"Add it to `extensions` in the `composer` section of prisma.config.ts (import its /control entry and list its descriptor).\",\n\t\tmeta: {\n\t\t\textension,\n\t\t\ttype\n\t\t}\n\t});\n\tconst descriptor = ext.nodes[type];\n\tif (descriptor === void 0) throw new CliStructuredError(\"CONFIG.DESCRIPTOR_MISSING\", `Extension \"${extension}\" has no descriptor for node type \"${type}\" (needed by ${what}).`, {\n\t\twhy: `Known types: ${Object.keys(ext.nodes).join(\", \")}.`,\n\t\tmeta: {\n\t\t\textension,\n\t\t\ttype\n\t\t}\n\t});\n\tif (descriptor.kind !== expectedKind) throw new CliStructuredError(\"CONFIG.DESCRIPTOR_KIND_MISMATCH\", `Extension \"${extension}\"'s descriptor for node type \"${type}\" is a \"${descriptor.kind}\" descriptor — ${what} needs a \"${expectedKind}\" descriptor.`, { meta: {\n\t\textension,\n\t\ttype,\n\t\tkind: descriptor.kind\n\t} });\n}\n/** Throws a structured CONFIG.* error on the first uncovered `(extension, type)`; silent when the config covers the whole graph. */\nfunction validateRegistryCoverage(graph, config) {\n\tconst extensions = new Map(config.extensions.map((descriptor) => [descriptor.id, descriptor]));\n\tfor (const { id, node } of graph.nodes) {\n\t\tif (node.kind === \"resource\") {\n\t\t\tlookup(extensions, node.extension, node.type, \"resource\", `resource node \"${id}\"`);\n\t\t\tcontinue;\n\t\t}\n\t\tif (node.kind !== \"service\") continue;\n\t\tlookup(extensions, node.extension, node.type, \"service\", `service node \"${id}\"`);\n\t\tlookup(extensions, node.build.extension, node.build.type, \"build\", `service node \"${id}\"'s build descriptor`);\n\t}\n}\n//#endregion\n//#region src/pipeline.ts\n/**\n* The shared prefix of `deploy`/`destroy`/`dev` (deploy-cli.md § The\n* pipeline; local-dev spec § 6): entry load, Load,\n* registry coverage validation, name resolution, assemble. Deploy and dev\n* diverge after this — deploy resolves containers/preflight/stack file\n* against the hosted providers, dev against the local ones — so everything\n* up to and including assemble lives here once, consumed verbatim by both\n* `run()` (main.ts) and `runDev()` (dev/run-dev.ts), so the two pipelines\n* cannot drift.\n*/\nconst NO_SECRETS = Object.freeze({});\nfunction configError(findings, file) {\n\tconst [first] = findings;\n\treturn new CliStructuredError(first.code, first.summary, {\n\t\t...first.why === void 0 ? {} : { why: first.why },\n\t\tfix: first.fix,\n\t\twhere: { path: first.where ?? file },\n\t\tmeta: {\n\t\t\t...first.field === void 0 ? {} : { field: first.field },\n\t\t\tfindings\n\t\t}\n\t});\n}\n/**\n* Refuses a caller's config with the same findings, in the same order, as the CLI's section validator.\n* The error is the first finding and carries all of them in `meta.findings`. Returns the config with `file` resolved against `cwd`.\n*/\nfunction checkConfigSource(source, cwd) {\n\tconst file = path.resolve(cwd, source.file);\n\tif (!fs.existsSync(file)) throw configError([configFileMissing(file)], file);\n\tconst checked = checkComposerConfig(source.value, file);\n\tif (!checked.ok) throw configError(checked.findings, file);\n\treturn {\n\t\tvalue: checked.value,\n\t\tfile\n\t};\n}\n/**\n* Resolves the entry module. An override (`--entry`, or an operation's `entry` input) resolves\n* against `cwd`; the section's `entry` resolves against the directory of the file that declares it,\n* as the CLI engine resolves path fields in prisma.config.ts.\n*/\nfunction resolveEntryPath(override, source, cwd) {\n\tif (override !== void 0) return {\n\t\tpath: path.resolve(cwd, override),\n\t\tfix: `Check the \\`--entry\\` path (the \\`entry\\` input when calling @prisma/composer/control) \"${override}\". It is relative to the current directory, ${cwd}.`\n\t};\n\tconst configured = source.value.entry;\n\tif (configured === void 0) throw configError([entryMissing], source.file);\n\treturn {\n\t\tpath: path.resolve(path.dirname(source.file), configured),\n\t\tfix: `Check \\`entry: \"${configured}\"\\` in ${source.file}. It is relative to that file's directory.`\n\t};\n}\n/**\n* The pipeline's front — entry load and name resolution —\n* WITHOUT Load, coverage, or assemble. `log` needs only who the app is (its\n* config and resolved name) to reach the already-running local instance; it\n* neither builds nor provisions, so it must not require the user's built\n* output the way the full pipeline does.\n*/\nasync function resolveAppIdentity(entry, overrideName, cwd, config) {\n\tconst checked = checkConfigSource(config, cwd);\n\tconst { value } = checked;\n\tconst resolved = resolveEntryPath(entry, checked, cwd);\n\tconst entryModule = await loadEntry(resolved.path, cwd, resolved.fix);\n\tconst name = overrideName ?? entryModule.root.name;\n\tif (name.length === 0) throw new CliStructuredError(\"COMPOSE.NAME_MISSING\", \"The root node has no name.\", { fix: \"Name it at authoring, or pass --name.\" });\n\tassertAppName(name);\n\treturn {\n\t\tconfig: value,\n\t\tname\n\t};\n}\n/**\n* Runs entry load, name resolution, Load, registry coverage, and assemble — steps 1–5 of `run()`. `onAssembleError`, when\n* given, lets a caller decorate an assemble failure with command-specific\n* guidance (destroy's \"build first\" hint) without this shared step knowing\n* about any one command.\n*/\nasync function runPipeline(entry, overrideName, environment, cwd, source, deps = {}, onAssembleError) {\n\tconst configSource = checkConfigSource(source, cwd);\n\tconst config = configSource.value;\n\tconst resolved = resolveEntryPath(entry, configSource, cwd);\n\tconst entryModule = await loadEntry(resolved.path, cwd, resolved.fix);\n\tconst name = overrideName ?? entryModule.root.name;\n\tif (name.length === 0) throw new CliStructuredError(\"COMPOSE.NAME_MISSING\", \"The root node has no name.\", { fix: \"Name it at authoring, or pass --name.\" });\n\tconst poolInput = {\n\t\tenvironment,\n\t\tconfigFile: configSource.file\n\t};\n\tconst pools = {\n\t\tconfig: await readConfigPool(config, poolInput),\n\t\tsecrets: deps.readSecrets === true ? await readSecretsPool(config, poolInput) : NO_SECRETS\n\t};\n\tconst graph = Load(entryModule.root, {\n\t\tid: name,\n\t\tenvironment: { name: environment },\n\t\tconfigPool: pools.config\n\t});\n\tif (graph.root.node.kind !== \"module\") throw new CliStructuredError(\"COMPOSE.ROOT_NOT_MODULE\", \"The deploy root must be a module.\", { fix: \"Wrap your service, e.g. export default module('name', ({ provision }) => { provision(service); }).\" });\n\tvalidateRegistryCoverage(graph, config);\n\tdeps.onEvent?.({ kind: \"loaded\" });\n\tlet assembled;\n\ttry {\n\t\tassembled = await assembleServices(graph, config, cwd, deps.runAssembler, deps.onEvent, { devServers: deps.devServers === true });\n\t} catch (error) {\n\t\tif (onAssembleError !== void 0 && error instanceof Error) throw onAssembleError(error);\n\t\tthrow error;\n\t}\n\treturn {\n\t\tconfigSource,\n\t\tentryModule,\n\t\tgraph,\n\t\tname,\n\t\tassembled,\n\t\tpools\n\t};\n}\n//#endregion\n//#region src/validate-environment.ts\n/** Letters, digits, `-` and `_`, starting with a letter or digit: always a valid git ref, so no `git` is needed to check it. */\nconst PLAIN_ENVIRONMENT_NAME = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;\n/** An environment name must be a valid git ref (deploy-cli.md) — checked via `git check-ref-format`, never silently normalized. Runs before anything platform-specific. */\nfunction validateEnvironmentName(environment, spawn = spawnSync) {\n\tif (PLAIN_ENVIRONMENT_NAME.test(environment)) return;\n\tconst result = spawn(\"git\", [\"check-ref-format\", `refs/heads/${environment}`], { stdio: \"ignore\" });\n\tif (result.error) throw new CliStructuredError(\"DEPLOY.ENVIRONMENT_UNVALIDATABLE\", `git is required to validate --environment \"${environment}\" (git check-ref-format): ${result.error.message}.`, { cause: result.error });\n\tif (result.status !== 0) throw new CliStructuredError(\"DEPLOY.ENVIRONMENT_INVALID\", `Invalid --environment \"${environment}\": must be a valid git ref name (git check-ref-format rejected \"refs/heads/${environment}\").`);\n}\n//#endregion\nexport { runPipeline as i, checkConfigSource as n, resolveAppIdentity as r, validateEnvironmentName as t };\n\n//# sourceMappingURL=validate-environment-BNZC6W46.mjs.map"],"mappings":";;;;;;;;;;AAEA,SAAS,aAAa,OAAO;CAC5B,IAAI,UAAU,KAAK,GAAG,OAAO;CAC7B,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO;CACjC,IAAI,OAAO,UAAU,YAAY,OAAO;CACxC,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,OAAO,KAAK,OAAO;AACpB;;;ACLA,SAAS,eAAe,MAAM,OAAO,OAAO,SAAS,KAAK;CACzD,OAAO,IAAI,mBAAmB,0BAA0B,SAAS;EAChE;EACA,OAAO,EAAE,MAAM,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K,KAAK,SAAS,UAAU,MAAM,IAAI,mBAAmB,2BAA2B,qCAAqC,EAAE,KAAK,qGAAqG,CAAC;CACjP,yBAAyB,OAAO,MAAM;CACtC,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;CACjC,IAAI;CACJ,IAAI;EACH,YAAY,MAAM,iBAAiB,OAAO,QAAQ,KAAK,KAAK,cAAc,KAAK,SAAS,EAAE,YAAY,KAAK,eAAe,KAAK,CAAC;CACjI,SAAS,OAAO;EACf,IAAI,oBAAoB,KAAK,KAAK,iBAAiB,OAAO,MAAM,gBAAgB,KAAK;EACrF,MAAM;CACP;CACA,OAAO;EACN;EACA;EACA;EACA;EACA;EACA;CACD;AACD;;AAIA,MAAM,yBAAyB;;AAE/B,SAAS,wBAAwB,aAAa,QAAQ,WAAW;CAChE,IAAI,uBAAuB,KAAK,WAAW,GAAG;CAC9C,MAAM,SAAS,MAAM,OAAO,CAAC,oBAAoB,cAAc,aAAa,GAAG,EAAE,OAAO,SAAS,CAAC;CAClG,IAAI,OAAO,OAAO,MAAM,IAAI,mBAAmB,oCAAoC,8CAA8C,YAAY,4BAA4B,OAAO,MAAM,QAAQ,IAAI,EAAE,OAAO,OAAO,MAAM,CAAC;CACzN,IAAI,OAAO,WAAW,GAAG,MAAM,IAAI,mBAAmB,8BAA8B,0BAA0B,YAAY,6EAA6E,YAAY,IAAI;AACxN"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/composer-cli",
3
- "version": "0.36.0-dev.3",
3
+ "version": "0.36.0-dev.4",
4
4
  "type": "module",
5
5
  "description": "Prisma Composer's command family, which the `prisma` CLI mounts as `deploy`, `deploy list`, `dev`, `dev url`, `dev stop` and `emulator list`.",
6
6
  "exports": {
@@ -13,7 +13,7 @@
13
13
  "src"
14
14
  ],
15
15
  "dependencies": {
16
- "@prisma/composer": "0.36.0-dev.3",
16
+ "@prisma/composer": "0.36.0-dev.4",
17
17
  "@prisma/management-api-sdk": "^1.80.0",
18
18
  "alchemy": "2.0.0-beta.83",
19
19
  "cross-spawn": "^7.0.6",
@@ -24,11 +24,11 @@
24
24
  "@prisma/cli-engine": "0.9.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@internal/cli": "0.36.0-dev.3",
28
- "@internal/dev-emulators": "0.36.0-dev.3",
29
- "@internal/foundation": "0.36.0-dev.3",
30
- "@internal/lowering": "0.36.0-dev.3",
31
- "@internal/tsdown-config": "0.36.0-dev.3",
27
+ "@internal/cli": "0.36.0-dev.4",
28
+ "@internal/dev-emulators": "0.36.0-dev.4",
29
+ "@internal/foundation": "0.36.0-dev.4",
30
+ "@internal/lowering": "0.36.0-dev.4",
31
+ "@internal/tsdown-config": "0.36.0-dev.4",
32
32
  "@types/bun": "^1.3.13",
33
33
  "@prisma/cli-engine": "0.9.0",
34
34
  "@types/node": "^26.0.1",
@@ -1 +0,0 @@
1
- {"version":3,"file":"dev-environment-name-6eEr5PW8-lIZmJjfr.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/local-target.mjs","../../../0-framework/3-tooling/cli/dist/dev-environment-name-6eEr5PW8.mjs"],"sourcesContent":["import { a as isBuildOnlyExtension, i as devEnvironmentDir, n as DEV_ENVIRONMENT_NAME_FILE, t as DEV_DIR } from \"./app-config-CErnR6NK.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as Layer from \"effect/Layer\";\nimport { localState } from \"alchemy/State/LocalState\";\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 CliStructuredError(\"DEV.TARGET_UNSUPPORTED\", `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/** The state store `prisma dev` converges against: Alchemy's file store in the app's working directory. */\nfunction devState() {\n\treturn localState();\n}\n//#endregion\nexport { DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, devEnvironmentDir, devState, localTargetProviders, resolveLocalTargets };\n\n//# sourceMappingURL=local-target.mjs.map","import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { DEV_ENVIRONMENT_NAME_FILE } from \"@internal/core/local-target\";\n//#region src/operations/dev-environment-name.ts\n/**\n* Each environment's folder records the environment's exact name. On a\n* case-insensitive filesystem `--environment Dev` would otherwise open the\n* folder of `dev` and run, or `--fresh` delete, that copy.\n*/\nfunction recordedName(devDir) {\n\tconst file = path.join(devDir, DEV_ENVIRONMENT_NAME_FILE);\n\treturn fs.existsSync(file) ? fs.readFileSync(file, \"utf8\").trim() : void 0;\n}\nfunction nameMismatch(devDir, recorded, environment) {\n\treturn new CliStructuredError(\"DEV.ENVIRONMENT_NAME_MISMATCH\", `The folder ${devDir} holds the local copy of the environment ${recorded}, not ${environment}.`, {\n\t\twhy: \"On a case-insensitive filesystem, such as the default on macOS, environment names that differ only in case share one folder, so they cannot be separate local copies.\",\n\t\tfix: `Pass \\`--environment ${recorded}\\` for that copy, or pick a name that differs from ${recorded} by more than case.`,\n\t\tmeta: {\n\t\t\tdevDir,\n\t\t\trecorded,\n\t\t\tenvironment\n\t\t}\n\t});\n}\n/** Fails when the folder records another environment's name; a folder with no name recorded passes. */\nfunction requireDevEnvironmentName(devDir, environment) {\n\tconst recorded = recordedName(devDir);\n\tif (recorded !== void 0 && recorded !== environment) throw nameMismatch(devDir, recorded, environment);\n}\n/** Records the environment's name in its folder on first use; fails when the folder records another name. */\nfunction claimDevEnvironmentName(devDir, environment) {\n\tconst recorded = recordedName(devDir);\n\tif (recorded === environment) return;\n\tif (recorded !== void 0) throw nameMismatch(devDir, recorded, environment);\n\tfs.mkdirSync(devDir, { recursive: true });\n\tfs.writeFileSync(path.join(devDir, DEV_ENVIRONMENT_NAME_FILE), `${environment}\\n`);\n}\n//#endregion\nexport { requireDevEnvironmentName as n, claimDevEnvironmentName as t };\n\n//# sourceMappingURL=dev-environment-name-6eEr5PW8.mjs.map"],"mappings":";;;;;;;;AAMA,SAAS,0BAA0B,IAAI;CACtC,OAAO,IAAI,mBAAmB,0BAA0B,cAAc,GAAG,6EAA6E;AACvJ;;;;;;;;;;;;;;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;;;;;;;;ACnBA,SAAS,aAAa,QAAQ;CAC7B,MAAM,OAAO,KAAK,KAAK,QAAQ,yBAAyB;CACxD,OAAO,GAAG,WAAW,IAAI,IAAI,GAAG,aAAa,MAAM,MAAM,CAAC,CAAC,KAAK,IAAI,KAAK;AAC1E;AACA,SAAS,aAAa,QAAQ,UAAU,aAAa;CACpD,OAAO,IAAI,mBAAmB,iCAAiC,cAAc,OAAO,2CAA2C,SAAS,QAAQ,YAAY,IAAI;EAC/J,KAAK;EACL,KAAK,wBAAwB,SAAS,qDAAqD,SAAS;EACpG,MAAM;GACL;GACA;GACA;EACD;CACD,CAAC;AACF;;AAEA,SAAS,0BAA0B,QAAQ,aAAa;CACvD,MAAM,WAAW,aAAa,MAAM;CACpC,IAAI,aAAa,KAAK,KAAK,aAAa,aAAa,MAAM,aAAa,QAAQ,UAAU,WAAW;AACtG;;AAEA,SAAS,wBAAwB,QAAQ,aAAa;CACrD,MAAM,WAAW,aAAa,MAAM;CACpC,IAAI,aAAa,aAAa;CAC9B,IAAI,aAAa,KAAK,GAAG,MAAM,aAAa,QAAQ,UAAU,WAAW;CACzE,GAAG,UAAU,QAAQ,EAAE,WAAW,KAAK,CAAC;CACxC,GAAG,cAAc,KAAK,KAAK,QAAQ,yBAAyB,GAAG,GAAG,YAAY,GAAG;AAClF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"execute-deploy-destroy-BIqwt1RF-D3F6yxLV.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/deployment-summary-CDHdLtnO.mjs","../../../0-framework/3-tooling/cli/dist/run-report-CmBz2-xc.mjs","../../../0-framework/3-tooling/cli/dist/execute-deploy-destroy-BIqwt1RF.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport { blindCast } from \"@internal/foundation/casts\";\nimport { format, stripVTControlCharacters } from \"node:util\";\n//#region src/deployment-summary.ts\n/**\n* The deploy result's cross-process protocol, whole in one place: the\n* serializable shape, the env var that names the carrier file, the writer the\n* report hook calls from inside the alchemy child, and the reader the deploy\n* operation runs after the child exits. `DeploymentResult` itself cannot\n* cross the boundary — its `DeployedNode` entries hold live graph-node\n* references (ADR-0033) — so the writer projects it down to what CAN.\n*\n* The summary is best-effort by contract: the writer never fails the child\n* over it, and the reader maps absent or malformed to `undefined`. So is the\n* failure cause the child leaves beside it when it exits non-zero.\n*/\n/** Env var the deploy operation sets on the alchemy child: when present,\n* the report hook also writes the JSON DeploymentSummary there. */\nconst DEPLOYMENT_RESULT_FILE_ENV = \"PRISMA_COMPOSER_DEPLOYMENT_RESULT_FILE\";\n/** Pure projection: keeps app + each node's address/entities, drops the in-process `node`. */\nfunction toDeploymentSummary(result) {\n\treturn {\n\t\tapp: result.app,\n\t\tnodes: result.nodes.map((node) => ({\n\t\t\taddress: node.address,\n\t\t\tentities: node.entities\n\t\t}))\n\t};\n}\n/**\n* Writer half, called by the report hook inside the alchemy child: when the\n* env var names a file, write the summary there. Best-effort — a write\n* failure must not fail a deploy that already converged, so it is swallowed.\n*/\nfunction writeDeploymentSummaryFile(result) {\n\tconst file = process.env[DEPLOYMENT_RESULT_FILE_ENV];\n\tif (file === void 0 || file.length === 0) return;\n\ttry {\n\t\tfs.writeFileSync(file, JSON.stringify(toDeploymentSummary(result)));\n\t} catch {}\n}\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\n/**\n* Reader half, run by the deploy operation after the child exits. Absent or\n* malformed → undefined — the summary is best-effort, never a deploy failure.\n*/\nfunction readDeploymentSummary(resultFilePath) {\n\tlet raw;\n\ttry {\n\t\traw = fs.readFileSync(resultFilePath, \"utf8\");\n\t} catch {\n\t\treturn;\n\t}\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(raw);\n\t} catch {\n\t\treturn;\n\t}\n\tif (!isRecord(parsed) || typeof parsed[\"app\"] !== \"string\" || !Array.isArray(parsed[\"nodes\"])) return;\n\tfor (const node of parsed[\"nodes\"]) {\n\t\tif (!isRecord(node) || typeof node[\"address\"] !== \"string\" || !Array.isArray(node[\"entities\"])) return;\n\t\tfor (const entity of node[\"entities\"]) if (!isRecord(entity) || typeof entity[\"kind\"] !== \"string\" || typeof entity[\"id\"] !== \"string\") return;\n\t}\n\treturn blindCast(parsed);\n}\n/** The child's failure cause rides beside the result file, so the one env var names both and the parent's cleanup removes both. */\nfunction engineFailureFilePath(resultFilePath) {\n\treturn `${resultFilePath}.failure.txt`;\n}\n/** Fits the platform's 5000-character build `errorMessage` with room for the exit-status prefix. */\nconst ENGINE_FAILURE_CAUSE_LIMIT = 1e3;\n/** Alchemy's advice to rerun its own CLI with `--adopt`, which a Composer user has no way to do. */\nconst ALCHEMY_ADOPT_ADVICE = [[/Re-run with `--adopt` \\(or wrap the effect in `adopt\\(true\\)`\\) to take it over\\./g, \"Something other than this app holds it. Remove that resource, then deploy again.\"], [/\\(re-deploy with --adopt to take ownership, then destroy\\)/g, \"(remove it by hand)\"]];\n/** Replaces Alchemy CLI advice in engine output with steps that work from Composer. */\nfunction withComposerAdvice(text) {\n\treturn ALCHEMY_ADOPT_ADVICE.reduce((current, [advice, replacement]) => current.replace(advice, replacement), text);\n}\nconst STDOUT_CONSOLE_METHODS = /* @__PURE__ */ new Set([\n\t\"log\",\n\t\"info\",\n\t\"debug\"\n]);\n/**\n* Child half of the failure protocol, called by the generated stack file.\n* Keeps a bounded tail of everything this process logs through `console`,\n* passing every call through except Alchemy's CLI advice (see\n* {@link withComposerAdvice}), and on a non-zero exit writes the\n* redacted cause beside the result file. `console`, not the output streams:\n* alchemy's logger and its error reporting both go through it, and under Bun\n* `console` does not reach `process.stdout.write`.\n*\n* When stdout is not a terminal it carries the parent's data lines, so\n* everything this process prints goes to stderr instead.\n*/\nfunction captureEngineFailure() {\n\tconst resultFile = process.env[DEPLOYMENT_RESULT_FILE_ENV];\n\tif (resultFile === void 0 || resultFile.length === 0) return;\n\tconst stdoutToStderr = process.stdout.isTTY !== true;\n\tif (stdoutToStderr) process.stdout.write = process.stderr.write.bind(process.stderr);\n\tlet tail = \"\";\n\tfor (const method of [\n\t\t\"log\",\n\t\t\"info\",\n\t\t\"warn\",\n\t\t\"error\",\n\t\t\"debug\"\n\t]) {\n\t\tconst original = stdoutToStderr && STDOUT_CONSOLE_METHODS.has(method) ? console.error : console[method];\n\t\tconsole[method] = (...args) => {\n\t\t\tconst text = format(...args);\n\t\t\tconst shown = withComposerAdvice(text);\n\t\t\ttail = `${tail}${redactSecrets(shown, process.env)}\\n`.slice(-65536);\n\t\t\tif (shown === text) original.apply(console, args);\n\t\t\telse original.call(console, shown);\n\t\t};\n\t}\n\tprocess.once(\"exit\", (code) => {\n\t\tif (code === 0) return;\n\t\tconst cause = engineFailureCause(tail, process.env);\n\t\tif (cause === void 0) return;\n\t\ttry {\n\t\t\tfs.writeFileSync(engineFailureFilePath(resultFile), cause);\n\t\t} catch {}\n\t});\n}\n/** Parent half: the cause the child recorded, or undefined when it recorded none. */\nfunction readEngineFailureCause(resultFilePath) {\n\ttry {\n\t\tconst cause = fs.readFileSync(engineFailureFilePath(resultFilePath), \"utf8\");\n\t\treturn cause.length > 0 ? cause : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\n/** Effect's pretty log prefix, e.g. `[10:29:16.556] INFO (#53): `. */\nconst LOG_PREFIX = /^\\[[\\d:.]+\\] ([A-Z]+) \\(#\\d+\\): ?/;\n/** Alchemy's per-resource failure row, e.g. `[web] fail — UnknownError: …`. */\nconst RESOURCE_FAIL_ROW = /^\\[[^\\]]+\\] fail\\b/;\nconst STACK_FRAME = /^\\s*at /;\n/**\n* The failure the output describes: every line from the first failure line\n* (a failed resource row, an ERROR log, or an `error:` line) to the end, minus\n* blank lines, stack frames and info logs; the last five lines when there is no\n* failure line. Redacted, then capped.\n*/\nfunction engineFailureCause(output, env) {\n\tconst lines = [];\n\tfor (const raw of stripVTControlCharacters(output).split(/\\r\\n|\\r|\\n/)) {\n\t\tconst clean = raw.replace(/(?![\\t])\\p{Cc}/gu, \"\").trimEnd();\n\t\tconst prefix = LOG_PREFIX.exec(clean);\n\t\tconst text = (prefix === null ? clean : clean.slice(prefix[0].length)).trim();\n\t\tif (text.length === 0 || text === \"{\" || text === \"}\" || STACK_FRAME.test(text)) continue;\n\t\tconst level = prefix?.[1];\n\t\tconst failure = level === \"ERROR\" || level === \"FATAL\" || RESOURCE_FAIL_ROW.test(text) || /^\\W*error:/i.test(text);\n\t\tlines.push({\n\t\t\ttext,\n\t\t\tfailure,\n\t\t\tinfo: !failure && level !== void 0\n\t\t});\n\t}\n\tconst start = lines.findIndex((line) => line.failure);\n\tconst kept = start === -1 ? lines.slice(-5) : lines.slice(start).filter((line) => !line.info);\n\tif (kept.length === 0) return void 0;\n\tconst cause = redactSecrets(kept.map((line) => line.text).join(\"\\n\"), env);\n\treturn cause.length <= ENGINE_FAILURE_CAUSE_LIMIT ? cause : `${cause.slice(0, ENGINE_FAILURE_CAUSE_LIMIT - 1)}…`;\n}\n/** Env var names whose values are credentials: the service token, preflight payloads, and the usual secret spellings. */\nconst SECRET_ENV_NAME = /TOKEN|SECRET|PASSWORD|PASSWD|PRIVATE|CREDENTIAL|AUTH|API_?KEY|ACCESS_?KEY|_KEY$|DATABASE_URL|_DSN$|^PRISMA_COMPOSER_PREFLIGHT_/i;\nconst REDACTED = \"[redacted]\";\n/**\n* Removes credentials from text that is about to leave the machine: the value\n* of every secret-named env var, bearer/basic tokens, JWTs, the password in a\n* URL, and `token=…`-style pairs. Values shorter than 8 characters are left,\n* so a one-letter placeholder does not blank every matching letter.\n*/\nfunction redactSecrets(text, env) {\n\tconst values = Object.entries(env).filter(([name, value]) => SECRET_ENV_NAME.test(name) && (value ?? \"\").length >= 8).map(([, value]) => value ?? \"\").sort((a, b) => b.length - a.length);\n\tlet redacted = text;\n\tfor (const value of values) redacted = redacted.replaceAll(value, REDACTED);\n\treturn redacted.replace(/\\b(Bearer|Basic)\\s+[\\w.~+/=-]+/gi, `$1 ${REDACTED}`).replace(/\\beyJ[\\w-]+\\.[\\w-]+\\.[\\w-]*/g, REDACTED).replace(/(\\b[a-z][\\w+.-]*:\\/\\/[^\\s:/@]*:)[^\\s/@]+@/gi, `$1${REDACTED}@`).replace(/\\b((?:[\\w-]*[_-])?(?:token|secret|password|passwd|api[_-]?key|access[_-]?key|private[_-]?key)[\"']?\\s*[:=]\\s*[\"']?)[^\\s\"',;&]+/gi, `$1${REDACTED}`);\n}\n//#endregion\nexport { readEngineFailureCause as a, readDeploymentSummary as i, captureEngineFailure as n, writeDeploymentSummaryFile as o, engineFailureFilePath as r, DEPLOYMENT_RESULT_FILE_ENV as t };\n\n//# sourceMappingURL=deployment-summary-CDHdLtnO.mjs.map","import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n//#region src/run-report.ts\n/**\n* The run report: one deploy's outcome as JSON, for tools that consume a\n* deploy rather than watch one — the Prisma GitHub Action reads it to build a\n* pull-request comment carrying preview links.\n*\n* Deliberately separate from `deployment-summary.ts`. That file is a private\n* carrier between the alchemy child and this process, written to a\n* per-run path the parent deletes in a `finally` so resource ids and URLs do\n* not accumulate on disk. This one is written where the operator asked for\n* it, survives the run, is written on the failure path too, and carries a\n* version so a consumer can depend on its shape.\n*/\n/** Bump when a change would break a consumer that reads the current shape. */\nconst RUN_REPORT_VERSION = 2;\n/** Names the file to write the run report to, when `--report` is not passed. */\nconst RUN_REPORT_FILE_ENV = \"PRISMA_COMPOSER_REPORT_FILE\";\nfunction toRunReport(input) {\n\treturn {\n\t\tversion: 2,\n\t\toutcome: input.failure === void 0 ? \"succeeded\" : \"failed\",\n\t\tapp: input.summary?.app ?? null,\n\t\tenvironment: input.environment,\n\t\tnodes: input.summary?.nodes ?? [],\n\t\tfailure: input.failure ?? null\n\t};\n}\n/**\n* The path to write to: the `--report` flag first, then the env var. Relative\n* paths resolve against the deploy's cwd. `undefined` means no report was\n* asked for, which is the common case and writes nothing.\n*/\nfunction resolveRunReportPath(flag, env, cwd) {\n\tconst requested = flag !== void 0 && flag.length > 0 ? flag : env;\n\tif (requested === void 0 || requested.length === 0) return void 0;\n\treturn path.resolve(cwd, requested);\n}\n/**\n* Writes the report, creating the parent directory if needed. A write failure\n* warns and returns false rather than failing a deploy that already\n* converged — but it is never silent, because the operator asked for this\n* file and a consumer is waiting on it.\n*/\nfunction writeRunReport(filePath, report) {\n\ttry {\n\t\tfs.mkdirSync(path.dirname(filePath), { recursive: true });\n\t\tfs.writeFileSync(filePath, `${JSON.stringify(report, null, 2)}\\n`);\n\t\treturn true;\n\t} catch (error) {\n\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\tconsole.warn(`\\nCould not write the run report to ${filePath}: ${detail}`);\n\t\treturn false;\n\t}\n}\n//#endregion\nexport { writeRunReport as a, toRunReport as i, RUN_REPORT_VERSION as n, resolveRunReportPath as r, RUN_REPORT_FILE_ENV as t };\n\n//# sourceMappingURL=run-report-CmBz2-xc.mjs.map","import { i as noComposerExportMessage } from \"./composer-config-ehUUVHtU.mjs\";\nimport { i as runPipeline, t as validateEnvironmentName } from \"./validate-environment-CEhUSEg2.mjs\";\nimport { a as readEngineFailureCause, i as readDeploymentSummary, r as engineFailureFilePath, t as DEPLOYMENT_RESULT_FILE_ENV } from \"./deployment-summary-CDHdLtnO.mjs\";\nimport { d as toStructured, u as requireContainerForEnvironment } from \"./dev-current-BNoPkDRU.mjs\";\nimport { a as writeRunReport, i as toRunReport, r as resolveRunReportPath, t as RUN_REPORT_FILE_ENV } from \"./run-report-CmBz2-xc.mjs\";\nimport { i as spawnAlchemy, n as alchemyInvocation, r as reproduceCommand } from \"./run-alchemy-Dl_MWw4g.mjs\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { notOk, ok, okVoid } from \"@internal/foundation/result\";\nimport { containerEnv, preflightEnv, preflightEnvVarName } from \"@internal/core/config\";\nimport { randomUUID } from \"node:crypto\";\n//#region src/generate-stack.ts\n/** Pipeline step 6: writes a regenerated-every-run, independently runnable stack module at `.prisma-composer/alchemy.run.ts`. */\nconst GENERATED_DIR = \".prisma-composer\";\nconst GENERATED_FILE = \"alchemy.run.ts\";\n/** A relative import specifier from `.prisma-composer/alchemy.run.ts` to `target` (posix separators). */\nfunction relativeImportSpecifier(generatedDir, target) {\n\tconst rel = path.relative(generatedDir, target).split(path.sep).join(\"/\");\n\treturn rel.startsWith(\".\") ? rel : `./${rel}`;\n}\nfunction quote(value) {\n\treturn JSON.stringify(value);\n}\nfunction renderBundle(bundle) {\n\treturn `{ dir: ${quote(bundle.dir)}, entry: ${quote(bundle.entry)} }`;\n}\nfunction renderOptions(input) {\n\tconst lines = [];\n\tlines.push(` name: ${quote(input.name)},`);\n\tlines.push(` environment: ${quote(input.environment)},`);\n\tlines.push(\" bundles: {\");\n\tfor (const [id, bundle] of Object.entries(input.assembled.bundles)) lines.push(` ${quote(id)}: ${renderBundle(bundle)},`);\n\tlines.push(\" },\");\n\tlines.push(\" report: report.deploymentReport,\");\n\treturn lines.join(\"\\n\");\n}\n/** Renders the stack module's source (tests assert on it without touching disk) — uses `//` headers, not a block comment, since a cwd path with a star-slash could close one early. */\nfunction renderStackFile(input) {\n\tconst generatedDir = path.join(input.cwd, GENERATED_DIR);\n\tconst appImport = relativeImportSpecifier(generatedDir, input.entryPath);\n\tconst configImport = relativeImportSpecifier(generatedDir, input.configFile);\n\treturn `// Generated by Composer's deploy and destroy operations — overwritten on every\n// run; do not edit by hand. Runnable from ${quote(input.cwd)} WITH the env the\n// CLI passes its child (the PRISMA_COMPOSER_CONTAINER_*/_PREFLIGHT_* vars —\n// without them lower() refuses because no container is resolved), by the\n// command Composer starts, which a failed run prints:\n//\n// <node> <bin of the alchemy @prisma/composer depends on> deploy ${GENERATED_DIR}/${GENERATED_FILE} --yes --stage <stage>\n//\n// bisects a CLI bug from an Alchemy bug (deploy-cli.md § Implementation decisions).\nimport { lower } from '@prisma/composer/deploy';\nimport * as report from '@prisma/composer/report';\nimport prismaConfig from ${quote(configImport)};\nimport app from ${quote(appImport)};\n\nconst config = prismaConfig.composer;\nif (config === undefined) {\n throw new Error(${quote(noComposerExportMessage(input.configFile))});\n}\n\n// The app's own @prisma/composer may predate the failure recorder.\nreport.captureEngineFailure?.();\n\nexport default lower(app, config, {\n${renderOptions(input)}\n});\n`;\n}\n/** Writes the stack file, returning its absolute path. */\nfunction writeStackFile(input) {\n\tconst generatedDir = path.join(input.cwd, GENERATED_DIR);\n\tfs.mkdirSync(generatedDir, { recursive: true });\n\tconst filePath = path.join(generatedDir, GENERATED_FILE);\n\tfs.writeFileSync(filePath, renderStackFile(input));\n\treturn filePath;\n}\nconst GENERATED_STACK_RELATIVE_PATH = path.join(GENERATED_DIR, GENERATED_FILE);\n//#endregion\n//#region src/operations/execute-deploy-destroy.ts\n/**\n* The deploy/destroy executor — main.ts's pipeline orchestration with argv,\n* console, and exit codes removed: typed inputs in, structured results out.\n* Reached only by lazy import from deploy.ts/destroy.ts — this module's\n* static graph transitively loads alchemy's provider tree, so the control\n* entry must never import it statically.\n*/\nconst ALCHEMY_STATE_DIR = \".alchemy\";\n/** Destroy guardrail (moved from main.ts): true when `<cwd>/.alchemy` is missing or empty — likely wrong directory or nothing deployed yet. */\nfunction hasNoLocalDeployState(cwd) {\n\tconst stateDir = path.join(cwd, ALCHEMY_STATE_DIR);\n\treturn !(fs.existsSync(stateDir) && fs.readdirSync(stateDir).length > 0);\n}\n/**\n* Times each deploy step for the host's `onEvent`. A step still open when the\n* run fails is closed as failed, innermost first. A host `onEvent` that throws\n* is the host's bug and cannot fail the deploy.\n*/\nfunction deploySteps(onEvent) {\n\tconst open = /* @__PURE__ */ new Map();\n\tconst keyOf = (step) => step.name === \"assemble-service\" ? `${step.name}:${step.address}` : step.name;\n\tconst emit = (event) => {\n\t\ttry {\n\t\t\tonEvent?.(event);\n\t\t} catch {}\n\t};\n\tconst finish = (step, outcome, data) => {\n\t\tconst entry = open.get(keyOf(step));\n\t\tif (entry === void 0) return;\n\t\topen.delete(keyOf(step));\n\t\tconst durationMs = Math.round(performance.now() - entry.startedAt);\n\t\temit({\n\t\t\tkind: \"step-finished\",\n\t\t\tstep,\n\t\t\toutcome,\n\t\t\tdurationMs,\n\t\t\tdata\n\t\t});\n\t};\n\treturn {\n\t\tstart(step) {\n\t\t\topen.set(keyOf(step), {\n\t\t\t\tstep,\n\t\t\t\tstartedAt: performance.now()\n\t\t\t});\n\t\t\temit({\n\t\t\t\tkind: \"step-started\",\n\t\t\t\tstep\n\t\t\t});\n\t\t},\n\t\tfinish(step, data) {\n\t\t\tfinish(step, \"ok\", data);\n\t\t},\n\t\tfail(step) {\n\t\t\tfinish(step, \"failed\");\n\t\t},\n\t\tfailOpen() {\n\t\t\tfor (const { step } of [...open.values()].reverse()) finish(step, \"failed\");\n\t\t}\n\t};\n}\nasync function executeDeploy(input, deps, cwd) {\n\tconst outcome = await runStackPipeline(\"deploy\", {\n\t\tentry: input.entry,\n\t\tconfig: input.config,\n\t\tname: input.name,\n\t\tenvironment: input.environment ?? \"production\",\n\t\tcwd,\n\t\tonEvent: void 0,\n\t\tdeps,\n\t\treportId: input.reportId,\n\t\treportPath: resolveRunReportPath(input.reportPath, process.env[RUN_REPORT_FILE_ENV], cwd),\n\t\tsteps: deploySteps(input.onEvent)\n\t});\n\tif (!outcome.ok) return outcome;\n\treturn ok({ summary: outcome.value });\n}\nasync function executeDestroy(input, deps, cwd) {\n\tconst outcome = await runStackPipeline(\"destroy\", {\n\t\tentry: input.entry,\n\t\tconfig: input.config,\n\t\tname: input.name,\n\t\tenvironment: input.environment,\n\t\tcwd,\n\t\tonEvent: input.onEvent,\n\t\tdeps,\n\t\treportId: void 0,\n\t\treportPath: void 0,\n\t\tsteps: deploySteps(void 0)\n\t});\n\tif (!outcome.ok) return outcome;\n\treturn okVoid();\n}\n/**\n* Opens a session per extension that declares a reporter. A `begin` that\n* throws costs that extension its reporting and nothing else — the deploy\n* has not started, and refusing to run it because an observer failed would\n* invert the relationship.\n*/\nasync function beginReporters(extensions, context) {\n\treturn (await Promise.all(extensions.map(async (extension) => {\n\t\tif (extension.reporter === void 0) return void 0;\n\t\ttry {\n\t\t\tconst reporter = await extension.reporter.begin(context);\n\t\t\treturn reporter === void 0 ? void 0 : {\n\t\t\t\textensionId: extension.id,\n\t\t\t\treporter\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not start deploy reporting for ${extension.id}: ${detail}`);\n\t\t\treturn;\n\t\t}\n\t}))).filter((entry) => entry !== void 0);\n}\n/** Hands each session its own extension's resolved container, so it can attach the run to what that container names. */\nasync function attachReporters(reporters, containers) {\n\tawait Promise.all(reporters.map(async ({ extensionId, reporter }) => {\n\t\ttry {\n\t\t\tawait reporter.attach({ container: containers.get(extensionId) });\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not attach this deploy to its project for ${extensionId}: ${detail}`);\n\t\t}\n\t}));\n}\n/** Every session's contribution to the alchemy child's environment, so reporting that happens inside the apply can find the run. */\nfunction reporterChildEnv(reporters) {\n\tconst env = {};\n\tfor (const { extensionId, reporter } of reporters) try {\n\t\tObject.assign(env, reporter.childEnv());\n\t} catch (error) {\n\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\tconsole.warn(`\\nCould not pass deploy reporting into the apply for ${extensionId}: ${detail}`);\n\t}\n\treturn env;\n}\n/** `failingStep` is capped at 500 by the platform and `errorMessage` at 5000; truncating here keeps a long message from costing the whole report. */\nfunction truncate(value, limit) {\n\treturn value.length <= limit ? value : `${value.slice(0, limit - 1)}…`;\n}\n/** An interrupted converge (the engine settled a Ctrl-C) — reported as `cancelled`, never as `failed`. */\nfunction wasInterrupted(failure) {\n\treturn typeof failure.meta?.[\"signal\"] === \"string\";\n}\n/**\n* Ends every reporting session, whatever the run did. Sessions never reject\n* by contract, but a buggy one must not turn a converged deploy into a\n* failure — so this swallows anyway, and reports each session independently\n* so one bad implementation cannot silence another.\n*/\nasync function finishReporters(reporters, outcome) {\n\tconst entities = outcome.summary?.nodes.flatMap((node) => node.entities) ?? [];\n\tawait Promise.all(reporters.map(async ({ reporter }) => {\n\t\ttry {\n\t\t\tawait reporter.finish({\n\t\t\t\tok: outcome.ok,\n\t\t\t\tcancelled: outcome.cancelled,\n\t\t\t\tfailingStep: outcome.code === void 0 ? void 0 : truncate(outcome.code, 500),\n\t\t\t\terrorMessage: outcome.message === void 0 ? void 0 : truncate(outcome.message, 5e3),\n\t\t\t\tentities\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not report this deploy's outcome: ${detail}`);\n\t\t}\n\t}));\n}\n/**\n* Owns the reporting sessions around the pipeline: the inner run opens them\n* once it knows which extensions are configured, and this closes them on\n* every exit path — a returned failure, a success, or a thrown defect — as\n* the `record` step, which also writes the run report.\n* Nothing here can change what the pipeline returns.\n*/\nasync function runStackPipeline(action, opts) {\n\tconst reporters = [];\n\tlet outcome;\n\ttry {\n\t\toutcome = await runStackPipelineInner(action, opts, reporters);\n\t} catch (error) {\n\t\topts.steps.failOpen();\n\t\topts.steps.start({ name: \"record\" });\n\t\tawait finishReporters(reporters, {\n\t\t\tok: false,\n\t\t\tcancelled: false,\n\t\t\tcode: \"DEPLOY.UNEXPECTED\",\n\t\t\tmessage: error instanceof Error ? error.message : String(error)\n\t\t});\n\t\topts.steps.finish({ name: \"record\" });\n\t\tthrow error;\n\t}\n\tif (!outcome.ok) opts.steps.failOpen();\n\topts.steps.start({ name: \"record\" });\n\tawait finishReporters(reporters, outcome.ok ? {\n\t\tok: true,\n\t\tcancelled: false,\n\t\tsummary: outcome.value\n\t} : {\n\t\tok: false,\n\t\tcancelled: wasInterrupted(outcome.failure),\n\t\tcode: outcome.failure.code,\n\t\tmessage: outcome.failure.message\n\t});\n\tif (opts.reportPath === void 0 || writeRunReport(opts.reportPath, toRunReport({\n\t\tsummary: outcome.ok ? outcome.value : void 0,\n\t\tenvironment: opts.environment,\n\t\tfailure: outcome.ok ? void 0 : {\n\t\t\tcode: outcome.failure.code,\n\t\t\tmessage: outcome.failure.message\n\t\t}\n\t}))) opts.steps.finish({ name: \"record\" });\n\telse opts.steps.fail({ name: \"record\" });\n\treturn outcome;\n}\n/** The pipeline both actions share: validate, resolve containers, preflight,\n* write the stack file, run alchemy against it, then the destroy-only\n* teardown/removal suffix. The value is only ever a summary for deploy. */\nasync function runStackPipelineInner(action, opts, reporters) {\n\tconst { entry, config: composerConfig, name, environment, cwd, onEvent, deps, steps } = opts;\n\tsteps.start({ name: \"prepare\" });\n\ttry {\n\t\tvalidateEnvironmentName(environment);\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\tif (action === \"destroy\" && hasNoLocalDeployState(cwd)) onEvent?.({\n\t\tkind: \"no-local-deploy-state\",\n\t\tcwd\n\t});\n\tlet pipeline;\n\tlet containers;\n\tlet alchemyStage;\n\tconst preflightPayloads = /* @__PURE__ */ new Map();\n\tlet preflightTransportEnv = {};\n\ttry {\n\t\tpipeline = await runPipeline(entry, name, environment, cwd, composerConfig, {\n\t\t\trunAssembler: deps.runAssembler,\n\t\t\tonEvent: (event) => {\n\t\t\t\tswitch (event.kind) {\n\t\t\t\t\tcase \"loaded\":\n\t\t\t\t\t\tsteps.finish({ name: \"prepare\" });\n\t\t\t\t\t\tsteps.start({ name: \"assemble\" });\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase \"service-started\":\n\t\t\t\t\t\tsteps.start({\n\t\t\t\t\t\t\tname: \"assemble-service\",\n\t\t\t\t\t\t\taddress: event.address\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase \"service-assembled\":\n\t\t\t\t\t\tsteps.finish({\n\t\t\t\t\t\t\tname: \"assemble-service\",\n\t\t\t\t\t\t\taddress: event.address\n\t\t\t\t\t\t}, event.data);\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}, action === \"destroy\" ? (error) => new CliStructuredError(\"DEPLOY.BUILD_REQUIRED\", error.message, {\n\t\t\twhy: \"destroy evaluates the same stack program as deploy, which packages the built artifacts — so the app must be built first.\",\n\t\t\tfix: \"Run the build, then retry the destroy.\",\n\t\t\tcause: error\n\t\t}) : void 0);\n\t\tsteps.finish({ name: \"assemble\" });\n\t\tconst { graph, name: resolvedName } = pipeline;\n\t\tconst config = pipeline.configSource.value;\n\t\tsteps.start({ name: \"connect\" });\n\t\tif (action === \"deploy\") reporters.push(...await beginReporters(config.extensions, {\n\t\t\tappName: resolvedName,\n\t\t\tgraph,\n\t\t\tenvironment,\n\t\t\tcwd,\n\t\t\treportId: opts.reportId,\n\t\t\tcredentials: deps.credentials\n\t\t}));\n\t\tcontainers = /* @__PURE__ */ new Map();\n\t\tfor (const extension of config.extensions) {\n\t\t\tif (extension.container === void 0) continue;\n\t\t\ttry {\n\t\t\t\tif (action === \"deploy\") {\n\t\t\t\t\tconst instance = await extension.container.ensure({\n\t\t\t\t\t\tappName: resolvedName,\n\t\t\t\t\t\tenvironment\n\t\t\t\t\t}, deps.credentials);\n\t\t\t\t\trequireContainerForEnvironment(action, extension.id, extension.container, instance, environment);\n\t\t\t\t\tcontainers.set(extension.id, instance);\n\t\t\t\t} else {\n\t\t\t\t\tconst instance = await extension.container.locate({\n\t\t\t\t\t\tappName: resolvedName,\n\t\t\t\t\t\tenvironment\n\t\t\t\t\t}, deps.credentials);\n\t\t\t\t\tif (instance === void 0) throw new CliStructuredError(\"DEPLOY.TARGET_NOT_FOUND\", `Nothing deployed for ${resolvedName} in the environment ${environment}.`, { fix: \"Deploy it first.\" });\n\t\t\t\t\trequireContainerForEnvironment(action, extension.id, extension.container, instance, environment);\n\t\t\t\t\tcontainers.set(extension.id, instance);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tthrow toStructured(\"DEPLOY.CONTAINER_FAILED\", error);\n\t\t\t}\n\t\t}\n\t\tawait attachReporters(reporters, containers);\n\t\talchemyStage = containers.get(config.state.extension)?.alchemyStage ?? environment;\n\t\tsteps.finish({ name: \"connect\" });\n\t\tif (action === \"deploy\") {\n\t\t\tsteps.start({ name: \"preflight\" });\n\t\t\tconst counts = {};\n\t\t\tconst report = (reported) => {\n\t\t\t\tfor (const [key, value] of Object.entries(reported)) counts[key] = (counts[key] ?? 0) + value;\n\t\t\t};\n\t\t\tfor (const extension of config.extensions) {\n\t\t\t\tif (extension.preflight === void 0) continue;\n\t\t\t\ttry {\n\t\t\t\t\tconst payload = await extension.preflight({\n\t\t\t\t\t\tgraph,\n\t\t\t\t\t\tcontainer: containers.get(extension.id),\n\t\t\t\t\t\tenvironment,\n\t\t\t\t\t\tcredentials: deps.credentials,\n\t\t\t\t\t\treport\n\t\t\t\t\t});\n\t\t\t\t\tif (payload !== void 0) preflightPayloads.set(extension.id, payload);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow toStructured(\"DEPLOY.PREFLIGHT_FAILED\", error);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tpreflightTransportEnv = preflightEnv(preflightPayloads);\n\t\t\t} catch (error) {\n\t\t\t\tthrow toStructured(\"DEPLOY.PREFLIGHT_FAILED\", error);\n\t\t\t}\n\t\t\tsteps.finish({ name: \"preflight\" }, counts);\n\t\t}\n\t\tfor (const extension of config.extensions) preflightTransportEnv[preflightEnvVarName(extension.id)] ??= \"\";\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\tlet stackPath;\n\tconst resultFilePath = path.join(cwd, \".prisma-composer\", `deployment-result-${String(process.pid)}-${randomUUID()}.json`);\n\ttry {\n\t\ttry {\n\t\t\tstackPath = writeStackFile({\n\t\t\t\tentryPath: pipeline.entryModule.path,\n\t\t\t\tcwd,\n\t\t\t\tconfigFile: pipeline.configSource.file,\n\t\t\t\tname: pipeline.name,\n\t\t\t\tenvironment,\n\t\t\t\tassembled: pipeline.assembled\n\t\t\t});\n\t\t} catch (error) {\n\t\t\treturn notOk(toStructured(\"DEPLOY.STACK_WRITE_FAILED\", error));\n\t\t}\n\t\tconst invocation = alchemyInvocation({\n\t\t\tcommand: action,\n\t\t\tstackFileRelativePath: GENERATED_STACK_RELATIVE_PATH,\n\t\t\tcwd,\n\t\t\tstage: alchemyStage,\n\t\t\tcontainerEnv: containerEnv(containers),\n\t\t\tpreflightEnv: preflightTransportEnv,\n\t\t\tenv: {\n\t\t\t\t...reporterChildEnv(reporters),\n\t\t\t\t[DEPLOYMENT_RESULT_FILE_ENV]: resultFilePath\n\t\t\t}\n\t\t});\n\t\tsteps.start({ name: \"apply\" });\n\t\tlet outcome;\n\t\ttry {\n\t\t\toutcome = await (deps.alchemy ?? spawnAlchemy)(invocation);\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\t\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", error instanceof Error ? error.message : String(error), {\n\t\t\t\tcause: error,\n\t\t\t\tmeta: { diagnostics: {\n\t\t\t\t\texitCode: void 0,\n\t\t\t\t\tstackFilePath: stackPath,\n\t\t\t\t\treproduceCommand: reproduceCommand(invocation),\n\t\t\t\t\tcwd\n\t\t\t\t} }\n\t\t\t}));\n\t\t}\n\t\tconst reproduce = reproduceCommand(invocation, outcome);\n\t\tif (outcome.signal !== null) return notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", `alchemy ${action} was interrupted by ${outcome.signal}.`, { meta: {\n\t\t\tsignal: outcome.signal,\n\t\t\tdiagnostics: {\n\t\t\t\texitCode: void 0,\n\t\t\t\tsignal: outcome.signal,\n\t\t\t\tstackFilePath: stackPath,\n\t\t\t\treproduceCommand: reproduce,\n\t\t\t\tcwd\n\t\t\t}\n\t\t} }));\n\t\tconst status = outcome.exitCode ?? 1;\n\t\tif (status !== 0) {\n\t\t\tconst engineCause = readEngineFailureCause(resultFilePath);\n\t\t\tconst withCause = (sentence) => engineCause === void 0 ? sentence : `${sentence}\\n${engineCause}`;\n\t\t\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", withCause(`alchemy ${action} exited with status ${status}.`), { meta: {\n\t\t\t\texitCode: status,\n\t\t\t\t...engineCause !== void 0 ? { engineCause } : {},\n\t\t\t\tdiagnostics: {\n\t\t\t\t\texitCode: status,\n\t\t\t\t\tstackFilePath: stackPath,\n\t\t\t\t\treproduceCommand: reproduce,\n\t\t\t\t\tcwd\n\t\t\t\t}\n\t\t\t} }));\n\t\t}\n\t\tsteps.finish({ name: \"apply\" });\n\t\ttry {\n\t\t\tif (action === \"destroy\") {\n\t\t\t\tfor (const extension of pipeline.configSource.value.extensions) {\n\t\t\t\t\tif (extension.teardown === void 0) continue;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait extension.teardown({\n\t\t\t\t\t\t\tcontainer: containers.get(extension.id),\n\t\t\t\t\t\t\tenvironment\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow toStructured(\"DEPLOY.TEARDOWN_FAILED\", error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (const extension of pipeline.configSource.value.extensions) {\n\t\t\t\t\tif (extension.container === void 0) continue;\n\t\t\t\t\tconst instance = containers.get(extension.id);\n\t\t\t\t\tif (instance === void 0) continue;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait extension.container.remove(instance, deps.credentials);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow toStructured(\"DEPLOY.CONTAINER_REMOVE_FAILED\", error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\t\tthrow error;\n\t\t}\n\t\tif (action === \"deploy\") return ok(readDeploymentSummary(resultFilePath));\n\t\treturn ok(void 0);\n\t} finally {\n\t\ttry {\n\t\t\tfs.rmSync(resultFilePath, { force: true });\n\t\t\tfs.rmSync(engineFailureFilePath(resultFilePath), { force: true });\n\t\t} catch {}\n\t}\n}\n//#endregion\nexport { executeDeploy, executeDestroy };\n\n//# sourceMappingURL=execute-deploy-destroy-BIqwt1RF.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAM,6BAA6B;AAuBnC,SAAS,SAAS,OAAO;CACxB,OAAO,OAAO,UAAU,YAAY,UAAU;AAC/C;;;;;AAKA,SAAS,sBAAsB,gBAAgB;CAC9C,IAAI;CACJ,IAAI;EACH,MAAM,GAAG,aAAa,gBAAgB,MAAM;CAC7C,QAAQ;EACP;CACD;CACA,IAAI;CACJ,IAAI;EACH,SAAS,KAAK,MAAM,GAAG;CACxB,QAAQ;EACP;CACD;CACA,IAAI,CAAC,SAAS,MAAM,KAAK,OAAO,OAAO,WAAW,YAAY,CAAC,MAAM,QAAQ,OAAO,QAAQ,GAAG;CAC/F,KAAK,MAAM,QAAQ,OAAO,UAAU;EACnC,IAAI,CAAC,SAAS,IAAI,KAAK,OAAO,KAAK,eAAe,YAAY,CAAC,MAAM,QAAQ,KAAK,WAAW,GAAG;EAChG,KAAK,MAAM,UAAU,KAAK,aAAa,IAAI,CAAC,SAAS,MAAM,KAAK,OAAO,OAAO,YAAY,YAAY,OAAO,OAAO,UAAU,UAAU;CACzI;CACA,OAAO,UAAU,MAAM;AACxB;;AAEA,SAAS,sBAAsB,gBAAgB;CAC9C,OAAO,GAAG,eAAe;AAC1B;;AA0DA,SAAS,uBAAuB,gBAAgB;CAC/C,IAAI;EACH,MAAM,QAAQ,GAAG,aAAa,sBAAsB,cAAc,GAAG,MAAM;EAC3E,OAAO,MAAM,SAAS,IAAI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AG,OAAO,gBAAgB,EAAE,OAAO,KAAK,CAAC;GACzC,GAAG,OAAO,sBAAsB,cAAc,GAAG,EAAE,OAAO,KAAK,CAAC;EACjE,QAAQ,CAAC;CACV;AACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"family-Dy3ZQOxG-CcELNRXg.d.mts","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/errors.d.mts","../../../0-framework/0-foundation/foundation/dist/secret-CHOw4LBU.d.mts","../../../../node_modules/@standard-schema/spec/dist/index.d.ts","../../../0-framework/1-core/core/dist/graph-types-Bn3tSF4x.d.mts","../../../0-framework/1-core/core/dist/app-config-8nfo_ECP.d.mts","../../../0-framework/3-tooling/cli/dist/composer-config-BJrPWlDx.d.mts","../../../0-framework/3-tooling/cli/dist/deployment-summary-p88NV5m5.d.mts","../../../0-framework/3-tooling/assemble/dist/index.d.mts","../../../0-framework/0-foundation/foundation/dist/result.d.mts","../../../0-framework/3-tooling/cli/dist/dev-current-DfJfxg2y.d.mts","../../../0-framework/3-tooling/cli/dist/family-Dy3ZQOxG.d.mts"],"x_google_ignoreList":[2],"mappings":";;;;;;;UACU,wBAAwB;WACvB;WACA;WACA;WACA;aACE;aACA;;WAEF;WACA,OAAO;WACP;;;;;;;;UAwBD;WACC;WACA;WACA;WACA;WACA;WACA;WACA;aACE;aACA;;WAEF,OAAO;WACP;;;;;;;;;;;;cAoBG,2BAA2B,iBAAiB;WAC/C;WACA;WACA;WACA;WACA;aACE;aACA;;WAEF,OAAO;WACP;EACT,YAAY,6BAA6B,iBAAiB;aAC/C;aACA;aACA;aACA;eACE;eACA;;aAEF,OAAO;aACP;aACA;;;;;EAKX,cAAc;;;;;SAKP,GAAG,iBAAiB,SAAS;;;;;cCjGxB;cACA,UAAU;;YAEZ;EACV,YAAY,OAAO;;EAEnB,UAAU;EACV;EACA;EACA;GACC,OAAO;;;KAGL,eAAe;;;;UCbV,gBAAgB,iBAAiB,SAAS;;WAEvC,aAAa,gBAAgB,MAAM,OA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WAEC,aAAa;;WAEb,WAAW;;WAEX,qBAAqB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate-dev-stack-BkkU2HLE-Dek3CkAQ.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/generate-dev-stack-BkkU2HLE.mjs"],"sourcesContent":["import { i as noComposerExportMessage } from \"./composer-config-ehUUVHtU.mjs\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { devEnvironmentDir } from \"@internal/core/config\";\n//#region src/dev/generate-dev-stack.ts\n/**\n* Local-dev spec § 6 `generate-dev-stack.ts`: like generate-stack.ts but in\n* the environment's folder, `.prisma-composer/dev/<environment>/alchemy.run.ts`,\n* at the Alchemy stage named by the environment, using\n* Composer's `devState()` (Alchemy's file store) and no `report` — dev prints its own front\n* door (run-dev.ts), so core's presentation-free lower() gets nothing to\n* call back into. The generated module IS the one orchestration point where\n* dev provenance is resolved (spec § 3 REVISED): it deserializes the\n* containers, top-level-awaits `resolveLocalTargets(config)` (the lazy\n* `localTarget` thunks, ADR-0041), and passes\n* `providers: localTargetProviders(...)` + `state: devState()` explicitly\n* — `lower()` learns nothing about dev.\n*/\nconst DEV_GENERATED_FILE = \"alchemy.run.ts\";\n/** The stack file's path relative to the cwd. */\nfunction devStackRelativePath(environment) {\n\treturn path.join(devEnvironmentDir(environment), DEV_GENERATED_FILE);\n}\n/** A relative import specifier from the stack file to `target` (posix separators). */\nfunction relativeImportSpecifier(generatedDir, target) {\n\tconst rel = path.relative(generatedDir, target).split(path.sep).join(\"/\");\n\treturn rel.startsWith(\".\") ? rel : `./${rel}`;\n}\nfunction quote(value) {\n\treturn JSON.stringify(value);\n}\nfunction renderBundle(bundle) {\n\treturn `{ dir: ${quote(bundle.dir)}, entry: ${quote(bundle.entry)} }`;\n}\nfunction renderOptions(input) {\n\tconst lines = [];\n\tlines.push(` name: ${quote(input.name)},`);\n\tlines.push(` environment: ${quote(input.environment)},`);\n\tlines.push(\" bundles: {\");\n\tfor (const [id, bundle] of Object.entries(input.assembled.bundles)) lines.push(` ${quote(id)}: ${renderBundle(bundle)},`);\n\tlines.push(\" },\");\n\tconst unassembled = Object.keys(input.assembled.devServers);\n\tif (unassembled.length > 0) lines.push(` unassembled: [${unassembled.map(quote).join(\", \")}],`);\n\tlines.push(\" providers: localTargetProviders(resolved, containers, devDir),\");\n\tlines.push(\" state: devState(),\");\n\treturn lines.join(\"\\n\");\n}\n/** Renders the dev stack module's source (tests assert on it without touching disk). */\nfunction renderDevStackFile(input) {\n\tconst generatedDir = path.join(input.cwd, devEnvironmentDir(input.environment));\n\tconst appImport = relativeImportSpecifier(generatedDir, input.entryPath);\n\tconst imports = [\n\t\t\"import * as path from 'node:path';\",\n\t\t\"import { deserializeContainers } from '@prisma/composer/config';\",\n\t\t\"import { lower } from '@prisma/composer/deploy';\",\n\t\t\"import { devEnvironmentDir, devState, localTargetProviders, resolveLocalTargets } from '@prisma/composer/local-target';\",\n\t\t`import prismaConfig from ${quote(relativeImportSpecifier(generatedDir, input.configFile))};`,\n\t\t`import app from ${quote(appImport)};`\n\t].join(\"\\n\");\n\treturn `// Generated by \\`prisma dev\\` — overwritten on every run; do not\n// edit by hand. Independently runnable from ${quote(input.cwd)} by the\n// command Composer starts, which a failed run prints:\n//\n// <node> <bin of the alchemy @prisma/composer depends on> deploy ${devStackRelativePath(input.environment)} --yes --stage ${input.environment}\n//\n// bisects a CLI bug from an Alchemy bug (deploy-cli.md § Implementation decisions).\n${imports}\n\nconst config = prismaConfig.composer;\nif (config === undefined) {\n throw new Error(${quote(noComposerExportMessage(input.configFile))});\n}\n\nconst containers = deserializeContainers(config.extensions, process.env);\nconst resolved = await resolveLocalTargets(config);\nconst devDir = path.join(process.cwd(), devEnvironmentDir(${quote(input.environment)}));\n\nexport default lower(app, config, {\n${renderOptions(input)}\n});\n`;\n}\n/** Writes the dev stack file, returning its absolute path. */\nfunction writeDevStackFile(input) {\n\tconst generatedDir = path.join(input.cwd, devEnvironmentDir(input.environment));\n\tfs.mkdirSync(generatedDir, { recursive: true });\n\tconst filePath = path.join(generatedDir, DEV_GENERATED_FILE);\n\tfs.writeFileSync(filePath, renderDevStackFile(input));\n\treturn filePath;\n}\n//#endregion\nexport { renderDevStackFile as n, writeDevStackFile as r, devStackRelativePath as t };\n\n//# sourceMappingURL=generate-dev-stack-BkkU2HLE.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,qBAAqB;;AAE3B,SAAS,qBAAqB,aAAa;CAC1C,OAAO,KAAK,KAAK,kBAAkB,WAAW,GAAG,kBAAkB;AACpE;;AAEA,SAAS,wBAAwB,cAAc,QAAQ;CACtD,MAAM,MAAM,KAAK,SAAS,cAAc,MAAM,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG;CACxE,OAAO,IAAI,WAAW,GAAG,IAAI,MAAM,KAAK;AACzC;AACA,SAAS,MAAM,OAAO;CACrB,OAAO,KAAK,UAAU,KAAK;AAC5B;AACA,SAAS,aAAa,QAAQ;CAC7B,OAAO,UAAU,MAAM,OAAO,GAAG,EAAE,WAAW,MAAM,OAAO,KAAK,EAAE;AACnE;AACA,SAAS,cAAc,OAAO;CAC7B,MAAM,QAAQ,CAAC;CACf,MAAM,KAAK,WAAW,MAAM,MAAM,IAAI,EAAE,EAAE;CAC1C,MAAM,KAAK,kBAAkB,MAAM,MAAM,WAAW,EAAE,EAAE;CACxD,MAAM,KAAK,cAAc;CACzB,KAAK,MAAM,CAAC,IAAI,WAAW,OAAO,QAAQ,MAAM,UAAU,OAAO,GAAG,MAAM,KAAK,OAAO,MAAM,EAAE,EAAE,IAAI,aAAa,MAAM,EAAE,EAAE;CAC3H,MAAM,KAAK,MAAM;CACjB,MAAM,cAAc,OAAO,KAAK,MAAM,UAAU,UAAU;CAC1D,IAAI,YAAY,SAAS,GAAG,MAAM,KAAK,mBAAmB,YAAY,IAAI,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE,GAAG;CAC/F,MAAM,KAAK,kE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