renovate 44.60.0 → 44.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"config-validator.js","names":["getFileConfig"],"sources":["../lib/config-validator.ts"],"sourcesContent":["#!/usr/bin/env node\nimport 'source-map-support/register.js';\nimport './punycode.cjs';\n\nimport { styleText } from 'node:util';\nimport { isNonEmptyStringAndNotWhitespace } from '@sindresorhus/is';\nimport { Command, CommanderError } from 'commander';\nimport { dequal } from 'dequal';\nimport { diffLines } from 'diff';\nimport fs from 'fs-extra';\nimport { getConfigFileNames } from './config/app-strings.ts';\nimport { GlobalConfig } from './config/global.ts';\nimport { massageConfig } from './config/massage.ts';\nimport { migrateConfig } from './config/migration.ts';\nimport type { RenovateConfig } from './config/types.ts';\nimport { validateConfig } from './config/validation.ts';\nimport { pkg } from './expose.ts';\nimport { init, logger } from './logger/index.ts';\nimport { getEnv } from './util/env.ts';\nimport { add as addHostRule } from './util/host-rules.ts';\nimport { regEx, regexEngineStatus } from './util/regex.ts';\nimport { getConfig as getFileConfig } from './workers/global/config/parse/file.ts';\nimport { parseConfigs } from './workers/global/config/parse/index.ts';\nimport { getParsedContent } from './workers/global/config/parse/util.ts';\n\nawait init();\n\nconst { pathExists, readFile } = fs;\n\nlet returnVal = 0;\n\n/**\n * Make sure that we've resolved configuration from the different places that Renovate users would expect them to be specified\n *\n * This then allows a `configType=repo` config to i.e. be validated alongside a `config.js` or `env RENOVATE_ALLOWED_COMMANDS=...`\n *\n * Note that we intentionally don't fully initialize Renovate and its modules, as we're not fully running, and it would require a Platform to be configured\n * */\nasync function partiallyGlobalInitialize(): Promise<void> {\n // NOTE that this doesn't allow command-line arguments\n const globalConfig = await parseConfigs(getEnv(), []);\n GlobalConfig.set(globalConfig);\n\n if (globalConfig.hostRules) {\n for (const hostRule of globalConfig.hostRules) {\n addHostRule(hostRule);\n }\n }\n}\n\nasync function validate(\n configType: 'global' | 'repo',\n desc: string,\n config: RenovateConfig,\n strict: boolean,\n isPreset = false,\n): Promise<void> {\n if (config.hostRules) {\n for (const hostRule of config.hostRules) {\n addHostRule(hostRule);\n }\n }\n const { isMigrated, migratedConfig } = migrateConfig(config);\n if (isMigrated) {\n logger.warn(\n {\n oldConfig: config,\n newConfig: migratedConfig,\n },\n 'Config migration necessary',\n );\n const changedObjects = diffLines(\n JSON.stringify(config, null, 2),\n JSON.stringify(migratedConfig, null, 2),\n { ignoreWhitespace: false, newlineIsToken: false },\n );\n const added = styleText('green', '+ ');\n const removed = styleText('red', '- ');\n const msg = changedObjects\n .flatMap((part) => {\n let linePrefix: string;\n if (part.added) {\n linePrefix = added;\n } else if (part.removed) {\n linePrefix = removed;\n } else {\n linePrefix = ' ';\n }\n return part.value\n .split('\\n')\n .filter(isNonEmptyStringAndNotWhitespace)\n .map((line) =>\n line.replace(regEx(/^(?<ws> *)/), `${linePrefix}$<ws>`),\n );\n })\n .join('\\n');\n // oxlint-disable-next-line renovate/logger-static-message -- the multi-line, colorized diff must be interpolated to stay readable; as a metadata field it is JSON-escaped onto one line\n logger.warn(`Config migration diff:\\n${msg}`);\n if (strict) {\n returnVal = 1;\n }\n }\n const massagedConfig = massageConfig(migratedConfig);\n const res = await validateConfig(configType, massagedConfig, isPreset);\n if (res.errors.length) {\n logger.error(\n { file: desc, errors: res.errors },\n 'Found errors in configuration',\n );\n returnVal = 1;\n }\n if (res.warnings.length) {\n logger.warn(\n { file: desc, warnings: res.warnings },\n 'Found errors in configuration',\n );\n returnVal = 1;\n }\n}\n\ninterface PackageJson {\n renovate?: RenovateConfig;\n 'renovate-config'?: Record<string, RenovateConfig>;\n}\n\n(async () => {\n await partiallyGlobalInitialize();\n\n const program = new Command('renovate-config-validator')\n .summary('Validate Renovate configuration files')\n .description(\n `Validate your Renovate configuration (repo config, shared presets or global configuration) files\\n` +\n // oxlint-disable-next-line renovate/no-hardcoded-docs-url -- CLI help text, no config available\n 'If no [config-files...] are given, renovate-config-validator will look at the default config file locations (https://docs.renovatebot.com/configuration-options/)',\n )\n .addHelpText(\n 'after',\n // oxlint-disable-next-line renovate/no-hardcoded-docs-url -- CLI help text, no config available\n `\nWhen specifying [config-files...], Renovate will treat them as global self-hosted configuration files. You can disable this behaviour with --no-global\n\nExamples:\n\n $ renovate-config-validator\n $ renovate-config-validator --strict\n $ renovate-config-validator first_config.json\n $ renovate-config-validator --strict config.js\n $ renovate-config-validator --no-global renovate.json5\n $ env RENOVATE_CONFIG_FILE=obscure-name.json renovate-config-validator\n\nGlobal configuration:\n\nIf you have specified global self-hosted configuration (https://docs.renovatebot.com/self-hosted-configuration/) in environment variables or in a \\`config.js\\`, this will be detected:\n\n $ env RENOVATE_ALLOWED_ENV='[\"GO*\"]' renovate-config-validator\n # if passing the filename, make sure it's not validating as a global config\n $ env RENOVATE_ALLOWED_ENV='[\"GO*\"]' renovate-config-validator --no-global renovate.json`,\n )\n .argument('[config-files...]')\n .version(pkg.version, '-v, --version')\n .option(\n '--strict',\n 'Fail command if any configuration warnings, errors, or a migration is needed',\n )\n .option(\n '--no-global',\n 'When specifying [config-files], do not treat them as global self-hosted configuration file(s)',\n true,\n )\n // allow us to manage the exit code\n .exitOverride();\n\n program.action(async (files, opts) => {\n const strict = opts.strict ?? false;\n let filesValidated = 0;\n\n // without RE2, patterns are checked by RegExp, which accepts syntax RE2 rejects (e.g. lookahead)\n if (regexEngineStatus.type === 'unavailable') {\n logger.warn(\n { err: regexEngineStatus.err },\n 'RE2 not usable, falling back to RegExp: regex validation may be inaccurate',\n );\n } else if (regexEngineStatus.type === 'ignored') {\n logger.debug(\n 'RE2 ignored via RENOVATE_X_IGNORE_RE2: regex validation may be inaccurate',\n );\n }\n\n if (files.length) {\n let isGlobalConfig = true;\n if (opts.global === false) {\n isGlobalConfig = false;\n }\n const configType = isGlobalConfig ? 'global' : 'repo';\n for (const file of files) {\n try {\n if (!(await pathExists(file))) {\n returnVal = 1;\n logger.error({ file }, 'File does not exist');\n break;\n }\n const parsedContent = await getParsedContent(file);\n try {\n logger.info(`Validating ${file} as ${configType} config`);\n await validate(configType, file, parsedContent, strict);\n } catch (err) {\n logger.warn({ file, err }, 'File is not valid Renovate config');\n returnVal = 1;\n }\n } catch (err) {\n logger.warn({ file, err }, 'File could not be parsed');\n returnVal = 1;\n }\n\n filesValidated++;\n }\n } else {\n for (const file of getConfigFileNames().filter(\n (name) => name !== 'package.json',\n )) {\n try {\n if (!(await pathExists(file))) {\n continue;\n }\n const parsedContent = await getParsedContent(file);\n try {\n logger.info(`Validating ${file}`);\n await validate('repo', file, parsedContent, strict);\n } catch (err) {\n logger.warn({ file, err }, 'File is not valid Renovate config');\n returnVal = 1;\n }\n } catch (err) {\n logger.warn({ file, err }, 'File could not be parsed');\n returnVal = 1;\n }\n\n filesValidated++;\n }\n try {\n const pkgJson = JSON.parse(\n await readFile('package.json', 'utf8'),\n ) as PackageJson;\n if (pkgJson.renovate) {\n logger.info(`Validating package.json > renovate`);\n await validate(\n 'repo',\n 'package.json > renovate',\n pkgJson.renovate,\n strict,\n );\n\n filesValidated++;\n }\n if (pkgJson['renovate-config']) {\n logger.info(`Validating package.json > renovate-config`);\n for (const presetConfig of Object.values(\n pkgJson['renovate-config'],\n )) {\n await validate(\n 'repo',\n 'package.json > renovate-config',\n presetConfig,\n strict,\n true,\n );\n\n filesValidated++;\n }\n }\n } catch {\n // ignore\n }\n try {\n const env = getEnv();\n const fileConfig = await getFileConfig(env);\n if (!dequal(fileConfig, {})) {\n const file = env.RENOVATE_CONFIG_FILE ?? 'config.js';\n logger.info(`Validating ${file}`);\n try {\n await validate('global', file, fileConfig, strict);\n } catch (err) {\n logger.error({ file, err }, 'File is not valid Renovate config');\n returnVal = 1;\n }\n filesValidated++;\n }\n } catch {\n // ignore\n }\n }\n if (returnVal === 0 && filesValidated) {\n logger.info(\n `Config validated successfully against ${filesValidated} file(s)`,\n );\n } else if (!filesValidated) {\n logger.warn(`No files to perform configuration validation against`);\n }\n // Use exitCode (not process.exit) so async log streams can flush\n process.exitCode = returnVal;\n });\n\n await program.parseAsync();\n})().catch((e) => {\n // Commander throws an error at the end of Action execution i.e. as part of the `help` and `version` commands, and so we don't want to return an error code in this case\n if (\n e instanceof CommanderError &&\n (e.code === 'commander.helpDisplayed' || e.code === 'commander.version')\n ) {\n return;\n }\n\n // oxlint-disable-next-line no-console -- intentional: display critical error on CLI\n console.error(e);\n process.exit(99);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,KAAK;AAEX,MAAM,EAAE,YAAY,aAAa;AAEjC,IAAI,YAAY;;;;;;;;AAShB,eAAe,4BAA2C;CAExD,MAAM,eAAe,MAAM,aAAa,OAAO,GAAG,CAAC,CAAC;CACpD,aAAa,IAAI,YAAY;CAE7B,IAAI,aAAa,WACf,KAAK,MAAM,YAAY,aAAa,WAClC,IAAY,QAAQ;AAG1B;AAEA,eAAe,SACb,YACA,MACA,QACA,QACA,WAAW,OACI;CACf,IAAI,OAAO,WACT,KAAK,MAAM,YAAY,OAAO,WAC5B,IAAY,QAAQ;CAGxB,MAAM,EAAE,YAAY,mBAAmB,cAAc,MAAM;CAC3D,IAAI,YAAY;EACd,OAAO,KACL;GACE,WAAW;GACX,WAAW;EACb,GACA,4BACF;EACA,MAAM,iBAAiB,UACrB,KAAK,UAAU,QAAQ,MAAM,CAAC,GAC9B,KAAK,UAAU,gBAAgB,MAAM,CAAC,GACtC;GAAE,kBAAkB;GAAO,gBAAgB;EAAM,CACnD;EACA,MAAM,QAAQ,UAAU,SAAS,IAAI;EACrC,MAAM,UAAU,UAAU,OAAO,IAAI;EACrC,MAAM,MAAM,eACT,SAAS,SAAS;GACjB,IAAI;GACJ,IAAI,KAAK,OACP,aAAa;QACR,IAAI,KAAK,SACd,aAAa;QAEb,aAAa;GAEf,OAAO,KAAK,MACT,MAAM,IAAI,CAAC,CACX,OAAO,gCAAgC,CAAC,CACxC,KAAK,SACJ,KAAK,QAAQ,MAAM,YAAY,GAAG,GA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AAC,OAAO,YAAY,CAAC,CAAC,GAAG;KAC3B,MAAM,OAAO,IAAI,wBAAwB;KACzC,OAAO,KAAK,cAAc,MAAM;KAChC,IAAI;MACF,MAAM,SAAS,UAAU,MAAM,YAAY,MAAM;KACnD,SAAS,KAAK;MACZ,OAAO,MAAM;OAAE;OAAM;MAAI,GAAG,mCAAmC;MAC/D,YAAY;KACd;KACA;IACF;GACF,QAAQ,CAER;EACF;EACA,IAAI,cAAc,KAAK,gBACrB,OAAO,KACL,yCAAyC,eAAe,SAC1D;OACK,IAAI,CAAC,gBACV,OAAO,KAAK,sDAAsD;EAGpE,QAAQ,WAAW;CACrB,CAAC;CAED,MAAM,QAAQ,WAAW;AAC3B,EAAA,CAAG,CAAC,CAAC,OAAO,MAAM;CAEhB,IACE,aAAa,mBACZ,EAAE,SAAS,6BAA6B,EAAE,SAAS,sBAEpD;CAIF,QAAQ,MAAM,CAAC;CACf,QAAQ,KAAK,EAAE;AACjB,CAAC"}
1
+ {"version":3,"file":"config-validator.js","names":["getFileConfig"],"sources":["../lib/config-validator.ts"],"sourcesContent":["#!/usr/bin/env node\nimport 'source-map-support/register.js';\nimport './punycode.cjs';\n\nimport { styleText } from 'node:util';\nimport { isNonEmptyStringAndNotWhitespace } from '@sindresorhus/is';\nimport { Command, CommanderError } from 'commander';\nimport { dequal } from 'dequal';\nimport { diffLines } from 'diff';\nimport fs from 'fs-extra';\nimport { getConfigFileNames } from './config/app-strings.ts';\nimport { GlobalConfig } from './config/global.ts';\nimport { massageConfig } from './config/massage.ts';\nimport { migrateConfig } from './config/migration.ts';\nimport type { AllConfig, RenovateConfig } from './config/types.ts';\nimport { validateConfig } from './config/validation.ts';\nimport { pkg } from './expose.ts';\nimport { init, logger } from './logger/index.ts';\nimport { getEnv } from './util/env.ts';\nimport { add as addHostRule } from './util/host-rules.ts';\nimport { regEx, regexEngineStatus } from './util/regex.ts';\nimport { getConfig as getFileConfig } from './workers/global/config/parse/file.ts';\nimport { parseConfigs } from './workers/global/config/parse/index.ts';\nimport { getParsedContent } from './workers/global/config/parse/util.ts';\n\nawait init();\n\nconst { pathExists, readFile } = fs;\n\nlet returnVal = 0;\n\n/**\n * Make sure that we've resolved configuration from the different places that Renovate users would expect them to be specified\n *\n * This then allows a `configType=repo` config to i.e. be validated alongside a `config.js` or `env RENOVATE_ALLOWED_COMMANDS=...`\n *\n * Note that we intentionally don't fully initialize Renovate and its modules, as we're not fully running, and it would require a Platform to be configured\n * */\nasync function partiallyGlobalInitialize(): Promise<void> {\n // NOTE that this doesn't allow command-line arguments\n const globalConfig = await parseConfigs(getEnv(), []);\n GlobalConfig.set(globalConfig);\n\n if (globalConfig.hostRules) {\n // the self-hosted admin's own headers get no exemption from `allowedHeaders` either, as `applyHostRule` filters the rule it matches by header name alone whoever set it - so `addHostRule` drops them here too, with a WARN, rather than leave them to be silently discarded at request time\n for (const hostRule of globalConfig.hostRules) {\n addHostRule(hostRule);\n }\n }\n}\n\nasync function validate(\n configType: 'global' | 'repo',\n desc: string,\n config: RenovateConfig,\n strict: boolean,\n isPreset = false,\n): Promise<void> {\n if (config.hostRules) {\n // `allowedHeaders` enforces the checks regardless of whether it's global self-hosted administrator config, or repo config\n // a global config file being validated brings its own `allowedHeaders`, and should be validated against it, like a real run would after parsing it\n const allowedHeaders =\n configType === 'global'\n ? ((config as AllConfig).allowedHeaders ??\n GlobalConfig.get('allowedHeaders'))\n : GlobalConfig.get('allowedHeaders');\n for (const hostRule of config.hostRules) {\n addHostRule(hostRule, { allowedHeaders });\n }\n }\n const { isMigrated, migratedConfig } = migrateConfig(config);\n if (isMigrated) {\n logger.warn(\n {\n oldConfig: config,\n newConfig: migratedConfig,\n },\n 'Config migration necessary',\n );\n const changedObjects = diffLines(\n JSON.stringify(config, null, 2),\n JSON.stringify(migratedConfig, null, 2),\n { ignoreWhitespace: false, newlineIsToken: false },\n );\n const added = styleText('green', '+ ');\n const removed = styleText('red', '- ');\n const msg = changedObjects\n .flatMap((part) => {\n let linePrefix: string;\n if (part.added) {\n linePrefix = added;\n } else if (part.removed) {\n linePrefix = removed;\n } else {\n linePrefix = ' ';\n }\n return part.value\n .split('\\n')\n .filter(isNonEmptyStringAndNotWhitespace)\n .map((line) =>\n line.replace(regEx(/^(?<ws> *)/), `${linePrefix}$<ws>`),\n );\n })\n .join('\\n');\n // oxlint-disable-next-line renovate/logger-static-message -- the multi-line, colorized diff must be interpolated to stay readable; as a metadata field it is JSON-escaped onto one line\n logger.warn(`Config migration diff:\\n${msg}`);\n if (strict) {\n returnVal = 1;\n }\n }\n const massagedConfig = massageConfig(migratedConfig);\n const res = await validateConfig(configType, massagedConfig, isPreset);\n if (res.errors.length) {\n logger.error(\n { file: desc, errors: res.errors },\n 'Found errors in configuration',\n );\n returnVal = 1;\n }\n if (res.warnings.length) {\n logger.warn(\n { file: desc, warnings: res.warnings },\n 'Found errors in configuration',\n );\n returnVal = 1;\n }\n}\n\ninterface PackageJson {\n renovate?: RenovateConfig;\n 'renovate-config'?: Record<string, RenovateConfig>;\n}\n\n(async () => {\n await partiallyGlobalInitialize();\n\n const program = new Command('renovate-config-validator')\n .summary('Validate Renovate configuration files')\n .description(\n `Validate your Renovate configuration (repo config, shared presets or global configuration) files\\n` +\n // oxlint-disable-next-line renovate/no-hardcoded-docs-url -- CLI help text, no config available\n 'If no [config-files...] are given, renovate-config-validator will look at the default config file locations (https://docs.renovatebot.com/configuration-options/)',\n )\n .addHelpText(\n 'after',\n // oxlint-disable-next-line renovate/no-hardcoded-docs-url -- CLI help text, no config available\n `\nWhen specifying [config-files...], Renovate will treat them as global self-hosted configuration files. You can disable this behaviour with --no-global\n\nExamples:\n\n $ renovate-config-validator\n $ renovate-config-validator --strict\n $ renovate-config-validator first_config.json\n $ renovate-config-validator --strict config.js\n $ renovate-config-validator --no-global renovate.json5\n $ env RENOVATE_CONFIG_FILE=obscure-name.json renovate-config-validator\n\nGlobal configuration:\n\nIf you have specified global self-hosted configuration (https://docs.renovatebot.com/self-hosted-configuration/) in environment variables or in a \\`config.js\\`, this will be detected:\n\n $ env RENOVATE_ALLOWED_ENV='[\"GO*\"]' renovate-config-validator\n # if passing the filename, make sure it's not validating as a global config\n $ env RENOVATE_ALLOWED_ENV='[\"GO*\"]' renovate-config-validator --no-global renovate.json`,\n )\n .argument('[config-files...]')\n .version(pkg.version, '-v, --version')\n .option(\n '--strict',\n 'Fail command if any configuration warnings, errors, or a migration is needed',\n )\n .option(\n '--no-global',\n 'When specifying [config-files], do not treat them as global self-hosted configuration file(s)',\n true,\n )\n // allow us to manage the exit code\n .exitOverride();\n\n program.action(async (files, opts) => {\n const strict = opts.strict ?? false;\n let filesValidated = 0;\n\n // without RE2, patterns are checked by RegExp, which accepts syntax RE2 rejects (e.g. lookahead)\n if (regexEngineStatus.type === 'unavailable') {\n logger.warn(\n { err: regexEngineStatus.err },\n 'RE2 not usable, falling back to RegExp: regex validation may be inaccurate',\n );\n } else if (regexEngineStatus.type === 'ignored') {\n logger.debug(\n 'RE2 ignored via RENOVATE_X_IGNORE_RE2: regex validation may be inaccurate',\n );\n }\n\n if (files.length) {\n let isGlobalConfig = true;\n if (opts.global === false) {\n isGlobalConfig = false;\n }\n const configType = isGlobalConfig ? 'global' : 'repo';\n for (const file of files) {\n try {\n if (!(await pathExists(file))) {\n returnVal = 1;\n logger.error({ file }, 'File does not exist');\n break;\n }\n const parsedContent = await getParsedContent(file);\n try {\n logger.info(`Validating ${file} as ${configType} config`);\n await validate(configType, file, parsedContent, strict);\n } catch (err) {\n logger.warn({ file, err }, 'File is not valid Renovate config');\n returnVal = 1;\n }\n } catch (err) {\n logger.warn({ file, err }, 'File could not be parsed');\n returnVal = 1;\n }\n\n filesValidated++;\n }\n } else {\n for (const file of getConfigFileNames().filter(\n (name) => name !== 'package.json',\n )) {\n try {\n if (!(await pathExists(file))) {\n continue;\n }\n const parsedContent = await getParsedContent(file);\n try {\n logger.info(`Validating ${file}`);\n await validate('repo', file, parsedContent, strict);\n } catch (err) {\n logger.warn({ file, err }, 'File is not valid Renovate config');\n returnVal = 1;\n }\n } catch (err) {\n logger.warn({ file, err }, 'File could not be parsed');\n returnVal = 1;\n }\n\n filesValidated++;\n }\n try {\n const pkgJson = JSON.parse(\n await readFile('package.json', 'utf8'),\n ) as PackageJson;\n if (pkgJson.renovate) {\n logger.info(`Validating package.json > renovate`);\n await validate(\n 'repo',\n 'package.json > renovate',\n pkgJson.renovate,\n strict,\n );\n\n filesValidated++;\n }\n if (pkgJson['renovate-config']) {\n logger.info(`Validating package.json > renovate-config`);\n for (const presetConfig of Object.values(\n pkgJson['renovate-config'],\n )) {\n await validate(\n 'repo',\n 'package.json > renovate-config',\n presetConfig,\n strict,\n true,\n );\n\n filesValidated++;\n }\n }\n } catch {\n // ignore\n }\n try {\n const env = getEnv();\n const fileConfig = await getFileConfig(env);\n if (!dequal(fileConfig, {})) {\n const file = env.RENOVATE_CONFIG_FILE ?? 'config.js';\n logger.info(`Validating ${file}`);\n try {\n await validate('global', file, fileConfig, strict);\n } catch (err) {\n logger.error({ file, err }, 'File is not valid Renovate config');\n returnVal = 1;\n }\n filesValidated++;\n }\n } catch {\n // ignore\n }\n }\n if (returnVal === 0 && filesValidated) {\n logger.info(\n `Config validated successfully against ${filesValidated} file(s)`,\n );\n } else if (!filesValidated) {\n logger.warn(`No files to perform configuration validation against`);\n }\n // Use exitCode (not process.exit) so async log streams can flush\n process.exitCode = returnVal;\n });\n\n await program.parseAsync();\n})().catch((e) => {\n // Commander throws an error at the end of Action execution i.e. as part of the `help` and `version` commands, and so we don't want to return an error code in this case\n if (\n e instanceof CommanderError &&\n (e.code === 'commander.helpDisplayed' || e.code === 'commander.version')\n ) {\n return;\n }\n\n // oxlint-disable-next-line no-console -- intentional: display critical error on CLI\n console.error(e);\n process.exit(99);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,KAAK;AAEX,MAAM,EAAE,YAAY,aAAa;AAEjC,IAAI,YAAY;;;;;;;;AAShB,eAAe,4BAA2C;CAExD,MAA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KAAK,gBACrB,OAAO,KACL,yCAAyC,eAAe,SAC1D;OACK,IAAI,CAAC,gBACV,OAAO,KAAK,sDAAsD;EAGpE,QAAQ,WAAW;CACrB,CAAC;CAED,MAAM,QAAQ,WAAW;AAC3B,EAAA,CAAG,CAAC,CAAC,OAAO,MAAM;CAEhB,IACE,aAAa,mBACZ,EAAE,SAAS,6BAA6B,EAAE,SAAS,sBAEpD;CAIF,QAAQ,MAAM,CAAC;CACf,QAAQ,KAAK,EAAE;AACjB,CAAC"}
@@ -1,23 +1,9 @@
1
1
  import { logger } from "../../../logger/index.js";
2
- import { joinUrlParts } from "../../../util/url.js";
2
+ import { getQueryString, joinUrlParts } from "../../../util/url.js";
3
3
  import { withCache } from "../../../util/cache/package/with-cache.js";
4
- import { asTimestamp } from "../../../util/timestamp.js";
5
4
  import { Datasource } from "../datasource.js";
5
+ import { OrbPackagesResponse } from "./schema.js";
6
6
  //#region lib/modules/datasource/orb/index.ts
7
- const MAX_VERSIONS = 100;
8
- const query = `
9
- query($packageName: String!, $maxVersions: Int!) {
10
- orb(name: $packageName) {
11
- name,
12
- homeUrl,
13
- isPrivate,
14
- versions(count: $maxVersions) {
15
- version,
16
- createdAt
17
- }
18
- }
19
- }
20
- `;
21
7
  var OrbDatasource = class OrbDatasource extends Datasource {
22
8
  static id = "orb";
23
9
  constructor() {
@@ -27,41 +13,33 @@ var OrbDatasource = class OrbDatasource extends Datasource {
27
13
  defaultRegistryUrls = ["https://circleci.com/"];
28
14
  registryStrategy = "hunt";
29
15
  releaseTimestampSupport = true;
30
- releaseTimestampNote = "The release timestamp is determined from the `createdAt` field in the results.";
16
+ releaseTimestampNote = "The release timestamp is determined from the `created_at` field in the results.";
31
17
  async _getReleases({ packageName, registryUrl }) {
32
18
  /* v8 ignore next -- should never happen */
33
19
  if (!registryUrl) return null;
34
- const url = joinUrlParts(registryUrl, "graphql-unstable");
35
- const body = {
36
- query,
37
- variables: {
38
- packageName,
39
- maxVersions: MAX_VERSIONS
20
+ const url = `${joinUrlParts(registryUrl, "api/v3/orb/packages")}?${getQueryString({ "filter[name]": packageName })}`;
21
+ try {
22
+ const { body } = await this.http.getJson(url, OrbPackagesResponse);
23
+ const pkg = body.data[0];
24
+ if (!pkg) {
25
+ logger.debug({ packageName }, `Failed to look up orb ${packageName}`);
26
+ return null;
40
27
  }
41
- };
42
- const res = (await this.http.postJson(url, { body })).body;
43
- if (!res?.data?.orb) {
44
- logger.debug({ res }, `Failed to look up orb ${packageName}`);
45
- return null;
28
+ const dep = {
29
+ homepage: pkg.homeUrl?.length ? pkg.homeUrl : `https://circleci.com/developer/orbs/orb/${packageName}`,
30
+ isPrivate: pkg.isPrivate,
31
+ releases: pkg.releases
32
+ };
33
+ logger.trace({ dep }, "dep");
34
+ return dep;
35
+ } catch (err) {
36
+ this.handleGenericErrors(err);
46
37
  }
47
- const { orb } = res.data;
48
- const homepage = orb.homeUrl?.length ? orb.homeUrl : `https://circleci.com/developer/orbs/orb/${packageName}`;
49
- const releases = orb.versions.map(({ version, createdAt }) => ({
50
- version,
51
- releaseTimestamp: asTimestamp(createdAt)
52
- }));
53
- const dep = {
54
- homepage,
55
- isPrivate: !!orb.isPrivate,
56
- releases
57
- };
58
- logger.trace({ dep }, "dep");
59
- return dep;
60
38
  }
61
39
  getReleases(config) {
62
40
  return withCache({
63
41
  namespace: `datasource-${OrbDatasource.id}`,
64
- key: config.packageName,
42
+ key: `${config.registryUrl}:${config.packageName}`,
65
43
  fallback: true
66
44
  }, () => this._getReleases(config));
67
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/datasource/orb/index.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport { joinUrlParts } from '../../../util/url.ts';\nimport { Datasource } from '../datasource.ts';\nimport type { GetReleasesConfig, ReleaseResult } from '../types.ts';\nimport type { OrbResponse } from './types.ts';\n\nconst MAX_VERSIONS = 100;\n\nconst query = `\nquery($packageName: String!, $maxVersions: Int!) {\n orb(name: $packageName) {\n name,\n homeUrl,\n isPrivate,\n versions(count: $maxVersions) {\n version,\n createdAt\n }\n }\n}\n`;\n\nexport class OrbDatasource extends Datasource {\n static readonly id = 'orb';\n\n constructor() {\n super(OrbDatasource.id);\n }\n\n override readonly customRegistrySupport = true;\n\n override readonly defaultRegistryUrls = ['https://circleci.com/'];\n override readonly registryStrategy = 'hunt';\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from the `createdAt` field in the results.';\n\n private async _getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore next -- should never happen */\n if (!registryUrl) {\n return null;\n }\n const url = joinUrlParts(registryUrl, 'graphql-unstable');\n const body = {\n query,\n variables: { packageName, maxVersions: MAX_VERSIONS },\n };\n const res = (\n await this.http.postJson<OrbResponse>(url, {\n body,\n })\n ).body;\n if (!res?.data?.orb) {\n logger.debug({ res }, `Failed to look up orb ${packageName}`);\n return null;\n }\n\n const { orb } = res.data;\n // Simplify response before caching and returning\n const homepage = orb.homeUrl?.length\n ? orb.homeUrl\n : `https://circleci.com/developer/orbs/orb/${packageName}`;\n const releases = orb.versions.map(({ version, createdAt }) => ({\n version,\n releaseTimestamp: asTimestamp(createdAt),\n }));\n\n const dep = { homepage, isPrivate: !!orb.isPrivate, releases };\n logger.trace({ dep }, 'dep');\n return dep;\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${OrbDatasource.id}`,\n key: config.packageName,\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n}\n"],"mappings":";;;;;;AAQA,MAAM,eAAe;AAErB,MAAM,QAAQ;;;;;;;;;;;;;AAcd,IAAa,gBAAb,MAAa,sBAAsB,WAAW;CAC5C,OAAgB,KAAK;CAErB,cAAc;EACZ,MAAM,cAAc,EAAE;CACxB;CAEA,wBAA0C;CAE1C,sBAAwC,CAAC,uBAAuB;CAChE,mBAAqC;CAErC,0BAA4C;CAC5C,uBACE;CAEF,MAAc,aAAa,EACzB,aACA,eACmD;;EAEnD,IAAI,CAAC,aACH,OAAO;EAET,MAAM,MAAM,aAAa,aAAa,kBAAkB;EACxD,MAAM,OAAO;GACX;GACA,WAAW;IAAE;IAAa,aAAa;GAAa;EACtD;EACA,MAAM,OACJ,MAAM,KAAK,KAAK,SAAsB,KAAK,EACzC,KACF,CAAC,EAAA,CACD;EACF,IAAI,CAAC,KAAK,MAAM,KAAK;GACnB,OAAO,MAAM,EAAE,IAAI,GAAG,yBAAyB,aAAa;GAC5D,OAAO;EACT;EAEA,MAAM,EAAE,QAAQ,IAAI;EAEpB,MAAM,WAAW,IAAI,SAAS,SAC1B,IAAI,UACJ,2CAA2C;EAC/C,MAAM,WAAW,IAAI,SAAS,KAAK,EAAE,SAAS,iBAAiB;GAC7D;GACA,kBAAkB,YAAY,SAAS;EACzC,EAAE;EAEF,MAAM,MAAM;GAAE;GAAU,WAAW,CAAC,CAAC,IAAI;GAAW;EAAS;EAC7D,OAAO,MAAM,EAAE,IAAI,GAAG,KAAK;EAC3B,OAAO;CACT;CAEA,YAAY,QAA0D;EACpE,OAAO,UACL;GACE,WAAW,cAAc,cAAc;GACvC,KAAK,OAAO;GACZ,UAAU;EACZ,SACM,KAAK,aAAa,MAAM,CAChC;CACF;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/datasource/orb/index.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { getQueryString, joinUrlParts } from '../../../util/url.ts';\nimport { Datasource } from '../datasource.ts';\nimport type { GetReleasesConfig, ReleaseResult } from '../types.ts';\nimport { OrbPackagesResponse } from './schema.ts';\n\nexport class OrbDatasource extends Datasource {\n static readonly id = 'orb';\n\n constructor() {\n super(OrbDatasource.id);\n }\n\n override readonly customRegistrySupport = true;\n\n override readonly defaultRegistryUrls = ['https://circleci.com/'];\n override readonly registryStrategy = 'hunt';\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from the `created_at` field in the results.';\n\n private async _getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore next -- should never happen */\n if (!registryUrl) {\n return null;\n }\n const url = `${joinUrlParts(\n registryUrl,\n 'api/v3/orb/packages',\n )}?${getQueryString({ 'filter[name]': packageName })}`;\n try {\n const { body } = await this.http.getJson(url, OrbPackagesResponse);\n const pkg = body.data[0];\n if (!pkg) {\n logger.debug({ packageName }, `Failed to look up orb ${packageName}`);\n return null;\n }\n\n // The homepage fallback uses the requested packageName, which the schema\n // has no access to, so it is built here rather than in the transform.\n const homepage = pkg.homeUrl?.length\n ? pkg.homeUrl\n : `https://circleci.com/developer/orbs/orb/${packageName}`;\n const dep = {\n homepage,\n isPrivate: pkg.isPrivate,\n releases: pkg.releases,\n };\n logger.trace({ dep }, 'dep');\n return dep;\n } catch (err) {\n this.handleGenericErrors(err);\n }\n }\n\n override getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${OrbDatasource.id}`,\n key: `${config.registryUrl}:${config.packageName}`,\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n}\n"],"mappings":";;;;;;AAOA,IAAa,gBAAb,MAAa,sBAAsB,WAAW;CAC5C,OAAgB,KAAK;CAErB,cAAc;EACZ,MAAM,cAAc,EAAE;CACxB;CAEA,wBAA0C;CAE1C,sBAAwC,CAAC,uBAAuB;CAChE,mBAAqC;CAErC,0BAA4C;CAC5C,uBACE;CAEF,MAAc,aAAa,EACzB,aACA,eACmD;;EAEnD,IAAI,CAAC,aACH,OAAO;EAET,MAAM,MAAM,GAAG,aACb,aACA,qBACF,EAAE,GAAG,eAAe,EAAE,gBAAgB,YAAY,CAAC;EACnD,IAAI;GACF,MAAM,EAAE,SAAS,MAAM,KAAK,KAAK,QAAQ,KAAK,mBAAmB;GACjE,MAAM,MAAM,KAAK,KAAK;GACtB,IAAI,CAAC,KAAK;IACR,OAAO,MAAM,EAAE,YAAY,GAAG,yBAAyB,aAAa;IACpE,OAAO;GACT;GAOA,MAAM,MAAM;IACV,UAJe,IAAI,SAAS,SAC1B,IAAI,UACJ,2CAA2C;IAG7C,WAAW,IAAI;IACf,UAAU,IAAI;GAChB;GACA,OAAO,MAAM,EAAE,IAAI,GAAG,KAAK;GAC3B,OAAO;EACT,SAAS,KAAK;GACZ,KAAK,oBAAoB,GAAG;EAC9B;CACF;CAEA,YACE,QAC+B;EAC/B,OAAO,UACL;GACE,WAAW,cAAc,cAAc;GACvC,KAAK,GAAG,OAAO,YAAY,GAAG,OAAO;GACrC,UAAU;EACZ,SACM,KAAK,aAAa,MAAM,CAChC;CACF;AACF"}
@@ -0,0 +1,27 @@
1
+ import { DeepNullish, LooseArray } from "../../../util/schema-utils/index.js";
2
+ import { MaybeTimestamp } from "../../../util/timestamp.js";
3
+ import { z } from "zod/v4";
4
+ //#region lib/modules/datasource/orb/schema.ts
5
+ const OrbVersion = z.object({ attributes: z.object({
6
+ version: z.string(),
7
+ created_at: MaybeTimestamp
8
+ }) }).transform(({ attributes }) => ({
9
+ version: attributes.version,
10
+ releaseTimestamp: attributes.created_at
11
+ }));
12
+ const OrbPackage = z.object({
13
+ attributes: DeepNullish(z.object({
14
+ is_private: z.boolean().optional(),
15
+ home_url: z.string().optional()
16
+ })),
17
+ references: z.object({ orb_versions: LooseArray(OrbVersion).catch([]) }).default({ orb_versions: [] })
18
+ }).transform(({ attributes, references }) => ({
19
+ homeUrl: attributes.home_url,
20
+ isPrivate: !!attributes.is_private,
21
+ releases: references.orb_versions
22
+ }));
23
+ const OrbPackagesResponse = z.object({ data: z.array(OrbPackage) });
24
+ //#endregion
25
+ export { OrbPackagesResponse };
26
+
27
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/orb/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { DeepNullish, LooseArray } from '../../../util/schema-utils/index.ts';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\nimport type { Release } from '../types.ts';\n\nconst OrbVersion = z\n .object({\n attributes: z.object({\n version: z.string(),\n created_at: MaybeTimestamp,\n }),\n })\n .transform(\n ({ attributes }): Release => ({\n version: attributes.version,\n releaseTimestamp: attributes.created_at,\n }),\n );\n\nconst OrbPackage = z\n .object({\n attributes: DeepNullish(\n z.object({\n is_private: z.boolean().optional(),\n home_url: z.string().optional(),\n }),\n ),\n references: z\n .object({\n orb_versions: LooseArray(OrbVersion).catch([]),\n })\n .default({ orb_versions: [] }),\n })\n .transform(({ attributes, references }) => ({\n homeUrl: attributes.home_url,\n isPrivate: !!attributes.is_private,\n releases: references.orb_versions,\n }));\n\nexport const OrbPackagesResponse = z.object({\n data: z.array(OrbPackage),\n});\n"],"mappings":";;;;AAKA,MAAM,aAAa,EAChB,OAAO,EACN,YAAY,EAAE,OAAO;CACnB,SAAS,EAAE,OAAO;CAClB,YAAY;AACd,CAAC,EACH,CAAC,CAAC,CACD,WACE,EAAE,kBAA2B;CAC5B,SAAS,WAAW;CACpB,kBAAkB,WAAW;AAC/B,EACF;AAEF,MAAM,aAAa,EAChB,OAAO;CACN,YAAY,YACV,EAAE,OAAO;EACP,YAAY,EAAE,QAAQ,CAAC,CAAC,SAAS;EACjC,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAChC,CAAC,CACH;CACA,YAAY,EACT,OAAO,EACN,cAAc,WAAW,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,EAC/C,CAAC,CAAC,CACD,QAAQ,EAAE,cAAc,CAAC,EAAE,CAAC;AACjC,CAAC,CAAC,CACD,WAAW,EAAE,YAAY,kBAAkB;CAC1C,SAAS,WAAW;CACpB,WAAW,CAAC,CAAC,WAAW;CACxB,UAAU,WAAW;AACvB,EAAE;AAEJ,MAAa,sBAAsB,EAAE,OAAO,EAC1C,MAAM,EAAE,MAAM,UAAU,EAC1B,CAAC"}
@@ -6,7 +6,7 @@ hashMap.set("ant", "2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed51
6
6
  hashMap.set("apm", "5cf019f2a8d8572f990875a2834f9542bbc36abf302e931b11f916d9dd14702d");
7
7
  hashMap.set("argocd", "5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce");
8
8
  hashMap.set("asdf", "430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb");
9
- hashMap.set("azure-pipelines", "4f635b0ecd388ee266d992e8281fd40e3db2f5867d86fc1cbce72dc33a66e796");
9
+ hashMap.set("azure-pipelines", "6bf7782e8a02fc87dc5d84aab59e517c09df51fd23cf57805e62207dbd5efdb5");
10
10
  hashMap.set("batect", "bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e");
11
11
  hashMap.set("batect-wrapper", "d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939");
12
12
  hashMap.set("bazel", "4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a");
@@ -19,7 +19,7 @@ hashMap.set("buildkite", "a93effb1f1c5d65b3277c3b4709924eacde282e8efd028a8e3d8c1
19
19
  hashMap.set("buildpacks", "6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f");
20
20
  hashMap.set("bun", "691aa0bd20c20f7e05be5d231ed14dccdf81b9399d062448794176403aa53d94");
21
21
  hashMap.set("bun-version", "df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4");
22
- hashMap.set("bundler", "d14594256fa4fbc3b2b264437d67b718dbd2e30e1a7060cff5552c4257dec875");
22
+ hashMap.set("bundler", "62b58740b430430a6e1855a8f6601e97892a1c26f490679fb11c401d4a6f40eb");
23
23
  hashMap.set("cake", "ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1");
24
24
  hashMap.set("cargo", "637adb103a887ad496e469e25182c9cd7f3b4acb9eddfcbca9a1326bac3613cc");
25
25
  hashMap.set("cdnurl", "d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177");
@@ -39,21 +39,21 @@ hashMap.set("devcontainer", "24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f25
39
39
  hashMap.set("docker-compose", "5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb");
40
40
  hashMap.set("dockerfile", "54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478");
41
41
  hashMap.set("droneci", "237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee");
42
- hashMap.set("fleet", "d73d5d35f10df0599a561d9c8d25f3935350407d0e3bd3a1d1545295f278912e");
42
+ hashMap.set("fleet", "6b091fd5b8c2e9fc5d5b81ba34befec915d585d45cbc175c851ccc1555372925");
43
43
  hashMap.set("flux", "70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5");
44
44
  hashMap.set("fvm", "9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90");
45
45
  hashMap.set("git-submodules", "f9906351ecb88ec54ebb51bbc89bdc7499dafdbc3c0337c0265f3290b8094815");
46
- hashMap.set("github-actions", "3dea0c91977c92d9c225c16cf27ce04a2dd7a1b652f0382c59d19b4685312cb3");
46
+ hashMap.set("github-actions", "f5d0459242ef89d72315f87bad2aac5744ee83341290eb771445ca4cbe77743d");
47
47
  hashMap.set("gitlabci", "33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356df7753125");
48
48
  hashMap.set("gitlabci-include", "ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb");
49
49
  hashMap.set("glasskube", "93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30");
50
50
  hashMap.set("gleam", "02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39");
51
51
  hashMap.set("gomod", "dc59f10824ae55ac4044ea2e487feb6e3ca2d365e1d518a61548d1dd1932e345");
52
52
  hashMap.set("gradle", "1780fe7560babe735da868a0dd1a013fea76d82abfde62028cd48f9de42fb52c");
53
- hashMap.set("gradle-wrapper", "e16500ce08dd35ecb3ddcc3c79989648087b8249c3a95413a991627d064657ca");
54
- hashMap.set("haskell-cabal", "f232d0e883235f74ed71fd9de4a7468e5fcbda9a1af5beb56c24657f7bf2e891");
53
+ hashMap.set("gradle-wrapper", "f6c933eaa5cace6433d30f54ad5804e63a164399e2c1e8a3d3f1cb6218f39142");
54
+ hashMap.set("haskell-cabal", "f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2");
55
55
  hashMap.set("helm-requirements", "4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b");
56
- hashMap.set("helm-values", "b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af");
56
+ hashMap.set("helm-values", "c94d93b42874624b4fb166be16025f21dddc99a76fb69f858ac6603a554a22d2");
57
57
  hashMap.set("helmfile", "0adc0092400df2075e1c4580ebe35bbc3b638ebee67cc948a4338094cb16a8ae");
58
58
  hashMap.set("helmsman", "ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e");
59
59
  hashMap.set("helmv3", "572f7b0b746377e0c5d6f5ad5c0b78cbed6782a561be77263cf45620b6fdad0c");
@@ -62,8 +62,8 @@ hashMap.set("homeassistant-manifest", "05043c6db870cffbb6f8f3e351c025e3de227eaae
62
62
  hashMap.set("homebrew", "9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367");
63
63
  hashMap.set("html", "67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8");
64
64
  hashMap.set("jenkins", "268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3");
65
- hashMap.set("jsonnet-bundler", "e26b390528f2de43dc572bcee7cb15bb4671d2df75413a56caf1ddcee683a0ee");
66
- hashMap.set("kotlin-script", "8a327ba00370d0df5ee656033f0526b898204ef6805cc5692221a71ca2ad654d");
65
+ hashMap.set("jsonnet-bundler", "575e15b78c4e86c88407b80b5b321954df8d4b93e9a5f53fff5f119a2ff1930f");
66
+ hashMap.set("kotlin-script", "95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564");
67
67
  hashMap.set("kubernetes", "321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de");
68
68
  hashMap.set("kustomize", "14bc841079d278b8e03b1eb184d94fef3df8811fa25beddc7ac9e6e2697b43b5");
69
69
  hashMap.set("leiningen", "133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85");
@@ -75,11 +75,11 @@ hashMap.set("mise", "8509ff587ee410eeb94cbf1d4616c6a174b5f4110d0e748496edd8ed150
75
75
  hashMap.set("mix", "ca855b0353a8087d91a63fba5cc097d11e0396a963f214a508279aef065707f0");
76
76
  hashMap.set("nix", "f90bb8943129de40b50564b203df71bb86079dd134e204390a103535de1c5af7");
77
77
  hashMap.set("nodenv", "ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8");
78
- hashMap.set("npm", "5241d7e7a2f7fa530fea4ba33166619f4166e48ca8f88b074c8ae5f10f00e079");
78
+ hashMap.set("npm", "d61de2851ca925fdbf964e9a6e4cefda727572a41b58344a0728709a0a3cc4a7");
79
79
  hashMap.set("nuget", "4818fdcf3258a19228004c62a605c3fb4b6665ca09df524ab37f712ea201db89");
80
80
  hashMap.set("nvm", "3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322");
81
81
  hashMap.set("ocb", "032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca");
82
- hashMap.set("osgi", "32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10");
82
+ hashMap.set("osgi", "d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024");
83
83
  hashMap.set("pep621", "db4dc12af1643b6883819bc8d0b4a7fc4533384e5678a61745710f0087f97ab9");
84
84
  hashMap.set("pep723", "b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1");
85
85
  hashMap.set("pip-compile", "a114e2aa275e4e2690b010ea21adef1484fdc696f89f30dedf8c795167e49048");
@@ -88,7 +88,7 @@ hashMap.set("pip_setup", "0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164
88
88
  hashMap.set("pipenv", "f4c5d17bfcb6f5cb8b85584d4b782379daa69ee85936ca79ef01172e5d6652a2");
89
89
  hashMap.set("pixi", "3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393");
90
90
  hashMap.set("poetry", "5a638977241e2a8d8a2ba310388b10db533612552ab2c93514cb0960a2b725cd");
91
- hashMap.set("pre-commit", "17a5f183985ebffe98785a541d3609bf25efedc387deb3d50e9f00f02b25f615");
91
+ hashMap.set("pre-commit", "215fdabbc5bae26dffca61a19be984a18386a1059a2220ee092d8efcfef46063");
92
92
  hashMap.set("proto", "412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843");
93
93
  hashMap.set("pub", "3ade8bf8232eda456e24909b4d1abce066e674c9ea9aa250c567cf621a96bf9b");
94
94
  hashMap.set("puppet", "ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45");
@@ -98,14 +98,14 @@ hashMap.set("renovate-config", "ca60beee2e3b871ea1216fa9df9a501f7ed355fe7da29e12
98
98
  hashMap.set("ruby-version", "2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97");
99
99
  hashMap.set("runtime-version", "b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160");
100
100
  hashMap.set("rust-toolchain", "6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720");
101
- hashMap.set("sbt", "e508c2e2fb8d44e6cbec20f449c8eed096728566e6058187269c637930d388fb");
101
+ hashMap.set("sbt", "9bf0529fde16a9c56c5f151e61622c1e56fe9e8bef27908bf4779da3387d8148");
102
102
  hashMap.set("scalafmt", "9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f");
103
103
  hashMap.set("setup-cfg", "7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785");
104
104
  hashMap.set("smithy", "9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100");
105
- hashMap.set("sveltos", "8d2558bce5fbcdfa4a96bf11de6f40bf6d93179025bbf6a9eeb0b7e02e8e9c00");
105
+ hashMap.set("sveltos", "e0b799487e3331b91de1fec7dfb975378340b883dc0aeb95b950d289eb4737c5");
106
106
  hashMap.set("swift", "1e464136321889cdf9a4eb0cf32c459fbf897e0c75bbf44c2ba5a51c0a002bfe");
107
107
  hashMap.set("tekton", "fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd");
108
- hashMap.set("terraform", "73f9d1753d1077585bd264163b7bfacaf6cf20b586b233cbb8cf058a9fce0103");
108
+ hashMap.set("terraform", "8f4a70b1ee4dbbaee7e249d11912faa2b3ea4cc7c582310b5b636d224ab81fea");
109
109
  hashMap.set("terraform-version", "ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa");
110
110
  hashMap.set("terragrunt", "ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118");
111
111
  hashMap.set("terragrunt-version", "eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d");
@@ -1 +1 @@
1
- {"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','1d3568f42393d697f8f96d461b72077ee7a1044b654e87667a12f861b3083111');\nhashMap.set('ansible-galaxy','8226d47128f2018825d4d6f84794e3183eb79c706045fa7e88491edd5e64106f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','5cf019f2a8d8572f990875a2834f9542bbc36abf302e931b11f916d9dd14702d');\nhashMap.set('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','4f635b0ecd388ee266d992e8281fd40e3db2f5867d86fc1cbce72dc33a66e796');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a');\nhashMap.set('bazel-module','f7d369015f9028c40cb79f2367d0734f18c0647d1d446d0a165007c3723c3414');\nhashMap.set('bazelisk','d71489650feefb0dbbe7461f924cb50e41c8eef8fe2e11acdec2d42d0212c8ef');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','a93effb1f1c5d65b3277c3b4709924eacde282e8efd028a8e3d8c1ce3ef69407');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','691aa0bd20c20f7e05be5d231ed14dccdf81b9399d062448794176403aa53d94');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','d14594256fa4fbc3b2b264437d67b718dbd2e30e1a7060cff5552c4257dec875');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','637adb103a887ad496e469e25182c9cd7f3b4acb9eddfcbca9a1326bac3613cc');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','3d3affcaab991e9a27916dfbc8bdddb1066be28303c37be781695bfc0645aa81');\nhashMap.set('composer','d84def5d2f07adb0b5c37195fa115a3a9d86194b57eae014d7b43d2d59fe7d1c');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','4ceb2d2ef2cea88d81ebf7c959cc8f36691ed148000b4ee7e64573a9ba4ae2c5');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','517b6d7cd75d8cf7a44d4dbac36474333e87a6e22b0f62a5228ee7c1f07e8282');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb');\nhashMap.set('dockerfile','54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','d73d5d35f10df0599a561d9c8d25f3935350407d0e3bd3a1d1545295f278912e');\nhashMap.set('flux','70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','f9906351ecb88ec54ebb51bbc89bdc7499dafdbc3c0337c0265f3290b8094815');\nhashMap.set('github-actions','3dea0c91977c92d9c225c16cf27ce04a2dd7a1b652f0382c59d19b4685312cb3');\nhashMap.set('gitlabci','33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356df7753125');\nhashMap.set('gitlabci-include','ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','dc59f10824ae55ac4044ea2e487feb6e3ca2d365e1d518a61548d1dd1932e345');\nhashMap.set('gradle','1780fe7560babe735da868a0dd1a013fea76d82abfde62028cd48f9de42fb52c');\nhashMap.set('gradle-wrapper','e16500ce08dd35ecb3ddcc3c79989648087b8249c3a95413a991627d064657ca');\nhashMap.set('haskell-cabal','f232d0e883235f74ed71fd9de4a7468e5fcbda9a1af5beb56c24657f7bf2e891');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af');\nhashMap.set('helmfile','0adc0092400df2075e1c4580ebe35bbc3b638ebee67cc948a4338094cb16a8ae');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','572f7b0b746377e0c5d6f5ad5c0b78cbed6782a561be77263cf45620b6fdad0c');\nhashMap.set('hermit','61e132cfccbe4e3884801a3728f3391455c214811a33c1f733b0dea7122bbbb6');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367');\nhashMap.set('html','67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8');\nhashMap.set('jenkins','268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3');\nhashMap.set('jsonnet-bundler','e26b390528f2de43dc572bcee7cb15bb4671d2df75413a56caf1ddcee683a0ee');\nhashMap.set('kotlin-script','8a327ba00370d0df5ee656033f0526b898204ef6805cc5692221a71ca2ad654d');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','14bc841079d278b8e03b1eb184d94fef3df8811fa25beddc7ac9e6e2697b43b5');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','db967206d960b12d7c58d78132808d3c412087ababf5c59444262782e4434c6a');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','8509ff587ee410eeb94cbf1d4616c6a174b5f4110d0e748496edd8ed150d8b9b');\nhashMap.set('mix','ca855b0353a8087d91a63fba5cc097d11e0396a963f214a508279aef065707f0');\nhashMap.set('nix','f90bb8943129de40b50564b203df71bb86079dd134e204390a103535de1c5af7');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','5241d7e7a2f7fa530fea4ba33166619f4166e48ca8f88b074c8ae5f10f00e079');\nhashMap.set('nuget','4818fdcf3258a19228004c62a605c3fb4b6665ca09df524ab37f712ea201db89');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10');\nhashMap.set('pep621','db4dc12af1643b6883819bc8d0b4a7fc4533384e5678a61745710f0087f97ab9');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','a114e2aa275e4e2690b010ea21adef1484fdc696f89f30dedf8c795167e49048');\nhashMap.set('pip_requirements','f07c39050e34e8da6084e7f43cb2222e7ef700bb66de895ee206505491cb8f4f');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','f4c5d17bfcb6f5cb8b85584d4b782379daa69ee85936ca79ef01172e5d6652a2');\nhashMap.set('pixi','3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393');\nhashMap.set('poetry','5a638977241e2a8d8a2ba310388b10db533612552ab2c93514cb0960a2b725cd');\nhashMap.set('pre-commit','17a5f183985ebffe98785a541d3609bf25efedc387deb3d50e9f00f02b25f615');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','3ade8bf8232eda456e24909b4d1abce066e674c9ea9aa250c567cf621a96bf9b');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d');\nhashMap.set('renovate-config','ca60beee2e3b871ea1216fa9df9a501f7ed355fe7da29e12509e56a124a78e69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','e508c2e2fb8d44e6cbec20f449c8eed096728566e6058187269c637930d388fb');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','8d2558bce5fbcdfa4a96bf11de6f40bf6d93179025bbf6a9eeb0b7e02e8e9c00');\nhashMap.set('swift','1e464136321889cdf9a4eb0cf32c459fbf897e0c75bbf44c2ba5a51c0a002bfe');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','73f9d1753d1077585bd264163b7bfacaf6cf20b586b233cbb8cf058a9fce0103');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','31247d37bc80aae17039bfa21bd989c5717730c5ef10cf2a6f09841576d012ec');\nhashMap.set('travis','bb482a0195cd009ec3896a6227bb95617f5c84bedb518c7d971e50c62235d9ca');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','8901ee24116f7998bddcfc8d2492bff8138d9c66a23caea75c24d594ef4a504d');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','dbe6889ea021a05127fed06226d73366fdada2ae577147a5c027996fd325416e');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,uBAAsB,kEAAkE;AACpG,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,aAAY,kEAAkE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QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,qBAAoB,kEAAkE;AAClG,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,sBAAqB,kEAAkE;AACnG,QAAQ,IAAI,iBAAgB,kEAAkE;AAC9F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE"}
1
+ {"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','1d3568f42393d697f8f96d461b72077ee7a1044b654e87667a12f861b3083111');\nhashMap.set('ansible-galaxy','8226d47128f2018825d4d6f84794e3183eb79c706045fa7e88491edd5e64106f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','5cf019f2a8d8572f990875a2834f9542bbc36abf302e931b11f916d9dd14702d');\nhashMap.set('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','6bf7782e8a02fc87dc5d84aab59e517c09df51fd23cf57805e62207dbd5efdb5');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a');\nhashMap.set('bazel-module','f7d369015f9028c40cb79f2367d0734f18c0647d1d446d0a165007c3723c3414');\nhashMap.set('bazelisk','d71489650feefb0dbbe7461f924cb50e41c8eef8fe2e11acdec2d42d0212c8ef');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','a93effb1f1c5d65b3277c3b4709924eacde282e8efd028a8e3d8c1ce3ef69407');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','691aa0bd20c20f7e05be5d231ed14dccdf81b9399d062448794176403aa53d94');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','62b58740b430430a6e1855a8f6601e97892a1c26f490679fb11c401d4a6f40eb');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','637adb103a887ad496e469e25182c9cd7f3b4acb9eddfcbca9a1326bac3613cc');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','3d3affcaab991e9a27916dfbc8bdddb1066be28303c37be781695bfc0645aa81');\nhashMap.set('composer','d84def5d2f07adb0b5c37195fa115a3a9d86194b57eae014d7b43d2d59fe7d1c');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','4ceb2d2ef2cea88d81ebf7c959cc8f36691ed148000b4ee7e64573a9ba4ae2c5');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','517b6d7cd75d8cf7a44d4dbac36474333e87a6e22b0f62a5228ee7c1f07e8282');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb');\nhashMap.set('dockerfile','54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','6b091fd5b8c2e9fc5d5b81ba34befec915d585d45cbc175c851ccc1555372925');\nhashMap.set('flux','70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','f9906351ecb88ec54ebb51bbc89bdc7499dafdbc3c0337c0265f3290b8094815');\nhashMap.set('github-actions','f5d0459242ef89d72315f87bad2aac5744ee83341290eb771445ca4cbe77743d');\nhashMap.set('gitlabci','33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356df7753125');\nhashMap.set('gitlabci-include','ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','dc59f10824ae55ac4044ea2e487feb6e3ca2d365e1d518a61548d1dd1932e345');\nhashMap.set('gradle','1780fe7560babe735da868a0dd1a013fea76d82abfde62028cd48f9de42fb52c');\nhashMap.set('gradle-wrapper','f6c933eaa5cace6433d30f54ad5804e63a164399e2c1e8a3d3f1cb6218f39142');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','c94d93b42874624b4fb166be16025f21dddc99a76fb69f858ac6603a554a22d2');\nhashMap.set('helmfile','0adc0092400df2075e1c4580ebe35bbc3b638ebee67cc948a4338094cb16a8ae');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','572f7b0b746377e0c5d6f5ad5c0b78cbed6782a561be77263cf45620b6fdad0c');\nhashMap.set('hermit','61e132cfccbe4e3884801a3728f3391455c214811a33c1f733b0dea7122bbbb6');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367');\nhashMap.set('html','67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8');\nhashMap.set('jenkins','268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3');\nhashMap.set('jsonnet-bundler','575e15b78c4e86c88407b80b5b321954df8d4b93e9a5f53fff5f119a2ff1930f');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','14bc841079d278b8e03b1eb184d94fef3df8811fa25beddc7ac9e6e2697b43b5');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','db967206d960b12d7c58d78132808d3c412087ababf5c59444262782e4434c6a');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','8509ff587ee410eeb94cbf1d4616c6a174b5f4110d0e748496edd8ed150d8b9b');\nhashMap.set('mix','ca855b0353a8087d91a63fba5cc097d11e0396a963f214a508279aef065707f0');\nhashMap.set('nix','f90bb8943129de40b50564b203df71bb86079dd134e204390a103535de1c5af7');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','d61de2851ca925fdbf964e9a6e4cefda727572a41b58344a0728709a0a3cc4a7');\nhashMap.set('nuget','4818fdcf3258a19228004c62a605c3fb4b6665ca09df524ab37f712ea201db89');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','db4dc12af1643b6883819bc8d0b4a7fc4533384e5678a61745710f0087f97ab9');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','a114e2aa275e4e2690b010ea21adef1484fdc696f89f30dedf8c795167e49048');\nhashMap.set('pip_requirements','f07c39050e34e8da6084e7f43cb2222e7ef700bb66de895ee206505491cb8f4f');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','f4c5d17bfcb6f5cb8b85584d4b782379daa69ee85936ca79ef01172e5d6652a2');\nhashMap.set('pixi','3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393');\nhashMap.set('poetry','5a638977241e2a8d8a2ba310388b10db533612552ab2c93514cb0960a2b725cd');\nhashMap.set('pre-commit','215fdabbc5bae26dffca61a19be984a18386a1059a2220ee092d8efcfef46063');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','3ade8bf8232eda456e24909b4d1abce066e674c9ea9aa250c567cf621a96bf9b');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d');\nhashMap.set('renovate-config','ca60beee2e3b871ea1216fa9df9a501f7ed355fe7da29e12509e56a124a78e69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','9bf0529fde16a9c56c5f151e61622c1e56fe9e8bef27908bf4779da3387d8148');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','e0b799487e3331b91de1fec7dfb975378340b883dc0aeb95b950d289eb4737c5');\nhashMap.set('swift','1e464136321889cdf9a4eb0cf32c459fbf897e0c75bbf44c2ba5a51c0a002bfe');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','8f4a70b1ee4dbbaee7e249d11912faa2b3ea4cc7c582310b5b636d224ab81fea');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','31247d37bc80aae17039bfa21bd989c5717730c5ef10cf2a6f09841576d012ec');\nhashMap.set('travis','bb482a0195cd009ec3896a6227bb95617f5c84bedb518c7d971e50c62235d9ca');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','8901ee24116f7998bddcfc8d2492bff8138d9c66a23caea75c24d594ef4a504d');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','dbe6889ea021a05127fed06226d73366fdada2ae577147a5c027996fd325416e');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,uBAAsB,kEAAkE;AACpG,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,aAAY,kEAAkE;A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 /**
19
+ * Enforce the `allowedHeaders` allowlist on a set of host rules.
20
+ *
21
+ * Loudly remove anything that's not permitted, logging a WARN.
22
+ *
23
+ * `add()` applies this to every rule it registers, so callers only need it themselves to pre-filter - e.g. to avoid repeating the WARN when the same rules are registered again and again.
24
+ *
25
+ * @param [allowedHeaders] the effective allowlist. Defaults to `GlobalConfig`, but must be passed explicitly when filtering before `GlobalConfig` reflects the repository being processed, i.e. for a `repositories[]` entry's own `allowedHeaders` override
26
+ * @param [warnOnDenied=true] whether to log the WARN. Pass `false` where the very same rules are filtered again, so that it is logged once rather than repeated
27
+ *
28
+ * Headers that survive this allowlist are still subject to how {@link find} combines them: an admin's headers for a host are applied over those of any repository or preset rule matching the same request, so a repository can neither drop nor substitute them.
29
+ */
30
+ declare function filterAllowedHeaders(rules: HostRule[], allowedHeaders?: string[], warnOnDenied?: boolean): HostRule[];
31
+ interface AddHostRuleOptions {
32
+ /** the effective allowlist. Defaults to `GlobalConfig`; pass it explicitly when `GlobalConfig` does not yet reflect the repository the rule is registered for */
33
+ allowedHeaders?: string[];
34
+ /**
35
+ * Whether this rule comes from the self-hosted administrator's own global config, rather than from repository or preset config.
36
+ *
37
+ * Only affects how `headers` are combined (see {@link find}), and is deliberately opt-in: a caller that says nothing registers into the untrusted tier, so a new call site cannot grant itself the administrator's precedence by omission.
38
+ */
39
+ trusted?: boolean;
40
+ }
41
+ declare function add(params: HostRule, options?: AddHostRuleOptions): void;
19
42
  interface HostRuleSearch {
20
43
  hostType?: string;
21
44
  url?: string;
@@ -38,5 +61,5 @@ declare function findAll({ hostType }: {
38
61
  declare function getAll(): HostRule[];
39
62
  declare function clear(): void;
40
63
  //#endregion
41
- export { HostRuleSearch, LegacyHostRule, add, clear, confidentialFields, find, findAll, getAll, hostType, hosts, matchesHost, migrateRule };
64
+ export { AddHostRuleOptions, HostRuleSearch, LegacyHostRule, add, clear, confidentialFields, filterAllowedHeaders, find, findAll, getAll, hostType, hosts, matchesHost, migrateRule };
42
65
  //# sourceMappingURL=host-rules.d.ts.map
@@ -1,3 +1,5 @@
1
+ import { GlobalConfig } from "../config/global.js";
2
+ import { matchRegexOrGlobList } from "./string-match.js";
1
3
  import { toBase64 } from "./string.js";
2
4
  import { addSecretForSanitizing, clearRepoSanitizedSecretsList } from "./sanitize.js";
3
5
  import { logger } from "../logger/index.js";
@@ -38,11 +40,48 @@ function migrateRule(rule) {
38
40
  } else if (hostValues.length > 1) throw new Error(`hostRules cannot contain more than one host-matching field - use "matchHost" only.`);
39
41
  return result;
40
42
  }
41
- function add(params) {
42
- const rule = migrateRule(params);
43
+ /**
44
+ * Enforce the `allowedHeaders` allowlist on a set of host rules.
45
+ *
46
+ * Loudly remove anything that's not permitted, logging a WARN.
47
+ *
48
+ * `add()` applies this to every rule it registers, so callers only need it themselves to pre-filter - e.g. to avoid repeating the WARN when the same rules are registered again and again.
49
+ *
50
+ * @param [allowedHeaders] the effective allowlist. Defaults to `GlobalConfig`, but must be passed explicitly when filtering before `GlobalConfig` reflects the repository being processed, i.e. for a `repositories[]` entry's own `allowedHeaders` override
51
+ * @param [warnOnDenied=true] whether to log the WARN. Pass `false` where the very same rules are filtered again, so that it is logged once rather than repeated
52
+ *
53
+ * Headers that survive this allowlist are still subject to how {@link find} combines them: an admin's headers for a host are applied over those of any repository or preset rule matching the same request, so a repository can neither drop nor substitute them.
54
+ */
55
+ function filterAllowedHeaders(rules, allowedHeaders, warnOnDenied = true) {
56
+ const allowlist = allowedHeaders ?? GlobalConfig.get("allowedHeaders");
57
+ const denied = [];
58
+ const result = rules.map((rule) => {
59
+ if (!rule.headers) return rule;
60
+ const allowed = {};
61
+ const ruleDenied = [];
62
+ for (const [name, value] of Object.entries(rule.headers)) if (matchRegexOrGlobList(name, allowlist)) allowed[name] = value;
63
+ else ruleDenied.push(name);
64
+ if (!ruleDenied.length) return rule;
65
+ denied.push(...ruleDenied);
66
+ const filtered = {
67
+ ...rule,
68
+ headers: allowed
69
+ };
70
+ if (!Object.keys(allowed).length) delete filtered.headers;
71
+ return filtered;
72
+ });
73
+ if (denied.length && warnOnDenied) logger.warn({ denied }, "Ignoring hostRules headers not permitted by this Renovate instance's `allowedHeaders`");
74
+ return result;
75
+ }
76
+ function add(params, options) {
77
+ let rule = migrateRule(params);
78
+ delete rule.trusted;
79
+ if (options?.trusted) rule.trusted = true;
80
+ if (rule.headers) [rule] = filterAllowedHeaders([rule], options?.allowedHeaders);
43
81
  if (rule.matchHost) {
44
82
  rule.matchHost = massageHostUrl(rule.matchHost);
45
- rule.resolvedHost = parseUrl(rule.matchHost)?.hostname ?? rule.matchHost;
83
+ const parsedUrl = parseUrl(rule.matchHost);
84
+ rule.resolvedHost = parsedUrl?.hostname ?? rule.matchHost;
46
85
  confidentialFields.forEach((field) => {
47
86
  if (rule[field]) logger.debug(`Adding ${field} authentication for ${rule.matchHost} (hostType=${rule.hostType}) to hostRules`);
48
87
  });
@@ -78,12 +117,23 @@ function hostRuleRank({ hostType, matchHost, readOnly }) {
78
117
  function fromLowerToHigherRank(a, b) {
79
118
  return hostRuleRank(a) - hostRuleRank(b);
80
119
  }
120
+ function fromLowerRankAndShorterMatchHost(a, b) {
121
+ return fromLowerToHigherRank(a, b) || fromShorterToLongerMatchHost(a, b);
122
+ }
123
+ /**
124
+ * The `headers` that apply from a set of matching rules of the same trust tier.
125
+ *
126
+ * The last rule to set any wins outright, as `find()`'s callers receive them sorted from least to most specific. That is the behaviour every matching rule had before `headers` were combined across tiers, and it is what lets a broad rule's headers be masked by a narrower rule from the same source.
127
+ */
128
+ function headersOfLastRuleToSetThem(rules) {
129
+ return rules.map((rule) => rule.headers).filter(isTruthy).pop();
130
+ }
81
131
  function find(search) {
82
132
  if ([search.hostType, search.url].every(isFalsy)) {
83
133
  logger.warn({ search }, "Invalid hostRules search");
84
134
  return {};
85
135
  }
86
- const sortedRules = hostRules.sort(fromShorterToLongerMatchHost).sort(fromLowerToHigherRank);
136
+ const sortedRules = hostRules.sort(fromLowerRankAndShorterMatchHost);
87
137
  const matchedRules = [];
88
138
  for (const rule of sortedRules) {
89
139
  let hostTypeMatch = true;
@@ -109,10 +159,17 @@ function find(search) {
109
159
  if (hostTypeMatch && readOnlyMatch && hostMatch) matchedRules.push(clone(rule));
110
160
  }
111
161
  const res = Object.assign({}, ...matchedRules);
162
+ const untrustedHeaders = headersOfLastRuleToSetThem(matchedRules.filter((rule) => !rule.trusted));
163
+ const trustedHeaders = headersOfLastRuleToSetThem(matchedRules.filter((rule) => rule.trusted));
164
+ if (untrustedHeaders ?? trustedHeaders) res.headers = {
165
+ ...untrustedHeaders,
166
+ ...trustedHeaders
167
+ };
112
168
  delete res.hostType;
113
169
  delete res.resolvedHost;
114
170
  delete res.matchHost;
115
171
  delete res.readOnly;
172
+ delete res.trusted;
116
173
  return res;
117
174
  }
118
175
  function hosts({ hostType }) {
@@ -136,6 +193,6 @@ function clear() {
136
193
  clearRepoSanitizedSecretsList();
137
194
  }
138
195
  //#endregion
139
- export { add, clear, confidentialFields, find, findAll, getAll, hostType, hosts, matchesHost, migrateRule };
196
+ export { add, clear, confidentialFields, filterAllowedHeaders, find, findAll, getAll, hostType, hosts, matchesHost, migrateRule };
140
197
 
141
198
  //# sourceMappingURL=host-rules.js.map