renovate 41.33.0 → 41.34.1
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/migrations/custom/base-branch-migration.js +3 -2
- package/dist/config/migrations/custom/base-branch-migration.js.map +1 -1
- package/dist/config/migrations/migrations-service.js +1 -0
- package/dist/config/migrations/migrations-service.js.map +1 -1
- package/dist/config/options/index.js +1 -1
- package/dist/config/options/index.js.map +1 -1
- package/dist/config/types.d.ts +2 -1
- package/dist/config/types.js.map +1 -1
- package/dist/config/validation-helpers/match-base-branches.d.ts +1 -1
- package/dist/config/validation-helpers/match-base-branches.js +3 -3
- package/dist/config/validation-helpers/match-base-branches.js.map +1 -1
- package/dist/config/validation-helpers/types.d.ts +2 -1
- package/dist/config/validation-helpers/types.js.map +1 -1
- package/dist/config/validation.js +6 -6
- package/dist/config/validation.js.map +1 -1
- package/dist/logger/index.js +7 -1
- package/dist/logger/index.js.map +1 -1
- package/dist/modules/platform/gitlab/index.js +2 -1
- package/dist/modules/platform/gitlab/index.js.map +1 -1
- package/dist/modules/platform/gitlab/types.d.ts +5 -0
- package/dist/modules/platform/gitlab/types.js.map +1 -1
- package/dist/workers/global/config/parse/env.js +1 -0
- package/dist/workers/global/config/parse/env.js.map +1 -1
- package/dist/workers/repository/finalize/prune.js +2 -2
- package/dist/workers/repository/finalize/prune.js.map +1 -1
- package/dist/workers/repository/onboarding/pr/base-branch.js +4 -4
- package/dist/workers/repository/onboarding/pr/base-branch.js.map +1 -1
- package/dist/workers/repository/process/extract-update.js +2 -2
- package/dist/workers/repository/process/extract-update.js.map +1 -1
- package/dist/workers/repository/process/index.js +15 -14
- package/dist/workers/repository/process/index.js.map +1 -1
- package/dist/workers/repository/process/write.js +1 -1
- package/dist/workers/repository/process/write.js.map +1 -1
- package/package.json +2 -2
- package/renovate-schema.json +1 -1
package/dist/config/types.d.ts
CHANGED
@@ -192,7 +192,8 @@ export interface RenovateConfig extends LegacyAdminConfig, RenovateSharedConfig,
|
|
192
192
|
reportPath?: string;
|
193
193
|
reportType?: 'logging' | 'file' | 's3' | null;
|
194
194
|
depName?: string;
|
195
|
-
|
195
|
+
/** user configurable base branch patterns*/
|
196
|
+
baseBranchPatterns?: string[];
|
196
197
|
commitBody?: string;
|
197
198
|
useBaseBranchConfig?: UseBaseBranchConfigType;
|
198
199
|
baseBranch?: string;
|
package/dist/config/types.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../lib/config/types.ts"],"names":[],"mappings":";;;AAyNa,QAAA,yBAAyB,GAAG;IACvC,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;CACP,CAAC;AAqGX,MAAM,uBAAuB,GAAG;IAC9B,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;CACE,CAAC;AAwCX,0DAA0D;AAC7C,QAAA,kBAAkB,GAAG;IAChC,OAAO;IACP,OAAO;IACP,OAAO;IACP,KAAK;IACL,QAAQ;IACR,WAAW;IACX,qBAAqB;IACrB,UAAU;IACV,aAAa;CACL,CAAC","sourcesContent":["import type { PlatformId } from '../constants';\nimport type { LogLevelRemap } from '../logger/types';\nimport type { ManagerName } from '../manager-list.generated';\nimport type { CustomManager } from '../modules/manager/custom/types';\nimport type { RepoSortMethod, SortMethod } from '../modules/platform/types';\nimport type { HostRule, SkipReason } from '../types';\nimport type { StageName } from '../types/skip-reason';\nimport type { GitNoVerifyOption } from '../util/git/types';\nimport type { MergeConfidence } from '../util/merge-confidence/types';\nimport type { Timestamp } from '../util/timestamp';\n\nexport type RenovateConfigStage =\n | 'global'\n | 'inherit'\n | 'repository'\n | 'package'\n | 'branch'\n | 'pr';\n\nexport type RepositoryCacheConfig = 'disabled' | 'enabled' | 'reset';\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nexport type RepositoryCacheType = 'local' | string;\nexport type DryRunConfig = 'extract' | 'lookup' | 'full';\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 PlatformCommitOptions = 'auto' | 'disabled' | 'enabled';\n// TODO: Proper typings\nexport interface RenovateSharedConfig {\n $schema?: string;\n addLabels?: string[];\n autoReplaceGlobalMatch?: boolean;\n automerge?: boolean;\n automergeSchedule?: string[];\n automergeStrategy?: MergeStrategy;\n bumpVersions?: BumpVersionConfig[];\n branchName?: string;\n branchNameStrict?: boolean;\n branchPrefix?: string;\n branchPrefixOld?: string;\n commitMessage?: string;\n commitMessageAction?: string;\n commitMessageExtra?: string;\n commitMessageLowerCase?: 'auto' | 'never';\n commitMessagePrefix?: string;\n commitMessageTopic?: string;\n confidential?: boolean;\n changelogUrl?: string;\n dependencyDashboardApproval?: boolean;\n draftPR?: boolean;\n enabled?: boolean;\n enabledManagers?: string[];\n extends?: string[];\n managerFilePatterns?: string[];\n force?: RenovateConfig;\n gitIgnoredAuthors?: string[];\n group?: GroupConfig;\n groupName?: string;\n groupSlug?: string;\n hashedBranchLength?: number;\n ignoreDeps?: string[];\n ignorePaths?: string[];\n ignoreTests?: boolean;\n includePaths?: string[];\n internalChecksAsSuccess?: boolean;\n keepUpdatedLabel?: string;\n labels?: string[];\n manager?: string;\n milestone?: number;\n npmrc?: string;\n npmrcMerge?: boolean;\n platformCommit?: PlatformCommitOptions;\n postUpgradeTasks?: PostUpgradeTasks;\n prBodyColumns?: string[];\n prBodyDefinitions?: Record<string, string>;\n prCreation?: 'immediate' | 'not-pending' | 'status-success' | 'approval';\n prPriority?: number;\n productLinks?: Record<string, string>;\n pruneBranchAfterAutomerge?: boolean;\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 schedule?: string[];\n semanticCommitScope?: string | null;\n semanticCommitType?: string;\n semanticCommits?: 'auto' | 'enabled' | 'disabled';\n stopUpdatingLabel?: string;\n suppressNotifications?: string[];\n timezone?: string;\n unicodeEmoji?: boolean;\n}\n\n// Config options used only within the global worker\n// The below should contain config options where stage=global\nexport interface GlobalOnlyConfig {\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 forceCli?: boolean;\n gitNoVerify?: GitNoVerifyOption[];\n gitPrivateKey?: string;\n globalExtends?: string[];\n mergeConfidenceDatasources?: string[];\n mergeConfidenceEndpoint?: string;\n platform?: PlatformId;\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}\n\n// Config options used within the repository worker, but not user configurable\n// The below should contain config options where globalOnly=true\nexport interface RepoGlobalConfig {\n allowedCommands?: string[];\n allowCustomCrateRegistries?: boolean;\n allowPlugins?: boolean;\n allowScripts?: boolean;\n allowedEnv?: string[];\n allowedHeaders?: string[];\n binarySource?: 'docker' | 'global' | 'install' | 'hermit';\n cacheDir?: string;\n cacheHardTtlMinutes?: number;\n cacheTtlOverride?: Record<string, number>;\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 localDir?: string;\n migratePresets?: Record<string, string>;\n platform?: PlatformId;\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}\n\nexport interface LegacyAdminConfig {\n localDir?: string;\n\n logContext?: string;\n\n onboarding?: boolean;\n onboardingBranch?: string;\n onboardingCommitMessage?: string;\n onboardingNoDeps?: 'auto' | 'enabled' | 'disabled';\n onboardingRebaseCheckbox?: boolean;\n onboardingPrTitle?: string;\n onboardingConfig?: RenovateSharedConfig;\n onboardingConfigFileName?: string;\n\n requireConfig?: RequiredConfig;\n}\n\nexport type ExecutionMode = 'branch' | 'update';\n\nexport interface PostUpgradeTasks {\n commands?: string[];\n dataFileTemplate?: string;\n fileFilters?: string[];\n executionMode: ExecutionMode;\n}\n\nexport type UpdateConfig<\n T extends RenovateSharedConfig = RenovateSharedConfig,\n> = Partial<Record<UpdateType, T | null>>;\n\nexport type RenovateRepository =\n | string\n | {\n repository: string;\n secrets?: Record<string, string>;\n variables?: Record<string, string>;\n };\n\nexport type UseBaseBranchConfigType = 'merge' | 'none';\nexport type ConstraintsFilter = 'strict' | 'none';\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// TODO: Proper typings\nexport interface RenovateConfig\n extends LegacyAdminConfig,\n RenovateSharedConfig,\n UpdateConfig<PackageRule>,\n AssigneesAndReviewersConfig,\n ConfigMigration,\n Record<string, unknown> {\n s3Endpoint?: string;\n s3PathStyle?: boolean;\n reportPath?: string;\n reportType?: 'logging' | 'file' | 's3' | null;\n depName?: string;\n baseBranches?: string[];\n commitBody?: string;\n useBaseBranchConfig?: UseBaseBranchConfigType;\n baseBranch?: string;\n defaultBranch?: string;\n branchList?: string[];\n cloneSubmodulesFilter?: string[];\n description?: string | string[];\n force?: RenovateConfig;\n errors?: ValidationMessage[];\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 forkProcessing?: 'auto' | 'enabled' | 'disabled';\n isFork?: boolean;\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 packageFile?: string;\n packageRules?: PackageRule[];\n postUpdateOptions?: string[];\n branchConcurrentLimit?: number | null;\n prConcurrentLimit?: number;\n prHourlyLimit?: number;\n forkModeDisallowMaintainerEdits?: boolean;\n\n defaultRegistryUrls?: string[];\n registryUrls?: string[] | null;\n registryAliases?: Record<string, string>;\n\n repoIsOnboarded?: boolean;\n repoIsActivated?: boolean;\n\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?: Record<string, string>;\n skipInstalls?: boolean | null;\n\n constraintsFiltering?: ConstraintsFilter;\n\n checkedBranches?: string[];\n customizeDashboard?: Record<string, string>;\n\n statusCheckNames?: Record<StatusCheckKey, string | null>;\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}\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\nexport interface AllConfig\n extends RenovateConfig,\n GlobalOnlyConfig,\n RepoGlobalConfig {}\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 | 'squash';\n\n// TODO: Proper typings\nexport interface PackageRule\n extends RenovateSharedConfig,\n UpdateConfig,\n Record<string, unknown> {\n description?: string | string[];\n isVulnerabilityAlert?: boolean;\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 matchManagers?: string[];\n matchNewValue?: string;\n matchPackageNames?: string[];\n matchRepositories?: string[];\n matchSourceUrls?: string[];\n matchUpdateTypes?: UpdateType[];\n matchJsonata?: string[];\n registryUrls?: string[] | null;\n vulnerabilitySeverity?: string;\n vulnerabilityFixVersion?: string;\n}\n\nexport interface ValidationMessage {\n topic: 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 | 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 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 depreciation 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\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 Record<string, unknown> {\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 sourceUrl?: string | null;\n categories?: string[];\n baseBranch?: string;\n manager?: string;\n datasource?: 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 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}\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"]}
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../lib/config/types.ts"],"names":[],"mappings":";;;AAyNa,QAAA,yBAAyB,GAAG;IACvC,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;CACP,CAAC;AAsGX,MAAM,uBAAuB,GAAG;IAC9B,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;CACE,CAAC;AAwCX,0DAA0D;AAC7C,QAAA,kBAAkB,GAAG;IAChC,OAAO;IACP,OAAO;IACP,OAAO;IACP,KAAK;IACL,QAAQ;IACR,WAAW;IACX,qBAAqB;IACrB,UAAU;IACV,aAAa;CACL,CAAC","sourcesContent":["import type { PlatformId } from '../constants';\nimport type { LogLevelRemap } from '../logger/types';\nimport type { ManagerName } from '../manager-list.generated';\nimport type { CustomManager } from '../modules/manager/custom/types';\nimport type { RepoSortMethod, SortMethod } from '../modules/platform/types';\nimport type { HostRule, SkipReason } from '../types';\nimport type { StageName } from '../types/skip-reason';\nimport type { GitNoVerifyOption } from '../util/git/types';\nimport type { MergeConfidence } from '../util/merge-confidence/types';\nimport type { Timestamp } from '../util/timestamp';\n\nexport type RenovateConfigStage =\n | 'global'\n | 'inherit'\n | 'repository'\n | 'package'\n | 'branch'\n | 'pr';\n\nexport type RepositoryCacheConfig = 'disabled' | 'enabled' | 'reset';\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nexport type RepositoryCacheType = 'local' | string;\nexport type DryRunConfig = 'extract' | 'lookup' | 'full';\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 PlatformCommitOptions = 'auto' | 'disabled' | 'enabled';\n// TODO: Proper typings\nexport interface RenovateSharedConfig {\n $schema?: string;\n addLabels?: string[];\n autoReplaceGlobalMatch?: boolean;\n automerge?: boolean;\n automergeSchedule?: string[];\n automergeStrategy?: MergeStrategy;\n bumpVersions?: BumpVersionConfig[];\n branchName?: string;\n branchNameStrict?: boolean;\n branchPrefix?: string;\n branchPrefixOld?: string;\n commitMessage?: string;\n commitMessageAction?: string;\n commitMessageExtra?: string;\n commitMessageLowerCase?: 'auto' | 'never';\n commitMessagePrefix?: string;\n commitMessageTopic?: string;\n confidential?: boolean;\n changelogUrl?: string;\n dependencyDashboardApproval?: boolean;\n draftPR?: boolean;\n enabled?: boolean;\n enabledManagers?: string[];\n extends?: string[];\n managerFilePatterns?: string[];\n force?: RenovateConfig;\n gitIgnoredAuthors?: string[];\n group?: GroupConfig;\n groupName?: string;\n groupSlug?: string;\n hashedBranchLength?: number;\n ignoreDeps?: string[];\n ignorePaths?: string[];\n ignoreTests?: boolean;\n includePaths?: string[];\n internalChecksAsSuccess?: boolean;\n keepUpdatedLabel?: string;\n labels?: string[];\n manager?: string;\n milestone?: number;\n npmrc?: string;\n npmrcMerge?: boolean;\n platformCommit?: PlatformCommitOptions;\n postUpgradeTasks?: PostUpgradeTasks;\n prBodyColumns?: string[];\n prBodyDefinitions?: Record<string, string>;\n prCreation?: 'immediate' | 'not-pending' | 'status-success' | 'approval';\n prPriority?: number;\n productLinks?: Record<string, string>;\n pruneBranchAfterAutomerge?: boolean;\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 schedule?: string[];\n semanticCommitScope?: string | null;\n semanticCommitType?: string;\n semanticCommits?: 'auto' | 'enabled' | 'disabled';\n stopUpdatingLabel?: string;\n suppressNotifications?: string[];\n timezone?: string;\n unicodeEmoji?: boolean;\n}\n\n// Config options used only within the global worker\n// The below should contain config options where stage=global\nexport interface GlobalOnlyConfig {\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 forceCli?: boolean;\n gitNoVerify?: GitNoVerifyOption[];\n gitPrivateKey?: string;\n globalExtends?: string[];\n mergeConfidenceDatasources?: string[];\n mergeConfidenceEndpoint?: string;\n platform?: PlatformId;\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}\n\n// Config options used within the repository worker, but not user configurable\n// The below should contain config options where globalOnly=true\nexport interface RepoGlobalConfig {\n allowedCommands?: string[];\n allowCustomCrateRegistries?: boolean;\n allowPlugins?: boolean;\n allowScripts?: boolean;\n allowedEnv?: string[];\n allowedHeaders?: string[];\n binarySource?: 'docker' | 'global' | 'install' | 'hermit';\n cacheDir?: string;\n cacheHardTtlMinutes?: number;\n cacheTtlOverride?: Record<string, number>;\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 localDir?: string;\n migratePresets?: Record<string, string>;\n platform?: PlatformId;\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}\n\nexport interface LegacyAdminConfig {\n localDir?: string;\n\n logContext?: string;\n\n onboarding?: boolean;\n onboardingBranch?: string;\n onboardingCommitMessage?: string;\n onboardingNoDeps?: 'auto' | 'enabled' | 'disabled';\n onboardingRebaseCheckbox?: boolean;\n onboardingPrTitle?: string;\n onboardingConfig?: RenovateSharedConfig;\n onboardingConfigFileName?: string;\n\n requireConfig?: RequiredConfig;\n}\n\nexport type ExecutionMode = 'branch' | 'update';\n\nexport interface PostUpgradeTasks {\n commands?: string[];\n dataFileTemplate?: string;\n fileFilters?: string[];\n executionMode: ExecutionMode;\n}\n\nexport type UpdateConfig<\n T extends RenovateSharedConfig = RenovateSharedConfig,\n> = Partial<Record<UpdateType, T | null>>;\n\nexport type RenovateRepository =\n | string\n | {\n repository: string;\n secrets?: Record<string, string>;\n variables?: Record<string, string>;\n };\n\nexport type UseBaseBranchConfigType = 'merge' | 'none';\nexport type ConstraintsFilter = 'strict' | 'none';\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// TODO: Proper typings\nexport interface RenovateConfig\n extends LegacyAdminConfig,\n RenovateSharedConfig,\n UpdateConfig<PackageRule>,\n AssigneesAndReviewersConfig,\n ConfigMigration,\n Record<string, unknown> {\n s3Endpoint?: string;\n s3PathStyle?: boolean;\n reportPath?: string;\n reportType?: 'logging' | 'file' | 's3' | null;\n depName?: string;\n /** user configurable base branch patterns*/\n baseBranchPatterns?: string[];\n commitBody?: string;\n useBaseBranchConfig?: UseBaseBranchConfigType;\n baseBranch?: string;\n defaultBranch?: string;\n branchList?: string[];\n cloneSubmodulesFilter?: string[];\n description?: string | string[];\n force?: RenovateConfig;\n errors?: ValidationMessage[];\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 forkProcessing?: 'auto' | 'enabled' | 'disabled';\n isFork?: boolean;\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 packageFile?: string;\n packageRules?: PackageRule[];\n postUpdateOptions?: string[];\n branchConcurrentLimit?: number | null;\n prConcurrentLimit?: number;\n prHourlyLimit?: number;\n forkModeDisallowMaintainerEdits?: boolean;\n\n defaultRegistryUrls?: string[];\n registryUrls?: string[] | null;\n registryAliases?: Record<string, string>;\n\n repoIsOnboarded?: boolean;\n repoIsActivated?: boolean;\n\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?: Record<string, string>;\n skipInstalls?: boolean | null;\n\n constraintsFiltering?: ConstraintsFilter;\n\n checkedBranches?: string[];\n customizeDashboard?: Record<string, string>;\n\n statusCheckNames?: Record<StatusCheckKey, string | null>;\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}\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\nexport interface AllConfig\n extends RenovateConfig,\n GlobalOnlyConfig,\n RepoGlobalConfig {}\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 | 'squash';\n\n// TODO: Proper typings\nexport interface PackageRule\n extends RenovateSharedConfig,\n UpdateConfig,\n Record<string, unknown> {\n description?: string | string[];\n isVulnerabilityAlert?: boolean;\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 matchManagers?: string[];\n matchNewValue?: string;\n matchPackageNames?: string[];\n matchRepositories?: string[];\n matchSourceUrls?: string[];\n matchUpdateTypes?: UpdateType[];\n matchJsonata?: string[];\n registryUrls?: string[] | null;\n vulnerabilitySeverity?: string;\n vulnerabilityFixVersion?: string;\n}\n\nexport interface ValidationMessage {\n topic: 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 | 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 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 depreciation 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\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 Record<string, unknown> {\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 sourceUrl?: string | null;\n categories?: string[];\n baseBranch?: string;\n manager?: string;\n datasource?: 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 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}\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"]}
|
@@ -3,4 +3,4 @@ import type { CheckBaseBranchesArgs } from './types';
|
|
3
3
|
/**
|
4
4
|
* Only if type condition or context condition violated then errors array will be mutated to store metadata
|
5
5
|
*/
|
6
|
-
export declare function check({ resolvedRule, currentPath,
|
6
|
+
export declare function check({ resolvedRule, currentPath, baseBranchPatterns, }: CheckBaseBranchesArgs): ValidationMessage[];
|
@@ -6,13 +6,13 @@ const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
|
|
6
6
|
/**
|
7
7
|
* Only if type condition or context condition violated then errors array will be mutated to store metadata
|
8
8
|
*/
|
9
|
-
function check({ resolvedRule, currentPath,
|
9
|
+
function check({ resolvedRule, currentPath, baseBranchPatterns, }) {
|
10
10
|
const warnings = [];
|
11
11
|
if (Array.isArray(resolvedRule.matchBaseBranches)) {
|
12
|
-
if (!is_1.default.nonEmptyArray(
|
12
|
+
if (!is_1.default.nonEmptyArray(baseBranchPatterns)) {
|
13
13
|
warnings.push({
|
14
14
|
topic: 'Configuration Error',
|
15
|
-
message: `${currentPath}: You must configure
|
15
|
+
message: `${currentPath}: You must configure baseBranchPatterns in order to use them inside matchBaseBranches.`,
|
16
16
|
});
|
17
17
|
}
|
18
18
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"match-base-branches.js","sourceRoot":"","sources":["../../../lib/config/validation-helpers/match-base-branches.ts"],"names":[],"mappings":";;AAOA,sBAgBC;;AAvBD,kEAAkC;AAIlC;;GAEG;AACH,SAAgB,KAAK,CAAC,EACpB,YAAY,EACZ,WAAW,EACX,
|
1
|
+
{"version":3,"file":"match-base-branches.js","sourceRoot":"","sources":["../../../lib/config/validation-helpers/match-base-branches.ts"],"names":[],"mappings":";;AAOA,sBAgBC;;AAvBD,kEAAkC;AAIlC;;GAEG;AACH,SAAgB,KAAK,CAAC,EACpB,YAAY,EACZ,WAAW,EACX,kBAAkB,GACI;IACtB,MAAM,QAAQ,GAAwB,EAAE,CAAC;IACzC,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAClD,IAAI,CAAC,YAAE,CAAC,aAAa,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAC1C,QAAQ,CAAC,IAAI,CAAC;gBACZ,KAAK,EAAE,qBAAqB;gBAC5B,OAAO,EAAE,GAAG,WAAW,wFAAwF;aAChH,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport type { ValidationMessage } from '../types';\nimport type { CheckBaseBranchesArgs } from './types';\n\n/**\n * Only if type condition or context condition violated then errors array will be mutated to store metadata\n */\nexport function check({\n resolvedRule,\n currentPath,\n baseBranchPatterns,\n}: CheckBaseBranchesArgs): ValidationMessage[] {\n const warnings: ValidationMessage[] = [];\n if (Array.isArray(resolvedRule.matchBaseBranches)) {\n if (!is.nonEmptyArray(baseBranchPatterns)) {\n warnings.push({\n topic: 'Configuration Error',\n message: `${currentPath}: You must configure baseBranchPatterns in order to use them inside matchBaseBranches.`,\n });\n }\n }\n\n return warnings;\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/config/validation-helpers/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageRule } from '../types';\n\nexport interface CheckManagerArgs {\n resolvedRule: PackageRule;\n currentPath: string;\n}\n\nexport interface CheckMatcherArgs {\n val: unknown;\n currentPath: string;\n}\n\nexport interface CheckBaseBranchesArgs {\n resolvedRule: PackageRule;\n currentPath: string;\n
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/config/validation-helpers/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageRule } from '../types';\n\nexport interface CheckManagerArgs {\n resolvedRule: PackageRule;\n currentPath: string;\n}\n\nexport interface CheckMatcherArgs {\n val: unknown;\n currentPath: string;\n}\n\nexport interface CheckBaseBranchesArgs {\n resolvedRule: PackageRule;\n currentPath: string;\n /** user configurable base branch patterns*/\n baseBranchPatterns?: string[];\n}\n"]}
|
@@ -317,7 +317,7 @@ async function validateConfig(configType, config, isPreset, parentPath) {
|
|
317
317
|
warnings.push(...matchBaseBranchesValidator.check({
|
318
318
|
resolvedRule,
|
319
319
|
currentPath: `${currentPath}[${subIndex}]`,
|
320
|
-
|
320
|
+
baseBranchPatterns: config.baseBranchPatterns,
|
321
321
|
}));
|
322
322
|
const selectorLength = Object.keys(resolvedRule).filter((ruleKey) => selectors.includes(ruleKey)).length;
|
323
323
|
if (!selectorLength) {
|
@@ -451,13 +451,13 @@ async function validateConfig(configType, config, isPreset, parentPath) {
|
|
451
451
|
}
|
452
452
|
}
|
453
453
|
}
|
454
|
-
if (key === '
|
455
|
-
for (const
|
456
|
-
if ((0, string_match_1.isRegexMatch)(
|
457
|
-
!(0, string_match_1.getRegexPredicate)(
|
454
|
+
if (key === 'baseBranchPatterns') {
|
455
|
+
for (const baseBranchPattern of val) {
|
456
|
+
if ((0, string_match_1.isRegexMatch)(baseBranchPattern) &&
|
457
|
+
!(0, string_match_1.getRegexPredicate)(baseBranchPattern)) {
|
458
458
|
errors.push({
|
459
459
|
topic: 'Configuration Error',
|
460
|
-
message: `Invalid regExp for ${currentPath}: \`${
|
460
|
+
message: `Invalid regExp for ${currentPath}: \`${baseBranchPattern}\``,
|
461
461
|
});
|
462
462
|
}
|
463
463
|
}
|
@@ -1 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agersList, getManagerList } from '../modules/manager';\nimport { isCustomManager } from '../modules/manager/custom';\nimport type { CustomManager } from '../modules/manager/custom/types';\nimport type { HostRule } from '../types';\nimport { getExpression } from '../util/jsonata';\nimport { regEx } from '../util/regex';\nimport {\n getRegexPredicate,\n isRegexMatch,\n matchRegexOrGlobList,\n} from '../util/string-match';\nimport * as template from '../util/template';\nimport { parseUrl } from '../util/url';\nimport {\n hasValidSchedule,\n hasValidTimezone,\n} from '../workers/repository/update/branch/schedule';\nimport { configFileNames } from './app-strings';\nimport { GlobalConfig } from './global';\nimport { migrateConfig } from './migration';\nimport { getOptions } from './options';\nimport { resolveConfigPresets } from './presets';\nimport { supportedDatasources } from './presets/internal/merge-confidence';\nimport type {\n AllowedParents,\n RenovateConfig,\n RenovateOptions,\n StatusCheckKey,\n ValidationMessage,\n ValidationResult,\n} from './types';\nimport { allowedStatusCheckStrings } from './types';\nimport * as managerValidator from './validation-helpers/managers';\nimport * as matchBaseBranchesValidator from './validation-helpers/match-base-branches';\nimport * as regexOrGlobValidator from './validation-helpers/regex-glob-matchers';\nimport {\n getParentName,\n isFalseGlobal,\n validateJSONataManagerFields,\n validateNumber,\n validatePlainObject,\n validateRegexManagerFields,\n} from './validation-helpers/utils';\n\nconst options = getOptions();\n\nlet optionsInitialized = false;\nlet optionTypes: Record<string, RenovateOptions['type']>;\nlet optionParents: Record<string, AllowedParents[]>;\nlet optionGlobals: Set<string>;\nlet optionInherits: Set<string>;\nlet optionRegexOrGlob: Set<string>;\nlet optionAllowsNegativeIntegers: Set<string>;\n\nconst managerList = getManagerList();\n\nconst topLevelObjects = [...managerList, 'env'];\n\nconst ignoredNodes = [\n '$schema',\n 'headers',\n 'depType',\n 'npmToken',\n 'packageFile',\n 'forkToken',\n 'repository',\n 'vulnerabilityAlertsOnly',\n 'vulnerabilityAlert',\n 'isVulnerabilityAlert',\n 'vulnerabilityFixVersion', // not intended to be used by end users but may be by Mend apps\n 'copyLocalLibs', // deprecated - functionality is now enabled by default\n 'prBody', // deprecated\n 'minimumConfidence', // undocumented feature flag\n];\nconst tzRe = regEx(/^:timezone\\((.+)\\)$/);\nconst rulesRe = regEx(/p.*Rules\\[\\d+\\]$/);\n\nfunction isIgnored(key: string): boolean {\n return ignoredNodes.includes(key);\n}\n\nfunction getUnsupportedEnabledManagers(enabledManagers: string[]): string[] {\n return enabledManagers.filter(\n (manager) => !allManagersList.includes(manager.replace('custom.', '')),\n );\n}\n\nfunction getDeprecationMessage(option: string): string | undefined {\n const deprecatedOptions: Record<string, string | undefined> = {\n branchName: `Direct editing of branchName is now deprecated. Please edit branchPrefix, additionalBranchPrefix, or branchTopic instead`,\n commitMessage: `Direct editing of commitMessage is now deprecated. Please edit commitMessage's subcomponents instead.`,\n prTitle: `Direct editing of prTitle is now deprecated. Please edit commitMessage subcomponents instead as they will be passed through to prTitle.`,\n };\n return deprecatedOptions[option];\n}\n\nfunction isInhertConfigOption(key: string): boolean {\n return optionInherits.has(key);\n}\n\nfunction isRegexOrGlobOption(key: string): boolean {\n return optionRegexOrGlob.has(key);\n}\n\nfunction isGlobalOption(key: string): boolean {\n return optionGlobals.has(key);\n}\n\nfunction initOptions(): void {\n if (optionsInitialized) {\n return;\n }\n\n optionParents = {};\n optionInherits = new Set();\n optionTypes = {};\n optionRegexOrGlob = new Set();\n optionGlobals = new Set();\n optionAllowsNegativeIntegers = new Set();\n\n for (const option of options) {\n optionTypes[option.name] = option.type;\n\n if (option.parents) {\n optionParents[option.name] = option.parents;\n }\n\n if (option.inheritConfigSupport) {\n optionInherits.add(option.name);\n }\n\n if (option.patternMatch) {\n optionRegexOrGlob.add(option.name);\n }\n\n if (option.globalOnly) {\n optionGlobals.add(option.name);\n }\n\n if (option.allowNegative) {\n optionAllowsNegativeIntegers.add(option.name);\n }\n }\n\n optionsInitialized = true;\n}\n\nexport async function validateConfig(\n configType: 'global' | 'inherit' | 'repo',\n config: RenovateConfig,\n isPreset?: boolean,\n parentPath?: string,\n): Promise<ValidationResult> {\n initOptions();\n\n let errors: ValidationMessage[] = [];\n let warnings: ValidationMessage[] = [];\n\n for (const [key, val] of Object.entries(config)) {\n const currentPath = parentPath ? `${parentPath}.${key}` : key;\n /* v8 ignore next 7 -- TODO: add test */\n if (key === '__proto__') {\n errors.push({\n topic: 'Config security error',\n message: '__proto__',\n });\n continue;\n }\n if (\n parentPath &&\n parentPath !== 'onboardingConfig' &&\n topLevelObjects.includes(key)\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `The \"${key}\" object can only be configured at the top level of a config but was found inside \"${parentPath}\"`,\n });\n }\n\n if (isGlobalOption(key)) {\n if (configType === 'global') {\n await validateGlobalConfig(\n key,\n val,\n optionTypes[key],\n warnings,\n errors,\n currentPath,\n config,\n );\n continue;\n } else if (\n !isFalseGlobal(key, parentPath) &&\n !(configType === 'inherit' && isInhertConfigOption(key))\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `The \"${key}\" option is a global option reserved only for Renovate's global configuration and cannot be configured within a repository's config file.`,\n });\n continue;\n }\n }\n if (key === 'enabledManagers' && val) {\n const unsupportedManagers = getUnsupportedEnabledManagers(\n val as string[],\n );\n if (is.nonEmptyArray(unsupportedManagers)) {\n errors.push({\n topic: 'Configuration Error',\n message: `The following managers configured in enabledManagers are not supported: \"${unsupportedManagers.join(\n ', ',\n )}\"`,\n });\n }\n }\n if (\n !isIgnored(key) && // We need to ignore some reserved keys\n !(is as any).function(val) // Ignore all functions\n ) {\n if (getDeprecationMessage(key)) {\n warnings.push({\n topic: 'Deprecation Warning',\n message: getDeprecationMessage(key)!,\n });\n }\n const templateKeys = [\n 'branchName',\n 'commitBody',\n 'commitMessage',\n 'prTitle',\n 'semanticCommitScope',\n ];\n if ((key.endsWith('Template') || templateKeys.includes(key)) && val) {\n try {\n // TODO: validate string #22198\n let res = template.compile((val as string).toString(), config, false);\n res = template.compile(res, config, false);\n template.compile(res, config, false);\n } catch {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid template in config path: ${currentPath}`,\n });\n }\n }\n const parentName = getParentName(parentPath);\n if (\n !isPreset &&\n optionParents[key] &&\n !optionParents[key].includes(parentName as AllowedParents)\n ) {\n // TODO: types (#22198)\n const message = `${key} should only be configured within one of \"${optionParents[\n key\n ]?.join(' or ')}\" objects. Was found in ${parentName}`;\n warnings.push({\n topic: `${parentPath ? `${parentPath}.` : ''}${key}`,\n message,\n });\n }\n if (!optionTypes[key]) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid configuration option: ${currentPath}`,\n });\n } else if (key === 'schedule') {\n const [validSchedule, errorMessage] = hasValidSchedule(val as string[]);\n if (!validSchedule) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid ${currentPath}: \\`${errorMessage}\\``,\n });\n }\n } else if (\n [\n 'allowedVersions',\n 'matchCurrentVersion',\n 'matchCurrentValue',\n 'matchNewValue',\n ].includes(key) &&\n isRegexMatch(val)\n ) {\n if (!getRegexPredicate(val)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid regExp for ${currentPath}: \\`${val}\\``,\n });\n }\n } else if (key === 'timezone' && val !== null) {\n const [validTimezone, errorMessage] = hasValidTimezone(val as string);\n if (!validTimezone) {\n errors.push({\n topic: 'Configuration Error',\n message: `${currentPath}: ${errorMessage}`,\n });\n }\n } else if (val !== null) {\n const type = optionTypes[key];\n if (type === 'boolean') {\n if (val !== true && val !== false) {\n errors.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be boolean. Found: ${JSON.stringify(\n val,\n )} (${typeof val})`,\n });\n }\n } else if (type === 'integer') {\n const allowsNegative = optionAllowsNegativeIntegers.has(key);\n errors.push(...validateNumber(key, val, allowsNegative, currentPath));\n } else if (type === 'array' && val) {\n if (is.array(val)) {\n for (const [subIndex, subval] of val.entries()) {\n if (is.object(subval)) {\n const subValidation = await validateConfig(\n configType,\n subval as RenovateConfig,\n isPreset,\n `${currentPath}[${subIndex}]`,\n );\n warnings = warnings.concat(subValidation.warnings);\n errors = errors.concat(subValidation.errors);\n }\n }\n if (isRegexOrGlobOption(key)) {\n errors.push(\n ...regexOrGlobValidator.check({\n val,\n currentPath,\n }),\n );\n }\n if (key === 'extends') {\n for (const subval of val) {\n if (is.string(subval)) {\n if (\n parentName === 'packageRules' &&\n subval.startsWith('group:')\n ) {\n warnings.push({\n topic: 'Configuration Warning',\n message: `${currentPath}: you should not extend \"group:\" presets`,\n });\n }\n if (tzRe.test(subval)) {\n const [, timezone] = tzRe.exec(subval)!;\n const [validTimezone, errorMessage] =\n hasValidTimezone(timezone);\n if (!validTimezone) {\n errors.push({\n topic: 'Configuration Error',\n message: `${currentPath}: ${errorMessage}`,\n });\n }\n }\n } else {\n errors.push({\n topic: 'Configuration Warning',\n message: `${currentPath}: preset value is not a string`,\n });\n }\n }\n }\n\n const selectors = [\n 'matchFileNames',\n 'matchLanguages',\n 'matchCategories',\n 'matchBaseBranches',\n 'matchManagers',\n 'matchDatasources',\n 'matchDepTypes',\n 'matchDepNames',\n 'matchPackageNames',\n 'matchCurrentValue',\n 'matchCurrentVersion',\n 'matchSourceUrls',\n 'matchUpdateTypes',\n 'matchConfidence',\n 'matchCurrentAge',\n 'matchRepositories',\n 'matchNewValue',\n 'matchJsonata',\n ];\n if (key === 'packageRules') {\n for (const [subIndex, packageRule] of val.entries()) {\n if (is.object(packageRule)) {\n const resolvedRule = migrateConfig({\n packageRules: [\n await resolveConfigPresets(\n packageRule as RenovateConfig,\n config,\n ),\n ],\n }).migratedConfig.packageRules![0];\n errors.push(\n ...managerValidator.check({ resolvedRule, currentPath }),\n );\n warnings.push(\n ...matchBaseBranchesValidator.check({\n resolvedRule,\n currentPath: `${currentPath}[${subIndex}]`,\n baseBranches: config.baseBranches!,\n }),\n );\n const selectorLength = Object.keys(resolvedRule).filter(\n (ruleKey) => selectors.includes(ruleKey),\n ).length;\n if (!selectorLength) {\n const message = `${currentPath}[${subIndex}]: Each packageRule must contain at least one match* or exclude* selector. Rule: ${JSON.stringify(\n packageRule,\n )}`;\n errors.push({\n topic: 'Configuration Error',\n message,\n });\n }\n if (selectorLength === Object.keys(resolvedRule).length) {\n const message = `${currentPath}[${subIndex}]: Each packageRule must contain at least one non-match* or non-exclude* field. Rule: ${JSON.stringify(\n packageRule,\n )}`;\n warnings.push({\n topic: 'Configuration Error',\n message,\n });\n }\n // It's too late to apply any of these options once you already have updates determined\n const preLookupOptions = [\n 'allowedVersions',\n 'extractVersion',\n 'followTag',\n 'ignoreDeps',\n 'ignoreUnstable',\n 'rangeStrategy',\n 'registryUrls',\n 'respectLatest',\n 'rollbackPrs',\n 'separateMajorMinor',\n 'separateMinorPatch',\n 'separateMultipleMajor',\n 'separateMultipleMinor',\n 'versioning',\n ];\n if (is.nonEmptyArray(resolvedRule.matchUpdateTypes)) {\n for (const option of preLookupOptions) {\n if (resolvedRule[option] !== undefined) {\n const message = `${currentPath}[${subIndex}]: packageRules cannot combine both matchUpdateTypes and ${option}. Rule: ${JSON.stringify(\n packageRule,\n )}`;\n errors.push({\n topic: 'Configuration Error',\n message,\n });\n }\n }\n }\n } else {\n errors.push({\n topic: 'Configuration Error',\n message: `${currentPath} must contain JSON objects`,\n });\n }\n }\n }\n if (key === 'customManagers') {\n const allowedKeys = [\n 'customType',\n 'description',\n 'fileFormat',\n 'managerFilePatterns',\n 'matchStrings',\n 'matchStringsStrategy',\n 'depNameTemplate',\n 'packageNameTemplate',\n 'datasourceTemplate',\n 'versioningTemplate',\n 'registryUrlTemplate',\n 'currentValueTemplate',\n 'extractVersionTemplate',\n 'autoReplaceStringTemplate',\n 'depTypeTemplate',\n ];\n for (const customManager of val as CustomManager[]) {\n if (\n Object.keys(customManager).some(\n (k) => !allowedKeys.includes(k),\n )\n ) {\n const disallowedKeys = Object.keys(customManager).filter(\n (k) => !allowedKeys.includes(k),\n );\n errors.push({\n topic: 'Configuration Error',\n message: `Custom Manager contains disallowed fields: ${disallowedKeys.join(\n ', ',\n )}`,\n });\n } else if (\n is.nonEmptyString(customManager.customType) &&\n isCustomManager(customManager.customType)\n ) {\n if (is.nonEmptyArray(customManager.managerFilePatterns)) {\n switch (customManager.customType) {\n case 'regex':\n validateRegexManagerFields(\n customManager,\n currentPath,\n errors,\n );\n break;\n case 'jsonata':\n validateJSONataManagerFields(\n customManager,\n currentPath,\n errors,\n );\n break;\n }\n } else {\n errors.push({\n topic: 'Configuration Error',\n message: `Each Custom Manager must contain a non-empty managerFilePatterns array`,\n });\n }\n } else {\n if (\n is.emptyString(customManager.customType) ||\n is.undefined(customManager.customType)\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `Each Custom Manager must contain a non-empty customType string`,\n });\n } else {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid customType: ${customManager.customType}. Key is not a custom manager`,\n });\n }\n }\n }\n }\n if (['matchPackageNames', 'matchDepNames'].includes(key)) {\n const startPattern = regEx(/!?\\//);\n const endPattern = regEx(/\\/g?i?$/);\n for (const pattern of val as string[]) {\n if (startPattern.test(pattern) && endPattern.test(pattern)) {\n try {\n // regEx isn't aware of our !/ prefix but can handle the suffix\n regEx(pattern.replace(startPattern, '/'));\n } catch {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid regExp for ${currentPath}: \\`${pattern}\\``,\n });\n }\n }\n }\n }\n if (key === 'baseBranches') {\n for (const baseBranch of val as string[]) {\n if (\n isRegexMatch(baseBranch) &&\n !getRegexPredicate(baseBranch)\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid regExp for ${currentPath}: \\`${baseBranch}\\``,\n });\n }\n }\n }\n if (\n (selectors.includes(key) ||\n key === 'matchCurrentVersion' ||\n key === 'matchCurrentValue') &&\n // TODO: can be undefined ? #22198\n !rulesRe.test(parentPath!) && // Inside a packageRule\n (is.string(parentPath) || !isPreset) // top level in a preset\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `${currentPath}: ${key} should be inside a \\`packageRule\\` only`,\n });\n }\n } else {\n errors.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a list (Array)`,\n });\n }\n } else if (type === 'string') {\n if (!is.string(val)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a string`,\n });\n }\n } else if (\n type === 'object' &&\n currentPath !== 'compatibility' &&\n key !== 'constraints'\n ) {\n if (is.plainObject(val)) {\n if (key === 'registryAliases') {\n const res = validatePlainObject(val);\n if (res !== true) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${key}.${res}\\` configuration: value is not a string`,\n });\n }\n } else if (key === 'env') {\n const allowedEnvVars =\n configType === 'global'\n ? ((config.allowedEnv as string[]) ?? [])\n : GlobalConfig.get('allowedEnv', []);\n for (const [envVarName, envVarValue] of Object.entries(val)) {\n if (!is.string(envVarValue)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid env variable value: \\`${currentPath}.${envVarName}\\` must be a string.`,\n });\n }\n if (!matchRegexOrGlobList(envVarName, allowedEnvVars)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Env variable name \\`${envVarName}\\` is not allowed by this bot's \\`allowedEnv\\`.`,\n });\n }\n }\n } else if (key === 'statusCheckNames') {\n for (const [statusCheckKey, statusCheckValue] of Object.entries(\n val,\n )) {\n if (\n !allowedStatusCheckStrings.includes(\n statusCheckKey as StatusCheckKey,\n )\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${key}.${statusCheckKey}\\` configuration: key is not allowed.`,\n });\n }\n if (\n !(is.string(statusCheckValue) || null === statusCheckValue)\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${statusCheckKey}\\` configuration: status check is not a string.`,\n });\n continue;\n }\n }\n } else if (key === 'customDatasources') {\n const allowedKeys = [\n 'description',\n 'defaultRegistryUrlTemplate',\n 'format',\n 'transformTemplates',\n ];\n for (const [\n customDatasourceName,\n customDatasourceValue,\n ] of Object.entries(val)) {\n if (!is.plainObject(customDatasourceValue)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${customDatasourceName}\\` configuration: customDatasource is not an object`,\n });\n continue;\n }\n for (const [subKey, subValue] of Object.entries(\n customDatasourceValue,\n )) {\n if (!allowedKeys.includes(subKey)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${subKey}\\` configuration: key is not allowed`,\n });\n } else if (subKey === 'transformTemplates') {\n if (!is.array(subValue, is.string)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${subKey}\\` configuration: is not an array of string`,\n });\n }\n } else if (subKey === 'description') {\n if (\n !(is.string(subValue) || is.array(subValue, is.string))\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${subKey}\\` configuration: is not an array of strings`,\n });\n }\n } else if (!is.string(subValue)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${subKey}\\` configuration: is a string`,\n });\n }\n }\n }\n } else {\n const ignoredObjects = options\n .filter((option) => option.freeChoice)\n .map((option) => option.name);\n if (!ignoredObjects.includes(key)) {\n const subValidation = await validateConfig(\n configType,\n val,\n isPreset,\n currentPath,\n );\n warnings = warnings.concat(subValidation.warnings);\n errors = errors.concat(subValidation.errors);\n }\n }\n } else {\n errors.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a json object`,\n });\n }\n }\n }\n }\n\n if (key === 'hostRules' && is.array(val)) {\n const allowedHeaders =\n configType === 'global'\n ? ((config.allowedHeaders as string[]) ?? [])\n : GlobalConfig.get('allowedHeaders', []);\n for (const rule of val as HostRule[]) {\n if (is.nonEmptyString(rule.matchHost)) {\n if (rule.matchHost.includes('://')) {\n if (parseUrl(rule.matchHost) === null) {\n errors.push({\n topic: 'Configuration Error',\n message: `hostRules matchHost \\`${rule.matchHost}\\` is not a valid URL.`,\n });\n }\n }\n } else if (is.emptyString(rule.matchHost)) {\n errors.push({\n topic: 'Configuration Error',\n message:\n 'Invalid value for hostRules matchHost. It cannot be an empty string.',\n });\n }\n\n if (!rule.headers) {\n continue;\n }\n for (const [header, value] of Object.entries(rule.headers)) {\n if (!is.string(value)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid hostRules headers value configuration: header must be a string.`,\n });\n }\n if (!matchRegexOrGlobList(header, allowedHeaders)) {\n errors.push({\n topic: 'Configuration Error',\n message: `hostRules header \\`${header}\\` is not allowed by this bot's \\`allowedHeaders\\`.`,\n });\n }\n }\n }\n }\n\n if (key === 'matchJsonata' && is.array(val, is.string)) {\n for (const expression of val) {\n const res = getExpression(expression);\n if (res instanceof Error) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid JSONata expression for ${currentPath}: ${res.message}`,\n });\n }\n }\n }\n }\n\n function sortAll(a: ValidationMessage, b: ValidationMessage): number {\n if (a.topic === b.topic) {\n return a.message > b.message ? 1 : -1;\n }\n return a.topic > b.topic ? 1 : -1;\n }\n\n errors.sort(sortAll);\n warnings.sort(sortAll);\n return { errors, warnings };\n}\n\n/**\n * Basic validation for global config options\n */\nasync function validateGlobalConfig(\n key: string,\n val: unknown,\n type: string,\n warnings: ValidationMessage[],\n errors: ValidationMessage[],\n currentPath: string | undefined,\n config: RenovateConfig,\n): Promise<void> {\n /* v8 ignore next 5 -- not testable yet */\n if (getDeprecationMessage(key)) {\n warnings.push({\n topic: 'Deprecation Warning',\n message: getDeprecationMessage(key)!,\n });\n }\n if (val !== null) {\n if (type === 'string') {\n if (is.string(val)) {\n if (\n key === 'onboardingConfigFileName' &&\n !configFileNames.includes(val)\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${val}\\` for \\`${currentPath}\\`. The allowed values are ${configFileNames.join(', ')}.`,\n });\n } else if (\n key === 'repositoryCache' &&\n !['enabled', 'disabled', 'reset'].includes(val)\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${val}\\` for \\`${currentPath}\\`. The allowed values are ${['enabled', 'disabled', 'reset'].join(', ')}.`,\n });\n } else if (\n key === 'dryRun' &&\n !['extract', 'lookup', 'full'].includes(val)\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${val}\\` for \\`${currentPath}\\`. The allowed values are ${['extract', 'lookup', 'full'].join(', ')}.`,\n });\n } else if (\n key === 'binarySource' &&\n !['docker', 'global', 'install', 'hermit'].includes(val)\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${val}\\` for \\`${currentPath}\\`. The allowed values are ${['docker', 'global', 'install', 'hermit'].join(', ')}.`,\n });\n } else if (\n key === 'requireConfig' &&\n !['required', 'optional', 'ignored'].includes(val)\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${val}\\` for \\`${currentPath}\\`. The allowed values are ${['required', 'optional', 'ignored'].join(', ')}.`,\n });\n } else if (\n key === 'gitUrl' &&\n !['default', 'ssh', 'endpoint'].includes(val)\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${val}\\` for \\`${currentPath}\\`. The allowed values are ${['default', 'ssh', 'endpoint'].join(', ')}.`,\n });\n }\n\n if (\n key === 'reportType' &&\n ['s3', 'file'].includes(val) &&\n !is.string(config.reportPath)\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `reportType '${val}' requires a configured reportPath`,\n });\n }\n } else {\n warnings.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a string.`,\n });\n }\n } else if (type === 'integer') {\n const allowsNegative = optionAllowsNegativeIntegers.has(key);\n warnings.push(...validateNumber(key, val, allowsNegative, currentPath));\n } else if (type === 'boolean') {\n if (val !== true && val !== false) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a boolean. Found: ${JSON.stringify(\n val,\n )} (${typeof val}).`,\n });\n }\n } else if (type === 'array') {\n if (is.array(val)) {\n if (isRegexOrGlobOption(key)) {\n warnings.push(\n ...regexOrGlobValidator.check({\n val,\n currentPath: currentPath!,\n }),\n );\n }\n if (key === 'gitNoVerify') {\n const allowedValues = ['commit', 'push'];\n for (const value of val as string[]) {\n if (!allowedValues.includes(value)) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value for \\`${currentPath}\\`. The allowed values are ${allowedValues.join(', ')}.`,\n });\n }\n }\n }\n if (key === 'mergeConfidenceDatasources') {\n const allowedValues = supportedDatasources;\n for (const value of val as string[]) {\n if (!allowedValues.includes(value)) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${value}\\` for \\`${currentPath}\\`. The allowed values are ${allowedValues.join(', ')}.`,\n });\n }\n }\n }\n } else {\n warnings.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a list (Array).`,\n });\n }\n } else if (type === 'object') {\n if (is.plainObject(val)) {\n if (key === 'onboardingConfig') {\n const subValidation = await validateConfig('repo', val);\n for (const warning of subValidation.warnings.concat(\n subValidation.errors,\n )) {\n warnings.push(warning);\n }\n } else if (key === 'force') {\n const subValidation = await validateConfig('global', val);\n for (const warning of subValidation.warnings.concat(\n subValidation.errors,\n )) {\n warnings.push(warning);\n }\n } else if (key === 'cacheTtlOverride') {\n for (const [subKey, subValue] of Object.entries(val)) {\n const allowsNegative = optionAllowsNegativeIntegers.has(key);\n warnings.push(\n ...validateNumber(\n key,\n subValue,\n allowsNegative,\n currentPath,\n subKey,\n ),\n );\n }\n } else {\n const res = validatePlainObject(val);\n if (res !== true) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${res}\\` configuration: value must be a string.`,\n });\n }\n }\n } else {\n warnings.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a JSON object.`,\n });\n }\n }\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../lib/config/validation.ts"],"names":[],"mappings":";;AAoJA,wCAyoBC;;AA7xBD,kEAAkC;AAClC,gDAAqE;AACrE,sDAA4D;AAG5D,6CAAgD;AAChD,yCAAsC;AACtC,uDAI8B;AAC9B,mEAA6C;AAC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K,MAAM,OAAO,IAAI,aAAa,CAAC,QAAQ,CAAC,MAAM,CACjD,aAAa,CAAC,MAAM,CACrB,EAAE,CAAC;wBACF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBACzB,CAAC;gBACH,CAAC;qBAAM,IAAI,GAAG,KAAK,kBAAkB,EAAE,CAAC;oBACtC,KAAK,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;wBACrD,MAAM,cAAc,GAAG,4BAA4B,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;wBAC7D,QAAQ,CAAC,IAAI,CACX,GAAG,IAAA,sBAAc,EACf,GAAG,EACH,QAAQ,EACR,cAAc,EACd,WAAW,EACX,MAAM,CACP,CACF,CAAC;oBACJ,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,MAAM,GAAG,GAAG,IAAA,2BAAmB,EAAC,GAAG,CAAC,CAAC;oBACrC,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;wBACjB,QAAQ,CAAC,IAAI,CAAC;4BACZ,KAAK,EAAE,qBAAqB;4BAC5B,OAAO,EAAE,aAAa,WAAW,IAAI,GAAG,2CAA2C;yBACpF,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,QAAQ,CAAC,IAAI,CAAC;oBACZ,KAAK,EAAE,qBAAqB;oBAC5B,OAAO,EAAE,0BAA0B,WAAW,6BAA6B;iBAC5E,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { allManagersList, getManagerList } from '../modules/manager';\nimport { isCustomManager } from '../modules/manager/custom';\nimport type { CustomManager } from '../modules/manager/custom/types';\nimport type { HostRule } from '../types';\nimport { getExpression } from '../util/jsonata';\nimport { regEx } from '../util/regex';\nimport {\n getRegexPredicate,\n isRegexMatch,\n matchRegexOrGlobList,\n} from '../util/string-match';\nimport * as template from '../util/template';\nimport { parseUrl } from '../util/url';\nimport {\n hasValidSchedule,\n hasValidTimezone,\n} from '../workers/repository/update/branch/schedule';\nimport { configFileNames } from './app-strings';\nimport { GlobalConfig } from './global';\nimport { migrateConfig } from './migration';\nimport { getOptions } from './options';\nimport { resolveConfigPresets } from './presets';\nimport { supportedDatasources } from './presets/internal/merge-confidence';\nimport type {\n AllowedParents,\n RenovateConfig,\n RenovateOptions,\n StatusCheckKey,\n ValidationMessage,\n ValidationResult,\n} from './types';\nimport { allowedStatusCheckStrings } from './types';\nimport * as managerValidator from './validation-helpers/managers';\nimport * as matchBaseBranchesValidator from './validation-helpers/match-base-branches';\nimport * as regexOrGlobValidator from './validation-helpers/regex-glob-matchers';\nimport {\n getParentName,\n isFalseGlobal,\n validateJSONataManagerFields,\n validateNumber,\n validatePlainObject,\n validateRegexManagerFields,\n} from './validation-helpers/utils';\n\nconst options = getOptions();\n\nlet optionsInitialized = false;\nlet optionTypes: Record<string, RenovateOptions['type']>;\nlet optionParents: Record<string, AllowedParents[]>;\nlet optionGlobals: Set<string>;\nlet optionInherits: Set<string>;\nlet optionRegexOrGlob: Set<string>;\nlet optionAllowsNegativeIntegers: Set<string>;\n\nconst managerList = getManagerList();\n\nconst topLevelObjects = [...managerList, 'env'];\n\nconst ignoredNodes = [\n '$schema',\n 'headers',\n 'depType',\n 'npmToken',\n 'packageFile',\n 'forkToken',\n 'repository',\n 'vulnerabilityAlertsOnly',\n 'vulnerabilityAlert',\n 'isVulnerabilityAlert',\n 'vulnerabilityFixVersion', // not intended to be used by end users but may be by Mend apps\n 'copyLocalLibs', // deprecated - functionality is now enabled by default\n 'prBody', // deprecated\n 'minimumConfidence', // undocumented feature flag\n];\nconst tzRe = regEx(/^:timezone\\((.+)\\)$/);\nconst rulesRe = regEx(/p.*Rules\\[\\d+\\]$/);\n\nfunction isIgnored(key: string): boolean {\n return ignoredNodes.includes(key);\n}\n\nfunction getUnsupportedEnabledManagers(enabledManagers: string[]): string[] {\n return enabledManagers.filter(\n (manager) => !allManagersList.includes(manager.replace('custom.', '')),\n );\n}\n\nfunction getDeprecationMessage(option: string): string | undefined {\n const deprecatedOptions: Record<string, string | undefined> = {\n branchName: `Direct editing of branchName is now deprecated. Please edit branchPrefix, additionalBranchPrefix, or branchTopic instead`,\n commitMessage: `Direct editing of commitMessage is now deprecated. Please edit commitMessage's subcomponents instead.`,\n prTitle: `Direct editing of prTitle is now deprecated. Please edit commitMessage subcomponents instead as they will be passed through to prTitle.`,\n };\n return deprecatedOptions[option];\n}\n\nfunction isInhertConfigOption(key: string): boolean {\n return optionInherits.has(key);\n}\n\nfunction isRegexOrGlobOption(key: string): boolean {\n return optionRegexOrGlob.has(key);\n}\n\nfunction isGlobalOption(key: string): boolean {\n return optionGlobals.has(key);\n}\n\nfunction initOptions(): void {\n if (optionsInitialized) {\n return;\n }\n\n optionParents = {};\n optionInherits = new Set();\n optionTypes = {};\n optionRegexOrGlob = new Set();\n optionGlobals = new Set();\n optionAllowsNegativeIntegers = new Set();\n\n for (const option of options) {\n optionTypes[option.name] = option.type;\n\n if (option.parents) {\n optionParents[option.name] = option.parents;\n }\n\n if (option.inheritConfigSupport) {\n optionInherits.add(option.name);\n }\n\n if (option.patternMatch) {\n optionRegexOrGlob.add(option.name);\n }\n\n if (option.globalOnly) {\n optionGlobals.add(option.name);\n }\n\n if (option.allowNegative) {\n optionAllowsNegativeIntegers.add(option.name);\n }\n }\n\n optionsInitialized = true;\n}\n\nexport async function validateConfig(\n configType: 'global' | 'inherit' | 'repo',\n config: RenovateConfig,\n isPreset?: boolean,\n parentPath?: string,\n): Promise<ValidationResult> {\n initOptions();\n\n let errors: ValidationMessage[] = [];\n let warnings: ValidationMessage[] = [];\n\n for (const [key, val] of Object.entries(config)) {\n const currentPath = parentPath ? `${parentPath}.${key}` : key;\n /* v8 ignore next 7 -- TODO: add test */\n if (key === '__proto__') {\n errors.push({\n topic: 'Config security error',\n message: '__proto__',\n });\n continue;\n }\n if (\n parentPath &&\n parentPath !== 'onboardingConfig' &&\n topLevelObjects.includes(key)\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `The \"${key}\" object can only be configured at the top level of a config but was found inside \"${parentPath}\"`,\n });\n }\n\n if (isGlobalOption(key)) {\n if (configType === 'global') {\n await validateGlobalConfig(\n key,\n val,\n optionTypes[key],\n warnings,\n errors,\n currentPath,\n config,\n );\n continue;\n } else if (\n !isFalseGlobal(key, parentPath) &&\n !(configType === 'inherit' && isInhertConfigOption(key))\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `The \"${key}\" option is a global option reserved only for Renovate's global configuration and cannot be configured within a repository's config file.`,\n });\n continue;\n }\n }\n if (key === 'enabledManagers' && val) {\n const unsupportedManagers = getUnsupportedEnabledManagers(\n val as string[],\n );\n if (is.nonEmptyArray(unsupportedManagers)) {\n errors.push({\n topic: 'Configuration Error',\n message: `The following managers configured in enabledManagers are not supported: \"${unsupportedManagers.join(\n ', ',\n )}\"`,\n });\n }\n }\n if (\n !isIgnored(key) && // We need to ignore some reserved keys\n !(is as any).function(val) // Ignore all functions\n ) {\n if (getDeprecationMessage(key)) {\n warnings.push({\n topic: 'Deprecation Warning',\n message: getDeprecationMessage(key)!,\n });\n }\n const templateKeys = [\n 'branchName',\n 'commitBody',\n 'commitMessage',\n 'prTitle',\n 'semanticCommitScope',\n ];\n if ((key.endsWith('Template') || templateKeys.includes(key)) && val) {\n try {\n // TODO: validate string #22198\n let res = template.compile((val as string).toString(), config, false);\n res = template.compile(res, config, false);\n template.compile(res, config, false);\n } catch {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid template in config path: ${currentPath}`,\n });\n }\n }\n const parentName = getParentName(parentPath);\n if (\n !isPreset &&\n optionParents[key] &&\n !optionParents[key].includes(parentName as AllowedParents)\n ) {\n // TODO: types (#22198)\n const message = `${key} should only be configured within one of \"${optionParents[\n key\n ]?.join(' or ')}\" objects. Was found in ${parentName}`;\n warnings.push({\n topic: `${parentPath ? `${parentPath}.` : ''}${key}`,\n message,\n });\n }\n if (!optionTypes[key]) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid configuration option: ${currentPath}`,\n });\n } else if (key === 'schedule') {\n const [validSchedule, errorMessage] = hasValidSchedule(val as string[]);\n if (!validSchedule) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid ${currentPath}: \\`${errorMessage}\\``,\n });\n }\n } else if (\n [\n 'allowedVersions',\n 'matchCurrentVersion',\n 'matchCurrentValue',\n 'matchNewValue',\n ].includes(key) &&\n isRegexMatch(val)\n ) {\n if (!getRegexPredicate(val)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid regExp for ${currentPath}: \\`${val}\\``,\n });\n }\n } else if (key === 'timezone' && val !== null) {\n const [validTimezone, errorMessage] = hasValidTimezone(val as string);\n if (!validTimezone) {\n errors.push({\n topic: 'Configuration Error',\n message: `${currentPath}: ${errorMessage}`,\n });\n }\n } else if (val !== null) {\n const type = optionTypes[key];\n if (type === 'boolean') {\n if (val !== true && val !== false) {\n errors.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be boolean. Found: ${JSON.stringify(\n val,\n )} (${typeof val})`,\n });\n }\n } else if (type === 'integer') {\n const allowsNegative = optionAllowsNegativeIntegers.has(key);\n errors.push(...validateNumber(key, val, allowsNegative, currentPath));\n } else if (type === 'array' && val) {\n if (is.array(val)) {\n for (const [subIndex, subval] of val.entries()) {\n if (is.object(subval)) {\n const subValidation = await validateConfig(\n configType,\n subval as RenovateConfig,\n isPreset,\n `${currentPath}[${subIndex}]`,\n );\n warnings = warnings.concat(subValidation.warnings);\n errors = errors.concat(subValidation.errors);\n }\n }\n if (isRegexOrGlobOption(key)) {\n errors.push(\n ...regexOrGlobValidator.check({\n val,\n currentPath,\n }),\n );\n }\n if (key === 'extends') {\n for (const subval of val) {\n if (is.string(subval)) {\n if (\n parentName === 'packageRules' &&\n subval.startsWith('group:')\n ) {\n warnings.push({\n topic: 'Configuration Warning',\n message: `${currentPath}: you should not extend \"group:\" presets`,\n });\n }\n if (tzRe.test(subval)) {\n const [, timezone] = tzRe.exec(subval)!;\n const [validTimezone, errorMessage] =\n hasValidTimezone(timezone);\n if (!validTimezone) {\n errors.push({\n topic: 'Configuration Error',\n message: `${currentPath}: ${errorMessage}`,\n });\n }\n }\n } else {\n errors.push({\n topic: 'Configuration Warning',\n message: `${currentPath}: preset value is not a string`,\n });\n }\n }\n }\n\n const selectors = [\n 'matchFileNames',\n 'matchLanguages',\n 'matchCategories',\n 'matchBaseBranches',\n 'matchManagers',\n 'matchDatasources',\n 'matchDepTypes',\n 'matchDepNames',\n 'matchPackageNames',\n 'matchCurrentValue',\n 'matchCurrentVersion',\n 'matchSourceUrls',\n 'matchUpdateTypes',\n 'matchConfidence',\n 'matchCurrentAge',\n 'matchRepositories',\n 'matchNewValue',\n 'matchJsonata',\n ];\n if (key === 'packageRules') {\n for (const [subIndex, packageRule] of val.entries()) {\n if (is.object(packageRule)) {\n const resolvedRule = migrateConfig({\n packageRules: [\n await resolveConfigPresets(\n packageRule as RenovateConfig,\n config,\n ),\n ],\n }).migratedConfig.packageRules![0];\n errors.push(\n ...managerValidator.check({ resolvedRule, currentPath }),\n );\n warnings.push(\n ...matchBaseBranchesValidator.check({\n resolvedRule,\n currentPath: `${currentPath}[${subIndex}]`,\n baseBranchPatterns: config.baseBranchPatterns!,\n }),\n );\n const selectorLength = Object.keys(resolvedRule).filter(\n (ruleKey) => selectors.includes(ruleKey),\n ).length;\n if (!selectorLength) {\n const message = `${currentPath}[${subIndex}]: Each packageRule must contain at least one match* or exclude* selector. Rule: ${JSON.stringify(\n packageRule,\n )}`;\n errors.push({\n topic: 'Configuration Error',\n message,\n });\n }\n if (selectorLength === Object.keys(resolvedRule).length) {\n const message = `${currentPath}[${subIndex}]: Each packageRule must contain at least one non-match* or non-exclude* field. Rule: ${JSON.stringify(\n packageRule,\n )}`;\n warnings.push({\n topic: 'Configuration Error',\n message,\n });\n }\n // It's too late to apply any of these options once you already have updates determined\n const preLookupOptions = [\n 'allowedVersions',\n 'extractVersion',\n 'followTag',\n 'ignoreDeps',\n 'ignoreUnstable',\n 'rangeStrategy',\n 'registryUrls',\n 'respectLatest',\n 'rollbackPrs',\n 'separateMajorMinor',\n 'separateMinorPatch',\n 'separateMultipleMajor',\n 'separateMultipleMinor',\n 'versioning',\n ];\n if (is.nonEmptyArray(resolvedRule.matchUpdateTypes)) {\n for (const option of preLookupOptions) {\n if (resolvedRule[option] !== undefined) {\n const message = `${currentPath}[${subIndex}]: packageRules cannot combine both matchUpdateTypes and ${option}. Rule: ${JSON.stringify(\n packageRule,\n )}`;\n errors.push({\n topic: 'Configuration Error',\n message,\n });\n }\n }\n }\n } else {\n errors.push({\n topic: 'Configuration Error',\n message: `${currentPath} must contain JSON objects`,\n });\n }\n }\n }\n if (key === 'customManagers') {\n const allowedKeys = [\n 'customType',\n 'description',\n 'fileFormat',\n 'managerFilePatterns',\n 'matchStrings',\n 'matchStringsStrategy',\n 'depNameTemplate',\n 'packageNameTemplate',\n 'datasourceTemplate',\n 'versioningTemplate',\n 'registryUrlTemplate',\n 'currentValueTemplate',\n 'extractVersionTemplate',\n 'autoReplaceStringTemplate',\n 'depTypeTemplate',\n ];\n for (const customManager of val as CustomManager[]) {\n if (\n Object.keys(customManager).some(\n (k) => !allowedKeys.includes(k),\n )\n ) {\n const disallowedKeys = Object.keys(customManager).filter(\n (k) => !allowedKeys.includes(k),\n );\n errors.push({\n topic: 'Configuration Error',\n message: `Custom Manager contains disallowed fields: ${disallowedKeys.join(\n ', ',\n )}`,\n });\n } else if (\n is.nonEmptyString(customManager.customType) &&\n isCustomManager(customManager.customType)\n ) {\n if (is.nonEmptyArray(customManager.managerFilePatterns)) {\n switch (customManager.customType) {\n case 'regex':\n validateRegexManagerFields(\n customManager,\n currentPath,\n errors,\n );\n break;\n case 'jsonata':\n validateJSONataManagerFields(\n customManager,\n currentPath,\n errors,\n );\n break;\n }\n } else {\n errors.push({\n topic: 'Configuration Error',\n message: `Each Custom Manager must contain a non-empty managerFilePatterns array`,\n });\n }\n } else {\n if (\n is.emptyString(customManager.customType) ||\n is.undefined(customManager.customType)\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `Each Custom Manager must contain a non-empty customType string`,\n });\n } else {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid customType: ${customManager.customType}. Key is not a custom manager`,\n });\n }\n }\n }\n }\n if (['matchPackageNames', 'matchDepNames'].includes(key)) {\n const startPattern = regEx(/!?\\//);\n const endPattern = regEx(/\\/g?i?$/);\n for (const pattern of val as string[]) {\n if (startPattern.test(pattern) && endPattern.test(pattern)) {\n try {\n // regEx isn't aware of our !/ prefix but can handle the suffix\n regEx(pattern.replace(startPattern, '/'));\n } catch {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid regExp for ${currentPath}: \\`${pattern}\\``,\n });\n }\n }\n }\n }\n if (key === 'baseBranchPatterns') {\n for (const baseBranchPattern of val as string[]) {\n if (\n isRegexMatch(baseBranchPattern) &&\n !getRegexPredicate(baseBranchPattern)\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid regExp for ${currentPath}: \\`${baseBranchPattern}\\``,\n });\n }\n }\n }\n if (\n (selectors.includes(key) ||\n key === 'matchCurrentVersion' ||\n key === 'matchCurrentValue') &&\n // TODO: can be undefined ? #22198\n !rulesRe.test(parentPath!) && // Inside a packageRule\n (is.string(parentPath) || !isPreset) // top level in a preset\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `${currentPath}: ${key} should be inside a \\`packageRule\\` only`,\n });\n }\n } else {\n errors.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a list (Array)`,\n });\n }\n } else if (type === 'string') {\n if (!is.string(val)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a string`,\n });\n }\n } else if (\n type === 'object' &&\n currentPath !== 'compatibility' &&\n key !== 'constraints'\n ) {\n if (is.plainObject(val)) {\n if (key === 'registryAliases') {\n const res = validatePlainObject(val);\n if (res !== true) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${key}.${res}\\` configuration: value is not a string`,\n });\n }\n } else if (key === 'env') {\n const allowedEnvVars =\n configType === 'global'\n ? ((config.allowedEnv as string[]) ?? [])\n : GlobalConfig.get('allowedEnv', []);\n for (const [envVarName, envVarValue] of Object.entries(val)) {\n if (!is.string(envVarValue)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid env variable value: \\`${currentPath}.${envVarName}\\` must be a string.`,\n });\n }\n if (!matchRegexOrGlobList(envVarName, allowedEnvVars)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Env variable name \\`${envVarName}\\` is not allowed by this bot's \\`allowedEnv\\`.`,\n });\n }\n }\n } else if (key === 'statusCheckNames') {\n for (const [statusCheckKey, statusCheckValue] of Object.entries(\n val,\n )) {\n if (\n !allowedStatusCheckStrings.includes(\n statusCheckKey as StatusCheckKey,\n )\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${key}.${statusCheckKey}\\` configuration: key is not allowed.`,\n });\n }\n if (\n !(is.string(statusCheckValue) || null === statusCheckValue)\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${statusCheckKey}\\` configuration: status check is not a string.`,\n });\n continue;\n }\n }\n } else if (key === 'customDatasources') {\n const allowedKeys = [\n 'description',\n 'defaultRegistryUrlTemplate',\n 'format',\n 'transformTemplates',\n ];\n for (const [\n customDatasourceName,\n customDatasourceValue,\n ] of Object.entries(val)) {\n if (!is.plainObject(customDatasourceValue)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${customDatasourceName}\\` configuration: customDatasource is not an object`,\n });\n continue;\n }\n for (const [subKey, subValue] of Object.entries(\n customDatasourceValue,\n )) {\n if (!allowedKeys.includes(subKey)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${subKey}\\` configuration: key is not allowed`,\n });\n } else if (subKey === 'transformTemplates') {\n if (!is.array(subValue, is.string)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${subKey}\\` configuration: is not an array of string`,\n });\n }\n } else if (subKey === 'description') {\n if (\n !(is.string(subValue) || is.array(subValue, is.string))\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${subKey}\\` configuration: is not an array of strings`,\n });\n }\n } else if (!is.string(subValue)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${subKey}\\` configuration: is a string`,\n });\n }\n }\n }\n } else {\n const ignoredObjects = options\n .filter((option) => option.freeChoice)\n .map((option) => option.name);\n if (!ignoredObjects.includes(key)) {\n const subValidation = await validateConfig(\n configType,\n val,\n isPreset,\n currentPath,\n );\n warnings = warnings.concat(subValidation.warnings);\n errors = errors.concat(subValidation.errors);\n }\n }\n } else {\n errors.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a json object`,\n });\n }\n }\n }\n }\n\n if (key === 'hostRules' && is.array(val)) {\n const allowedHeaders =\n configType === 'global'\n ? ((config.allowedHeaders as string[]) ?? [])\n : GlobalConfig.get('allowedHeaders', []);\n for (const rule of val as HostRule[]) {\n if (is.nonEmptyString(rule.matchHost)) {\n if (rule.matchHost.includes('://')) {\n if (parseUrl(rule.matchHost) === null) {\n errors.push({\n topic: 'Configuration Error',\n message: `hostRules matchHost \\`${rule.matchHost}\\` is not a valid URL.`,\n });\n }\n }\n } else if (is.emptyString(rule.matchHost)) {\n errors.push({\n topic: 'Configuration Error',\n message:\n 'Invalid value for hostRules matchHost. It cannot be an empty string.',\n });\n }\n\n if (!rule.headers) {\n continue;\n }\n for (const [header, value] of Object.entries(rule.headers)) {\n if (!is.string(value)) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid hostRules headers value configuration: header must be a string.`,\n });\n }\n if (!matchRegexOrGlobList(header, allowedHeaders)) {\n errors.push({\n topic: 'Configuration Error',\n message: `hostRules header \\`${header}\\` is not allowed by this bot's \\`allowedHeaders\\`.`,\n });\n }\n }\n }\n }\n\n if (key === 'matchJsonata' && is.array(val, is.string)) {\n for (const expression of val) {\n const res = getExpression(expression);\n if (res instanceof Error) {\n errors.push({\n topic: 'Configuration Error',\n message: `Invalid JSONata expression for ${currentPath}: ${res.message}`,\n });\n }\n }\n }\n }\n\n function sortAll(a: ValidationMessage, b: ValidationMessage): number {\n if (a.topic === b.topic) {\n return a.message > b.message ? 1 : -1;\n }\n return a.topic > b.topic ? 1 : -1;\n }\n\n errors.sort(sortAll);\n warnings.sort(sortAll);\n return { errors, warnings };\n}\n\n/**\n * Basic validation for global config options\n */\nasync function validateGlobalConfig(\n key: string,\n val: unknown,\n type: string,\n warnings: ValidationMessage[],\n errors: ValidationMessage[],\n currentPath: string | undefined,\n config: RenovateConfig,\n): Promise<void> {\n /* v8 ignore next 5 -- not testable yet */\n if (getDeprecationMessage(key)) {\n warnings.push({\n topic: 'Deprecation Warning',\n message: getDeprecationMessage(key)!,\n });\n }\n if (val !== null) {\n if (type === 'string') {\n if (is.string(val)) {\n if (\n key === 'onboardingConfigFileName' &&\n !configFileNames.includes(val)\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${val}\\` for \\`${currentPath}\\`. The allowed values are ${configFileNames.join(', ')}.`,\n });\n } else if (\n key === 'repositoryCache' &&\n !['enabled', 'disabled', 'reset'].includes(val)\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${val}\\` for \\`${currentPath}\\`. The allowed values are ${['enabled', 'disabled', 'reset'].join(', ')}.`,\n });\n } else if (\n key === 'dryRun' &&\n !['extract', 'lookup', 'full'].includes(val)\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${val}\\` for \\`${currentPath}\\`. The allowed values are ${['extract', 'lookup', 'full'].join(', ')}.`,\n });\n } else if (\n key === 'binarySource' &&\n !['docker', 'global', 'install', 'hermit'].includes(val)\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${val}\\` for \\`${currentPath}\\`. The allowed values are ${['docker', 'global', 'install', 'hermit'].join(', ')}.`,\n });\n } else if (\n key === 'requireConfig' &&\n !['required', 'optional', 'ignored'].includes(val)\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${val}\\` for \\`${currentPath}\\`. The allowed values are ${['required', 'optional', 'ignored'].join(', ')}.`,\n });\n } else if (\n key === 'gitUrl' &&\n !['default', 'ssh', 'endpoint'].includes(val)\n ) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${val}\\` for \\`${currentPath}\\`. The allowed values are ${['default', 'ssh', 'endpoint'].join(', ')}.`,\n });\n }\n\n if (\n key === 'reportType' &&\n ['s3', 'file'].includes(val) &&\n !is.string(config.reportPath)\n ) {\n errors.push({\n topic: 'Configuration Error',\n message: `reportType '${val}' requires a configured reportPath`,\n });\n }\n } else {\n warnings.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a string.`,\n });\n }\n } else if (type === 'integer') {\n const allowsNegative = optionAllowsNegativeIntegers.has(key);\n warnings.push(...validateNumber(key, val, allowsNegative, currentPath));\n } else if (type === 'boolean') {\n if (val !== true && val !== false) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a boolean. Found: ${JSON.stringify(\n val,\n )} (${typeof val}).`,\n });\n }\n } else if (type === 'array') {\n if (is.array(val)) {\n if (isRegexOrGlobOption(key)) {\n warnings.push(\n ...regexOrGlobValidator.check({\n val,\n currentPath: currentPath!,\n }),\n );\n }\n if (key === 'gitNoVerify') {\n const allowedValues = ['commit', 'push'];\n for (const value of val as string[]) {\n if (!allowedValues.includes(value)) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value for \\`${currentPath}\\`. The allowed values are ${allowedValues.join(', ')}.`,\n });\n }\n }\n }\n if (key === 'mergeConfidenceDatasources') {\n const allowedValues = supportedDatasources;\n for (const value of val as string[]) {\n if (!allowedValues.includes(value)) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid value \\`${value}\\` for \\`${currentPath}\\`. The allowed values are ${allowedValues.join(', ')}.`,\n });\n }\n }\n }\n } else {\n warnings.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a list (Array).`,\n });\n }\n } else if (type === 'object') {\n if (is.plainObject(val)) {\n if (key === 'onboardingConfig') {\n const subValidation = await validateConfig('repo', val);\n for (const warning of subValidation.warnings.concat(\n subValidation.errors,\n )) {\n warnings.push(warning);\n }\n } else if (key === 'force') {\n const subValidation = await validateConfig('global', val);\n for (const warning of subValidation.warnings.concat(\n subValidation.errors,\n )) {\n warnings.push(warning);\n }\n } else if (key === 'cacheTtlOverride') {\n for (const [subKey, subValue] of Object.entries(val)) {\n const allowsNegative = optionAllowsNegativeIntegers.has(key);\n warnings.push(\n ...validateNumber(\n key,\n subValue,\n allowsNegative,\n currentPath,\n subKey,\n ),\n );\n }\n } else {\n const res = validatePlainObject(val);\n if (res !== true) {\n warnings.push({\n topic: 'Configuration Error',\n message: `Invalid \\`${currentPath}.${res}\\` configuration: value must be a string.`,\n });\n }\n }\n } else {\n warnings.push({\n topic: 'Configuration Error',\n message: `Configuration option \\`${currentPath}\\` should be a JSON object.`,\n });\n }\n }\n }\n}\n"]}
|
package/dist/logger/index.js
CHANGED
@@ -58,11 +58,17 @@ function createLogFileStream(logFile) {
|
|
58
58
|
// Ensure log file directory exists
|
59
59
|
const directoryName = upath_1.default.dirname(logFile);
|
60
60
|
fs_extra_1.default.ensureDirSync(directoryName);
|
61
|
-
|
61
|
+
const file = {
|
62
62
|
name: 'logfile',
|
63
63
|
path: logFile,
|
64
64
|
level: (0, utils_1.validateLogLevel)((0, utils_1.getEnv)('LOG_FILE_LEVEL'), 'debug'),
|
65
65
|
};
|
66
|
+
const logFileFormat = (0, utils_1.getEnv)('LOG_FILE_FORMAT');
|
67
|
+
if (is_1.default.nonEmptyStringAndNotWhitespace(logFileFormat) &&
|
68
|
+
logFileFormat === 'pretty') {
|
69
|
+
file.type = 'raw';
|
70
|
+
}
|
71
|
+
return file;
|
66
72
|
}
|
67
73
|
function serializedSanitizedLogger(streams) {
|
68
74
|
return bunyan.createLogger({
|
package/dist/logger/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/logger/index.ts"],"names":[],"mappings":";;;AAqBA,4BAEC;AAED,oDAiCC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/logger/index.ts"],"names":[],"mappings":";;;AAqBA,4BAEC;AAED,oDAiCC;AAuDD,gCAEC;AAED,gCAEC;AAGD,0BAEC;AAGD,0BAEC;AAGD,gCAEC;AAED,4BAOC;AAED,8BAEC;AAQD,wBAQC;AAED,kCAEC;AAED,sCAEC;;AA3KD,kEAAkC;AAClC,uDAAiC;AACjC,gEAA0B;AAC1B,mCAAgC;AAChC,0DAA0B;AAC1B,8EAA6C;AAC7C,oFAAmD;AACnD,8EAA6C;AAC7C,mDAAiD;AACjD,uDAAmD;AAEnD,mCAKiB;AAEjB,MAAM,QAAQ,GAAG,IAAI,qBAAa,EAAE,CAAC;AACrC,IAAI,WAAW,GAAG,IAAA,wBAAgB,EAAC,IAAA,cAAM,EAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;AAEhE,SAAgB,QAAQ;IACtB,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAgB,oBAAoB,CAClC,WAAkC,EAClC,QAAuB,EACvB,OAA2B;IAE3B,MAAM,MAAM,GAAkB;QAC5B,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,WAAW;QAClB,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC;IAEF,IAAI,IAAA,cAAM,EAAC,YAAY,CAAC,KAAK,MAAM,EAAE,CAAC;QACpC,wBAAwB;QACxB,MAAM,YAAY,GA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E,OAAO,CAAC,GAAG,CAAC,CAAC;IACb,IAAI,CAAC;QACH,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;YAAS,CAAC;QACT,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC;AAED,SAAgB,SAAS,CAAC,MAAqB;IAC7C,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,MAAM,CACpB,IAA0B,EAC1B,KAA4B;IAE5B,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACjC,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;QACtB,WAAW,GAAG,KAAK,CAAC;IACtB,CAAC;AACH,CAAC;AAED,SAAgB,WAAW;IACzB,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAChC,CAAC;AAED,SAAgB,aAAa;IAC3B,OAAO,QAAQ,CAAC,aAAa,EAAE,CAAC;AAClC,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport * as bunyan from 'bunyan';\nimport fs from 'fs-extra';\nimport { nanoid } from 'nanoid';\nimport upath from 'upath';\nimport cmdSerializer from './cmd-serializer';\nimport configSerializer from './config-serializer';\nimport errSerializer from './err-serializer';\nimport { RenovateStream } from './pretty-stdout';\nimport { RenovateLogger } from './renovate-logger';\nimport type { BunyanRecord, Logger } from './types';\nimport {\n ProblemStream,\n getEnv,\n validateLogLevel,\n withSanitizer,\n} from './utils';\n\nconst problems = new ProblemStream();\nlet stdoutLevel = validateLogLevel(getEnv('LOG_LEVEL'), 'info');\n\nexport function logLevel(): bunyan.LogLevelString {\n return stdoutLevel;\n}\n\nexport function createDefaultStreams(\n stdoutLevel: bunyan.LogLevelString,\n problems: ProblemStream,\n logFile: string | undefined,\n): bunyan.Stream[] {\n const stdout: bunyan.Stream = {\n name: 'stdout',\n level: stdoutLevel,\n stream: process.stdout,\n };\n\n if (getEnv('LOG_FORMAT') !== 'json') {\n // TODO: typings (#9615)\n const prettyStdOut = new RenovateStream() as any;\n prettyStdOut.pipe(process.stdout);\n stdout.stream = prettyStdOut;\n stdout.type = 'raw';\n }\n\n const problemsStream: bunyan.Stream = {\n name: 'problems',\n level: 'warn' as bunyan.LogLevel,\n stream: problems as any,\n type: 'raw',\n };\n\n const logFileStream: bunyan.Stream | undefined = is.string(logFile)\n ? createLogFileStream(logFile)\n : undefined;\n\n return [stdout, problemsStream, logFileStream].filter(\n Boolean,\n ) as bunyan.Stream[];\n}\n\nfunction createLogFileStream(logFile: string): bunyan.Stream {\n // Ensure log file directory exists\n const directoryName = upath.dirname(logFile);\n fs.ensureDirSync(directoryName);\n\n const file: bunyan.Stream = {\n name: 'logfile',\n path: logFile,\n level: validateLogLevel(getEnv('LOG_FILE_LEVEL'), 'debug'),\n };\n\n const logFileFormat = getEnv('LOG_FILE_FORMAT');\n\n if (\n is.nonEmptyStringAndNotWhitespace(logFileFormat) &&\n logFileFormat === 'pretty'\n ) {\n file.type = 'raw';\n }\n\n return file;\n}\n\nfunction serializedSanitizedLogger(streams: bunyan.Stream[]): bunyan {\n return bunyan.createLogger({\n name: 'renovate',\n serializers: {\n body: configSerializer,\n cmd: cmdSerializer,\n config: configSerializer,\n migratedConfig: configSerializer,\n originalConfig: configSerializer,\n presetConfig: configSerializer,\n oldConfig: configSerializer,\n newConfig: configSerializer,\n err: errSerializer,\n },\n streams: streams.map(withSanitizer),\n });\n}\n\nconst defaultStreams = createDefaultStreams(\n stdoutLevel,\n problems,\n getEnv('LOG_FILE'),\n);\n\nconst bunyanLogger = serializedSanitizedLogger(defaultStreams);\nconst logContext = getEnv('LOG_CONTEXT') ?? nanoid();\nconst loggerInternal = new RenovateLogger(bunyanLogger, logContext, {});\n\nexport const logger: Logger = loggerInternal;\n\nexport function setContext(value: string): void {\n loggerInternal.logContext = value;\n}\n\nexport function getContext(): any {\n return loggerInternal.logContext;\n}\n\n// setMeta overrides existing meta, may remove fields if no longer existing\nexport function setMeta(obj: Record<string, unknown>): void {\n loggerInternal.setMeta(obj);\n}\n\n// addMeta overrides or adds fields but does not remove any\nexport function addMeta(obj: Record<string, unknown>): void {\n loggerInternal.addMeta(obj);\n}\n\n// removeMeta removes the provided fields from meta\nexport function removeMeta(fields: string[]): void {\n loggerInternal.removeMeta(fields);\n}\n\nexport function withMeta<T>(obj: Record<string, unknown>, cb: () => T): T {\n addMeta(obj);\n try {\n return cb();\n } finally {\n removeMeta(Object.keys(obj));\n }\n}\n\nexport function addStream(stream: bunyan.Stream): void {\n loggerInternal.addStream(stream);\n}\n\n/**\n * For testing purposes only\n * @param name stream name\n * @param level log level\n * @private\n */\nexport function levels(\n name: 'stdout' | 'logfile',\n level: bunyan.LogLevelString,\n): void {\n bunyanLogger.levels(name, level);\n if (name === 'stdout') {\n stdoutLevel = level;\n }\n}\n\nexport function getProblems(): BunyanRecord[] {\n return problems.getProblems();\n}\n\nexport function clearProblems(): void {\n return problems.clearProblems();\n}\n"]}
|
@@ -263,6 +263,7 @@ async function initRepo({ repository, cloneSubmodules, cloneSubmodulesFilter, ig
|
|
263
263
|
throw new Error(error_messages_1.TEMPORARY_ERROR);
|
264
264
|
} /* v8 ignore stop */
|
265
265
|
config.mergeMethod = res.body.merge_method || 'merge';
|
266
|
+
config.mergeTrainsEnabled = res.body.merge_trains_enabled ?? false;
|
266
267
|
if (res.body.squash_option) {
|
267
268
|
config.squash =
|
268
269
|
res.body.squash_option === 'always' ||
|
@@ -304,7 +305,7 @@ async function initRepo({ repository, cloneSubmodules, cloneSubmodulesFilter, ig
|
|
304
305
|
return repoConfig;
|
305
306
|
}
|
306
307
|
function getBranchForceRebase() {
|
307
|
-
const forceRebase = config?.mergeMethod !== 'merge';
|
308
|
+
const forceRebase = config?.mergeMethod !== 'merge' && !config.mergeTrainsEnabled;
|
308
309
|
if (forceRebase) {
|
309
310
|
logger_1.logger.once.debug(`mergeMethod is ${config.mergeMethod} so PRs will be kept up-to-date with base branch`);
|
310
311
|
}
|