@prisma/composer-cli 0.39.0-dev.6 → 0.39.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{dev-current-BT66YKUB-B5OGD2um.mjs → dev-current-gQnmjB4V-DrQ4Zzbl.mjs} +5 -5
- package/dist/{dev-current-BT66YKUB-B5OGD2um.mjs.map → dev-current-gQnmjB4V-DrQ4Zzbl.mjs.map} +1 -1
- package/dist/{dist-BDdABTj4.mjs → dist-CRSv_9L8.mjs} +2 -2
- package/dist/{dist-BDdABTj4.mjs.map → dist-CRSv_9L8.mjs.map} +1 -1
- package/dist/{execute-deploy-destroy-C67FX_2B-DcSZTLaS.mjs → execute-deploy-destroy-DKbsBkqK-D8pniqZg.mjs} +5 -5
- package/dist/{execute-deploy-destroy-C67FX_2B-DcSZTLaS.mjs.map → execute-deploy-destroy-DKbsBkqK-D8pniqZg.mjs.map} +1 -1
- package/dist/{execute-dev-CVjdm1y1-CgW8ONc3.mjs → execute-dev-DVCWURmI-D91UZq1o.mjs} +4 -4
- package/dist/{execute-dev-CVjdm1y1-CgW8ONc3.mjs.map → execute-dev-DVCWURmI-D91UZq1o.mjs.map} +1 -1
- package/dist/{execute-dev-current-D5ANAZnU-D6ogQwLQ.mjs → execute-dev-current-Dt_9srY2-D8mAcSv4.mjs} +4 -4
- package/dist/{execute-dev-current-D5ANAZnU-D6ogQwLQ.mjs.map → execute-dev-current-Dt_9srY2-D8mAcSv4.mjs.map} +1 -1
- package/dist/{family-D52hWFMF-Cj-y7XrD.d.mts → family-D52hWFMF-FfSJ5SN2.d.mts} +4 -4
- package/dist/{family-D52hWFMF-Cj-y7XrD.d.mts.map → family-D52hWFMF-FfSJ5SN2.d.mts.map} +1 -1
- package/dist/family.d.mts +1 -1
- package/dist/family.mjs +3 -3
- package/dist/family.mjs.map +1 -1
- package/dist/{list-deployed-C7Vy_r81.mjs → list-deployed-CIaiiV_l.mjs} +3 -3
- package/dist/{list-deployed-C7Vy_r81.mjs.map → list-deployed-CIaiiV_l.mjs.map} +1 -1
- package/dist/testing.d.mts +1 -1
- package/dist/{validate-environment-XwVDifWN-BtzIWXJF.mjs → validate-environment-XwVDifWN-BdYUHyVF.mjs} +2 -2
- package/dist/validate-environment-XwVDifWN-BdYUHyVF.mjs.map +1 -0
- package/package.json +7 -7
- package/dist/validate-environment-XwVDifWN-BtzIWXJF.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate-environment-XwVDifWN-BtzIWXJF.mjs","names":["fs","path","fs"],"sources":["../../../0-framework/0-foundation/foundation/dist/describe-kind-Cpm_euxo.mjs","../../../../node_modules/dotenv-flow/node_modules/dotenv/package.json","../../../../node_modules/dotenv-flow/node_modules/dotenv/lib/main.js","../../../../node_modules/dotenv-flow/package.json","../../../../node_modules/dotenv-flow/lib/dotenv-flow.js","../../../0-framework/3-tooling/cli/dist/config-adapters-DG-uhGfv.mjs","../../../0-framework/3-tooling/assemble/dist/index.mjs","../../../0-framework/0-foundation/foundation/dist/pointer-BLedpQgL.mjs","../../../0-framework/0-foundation/foundation/dist/secret-DoWGmN7m.mjs","../../../0-framework/1-core/core/dist/graph-C6Fqe2gn.mjs","../../../0-framework/1-core/core/dist/index.mjs","../../../0-framework/1-core/core/dist/deploy.mjs","../../../0-framework/3-tooling/cli/dist/validate-environment-XwVDifWN.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","","const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n options = options || {}\n\n const vaultPath = _vaultPath(options)\n options.path = vaultPath // parse .env.vault\n const result = DotenvModule.configDotenv(options)\n if (!result.parsed) {\n const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n err.code = 'MISSING_DATA'\n throw err\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _warn (message) {\n console.log(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _log (message) {\n console.log(`[dotenv@${version}] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n throw err\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let possibleVaultPath = null\n\n if (options && options.path && options.path.length > 0) {\n if (Array.isArray(options.path)) {\n for (const filepath of options.path) {\n if (fs.existsSync(filepath)) {\n possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n }\n }\n } else {\n possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n }\n } else {\n possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n }\n\n if (fs.existsSync(possibleVaultPath)) {\n return possibleVaultPath\n }\n\n return null\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n const debug = Boolean(options && options.debug)\n const quiet = options && 'quiet' in options ? options.quiet : true\n\n if (debug || !quiet) {\n _log('Loading env from encrypted .env.vault')\n }\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n const dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n const debug = Boolean(options && options.debug)\n const quiet = options && 'quiet' in options ? options.quiet : true\n\n if (options && options.encoding) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n\n let optionPaths = [dotenvPath] // default, look for .env\n if (options && options.path) {\n if (!Array.isArray(options.path)) {\n optionPaths = [_resolveHome(options.path)]\n } else {\n optionPaths = [] // reset default\n for (const filepath of options.path) {\n optionPaths.push(_resolveHome(filepath))\n }\n }\n }\n\n // Build the parsed data in a temporary object (because we need to return it). Once we have the final\n // parsed data, we will combine it with process.env (or options.processEnv if provided).\n let lastError\n const parsedAll = {}\n for (const path of optionPaths) {\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n DotenvModule.populate(parsedAll, parsed, options)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${path} ${e.message}`)\n }\n lastError = e\n }\n }\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsedAll, options)\n\n if (debug || !quiet) {\n const keysCount = Object.keys(parsedAll).length\n const shortPaths = []\n for (const filePath of optionPaths) {\n try {\n const relative = path.relative(process.cwd(), filePath)\n shortPaths.push(relative)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${filePath} ${e.message}`)\n }\n lastError = e\n }\n }\n\n _log(`injecting env (${keysCount}) from ${shortPaths.join(',')}`)\n }\n\n if (lastError) {\n return { parsed: parsedAll, error: lastError }\n } else {\n return { parsed: parsedAll }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n const vaultPath = _vaultPath(options)\n\n // dotenvKey exists but .env.vault file does not exist\n if (!vaultPath) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n } else if (decryptionFailed) {\n const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n err.code = 'DECRYPTION_FAILED'\n throw err\n } else {\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n\n if (typeof parsed !== 'object') {\n const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n err.code = 'OBJECT_REQUIRED'\n throw err\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n }\n }\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n","","'use strict';\n\nconst fs = require('fs');\nconst p = require('path');\nconst dotenv = require('dotenv');\nconst {version} = require('../package.json');\n\nconst DEFAULT_PATTERN = '.env[.node_env][.local]';\n\nconst LOCAL_PLACEHOLDER_REGEX = /\\[(\\W*\\blocal\\b\\W*)]/g;\nconst NODE_ENV_PLACEHOLDER_REGEX = /\\[(\\W*\\b)node_env(\\b\\W*)]/g;\n\n/**\n * Compose a filename from a given `patten`.\n *\n * @param {string} pattern\n * @param {object} [options]\n * @param {boolean} [options.local]\n * @param {string} [options.node_env]\n * @return {string} filename\n */\nfunction composeFilename(pattern, options) {\n let filename = pattern;\n\n filename = filename.replace(\n LOCAL_PLACEHOLDER_REGEX,\n (options && options.local) ? '$1' : ''\n );\n\n filename = filename.replace(\n NODE_ENV_PLACEHOLDER_REGEX,\n (options && options.node_env) ? `$1${options.node_env}$2` : ''\n );\n\n return filename;\n}\n\n/**\n * Returns a list of existing `.env*` filenames depending on the given `options`.\n *\n * The resulting list is ordered by the env files'\n * variables overwriting priority from lowest to highest.\n *\n * This can also be referenced as \"env files' environment cascade\"\n * or \"order of ascending priority.\"\n *\n * ⚠️ Note that the `.env.local` file is not listed for \"test\" environment,\n * since normally you expect tests to produce the same results for everyone.\n *\n * @param {object} [options] - `.env*` files listing options\n * @param {string} [options.node_env] - node environment (development/test/production/etc.)\n * @param {string} [options.path] - path to the working directory (default: `process.cwd()`)\n * @param {string} [options.pattern] - `.env*` files' naming convention pattern\n * (default: \".env[.node_env][.local]\")\n * @param {boolean} [options.debug] - turn on debug messages\n * @return {string[]}\n */\nfunction listFiles(options = {}) {\n options.debug && debug('listing effective `.env*` files…');\n\n const {\n node_env,\n path = process.cwd(),\n pattern = DEFAULT_PATTERN,\n } = options;\n\n const hasLocalPlaceholder = LOCAL_PLACEHOLDER_REGEX.test(pattern);\n\n const filenames = {};\n\n if (pattern === DEFAULT_PATTERN) {\n filenames['.env.defaults'] = '.env.defaults'; // for seamless transition from \".env + .env.defaults\"\n }\n\n filenames['.env'] = composeFilename(pattern);\n\n if (hasLocalPlaceholder) {\n const envlocal = composeFilename(pattern, { local: true });\n\n if (node_env !== 'test') {\n filenames['.env.local'] = envlocal;\n }\n else if (options.debug && fs.existsSync(p.resolve(path, envlocal))) {\n debug(\n '[!] note that `%s` is being skipped for \"test\" environment',\n envlocal\n );\n }\n }\n\n if (node_env && NODE_ENV_PLACEHOLDER_REGEX.test(pattern)) {\n filenames['.env.node_env'] = composeFilename(pattern, { node_env });\n\n if (hasLocalPlaceholder) {\n filenames['.env.node_env.local'] = composeFilename(pattern, { node_env, local: true });\n }\n }\n\n return [\n '.env.defaults',\n '.env',\n '.env.local',\n '.env.node_env',\n '.env.node_env.local'\n ]\n .reduce((list, basename) => {\n if (!filenames[basename]) {\n return list;\n }\n\n const filename = p.resolve(path, filenames[basename]);\n if (fs.existsSync(filename)) {\n options.debug && debug('>> %s', filename);\n list.push(filename);\n }\n\n return list;\n }, []);\n}\n\n/**\n * Parses a given file or a list of files.\n *\n * When a list of filenames is given, the files will be parsed and merged in the same order as given.\n *\n * @param {string|string[]} filenames - filename or a list of filenames to parse and merge\n * @param {{ encoding?: string, debug?: boolean }} [options] - parse options\n * @return {Object<string, string>} the resulting map of `{ env_var: value }` as an object\n */\nfunction parse(filenames, options = {}) {\n if (typeof filenames === 'string') {\n options.debug && debug('parsing \"%s\"…', filenames);\n\n const parsed = dotenv.parse(\n fs.readFileSync(\n filenames,\n options.encoding && { encoding: options.encoding }\n )\n );\n\n if (options.debug) {\n Object.keys(parsed)\n .forEach(varname => debug('>> %s', varname));\n }\n\n return parsed;\n }\n\n return filenames.reduce((result, filename) => {\n const parsed = parse(filename, options);\n\n if (options.debug) {\n Object.keys(parsed)\n .filter(varname => result.hasOwnProperty(varname))\n .forEach(varname => debug('`%s` is being overwritten by merge from \"%s\"', varname, filename));\n }\n\n return Object.assign(result, parsed);\n }, {});\n}\n\n/**\n * Parses variables defined in given file(s) and assigns them to `process.env`.\n *\n * Variables that are already defined in `process.env` will not be overwritten,\n * thus giving a higher priority to environment variables predefined by the shell.\n *\n * If the loading is successful, an object with `parsed` property is returned.\n * The `parsed` property contains parsed variables' `key => value` pairs merged in order using\n * the \"overwrite merge\" strategy.\n *\n * If parsing fails for any of the given files, `process.env` is being left untouched,\n * and an object with `error` property is returned.\n * The `error` property, if present, references to the occurred error.\n *\n * @param {string|string[]} filenames - filename or a list of filenames to parse and merge\n * @param {object} [options] - file loading options\n * @param {string} [options.encoding=\"utf8\"] - encoding of `.env*` files\n * @param {boolean} [options.debug=false] - turn on debug messages\n * @param {boolean} [options.silent=false] - suppress console errors and warnings\n * @return {{ error: Error } | { parsed: Object<string, string> }}\n */\nfunction load(filenames, options = {}) {\n try {\n const parsed = parse(filenames, {\n encoding: options.encoding,\n debug: options.debug\n });\n\n options.debug && debug('safe-merging parsed environment variables into `process.env`…');\n\n for (const varname of Object.keys(parsed)) {\n if (!process.env.hasOwnProperty(varname)) {\n options.debug && debug('>> process.env.%s', varname);\n process.env[varname] = parsed[varname];\n }\n else if (options.debug && process.env[varname] !== parsed[varname]) {\n debug('environment variable `%s` is predefined and not being overwritten', varname);\n }\n }\n\n return { parsed };\n }\n catch (error) {\n return failure(error, options);\n }\n}\n\n/**\n * Unload variables defined in a given file(s) from `process.env`.\n *\n * This function can gracefully resolve the following issue:\n *\n * In some cases, the original \"dotenv\" library can be used by one of the dependent npm modules.\n * It causes calling the original `dotenv.config()` that loads the `.env` file from your project before you can call `dotenv-flow.config()`.\n * Such cases break `.env*` files priority because the previously loaded environment variables are treated as shell-defined thus having a higher priority.\n *\n * Unloading the previously loaded `.env` file can be activated when using the `dotenv-flow.config()` with the `purge_dotenv` option set to `true`.\n *\n * @param {string|string[]} filenames - filename or a list of filenames to unload\n * @param {object} [options] - `fs.readFileSync` options\n */\nfunction unload(filenames, options = {}) {\n const parsed = parse(filenames, options);\n\n Object.keys(parsed).forEach((key) => {\n if (process.env[key] === parsed[key]) {\n delete process.env[key];\n }\n });\n}\n\n/**\n * Returns effective (computed) `node_env`.\n *\n * @param {object} [options]\n * @param {string} [options.node_env]\n * @param {string} [options.default_node_env]\n * @param {boolean} [options.debug]\n * @return {string|undefined} node_env\n */\nfunction getEffectiveNodeEnv(options = {}) {\n if (options.node_env) {\n options.debug && debug(\n `operating in \"${options.node_env}\" environment (set by \\`options.node_env\\`)`\n );\n return options.node_env;\n }\n\n if (process.env.NODE_ENV) {\n options.debug && debug(\n `operating in \"${process.env.NODE_ENV}\" environment (as per \\`process.env.NODE_ENV\\`)`\n );\n return process.env.NODE_ENV;\n }\n\n if (options.default_node_env) {\n options.debug && debug(\n `operating in \"${options.default_node_env}\" environment (taken from \\`options.default_node_env\\`)`\n );\n return options.default_node_env;\n }\n\n options.debug && debug(\n 'operating in \"no environment\" mode (no environment-related options are set)'\n );\n return undefined;\n}\n\nconst CONFIG_OPTION_KEYS = [\n 'node_env',\n 'default_node_env',\n 'path',\n 'pattern',\n 'files',\n 'encoding',\n 'purge_dotenv',\n 'silent'\n];\n\n/**\n * \"dotenv-flow\" initialization function (API entry point).\n *\n * Allows configuring dotenv-flow programmatically.\n *\n * @param {object} [options] - configuration options\n * @param {string} [options.node_env=process.env.NODE_ENV] - node environment (development/test/production/etc.)\n * @param {string} [options.default_node_env] - the default node environment\n * @param {string} [options.path=process.cwd()] - path to `.env*` files directory\n * @param {string} [options.pattern=\".env[.node_env][.local]\"] - `.env*` files' naming convention pattern\n * @param {string[]} [options.files] - an explicit list of `.env*` files to load (note that `options.[default_]node_env` and `options.pattern` are ignored in this case)\n * @param {string} [options.encoding=\"utf8\"] - encoding of `.env*` files\n * @param {boolean} [options.purge_dotenv=false] - perform the `.env` file {@link unload}\n * @param {boolean} [options.debug=false] - turn on detailed logging to help debug why certain variables are not being set as you expect\n * @param {boolean} [options.silent=false] - suppress all kinds of warnings including \".env*\" files' loading errors\n * @return {{ parsed?: object, error?: Error }} with a `parsed` key containing the loaded content or an `error` key with an error that is occurred\n */\nfunction config(options = {}) {\n if (options.debug) {\n debug('initializing…');\n\n CONFIG_OPTION_KEYS\n .filter(key => key in options)\n .forEach(key => debug(`| options.${key} =`, options[key]));\n }\n\n const {\n path = process.cwd(),\n pattern = DEFAULT_PATTERN\n } = options;\n\n if (options.purge_dotenv) {\n options.debug && debug(\n '`options.purge_dotenv` is enabled, unloading potentially pre-loaded `.env`…'\n );\n\n const dotenvFile = p.resolve(path, '.env');\n try {\n fs.existsSync(dotenvFile) && unload(dotenvFile, { encoding: options.encoding });\n }\n catch (error) {\n !options.silent && warn('unloading failed: ', error);\n }\n }\n\n try {\n let filenames;\n\n if (options.files) {\n options.debug && debug(\n 'using explicit list of `.env*` files: %s…',\n options.files.join(', ')\n );\n\n filenames = options.files\n .reduce((list, basename) => {\n const filename = p.resolve(path, basename);\n\n if (fs.existsSync(filename)) {\n list.push(filename);\n }\n else if (options.debug) {\n debug('>> %s does not exist, skipping…', filename);\n }\n\n return list;\n }, []);\n }\n else {\n const node_env = getEffectiveNodeEnv(options);\n\n filenames = listFiles({ node_env, path, pattern, debug: options.debug });\n\n if (filenames.length === 0) {\n const _pattern = node_env\n ? pattern.replace(NODE_ENV_PLACEHOLDER_REGEX, `[$1${node_env}$2]`)\n : pattern;\n\n return failure(\n new Error(`no \".env*\" files matching pattern \"${_pattern}\" in \"${path}\" dir`),\n options\n );\n }\n }\n\n const result = load(filenames, {\n encoding: options.encoding,\n debug: options.debug,\n silent: options.silent\n });\n\n options.debug && debug('initialization completed.');\n\n return result;\n }\n catch (error) {\n return failure(error, options);\n }\n}\n\nfunction failure(error, options) {\n if (!options.silent) {\n warn(`\".env*\" files loading failed: ${error.message || error}`);\n }\n\n return { error };\n}\n\nfunction warn(message, error) {\n if (error) {\n message += ': %s';\n }\n\n console.warn(`[dotenv-flow@${version}]: ${message}`, error);\n}\n\nfunction debug(message, ...values) {\n console.debug(`[dotenv-flow@${version}]: ${message}`, ...values);\n}\n\nmodule.exports = {\n DEFAULT_PATTERN,\n listFiles,\n parse,\n load,\n unload,\n config\n};\n","import * as path from \"node:path\";\nimport { listFiles, parse } from \"dotenv-flow\";\n//#region src/config-adapters.ts\n/** Reads the process environment when called: every variable whose value is a string. The default for both `config` and `secrets`. */\nfunction environmentVariables() {\n\treturn () => {\n\t\tconst values = {};\n\t\tfor (const [name, value] of Object.entries(process.env)) if (typeof value === \"string\") values[name] = value;\n\t\treturn values;\n\t};\n}\n/** `dotenv-flow`'s own default pattern. Given it, `listFiles` also lists `.env.defaults`, first. */\nconst DOTENV_FLOW_PATTERN = \".env[.node_env][.local]\";\nconst ENV_DEFAULTS_FILE = \".env.defaults\";\nfunction envFiles(configDirectory, environment) {\n\tconst files = listFiles({\n\t\tnode_env: encodeURIComponent(environment),\n\t\tpath: configDirectory,\n\t\tpattern: DOTENV_FLOW_PATTERN\n\t});\n\treturn files[0] === path.resolve(configDirectory, ENV_DEFAULTS_FILE) ? files.slice(1) : files;\n}\nfunction readEnvFile(file) {\n\ttry {\n\t\treturn parse(file);\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tthrow new Error(`dotenv() could not read ${file}: ${message}`, { cause: error });\n\t}\n}\n/**\n* Reads `.env`, `.env.local`, `.env.<environment>` and `.env.<environment>.local` from the\n* directory of prisma.config.ts, in `dotenv-flow`'s order, a later file winning. It skips\n* `.env.local` for the environment `test`, as `dotenv-flow` does, and never reads\n* `.env.defaults`. It does not read or change the process environment.\n*/\nfunction dotenv() {\n\treturn ({ environment, configDirectory }) => {\n\t\tconst values = {};\n\t\tfor (const file of envFiles(configDirectory, environment)) Object.assign(values, readEnvFile(file));\n\t\treturn values;\n\t};\n}\n//#endregion\nexport { environmentVariables as n, dotenv as t };\n\n//# sourceMappingURL=config-adapters-DG-uhGfv.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 variable on the platform that 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-BLedpQgL.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/** What an extension's `checkGraph` throws to refuse a graph it cannot deploy. Any other throw from the hook is a bug (ADR-0044). The CLI adds the refusing extension's id as `meta.extension`. */\nvar GraphCheckError = class extends CliStructuredError {\n\tconstructor(message, options) {\n\t\tsuper(\"COMPOSE.GRAPH_INVALID\", message, options?.extension === void 0 ? void 0 : { meta: { extension: options.extension } });\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\"));\nconst VALUE_RESOURCE = blindCast(Symbol.for(\"prisma:value-resource\"));\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\tif (origin.path.length === 0) return new LoadError(`input of module \"${origin.module}\" is a dictionary of values, not data, and ${what}. A module body can only pass the fields of its input on, by name: into a provision() binding or, for a plain field, as a resolve() dependency.`);\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. At run time the\n* whole input still answers the value brand, at path `[]`, so Load can find\n* and refuse it wherever it is passed on.\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 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);\n\tconst secretsKey = options?.secretsKey;\n\tif (secretsKey !== void 0 && (typeof secretsKey !== \"string\" || secretsKey.length === 0)) throw new Error(\"secretSource() secretsKey must be a non-empty string.\");\n\treturn blindCast(buildSource(SECRET_SOURCE, payload, {\n\t\tkind: \"source\",\n\t\tsourceKind: \"secret\",\n\t\tlabel,\n\t\tsecretsKey,\n\t\tresource: void 0\n\t}, \"secret\"));\n}\n/** True if `value` is a secret source. */\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 calls. Core forwards it and never inspects the payload. */\nfunction paramSource(payload, options) {\n\tconst label = sourceLabel(\"paramSource\", options?.label);\n\tconst redacted = options?.redacted === true;\n\treturn blindCast(buildSource(PARAM_SOURCE, payload, {\n\t\tkind: \"source\",\n\t\tsourceKind: \"param\",\n\t\tlabel,\n\t\tresource: void 0\n\t}, redacted ? \"secret\" : \"plain\"));\n}\nfunction sourceLabel(factory, label) {\n\tif (label === void 0) return \"a source\";\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, hidden = {}) {\n\tconst source = {\n\t\t[VALUE]: true,\n\t\t[VALUE_ORIGIN]: origin,\n\t\t[brand]: true,\n\t\t[POINTER]: kind,\n\t\tpayload\n\t};\n\tObject.defineProperty(origin, \"source\", { value: source });\n\tObject.defineProperties(source, {\n\t\t...coercions(origin),\n\t\t...hidden\n\t});\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(`${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.`);\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. */\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 blindCast(Object.freeze(frozen));\n}\n/** A frozen shallow copy that keeps the caller's declared type. */\nfunction frozenShallowCopy(obj) {\n\treturn blindCast(Object.freeze({ ...obj }));\n}\n/**\n* 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}\nfunction isSourceValue(value) {\n\treturn (isSecretSource(value) || isParamSource(value)) && sourceOriginOf(value) !== void 0;\n}\nvar FrozenValueResourceNode = class extends ResourceNodeBase {\n\t[VALUE_RESOURCE];\n\tconstructor(def) {\n\t\tsuper(def);\n\t\tthis[VALUE_RESOURCE] = def.value;\n\t\tfreezeNode(this);\n\t}\n};\n/** Builds a frozen resource node that is a value: `value`, a source built with `secretSource()` or `paramSource()`. It provides no contract and has no dependencies. */\nfunction valueResource(def) {\n\tif (!isSourceValue(def.value)) throw new Error(\"valueResource() value must be a source, built with secretSource() or paramSource().\");\n\treturn new FrozenValueResourceNode(def);\n}\nfunction valueResourceOrigin(node) {\n\tif (!isNode(node) || node.kind !== \"resource\" || !(VALUE_RESOURCE in node)) return void 0;\n\tconst value = node[VALUE_RESOURCE];\n\treturn isSecretSource(value) || isParamSource(value) ? sourceOriginOf(value) : void 0;\n}\n/** True for a resource node that is a value: one that holds a source under the value resource key. */\nfunction isValueResource(node) {\n\treturn valueResourceOrigin(node) !== void 0;\n}\nfunction provisionedValue(origin, address) {\n\tconst { source, ...kept } = origin;\n\treturn blindCast(buildSource(isSecretSource(source) ? SECRET_SOURCE : PARAM_SOURCE, source.payload, {\n\t\t...kept,\n\t\tresource: address\n\t}, isSecretPointer(source) ? \"secret\" : \"plain\", { id: { value: address } }));\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: blindCast(connection),\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\tif (typeof boundaryOrBody === \"function\") return buildModuleNode(false, name, {}, (ctx) => {\n\t\tboundaryOrBody({\n\t\t\t...ctx,\n\t\t\tinput: void 0\n\t\t});\n\t\treturn {};\n\t});\n\treturn buildModuleNode(false, name, boundaryOrBody, requireBody(\"module\", name, maybeBody));\n}\nfunction appRoot(name, optionsOrBody, maybeBody) {\n\trequireName(name, \"appRoot\");\n\tif (typeof optionsOrBody === \"function\") return buildModuleNode(true, name, {}, ({ environment, provision }) => {\n\t\toptionsOrBody({\n\t\t\tinput: void 0,\n\t\t\tenvironment,\n\t\t\tprovision\n\t\t});\n\t\treturn {};\n\t});\n\tconst body = requireBody(\"appRoot\", name, maybeBody);\n\tif (Object.hasOwn(optionsOrBody, \"deps\")) throw new Error(`appRoot(\"${name}\") declares \\`deps\\`, which an app root cannot have: nothing provisions the root, so nothing can wire a dependency into it. Provision the resource inside the root's body instead.`);\n\tif (Object.hasOwn(optionsOrBody, \"expose\")) throw new Error(`appRoot(\"${name}\") declares \\`expose\\`, which an app root cannot have: nothing provisions the root, so nothing can consume what it exposes.`);\n\treturn buildModuleNode(true, name, optionsOrBody, ({ input, environment, provision }) => {\n\t\tbody({\n\t\t\tinput,\n\t\t\tenvironment,\n\t\t\tprovision\n\t\t});\n\t\treturn {};\n\t});\n}\nfunction requireBody(factory, name, body) {\n\tif (typeof body !== \"function\") throw new Error(`${factory}(\"${name}\") requires a body function.`);\n\treturn body;\n}\n/** Constructs a branded, frozen module node for `module()` and `appRoot()`. Construction is inert: the body is wiring, and runs only when the module is Loaded. */\nfunction buildModuleNode(root, name, boundary, body) {\n\tconst factory = root ? \"appRoot\" : \"module\";\n\tif (Object.hasOwn(boundary, \"params\")) throw new Error(`${factory}(\"${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(`${factory}(\"${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(`${factory}() \\`input\\` must be a Standard Schema (an object with a \"~standard\".validate function) — see https://standardschema.dev (ADR-0061).`);\n\treturn Object.freeze({\n\t\t[NODE]: true,\n\t\tkind: \"module\",\n\t\tname,\n\t\tdeps: frozenShallowCopy(boundary.deps ?? {}),\n\t\tinputSchema: boundary.input,\n\t\texpose: frozenShallowCopy(boundary.expose ?? {}),\n\t\tbody,\n\t\tisRoot: () => root\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 && blindCast(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\tvalueReads: [],\n\t\tappConfigurationRead: { rootInput: [] }\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}\n/** How `value` would not survive `JSON.stringify` and `JSON.parse` unchanged, or `undefined` when it would. A key whose value is `undefined` is dropped, which a body cannot tell from absent. */\nfunction jsonInexactKind(value) {\n\tif (value === null || typeof value === \"string\" || typeof value === \"boolean\") return void 0;\n\tif (typeof value === \"number\") return Number.isFinite(value) ? void 0 : \"a non-finite number\";\n\tif (Array.isArray(value)) {\n\t\tfor (const member of value) {\n\t\t\tif (member === void 0) return \"an array with a missing member\";\n\t\t\tconst kind = jsonInexactKind(member);\n\t\t\tif (kind !== void 0) return kind;\n\t\t}\n\t\treturn;\n\t}\n\tif (isPlainObject(value)) {\n\t\tfor (const member of Object.values(value)) {\n\t\t\tif (member === void 0) continue;\n\t\t\tconst kind = jsonInexactKind(member);\n\t\t\tif (kind !== void 0) return kind;\n\t\t}\n\t\treturn;\n\t}\n\treturn describeNotPlain(value) ?? describeKind(value);\n}\nconst SAME_GRAPH_ADVICE = \"A module body must build the same graph every time; one that reads the process environment, a file or the clock can build a different one.\";\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}, a value known only at boot. resolve() returns plain data; bind the 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 source\";\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\tconst schemaAdvice = `The module's input schema must output a plain object for its body to read fields.`;\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` + (index === 0 ? `. ${schemaAdvice}` : \" and can only be passed on unchanged.\"));\n\t\tif (!isPlainObject(current)) {\n\t\t\tconst advice = index === 0 ? schemaAdvice : `To compute with it, it must be a plain field, not a wrapped or secret one; list it: resolve([${parent}], ([v]) => …).`;\n\t\t\tthrow new LoadError(`${missing}: ${parent} is ${describeData(current)}, not a plain object, so it has no fields. ${advice}`);\n\t\t}\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 a secret source, 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(), ancestors = /* @__PURE__ */ new Set()) {\n\tif (isSecretSource(value) || isParamSource(value)) {\n\t\tfound.set(path, sourceOriginOf(value)?.source ?? value);\n\t\treturn found;\n\t}\n\tif (!Array.isArray(value) && !isPlainObject(value)) return found;\n\tif (ancestors.has(value)) return found;\n\tancestors.add(value);\n\tconst entries = Array.isArray(value) ? value.map((member, index) => [index, member]) : Object.entries(value);\n\tfor (const [key, member] of entries) sourcesByPath(member, joinPath(path, key), found, ancestors);\n\tancestors.delete(value);\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.isLoadRoot) 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 refuseSourcesInParams(params) {\n\tfor (const { serviceAddress, slot, binding } of params) {\n\t\tconst [source] = pointersIn(binding);\n\t\tif (source === void 0) continue;\n\t\tthrow new LoadError(`Service \"${serviceAddress}\" binds its param \"${slot}\" to ${sourceOriginOf(source)?.label ?? \"a source\"}, a value known only at boot. A param takes a literal or a value the deploy has. Bind the value to a field of the service's input instead.`);\n\t}\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 ?? \"a 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 } = input;\n\tconst rootFields = /* @__PURE__ */ new Map();\n\tconst secretUses = /* @__PURE__ */ new Map();\n\tfor (const [address, value] of input.valueResources) if (isSecretSource(value)) secretUses.set(value, {\n\t\tsource: value,\n\t\taddress,\n\t\tnodeKind: \"resource\"\n\t});\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) => {\n\t\tfor (const { serviceAddress, binding } of inputBindings) 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\tresult = origin.source;\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\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 (origin.path.length === 0) {\n\t\t\t\t\tconst everyVariable = entry.isLoadRoot ? \" The root's input is every value the `config` adapters return, which by default is every variable of the process environment, secrets included.\" : \"\";\n\t\t\t\t\tthrow new LoadError(`${describeSite(site)} depends on the whole input of module \"${origin.module}\". A module body's input is a dictionary of values, not a value, so it cannot be passed on whole.${everyVariable} Pass its fields on by name, such as input.from.`);\n\t\t\t\t}\n\t\t\t\tif (entry.checked !== void 0) {\n\t\t\t\t\tconst field = entry.checked.find((candidate) => candidate.path.join(\"\\0\") === origin.path.join(\"\\0\"));\n\t\t\t\t\tif (field === void 0) throw new LoadError(`${inputFieldLabel(origin)} of root module \"${origin.module}\" is not in the app configuration file. The first process's root body did not pass it on, so the deploy's two processes built different graphs. ${SAME_GRAPH_ADVICE}`);\n\t\t\t\t\tresult = field.value;\n\t\t\t\t} else {\n\t\t\t\t\tresult = readPath(validatedInputOf(entry), origin);\n\t\t\t\t\tif (entry.isLoadRoot) rootFields.set(origin.path.join(\"\\0\"), result === void 0 ? { path: origin.path } : {\n\t\t\t\t\t\tpath: origin.path,\n\t\t\t\t\t\tvalue: result\n\t\t\t\t\t});\n\t\t\t\t}\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 (entry.checked !== void 0) return void 0;\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\tconst rootModuleAddress = () => input.moduleInputs.find((entry) => entry.isLoadRoot)?.moduleAddress ?? \"\";\n\tconst appConfigurationReadOf = (secretSources) => {\n\t\tfor (const use of secretSources) {\n\t\t\tconst origin = sourceOriginOf(use.source);\n\t\t\tif (origin?.sourceKind !== \"secret\") continue;\n\t\t\tconst key = origin.secretsKey;\n\t\t\tconst field = [...rootFields.values()].find((candidate) => candidate.path[0] === key);\n\t\t\tif (key !== void 0 && field !== void 0) throw new LoadError(`${inputFieldLabel({\n\t\t\t\tkind: \"input\",\n\t\t\t\tmodule: rootModuleAddress(),\n\t\t\t\tpath: field.path\n\t\t\t})} of root module \"${rootModuleAddress()}\" reads \"${key}\" from the app configuration, and ${origin.label} names \"${key}\" as a secret. A name is a plain value or a secret, not both: a root input field is a plain value, which \\`prisma deploy\\` sends to the platform as plain configuration, and \\`prisma dev\\` and \\`destroy\\` hand to their second process in a file. Read the secret with ${origin.label} only, or give the plain value a different name.`);\n\t\t}\n\t\tfor (const field of rootFields.values()) {\n\t\t\tconst kind = \"value\" in field ? jsonInexactKind(field.value) : void 0;\n\t\t\tif (kind !== void 0) throw new LoadError(`${inputFieldLabel({\n\t\t\t\tkind: \"input\",\n\t\t\t\tmodule: rootModuleAddress(),\n\t\t\t\tpath: field.path\n\t\t\t})} of root module \"${rootModuleAddress()}\" holds ${kind}, which JSON cannot hold exactly. \\`prisma dev\\` and \\`destroy\\` hand the root's input to their second process in a JSON file, so a field the root's body passes on must hold text, a finite number, a boolean, null, or arrays and plain objects of these.`);\n\t\t}\n\t\treturn { rootInput: [...rootFields.values()] };\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\trefuseSourcesInParams(input.params);\n\t\tconst secretSources = secretSourcesReceivedBy(input.inputBindings);\n\t\treturn {\n\t\t\tinputBindings: input.inputBindings,\n\t\t\tparams: input.params,\n\t\t\tresourceProps: authoredProps,\n\t\t\tsecretSources,\n\t\t\tappConfigurationRead: appConfigurationReadOf(secretSources)\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\trefuseSourcesInParams(params);\n\tconst secretSources = secretSourcesReceivedBy(inputBindings);\n\treturn {\n\t\tresourceProps,\n\t\tinputBindings,\n\t\tparams,\n\t\tsecretSources,\n\t\tappConfigurationRead: appConfigurationReadOf(secretSources)\n\t};\n}\nfunction valueReadsOf(inputBindings) {\n\tconst reads = [];\n\tfor (const { serviceAddress, binding } of inputBindings) for (const [path, source] of sourcesByPath(binding)) {\n\t\tconst resource = sourceOriginOf(source)?.resource;\n\t\tif (resource !== void 0) reads.push({\n\t\t\treader: serviceAddress,\n\t\t\tresource,\n\t\t\tpath\n\t\t});\n\t}\n\treturn reads;\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\");\nfunction describeNode(node) {\n\treturn valueResourceOrigin(node)?.label ?? `${node.kind} \"${node.name}\"`;\n}\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, valueResources, ports, authoredEdges, loading) {\n\tports.push(...boundaryPortsOf(selfId, moduleNode));\n\tconst localNodes = /* @__PURE__ */ new Map();\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\tconst fullAddress = `${selfId}.${id}`;\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\tif (untrusted.kind === \"module\" && typeof untrusted.isRoot === \"function\" && untrusted.isRoot()) throw new LoadError(`Module \"${selfId}\" provisions the app root \"${untrusted.name}\". An app root is the deploy's entry and cannot be provisioned. Build the module with module() instead.`);\n\t\tconst holder = localNodes.get(id);\n\t\tif (holder !== void 0) throw new LoadError(`Duplicate provision id \"${id}\" in module \"${selfId}\": \"${fullAddress}\" already holds ${describeNode(holder)}, and ${describeNode(child)} takes the same id. Give one of them a different id with provision(node, { id: '…' }).`);\n\t\tlocalNodes.set(id, child);\n\t\tif (child.kind === \"resource\") {\n\t\t\tconst valueOrigin = valueResourceOrigin(child);\n\t\t\tif (valueOrigin !== void 0) {\n\t\t\t\tif (typeof moduleNode.isRoot !== \"function\" || !moduleNode.isRoot()) throw new LoadError(`Module \"${selfId}\" provisions \"${id}\", a resource that is a value. Only the app root, built with appRoot(), can provision one. Provision it in the root and pass its value down through this module's input.`);\n\t\t\t\tconst also = child.provides !== void 0 ? \"provides a contract\" : Object.keys(slotsOf(child)).length > 0 ? \"declares dependency slots\" : void 0;\n\t\t\t\tif (also !== void 0) throw new LoadError(`Resource \"${fullAddress}\" is a value and also ${also}. A resource that is a value provides no contract and has no dependencies.`);\n\t\t\t}\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\tif (valueOrigin !== void 0) {\n\t\t\t\tconst value = provisionedValue(valueOrigin, fullAddress);\n\t\t\t\tvalueResources.set(fullAddress, value);\n\t\t\t\treturn value;\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 values bound to secretString() fields of its \\`input\\` binding, 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: 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\tisLoadRoot: 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, valueResources, 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\tif (opts?.configuration !== void 0 && opts.appConfigurationRead !== void 0) throw new LoadError(\"Load takes configuration, in the first process, or appConfigurationRead, in the second, not both.\");\n\tconst moduleInputs = [];\n\tif (root.inputSchema !== void 0) if (opts?.appConfigurationRead !== void 0) moduleInputs.push({\n\t\tmoduleAddress: rootId,\n\t\tschema: root.inputSchema,\n\t\tbinding: void 0,\n\t\tisLoadRoot: true,\n\t\tchecked: opts.appConfigurationRead.rootInput\n\t});\n\telse if (opts?.configuration !== void 0) moduleInputs.push({\n\t\tmoduleAddress: rootId,\n\t\tschema: root.inputSchema,\n\t\tbinding: opts.configuration,\n\t\tisLoadRoot: true\n\t});\n\telse throw new LoadError(`Module \"${root.name}\" declares input and is being deployed as the root, but Load was given no app configuration to fill it from. Pass { configuration } to Load; prisma deploy and prisma dev pass the values the \\`config\\` adapters return.`);\n\tconst nodes = [];\n\tconst edges = [];\n\tconst pending = [];\n\tconst inputBindings = [];\n\tconst paramBindings = [];\n\tconst byId = /* @__PURE__ */ new Map();\n\tconst valueResources = /* @__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, valueResources, 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\tinputBindings,\n\t\tparams: paramBindings,\n\t\tmoduleInputs,\n\t\tresources,\n\t\tvalueResources\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\tvalueReads: valueReadsOf(resolved.inputBindings),\n\t\tappConfigurationRead: resolved.appConfigurationRead\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, module or app root node (construct it with the service(), module() or appRoot() 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, module or app root (received another node kind).\");\n}\n/** The app secrets key of every secret source the graph names, once each, in the order Load met them. A source built without a `secretsKey` is left out. */\nfunction secretsKeys(graph) {\n\tconst keys = /* @__PURE__ */ new Set();\n\tfor (const { source } of graph.secretSources) {\n\t\tconst origin = sourceOriginOf(source);\n\t\tconst key = origin?.sourceKind === \"secret\" ? origin.secretsKey : void 0;\n\t\tif (key !== void 0) keys.add(key);\n\t}\n\treturn [...keys];\n}\n/** The address of every node in the graph, sorted. Two Loads of the same graph give the same list. */\nfunction nodeAddresses(graph) {\n\treturn graph.nodes.map(({ id }) => id).sort();\n}\n//#endregion\nexport { resolve as C, RESOURCE_OUT_PORT as E, isValue as S, LoadError as T, resource as _, ResourceNodeBase as a, slotsOf as b, freezeNode as c, isProvisionNeed as d, isSecretSource as f, provisionNeed as g, paramSource as h, secretsKeys as i, isNode as l, module as m, assertAppName as n, appRoot as o, isValueResource as p, nodeAddresses as r, dependency as s, Load as t, isParamSource as u, secretSource as v, GraphCheckError as w, valueResource as x, service as y };\n\n//# sourceMappingURL=graph-C6Fqe2gn.mjs.map","import { C as resolve, E as RESOURCE_OUT_PORT, S as isValue, T as LoadError, _ as resource, a as ResourceNodeBase, b as slotsOf, c as freezeNode, d as isProvisionNeed, f as isSecretSource, g as provisionNeed, h as paramSource, l as isNode, m as module, n as assertAppName, o as appRoot, p as isValueResource, s as dependency, t as Load, u as isParamSource, v as secretSource, w as GraphCheckError, x as valueResource, y as service } from \"./graph-C6Fqe2gn.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).\n*/\nfunction inputManifest(graph) {\n\treturn graph.inputBindings;\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 { GraphCheckError, Load, LoadError, RESOURCE_OUT_PORT, ResourceNodeBase, SecretBox, appRoot, assertAppName, configOf, dependency, freezeNode, hydrate, hydrateSync, inputManifest, isNode, isParamSource, isPlainPointer, isProvisionNeed, isSecretPointer, isSecretSource, isSecretString, isValue, isValueResource, module, number, param, paramSource, provisionNeed, resolve, resource, secretSource, service, slotsOf, string, valueResource };\n\n//# sourceMappingURL=index.mjs.map","import { b as slotsOf, i as secretsKeys, p as isValueResource, r as nodeAddresses, t as Load } from \"./graph-C6Fqe2gn.mjs\";\nimport { i as readPreflightPayload, s as deserializeContainers } from \"./preflight-transport-C7_3abXW.mjs\";\nimport { blindCast } from \"@internal/foundation/casts\";\nimport * as Alchemy from \"alchemy\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\nimport * as Data from \"effect/Data\";\nimport * as Predicate from \"effect/Predicate\";\n//#region src/control/deploy.ts\n/** Routes each graph node to its extension descriptor (by node.extension/type) and runs provision → serialize → package → deploy in dependency order. */\nvar LowerError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"LowerError\";\n\t}\n};\nfunction assertSameNodeAddresses(built, firstProcess) {\n\tconst onlyBuilt = built.filter((address) => !firstProcess.includes(address));\n\tconst onlyFirst = firstProcess.filter((address) => !built.includes(address));\n\tif (onlyBuilt.length === 0 && onlyFirst.length === 0) return;\n\tconst list = (addresses) => addresses.length === 0 ? \"none\" : addresses.map((address) => `\"${address}\"`).join(\", \");\n\tthrow new LowerError(`lower() built a different graph from the one Composer checked first. Only in the graph lower() built: ${list(onlyBuilt)}. Only in the graph Composer checked: ${list(onlyFirst)}. A module body must build the same graph every time; one that reads the process environment, a file or the clock can build a different one.`);\n}\n/** A service's own param: its binding, else its `default`, else absent when optional. A `provision` need (ADR-0031) is filled per edge in `buildConfig`, never here. */\nfunction resolveParam(node, serviceId, name, param, bound) {\n\tif (bound !== void 0) {\n\t\tif (param.provision !== void 0) throw new LowerError(`Param \"${name}\" of \"${serviceId}\" (service \"${node.name}\") is bound at provision and also declares a framework provision need (\"${String(param.provision.brand)}\"). Remove the binding or the \\`provision\\` facet.`);\n\t\tconst result = param.schema[\"~standard\"].validate(bound);\n\t\tif (result instanceof Promise) throw new LowerError(`Param \"${name}\" of \"${serviceId}\" (service \"${node.name}\") uses an async Standard Schema — a provision-time literal value requires a synchronous validator.`);\n\t\tif (result.issues !== void 0) {\n\t\t\tconst messages = result.issues.map((issue) => issue.message).join(\"; \");\n\t\t\tthrow new LowerError(`Param \"${name}\" of \"${serviceId}\" (service \"${node.name}\") received an invalid provision-time value: ${messages}`);\n\t\t}\n\t\treturn result.value;\n\t}\n\tif (param.default !== void 0) return param.default;\n\tif (param.optional === true) return void 0;\n\tthrow new LowerError(`Param \"${name}\" of \"${serviceId}\" (service \"${node.name}\") has no default, is not optional, and was not bound at provision — bind it on its provision() call with a literal value or a value the deploy has, or give it a default.`);\n}\n/**\n* Assembles a service's typed Config. Connection params come from the\n* dependency edge's lowered outputs — or, for a param carrying a `provision`\n* need (ADR-0031), from `provisioned` (keyed by edge id): the framework mints\n* it, the producer hands nothing over. The service's own params resolve via\n* `resolveParam` (provision-time binding, then default, then loud\n* unbound-required failure).\n*\n* This is also where the connection contract is enforced: a producer that fails to\n* supply a required param its consumer's connection declares fails the deploy\n* here, naming the edge, rather than reaching the consumer as `undefined`.\n*/\nfunction buildConfig(node, id, graph, lowered, provisioned) {\n\tconst inputs = slotConnectionParams(node, id, graph, lowered, provisioned);\n\tconst boundParams = new Map(graph.params.filter((binding) => binding.serviceAddress === id).map((b) => [b.slot, b.binding]));\n\tconst service = {};\n\tfor (const [name, param] of Object.entries(node.params)) {\n\t\tconst value = resolveParam(node, id, name, param, boundParams.get(name));\n\t\tif (value !== void 0) service[name] = value;\n\t}\n\treturn {\n\t\tservice,\n\t\tinputs\n\t};\n}\n/**\n* The connection params of each of a service's or resource's dependency\n* slots, resolved against the producer's lowered outputs or the minted\n* `provisioned` value, with the connection contract enforced (see `buildConfig`).\n*/\nfunction connectionInputs(ctx) {\n\treturn slotConnectionParams(ctx.node, ctx.id, ctx.graph, ctx.lowered, ctx.provisioned);\n}\nfunction slotConnectionParams(node, id, graph, lowered, provisioned) {\n\tconst inputs = {};\n\tfor (const [inputName, inputNode] of Object.entries(node.inputs)) {\n\t\tconst edge = graph.edges.find((e) => e.to === id && e.input === inputName && e.kind === \"dependency\");\n\t\tconst producedOutputs = edge !== void 0 ? lowered.get(edge.from) ?? {} : {};\n\t\tconst values = {};\n\t\tfor (const [name, param] of Object.entries(inputNode.connection.params)) {\n\t\t\tif (param.provision !== void 0) {\n\t\t\t\tvalues[name] = provisioned.get(`${id}.${inputName}`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst value = producedOutputs[name];\n\t\t\tif (value === void 0 && param.optional !== true && edge !== void 0) throw new LowerError(`Connection input \"${id}.${inputName}\" declares param \"${name}\", but its producer \"${edge.from}\" did not supply it — the producer's outputs carry [${Object.keys(producedOutputs).join(\", \") || \"nothing\"}]. Add \"${name}\" to the outputs the producer returns from its lowering, or declare the param optional on the connection.`);\n\t\t\tvalues[name] = value;\n\t\t}\n\t\tinputs[inputName] = values;\n\t}\n\treturn inputs;\n}\n/**\n* Joins resolved report entries back to their graph nodes — the last step of a\n* deploy report, run inside the Action with apply's resolved values.\n*\n* The entries cross Alchemy's action-input boundary, so they carry addresses\n* and plain entities only; the graph is held by closure on this side. That\n* split is why this join exists at all, and it is what keeps functions and\n* Standard Schemas (which a node carries, and which the plan's input hash\n* would have to serialize) out of the input.\n*\n* Skips an address the graph no longer holds: entries are data, the graph is\n* truth.\n*/\nfunction joinDeployment(graph, entries) {\n\tconst nodes = [];\n\tfor (const entry of entries) {\n\t\tconst node = graph.nodes.find((n) => n.id === entry.address)?.node;\n\t\tif (node === void 0 || node.kind !== \"service\" && node.kind !== \"resource\") continue;\n\t\tnodes.push({\n\t\t\taddress: entry.address,\n\t\t\tnode,\n\t\t\tentities: entry.entities\n\t\t});\n\t}\n\treturn nodes;\n}\n/** The deploy report: every deployed node joined with its graph node, and the deploy preflight's findings. */\nfunction deploymentResult(app, graph, entries, findings) {\n\treturn {\n\t\tapp,\n\t\tnodes: joinDeployment(graph, entries),\n\t\tfindings\n\t};\n}\nfunction missingBundleError(id) {\n\treturn new LowerError(`No bundle provided for service \"${id}\" (opts.bundles[\"${id}\"] is required).`);\n}\n/** The message `prisma dev` structures as `DEV.DEV_SERVER_UNSUPPORTED` (ADR-0056). */\nfunction noReserveError(id, extension, type) {\n\treturn new LowerError(`service \"${id}\" runs a dev server but its descriptor (${extension}/${type}) has no \\`reserve\\` step`);\n}\nfunction unassembledWithBundleError(address) {\n\treturn new LowerError(`\"${address}\" is listed in opts.unassembled and also has a bundle in opts.bundles — a service is either assembled or not.`);\n}\nfunction unassembledNotServiceError(address) {\n\treturn new LowerError(`\"${address}\" is listed in opts.unassembled but is not a service in the graph.`);\n}\nfunction duplicateExtensionError(id) {\n\treturn new LowerError(`Extension \"${id}\" is listed more than once in \\`extensions\\` — each extension id must be unique.`);\n}\n/** Registries as extension id → descriptor. Fails on a duplicate id — the CLI validates config, but lowering() is the programmatic escape hatch that doesn't. */\nfunction extensionsById(config) {\n\tconst map = /* @__PURE__ */ new Map();\n\tfor (const extension of config.extensions) {\n\t\tif (map.has(extension.id)) return Effect.fail(duplicateExtensionError(extension.id));\n\t\tmap.set(extension.id, extension);\n\t}\n\treturn Effect.succeed(map);\n}\nfunction unknownExtensionError(extension, id) {\n\treturn new LowerError(`No extension \"${extension}\" is configured (needed by node \"${id}\") — add it to \\`extensions\\` in the \\`composer\\` section of prisma.config.ts (import its /control entry and list its descriptor).`);\n}\nfunction unknownNodeTypeError(extension, type) {\n\treturn new LowerError(`Extension \"${extension.id}\" has no descriptor for node type \"${type}\" (known: ${Object.keys(extension.nodes).join(\", \")}).`);\n}\n/** A provisioned param's need brand isn't registered by the consumer's extension (ADR-0031). */\nfunction unknownProvisionerError(extension, brand, edgeId) {\n\tconst known = extension.provisions !== void 0 && extension.provisions.size > 0 ? Array.from(extension.provisions.keys(), String).join(\", \") : \"(none registered)\";\n\treturn new LowerError(`Extension \"${extension.id}\" has no provisioner for need \"${String(brand)}\" (needed by edge \"${edgeId}\") (known: ${known}).`);\n}\n/** A provisioned edge whose consumer and provider nodes belong to different extensions (ADR-0031). */\nfunction crossExtensionProvisionError(edgeId) {\n\treturn new LowerError(`Provisioned edge \"${edgeId}\" spans two extensions — cross-extension provisioned edges aren't supported yet.`);\n}\n/**\n* More than one provisioned param on one connection (ADR-0031). One edge mints\n* ONE value, keyed by edge id, so a second need on the same connection would\n* silently receive the first's value under the first's brand.\n*/\nfunction multipleProvisionedParamsError(edgeId, names) {\n\treturn new LowerError(`Connection input \"${edgeId}\" declares more than one provisioned param (${names.join(\", \")}) — only one provisioned param per connection is supported.`);\n}\nfunction wrongKindError(extension, type, expected, got) {\n\treturn new LowerError(`Extension \"${extension}\"'s descriptor for node type \"${type}\" is a \"${got}\" descriptor — this node needs a \"${expected}\" descriptor.`);\n}\n/** Looks up one node's descriptor: extension by `node.extension`, then descriptor by `node.type`, then the kind check. */\nfunction descriptorFor(extensions, node, id) {\n\tconst extension = extensions.get(node.extension);\n\tif (extension === void 0) return Effect.fail(unknownExtensionError(node.extension, id));\n\tconst descriptor = extension.nodes[node.type];\n\tif (descriptor === void 0) return Effect.fail(unknownNodeTypeError(extension, node.type));\n\tif (descriptor.kind !== node.kind) return Effect.fail(wrongKindError(node.extension, node.type, node.kind, descriptor.kind));\n\treturn Effect.succeed(descriptor);\n}\n/**\n* The state-layer precedence a deploy resolves to: an explicit opts.state\n* always wins; failing that, the config's own (required) state descriptor,\n* created with its owning extension's resolved container (`undefined` when\n* that extension declared none). A pure function so the precedence is\n* testable without booting Alchemy.\n*/\nfunction resolveStateLayer(opts, config, containers) {\n\treturn opts.state ?? config.state.create(containers.get(config.state.extension), opts.credentials);\n}\n/**\n* All configured extensions' providers merged, config array order — an\n* extension without `providers` is skipped; no used-extensions-only\n* filtering (ADR-0017's pinned providers rule).\n*/\nfunction mergedProviders(config, credentials) {\n\tconst [first, ...rest] = config.extensions.flatMap((extension) => extension.providers !== void 0 ? [extension.providers({ credentials })] : []);\n\treturn first === void 0 ? Layer.empty : Layer.mergeAll(first, ...rest);\n}\n/**\n* Composable form for mixed stacks: hand-wired Alchemy resources alongside Prisma App nodes in one stack effect.\n* Fails with LowerError or whatever an extension's lowering raises — the error type is open.\n*/\nfunction lowering(root, config, opts) {\n\treturn blindCast(Effect.gen(function* () {\n\t\tconst graph = Load(root, {\n\t\t\tid: opts.name,\n\t\t\t...opts.environment !== void 0 ? { environment: { name: opts.environment } } : {},\n\t\t\t...opts.appConfigurationRead !== void 0 ? { appConfigurationRead: opts.appConfigurationRead } : {}\n\t\t});\n\t\tif (opts.firstProcessNodeAddresses !== void 0) assertSameNodeAddresses(nodeAddresses(graph), opts.firstProcessNodeAddresses);\n\t\tconst extensions = yield* extensionsById(config);\n\t\tconst { containers, preflightPayloads, findings } = lowerInputs(config, opts);\n\t\tconst preflightOf = (extensionId) => preflightPayloads.get(extensionId);\n\t\tconst lowered = /* @__PURE__ */ new Map();\n\t\tconst entries = [];\n\t\tconst provisioned = /* @__PURE__ */ new Map();\n\t\tconst applications = /* @__PURE__ */ new Map();\n\t\tfor (const descriptor of config.extensions) {\n\t\t\tif (descriptor.application === void 0) continue;\n\t\t\tconst appCtx = {\n\t\t\t\tid: graph.root.id,\n\t\t\t\taddress: \"\",\n\t\t\t\tnode: graph.root.node,\n\t\t\t\tgraph,\n\t\t\t\topts,\n\t\t\t\tapplication: void 0,\n\t\t\t\tcontainer: containers.get(descriptor.id),\n\t\t\t\tpreflight: preflightOf(descriptor.id),\n\t\t\t\tlowered,\n\t\t\t\tprovisioned\n\t\t\t};\n\t\t\tapplications.set(descriptor.id, yield* descriptor.application.provision(appCtx));\n\t\t}\n\t\tfor (const edge of graph.edges) {\n\t\t\tif (edge.kind !== \"dependency\") continue;\n\t\t\tconst consumer = graph.nodes.find((n) => n.id === edge.to)?.node;\n\t\t\tif (consumer === void 0 || consumer.kind !== \"service\" && consumer.kind !== \"resource\") continue;\n\t\t\tconst slot = slotsOf(consumer)[edge.input];\n\t\t\tif (slot === void 0) continue;\n\t\t\tconst provisionedParams = Object.entries(slot.connection.params).filter(([, param]) => param.provision !== void 0);\n\t\t\tif (provisionedParams.length === 0) continue;\n\t\t\tconst edgeId = `${edge.to}.${edge.input}`;\n\t\t\tif (provisionedParams.length > 1) return yield* Effect.fail(multipleProvisionedParamsError(edgeId, provisionedParams.map(([name]) => name)));\n\t\t\tconst need = provisionedParams[0]?.[1].provision;\n\t\t\tif (need === void 0) continue;\n\t\t\tconst provider = graph.nodes.find((n) => n.id === edge.from)?.node;\n\t\t\tif (provider === void 0 || provider.kind !== \"service\" && provider.kind !== \"resource\") continue;\n\t\t\tif (consumer.extension !== provider.extension) return yield* Effect.fail(crossExtensionProvisionError(edgeId));\n\t\t\tconst extension = extensions.get(consumer.extension);\n\t\t\tif (extension === void 0) return yield* Effect.fail(unknownExtensionError(consumer.extension, edge.to));\n\t\t\tconst provisioner = extension.provisions?.get(need.brand);\n\t\t\tif (provisioner === void 0) return yield* Effect.fail(unknownProvisionerError(extension, need.brand, edgeId));\n\t\t\tconst ref = yield* provisioner.provision({\n\t\t\t\tapp: graph.root.id,\n\t\t\t\tedgeId,\n\t\t\t\tconsumerAddress: edge.to,\n\t\t\t\tproviderAddress: edge.from,\n\t\t\t\tinput: edge.input,\n\t\t\t\tneed\n\t\t\t});\n\t\t\tprovisioned.set(edgeId, ref);\n\t\t}\n\t\tconst unassembled = new Set(opts.unassembled ?? []);\n\t\tfor (const address of unassembled) {\n\t\t\tif (address in opts.bundles) return yield* Effect.fail(unassembledWithBundleError(address));\n\t\t\tconst found = graph.nodes.find((n) => n.id === address);\n\t\t\tif (found === void 0 || found.node.kind !== \"service\") return yield* Effect.fail(unassembledNotServiceError(address));\n\t\t}\n\t\tconst services = /* @__PURE__ */ new Map();\n\t\tconst ctxFor = (id, node) => ({\n\t\t\tid,\n\t\t\taddress: id,\n\t\t\tnode,\n\t\t\tgraph,\n\t\t\topts,\n\t\t\tapplication: applications.get(node.extension),\n\t\t\tcontainer: containers.get(node.extension),\n\t\t\tpreflight: preflightOf(node.extension),\n\t\t\tlowered,\n\t\t\tprovisioned,\n\t\t\tservices\n\t\t});\n\t\tfor (const { id, node } of graph.nodes) {\n\t\t\tif (node.kind !== \"service\") continue;\n\t\t\tconst descriptor = yield* descriptorFor(extensions, node, id);\n\t\t\tif (descriptor.kind !== \"service\") continue;\n\t\t\tservices.set(id, yield* descriptor.provision(ctxFor(id, node)));\n\t\t}\n\t\tfor (const { id, node } of graph.nodes) {\n\t\t\tif (node.kind === \"module\") continue;\n\t\t\tif (node.kind === \"dependency\") continue;\n\t\t\tconst ctx = ctxFor(id, node);\n\t\t\tconst descriptor = yield* descriptorFor(extensions, node, id);\n\t\t\tif (descriptor.kind === \"resource\") {\n\t\t\t\tconst result = yield* descriptor(ctx);\n\t\t\t\tlowered.set(id, result.outputs);\n\t\t\t\tif (!isValueResource(node)) entries.push({\n\t\t\t\t\taddress: id,\n\t\t\t\t\tentities: result.entities\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (descriptor.kind !== \"service\") return yield* Effect.fail(wrongKindError(node.extension, node.type, node.kind, descriptor.kind));\n\t\t\tconst service = node;\n\t\t\tconst provisionedNode = services.get(id);\n\t\t\tconst typedConfig = buildConfig(service, id, graph, lowered, provisioned);\n\t\t\tconst serialized = yield* descriptor.serialize(ctx, provisionedNode, typedConfig);\n\t\t\tif (unassembled.has(id)) {\n\t\t\t\tif (descriptor.reserve === void 0) return yield* Effect.fail(noReserveError(id, node.extension, node.type));\n\t\t\t\tconst result = yield* descriptor.reserve(ctx, provisionedNode, serialized);\n\t\t\t\tlowered.set(id, result.outputs);\n\t\t\t\tentries.push({\n\t\t\t\t\taddress: id,\n\t\t\t\t\tentities: result.entities\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst bundle = opts.bundles[id];\n\t\t\tif (bundle === void 0) return yield* Effect.fail(missingBundleError(id));\n\t\t\tconst artifact = yield* descriptor.package(ctx, {\n\t\t\t\tassembled: {\n\t\t\t\t\tdir: bundle.dir,\n\t\t\t\t\tentry: bundle.entry\n\t\t\t\t},\n\t\t\t\taddress: id\n\t\t\t}, serialized);\n\t\t\tconst result = yield* descriptor.deploy(ctx, provisionedNode, artifact, serialized);\n\t\t\tlowered.set(id, result.outputs);\n\t\t\tentries.push({\n\t\t\t\taddress: id,\n\t\t\t\tentities: result.entities\n\t\t\t});\n\t\t}\n\t\tif (opts.report !== void 0) {\n\t\t\tconst report = opts.report;\n\t\t\tyield* Alchemy.Action(\"composer-deployment-report\", (input) => Effect.sync(() => {\n\t\t\t\treport(deploymentResult(opts.name, graph, input.entries, findings));\n\t\t\t}))({\n\t\t\t\tnonce: Date.now(),\n\t\t\t\tentries\n\t\t\t});\n\t\t}\n\t}));\n}\n/** The containers and preflight payloads a host wrote into the environment of a stack file it runs as a child. */\nfunction transportedLowerInputs(config) {\n\tconst env = process.env;\n\tconst preflightPayloads = /* @__PURE__ */ new Map();\n\tfor (const { id } of config.extensions) {\n\t\tconst payload = readPreflightPayload(id, env);\n\t\tif (payload !== void 0) preflightPayloads.set(id, payload);\n\t}\n\treturn {\n\t\tcontainers: deserializeContainers(config.extensions, env),\n\t\tpreflightPayloads\n\t};\n}\nfunction lowerInputs(config, opts) {\n\tconst { containers, preflightPayloads } = opts;\n\tconst findings = opts.findings ?? { unset: [] };\n\tif (containers !== void 0 && preflightPayloads !== void 0) return {\n\t\tcontainers,\n\t\tpreflightPayloads,\n\t\tfindings\n\t};\n\tif (containers === void 0 && preflightPayloads === void 0) return {\n\t\t...transportedLowerInputs(config),\n\t\tfindings\n\t};\n\tconst missing = containers === void 0 ? \"containers\" : \"preflightPayloads\";\n\tthrow new Error(`lower() was passed ${missing === \"containers\" ? \"preflightPayloads\" : \"containers\"} without ${missing}. Pass both, or neither to read both from the environment.`);\n}\n/**\n* The whole-stack wrapper: Load → route each node through the config's\n* extension registries → an Alchemy Stack, which `deploy` hands to\n* `Alchemist.plan` and a generated stack file exports for the alchemy CLI.\n*/\nfunction lower(root, config, opts) {\n\tconst stackEffect = blindCast(Effect.orDie(lowering(root, config, opts)));\n\tconst providers = opts.providers ?? mergedProviders(config, opts.credentials);\n\treturn Alchemy.Stack(opts.name, {\n\t\tproviders,\n\t\tstate: resolveStateLayer(opts, config, lowerInputs(config, opts).containers)\n\t}, stackEffect);\n}\n//#endregion\n//#region src/control/provider-error.ts\nconst PROVIDER_FAILURE_TAG = \"ProviderFailure\";\n/** A provider operation failed with an error that carries no `_tag` of its own; `cause` is that error. */\nvar ProviderFailure = class extends Data.TaggedError(PROVIDER_FAILURE_TAG) {};\nfunction isProviderError(cause) {\n\treturn Predicate.hasProperty(cause, \"_tag\") && typeof cause._tag === \"string\";\n}\n/** What a provider operation threw, as the error Alchemy's lifecycle methods fail with: an error with a `_tag` as it is, anything else wrapped in a `ProviderFailure`. */\nfunction toProviderError(cause) {\n\tif (isProviderError(cause)) return cause;\n\treturn new ProviderFailure({\n\t\tmessage: cause instanceof Error ? cause.message : String(cause),\n\t\tcause\n\t});\n}\n/** The original error of a provider failure `toProviderError` wrapped, or `undefined` for any other error. */\nfunction wrappedProviderError(error) {\n\treturn Predicate.isTagged(error, PROVIDER_FAILURE_TAG) && \"cause\" in error ? error.cause : void 0;\n}\n//#endregion\nexport { LowerError, buildConfig, connectionInputs, deploymentResult, joinDeployment, lower, lowering, mergedProviders, nodeAddresses, resolveStateLayer, secretsKeys, toProviderError, transportedLowerInputs, wrappedProviderError };\n\n//# sourceMappingURL=deploy.mjs.map","import { n as environmentVariables } from \"./config-adapters-DG-uhGfv.mjs\";\nimport { n as configFileMissing, r as entryMissing, t as checkComposerConfig } from \"./composer-config-QKdY85G-.mjs\";\nimport { d as valuesUnderSecretsKeys, i as credentialLookingValues, n as SecretRedaction } from \"./redaction-CjMYXtGp.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 { GraphCheckError, Load, assertAppName, isNode } from \"@internal/core\";\nimport { secretsKeys } from \"@internal/core/deploy\";\nimport { CliStructuredError, InternalError, describeKind } 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/app-configuration.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(values) {\n\treturn Object.values(values).every((value) => typeof value === \"string\");\n}\nasync function readAdapters(list, adapters, input) {\n\tconst adapterInput = Object.freeze({\n\t\tenvironment: input.environment,\n\t\tconfigDirectory: path.dirname(input.configFile)\n\t});\n\tconst merged = 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\tmerged[key] = value;\n\t\t}\n\t}\n\treturn Object.freeze(merged);\n}\n/** Calls the section's `config` adapters (default `[environmentVariables()]`) and merges what they return: the app configuration. */\nfunction readAppConfiguration(section, input) {\n\treturn readAdapters(\"config\", section.config ?? [environmentVariables()], input);\n}\n/**\n* Calls the section's `secrets` adapters (default `[environmentVariables()]`) and merges what they\n* return: the app secrets. Every value must be text. A value is a known secret only once the graph\n* names it, so this adds none.\n*/\nasync function readAppSecrets(section, input) {\n\tconst merged = await readAdapters(\"secrets\", section.secrets ?? [environmentVariables()], input);\n\tif (!isText(merged)) throw new InternalError(\"readAdapters admitted a secret that is not text\");\n\treturn merged;\n}\n//#endregion\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 the app's root:\n* an app root built with `appRoot()`, or a module built with `module()`\n* (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 === \"service\") throw new CliStructuredError(\"COMPOSE.ROOT_NOT_MODULE\", `The entry \"${resolvedPath}\" default-exports a service. The app's root must be a module, built with appRoot().`, {\n\t\tfix: \"Provision the service inside a root, e.g. export default appRoot('name', ({ provision }) => { provision(service); }).\",\n\t\twhere: { path: resolvedPath }\n\t});\n\tif (!isNode(root) || root.kind !== \"module\") throw new CliStructuredError(\"COMPOSE.ENTRY_EXPORT_INVALID\", `Entry module \"${resolvedPath}\" must default-export the app's root.`, {\n\t\tfix: \"Build it with appRoot() from @prisma/composer.\",\n\t\twhere: { path: resolvedPath }\n\t});\n\treturn {\n\t\tpath: resolvedPath,\n\t\troot\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 redaction = deps.redaction ?? new SecretRedaction(process.env);\n\tconst adapterInput = {\n\t\tenvironment,\n\t\tconfigFile: configSource.file\n\t};\n\tconst secrets = deps.readSecrets === true ? await readAppSecrets(config, adapterInput) : NO_SECRETS;\n\tconst configuration = await readAppConfiguration(config, adapterInput);\n\tredaction.addCredentialLookingValues(credentialLookingValues(configuration));\n\tconst graph = Load(entryModule.root, {\n\t\tid: name,\n\t\tenvironment: { name: environment },\n\t\tconfiguration\n\t});\n\tredaction.addKnownSecrets(valuesUnderSecretsKeys(configuration, secrets, secretsKeys(graph)));\n\tcheckGraph(graph, config.extensions);\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\tconfiguration,\n\t\tsecrets\n\t};\n}\nfunction checkGraph(graph, extensions) {\n\tfor (const extension of extensions) try {\n\t\textension.checkGraph?.(graph);\n\t} catch (error) {\n\t\tif (error instanceof GraphCheckError) throw new GraphCheckError(error.message, { extension: extension.id });\n\t\tthrow error;\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-XwVDifWN.mjs.map"],"x_google_ignoreList":[1,2,3,4],"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CETA,MAAMA,OAAAA,UAAa,IAAI;CACvB,MAAMC,SAAAA,UAAe,MAAM;CAC3B,MAAM,KAAA,UAAa,IAAI;CACvB,MAAM,SAAA,UAAiB,QAAQ;CAG/B,MAAM,UAAA,kBAAA,CAAA,CAAsB;CAE5B,MAAM,OAAO;CAGb,SAAS,MAAO,KAAK;EACnB,MAAM,MAAM,CAAC;EAGb,IAAI,QAAQ,IAAI,SAAS;EAGzB,QAAQ,MAAM,QAAQ,WAAW,IAAI;EAErC,IAAI;EACJ,QAAQ,QAAQ,KAAK,KAAK,KAAK,MAAM,MAAM;GACzC,MAAM,MAAM,MAAM;GAGlB,IAAI,QAAS,MAAM,MAAM;GAGzB,QAAQ,MAAM,KAAK;GAGnB,MAAM,aAAa,MAAM;GAGzB,QAAQ,MAAM,QAAQ,0BAA0B,IAAI;GAGpD,IAAI,eAAe,MAAK;IACtB,QAAQ,MAAM,QAAQ,QAAQ,IAAI;IAClC,QAAQ,MAAM,Q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