renovate 44.151.3 → 44.151.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/options/index.js +13 -3
- package/dist/config/options/index.js.map +1 -1
- package/dist/config/types.d.ts +2 -1
- package/dist/config/types.js +6 -1
- package/dist/config/types.js.map +1 -1
- package/dist/config/validation.js +13 -19
- package/dist/config/validation.js.map +1 -1
- package/package.json +1 -1
- package/renovate-schema.json +25 -7
package/dist/config/types.d.ts
CHANGED
|
@@ -26,7 +26,8 @@ export interface GroupConfig extends Record<string, unknown> {
|
|
|
26
26
|
branchTopic?: string;
|
|
27
27
|
}
|
|
28
28
|
export type RecreateWhen = 'auto' | 'never' | 'always';
|
|
29
|
-
export
|
|
29
|
+
export declare const allowedStatusCheckWhenValues: readonly ['always', 'never', 'failed'];
|
|
30
|
+
export type StatusCheckWhen = (typeof allowedStatusCheckWhenValues)[number];
|
|
30
31
|
export type PlatformCommitOptions = 'auto' | 'disabled' | 'enabled';
|
|
31
32
|
export type BinarySource = 'docker' | 'global' | 'install' | 'hermit';
|
|
32
33
|
/**
|
package/dist/config/types.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
//#region lib/config/types.ts
|
|
2
|
+
const allowedStatusCheckWhenValues = [
|
|
3
|
+
"always",
|
|
4
|
+
"never",
|
|
5
|
+
"failed"
|
|
6
|
+
];
|
|
2
7
|
const allowedStatusCheckStrings = [
|
|
3
8
|
"minimumReleaseAge",
|
|
4
9
|
"mergeConfidence",
|
|
@@ -17,6 +22,6 @@ const UpdateTypesOptions = [
|
|
|
17
22
|
"replacement"
|
|
18
23
|
];
|
|
19
24
|
//#endregion
|
|
20
|
-
export { UpdateTypesOptions, allowedStatusCheckStrings };
|
|
25
|
+
export { UpdateTypesOptions, allowedStatusCheckStrings, allowedStatusCheckWhenValues };
|
|
21
26
|
|
|
22
27
|
//# sourceMappingURL=types.js.map
|
package/dist/config/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../lib/config/types.ts"],"sourcesContent":["import type { Category, PlatformId } from '../constants/index.ts';\nimport type { LogLevelRemap } from '../logger/types.ts';\nimport type { ManagerName } from '../manager-list.generated.ts';\nimport type { CustomManager } from '../modules/manager/custom/types.ts';\nimport type {\n GitUrlOption,\n RepoSortMethod,\n SortMethod,\n} from '../modules/platform/types.ts';\nimport type {\n AutoMergeType,\n HostRule,\n Nullish,\n RangeStrategy,\n SkipReason,\n} from '../types/index.ts';\nimport type { StageName } from '../types/skip-reason.ts';\nimport type {\n AdditionalConstraintName,\n ConstraintName,\n ToolName,\n} from '../util/exec/types.ts';\nimport type { GitNoVerifyOption } from '../util/git/types.ts';\nimport type { MergeConfidence } from '../util/merge-confidence/types.ts';\nimport type { Timestamp } from '../util/timestamp.ts';\nimport type { ConfigValidationTopic } from './validation-helpers/types.ts';\n\nexport type RenovateConfigStage =\n 'global' | 'inherit' | 'repository' | 'package' | 'branch' | 'pr';\n\nexport type RenovateSplit =\n 'init' | 'onboarding' | 'extract' | 'lookup' | 'update';\n\nexport type RepositoryCacheConfig = 'disabled' | 'enabled' | 'reset';\nexport type RepositoryCacheType = 'local' | (string & {});\nexport type DryRunConfig = 'extract' | 'lookup' | 'full';\nexport type InternalHostAccess = 'allow' | 'warn' | 'block';\nexport type RequiredConfig = 'required' | 'optional' | 'ignored';\n\nexport interface GroupConfig extends Record<string, unknown> {\n branchName?: string;\n branchTopic?: string;\n}\n\nexport type RecreateWhen = 'auto' | 'never' | 'always';\nexport type StatusCheckWhen = 'always' | 'never' | 'failed';\nexport type PlatformCommitOptions = 'auto' | 'disabled' | 'enabled';\n\nexport type BinarySource = 'docker' | 'global' | 'install' | 'hermit';\n\n// TODO: Proper typings\n/**\n * Any configuration that could be used either top-level in a repository config (or Global, Inherited or Shareable Preset configuration), or:\n *\n * - in a datasource-specific configuration\n * - in a manager-specific configuration\n * - in a Package Rule\n *\n * @see RenovateConfig for the superset of all configuration allowed in a given repository\n *\n */\nexport interface RenovateSharedConfig {\n $schema?: string;\n abandonmentThreshold?: Nullish<string>;\n addLabels?: string[];\n assignAutomerge?: boolean;\n autoApprove?: boolean;\n autoReplaceGlobalMatch?: boolean;\n automerge?: boolean;\n automergeSchedule?: string[];\n automergeStrategy?: MergeStrategy;\n automergeType?: AutoMergeType;\n azureWorkItemId?: number;\n azureWorkItemType?: string;\n branchName?: string;\n branchNameStrict?: boolean;\n branchPrefix?: string;\n branchPrefixOld?: string;\n bumpVersions?: BumpVersionConfig[];\n commitBody?: string;\n commitBodyTable?: boolean;\n commitMessage?: string;\n commitMessageAction?: string;\n commitMessageExtra?: string;\n commitMessageLowerCase?: 'auto' | 'never';\n commitMessagePrefix?: string;\n commitMessageTopic?: string;\n commitTrailers?: string[];\n confidential?: boolean;\n configValidationError?: boolean;\n changelogUrl?: string;\n dependencyDashboardApproval?: boolean;\n draftPR?: boolean;\n enabled?: boolean;\n enabledManagers?: string[];\n encrypted?: Record<string, string>;\n extends?: string[];\n extractVersion?: string;\n managerFilePatterns?: string[];\n followTag?: string;\n force?: RenovateConfig;\n gitIgnoredAuthors?: string[];\n group?: GroupConfig;\n groupName?: string;\n groupSingleUpdates?: boolean;\n groupSlug?: string;\n hashedBranchLength?: number;\n ignoreDeps?: string[];\n ignorePaths?: string[];\n ignoreTests?: boolean;\n ignoreUnstable?: boolean;\n includePaths?: string[];\n internalChecksAsSuccess?: boolean;\n internalChecksFilter?: 'strict' | 'flexible' | 'none';\n keepUpdatedLabel?: string;\n labels?: string[];\n manager?: string;\n milestone?: number;\n minimumReleaseAge?: Nullish<string>;\n minimumReleaseAgeBuffer?: Nullish<string>;\n npmrc?: string;\n npmrcMerge?: boolean;\n npmToken?: string;\n\n pinDigests?: boolean;\n platformAutomerge?: boolean;\n platformCommit?: PlatformCommitOptions;\n postUpgradeTasks?: PostUpgradeTasks;\n prBodyColumns?: string[];\n prBodyDefinitions?: Record<string, string>;\n prBodyHeadingDefinitions?: Record<string, string>;\n prBodyNotes?: string[];\n prCreation?: 'immediate' | 'not-pending' | 'status-success' | 'approval';\n prFooter?: string;\n prHeader?: string;\n prPriority?: number;\n prTitle?: string;\n prTitleStrict?: boolean;\n pruneBranchAfterAutomerge?: boolean;\n rangeStrategy?: RangeStrategy;\n rebaseLabel?: string;\n rebaseWhen?: string;\n recreateClosed?: boolean;\n recreateWhen?: RecreateWhen;\n repository?: string;\n repositoryCache?: RepositoryCacheConfig;\n repositoryCacheType?: RepositoryCacheType;\n respectLatest?: boolean;\n rollbackPrs?: boolean;\n schedule?: string[];\n semanticCommitScope?: string | null;\n semanticCommitType?: string;\n semanticCommits?: 'auto' | 'enabled' | 'disabled';\n separateMajorMinor?: boolean;\n separateMinorPatch?: boolean;\n separateMultipleMajor?: boolean;\n separateMultipleMinor?: boolean;\n skipArtifactsUpdate?: boolean;\n stopUpdatingLabel?: string;\n suppressNotifications?: string[];\n timezone?: string;\n unicodeEmoji?: boolean;\n updateNotScheduled?: boolean;\n versioning?: string;\n versionCompatibility?: string;\n}\n\n/**\n * Contains all options with globalOnly=true && inheritConfigSupport=true\n */\nexport interface GlobalInheritableConfig {\n bbUseDevelopmentBranch?: boolean;\n configFileNames?: string[];\n onboarding?: boolean;\n onboardingAutoCloseAge?: number;\n onboardingBranch?: string;\n onboardingCommitMessage?: string;\n onboardingConfig?: RenovateConfig;\n onboardingConfigFileName?: string;\n onboardingNoDeps?: 'auto' | 'enabled' | 'disabled';\n onboardingPrTitle?: string;\n requireConfig?: RequiredConfig;\n}\n\n// Config options used only within the global worker\n// The below should contain config options where stage=global\n/** @deprecated use `RepoGlobalConfig` instead **/\nexport interface GlobalOnlyConfigLegacy {\n autodiscover?: boolean;\n autodiscoverFilter?: string[] | string;\n autodiscoverNamespaces?: string[];\n autodiscoverProjects?: string[];\n autodiscoverTopics?: string[];\n baseDir?: string;\n cacheDir?: string;\n containerbaseDir?: string;\n detectHostRulesFromEnv?: boolean;\n dockerCliOptions?: string;\n endpoint?: string;\n exitCodeForErrors?: boolean;\n forceCli?: boolean;\n gitNoVerify?: GitNoVerifyOption[];\n gitPrivateKey?: string;\n gitPrivateKeyPassphrase?: string;\n globalExtends?: string[];\n mergeConfidenceDatasources?: string[];\n mergeConfidenceEndpoint?: string;\n platform?: PlatformId;\n processEnv?: Record<string, string>;\n prCommitsPerRunLimit?: number;\n privateKey?: string;\n privateKeyOld?: string;\n privateKeyPath?: string;\n privateKeyPathOld?: string;\n redisPrefix?: string;\n redisUrl?: string;\n repositories?: RenovateRepository[];\n useCloudMetadataServices?: boolean;\n deleteConfigFile?: boolean;\n deleteAdditionalConfigFile?: boolean;\n}\n\n/**\n * Any global-only configuration set by self-hosted administrators.\n *\n * Used within the repository worker.\n *\n * Should only contain config options where globalOnly=true.\n */\nexport interface RepoGlobalConfig extends GlobalInheritableConfig {\n allowedCommands?: string[];\n allowCustomCrateGitRegistries?: boolean;\n allowPlugins?: boolean;\n allowScripts?: boolean;\n allowShellExecutorForPostUpgradeCommands?: boolean;\n allowedEnv?: string[];\n allowedHeaders?: string[];\n binarySource?: BinarySource;\n cacheDir?: string;\n cacheHardTtlMinutes?: number;\n cacheTtlOverride?: Record<string, number>;\n checkedBranches?: string[];\n containerbaseDir?: string;\n customEnvVariables?: Record<string, string>;\n dockerChildPrefix?: string;\n dockerCliOptions?: string;\n dockerSidecarImage?: string;\n dockerUser?: string;\n dryRun?: DryRunConfig;\n encryptedWarning?: string;\n endpoint?: string;\n executionTimeout?: number;\n exposeAllEnv?: boolean;\n gitTimeout?: number;\n githubTokenWarn?: boolean;\n includeMirrors?: boolean;\n inheritConfigTrusted?: boolean;\n internalHostAccess?: InternalHostAccess;\n migratePresets?: Record<string, string>;\n platform?: PlatformId;\n prCacheSyncMaxPages?: number;\n presetCachePersistence?: boolean;\n httpCacheTtlDays?: number;\n autodiscoverRepoSort?: RepoSortMethod;\n autodiscoverRepoOrder?: SortMethod;\n userAgent?: string;\n dockerMaxPages?: number;\n s3Endpoint?: string;\n s3PathStyle?: boolean;\n cachePrivatePackages?: boolean;\n repositoryCacheForceLocal?: boolean;\n configFileNames?: string[];\n ignorePrAuthor?: boolean;\n allowedUnsafeExecutions?: AllowedUnsafeExecution[];\n onboardingAutoCloseAge?: number;\n productLinks?: Record<string, string>;\n rebaseAllOpenBranches?: boolean;\n toolSettings?: GlobalToolSettingsOptions;\n}\n\n/**\n * Internal variables which are referenced from `GlobalConfig`, but are *not* user-configurable options.\n */\nexport interface InternalGlobalConfigOptions {\n localDir?: string;\n}\n\n/**\n * Those options are global only but still passed into the repository worker config.\n *\n * @deprecated https://github.com/renovatebot/renovate/issues/39693\n */\nexport interface LegacyAdminConfig {\n baseDir?: string;\n localDir?: string;\n\n logContext?: string;\n\n onboarding?: boolean;\n onboardingBranch?: string;\n onboardingNoDeps?: 'auto' | 'enabled' | 'disabled';\n onboardingRebaseCheckbox?: boolean;\n onboardingConfig?: RenovateConfig;\n onboardingConfigFileName?: string;\n\n optimizeForDisabled?: boolean;\n\n persistRepoData?: boolean;\n\n prCommitsPerRunLimit?: number;\n\n requireConfig?: RequiredConfig;\n\n useCloudMetadataServices?: boolean;\n\n writeDiscoveredRepos?: string;\n}\n\nexport type ExecutionMode = 'branch' | 'update';\n\nexport interface PostUpgradeTasks {\n commands?: string[];\n workingDirTemplate?: string;\n dataFileTemplate?: string;\n fileFilters?: string[];\n executionMode: ExecutionMode;\n installTools?: Partial<Record<ToolName, Record<never, never>>>;\n}\n\nexport type UpdateConfig<\n T extends RenovateSharedConfig = RenovateSharedConfig,\n> = Partial<Record<UpdateType, T | null>>;\n\nexport type RenovateRepositoryEntry = AllConfig & {\n repository: string;\n};\n\nexport type RenovateRepository = string | RenovateRepositoryEntry;\n\nexport type UseBaseBranchConfigType = 'merge' | 'none';\nexport type ConstraintsFilter = 'strict' | 'none';\nexport type MinimumReleaseAgeBehaviour =\n 'timestamp-required' | 'timestamp-optional';\n\nexport const allowedStatusCheckStrings = [\n 'minimumReleaseAge',\n 'mergeConfidence',\n 'configValidation',\n 'artifactError',\n] as const;\nexport type StatusCheckKey = (typeof allowedStatusCheckStrings)[number];\ntype UserEnv = Record<string, string>;\n\n/**\n * Computed properties, for internal use only\n */\nexport interface RenovateInternalConfig {\n /** computed base branch from patterns - for internal use only */\n baseBranches?: string[];\n currentCompatibility?: string;\n datasource?: string;\n hasBaseBranches?: boolean;\n isFork?: boolean;\n isVulnerabilityAlert?: boolean;\n\n /** What is this used for? */\n remediations?: unknown;\n /** What is this used for? */\n vulnerabilityAlertsOnly?: boolean;\n}\n\n// TODO: Proper typings\n/**\n * Configuration that could be used either top-level in a repository config (or Global, Inherited or Shareable Preset configuration).\n *\n * This is a superset of any configuration that a Renovate user (not self-hosted administrator) can set.\n */\nexport interface RenovateConfig\n extends\n LegacyAdminConfig,\n RenovateSharedConfig,\n UpdateConfig<PackageRule>,\n AssigneesAndReviewersConfig,\n ConfigMigration,\n RenovateInternalConfig {\n s3Endpoint?: string;\n s3PathStyle?: boolean;\n reportFormatting?: boolean;\n reportPath?: string;\n reportType?: 'logging' | 'file' | 's3' | null;\n depName?: string;\n /** user configurable base branch patterns*/\n baseBranchPatterns?: string[];\n useBaseBranchConfig?: UseBaseBranchConfigType;\n baseBranch?: string;\n defaultBranch?: string;\n branchList?: string[];\n cloneSubmodules?: boolean;\n cloneSubmodulesFilter?: string[];\n description?: string | string[];\n overrideDescription?: string | string[];\n detectGlobalManagerConfig?: boolean;\n errors?: ValidationMessage[];\n forkModeDisallowMaintainerEdits?: boolean;\n forkProcessing?: 'auto' | 'enabled' | 'disabled';\n forkToken?: string;\n\n gitAuthor?: string;\n\n hostRules?: HostRule[];\n\n inheritConfig?: boolean;\n inheritConfigFileName?: string;\n inheritConfigRepoName?: string;\n inheritConfigStrict?: boolean;\n\n ignorePresets?: string[];\n\n fileList?: string[];\n configWarningReuseIssue?: boolean;\n dependencyDashboard?: boolean;\n dependencyDashboardAutoclose?: boolean;\n dependencyDashboardChecks?: Record<string, string>;\n dependencyDashboardIssue?: number;\n dependencyDashboardTitle?: string;\n dependencyDashboardHeader?: string;\n dependencyDashboardFooter?: string;\n dependencyDashboardLabels?: string[];\n dependencyDashboardOSVVulnerabilitySummary?: 'none' | 'all' | 'unresolved';\n dependencyDashboardReportAbandonment?: boolean;\n mode?: 'silent' | 'full';\n packageFile?: string;\n packageRules?: PackageRule[];\n postUpdateOptions?: string[];\n branchConcurrentLimit?: number | null;\n parentOrg?: string;\n prConcurrentLimit?: number;\n commitHourlyLimit?: number;\n prHourlyLimit?: number;\n\n printConfig?: boolean;\n\n pruneStaleBranches?: boolean;\n\n defaultRegistryUrls?: string[];\n registryUrls?: string[] | null;\n registryAliases?: Record<string, string>;\n\n /**\n * What is this used for?\n * @deprecated\n */\n renovateJsonPresent?: boolean;\n\n repoIsOnboarded?: boolean;\n repoIsActivated?: boolean;\n\n topLevelOrg?: string;\n updateInternalDeps?: boolean;\n updateType?: UpdateType;\n\n warnings?: ValidationMessage[];\n vulnerabilityAlerts?: RenovateSharedConfig;\n osvVulnerabilityAlerts?: boolean;\n vulnerabilitySeverity?: string;\n customManagers?: CustomManager[];\n customDatasources?: Record<string, CustomDatasourceConfig>;\n\n fetchChangeLogs?: FetchChangeLogsOptions;\n secrets?: Record<string, string>;\n variables?: Record<string, string>;\n\n constraints?: Partial<Record<ConstraintName, string>>;\n /**\n * Any specific overrides for the versioning for the `AdditionalConstraintName`s.\n */\n constraintsVersioning?: Partial<Record<AdditionalConstraintName, string>>;\n skipInstalls?: boolean | null;\n\n constraintsFiltering?: ConstraintsFilter;\n\n customizeDashboard?: Record<string, string>;\n\n statusCheckNames?: Record<StatusCheckKey, string | null>;\n statusCheckWhen?: Partial<Record<StatusCheckKey, StatusCheckWhen>>;\n /**\n * User configured environment variables that Renovate uses when executing package manager commands\n */\n env?: UserEnv;\n logLevelRemap?: LogLevelRemap[];\n\n branchTopic?: string;\n additionalBranchPrefix?: string;\n sharedVariableName?: string;\n minimumGroupSize?: number;\n configFileNames?: string[];\n minimumReleaseAgeBehaviour?: MinimumReleaseAgeBehaviour;\n toolSettings?: RepoToolSettingsOptions;\n}\n\nconst CustomDatasourceFormats = [\n 'html',\n 'json',\n 'plain',\n 'toml',\n 'yaml',\n] as const;\nexport type CustomDatasourceFormats = (typeof CustomDatasourceFormats)[number];\n\nexport interface CustomDatasourceConfig {\n defaultRegistryUrlTemplate?: string;\n format?: CustomDatasourceFormats;\n transformTemplates?: string[];\n}\n\n/**\n * The superset of all configuration that a self-hosted administrator can set, alongside all repository-level configuration.\n *\n */\nexport interface AllConfig\n extends RenovateConfig, GlobalOnlyConfigLegacy, RepoGlobalConfig {\n gitUrl?: GitUrlOption;\n password?: string;\n token?: string;\n username?: string;\n}\n\nexport interface AssigneesAndReviewersConfig {\n assigneesFromCodeOwners?: boolean;\n expandCodeOwnersGroups?: boolean;\n assignees?: string[];\n assigneesSampleSize?: number;\n ignoreReviewers?: string[];\n reviewersFromCodeOwners?: boolean;\n reviewers?: string[];\n reviewersSampleSize?: number;\n additionalReviewers?: string[];\n filterUnavailableUsers?: boolean;\n}\n\nexport type UpdateType =\n | 'major'\n | 'minor'\n | 'patch'\n | 'pin'\n | 'digest'\n | 'pinDigest'\n | 'lockFileMaintenance'\n | 'lockfileUpdate'\n | 'rollback'\n | 'bump'\n | 'replacement';\n\n// These are the update types which can have configuration\nexport const UpdateTypesOptions = [\n 'major',\n 'minor',\n 'patch',\n 'pin',\n 'digest',\n 'pinDigest',\n 'lockFileMaintenance',\n 'rollback',\n 'replacement',\n] as const;\n\nexport type UpdateTypeOptions = (typeof UpdateTypesOptions)[number];\n\nexport type FetchChangeLogsOptions = 'off' | 'branch' | 'pr';\n\nexport type MatchStringsStrategy = 'any' | 'recursive' | 'combination';\n\nexport type MergeStrategy =\n | 'auto'\n | 'fast-forward'\n | 'merge-commit'\n | 'rebase'\n | 'rebase-merge'\n | 'squash';\n\n// This list should be added to as any new unsafe execution commands should be permitted\nexport type AllowedUnsafeExecution =\n 'bazelModDeps' | 'goGenerate' | 'gradleWrapper' | 'mise' | 'pixi';\n\n// TODO: Proper typings\nexport interface PackageRule\n extends RenovateSharedConfig, RenovateInternalConfig, UpdateConfig {\n allowedVersions?: string;\n description?: string | string[];\n matchBaseBranches?: string[];\n matchCategories?: string[];\n matchConfidence?: MergeConfidence[];\n matchCurrentAge?: string;\n matchCurrentValue?: string;\n matchCurrentVersion?: string;\n matchDatasources?: string[];\n matchDepNames?: string[];\n matchDepTypes?: string[];\n matchFileNames?: string[];\n matchIsBreaking?: boolean;\n matchManagers?: string[];\n matchNewValue?: string;\n matchPackageNames?: string[];\n matchRepositories?: string[];\n matchSourceUrls?: string[];\n matchRegistryUrls?: string[];\n matchUpdateTypes?: UpdateType[];\n matchJsonata?: string[];\n overrideDatasource?: string;\n overrideDepName?: string;\n overridePackageName?: string;\n registryUrls?: string[] | null;\n replacementName?: string;\n replacementVersion?: string;\n sourceUrl?: string;\n sourceDirectory?: string;\n vulnerabilitySeverity?: string;\n vulnerabilityFixVersion?: string;\n}\n\nexport interface ValidationMessage {\n // Topic is either the known list of topics, or a dynamically generated one\n topic: ConfigValidationTopic | (string & {});\n message: string;\n}\n\nexport type AllowedParents =\n | '.'\n | 'bumpVersions'\n | 'customDatasources'\n | 'customManagers'\n | 'hostRules'\n | 'logLevelRemap'\n | 'packageRules'\n | 'postUpgradeTasks'\n | 'vulnerabilityAlerts'\n | 'toolSettings'\n | ManagerName\n | UpdateTypeOptions;\nexport interface RenovateOptionBase {\n /**\n * If true, the option can only be configured by people with access to the Renovate instance.\n * Furthermore, the option should be documented in docs/usage/self-hosted-configuration.md.\n */\n globalOnly?: boolean;\n\n /**\n * If true, this option **MUST** be checked at the trust boundary: after resolving the full config that sets it, but **before** the value is applied.\n *\n * This is in addition to any existing config validation, and ensures that these options are re-validated due to their sensitive nature.\n *\n * A failure of that check **must** lead to a {@link ConfigValidationTopic.Security} error (which is then a full config validation error), stopping the Renovate run.\n *\n * After this check has been performed, additional filtering (for defence in depth) could be performed, but may not have an indication of what is repo- or preset-config vs global self-hosted config.\n */\n requiresCheckAtTrustBoundary?: boolean;\n\n inheritConfigSupport?: boolean;\n\n allowedValues?: string[];\n\n allowString?: boolean;\n\n cli?: boolean;\n\n description: string;\n\n env?: false | string;\n\n /**\n * Do not validate object children\n */\n freeChoice?: boolean;\n\n mergeable?: boolean;\n\n autogenerated?: boolean;\n\n name: string;\n\n parents?: AllowedParents[];\n\n stage?: RenovateConfigStage;\n\n experimental?: boolean;\n\n experimentalDescription?: string;\n\n experimentalIssues?: number[];\n\n advancedUse?: boolean;\n\n /**\n * This is used to add a deprecation message in the docs\n */\n deprecationMsg?: string;\n\n /**\n * For internal use only: add it to any config option that supports regex or glob matching\n */\n patternMatch?: boolean;\n\n /**\n * For internal use only: add it to any config option of type integer that supports negative integers\n */\n allowNegative?: boolean;\n\n /**\n * Managers which support this option, leave undefined if all managers support it.\n */\n supportedManagers?: string[];\n\n /**\n * Platforms which support this option, leave undefined if all platforms support it.\n */\n supportedPlatforms?: PlatformId[];\n\n /**\n * Conditions that must be met for this option to be required.\n */\n requiredIf?: RenovateRequiredOption[];\n\n /**\n * If true, the option's value supports Renovate templating.\n * @see https://docs.renovatebot.com/templates/\n */\n supportsTemplating?: boolean;\n}\n\nexport interface RenovateRequiredOption {\n siblingProperties: { property: string; value: string }[];\n}\n\nexport interface RenovateArrayOption<\n T extends string | number | Record<string, unknown> = Record<string, unknown>,\n> extends RenovateOptionBase {\n default?: T[] | null;\n mergeable?: boolean;\n type: 'array';\n subType?: 'string' | 'object' | 'number';\n}\n\nexport interface RenovateStringArrayOption extends RenovateArrayOption<string> {\n format?: 'regex';\n subType: 'string';\n}\n\nexport interface RenovateNumberArrayOption extends RenovateArrayOption<number> {\n subType: 'number';\n}\n\nexport interface RenovateBooleanOption extends RenovateOptionBase {\n default?: boolean | null;\n type: 'boolean';\n}\n\nexport interface RenovateIntegerOption extends RenovateOptionBase {\n default?: number | null;\n type: 'integer';\n}\n\nexport interface RenovateStringOption extends RenovateOptionBase {\n default?: string | null;\n format?: 'regex';\n\n // Not used\n replaceLineReturns?: boolean;\n type: 'string';\n}\n\nexport interface RenovateObjectOption extends RenovateOptionBase {\n default?: any;\n additionalProperties?: Record<string, unknown> | boolean;\n mergeable?: boolean;\n type: 'object';\n}\n\nexport type RenovateOptions =\n | RenovateStringOption\n | RenovateNumberArrayOption\n | RenovateStringArrayOption\n | RenovateIntegerOption\n | RenovateBooleanOption\n | RenovateArrayOption\n | RenovateObjectOption;\n\nexport interface PackageRuleInputConfig extends RenovateConfig {\n versioning?: string;\n packageFile?: string;\n lockFiles?: string[];\n depType?: string;\n depTypes?: string[];\n depName?: string;\n packageName?: string | null;\n newValue?: string | null;\n currentValue?: string | null;\n currentVersion?: string;\n lockedVersion?: string;\n updateType?: UpdateType;\n mergeConfidenceLevel?: MergeConfidence | undefined;\n isBump?: boolean;\n isBreaking?: boolean;\n sourceUrl?: string | null;\n categories?: string[];\n baseBranch?: string;\n manager?: string;\n datasource?: string;\n effectiveDatasource?: string;\n packageRules?: (PackageRule & PackageRuleInputConfig)[];\n releaseTimestamp?: Timestamp | null;\n repository?: string;\n currentVersionAgeInDays?: number;\n currentVersionTimestamp?: string;\n enabled?: boolean;\n skipReason?: SkipReason;\n skipStage?: StageName;\n}\n\nexport interface ConfigMigration {\n configMigration?: boolean;\n}\n\nexport interface MigratedConfig {\n /**\n * Indicates whether there was a migration applied to the configuration.\n *\n * @returns\n * `false` if the configuration does not need migrating, and `migratedConfig` can be ignored\n * `true` if the configuration was migrated, and if so, `migratedConfig` should be used instead of the provided config\n */\n isMigrated: boolean;\n migratedConfig: RenovateConfig;\n}\n\nexport interface MigratedRenovateConfig extends RenovateConfig {\n endpoints?: HostRule[];\n pathRules: PackageRule[];\n packages: PackageRule[];\n\n node?: RenovateConfig;\n travis?: RenovateConfig;\n gradle?: RenovateConfig;\n}\n\nexport interface ManagerConfig extends RenovateConfig {\n manager: string;\n categories?: Category[];\n}\n\nexport interface ValidationResult {\n errors: ValidationMessage[];\n warnings: ValidationMessage[];\n}\n\nexport interface BumpVersionConfig {\n bumpType?: string;\n filePatterns: string[];\n matchStrings: string[];\n name?: string;\n}\n\n/**\n * Global Config for specified `toolSettings` options.\n *\n */\nexport interface GlobalToolSettingsOptions {\n /** An upper limit on what the Java Virtual Machine's maximum memory can be set to. Repositories can specify <= this value */\n jvmMaxMemory?: number;\n /** An upper limit on what the Java Virtual Machine's starting memory can be set to. Repositories can specify <= this value */\n jvmMemory?: number;\n /** An upper limit on what the Node.JS process' maximum memory can be set to. Repositories can specify <= this value */\n nodeMaxMemory?: number;\n}\n\n/**\n * Repository config options for `toolSettings` options.\n */\nexport interface RepoToolSettingsOptions {\n /** The maximum memory the Java Virtual Machine can use. If greater than the Global Self-Hosted configuration setting, it will be set to that limit **/\n jvmMaxMemory?: number;\n /** The starting memory the Java Virtual Machine can use. If greater than the Global Self-Hosted configuration setting, it will be set to that limit **/\n jvmMemory?: number;\n /** The maximum memory child Node.JS processes can use. If greater than the Global Self-Hosted configuration setting, it will be set to that limit **/\n nodeMaxMemory?: number;\n}\n"],"mappings":";AAwVA,MAAa,4BAA4B;CACvC;CACA;CACA;CACA;AACF;AA6MA,MAAa,qBAAqB;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../lib/config/types.ts"],"sourcesContent":["import type { Category, PlatformId } from '../constants/index.ts';\nimport type { LogLevelRemap } from '../logger/types.ts';\nimport type { ManagerName } from '../manager-list.generated.ts';\nimport type { CustomManager } from '../modules/manager/custom/types.ts';\nimport type {\n GitUrlOption,\n RepoSortMethod,\n SortMethod,\n} from '../modules/platform/types.ts';\nimport type {\n AutoMergeType,\n HostRule,\n Nullish,\n RangeStrategy,\n SkipReason,\n} from '../types/index.ts';\nimport type { StageName } from '../types/skip-reason.ts';\nimport type {\n AdditionalConstraintName,\n ConstraintName,\n ToolName,\n} from '../util/exec/types.ts';\nimport type { GitNoVerifyOption } from '../util/git/types.ts';\nimport type { MergeConfidence } from '../util/merge-confidence/types.ts';\nimport type { Timestamp } from '../util/timestamp.ts';\nimport type { ConfigValidationTopic } from './validation-helpers/types.ts';\n\nexport type RenovateConfigStage =\n 'global' | 'inherit' | 'repository' | 'package' | 'branch' | 'pr';\n\nexport type RenovateSplit =\n 'init' | 'onboarding' | 'extract' | 'lookup' | 'update';\n\nexport type RepositoryCacheConfig = 'disabled' | 'enabled' | 'reset';\nexport type RepositoryCacheType = 'local' | (string & {});\nexport type DryRunConfig = 'extract' | 'lookup' | 'full';\nexport type InternalHostAccess = 'allow' | 'warn' | 'block';\nexport type RequiredConfig = 'required' | 'optional' | 'ignored';\n\nexport interface GroupConfig extends Record<string, unknown> {\n branchName?: string;\n branchTopic?: string;\n}\n\nexport type RecreateWhen = 'auto' | 'never' | 'always';\nexport const allowedStatusCheckWhenValues = [\n 'always',\n 'never',\n 'failed',\n] as const;\nexport type StatusCheckWhen = (typeof allowedStatusCheckWhenValues)[number];\nexport type PlatformCommitOptions = 'auto' | 'disabled' | 'enabled';\n\nexport type BinarySource = 'docker' | 'global' | 'install' | 'hermit';\n\n// TODO: Proper typings\n/**\n * Any configuration that could be used either top-level in a repository config (or Global, Inherited or Shareable Preset configuration), or:\n *\n * - in a datasource-specific configuration\n * - in a manager-specific configuration\n * - in a Package Rule\n *\n * @see RenovateConfig for the superset of all configuration allowed in a given repository\n *\n */\nexport interface RenovateSharedConfig {\n $schema?: string;\n abandonmentThreshold?: Nullish<string>;\n addLabels?: string[];\n assignAutomerge?: boolean;\n autoApprove?: boolean;\n autoReplaceGlobalMatch?: boolean;\n automerge?: boolean;\n automergeSchedule?: string[];\n automergeStrategy?: MergeStrategy;\n automergeType?: AutoMergeType;\n azureWorkItemId?: number;\n azureWorkItemType?: string;\n branchName?: string;\n branchNameStrict?: boolean;\n branchPrefix?: string;\n branchPrefixOld?: string;\n bumpVersions?: BumpVersionConfig[];\n commitBody?: string;\n commitBodyTable?: boolean;\n commitMessage?: string;\n commitMessageAction?: string;\n commitMessageExtra?: string;\n commitMessageLowerCase?: 'auto' | 'never';\n commitMessagePrefix?: string;\n commitMessageTopic?: string;\n commitTrailers?: string[];\n confidential?: boolean;\n configValidationError?: boolean;\n changelogUrl?: string;\n dependencyDashboardApproval?: boolean;\n draftPR?: boolean;\n enabled?: boolean;\n enabledManagers?: string[];\n encrypted?: Record<string, string>;\n extends?: string[];\n extractVersion?: string;\n managerFilePatterns?: string[];\n followTag?: string;\n force?: RenovateConfig;\n gitIgnoredAuthors?: string[];\n group?: GroupConfig;\n groupName?: string;\n groupSingleUpdates?: boolean;\n groupSlug?: string;\n hashedBranchLength?: number;\n ignoreDeps?: string[];\n ignorePaths?: string[];\n ignoreTests?: boolean;\n ignoreUnstable?: boolean;\n includePaths?: string[];\n internalChecksAsSuccess?: boolean;\n internalChecksFilter?: 'strict' | 'flexible' | 'none';\n keepUpdatedLabel?: string;\n labels?: string[];\n manager?: string;\n milestone?: number;\n minimumReleaseAge?: Nullish<string>;\n minimumReleaseAgeBuffer?: Nullish<string>;\n npmrc?: string;\n npmrcMerge?: boolean;\n npmToken?: string;\n\n pinDigests?: boolean;\n platformAutomerge?: boolean;\n platformCommit?: PlatformCommitOptions;\n postUpgradeTasks?: PostUpgradeTasks;\n prBodyColumns?: string[];\n prBodyDefinitions?: Record<string, string>;\n prBodyHeadingDefinitions?: Record<string, string>;\n prBodyNotes?: string[];\n prCreation?: 'immediate' | 'not-pending' | 'status-success' | 'approval';\n prFooter?: string;\n prHeader?: string;\n prPriority?: number;\n prTitle?: string;\n prTitleStrict?: boolean;\n pruneBranchAfterAutomerge?: boolean;\n rangeStrategy?: RangeStrategy;\n rebaseLabel?: string;\n rebaseWhen?: string;\n recreateClosed?: boolean;\n recreateWhen?: RecreateWhen;\n repository?: string;\n repositoryCache?: RepositoryCacheConfig;\n repositoryCacheType?: RepositoryCacheType;\n respectLatest?: boolean;\n rollbackPrs?: boolean;\n schedule?: string[];\n semanticCommitScope?: string | null;\n semanticCommitType?: string;\n semanticCommits?: 'auto' | 'enabled' | 'disabled';\n separateMajorMinor?: boolean;\n separateMinorPatch?: boolean;\n separateMultipleMajor?: boolean;\n separateMultipleMinor?: boolean;\n skipArtifactsUpdate?: boolean;\n stopUpdatingLabel?: string;\n suppressNotifications?: string[];\n timezone?: string;\n unicodeEmoji?: boolean;\n updateNotScheduled?: boolean;\n versioning?: string;\n versionCompatibility?: string;\n}\n\n/**\n * Contains all options with globalOnly=true && inheritConfigSupport=true\n */\nexport interface GlobalInheritableConfig {\n bbUseDevelopmentBranch?: boolean;\n configFileNames?: string[];\n onboarding?: boolean;\n onboardingAutoCloseAge?: number;\n onboardingBranch?: string;\n onboardingCommitMessage?: string;\n onboardingConfig?: RenovateConfig;\n onboardingConfigFileName?: string;\n onboardingNoDeps?: 'auto' | 'enabled' | 'disabled';\n onboardingPrTitle?: string;\n requireConfig?: RequiredConfig;\n}\n\n// Config options used only within the global worker\n// The below should contain config options where stage=global\n/** @deprecated use `RepoGlobalConfig` instead **/\nexport interface GlobalOnlyConfigLegacy {\n autodiscover?: boolean;\n autodiscoverFilter?: string[] | string;\n autodiscoverNamespaces?: string[];\n autodiscoverProjects?: string[];\n autodiscoverTopics?: string[];\n baseDir?: string;\n cacheDir?: string;\n containerbaseDir?: string;\n detectHostRulesFromEnv?: boolean;\n dockerCliOptions?: string;\n endpoint?: string;\n exitCodeForErrors?: boolean;\n forceCli?: boolean;\n gitNoVerify?: GitNoVerifyOption[];\n gitPrivateKey?: string;\n gitPrivateKeyPassphrase?: string;\n globalExtends?: string[];\n mergeConfidenceDatasources?: string[];\n mergeConfidenceEndpoint?: string;\n platform?: PlatformId;\n processEnv?: Record<string, string>;\n prCommitsPerRunLimit?: number;\n privateKey?: string;\n privateKeyOld?: string;\n privateKeyPath?: string;\n privateKeyPathOld?: string;\n redisPrefix?: string;\n redisUrl?: string;\n repositories?: RenovateRepository[];\n useCloudMetadataServices?: boolean;\n deleteConfigFile?: boolean;\n deleteAdditionalConfigFile?: boolean;\n}\n\n/**\n * Any global-only configuration set by self-hosted administrators.\n *\n * Used within the repository worker.\n *\n * Should only contain config options where globalOnly=true.\n */\nexport interface RepoGlobalConfig extends GlobalInheritableConfig {\n allowedCommands?: string[];\n allowCustomCrateGitRegistries?: boolean;\n allowPlugins?: boolean;\n allowScripts?: boolean;\n allowShellExecutorForPostUpgradeCommands?: boolean;\n allowedEnv?: string[];\n allowedHeaders?: string[];\n binarySource?: BinarySource;\n cacheDir?: string;\n cacheHardTtlMinutes?: number;\n cacheTtlOverride?: Record<string, number>;\n checkedBranches?: string[];\n containerbaseDir?: string;\n customEnvVariables?: Record<string, string>;\n dockerChildPrefix?: string;\n dockerCliOptions?: string;\n dockerSidecarImage?: string;\n dockerUser?: string;\n dryRun?: DryRunConfig;\n encryptedWarning?: string;\n endpoint?: string;\n executionTimeout?: number;\n exposeAllEnv?: boolean;\n gitTimeout?: number;\n githubTokenWarn?: boolean;\n includeMirrors?: boolean;\n inheritConfigTrusted?: boolean;\n internalHostAccess?: InternalHostAccess;\n migratePresets?: Record<string, string>;\n platform?: PlatformId;\n prCacheSyncMaxPages?: number;\n presetCachePersistence?: boolean;\n httpCacheTtlDays?: number;\n autodiscoverRepoSort?: RepoSortMethod;\n autodiscoverRepoOrder?: SortMethod;\n userAgent?: string;\n dockerMaxPages?: number;\n s3Endpoint?: string;\n s3PathStyle?: boolean;\n cachePrivatePackages?: boolean;\n repositoryCacheForceLocal?: boolean;\n configFileNames?: string[];\n ignorePrAuthor?: boolean;\n allowedUnsafeExecutions?: AllowedUnsafeExecution[];\n onboardingAutoCloseAge?: number;\n productLinks?: Record<string, string>;\n rebaseAllOpenBranches?: boolean;\n toolSettings?: GlobalToolSettingsOptions;\n}\n\n/**\n * Internal variables which are referenced from `GlobalConfig`, but are *not* user-configurable options.\n */\nexport interface InternalGlobalConfigOptions {\n localDir?: string;\n}\n\n/**\n * Those options are global only but still passed into the repository worker config.\n *\n * @deprecated https://github.com/renovatebot/renovate/issues/39693\n */\nexport interface LegacyAdminConfig {\n baseDir?: string;\n localDir?: string;\n\n logContext?: string;\n\n onboarding?: boolean;\n onboardingBranch?: string;\n onboardingNoDeps?: 'auto' | 'enabled' | 'disabled';\n onboardingRebaseCheckbox?: boolean;\n onboardingConfig?: RenovateConfig;\n onboardingConfigFileName?: string;\n\n optimizeForDisabled?: boolean;\n\n persistRepoData?: boolean;\n\n prCommitsPerRunLimit?: number;\n\n requireConfig?: RequiredConfig;\n\n useCloudMetadataServices?: boolean;\n\n writeDiscoveredRepos?: string;\n}\n\nexport type ExecutionMode = 'branch' | 'update';\n\nexport interface PostUpgradeTasks {\n commands?: string[];\n workingDirTemplate?: string;\n dataFileTemplate?: string;\n fileFilters?: string[];\n executionMode: ExecutionMode;\n installTools?: Partial<Record<ToolName, Record<never, never>>>;\n}\n\nexport type UpdateConfig<\n T extends RenovateSharedConfig = RenovateSharedConfig,\n> = Partial<Record<UpdateType, T | null>>;\n\nexport type RenovateRepositoryEntry = AllConfig & {\n repository: string;\n};\n\nexport type RenovateRepository = string | RenovateRepositoryEntry;\n\nexport type UseBaseBranchConfigType = 'merge' | 'none';\nexport type ConstraintsFilter = 'strict' | 'none';\nexport type MinimumReleaseAgeBehaviour =\n 'timestamp-required' | 'timestamp-optional';\n\nexport const allowedStatusCheckStrings = [\n 'minimumReleaseAge',\n 'mergeConfidence',\n 'configValidation',\n 'artifactError',\n] as const;\nexport type StatusCheckKey = (typeof allowedStatusCheckStrings)[number];\ntype UserEnv = Record<string, string>;\n\n/**\n * Computed properties, for internal use only\n */\nexport interface RenovateInternalConfig {\n /** computed base branch from patterns - for internal use only */\n baseBranches?: string[];\n currentCompatibility?: string;\n datasource?: string;\n hasBaseBranches?: boolean;\n isFork?: boolean;\n isVulnerabilityAlert?: boolean;\n\n /** What is this used for? */\n remediations?: unknown;\n /** What is this used for? */\n vulnerabilityAlertsOnly?: boolean;\n}\n\n// TODO: Proper typings\n/**\n * Configuration that could be used either top-level in a repository config (or Global, Inherited or Shareable Preset configuration).\n *\n * This is a superset of any configuration that a Renovate user (not self-hosted administrator) can set.\n */\nexport interface RenovateConfig\n extends\n LegacyAdminConfig,\n RenovateSharedConfig,\n UpdateConfig<PackageRule>,\n AssigneesAndReviewersConfig,\n ConfigMigration,\n RenovateInternalConfig {\n s3Endpoint?: string;\n s3PathStyle?: boolean;\n reportFormatting?: boolean;\n reportPath?: string;\n reportType?: 'logging' | 'file' | 's3' | null;\n depName?: string;\n /** user configurable base branch patterns*/\n baseBranchPatterns?: string[];\n useBaseBranchConfig?: UseBaseBranchConfigType;\n baseBranch?: string;\n defaultBranch?: string;\n branchList?: string[];\n cloneSubmodules?: boolean;\n cloneSubmodulesFilter?: string[];\n description?: string | string[];\n overrideDescription?: string | string[];\n detectGlobalManagerConfig?: boolean;\n errors?: ValidationMessage[];\n forkModeDisallowMaintainerEdits?: boolean;\n forkProcessing?: 'auto' | 'enabled' | 'disabled';\n forkToken?: string;\n\n gitAuthor?: string;\n\n hostRules?: HostRule[];\n\n inheritConfig?: boolean;\n inheritConfigFileName?: string;\n inheritConfigRepoName?: string;\n inheritConfigStrict?: boolean;\n\n ignorePresets?: string[];\n\n fileList?: string[];\n configWarningReuseIssue?: boolean;\n dependencyDashboard?: boolean;\n dependencyDashboardAutoclose?: boolean;\n dependencyDashboardChecks?: Record<string, string>;\n dependencyDashboardIssue?: number;\n dependencyDashboardTitle?: string;\n dependencyDashboardHeader?: string;\n dependencyDashboardFooter?: string;\n dependencyDashboardLabels?: string[];\n dependencyDashboardOSVVulnerabilitySummary?: 'none' | 'all' | 'unresolved';\n dependencyDashboardReportAbandonment?: boolean;\n mode?: 'silent' | 'full';\n packageFile?: string;\n packageRules?: PackageRule[];\n postUpdateOptions?: string[];\n branchConcurrentLimit?: number | null;\n parentOrg?: string;\n prConcurrentLimit?: number;\n commitHourlyLimit?: number;\n prHourlyLimit?: number;\n\n printConfig?: boolean;\n\n pruneStaleBranches?: boolean;\n\n defaultRegistryUrls?: string[];\n registryUrls?: string[] | null;\n registryAliases?: Record<string, string>;\n\n /**\n * What is this used for?\n * @deprecated\n */\n renovateJsonPresent?: boolean;\n\n repoIsOnboarded?: boolean;\n repoIsActivated?: boolean;\n\n topLevelOrg?: string;\n updateInternalDeps?: boolean;\n updateType?: UpdateType;\n\n warnings?: ValidationMessage[];\n vulnerabilityAlerts?: RenovateSharedConfig;\n osvVulnerabilityAlerts?: boolean;\n vulnerabilitySeverity?: string;\n customManagers?: CustomManager[];\n customDatasources?: Record<string, CustomDatasourceConfig>;\n\n fetchChangeLogs?: FetchChangeLogsOptions;\n secrets?: Record<string, string>;\n variables?: Record<string, string>;\n\n constraints?: Partial<Record<ConstraintName, string>>;\n /**\n * Any specific overrides for the versioning for the `AdditionalConstraintName`s.\n */\n constraintsVersioning?: Partial<Record<AdditionalConstraintName, string>>;\n skipInstalls?: boolean | null;\n\n constraintsFiltering?: ConstraintsFilter;\n\n customizeDashboard?: Record<string, string>;\n\n statusCheckNames?: Record<StatusCheckKey, string | null>;\n statusCheckWhen?: Partial<Record<StatusCheckKey, StatusCheckWhen>>;\n /**\n * User configured environment variables that Renovate uses when executing package manager commands\n */\n env?: UserEnv;\n logLevelRemap?: LogLevelRemap[];\n\n branchTopic?: string;\n additionalBranchPrefix?: string;\n sharedVariableName?: string;\n minimumGroupSize?: number;\n configFileNames?: string[];\n minimumReleaseAgeBehaviour?: MinimumReleaseAgeBehaviour;\n toolSettings?: RepoToolSettingsOptions;\n}\n\nconst CustomDatasourceFormats = [\n 'html',\n 'json',\n 'plain',\n 'toml',\n 'yaml',\n] as const;\nexport type CustomDatasourceFormats = (typeof CustomDatasourceFormats)[number];\n\nexport interface CustomDatasourceConfig {\n defaultRegistryUrlTemplate?: string;\n format?: CustomDatasourceFormats;\n transformTemplates?: string[];\n}\n\n/**\n * The superset of all configuration that a self-hosted administrator can set, alongside all repository-level configuration.\n *\n */\nexport interface AllConfig\n extends RenovateConfig, GlobalOnlyConfigLegacy, RepoGlobalConfig {\n gitUrl?: GitUrlOption;\n password?: string;\n token?: string;\n username?: string;\n}\n\nexport interface AssigneesAndReviewersConfig {\n assigneesFromCodeOwners?: boolean;\n expandCodeOwnersGroups?: boolean;\n assignees?: string[];\n assigneesSampleSize?: number;\n ignoreReviewers?: string[];\n reviewersFromCodeOwners?: boolean;\n reviewers?: string[];\n reviewersSampleSize?: number;\n additionalReviewers?: string[];\n filterUnavailableUsers?: boolean;\n}\n\nexport type UpdateType =\n | 'major'\n | 'minor'\n | 'patch'\n | 'pin'\n | 'digest'\n | 'pinDigest'\n | 'lockFileMaintenance'\n | 'lockfileUpdate'\n | 'rollback'\n | 'bump'\n | 'replacement';\n\n// These are the update types which can have configuration\nexport const UpdateTypesOptions = [\n 'major',\n 'minor',\n 'patch',\n 'pin',\n 'digest',\n 'pinDigest',\n 'lockFileMaintenance',\n 'rollback',\n 'replacement',\n] as const;\n\nexport type UpdateTypeOptions = (typeof UpdateTypesOptions)[number];\n\nexport type FetchChangeLogsOptions = 'off' | 'branch' | 'pr';\n\nexport type MatchStringsStrategy = 'any' | 'recursive' | 'combination';\n\nexport type MergeStrategy =\n | 'auto'\n | 'fast-forward'\n | 'merge-commit'\n | 'rebase'\n | 'rebase-merge'\n | 'squash';\n\n// This list should be added to as any new unsafe execution commands should be permitted\nexport type AllowedUnsafeExecution =\n 'bazelModDeps' | 'goGenerate' | 'gradleWrapper' | 'mise' | 'pixi';\n\n// TODO: Proper typings\nexport interface PackageRule\n extends RenovateSharedConfig, RenovateInternalConfig, UpdateConfig {\n allowedVersions?: string;\n description?: string | string[];\n matchBaseBranches?: string[];\n matchCategories?: string[];\n matchConfidence?: MergeConfidence[];\n matchCurrentAge?: string;\n matchCurrentValue?: string;\n matchCurrentVersion?: string;\n matchDatasources?: string[];\n matchDepNames?: string[];\n matchDepTypes?: string[];\n matchFileNames?: string[];\n matchIsBreaking?: boolean;\n matchManagers?: string[];\n matchNewValue?: string;\n matchPackageNames?: string[];\n matchRepositories?: string[];\n matchSourceUrls?: string[];\n matchRegistryUrls?: string[];\n matchUpdateTypes?: UpdateType[];\n matchJsonata?: string[];\n overrideDatasource?: string;\n overrideDepName?: string;\n overridePackageName?: string;\n registryUrls?: string[] | null;\n replacementName?: string;\n replacementVersion?: string;\n sourceUrl?: string;\n sourceDirectory?: string;\n vulnerabilitySeverity?: string;\n vulnerabilityFixVersion?: string;\n}\n\nexport interface ValidationMessage {\n // Topic is either the known list of topics, or a dynamically generated one\n topic: ConfigValidationTopic | (string & {});\n message: string;\n}\n\nexport type AllowedParents =\n | '.'\n | 'bumpVersions'\n | 'customDatasources'\n | 'customManagers'\n | 'hostRules'\n | 'logLevelRemap'\n | 'packageRules'\n | 'postUpgradeTasks'\n | 'vulnerabilityAlerts'\n | 'toolSettings'\n | ManagerName\n | UpdateTypeOptions;\nexport interface RenovateOptionBase {\n /**\n * If true, the option can only be configured by people with access to the Renovate instance.\n * Furthermore, the option should be documented in docs/usage/self-hosted-configuration.md.\n */\n globalOnly?: boolean;\n\n /**\n * If true, this option **MUST** be checked at the trust boundary: after resolving the full config that sets it, but **before** the value is applied.\n *\n * This is in addition to any existing config validation, and ensures that these options are re-validated due to their sensitive nature.\n *\n * A failure of that check **must** lead to a {@link ConfigValidationTopic.Security} error (which is then a full config validation error), stopping the Renovate run.\n *\n * After this check has been performed, additional filtering (for defence in depth) could be performed, but may not have an indication of what is repo- or preset-config vs global self-hosted config.\n */\n requiresCheckAtTrustBoundary?: boolean;\n\n inheritConfigSupport?: boolean;\n\n allowedValues?: string[];\n\n allowString?: boolean;\n\n cli?: boolean;\n\n description: string;\n\n env?: false | string;\n\n /**\n * Do not validate object children\n */\n freeChoice?: boolean;\n\n mergeable?: boolean;\n\n autogenerated?: boolean;\n\n name: string;\n\n parents?: AllowedParents[];\n\n stage?: RenovateConfigStage;\n\n experimental?: boolean;\n\n experimentalDescription?: string;\n\n experimentalIssues?: number[];\n\n advancedUse?: boolean;\n\n /**\n * This is used to add a deprecation message in the docs\n */\n deprecationMsg?: string;\n\n /**\n * For internal use only: add it to any config option that supports regex or glob matching\n */\n patternMatch?: boolean;\n\n /**\n * For internal use only: add it to any config option of type integer that supports negative integers\n */\n allowNegative?: boolean;\n\n /**\n * Managers which support this option, leave undefined if all managers support it.\n */\n supportedManagers?: string[];\n\n /**\n * Platforms which support this option, leave undefined if all platforms support it.\n */\n supportedPlatforms?: PlatformId[];\n\n /**\n * Conditions that must be met for this option to be required.\n */\n requiredIf?: RenovateRequiredOption[];\n\n /**\n * If true, the option's value supports Renovate templating.\n * @see https://docs.renovatebot.com/templates/\n */\n supportsTemplating?: boolean;\n}\n\nexport interface RenovateRequiredOption {\n siblingProperties: { property: string; value: string }[];\n}\n\nexport interface RenovateArrayOption<\n T extends string | number | Record<string, unknown> = Record<string, unknown>,\n> extends RenovateOptionBase {\n default?: T[] | null;\n mergeable?: boolean;\n type: 'array';\n subType?: 'string' | 'object' | 'number';\n}\n\nexport interface RenovateStringArrayOption extends RenovateArrayOption<string> {\n format?: 'regex';\n subType: 'string';\n}\n\nexport interface RenovateNumberArrayOption extends RenovateArrayOption<number> {\n subType: 'number';\n}\n\nexport interface RenovateBooleanOption extends RenovateOptionBase {\n default?: boolean | null;\n type: 'boolean';\n}\n\nexport interface RenovateIntegerOption extends RenovateOptionBase {\n default?: number | null;\n type: 'integer';\n}\n\nexport interface RenovateStringOption extends RenovateOptionBase {\n default?: string | null;\n format?: 'regex';\n\n // Not used\n replaceLineReturns?: boolean;\n type: 'string';\n}\n\nexport interface RenovateObjectOption extends RenovateOptionBase {\n default?: any;\n additionalProperties?: Record<string, unknown> | boolean;\n mergeable?: boolean;\n type: 'object';\n}\n\nexport type RenovateOptions =\n | RenovateStringOption\n | RenovateNumberArrayOption\n | RenovateStringArrayOption\n | RenovateIntegerOption\n | RenovateBooleanOption\n | RenovateArrayOption\n | RenovateObjectOption;\n\nexport interface PackageRuleInputConfig extends RenovateConfig {\n versioning?: string;\n packageFile?: string;\n lockFiles?: string[];\n depType?: string;\n depTypes?: string[];\n depName?: string;\n packageName?: string | null;\n newValue?: string | null;\n currentValue?: string | null;\n currentVersion?: string;\n lockedVersion?: string;\n updateType?: UpdateType;\n mergeConfidenceLevel?: MergeConfidence | undefined;\n isBump?: boolean;\n isBreaking?: boolean;\n sourceUrl?: string | null;\n categories?: string[];\n baseBranch?: string;\n manager?: string;\n datasource?: string;\n effectiveDatasource?: string;\n packageRules?: (PackageRule & PackageRuleInputConfig)[];\n releaseTimestamp?: Timestamp | null;\n repository?: string;\n currentVersionAgeInDays?: number;\n currentVersionTimestamp?: string;\n enabled?: boolean;\n skipReason?: SkipReason;\n skipStage?: StageName;\n}\n\nexport interface ConfigMigration {\n configMigration?: boolean;\n}\n\nexport interface MigratedConfig {\n /**\n * Indicates whether there was a migration applied to the configuration.\n *\n * @returns\n * `false` if the configuration does not need migrating, and `migratedConfig` can be ignored\n * `true` if the configuration was migrated, and if so, `migratedConfig` should be used instead of the provided config\n */\n isMigrated: boolean;\n migratedConfig: RenovateConfig;\n}\n\nexport interface MigratedRenovateConfig extends RenovateConfig {\n endpoints?: HostRule[];\n pathRules: PackageRule[];\n packages: PackageRule[];\n\n node?: RenovateConfig;\n travis?: RenovateConfig;\n gradle?: RenovateConfig;\n}\n\nexport interface ManagerConfig extends RenovateConfig {\n manager: string;\n categories?: Category[];\n}\n\nexport interface ValidationResult {\n errors: ValidationMessage[];\n warnings: ValidationMessage[];\n}\n\nexport interface BumpVersionConfig {\n bumpType?: string;\n filePatterns: string[];\n matchStrings: string[];\n name?: string;\n}\n\n/**\n * Global Config for specified `toolSettings` options.\n *\n */\nexport interface GlobalToolSettingsOptions {\n /** An upper limit on what the Java Virtual Machine's maximum memory can be set to. Repositories can specify <= this value */\n jvmMaxMemory?: number;\n /** An upper limit on what the Java Virtual Machine's starting memory can be set to. Repositories can specify <= this value */\n jvmMemory?: number;\n /** An upper limit on what the Node.JS process' maximum memory can be set to. Repositories can specify <= this value */\n nodeMaxMemory?: number;\n}\n\n/**\n * Repository config options for `toolSettings` options.\n */\nexport interface RepoToolSettingsOptions {\n /** The maximum memory the Java Virtual Machine can use. If greater than the Global Self-Hosted configuration setting, it will be set to that limit **/\n jvmMaxMemory?: number;\n /** The starting memory the Java Virtual Machine can use. If greater than the Global Self-Hosted configuration setting, it will be set to that limit **/\n jvmMemory?: number;\n /** The maximum memory child Node.JS processes can use. If greater than the Global Self-Hosted configuration setting, it will be set to that limit **/\n nodeMaxMemory?: number;\n}\n"],"mappings":";AA6CA,MAAa,+BAA+B;CAC1C;CACA;CACA;AACF;AA4SA,MAAa,4BAA4B;CACvC;CACA;CACA;CACA;AACF;AA6MA,MAAa,qBAAqB;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|
|
@@ -8,7 +8,7 @@ import { clone } from "../util/clone.js";
|
|
|
8
8
|
import { AllManagersListLiteral, CustomManagersListLiteral } from "../manager-list.generated.js";
|
|
9
9
|
import { AllVersioningsListLiteral } from "../versioning-list.generated.js";
|
|
10
10
|
import { supportedDatasources } from "./presets/internal/merge-confidence.preset.js";
|
|
11
|
-
import { allowedStatusCheckStrings } from "./types.js";
|
|
11
|
+
import { allowedStatusCheckStrings, allowedStatusCheckWhenValues } from "./types.js";
|
|
12
12
|
import { getOptions } from "./options/index.js";
|
|
13
13
|
import { parseUrl } from "../util/url.js";
|
|
14
14
|
import { instrument } from "../instrumentation/index.js";
|
|
@@ -217,7 +217,7 @@ async function validateConfig(configType, config, isPreset, parentPath) {
|
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
219
|
const parentName = parentPath && repoEntryRe.test(parentPath) ? "." : getParentName(parentPath);
|
|
220
|
-
if (!isPreset && optionParents[key] && !optionParents[key].includes(parentName)) {
|
|
220
|
+
if (!isPreset && parentName && optionParents[key] && !optionParents[key].includes(parentName)) {
|
|
221
221
|
const message = `"${key}" can't be used in "${parentName}". Allowed objects: ${optionParents[key]?.toSorted().join(", ")}.`;
|
|
222
222
|
warnings.push({
|
|
223
223
|
topic: `${parentPath ? `${parentPath}.` : ""}${key}`,
|
|
@@ -499,26 +499,20 @@ async function validateConfig(configType, config, isPreset, parentPath) {
|
|
|
499
499
|
continue;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
else if (key === "statusCheckWhen") {
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
if (!allowedStatusCheckStrings.includes(statusCheckKey)) errors.push({
|
|
502
|
+
else if (key === "statusCheckWhen") for (const [statusCheckKey, statusCheckValue] of Object.entries(val)) {
|
|
503
|
+
if (!allowedStatusCheckStrings.includes(statusCheckKey)) errors.push({
|
|
504
|
+
topic: ConfigValidationTopic.Error,
|
|
505
|
+
message: `Invalid \`${currentPath}.${key}.${statusCheckKey}\` configuration: key is not allowed.`
|
|
506
|
+
});
|
|
507
|
+
if (!isString(statusCheckValue) || !allowedStatusCheckWhenValues.includes(statusCheckValue)) {
|
|
508
|
+
errors.push({
|
|
510
509
|
topic: ConfigValidationTopic.Error,
|
|
511
|
-
message: `Invalid \`${currentPath}.${
|
|
510
|
+
message: `Invalid \`${currentPath}.${statusCheckKey}\` configuration: value must be one of "always", "never", or "failed".`
|
|
512
511
|
});
|
|
513
|
-
|
|
514
|
-
errors.push({
|
|
515
|
-
topic: ConfigValidationTopic.Error,
|
|
516
|
-
message: `Invalid \`${currentPath}.${statusCheckKey}\` configuration: value must be one of "always", "never", or "failed".`
|
|
517
|
-
});
|
|
518
|
-
continue;
|
|
519
|
-
}
|
|
512
|
+
continue;
|
|
520
513
|
}
|
|
521
|
-
}
|
|
514
|
+
}
|
|
515
|
+
else if (key === "customDatasources") {
|
|
522
516
|
const allowedKeys = [
|
|
523
517
|
"description",
|
|
524
518
|
"defaultRegistryUrlTemplate",
|