renovate 43.208.1 → 43.209.0

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.
Files changed (39) hide show
  1. package/dist/modules/datasource/crate/index.js +3 -3
  2. package/dist/modules/datasource/crate/index.js.map +1 -1
  3. package/dist/modules/datasource/crate/schema.js +2 -2
  4. package/dist/modules/datasource/crate/schema.js.map +1 -1
  5. package/dist/modules/datasource/elm-package/index.js +2 -2
  6. package/dist/modules/datasource/elm-package/index.js.map +1 -1
  7. package/dist/modules/datasource/elm-package/schema.js +2 -2
  8. package/dist/modules/datasource/elm-package/schema.js.map +1 -1
  9. package/dist/modules/datasource/helm/index.js.map +1 -1
  10. package/dist/modules/datasource/helm/schema.js.map +1 -1
  11. package/dist/modules/manager/composer/schema.js.map +1 -1
  12. package/dist/modules/manager/fingerprint.generated.js +1 -1
  13. package/dist/modules/manager/fingerprint.generated.js.map +1 -1
  14. package/dist/modules/manager/github-actions/community.js +5 -5
  15. package/dist/modules/manager/github-actions/community.js.map +1 -1
  16. package/dist/modules/manager/mise/extract.js +11 -10
  17. package/dist/modules/manager/mise/extract.js.map +1 -1
  18. package/dist/modules/manager/mise/schema.js +5 -1
  19. package/dist/modules/manager/mise/schema.js.map +1 -1
  20. package/dist/modules/manager/vendir/extract.js.map +1 -1
  21. package/dist/modules/manager/vendir/schema.js.map +1 -1
  22. package/dist/modules/platform/gitlab/pr-cache.js +2 -2
  23. package/dist/modules/platform/gitlab/pr-cache.js.map +1 -1
  24. package/dist/modules/platform/gitlab/schema.js +10 -10
  25. package/dist/modules/platform/gitlab/schema.js.map +1 -1
  26. package/dist/modules/platform/scm-manager/schema.js +17 -17
  27. package/dist/modules/platform/scm-manager/schema.js.map +1 -1
  28. package/dist/modules/platform/scm-manager/scm-manager-helper.js +7 -7
  29. package/dist/modules/platform/scm-manager/scm-manager-helper.js.map +1 -1
  30. package/dist/util/cache/repository/impl/base.js +2 -2
  31. package/dist/util/cache/repository/impl/base.js.map +1 -1
  32. package/dist/util/cache/repository/schema.js +2 -2
  33. package/dist/util/cache/repository/schema.js.map +1 -1
  34. package/dist/util/emoji.js.map +1 -1
  35. package/dist/workers/repository/process/lookup/index.js +1 -1
  36. package/dist/workers/repository/process/lookup/index.js.map +1 -1
  37. package/dist/workers/repository/process/vulnerabilities.js +2 -2
  38. package/dist/workers/repository/process/vulnerabilities.js.map +1 -1
  39. package/package.json +1 -1
@@ -13,7 +13,7 @@ import { asTimestamp } from "../../../util/timestamp.js";
13
13
  import { Datasource } from "../datasource.js";
14
14
  import { memCacheProvider } from "../../../util/http/cache/memory-http-cache-provider.js";
15
15
  import { createSimpleGit } from "../../../util/git/index.js";
16
- import { RegistryConfigSchema, ReleaseTimestamp } from "./schema.js";
16
+ import { RegistryConfig, ReleaseTimestamp } from "./schema.js";
17
17
  import upath from "upath";
18
18
  //#region lib/modules/datasource/crate/index.ts
19
19
  var CrateDatasource = class CrateDatasource extends Datasource {
@@ -82,7 +82,7 @@ var CrateDatasource = class CrateDatasource extends Datasource {
82
82
  if (cached) return cached;
83
83
  if (info.clonePath) try {
84
84
  const content = await readCacheFile(upath.join(info.clonePath, "config.json"), "utf8");
85
- const parsed = Json.pipe(RegistryConfigSchema).parse(content);
85
+ const parsed = Json.pipe(RegistryConfig).parse(content);
86
86
  set(cacheKey, parsed);
87
87
  return parsed;
88
88
  } catch {
@@ -90,7 +90,7 @@ var CrateDatasource = class CrateDatasource extends Datasource {
90
90
  }
91
91
  else try {
92
92
  const configUrl = joinUrlParts(info.rawUrl, "config.json");
93
- const { body } = await this.http.getJson(configUrl, RegistryConfigSchema);
93
+ const { body } = await this.http.getJson(configUrl, RegistryConfig);
94
94
  set(cacheKey, body);
95
95
  return body;
96
96
  } catch {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["cargoVersioning.id","memCache.get"],"sources":["../../../../lib/modules/datasource/crate/index.ts"],"sourcesContent":["import upath from 'upath';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { logger } from '../../../logger/index.ts';\nimport * as memCache from '../../../util/cache/memory/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { privateCacheDir, readCacheFile } from '../../../util/fs/index.ts';\nimport { createSimpleGit } from '../../../util/git/index.ts';\nimport { toSha256 } from '../../../util/hash.ts';\nimport { memCacheProvider } from '../../../util/http/cache/memory-http-cache-provider.ts';\nimport { acquireLock } from '../../../util/mutex.ts';\nimport { newlineRegex, regEx } from '../../../util/regex.ts';\nimport { Json } from '../../../util/schema-utils/index.ts';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport { joinUrlParts, parseUrl } from '../../../util/url.ts';\nimport * as cargoVersioning from '../../versioning/cargo/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport type {\n GetReleasesConfig,\n PostprocessReleaseConfig,\n PostprocessReleaseResult,\n Release,\n ReleaseResult,\n} from '../types.ts';\nimport { RegistryConfigSchema, ReleaseTimestamp } from './schema.ts';\nimport type {\n CrateMetadata,\n CrateRecord,\n RegistryFlavor,\n RegistryInfo,\n} from './types.ts';\n\ntype CloneResult =\n | {\n err: Error;\n clonePath?: undefined;\n }\n | {\n clonePath: string;\n err?: undefined;\n };\n\nexport class CrateDatasource extends Datasource {\n static readonly id = 'crate';\n\n constructor() {\n super(CrateDatasource.id);\n }\n\n override defaultRegistryUrls = ['sparse+https://index.crates.io/'];\n\n override defaultVersioning = cargoVersioning.id;\n\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the `repository` field in the results.';\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from `pubtime` field from crates.io index if available, or `version.created_at` field from crates.io API otherwise.';\n\n private async _getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore if -- should never happen */\n if (!registryUrl) {\n logger.warn(\n 'crate datasource: No registryUrl specified, cannot perform getReleases',\n );\n return null;\n }\n\n const registryInfo = await CrateDatasource.fetchRegistryInfo({\n packageName,\n registryUrl,\n });\n if (!registryInfo) {\n logger.debug(`Could not fetch registry info from ${registryUrl}`);\n return null;\n }\n\n const dependencyUrl = CrateDatasource.getDependencyUrl(\n registryInfo,\n packageName,\n );\n\n const payload = await this.fetchCrateRecordsPayload(\n registryInfo,\n packageName,\n );\n const lines = payload\n .split(newlineRegex) // break into lines\n .map((line) => line.trim()) // remove whitespace\n .filter((line) => line.length !== 0) // remove empty lines\n .map((line) => JSON.parse(line) as CrateRecord); // parse\n\n const metadata = await this.getCrateMetadata(registryInfo, packageName);\n\n const result: ReleaseResult = {\n dependencyUrl,\n releases: [],\n };\n\n if (metadata?.homepage) {\n result.homepage = metadata.homepage;\n }\n\n if (metadata?.repository) {\n result.sourceUrl = metadata.repository;\n }\n\n result.releases = lines\n .map((line) => {\n const versionOrig = line.vers;\n const version = versionOrig.replace(/\\+.*$/, '');\n const release: Release = { version };\n\n if (versionOrig !== version) {\n release.versionOrig = versionOrig;\n }\n\n if (line.yanked) {\n release.isDeprecated = true;\n }\n\n if (line.rust_version) {\n release.constraints = { rust: [line.rust_version] };\n }\n\n if (line.pubtime) {\n release.releaseTimestamp = asTimestamp(line.pubtime);\n }\n\n return release;\n })\n .filter((release) => release.version);\n if (!result.releases.length) {\n return null;\n }\n\n return result;\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${CrateDatasource.id}`,\n // TODO: types (#22198)\n key: `${config.registryUrl}/${config.packageName}`,\n cacheable: CrateDatasource.isCratesIo(config.registryUrl),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * Fetches the registry's config.json which provides the API base URL\n * and download URL template.\n * See: https://doc.rust-lang.org/cargo/reference/registry-index.html#index-configuration\n */\n private async fetchRegistryConfig(\n info: RegistryInfo,\n ): Promise<RegistryConfigSchema | null> {\n const cacheKey = `crate-datasource/registry-config/${info.rawUrl}`;\n const cached = memCache.get<RegistryConfigSchema>(cacheKey);\n if (cached) {\n return cached;\n }\n\n if (info.clonePath) {\n try {\n const configPath = upath.join(info.clonePath, 'config.json');\n const content = await readCacheFile(configPath, 'utf8');\n const parsed = Json.pipe(RegistryConfigSchema).parse(content);\n memCache.set(cacheKey, parsed);\n return parsed;\n } catch {\n logger.debug(\n { registryUrl: info.rawUrl },\n 'Could not read config.json from cloned registry',\n );\n }\n } else {\n try {\n const configUrl = joinUrlParts(info.rawUrl, 'config.json');\n const { body } = await this.http.getJson(\n configUrl,\n RegistryConfigSchema,\n );\n memCache.set(cacheKey, body);\n return body;\n } catch {\n logger.debug(\n { registryUrl: info.rawUrl },\n 'Could not fetch registry config.json',\n );\n }\n }\n\n return null;\n }\n\n private async _getCrateMetadata(\n info: RegistryInfo,\n packageName: string,\n ): Promise<CrateMetadata | null> {\n const registryConfig = await this.fetchRegistryConfig(info);\n if (!registryConfig?.api) {\n return null;\n }\n\n const apiBaseUrl = joinUrlParts(registryConfig.api, 'api/v1/');\n\n // The `?include=` suffix is required to avoid unnecessary database queries\n // on the crates.io server. This lets us work around the regular request\n // throttling of one request per second.\n const crateUrl = `${apiBaseUrl}crates/${packageName}?include=`;\n\n logger.trace(\n { crateUrl, packageName, registryUrl: info.rawUrl },\n 'downloading crate metadata',\n );\n\n try {\n interface Response {\n crate: CrateMetadata;\n }\n const response = await this.http.getJsonUnchecked<Response>(crateUrl);\n return response.body.crate;\n } catch (err) {\n logger.debug(\n { err, packageName, registryUrl: info.rawUrl },\n 'failed to download crate metadata',\n );\n }\n\n return null;\n }\n\n public getCrateMetadata(\n info: RegistryInfo,\n packageName: string,\n ): Promise<CrateMetadata | null> {\n return withCache(\n {\n namespace: `datasource-${CrateDatasource.id}-metadata`,\n key: `${info.rawUrl}/${packageName}`,\n cacheable: info.flavor === 'crates.io',\n ttlMinutes: 24 * 60, // 24 hours\n },\n () => this._getCrateMetadata(info, packageName),\n );\n }\n\n public async fetchCrateRecordsPayload(\n info: RegistryInfo,\n packageName: string,\n ): Promise<string> {\n if (info.clonePath) {\n const path = upath.join(\n info.clonePath,\n ...CrateDatasource.getIndexSuffix(packageName),\n );\n return readCacheFile(path, 'utf8');\n }\n\n // sparse index\n const packageSuffix = CrateDatasource.getIndexSuffix(\n packageName.toLowerCase(),\n );\n const crateUrl = joinUrlParts(info.rawUrl, ...packageSuffix);\n logger.trace(\n { crateUrl, packageName, registryUrl: info.rawUrl },\n 'fetching crate records from sparse index',\n );\n try {\n return (await this.http.getText(crateUrl)).body;\n } catch (err) {\n this.handleGenericErrors(err);\n }\n }\n\n /**\n * Computes the dependency URL for a crate, given\n * registry information\n */\n private static getDependencyUrl(\n info: RegistryInfo,\n packageName: string,\n ): string {\n switch (info.flavor) {\n case 'crates.io':\n return `https://crates.io/crates/${packageName}`;\n case 'cloudsmith': {\n // input: https://dl.cloudsmith.io/basic/$org/$repo/cargo/index.git\n const tokens = info.url.pathname.split('/');\n const org = tokens[2];\n const repo = tokens[3];\n return `https://cloudsmith.io/~${org}/repos/${repo}/packages/detail/cargo/${packageName}`;\n }\n default:\n return `${info.url}/${packageName}`;\n }\n }\n\n /**\n * Given a Git URL, computes a semi-human-readable name for a folder in which to\n * clone the repository.\n */\n private static cacheDirFromUrl(url: URL): string {\n const proto = url.protocol.replace(regEx(/:$/), '');\n const host = url.hostname;\n const hash = toSha256(url.pathname).substring(0, 7);\n\n return `crate-registry-${proto}-${host}-${hash}`;\n }\n\n private static isSparseRegistry(url: string): boolean {\n const parsed = parseUrl(url);\n if (!parsed) {\n return false;\n }\n return parsed.protocol.startsWith('sparse+');\n }\n\n /**\n * Fetches information about a registry, by url.\n * If no url is given, assumes crates.io.\n * If an url is given, assumes it's a valid Git repository\n * url and clones it to cache.\n */\n private static async fetchRegistryInfo({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<RegistryInfo | null> {\n /* v8 ignore next 3 -- should never happen */\n if (!registryUrl) {\n return null;\n }\n\n const isSparseRegistry = CrateDatasource.isSparseRegistry(registryUrl);\n const registryFetchUrl = isSparseRegistry\n ? registryUrl.replace(/^sparse\\+/, '')\n : registryUrl;\n\n const url = parseUrl(registryFetchUrl);\n if (!url) {\n logger.debug(`Could not parse registry URL ${registryFetchUrl}`);\n return null;\n }\n\n let flavor: RegistryFlavor;\n if (url.hostname === 'index.crates.io') {\n flavor = 'crates.io';\n } else if (url.hostname === 'dl.cloudsmith.io') {\n flavor = 'cloudsmith';\n } else {\n flavor = 'other';\n }\n\n const registry: RegistryInfo = {\n flavor,\n rawUrl: registryFetchUrl,\n url,\n };\n\n if (\n registry.flavor !== 'crates.io' &&\n !GlobalConfig.get('allowCustomCrateRegistries')\n ) {\n logger.warn(\n 'crate datasource: allowCustomCrateRegistries=true is required for registries other than crates.io, bailing out',\n );\n return null;\n }\n if (!isSparseRegistry) {\n const cacheKey = `crate-datasource/registry-clone-path/${registryFetchUrl}`;\n const lockKey = registryFetchUrl;\n\n const executionTimeout = GlobalConfig.get('executionTimeout') * 60 * 1000;\n const gitTimeout = GlobalConfig.get('gitTimeout') || executionTimeout;\n const releaseLock = await acquireLock(\n lockKey,\n 'crate-registry',\n gitTimeout,\n );\n try {\n const cached = memCache.get<CloneResult>(cacheKey);\n\n if (cached?.err) {\n logger.warn(\n { err: cached.err, packageName, registryFetchUrl },\n 'Previous git clone failed, bailing out.',\n );\n return null;\n }\n\n if (cached?.clonePath) {\n registry.clonePath = cached.clonePath;\n return registry;\n }\n\n const clonePath = upath.join(\n privateCacheDir(),\n CrateDatasource.cacheDirFromUrl(url),\n );\n\n const result = await CrateDatasource.clone(\n registryFetchUrl,\n clonePath,\n packageName,\n );\n\n memCache.set(cacheKey, result);\n\n if (result.err) {\n logger.warn(\n { err: result.err, packageName, registryFetchUrl },\n 'Git clone failed, bailing out.',\n );\n return null;\n }\n\n registry.clonePath = result.clonePath;\n } finally {\n releaseLock();\n }\n }\n\n return registry;\n }\n\n private static async clone(\n registryFetchUrl: string,\n clonePath: string,\n packageName: string,\n ): Promise<CloneResult> {\n logger.info(\n { clonePath, registryFetchUrl },\n `Cloning private cargo registry`,\n );\n\n const git = createSimpleGit({\n config: { maxConcurrentProcesses: 1 },\n });\n\n try {\n await git.clone(registryFetchUrl, clonePath, {\n '--depth': 1,\n });\n return { clonePath };\n } catch (err) {\n if (\n err.message.includes(\n 'fatal: dumb http transport does not support shallow capabilities',\n )\n ) {\n logger.info(\n { packageName, registryFetchUrl },\n 'failed to shallow clone git registry, doing full clone',\n );\n try {\n await git.clone(registryFetchUrl, clonePath);\n return { clonePath };\n } catch (err) {\n logger.warn(\n { err, packageName, registryFetchUrl },\n 'failed cloning git registry',\n );\n return { err };\n }\n } else {\n logger.warn(\n { err, packageName, registryFetchUrl },\n 'failed cloning git registry',\n );\n return { err };\n }\n }\n }\n\n private static isCratesIo(registryUrl: string | undefined): boolean {\n if (!registryUrl) {\n return false;\n }\n const normalized = registryUrl.replace(regEx(/^sparse\\+/), '');\n const parsed = parseUrl(normalized);\n return parsed?.hostname === 'index.crates.io';\n }\n\n public static getIndexSuffix(packageName: string): string[] {\n const len = packageName.length;\n\n if (len === 1) {\n return ['1', packageName];\n }\n if (len === 2) {\n return ['2', packageName];\n }\n if (len === 3) {\n return ['3', packageName[0], packageName];\n }\n\n return [packageName.slice(0, 2), packageName.slice(2, 4), packageName];\n }\n\n private async _postprocessRelease(\n { packageName, registryUrl }: PostprocessReleaseConfig,\n release: Release,\n ): Promise<PostprocessReleaseResult> {\n if (release.releaseTimestamp) {\n return release;\n }\n\n // Look up the registry config from cache (populated during getReleases)\n const rawUrl = registryUrl?.replace(/^sparse\\+/, '');\n if (!rawUrl) {\n return release;\n }\n const cacheKey = `crate-datasource/registry-config/${rawUrl}`;\n const config = memCache.get<{ dl: string; api?: string }>(cacheKey);\n if (!config?.api) {\n return release;\n }\n\n const apiBaseUrl = joinUrlParts(config.api, 'api/v1/');\n const url = `${apiBaseUrl}crates/${packageName}/${release.versionOrig ?? release.version}`;\n logger.trace(\n { url, packageName, version: release.version, registryUrl },\n 'fetching crate release timestamp',\n );\n // Getting release timestamp could become unnecessary if the manual backfill of `pubtime` mentioned in\n // https://github.com/rust-lang/cargo/issues/15491 is done for all packages.\n const { body: releaseTimestamp } = await this.http.getJson(\n url,\n { cacheProvider: memCacheProvider },\n ReleaseTimestamp,\n );\n release.releaseTimestamp = releaseTimestamp;\n return release;\n }\n\n override postprocessRelease(\n config: PostprocessReleaseConfig,\n release: Release,\n ): Promise<PostprocessReleaseResult> {\n return withCache(\n {\n namespace: `datasource-crate`,\n key: `postprocessRelease:${config.registryUrl}:${config.packageName}:${release.version}`,\n ttlMinutes: 7 * 24 * 60,\n cacheable: CrateDatasource.isCratesIo(config.registryUrl ?? undefined),\n },\n () => this._postprocessRelease(config, release),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyCA,IAAa,kBAAb,MAAa,wBAAwB,WAAW;CAC9C,OAAgB,KAAK;CAErB,cAAc;EACZ,MAAM,gBAAgB,EAAE;CAC1B;CAEA,sBAA+B,CAAC,iCAAiC;CAEjE,oBAA6BA;CAE7B,mBAAqC;CACrC,gBACE;CAEF,0BAA4C;CAC5C,uBACE;CAEF,MAAc,aAAa,EACzB,aACA,eACmD;;EAEnD,IAAI,CAAC,aAAa;GAChB,OAAO,KACL,wEACF;GACA,OAAO;EACT;EAEA,MAAM,eAAe,MAAM,gBAAgB,kBAAkB;GAC3D;GACA;EACF,CAAC;EACD,IAAI,CAAC,cAAc;GACjB,OAAO,MAAM,sCAAsC,aAAa;GAChE,OAAO;EACT;EAEA,MAAM,gBAAgB,gBAAgB,iBACpC,cACA,WACF;EAMA,MAAM,SAAQ,MAJQ,KAAK,yBACzB,cACA,WACF,GAEG,MAAM,YAAY,EAClB,KAAK,SAAS,KAAK,KAAK,CAAC,EACzB,QAAQ,SAAS,KAAK,WAAW,CAAC,EAClC,KAAK,SAAS,KAAK,MAAM,IAAI,CAAgB;EAEhD,MAAM,WAAW,MAAM,KAAK,iBAAiB,cAAc,WAAW;EAEtE,MAAM,SAAwB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ache.get"],"sources":["../../../../lib/modules/datasource/crate/index.ts"],"sourcesContent":["import upath from 'upath';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { logger } from '../../../logger/index.ts';\nimport * as memCache from '../../../util/cache/memory/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { privateCacheDir, readCacheFile } from '../../../util/fs/index.ts';\nimport { createSimpleGit } from '../../../util/git/index.ts';\nimport { toSha256 } from '../../../util/hash.ts';\nimport { memCacheProvider } from '../../../util/http/cache/memory-http-cache-provider.ts';\nimport { acquireLock } from '../../../util/mutex.ts';\nimport { newlineRegex, regEx } from '../../../util/regex.ts';\nimport { Json } from '../../../util/schema-utils/index.ts';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport { joinUrlParts, parseUrl } from '../../../util/url.ts';\nimport * as cargoVersioning from '../../versioning/cargo/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport type {\n GetReleasesConfig,\n PostprocessReleaseConfig,\n PostprocessReleaseResult,\n Release,\n ReleaseResult,\n} from '../types.ts';\nimport { RegistryConfig, ReleaseTimestamp } from './schema.ts';\nimport type {\n CrateMetadata,\n CrateRecord,\n RegistryFlavor,\n RegistryInfo,\n} from './types.ts';\n\ntype CloneResult =\n | {\n err: Error;\n clonePath?: undefined;\n }\n | {\n clonePath: string;\n err?: undefined;\n };\n\nexport class CrateDatasource extends Datasource {\n static readonly id = 'crate';\n\n constructor() {\n super(CrateDatasource.id);\n }\n\n override defaultRegistryUrls = ['sparse+https://index.crates.io/'];\n\n override defaultVersioning = cargoVersioning.id;\n\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the `repository` field in the results.';\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from `pubtime` field from crates.io index if available, or `version.created_at` field from crates.io API otherwise.';\n\n private async _getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore if -- should never happen */\n if (!registryUrl) {\n logger.warn(\n 'crate datasource: No registryUrl specified, cannot perform getReleases',\n );\n return null;\n }\n\n const registryInfo = await CrateDatasource.fetchRegistryInfo({\n packageName,\n registryUrl,\n });\n if (!registryInfo) {\n logger.debug(`Could not fetch registry info from ${registryUrl}`);\n return null;\n }\n\n const dependencyUrl = CrateDatasource.getDependencyUrl(\n registryInfo,\n packageName,\n );\n\n const payload = await this.fetchCrateRecordsPayload(\n registryInfo,\n packageName,\n );\n const lines = payload\n .split(newlineRegex) // break into lines\n .map((line) => line.trim()) // remove whitespace\n .filter((line) => line.length !== 0) // remove empty lines\n .map((line) => JSON.parse(line) as CrateRecord); // parse\n\n const metadata = await this.getCrateMetadata(registryInfo, packageName);\n\n const result: ReleaseResult = {\n dependencyUrl,\n releases: [],\n };\n\n if (metadata?.homepage) {\n result.homepage = metadata.homepage;\n }\n\n if (metadata?.repository) {\n result.sourceUrl = metadata.repository;\n }\n\n result.releases = lines\n .map((line) => {\n const versionOrig = line.vers;\n const version = versionOrig.replace(/\\+.*$/, '');\n const release: Release = { version };\n\n if (versionOrig !== version) {\n release.versionOrig = versionOrig;\n }\n\n if (line.yanked) {\n release.isDeprecated = true;\n }\n\n if (line.rust_version) {\n release.constraints = { rust: [line.rust_version] };\n }\n\n if (line.pubtime) {\n release.releaseTimestamp = asTimestamp(line.pubtime);\n }\n\n return release;\n })\n .filter((release) => release.version);\n if (!result.releases.length) {\n return null;\n }\n\n return result;\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${CrateDatasource.id}`,\n // TODO: types (#22198)\n key: `${config.registryUrl}/${config.packageName}`,\n cacheable: CrateDatasource.isCratesIo(config.registryUrl),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * Fetches the registry's config.json which provides the API base URL\n * and download URL template.\n * See: https://doc.rust-lang.org/cargo/reference/registry-index.html#index-configuration\n */\n private async fetchRegistryConfig(\n info: RegistryInfo,\n ): Promise<RegistryConfig | null> {\n const cacheKey = `crate-datasource/registry-config/${info.rawUrl}`;\n const cached = memCache.get<RegistryConfig>(cacheKey);\n if (cached) {\n return cached;\n }\n\n if (info.clonePath) {\n try {\n const configPath = upath.join(info.clonePath, 'config.json');\n const content = await readCacheFile(configPath, 'utf8');\n const parsed = Json.pipe(RegistryConfig).parse(content);\n memCache.set(cacheKey, parsed);\n return parsed;\n } catch {\n logger.debug(\n { registryUrl: info.rawUrl },\n 'Could not read config.json from cloned registry',\n );\n }\n } else {\n try {\n const configUrl = joinUrlParts(info.rawUrl, 'config.json');\n const { body } = await this.http.getJson(configUrl, RegistryConfig);\n memCache.set(cacheKey, body);\n return body;\n } catch {\n logger.debug(\n { registryUrl: info.rawUrl },\n 'Could not fetch registry config.json',\n );\n }\n }\n\n return null;\n }\n\n private async _getCrateMetadata(\n info: RegistryInfo,\n packageName: string,\n ): Promise<CrateMetadata | null> {\n const registryConfig = await this.fetchRegistryConfig(info);\n if (!registryConfig?.api) {\n return null;\n }\n\n const apiBaseUrl = joinUrlParts(registryConfig.api, 'api/v1/');\n\n // The `?include=` suffix is required to avoid unnecessary database queries\n // on the crates.io server. This lets us work around the regular request\n // throttling of one request per second.\n const crateUrl = `${apiBaseUrl}crates/${packageName}?include=`;\n\n logger.trace(\n { crateUrl, packageName, registryUrl: info.rawUrl },\n 'downloading crate metadata',\n );\n\n try {\n interface Response {\n crate: CrateMetadata;\n }\n const response = await this.http.getJsonUnchecked<Response>(crateUrl);\n return response.body.crate;\n } catch (err) {\n logger.debug(\n { err, packageName, registryUrl: info.rawUrl },\n 'failed to download crate metadata',\n );\n }\n\n return null;\n }\n\n public getCrateMetadata(\n info: RegistryInfo,\n packageName: string,\n ): Promise<CrateMetadata | null> {\n return withCache(\n {\n namespace: `datasource-${CrateDatasource.id}-metadata`,\n key: `${info.rawUrl}/${packageName}`,\n cacheable: info.flavor === 'crates.io',\n ttlMinutes: 24 * 60, // 24 hours\n },\n () => this._getCrateMetadata(info, packageName),\n );\n }\n\n public async fetchCrateRecordsPayload(\n info: RegistryInfo,\n packageName: string,\n ): Promise<string> {\n if (info.clonePath) {\n const path = upath.join(\n info.clonePath,\n ...CrateDatasource.getIndexSuffix(packageName),\n );\n return readCacheFile(path, 'utf8');\n }\n\n // sparse index\n const packageSuffix = CrateDatasource.getIndexSuffix(\n packageName.toLowerCase(),\n );\n const crateUrl = joinUrlParts(info.rawUrl, ...packageSuffix);\n logger.trace(\n { crateUrl, packageName, registryUrl: info.rawUrl },\n 'fetching crate records from sparse index',\n );\n try {\n return (await this.http.getText(crateUrl)).body;\n } catch (err) {\n this.handleGenericErrors(err);\n }\n }\n\n /**\n * Computes the dependency URL for a crate, given\n * registry information\n */\n private static getDependencyUrl(\n info: RegistryInfo,\n packageName: string,\n ): string {\n switch (info.flavor) {\n case 'crates.io':\n return `https://crates.io/crates/${packageName}`;\n case 'cloudsmith': {\n // input: https://dl.cloudsmith.io/basic/$org/$repo/cargo/index.git\n const tokens = info.url.pathname.split('/');\n const org = tokens[2];\n const repo = tokens[3];\n return `https://cloudsmith.io/~${org}/repos/${repo}/packages/detail/cargo/${packageName}`;\n }\n default:\n return `${info.url}/${packageName}`;\n }\n }\n\n /**\n * Given a Git URL, computes a semi-human-readable name for a folder in which to\n * clone the repository.\n */\n private static cacheDirFromUrl(url: URL): string {\n const proto = url.protocol.replace(regEx(/:$/), '');\n const host = url.hostname;\n const hash = toSha256(url.pathname).substring(0, 7);\n\n return `crate-registry-${proto}-${host}-${hash}`;\n }\n\n private static isSparseRegistry(url: string): boolean {\n const parsed = parseUrl(url);\n if (!parsed) {\n return false;\n }\n return parsed.protocol.startsWith('sparse+');\n }\n\n /**\n * Fetches information about a registry, by url.\n * If no url is given, assumes crates.io.\n * If an url is given, assumes it's a valid Git repository\n * url and clones it to cache.\n */\n private static async fetchRegistryInfo({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<RegistryInfo | null> {\n /* v8 ignore next 3 -- should never happen */\n if (!registryUrl) {\n return null;\n }\n\n const isSparseRegistry = CrateDatasource.isSparseRegistry(registryUrl);\n const registryFetchUrl = isSparseRegistry\n ? registryUrl.replace(/^sparse\\+/, '')\n : registryUrl;\n\n const url = parseUrl(registryFetchUrl);\n if (!url) {\n logger.debug(`Could not parse registry URL ${registryFetchUrl}`);\n return null;\n }\n\n let flavor: RegistryFlavor;\n if (url.hostname === 'index.crates.io') {\n flavor = 'crates.io';\n } else if (url.hostname === 'dl.cloudsmith.io') {\n flavor = 'cloudsmith';\n } else {\n flavor = 'other';\n }\n\n const registry: RegistryInfo = {\n flavor,\n rawUrl: registryFetchUrl,\n url,\n };\n\n if (\n registry.flavor !== 'crates.io' &&\n !GlobalConfig.get('allowCustomCrateRegistries')\n ) {\n logger.warn(\n 'crate datasource: allowCustomCrateRegistries=true is required for registries other than crates.io, bailing out',\n );\n return null;\n }\n if (!isSparseRegistry) {\n const cacheKey = `crate-datasource/registry-clone-path/${registryFetchUrl}`;\n const lockKey = registryFetchUrl;\n\n const executionTimeout = GlobalConfig.get('executionTimeout') * 60 * 1000;\n const gitTimeout = GlobalConfig.get('gitTimeout') || executionTimeout;\n const releaseLock = await acquireLock(\n lockKey,\n 'crate-registry',\n gitTimeout,\n );\n try {\n const cached = memCache.get<CloneResult>(cacheKey);\n\n if (cached?.err) {\n logger.warn(\n { err: cached.err, packageName, registryFetchUrl },\n 'Previous git clone failed, bailing out.',\n );\n return null;\n }\n\n if (cached?.clonePath) {\n registry.clonePath = cached.clonePath;\n return registry;\n }\n\n const clonePath = upath.join(\n privateCacheDir(),\n CrateDatasource.cacheDirFromUrl(url),\n );\n\n const result = await CrateDatasource.clone(\n registryFetchUrl,\n clonePath,\n packageName,\n );\n\n memCache.set(cacheKey, result);\n\n if (result.err) {\n logger.warn(\n { err: result.err, packageName, registryFetchUrl },\n 'Git clone failed, bailing out.',\n );\n return null;\n }\n\n registry.clonePath = result.clonePath;\n } finally {\n releaseLock();\n }\n }\n\n return registry;\n }\n\n private static async clone(\n registryFetchUrl: string,\n clonePath: string,\n packageName: string,\n ): Promise<CloneResult> {\n logger.info(\n { clonePath, registryFetchUrl },\n `Cloning private cargo registry`,\n );\n\n const git = createSimpleGit({\n config: { maxConcurrentProcesses: 1 },\n });\n\n try {\n await git.clone(registryFetchUrl, clonePath, {\n '--depth': 1,\n });\n return { clonePath };\n } catch (err) {\n if (\n err.message.includes(\n 'fatal: dumb http transport does not support shallow capabilities',\n )\n ) {\n logger.info(\n { packageName, registryFetchUrl },\n 'failed to shallow clone git registry, doing full clone',\n );\n try {\n await git.clone(registryFetchUrl, clonePath);\n return { clonePath };\n } catch (err) {\n logger.warn(\n { err, packageName, registryFetchUrl },\n 'failed cloning git registry',\n );\n return { err };\n }\n } else {\n logger.warn(\n { err, packageName, registryFetchUrl },\n 'failed cloning git registry',\n );\n return { err };\n }\n }\n }\n\n private static isCratesIo(registryUrl: string | undefined): boolean {\n if (!registryUrl) {\n return false;\n }\n const normalized = registryUrl.replace(regEx(/^sparse\\+/), '');\n const parsed = parseUrl(normalized);\n return parsed?.hostname === 'index.crates.io';\n }\n\n public static getIndexSuffix(packageName: string): string[] {\n const len = packageName.length;\n\n if (len === 1) {\n return ['1', packageName];\n }\n if (len === 2) {\n return ['2', packageName];\n }\n if (len === 3) {\n return ['3', packageName[0], packageName];\n }\n\n return [packageName.slice(0, 2), packageName.slice(2, 4), packageName];\n }\n\n private async _postprocessRelease(\n { packageName, registryUrl }: PostprocessReleaseConfig,\n release: Release,\n ): Promise<PostprocessReleaseResult> {\n if (release.releaseTimestamp) {\n return release;\n }\n\n // Look up the registry config from cache (populated during getReleases)\n const rawUrl = registryUrl?.replace(/^sparse\\+/, '');\n if (!rawUrl) {\n return release;\n }\n const cacheKey = `crate-datasource/registry-config/${rawUrl}`;\n const config = memCache.get<{ dl: string; api?: string }>(cacheKey);\n if (!config?.api) {\n return release;\n }\n\n const apiBaseUrl = joinUrlParts(config.api, 'api/v1/');\n const url = `${apiBaseUrl}crates/${packageName}/${release.versionOrig ?? release.version}`;\n logger.trace(\n { url, packageName, version: release.version, registryUrl },\n 'fetching crate release timestamp',\n );\n // Getting release timestamp could become unnecessary if the manual backfill of `pubtime` mentioned in\n // https://github.com/rust-lang/cargo/issues/15491 is done for all packages.\n const { body: releaseTimestamp } = await this.http.getJson(\n url,\n { cacheProvider: memCacheProvider },\n ReleaseTimestamp,\n );\n release.releaseTimestamp = releaseTimestamp;\n return release;\n }\n\n override postprocessRelease(\n config: PostprocessReleaseConfig,\n release: Release,\n ): Promise<PostprocessReleaseResult> {\n return withCache(\n {\n namespace: `datasource-crate`,\n key: `postprocessRelease:${config.registryUrl}:${config.packageName}:${release.version}`,\n ttlMinutes: 7 * 24 * 60,\n cacheable: CrateDatasource.isCratesIo(config.registryUrl ?? undefined),\n },\n () => this._postprocessRelease(config, release),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyCA,IAAa,kBAAb,MAAa,wBAAwB,WAAW;CAC9C,OAAgB,KAAK;CAErB,cAAc;EACZ,MAAM,gBAAgB,EAAE;CAC1B;CAEA,sBAA+B,CAAC,iCAAiC;CAEjE,oBAA6BA;CAE7B,mBAAqC;CACrC,gBACE;CAEF,0BAA4C;CAC5C,uBACE;CAEF,MAAc,aAAa,EACzB,aACA,eACmD;;EAEnD,IAAI,CAAC,aAAa;GAChB,OAAO,KACL,wEACF;GACA,OAAO;EACT;EAEA,MAAM,eAAe,MAAM,gBAAgB,kBAAkB;GAC3D;GACA;EACF,CAAC;EACD,IAAI,CAAC,cAAc;GACjB,OAAO,MAAM,sCAAsC,aAAa;GAChE,OAAO;EACT;EAEA,MAAM,gBAAgB,gBAAgB,iBACpC,cACA,WACF;EAMA,MAAM,SAAQ,MAJQ,KAAK,yBACzB,cACA,WACF,GAEG,MAAM,YAAY,EAClB,KAAK,SAAS,KAAK,KAAK,CAAC,EACzB,QAAQ,SAAS,KAAK,WAAW,CAAC,EAClC,KAAK,SAAS,KAAK,MAAM,IAAI,CAAgB;EAE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,OAAO,CAChD;CACF;AACF"}
@@ -1,12 +1,12 @@
1
1
  import { MaybeTimestamp } from "../../../util/timestamp.js";
2
2
  import { z } from "zod/v4";
3
3
  //#region lib/modules/datasource/crate/schema.ts
4
- const RegistryConfigSchema = z.object({
4
+ const RegistryConfig = z.object({
5
5
  dl: z.string(),
6
6
  api: z.string().optional()
7
7
  });
8
8
  const ReleaseTimestamp = z.object({ version: z.object({ created_at: MaybeTimestamp }) }).transform(({ version: { created_at } }) => created_at).nullable().catch(null);
9
9
  //#endregion
10
- export { RegistryConfigSchema, ReleaseTimestamp };
10
+ export { RegistryConfig, ReleaseTimestamp };
11
11
 
12
12
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/crate/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\n\nexport const RegistryConfigSchema = z.object({\n dl: z.string(),\n api: z.string().optional(),\n});\nexport type RegistryConfigSchema = z.infer<typeof RegistryConfigSchema>;\n\nexport const ReleaseTimestamp = z\n .object({\n version: z.object({\n created_at: MaybeTimestamp,\n }),\n })\n .transform(({ version: { created_at } }) => created_at)\n .nullable()\n .catch(null);\n"],"mappings":";;;AAGA,MAAa,uBAAuB,EAAE,OAAO;CAC3C,IAAI,EAAE,OAAO;CACb,KAAK,EAAE,OAAO,EAAE,SAAS;AAC3B,CAAC;AAGD,MAAa,mBAAmB,EAC7B,OAAO,EACN,SAAS,EAAE,OAAO,EAChB,YAAY,eACd,CAAC,EACH,CAAC,EACA,WAAW,EAAE,SAAS,EAAE,mBAAmB,UAAU,EACrD,SAAS,EACT,MAAM,IAAI"}
1
+ {"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/crate/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\n\nexport const RegistryConfig = z.object({\n dl: z.string(),\n api: z.string().optional(),\n});\nexport type RegistryConfig = z.infer<typeof RegistryConfig>;\n\nexport const ReleaseTimestamp = z\n .object({\n version: z.object({\n created_at: MaybeTimestamp,\n }),\n })\n .transform(({ version: { created_at } }) => created_at)\n .nullable()\n .catch(null);\n"],"mappings":";;;AAGA,MAAa,iBAAiB,EAAE,OAAO;CACrC,IAAI,EAAE,OAAO;CACb,KAAK,EAAE,OAAO,EAAE,SAAS;AAC3B,CAAC;AAGD,MAAa,mBAAmB,EAC7B,OAAO,EACN,SAAS,EAAE,OAAO,EAChB,YAAY,eACd,CAAC,EACH,CAAC,EACA,WAAW,EAAE,SAAS,EAAE,mBAAmB,UAAU,EACrD,SAAS,EACT,MAAM,IAAI"}
@@ -3,7 +3,7 @@ import { joinUrlParts } from "../../../util/url.js";
3
3
  import "../../versioning/elm/index.js";
4
4
  import { withCache } from "../../../util/cache/package/with-cache.js";
5
5
  import { Datasource } from "../datasource.js";
6
- import { ElmPackageReleasesSchema } from "./schema.js";
6
+ import { ElmPackageReleases } from "./schema.js";
7
7
  import { ZodError } from "zod/v4";
8
8
  //#region lib/modules/datasource/elm-package/index.ts
9
9
  var ElmPackageDatasource = class ElmPackageDatasource extends Datasource {
@@ -22,7 +22,7 @@ var ElmPackageDatasource = class ElmPackageDatasource extends Datasource {
22
22
  /* v8 ignore if -- should never happen */
23
23
  if (!registryUrl) return null;
24
24
  const pkgUrl = joinUrlParts(registryUrl, "packages", packageName, "releases.json");
25
- const { val: result, err } = await this.http.getJsonSafe(pkgUrl, ElmPackageReleasesSchema).onError((err) => {
25
+ const { val: result, err } = await this.http.getJsonSafe(pkgUrl, ElmPackageReleases).onError((err) => {
26
26
  logger.debug({
27
27
  url: pkgUrl,
28
28
  datasource: ElmPackageDatasource.id,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["baseUrl"],"sources":["../../../../lib/modules/datasource/elm-package/index.ts"],"sourcesContent":["import { ZodError } from 'zod/v4';\nimport { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { joinUrlParts } from '../../../util/url.ts';\nimport * as elmVersioning from '../../versioning/elm/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport type { GetReleasesConfig, ReleaseResult } from '../types.ts';\nimport { ElmPackageReleasesSchema } from './schema.ts';\n\nexport class ElmPackageDatasource extends Datasource {\n static readonly id = 'elm-package';\n\n constructor() {\n super(ElmPackageDatasource.id);\n }\n\n override readonly customRegistrySupport = false;\n\n override readonly defaultRegistryUrls = ['https://package.elm-lang.org'];\n\n override readonly defaultVersioning = elmVersioning.id;\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from the Unix timestamp in the results.';\n\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the package name using the GitHub pattern.';\n\n async _getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore if -- should never happen */\n if (!registryUrl) {\n return null;\n }\n const baseUrl = registryUrl;\n const pkgUrl = joinUrlParts(\n baseUrl,\n 'packages',\n packageName,\n 'releases.json',\n );\n\n const { val: result, err } = await this.http\n .getJsonSafe(pkgUrl, ElmPackageReleasesSchema)\n .onError((err) => {\n logger.debug(\n {\n url: pkgUrl,\n datasource: ElmPackageDatasource.id,\n packageName,\n err,\n },\n 'Error fetching elm package releases',\n );\n })\n .unwrap();\n\n if (err instanceof ZodError) {\n logger.debug({ err }, 'elm-package: validation error');\n return null;\n }\n\n if (err) {\n this.handleGenericErrors(err);\n }\n\n // Elm packages must be published from GitHub - the package name IS the GitHub repo path\n // (e.g., \"elm/core\" is published from github.com/elm/core)\n // This is enforced by the `elm publish` command\n if (packageName.includes('/')) {\n result.sourceUrl = `https://github.com/${packageName}`;\n }\n\n return result;\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${ElmPackageDatasource.id}`,\n key: `${config.registryUrl}:${config.packageName}`,\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n}\n"],"mappings":";;;;;;;;AASA,IAAa,uBAAb,MAAa,6BAA6B,WAAW;CACnD,OAAgB,KAAK;CAErB,cAAc;EACZ,MAAM,qBAAqB,EAAE;CAC/B;CAEA,wBAA0C;CAE1C,sBAAwC,CAAC,8BAA8B;CAEvE,oBAAsC;CAEtC,0BAA4C;CAC5C,uBACE;CAEF,mBAAqC;CACrC,gBACE;CAEF,MAAM,aAAa,EACjB,aACA,eACmD;;EAEnD,IAAI,CAAC,aACH,OAAO;EAGT,MAAM,SAAS,aACbA,aACA,YACA,aACA,eACF;EAEA,MAAM,EAAE,KAAK,QAAQ,QAAQ,MAAM,KAAK,KACrC,YAAY,QAAQ,wBAAwB,EAC5C,SAAS,QAAQ;GAChB,OAAO,MACL;IACE,KAAK;IACL,YAAY,qBAAqB;IACjC;IACA;GACF,GACA,qCACF;EACF,CAAC,EACA,OAAO;EAEV,IAAI,eAAe,UAAU;GAC3B,OAAO,MAAM,EAAE,IAAI,GAAG,+BAA+B;GACrD,OAAO;EACT;EAEA,IAAI,KACF,KAAK,oBAAoB,GAAG;EAM9B,IAAI,YAAY,SAAS,GAAG,GAC1B,OAAO,YAAY,sBAAsB;EAG3C,OAAO;CACT;CAEA,YAAY,QAA0D;EACpE,OAAO,UACL;GACE,WAAW,cAAc,qBAAqB;GAC9C,KAAK,GAAG,OAAO,YAAY,GAAG,OAAO;GACrC,UAAU;EACZ,SACM,KAAK,aAAa,MAAM,CAChC;CACF;AACF"}
1
+ {"version":3,"file":"index.js","names":["baseUrl"],"sources":["../../../../lib/modules/datasource/elm-package/index.ts"],"sourcesContent":["import { ZodError } from 'zod/v4';\nimport { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { joinUrlParts } from '../../../util/url.ts';\nimport * as elmVersioning from '../../versioning/elm/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport type { GetReleasesConfig, ReleaseResult } from '../types.ts';\nimport { ElmPackageReleases } from './schema.ts';\n\nexport class ElmPackageDatasource extends Datasource {\n static readonly id = 'elm-package';\n\n constructor() {\n super(ElmPackageDatasource.id);\n }\n\n override readonly customRegistrySupport = false;\n\n override readonly defaultRegistryUrls = ['https://package.elm-lang.org'];\n\n override readonly defaultVersioning = elmVersioning.id;\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from the Unix timestamp in the results.';\n\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the package name using the GitHub pattern.';\n\n async _getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore if -- should never happen */\n if (!registryUrl) {\n return null;\n }\n const baseUrl = registryUrl;\n const pkgUrl = joinUrlParts(\n baseUrl,\n 'packages',\n packageName,\n 'releases.json',\n );\n\n const { val: result, err } = await this.http\n .getJsonSafe(pkgUrl, ElmPackageReleases)\n .onError((err) => {\n logger.debug(\n {\n url: pkgUrl,\n datasource: ElmPackageDatasource.id,\n packageName,\n err,\n },\n 'Error fetching elm package releases',\n );\n })\n .unwrap();\n\n if (err instanceof ZodError) {\n logger.debug({ err }, 'elm-package: validation error');\n return null;\n }\n\n if (err) {\n this.handleGenericErrors(err);\n }\n\n // Elm packages must be published from GitHub - the package name IS the GitHub repo path\n // (e.g., \"elm/core\" is published from github.com/elm/core)\n // This is enforced by the `elm publish` command\n if (packageName.includes('/')) {\n result.sourceUrl = `https://github.com/${packageName}`;\n }\n\n return result;\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${ElmPackageDatasource.id}`,\n key: `${config.registryUrl}:${config.packageName}`,\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n}\n"],"mappings":";;;;;;;;AASA,IAAa,uBAAb,MAAa,6BAA6B,WAAW;CACnD,OAAgB,KAAK;CAErB,cAAc;EACZ,MAAM,qBAAqB,EAAE;CAC/B;CAEA,wBAA0C;CAE1C,sBAAwC,CAAC,8BAA8B;CAEvE,oBAAsC;CAEtC,0BAA4C;CAC5C,uBACE;CAEF,mBAAqC;CACrC,gBACE;CAEF,MAAM,aAAa,EACjB,aACA,eACmD;;EAEnD,IAAI,CAAC,aACH,OAAO;EAGT,MAAM,SAAS,aACbA,aACA,YACA,aACA,eACF;EAEA,MAAM,EAAE,KAAK,QAAQ,QAAQ,MAAM,KAAK,KACrC,YAAY,QAAQ,kBAAkB,EACtC,SAAS,QAAQ;GAChB,OAAO,MACL;IACE,KAAK;IACL,YAAY,qBAAqB;IACjC;IACA;GACF,GACA,qCACF;EACF,CAAC,EACA,OAAO;EAEV,IAAI,eAAe,UAAU;GAC3B,OAAO,MAAM,EAAE,IAAI,GAAG,+BAA+B;GACrD,OAAO;EACT;EAEA,IAAI,KACF,KAAK,oBAAoB,GAAG;EAM9B,IAAI,YAAY,SAAS,GAAG,GAC1B,OAAO,YAAY,sBAAsB;EAG3C,OAAO;CACT;CAEA,YAAY,QAA0D;EACpE,OAAO,UACL;GACE,WAAW,cAAc,qBAAqB;GAC9C,KAAK,GAAG,OAAO,YAAY,GAAG,OAAO;GACrC,UAAU;EACZ,SACM,KAAK,aAAa,MAAM,CAChC;CACF;AACF"}
@@ -5,13 +5,13 @@ import { z } from "zod/v4";
5
5
  * Response from package.elm-lang.org/packages/{author}/{package}/releases.json
6
6
  * Maps version strings to Unix timestamps
7
7
  */
8
- const ElmPackageReleasesSchema = z.record(z.string(), z.number()).refine((obj) => Object.keys(obj).length > 0, "No releases found").transform((releases) => {
8
+ const ElmPackageReleases = z.record(z.string(), z.number()).refine((obj) => Object.keys(obj).length > 0, "No releases found").transform((releases) => {
9
9
  return { releases: Object.entries(releases).map(([version, timestamp]) => ({
10
10
  version,
11
11
  releaseTimestamp: asTimestamp(timestamp)
12
12
  })) };
13
13
  });
14
14
  //#endregion
15
- export { ElmPackageReleasesSchema };
15
+ export { ElmPackageReleases };
16
16
 
17
17
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/elm-package/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport type { ReleaseResult } from '../types.ts';\n\n/**\n * Response from package.elm-lang.org/packages/{author}/{package}/releases.json\n * Maps version strings to Unix timestamps\n */\nexport const ElmPackageReleasesSchema = z\n .record(z.string(), z.number())\n .refine((obj) => Object.keys(obj).length > 0, 'No releases found')\n .transform((releases): ReleaseResult => {\n return {\n releases: Object.entries(releases).map(([version, timestamp]) => ({\n version,\n releaseTimestamp: asTimestamp(timestamp),\n })),\n };\n });\n\nexport type ElmPackageReleases = Record<string, number>;\n"],"mappings":";;;;;;;AAQA,MAAa,2BAA2B,EACrC,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,EAC7B,QAAQ,QAAQ,OAAO,KAAK,GAAG,EAAE,SAAS,GAAG,mBAAmB,EAChE,WAAW,aAA4B;CACtC,OAAO,EACL,UAAU,OAAO,QAAQ,QAAQ,EAAE,KAAK,CAAC,SAAS,gBAAgB;EAChE;EACA,kBAAkB,YAAY,SAAS;CACzC,EAAE,EACJ;AACF,CAAC"}
1
+ {"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/elm-package/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport type { ReleaseResult } from '../types.ts';\n\n/**\n * Response from package.elm-lang.org/packages/{author}/{package}/releases.json\n * Maps version strings to Unix timestamps\n */\nexport const ElmPackageReleases = z\n .record(z.string(), z.number())\n .refine((obj) => Object.keys(obj).length > 0, 'No releases found')\n .transform((releases): ReleaseResult => {\n return {\n releases: Object.entries(releases).map(([version, timestamp]) => ({\n version,\n releaseTimestamp: asTimestamp(timestamp),\n })),\n };\n });\n\nexport type ElmPackageReleases = Record<string, number>;\n"],"mappings":";;;;;;;AAQA,MAAa,qBAAqB,EAC/B,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,EAC7B,QAAQ,QAAQ,OAAO,KAAK,GAAG,EAAE,SAAS,GAAG,mBAAmB,EAChE,WAAW,aAA4B;CACtC,OAAO,EACL,UAAU,OAAO,QAAQ,QAAQ,EAAE,KAAK,CAAC,SAAS,gBAAgB;EAChE;EACA,kBAAkB,YAAY,SAAS;CACzC,EAAE,EACJ;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["helmVersioning.id"],"sources":["../../../../lib/modules/datasource/helm/index.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { ensureTrailingSlash } from '../../../util/url.ts';\nimport * as helmVersioning from '../../versioning/helm/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport type { GetReleasesConfig, ReleaseResult } from '../types.ts';\nimport type { HelmRepositoryData } from './schema.ts';\nimport { HelmRepository } from './schema.ts';\n\nexport class HelmDatasource extends Datasource {\n static readonly id = 'helm';\n\n constructor() {\n super(HelmDatasource.id);\n }\n\n override readonly defaultRegistryUrls = ['https://charts.helm.sh/stable'];\n\n override readonly defaultConfig = {\n commitMessageTopic: 'Helm release {{depName}}',\n };\n\n override readonly defaultVersioning = helmVersioning.id;\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timstamp is determined from the `created` field in the results.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the `home` field or the `sources` field in the results.';\n\n private async _getRepositoryData(\n helmRepository: string,\n ): Promise<HelmRepositoryData> {\n const { val, err } = await this.http\n .getYamlSafe(\n 'index.yaml',\n { baseUrl: ensureTrailingSlash(helmRepository) },\n HelmRepository,\n )\n .unwrap();\n\n if (err) {\n this.handleGenericErrors(err);\n }\n\n return val;\n }\n\n getRepositoryData(helmRepository: string): Promise<HelmRepositoryData> {\n return withCache(\n {\n namespace: `datasource-${HelmDatasource.id}`,\n key: `repository-data:${helmRepository}`,\n },\n () => this._getRepositoryData(helmRepository),\n );\n }\n\n async getReleases({\n packageName,\n registryUrl: helmRepository,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore next 3 -- should never happen */\n if (!helmRepository) {\n return null;\n }\n\n const repositoryData = await this.getRepositoryData(helmRepository);\n const releases = repositoryData[packageName];\n if (!releases) {\n logger.debug(\n { dependency: packageName },\n `Entry ${packageName} doesn't exist in index.yaml from ${helmRepository}`,\n );\n return null;\n }\n return releases;\n }\n}\n"],"mappings":";;;;;;;AASA,IAAa,iBAAb,MAAa,uBAAuB,WAAW;CAC7C,OAAgB,KAAK;CAErB,cAAc;EACZ,MAAM,eAAe,EAAE;CACzB;CAEA,sBAAwC,CAAC,+BAA+B;CAExE,gBAAkC,EAChC,oBAAoB,2BACtB;CAEA,oBAAsCA;CAEtC,0BAA4C;CAC5C,uBACE;CACF,mBAAqC;CACrC,gBACE;CAEF,MAAc,mBACZ,gBAC6B;EAC7B,MAAM,EAAE,KAAK,QAAQ,MAAM,KAAK,KAC7B,YACC,cACA,EAAE,SAAS,oBAAoB,cAAc,EAAE,GAC/C,cACF,EACC,OAAO;EAEV,IAAI,KACF,KAAK,oBAAoB,GAAG;EAG9B,OAAO;CACT;CAEA,kBAAkB,gBAAqD;EACrE,OAAO,UACL;GACE,WAAW,cAAc,eAAe;GACxC,KAAK,mBAAmB;EAC1B,SACM,KAAK,mBAAmB,cAAc,CAC9C;CACF;CAEA,MAAM,YAAY,EAChB,aACA,aAAa,kBACsC;;EAEnD,IAAI,CAAC,gBACH,OAAO;EAIT,MAAM,YAAW,MADY,KAAK,kBAAkB,cAAc,GAClC;EAChC,IAAI,CAAC,UAAU;GACb,OAAO,MACL,EAAE,YAAY,YAAY,GAC1B,SAAS,YAAY,oCAAoC,gBAC3D;GACA,OAAO;EACT;EACA,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"index.js","names":["helmVersioning.id"],"sources":["../../../../lib/modules/datasource/helm/index.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { ensureTrailingSlash } from '../../../util/url.ts';\nimport * as helmVersioning from '../../versioning/helm/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport type { GetReleasesConfig, ReleaseResult } from '../types.ts';\nimport { HelmRepository } from './schema.ts';\n\nexport class HelmDatasource extends Datasource {\n static readonly id = 'helm';\n\n constructor() {\n super(HelmDatasource.id);\n }\n\n override readonly defaultRegistryUrls = ['https://charts.helm.sh/stable'];\n\n override readonly defaultConfig = {\n commitMessageTopic: 'Helm release {{depName}}',\n };\n\n override readonly defaultVersioning = helmVersioning.id;\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timstamp is determined from the `created` field in the results.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the `home` field or the `sources` field in the results.';\n\n private async _getRepositoryData(\n helmRepository: string,\n ): Promise<HelmRepository> {\n const { val, err } = await this.http\n .getYamlSafe(\n 'index.yaml',\n { baseUrl: ensureTrailingSlash(helmRepository) },\n HelmRepository,\n )\n .unwrap();\n\n if (err) {\n this.handleGenericErrors(err);\n }\n\n return val;\n }\n\n getRepositoryData(helmRepository: string): Promise<HelmRepository> {\n return withCache(\n {\n namespace: `datasource-${HelmDatasource.id}`,\n key: `repository-data:${helmRepository}`,\n },\n () => this._getRepositoryData(helmRepository),\n );\n }\n\n async getReleases({\n packageName,\n registryUrl: helmRepository,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore next 3 -- should never happen */\n if (!helmRepository) {\n return null;\n }\n\n const repositoryData = await this.getRepositoryData(helmRepository);\n const releases = repositoryData[packageName];\n if (!releases) {\n logger.debug(\n { dependency: packageName },\n `Entry ${packageName} doesn't exist in index.yaml from ${helmRepository}`,\n );\n return null;\n }\n return releases;\n }\n}\n"],"mappings":";;;;;;;AAQA,IAAa,iBAAb,MAAa,uBAAuB,WAAW;CAC7C,OAAgB,KAAK;CAErB,cAAc;EACZ,MAAM,eAAe,EAAE;CACzB;CAEA,sBAAwC,CAAC,+BAA+B;CAExE,gBAAkC,EAChC,oBAAoB,2BACtB;CAEA,oBAAsCA;CAEtC,0BAA4C;CAC5C,uBACE;CACF,mBAAqC;CACrC,gBACE;CAEF,MAAc,mBACZ,gBACyB;EACzB,MAAM,EAAE,KAAK,QAAQ,MAAM,KAAK,KAC7B,YACC,cACA,EAAE,SAAS,oBAAoB,cAAc,EAAE,GAC/C,cACF,EACC,OAAO;EAEV,IAAI,KACF,KAAK,oBAAoB,GAAG;EAG9B,OAAO;CACT;CAEA,kBAAkB,gBAAiD;EACjE,OAAO,UACL;GACE,WAAW,cAAc,eAAe;GACxC,KAAK,mBAAmB;EAC1B,SACM,KAAK,mBAAmB,cAAc,CAC9C;CACF;CAEA,MAAM,YAAY,EAChB,aACA,aAAa,kBACsC;;EAEnD,IAAI,CAAC,gBACH,OAAO;EAIT,MAAM,YAAW,MADY,KAAK,kBAAkB,cAAc,GAClC;EAChC,IAAI,CAAC,UAAU;GACb,OAAO,MACL,EAAE,YAAY,YAAY,GAC1B,SAAS,YAAY,oCAAoC,gBAC3D;GACA,OAAO;EACT;EACA,OAAO;CACT;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/helm/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { detectPlatform } from '../../../util/common.ts';\nimport { parseGitUrl } from '../../../util/git/url.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { LooseRecord } from '../../../util/schema-utils/index.ts';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\nimport type { Release } from '../types.ts';\n\nconst HelmRelease = z.object({\n version: z.string(),\n created: MaybeTimestamp,\n digest: z.string().optional().catch(undefined),\n home: z.string().optional().catch(undefined),\n sources: z.array(z.string()).catch([]),\n urls: z.array(z.string()).catch([]),\n});\ntype HelmRelease = z.infer<typeof HelmRelease>;\n\nconst chartRepo = regEx(/charts?|helm|helm-charts/i);\n\nfunction isPossibleChartRepo(url: string): boolean {\n if (detectPlatform(url) === null) {\n return false;\n }\n\n const parsed = parseGitUrl(url);\n return chartRepo.test(parsed.name);\n}\n\nconst githubRelease = regEx(\n /^(https:\\/\\/github\\.com\\/[^/]+\\/[^/]+)\\/releases\\//,\n);\n\nfunction getSourceUrl(release: HelmRelease): string | undefined {\n // it's a github release :)\n const [githubUrl] = release.urls;\n const releaseMatch = githubRelease.exec(githubUrl);\n if (releaseMatch) {\n return releaseMatch[1];\n }\n\n if (release.home && isPossibleChartRepo(release.home)) {\n return release.home;\n }\n\n for (const url of release.sources) {\n if (isPossibleChartRepo(url)) {\n return url;\n }\n }\n\n // fallback\n return release.sources[0];\n}\n\nexport const HelmRepository = z\n .object({\n entries: LooseRecord(\n z.string(),\n HelmRelease.array()\n .min(1)\n .transform((helmReleases) => {\n const latestRelease = helmReleases[0];\n const homepage = latestRelease.home;\n const sourceUrl = getSourceUrl(latestRelease);\n const releases = helmReleases.map(\n ({\n version,\n created: releaseTimestamp,\n digest: newDigest,\n }): Release => ({\n version,\n releaseTimestamp,\n newDigest,\n }),\n );\n return { homepage, sourceUrl, releases };\n }),\n ),\n })\n .transform(({ entries }) => entries);\n\nexport type HelmRepositoryData = z.infer<typeof HelmRepository>;\n"],"mappings":";;;;;;;AAQA,MAAM,cAAc,EAAE,OAAO;CAC3B,SAAS,EAAE,OAAO;CAClB,SAAS;CACT,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAA,CAAS;CAC7C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAA,CAAS;CAC3C,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;CACrC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC;AAGD,MAAM,YAAY,MAAM,2BAA2B;AAEnD,SAAS,oBAAoB,KAAsB;CACjD,IAAI,eAAe,GAAG,MAAM,MAC1B,OAAO;CAGT,MAAM,SAAS,YAAY,GAAG;CAC9B,OAAO,UAAU,KAAK,OAAO,IAAI;AACnC;AAEA,MAAM,gBAAgB,MACpB,oDACF;AAEA,SAAS,aAAa,SAA0C;CAE9D,MAAM,CAAC,aAAa,QAAQ;CAC5B,MAAM,eAAe,cAAc,KAAK,SAAS;CACjD,IAAI,cACF,OAAO,aAAa;CAGtB,IAAI,QAAQ,QAAQ,oBAAoB,QAAQ,IAAI,GAClD,OAAO,QAAQ;CAGjB,KAAK,MAAM,OAAO,QAAQ,SACxB,IAAI,oBAAoB,GAAG,GACzB,OAAO;CAKX,OAAO,QAAQ,QAAQ;AACzB;AAEA,MAAa,iBAAiB,EAC3B,OAAO,EACN,SAAS,YACP,EAAE,OAAO,GACT,YAAY,MAAM,EACf,IAAI,CAAC,EACL,WAAW,iBAAiB;CAC3B,MAAM,gBAAgB,aAAa;CAcnC,OAAO;EAAE,UAbQ,cAAc;EAaZ,WAZD,aAAa,aAYJ;EAAG,UAXb,aAAa,KAC3B,EACC,SACA,SAAS,kBACT,QAAQ,iBACM;GACd;GACA;GACA;EACF,EAEmC;CAAE;AACzC,CAAC,CACL,EACF,CAAC,EACA,WAAW,EAAE,cAAc,OAAO"}
1
+ {"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/helm/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { detectPlatform } from '../../../util/common.ts';\nimport { parseGitUrl } from '../../../util/git/url.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { LooseRecord } from '../../../util/schema-utils/index.ts';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\nimport type { Release } from '../types.ts';\n\nconst HelmRelease = z.object({\n version: z.string(),\n created: MaybeTimestamp,\n digest: z.string().optional().catch(undefined),\n home: z.string().optional().catch(undefined),\n sources: z.array(z.string()).catch([]),\n urls: z.array(z.string()).catch([]),\n});\ntype HelmRelease = z.infer<typeof HelmRelease>;\n\nconst chartRepo = regEx(/charts?|helm|helm-charts/i);\n\nfunction isPossibleChartRepo(url: string): boolean {\n if (detectPlatform(url) === null) {\n return false;\n }\n\n const parsed = parseGitUrl(url);\n return chartRepo.test(parsed.name);\n}\n\nconst githubRelease = regEx(\n /^(https:\\/\\/github\\.com\\/[^/]+\\/[^/]+)\\/releases\\//,\n);\n\nfunction getSourceUrl(release: HelmRelease): string | undefined {\n // it's a github release :)\n const [githubUrl] = release.urls;\n const releaseMatch = githubRelease.exec(githubUrl);\n if (releaseMatch) {\n return releaseMatch[1];\n }\n\n if (release.home && isPossibleChartRepo(release.home)) {\n return release.home;\n }\n\n for (const url of release.sources) {\n if (isPossibleChartRepo(url)) {\n return url;\n }\n }\n\n // fallback\n return release.sources[0];\n}\n\nexport const HelmRepository = z\n .object({\n entries: LooseRecord(\n z.string(),\n HelmRelease.array()\n .min(1)\n .transform((helmReleases) => {\n const latestRelease = helmReleases[0];\n const homepage = latestRelease.home;\n const sourceUrl = getSourceUrl(latestRelease);\n const releases = helmReleases.map(\n ({\n version,\n created: releaseTimestamp,\n digest: newDigest,\n }): Release => ({\n version,\n releaseTimestamp,\n newDigest,\n }),\n );\n return { homepage, sourceUrl, releases };\n }),\n ),\n })\n .transform(({ entries }) => entries);\n\nexport type HelmRepository = z.infer<typeof HelmRepository>;\n"],"mappings":";;;;;;;AAQA,MAAM,cAAc,EAAE,OAAO;CAC3B,SAAS,EAAE,OAAO;CAClB,SAAS;CACT,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAA,CAAS;CAC7C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAA,CAAS;CAC3C,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;CACrC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC;AAGD,MAAM,YAAY,MAAM,2BAA2B;AAEnD,SAAS,oBAAoB,KAAsB;CACjD,IAAI,eAAe,GAAG,MAAM,MAC1B,OAAO;CAGT,MAAM,SAAS,YAAY,GAAG;CAC9B,OAAO,UAAU,KAAK,OAAO,IAAI;AACnC;AAEA,MAAM,gBAAgB,MACpB,oDACF;AAEA,SAAS,aAAa,SAA0C;CAE9D,MAAM,CAAC,aAAa,QAAQ;CAC5B,MAAM,eAAe,cAAc,KAAK,SAAS;CACjD,IAAI,cACF,OAAO,aAAa;CAGtB,IAAI,QAAQ,QAAQ,oBAAoB,QAAQ,IAAI,GAClD,OAAO,QAAQ;CAGjB,KAAK,MAAM,OAAO,QAAQ,SACxB,IAAI,oBAAoB,GAAG,GACzB,OAAO;CAKX,OAAO,QAAQ,QAAQ;AACzB;AAEA,MAAa,iBAAiB,EAC3B,OAAO,EACN,SAAS,YACP,EAAE,OAAO,GACT,YAAY,MAAM,EACf,IAAI,CAAC,EACL,WAAW,iBAAiB;CAC3B,MAAM,gBAAgB,aAAa;CAcnC,OAAO;EAAE,UAbQ,cAAc;EAaZ,WAZD,aAAa,aAYJ;EAAG,UAXb,aAAa,KAC3B,EACC,SACA,SAAS,kBACT,QAAQ,iBACM;GACd;GACA;GACA;EACF,EAEmC;CAAE;AACzC,CAAC,CACL,EACF,CAAC,EACA,WAAW,EAAE,cAAc,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","names":["semverComposer"],"sources":["../../../../lib/modules/manager/composer/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { logger } from '../../../logger/index.ts';\nimport { readLocalFile } from '../../../util/fs/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport {\n Json,\n LooseArray,\n LooseRecord,\n withDebugMessage,\n} from '../../../util/schema-utils/index.ts';\nimport { BitbucketTagsDatasource } from '../../datasource/bitbucket-tags/index.ts';\nimport { GitTagsDatasource } from '../../datasource/git-tags/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { PackagistDatasource } from '../../datasource/packagist/index.ts';\nimport { api as semverComposer } from '../../versioning/composer/index.ts';\nimport type { PackageDependency, PackageFileContent } from '../types.ts';\nimport type { ComposerManagerData } from './types.ts';\n\nexport const ComposerRepo = z.object({\n type: z.literal('composer'),\n /**\n * The regUrl is expected to be a base URL. GitLab composer repository installation guide specifies\n * to use a base URL containing packages.json. Composer still works in this scenario by determining\n * whether to add / remove packages.json from the URL.\n *\n * See https://github.com/composer/composer/blob/750a92b4b7aecda0e5b2f9b963f1cb1421900675/src/Composer/Repository/ComposerRepository.php#L815\n */\n url: z.string().transform((url) => url.replace(/\\/packages\\.json$/, '')),\n});\nexport type ComposerRepo = z.infer<typeof ComposerRepo>;\n\nexport const GitRepo = z.object({\n type: z.enum(['vcs', 'git']).transform(() => 'git' as const),\n url: z.string(),\n name: z.string().optional(),\n});\nexport type GitRepo = z.infer<typeof GitRepo>;\n\nexport const PathRepo = z.object({\n type: z.literal('path'),\n url: z.string(),\n name: z.string().optional(),\n});\nexport type PathRepo = z.infer<typeof PathRepo>;\n\nexport const PackageRepo = z.object({\n type: z.literal('package'),\n});\n\nexport const Repo = z.discriminatedUnion('type', [\n ComposerRepo,\n GitRepo,\n PathRepo,\n PackageRepo,\n]);\nexport type Repo = z.infer<typeof ComposerRepo>;\n\nexport const NamedRepo = z.discriminatedUnion('type', [\n ComposerRepo,\n GitRepo.extend({ name: z.string() }),\n PathRepo.extend({ name: z.string() }),\n PackageRepo,\n]);\nexport type NamedRepo = z.infer<typeof NamedRepo>;\n\nconst DisablePackagist = z.object({ type: z.literal('disable-packagist') });\nexport type DisablePackagist = z.infer<typeof DisablePackagist>;\n\nconst bitbucketUrlRegex = regEx(\n /^(?:https:\\/\\/|git@)bitbucket\\.org[/:](?<packageName>[^/]+\\/[^/]+?)(?:\\.git)?$/,\n);\n\nexport const ReposRecord = LooseRecord(z.union([Repo, z.literal(false)]), {\n onError: ({ error: err }) => {\n logger.debug({ err }, 'Composer: error parsing repositories object');\n },\n}).transform((repos) => {\n const result: (NamedRepo | DisablePackagist)[] = [];\n for (const [name, repo] of Object.entries(repos)) {\n if (repo === false) {\n if (name === 'packagist' || name === 'packagist.org') {\n result.push({ type: 'disable-packagist' });\n }\n continue;\n }\n\n if (repo.type === 'path' || repo.type === 'git') {\n result.push({ name, ...repo });\n continue;\n }\n\n if (repo.type === 'composer') {\n result.push(repo);\n continue;\n }\n }\n\n return result;\n});\nexport type ReposRecord = z.infer<typeof ReposRecord>;\n\nexport const ReposArray = LooseArray(\n z.union([\n Repo,\n z\n .union([\n z.object({ packagist: z.literal(false) }),\n z.object({ 'packagist.org': z.literal(false) }),\n ])\n .transform((): DisablePackagist => ({ type: 'disable-packagist' })),\n ]),\n {\n onError: ({ error: err }) => {\n logger.debug({ err }, 'Composer: error parsing repositories array');\n },\n },\n).transform((repos) => {\n const result: (NamedRepo | DisablePackagist)[] = [];\n for (let idx = 0; idx < repos.length; idx++) {\n const repo = repos[idx];\n if (repo.type === 'path' || repo.type === 'git') {\n result.push({ name: `__${idx}`, ...repo });\n } else {\n result.push(repo);\n }\n }\n return result;\n});\nexport type ReposArray = z.infer<typeof ReposArray>;\n\nexport const Repos = z\n .union([ReposRecord, ReposArray])\n .default([]) // Prevents warnings for packages without repositories field\n .catch(withDebugMessage([], 'Composer: invalid \"repositories\" field'))\n .transform((repos) => {\n let packagist = true;\n const repoUrls: string[] = [];\n const gitRepos: Record<string, GitRepo> = {};\n const pathRepos: Record<string, PathRepo> = {};\n\n for (const repo of repos) {\n if (repo.type === 'composer') {\n repoUrls.push(repo.url);\n } else if (repo.type === 'git') {\n gitRepos[repo.name] = repo;\n } else if (repo.type === 'path') {\n pathRepos[repo.name] = repo;\n } else if (repo.type === 'disable-packagist') {\n packagist = false;\n }\n }\n\n if (packagist && repoUrls.length) {\n repoUrls.push('https://repo.packagist.org');\n }\n const registryUrls = repoUrls.length ? repoUrls : null;\n\n return { registryUrls, gitRepos, pathRepos };\n });\nexport type Repos = z.infer<typeof Repos>;\n\nconst RequireDefs = LooseRecord(z.string().transform((x) => x.trim())).catch(\n {},\n);\n\nexport const PackageFile = z\n .object({\n type: z.string().optional(),\n config: z\n .object({\n platform: z.object({\n php: z.string(),\n }),\n })\n .nullable()\n .catch(null),\n repositories: Repos,\n require: RequireDefs,\n 'require-dev': RequireDefs,\n })\n .transform(\n ({\n type: composerJsonType,\n config,\n repositories,\n require,\n 'require-dev': requireDev,\n }) => ({\n composerJsonType,\n config,\n repositories,\n require,\n requireDev,\n }),\n );\nexport type PackageFile = z.infer<typeof PackageFile>;\n\nconst LockedPackage = z.object({\n name: z.string(),\n version: z.string(),\n});\ntype LockedPackage = z.infer<typeof LockedPackage>;\n\nexport const Lockfile = z\n .object({\n 'plugin-api-version': z.string().optional(),\n packages: LooseArray(LockedPackage).catch([]),\n 'packages-dev': LooseArray(LockedPackage).catch([]),\n })\n .transform(\n ({\n 'plugin-api-version': pluginApiVersion,\n packages,\n 'packages-dev': packagesDev,\n }) => ({ pluginApiVersion, packages, packagesDev }),\n );\nexport type Lockfile = z.infer<typeof Lockfile>;\n\nexport const ComposerExtract = z\n .object({\n content: z.string(),\n fileName: z.string(),\n })\n .transform(({ content, fileName }) => {\n const lockfileName = fileName.replace(/\\.json$/, '.lock');\n return {\n file: content,\n lockfileName,\n lockfile: lockfileName,\n };\n })\n .pipe(\n z.object({\n file: Json.pipe(PackageFile),\n lockfileName: z.string(),\n lockfile: z\n .string()\n .transform((lockfileName) => readLocalFile(lockfileName, 'utf8'))\n .pipe(\n z.union([\n z.null(),\n z\n .string()\n .pipe(Json)\n .pipe(Lockfile)\n .nullable()\n .catch(withDebugMessage(null, 'Composer: does not match schema')),\n ]),\n ),\n }),\n )\n .transform(({ file, lockfile, lockfileName }) => {\n const { composerJsonType, require, requireDev } = file;\n const { registryUrls, gitRepos, pathRepos } = file.repositories;\n\n const deps: PackageDependency[] = [];\n\n const profiles = [\n {\n depType: 'require',\n req: require,\n locked: lockfile?.packages ?? [],\n },\n {\n depType: 'require-dev',\n req: requireDev,\n locked: lockfile?.packagesDev ?? [],\n },\n ];\n\n for (const { depType, req, locked } of profiles) {\n for (const [depName, currentValue] of Object.entries(req)) {\n if (depName === 'php') {\n deps.push({\n depType,\n depName,\n currentValue,\n datasource: GithubTagsDatasource.id,\n packageName: 'containerbase/php-prebuild',\n });\n continue;\n }\n\n if (pathRepos[depName]) {\n deps.push({\n depType,\n depName,\n currentValue,\n skipReason: 'path-dependency',\n });\n continue;\n }\n\n const dep: PackageDependency = {\n depType,\n depName,\n currentValue,\n };\n\n if (!depName.includes('/')) {\n dep.skipReason = 'unsupported';\n }\n\n const lockedDep = locked.find((item) => item.name === depName);\n if (lockedDep && semverComposer.isVersion(lockedDep.version)) {\n dep.lockedVersion = lockedDep.version.replace(regEx(/^v/i), '');\n }\n\n const gitRepo = gitRepos[depName];\n if (gitRepo) {\n const bitbucketMatchGroups = bitbucketUrlRegex.exec(\n gitRepo.url,\n )?.groups;\n\n if (bitbucketMatchGroups) {\n dep.datasource = BitbucketTagsDatasource.id;\n dep.packageName = bitbucketMatchGroups.packageName;\n deps.push(dep);\n continue;\n }\n\n dep.datasource = GitTagsDatasource.id;\n dep.packageName = gitRepo.url;\n deps.push(dep);\n continue;\n }\n\n dep.datasource = PackagistDatasource.id;\n\n if (registryUrls) {\n dep.registryUrls = registryUrls;\n }\n\n deps.push(dep);\n }\n }\n\n if (!deps.length) {\n return null;\n }\n\n const res: PackageFileContent<ComposerManagerData> = { deps };\n\n if (composerJsonType) {\n res.managerData = { composerJsonType };\n }\n\n if (require.php) {\n res.extractedConstraints = { php: require.php };\n }\n\n if (lockfile) {\n res.lockFiles = [lockfileName];\n }\n\n return res;\n });\nexport type ComposerExtract = z.infer<typeof ComposerExtract>;\n"],"mappings":";;;;;;;;;;;AAkBA,MAAa,eAAe,EAAE,OAAO;CACnC,MAAM,EAAE,QAAQ,UAAU;;;;;;;;CAQ1B,KAAK,EAAE,OAAO,EAAE,WAAW,QAAQ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ACb;GACF;GAEA,IAAI,aAAa,kBAAkB;GACnC,IAAI,cAAc,QAAQ;GAC1B,KAAK,KAAK,GAAG;GACb;EACF;EAEA,IAAI,aAAa,oBAAoB;EAErC,IAAI,cACF,IAAI,eAAe;EAGrB,KAAK,KAAK,GAAG;CACf;CAGF,IAAI,CAAC,KAAK,QACR,OAAO;CAGT,MAAM,MAA+C,EAAE,KAAK;CAE5D,IAAI,kBACF,IAAI,cAAc,EAAE,iBAAiB;CAGvC,IAAI,QAAQ,KACV,IAAI,uBAAuB,EAAE,KAAK,QAAQ,IAAI;CAGhD,IAAI,UACF,IAAI,YAAY,CAAC,YAAY;CAG/B,OAAO;AACT,CAAC"}
1
+ {"version":3,"file":"schema.js","names":["semverComposer"],"sources":["../../../../lib/modules/manager/composer/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { logger } from '../../../logger/index.ts';\nimport { readLocalFile } from '../../../util/fs/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport {\n Json,\n LooseArray,\n LooseRecord,\n withDebugMessage,\n} from '../../../util/schema-utils/index.ts';\nimport { BitbucketTagsDatasource } from '../../datasource/bitbucket-tags/index.ts';\nimport { GitTagsDatasource } from '../../datasource/git-tags/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { PackagistDatasource } from '../../datasource/packagist/index.ts';\nimport { api as semverComposer } from '../../versioning/composer/index.ts';\nimport type { PackageDependency, PackageFileContent } from '../types.ts';\nimport type { ComposerManagerData } from './types.ts';\n\nexport const ComposerRepo = z.object({\n type: z.literal('composer'),\n /**\n * The regUrl is expected to be a base URL. GitLab composer repository installation guide specifies\n * to use a base URL containing packages.json. Composer still works in this scenario by determining\n * whether to add / remove packages.json from the URL.\n *\n * See https://github.com/composer/composer/blob/750a92b4b7aecda0e5b2f9b963f1cb1421900675/src/Composer/Repository/ComposerRepository.php#L815\n */\n url: z.string().transform((url) => url.replace(/\\/packages\\.json$/, '')),\n});\nexport type ComposerRepo = z.infer<typeof ComposerRepo>;\n\nexport const GitRepo = z.object({\n type: z.enum(['vcs', 'git']).transform(() => 'git' as const),\n url: z.string(),\n name: z.string().optional(),\n});\nexport type GitRepo = z.infer<typeof GitRepo>;\n\nexport const PathRepo = z.object({\n type: z.literal('path'),\n url: z.string(),\n name: z.string().optional(),\n});\nexport type PathRepo = z.infer<typeof PathRepo>;\n\nexport const PackageRepo = z.object({\n type: z.literal('package'),\n});\n\nexport const Repo = z.discriminatedUnion('type', [\n ComposerRepo,\n GitRepo,\n PathRepo,\n PackageRepo,\n]);\nexport type Repo = z.infer<typeof Repo>;\n\nexport const NamedRepo = z.discriminatedUnion('type', [\n ComposerRepo,\n GitRepo.extend({ name: z.string() }),\n PathRepo.extend({ name: z.string() }),\n PackageRepo,\n]);\nexport type NamedRepo = z.infer<typeof NamedRepo>;\n\nconst DisablePackagist = z.object({ type: z.literal('disable-packagist') });\nexport type DisablePackagist = z.infer<typeof DisablePackagist>;\n\nconst bitbucketUrlRegex = regEx(\n /^(?:https:\\/\\/|git@)bitbucket\\.org[/:](?<packageName>[^/]+\\/[^/]+?)(?:\\.git)?$/,\n);\n\nexport const ReposRecord = LooseRecord(z.union([Repo, z.literal(false)]), {\n onError: ({ error: err }) => {\n logger.debug({ err }, 'Composer: error parsing repositories object');\n },\n}).transform((repos) => {\n const result: (NamedRepo | DisablePackagist)[] = [];\n for (const [name, repo] of Object.entries(repos)) {\n if (repo === false) {\n if (name === 'packagist' || name === 'packagist.org') {\n result.push({ type: 'disable-packagist' });\n }\n continue;\n }\n\n if (repo.type === 'path' || repo.type === 'git') {\n result.push({ name, ...repo });\n continue;\n }\n\n if (repo.type === 'composer') {\n result.push(repo);\n continue;\n }\n }\n\n return result;\n});\nexport type ReposRecord = z.infer<typeof ReposRecord>;\n\nexport const ReposArray = LooseArray(\n z.union([\n Repo,\n z\n .union([\n z.object({ packagist: z.literal(false) }),\n z.object({ 'packagist.org': z.literal(false) }),\n ])\n .transform((): DisablePackagist => ({ type: 'disable-packagist' })),\n ]),\n {\n onError: ({ error: err }) => {\n logger.debug({ err }, 'Composer: error parsing repositories array');\n },\n },\n).transform((repos) => {\n const result: (NamedRepo | DisablePackagist)[] = [];\n for (let idx = 0; idx < repos.length; idx++) {\n const repo = repos[idx];\n if (repo.type === 'path' || repo.type === 'git') {\n result.push({ name: `__${idx}`, ...repo });\n } else {\n result.push(repo);\n }\n }\n return result;\n});\nexport type ReposArray = z.infer<typeof ReposArray>;\n\nexport const Repos = z\n .union([ReposRecord, ReposArray])\n .default([]) // Prevents warnings for packages without repositories field\n .catch(withDebugMessage([], 'Composer: invalid \"repositories\" field'))\n .transform((repos) => {\n let packagist = true;\n const repoUrls: string[] = [];\n const gitRepos: Record<string, GitRepo> = {};\n const pathRepos: Record<string, PathRepo> = {};\n\n for (const repo of repos) {\n if (repo.type === 'composer') {\n repoUrls.push(repo.url);\n } else if (repo.type === 'git') {\n gitRepos[repo.name] = repo;\n } else if (repo.type === 'path') {\n pathRepos[repo.name] = repo;\n } else if (repo.type === 'disable-packagist') {\n packagist = false;\n }\n }\n\n if (packagist && repoUrls.length) {\n repoUrls.push('https://repo.packagist.org');\n }\n const registryUrls = repoUrls.length ? repoUrls : null;\n\n return { registryUrls, gitRepos, pathRepos };\n });\nexport type Repos = z.infer<typeof Repos>;\n\nconst RequireDefs = LooseRecord(z.string().transform((x) => x.trim())).catch(\n {},\n);\n\nexport const PackageFile = z\n .object({\n type: z.string().optional(),\n config: z\n .object({\n platform: z.object({\n php: z.string(),\n }),\n })\n .nullable()\n .catch(null),\n repositories: Repos,\n require: RequireDefs,\n 'require-dev': RequireDefs,\n })\n .transform(\n ({\n type: composerJsonType,\n config,\n repositories,\n require,\n 'require-dev': requireDev,\n }) => ({\n composerJsonType,\n config,\n repositories,\n require,\n requireDev,\n }),\n );\nexport type PackageFile = z.infer<typeof PackageFile>;\n\nconst LockedPackage = z.object({\n name: z.string(),\n version: z.string(),\n});\ntype LockedPackage = z.infer<typeof LockedPackage>;\n\nexport const Lockfile = z\n .object({\n 'plugin-api-version': z.string().optional(),\n packages: LooseArray(LockedPackage).catch([]),\n 'packages-dev': LooseArray(LockedPackage).catch([]),\n })\n .transform(\n ({\n 'plugin-api-version': pluginApiVersion,\n packages,\n 'packages-dev': packagesDev,\n }) => ({ pluginApiVersion, packages, packagesDev }),\n );\nexport type Lockfile = z.infer<typeof Lockfile>;\n\nexport const ComposerExtract = z\n .object({\n content: z.string(),\n fileName: z.string(),\n })\n .transform(({ content, fileName }) => {\n const lockfileName = fileName.replace(/\\.json$/, '.lock');\n return {\n file: content,\n lockfileName,\n lockfile: lockfileName,\n };\n })\n .pipe(\n z.object({\n file: Json.pipe(PackageFile),\n lockfileName: z.string(),\n lockfile: z\n .string()\n .transform((lockfileName) => readLocalFile(lockfileName, 'utf8'))\n .pipe(\n z.union([\n z.null(),\n z\n .string()\n .pipe(Json)\n .pipe(Lockfile)\n .nullable()\n .catch(withDebugMessage(null, 'Composer: does not match schema')),\n ]),\n ),\n }),\n )\n .transform(({ file, lockfile, lockfileName }) => {\n const { composerJsonType, require, requireDev } = file;\n const { registryUrls, gitRepos, pathRepos } = file.repositories;\n\n const deps: PackageDependency[] = [];\n\n const profiles = [\n {\n depType: 'require',\n req: require,\n locked: lockfile?.packages ?? [],\n },\n {\n depType: 'require-dev',\n req: requireDev,\n locked: lockfile?.packagesDev ?? [],\n },\n ];\n\n for (const { depType, req, locked } of profiles) {\n for (const [depName, currentValue] of Object.entries(req)) {\n if (depName === 'php') {\n deps.push({\n depType,\n depName,\n currentValue,\n datasource: GithubTagsDatasource.id,\n packageName: 'containerbase/php-prebuild',\n });\n continue;\n }\n\n if (pathRepos[depName]) {\n deps.push({\n depType,\n depName,\n currentValue,\n skipReason: 'path-dependency',\n });\n continue;\n }\n\n const dep: PackageDependency = {\n depType,\n depName,\n currentValue,\n };\n\n if (!depName.includes('/')) {\n dep.skipReason = 'unsupported';\n }\n\n const lockedDep = locked.find((item) => item.name === depName);\n if (lockedDep && semverComposer.isVersion(lockedDep.version)) {\n dep.lockedVersion = lockedDep.version.replace(regEx(/^v/i), '');\n }\n\n const gitRepo = gitRepos[depName];\n if (gitRepo) {\n const bitbucketMatchGroups = bitbucketUrlRegex.exec(\n gitRepo.url,\n )?.groups;\n\n if (bitbucketMatchGroups) {\n dep.datasource = BitbucketTagsDatasource.id;\n dep.packageName = bitbucketMatchGroups.packageName;\n deps.push(dep);\n continue;\n }\n\n dep.datasource = GitTagsDatasource.id;\n dep.packageName = gitRepo.url;\n deps.push(dep);\n continue;\n }\n\n dep.datasource = PackagistDatasource.id;\n\n if (registryUrls) {\n dep.registryUrls = registryUrls;\n }\n\n deps.push(dep);\n }\n }\n\n if (!deps.length) {\n return null;\n }\n\n const res: PackageFileContent<ComposerManagerData> = { deps };\n\n if (composerJsonType) {\n res.managerData = { composerJsonType };\n }\n\n if (require.php) {\n res.extractedConstraints = { php: require.php };\n }\n\n if (lockfile) {\n res.lockFiles = [lockfileName];\n }\n\n return res;\n });\nexport type ComposerExtract = z.infer<typeof ComposerExtract>;\n"],"mappings":";;;;;;;;;;;AAkBA,MAAa,eAAe,EAAE,OAAO;CACnC,MAAM,EAAE,QAAQ,UAAU;;;;;;;;CAQ1B,KAAK,EAAE,OAAO,EAAE,WAAW,QAAQ,IAAI,QAAQ,qBAAqB,EAAE,CAAC;AACzE,CAAC;AAGD,MAAa,UAAU,EAAE,OAAO;CAC9B,MAAM,EAAE,KAAK,CAAC,OAAO,KAAK,CAAC,EAAE,gBAAgB,KAAc;CAC3D,KAAK,EAAE,OAAO;CACd,MAAM,EAAE,OAAO,EAAE,SAAS;AAC5B,CAAC;AAGD,MAAa,WAAW,EAAE,OAAO;CAC/B,MAAM,EAAE,QAAQ,MAAM;CACtB,KAAK,EAAE,OAAO;CACd,MAAM,EAAE,OAAO,EAAE,SAAS;AAC5B,CAAC;AAGD,MAAa,cAAc,EAAE,OAAO,EAClC,MAAM,EAAE,QAAQ,SAAS,EAC3B,CAAC;AAED,MAAa,OAA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hashMap.set("maven", "2bf7b65d51718daf3eec4f30c0fc7f2f045f4f8f24862bebe17c2174ab
70
70
  hashMap.set("maven-wrapper", "976ed8a59cf43b0c765b1a49ebc5669478e78278cf48f4ce3d0deb49647d10e3");
71
71
  hashMap.set("meteor", "4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4");
72
72
  hashMap.set("mint", "b816a49c8525716454d0a2bc9127916d5b27e5cca7b2aa2030312f218942af3e");
73
- hashMap.set("mise", "15309bd4f868167cace7dc2d86d31b7641a0def85bd3ed2dd5a673cda431c2ee");
73
+ hashMap.set("mise", "d39d941e81e44ea6c3f78ced7869645a874949fefcd2fd2ba5b8091156b887d8");
74
74
  hashMap.set("mix", "a82c3d73372c2da723b467c29f0ad0bb1f85acb8cfb313a0aa734cc7ec2d46bf");
75
75
  hashMap.set("nix", "95f0827f7ec9a3bfd5119534f129aad6cf26b28e99d55aec0945f08bbfff9fb1");
76
76
  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','1fbc76f78daa14a8c9ab1142e9d1e05c746c0419a9f1455e4279f476590d0c04');\nhashMap.set('ansible-galaxy','8226d47128f2018825d4d6f84794e3183eb79c706045fa7e88491edd5e64106f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','a599d9834f33a92e7c25753f933621f0b1b076ba8a068628a3f64e1dc545b739');\nhashMap.set('azure-pipelines','4f635b0ecd388ee266d992e8281fd40e3db2f5867d86fc1cbce72dc33a66e796');\nhashMap.set('batect','fad98996bea8626525ab925f83a6ae0ce9262c53770e7aa7cb448a1e0f1ddf21');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','c6e0ad88ea468664c3a33263baf7452d83d2d37ff09ba920e18f64ee81fd0acb');\nhashMap.set('bazel-module','49631e6572d4cf53b82d839ebae923b7e52be6fcacd28c5e99476497e3d0ec38');\nhashMap.set('bazelisk','49e6bd1fc8f03facd06e517dc64596833b90ee0a079a45cff78f0eeb3c3566f8');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','a93effb1f1c5d65b3277c3b4709924eacde282e8efd028a8e3d8c1ce3ef69407');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','2df1756b14b3d690e5ad1295bc1e78d8a8d7b967a552fd7b8e3274866a5acf3e');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','cf7b07339eec46097c479fc5d9aa1c699d74b11954aea156eef7b893251b070d');\nhashMap.set('cake','65ad4f28c318675b9edb49dbd11d677f42c762b01b3f5a25dd3b2f345ecd387e');\nhashMap.set('cargo','23fcc425ccd3a50559210e0ab8c84c1d47cf5c617cd5d58afdcf258ab862bafa');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','08310c39254947632d42058f74f755e9d3f3019c2edeeaf52b5142917085e2df');\nhashMap.set('composer','e7d1bf044d838d1a294929a1fa730d80f159252405652cf87793c34a009aa02a');\nhashMap.set('conan','b846e8812d65d4201dc0bf7c1d5c344e3a1edaaff6441010875171028be2f0fb');\nhashMap.set('copier','b26904512023c7785e86ee57744f16b336a380ae80d2b85924bf7c30e3c6f1c5');\nhashMap.set('cpanfile','6a1d67d9c8751123deaf0c7f3ac38a07024e960c140f8228fcbcb93954fdca01');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','2d79ef509b7249a318e94e5dacd8e13a945f2b44007b9a17438a2c915b596120');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','ac472ae4897dc1df85326dbd89a8c3488579ae2b180014ffcf085ce422e19dbd');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb');\nhashMap.set('dockerfile','322b95f7e55dd78d7fe71306a6f649479eca61c60d75bb10b23604a230dbdd08');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','d73d5d35f10df0599a561d9c8d25f3935350407d0e3bd3a1d1545295f278912e');\nhashMap.set('flux','7cbca9a0e639dbfac830f05f8713f05435fedcda8ce8e9ff46a5dee16d64a438');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','475d08a1a75e5732dd6003f63bd98c91ce09e42229cdcd9d2d060c60ce474e49');\nhashMap.set('github-actions','30479622f3138996116d419485423d5a64843ae49ed50c5cd5e1e6d4e122944f');\nhashMap.set('gitlabci','0dec44dd398bfc5b3c19d0929bea2fef7f386c94acfd1b1d7bc2a31d81d96fd6');\nhashMap.set('gitlabci-include','354cfc4ea327c6d5cd5bee1f17763832efc7f5402e9fd22c579239fccb9c6dab');\nhashMap.set('glasskube','253d6db30bdec75ed5ab5d26f31d69bc07813ba10089a28da12c6a29eff4ec70');\nhashMap.set('gleam','e7ee3392d1f900fc1299308c8e930db9288790c6d0b6c35f1a62e55683090d34');\nhashMap.set('gomod','f675e8c7bf83c00101d9725814927c69d04e5e347dc6b0346a7100892b1ea4c9');\nhashMap.set('gradle','1108234b4fcfebf95c453111f652ab75f5c6cc6c4472efb60b7bc29cbe683612');\nhashMap.set('gradle-wrapper','f85031e7feb4e811aa5f29c589a30f8076a078e5bbf366fb65fb28b5a47d2c44');\nhashMap.set('haskell-cabal','a4f01c22bdd453dd4610473d92946f7764ceb27624547325f5e21d294214811b');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af');\nhashMap.set('helmfile','5bbc18bf059640191e2237408ca3b442556834e5c1c05d3317e82e7e097ae1f2');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','65603bcfc4b8b5a615bee4570206c301ced27a2031e17b8a3101321f6f995a89');\nhashMap.set('hermit','f30ba5fe8ee46997c1f3d15235e6ff64c96d7ce5e439ee99f8008580348fe0da');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','56ef90301143874355fd2ed25dff7c646875f701f97422d02e01d45608a88f31');\nhashMap.set('html','67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8');\nhashMap.set('jenkins','268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3');\nhashMap.set('jsonnet-bundler','f918a7f378dc207cadf291e7481006008c69623f690902ed921e1e33db270b78');\nhashMap.set('kotlin-script','99ef296792a0ca575ed31d3defb514b05a58083dc01c52ea0890c69d867ba1dd');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','c6ee547378d5c5619a0fe94be35f9838e0f006b4807a896e9caefefa20efacf7');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','2bf7b65d51718daf3eec4f30c0fc7f2f045f4f8f24862bebe17c2174abb606b9');\nhashMap.set('maven-wrapper','976ed8a59cf43b0c765b1a49ebc5669478e78278cf48f4ce3d0deb49647d10e3');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','b816a49c8525716454d0a2bc9127916d5b27e5cca7b2aa2030312f218942af3e');\nhashMap.set('mise','15309bd4f868167cace7dc2d86d31b7641a0def85bd3ed2dd5a673cda431c2ee');\nhashMap.set('mix','a82c3d73372c2da723b467c29f0ad0bb1f85acb8cfb313a0aa734cc7ec2d46bf');\nhashMap.set('nix','95f0827f7ec9a3bfd5119534f129aad6cf26b28e99d55aec0945f08bbfff9fb1');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','cdb387ad533db812e39e16d8679a2da2cf2983b23f7a348c7d55f07be9fa98fe');\nhashMap.set('nuget','da72ddc95788d80b81c0b539b1b54001ef0c782f790efdc6e73aafb235d1e5f8');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10');\nhashMap.set('pep621','0e0fa5337367a9d5b597a11258f07cf8991d197082735d8e17a7980b9c0062b9');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','c750b18e58134ca1f22e3338e331c8a53890763cb3d6bf5277a5c8a43adffd11');\nhashMap.set('pip_requirements','5ef648e398281294c79ec5dc56a868af904efddc536c9ce8d693a8425afd9677');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','1d0af710667f6dce377feae9aa238b21fe5e0e75e75758a70f5e9758c6cb6678');\nhashMap.set('pixi','7d183aaae4370a0c62496bbff60ad12fd4dd46822630541f712f437dcea021e1');\nhashMap.set('poetry','0211739556f8193c70fa69cbf66c60e688042fd7dc7a2fe08f9f328b35ad1f82');\nhashMap.set('pre-commit','a6a6e847fdb0f56650e66ef7d69e68de752b390913f79ac31d1a7ec5955d03da');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','82a922bad525bc8d878226918cbe711427fe7bb32cc3d655210dd0dbaf894637');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e355e13e104351a8b3516a8e272fc5f7e625c9f39b0c492ba27283a36227c2d4');\nhashMap.set('renovate-config','2a4e4fb671aed5d0c900b8d54c31bfef46ca36d0f4e16b00ff73377b9c09fb69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','065ab64215fbeb4859e7e65f3268543ea37b7c384dd27c7a1e9acc4d0d44d8be');\nhashMap.set('sbt','74125bd9c76a5724092258cd1dee1ea99fc0d735b463a2b64fedc5d950efde2a');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('sveltos','05b3158e88771ed4629e171592cf4f1bf0ff342f8aeae89be0b340c630cc6d8e');\nhashMap.set('swift','56cdc6fe4cd00519f953459f94323c71677f6bde007537eef891154fb8696db1');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','ab8e39dd081ba22b10cfd08246efd7a14f1fc8cff8503c254b23a98e835ddd74');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','142c3f0549c4152297615b5bbf3a78ba8f7ce6a0cebcea63b81e9815dca40494');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','4a975f0cc1aa22cd258aa835de3dc98d7a5c0d1cee0a1092324338968e08a827');\nhashMap.set('travis','bb482a0195cd009ec3896a6227bb95617f5c84bedb518c7d971e50c62235d9ca');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','dfd7b905577b362093ce72e6ee597308f97c83678ddb15d6455a1627969b8b7d');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca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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','1fbc76f78daa14a8c9ab1142e9d1e05c746c0419a9f1455e4279f476590d0c04');\nhashMap.set('ansible-galaxy','8226d47128f2018825d4d6f84794e3183eb79c706045fa7e88491edd5e64106f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','a599d9834f33a92e7c25753f933621f0b1b076ba8a068628a3f64e1dc545b739');\nhashMap.set('azure-pipelines','4f635b0ecd388ee266d992e8281fd40e3db2f5867d86fc1cbce72dc33a66e796');\nhashMap.set('batect','fad98996bea8626525ab925f83a6ae0ce9262c53770e7aa7cb448a1e0f1ddf21');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','c6e0ad88ea468664c3a33263baf7452d83d2d37ff09ba920e18f64ee81fd0acb');\nhashMap.set('bazel-module','49631e6572d4cf53b82d839ebae923b7e52be6fcacd28c5e99476497e3d0ec38');\nhashMap.set('bazelisk','49e6bd1fc8f03facd06e517dc64596833b90ee0a079a45cff78f0eeb3c3566f8');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','a93effb1f1c5d65b3277c3b4709924eacde282e8efd028a8e3d8c1ce3ef69407');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','2df1756b14b3d690e5ad1295bc1e78d8a8d7b967a552fd7b8e3274866a5acf3e');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','cf7b07339eec46097c479fc5d9aa1c699d74b11954aea156eef7b893251b070d');\nhashMap.set('cake','65ad4f28c318675b9edb49dbd11d677f42c762b01b3f5a25dd3b2f345ecd387e');\nhashMap.set('cargo','23fcc425ccd3a50559210e0ab8c84c1d47cf5c617cd5d58afdcf258ab862bafa');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','08310c39254947632d42058f74f755e9d3f3019c2edeeaf52b5142917085e2df');\nhashMap.set('composer','e7d1bf044d838d1a294929a1fa730d80f159252405652cf87793c34a009aa02a');\nhashMap.set('conan','b846e8812d65d4201dc0bf7c1d5c344e3a1edaaff6441010875171028be2f0fb');\nhashMap.set('copier','b26904512023c7785e86ee57744f16b336a380ae80d2b85924bf7c30e3c6f1c5');\nhashMap.set('cpanfile','6a1d67d9c8751123deaf0c7f3ac38a07024e960c140f8228fcbcb93954fdca01');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','2d79ef509b7249a318e94e5dacd8e13a945f2b44007b9a17438a2c915b596120');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','ac472ae4897dc1df85326dbd89a8c3488579ae2b180014ffcf085ce422e19dbd');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb');\nhashMap.set('dockerfile','322b95f7e55dd78d7fe71306a6f649479eca61c60d75bb10b23604a230dbdd08');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','d73d5d35f10df0599a561d9c8d25f3935350407d0e3bd3a1d1545295f278912e');\nhashMap.set('flux','7cbca9a0e639dbfac830f05f8713f05435fedcda8ce8e9ff46a5dee16d64a438');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','475d08a1a75e5732dd6003f63bd98c91ce09e42229cdcd9d2d060c60ce474e49');\nhashMap.set('github-actions','30479622f3138996116d419485423d5a64843ae49ed50c5cd5e1e6d4e122944f');\nhashMap.set('gitlabci','0dec44dd398bfc5b3c19d0929bea2fef7f386c94acfd1b1d7bc2a31d81d96fd6');\nhashMap.set('gitlabci-include','354cfc4ea327c6d5cd5bee1f17763832efc7f5402e9fd22c579239fccb9c6dab');\nhashMap.set('glasskube','253d6db30bdec75ed5ab5d26f31d69bc07813ba10089a28da12c6a29eff4ec70');\nhashMap.set('gleam','e7ee3392d1f900fc1299308c8e930db9288790c6d0b6c35f1a62e55683090d34');\nhashMap.set('gomod','f675e8c7bf83c00101d9725814927c69d04e5e347dc6b0346a7100892b1ea4c9');\nhashMap.set('gradle','1108234b4fcfebf95c453111f652ab75f5c6cc6c4472efb60b7bc29cbe683612');\nhashMap.set('gradle-wrapper','f85031e7feb4e811aa5f29c589a30f8076a078e5bbf366fb65fb28b5a47d2c44');\nhashMap.set('haskell-cabal','a4f01c22bdd453dd4610473d92946f7764ceb27624547325f5e21d294214811b');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af');\nhashMap.set('helmfile','5bbc18bf059640191e2237408ca3b442556834e5c1c05d3317e82e7e097ae1f2');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','65603bcfc4b8b5a615bee4570206c301ced27a2031e17b8a3101321f6f995a89');\nhashMap.set('hermit','f30ba5fe8ee46997c1f3d15235e6ff64c96d7ce5e439ee99f8008580348fe0da');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','56ef90301143874355fd2ed25dff7c646875f701f97422d02e01d45608a88f31');\nhashMap.set('html','67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8');\nhashMap.set('jenkins','268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3');\nhashMap.set('jsonnet-bundler','f918a7f378dc207cadf291e7481006008c69623f690902ed921e1e33db270b78');\nhashMap.set('kotlin-script','99ef296792a0ca575ed31d3defb514b05a58083dc01c52ea0890c69d867ba1dd');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','c6ee547378d5c5619a0fe94be35f9838e0f006b4807a896e9caefefa20efacf7');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','2bf7b65d51718daf3eec4f30c0fc7f2f045f4f8f24862bebe17c2174abb606b9');\nhashMap.set('maven-wrapper','976ed8a59cf43b0c765b1a49ebc5669478e78278cf48f4ce3d0deb49647d10e3');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','b816a49c8525716454d0a2bc9127916d5b27e5cca7b2aa2030312f218942af3e');\nhashMap.set('mise','d39d941e81e44ea6c3f78ced7869645a874949fefcd2fd2ba5b8091156b887d8');\nhashMap.set('mix','a82c3d73372c2da723b467c29f0ad0bb1f85acb8cfb313a0aa734cc7ec2d46bf');\nhashMap.set('nix','95f0827f7ec9a3bfd5119534f129aad6cf26b28e99d55aec0945f08bbfff9fb1');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','cdb387ad533db812e39e16d8679a2da2cf2983b23f7a348c7d55f07be9fa98fe');\nhashMap.set('nuget','da72ddc95788d80b81c0b539b1b54001ef0c782f790efdc6e73aafb235d1e5f8');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10');\nhashMap.set('pep621','0e0fa5337367a9d5b597a11258f07cf8991d197082735d8e17a7980b9c0062b9');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','c750b18e58134ca1f22e3338e331c8a53890763cb3d6bf5277a5c8a43adffd11');\nhashMap.set('pip_requirements','5ef648e398281294c79ec5dc56a868af904efddc536c9ce8d693a8425afd9677');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','1d0af710667f6dce377feae9aa238b21fe5e0e75e75758a70f5e9758c6cb6678');\nhashMap.set('pixi','7d183aaae4370a0c62496bbff60ad12fd4dd46822630541f712f437dcea021e1');\nhashMap.set('poetry','0211739556f8193c70fa69cbf66c60e688042fd7dc7a2fe08f9f328b35ad1f82');\nhashMap.set('pre-commit','a6a6e847fdb0f56650e66ef7d69e68de752b390913f79ac31d1a7ec5955d03da');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','82a922bad525bc8d878226918cbe711427fe7bb32cc3d655210dd0dbaf894637');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e355e13e104351a8b3516a8e272fc5f7e625c9f39b0c492ba27283a36227c2d4');\nhashMap.set('renovate-config','2a4e4fb671aed5d0c900b8d54c31bfef46ca36d0f4e16b00ff73377b9c09fb69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','065ab64215fbeb4859e7e65f3268543ea37b7c384dd27c7a1e9acc4d0d44d8be');\nhashMap.set('sbt','74125bd9c76a5724092258cd1dee1ea99fc0d735b463a2b64fedc5d950efde2a');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('sveltos','05b3158e88771ed4629e171592cf4f1bf0ff342f8aeae89be0b340c630cc6d8e');\nhashMap.set('swift','56cdc6fe4cd00519f953459f94323c71677f6bde007537eef891154fb8696db1');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','ab8e39dd081ba22b10cfd08246efd7a14f1fc8cff8503c254b23a98e835ddd74');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','142c3f0549c4152297615b5bbf3a78ba8f7ce6a0cebcea63b81e9815dca40494');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','4a975f0cc1aa22cd258aa835de3dc98d7a5c0d1cee0a1092324338968e08a827');\nhashMap.set('travis','bb482a0195cd009ec3896a6227bb95617f5c84bedb518c7d971e50c62235d9ca');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','dfd7b905577b362093ce72e6ee597308f97c83678ddb15d6455a1627969b8b7d');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','3b5f465b586993f92c8490e70885e7eecce9b6556bcc376dd9c11db8ee9e6960');\nhashMap.set('regex','dbe6889ea021a05127fed06226d73366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,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"}
@@ -11,7 +11,7 @@ import { z } from "zod/v4";
11
11
  function actionSchema(name, { isInvalid, withSchema, ...cfg }) {
12
12
  return z.object({
13
13
  uses: matchAction(name),
14
- with: withSchema ?? VersionValSchema
14
+ with: withSchema ?? VersionVal
15
15
  }).transform(({ with: { val, ...meta } }) => ({
16
16
  ...cfg,
17
17
  ...meta,
@@ -44,8 +44,8 @@ function parseValue(currentValue, isInvalid) {
44
44
  function valSchema(key) {
45
45
  return z.object({ [key]: z.string().optional() }).transform((val) => ({ val: val[key] }));
46
46
  }
47
- const VersionValSchema = z.object({ version: z.string().optional() }).transform((val) => ({ val: val.version }));
48
- const InstallBinaryWithSchema = z.object({
47
+ const VersionVal = z.object({ version: z.string().optional() }).transform((val) => ({ val: val.version }));
48
+ const InstallBinaryWith = z.object({
49
49
  repo: z.string(),
50
50
  tag: z.string()
51
51
  }).transform(({ repo, tag }) => ({
@@ -92,7 +92,7 @@ const communityActions = {
92
92
  "jaxxstorm/action-install-gh-release": {
93
93
  datasource: GithubReleasesDatasource.id,
94
94
  packageName: "",
95
- withSchema: InstallBinaryWithSchema
95
+ withSchema: InstallBinaryWith
96
96
  },
97
97
  "oven-sh/setup-bun": {
98
98
  datasource: NpmDatasource.id,
@@ -126,7 +126,7 @@ const communityActions = {
126
126
  "sigoden/install-binary": {
127
127
  datasource: GithubReleasesDatasource.id,
128
128
  packageName: "",
129
- withSchema: InstallBinaryWithSchema
129
+ withSchema: InstallBinaryWith
130
130
  },
131
131
  "zizmorcore/zizmor-action": {
132
132
  datasource: DockerDatasource.id,
@@ -1 +1 @@
1
- {"version":3,"file":"community.js","names":["condaVersioning.id"],"sources":["../../../../lib/modules/manager/github-actions/community.ts"],"sourcesContent":["import { z } from 'zod/v4';\n\nimport { escapeRegExp, regEx } from '../../../util/regex.ts';\nimport { DockerDatasource } from '../../datasource/docker/index.ts';\nimport { GithubReleasesDatasource } from '../../datasource/github-releases/index.ts';\nimport { NpmDatasource } from '../../datasource/npm/index.ts';\nimport { PypiDatasource } from '../../datasource/pypi/index.ts';\nimport { RubyVersionDatasource } from '../../datasource/ruby-version/index.ts';\nimport * as condaVersioning from '../../versioning/conda/index.ts';\nimport * as npmVersioning from '../../versioning/npm/index.ts';\nimport type { PackageDependency } from '../types.ts';\n\nexport interface CommunityActionConfig {\n datasource: string;\n depName?: string;\n packageName: string;\n versioning?: string;\n extractVersion?: string;\n\n /**\n * should return `true` if the version is invalid and should be skipped\n */\n isInvalid?: (value: string) => boolean;\n\n withSchema?: z.ZodType<{ val: string | undefined } & Record<string, unknown>>;\n}\n\ntype ActionSchema = z.ZodType<PackageDependency>;\n\nfunction actionSchema(\n name: string,\n { isInvalid, withSchema, ...cfg }: CommunityActionConfig,\n): ActionSchema {\n return z\n .object({\n uses: matchAction(name),\n with: withSchema ?? VersionValSchema,\n })\n .transform(\n ({ with: { val, ...meta } }): PackageDependency => ({\n ...cfg,\n ...meta,\n ...parseValue(val, isInvalid),\n }),\n )\n .transform((dep) => {\n dep.depName ??= dep.packageName;\n return dep;\n });\n}\n\nfunction matchAction(action: string): z.ZodString {\n return z\n .string()\n .regex(regEx(`(?:https?://[^/]+/)?${escapeRegExp(action)}(?:@.+)?$`));\n}\n\nfunction parseValue(\n currentValue: string | undefined,\n isInvalid?: (val: string) => boolean,\n): PackageDependency {\n if (!currentValue) {\n return {\n skipStage: 'extract',\n skipReason: 'unspecified-version',\n depType: 'uses-with',\n };\n }\n if (isInvalid?.(currentValue) === true) {\n return {\n skipStage: 'extract',\n skipReason: 'invalid-version',\n depType: 'uses-with',\n currentValue,\n };\n }\n return { currentValue, depType: 'uses-with' };\n}\n\nfunction valSchema(key: string): z.ZodType<{ val: string | undefined }> {\n return z\n .object({ [key]: z.string().optional() })\n .transform((val) => ({ val: val[key] }));\n}\n\nconst VersionValSchema = z\n .object({ version: z.string().optional() })\n .transform((val) => ({ val: val.version }));\n\nconst InstallBinaryWithSchema = z\n .object({ repo: z.string(), tag: z.string() })\n .transform(({ repo, tag }) => ({ packageName: repo, val: tag }));\n\n/**\n * Community contributed actions with known version input schemas.\n */\nexport const communityActions: Record<string, CommunityActionConfig> = {\n // https://github.com/aquasecurity/setup-trivy\n 'aquasecurity/setup-trivy': {\n datasource: GithubReleasesDatasource.id,\n packageName: 'aquasecurity/trivy',\n },\n // https://github.com/aquasecurity/trivy-action\n 'aquasecurity/trivy-action': {\n datasource: GithubReleasesDatasource.id,\n packageName: 'aquasecurity/trivy',\n },\n // https://github.com/astral-sh/setup-uv\n 'astral-sh/setup-uv': {\n datasource: GithubReleasesDatasource.id,\n versioning: npmVersioning.id,\n packageName: 'astral-sh/uv',\n },\n 'denoland/setup-deno': {\n datasource: NpmDatasource.id,\n packageName: 'deno',\n withSchema: valSchema('deno-version'),\n },\n // https://github.com/docker/setup-docker-action\n 'docker/setup-docker-action': {\n datasource: GithubReleasesDatasource.id,\n depName: 'docker/setup-docker-action',\n packageName: 'moby/moby',\n extractVersion: '^docker-(?<version>.+)$',\n },\n 'golangci/golangci-lint-action': {\n datasource: GithubReleasesDatasource.id,\n packageName: 'golangci/golangci-lint',\n },\n 'jakebailey/pyright-action': {\n datasource: NpmDatasource.id,\n packageName: 'pyright',\n isInvalid: (val) => val === 'PATH',\n },\n 'jaxxstorm/action-install-gh-release': {\n datasource: GithubReleasesDatasource.id,\n packageName: '', // determined from `repo` input\n withSchema: InstallBinaryWithSchema,\n },\n 'oven-sh/setup-bun': {\n datasource: NpmDatasource.id,\n packageName: 'bun',\n withSchema: valSchema('bun-version'),\n },\n 'pdm-project/setup-pdm': {\n datasource: PypiDatasource.id,\n packageName: 'pdm',\n },\n 'pnpm/action-setup': {\n datasource: NpmDatasource.id,\n packageName: 'pnpm',\n },\n 'prefix-dev/setup-pixi': {\n datasource: GithubReleasesDatasource.id,\n versioning: condaVersioning.id,\n packageName: 'prefix-dev/pixi',\n withSchema: valSchema('pixi-version'),\n },\n // https://github.com/pypa/hatch/tree/install\n 'pypa/hatch': {\n datasource: GithubReleasesDatasource.id,\n packageName: 'pypa/hatch',\n // Strip hatch- prefix from release tags\n extractVersion: '^hatch-(?<version>.+)$',\n },\n 'ruby/setup-ruby': {\n datasource: RubyVersionDatasource.id,\n packageName: 'ruby',\n withSchema: valSchema('ruby-version'),\n },\n 'sigoden/install-binary': {\n datasource: GithubReleasesDatasource.id,\n packageName: '', // determined from `repo` input\n withSchema: InstallBinaryWithSchema,\n },\n 'zizmorcore/zizmor-action': {\n datasource: DockerDatasource.id,\n packageName: 'ghcr.io/zizmorcore/zizmor',\n },\n};\n\nexport const CommunityActions = z.union(\n Object.entries(communityActions).map(([name, cfg]) =>\n actionSchema(name, cfg),\n ) as [ActionSchema, ActionSchema, ...ActionSchema[]],\n);\n"],"mappings":";;;;;;;;;;AA6BA,SAAS,aACP,MACA,EAAE,WAAW,YAAY,GAAG,OACd;CACd,OAAO,EACJ,OAAO;EACN,MAAM,YAAY,IAAI;EACtB,MAAM,cAAc;CACtB,CAAC,EACA,WACE,EAAE,MAAM,EAAE,KAAK,GAAG,cAAiC;EAClD,GAAG;EACH,GAAG;EACH,GAAG,WAAW,KAAK,SAAS;CAC9B,EACF,EACC,WAAW,QAAQ;EAClB,IAAI,YAAY,IAAI;EACpB,OAAO;CACT,CAAC;AACL;AAEA,SAAS,YAAY,QAA6B;CAChD,OAAO,EACJ,OAAO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,yBAAyB;EACrC,aAAa;EACb,YAAY;CACd;CACA,qBAAqB;EACnB,YAAY,cAAc;EAC1B,aAAa;EACb,YAAY,UAAU,aAAa;CACrC;CACA,yBAAyB;EACvB,YAAY,eAAe;EAC3B,aAAa;CACf;CACA,qBAAqB;EACnB,YAAY,cAAc;EAC1B,aAAa;CACf;CACA,yBAAyB;EACvB,YAAY,yBAAyB;EACrC,YAAYA;EACZ,aAAa;EACb,YAAY,UAAU,cAAc;CACtC;CAEA,cAAc;EACZ,YAAY,yBAAyB;EACrC,aAAa;EAEb,gBAAgB;CAClB;CACA,mBAAmB;EACjB,YAAY,sBAAsB;EAClC,aAAa;EACb,YAAY,UAAU,cAAc;CACtC;CACA,0BAA0B;EACxB,YAAY,yBAAyB;EACrC,aAAa;EACb,YAAY;CACd;CACA,4BAA4B;EAC1B,YAAY,iBAAiB;EAC7B,aAAa;CACf;AACF;AAEA,MAAa,mBAAmB,EAAE,MAChC,OAAO,QAAQ,gBAAgB,EAAE,KAAK,CAAC,MAAM,SAC3C,aAAa,MAAM,GAAG,CACxB,CACF"}
1
+ {"version":3,"file":"community.js","names":["condaVersioning.id"],"sources":["../../../../lib/modules/manager/github-actions/community.ts"],"sourcesContent":["import { z } from 'zod/v4';\n\nimport { escapeRegExp, regEx } from '../../../util/regex.ts';\nimport { DockerDatasource } from '../../datasource/docker/index.ts';\nimport { GithubReleasesDatasource } from '../../datasource/github-releases/index.ts';\nimport { NpmDatasource } from '../../datasource/npm/index.ts';\nimport { PypiDatasource } from '../../datasource/pypi/index.ts';\nimport { RubyVersionDatasource } from '../../datasource/ruby-version/index.ts';\nimport * as condaVersioning from '../../versioning/conda/index.ts';\nimport * as npmVersioning from '../../versioning/npm/index.ts';\nimport type { PackageDependency } from '../types.ts';\n\nexport interface CommunityActionConfig {\n datasource: string;\n depName?: string;\n packageName: string;\n versioning?: string;\n extractVersion?: string;\n\n /**\n * should return `true` if the version is invalid and should be skipped\n */\n isInvalid?: (value: string) => boolean;\n\n withSchema?: z.ZodType<{ val: string | undefined } & Record<string, unknown>>;\n}\n\ntype ActionSchema = z.ZodType<PackageDependency>;\n\nfunction actionSchema(\n name: string,\n { isInvalid, withSchema, ...cfg }: CommunityActionConfig,\n): ActionSchema {\n return z\n .object({\n uses: matchAction(name),\n with: withSchema ?? VersionVal,\n })\n .transform(\n ({ with: { val, ...meta } }): PackageDependency => ({\n ...cfg,\n ...meta,\n ...parseValue(val, isInvalid),\n }),\n )\n .transform((dep) => {\n dep.depName ??= dep.packageName;\n return dep;\n });\n}\n\nfunction matchAction(action: string): z.ZodString {\n return z\n .string()\n .regex(regEx(`(?:https?://[^/]+/)?${escapeRegExp(action)}(?:@.+)?$`));\n}\n\nfunction parseValue(\n currentValue: string | undefined,\n isInvalid?: (val: string) => boolean,\n): PackageDependency {\n if (!currentValue) {\n return {\n skipStage: 'extract',\n skipReason: 'unspecified-version',\n depType: 'uses-with',\n };\n }\n if (isInvalid?.(currentValue) === true) {\n return {\n skipStage: 'extract',\n skipReason: 'invalid-version',\n depType: 'uses-with',\n currentValue,\n };\n }\n return { currentValue, depType: 'uses-with' };\n}\n\nfunction valSchema(key: string): z.ZodType<{ val: string | undefined }> {\n return z\n .object({ [key]: z.string().optional() })\n .transform((val) => ({ val: val[key] }));\n}\n\nconst VersionVal = z\n .object({ version: z.string().optional() })\n .transform((val) => ({ val: val.version }));\n\nconst InstallBinaryWith = z\n .object({ repo: z.string(), tag: z.string() })\n .transform(({ repo, tag }) => ({ packageName: repo, val: tag }));\n\n/**\n * Community contributed actions with known version input schemas.\n */\nexport const communityActions: Record<string, CommunityActionConfig> = {\n // https://github.com/aquasecurity/setup-trivy\n 'aquasecurity/setup-trivy': {\n datasource: GithubReleasesDatasource.id,\n packageName: 'aquasecurity/trivy',\n },\n // https://github.com/aquasecurity/trivy-action\n 'aquasecurity/trivy-action': {\n datasource: GithubReleasesDatasource.id,\n packageName: 'aquasecurity/trivy',\n },\n // https://github.com/astral-sh/setup-uv\n 'astral-sh/setup-uv': {\n datasource: GithubReleasesDatasource.id,\n versioning: npmVersioning.id,\n packageName: 'astral-sh/uv',\n },\n 'denoland/setup-deno': {\n datasource: NpmDatasource.id,\n packageName: 'deno',\n withSchema: valSchema('deno-version'),\n },\n // https://github.com/docker/setup-docker-action\n 'docker/setup-docker-action': {\n datasource: GithubReleasesDatasource.id,\n depName: 'docker/setup-docker-action',\n packageName: 'moby/moby',\n extractVersion: '^docker-(?<version>.+)$',\n },\n 'golangci/golangci-lint-action': {\n datasource: GithubReleasesDatasource.id,\n packageName: 'golangci/golangci-lint',\n },\n 'jakebailey/pyright-action': {\n datasource: NpmDatasource.id,\n packageName: 'pyright',\n isInvalid: (val) => val === 'PATH',\n },\n 'jaxxstorm/action-install-gh-release': {\n datasource: GithubReleasesDatasource.id,\n packageName: '', // determined from `repo` input\n withSchema: InstallBinaryWith,\n },\n 'oven-sh/setup-bun': {\n datasource: NpmDatasource.id,\n packageName: 'bun',\n withSchema: valSchema('bun-version'),\n },\n 'pdm-project/setup-pdm': {\n datasource: PypiDatasource.id,\n packageName: 'pdm',\n },\n 'pnpm/action-setup': {\n datasource: NpmDatasource.id,\n packageName: 'pnpm',\n },\n 'prefix-dev/setup-pixi': {\n datasource: GithubReleasesDatasource.id,\n versioning: condaVersioning.id,\n packageName: 'prefix-dev/pixi',\n withSchema: valSchema('pixi-version'),\n },\n // https://github.com/pypa/hatch/tree/install\n 'pypa/hatch': {\n datasource: GithubReleasesDatasource.id,\n packageName: 'pypa/hatch',\n // Strip hatch- prefix from release tags\n extractVersion: '^hatch-(?<version>.+)$',\n },\n 'ruby/setup-ruby': {\n datasource: RubyVersionDatasource.id,\n packageName: 'ruby',\n withSchema: valSchema('ruby-version'),\n },\n 'sigoden/install-binary': {\n datasource: GithubReleasesDatasource.id,\n packageName: '', // determined from `repo` input\n withSchema: InstallBinaryWith,\n },\n 'zizmorcore/zizmor-action': {\n datasource: DockerDatasource.id,\n packageName: 'ghcr.io/zizmorcore/zizmor',\n },\n};\n\nexport const CommunityActions = z.union(\n Object.entries(communityActions).map(([name, cfg]) =>\n actionSchema(name, cfg),\n ) as [ActionSchema, ActionSchema, ...ActionSchema[]],\n);\n"],"mappings":";;;;;;;;;;AA6BA,SAAS,aACP,MACA,EAAE,WAAW,YAAY,GAAG,OACd;CACd,OAAO,EACJ,OAAO;EACN,MAAM,YAAY,IAAI;EACtB,MAAM,cAAc;CACtB,CAAC,EACA,WACE,EAAE,MAAM,EAAE,KAAK,GAAG,cAAiC;EAClD,GAAG;EACH,GAAG;EACH,GAAG,WAAW,KAAK,SAAS;CAC9B,EACF,EACC,WAAW,QAAQ;EAClB,IAAI,YAAY,IAAI;EACpB,OAAO;CACT,CAAC;AACL;AAEA,SAAS,YAAY,QAA6B;CAChD,OAAO,EACJ,OAAO,EACP,MAAM,MAAM,uBAAuB,aAAa,MAAM,EAAE,UAAU,CAAC;AACxE;AAEA,SAAS,WACP,cACA,WACmB;CACnB,IAAI,CAAC,cACH,OAAO;EACL,WAAW;EACX,YAAY;EACZ,SAAS;CACX;CAEF,IAAI,YAAY,YAAY,MAAM,MAChC,OAAO;EACL,WAAW;EACX,YAAY;EACZ,SAAS;EACT;CACF;CAEF,OAAO;EAAE;EAAc,SAAS;CAAY;AAC9C;AAEA,SAAS,UAAU,KAAqD;CACtE,OAAO,EACJ,OAAO,GAAG,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EACvC,WAAW,SAAS,EAAE,KAAK,IAAI,KAAK,EAAE;AAC3C;AAEA,MAAM,aAAa,EAChB,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EACzC,WAAW,SAAS,EAAE,KAAK,IAAI,QAAQ,EAAE;AAE5C,MAAM,oBAAoB,EACvB,OAAO;CAAE,MAAM,EAAE,OAAO;CAAG,KAAK,EAAE,OAAO;AAAE,CAAC,EAC5C,WAAW,EAAE,MAAM,WAAW;CAAE,aAAa;CAAM,KAAK;AAAI,EAAE;;;;AAKjE,MAAa,mBAA0D;CAErE,4BAA4B;EAC1B,YAAY,yBAAyB;EACrC,aAAa;CACf;CAEA,6BAA6B;EAC3B,YAAY,yBAAyB;EACrC,aAAa;CACf;CAEA,sBAAsB;EACpB,YAAY,yBAAyB;EACrC,YAAY;EACZ,aAAa;CACf;CACA,uBAAuB;EACrB,YAAY,cAAc;EAC1B,aAAa;EACb,YAAY,UAAU,cAAc;CACtC;CAEA,8BAA8B;EAC5B,YAAY,yBAAyB;EACrC,SAAS;EACT,aAAa;EACb,gBAAgB;CAClB;CACA,iCAAiC;EAC/B,YAAY,yBAAyB;EACrC,aAAa;CACf;CACA,6BAA6B;EAC3B,YAAY,cAAc;EAC1B,aAAa;EACb,YAAY,QAAQ,QAAQ;CAC9B;CACA,uCAAuC;EACrC,YAAY,yBAAyB;EACrC,aAAa;EACb,YAAY;CACd;CACA,qBAAqB;EACnB,YAAY,cAAc;EAC1B,aAAa;EACb,YAAY,UAAU,aAAa;CACrC;CACA,yBAAyB;EACvB,YAAY,eAAe;EAC3B,aAAa;CACf;CACA,qBAAqB;EACnB,YAAY,cAAc;EAC1B,aAAa;CACf;CACA,yBAAyB;EACvB,YAAY,yBAAyB;EACrC,YAAYA;EACZ,aAAa;EACb,YAAY,UAAU,cAAc;CACtC;CAEA,cAAc;EACZ,YAAY,yBAAyB;EACrC,aAAa;EAEb,gBAAgB;CAClB;CACA,mBAAmB;EACjB,YAAY,sBAAsB;EAClC,aAAa;EACb,YAAY,UAAU,cAAc;CACtC;CACA,0BAA0B;EACxB,YAAY,yBAAyB;EACrC,aAAa;EACb,YAAY;CACd;CACA,4BAA4B;EAC1B,YAAY,iBAAiB;EAC7B,aAAa;CACf;AACF;AAEA,MAAa,mBAAmB,EAAE,MAChC,OAAO,QAAQ,gBAAgB,EAAE,KAAK,CAAC,MAAM,SAC3C,aAAa,MAAM,GAAG,CACxB,CACF"}
@@ -19,16 +19,8 @@ async function extractPackageFile(content, packageFile) {
19
19
  const misefile = parseTomlFile(content, packageFile);
20
20
  if (!misefile) return null;
21
21
  const deps = [];
22
- for (const [name, toolData] of Object.entries(misefile.tools)) {
23
- const version = parseVersion(toolData);
24
- const { name: depName, options: optionsInName } = optionInToolNameRegex.exec(name.trim()).groups;
25
- const delimiterIndex = name.indexOf(":");
26
- const backend = depName.substring(0, delimiterIndex);
27
- const toolName = depName.substring(delimiterIndex + 1);
28
- const options = parseOptions(optionsInName, isNonEmptyObject(toolData) ? toolData : {});
29
- const dep = createDependency(depName, version, version === null ? null : getToolConfig(backend, toolName, version, options));
30
- deps.push(dep);
31
- }
22
+ for (const [name, toolData] of Object.entries(misefile.tools)) deps.push(extractToolEntry(name, toolData));
23
+ for (const taskData of Object.values(misefile.tasks)) for (const [name, toolData] of Object.entries(taskData.tools ?? {})) deps.push(extractToolEntry(name, toolData));
32
24
  if (!deps.length) return null;
33
25
  const result = { deps };
34
26
  const lockFileName = getLockFileName(packageFile);
@@ -106,6 +98,15 @@ function getConfigFromTooling(toolingSource, name, version) {
106
98
  if (!toolDefinition) return null;
107
99
  return (isFunction(toolDefinition.config) ? toolDefinition.config(version) : toolDefinition.config) ?? null;
108
100
  }
101
+ function extractToolEntry(name, toolData) {
102
+ const version = parseVersion(toolData);
103
+ const { name: depName, options: optionsInName } = optionInToolNameRegex.exec(name.trim()).groups;
104
+ const delimiterIndex = depName.indexOf(":");
105
+ const backend = depName.substring(0, delimiterIndex);
106
+ const toolName = depName.substring(delimiterIndex + 1);
107
+ const options = parseOptions(optionsInName, isNonEmptyObject(toolData) ? toolData : {});
108
+ return createDependency(depName, version, version === null ? null : getToolConfig(backend, toolName, version, options));
109
+ }
109
110
  function createDependency(name, version, config) {
110
111
  if (version === null) return {
111
112
  depName: name,