@prisma/composer-cli 0.39.0-dev.11 → 0.39.0-dev.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-converge-bS1l9jIf-B1FOgxBQ.mjs → app-converge-CHMILMYi-Duhv9T-w.mjs} +5 -5
- package/dist/app-converge-CHMILMYi-Duhv9T-w.mjs.map +1 -0
- package/dist/{composer-config-QKdY85G--CEXrb2Uc.mjs → composer-config-aL0W4HPG-CTpDJKz4.mjs} +3 -3
- package/dist/composer-config-aL0W4HPG-CTpDJKz4.mjs.map +1 -0
- package/dist/{deploy-Br1yvLe3.mjs → deploy-Cu7Wtrf0.mjs} +6 -6
- package/dist/deploy-Cu7Wtrf0.mjs.map +1 -0
- package/dist/{dev-converge-messages-DML4rTz7-B6uxtpZG.mjs → dev-converge-messages-CElmPylA-6X7D08mQ.mjs} +6 -6
- package/dist/dev-converge-messages-CElmPylA-6X7D08mQ.mjs.map +1 -0
- package/dist/dev-converge-worker.mjs +4 -4
- package/dist/dev-converge-worker.mjs.map +1 -1
- package/dist/{dev-current-lAlj53eX-DvAHNZFo.mjs → dev-current-C7R8uqyQ-CgyoTX9q.mjs} +7 -7
- package/dist/dev-current-C7R8uqyQ-CgyoTX9q.mjs.map +1 -0
- package/dist/{dev-environment-name-6eEr5PW8-CCY7WNWz.mjs → dev-environment-name-6eEr5PW8-DSJ7HrEe.mjs} +2 -3
- package/dist/{dev-environment-name-6eEr5PW8-CCY7WNWz.mjs.map → dev-environment-name-6eEr5PW8-DSJ7HrEe.mjs.map} +1 -1
- package/dist/{dist-C0OGaDnj.mjs → dist-CZTXNHtS.mjs} +1 -2
- package/dist/{dist-C0OGaDnj.mjs.map → dist-CZTXNHtS.mjs.map} +1 -1
- package/dist/execute-deploy-destroy-BIRdFfwR-Czj9JB8M.mjs +517 -0
- package/dist/execute-deploy-destroy-BIRdFfwR-Czj9JB8M.mjs.map +1 -0
- package/dist/{execute-dev-DnVmNpc1-BzK9Qns_.mjs → execute-dev-D9PxdbV3-D-pdqLmO.mjs} +11 -13
- package/dist/execute-dev-D9PxdbV3-D-pdqLmO.mjs.map +1 -0
- package/dist/{execute-dev-current-CZdmxVQ4-DxDflvNG.mjs → execute-dev-current-BghQ0HLe-BY5COM8c.mjs} +6 -7
- package/dist/{execute-dev-current-CZdmxVQ4-DxDflvNG.mjs.map → execute-dev-current-BghQ0HLe-BY5COM8c.mjs.map} +1 -1
- package/dist/{family-DfwviKFj-CS1L-EvS.d.mts → family-5lQ0X01--mh7Vm2zv.d.mts} +74 -129
- package/dist/family-5lQ0X01--mh7Vm2zv.d.mts.map +1 -0
- package/dist/family.d.mts +1 -1
- package/dist/family.mjs +17 -11
- package/dist/family.mjs.map +1 -1
- package/dist/{list-deployed-D6vTzpWu.mjs → list-deployed-COZmPVO2.mjs} +3 -3
- package/dist/{list-deployed-D6vTzpWu.mjs.map → list-deployed-COZmPVO2.mjs.map} +1 -1
- package/dist/{local-target-CZzICh5R.mjs → local-target-bTjNRplR.mjs} +31 -3
- package/dist/local-target-bTjNRplR.mjs.map +1 -0
- package/dist/{redaction-DY6eDC12-BrK1aSN5.mjs → redaction-DHaXoToJ-zcuc7Sgf.mjs} +5 -5
- package/dist/redaction-DHaXoToJ-zcuc7Sgf.mjs.map +1 -0
- package/dist/{steps-BZXNqW6U-BM2Aa8Bp.mjs → steps-Det-FSAL-4BEaFT3G.mjs} +5 -118
- package/dist/steps-Det-FSAL-4BEaFT3G.mjs.map +1 -0
- package/dist/testing.d.mts +1 -1
- package/dist/{validate-environment-DCZiNSlR-idVge-kq.mjs → validate-environment-BevPErw8-BRVXeBjT.mjs} +6 -6
- package/dist/{validate-environment-DCZiNSlR-idVge-kq.mjs.map → validate-environment-BevPErw8-BRVXeBjT.mjs.map} +1 -1
- package/package.json +7 -8
- package/dist/app-config-CErnR6NK-DnKH4Kqc.mjs +0 -32
- package/dist/app-config-CErnR6NK-DnKH4Kqc.mjs.map +0 -1
- package/dist/app-converge-bS1l9jIf-B1FOgxBQ.mjs.map +0 -1
- package/dist/composer-config-QKdY85G--CEXrb2Uc.mjs.map +0 -1
- package/dist/deploy-Br1yvLe3.mjs.map +0 -1
- package/dist/dev-converge-messages-DML4rTz7-B6uxtpZG.mjs.map +0 -1
- package/dist/dev-current-lAlj53eX-DvAHNZFo.mjs.map +0 -1
- package/dist/execute-deploy-destroy-DN16ETAk-CzORriUO.mjs +0 -893
- package/dist/execute-deploy-destroy-DN16ETAk-CzORriUO.mjs.map +0 -1
- package/dist/execute-dev-DnVmNpc1-BzK9Qns_.mjs.map +0 -1
- package/dist/family-DfwviKFj-CS1L-EvS.d.mts.map +0 -1
- package/dist/local-target-CZzICh5R.mjs.map +0 -1
- package/dist/preflight-transport-2d6iIchu-ArIJUY1L.mjs +0 -56
- package/dist/preflight-transport-2d6iIchu-ArIJUY1L.mjs.map +0 -1
- package/dist/redaction-DY6eDC12-BrK1aSN5.mjs.map +0 -1
- package/dist/steps-BZXNqW6U-BM2Aa8Bp.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-environment-DCZiNSlR-idVge-kq.mjs","names":["fs","path","fs"],"sources":["../../../../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/3-tooling/cli/dist/validate-environment-DCZiNSlR.mjs"],"sourcesContent":["","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 { 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 { t as loadEntry } from \"./load-entry-CEoVBdMj.mjs\";\nimport { r as credentialLookingValues, t as SecretRedaction, u as valuesUnderSecretsKeys } from \"./redaction-DY6eDC12.mjs\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { assembleServices } from \"@internal/assemble\";\nimport { GraphCheckError, Load, assertAppName } from \"@internal/core\";\nimport { secretsKeys } from \"@internal/core/deploy\";\nimport { CliStructuredError, InternalError, describeKind } from \"@internal/foundation/errors\";\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/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-DCZiNSlR.mjs.map"],"x_google_ignoreList":[0,1,2,3],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCAA,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,QAAQ,QAAQ,IAAI;GACpC;GAGA,IAAI,OAAO;EACb;EAEA,OAAO;CACT;CAEA,SAAS,YAAa,SAAS;EAC7B,UAAU,WAAW,CAAC;EAEtB,MAAM,YAAY,WAAW,OAAO;EACpC,QAAQ,OAAO;EACf,MAAM,SAAS,aAAa,aAAa,OAAO;EACh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,IAAI,mBAAmB,8BAA8B,0BAA0B,YAAY,6EAA6E,YAAY,IAAI;AACxN"}
|
|
1
|
+
{"version":3,"file":"validate-environment-BevPErw8-BRVXeBjT.mjs","names":["fs","path","fs"],"sources":["../../../../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/3-tooling/cli/dist/validate-environment-BevPErw8.mjs"],"sourcesContent":["","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 { n as environmentVariables } from \"./config-adapters-DG-uhGfv.mjs\";\nimport { n as configFileMissing, r as entryMissing, t as checkComposerConfig } from \"./composer-config-aL0W4HPG.mjs\";\nimport { t as loadEntry } from \"./load-entry-CEoVBdMj.mjs\";\nimport { l as valuesUnderSecretsKeys, r as credentialLookingValues, t as SecretRedaction } from \"./redaction-DHaXoToJ.mjs\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { assembleServices } from \"@internal/assemble\";\nimport { GraphCheckError, Load, assertAppName } from \"@internal/core\";\nimport { secretsKeys } from \"@internal/core/deploy\";\nimport { CliStructuredError, InternalError, describeKind } from \"@internal/foundation/errors\";\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/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 and runs its preflight\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-BevPErw8.mjs.map"],"x_google_ignoreList":[0,1,2,3],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCAA,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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;CACA,OAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AACD;AACA,SAAS,WAAW,OAAO,YAAY;CACtC,KAAK,MAAM,aAAa,YAAY,IAAI;EACvC,UAAU,aAAa,KAAK;CAC7B,SAAS,OAAO;EACf,IAAI,iBAAiB,iBAAiB,MAAM,IAAI,gBAAgB,MAAM,SAAS,EAAE,WAAW,UAAU,GAAG,CAAC;EAC1G,MAAM;CACP;AACD;;AAIA,MAAM,yBAAyB;;AAE/B,SAAS,wBAAwB,aAAa,QAAQ,WAAW;CAChE,IAAI,uBAAuB,KAAK,WAAW,GAAG;CAC9C,MAAM,SAAS,MAAM,OAAO,CAAC,oBAAoB,cAAc,aAAa,GAAG,EAAE,OAAO,SAAS,CAAC;CAClG,IAAI,OAAO,OAAO,MAAM,IAAI,mBAAmB,oCAAoC,8CAA8C,YAAY,4BAA4B,OAAO,MAAM,QAAQ,IAAI,EAAE,OAAO,OAAO,MAAM,CAAC;CACzN,IAAI,OAAO,WAAW,GAAG,MAAM,IAAI,mBAAmB,8BAA8B,0BAA0B,YAAY,6EAA6E,YAAY,IAAI;AACxN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/composer-cli",
|
|
3
|
-
"version": "0.39.0-dev.
|
|
3
|
+
"version": "0.39.0-dev.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Prisma Composer's command family, which the `prisma` CLI mounts as `deploy`, `deploy list`, `dev`, `dev url`, `dev stop` and `emulator list`.",
|
|
6
6
|
"exports": {
|
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
"src"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@prisma/composer": "0.39.0-dev.
|
|
16
|
+
"@prisma/composer": "0.39.0-dev.13",
|
|
17
17
|
"@prisma/management-api-sdk": "^1.80.0",
|
|
18
18
|
"alchemy": "2.0.0-beta.87",
|
|
19
|
-
"cross-spawn": "^7.0.6",
|
|
20
19
|
"effect": "4.1.4",
|
|
21
20
|
"esbuild": "^0.28.1"
|
|
22
21
|
},
|
|
@@ -24,11 +23,11 @@
|
|
|
24
23
|
"@prisma/cli-engine": "0.10.0"
|
|
25
24
|
},
|
|
26
25
|
"devDependencies": {
|
|
27
|
-
"@internal/cli": "0.39.0-dev.
|
|
28
|
-
"@internal/dev-emulators": "0.39.0-dev.
|
|
29
|
-
"@internal/foundation": "0.39.0-dev.
|
|
30
|
-
"@internal/lowering": "0.39.0-dev.
|
|
31
|
-
"@internal/tsdown-config": "0.39.0-dev.
|
|
26
|
+
"@internal/cli": "0.39.0-dev.13",
|
|
27
|
+
"@internal/dev-emulators": "0.39.0-dev.13",
|
|
28
|
+
"@internal/foundation": "0.39.0-dev.13",
|
|
29
|
+
"@internal/lowering": "0.39.0-dev.13",
|
|
30
|
+
"@internal/tsdown-config": "0.39.0-dev.13",
|
|
32
31
|
"@types/bun": "^1.3.13",
|
|
33
32
|
"@prisma/cli-engine": "0.10.0",
|
|
34
33
|
"@types/node": "^26.0.1",
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//#region ../../0-framework/1-core/core/dist/app-config-CErnR6NK.mjs
|
|
2
|
-
/** `<cwd>/.prisma-composer/dev` — local dev's state directory (ADR-0041, ADR-0004's tool-state rule), holding one folder per environment. */
|
|
3
|
-
const DEV_DIR = ".prisma-composer/dev";
|
|
4
|
-
/**
|
|
5
|
-
* The folder, relative to the cwd, that holds one environment's local copy.
|
|
6
|
-
* The environment name is percent-encoded (`encodeURIComponent`), so a name
|
|
7
|
-
* with `/` stays one folder and `decodeURIComponent` gives the name back.
|
|
8
|
-
*/
|
|
9
|
-
function devEnvironmentDir(environment) {
|
|
10
|
-
return `${DEV_DIR}/${encodeURIComponent(environment)}`;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The file in an environment's folder that holds the environment's exact
|
|
14
|
-
* name. On a case-insensitive filesystem `Dev` and `dev` share one folder;
|
|
15
|
-
* the recorded name tells them apart.
|
|
16
|
-
*/
|
|
17
|
-
const DEV_ENVIRONMENT_NAME_FILE = "environment-name";
|
|
18
|
-
/**
|
|
19
|
-
* True when an extension only participates in assembly (every `nodes` entry
|
|
20
|
-
* is `kind: 'build'`, and it declares none of `providers`/`application`/
|
|
21
|
-
* `provisions`/`container`) — it owns no resources or services, so it has
|
|
22
|
-
* nothing to emulate and is exempt from local-target-capability requirements
|
|
23
|
-
* (ADR-0041). Shared by `localTargetProviders` and every local-target hook
|
|
24
|
-
* iteration.
|
|
25
|
-
*/
|
|
26
|
-
function isBuildOnlyExtension(extension) {
|
|
27
|
-
return Object.values(extension.nodes).every((node) => node.kind === "build") && extension.providers === void 0 && extension.application === void 0 && extension.provisions === void 0 && extension.container === void 0;
|
|
28
|
-
}
|
|
29
|
-
//#endregion
|
|
30
|
-
export { isBuildOnlyExtension as i, DEV_ENVIRONMENT_NAME_FILE as n, devEnvironmentDir as r, DEV_DIR as t };
|
|
31
|
-
|
|
32
|
-
//# sourceMappingURL=app-config-CErnR6NK-DnKH4Kqc.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-config-CErnR6NK-DnKH4Kqc.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-CErnR6NK.mjs"],"sourcesContent":["//#region src/control/app-config.ts\n/** `<cwd>/.prisma-composer/dev` — local dev's state directory (ADR-0041, ADR-0004's tool-state rule), holding one folder per environment. */\nconst DEV_DIR = \".prisma-composer/dev\";\n/**\n* The folder, relative to the cwd, that holds one environment's local copy.\n* The environment name is percent-encoded (`encodeURIComponent`), so a name\n* with `/` stays one folder and `decodeURIComponent` gives the name back.\n*/\nfunction devEnvironmentDir(environment) {\n\treturn `${DEV_DIR}/${encodeURIComponent(environment)}`;\n}\n/**\n* The file in an environment's folder that holds the environment's exact\n* name. On a case-insensitive filesystem `Dev` and `dev` share one folder;\n* the recorded name tells them apart.\n*/\nconst DEV_ENVIRONMENT_NAME_FILE = \"environment-name\";\n/**\n* True when an extension only participates in assembly (every `nodes` entry\n* is `kind: 'build'`, and it declares none of `providers`/`application`/\n* `provisions`/`container`) — it owns no resources or services, so it has\n* nothing to emulate and is exempt from local-target-capability requirements\n* (ADR-0041). Shared by `localTargetProviders` and every local-target hook\n* iteration.\n*/\nfunction isBuildOnlyExtension(extension) {\n\treturn Object.values(extension.nodes).every((node) => node.kind === \"build\") && extension.providers === void 0 && extension.application === void 0 && extension.provisions === void 0 && extension.container === void 0;\n}\n/** Typed identity — exists so the `composer` section of `prisma.config.ts` gets checked against PrismaAppConfig where it is written. */\nfunction defineConfig(config) {\n\treturn config;\n}\n//#endregion\nexport { isBuildOnlyExtension as a, devEnvironmentDir as i, DEV_ENVIRONMENT_NAME_FILE as n, defineConfig as r, DEV_DIR as t };\n\n//# sourceMappingURL=app-config-CErnR6NK.mjs.map"],"mappings":";;AAEA,MAAM,UAAU;;;;;;AAMhB,SAAS,kBAAkB,aAAa;CACvC,OAAO,GAAG,QAAQ,GAAG,mBAAmB,WAAW;AACpD;;;;;;AAMA,MAAM,4BAA4B;;;;;;;;;AASlC,SAAS,qBAAqB,WAAW;CACxC,OAAO,OAAO,OAAO,UAAU,KAAK,CAAC,CAAC,OAAO,SAAS,KAAK,SAAS,OAAO,KAAK,UAAU,cAAc,KAAK,KAAK,UAAU,gBAAgB,KAAK,KAAK,UAAU,eAAe,KAAK,KAAK,UAAU,cAAc,KAAK;AACvN"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-converge-bS1l9jIf-B1FOgxBQ.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/app-converge-bS1l9jIf.mjs"],"sourcesContent":["import \"./converge-contract-DrO0Jt9l.mjs\";\nimport { createRequire } from \"node:module\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { pathToFileURL } from \"node:url\";\nimport { blindCast } from \"@internal/foundation/casts\";\n//#region package.json\nvar version = \"0.39.0-dev.11\";\n//#endregion\n//#region src/app-converge.ts\nconst ENTRY = \"@prisma/composer/internal/converge\";\nconst CONTRACT_ENTRY = \"@prisma/composer/internal/converge-contract\";\nconst ENTRY_FUNCTIONS = [\n\t\"lower\",\n\t\"convergeInProcess\",\n\t\"localTargetProviders\",\n\t\"devState\"\n];\n/** The Composer version this host runs; every Composer package carries the same one. */\nconst HOST_COMPOSER_VERSION = version;\nfunction unresolvable(appDir, detail, cause) {\n\treturn new CliStructuredError(\"DEPS.CONVERGE_UNRESOLVABLE\", `Could not load the converge from the app's @prisma/composer in \"${appDir}\": ${detail}`, {\n\t\twhy: \"`prisma deploy` and `prisma dev` run the lowering and Alchemy from the app's own install of @prisma/composer, so the app, its extensions and Alchemy share one copy of alchemy.\",\n\t\tfix: \"Install @prisma/composer in the app, at the same version as the Composer the `prisma` CLI runs.\",\n\t\t...cause === void 0 ? {} : { cause }\n\t});\n}\nfunction installedVersion(require) {\n\ttry {\n\t\tconst parsed = JSON.parse(fs.readFileSync(require.resolve(\"@prisma/composer/package.json\"), \"utf8\"));\n\t\treturn typeof parsed === \"object\" && parsed !== null && \"version\" in parsed && typeof parsed.version === \"string\" ? parsed.version : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\nasync function importFile(appDir, file) {\n\ttry {\n\t\treturn await import(pathToFileURL(file).href);\n\t} catch (error) {\n\t\tthrow unresolvable(appDir, `${file} failed to load: ${error instanceof Error ? error.message : String(error)}`, error);\n\t}\n}\nfunction contractMismatch(host, app) {\n\tconst appVersion = app.version ?? \"an unknown version\";\n\tconst update = app.contract < host.contract ? `Upgrade the app's @prisma/composer to a release that speaks converge contract ${host.contract}, such as ${host.version}.` : `Upgrade the \\`prisma\\` CLI to one that runs a Composer speaking converge contract ${app.contract}, such as ${appVersion}.`;\n\treturn new CliStructuredError(\"DEPS.CONVERGE_CONTRACT_MISMATCH\", `The app's @prisma/composer ${appVersion} speaks converge contract ${app.contract}, and the \\`prisma\\` CLI's Composer ${host.version} speaks contract ${host.contract}.`, {\n\t\twhy: \"Deploy and dev call the app's @prisma/composer from the CLI's Composer, and the two read each other's data only when they speak the same converge contract.\",\n\t\tfix: update\n\t});\n}\n/**\n* The app's `lower`, converge and local target functions, from the install `appDir` resolves. Reads the app's\n* converge contract before loading anything else. Raises\n* DEPS.CONVERGE_UNRESOLVABLE when the install is missing or predates the\n* in-process converge, and DEPS.CONVERGE_CONTRACT_MISMATCH when it speaks\n* another contract than `host`.\n*/\nasync function loadAppConvergeEntry(appDir, host = {\n\tcontract: 2,\n\tversion: HOST_COMPOSER_VERSION\n}) {\n\tconst require = createRequire(path.join(appDir, \"package.json\"));\n\tlet contractFile;\n\tlet file;\n\ttry {\n\t\tcontractFile = require.resolve(CONTRACT_ENTRY);\n\t\tfile = require.resolve(ENTRY);\n\t} catch (error) {\n\t\tthrow unresolvable(appDir, `${CONTRACT_ENTRY} or ${ENTRY} does not resolve.`, error);\n\t}\n\tconst { CONVERGE_CONTRACT: appContract } = await importFile(appDir, contractFile);\n\tif (typeof appContract !== \"number\") throw unresolvable(appDir, `${contractFile} exports no CONVERGE_CONTRACT.`);\n\tif (appContract !== host.contract) throw contractMismatch(host, {\n\t\tcontract: appContract,\n\t\tversion: installedVersion(require)\n\t});\n\tconst entry = await importFile(appDir, file);\n\tconst missing = ENTRY_FUNCTIONS.filter((name) => typeof entry[name] !== \"function\");\n\tif (missing.length > 0) throw unresolvable(appDir, `${file} exports no ${missing.join(\", \")}.`);\n\treturn blindCast({\n\t\tlower: entry[\"lower\"],\n\t\tconverge: entry[\"convergeInProcess\"],\n\t\tlocalTargetProviders: entry[\"localTargetProviders\"],\n\t\tdevState: entry[\"devState\"]\n\t});\n}\n//#endregion\nexport { loadAppConvergeEntry as t };\n\n//# sourceMappingURL=app-converge-bS1l9jIf.mjs.map"],"mappings":";;;;;;;AAQA,IAAI,UAAU;AAGd,MAAM,QAAQ;AACd,MAAM,iBAAiB;AACvB,MAAM,kBAAkB;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,cAAc;EAC7C,OAAO,QAAQ,QAAQ,KAAK;CAC7B,SAAS,OAAO;EACf,MAAM,aAAa,QAAQ,GAAG,eAAe,MAAM,MAAM,qBAAqB,KAAK;CACpF;CACA,MAAM,EAAE,mBAAmB,gBAAgB,MAAM,WAAW,QAAQ,YAAY;CAChF,IAAI,OAAO,gBAAgB,UAAU,MAAM,aAAa,QAAQ,GAAG,aAAa,+BAA+B;CAC/G,IAAI,gBAAgB,KAAK,UAAU,MAAM,iBAAiB,MAAM;EAC/D,UAAU;EACV,SAAS,iBAAiB,OAAO;CAClC,CAAC;CACD,MAAM,QAAQ,MAAM,WAAW,QAAQ,IAAI;CAC3C,MAAM,UAAU,gBAAgB,QAAQ,SAAS,OAAO,MAAM,UAAU,UAAU;CAClF,IAAI,QAAQ,SAAS,GAAG,MAAM,aAAa,QAAQ,GAAG,KAAK,cAAc,QAAQ,KAAK,IAAI,EAAE,EAAE;CAC9F,OAAO,UAAU;EAChB,OAAO,MAAM;EACb,UAAU,MAAM;EAChB,sBAAsB,MAAM;EAC5B,UAAU,MAAM;CACjB,CAAC;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"composer-config-QKdY85G--CEXrb2Uc.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/composer-config-QKdY85G-.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n//#region src/composer-config.ts\n/**\n* What makes a `composer` section valid, shared by the CLI's section validator and the programmatic operations.\n* It imports nothing from the CLI engine, because `@prisma/composer` must not depend on it.\n*/\nconst SECTION_FIX = \"Write `composer: composer({ entry: './module.ts', extensions: [...], state: ... })` in prisma.config.ts, with `import { defineConfig as composer } from '@prisma/composer/config'`.\";\nconst MOVE_TO_SECTION_FIX = `${SECTION_FIX} If the project has a prisma-composer.config.ts, move its extensions and state into that section and delete the file.`;\nconst SECTION_IS_THE_ONLY_SOURCE = \"Composer reads its configuration only from the `composer` section of prisma.config.ts.\";\nconst DESCRIPTOR_FIX = \"Use the descriptor the extension factory returns, unchanged, instead of building one by hand.\";\nconst RETIRED_FILE_NAMES = [\n\t\"ts\",\n\t\"mts\",\n\t\"mjs\",\n\t\"js\"\n].map((extension) => `prisma-composer.config.${extension}`);\nconst sectionMissing = {\n\tcode: \"CONFIG.SECTION_MISSING\",\n\tsummary: \"No loaded prisma.config.ts declares a `composer` section.\",\n\twhy: `${SECTION_IS_THE_ONLY_SOURCE} A prisma-composer.config.ts file is no longer read.`,\n\tfix: MOVE_TO_SECTION_FIX\n};\n/** What the generated stack file throws when the file it imports has no `composer` export. */\nfunction noComposerExportMessage(configFile) {\n\treturn `${configFile} declares no \\`composer\\` section. Pass the prisma.config.ts that declares it.`;\n}\nfunction configFileMissing(file) {\n\treturn {\n\t\tcode: \"CONFIG.FILE_MISSING\",\n\t\tsummary: `${file} does not exist.`,\n\t\tfix: \"Pass the path of the prisma.config.ts that declares the `composer` section.\",\n\t\twhere: file\n\t};\n}\n/** A prisma-composer.config.* beside the declaring file would otherwise be silently ignored. */\n/** The path with symlinks resolved; the path itself when it cannot be resolved, so the check never throws. */\nfunction realPath(file) {\n\ttry {\n\t\treturn fs.realpathSync(file);\n\t} catch {\n\t\treturn file;\n\t}\n}\nfunction retiredFileFinding(configFile) {\n\tconst directory = path.dirname(realPath(configFile));\n\tconst found = RETIRED_FILE_NAMES.map((name) => path.join(directory, name)).find((file) => fs.existsSync(file));\n\tif (found === void 0) return void 0;\n\treturn {\n\t\tcode: \"CONFIG.FILE_RETIRED\",\n\t\tsummary: `${found} is no longer read.`,\n\t\twhy: SECTION_IS_THE_ONLY_SOURCE,\n\t\tfix: MOVE_TO_SECTION_FIX,\n\t\twhere: found\n\t};\n}\nfunction isObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction isExtensionDescriptor(value) {\n\treturn isObject(value) && typeof value[\"id\"] === \"string\" && value[\"id\"].length > 0 && isObject(value[\"nodes\"]);\n}\nfunction isStateDescriptor(value) {\n\treturn isObject(value) && typeof value[\"extension\"] === \"string\" && typeof value[\"create\"] === \"function\";\n}\nconst stateInvalid = {\n\tcode: \"CONFIG.FIELD_INVALID\",\n\tsummary: \"`composer.state` must be a state descriptor with a string `extension` and a `create` function.\",\n\tfix: \"Set `state` to the state descriptor an extension provides, e.g. `state: prismaState()`.\",\n\tfield: \"state\"\n};\nconst SECTION_FIELDS = /* @__PURE__ */ new Set([\n\t\"entry\",\n\t\"extensions\",\n\t\"state\",\n\t\"config\",\n\t\"secrets\"\n]);\nconst entryInvalid = {\n\tcode: \"CONFIG.FIELD_INVALID\",\n\tsummary: \"`composer.entry` must be a non-empty string: the path to the module whose default export is the app.\",\n\tfix: \"Set `entry` to that module's path, relative to prisma.config.ts, e.g. `entry: './module.ts'`.\",\n\tfield: \"entry\"\n};\n/** Neither the section's `entry` nor an override names the module whose default export is the app. */\nconst entryMissing = {\n\tcode: \"CONFIG.ENTRY_MISSING\",\n\tsummary: \"No entry module is set, so there is no app to load.\",\n\twhy: \"The entry is the module whose default export is the app root, built with appRoot(...).\",\n\tfix: \"Set `entry: './module.ts'` in the `composer` section of prisma.config.ts, or pass `--entry <path>` (the `entry` input when calling @prisma/composer/control).\",\n\tfield: \"entry\"\n};\nfunction unknownField(key) {\n\treturn {\n\t\tcode: \"CONFIG.FIELD_UNKNOWN\",\n\t\tsummary: `The \\`composer\\` section has no field \\`${key}\\`.`,\n\t\tfix: key === \"composer\" ? \"Pass the `composer` property of the prisma.config.ts export, not the whole export. The section takes only `entry`, `extensions`, `state`, `config` and `secrets`.\" : `Remove \\`${key}\\`. The section takes only \\`entry\\`, \\`extensions\\`, \\`state\\`, \\`config\\` and \\`secrets\\`.`,\n\t\tfield: key\n\t};\n}\nfunction checkExtensions(value) {\n\tif (!Array.isArray(value)) return {\n\t\textensions: [],\n\t\tfindings: [{\n\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\tsummary: \"`composer.extensions` must be an array of extension descriptors.\",\n\t\t\tfix: \"Set `extensions` to the descriptors your extensions provide, e.g. `extensions: [nodeBuild()]`.\",\n\t\t\tfield: \"extensions\"\n\t\t}]\n\t};\n\tconst findings = [];\n\tconst extensions = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const [index, entry] of value.entries()) {\n\t\tconst field = `extensions[${index}]`;\n\t\tif (!isObject(entry)) {\n\t\t\tfindings.push({\n\t\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\t\tsummary: `\\`composer.${field}\\` must be an extension descriptor object.`,\n\t\t\t\tfix: \"Put the descriptor an extension factory returns here, e.g. `nodeBuild()`, not the factory itself.\",\n\t\t\t\tfield\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst id = entry[\"id\"];\n\t\tif (typeof id !== \"string\" || id.length === 0) findings.push({\n\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\tsummary: `\\`composer.${field}.id\\` must be a non-empty string (the extension package name).`,\n\t\t\tfix: DESCRIPTOR_FIX,\n\t\t\tfield: `${field}.id`\n\t\t});\n\t\telse if (seen.has(id)) findings.push({\n\t\t\tcode: \"CONFIG.EXTENSION_DUPLICATE\",\n\t\t\tsummary: `Extension \"${id}\" is listed more than once in \\`composer.extensions\\`.`,\n\t\t\tfix: `Remove the repeated \"${id}\" entry from \\`extensions\\`.`,\n\t\t\tfield: `${field}.id`\n\t\t});\n\t\telse seen.add(id);\n\t\tif (!isObject(entry[\"nodes\"])) findings.push({\n\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\tsummary: `\\`composer.${field}.nodes\\` must be an object (the node-ID → control registry).`,\n\t\t\tfix: DESCRIPTOR_FIX,\n\t\t\tfield: `${field}.nodes`\n\t\t});\n\t\tif (isExtensionDescriptor(entry)) extensions.push(entry);\n\t}\n\treturn {\n\t\tfindings,\n\t\textensions\n\t};\n}\nfunction isAdapterList(value) {\n\treturn Array.isArray(value) && value.every((entry) => typeof entry === \"function\");\n}\nfunction checkAdapters(list, value) {\n\tif (value === void 0) return [];\n\tif (!Array.isArray(value)) return [{\n\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\tsummary: `\\`composer.${list}\\` must be an array of adapters.`,\n\t\tfix: `Set \\`${list}\\` to a list of adapters, e.g. \\`${list}: [dotenv(), environmentVariables()]\\`, imported from '@prisma/composer/config'.`,\n\t\tfield: list\n\t}];\n\treturn value.flatMap((entry, index) => typeof entry === \"function\" ? [] : [{\n\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\tsummary: `\\`composer.${list}[${index}]\\` must be an adapter: a function that receives the environment and returns its values.`,\n\t\tfix: \"Put an adapter here, e.g. `dotenv()`.\",\n\t\tfield: `${list}[${index}]`\n\t}]);\n}\nfunction checkFields(section) {\n\tif (Object.hasOwn(section, \"configPath\")) return {\n\t\tok: false,\n\t\tfindings: [{\n\t\t\tcode: \"CONFIG.FIELD_RETIRED\",\n\t\t\tsummary: \"`composer.configPath` is no longer supported: prisma-composer.config.ts is no longer read.\",\n\t\t\twhy: SECTION_IS_THE_ONLY_SOURCE,\n\t\t\tfix: `Replace \\`configPath\\` with the section itself. ${MOVE_TO_SECTION_FIX}`,\n\t\t\tfield: \"configPath\"\n\t\t}]\n\t};\n\tif (Object.hasOwn(section, \"composer\")) return {\n\t\tok: false,\n\t\tfindings: [unknownField(\"composer\")]\n\t};\n\tconst findings = Object.keys(section).filter((key) => !SECTION_FIELDS.has(key)).map(unknownField);\n\tconst checked = checkExtensions(section[\"extensions\"]);\n\tfindings.push(...checked.findings);\n\tconst state = section[\"state\"];\n\tif (!isStateDescriptor(state)) findings.push(stateInvalid);\n\tconst entry = section[\"entry\"];\n\tconst entryValid = entry === void 0 || typeof entry === \"string\" && entry.length > 0;\n\tif (!entryValid) findings.push(entryInvalid);\n\tconst config = section[\"config\"];\n\tconst secrets = section[\"secrets\"];\n\tfindings.push(...checkAdapters(\"config\", config), ...checkAdapters(\"secrets\", secrets));\n\tconst [first, ...rest] = findings;\n\tif (first === void 0 && isStateDescriptor(state) && entryValid && (config === void 0 || isAdapterList(config)) && (secrets === void 0 || isAdapterList(secrets))) return {\n\t\tok: true,\n\t\tvalue: {\n\t\t\textensions: checked.extensions,\n\t\t\tstate,\n\t\t\t...entry === void 0 ? {} : { entry },\n\t\t\t...config === void 0 ? {} : { config },\n\t\t\t...secrets === void 0 ? {} : { secrets }\n\t\t}\n\t};\n\treturn {\n\t\tok: false,\n\t\tfindings: [first ?? stateInvalid, ...rest]\n\t};\n}\n/**\n* Checks the fields that identify each descriptor and returns the descriptors as the config file's own objects.\n* Never throws: a section's values are user code, and a throwing getter or Proxy trap becomes a finding.\n*/\nfunction checkComposerSection(raw) {\n\tif (!isObject(raw)) return {\n\t\tok: false,\n\t\tfindings: [{\n\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\tsummary: \"The `composer` section of prisma.config.ts must be an object.\",\n\t\t\tfix: SECTION_FIX\n\t\t}]\n\t};\n\ttry {\n\t\treturn checkFields({ ...raw });\n\t} catch (cause) {\n\t\treturn {\n\t\t\tok: false,\n\t\t\tfindings: [{\n\t\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\t\tsummary: \"The `composer` section of prisma.config.ts could not be read.\",\n\t\t\t\twhy: `Reading it threw: ${cause instanceof Error ? cause.message : String(cause)}`,\n\t\t\t\tfix: SECTION_FIX\n\t\t\t}]\n\t\t};\n\t}\n}\n/**\n* The whole check, shared by the section validator and the programmatic operations so both report the same findings in the same order: the retired file beside the declaring `configFile` (resolved through symlinks), then every field finding.\n*/\nfunction checkComposerConfig(raw, configFile) {\n\tconst retired = retiredFileFinding(configFile);\n\tconst checked = checkComposerSection(raw);\n\tif (retired === void 0) return checked;\n\treturn {\n\t\tok: false,\n\t\tfindings: checked.ok ? [retired] : [retired, ...checked.findings]\n\t};\n}\n//#endregion\nexport { sectionMissing as a, noComposerExportMessage as i, configFileMissing as n, entryMissing as r, checkComposerConfig as t };\n\n//# sourceMappingURL=composer-config-QKdY85G-.mjs.map"],"mapp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