renovate 44.151.3 → 44.151.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/options/index.js +70 -10
- package/dist/config/options/index.js.map +1 -1
- package/dist/config/options/scopes.js +49 -0
- package/dist/config/options/scopes.js.map +1 -0
- package/dist/config/presets/index.js +1 -1
- package/dist/config/types.d.ts +27 -1
- package/dist/config/types.js +17 -1
- package/dist/config/types.js.map +1 -1
- package/dist/config/validation.js +24 -23
- package/dist/config/validation.js.map +1 -1
- package/dist/modules/datasource/artifactory/index.js +1 -1
- package/dist/modules/datasource/aws-eks-addon/index.js +1 -1
- package/dist/modules/datasource/aws-machine-image/index.js +1 -1
- package/dist/modules/datasource/bazel/index.js +1 -1
- package/dist/modules/datasource/bitrise/index.js +1 -1
- package/dist/modules/datasource/conan/index.js +1 -1
- package/dist/modules/datasource/conda/index.js +1 -1
- package/dist/modules/datasource/crate/index.js +1 -1
- package/dist/modules/datasource/deno/index.js +1 -1
- package/dist/modules/datasource/docker/index.js +1 -1
- package/dist/modules/datasource/elm-package/index.js +1 -1
- package/dist/modules/datasource/endoflife-date/index.js +1 -1
- package/dist/modules/datasource/galaxy-collection/index.js +1 -1
- package/dist/modules/datasource/gitea-tags/base.js +1 -1
- package/dist/modules/datasource/gitlab-packages/index.js +1 -1
- package/dist/modules/datasource/gitlab-releases/index.js +1 -1
- package/dist/modules/datasource/gitlab-tags/index.js +1 -1
- package/dist/modules/datasource/glasskube-packages/index.js +1 -1
- package/dist/modules/datasource/go/index.js +1 -1
- package/dist/modules/datasource/go/releases-goproxy.js +1 -1
- package/dist/modules/datasource/go/timestamp-cache.js +1 -1
- package/dist/modules/datasource/helm/index.js +1 -1
- package/dist/modules/datasource/hermit/index.js +1 -1
- package/dist/modules/datasource/hex/index.js +1 -1
- package/dist/modules/datasource/index.js +1 -1
- package/dist/modules/datasource/jsr/index.js +1 -1
- package/dist/modules/datasource/maven/index.js +1 -1
- package/dist/modules/datasource/nuget/v3.js +1 -1
- package/dist/modules/datasource/orb/index.js +1 -1
- package/dist/modules/datasource/packagist/index.js +1 -1
- package/dist/modules/datasource/repology/index.js +1 -1
- package/dist/modules/datasource/rubygems/index.js +1 -1
- package/dist/modules/datasource/rubygems/metadata-cache.js +1 -1
- package/dist/modules/datasource/sbt-package/index.js +1 -1
- package/dist/modules/datasource/terraform-module/index.js +1 -1
- package/dist/modules/datasource/terraform-provider/index.js +1 -1
- package/dist/modules/manager/github-actions/extract.js +1 -1
- package/dist/modules/platform/gitea/pr-cache.js +7 -7
- package/dist/modules/platform/gitea/pr-cache.js.map +1 -1
- package/dist/util/cache/package/index.js +1 -1
- package/dist/util/exec/containerbase.js +7 -1
- package/dist/util/exec/containerbase.js.map +1 -1
- package/dist/util/exec/index.js +1 -1
- package/dist/util/http/cache/package-http-cache-provider.js +1 -1
- package/dist/util/jsonata.js +1 -1
- package/dist/util/merge-confidence/index.js +1 -1
- package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js +1 -1
- package/dist/workers/repository/update/pr/changelog/release-notes.js +1 -1
- package/dist/workers/repository/update/pr/changelog/source.js +1 -1
- package/package.json +1 -1
- package/renovate-schema.json +4647 -4835
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { logger } from "../../../logger/index.js";
|
|
2
|
+
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
2
3
|
import { ensureTrailingSlash } from "../../../util/url.js";
|
|
3
4
|
import { find } from "../../../util/host-rules.js";
|
|
4
5
|
import { parseSingleYaml } from "../../../util/yaml.js";
|
|
5
|
-
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
6
6
|
import { ExternalHostError } from "../../../types/errors/external-host-error.js";
|
|
7
7
|
import { id } from "../../versioning/helm/index.js";
|
|
8
8
|
import { withCache } from "../../../util/cache/package/with-cache.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { regEx } from "../../../util/regex.js";
|
|
2
2
|
import { coerceString } from "../../../util/string.js";
|
|
3
3
|
import { logger } from "../../../logger/index.js";
|
|
4
|
-
import { parseUrl } from "../../../util/url.js";
|
|
5
4
|
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
5
|
+
import { parseUrl } from "../../../util/url.js";
|
|
6
6
|
import { id } from "../../versioning/hermit/index.js";
|
|
7
7
|
import { withCache } from "../../../util/cache/package/with-cache.js";
|
|
8
8
|
import { Datasource } from "../datasource.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from "../../../logger/index.js";
|
|
2
|
-
import { joinUrlParts, parseUrl } from "../../../util/url.js";
|
|
3
2
|
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
3
|
+
import { joinUrlParts, parseUrl } from "../../../util/url.js";
|
|
4
4
|
import "../../versioning/hex/index.js";
|
|
5
5
|
import { withCache } from "../../../util/cache/package/with-cache.js";
|
|
6
6
|
import { Datasource } from "../datasource.js";
|
|
@@ -5,11 +5,11 @@ import { coerceArray } from "../../util/array.js";
|
|
|
5
5
|
import { safeStringify } from "../../util/stringify.js";
|
|
6
6
|
import { logger } from "../../logger/index.js";
|
|
7
7
|
import { clone } from "../../util/clone.js";
|
|
8
|
+
import { buildCacheKey } from "../../util/cache/package/key.js";
|
|
8
9
|
import { trimTrailingSlash } from "../../util/url.js";
|
|
9
10
|
import { ATTR_RENOVATE_DATASOURCE, ATTR_RENOVATE_PACKAGE_NAME, ATTR_RENOVATE_REGISTRY_URL } from "../../instrumentation/types.js";
|
|
10
11
|
import { DatasourceCacheStats } from "../../util/stats.js";
|
|
11
12
|
import { instrument } from "../../instrumentation/index.js";
|
|
12
|
-
import { buildCacheKey } from "../../util/cache/package/key.js";
|
|
13
13
|
import { ExternalHostError } from "../../types/errors/external-host-error.js";
|
|
14
14
|
import { filterMap } from "../../util/filter-map.js";
|
|
15
15
|
import { get as get$1 } from "../versioning/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from "../../../logger/index.js";
|
|
2
|
-
import { joinUrlParts } from "../../../util/url.js";
|
|
3
2
|
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
3
|
+
import { joinUrlParts } from "../../../util/url.js";
|
|
4
4
|
import { id } from "../../versioning/semver/index.js";
|
|
5
5
|
import { withCache } from "../../../util/cache/package/with-cache.js";
|
|
6
6
|
import { Datasource } from "../datasource.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from "../../../logger/index.js";
|
|
2
|
-
import { ensureTrailingSlash } from "../../../util/url.js";
|
|
3
2
|
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
3
|
+
import { ensureTrailingSlash } from "../../../util/url.js";
|
|
4
4
|
import { compare } from "../../versioning/maven/compare.js";
|
|
5
5
|
import { api, id } from "../../versioning/maven/index.js";
|
|
6
6
|
import { get, set } from "../../../util/cache/package/index.js";
|
|
@@ -2,8 +2,8 @@ import { getEnv } from "../../../util/env.js";
|
|
|
2
2
|
import { regEx } from "../../../util/regex.js";
|
|
3
3
|
import { coerceArray } from "../../../util/array.js";
|
|
4
4
|
import { logger } from "../../../logger/index.js";
|
|
5
|
-
import { ensureTrailingSlash } from "../../../util/url.js";
|
|
6
5
|
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
6
|
+
import { ensureTrailingSlash } from "../../../util/url.js";
|
|
7
7
|
import { ExternalHostError } from "../../../types/errors/external-host-error.js";
|
|
8
8
|
import { createCacheWriteStream, ensureCacheDir, pipeline, readCacheFile, rmCache } from "../../../util/fs/index.js";
|
|
9
9
|
import { api } from "../../versioning/nuget/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from "../../../logger/index.js";
|
|
2
|
-
import { getQueryString, joinUrlParts } from "../../../util/url.js";
|
|
3
2
|
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
3
|
+
import { getQueryString, joinUrlParts } from "../../../util/url.js";
|
|
4
4
|
import { withCache } from "../../../util/cache/package/with-cache.js";
|
|
5
5
|
import { Datasource } from "../datasource.js";
|
|
6
6
|
import { OrbPackagesResponse } from "./schema.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { logger } from "../../../logger/index.js";
|
|
2
|
+
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
2
3
|
import { parseUrl, replaceUrlPath, resolveBaseUrl } from "../../../util/url.js";
|
|
3
4
|
import { find } from "../../../util/host-rules.js";
|
|
4
|
-
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
5
5
|
import { ExternalHostError } from "../../../types/errors/external-host-error.js";
|
|
6
6
|
import { id } from "../../versioning/composer/index.js";
|
|
7
7
|
import { withCache } from "../../../util/cache/package/with-cache.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../../constants/error-messages.js";
|
|
2
2
|
import { logger } from "../../../logger/index.js";
|
|
3
|
-
import { getQueryString, joinUrlParts } from "../../../util/url.js";
|
|
4
3
|
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
4
|
+
import { getQueryString, joinUrlParts } from "../../../util/url.js";
|
|
5
5
|
import { ExternalHostError } from "../../../types/errors/external-host-error.js";
|
|
6
6
|
import { withCache } from "../../../util/cache/package/with-cache.js";
|
|
7
7
|
import { refusedHostMessage } from "../../../util/http/util.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from "../../../logger/index.js";
|
|
2
|
-
import { getQueryString, joinUrlParts, parseUrl } from "../../../util/url.js";
|
|
3
2
|
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
3
|
+
import { getQueryString, joinUrlParts, parseUrl } from "../../../util/url.js";
|
|
4
4
|
import { id } from "../../versioning/ruby/index.js";
|
|
5
5
|
import { RequestError } from "../../../util/http/got.js";
|
|
6
6
|
import { AsyncResult, Result } from "../../../util/result.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from "../../../logger/index.js";
|
|
2
|
-
import { parseUrl } from "../../../util/url.js";
|
|
3
2
|
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
3
|
+
import { parseUrl } from "../../../util/url.js";
|
|
4
4
|
import { toSha256 } from "../../../util/hash.js";
|
|
5
5
|
import { get, set } from "../../../util/cache/package/index.js";
|
|
6
6
|
import { Result } from "../../../util/result.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { regEx } from "../../../util/regex.js";
|
|
2
2
|
import { logger } from "../../../logger/index.js";
|
|
3
|
-
import { ensureTrailingSlash, parseUrl, trimTrailingSlash } from "../../../util/url.js";
|
|
4
3
|
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
4
|
+
import { ensureTrailingSlash, parseUrl, trimTrailingSlash } from "../../../util/url.js";
|
|
5
5
|
import { compare } from "../../versioning/maven/compare.js";
|
|
6
6
|
import "../../versioning/ivy/index.js";
|
|
7
7
|
import { get, set } from "../../../util/cache/package/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from "../../../logger/index.js";
|
|
2
|
-
import { getQueryString, isHttpUrl, joinUrlParts } from "../../../util/url.js";
|
|
3
2
|
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
3
|
+
import { getQueryString, isHttpUrl, joinUrlParts } from "../../../util/url.js";
|
|
4
4
|
import { id } from "../../versioning/hashicorp/index.js";
|
|
5
5
|
import { OpenTofuModuleDocsResponse, ProtocolModuleResponse, TerraformModuleResponse, TerraformModuleV2Response } from "./schema.js";
|
|
6
6
|
import { TerraformDatasource } from "./base.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { regEx } from "../../../util/regex.js";
|
|
2
2
|
import { logger } from "../../../logger/index.js";
|
|
3
|
-
import { getQueryString, joinUrlParts } from "../../../util/url.js";
|
|
4
3
|
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
4
|
+
import { getQueryString, joinUrlParts } from "../../../util/url.js";
|
|
5
5
|
import { ExternalHostError } from "../../../types/errors/external-host-error.js";
|
|
6
6
|
import { id } from "../../versioning/hashicorp/index.js";
|
|
7
7
|
import { RequestError } from "../../../util/http/got.js";
|
|
@@ -3,9 +3,9 @@ import { newlineRegex, regEx } from "../../../util/regex.js";
|
|
|
3
3
|
import { GlobalConfig } from "../../../config/global.js";
|
|
4
4
|
import { logger, withMeta } from "../../../logger/index.js";
|
|
5
5
|
import { PLATFORM_FAMILIES } from "../../../constants/platforms.js";
|
|
6
|
+
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
6
7
|
import { parseUrl } from "../../../util/url.js";
|
|
7
8
|
import { detectPlatform } from "../../../util/common.js";
|
|
8
|
-
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
9
9
|
import { readLocalFile } from "../../../util/fs/index.js";
|
|
10
10
|
import { api } from "../../versioning/docker/index.js";
|
|
11
11
|
import { id } from "../../versioning/exact/index.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TEMPORARY_ERROR } from "../../../constants/error-messages.js";
|
|
2
2
|
import { get, set } from "../../../util/cache/memory/index.js";
|
|
3
3
|
import { logger } from "../../../logger/index.js";
|
|
4
|
+
import { buildCacheKey } from "../../../util/cache/package/key.js";
|
|
4
5
|
import { getQueryString, parseLinkHeader, parseUrl } from "../../../util/url.js";
|
|
5
6
|
import { getCache } from "../../../util/cache/repository/index.js";
|
|
6
7
|
import { PRList } from "./schema.js";
|
|
@@ -9,10 +10,9 @@ import { isNullOrUndefined } from "@sindresorhus/is";
|
|
|
9
10
|
import { dequal } from "dequal";
|
|
10
11
|
import { DateTime } from "luxon";
|
|
11
12
|
//#region lib/modules/platform/gitea/pr-cache.ts
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
13
|
+
function syncedCacheKey(platform) {
|
|
14
|
+
return buildCacheKey(platform, "pr-cache-synced");
|
|
15
|
+
}
|
|
16
16
|
/**
|
|
17
17
|
* The PRs of a single repository, backed by the repository cache.
|
|
18
18
|
*/
|
|
@@ -128,14 +128,14 @@ var GiteaPrCache = class {
|
|
|
128
128
|
this.repoCache = null;
|
|
129
129
|
}
|
|
130
130
|
forceSync() {
|
|
131
|
-
set(
|
|
131
|
+
set(syncedCacheKey(this.platform), false);
|
|
132
132
|
}
|
|
133
133
|
async open() {
|
|
134
134
|
if (!this.repoOptions) throw new Error("PR cache used before initRepo()");
|
|
135
135
|
this.repoCache ??= new RepoPrCache(this.http, this.platform, this.repoOptions);
|
|
136
|
-
if (!get(
|
|
136
|
+
if (!get(syncedCacheKey(this.platform))) {
|
|
137
137
|
await this.repoCache.sync();
|
|
138
|
-
set(
|
|
138
|
+
set(syncedCacheKey(this.platform), true);
|
|
139
139
|
}
|
|
140
140
|
return this.repoCache;
|
|
141
141
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-cache.js","names":["memCache.get"],"sources":["../../../../lib/modules/platform/gitea/pr-cache.ts"],"sourcesContent":["import { isNullOrUndefined } from '@sindresorhus/is';\nimport { dequal } from 'dequal';\nimport { DateTime } from 'luxon';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport * as memCache from '../../../util/cache/memory/index.ts';\nimport { getCache } from '../../../util/cache/repository/index.ts';\nimport type { GiteaHttp } from '../../../util/http/gitea.ts';\nimport {\n getQueryString,\n parseLinkHeader,\n parseUrl,\n} from '../../../util/url.ts';\nimport type { Pr } from '../types.ts';\nimport type { PR } from './schema.ts';\nimport { PRList } from './schema.ts';\nimport type { GiteaPlatformKey, PrCacheData } from './types.ts';\nimport { API_PATH, toRenovatePR } from './utils.ts';\n\
|
|
1
|
+
{"version":3,"file":"pr-cache.js","names":["memCache.get"],"sources":["../../../../lib/modules/platform/gitea/pr-cache.ts"],"sourcesContent":["import { isNullOrUndefined } from '@sindresorhus/is';\nimport { dequal } from 'dequal';\nimport { DateTime } from 'luxon';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport * as memCache from '../../../util/cache/memory/index.ts';\nimport { buildCacheKey } from '../../../util/cache/package/key.ts';\nimport { getCache } from '../../../util/cache/repository/index.ts';\nimport type { GiteaHttp } from '../../../util/http/gitea.ts';\nimport {\n getQueryString,\n parseLinkHeader,\n parseUrl,\n} from '../../../util/url.ts';\nimport type { Pr } from '../types.ts';\nimport type { PR } from './schema.ts';\nimport { PRList } from './schema.ts';\nimport type { GiteaPlatformKey, PrCacheData } from './types.ts';\nimport { API_PATH, toRenovatePR } from './utils.ts';\n\nfunction syncedCacheKey(platform: GiteaPlatformKey): string {\n return buildCacheKey(platform, 'pr-cache-synced');\n}\n\ninterface RepoPrCacheOptions {\n repo: string;\n ignorePrAuthor: boolean;\n author: string;\n}\n\n/**\n * The PRs of a single repository, backed by the repository cache.\n */\nclass RepoPrCache {\n private readonly http: GiteaHttp;\n private readonly platform: GiteaPlatformKey;\n private readonly cache: PrCacheData;\n private items: Pr[] = [];\n private readonly repo: string;\n private readonly ignorePrAuthor: boolean;\n private readonly author: string;\n\n constructor(\n http: GiteaHttp,\n platform: GiteaPlatformKey,\n { repo, ignorePrAuthor, author }: RepoPrCacheOptions,\n ) {\n this.http = http;\n this.platform = platform;\n this.repo = repo;\n this.ignorePrAuthor = ignorePrAuthor;\n this.author = author;\n const repoCache = getCache();\n repoCache.platform ??= {};\n const platformCache = (repoCache.platform[platform] ??= {});\n let pullRequestCache = platformCache.pullRequestsCache as\n PrCacheData | undefined;\n if (\n isNullOrUndefined(pullRequestCache) ||\n pullRequestCache.author !== author\n ) {\n pullRequestCache = {\n items: {},\n updated_at: null,\n author,\n };\n }\n platformCache.pullRequestsCache = pullRequestCache;\n this.cache = pullRequestCache;\n this.updateItems();\n }\n\n get prs(): Pr[] {\n return this.items;\n }\n\n setPr(item: Pr): void {\n this.cache.items[item.number] = item;\n this.updateItems();\n }\n\n private reconcile(rawItems: (PR | null)[]): boolean {\n const { items } = this.cache;\n let { updated_at } = this.cache;\n const cacheTime = updated_at ? DateTime.fromISO(updated_at) : null;\n\n let needNextPage = true;\n\n for (const rawItem of rawItems) {\n if (!rawItem) {\n logger.warn(\n { platform: this.platform },\n 'PR is empty, throwing temporary error',\n );\n // Gitea API sometimes returns empty PRs, so we throw a temporary error\n // https://github.com/go-gitea/gitea/blob/fcd096231ac2deaefbca10a7db1b9b01f1da93d7/services/convert/pull.go#L34-L52\n throw new Error(TEMPORARY_ERROR);\n }\n const id = rawItem.number;\n\n const newItem = toRenovatePR(rawItem, this.author);\n if (!newItem) {\n continue;\n }\n\n const oldItem = items[id];\n if (dequal(oldItem, newItem)) {\n needNextPage = false;\n continue;\n }\n\n items[id] = newItem;\n\n const itemTime = DateTime.fromISO(rawItem.updated_at);\n if (!cacheTime || itemTime > cacheTime) {\n updated_at = rawItem.updated_at;\n }\n }\n\n this.cache.updated_at = updated_at;\n\n return needNextPage;\n }\n\n async sync(): Promise<void> {\n let query: string | null = getQueryString({\n state: 'all',\n sort: 'recentupdate',\n // Fetch 100 PRs on the first run to ensure we have the most recent PRs.\n // Gitea / Forgejo will cap appropriate (50 by default, see `MAX_RESPONSE_ITEMS`).\n // https://docs.gitea.com/administration/config-cheat-sheet#api-api\n // https://forgejo.org/docs/latest/admin/config-cheat-sheet/#api-api\n limit: this.items.length ? 20 : 100,\n // Supported since Gitea 1.23.0 and Forgejo v10.0.0.\n // Will be ignored by older instances.\n ...(this.ignorePrAuthor ? {} : { poster: this.author }),\n });\n\n while (query) {\n const res = await this.http.getJson(\n `${API_PATH}/repos/${this.repo}/pulls?${query}`,\n {\n memCache: false,\n paginate: false,\n },\n PRList,\n );\n\n const needNextPage = this.reconcile(res.body);\n if (!needNextPage) {\n break;\n }\n\n const uri = parseUrl(parseLinkHeader(res.headers.link)?.next?.url);\n query = uri ? uri.search : null;\n }\n\n this.updateItems();\n }\n\n /**\n * Ensure the pr cache starts with the most recent PRs.\n * JavaScript ensures that the cache is sorted by PR number.\n */\n private updateItems(): void {\n this.items = Object.values(this.cache.items).reverse();\n }\n}\n\n/**\n * PR cache of one platform. `initRepo()` records the repository, the\n * repository cache itself is bound on first use because it is initialized\n * after `platform.initRepo()`.\n */\nexport class GiteaPrCache {\n private readonly http: GiteaHttp;\n private readonly platform: GiteaPlatformKey;\n private repoOptions: RepoPrCacheOptions | null = null;\n private repoCache: RepoPrCache | null = null;\n\n constructor(http: GiteaHttp, platform: GiteaPlatformKey) {\n this.http = http;\n this.platform = platform;\n }\n\n initRepo(repo: string, ignorePrAuthor: boolean, author: string): void {\n this.repoOptions = { repo, ignorePrAuthor, author };\n this.repoCache = null;\n }\n\n reset(): void {\n this.repoOptions = null;\n this.repoCache = null;\n }\n\n forceSync(): void {\n memCache.set(syncedCacheKey(this.platform), false);\n }\n\n private async open(): Promise<RepoPrCache> {\n if (!this.repoOptions) {\n throw new Error('PR cache used before initRepo()');\n }\n this.repoCache ??= new RepoPrCache(\n this.http,\n this.platform,\n this.repoOptions,\n );\n const isSynced = memCache.get<true | undefined>(\n syncedCacheKey(this.platform),\n );\n if (!isSynced) {\n await this.repoCache.sync();\n memCache.set(syncedCacheKey(this.platform), true);\n }\n return this.repoCache;\n }\n\n async getPrs(): Promise<Pr[]> {\n const repoCache = await this.open();\n return repoCache.prs;\n }\n\n async setPr(item: Pr): Promise<void> {\n const repoCache = await this.open();\n repoCache.setPr(item);\n }\n}\n"],"mappings":";;;;;;;;;;;;AAoBA,SAAS,eAAe,UAAoC;CAC1D,OAAO,cAAc,UAAU,iBAAiB;AAClD;;;;AAWA,IAAM,cAAN,MAAkB;CAChB;CACA;CACA;CACA,QAAsB,CAAC;CACvB;CACA;CACA;CAEA,YACE,MACA,UACA,EAAE,MAAM,gBAAgB,UACxB;EACA,KAAK,OAAO;EACZ,KAAK,WAAW;EAChB,KAAK,OAAO;EACZ,KAAK,iBAAiB;EACtB,KAAK,SAAS;EACd,MAAM,YAAY,SAAS;EAC3B,UAAU,aAAa,CAAC;EACxB,MAAM,gBAAiB,UAAU,SAAS,cAAc,CAAC;EACzD,IAAI,mBAAmB,cAAc;EAErC,IACE,kBAAkB,gBAAg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KAAK,UAAU,IAAI,IACxB,GACd;GAGF,MAAM,MAAM,SAAS,gBAAgB,IAAI,QAAQ,IAAI,CAAC,EAAE,MAAM,GAAG;GACjE,QAAQ,MAAM,IAAI,SAAS;EAC7B;EAEA,KAAK,YAAY;CACnB;;;;;CAMA,cAA4B;EAC1B,KAAK,QAAQ,OAAO,OAAO,KAAK,MAAM,KAAK,CAAC,CAAC,QAAQ;CACvD;AACF;;;;;;AAOA,IAAa,eAAb,MAA0B;CACxB;CACA;CACA,cAAiD;CACjD,YAAwC;CAExC,YAAY,MAAiB,UAA4B;EACvD,KAAK,OAAO;EACZ,KAAK,WAAW;CAClB;CAEA,SAAS,MAAc,gBAAyB,QAAsB;EACpE,KAAK,cAAc;GAAE;GAAM;GAAgB;EAAO;EAClD,KAAK,YAAY;CACnB;CAEA,QAAc;EACZ,KAAK,cAAc;EACnB,KAAK,YAAY;CACnB;CAEA,YAAkB;EAChB,IAAa,eAAe,KAAK,QAAQ,GAAG,KAAK;CACnD;CAEA,MAAc,OAA6B;EACzC,IAAI,CAAC,KAAK,aACR,MAAM,IAAI,MAAM,iCAAiC;EAEnD,KAAK,cAAc,IAAI,YACrB,KAAK,MACL,KAAK,UACL,KAAK,WACP;EAIA,IAAI,CAHaA,IACf,eAAe,KAAK,QAAQ,CAElB,GAAG;GACb,MAAM,KAAK,UAAU,KAAK;GAC1B,IAAa,eAAe,KAAK,QAAQ,GAAG,IAAI;EAClD;EACA,OAAO,KAAK;CACd;CAEA,MAAM,SAAwB;EAE5B,QAAO,MADiB,KAAK,KAAK,EAAA,CACjB;CACnB;CAEA,MAAM,MAAM,MAAyB;EAEnC,CAAA,MADwB,KAAK,KAAK,EAAA,CACxB,MAAM,IAAI;CACtB;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { get as get$1, set as set$1 } from "../memory/index.js";
|
|
2
|
-
import { PackageCacheStats } from "../../stats.js";
|
|
3
2
|
import { getCombinedKey } from "./key.js";
|
|
3
|
+
import { PackageCacheStats } from "../../stats.js";
|
|
4
4
|
import { destroy, get as get$2, getCacheType as getCacheType$1, init as init$1, set as set$2 } from "./backend.js";
|
|
5
5
|
import { getTtlOverride } from "./ttl.js";
|
|
6
6
|
//#region lib/util/cache/package/index.ts
|
|
@@ -247,6 +247,12 @@ const allToolConfig = {
|
|
|
247
247
|
versioning: "semver"
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
+
/**
|
|
251
|
+
* All Containerbase `tool`s that Renovate supports configuring the version of.
|
|
252
|
+
*/
|
|
253
|
+
function getSupportedToolNames() {
|
|
254
|
+
return Object.keys(allToolConfig);
|
|
255
|
+
}
|
|
250
256
|
let _getPkgReleases = null;
|
|
251
257
|
async function getPkgReleases(toolConfig) {
|
|
252
258
|
_getPkgReleases ??= import("../../modules/datasource/index.js");
|
|
@@ -349,6 +355,6 @@ async function generateInstallCommands(toolConstraints, memoize = false) {
|
|
|
349
355
|
return installCommands;
|
|
350
356
|
}
|
|
351
357
|
//#endregion
|
|
352
|
-
export { allToolConfig, generateInstallCommands, getToolConfig, isContainerbase, isDynamicInstall, resolveConstraint, supportsDynamicInstall };
|
|
358
|
+
export { allToolConfig, generateInstallCommands, getSupportedToolNames, getToolConfig, isContainerbase, isDynamicInstall, resolveConstraint, supportsDynamicInstall };
|
|
353
359
|
|
|
354
360
|
//# sourceMappingURL=containerbase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerbase.js","names":["memCache.get"],"sources":["../../../lib/util/exec/containerbase.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { GlobalConfig } from '../../config/global.ts';\nimport { logger } from '../../logger/index.ts';\nimport type { ReleaseResult } from '../../modules/datasource/index.ts';\nimport type { VersioningApi } from '../../modules/versioning/types.ts';\nimport { coerceArray } from '../array.ts';\nimport * as memCache from '../cache/memory/index.ts';\nimport { buildCacheKey } from '../cache/package/key.ts';\nimport { getEnv } from '../env.ts';\nimport { regEx } from '../regex.ts';\nimport type { Opt, ToolConfig, ToolConstraint, ToolName } from './types.ts';\n\n/**\n * A subset of Containerbase tools that are supported by Renovate to look up version numbers for.\n */\nexport const allToolConfig: Partial<Record<ToolName, ToolConfig>> = {\n apm: {\n datasource: 'github-releases',\n packageName: 'microsoft/apm',\n versioning: 'semver',\n extractVersion: '^v(?<version>.*)$',\n },\n bazelisk: {\n datasource: 'github-releases',\n packageName: 'bazelbuild/bazelisk',\n versioning: 'semver',\n },\n bun: {\n datasource: 'github-releases',\n packageName: 'oven-sh/bun',\n extractVersion: '^bun-v(?<version>.*)$',\n versioning: 'npm',\n },\n bundler: {\n datasource: 'rubygems',\n packageName: 'bundler',\n versioning: 'ruby',\n },\n cocoapods: {\n datasource: 'rubygems',\n packageName: 'cocoapods',\n versioning: 'ruby',\n },\n composer: {\n datasource: 'github-releases',\n packageName: 'containerbase/composer-prebuild',\n versioning: 'composer',\n },\n conan: {\n datasource: 'pypi',\n packageName: 'conan',\n versioning: 'pep440',\n },\n copier: {\n datasource: 'pypi',\n packageName: 'copier',\n versioning: 'pep440',\n },\n corepack: {\n datasource: 'npm',\n packageName: 'corepack',\n versioning: 'npm',\n },\n deno: {\n datasource: 'github-releases',\n packageName: 'denoland/deno',\n versioning: 'deno',\n },\n devbox: {\n datasource: 'github-releases',\n packageName: 'jetify-com/devbox',\n versioning: 'semver',\n },\n dotnet: {\n datasource: 'dotnet-version',\n packageName: 'dotnet-sdk',\n versioning: 'semver',\n },\n erlang: {\n datasource: 'github-releases',\n packageName: 'containerbase/erlang-prebuild',\n versioning: 'semver-coerced',\n },\n elixir: {\n datasource: 'github-releases',\n packageName: 'elixir-lang/elixir',\n versioning: 'semver',\n },\n flux: {\n datasource: 'github-releases',\n packageName: 'fluxcd/flux2',\n versioning: 'semver',\n },\n gh: {\n datasource: 'github-releases',\n packageName: 'cli/cli',\n versioning: 'semver',\n },\n gleam: {\n datasource: 'github-releases',\n packageName: 'gleam-lang/gleam',\n versioning: 'semver',\n },\n golang: {\n datasource: 'github-releases',\n packageName: 'containerbase/golang-prebuild',\n versioning: 'npm',\n },\n gradle: {\n datasource: 'gradle-version',\n packageName: 'gradle',\n versioning: 'gradle',\n },\n hashin: {\n datasource: 'pypi',\n packageName: 'hashin',\n versioning: 'pep440',\n },\n helm: {\n datasource: 'github-releases',\n packageName: 'helm/helm',\n versioning: 'semver',\n },\n helmfile: {\n datasource: 'github-releases',\n packageName: 'helmfile/helmfile',\n versioning: 'semver',\n },\n java: {\n datasource: 'java-version',\n packageName: 'java?system=true',\n versioning: 'npm',\n },\n jb: {\n datasource: 'github-releases',\n packageName: 'jsonnet-bundler/jsonnet-bundler',\n versioning: 'semver',\n },\n kustomize: {\n datasource: 'github-releases',\n packageName: 'kubernetes-sigs/kustomize',\n extractVersion: '^kustomize/v(?<version>.*)$',\n versioning: 'semver',\n },\n maven: {\n datasource: 'github-releases',\n packageName: 'containerbase/maven-prebuild',\n versioning: 'maven',\n },\n mise: {\n datasource: 'github-releases',\n packageName: 'jdx/mise',\n versioning: 'npm',\n },\n nix: {\n datasource: 'github-releases',\n packageName: 'containerbase/nix-prebuild',\n versioning: 'semver',\n },\n node: {\n datasource: 'github-releases',\n packageName: 'containerbase/node-prebuild',\n versioning: 'node',\n },\n npm: {\n datasource: 'npm',\n packageName: 'npm',\n versioning: 'npm',\n },\n pdm: {\n datasource: 'github-releases',\n packageName: 'pdm-project/pdm',\n versioning: 'semver',\n },\n php: {\n datasource: 'github-releases',\n packageName: 'containerbase/php-prebuild',\n versioning: 'composer',\n },\n 'pip-tools': {\n datasource: 'pypi',\n packageName: 'pip-tools',\n versioning: 'pep440',\n },\n pipenv: {\n datasource: 'pypi',\n packageName: 'pipenv',\n versioning: 'pep440',\n },\n pnpm: {\n datasource: 'npm',\n packageName: 'pnpm',\n versioning: 'npm',\n },\n pixi: {\n datasource: 'github-releases',\n packageName: 'prefix-dev/pixi',\n versioning: 'conda',\n extractVersion: '^v(?<version>.*)$',\n },\n poetry: {\n datasource: 'pypi',\n packageName: 'poetry',\n versioning: 'pep440',\n },\n python: {\n datasource: 'github-releases',\n packageName: 'containerbase/python-prebuild',\n versioning: 'python',\n },\n ruby: {\n datasource: 'github-releases',\n packageName: 'containerbase/ruby-prebuild',\n versioning: 'ruby',\n },\n rust: {\n datasource: 'rust-version',\n packageName: 'rust',\n versioning: 'rust-release-channel',\n },\n uv: {\n datasource: 'pypi',\n packageName: 'uv',\n versioning: 'pep440',\n },\n yarn: {\n datasource: 'npm',\n packageName: 'yarn',\n versioning: 'npm',\n },\n 'yarn-slim': {\n datasource: 'npm',\n packageName: 'yarn',\n versioning: 'npm',\n },\n dart: {\n datasource: 'dart-version',\n packageName: 'dart',\n versioning: 'npm',\n },\n flutter: {\n datasource: 'github-releases',\n packageName: 'containerbase/flutter-prebuild',\n versioning: 'npm',\n },\n vendir: {\n datasource: 'github-releases',\n packageName: 'carvel-dev/vendir',\n versioning: 'semver',\n },\n} as const;\n\n/**\n * A Containerbase `tool` that Renovate supports configuring the version of.\n */\nexport type SupportedToolNames = keyof typeof allToolConfig;\n\n/**\n * All Containerbase `tool`s that Renovate supports configuring the version of.\n */\nexport function getSupportedToolNames(): readonly ToolName[] {\n return Object.keys(allToolConfig) as readonly ToolName[];\n}\n\nlet _getPkgReleases: Promise<\n typeof import('../../modules/datasource/index.ts')\n> | null = null;\n\nasync function getPkgReleases(\n toolConfig: ToolConfig,\n): Promise<ReleaseResult | null> {\n _getPkgReleases ??= import('../../modules/datasource/index.ts');\n const { getPkgReleases } = await _getPkgReleases;\n return getPkgReleases(toolConfig);\n}\n\nexport function getToolConfig(toolName: ToolName): ToolConfig | undefined {\n return allToolConfig[toolName];\n}\n\nexport function supportsDynamicInstall(toolName: ToolName): boolean {\n return !!allToolConfig[toolName];\n}\n\nexport function isContainerbase(): boolean {\n return !!getEnv().CONTAINERBASE;\n}\n\nexport function isDynamicInstall(\n toolConstraints?: Opt<ToolConstraint[]>,\n): boolean {\n if (GlobalConfig.get('binarySource') !== 'install') {\n return false;\n }\n if (!isContainerbase()) {\n logger.debug('Falling back to binarySource=global');\n return false;\n }\n return (\n !toolConstraints ||\n toolConstraints.every((toolConstraint) =>\n supportsDynamicInstall(toolConstraint.toolName),\n )\n );\n}\n\nfunction isStable(\n version: string,\n versioningApi: VersioningApi,\n latest?: string,\n): boolean {\n if (!versioningApi.isStable(version)) {\n return false;\n }\n if (isString(latest) && versioningApi.isGreaterThan(version, latest)) {\n return false;\n }\n return true;\n}\n\nexport async function resolveConstraint(\n toolConstraint: ToolConstraint,\n): Promise<string> {\n const { toolName } = toolConstraint;\n const toolConfig = allToolConfig[toolName];\n if (!toolConfig) {\n throw new Error(`Invalid tool to install: ${toolName}`);\n }\n\n const { get: getVersioning } =\n await import('../../modules/versioning/index.ts');\n const versioning = getVersioning(toolConfig.versioning);\n let constraint = toolConstraint.constraint;\n if (constraint) {\n if (versioning.isValid(constraint)) {\n if (versioning.isSingleVersion(constraint)) {\n return constraint.replace(regEx(/^=+/), '').trim();\n }\n } else {\n logger.warn(\n { toolName, constraint, versioning: toolConfig.versioning },\n 'Invalid tool constraint',\n );\n constraint = undefined;\n }\n }\n\n const pkgReleases = await getPkgReleases(toolConfig);\n const releases = coerceArray(pkgReleases?.releases);\n\n if (!releases?.length) {\n logger.warn({ toolConfig }, 'No tool releases found.');\n throw new Error('No tool releases found.');\n }\n\n const matchingReleases = releases.filter(\n (r) => !constraint || versioning.matches(r.version, constraint),\n );\n\n const stableMatchingVersion = matchingReleases\n .filter((r) => isStable(r.version, versioning, pkgReleases?.tags?.latest))\n .pop()?.version;\n if (stableMatchingVersion) {\n logger.debug(\n { toolName, constraint, resolvedVersion: stableMatchingVersion },\n 'Resolved stable matching version',\n );\n return stableMatchingVersion;\n }\n\n const unstableMatchingVersion = matchingReleases.pop()?.version;\n if (unstableMatchingVersion) {\n logger.debug(\n { toolName, constraint, resolvedVersion: unstableMatchingVersion },\n 'Resolved unstable matching version',\n );\n return unstableMatchingVersion;\n }\n\n const stableVersion = releases\n .filter((r) => isStable(r.version, versioning, pkgReleases?.tags?.latest))\n .pop()?.version;\n if (stableVersion) {\n logger.warn(\n { toolName, constraint, stableVersion },\n 'No matching tool versions found for constraint - using latest stable version',\n );\n }\n\n const highestVersion = releases.pop()!.version;\n logger.warn(\n { toolName, constraint, highestVersion },\n 'No matching or stable tool versions found - using an unstable version',\n );\n return highestVersion;\n}\n\n// Docker execs run in a fresh `--rm` container each time, so `memoize` must\n// stay false there - only the persistent-host (binarySource=install) path\n// can safely skip a tool whose requested version is already active.\n// `install-tool` also activates the version it installs, so the memo tracks\n// the active version per tool, not every installed version.\nexport async function generateInstallCommands(\n toolConstraints: Opt<ToolConstraint[]>,\n memoize = false,\n): Promise<string[]> {\n const installCommands: string[] = [];\n if (toolConstraints?.length) {\n for (const toolConstraint of toolConstraints) {\n const toolVersion = await resolveConstraint(toolConstraint);\n const { toolName } = toolConstraint;\n if (memoize) {\n const cacheKey = buildCacheKey('containerbase-active', toolName);\n if (memCache.get<string | undefined>(cacheKey) === toolVersion) {\n continue;\n }\n memCache.set(cacheKey, toolVersion);\n }\n const installCommand = `install-tool ${toolName} ${quote(toolVersion)}`;\n installCommands.push(installCommand);\n }\n }\n return installCommands;\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAa,gBAAuD;CAClE,KAAK;EACH,YAAY;EACZ,aAAa;EACb,YAAY;EACZ,gBAAgB;CAClB;CACA,UAAU;EACR,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CACA,KAAK;EACH,YAAY;EACZ,aAAa;EACb,gBAAgB;EAChB,YAAY;CACd;CACA,SAAS;EACP,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CACA,WAAW;EACT,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CACA,UAAU;EACR,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CACA,OAAO;EACL,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CACA,QAAQ;EACN,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CAC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,MACL;GAAE;GAAU;GAAY,iBAAiB;EAAwB,GACjE,oCACF;EACA,OAAO;CACT;CAEA,MAAM,gBAAgB,SACnB,QAAQ,MAAM,SAAS,EAAE,SAAS,YAAY,aAAa,MAAM,MAAM,CAAC,CAAC,CACzE,IAAI,CAAC,EAAE;CACV,IAAI,eACF,OAAO,KACL;EAAE;EAAU;EAAY;CAAc,GACtC,8EACF;CAGF,MAAM,iBAAiB,SAAS,IAAI,CAAC,CAAE;CACvC,OAAO,KACL;EAAE;EAAU;EAAY;CAAe,GACvC,uEACF;CACA,OAAO;AACT;AAOA,eAAsB,wBACpB,iBACA,UAAU,OACS;CACnB,MAAM,kBAA4B,CAAC;CACnC,IAAI,iBAAiB,QACnB,KAAK,MAAM,kBAAkB,iBAAiB;EAC5C,MAAM,cAAc,MAAM,kBAAkB,cAAc;EAC1D,MAAM,EAAE,aAAa;EACrB,IAAI,SAAS;GACX,MAAM,WAAW,cAAc,wBAAwB,QAAQ;GAC/D,IAAIA,IAAiC,QAAQ,MAAM,aACjD;GAEF,IAAa,UAAU,WAAW;EACpC;EACA,MAAM,iBAAiB,gBAAgB,SAAS,GAAG,MAAM,WAAW;EACpE,gBAAgB,KAAK,cAAc;CACrC;CAEF,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"containerbase.js","names":["memCache.get"],"sources":["../../../lib/util/exec/containerbase.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { GlobalConfig } from '../../config/global.ts';\nimport { logger } from '../../logger/index.ts';\nimport type { ReleaseResult } from '../../modules/datasource/index.ts';\nimport type { VersioningApi } from '../../modules/versioning/types.ts';\nimport { coerceArray } from '../array.ts';\nimport * as memCache from '../cache/memory/index.ts';\nimport { buildCacheKey } from '../cache/package/key.ts';\nimport { getEnv } from '../env.ts';\nimport { regEx } from '../regex.ts';\nimport type { Opt, ToolConfig, ToolConstraint, ToolName } from './types.ts';\n\n/**\n * A subset of Containerbase tools that are supported by Renovate to look up version numbers for.\n */\nexport const allToolConfig: Partial<Record<ToolName, ToolConfig>> = {\n apm: {\n datasource: 'github-releases',\n packageName: 'microsoft/apm',\n versioning: 'semver',\n extractVersion: '^v(?<version>.*)$',\n },\n bazelisk: {\n datasource: 'github-releases',\n packageName: 'bazelbuild/bazelisk',\n versioning: 'semver',\n },\n bun: {\n datasource: 'github-releases',\n packageName: 'oven-sh/bun',\n extractVersion: '^bun-v(?<version>.*)$',\n versioning: 'npm',\n },\n bundler: {\n datasource: 'rubygems',\n packageName: 'bundler',\n versioning: 'ruby',\n },\n cocoapods: {\n datasource: 'rubygems',\n packageName: 'cocoapods',\n versioning: 'ruby',\n },\n composer: {\n datasource: 'github-releases',\n packageName: 'containerbase/composer-prebuild',\n versioning: 'composer',\n },\n conan: {\n datasource: 'pypi',\n packageName: 'conan',\n versioning: 'pep440',\n },\n copier: {\n datasource: 'pypi',\n packageName: 'copier',\n versioning: 'pep440',\n },\n corepack: {\n datasource: 'npm',\n packageName: 'corepack',\n versioning: 'npm',\n },\n deno: {\n datasource: 'github-releases',\n packageName: 'denoland/deno',\n versioning: 'deno',\n },\n devbox: {\n datasource: 'github-releases',\n packageName: 'jetify-com/devbox',\n versioning: 'semver',\n },\n dotnet: {\n datasource: 'dotnet-version',\n packageName: 'dotnet-sdk',\n versioning: 'semver',\n },\n erlang: {\n datasource: 'github-releases',\n packageName: 'containerbase/erlang-prebuild',\n versioning: 'semver-coerced',\n },\n elixir: {\n datasource: 'github-releases',\n packageName: 'elixir-lang/elixir',\n versioning: 'semver',\n },\n flux: {\n datasource: 'github-releases',\n packageName: 'fluxcd/flux2',\n versioning: 'semver',\n },\n gh: {\n datasource: 'github-releases',\n packageName: 'cli/cli',\n versioning: 'semver',\n },\n gleam: {\n datasource: 'github-releases',\n packageName: 'gleam-lang/gleam',\n versioning: 'semver',\n },\n golang: {\n datasource: 'github-releases',\n packageName: 'containerbase/golang-prebuild',\n versioning: 'npm',\n },\n gradle: {\n datasource: 'gradle-version',\n packageName: 'gradle',\n versioning: 'gradle',\n },\n hashin: {\n datasource: 'pypi',\n packageName: 'hashin',\n versioning: 'pep440',\n },\n helm: {\n datasource: 'github-releases',\n packageName: 'helm/helm',\n versioning: 'semver',\n },\n helmfile: {\n datasource: 'github-releases',\n packageName: 'helmfile/helmfile',\n versioning: 'semver',\n },\n java: {\n datasource: 'java-version',\n packageName: 'java?system=true',\n versioning: 'npm',\n },\n jb: {\n datasource: 'github-releases',\n packageName: 'jsonnet-bundler/jsonnet-bundler',\n versioning: 'semver',\n },\n kustomize: {\n datasource: 'github-releases',\n packageName: 'kubernetes-sigs/kustomize',\n extractVersion: '^kustomize/v(?<version>.*)$',\n versioning: 'semver',\n },\n maven: {\n datasource: 'github-releases',\n packageName: 'containerbase/maven-prebuild',\n versioning: 'maven',\n },\n mise: {\n datasource: 'github-releases',\n packageName: 'jdx/mise',\n versioning: 'npm',\n },\n nix: {\n datasource: 'github-releases',\n packageName: 'containerbase/nix-prebuild',\n versioning: 'semver',\n },\n node: {\n datasource: 'github-releases',\n packageName: 'containerbase/node-prebuild',\n versioning: 'node',\n },\n npm: {\n datasource: 'npm',\n packageName: 'npm',\n versioning: 'npm',\n },\n pdm: {\n datasource: 'github-releases',\n packageName: 'pdm-project/pdm',\n versioning: 'semver',\n },\n php: {\n datasource: 'github-releases',\n packageName: 'containerbase/php-prebuild',\n versioning: 'composer',\n },\n 'pip-tools': {\n datasource: 'pypi',\n packageName: 'pip-tools',\n versioning: 'pep440',\n },\n pipenv: {\n datasource: 'pypi',\n packageName: 'pipenv',\n versioning: 'pep440',\n },\n pnpm: {\n datasource: 'npm',\n packageName: 'pnpm',\n versioning: 'npm',\n },\n pixi: {\n datasource: 'github-releases',\n packageName: 'prefix-dev/pixi',\n versioning: 'conda',\n extractVersion: '^v(?<version>.*)$',\n },\n poetry: {\n datasource: 'pypi',\n packageName: 'poetry',\n versioning: 'pep440',\n },\n python: {\n datasource: 'github-releases',\n packageName: 'containerbase/python-prebuild',\n versioning: 'python',\n },\n ruby: {\n datasource: 'github-releases',\n packageName: 'containerbase/ruby-prebuild',\n versioning: 'ruby',\n },\n rust: {\n datasource: 'rust-version',\n packageName: 'rust',\n versioning: 'rust-release-channel',\n },\n uv: {\n datasource: 'pypi',\n packageName: 'uv',\n versioning: 'pep440',\n },\n yarn: {\n datasource: 'npm',\n packageName: 'yarn',\n versioning: 'npm',\n },\n 'yarn-slim': {\n datasource: 'npm',\n packageName: 'yarn',\n versioning: 'npm',\n },\n dart: {\n datasource: 'dart-version',\n packageName: 'dart',\n versioning: 'npm',\n },\n flutter: {\n datasource: 'github-releases',\n packageName: 'containerbase/flutter-prebuild',\n versioning: 'npm',\n },\n vendir: {\n datasource: 'github-releases',\n packageName: 'carvel-dev/vendir',\n versioning: 'semver',\n },\n} as const;\n\n/**\n * A Containerbase `tool` that Renovate supports configuring the version of.\n */\nexport type SupportedToolNames = keyof typeof allToolConfig;\n\n/**\n * All Containerbase `tool`s that Renovate supports configuring the version of.\n */\nexport function getSupportedToolNames(): readonly ToolName[] {\n return Object.keys(allToolConfig) as readonly ToolName[];\n}\n\nlet _getPkgReleases: Promise<\n typeof import('../../modules/datasource/index.ts')\n> | null = null;\n\nasync function getPkgReleases(\n toolConfig: ToolConfig,\n): Promise<ReleaseResult | null> {\n _getPkgReleases ??= import('../../modules/datasource/index.ts');\n const { getPkgReleases } = await _getPkgReleases;\n return getPkgReleases(toolConfig);\n}\n\nexport function getToolConfig(toolName: ToolName): ToolConfig | undefined {\n return allToolConfig[toolName];\n}\n\nexport function supportsDynamicInstall(toolName: ToolName): boolean {\n return !!allToolConfig[toolName];\n}\n\nexport function isContainerbase(): boolean {\n return !!getEnv().CONTAINERBASE;\n}\n\nexport function isDynamicInstall(\n toolConstraints?: Opt<ToolConstraint[]>,\n): boolean {\n if (GlobalConfig.get('binarySource') !== 'install') {\n return false;\n }\n if (!isContainerbase()) {\n logger.debug('Falling back to binarySource=global');\n return false;\n }\n return (\n !toolConstraints ||\n toolConstraints.every((toolConstraint) =>\n supportsDynamicInstall(toolConstraint.toolName),\n )\n );\n}\n\nfunction isStable(\n version: string,\n versioningApi: VersioningApi,\n latest?: string,\n): boolean {\n if (!versioningApi.isStable(version)) {\n return false;\n }\n if (isString(latest) && versioningApi.isGreaterThan(version, latest)) {\n return false;\n }\n return true;\n}\n\nexport async function resolveConstraint(\n toolConstraint: ToolConstraint,\n): Promise<string> {\n const { toolName } = toolConstraint;\n const toolConfig = allToolConfig[toolName];\n if (!toolConfig) {\n throw new Error(`Invalid tool to install: ${toolName}`);\n }\n\n const { get: getVersioning } =\n await import('../../modules/versioning/index.ts');\n const versioning = getVersioning(toolConfig.versioning);\n let constraint = toolConstraint.constraint;\n if (constraint) {\n if (versioning.isValid(constraint)) {\n if (versioning.isSingleVersion(constraint)) {\n return constraint.replace(regEx(/^=+/), '').trim();\n }\n } else {\n logger.warn(\n { toolName, constraint, versioning: toolConfig.versioning },\n 'Invalid tool constraint',\n );\n constraint = undefined;\n }\n }\n\n const pkgReleases = await getPkgReleases(toolConfig);\n const releases = coerceArray(pkgReleases?.releases);\n\n if (!releases?.length) {\n logger.warn({ toolConfig }, 'No tool releases found.');\n throw new Error('No tool releases found.');\n }\n\n const matchingReleases = releases.filter(\n (r) => !constraint || versioning.matches(r.version, constraint),\n );\n\n const stableMatchingVersion = matchingReleases\n .filter((r) => isStable(r.version, versioning, pkgReleases?.tags?.latest))\n .pop()?.version;\n if (stableMatchingVersion) {\n logger.debug(\n { toolName, constraint, resolvedVersion: stableMatchingVersion },\n 'Resolved stable matching version',\n );\n return stableMatchingVersion;\n }\n\n const unstableMatchingVersion = matchingReleases.pop()?.version;\n if (unstableMatchingVersion) {\n logger.debug(\n { toolName, constraint, resolvedVersion: unstableMatchingVersion },\n 'Resolved unstable matching version',\n );\n return unstableMatchingVersion;\n }\n\n const stableVersion = releases\n .filter((r) => isStable(r.version, versioning, pkgReleases?.tags?.latest))\n .pop()?.version;\n if (stableVersion) {\n logger.warn(\n { toolName, constraint, stableVersion },\n 'No matching tool versions found for constraint - using latest stable version',\n );\n }\n\n const highestVersion = releases.pop()!.version;\n logger.warn(\n { toolName, constraint, highestVersion },\n 'No matching or stable tool versions found - using an unstable version',\n );\n return highestVersion;\n}\n\n// Docker execs run in a fresh `--rm` container each time, so `memoize` must\n// stay false there - only the persistent-host (binarySource=install) path\n// can safely skip a tool whose requested version is already active.\n// `install-tool` also activates the version it installs, so the memo tracks\n// the active version per tool, not every installed version.\nexport async function generateInstallCommands(\n toolConstraints: Opt<ToolConstraint[]>,\n memoize = false,\n): Promise<string[]> {\n const installCommands: string[] = [];\n if (toolConstraints?.length) {\n for (const toolConstraint of toolConstraints) {\n const toolVersion = await resolveConstraint(toolConstraint);\n const { toolName } = toolConstraint;\n if (memoize) {\n const cacheKey = buildCacheKey('containerbase-active', toolName);\n if (memCache.get<string | undefined>(cacheKey) === toolVersion) {\n continue;\n }\n memCache.set(cacheKey, toolVersion);\n }\n const installCommand = `install-tool ${toolName} ${quote(toolVersion)}`;\n installCommands.push(installCommand);\n }\n }\n return installCommands;\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAa,gBAAuD;CAClE,KAAK;EACH,YAAY;EACZ,aAAa;EACb,YAAY;EACZ,gBAAgB;CAClB;CACA,UAAU;EACR,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CACA,KAAK;EACH,YAAY;EACZ,aAAa;EACb,gBAAgB;EAChB,YAAY;CACd;CACA,SAAS;EACP,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CACA,WAAW;EACT,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CACA,UAAU;EACR,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CACA,OAAO;EACL,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CACA,QAAQ;EACN,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CACA,UAAU;EACR,YAAY;EACZ,aAAa;EACb,YAAY;CACd;CACA,MAAM;EACJ,YAAY;EACZ,aAAa;EACb,YAAY;CAC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EAAwB,GACjE,oCACF;EACA,OAAO;CACT;CAEA,MAAM,gBAAgB,SACnB,QAAQ,MAAM,SAAS,EAAE,SAAS,YAAY,aAAa,MAAM,MAAM,CAAC,CAAC,CACzE,IAAI,CAAC,EAAE;CACV,IAAI,eACF,OAAO,KACL;EAAE;EAAU;EAAY;CAAc,GACtC,8EACF;CAGF,MAAM,iBAAiB,SAAS,IAAI,CAAC,CAAE;CACvC,OAAO,KACL;EAAE;EAAU;EAAY;CAAe,GACvC,uEACF;CACA,OAAO;AACT;AAOA,eAAsB,wBACpB,iBACA,UAAU,OACS;CACnB,MAAM,kBAA4B,CAAC;CACnC,IAAI,iBAAiB,QACnB,KAAK,MAAM,kBAAkB,iBAAiB;EAC5C,MAAM,cAAc,MAAM,kBAAkB,cAAc;EAC1D,MAAM,EAAE,aAAa;EACrB,IAAI,SAAS;GACX,MAAM,WAAW,cAAc,wBAAwB,QAAQ;GAC/D,IAAIA,IAAiC,QAAQ,MAAM,aACjD;GAEF,IAAa,UAAU,WAAW;EACpC;EACA,MAAM,iBAAiB,gBAAgB,SAAS,GAAG,MAAM,WAAW;EACpE,gBAAgB,KAAK,cAAc;CACrC;CAEF,OAAO;AACT"}
|
package/dist/util/exec/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import { getCustomEnv, getUserEnv } from "../env.js";
|
|
|
4
4
|
import { GlobalConfig } from "../../config/global.js";
|
|
5
5
|
import { coerceArray } from "../array.js";
|
|
6
6
|
import { logger } from "../../logger/index.js";
|
|
7
|
+
import { generateInstallCommands, isDynamicInstall } from "./containerbase.js";
|
|
7
8
|
import { hardcodedProcessEnv } from "./env.js";
|
|
8
9
|
import { getChildEnv } from "./utils.js";
|
|
9
|
-
import { generateInstallCommands, isDynamicInstall } from "./containerbase.js";
|
|
10
10
|
import { rawExec } from "./common.js";
|
|
11
11
|
import { generateDockerCommand, removeDockerContainer } from "./docker/index.js";
|
|
12
12
|
import { getHermitEnvs, isHermit } from "./hermit.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { regEx } from "../../regex.js";
|
|
2
2
|
import { GlobalConfig } from "../../../config/global.js";
|
|
3
3
|
import { logger } from "../../../logger/index.js";
|
|
4
|
-
import { HttpCacheStats } from "../../stats.js";
|
|
5
4
|
import { buildCacheKey } from "../../cache/package/key.js";
|
|
5
|
+
import { HttpCacheStats } from "../../stats.js";
|
|
6
6
|
import { resolveTtlValues } from "../../cache/package/ttl.js";
|
|
7
7
|
import { get, setWithRawTtl } from "../../cache/package/index.js";
|
|
8
8
|
import { copyResponse } from "../util.js";
|
package/dist/util/jsonata.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { get, set } from "./cache/memory/index.js";
|
|
2
2
|
import { anyMatchRegexOrGlobList, matchRegexOrGlobList } from "./string-match.js";
|
|
3
|
-
import { detectPlatform } from "./common.js";
|
|
4
3
|
import { buildCacheKey } from "./cache/package/key.js";
|
|
4
|
+
import { detectPlatform } from "./common.js";
|
|
5
5
|
import { toSha256 } from "./hash.js";
|
|
6
6
|
import { isArray, isNonEmptyArray, isString } from "@sindresorhus/is";
|
|
7
7
|
import jsonata from "jsonata";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { regEx } from "../regex.js";
|
|
2
2
|
import { logger } from "../../logger/index.js";
|
|
3
|
+
import { buildCacheKey } from "../cache/package/key.js";
|
|
3
4
|
import { supportedDatasources as supportedDatasources$1 } from "../../config/presets/internal/merge-confidence.preset.js";
|
|
4
5
|
import { ensureTrailingSlash, joinUrlParts, parseUrl } from "../url.js";
|
|
5
6
|
import { ATTR_RENOVATE_DATASOURCE, ATTR_RENOVATE_PACKAGE_NAME } from "../../instrumentation/types.js";
|
|
6
7
|
import { instrument } from "../../instrumentation/index.js";
|
|
7
8
|
import { find } from "../host-rules.js";
|
|
8
|
-
import { buildCacheKey } from "../cache/package/key.js";
|
|
9
9
|
import { toSha256 } from "../hash.js";
|
|
10
10
|
import { ExternalHostError } from "../../types/errors/external-host-error.js";
|
|
11
11
|
import { get, set } from "../cache/package/index.js";
|
|
@@ -4,9 +4,9 @@ import { coerceArray } from "../../../../util/array.js";
|
|
|
4
4
|
import { minimatch } from "../../../../util/minimatch.js";
|
|
5
5
|
import { sanitize } from "../../../../util/sanitize.js";
|
|
6
6
|
import { addMeta, logger } from "../../../../logger/index.js";
|
|
7
|
+
import { isConstraintName, isToolName } from "../../../../util/exec/types.js";
|
|
7
8
|
import { mergeChildConfig } from "../../../../config/utils.js";
|
|
8
9
|
import { compile } from "../../../../util/template/index.js";
|
|
9
|
-
import { isConstraintName, isToolName } from "../../../../util/exec/types.js";
|
|
10
10
|
import { ensureLocalDir, localPathIsFile, outputCacheFile, privateCacheDir, readLocalFile, statLocalFile, writeLocalFile } from "../../../../util/fs/index.js";
|
|
11
11
|
import { getRepoStatus, isFileModeEnabled } from "../../../../util/git/index.js";
|
|
12
12
|
import { withGitEnvironment } from "../../../../util/git/exec.js";
|
|
@@ -2,10 +2,10 @@ import { get, set } from "../../../../../util/cache/memory/index.js";
|
|
|
2
2
|
import { newlineRegex, regEx } from "../../../../../util/regex.js";
|
|
3
3
|
import { coerceString } from "../../../../../util/string.js";
|
|
4
4
|
import { logger } from "../../../../../logger/index.js";
|
|
5
|
+
import { buildCacheKey } from "../../../../../util/cache/package/key.js";
|
|
5
6
|
import { isHttpUrl } from "../../../../../util/url.js";
|
|
6
7
|
import { instrument } from "../../../../../instrumentation/index.js";
|
|
7
8
|
import { detectPlatform } from "../../../../../util/common.js";
|
|
8
|
-
import { buildCacheKey } from "../../../../../util/cache/package/key.js";
|
|
9
9
|
import { get as get$1, set as set$1 } from "../../../../../util/cache/package/index.js";
|
|
10
10
|
import { platform } from "../../../../../modules/platform/index.js";
|
|
11
11
|
import { linkify } from "../../../../../util/markdown.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { regEx } from "../../../../../util/regex.js";
|
|
2
2
|
import { logger } from "../../../../../logger/index.js";
|
|
3
3
|
import { PLATFORM_FAMILIES } from "../../../../../constants/platforms.js";
|
|
4
|
+
import { buildCacheKey } from "../../../../../util/cache/package/key.js";
|
|
4
5
|
import { isHttpUrl, joinUrlParts, parseUrl, trimSlashes } from "../../../../../util/url.js";
|
|
5
6
|
import { instrument } from "../../../../../instrumentation/index.js";
|
|
6
|
-
import { buildCacheKey } from "../../../../../util/cache/package/key.js";
|
|
7
7
|
import { get } from "../../../../../modules/versioning/index.js";
|
|
8
8
|
import { get as get$1, set } from "../../../../../util/cache/package/index.js";
|
|
9
9
|
import { getPkgReleases } from "../../../../../modules/datasource/index.js";
|