mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-25 06:51:11 +00:00
b39b50f559
To provide more programmatic means to determine what environment variables configure Renovate configuration options - and whether they're Repo, Inherit or Global config options - we can expose these in two forms: - `getEnvOptionsMap()` - a static JSON file, `renovate-env-options.ts` This will provide programmatic use-cases from a plain JSON file that can be used more readily - especially as it's distributed in the docs and built package - as well as a function that can be used by users of Renovate-as-a-library. Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
14 lines
468 B
TypeScript
14 lines
468 B
TypeScript
import { getEnvOptionsMap } from '../../lib/config/options/env-options.ts';
|
|
import { prettier } from '../../lib/expose.ts';
|
|
import { updateFile } from '../utils/index.ts';
|
|
|
|
export async function generateEnvOptions(dist: string): Promise<void> {
|
|
const map = getEnvOptionsMap();
|
|
|
|
const config = await prettier().format(JSON.stringify(map), {
|
|
filepath: 'renovate-env-options.json',
|
|
});
|
|
|
|
await updateFile(`${dist}/renovate-env-options.json`, `${config}\n`);
|
|
}
|