renovate 44.88.0 → 44.89.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/data/java-version-lts.js +12 -0
- package/dist/data/java-version-lts.js.map +1 -0
- package/dist/modules/datasource/go/common.js +28 -1
- package/dist/modules/datasource/go/common.js.map +1 -1
- package/dist/modules/datasource/go/index.js +3 -0
- package/dist/modules/datasource/go/index.js.map +1 -1
- package/dist/modules/datasource/go/releases-direct.js +2 -1
- package/dist/modules/datasource/go/releases-direct.js.map +1 -1
- package/dist/modules/datasource/go/releases-goproxy.js +5 -3
- package/dist/modules/datasource/go/releases-goproxy.js.map +1 -1
- package/dist/modules/datasource/java-version/schema.js +1 -0
- package/dist/modules/datasource/java-version/schema.js.map +1 -1
- package/dist/modules/manager/fingerprint.generated.js +1 -1
- package/dist/modules/manager/fingerprint.generated.js.map +1 -1
- package/dist/modules/manager/mise/artifacts.js +9 -7
- package/dist/modules/manager/mise/artifacts.js.map +1 -1
- package/dist/modules/manager/mise/extract.js +84 -16
- package/dist/modules/manager/mise/extract.js.map +1 -1
- package/dist/modules/manager/mise/lockfile.js +9 -2
- package/dist/modules/manager/mise/lockfile.js.map +1 -1
- package/dist/modules/manager/mise/schema.js.map +1 -1
- package/dist/modules/manager/mise/update-locked.js +55 -3
- package/dist/modules/manager/mise/update-locked.js.map +1 -1
- package/dist/modules/manager/types.d.ts +13 -0
- package/dist/util/toml.js +5 -3
- package/dist/util/toml.js.map +1 -1
- package/dist/workers/repository/process/lookup/generate.js +3 -2
- package/dist/workers/repository/process/lookup/generate.js.map +1 -1
- package/dist/workers/repository/process/lookup/index.js +7 -4
- package/dist/workers/repository/process/lookup/index.js.map +1 -1
- package/dist/workers/repository/update/branch/get-updated.js +41 -0
- package/dist/workers/repository/update/branch/get-updated.js.map +1 -1
- package/package.json +2 -1
- package/renovate-schema.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"java-version-lts.js","names":[],"sources":["../../lib/data/java-version-lts.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { trimTrailingSlash } from "../../../util/url.js";
|
|
1
2
|
import { BitbucketTagsDatasource } from "../bitbucket-tags/index.js";
|
|
2
3
|
import { getSourceUrl as getSourceUrl$1 } from "../../../util/github/url.js";
|
|
3
4
|
import { ForgejoTagsDatasource } from "../forgejo-tags/index.js";
|
|
@@ -5,7 +6,33 @@ import { GiteaTagsDatasource } from "../gitea-tags/index.js";
|
|
|
5
6
|
import { GithubTagsDatasource } from "../github-tags/index.js";
|
|
6
7
|
import { getSourceUrl as getSourceUrl$2 } from "../gitlab-tags/util.js";
|
|
7
8
|
import { GitlabTagsDatasource } from "../gitlab-tags/index.js";
|
|
9
|
+
import { parseGoproxy, parseNoproxy } from "./goproxy-parser.js";
|
|
8
10
|
//#region lib/modules/datasource/go/common.ts
|
|
11
|
+
/**
|
|
12
|
+
* The Go module proxy which serves public modules only, and which the Go toolchain uses by default.
|
|
13
|
+
*
|
|
14
|
+
* @see https://go.dev/ref/mod#module-proxy
|
|
15
|
+
*/
|
|
16
|
+
const publicGoproxyUrl = "https://proxy.golang.org";
|
|
17
|
+
/**
|
|
18
|
+
* Whether a module's data may be written to a package cache which is shared with others.
|
|
19
|
+
*
|
|
20
|
+
* `GOPRIVATE`/`GONOPROXY` is how the user declares which modules are private, and `GOPROXY` decides who serves the rest: whatever the public proxy serves is public by definition, whereas a self-hosted proxy may serve modules which are not.
|
|
21
|
+
*
|
|
22
|
+
* `direct` only counts as public alongside the public proxy, which is how Go's own default `GOPROXY` is written: there, it is the fallback for what the public proxy doesn't have. On its own it means every module comes from its source, which tells us nothing about who may read it.
|
|
23
|
+
*
|
|
24
|
+
* An unset `GOPROXY` is the default, so it is public too.
|
|
25
|
+
*
|
|
26
|
+
* @see https://go.dev/ref/mod#private-modules
|
|
27
|
+
*/
|
|
28
|
+
function isPublicProxy({ url }) {
|
|
29
|
+
return trimTrailingSlash(url) === publicGoproxyUrl;
|
|
30
|
+
}
|
|
31
|
+
function isPublicGoPackage(packageName) {
|
|
32
|
+
if (parseNoproxy()?.test(packageName)) return false;
|
|
33
|
+
const proxies = parseGoproxy();
|
|
34
|
+
return proxies.every((proxy) => proxy.url === "off" || isPublicProxy(proxy) || proxy.url === "direct" && proxies.some(isPublicProxy));
|
|
35
|
+
}
|
|
9
36
|
function getSourceUrl(dataSource) {
|
|
10
37
|
if (dataSource) {
|
|
11
38
|
const { datasource, registryUrl, packageName } = dataSource;
|
|
@@ -19,6 +46,6 @@ function getSourceUrl(dataSource) {
|
|
|
19
46
|
}
|
|
20
47
|
}
|
|
21
48
|
//#endregion
|
|
22
|
-
export { getSourceUrl };
|
|
49
|
+
export { getSourceUrl, isPublicGoPackage, publicGoproxyUrl };
|
|
23
50
|
|
|
24
51
|
//# sourceMappingURL=common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","names":["githubSourceUrl","gitlabSourceUrl"],"sources":["../../../../lib/modules/datasource/go/common.ts"],"sourcesContent":["import { getSourceUrl as githubSourceUrl } from '../../../util/github/url.ts';\nimport { BitbucketTagsDatasource } from '../bitbucket-tags/index.ts';\nimport { ForgejoTagsDatasource } from '../forgejo-tags/index.ts';\nimport { GiteaTagsDatasource } from '../gitea-tags/index.ts';\nimport { GithubTagsDatasource } from '../github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../gitlab-tags/index.ts';\nimport { getSourceUrl as gitlabSourceUrl } from '../gitlab-tags/util.ts';\n\nimport type { DataSource } from './types.ts';\n\nexport function getSourceUrl(\n dataSource?: DataSource | null,\n): string | undefined {\n if (dataSource) {\n const { datasource, registryUrl, packageName } = dataSource;\n\n switch (datasource) {\n case ForgejoTagsDatasource.id:\n return ForgejoTagsDatasource.getSourceUrl(packageName, registryUrl);\n case GiteaTagsDatasource.id:\n return GiteaTagsDatasource.getSourceUrl(packageName, registryUrl);\n case GithubTagsDatasource.id:\n return githubSourceUrl(packageName, registryUrl);\n case GitlabTagsDatasource.id:\n return gitlabSourceUrl(packageName, registryUrl);\n case BitbucketTagsDatasource.id:\n return BitbucketTagsDatasource.getSourceUrl(packageName, registryUrl);\n }\n }\n\n return undefined;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"common.js","names":["githubSourceUrl","gitlabSourceUrl"],"sources":["../../../../lib/modules/datasource/go/common.ts"],"sourcesContent":["import { getSourceUrl as githubSourceUrl } from '../../../util/github/url.ts';\nimport { trimTrailingSlash } from '../../../util/url.ts';\nimport { BitbucketTagsDatasource } from '../bitbucket-tags/index.ts';\nimport { ForgejoTagsDatasource } from '../forgejo-tags/index.ts';\nimport { GiteaTagsDatasource } from '../gitea-tags/index.ts';\nimport { GithubTagsDatasource } from '../github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../gitlab-tags/index.ts';\nimport { getSourceUrl as gitlabSourceUrl } from '../gitlab-tags/util.ts';\n\nimport { parseGoproxy, parseNoproxy } from './goproxy-parser.ts';\nimport type { DataSource, GoproxyItem } from './types.ts';\n\n/**\n * The Go module proxy which serves public modules only, and which the Go toolchain uses by default.\n *\n * @see https://go.dev/ref/mod#module-proxy\n */\nexport const publicGoproxyUrl = 'https://proxy.golang.org';\n\n/**\n * Whether a module's data may be written to a package cache which is shared with others.\n *\n * `GOPRIVATE`/`GONOPROXY` is how the user declares which modules are private, and `GOPROXY` decides who serves the rest: whatever the public proxy serves is public by definition, whereas a self-hosted proxy may serve modules which are not.\n *\n * `direct` only counts as public alongside the public proxy, which is how Go's own default `GOPROXY` is written: there, it is the fallback for what the public proxy doesn't have. On its own it means every module comes from its source, which tells us nothing about who may read it.\n *\n * An unset `GOPROXY` is the default, so it is public too.\n *\n * @see https://go.dev/ref/mod#private-modules\n */\nfunction isPublicProxy({ url }: GoproxyItem): boolean {\n return trimTrailingSlash(url) === publicGoproxyUrl;\n}\n\nexport function isPublicGoPackage(packageName: string): boolean {\n if (parseNoproxy()?.test(packageName)) {\n return false;\n }\n\n const proxies = parseGoproxy();\n\n return proxies.every(\n (proxy) =>\n proxy.url === 'off' ||\n isPublicProxy(proxy) ||\n (proxy.url === 'direct' && proxies.some(isPublicProxy)),\n );\n}\n\nexport function getSourceUrl(\n dataSource?: DataSource | null,\n): string | undefined {\n if (dataSource) {\n const { datasource, registryUrl, packageName } = dataSource;\n\n switch (datasource) {\n case ForgejoTagsDatasource.id:\n return ForgejoTagsDatasource.getSourceUrl(packageName, registryUrl);\n case GiteaTagsDatasource.id:\n return GiteaTagsDatasource.getSourceUrl(packageName, registryUrl);\n case GithubTagsDatasource.id:\n return githubSourceUrl(packageName, registryUrl);\n case GitlabTagsDatasource.id:\n return gitlabSourceUrl(packageName, registryUrl);\n case BitbucketTagsDatasource.id:\n return BitbucketTagsDatasource.getSourceUrl(packageName, registryUrl);\n }\n }\n\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAa,mBAAmB;;;;;;;;;;;;AAahC,SAAS,cAAc,EAAE,OAA6B;CACpD,OAAO,kBAAkB,GAAG,MAAM;AACpC;AAEA,SAAgB,kBAAkB,aAA8B;CAC9D,IAAI,aAAa,CAAC,EAAE,KAAK,WAAW,GAClC,OAAO;CAGT,MAAM,UAAU,aAAa;CAE7B,OAAO,QAAQ,OACZ,UACC,MAAM,QAAQ,SACd,cAAc,KAAK,KAClB,MAAM,QAAQ,YAAY,QAAQ,KAAK,aAAa,CACzD;AACF;AAEA,SAAgB,aACd,YACoB;CACpB,IAAI,YAAY;EACd,MAAM,EAAE,YAAY,aAAa,gBAAgB;EAEjD,QAAQ,YAAR;GACE,KAAK,sBAAsB,IACzB,OAAO,sBAAsB,aAAa,aAAa,WAAW;GACpE,KAAK,oBAAoB,IACvB,OAAO,oBAAoB,aAAa,aAAa,WAAW;GAClE,KAAK,qBAAqB,IACxB,OAAOA,eAAgB,aAAa,WAAW;GACjD,KAAK,qBAAqB,IACxB,OAAOC,eAAgB,aAAa,WAAW;GACjD,KAAK,wBAAwB,IAC3B,OAAO,wBAAwB,aAAa,aAAa,WAAW;EACxE;CACF;AAGF"}
|
|
@@ -14,6 +14,7 @@ import { GithubTagsDatasource } from "../github-tags/index.js";
|
|
|
14
14
|
import { GitlabTagsDatasource } from "../gitlab-tags/index.js";
|
|
15
15
|
import { BaseGoDatasource } from "./base.js";
|
|
16
16
|
import { parseGoproxy } from "./goproxy-parser.js";
|
|
17
|
+
import { isPublicGoPackage } from "./common.js";
|
|
17
18
|
import { GoDirectDatasource } from "./releases-direct.js";
|
|
18
19
|
import { GoProxyDatasource } from "./releases-goproxy.js";
|
|
19
20
|
import { isString } from "@sindresorhus/is";
|
|
@@ -41,6 +42,7 @@ var GoDatasource = class GoDatasource extends Datasource {
|
|
|
41
42
|
return withCache({
|
|
42
43
|
namespace: `datasource-${GoDatasource.id}`,
|
|
43
44
|
key: `getReleases:${config.packageName}@@${constraintsFilteringKey}`,
|
|
45
|
+
cacheable: isPublicGoPackage(config.packageName),
|
|
44
46
|
fallback: true
|
|
45
47
|
}, () => this._getReleases(config));
|
|
46
48
|
}
|
|
@@ -77,6 +79,7 @@ var GoDatasource = class GoDatasource extends Datasource {
|
|
|
77
79
|
return withCache({
|
|
78
80
|
namespace: `datasource-${GoDatasource.id}`,
|
|
79
81
|
key: `getDigest:${config.packageName}:${newValue}`,
|
|
82
|
+
cacheable: isPublicGoPackage(config.packageName),
|
|
80
83
|
fallback: true
|
|
81
84
|
}, () => this._getDigest(config, newValue));
|
|
82
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["semverId"],"sources":["../../../../lib/modules/datasource/go/index.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { addSecretForSanitizing } from '../../../util/sanitize.ts';\nimport { parseUrl } from '../../../util/url.ts';\nimport { id as semverId } from '../../versioning/semver/index.ts';\nimport { BitbucketTagsDatasource } from '../bitbucket-tags/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport { ForgejoTagsDatasource } from '../forgejo-tags/index.ts';\nimport { GitTagsDatasource } from '../git-tags/index.ts';\nimport { GiteaTagsDatasource } from '../gitea-tags/index.ts';\nimport { GithubTagsDatasource } from '../github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../gitlab-tags/index.ts';\nimport type {\n DigestConfig,\n GetReleasesConfig,\n ReleaseResult,\n} from '../types.ts';\nimport { BaseGoDatasource } from './base.ts';\nimport { parseGoproxy } from './goproxy-parser.ts';\nimport { GoDirectDatasource } from './releases-direct.ts';\nimport { GoProxyDatasource } from './releases-goproxy.ts';\n\nexport class GoDatasource extends Datasource {\n static readonly id = 'go';\n\n override readonly defaultVersioning = semverId;\n\n constructor() {\n super(GoDatasource.id);\n }\n\n override readonly defaultConfig = {\n commitMessageTopic: 'module {{depName}}',\n };\n\n override readonly customRegistrySupport = false;\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'If the release timestamp is not returned from the respective datasoure used to fetch the releases, then Renovate uses the `Time` field in the results instead. For modules hosted on GitHub, a later GitHub Release publication time takes precedence over both.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the `packageName` and `registryUrl`.';\n\n readonly goproxy = new GoProxyDatasource();\n readonly direct = new GoDirectDatasource();\n\n // Pseudo versions https://go.dev/ref/mod#pseudo-versions\n static readonly pversionRegexp = regEx(\n /v\\d+\\.\\d+\\.\\d+-(?:\\w+\\.)?(?:0\\.)?\\d{14}-(?<digest>[a-f0-9]{12})/,\n );\n\n private _getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n return this.goproxy.getReleases(config);\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n const constraintsFilteringKey =\n config.constraintsFiltering && config.constraintsFiltering !== 'none'\n ? `@@${config.constraintsFiltering}`\n : '';\n return withCache(\n {\n namespace: `datasource-${GoDatasource.id}`,\n // TODO: types (#22198)\n key: `getReleases:${config.packageName}@@${constraintsFilteringKey}`,\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * go.getDigest\n *\n * This datasource resolves a go module URL into its source repository\n * and then fetches the digest if it is on GitHub.\n *\n * This function will:\n * - Determine the source URL for the module\n * - Call the respective getDigest in github to retrieve the commit hash\n */\n private async _getDigest(\n { packageName }: DigestConfig,\n newValue?: string,\n ): Promise<string | null> {\n if (parseGoproxy().some(({ url }) => url === 'off')) {\n logger.debug(\n `Skip digest fetch for ${packageName} with GOPROXY containing \"off\"`,\n );\n return null;\n }\n\n const source = await BaseGoDatasource.getDatasource(packageName);\n if (!source) {\n return null;\n }\n\n // ignore vX.Y.Z-(0.)? pseudo versions that are used Go Modules - look up default branch instead\n // ignore v0.0.0 versions to fetch the digest of default branch, not the commit of non-existing tag `v0.0.0`\n const tag =\n newValue &&\n !GoDatasource.pversionRegexp.test(newValue) &&\n newValue !== 'v0.0.0'\n ? newValue\n : undefined;\n\n switch (source.datasource) {\n case ForgejoTagsDatasource.id: {\n return this.direct.forgejo.getDigest(source, tag);\n }\n case GitTagsDatasource.id: {\n return this.direct.git.getDigest(source, tag);\n }\n case GiteaTagsDatasource.id: {\n return this.direct.gitea.getDigest(source, tag);\n }\n case GithubTagsDatasource.id: {\n return this.direct.github.getDigest(source, tag);\n }\n case BitbucketTagsDatasource.id: {\n return this.direct.bitbucket.getDigest(source, tag);\n }\n case GitlabTagsDatasource.id: {\n return this.direct.gitlab.getDigest(source, tag);\n }\n /* v8 ignore next: can never happen, makes lint happy */\n default: {\n return null;\n }\n }\n }\n\n override getDigest(\n config: DigestConfig,\n newValue?: string,\n ): Promise<string | null> {\n return withCache(\n {\n namespace: `datasource-${GoDatasource.id}`,\n key: `getDigest:${config.packageName}:${newValue}`,\n fallback: true,\n },\n () => this._getDigest(config, newValue),\n );\n }\n}\n\nconst env = getEnv();\n/* v8 ignore if -- hard to test */\nif (isString(env.GOPROXY)) {\n const uri = parseUrl(env.GOPROXY);\n if (uri?.password) {\n addSecretForSanitizing(uri.password, 'global');\n } else if (uri?.username) {\n addSecretForSanitizing(uri.username, 'global');\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["semverId"],"sources":["../../../../lib/modules/datasource/go/index.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { addSecretForSanitizing } from '../../../util/sanitize.ts';\nimport { parseUrl } from '../../../util/url.ts';\nimport { id as semverId } from '../../versioning/semver/index.ts';\nimport { BitbucketTagsDatasource } from '../bitbucket-tags/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport { ForgejoTagsDatasource } from '../forgejo-tags/index.ts';\nimport { GitTagsDatasource } from '../git-tags/index.ts';\nimport { GiteaTagsDatasource } from '../gitea-tags/index.ts';\nimport { GithubTagsDatasource } from '../github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../gitlab-tags/index.ts';\nimport type {\n DigestConfig,\n GetReleasesConfig,\n ReleaseResult,\n} from '../types.ts';\nimport { BaseGoDatasource } from './base.ts';\nimport { isPublicGoPackage } from './common.ts';\nimport { parseGoproxy } from './goproxy-parser.ts';\nimport { GoDirectDatasource } from './releases-direct.ts';\nimport { GoProxyDatasource } from './releases-goproxy.ts';\n\nexport class GoDatasource extends Datasource {\n static readonly id = 'go';\n\n override readonly defaultVersioning = semverId;\n\n constructor() {\n super(GoDatasource.id);\n }\n\n override readonly defaultConfig = {\n commitMessageTopic: 'module {{depName}}',\n };\n\n override readonly customRegistrySupport = false;\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'If the release timestamp is not returned from the respective datasoure used to fetch the releases, then Renovate uses the `Time` field in the results instead. For modules hosted on GitHub, a later GitHub Release publication time takes precedence over both.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the `packageName` and `registryUrl`.';\n\n readonly goproxy = new GoProxyDatasource();\n readonly direct = new GoDirectDatasource();\n\n // Pseudo versions https://go.dev/ref/mod#pseudo-versions\n static readonly pversionRegexp = regEx(\n /v\\d+\\.\\d+\\.\\d+-(?:\\w+\\.)?(?:0\\.)?\\d{14}-(?<digest>[a-f0-9]{12})/,\n );\n\n private _getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n return this.goproxy.getReleases(config);\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n const constraintsFilteringKey =\n config.constraintsFiltering && config.constraintsFiltering !== 'none'\n ? `@@${config.constraintsFiltering}`\n : '';\n return withCache(\n {\n namespace: `datasource-${GoDatasource.id}`,\n // TODO: types (#22198)\n key: `getReleases:${config.packageName}@@${constraintsFilteringKey}`,\n cacheable: isPublicGoPackage(config.packageName),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * go.getDigest\n *\n * This datasource resolves a go module URL into its source repository\n * and then fetches the digest if it is on GitHub.\n *\n * This function will:\n * - Determine the source URL for the module\n * - Call the respective getDigest in github to retrieve the commit hash\n */\n private async _getDigest(\n { packageName }: DigestConfig,\n newValue?: string,\n ): Promise<string | null> {\n if (parseGoproxy().some(({ url }) => url === 'off')) {\n logger.debug(\n `Skip digest fetch for ${packageName} with GOPROXY containing \"off\"`,\n );\n return null;\n }\n\n const source = await BaseGoDatasource.getDatasource(packageName);\n if (!source) {\n return null;\n }\n\n // ignore vX.Y.Z-(0.)? pseudo versions that are used Go Modules - look up default branch instead\n // ignore v0.0.0 versions to fetch the digest of default branch, not the commit of non-existing tag `v0.0.0`\n const tag =\n newValue &&\n !GoDatasource.pversionRegexp.test(newValue) &&\n newValue !== 'v0.0.0'\n ? newValue\n : undefined;\n\n switch (source.datasource) {\n case ForgejoTagsDatasource.id: {\n return this.direct.forgejo.getDigest(source, tag);\n }\n case GitTagsDatasource.id: {\n return this.direct.git.getDigest(source, tag);\n }\n case GiteaTagsDatasource.id: {\n return this.direct.gitea.getDigest(source, tag);\n }\n case GithubTagsDatasource.id: {\n return this.direct.github.getDigest(source, tag);\n }\n case BitbucketTagsDatasource.id: {\n return this.direct.bitbucket.getDigest(source, tag);\n }\n case GitlabTagsDatasource.id: {\n return this.direct.gitlab.getDigest(source, tag);\n }\n /* v8 ignore next: can never happen, makes lint happy */\n default: {\n return null;\n }\n }\n }\n\n override getDigest(\n config: DigestConfig,\n newValue?: string,\n ): Promise<string | null> {\n return withCache(\n {\n namespace: `datasource-${GoDatasource.id}`,\n key: `getDigest:${config.packageName}:${newValue}`,\n cacheable: isPublicGoPackage(config.packageName),\n fallback: true,\n },\n () => this._getDigest(config, newValue),\n );\n }\n}\n\nconst env = getEnv();\n/* v8 ignore if -- hard to test */\nif (isString(env.GOPROXY)) {\n const uri = parseUrl(env.GOPROXY);\n if (uri?.password) {\n addSecretForSanitizing(uri.password, 'global');\n } else if (uri?.username) {\n addSecretForSanitizing(uri.username, 'global');\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,IAAa,eAAb,MAAa,qBAAqB,WAAW;CAC3C,OAAgB,KAAK;CAErB,oBAAsCA;CAEtC,cAAc;EACZ,MAAM,aAAa,EAAE;CACvB;CAEA,gBAAkC,EAChC,oBAAoB,qBACtB;CAEA,wBAA0C;CAE1C,0BAA4C;CAC5C,uBACE;CACF,mBAAqC;CACrC,gBACE;CAEF,UAAmB,IAAI,kBAAkB;CACzC,SAAkB,IAAI,mBAAmB;CAGzC,OAAgB,iBAAiB,MAC/B,iEACF;CAEA,aACE,QAC+B;EAC/B,OAAO,KAAK,QAAQ,YAAY,MAAM;CACxC;CAEA,YAAY,QAA0D;EACpE,MAAM,0BACJ,OAAO,wBAAwB,OAAO,yBAAyB,SAC3D,KAAK,OAAO,yBACZ;EACN,OAAO,UACL;GACE,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AAI,OAAO;CAChC,IAAI,KAAK,UACP,uBAAuB,IAAI,UAAU,QAAQ;MACxC,IAAI,KAAK,UACd,uBAAuB,IAAI,UAAU,QAAQ;AAEjD"}
|
|
@@ -9,7 +9,7 @@ import { GiteaTagsDatasource } from "../gitea-tags/index.js";
|
|
|
9
9
|
import { GithubTagsDatasource } from "../github-tags/index.js";
|
|
10
10
|
import { GitlabTagsDatasource } from "../gitlab-tags/index.js";
|
|
11
11
|
import { BaseGoDatasource } from "./base.js";
|
|
12
|
-
import { getSourceUrl } from "./common.js";
|
|
12
|
+
import { getSourceUrl, isPublicGoPackage } from "./common.js";
|
|
13
13
|
//#region lib/modules/datasource/go/releases-direct.ts
|
|
14
14
|
/**
|
|
15
15
|
* This function tries to select tags with longest prefix could be constructed from `packageName`.
|
|
@@ -109,6 +109,7 @@ var GoDirectDatasource = class GoDirectDatasource extends Datasource {
|
|
|
109
109
|
return withCache({
|
|
110
110
|
namespace: `datasource-${GoDirectDatasource.id}`,
|
|
111
111
|
key: config.packageName,
|
|
112
|
+
cacheable: isPublicGoPackage(config.packageName),
|
|
112
113
|
fallback: true
|
|
113
114
|
}, () => this._getReleases(config));
|
|
114
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releases-direct.js","names":[],"sources":["../../../../lib/modules/datasource/go/releases-direct.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { BitbucketTagsDatasource } from '../bitbucket-tags/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport { ForgejoTagsDatasource } from '../forgejo-tags/index.ts';\nimport { GitTagsDatasource } from '../git-tags/index.ts';\nimport { GiteaTagsDatasource } from '../gitea-tags/index.ts';\nimport { GithubTagsDatasource } from '../github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../gitlab-tags/index.ts';\nimport type { GetReleasesConfig, Release, ReleaseResult } from '../types.ts';\nimport { BaseGoDatasource } from './base.ts';\nimport { getSourceUrl } from './common.ts';\n\n/**\n * This function tries to select tags with longest prefix could be constructed from `packageName`.\n *\n * For package named `example.com/foo/bar/baz/qux`, it will try to detect tags with following prefixes:\n *\n * - `foo/bar/baz/qux/vX.Y.Z`\n * - `bar/baz/qux/vX.Y.Z`\n * - `baz/qux/vX.Y.Z`\n * - `qux/vX.Y.Z`\n *\n * If none of the following is found, it falls back to simply returning all tags like `vX.Y.Z`.\n */\nfunction filterByPrefix(packageName: string, releases: Release[]): Release[] {\n const nameParts = packageName\n .replace(regEx(/\\/v\\d+$/), '')\n .split('/')\n .slice(1);\n\n const submoduleReleases: Release[] = [];\n while (nameParts.length) {\n const prefix = `${nameParts.join('/')}/`;\n\n for (const release of releases) {\n if (!release.version.startsWith(prefix)) {\n continue;\n }\n\n const normalizedVersion = release.version.replace(prefix, '');\n if (!normalizedVersion.match(regEx(/^v\\d[^/]*/))) {\n continue;\n }\n\n release.version = release.version.replace(prefix, '');\n submoduleReleases.push(release);\n }\n\n if (submoduleReleases.length) {\n return submoduleReleases;\n }\n\n nameParts.shift();\n }\n\n return releases.filter((release) => release.version.startsWith('v'));\n}\n\nexport class GoDirectDatasource extends Datasource {\n static readonly id = 'go-direct';\n\n readonly forgejo = new ForgejoTagsDatasource();\n git: GitTagsDatasource;\n readonly gitea = new GiteaTagsDatasource();\n github: GithubTagsDatasource;\n gitlab: GitlabTagsDatasource;\n bitbucket: BitbucketTagsDatasource;\n\n constructor() {\n super(GoDirectDatasource.id);\n this.git = new GitTagsDatasource();\n this.github = new GithubTagsDatasource();\n this.gitlab = new GitlabTagsDatasource();\n this.bitbucket = new BitbucketTagsDatasource();\n }\n\n /**\n * go.getReleases\n *\n * This datasource resolves a go module URL into its source repository\n * and then fetch it if it is on GitHub.\n *\n * This function will:\n * - Determine the source URL for the module\n * - Call the respective getReleases in github/gitlab to retrieve the tags\n * - Filter module tags according to the module path\n */\n private async _getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n const { packageName } = config;\n\n let res: ReleaseResult | null = null;\n\n logger.trace(`go.getReleases(${packageName})`);\n const source = await BaseGoDatasource.getDatasource(packageName);\n\n if (!source) {\n logger.info(\n { packageName },\n 'Unsupported go host - cannot look up versions',\n );\n return null;\n }\n\n switch (source.datasource) {\n case ForgejoTagsDatasource.id: {\n res = await this.forgejo.getReleases(source);\n break;\n }\n case GitTagsDatasource.id: {\n res = await this.git.getReleases(source);\n break;\n }\n case GiteaTagsDatasource.id: {\n res = await this.gitea.getReleases(source);\n break;\n }\n case GithubTagsDatasource.id: {\n res = await this.github.getReleases(source);\n break;\n }\n case GitlabTagsDatasource.id: {\n res = await this.gitlab.getReleases(source);\n break;\n }\n case BitbucketTagsDatasource.id: {\n res = await this.bitbucket.getReleases(source);\n break;\n }\n /* v8 ignore next -- should never happen */\n default: {\n return null;\n }\n }\n\n /* v8 ignore next -- TODO: add test */\n if (!res) {\n return null;\n }\n\n const sourceUrl = res.sourceUrl ?? getSourceUrl(source) ?? null;\n\n return {\n ...res,\n releases: filterByPrefix(packageName, res.releases),\n sourceUrl,\n };\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${GoDirectDatasource.id}`,\n key: config.packageName,\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAS,eAAe,aAAqB,UAAgC;CAC3E,MAAM,YAAY,YACf,QAAQ,MAAM,SAAS,GAAG,EAAE,CAAC,CAC7B,MAAM,GAAG,CAAC,CACV,MAAM,CAAC;CAEV,MAAM,oBAA+B,CAAC;CACtC,OAAO,UAAU,QAAQ;EACvB,MAAM,SAAS,GAAG,UAAU,KAAK,GAAG,EAAE;EAEtC,KAAK,MAAM,WAAW,UAAU;GAC9B,IAAI,CAAC,QAAQ,QAAQ,WAAW,MAAM,GACpC;GAIF,IAAI,CADsB,QAAQ,QAAQ,QAAQ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B,MAAM,MAAM,KAAK,UAAU,YAAY,MAAM;IAC7C;;GAGF,SACE,OAAO;EAEX;;EAGA,IAAI,CAAC,KACH,OAAO;EAGT,MAAM,YAAY,IAAI,aAAa,aAAa,MAAM,KAAK;EAE3D,OAAO;GACL,GAAG;GACH,UAAU,eAAe,aAAa,IAAI,QAAQ;GAClD;EACF;CACF;CAEA,YAAY,QAA0D;EACpE,OAAO,UACL;GACE,WAAW,cAAc,mBAAmB;GAC5C,KAAK,OAAO;GACZ,UAAU;EACZ,SACM,KAAK,aAAa,MAAM,CAChC;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"releases-direct.js","names":[],"sources":["../../../../lib/modules/datasource/go/releases-direct.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { BitbucketTagsDatasource } from '../bitbucket-tags/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport { ForgejoTagsDatasource } from '../forgejo-tags/index.ts';\nimport { GitTagsDatasource } from '../git-tags/index.ts';\nimport { GiteaTagsDatasource } from '../gitea-tags/index.ts';\nimport { GithubTagsDatasource } from '../github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../gitlab-tags/index.ts';\nimport type { GetReleasesConfig, Release, ReleaseResult } from '../types.ts';\nimport { BaseGoDatasource } from './base.ts';\nimport { getSourceUrl, isPublicGoPackage } from './common.ts';\n\n/**\n * This function tries to select tags with longest prefix could be constructed from `packageName`.\n *\n * For package named `example.com/foo/bar/baz/qux`, it will try to detect tags with following prefixes:\n *\n * - `foo/bar/baz/qux/vX.Y.Z`\n * - `bar/baz/qux/vX.Y.Z`\n * - `baz/qux/vX.Y.Z`\n * - `qux/vX.Y.Z`\n *\n * If none of the following is found, it falls back to simply returning all tags like `vX.Y.Z`.\n */\nfunction filterByPrefix(packageName: string, releases: Release[]): Release[] {\n const nameParts = packageName\n .replace(regEx(/\\/v\\d+$/), '')\n .split('/')\n .slice(1);\n\n const submoduleReleases: Release[] = [];\n while (nameParts.length) {\n const prefix = `${nameParts.join('/')}/`;\n\n for (const release of releases) {\n if (!release.version.startsWith(prefix)) {\n continue;\n }\n\n const normalizedVersion = release.version.replace(prefix, '');\n if (!normalizedVersion.match(regEx(/^v\\d[^/]*/))) {\n continue;\n }\n\n release.version = release.version.replace(prefix, '');\n submoduleReleases.push(release);\n }\n\n if (submoduleReleases.length) {\n return submoduleReleases;\n }\n\n nameParts.shift();\n }\n\n return releases.filter((release) => release.version.startsWith('v'));\n}\n\nexport class GoDirectDatasource extends Datasource {\n static readonly id = 'go-direct';\n\n readonly forgejo = new ForgejoTagsDatasource();\n git: GitTagsDatasource;\n readonly gitea = new GiteaTagsDatasource();\n github: GithubTagsDatasource;\n gitlab: GitlabTagsDatasource;\n bitbucket: BitbucketTagsDatasource;\n\n constructor() {\n super(GoDirectDatasource.id);\n this.git = new GitTagsDatasource();\n this.github = new GithubTagsDatasource();\n this.gitlab = new GitlabTagsDatasource();\n this.bitbucket = new BitbucketTagsDatasource();\n }\n\n /**\n * go.getReleases\n *\n * This datasource resolves a go module URL into its source repository\n * and then fetch it if it is on GitHub.\n *\n * This function will:\n * - Determine the source URL for the module\n * - Call the respective getReleases in github/gitlab to retrieve the tags\n * - Filter module tags according to the module path\n */\n private async _getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n const { packageName } = config;\n\n let res: ReleaseResult | null = null;\n\n logger.trace(`go.getReleases(${packageName})`);\n const source = await BaseGoDatasource.getDatasource(packageName);\n\n if (!source) {\n logger.info(\n { packageName },\n 'Unsupported go host - cannot look up versions',\n );\n return null;\n }\n\n switch (source.datasource) {\n case ForgejoTagsDatasource.id: {\n res = await this.forgejo.getReleases(source);\n break;\n }\n case GitTagsDatasource.id: {\n res = await this.git.getReleases(source);\n break;\n }\n case GiteaTagsDatasource.id: {\n res = await this.gitea.getReleases(source);\n break;\n }\n case GithubTagsDatasource.id: {\n res = await this.github.getReleases(source);\n break;\n }\n case GitlabTagsDatasource.id: {\n res = await this.gitlab.getReleases(source);\n break;\n }\n case BitbucketTagsDatasource.id: {\n res = await this.bitbucket.getReleases(source);\n break;\n }\n /* v8 ignore next -- should never happen */\n default: {\n return null;\n }\n }\n\n /* v8 ignore next -- TODO: add test */\n if (!res) {\n return null;\n }\n\n const sourceUrl = res.sourceUrl ?? getSourceUrl(source) ?? null;\n\n return {\n ...res,\n releases: filterByPrefix(packageName, res.releases),\n sourceUrl,\n };\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${GoDirectDatasource.id}`,\n key: config.packageName,\n cacheable: isPublicGoPackage(config.packageName),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAS,eAAe,aAAqB,UAAgC;CAC3E,MAAM,YAAY,YACf,QAAQ,MAAM,SAAS,GAAG,EAAE,CAAC,CAC7B,MAAM,GAAG,CAAC,CACV,MAAM,CAAC;CAEV,MAAM,oBAA+B,CAAC;CACtC,OAAO,UAAU,QAAQ;EACvB,MAAM,SAAS,GAAG,UAAU,KAAK,GAAG,EAAE;EAEtC,KAAK,MAAM,WAAW,UAAU;GAC9B,IAAI,CAAC,QAAQ,QAAQ,WAAW,MAAM,GACpC;GAIF,IAAI,CADsB,QAAQ,QAAQ,QAAQ,QAAQ,EACrC,CAAC,CAAC,MAAM,MAAM,WAAW,CAAC,GAC7C;GAGF,QAAQ,UAAU,QAAQ,QAAQ,QAAQ,QAAQ,EAAE;GACpD,kBAAkB,KAAK,OAAO;EAChC;EAEA,IAAI,kBAAkB,QACpB,OAAO;EAGT,UAAU,MAAM;CAClB;CAEA,OAAO,SAAS,QAAQ,YAAY,QAAQ,QAAQ,WAAW,GAAG,CAAC;AACrE;AAEA,IAAa,qBAAb,MAAa,2BAA2B,WAAW;CACjD,OAAgB,KAAK;CAErB,UAAmB,IAAI,sBAAsB;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ACM,KAAK,aAAa,MAAM,CAChC;CACF;AACF"}
|
|
@@ -17,7 +17,7 @@ import { queryReleases } from "../../../util/github/graphql/index.js";
|
|
|
17
17
|
import { GithubReleasesDatasource } from "../github-releases/index.js";
|
|
18
18
|
import { BaseGoDatasource } from "./base.js";
|
|
19
19
|
import { parseGoproxy, parseNoproxy } from "./goproxy-parser.js";
|
|
20
|
-
import { getSourceUrl } from "./common.js";
|
|
20
|
+
import { getSourceUrl, isPublicGoPackage } from "./common.js";
|
|
21
21
|
import { GoDirectDatasource } from "./releases-direct.js";
|
|
22
22
|
import { VersionInfo } from "./schema.js";
|
|
23
23
|
import { isNonEmptyString, isNonEmptyStringAndNotWhitespace, isTruthy } from "@sindresorhus/is";
|
|
@@ -73,7 +73,7 @@ var GoProxyDatasource = class GoProxyDatasource extends Datasource {
|
|
|
73
73
|
async _getReleases(config) {
|
|
74
74
|
const { packageName } = config;
|
|
75
75
|
logger.trace(`goproxy.getReleases(${packageName})`);
|
|
76
|
-
const goproxy = getEnv().GOPROXY ??
|
|
76
|
+
const goproxy = getEnv().GOPROXY ?? `https://proxy.golang.org,direct`;
|
|
77
77
|
if (goproxy === "direct") return this.direct.getReleases(config);
|
|
78
78
|
const proxyList = parseGoproxy(goproxy);
|
|
79
79
|
const noproxy = parseNoproxy();
|
|
@@ -149,6 +149,7 @@ var GoProxyDatasource = class GoProxyDatasource extends Datasource {
|
|
|
149
149
|
return withCache({
|
|
150
150
|
namespace: `datasource-${GoProxyDatasource.id}`,
|
|
151
151
|
key: GoProxyDatasource.getCacheKey(config),
|
|
152
|
+
cacheable: isPublicGoPackage(config.packageName),
|
|
152
153
|
fallback: true
|
|
153
154
|
}, () => this._getReleases(config));
|
|
154
155
|
}
|
|
@@ -189,7 +190,8 @@ var GoProxyDatasource = class GoProxyDatasource extends Datasource {
|
|
|
189
190
|
return withCache({
|
|
190
191
|
namespace: `datasource-${GoProxyDatasource.id}`,
|
|
191
192
|
key: GoProxyDatasource.getVersionedCacheKey(packageName, version),
|
|
192
|
-
ttlMinutes: 144e3
|
|
193
|
+
ttlMinutes: 144e3,
|
|
194
|
+
cacheable: isPublicGoPackage(packageName)
|
|
193
195
|
}, () => this._retrieveGoDirectiveForModule(baseUrl, packageName, version));
|
|
194
196
|
}
|
|
195
197
|
async _retrieveGoDirectiveForModule(baseUrl, packageName, version) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releases-goproxy.js","names":["p.map","HttpError","goVersioning"],"sources":["../../../../lib/modules/datasource/go/releases-goproxy.ts"],"sourcesContent":["import {\n isNonEmptyString,\n isNonEmptyStringAndNotWhitespace,\n isTruthy,\n} from '@sindresorhus/is';\nimport type { ConstraintsFilter } from '../../../config/types.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { ExternalHostError } from '../../../types/errors/external-host-error.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { detectPlatform } from '../../../util/common.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport { filterMap } from '../../../util/filter-map.ts';\nimport { queryReleases } from '../../../util/github/graphql/index.ts';\nimport { GithubHttp } from '../../../util/http/github.ts';\nimport { HttpError } from '../../../util/http/index.ts';\nimport * as p from '../../../util/promises.ts';\nimport { newlineRegex, regEx } from '../../../util/regex.ts';\nimport type { Timestamp } from '../../../util/timestamp.ts';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport {\n joinUrlParts,\n parseUrl,\n trimLeadingSlash,\n trimTrailingSlash,\n} from '../../../util/url.ts';\nimport goVersioning from '../../versioning/go-mod-directive/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport { GithubReleasesDatasource } from '../github-releases/index.ts';\nimport type { GetReleasesConfig, Release, ReleaseResult } from '../types.ts';\nimport { BaseGoDatasource } from './base.ts';\nimport { getSourceUrl } from './common.ts';\nimport { parseGoproxy, parseNoproxy } from './goproxy-parser.ts';\nimport { GoDirectDatasource } from './releases-direct.ts';\nimport { VersionInfo } from './schema.ts';\n\n/** TODO #42566 */\nconst goVersionRegex = regEx(/^\\s*go\\s+(?<version>[^\\s]+)\\s*$/);\n\nconst modRegex = regEx(/^(?<baseMod>.*?)(?:[./]v(?<majorVersion>\\d+))?$/);\n\nconst versionTagRegex = regEx(/^v\\d/);\n\n/**\n * Modules with a major version of v2 or above which have no `go.mod` are reported by a Go proxy with a `+incompatible` suffix, which is absent from the tag they were published as.\n *\n * @see https://go.dev/ref/mod#non-module-compat\n */\nconst incompatibleSuffixRegex = regEx(/\\+incompatible$/);\n\n/**\n * @see https://go.dev/ref/mod#pseudo-versions\n */\nconst pseudoVersionRegex = regEx(\n /v\\d+\\.\\d+\\.\\d+-(?:\\w+\\.)?(?:0\\.)?(?<timestamp>\\d{14})-(?<digest>[a-f0-9]{12})/i,\n);\n\nexport function pseudoVersionToRelease(pseudoVersion: string): Release | null {\n const match = pseudoVersion.match(pseudoVersionRegex)?.groups;\n if (!match) {\n return null;\n }\n\n const { digest: newDigest, timestamp } = match;\n const releaseTimestamp = asTimestamp(timestamp);\n\n return {\n version: pseudoVersion,\n newDigest,\n releaseTimestamp,\n };\n}\n\n/**\n * A Go module which lives in a subdirectory of its repository is tagged with that subdirectory as a prefix, so `github.com/aws/aws-sdk-go-v2/service/s3` publishes `v1.2.3` as the tag `service/s3/v1.2.3`.\n *\n * @see https://go.dev/ref/mod#vcs-version\n *\n * Because we can't tell from the module path alone where the repository ends and the subdirectory begins, we try each candidate prefix - longest first - against the tags we actually found, in the same way as `filterByPrefix` does for direct lookups.\n */\nexport function getTagPrefix(goModule: string, tags: Iterable<string>): string {\n const nameParts = goModule\n .replace(regEx(/\\/v\\d+$/), '')\n .split('/')\n .slice(1);\n const tagNames = [...tags];\n\n while (nameParts.length) {\n const prefix = `${nameParts.join('/')}/`;\n\n const isUsed = tagNames.some(\n (tag) =>\n tag.startsWith(prefix) &&\n versionTagRegex.test(tag.slice(prefix.length)),\n );\n if (isUsed) {\n return prefix;\n }\n\n nameParts.shift();\n }\n\n return '';\n}\n\nexport class GoProxyDatasource extends Datasource {\n static readonly id = 'go-proxy';\n\n constructor() {\n super(GoProxyDatasource.id);\n }\n\n readonly direct = new GoDirectDatasource();\n\n private readonly githubHttp = new GithubHttp(GithubReleasesDatasource.id);\n\n private async _getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n const { packageName } = config;\n logger.trace(`goproxy.getReleases(${packageName})`);\n const goproxy = getEnv().GOPROXY ?? 'https://proxy.golang.org,direct';\n if (goproxy === 'direct') {\n return this.direct.getReleases(config);\n }\n const proxyList = parseGoproxy(goproxy);\n const noproxy = parseNoproxy();\n\n let result: ReleaseResult | null = null;\n let servedByProxy = false;\n\n if (noproxy?.test(packageName)) {\n logger.debug(`Fetching ${packageName} via GONOPROXY match`);\n result = await this.direct.getReleases(config);\n return result;\n }\n\n for (const { url, fallback } of proxyList) {\n try {\n if (url === 'off') {\n break;\n } else if (url === 'direct') {\n result = await this.direct.getReleases(config);\n break;\n }\n\n const res = await this.getVersionsWithInfo(\n url,\n packageName,\n config.constraintsFiltering,\n );\n if (res.releases.length) {\n result = res;\n servedByProxy = true;\n break;\n }\n } catch (err) {\n const potentialHttpError =\n err instanceof ExternalHostError ? err.err : err;\n const statusCode = potentialHttpError?.response?.statusCode;\n const canFallback =\n fallback === '|' ? true : statusCode === 404 || statusCode === 410;\n if (!canFallback) {\n logger.debug(\n { err },\n 'Goproxy error: not falling back to other URLs provided with GOPROXY, rethrowing',\n );\n this.handleGenericErrors(err);\n }\n logger.debug(\n { err },\n 'Goproxy error: trying next URL provided with GOPROXY',\n );\n }\n }\n\n if (result && !result.sourceUrl) {\n try {\n const datasource = await BaseGoDatasource.getDatasource(packageName);\n const sourceUrl = getSourceUrl(datasource);\n if (sourceUrl) {\n result.sourceUrl = sourceUrl;\n }\n } catch (err) {\n logger.trace({ err }, `Can't get datasource for ${packageName}`);\n }\n }\n\n if (result?.sourceUrl && servedByProxy) {\n await this.addGithubReleaseTimestamps(\n packageName,\n result.sourceUrl,\n result.releases,\n );\n }\n\n return result;\n }\n\n /**\n * A Go proxy reports the commit time of the tagged commit as a version's `Time`, which can be much earlier than the point at which that version was released.\n *\n * When the module is hosted on GitHub and the version has a GitHub Release, the Release's publication time is a better indicator of when the version became available.\n */\n async addGithubReleaseTimestamps(\n packageName: string,\n sourceUrl: string,\n releases: Release[],\n ): Promise<void> {\n if (detectPlatform(sourceUrl) !== 'github') {\n return;\n }\n\n const parsedUrl = parseUrl(sourceUrl);\n /* v8 ignore next -- detectPlatform only returns a platform for parseable URLs */\n if (!parsedUrl) {\n return;\n }\n\n const repository = trimTrailingSlash(\n trimLeadingSlash(parsedUrl.pathname),\n ).replace(regEx(/\\.git$/), '');\n\n try {\n const githubReleases = await queryReleases(\n {\n packageName: repository,\n registryUrl: parsedUrl.origin,\n },\n this.githubHttp,\n );\n\n const timestamps = new Map<string, Timestamp>();\n for (const { version, releaseTimestamp } of githubReleases) {\n timestamps.set(version, releaseTimestamp);\n }\n\n const tagPrefix = getTagPrefix(packageName, timestamps.keys());\n for (const release of releases) {\n const version = release.version.replace(incompatibleSuffixRegex, '');\n const releaseTimestamp = timestamps.get(`${tagPrefix}${version}`);\n if (\n releaseTimestamp &&\n (!release.releaseTimestamp ||\n releaseTimestamp > release.releaseTimestamp)\n ) {\n release.releaseTimestamp = releaseTimestamp;\n }\n }\n } catch (err) {\n logger.debug(\n { err, packageName },\n 'Error fetching GitHub Releases for Go module',\n );\n }\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${GoProxyDatasource.id}`,\n key: GoProxyDatasource.getCacheKey(config),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * Avoid ambiguity when serving from case-insensitive file systems.\n *\n * @see https://golang.org/ref/mod#goproxy-protocol\n */\n encodeCase(input: string): string {\n return input.replace(regEx(/(?:[A-Z])/g), (x) => `!${x.toLowerCase()}`);\n }\n\n async listVersions(baseUrl: string, packageName: string): Promise<Release[]> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n 'list',\n );\n const { body } = await this.http.getText(url);\n return filterMap(body.split(newlineRegex), (str) => {\n if (!isNonEmptyStringAndNotWhitespace(str)) {\n return null;\n }\n\n const [version, timestamp] = str.trim().split(regEx(/\\s+/));\n const release: Release = pseudoVersionToRelease(version) ?? { version };\n\n const releaseTimestamp = asTimestamp(timestamp);\n if (releaseTimestamp) {\n release.releaseTimestamp = releaseTimestamp;\n }\n\n return release;\n });\n }\n\n async versionInfo(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<Release> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n `${version}.info`,\n );\n const res = await this.http.getJson(url, VersionInfo);\n\n const result: Release = {\n version: res.body.Version,\n };\n\n const releaseTimestamp = asTimestamp(res.body.Time);\n if (releaseTimestamp) {\n result.releaseTimestamp = releaseTimestamp;\n }\n\n return result;\n }\n\n /**\n * Retrieve the `go` directive for a given Go Module.\n *\n * NOTE that this means the `go` directive, not the `toolchain` directive.\n */\n async retrieveGoDirectiveForModule(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<string | undefined> {\n return withCache(\n {\n namespace: `datasource-${GoProxyDatasource.id}`,\n key: GoProxyDatasource.getVersionedCacheKey(packageName, version),\n // a module's `go.mod` should /never/ change after it's published. If going via the Go Proxy and the Go Checksum Database, a change in this value will result in build failures.\n ttlMinutes: 100 * 24 * 60,\n },\n () => this._retrieveGoDirectiveForModule(baseUrl, packageName, version),\n );\n }\n\n async _retrieveGoDirectiveForModule(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<string | undefined> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n `${version}.mod`,\n );\n const res = await this.http.getText(url);\n\n let goDirective: string | undefined = undefined;\n\n for (const line of res.body.split('\\n')) {\n const goVersionMatches = goVersionRegex.exec(line)?.groups;\n if (goVersionMatches) {\n goDirective = goVersionMatches.version;\n break;\n }\n }\n\n if (!goDirective) {\n return goDirective;\n }\n\n // always return it in full SemVer format, which can then be matched on using `semver` or `semver-coerced`\n const parts = goDirective.split('.');\n if (parts.length === 1) {\n return `${parts[0]}.0.0`;\n }\n if (parts.length === 2) {\n return `${parts[0]}.${parts[1]}.0`;\n }\n return `${parts[0]}.${parts[1]}.${parts[2]}`;\n }\n\n async getLatestVersion(\n baseUrl: string,\n packageName: string,\n ): Promise<{ version: string; sourceUrl?: string } | null> {\n try {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@latest',\n );\n const res = await this.http.getJson(url, VersionInfo);\n const { Version: version, Origin: origin } = res.body;\n // Extract sourceUrl from GOPROXY Origin when present, avoiding go-get to\n // vanity hosts (https://github.com/renovatebot/renovate/discussions/44898)\n const sourceUrl =\n origin?.VCS === 'git' && isNonEmptyString(origin.URL)\n ? origin.URL.replace(regEx(/\\.git$/), '')\n : undefined;\n return { version, sourceUrl };\n } catch (err) {\n logger.trace({ err }, 'Failed to get latest version');\n return null;\n }\n }\n\n async getVersionsWithInfo(\n baseUrl: string,\n packageName: string,\n constraintsFiltering: ConstraintsFilter | undefined,\n ): Promise<ReleaseResult> {\n const isGopkgin = packageName.startsWith('gopkg.in/');\n const majorSuffixSeparator = isGopkgin ? '.' : '/';\n const modParts = packageName.match(modRegex)?.groups;\n /* v8 ignore start: defensive - modRegex matches any non-empty package name, so baseMod is always set */\n const baseMod = modParts?.baseMod ?? packageName;\n /* v8 ignore stop */\n const packageMajor = parseInt(modParts?.majorVersion ?? '0', 10);\n\n const result: ReleaseResult = { releases: [] };\n for (let major = packageMajor; ; major += 1) {\n let pkg = `${baseMod}${majorSuffixSeparator}v${major}`;\n if (!isGopkgin && major < 2) {\n pkg = baseMod;\n major += 1; // v0 and v1 are the same module\n }\n\n let releases: Release[] = [];\n\n try {\n const res = await this.listVersions(baseUrl, pkg);\n\n // Artifactory returns all versions in any major (past and future),\n // so starting from v2, we filter them in order to avoid the infinite loop\n const filteredReleases = res.filter(({ version }) => {\n if (major < 2) {\n return true;\n }\n\n return (\n version.split(regEx(/[^\\d]+/)).find(isTruthy) === major.toString()\n );\n });\n\n releases = await p.map(filteredReleases, async (versionInfo) => {\n const { version, newDigest, releaseTimestamp } = versionInfo;\n\n if (releaseTimestamp) {\n return { version, newDigest, releaseTimestamp };\n }\n\n try {\n return await this.versionInfo(baseUrl, pkg, version);\n } catch (err) {\n logger.trace({ err }, `Can't obtain data from ${baseUrl}`);\n return { version };\n }\n });\n\n if (constraintsFiltering === 'strict') {\n releases = await p.map(releases, async (rel) => {\n try {\n const goDirective = await this.retrieveGoDirectiveForModule(\n baseUrl,\n pkg,\n rel.version,\n );\n if (goDirective) {\n rel.constraints ??= {};\n rel.constraints['%goMod'] ??= [];\n rel.constraints['%goMod'].push(goDirective);\n }\n } catch (err) {\n logger.trace(\n { err },\n `Can't obtain \\`go\\` directive from ${baseUrl}`,\n );\n }\n\n return rel;\n });\n }\n\n result.releases.push(...releases);\n } catch (err) {\n const potentialHttpError =\n err instanceof ExternalHostError ? err.err : err;\n const status = potentialHttpError.response?.statusCode;\n if (\n potentialHttpError instanceof HttpError &&\n (status === 404 || status === 403) &&\n major !== packageMajor\n ) {\n break;\n }\n\n throw err;\n }\n\n const latest = await this.getLatestVersion(baseUrl, pkg);\n if (latest) {\n const { version: latestVersion, sourceUrl } = latest;\n result.tags ??= {};\n result.tags.latest ??= latestVersion;\n if (goVersioning.isGreaterThan(latestVersion, result.tags.latest)) {\n result.tags.latest = latestVersion;\n }\n if (sourceUrl) {\n result.sourceUrl ??= sourceUrl;\n }\n if (!result.releases.length) {\n const releaseFromLatest = pseudoVersionToRelease(latestVersion);\n // v8 ignore else -- needs an empty version list plus a non-pseudo latest\n if (releaseFromLatest) {\n result.releases.push(releaseFromLatest);\n }\n }\n }\n\n if (!releases.length) {\n break;\n }\n }\n\n return result;\n }\n\n static getCacheKey({\n packageName,\n constraintsFiltering,\n }: GetReleasesConfig): string {\n const goproxy = getEnv().GOPROXY;\n const noproxy = parseNoproxy();\n const constraintsFilteringKey =\n constraintsFiltering && constraintsFiltering !== 'none'\n ? `@@${constraintsFiltering}`\n : '';\n // TODO: types (#22198)\n return `${packageName}@@${goproxy}@@${noproxy?.toString()}${constraintsFilteringKey}`;\n }\n\n static getVersionedCacheKey(packageName: string, version: string): string {\n const goproxy = getEnv().GOPROXY;\n const noproxy = parseNoproxy();\n // TODO: types (#22198)\n return `${packageName}@@${version}@@${goproxy}@@${noproxy?.toString()}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,iBAAiB,MAAM,iCAAiC;AAE9D,MAAM,WAAW,MAAM,iDAAiD;AAExE,MAAM,kBAAkB,MAAM,MAAM;;;;;;AAOpC,MAAM,0BAA0B,MAAM,iBAAiB;;;;AAKvD,MAAM,qBAAqB,MACzB,gFACF;AAEA,SAAgB,uBAAuB,eAAuC;CAC5E,MAAM,QAAQ,cAAc,MAAM,kBAAkB,CAAC,EAAE;CACvD,IAAI,CAAC,OACH,OAAO;CAGT,MAAM,EAAE,QAAQ,WAAW,cAAc;CAGzC,OAAO;EACL,SAAS;EACT;EACA,kBALuB,YAAY,SAKpB;CACjB;AACF;;;;;;;;AASA,SAAgB,aAAa,UAAkB,MAAgC;CAC7E,MAAM,YAAY,SACf,QAAQ,MAAM,SAAS,GAAG,EAAE,CAAC,CAC7B,MAAM,GAAG,CAAC,CACV,MAAM,CAAC;CACV,MAAM,WAAW,CAAC,GAAG,IAAI;CAEzB,OAAO,UAAU,QAAQ;EACvB,MAAM,SAAS,GAAG,UAAU,KAAK,GAAG,EAAE;EAOtC,IALe,SAAS,MACrB,QACC,IAAI,WAAW,MAAM,KACrB,gBAAgB,KAAK,IAAI,MAAM,OAAO,MAAM,CAAC,CAExC,GACP,OAAO;EAGT,UAAU,MAAM;CAClB;CAEA,OAAO;AACT;AAEA,IAAa,oBAAb,MAAa,0BAA0B,WAAW;CAChD,OAAgB,KAAK;CAErB,cAAc;E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AO,KAAK,MAAM,GAC9D,OAAO,KAAK,SAAS;IAEvB,IAAI,WACF,OAAO,cAAc;IAEvB,IAAI,CAAC,OAAO,SAAS,QAAQ;KAC3B,MAAM,oBAAoB,uBAAuB,aAAa;;KAE9D,IAAI,mBACF,OAAO,SAAS,KAAK,iBAAiB;IAE1C;GACF;GAEA,IAAI,CAAC,SAAS,QACZ;EAEJ;EAEA,OAAO;CACT;CAEA,OAAO,YAAY,EACjB,aACA,wBAC4B;EAC5B,MAAM,UAAU,OAAO,CAAC,CAAC;EACzB,MAAM,UAAU,aAAa;EAC7B,MAAM,0BACJ,wBAAwB,yBAAyB,SAC7C,KAAK,yBACL;EAEN,OAAO,GAAG,YAAY,IAAI,QAAQ,IAAI,SAAS,SAAS,IAAI;CAC9D;CAEA,OAAO,qBAAqB,aAAqB,SAAyB;EAIxE,OAAO,GAAG,YAAY,IAAI,QAAQ,IAHlB,OAAO,CAAC,CAAC,QAGqB,IAF9B,aAEwC,CAAC,EAAE,SAAS;CACtE;AACF"}
|
|
1
|
+
{"version":3,"file":"releases-goproxy.js","names":["p.map","HttpError","goVersioning"],"sources":["../../../../lib/modules/datasource/go/releases-goproxy.ts"],"sourcesContent":["import {\n isNonEmptyString,\n isNonEmptyStringAndNotWhitespace,\n isTruthy,\n} from '@sindresorhus/is';\nimport type { ConstraintsFilter } from '../../../config/types.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { ExternalHostError } from '../../../types/errors/external-host-error.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { detectPlatform } from '../../../util/common.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport { filterMap } from '../../../util/filter-map.ts';\nimport { queryReleases } from '../../../util/github/graphql/index.ts';\nimport { GithubHttp } from '../../../util/http/github.ts';\nimport { HttpError } from '../../../util/http/index.ts';\nimport * as p from '../../../util/promises.ts';\nimport { newlineRegex, regEx } from '../../../util/regex.ts';\nimport type { Timestamp } from '../../../util/timestamp.ts';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport {\n joinUrlParts,\n parseUrl,\n trimLeadingSlash,\n trimTrailingSlash,\n} from '../../../util/url.ts';\nimport goVersioning from '../../versioning/go-mod-directive/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport { GithubReleasesDatasource } from '../github-releases/index.ts';\nimport type { GetReleasesConfig, Release, ReleaseResult } from '../types.ts';\nimport { BaseGoDatasource } from './base.ts';\nimport { getSourceUrl, isPublicGoPackage, publicGoproxyUrl } from './common.ts';\nimport { parseGoproxy, parseNoproxy } from './goproxy-parser.ts';\nimport { GoDirectDatasource } from './releases-direct.ts';\nimport { VersionInfo } from './schema.ts';\n\n/** TODO #42566 */\nconst goVersionRegex = regEx(/^\\s*go\\s+(?<version>[^\\s]+)\\s*$/);\n\nconst modRegex = regEx(/^(?<baseMod>.*?)(?:[./]v(?<majorVersion>\\d+))?$/);\n\nconst versionTagRegex = regEx(/^v\\d/);\n\n/**\n * Modules with a major version of v2 or above which have no `go.mod` are reported by a Go proxy with a `+incompatible` suffix, which is absent from the tag they were published as.\n *\n * @see https://go.dev/ref/mod#non-module-compat\n */\nconst incompatibleSuffixRegex = regEx(/\\+incompatible$/);\n\n/**\n * @see https://go.dev/ref/mod#pseudo-versions\n */\nconst pseudoVersionRegex = regEx(\n /v\\d+\\.\\d+\\.\\d+-(?:\\w+\\.)?(?:0\\.)?(?<timestamp>\\d{14})-(?<digest>[a-f0-9]{12})/i,\n);\n\nexport function pseudoVersionToRelease(pseudoVersion: string): Release | null {\n const match = pseudoVersion.match(pseudoVersionRegex)?.groups;\n if (!match) {\n return null;\n }\n\n const { digest: newDigest, timestamp } = match;\n const releaseTimestamp = asTimestamp(timestamp);\n\n return {\n version: pseudoVersion,\n newDigest,\n releaseTimestamp,\n };\n}\n\n/**\n * A Go module which lives in a subdirectory of its repository is tagged with that subdirectory as a prefix, so `github.com/aws/aws-sdk-go-v2/service/s3` publishes `v1.2.3` as the tag `service/s3/v1.2.3`.\n *\n * @see https://go.dev/ref/mod#vcs-version\n *\n * Because we can't tell from the module path alone where the repository ends and the subdirectory begins, we try each candidate prefix - longest first - against the tags we actually found, in the same way as `filterByPrefix` does for direct lookups.\n */\nexport function getTagPrefix(goModule: string, tags: Iterable<string>): string {\n const nameParts = goModule\n .replace(regEx(/\\/v\\d+$/), '')\n .split('/')\n .slice(1);\n const tagNames = [...tags];\n\n while (nameParts.length) {\n const prefix = `${nameParts.join('/')}/`;\n\n const isUsed = tagNames.some(\n (tag) =>\n tag.startsWith(prefix) &&\n versionTagRegex.test(tag.slice(prefix.length)),\n );\n if (isUsed) {\n return prefix;\n }\n\n nameParts.shift();\n }\n\n return '';\n}\n\nexport class GoProxyDatasource extends Datasource {\n static readonly id = 'go-proxy';\n\n constructor() {\n super(GoProxyDatasource.id);\n }\n\n readonly direct = new GoDirectDatasource();\n\n private readonly githubHttp = new GithubHttp(GithubReleasesDatasource.id);\n\n private async _getReleases(\n config: GetReleasesConfig,\n ): Promise<ReleaseResult | null> {\n const { packageName } = config;\n logger.trace(`goproxy.getReleases(${packageName})`);\n const goproxy = getEnv().GOPROXY ?? `${publicGoproxyUrl},direct`;\n if (goproxy === 'direct') {\n return this.direct.getReleases(config);\n }\n const proxyList = parseGoproxy(goproxy);\n const noproxy = parseNoproxy();\n\n let result: ReleaseResult | null = null;\n let servedByProxy = false;\n\n if (noproxy?.test(packageName)) {\n logger.debug(`Fetching ${packageName} via GONOPROXY match`);\n result = await this.direct.getReleases(config);\n return result;\n }\n\n for (const { url, fallback } of proxyList) {\n try {\n if (url === 'off') {\n break;\n } else if (url === 'direct') {\n result = await this.direct.getReleases(config);\n break;\n }\n\n const res = await this.getVersionsWithInfo(\n url,\n packageName,\n config.constraintsFiltering,\n );\n if (res.releases.length) {\n result = res;\n servedByProxy = true;\n break;\n }\n } catch (err) {\n const potentialHttpError =\n err instanceof ExternalHostError ? err.err : err;\n const statusCode = potentialHttpError?.response?.statusCode;\n const canFallback =\n fallback === '|' ? true : statusCode === 404 || statusCode === 410;\n if (!canFallback) {\n logger.debug(\n { err },\n 'Goproxy error: not falling back to other URLs provided with GOPROXY, rethrowing',\n );\n this.handleGenericErrors(err);\n }\n logger.debug(\n { err },\n 'Goproxy error: trying next URL provided with GOPROXY',\n );\n }\n }\n\n if (result && !result.sourceUrl) {\n try {\n const datasource = await BaseGoDatasource.getDatasource(packageName);\n const sourceUrl = getSourceUrl(datasource);\n if (sourceUrl) {\n result.sourceUrl = sourceUrl;\n }\n } catch (err) {\n logger.trace({ err }, `Can't get datasource for ${packageName}`);\n }\n }\n\n if (result?.sourceUrl && servedByProxy) {\n await this.addGithubReleaseTimestamps(\n packageName,\n result.sourceUrl,\n result.releases,\n );\n }\n\n return result;\n }\n\n /**\n * A Go proxy reports the commit time of the tagged commit as a version's `Time`, which can be much earlier than the point at which that version was released.\n *\n * When the module is hosted on GitHub and the version has a GitHub Release, the Release's publication time is a better indicator of when the version became available.\n */\n async addGithubReleaseTimestamps(\n packageName: string,\n sourceUrl: string,\n releases: Release[],\n ): Promise<void> {\n if (detectPlatform(sourceUrl) !== 'github') {\n return;\n }\n\n const parsedUrl = parseUrl(sourceUrl);\n /* v8 ignore next -- detectPlatform only returns a platform for parseable URLs */\n if (!parsedUrl) {\n return;\n }\n\n const repository = trimTrailingSlash(\n trimLeadingSlash(parsedUrl.pathname),\n ).replace(regEx(/\\.git$/), '');\n\n try {\n const githubReleases = await queryReleases(\n {\n packageName: repository,\n registryUrl: parsedUrl.origin,\n },\n this.githubHttp,\n );\n\n const timestamps = new Map<string, Timestamp>();\n for (const { version, releaseTimestamp } of githubReleases) {\n timestamps.set(version, releaseTimestamp);\n }\n\n const tagPrefix = getTagPrefix(packageName, timestamps.keys());\n for (const release of releases) {\n const version = release.version.replace(incompatibleSuffixRegex, '');\n const releaseTimestamp = timestamps.get(`${tagPrefix}${version}`);\n if (\n releaseTimestamp &&\n (!release.releaseTimestamp ||\n releaseTimestamp > release.releaseTimestamp)\n ) {\n release.releaseTimestamp = releaseTimestamp;\n }\n }\n } catch (err) {\n logger.debug(\n { err, packageName },\n 'Error fetching GitHub Releases for Go module',\n );\n }\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${GoProxyDatasource.id}`,\n key: GoProxyDatasource.getCacheKey(config),\n cacheable: isPublicGoPackage(config.packageName),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * Avoid ambiguity when serving from case-insensitive file systems.\n *\n * @see https://golang.org/ref/mod#goproxy-protocol\n */\n encodeCase(input: string): string {\n return input.replace(regEx(/(?:[A-Z])/g), (x) => `!${x.toLowerCase()}`);\n }\n\n async listVersions(baseUrl: string, packageName: string): Promise<Release[]> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n 'list',\n );\n const { body } = await this.http.getText(url);\n return filterMap(body.split(newlineRegex), (str) => {\n if (!isNonEmptyStringAndNotWhitespace(str)) {\n return null;\n }\n\n const [version, timestamp] = str.trim().split(regEx(/\\s+/));\n const release: Release = pseudoVersionToRelease(version) ?? { version };\n\n const releaseTimestamp = asTimestamp(timestamp);\n if (releaseTimestamp) {\n release.releaseTimestamp = releaseTimestamp;\n }\n\n return release;\n });\n }\n\n async versionInfo(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<Release> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n `${version}.info`,\n );\n const res = await this.http.getJson(url, VersionInfo);\n\n const result: Release = {\n version: res.body.Version,\n };\n\n const releaseTimestamp = asTimestamp(res.body.Time);\n if (releaseTimestamp) {\n result.releaseTimestamp = releaseTimestamp;\n }\n\n return result;\n }\n\n /**\n * Retrieve the `go` directive for a given Go Module.\n *\n * NOTE that this means the `go` directive, not the `toolchain` directive.\n */\n async retrieveGoDirectiveForModule(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<string | undefined> {\n return withCache(\n {\n namespace: `datasource-${GoProxyDatasource.id}`,\n key: GoProxyDatasource.getVersionedCacheKey(packageName, version),\n // a module's `go.mod` should /never/ change after it's published. If going via the Go Proxy and the Go Checksum Database, a change in this value will result in build failures.\n ttlMinutes: 100 * 24 * 60,\n cacheable: isPublicGoPackage(packageName),\n },\n () => this._retrieveGoDirectiveForModule(baseUrl, packageName, version),\n );\n }\n\n async _retrieveGoDirectiveForModule(\n baseUrl: string,\n packageName: string,\n version: string,\n ): Promise<string | undefined> {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@v',\n `${version}.mod`,\n );\n const res = await this.http.getText(url);\n\n let goDirective: string | undefined = undefined;\n\n for (const line of res.body.split('\\n')) {\n const goVersionMatches = goVersionRegex.exec(line)?.groups;\n if (goVersionMatches) {\n goDirective = goVersionMatches.version;\n break;\n }\n }\n\n if (!goDirective) {\n return goDirective;\n }\n\n // always return it in full SemVer format, which can then be matched on using `semver` or `semver-coerced`\n const parts = goDirective.split('.');\n if (parts.length === 1) {\n return `${parts[0]}.0.0`;\n }\n if (parts.length === 2) {\n return `${parts[0]}.${parts[1]}.0`;\n }\n return `${parts[0]}.${parts[1]}.${parts[2]}`;\n }\n\n async getLatestVersion(\n baseUrl: string,\n packageName: string,\n ): Promise<{ version: string; sourceUrl?: string } | null> {\n try {\n const url = joinUrlParts(\n baseUrl,\n this.encodeCase(packageName),\n '@latest',\n );\n const res = await this.http.getJson(url, VersionInfo);\n const { Version: version, Origin: origin } = res.body;\n // Extract sourceUrl from GOPROXY Origin when present, avoiding go-get to\n // vanity hosts (https://github.com/renovatebot/renovate/discussions/44898)\n const sourceUrl =\n origin?.VCS === 'git' && isNonEmptyString(origin.URL)\n ? origin.URL.replace(regEx(/\\.git$/), '')\n : undefined;\n return { version, sourceUrl };\n } catch (err) {\n logger.trace({ err }, 'Failed to get latest version');\n return null;\n }\n }\n\n async getVersionsWithInfo(\n baseUrl: string,\n packageName: string,\n constraintsFiltering: ConstraintsFilter | undefined,\n ): Promise<ReleaseResult> {\n const isGopkgin = packageName.startsWith('gopkg.in/');\n const majorSuffixSeparator = isGopkgin ? '.' : '/';\n const modParts = packageName.match(modRegex)?.groups;\n /* v8 ignore start: defensive - modRegex matches any non-empty package name, so baseMod is always set */\n const baseMod = modParts?.baseMod ?? packageName;\n /* v8 ignore stop */\n const packageMajor = parseInt(modParts?.majorVersion ?? '0', 10);\n\n const result: ReleaseResult = { releases: [] };\n for (let major = packageMajor; ; major += 1) {\n let pkg = `${baseMod}${majorSuffixSeparator}v${major}`;\n if (!isGopkgin && major < 2) {\n pkg = baseMod;\n major += 1; // v0 and v1 are the same module\n }\n\n let releases: Release[] = [];\n\n try {\n const res = await this.listVersions(baseUrl, pkg);\n\n // Artifactory returns all versions in any major (past and future),\n // so starting from v2, we filter them in order to avoid the infinite loop\n const filteredReleases = res.filter(({ version }) => {\n if (major < 2) {\n return true;\n }\n\n return (\n version.split(regEx(/[^\\d]+/)).find(isTruthy) === major.toString()\n );\n });\n\n releases = await p.map(filteredReleases, async (versionInfo) => {\n const { version, newDigest, releaseTimestamp } = versionInfo;\n\n if (releaseTimestamp) {\n return { version, newDigest, releaseTimestamp };\n }\n\n try {\n return await this.versionInfo(baseUrl, pkg, version);\n } catch (err) {\n logger.trace({ err }, `Can't obtain data from ${baseUrl}`);\n return { version };\n }\n });\n\n if (constraintsFiltering === 'strict') {\n releases = await p.map(releases, async (rel) => {\n try {\n const goDirective = await this.retrieveGoDirectiveForModule(\n baseUrl,\n pkg,\n rel.version,\n );\n if (goDirective) {\n rel.constraints ??= {};\n rel.constraints['%goMod'] ??= [];\n rel.constraints['%goMod'].push(goDirective);\n }\n } catch (err) {\n logger.trace(\n { err },\n `Can't obtain \\`go\\` directive from ${baseUrl}`,\n );\n }\n\n return rel;\n });\n }\n\n result.releases.push(...releases);\n } catch (err) {\n const potentialHttpError =\n err instanceof ExternalHostError ? err.err : err;\n const status = potentialHttpError.response?.statusCode;\n if (\n potentialHttpError instanceof HttpError &&\n (status === 404 || status === 403) &&\n major !== packageMajor\n ) {\n break;\n }\n\n throw err;\n }\n\n const latest = await this.getLatestVersion(baseUrl, pkg);\n if (latest) {\n const { version: latestVersion, sourceUrl } = latest;\n result.tags ??= {};\n result.tags.latest ??= latestVersion;\n if (goVersioning.isGreaterThan(latestVersion, result.tags.latest)) {\n result.tags.latest = latestVersion;\n }\n if (sourceUrl) {\n result.sourceUrl ??= sourceUrl;\n }\n if (!result.releases.length) {\n const releaseFromLatest = pseudoVersionToRelease(latestVersion);\n // v8 ignore else -- needs an empty version list plus a non-pseudo latest\n if (releaseFromLatest) {\n result.releases.push(releaseFromLatest);\n }\n }\n }\n\n if (!releases.length) {\n break;\n }\n }\n\n return result;\n }\n\n static getCacheKey({\n packageName,\n constraintsFiltering,\n }: GetReleasesConfig): string {\n const goproxy = getEnv().GOPROXY;\n const noproxy = parseNoproxy();\n const constraintsFilteringKey =\n constraintsFiltering && constraintsFiltering !== 'none'\n ? `@@${constraintsFiltering}`\n : '';\n // TODO: types (#22198)\n return `${packageName}@@${goproxy}@@${noproxy?.toString()}${constraintsFilteringKey}`;\n }\n\n static getVersionedCacheKey(packageName: string, version: string): string {\n const goproxy = getEnv().GOPROXY;\n const noproxy = parseNoproxy();\n // TODO: types (#22198)\n return `${packageName}@@${version}@@${goproxy}@@${noproxy?.toString()}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,iBAAiB,MAAM,iCAAiC;AAE9D,MAAM,WAAW,MAAM,iDAAiD;AAExE,MAAM,kBAAkB,MAAM,MAAM;;;;;;AAOpC,MAAM,0BAA0B,MAAM,iBAAiB;;;;AAKvD,MAAM,qBAAqB,MACzB,gFACF;AAEA,SAAgB,uBAAuB,eAAuC;CAC5E,MAAM,QAAQ,cAAc,MAAM,kBAAkB,CAAC,EAAE;CACvD,IAAI,CAAC,OACH,OAAO;CAGT,MAAM,EAAE,QAAQ,WAAW,cAAc;CAGzC,OAAO;EACL,SAAS;EACT;EACA,kBALuB,YAAY,SAKpB;CACjB;AACF;;;;;;;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modules/datasource/java-version/schema.ts
|
|
4
4
|
const AdoptiumJavaVersion = z.object({ semver: z.string() });
|
|
5
5
|
const AdoptiumJavaResponse = z.object({ versions: LooseArray(AdoptiumJavaVersion).optional() });
|
|
6
|
+
z.object({ available_lts_releases: z.array(z.number()) });
|
|
6
7
|
//#endregion
|
|
7
8
|
export { AdoptiumJavaResponse, AdoptiumJavaVersion };
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/java-version/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { LooseArray } from '../../../util/schema-utils/index.ts';\n\nexport const AdoptiumJavaVersion = z.object({\n semver: z.string(),\n});\n\nexport const AdoptiumJavaResponse = z.object({\n versions: LooseArray(AdoptiumJavaVersion).optional(),\n});\n\nexport type AdoptiumJavaResponse = z.infer<typeof AdoptiumJavaResponse>;\n"],"mappings":";;;AAGA,MAAa,sBAAsB,EAAE,OAAO,EAC1C,QAAQ,EAAE,OAAO,EACnB,CAAC;AAED,MAAa,uBAAuB,EAAE,OAAO,EAC3C,UAAU,WAAW,mBAAmB,CAAC,CAAC,SAAS,EACrD,CAAC"}
|
|
1
|
+
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/java-version/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { LooseArray } from '../../../util/schema-utils/index.ts';\n\nexport const AdoptiumJavaVersion = z.object({\n semver: z.string(),\n});\n\nexport const AdoptiumJavaResponse = z.object({\n versions: LooseArray(AdoptiumJavaVersion).optional(),\n});\n\nexport type AdoptiumJavaResponse = z.infer<typeof AdoptiumJavaResponse>;\n\nexport const AdoptiumAvailableReleases = z.object({\n available_lts_releases: z.array(z.number()),\n});\n\nexport type AdoptiumAvailableReleases = z.infer<\n typeof AdoptiumAvailableReleases\n>;\n"],"mappings":";;;AAGA,MAAa,sBAAsB,EAAE,OAAO,EAC1C,QAAQ,EAAE,OAAO,EACnB,CAAC;AAED,MAAa,uBAAuB,EAAE,OAAO,EAC3C,UAAU,WAAW,mBAAmB,CAAC,CAAC,SAAS,EACrD,CAAC;AAIwC,EAAE,OAAO,EAChD,wBAAwB,EAAE,MAAM,EAAE,OAAO,CAAC,EAC5C,CAAC"}
|
|
@@ -71,7 +71,7 @@ hashMap.set("maven", "c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe
|
|
|
71
71
|
hashMap.set("maven-wrapper", "6e53b6e4abf1d20b75094c7a70d66b4a5ac39954f009aa401f5e55dada8be4d0");
|
|
72
72
|
hashMap.set("meteor", "4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776");
|
|
73
73
|
hashMap.set("mint", "248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e");
|
|
74
|
-
hashMap.set("mise", "
|
|
74
|
+
hashMap.set("mise", "10f20b75f727142938939b2b3cd7e0f77c3a37567f2b8b7ef78cef9a4908936e");
|
|
75
75
|
hashMap.set("mix", "0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872");
|
|
76
76
|
hashMap.set("nix", "0f80f0b81f2197a7e588be5c115a32a826fc184593f4e879f7b60fafd97a977e");
|
|
77
77
|
hashMap.set("nodenv", "ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','a52394a36ac5517f7330473c31d93aa05b2ce607c5e951b48f25a4693cd20a81');\nhashMap.set('ansible-galaxy','0a264d6be73953d801510fdeff271e4071c274339569c6dab4e2a128eaf4869f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','ca7c2342c04489253cd8f38d294a4c1428010115c2be22b3e0812dacf9881244');\nhashMap.set('argocd','cff9cd22257bc460ae4b9936570bf0ed5585f280a55d26629deaeeb0bfee8eb5');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','6bf7782e8a02fc87dc5d84aab59e517c09df51fd23cf57805e62207dbd5efdb5');\nhashMap.set('batect','375d39b432013bedb1330cf40a2199dd822751b28578214f219e7bab98594b8d');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','ef00591c6f09069550ef97ff7ff5e387b9dd3df51cdecc9ef941169b19315396');\nhashMap.set('bazel-module','9fbba0339f9f7785d52ab85c5f0f6385003093c063483c13feccba13ae438bef');\nhashMap.set('bazelisk','770f75a746dc6ba90c518788d5987d7df4243ef9eee122d1bb0556a93d6e1b11');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','684f46dd3cef4d30f9e4ae97c384a38d032ebf3d0bfe9b471ab1772c7b26827a');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','c8b4b76b89a2357cacdc34adfab00dcde862103121386552d17cca5761b533ec');\nhashMap.set('cake','9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad');\nhashMap.set('cargo','63721e2683b30cffc5ba87c75f919dc61a555f7741fa479f7446ef98c0ae9d5d');\nhashMap.set('cdnurl','9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c');\nhashMap.set('cocoapods','f832e2beef885bb3fd697ed9bb3e8cd742926bfec37ff41212edd2dbb4edb3ba');\nhashMap.set('composer','74a802074ed550801b7536d36ed9880e3a95ae8f340c590446c017fb3ef36de9');\nhashMap.set('conan','8d46e9a30ae628e26118aea10a98d1b846f7c5d96d51ce24693437d555f6d125');\nhashMap.set('copier','10ae4d7f8ff35faf3a3f9f25bf4c969ea960e19aaf8c012aee11f93f4d10533e');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','917fdbfbad58fd7f57933646a760d91768368df563ce5eaf34a2bba165164a12');\nhashMap.set('deps-edn','7b6ac92be04b44fdf1da8755550a6417bb294908158119c8fff10adeb05048d2');\nhashMap.set('devbox','a40050cc61bd9b5d500ec111abb17bb15d5f82ab5b7699f66f628307ba8382c9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','a9c27711356fbda8dd14f21e046936e1e43f18c5528325b468d89937f76fe1e7');\nhashMap.set('dockerfile','a83e9e93f31576697d45fd60a0b44f7d14a610752e695a62507624ab2dbb2162');\nhashMap.set('droneci','e2039bb37c2d63c53027b188d1f0faa7c8923dcbfe6cf3851fba8d4e9f43a358');\nhashMap.set('fleet','4942d52e82f35c41e2d46cf76f426e2d91b350338cfc0bbcb97e8aaae2a1ac0b');\nhashMap.set('flux','c67562b40cc7cd5e22b4c1ac642fc92ef46db79da9cea174e8aefcc20dde9811');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','df8bb92b2906d8cddda2d4b302ee503f8002e3554d32d74cef2f584fe891f38f');\nhashMap.set('github-actions','74bd499fe795d957113e26765b9d36dde5b16d7f5c58197eb8ab25826afe55f6');\nhashMap.set('gitlabci','a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98295d6e672');\nhashMap.set('gitlabci-include','8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','5e9b9f5f914afe5ed7b526c06c65111e3716d2dea9b0cbe7907bbc96db1064a3');\nhashMap.set('gomod','fa22f3f0b0af7b7f769cf3541bd38fdf67365965ce6c8a470f88155958991c24');\nhashMap.set('gradle','9e3ff52ce4ad2555929acdd4d32c417c4ef8714c23a92f2893ecc580fa4d6064');\nhashMap.set('gradle-wrapper','73ba30c34955fab7737454b5cff9aca6d1b5607d53c17c9e13d8ad96f6eaae87');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','7ee9dace4c036dfe113c0c0e46369d8b83a739caa831660142ca98d3236a180a');\nhashMap.set('helm-values','01069e887d4f3b55ca62a3c0dc66d8620264e1426207be9eb240a10c1ad5e412');\nhashMap.set('helmfile','163baefbe5323bb5e671a73b72eaaecfbd03b798c70fd4117e191e143f2f7a4f');\nhashMap.set('helmsman','951deeb3355da751ef39c9e932b26ea749450e32e75759e4b5fc29359e100b37');\nhashMap.set('helmv3','4a3cf47072978eb131d70cd13f3d0bbd4408b0290be2a798a4cbf6103189269b');\nhashMap.set('hermit','0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367');\nhashMap.set('html','81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f');\nhashMap.set('jenkins','7bfb09418a132e052579196633bac78ac947cf93f1e70748ea1b3da929874b87');\nhashMap.set('jsonnet-bundler','4cedeb0394e5c38361d1868ff45b4f34747ab8c492378b6e63dcaf1f4f3c024d');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','eb9d6d6aa65a738d6c658a6c9a73a9e86761360a608cf0ba8000d6c554dbc0c7');\nhashMap.set('leiningen','a7295160ce901e08e12be75cb3aaf6b9a199de811eb60b618feb773f7c552bba');\nhashMap.set('maven','c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d');\nhashMap.set('maven-wrapper','6e53b6e4abf1d20b75094c7a70d66b4a5ac39954f009aa401f5e55dada8be4d0');\nhashMap.set('meteor','4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','96709a29a967c829b527f38e3d98cdb9731310f2fb52a6d46fa47397d2cf8440');\nhashMap.set('mix','0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872');\nhashMap.set('nix','0f80f0b81f2197a7e588be5c115a32a826fc184593f4e879f7b60fafd97a977e');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','30c78bc1c29eeecbdedb4eacc52bd93eedfb07279fd385f893193dcac6196466');\nhashMap.set('nuget','d6acdee647e7e0f3568c46154a2e32c425e44b1044634919530e234035eddeff');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','52450676f8b0e05134b3e8947b832195ef40bcaec1ce43d71351a2f797b80d75');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','7e418b8bdaeed38c1372eb19e0ae1c64999000e128d8754e37368638037b4c5c');\nhashMap.set('pip_requirements','bf3a407f72abf711230247bef94ba5dc84c08a35107b0f017912fad66afa716a');\nhashMap.set('pip_setup','df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79');\nhashMap.set('pipenv','cd974eadd649ba8c9c2e3c7b564a49c8bb2ce95d6df043a7e942364f574c7613');\nhashMap.set('pixi','83f94ec64144ce2adad0901844ab1e9c1636bb5c77bd6578b22b98ab401d34b4');\nhashMap.set('poetry','b2b917c200d25e01a3a198deb3bf33353535f27430142111cfab816c03bb966d');\nhashMap.set('pre-commit','a8fa968d6308947c8a6eedd799ea449e548e918971acdc250b627e86a446dc23');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','8e7c65dfd1999de4f7c44392e949a4d8f4701eb86df59d550e4657feb06b1872');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d');\nhashMap.set('renovate-config','ca60beee2e3b871ea1216fa9df9a501f7ed355fe7da29e12509e56a124a78e69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','2bb0c98d231bbd6c9043127bfc566a954e7e04fc8654b119c14438a63371e4a7');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25df97ed9745');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','60dd75bb53ace31217211100d622fdb65068c6162758b6ae7103a6ce8bdc9f90');\nhashMap.set('swift','5ebd875ee7a541b4725f6263789ea9a7c77a4b7c40b2119f894e67b588cfa672');\nhashMap.set('tekton','33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9');\nhashMap.set('terraform','d1d5e54517e6075035b4c03de3419f09008c661587ad16a7d8bada4150a92f6f');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','31247d37bc80aae17039bfa21bd989c5717730c5ef10cf2a6f09841576d012ec');\nhashMap.set('travis','04c94f72622003195c8ea8147c8fbd93003f444ec807ce33f2ada2384282db83');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','7db907b3b77ef5f3465f3c4339fbab56bbcdfd1bf34b3d33e4c178d2e07e23e7');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','20be5247fdc164173871a051acb0527da017d0c155c653d7563601f55e7b3ff5');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,uBAAsB,kEAAkE;AACpG,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,eAAc,kEAAkE;AAC5F,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;A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Q,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,qBAAoB,kEAAkE;AAClG,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,sBAAqB,kEAAkE;AACnG,QAAQ,IAAI,iBAAgB,kEAAkE;AAC9F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE"}
|
|
1
|
+
{"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','a52394a36ac5517f7330473c31d93aa05b2ce607c5e951b48f25a4693cd20a81');\nhashMap.set('ansible-galaxy','0a264d6be73953d801510fdeff271e4071c274339569c6dab4e2a128eaf4869f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','ca7c2342c04489253cd8f38d294a4c1428010115c2be22b3e0812dacf9881244');\nhashMap.set('argocd','cff9cd22257bc460ae4b9936570bf0ed5585f280a55d26629deaeeb0bfee8eb5');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','6bf7782e8a02fc87dc5d84aab59e517c09df51fd23cf57805e62207dbd5efdb5');\nhashMap.set('batect','375d39b432013bedb1330cf40a2199dd822751b28578214f219e7bab98594b8d');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','ef00591c6f09069550ef97ff7ff5e387b9dd3df51cdecc9ef941169b19315396');\nhashMap.set('bazel-module','9fbba0339f9f7785d52ab85c5f0f6385003093c063483c13feccba13ae438bef');\nhashMap.set('bazelisk','770f75a746dc6ba90c518788d5987d7df4243ef9eee122d1bb0556a93d6e1b11');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','684f46dd3cef4d30f9e4ae97c384a38d032ebf3d0bfe9b471ab1772c7b26827a');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','c8b4b76b89a2357cacdc34adfab00dcde862103121386552d17cca5761b533ec');\nhashMap.set('cake','9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad');\nhashMap.set('cargo','63721e2683b30cffc5ba87c75f919dc61a555f7741fa479f7446ef98c0ae9d5d');\nhashMap.set('cdnurl','9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c');\nhashMap.set('cocoapods','f832e2beef885bb3fd697ed9bb3e8cd742926bfec37ff41212edd2dbb4edb3ba');\nhashMap.set('composer','74a802074ed550801b7536d36ed9880e3a95ae8f340c590446c017fb3ef36de9');\nhashMap.set('conan','8d46e9a30ae628e26118aea10a98d1b846f7c5d96d51ce24693437d555f6d125');\nhashMap.set('copier','10ae4d7f8ff35faf3a3f9f25bf4c969ea960e19aaf8c012aee11f93f4d10533e');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','917fdbfbad58fd7f57933646a760d91768368df563ce5eaf34a2bba165164a12');\nhashMap.set('deps-edn','7b6ac92be04b44fdf1da8755550a6417bb294908158119c8fff10adeb05048d2');\nhashMap.set('devbox','a40050cc61bd9b5d500ec111abb17bb15d5f82ab5b7699f66f628307ba8382c9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','a9c27711356fbda8dd14f21e046936e1e43f18c5528325b468d89937f76fe1e7');\nhashMap.set('dockerfile','a83e9e93f31576697d45fd60a0b44f7d14a610752e695a62507624ab2dbb2162');\nhashMap.set('droneci','e2039bb37c2d63c53027b188d1f0faa7c8923dcbfe6cf3851fba8d4e9f43a358');\nhashMap.set('fleet','4942d52e82f35c41e2d46cf76f426e2d91b350338cfc0bbcb97e8aaae2a1ac0b');\nhashMap.set('flux','c67562b40cc7cd5e22b4c1ac642fc92ef46db79da9cea174e8aefcc20dde9811');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','df8bb92b2906d8cddda2d4b302ee503f8002e3554d32d74cef2f584fe891f38f');\nhashMap.set('github-actions','74bd499fe795d957113e26765b9d36dde5b16d7f5c58197eb8ab25826afe55f6');\nhashMap.set('gitlabci','a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98295d6e672');\nhashMap.set('gitlabci-include','8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','5e9b9f5f914afe5ed7b526c06c65111e3716d2dea9b0cbe7907bbc96db1064a3');\nhashMap.set('gomod','fa22f3f0b0af7b7f769cf3541bd38fdf67365965ce6c8a470f88155958991c24');\nhashMap.set('gradle','9e3ff52ce4ad2555929acdd4d32c417c4ef8714c23a92f2893ecc580fa4d6064');\nhashMap.set('gradle-wrapper','73ba30c34955fab7737454b5cff9aca6d1b5607d53c17c9e13d8ad96f6eaae87');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','7ee9dace4c036dfe113c0c0e46369d8b83a739caa831660142ca98d3236a180a');\nhashMap.set('helm-values','01069e887d4f3b55ca62a3c0dc66d8620264e1426207be9eb240a10c1ad5e412');\nhashMap.set('helmfile','163baefbe5323bb5e671a73b72eaaecfbd03b798c70fd4117e191e143f2f7a4f');\nhashMap.set('helmsman','951deeb3355da751ef39c9e932b26ea749450e32e75759e4b5fc29359e100b37');\nhashMap.set('helmv3','4a3cf47072978eb131d70cd13f3d0bbd4408b0290be2a798a4cbf6103189269b');\nhashMap.set('hermit','0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367');\nhashMap.set('html','81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f');\nhashMap.set('jenkins','7bfb09418a132e052579196633bac78ac947cf93f1e70748ea1b3da929874b87');\nhashMap.set('jsonnet-bundler','4cedeb0394e5c38361d1868ff45b4f34747ab8c492378b6e63dcaf1f4f3c024d');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','eb9d6d6aa65a738d6c658a6c9a73a9e86761360a608cf0ba8000d6c554dbc0c7');\nhashMap.set('leiningen','a7295160ce901e08e12be75cb3aaf6b9a199de811eb60b618feb773f7c552bba');\nhashMap.set('maven','c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d');\nhashMap.set('maven-wrapper','6e53b6e4abf1d20b75094c7a70d66b4a5ac39954f009aa401f5e55dada8be4d0');\nhashMap.set('meteor','4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','10f20b75f727142938939b2b3cd7e0f77c3a37567f2b8b7ef78cef9a4908936e');\nhashMap.set('mix','0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872');\nhashMap.set('nix','0f80f0b81f2197a7e588be5c115a32a826fc184593f4e879f7b60fafd97a977e');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','30c78bc1c29eeecbdedb4eacc52bd93eedfb07279fd385f893193dcac6196466');\nhashMap.set('nuget','d6acdee647e7e0f3568c46154a2e32c425e44b1044634919530e234035eddeff');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','52450676f8b0e05134b3e8947b832195ef40bcaec1ce43d71351a2f797b80d75');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','7e418b8bdaeed38c1372eb19e0ae1c64999000e128d8754e37368638037b4c5c');\nhashMap.set('pip_requirements','bf3a407f72abf711230247bef94ba5dc84c08a35107b0f017912fad66afa716a');\nhashMap.set('pip_setup','df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79');\nhashMap.set('pipenv','cd974eadd649ba8c9c2e3c7b564a49c8bb2ce95d6df043a7e942364f574c7613');\nhashMap.set('pixi','83f94ec64144ce2adad0901844ab1e9c1636bb5c77bd6578b22b98ab401d34b4');\nhashMap.set('poetry','b2b917c200d25e01a3a198deb3bf33353535f27430142111cfab816c03bb966d');\nhashMap.set('pre-commit','a8fa968d6308947c8a6eedd799ea449e548e918971acdc250b627e86a446dc23');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','8e7c65dfd1999de4f7c44392e949a4d8f4701eb86df59d550e4657feb06b1872');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d');\nhashMap.set('renovate-config','ca60beee2e3b871ea1216fa9df9a501f7ed355fe7da29e12509e56a124a78e69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','2bb0c98d231bbd6c9043127bfc566a954e7e04fc8654b119c14438a63371e4a7');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25df97ed9745');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','60dd75bb53ace31217211100d622fdb65068c6162758b6ae7103a6ce8bdc9f90');\nhashMap.set('swift','5ebd875ee7a541b4725f6263789ea9a7c77a4b7c40b2119f894e67b588cfa672');\nhashMap.set('tekton','33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9');\nhashMap.set('terraform','d1d5e54517e6075035b4c03de3419f09008c661587ad16a7d8bada4150a92f6f');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','31247d37bc80aae17039bfa21bd989c5717730c5ef10cf2a6f09841576d012ec');\nhashMap.set('travis','04c94f72622003195c8ea8147c8fbd93003f444ec807ce33f2ada2384282db83');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','7db907b3b77ef5f3465f3c4339fbab56bbcdfd1bf34b3d33e4c178d2e07e23e7');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','20be5247fdc164173871a051acb0527da017d0c155c653d7563601f55e7b3ff5');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,uBAAsB,kEAAkE;AACpG,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,eAAc,kEAAkE;AAC5F,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF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IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,qBAAoB,kEAAkE;AAClG,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,sBAAqB,kEAAkE;AACnG,QAAQ,IAAI,iBAAgB,kEAAkE;AAC9F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE"}
|
|
@@ -3,7 +3,7 @@ import { regEx } from "../../../util/regex.js";
|
|
|
3
3
|
import { GlobalConfig } from "../../../config/global.js";
|
|
4
4
|
import { logger } from "../../../logger/index.js";
|
|
5
5
|
import { find } from "../../../util/host-rules.js";
|
|
6
|
-
import { readLocalFile } from "../../../util/fs/index.js";
|
|
6
|
+
import { readLocalFile, writeLocalFile } from "../../../util/fs/index.js";
|
|
7
7
|
import { api } from "../../versioning/semver/index.js";
|
|
8
8
|
import { exec } from "../../../util/exec/index.js";
|
|
9
9
|
import { resolveToolConstraint } from "../util.js";
|
|
@@ -94,10 +94,10 @@ async function getMiseLockToolConstraints(config, miseConstraint, safeMode = fal
|
|
|
94
94
|
* Updates mise lock files when dependencies are updated.
|
|
95
95
|
* Runs `mise lock` for lock file maintenance or `mise lock <tools>` for targeted updates.
|
|
96
96
|
*/
|
|
97
|
-
async function updateArtifacts({ packageFileName, updatedDeps, config }) {
|
|
97
|
+
async function updateArtifacts({ packageFileName, updatedDeps, newPackageFileContent, newLockFileContent, config }) {
|
|
98
98
|
const lockFileName = getLockFileName(packageFileName);
|
|
99
|
-
const
|
|
100
|
-
if (!
|
|
99
|
+
const originalLockFileContent = await readLocalFile(lockFileName, "utf8");
|
|
100
|
+
if (!(newLockFileContent ?? originalLockFileContent)) {
|
|
101
101
|
logger.debug({ lockFileName }, "No mise lock file found");
|
|
102
102
|
return null;
|
|
103
103
|
}
|
|
@@ -141,14 +141,16 @@ async function updateArtifacts({ packageFileName, updatedDeps, config }) {
|
|
|
141
141
|
};
|
|
142
142
|
const commands = safeMode ? [lockCmd] : [`mise trust ${quote(upath.basename(packageFileName))}`, lockCmd];
|
|
143
143
|
try {
|
|
144
|
+
await writeLocalFile(packageFileName, newPackageFileContent);
|
|
145
|
+
if (newLockFileContent) await writeLocalFile(lockFileName, newLockFileContent);
|
|
144
146
|
await exec(commands, execOptions);
|
|
145
|
-
const
|
|
146
|
-
if (!
|
|
147
|
+
const refreshedLockFileContent = await readLocalFile(lockFileName, "utf8");
|
|
148
|
+
if (!refreshedLockFileContent || originalLockFileContent === refreshedLockFileContent) return null;
|
|
147
149
|
logger.debug({ lockFileName }, "Returning updated mise lock file");
|
|
148
150
|
return [{ file: {
|
|
149
151
|
type: "addition",
|
|
150
152
|
path: lockFileName,
|
|
151
|
-
contents:
|
|
153
|
+
contents: refreshedLockFileContent
|
|
152
154
|
} }];
|
|
153
155
|
} catch (err) {
|
|
154
156
|
// istanbul ignore if: not worth testing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.js","names":["miseVersioning","hostRules.find"],"sources":["../../../../lib/modules/manager/mise/artifacts.ts"],"sourcesContent":["import { isNonEmptyStringAndNotWhitespace, isString } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport upath from 'upath';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { findGithubToken } from '../../../util/check-token.ts';\nimport { exec } from '../../../util/exec/index.ts';\nimport type {\n ExecOptions,\n ExtraEnv,\n ToolConstraint,\n} from '../../../util/exec/types.ts';\nimport { readLocalFile } from '../../../util/fs/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { api as miseVersioning } from '../../versioning/semver/index.ts';\nimport type {\n ToolConstraintsConfig,\n UpdateArtifact,\n UpdateArtifactsResult,\n} from '../types.ts';\nimport { resolveToolConstraint } from '../util.ts';\nimport { getConfigType, getLockFileName } from './lockfile.ts';\n\n/**\n * First mise release that supports the features this manager relies on:\n * `MISE_SAFE=1` safe mode (a hard boundary against project config executing\n * code during `mise lock`) and `mise lock --bump` (advancing fuzzy selectors).\n *\n * Safe mode (jdx/mise#11146) and lockfile bumping (jdx/mise#11145) merged after\n * v2026.7.11 and first shipped in v2026.7.12.\n *\n * @see https://github.com/jdx/mise/pull/11146\n * @see https://github.com/jdx/mise/pull/11145\n * @see https://mise.jdx.dev/configuration/settings.html#safe\n */\nconst MISE_SAFE_MODE_MIN_VERSION = '2026.7.12';\n\n/**\n * Detects the mise version that will actually run, by executing `mise version`.\n * `mise version` only prints the binary's version — it does not load or execute\n * project configuration — so it is safe to run even without allowlisting.\n *\n * Output looks like `2026.7.12 macos-arm64 (2026-07-21)`; we take the leading\n * `major.minor.patch`. Returns `null` if the probe fails or cannot be parsed,\n * in which case callers fall back to the conservative (pre-safe-mode) behavior.\n */\nasync function detectMiseVersion(\n execOptions: ExecOptions,\n): Promise<string | null> {\n try {\n const { stdout } = await exec('mise version', execOptions);\n const version = regEx(/\\d+\\.\\d+\\.\\d+/).exec(stdout)?.[0];\n if (version && miseVersioning.isVersion(version)) {\n return version;\n }\n logger.debug({ stdout }, 'Could not parse mise version output');\n return null;\n } catch (err) {\n logger.debug({ err }, 'Failed to determine mise version');\n return null;\n }\n}\n\n/** True when `version` is at or above the safe-mode / `--bump` release. */\nfunction versionSupportsSafeFeatures(version: string | null): boolean {\n return (\n !!version &&\n (miseVersioning.equals(version, MISE_SAFE_MODE_MIN_VERSION) ||\n miseVersioning.isGreaterThan(version, MISE_SAFE_MODE_MIN_VERSION))\n );\n}\n\n/**\n * Resolver tools that mise may invoke while running `mise lock`, for instance to convert an inexact version like `1` against the npm registry.\n *\n * NOTE: this will install all relevant tools, regardless of what the given mise configuration uses.\n *\n * In safe mode these are unnecessary: npm version listing uses mise's built-in\n * registry HTTP client and go runs with `GOTOOLCHAIN=local`, so `mise lock`\n * resolves versions over HTTP without shelling out to node/npm/ruby.\n *\n * @see https://mise.jdx.dev/dev-tools/backends/npm.html\n * @see https://mise.jdx.dev/dev-tools/backends/go.html\n * @see https://mise.jdx.dev/dev-tools/backends/gem.html\n */\nasync function getMiseLockToolConstraints(\n config: ToolConstraintsConfig,\n miseConstraint: string | undefined,\n safeMode = false,\n): Promise<ToolConstraint[]> {\n const miseToolConstraint: ToolConstraint = {\n toolName: 'mise',\n constraint: miseConstraint,\n };\n if (safeMode) {\n return [miseToolConstraint];\n }\n return [\n miseToolConstraint,\n {\n toolName: 'node',\n constraint: await resolveToolConstraint(config, 'node'),\n },\n {\n toolName: 'npm',\n constraint: await resolveToolConstraint(config, 'npm'),\n },\n {\n // the golang tool is constrained by the `go` constraint\n toolName: 'golang',\n constraint: await resolveToolConstraint(config, 'go'),\n },\n {\n toolName: 'ruby',\n constraint: await resolveToolConstraint(config, 'ruby'),\n },\n ];\n}\n\n/**\n * Updates mise lock files when dependencies are updated.\n * Runs `mise lock` for lock file maintenance or `mise lock <tools>` for targeted updates.\n */\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n const lockFileName = getLockFileName(packageFileName);\n const existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n logger.debug({ lockFileName }, 'No mise lock file found');\n return null;\n }\n\n // `mise lock` normally executes the project's mise config, so it requires\n // `allowedUnsafeExecutions`. When the mise that will run supports safe mode,\n // we instead run with `MISE_SAFE=1`, which is a hard boundary against the\n // config executing code — so the allowlist is not required on that path.\n const allowlist = GlobalConfig.get('allowedUnsafeExecutions');\n const miseAllowlisted = allowlist.includes('mise');\n\n // The mise version is needed to decide safe mode (untrusted path) and\n // `mise lock --bump` (lock file maintenance). Detect it at runtime rather\n // than requiring a pinned `constraints.mise`. Skip the probe when it cannot\n // change the outcome: an allowlisted, non-maintenance run behaves the same\n // regardless of version.\n const miseConstraint = await resolveToolConstraint(config, 'mise');\n let miseSupportsSafeFeatures = false;\n if (!miseAllowlisted || config.isLockFileMaintenance) {\n const miseVersion = await detectMiseVersion({\n cwdFile: packageFileName,\n toolConstraints: [{ toolName: 'mise', constraint: miseConstraint }],\n docker: {},\n });\n miseSupportsSafeFeatures = versionSupportsSafeFeatures(miseVersion);\n }\n\n const safeMode = !miseAllowlisted && miseSupportsSafeFeatures;\n if (!miseAllowlisted && !safeMode) {\n logger.once.warn(\n { safeModeMinVersion: MISE_SAFE_MODE_MIN_VERSION },\n '`mise lock` requires either `mise` in `allowedUnsafeExecutions`, or a mise version that supports safe mode',\n );\n return null;\n }\n\n const { isLocal, env } = getConfigType(packageFileName);\n const localFlag = isLocal ? ' --local' : '';\n\n let lockCmd: string;\n if (config.isLockFileMaintenance) {\n // Lock file maintenance means \"update to the latest versions\". Plain\n // `mise lock` only refreshes metadata for already-locked versions, so use\n // `mise lock --bump` to also advance fuzzy selectors (e.g. `node = \"22\"`)\n // to the latest matching version. `--bump` requires a new enough mise, so\n // fall back to a plain refresh when the version cannot be guaranteed.\n const bumpFlag = miseSupportsSafeFeatures ? ' --bump' : '';\n lockCmd = `mise lock${localFlag}${bumpFlag}`;\n } else {\n const tools = updatedDeps\n .map(({ depName }) => depName)\n .filter(isNonEmptyStringAndNotWhitespace)\n .map(quote)\n .join(' ');\n lockCmd = tools\n ? `mise lock${localFlag} ${tools}`\n : `mise lock${localFlag}`;\n }\n\n const extraEnv: ExtraEnv = {};\n if (env) {\n extraEnv.MISE_ENV = env;\n }\n if (safeMode) {\n extraEnv.MISE_SAFE = '1';\n }\n const token = findGithubToken(\n hostRules.find({\n hostType: 'github',\n url: 'https://api.github.com/',\n }),\n );\n if (token) {\n extraEnv.GITHUB_TOKEN = token;\n }\n\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n extraEnv,\n toolConstraints: await getMiseLockToolConstraints(\n config,\n miseConstraint,\n safeMode,\n ),\n docker: {},\n };\n\n // `mise trust` is only needed on the allowlisted path. In safe mode mise\n // loads untrusted config without a trust prompt (the config is inert — it\n // can neither execute code nor inject environment), so the trust step is\n // unnecessary and is skipped.\n const commands = safeMode\n ? [lockCmd]\n : [`mise trust ${quote(upath.basename(packageFileName))}`, lockCmd];\n\n try {\n await exec(commands, execOptions);\n const newLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!newLockFileContent || existingLockFileContent === newLockFileContent) {\n return null;\n }\n\n logger.debug({ lockFileName }, 'Returning updated mise lock file');\n return [\n {\n file: {\n type: 'addition',\n path: lockFileName,\n contents: newLockFileContent,\n },\n },\n ];\n } catch (err) {\n // istanbul ignore if: not worth testing\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n\n const errorOutput = [err.stdout, err.stderr, err.message]\n .filter(isString)\n .join('\\n');\n\n logger.warn({ err, lockFileName }, 'Error updating mise lock file');\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: errorOutput,\n },\n },\n ];\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,6BAA6B;;;;;;;;;;AAWnC,eAA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M;GACN,MAAM;GACN,UAAU;EACZ,EACF,CACF;CACF,SAAS,KAAK;;EAEZ,IAAI,IAAI,YAAA,mBACN,MAAM;EAGR,MAAM,cAAc;GAAC,IAAI;GAAQ,IAAI;GAAQ,IAAI;EAAO,CAAC,CACtD,OAAO,QAAQ,CAAC,CAChB,KAAK,IAAI;EAEZ,OAAO,KAAK;GAAE;GAAK;EAAa,GAAG,+BAA+B;EAClE,OAAO,CACL,EACE,eAAe;GACb,UAAU;GACV,QAAQ;EACV,EACF,CACF;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"artifacts.js","names":["miseVersioning","hostRules.find"],"sources":["../../../../lib/modules/manager/mise/artifacts.ts"],"sourcesContent":["import { isNonEmptyStringAndNotWhitespace, isString } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport upath from 'upath';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { findGithubToken } from '../../../util/check-token.ts';\nimport { exec } from '../../../util/exec/index.ts';\nimport type {\n ExecOptions,\n ExtraEnv,\n ToolConstraint,\n} from '../../../util/exec/types.ts';\nimport { readLocalFile, writeLocalFile } from '../../../util/fs/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { api as miseVersioning } from '../../versioning/semver/index.ts';\nimport type {\n ToolConstraintsConfig,\n UpdateArtifact,\n UpdateArtifactsResult,\n} from '../types.ts';\nimport { resolveToolConstraint } from '../util.ts';\nimport { getConfigType, getLockFileName } from './lockfile.ts';\n\n/**\n * First mise release that supports the features this manager relies on:\n * `MISE_SAFE=1` safe mode (a hard boundary against project config executing\n * code during `mise lock`) and `mise lock --bump` (advancing fuzzy selectors).\n *\n * Safe mode (jdx/mise#11146) and lockfile bumping (jdx/mise#11145) merged after\n * v2026.7.11 and first shipped in v2026.7.12.\n *\n * @see https://github.com/jdx/mise/pull/11146\n * @see https://github.com/jdx/mise/pull/11145\n * @see https://mise.jdx.dev/configuration/settings.html#safe\n */\nconst MISE_SAFE_MODE_MIN_VERSION = '2026.7.12';\n\n/**\n * Detects the mise version that will actually run, by executing `mise version`.\n * `mise version` only prints the binary's version — it does not load or execute\n * project configuration — so it is safe to run even without allowlisting.\n *\n * Output looks like `2026.7.12 macos-arm64 (2026-07-21)`; we take the leading\n * `major.minor.patch`. Returns `null` if the probe fails or cannot be parsed,\n * in which case callers fall back to the conservative (pre-safe-mode) behavior.\n */\nasync function detectMiseVersion(\n execOptions: ExecOptions,\n): Promise<string | null> {\n try {\n const { stdout } = await exec('mise version', execOptions);\n const version = regEx(/\\d+\\.\\d+\\.\\d+/).exec(stdout)?.[0];\n if (version && miseVersioning.isVersion(version)) {\n return version;\n }\n logger.debug({ stdout }, 'Could not parse mise version output');\n return null;\n } catch (err) {\n logger.debug({ err }, 'Failed to determine mise version');\n return null;\n }\n}\n\n/** True when `version` is at or above the safe-mode / `--bump` release. */\nfunction versionSupportsSafeFeatures(version: string | null): boolean {\n return (\n !!version &&\n (miseVersioning.equals(version, MISE_SAFE_MODE_MIN_VERSION) ||\n miseVersioning.isGreaterThan(version, MISE_SAFE_MODE_MIN_VERSION))\n );\n}\n\n/**\n * Resolver tools that mise may invoke while running `mise lock`, for instance to convert an inexact version like `1` against the npm registry.\n *\n * NOTE: this will install all relevant tools, regardless of what the given mise configuration uses.\n *\n * In safe mode these are unnecessary: npm version listing uses mise's built-in\n * registry HTTP client and go runs with `GOTOOLCHAIN=local`, so `mise lock`\n * resolves versions over HTTP without shelling out to node/npm/ruby.\n *\n * @see https://mise.jdx.dev/dev-tools/backends/npm.html\n * @see https://mise.jdx.dev/dev-tools/backends/go.html\n * @see https://mise.jdx.dev/dev-tools/backends/gem.html\n */\nasync function getMiseLockToolConstraints(\n config: ToolConstraintsConfig,\n miseConstraint: string | undefined,\n safeMode = false,\n): Promise<ToolConstraint[]> {\n const miseToolConstraint: ToolConstraint = {\n toolName: 'mise',\n constraint: miseConstraint,\n };\n if (safeMode) {\n return [miseToolConstraint];\n }\n return [\n miseToolConstraint,\n {\n toolName: 'node',\n constraint: await resolveToolConstraint(config, 'node'),\n },\n {\n toolName: 'npm',\n constraint: await resolveToolConstraint(config, 'npm'),\n },\n {\n // the golang tool is constrained by the `go` constraint\n toolName: 'golang',\n constraint: await resolveToolConstraint(config, 'go'),\n },\n {\n toolName: 'ruby',\n constraint: await resolveToolConstraint(config, 'ruby'),\n },\n ];\n}\n\n/**\n * Updates mise lock files when dependencies are updated.\n * Runs `mise lock` for lock file maintenance or `mise lock <tools>` for targeted updates.\n */\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n newLockFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n const lockFileName = getLockFileName(packageFileName);\n const originalLockFileContent = await readLocalFile(lockFileName, 'utf8');\n const currentLockFileContent = newLockFileContent ?? originalLockFileContent;\n if (!currentLockFileContent) {\n logger.debug({ lockFileName }, 'No mise lock file found');\n return null;\n }\n\n // `mise lock` normally executes the project's mise config, so it requires\n // `allowedUnsafeExecutions`. When the mise that will run supports safe mode,\n // we instead run with `MISE_SAFE=1`, which is a hard boundary against the\n // config executing code — so the allowlist is not required on that path.\n const allowlist = GlobalConfig.get('allowedUnsafeExecutions');\n const miseAllowlisted = allowlist.includes('mise');\n\n // The mise version is needed to decide safe mode (untrusted path) and\n // `mise lock --bump` (lock file maintenance). Detect it at runtime rather\n // than requiring a pinned `constraints.mise`. Skip the probe when it cannot\n // change the outcome: an allowlisted, non-maintenance run behaves the same\n // regardless of version.\n const miseConstraint = await resolveToolConstraint(config, 'mise');\n let miseSupportsSafeFeatures = false;\n if (!miseAllowlisted || config.isLockFileMaintenance) {\n const miseVersion = await detectMiseVersion({\n cwdFile: packageFileName,\n toolConstraints: [{ toolName: 'mise', constraint: miseConstraint }],\n docker: {},\n });\n miseSupportsSafeFeatures = versionSupportsSafeFeatures(miseVersion);\n }\n\n const safeMode = !miseAllowlisted && miseSupportsSafeFeatures;\n if (!miseAllowlisted && !safeMode) {\n logger.once.warn(\n { safeModeMinVersion: MISE_SAFE_MODE_MIN_VERSION },\n '`mise lock` requires either `mise` in `allowedUnsafeExecutions`, or a mise version that supports safe mode',\n );\n return null;\n }\n\n const { isLocal, env } = getConfigType(packageFileName);\n const localFlag = isLocal ? ' --local' : '';\n\n let lockCmd: string;\n if (config.isLockFileMaintenance) {\n // Lock file maintenance means \"update to the latest versions\". Plain\n // `mise lock` only refreshes metadata for already-locked versions, so use\n // `mise lock --bump` to also advance fuzzy selectors (e.g. `node = \"22\"`)\n // to the latest matching version. `--bump` requires a new enough mise, so\n // fall back to a plain refresh when the version cannot be guaranteed.\n const bumpFlag = miseSupportsSafeFeatures ? ' --bump' : '';\n lockCmd = `mise lock${localFlag}${bumpFlag}`;\n } else {\n const tools = updatedDeps\n .map(({ depName }) => depName)\n .filter(isNonEmptyStringAndNotWhitespace)\n .map(quote)\n .join(' ');\n lockCmd = tools\n ? `mise lock${localFlag} ${tools}`\n : `mise lock${localFlag}`;\n }\n\n const extraEnv: ExtraEnv = {};\n if (env) {\n extraEnv.MISE_ENV = env;\n }\n if (safeMode) {\n extraEnv.MISE_SAFE = '1';\n }\n const token = findGithubToken(\n hostRules.find({\n hostType: 'github',\n url: 'https://api.github.com/',\n }),\n );\n if (token) {\n extraEnv.GITHUB_TOKEN = token;\n }\n\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n extraEnv,\n toolConstraints: await getMiseLockToolConstraints(\n config,\n miseConstraint,\n safeMode,\n ),\n docker: {},\n };\n\n // `mise trust` is only needed on the allowlisted path. In safe mode mise\n // loads untrusted config without a trust prompt (the config is inert — it\n // can neither execute code nor inject environment), so the trust step is\n // unnecessary and is skipped.\n const commands = safeMode\n ? [lockCmd]\n : [`mise trust ${quote(upath.basename(packageFileName))}`, lockCmd];\n\n try {\n await writeLocalFile(packageFileName, newPackageFileContent);\n if (newLockFileContent) {\n await writeLocalFile(lockFileName, newLockFileContent);\n }\n await exec(commands, execOptions);\n const refreshedLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (\n !refreshedLockFileContent ||\n originalLockFileContent === refreshedLockFileContent\n ) {\n return null;\n }\n\n logger.debug({ lockFileName }, 'Returning updated mise lock file');\n return [\n {\n file: {\n type: 'addition',\n path: lockFileName,\n contents: refreshedLockFileContent,\n },\n },\n ];\n } catch (err) {\n // istanbul ignore if: not worth testing\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n\n const errorOutput = [err.stdout, err.stderr, err.message]\n .filter(isString)\n .join('\\n');\n\n logger.warn({ err, lockFileName }, 'Error updating mise lock file');\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: errorOutput,\n },\n },\n ];\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,6BAA6B;;;;;;;;;;AAWnC,eAAe,kBACb,aACwB;CACxB,IAAI;EACF,MAAM,EAAE,WAAW,MAAM,KAAK,gBAAgB,WAAW;EACzD,MAAM,UAAU,MAAM,eAAe,CAAC,CAAC,KAAK,MAAM,CAAC,GAAG;EACtD,IAAI,WAAWA,IAAe,UAAU,OAAO,GAC7C,OAAO;EAET,OAAO,MAAM,EAAE,OAAO,GAAG,qCAAqC;EAC9D,OAAO;CACT,SAAS,KAAK;EACZ,OAAO,MAAM,EAAE,IAAI,GAAG,kCAAkC;EACxD,OAAO;CACT;AACF;;AAGA,SAAS,4BAA4B,SAAiC;CACpE,OACE,CAAC,CAAC,YACDA,IAAe,OAAO,SAAS,0BAA0B,KACxDA,IAAe,cAAc,SAAS,0BAA0B;AAEtE;;;;;;;;;;;;;;AAeA,eAAe,2BACb,QACA,gBACA,WAAW,OACgB;CAC3B,MAAM,qBAAqC;EACzC,UAAU;EACV,YAAY;CACd;CACA,IAAI,UACF,OAAO,CAAC,kBAAkB;CAE5B,OAAO;EACL;EACA;GACE,UAAU;GACV,YAAY,MAAM,sBAAsB,QAAQ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