renovate 44.30.0 → 44.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/migration.js +3 -3
- package/dist/config/migration.js.map +1 -1
- package/dist/config/migrations/custom/azure-gitlab-automerge-migration.js.map +1 -1
- package/dist/config/migrations/custom/dep-types-migration.js.map +1 -1
- package/dist/config/options/env.js +2 -1
- package/dist/config/options/env.js.map +1 -1
- package/dist/config/options/index.js +1 -1
- package/dist/config/options/index.js.map +1 -1
- package/dist/global-config-option-defaults.generated.js +1 -1
- package/dist/global-config-option-defaults.generated.js.map +1 -1
- package/dist/logger/utils.js +3 -3
- package/dist/logger/utils.js.map +1 -1
- package/dist/modules/datasource/crate/index.js +3 -3
- package/dist/modules/datasource/crate/index.js.map +1 -1
- package/dist/modules/datasource/go/base.js +1 -1
- package/dist/modules/datasource/go/base.js.map +1 -1
- package/dist/modules/datasource/go/goproxy-parser.js +1 -1
- package/dist/modules/datasource/go/goproxy-parser.js.map +1 -1
- package/dist/modules/datasource/hexpm-bob/index.js +3 -3
- package/dist/modules/datasource/hexpm-bob/index.js.map +1 -1
- package/dist/modules/datasource/maven/util.js +1 -1
- package/dist/modules/datasource/maven/util.js.map +1 -1
- package/dist/modules/datasource/packagist/schema.js +2 -1
- package/dist/modules/datasource/packagist/schema.js.map +1 -1
- package/dist/modules/datasource/pypi/common.js +1 -1
- package/dist/modules/datasource/pypi/common.js.map +1 -1
- package/dist/modules/datasource/rpm/repomd.js +2 -1
- package/dist/modules/datasource/rpm/repomd.js.map +1 -1
- package/dist/modules/datasource/sbt-package/util.js +3 -3
- package/dist/modules/datasource/sbt-package/util.js.map +1 -1
- package/dist/modules/datasource/terraform-provider/index.js +1 -1
- package/dist/modules/datasource/terraform-provider/index.js.map +1 -1
- package/dist/modules/manager/ansible-galaxy/util.js +4 -4
- package/dist/modules/manager/ansible-galaxy/util.js.map +1 -1
- package/dist/modules/manager/asdf/upgradeable-tooling.js +5 -5
- package/dist/modules/manager/asdf/upgradeable-tooling.js.map +1 -1
- package/dist/modules/manager/bazel-module/extract.js +2 -1
- package/dist/modules/manager/bazel-module/extract.js.map +1 -1
- package/dist/modules/manager/bazel-module/parser/repo-rules.js +1 -1
- package/dist/modules/manager/bazel-module/parser/repo-rules.js.map +1 -1
- package/dist/modules/manager/bitbucket-pipelines/extract.js +2 -2
- package/dist/modules/manager/bitbucket-pipelines/extract.js.map +1 -1
- package/dist/modules/manager/bun/utils.js +2 -1
- package/dist/modules/manager/bun/utils.js.map +1 -1
- package/dist/modules/manager/bundler/extract.js +1 -1
- package/dist/modules/manager/bundler/extract.js.map +1 -1
- package/dist/modules/manager/cake/index.js.map +1 -1
- package/dist/modules/manager/composer/schema.js +2 -2
- package/dist/modules/manager/composer/schema.js.map +1 -1
- package/dist/modules/manager/cpanfile/language.js.map +1 -1
- package/dist/modules/manager/cpanfile/parser.js +4 -4
- package/dist/modules/manager/cpanfile/parser.js.map +1 -1
- package/dist/modules/manager/crossplane/extract.js +2 -1
- package/dist/modules/manager/crossplane/extract.js.map +1 -1
- package/dist/modules/manager/deps-edn/extract.js +1 -1
- package/dist/modules/manager/deps-edn/extract.js.map +1 -1
- package/dist/modules/manager/deps-edn/parser.js.map +1 -1
- package/dist/modules/manager/dockerfile/extract.js +2 -2
- package/dist/modules/manager/dockerfile/extract.js.map +1 -1
- package/dist/modules/manager/flux/extract.js +2 -2
- package/dist/modules/manager/flux/extract.js.map +1 -1
- package/dist/modules/manager/git-submodules/extract.js +1 -1
- package/dist/modules/manager/git-submodules/extract.js.map +1 -1
- package/dist/modules/manager/gomod/artifacts.js +1 -1
- package/dist/modules/manager/gomod/artifacts.js.map +1 -1
- package/dist/modules/manager/gradle/extract/consistent-versions-plugin.js +2 -2
- package/dist/modules/manager/gradle/extract/consistent-versions-plugin.js.map +1 -1
- package/dist/modules/manager/gradle-wrapper/artifacts.js +2 -2
- package/dist/modules/manager/gradle-wrapper/artifacts.js.map +1 -1
- package/dist/modules/manager/helmv3/utils.js +2 -1
- package/dist/modules/manager/helmv3/utils.js.map +1 -1
- package/dist/modules/manager/hermit/extract.js +1 -1
- package/dist/modules/manager/hermit/extract.js.map +1 -1
- package/dist/modules/manager/homebrew/utils.js +3 -3
- package/dist/modules/manager/homebrew/utils.js.map +1 -1
- package/dist/modules/manager/jsonnet-bundler/extract.js +2 -1
- package/dist/modules/manager/jsonnet-bundler/extract.js.map +1 -1
- package/dist/modules/manager/leiningen/extract.js +2 -2
- package/dist/modules/manager/leiningen/extract.js.map +1 -1
- package/dist/modules/manager/maven-wrapper/artifacts.js +6 -6
- package/dist/modules/manager/maven-wrapper/artifacts.js.map +1 -1
- package/dist/modules/manager/mise/backends.js +3 -3
- package/dist/modules/manager/mise/backends.js.map +1 -1
- package/dist/modules/manager/mise/upgradeable-tooling.js +1 -1
- package/dist/modules/manager/mise/upgradeable-tooling.js.map +1 -1
- package/dist/modules/manager/npm/extract/common/dependency.js +2 -2
- package/dist/modules/manager/npm/extract/common/dependency.js.map +1 -1
- package/dist/modules/manager/npm/extract/post/locked-versions.js +2 -1
- package/dist/modules/manager/npm/extract/post/locked-versions.js.map +1 -1
- package/dist/modules/manager/npm/post-update/index.js +1 -1
- package/dist/modules/manager/npm/post-update/index.js.map +1 -1
- package/dist/modules/manager/npm/post-update/npm.js +2 -1
- package/dist/modules/manager/npm/post-update/npm.js.map +1 -1
- package/dist/modules/manager/npm/post-update/yarn.js +2 -2
- package/dist/modules/manager/npm/post-update/yarn.js.map +1 -1
- package/dist/modules/manager/npm/schema.js +2 -1
- package/dist/modules/manager/npm/schema.js.map +1 -1
- package/dist/modules/manager/npm/update/locked-dependency/yarn-lock/get-locked.js +2 -1
- package/dist/modules/manager/npm/update/locked-dependency/yarn-lock/get-locked.js.map +1 -1
- package/dist/modules/manager/npm/update/locked-dependency/yarn-lock/replace.js +1 -1
- package/dist/modules/manager/npm/update/locked-dependency/yarn-lock/replace.js.map +1 -1
- package/dist/modules/manager/nuget/extract.js +1 -1
- package/dist/modules/manager/nuget/extract.js.map +1 -1
- package/dist/modules/manager/nvm/extract.js +2 -1
- package/dist/modules/manager/nvm/extract.js.map +1 -1
- package/dist/modules/manager/osgi/extract.js +2 -1
- package/dist/modules/manager/osgi/extract.js.map +1 -1
- package/dist/modules/manager/pep621/processors/uv.js +2 -1
- package/dist/modules/manager/pep621/processors/uv.js.map +1 -1
- package/dist/modules/manager/pip_requirements/extract.js +1 -1
- package/dist/modules/manager/pip_requirements/extract.js.map +1 -1
- package/dist/modules/manager/pip_setup/extract.js +3 -3
- package/dist/modules/manager/pip_setup/extract.js.map +1 -1
- package/dist/modules/manager/pixi/schema.js +2 -1
- package/dist/modules/manager/pixi/schema.js.map +1 -1
- package/dist/modules/manager/setup-cfg/extract.js +1 -1
- package/dist/modules/manager/setup-cfg/extract.js.map +1 -1
- package/dist/modules/manager/sveltos/util.js +1 -1
- package/dist/modules/manager/sveltos/util.js.map +1 -1
- package/dist/modules/manager/typst/extract.js +2 -2
- package/dist/modules/manager/typst/extract.js.map +1 -1
- package/dist/modules/platform/azure/issue.js +2 -1
- package/dist/modules/platform/azure/issue.js.map +1 -1
- package/dist/modules/platform/bitbucket/index.js +1 -1
- package/dist/modules/platform/bitbucket/index.js.map +1 -1
- package/dist/modules/platform/bitbucket/schema.js +2 -1
- package/dist/modules/platform/bitbucket/schema.js.map +1 -1
- package/dist/modules/platform/codecommit/codecommit-client.js +2 -1
- package/dist/modules/platform/codecommit/codecommit-client.js.map +1 -1
- package/dist/modules/platform/gerrit/utils.js +1 -1
- package/dist/modules/platform/gerrit/utils.js.map +1 -1
- package/dist/modules/platform/github/index.js +8 -8
- package/dist/modules/platform/github/index.js.map +1 -1
- package/dist/modules/platform/github/massage-markdown-links.js +6 -3
- package/dist/modules/platform/github/massage-markdown-links.js.map +1 -1
- package/dist/modules/versioning/apk/index.js +15 -15
- package/dist/modules/versioning/apk/index.js.map +1 -1
- package/dist/modules/versioning/bazel-module/bzlmod-version.js +3 -2
- package/dist/modules/versioning/bazel-module/bzlmod-version.js.map +1 -1
- package/dist/modules/versioning/bazel-module/index.js +2 -1
- package/dist/modules/versioning/bazel-module/index.js.map +1 -1
- package/dist/modules/versioning/composer/index.js +2 -2
- package/dist/modules/versioning/composer/index.js.map +1 -1
- package/dist/modules/versioning/conan/range.js +4 -3
- package/dist/modules/versioning/conan/range.js.map +1 -1
- package/dist/modules/versioning/conda/index.js +4 -3
- package/dist/modules/versioning/conda/index.js.map +1 -1
- package/dist/modules/versioning/distro.js +2 -1
- package/dist/modules/versioning/distro.js.map +1 -1
- package/dist/modules/versioning/generic.js +2 -1
- package/dist/modules/versioning/generic.js.map +1 -1
- package/dist/modules/versioning/hashicorp/convertor.js +1 -1
- package/dist/modules/versioning/hashicorp/convertor.js.map +1 -1
- package/dist/modules/versioning/npm/range.js +1 -1
- package/dist/modules/versioning/npm/range.js.map +1 -1
- package/dist/modules/versioning/nuget/range.js +2 -1
- package/dist/modules/versioning/nuget/range.js.map +1 -1
- package/dist/modules/versioning/perl/index.js +1 -1
- package/dist/modules/versioning/perl/index.js.map +1 -1
- package/dist/modules/versioning/poetry/transform.js +2 -2
- package/dist/modules/versioning/poetry/transform.js.map +1 -1
- package/dist/modules/versioning/rez/pattern.js.map +1 -1
- package/dist/modules/versioning/ruby/index.js +1 -1
- package/dist/modules/versioning/ruby/index.js.map +1 -1
- package/dist/modules/versioning/semver/index.js +2 -1
- package/dist/modules/versioning/semver/index.js.map +1 -1
- package/dist/modules/versioning/semver-coerced/index.js +1 -1
- package/dist/modules/versioning/semver-coerced/index.js.map +1 -1
- package/dist/util/emoji.js.map +1 -1
- package/dist/util/exec/containerbase.js +2 -1
- package/dist/util/exec/containerbase.js.map +1 -1
- package/dist/util/exec/env.js +2 -1
- package/dist/util/exec/env.js.map +1 -1
- package/dist/util/git/private-key.js +1 -1
- package/dist/util/git/private-key.js.map +1 -1
- package/dist/util/github/graphql/datasource-fetcher.js +2 -1
- package/dist/util/github/graphql/datasource-fetcher.js.map +1 -1
- package/dist/util/http/forgejo.js +2 -1
- package/dist/util/http/forgejo.js.map +1 -1
- package/dist/util/http/gitea.js +2 -1
- package/dist/util/http/gitea.js.map +1 -1
- package/dist/util/number.js +2 -1
- package/dist/util/number.js.map +1 -1
- package/dist/util/string-match.js +1 -1
- package/dist/util/string-match.js.map +1 -1
- package/dist/util/url.js +2 -2
- package/dist/util/url.js.map +1 -1
- package/dist/workers/global/config/parse/cli.js +1 -1
- package/dist/workers/global/config/parse/cli.js.map +1 -1
- package/dist/workers/global/config/parse/coersions.js +2 -1
- package/dist/workers/global/config/parse/coersions.js.map +1 -1
- package/dist/workers/global/config/parse/host-rules-from-env.js +2 -1
- package/dist/workers/global/config/parse/host-rules-from-env.js.map +1 -1
- package/dist/workers/repository/model/commit-message.js +2 -1
- package/dist/workers/repository/model/commit-message.js.map +1 -1
- package/dist/workers/repository/model/semantic-commit-message.js +2 -1
- package/dist/workers/repository/model/semantic-commit-message.js.map +1 -1
- package/dist/workers/repository/update/pr/changelog/common.js +1 -1
- package/dist/workers/repository/update/pr/changelog/common.js.map +1 -1
- package/dist/workers/repository/updates/generate.js +1 -1
- package/dist/workers/repository/updates/generate.js.map +1 -1
- package/package.json +1 -1
- package/renovate-schema.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { regEx } from "../../../util/regex.js";
|
|
1
2
|
import { logger } from "../../../logger/index.js";
|
|
2
3
|
import { LooseArray, LooseRecord, Nullish } from "../../../util/schema-utils/index.js";
|
|
3
4
|
import { MaybeTimestamp } from "../../../util/timestamp.js";
|
|
@@ -63,7 +64,7 @@ function extractReleaseResult(...composerReleasesArrays) {
|
|
|
63
64
|
let deprecationMessage;
|
|
64
65
|
for (const composerReleasesArray of composerReleasesArrays) for (const composerRelease of composerReleasesArray) {
|
|
65
66
|
const dep = {
|
|
66
|
-
version: composerRelease.version.replace(/^v
|
|
67
|
+
version: composerRelease.version.replace(regEx(/^v/), ""),
|
|
67
68
|
gitRef: composerRelease.version
|
|
68
69
|
};
|
|
69
70
|
const releaseTimestamp = composerRelease["published-time"] ?? composerRelease.time;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/packagist/schema.ts"],"sourcesContent":["import { isString, isUndefined } from '@sindresorhus/is';\nimport { z } from 'zod/v4';\nimport { logger } from '../../../logger/index.ts';\nimport {\n LooseArray,\n LooseRecord,\n Nullish,\n} from '../../../util/schema-utils/index.ts';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\nimport type { Release, ReleaseResult } from '../types.ts';\n\nexport const MinifiedArray = z\n .array(z.record(z.string(), z.unknown()))\n .transform((xs) => {\n // Ported from: https://github.com/composer/metadata-minifier/blob/main/src/MetadataMinifier.php#L17\n if (xs.length === 0) {\n return xs;\n }\n\n const prevVals: Record<string, unknown> = {};\n for (const x of xs) {\n for (const key of Object.keys(x)) {\n prevVals[key] ??= undefined;\n }\n\n for (const key of Object.keys(prevVals)) {\n const val = x[key];\n if (val === '__unset') {\n delete x[key];\n prevVals[key] = undefined;\n continue;\n }\n\n if (!isUndefined(val)) {\n prevVals[key] = val;\n continue;\n }\n\n if (!isUndefined(prevVals[key])) {\n x[key] = prevVals[key];\n continue;\n }\n }\n }\n\n return xs;\n });\nexport type MinifiedArray = z.infer<typeof MinifiedArray>;\n\nexport const ComposerRelease = z.object({\n version: z.union([z.string(), z.number().transform((v) => v.toString())]),\n homepage: z.string().nullable().catch(null),\n source: z.object({ url: z.string() }).nullable().catch(null),\n time: MaybeTimestamp,\n ['published-time']: Nullish(MaybeTimestamp),\n require: z.object({ php: z.string() }).nullable().catch(null),\n abandoned: z.union([z.string(), z.boolean()]).optional().catch(undefined),\n});\nexport type ComposerRelease = z.infer<typeof ComposerRelease>;\n\nexport const ComposerReleases = z\n .union([\n MinifiedArray.pipe(LooseArray(ComposerRelease)),\n LooseRecord(ComposerRelease).transform((map) => Object.values(map)),\n ])\n .catch([]);\nexport type ComposerReleases = z.infer<typeof ComposerReleases>;\n\nexport const ComposerPackagesResponse = z\n .object({\n packageName: z.string(),\n packagesResponse: z.object({\n packages: z.record(z.string(), z.unknown()),\n }),\n })\n .transform(\n ({ packageName, packagesResponse }) =>\n packagesResponse.packages[packageName],\n )\n .transform((xs) => ComposerReleases.parse(xs));\nexport type ComposerPackagesResponse = z.infer<typeof ComposerPackagesResponse>;\n\nexport function parsePackagesResponse(\n packageName: string,\n packagesResponse: unknown,\n): ComposerReleases {\n try {\n return ComposerPackagesResponse.parse({ packageName, packagesResponse });\n } catch (err) {\n logger.debug(\n { packageName, err },\n `Error parsing packagist response for ${packageName}`,\n );\n return [];\n }\n}\n\nexport function extractReleaseResult(\n ...composerReleasesArrays: ComposerReleases[]\n): ReleaseResult | null {\n const releases: Release[] = [];\n let homepage: string | null | undefined;\n let sourceUrl: string | null | undefined;\n let deprecationMessage: string | undefined;\n\n for (const composerReleasesArray of composerReleasesArrays) {\n for (const composerRelease of composerReleasesArray) {\n const version = composerRelease.version.replace(/^v/, '');\n const gitRef = composerRelease.version;\n\n const dep: Release = { version, gitRef };\n\n // Packagist's `published-time` reflects when the version was actually published to the registry;\n // prefer it over `time` (the git tag's `releasedAt`, which could be when the commit that the tag points at was pushed, not the time the release itself was made public to the world), falling back when absent.\n const releaseTimestamp =\n composerRelease['published-time'] ?? composerRelease.time;\n if (releaseTimestamp) {\n dep.releaseTimestamp = releaseTimestamp;\n }\n\n if (composerRelease.require?.php) {\n dep.constraints = { php: [composerRelease.require.php] };\n }\n\n if (composerRelease.abandoned) {\n dep.isDeprecated = true;\n deprecationMessage ??= getAbandonedMessage(composerRelease.abandoned);\n // TODO #44060 when `abandoned` is a package name, emit replacementName/replacementVersion to open a replacement PR\n }\n\n releases.push(dep);\n\n if (!homepage && composerRelease.homepage) {\n homepage = composerRelease.homepage;\n }\n\n if (!sourceUrl && composerRelease.source?.url) {\n sourceUrl = composerRelease.source.url;\n }\n }\n }\n\n if (releases.length === 0) {\n return null;\n }\n\n const result: ReleaseResult = { releases };\n\n if (homepage) {\n result.homepage = homepage;\n }\n\n if (sourceUrl) {\n result.sourceUrl = sourceUrl;\n }\n\n if (deprecationMessage) {\n result.deprecationMessage = deprecationMessage;\n }\n\n return result;\n}\n\nfunction getAbandonedMessage(abandoned: string | boolean): string {\n const message = 'This package is abandoned and no longer maintained.';\n if (isString(abandoned)) {\n return `${message} The author suggests using the \\`${abandoned}\\` package instead.`;\n }\n return message;\n}\n\nexport function extractDepReleases(\n composerReleases: unknown,\n): ReleaseResult | null {\n const parsedReleases = ComposerReleases.parse(composerReleases);\n return extractReleaseResult(parsedReleases);\n}\n\nexport function parsePackagesResponses(\n packageName: string,\n packagesResponses: unknown[],\n): ReleaseResult | null {\n const releaseArrays = packagesResponses.map((pkgResp) =>\n parsePackagesResponse(packageName, pkgResp),\n );\n return extractReleaseResult(...releaseArrays);\n}\n\nexport const HashSpec = z.union([\n z\n .object({ sha256: z.string().nullable() })\n .transform(({ sha256 }) => ({ hash: sha256 })),\n z\n .object({ sha1: z.string().nullable() })\n .transform(({ sha1 }) => ({ hash: sha1 })),\n]);\nexport type HashSpec = z.infer<typeof HashSpec>;\n\nexport const RegistryFile = z.intersection(\n HashSpec,\n z.object({ key: z.string() }),\n);\nexport type RegistryFile = z.infer<typeof RegistryFile>;\n\nexport const PackagesResponse = z.object({\n packages: LooseRecord(ComposerReleases).catch({}),\n});\nexport type PackagesResponse = z.infer<typeof PackagesResponse>;\n\nexport const PackagistFile = PackagesResponse.merge(\n z.object({\n providers: LooseRecord(HashSpec)\n .transform((x) =>\n Object.fromEntries(\n Object.entries(x).map(([key, { hash }]) => [key, hash]),\n ),\n )\n .catch({}),\n }),\n);\nexport type PackagistFile = z.infer<typeof PackagistFile>;\n\nexport const RegistryMeta = z\n .record(z.string(), z.unknown())\n .catch({})\n .pipe(\n PackagistFile.merge(\n z.object({\n ['includes']: LooseRecord(HashSpec)\n .transform((x) =>\n Object.entries(x).map(([name, { hash }]) => ({ key: name, hash })),\n )\n .catch([]),\n ['provider-includes']: LooseRecord(HashSpec)\n .transform((x) =>\n Object.entries(x).map(([key, { hash }]) => ({ key, hash })),\n )\n .catch([]),\n ['providers-lazy-url']: z.string().nullable().catch(null),\n ['providers-url']: z.string().nullable().catch(null),\n ['metadata-url']: z.string().nullable().catch(null),\n ['available-packages']: z.array(z.string()).nullable().catch(null),\n }),\n ),\n )\n .transform(\n ({\n ['includes']: includesFiles,\n ['packages']: packages,\n ['provider-includes']: files,\n ['providers']: providerPackages,\n ['providers-lazy-url']: providersLazyUrl,\n ['providers-url']: providersUrl,\n ['metadata-url']: metadataUrl,\n ['available-packages']: availablePackages,\n }) => {\n const includesPackages: Record<string, ReleaseResult | null> = {};\n return {\n packages,\n includesFiles,\n providerPackages,\n files,\n providersUrl,\n providersLazyUrl,\n metadataUrl,\n includesPackages,\n availablePackages,\n };\n },\n );\nexport type RegistryMeta = z.infer<typeof RegistryMeta>;\n"],"mappings":";;;;;;AAWA,MAAa,gBAAgB,EAC1B,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CACxC,WAAW,OAAO;CAEjB,IAAI,GAAG,WAAW,GAChB,OAAO;CAGT,MAAM,WAAoC,CAAC;CAC3C,KAAK,MAAM,KAAK,IAAI;EAClB,KAAK,MAAM,OAAO,OAAO,KAAK,CAAC,GAC7B,SAAS,SAAS,KAAA;EAGpB,KAAK,MAAM,OAAO,OAAO,KAAK,QAAQ,GAAG;GACvC,MAAM,MAAM,EAAE;GACd,IAAI,QAAQ,WAAW;IACrB,OAAO,EAAE;IACT,SAAS,OAAO,KAAA;IAChB;GACF;GAEA,IAAI,CAAC,YAAY,GAAG,GAAG;IACrB,SAAS,OAAO;IAChB;GACF;GAEA,IAAI,CAAC,YAAY,SAAS,IAAI,GAAG;IAC/B,EAAE,OAAO,SAAS;IAClB;GACF;EACF;CACF;CAEA,OAAO;AACT,CAAC;AAGH,MAAa,kBAAkB,EAAE,OAAO;CAC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C,SAAS,CAAC,CAAC,MAAM,IAAI;EAClD,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI;EACjD,uBAAuB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI;AACnE,CAAC,CACH,CACF,CAAC,CACA,WACE,GACE,aAAa,gBACb,aAAa,WACb,sBAAsB,QACtB,cAAc,mBACd,uBAAuB,mBACvB,kBAAkB,eAClB,iBAAiB,cACjB,uBAAuB,wBACpB;CAEJ,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAAA,CAAe;EACf;CACF;AACF,CACF"}
|
|
1
|
+
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/packagist/schema.ts"],"sourcesContent":["import { isString, isUndefined } from '@sindresorhus/is';\nimport { z } from 'zod/v4';\nimport { logger } from '../../../logger/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport {\n LooseArray,\n LooseRecord,\n Nullish,\n} from '../../../util/schema-utils/index.ts';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\nimport type { Release, ReleaseResult } from '../types.ts';\n\nexport const MinifiedArray = z\n .array(z.record(z.string(), z.unknown()))\n .transform((xs) => {\n // Ported from: https://github.com/composer/metadata-minifier/blob/main/src/MetadataMinifier.php#L17\n if (xs.length === 0) {\n return xs;\n }\n\n const prevVals: Record<string, unknown> = {};\n for (const x of xs) {\n for (const key of Object.keys(x)) {\n prevVals[key] ??= undefined;\n }\n\n for (const key of Object.keys(prevVals)) {\n const val = x[key];\n if (val === '__unset') {\n delete x[key];\n prevVals[key] = undefined;\n continue;\n }\n\n if (!isUndefined(val)) {\n prevVals[key] = val;\n continue;\n }\n\n if (!isUndefined(prevVals[key])) {\n x[key] = prevVals[key];\n continue;\n }\n }\n }\n\n return xs;\n });\nexport type MinifiedArray = z.infer<typeof MinifiedArray>;\n\nexport const ComposerRelease = z.object({\n version: z.union([z.string(), z.number().transform((v) => v.toString())]),\n homepage: z.string().nullable().catch(null),\n source: z.object({ url: z.string() }).nullable().catch(null),\n time: MaybeTimestamp,\n ['published-time']: Nullish(MaybeTimestamp),\n require: z.object({ php: z.string() }).nullable().catch(null),\n abandoned: z.union([z.string(), z.boolean()]).optional().catch(undefined),\n});\nexport type ComposerRelease = z.infer<typeof ComposerRelease>;\n\nexport const ComposerReleases = z\n .union([\n MinifiedArray.pipe(LooseArray(ComposerRelease)),\n LooseRecord(ComposerRelease).transform((map) => Object.values(map)),\n ])\n .catch([]);\nexport type ComposerReleases = z.infer<typeof ComposerReleases>;\n\nexport const ComposerPackagesResponse = z\n .object({\n packageName: z.string(),\n packagesResponse: z.object({\n packages: z.record(z.string(), z.unknown()),\n }),\n })\n .transform(\n ({ packageName, packagesResponse }) =>\n packagesResponse.packages[packageName],\n )\n .transform((xs) => ComposerReleases.parse(xs));\nexport type ComposerPackagesResponse = z.infer<typeof ComposerPackagesResponse>;\n\nexport function parsePackagesResponse(\n packageName: string,\n packagesResponse: unknown,\n): ComposerReleases {\n try {\n return ComposerPackagesResponse.parse({ packageName, packagesResponse });\n } catch (err) {\n logger.debug(\n { packageName, err },\n `Error parsing packagist response for ${packageName}`,\n );\n return [];\n }\n}\n\nexport function extractReleaseResult(\n ...composerReleasesArrays: ComposerReleases[]\n): ReleaseResult | null {\n const releases: Release[] = [];\n let homepage: string | null | undefined;\n let sourceUrl: string | null | undefined;\n let deprecationMessage: string | undefined;\n\n for (const composerReleasesArray of composerReleasesArrays) {\n for (const composerRelease of composerReleasesArray) {\n const version = composerRelease.version.replace(regEx(/^v/), '');\n const gitRef = composerRelease.version;\n\n const dep: Release = { version, gitRef };\n\n // Packagist's `published-time` reflects when the version was actually published to the registry;\n // prefer it over `time` (the git tag's `releasedAt`, which could be when the commit that the tag points at was pushed, not the time the release itself was made public to the world), falling back when absent.\n const releaseTimestamp =\n composerRelease['published-time'] ?? composerRelease.time;\n if (releaseTimestamp) {\n dep.releaseTimestamp = releaseTimestamp;\n }\n\n if (composerRelease.require?.php) {\n dep.constraints = { php: [composerRelease.require.php] };\n }\n\n if (composerRelease.abandoned) {\n dep.isDeprecated = true;\n deprecationMessage ??= getAbandonedMessage(composerRelease.abandoned);\n // TODO #44060 when `abandoned` is a package name, emit replacementName/replacementVersion to open a replacement PR\n }\n\n releases.push(dep);\n\n if (!homepage && composerRelease.homepage) {\n homepage = composerRelease.homepage;\n }\n\n if (!sourceUrl && composerRelease.source?.url) {\n sourceUrl = composerRelease.source.url;\n }\n }\n }\n\n if (releases.length === 0) {\n return null;\n }\n\n const result: ReleaseResult = { releases };\n\n if (homepage) {\n result.homepage = homepage;\n }\n\n if (sourceUrl) {\n result.sourceUrl = sourceUrl;\n }\n\n if (deprecationMessage) {\n result.deprecationMessage = deprecationMessage;\n }\n\n return result;\n}\n\nfunction getAbandonedMessage(abandoned: string | boolean): string {\n const message = 'This package is abandoned and no longer maintained.';\n if (isString(abandoned)) {\n return `${message} The author suggests using the \\`${abandoned}\\` package instead.`;\n }\n return message;\n}\n\nexport function extractDepReleases(\n composerReleases: unknown,\n): ReleaseResult | null {\n const parsedReleases = ComposerReleases.parse(composerReleases);\n return extractReleaseResult(parsedReleases);\n}\n\nexport function parsePackagesResponses(\n packageName: string,\n packagesResponses: unknown[],\n): ReleaseResult | null {\n const releaseArrays = packagesResponses.map((pkgResp) =>\n parsePackagesResponse(packageName, pkgResp),\n );\n return extractReleaseResult(...releaseArrays);\n}\n\nexport const HashSpec = z.union([\n z\n .object({ sha256: z.string().nullable() })\n .transform(({ sha256 }) => ({ hash: sha256 })),\n z\n .object({ sha1: z.string().nullable() })\n .transform(({ sha1 }) => ({ hash: sha1 })),\n]);\nexport type HashSpec = z.infer<typeof HashSpec>;\n\nexport const RegistryFile = z.intersection(\n HashSpec,\n z.object({ key: z.string() }),\n);\nexport type RegistryFile = z.infer<typeof RegistryFile>;\n\nexport const PackagesResponse = z.object({\n packages: LooseRecord(ComposerReleases).catch({}),\n});\nexport type PackagesResponse = z.infer<typeof PackagesResponse>;\n\nexport const PackagistFile = PackagesResponse.merge(\n z.object({\n providers: LooseRecord(HashSpec)\n .transform((x) =>\n Object.fromEntries(\n Object.entries(x).map(([key, { hash }]) => [key, hash]),\n ),\n )\n .catch({}),\n }),\n);\nexport type PackagistFile = z.infer<typeof PackagistFile>;\n\nexport const RegistryMeta = z\n .record(z.string(), z.unknown())\n .catch({})\n .pipe(\n PackagistFile.merge(\n z.object({\n ['includes']: LooseRecord(HashSpec)\n .transform((x) =>\n Object.entries(x).map(([name, { hash }]) => ({ key: name, hash })),\n )\n .catch([]),\n ['provider-includes']: LooseRecord(HashSpec)\n .transform((x) =>\n Object.entries(x).map(([key, { hash }]) => ({ key, hash })),\n )\n .catch([]),\n ['providers-lazy-url']: z.string().nullable().catch(null),\n ['providers-url']: z.string().nullable().catch(null),\n ['metadata-url']: z.string().nullable().catch(null),\n ['available-packages']: z.array(z.string()).nullable().catch(null),\n }),\n ),\n )\n .transform(\n ({\n ['includes']: includesFiles,\n ['packages']: packages,\n ['provider-includes']: files,\n ['providers']: providerPackages,\n ['providers-lazy-url']: providersLazyUrl,\n ['providers-url']: providersUrl,\n ['metadata-url']: metadataUrl,\n ['available-packages']: availablePackages,\n }) => {\n const includesPackages: Record<string, ReleaseResult | null> = {};\n return {\n packages,\n includesFiles,\n providerPackages,\n files,\n providersUrl,\n providersLazyUrl,\n metadataUrl,\n includesPackages,\n availablePackages,\n };\n },\n );\nexport type RegistryMeta = z.infer<typeof RegistryMeta>;\n"],"mappings":";;;;;;;AAYA,MAAa,gBAAgB,EAC1B,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CACxC,WAAW,OAAO;CAEjB,IAAI,GAAG,WAAW,GAChB,OAAO;CAGT,MAAM,WAAoC,CAAC;CAC3C,KAAK,MAAM,KAAK,IAAI;EAClB,KAAK,MAAM,OAAO,OAAO,KAAK,CAAC,GAC7B,SAAS,SAAS,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AC,CAAC,KAAK,CAAC,MAAM,EAAE,aAAa;EAAE,KAAK;EAAM;CAAK,EAAE,CACnE,CAAC,CACA,MAAM,CAAC,CAAC;EACV,sBAAsB,YAAY,QAAQ,CAAC,CACzC,WAAW,MACV,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,aAAa;EAAE;EAAK;CAAK,EAAE,CAC5D,CAAC,CACA,MAAM,CAAC,CAAC;EACV,uBAAuB,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI;EACvD,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI;EAClD,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI;EACjD,uBAAuB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI;AACnE,CAAC,CACH,CACF,CAAC,CACA,WACE,GACE,aAAa,gBACb,aAAa,WACb,sBAAsB,QACtB,cAAc,mBACd,uBAAuB,mBACvB,kBAAkB,eAClB,iBAAiB,cACjB,uBAAuB,wBACpB;CAEJ,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAAA,CAAe;EACf;CACF;AACF,CACF"}
|
|
@@ -6,7 +6,7 @@ function isGitHubRepo(url) {
|
|
|
6
6
|
return !!m && m[1] !== "sponsors";
|
|
7
7
|
}
|
|
8
8
|
function normalizePythonDepName(name) {
|
|
9
|
-
return name.replace(/[-_.]+/g, "-").toLowerCase();
|
|
9
|
+
return name.replace(regEx(/[-_.]+/g), "-").toLowerCase();
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
12
|
export { isGitHubRepo, normalizePythonDepName };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","names":[],"sources":["../../../../lib/modules/datasource/pypi/common.ts"],"sourcesContent":["import { regEx } from '../../../util/regex.ts';\n\nconst githubRepoPattern = regEx(/^https?:\\/\\/github\\.com\\/([^/]+)\\/[^/]+$/);\n\nexport function isGitHubRepo(url: string): boolean {\n const m = url.match(githubRepoPattern);\n return !!m && m[1] !== 'sponsors';\n}\n\n// https://packaging.python.org/en/latest/specifications/name-normalization/\nexport function normalizePythonDepName(name: string): string {\n return name.replace(/[-_.]+/g, '-').toLowerCase();\n}\n"],"mappings":";;AAEA,MAAM,oBAAoB,MAAM,0CAA0C;AAE1E,SAAgB,aAAa,KAAsB;CACjD,MAAM,IAAI,IAAI,MAAM,iBAAiB;CACrC,OAAO,CAAC,CAAC,KAAK,EAAE,OAAO;AACzB;AAGA,SAAgB,uBAAuB,MAAsB;CAC3D,OAAO,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"common.js","names":[],"sources":["../../../../lib/modules/datasource/pypi/common.ts"],"sourcesContent":["import { regEx } from '../../../util/regex.ts';\n\nconst githubRepoPattern = regEx(/^https?:\\/\\/github\\.com\\/([^/]+)\\/[^/]+$/);\n\nexport function isGitHubRepo(url: string): boolean {\n const m = url.match(githubRepoPattern);\n return !!m && m[1] !== 'sponsors';\n}\n\n// https://packaging.python.org/en/latest/specifications/name-normalization/\nexport function normalizePythonDepName(name: string): string {\n return name.replace(regEx(/[-_.]+/g), '-').toLowerCase();\n}\n"],"mappings":";;AAEA,MAAM,oBAAoB,MAAM,0CAA0C;AAE1E,SAAgB,aAAa,KAAsB;CACjD,MAAM,IAAI,IAAI,MAAM,iBAAiB;CACrC,OAAO,CAAC,CAAC,KAAK,EAAE,OAAO;AACzB;AAGA,SAAgB,uBAAuB,MAAsB;CAC3D,OAAO,KAAK,QAAQ,MAAM,SAAS,GAAG,GAAG,CAAC,CAAC,YAAY;AACzD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { regEx } from "../../../util/regex.js";
|
|
1
2
|
import { logger } from "../../../logger/index.js";
|
|
2
3
|
import { joinUrlParts } from "../../../util/url.js";
|
|
3
4
|
import { repomdXmlFileName } from "./common.js";
|
|
@@ -10,7 +11,7 @@ function getPrimaryRepodataUrl(xml, registryUrl, repomdUrl) {
|
|
|
10
11
|
if (!locationElement) throw new Error(`No location element found in ${repomdUrl}`);
|
|
11
12
|
const href = locationElement.attr.href;
|
|
12
13
|
if (!href) throw new Error(`No href found in ${repomdUrl}`);
|
|
13
|
-
const registryUrlWithoutRepodata = registryUrl.replace(/\/repodata
|
|
14
|
+
const registryUrlWithoutRepodata = registryUrl.replace(regEx(/\/repodata\/?$/), "/");
|
|
14
15
|
return joinUrlParts(registryUrlWithoutRepodata, href);
|
|
15
16
|
}
|
|
16
17
|
async function fetchPrimaryGzipUrl(http, registryUrl) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repomd.js","names":[],"sources":["../../../../lib/modules/datasource/rpm/repomd.ts"],"sourcesContent":["import { XmlDocument } from 'xmldoc';\nimport { logger } from '../../../logger/index.ts';\nimport type { Http } from '../../../util/http/index.ts';\nimport { joinUrlParts } from '../../../util/url.ts';\nimport { datasource, repomdXmlFileName } from './common.ts';\n\nfunction getPrimaryRepodataUrl(\n xml: XmlDocument,\n registryUrl: string,\n repomdUrl: string,\n): string {\n const primaryData = xml.childWithAttribute('type', 'primary');\n\n if (!primaryData) {\n throw new Error(`No primary data found in ${repomdUrl}`);\n }\n\n const locationElement = primaryData.childNamed('location');\n if (!locationElement) {\n throw new Error(`No location element found in ${repomdUrl}`);\n }\n\n const href = locationElement.attr.href;\n if (!href) {\n throw new Error(`No href found in ${repomdUrl}`);\n }\n\n // replace trailing \"repodata/\" from registryUrl, if it exists, with a \"/\"\n // because href includes \"repodata/\"\n const registryUrlWithoutRepodata = registryUrl.replace(/\\/repodata
|
|
1
|
+
{"version":3,"file":"repomd.js","names":[],"sources":["../../../../lib/modules/datasource/rpm/repomd.ts"],"sourcesContent":["import { XmlDocument } from 'xmldoc';\nimport { logger } from '../../../logger/index.ts';\nimport type { Http } from '../../../util/http/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { joinUrlParts } from '../../../util/url.ts';\nimport { datasource, repomdXmlFileName } from './common.ts';\n\nfunction getPrimaryRepodataUrl(\n xml: XmlDocument,\n registryUrl: string,\n repomdUrl: string,\n): string {\n const primaryData = xml.childWithAttribute('type', 'primary');\n\n if (!primaryData) {\n throw new Error(`No primary data found in ${repomdUrl}`);\n }\n\n const locationElement = primaryData.childNamed('location');\n if (!locationElement) {\n throw new Error(`No location element found in ${repomdUrl}`);\n }\n\n const href = locationElement.attr.href;\n if (!href) {\n throw new Error(`No href found in ${repomdUrl}`);\n }\n\n // replace trailing \"repodata/\" from registryUrl, if it exists, with a \"/\"\n // because href includes \"repodata/\"\n const registryUrlWithoutRepodata = registryUrl.replace(\n regEx(/\\/repodata\\/?$/),\n '/',\n );\n\n return joinUrlParts(registryUrlWithoutRepodata, href);\n}\n\nexport async function fetchPrimaryGzipUrl(\n http: Http,\n registryUrl: string,\n): Promise<string> {\n const repomdUrl = joinUrlParts(registryUrl, repomdXmlFileName);\n const response = await http.getText(repomdUrl.toString());\n const repomdBody = response.body.trimStart();\n\n // repomd.xml may omit the XML declaration and start directly with the root element\n if (!(repomdBody.startsWith('<?xml') || repomdBody.startsWith('<repomd'))) {\n logger.debug({ datasource, url: repomdUrl }, 'Invalid response format');\n throw new Error(\n `${repomdUrl} is not in XML format. Response body: ${response.body}`,\n );\n }\n\n const xml = new XmlDocument(repomdBody);\n\n try {\n return getPrimaryRepodataUrl(xml, registryUrl, repomdUrl.toString());\n } catch (err) {\n if (\n err instanceof Error &&\n err.message.startsWith('No primary data found')\n ) {\n logger.debug(\n `No primary data found in ${repomdUrl}, xml contents: ${response.body}`,\n );\n }\n\n throw err;\n }\n}\n"],"mappings":";;;;;;AAOA,SAAS,sBACP,KACA,aACA,WACQ;CACR,MAAM,cAAc,IAAI,mBAAmB,QAAQ,SAAS;CAE5D,IAAI,CAAC,aACH,MAAM,IAAI,MAAM,4BAA4B,WAAW;CAGzD,MAAM,kBAAkB,YAAY,WAAW,UAAU;CACzD,IAAI,CAAC,iBACH,MAAM,IAAI,MAAM,gCAAgC,WAAW;CAG7D,MAAM,OAAO,gBAAgB,KAAK;CAClC,IAAI,CAAC,MACH,MAAM,IAAI,MAAM,oBAAoB,WAAW;CAKjD,MAAM,6BAA6B,YAAY,QAC7C,MAAM,gBAAgB,GACtB,GACF;CAEA,OAAO,aAAa,4BAA4B,IAAI;AACtD;AAEA,eAAsB,oBACpB,MACA,aACiB;CACjB,MAAM,YAAY,aAAa,aAAa,iBAAiB;CAC7D,MAAM,WAAW,MAAM,KAAK,QAAQ,UAAU,SAAS,CAAC;CACxD,MAAM,aAAa,SAAS,KAAK,UAAU;CAG3C,IAAI,EAAE,WAAW,WAAW,OAAO,KAAK,WAAW,WAAW,SAAS,IAAI;EACzE,OAAO,MAAM;GAAE,YAAA;GAAY,KAAK;EAAU,GAAG,yBAAyB;EACtE,MAAM,IAAI,MACR,GAAG,UAAU,wCAAwC,SAAS,MAChE;CACF;CAEA,MAAM,MAAM,IAAI,YAAY,UAAU;CAEtC,IAAI;EACF,OAAO,sBAAsB,KAAK,aAAa,UAAU,SAAS,CAAC;CACrE,SAAS,KAAK;EACZ,IACE,eAAe,SACf,IAAI,QAAQ,WAAW,uBAAuB,GAE9C,OAAO,MACL,4BAA4B,UAAU,kBAAkB,SAAS,MACnE;EAGF,MAAM;CACR;AACF"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { regEx } from "../../../util/regex.js";
|
|
2
2
|
import { filterMap } from "../../../util/filter-map.js";
|
|
3
3
|
import { compare } from "../../versioning/maven/compare.js";
|
|
4
4
|
//#region lib/modules/datasource/sbt-package/util.ts
|
|
5
|
-
const linkRegExp = /
|
|
5
|
+
const linkRegExp = regEx(/href=['"](?<href>[^'"]*)\/['"]/gi);
|
|
6
6
|
function extractPageLinks(html, filterMapHref) {
|
|
7
|
-
const unfiltered =
|
|
7
|
+
const unfiltered = Array.from(html.matchAll(linkRegExp), (m) => m.groups.href);
|
|
8
8
|
return filterMap(unfiltered, filterMapHref);
|
|
9
9
|
}
|
|
10
10
|
function getLatestVersion(versions) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","names":[],"sources":["../../../../lib/modules/datasource/sbt-package/util.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"util.js","names":[],"sources":["../../../../lib/modules/datasource/sbt-package/util.ts"],"sourcesContent":["import { filterMap } from '../../../util/filter-map.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { compare } from '../../versioning/maven/compare.ts';\n\nconst linkRegExp = regEx(/href=['\"](?<href>[^'\"]*)\\/['\"]/gi);\n\nexport function extractPageLinks(\n html: string,\n filterMapHref: (href: string) => string | null | undefined,\n): string[] {\n const unfiltered = Array.from(\n html.matchAll(linkRegExp),\n (m) => m.groups!.href,\n );\n return filterMap(unfiltered, filterMapHref);\n}\n\nexport function getLatestVersion(versions: string[] | null): string | null {\n if (versions?.length) {\n return versions.reduce((latestVersion, version) =>\n compare(version, latestVersion) === 1 ? version : latestVersion,\n );\n }\n return null;\n}\n"],"mappings":";;;;AAIA,MAAM,aAAa,MAAM,kCAAkC;AAE3D,SAAgB,iBACd,MACA,eACU;CACV,MAAM,aAAa,MAAM,KACvB,KAAK,SAAS,UAAU,IACvB,MAAM,EAAE,OAAQ,IACnB;CACA,OAAO,UAAU,YAAY,aAAa;AAC5C;AAEA,SAAgB,iBAAiB,UAA0C;CACzE,IAAI,UAAU,QACZ,OAAO,SAAS,QAAQ,eAAe,YACrC,QAAQ,SAAS,aAAa,MAAM,IAAI,UAAU,aACpD;CAEF,OAAO;AACT"}
|
|
@@ -205,7 +205,7 @@ var TerraformProviderDatasource = class TerraformProviderDatasource extends Terr
|
|
|
205
205
|
}, `Failed to retrieve zip hashes from ${zipHashUrl}`);
|
|
206
206
|
return;
|
|
207
207
|
}
|
|
208
|
-
return rawHashData.trimEnd().split("\n").map((line) => line.split(/\s/)[0]);
|
|
208
|
+
return rawHashData.trimEnd().split("\n").map((line) => line.split(regEx(/\s/))[0]);
|
|
209
209
|
}
|
|
210
210
|
getZipHashes(zipHashUrl) {
|
|
211
211
|
return withCache({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["hashicorpVersioning.id","p.map","HttpError"],"sources":["../../../../lib/modules/datasource/terraform-provider/index.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { ExternalHostError } from '../../../types/errors/external-host-error.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { HttpError } from '../../../util/http/index.ts';\nimport * as p from '../../../util/promises.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { getQueryString, joinUrlParts } from '../../../util/url.ts';\nimport * as hashicorpVersioning from '../../versioning/hashicorp/index.ts';\nimport { TerraformDatasource } from '../terraform-module/base.ts';\nimport { createSDBackendURL } from '../terraform-module/utils.ts';\nimport type { GetReleasesConfig, ReleaseResult } from '../types.ts';\nimport {\n OpenTofuProviderDocsResponse,\n OpenTofuProviderPackagesResponse,\n type TerraformBuild,\n TerraformProviderReleaseBackend,\n TerraformProviderV2Response,\n TerraformProviderVersions,\n TerraformRegistryBuildResponse,\n TerraformRegistryVersions,\n VersionDetailResponse,\n} from './schema.ts';\n\nexport class TerraformProviderDatasource extends TerraformDatasource {\n static override readonly id = 'terraform-provider';\n\n static readonly hashicorpReleaseUrl = 'https://releases.hashicorp.com';\n\n static readonly defaultRegistryUrls = [\n TerraformProviderDatasource.terraformRegistryUrl,\n TerraformProviderDatasource.hashicorpReleaseUrl,\n ];\n\n static repositoryRegex = regEx(/^hashicorp\\/(?<packageName>\\S+)$/);\n\n constructor() {\n super(TerraformProviderDatasource.id);\n }\n\n override readonly defaultRegistryUrls =\n TerraformProviderDatasource.defaultRegistryUrls;\n\n override readonly defaultVersioning = hashicorpVersioning.id;\n\n override readonly registryStrategy = 'hunt';\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is only available for `registry.terraform.io` (v2 API) and `registry.opentofu.org` (via `api.opentofu.org`). Other registries using the Provider Registry Protocol do not provide timestamps.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'For `registry.terraform.io`, the source URL is taken from the `source` field of the v2 API response. For `registry.opentofu.org`, it is derived from the package name following the OpenTofu registry policy of `github.com/NAMESPACE/terraform-provider-NAME`.';\n\n private async _getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore next 3 -- should never happen */\n if (!registryUrl) {\n return null;\n }\n logger.trace(\n `terraform-provider.getDependencies() packageName: ${packageName}`,\n );\n\n if (registryUrl === TerraformProviderDatasource.terraformRegistryUrl) {\n return await this.queryTerraformRegistryV2(registryUrl, packageName);\n }\n if (\n registryUrl === TerraformProviderDatasource.openTofuRegistryUrl ||\n registryUrl === TerraformProviderDatasource.openTofuApiUrl\n ) {\n return await this.queryOpenTofuRegistry(packageName);\n }\n if (registryUrl === TerraformProviderDatasource.hashicorpReleaseUrl) {\n return await this.queryReleaseBackend(packageName, registryUrl);\n }\n\n // Fall back to the standard Provider Registry Protocol for other registries.\n return await this.queryProviderRegistry(registryUrl, packageName);\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n const url = config.registryUrl;\n const repo = TerraformProviderDatasource.getRepository(config);\n return withCache(\n {\n namespace: `datasource-${TerraformProviderDatasource.id}`,\n key: `getReleases:${url}/${repo}`,\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n private static getRepository({ packageName }: GetReleasesConfig): string {\n return packageName.includes('/') ? packageName : `hashicorp/${packageName}`;\n }\n\n /**\n * Query the Terraform Registry using the undocumented v2 JSON:API.\n *\n * Returns release timestamps for all versions, unlike the v1 API\n * which only exposed the timestamp for the latest version.\n */\n private async queryTerraformRegistryV2(\n registryUrl: string,\n packageName: string,\n ): Promise<ReleaseResult> {\n const repository = TerraformProviderDatasource.getRepository({\n packageName,\n });\n const providerUrl = `${joinUrlParts(\n registryUrl,\n 'v2/providers',\n repository,\n )}?${getQueryString({ include: 'provider-versions' })}`;\n const { body: res } = await this.http.getJson(\n providerUrl,\n TerraformProviderV2Response,\n );\n res.homepage = `${registryUrl}/providers/${repository}`;\n return res;\n }\n\n /**\n * Query the OpenTofu registry docs API.\n * https://api.opentofu.org/\n *\n * Used when the registry URL is `registry.opentofu.org`.\n * Queries `api.opentofu.org` for provider versions with release timestamps.\n */\n private async queryOpenTofuRegistry(\n packageName: string,\n ): Promise<ReleaseResult> {\n const repository = TerraformProviderDatasource.getRepository({\n packageName,\n });\n const docsUrl = joinUrlParts(\n TerraformProviderDatasource.openTofuApiUrl,\n 'registry/docs/providers',\n repository,\n 'index.json',\n );\n const { body: res } = await this.http.getJson(\n docsUrl,\n OpenTofuProviderDocsResponse,\n );\n res.homepage = `https://search.opentofu.org/provider/${repository}`;\n\n // The OpenTofu registry only indexes providers hosted on GitHub under the\n // `NAMESPACE/terraform-provider-NAME` repository naming convention, so the\n // source URL can be derived deterministically from the package name.\n // https://github.com/opentofu/registry/blob/main/PROCEDURES.md\n const [namespace, name] = repository.split('/');\n res.sourceUrl = `https://github.com/${namespace}/terraform-provider-${name}`;\n\n return res;\n }\n\n /**\n * Query a registry using the Provider Registry Protocol that all registries\n * are required to implement.\n * https://www.terraform.io/internals/provider-registry-protocol\n */\n private async queryProviderRegistry(\n registryUrl: string,\n packageName: string,\n ): Promise<ReleaseResult> {\n const repository = TerraformProviderDatasource.getRepository({\n packageName,\n });\n const serviceDiscovery =\n await this.getTerraformServiceDiscoveryResult(registryUrl);\n const backendURL = createSDBackendURL(\n registryUrl,\n 'providers.v1',\n serviceDiscovery,\n `${repository}/versions`,\n );\n const res = (await this.http.getJson(backendURL, TerraformProviderVersions))\n .body;\n const dep: ReleaseResult = {\n releases: res.versions.map(({ version }) => ({\n version,\n })),\n };\n return dep;\n }\n\n private async queryReleaseBackend(\n packageName: string,\n registryURL: string,\n ): Promise<ReleaseResult | null> {\n const hashicorpPackage = packageName.replace('hashicorp/', '');\n const backendLookUpName = `terraform-provider-${hashicorpPackage}`;\n const backendURL = joinUrlParts(\n registryURL,\n backendLookUpName,\n `index.json`,\n );\n const res = (\n await this.http.getJson(backendURL, TerraformProviderReleaseBackend)\n ).body;\n\n const dep: ReleaseResult = {\n releases: Object.keys(res.versions).map((version) => ({\n version,\n })),\n sourceUrl: joinUrlParts(\n 'https://github.com/terraform-providers',\n backendLookUpName,\n ),\n };\n return dep;\n }\n\n private async _getBuilds(\n registryURL: string,\n repository: string,\n version: string,\n ): Promise<TerraformBuild[] | null> {\n if (registryURL === TerraformProviderDatasource.hashicorpReleaseUrl) {\n // check if registryURL === secondary backend\n const repositoryRegexResult =\n TerraformProviderDatasource.repositoryRegex.exec(repository)?.groups;\n if (!repositoryRegexResult) {\n // non hashicorp builds are not supported with releases.hashicorp.com\n return null;\n }\n const packageName = repositoryRegexResult.packageName;\n const backendLookUpName = `terraform-provider-${packageName}`;\n let versionReleaseBackend: VersionDetailResponse;\n try {\n versionReleaseBackend = await this.getReleaseBackendIndex(\n backendLookUpName,\n version,\n );\n } catch (err) {\n if (err instanceof ExternalHostError) {\n throw err;\n }\n logger.debug(\n { err, backendLookUpName, version },\n `Failed to retrieve builds for ${backendLookUpName} ${version}`,\n );\n // throw an error to disable caching\n throw new ExternalHostError(err);\n }\n return versionReleaseBackend.builds;\n }\n\n // check public or private Terraform registry\n const serviceDiscovery =\n await this.getTerraformServiceDiscoveryResult(registryURL);\n if (!serviceDiscovery) {\n // throw an error to disable caching\n throw new ExternalHostError(\n new Error(`Service discovery not found for ${registryURL}`),\n );\n }\n const backendURL = createSDBackendURL(\n registryURL,\n 'providers.v1',\n serviceDiscovery,\n repository,\n );\n const versionsResponse = (\n await this.http.getJson(\n `${backendURL}/versions`,\n TerraformRegistryVersions,\n )\n ).body;\n if (!versionsResponse.versions) {\n // throw an error to disable caching\n throw new ExternalHostError(\n new Error(`Failed to retrieve version list for ${backendURL}`),\n );\n }\n const builds = versionsResponse.versions.find(\n (value) => value.version === version,\n );\n if (!builds) {\n // should never happen, but just in case\n // throw an error to disable caching\n throw new ExternalHostError(\n new Error(\n `No builds found for ${repository}:${version} on ${registryURL}`,\n ),\n );\n }\n const result = await p.map(\n builds.platforms,\n async (platform) => {\n const buildURL = `${backendURL}/${version}/download/${platform.os}/${platform.arch}`;\n try {\n const res = (\n await this.http.getJson(buildURL, TerraformRegistryBuildResponse)\n ).body;\n const newBuild: TerraformBuild = {\n name: repository,\n url: res.download_url,\n version,\n ...res,\n };\n return newBuild;\n } catch (err) {\n /* v8 ignore next 3 -- hard to test */\n if (err instanceof ExternalHostError) {\n throw err;\n }\n logger.debug({ err, url: buildURL }, 'Failed to retrieve build');\n // throw an error to disable caching\n throw new ExternalHostError(err);\n }\n },\n { concurrency: 4 },\n );\n\n return result;\n }\n\n getBuilds(\n registryURL: string,\n repository: string,\n version: string,\n ): Promise<TerraformBuild[] | null> {\n return withCache(\n {\n namespace: `datasource-${TerraformProviderDatasource.id}`,\n key: `getBuilds:${registryURL}/${repository}/${version}`,\n },\n () => this._getBuilds(registryURL, repository, version),\n );\n }\n\n /**\n * A single platform's download endpoint returns the hashes for all platforms,\n * so we query `linux/amd64` and fall back to `/versions` discovery only when a\n * provider lacks that platform (404).\n * See https://github.com/opentofu/opentofu/pull/3434\n */\n private async _getProviderPackages(\n repository: string,\n version: string,\n ): Promise<string[] | null> {\n const baseUrl = joinUrlParts(\n TerraformProviderDatasource.openTofuRegistryUrl,\n 'v1/providers',\n repository,\n );\n\n try {\n try {\n const { body } = await this.http.getJson(\n `${baseUrl}/${version}/download/linux/amd64`,\n OpenTofuProviderPackagesResponse,\n );\n return body;\n } catch (err) {\n if (!(err instanceof HttpError) || err.response?.statusCode !== 404) {\n throw err;\n }\n }\n return await this._getProviderPackagesForAvailablePlatform(\n baseUrl,\n version,\n );\n } catch (err) {\n if (err instanceof ExternalHostError) {\n throw err;\n }\n logger.debug(\n { err, repository, version },\n `Failed to retrieve provider packages for ${repository}@${version}`,\n );\n throw new ExternalHostError(err);\n }\n }\n\n /**\n * Some providers do not publish a `linux/amd64` build, so discover an\n * available platform via `/versions` and fetch its download endpoint.\n */\n private async _getProviderPackagesForAvailablePlatform(\n baseUrl: string,\n version: string,\n ): Promise<string[] | null> {\n const { body: versionsResponse } = await this.http.getJson(\n `${baseUrl}/versions`,\n TerraformRegistryVersions,\n );\n const platform = versionsResponse.versions?.find(\n (entry) => entry.version === version,\n )?.platforms?.[0];\n if (!platform) {\n return null;\n }\n const { body: hashes } = await this.http.getJson(\n `${baseUrl}/${version}/download/${platform.os}/${platform.arch}`,\n OpenTofuProviderPackagesResponse,\n );\n return hashes;\n }\n\n getProviderPackages(\n repository: string,\n version: string,\n ): Promise<string[] | null> {\n return withCache(\n {\n namespace: `datasource-${TerraformProviderDatasource.id}`,\n key: `getProviderPackages:${repository}/${version}`,\n },\n () => this._getProviderPackages(repository, version),\n );\n }\n\n private async _getZipHashes(\n zipHashUrl: string,\n ): Promise<string[] | undefined> {\n // The hashes are formatted as the result of sha256sum in plain text, each line: <hash>\\t<filename>\n let rawHashData: string;\n try {\n rawHashData = (await this.http.getText(zipHashUrl)).body;\n } catch (err) {\n /* v8 ignore next 3 -- hard to test */\n if (err instanceof ExternalHostError) {\n throw err;\n }\n logger.debug(\n { err, zipHashUrl },\n `Failed to retrieve zip hashes from ${zipHashUrl}`,\n );\n return undefined;\n }\n\n return rawHashData\n .trimEnd()\n .split('\\n')\n .map((line) => line.split(/\\s/)[0]);\n }\n\n getZipHashes(zipHashUrl: string): Promise<string[] | undefined> {\n return withCache(\n {\n namespace: `datasource-${TerraformProviderDatasource.id}`,\n key: `getZipHashes:${zipHashUrl}`,\n },\n () => this._getZipHashes(zipHashUrl),\n );\n }\n\n private async _getReleaseBackendIndex(\n backendLookUpName: string,\n version: string,\n ): Promise<VersionDetailResponse> {\n return (\n await this.http.getJson(\n `${TerraformProviderDatasource.hashicorpReleaseUrl}/${backendLookUpName}/${version}/index.json`,\n VersionDetailResponse,\n )\n ).body;\n }\n\n getReleaseBackendIndex(\n backendLookUpName: string,\n version: string,\n ): Promise<VersionDetailResponse> {\n return withCache(\n {\n namespace: `datasource-${TerraformProviderDatasource.id}`,\n key: `getReleaseBackendIndex:${backendLookUpName}/${version}`,\n },\n () => this._getReleaseBackendIndex(backendLookUpName, version),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAuBA,IAAa,8BAAb,MAAa,oCAAoC,oBAAoB;CACnE,OAAyB,KAAK;CAE9B,OAAgB,sBAAsB;CAEtC,OAAgB,sBAAsB,CACpC,4BAA4B,sBAC5B,4BAA4B,mBAC9B;CAEA,OAAO,kBAAkB,MAAM,kCAAkC;CAEjE,cAAc;EACZ,MAAM,4BAA4B,EAAE;CACtC;CAEA,sBACE,4BAA4B;CAE9B,oBAAsCA;CAEtC,mBAAqC;CAErC,0BAA4C;CAC5C,uBACE;CACF,mBAAqC;CACrC,gBACE;CAEF,MAAc,aAAa,EACzB,aACA,eACmD;;EAEnD,IAAI,CAAC,aACH,OAAO;EAET,OAAO,MACL,qDAAqD,aACvD;EAEA,IAAI,gBAAgB,4BAA4B,sBAC9C,OAAO,MAAM,KAAK,yBAAyB,aAAa,WAAW;EAErE,IACE,gBAAgB,4BAA4B,uBAC5C,gBAAgB,4BAA4B,gBAE5C,OAAO,MAAM,KAAK,sBAAsB,WAAW;EAErD,IAAI,gBAAgB,4BAA4B,qBAC9C,OAAO,MAAM,KAAK,oBAAoB,aAAa,WAAW;EAIhE,OAAO,MAAM,KAAK,sBAAsB,aAAa,WAAW;CAClE;CAEA,YAAY,QAA0D;EACpE,MAAM,MAAM,OAAO;EACnB,MAAM,OAAO,4BAA4B,cAAc,MAAM;EAC7D,OAAO,UACL;GACE,WAAW,cAAc,4BAA4B;GACrD,KAAK,eAAe,IAAI,GAAG;GAC3B,UAAU;EACZ,SACM,KAAK,aAAa,MAAM,CAChC;CACF;CAEA,OAAe,cAAc,EAAE,eAA0C;EACvE,OA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,YAAY,SAAS,GAAG,GAAG,SAAS,QAC1D,gCACF;EACA,OAAO;CACT;CAEA,oBACE,YACA,SAC0B;EAC1B,OAAO,UACL;GACE,WAAW,cAAc,4BAA4B;GACrD,KAAK,uBAAuB,WAAW,GAAG;EAC5C,SACM,KAAK,qBAAqB,YAAY,OAAO,CACrD;CACF;CAEA,MAAc,cACZ,YAC+B;EAE/B,IAAI;EACJ,IAAI;GACF,eAAe,MAAM,KAAK,KAAK,QAAQ,UAAU,EAAA,CAAG;EACtD,SAAS,KAAK;;GAEZ,IAAI,eAAe,mBACjB,MAAM;GAER,OAAO,MACL;IAAE;IAAK;GAAW,GAClB,sCAAsC,YACxC;GACA;EACF;EAEA,OAAO,YACJ,QAAQ,CAAC,CACT,MAAM,IAAI,CAAC,CACX,KAAK,SAAS,KAAK,MAAM,IAAI,CAAC,CAAC,EAAE;CACtC;CAEA,aAAa,YAAmD;EAC9D,OAAO,UACL;GACE,WAAW,cAAc,4BAA4B;GACrD,KAAK,gBAAgB;EACvB,SACM,KAAK,cAAc,UAAU,CACrC;CACF;CAEA,MAAc,wBACZ,mBACA,SACgC;EAChC,QACE,MAAM,KAAK,KAAK,QACd,GAAG,4BAA4B,oBAAoB,GAAG,kBAAkB,GAAG,QAAQ,cACnF,qBACF,EAAA,CACA;CACJ;CAEA,uBACE,mBACA,SACgC;EAChC,OAAO,UACL;GACE,WAAW,cAAc,4BAA4B;GACrD,KAAK,0BAA0B,kBAAkB,GAAG;EACtD,SACM,KAAK,wBAAwB,mBAAmB,OAAO,CAC/D;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["hashicorpVersioning.id","p.map","HttpError"],"sources":["../../../../lib/modules/datasource/terraform-provider/index.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { ExternalHostError } from '../../../types/errors/external-host-error.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { HttpError } from '../../../util/http/index.ts';\nimport * as p from '../../../util/promises.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { getQueryString, joinUrlParts } from '../../../util/url.ts';\nimport * as hashicorpVersioning from '../../versioning/hashicorp/index.ts';\nimport { TerraformDatasource } from '../terraform-module/base.ts';\nimport { createSDBackendURL } from '../terraform-module/utils.ts';\nimport type { GetReleasesConfig, ReleaseResult } from '../types.ts';\nimport {\n OpenTofuProviderDocsResponse,\n OpenTofuProviderPackagesResponse,\n type TerraformBuild,\n TerraformProviderReleaseBackend,\n TerraformProviderV2Response,\n TerraformProviderVersions,\n TerraformRegistryBuildResponse,\n TerraformRegistryVersions,\n VersionDetailResponse,\n} from './schema.ts';\n\nexport class TerraformProviderDatasource extends TerraformDatasource {\n static override readonly id = 'terraform-provider';\n\n static readonly hashicorpReleaseUrl = 'https://releases.hashicorp.com';\n\n static readonly defaultRegistryUrls = [\n TerraformProviderDatasource.terraformRegistryUrl,\n TerraformProviderDatasource.hashicorpReleaseUrl,\n ];\n\n static repositoryRegex = regEx(/^hashicorp\\/(?<packageName>\\S+)$/);\n\n constructor() {\n super(TerraformProviderDatasource.id);\n }\n\n override readonly defaultRegistryUrls =\n TerraformProviderDatasource.defaultRegistryUrls;\n\n override readonly defaultVersioning = hashicorpVersioning.id;\n\n override readonly registryStrategy = 'hunt';\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is only available for `registry.terraform.io` (v2 API) and `registry.opentofu.org` (via `api.opentofu.org`). Other registries using the Provider Registry Protocol do not provide timestamps.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'For `registry.terraform.io`, the source URL is taken from the `source` field of the v2 API response. For `registry.opentofu.org`, it is derived from the package name following the OpenTofu registry policy of `github.com/NAMESPACE/terraform-provider-NAME`.';\n\n private async _getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore next 3 -- should never happen */\n if (!registryUrl) {\n return null;\n }\n logger.trace(\n `terraform-provider.getDependencies() packageName: ${packageName}`,\n );\n\n if (registryUrl === TerraformProviderDatasource.terraformRegistryUrl) {\n return await this.queryTerraformRegistryV2(registryUrl, packageName);\n }\n if (\n registryUrl === TerraformProviderDatasource.openTofuRegistryUrl ||\n registryUrl === TerraformProviderDatasource.openTofuApiUrl\n ) {\n return await this.queryOpenTofuRegistry(packageName);\n }\n if (registryUrl === TerraformProviderDatasource.hashicorpReleaseUrl) {\n return await this.queryReleaseBackend(packageName, registryUrl);\n }\n\n // Fall back to the standard Provider Registry Protocol for other registries.\n return await this.queryProviderRegistry(registryUrl, packageName);\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n const url = config.registryUrl;\n const repo = TerraformProviderDatasource.getRepository(config);\n return withCache(\n {\n namespace: `datasource-${TerraformProviderDatasource.id}`,\n key: `getReleases:${url}/${repo}`,\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n private static getRepository({ packageName }: GetReleasesConfig): string {\n return packageName.includes('/') ? packageName : `hashicorp/${packageName}`;\n }\n\n /**\n * Query the Terraform Registry using the undocumented v2 JSON:API.\n *\n * Returns release timestamps for all versions, unlike the v1 API\n * which only exposed the timestamp for the latest version.\n */\n private async queryTerraformRegistryV2(\n registryUrl: string,\n packageName: string,\n ): Promise<ReleaseResult> {\n const repository = TerraformProviderDatasource.getRepository({\n packageName,\n });\n const providerUrl = `${joinUrlParts(\n registryUrl,\n 'v2/providers',\n repository,\n )}?${getQueryString({ include: 'provider-versions' })}`;\n const { body: res } = await this.http.getJson(\n providerUrl,\n TerraformProviderV2Response,\n );\n res.homepage = `${registryUrl}/providers/${repository}`;\n return res;\n }\n\n /**\n * Query the OpenTofu registry docs API.\n * https://api.opentofu.org/\n *\n * Used when the registry URL is `registry.opentofu.org`.\n * Queries `api.opentofu.org` for provider versions with release timestamps.\n */\n private async queryOpenTofuRegistry(\n packageName: string,\n ): Promise<ReleaseResult> {\n const repository = TerraformProviderDatasource.getRepository({\n packageName,\n });\n const docsUrl = joinUrlParts(\n TerraformProviderDatasource.openTofuApiUrl,\n 'registry/docs/providers',\n repository,\n 'index.json',\n );\n const { body: res } = await this.http.getJson(\n docsUrl,\n OpenTofuProviderDocsResponse,\n );\n res.homepage = `https://search.opentofu.org/provider/${repository}`;\n\n // The OpenTofu registry only indexes providers hosted on GitHub under the\n // `NAMESPACE/terraform-provider-NAME` repository naming convention, so the\n // source URL can be derived deterministically from the package name.\n // https://github.com/opentofu/registry/blob/main/PROCEDURES.md\n const [namespace, name] = repository.split('/');\n res.sourceUrl = `https://github.com/${namespace}/terraform-provider-${name}`;\n\n return res;\n }\n\n /**\n * Query a registry using the Provider Registry Protocol that all registries\n * are required to implement.\n * https://www.terraform.io/internals/provider-registry-protocol\n */\n private async queryProviderRegistry(\n registryUrl: string,\n packageName: string,\n ): Promise<ReleaseResult> {\n const repository = TerraformProviderDatasource.getRepository({\n packageName,\n });\n const serviceDiscovery =\n await this.getTerraformServiceDiscoveryResult(registryUrl);\n const backendURL = createSDBackendURL(\n registryUrl,\n 'providers.v1',\n serviceDiscovery,\n `${repository}/versions`,\n );\n const res = (await this.http.getJson(backendURL, TerraformProviderVersions))\n .body;\n const dep: ReleaseResult = {\n releases: res.versions.map(({ version }) => ({\n version,\n })),\n };\n return dep;\n }\n\n private async queryReleaseBackend(\n packageName: string,\n registryURL: string,\n ): Promise<ReleaseResult | null> {\n const hashicorpPackage = packageName.replace('hashicorp/', '');\n const backendLookUpName = `terraform-provider-${hashicorpPackage}`;\n const backendURL = joinUrlParts(\n registryURL,\n backendLookUpName,\n `index.json`,\n );\n const res = (\n await this.http.getJson(backendURL, TerraformProviderReleaseBackend)\n ).body;\n\n const dep: ReleaseResult = {\n releases: Object.keys(res.versions).map((version) => ({\n version,\n })),\n sourceUrl: joinUrlParts(\n 'https://github.com/terraform-providers',\n backendLookUpName,\n ),\n };\n return dep;\n }\n\n private async _getBuilds(\n registryURL: string,\n repository: string,\n version: string,\n ): Promise<TerraformBuild[] | null> {\n if (registryURL === TerraformProviderDatasource.hashicorpReleaseUrl) {\n // check if registryURL === secondary backend\n const repositoryRegexResult =\n TerraformProviderDatasource.repositoryRegex.exec(repository)?.groups;\n if (!repositoryRegexResult) {\n // non hashicorp builds are not supported with releases.hashicorp.com\n return null;\n }\n const packageName = repositoryRegexResult.packageName;\n const backendLookUpName = `terraform-provider-${packageName}`;\n let versionReleaseBackend: VersionDetailResponse;\n try {\n versionReleaseBackend = await this.getReleaseBackendIndex(\n backendLookUpName,\n version,\n );\n } catch (err) {\n if (err instanceof ExternalHostError) {\n throw err;\n }\n logger.debug(\n { err, backendLookUpName, version },\n `Failed to retrieve builds for ${backendLookUpName} ${version}`,\n );\n // throw an error to disable caching\n throw new ExternalHostError(err);\n }\n return versionReleaseBackend.builds;\n }\n\n // check public or private Terraform registry\n const serviceDiscovery =\n await this.getTerraformServiceDiscoveryResult(registryURL);\n if (!serviceDiscovery) {\n // throw an error to disable caching\n throw new ExternalHostError(\n new Error(`Service discovery not found for ${registryURL}`),\n );\n }\n const backendURL = createSDBackendURL(\n registryURL,\n 'providers.v1',\n serviceDiscovery,\n repository,\n );\n const versionsResponse = (\n await this.http.getJson(\n `${backendURL}/versions`,\n TerraformRegistryVersions,\n )\n ).body;\n if (!versionsResponse.versions) {\n // throw an error to disable caching\n throw new ExternalHostError(\n new Error(`Failed to retrieve version list for ${backendURL}`),\n );\n }\n const builds = versionsResponse.versions.find(\n (value) => value.version === version,\n );\n if (!builds) {\n // should never happen, but just in case\n // throw an error to disable caching\n throw new ExternalHostError(\n new Error(\n `No builds found for ${repository}:${version} on ${registryURL}`,\n ),\n );\n }\n const result = await p.map(\n builds.platforms,\n async (platform) => {\n const buildURL = `${backendURL}/${version}/download/${platform.os}/${platform.arch}`;\n try {\n const res = (\n await this.http.getJson(buildURL, TerraformRegistryBuildResponse)\n ).body;\n const newBuild: TerraformBuild = {\n name: repository,\n url: res.download_url,\n version,\n ...res,\n };\n return newBuild;\n } catch (err) {\n /* v8 ignore next 3 -- hard to test */\n if (err instanceof ExternalHostError) {\n throw err;\n }\n logger.debug({ err, url: buildURL }, 'Failed to retrieve build');\n // throw an error to disable caching\n throw new ExternalHostError(err);\n }\n },\n { concurrency: 4 },\n );\n\n return result;\n }\n\n getBuilds(\n registryURL: string,\n repository: string,\n version: string,\n ): Promise<TerraformBuild[] | null> {\n return withCache(\n {\n namespace: `datasource-${TerraformProviderDatasource.id}`,\n key: `getBuilds:${registryURL}/${repository}/${version}`,\n },\n () => this._getBuilds(registryURL, repository, version),\n );\n }\n\n /**\n * A single platform's download endpoint returns the hashes for all platforms,\n * so we query `linux/amd64` and fall back to `/versions` discovery only when a\n * provider lacks that platform (404).\n * See https://github.com/opentofu/opentofu/pull/3434\n */\n private async _getProviderPackages(\n repository: string,\n version: string,\n ): Promise<string[] | null> {\n const baseUrl = joinUrlParts(\n TerraformProviderDatasource.openTofuRegistryUrl,\n 'v1/providers',\n repository,\n );\n\n try {\n try {\n const { body } = await this.http.getJson(\n `${baseUrl}/${version}/download/linux/amd64`,\n OpenTofuProviderPackagesResponse,\n );\n return body;\n } catch (err) {\n if (!(err instanceof HttpError) || err.response?.statusCode !== 404) {\n throw err;\n }\n }\n return await this._getProviderPackagesForAvailablePlatform(\n baseUrl,\n version,\n );\n } catch (err) {\n if (err instanceof ExternalHostError) {\n throw err;\n }\n logger.debug(\n { err, repository, version },\n `Failed to retrieve provider packages for ${repository}@${version}`,\n );\n throw new ExternalHostError(err);\n }\n }\n\n /**\n * Some providers do not publish a `linux/amd64` build, so discover an\n * available platform via `/versions` and fetch its download endpoint.\n */\n private async _getProviderPackagesForAvailablePlatform(\n baseUrl: string,\n version: string,\n ): Promise<string[] | null> {\n const { body: versionsResponse } = await this.http.getJson(\n `${baseUrl}/versions`,\n TerraformRegistryVersions,\n );\n const platform = versionsResponse.versions?.find(\n (entry) => entry.version === version,\n )?.platforms?.[0];\n if (!platform) {\n return null;\n }\n const { body: hashes } = await this.http.getJson(\n `${baseUrl}/${version}/download/${platform.os}/${platform.arch}`,\n OpenTofuProviderPackagesResponse,\n );\n return hashes;\n }\n\n getProviderPackages(\n repository: string,\n version: string,\n ): Promise<string[] | null> {\n return withCache(\n {\n namespace: `datasource-${TerraformProviderDatasource.id}`,\n key: `getProviderPackages:${repository}/${version}`,\n },\n () => this._getProviderPackages(repository, version),\n );\n }\n\n private async _getZipHashes(\n zipHashUrl: string,\n ): Promise<string[] | undefined> {\n // The hashes are formatted as the result of sha256sum in plain text, each line: <hash>\\t<filename>\n let rawHashData: string;\n try {\n rawHashData = (await this.http.getText(zipHashUrl)).body;\n } catch (err) {\n /* v8 ignore next 3 -- hard to test */\n if (err instanceof ExternalHostError) {\n throw err;\n }\n logger.debug(\n { err, zipHashUrl },\n `Failed to retrieve zip hashes from ${zipHashUrl}`,\n );\n return undefined;\n }\n\n return rawHashData\n .trimEnd()\n .split('\\n')\n .map((line) => line.split(regEx(/\\s/))[0]);\n }\n\n getZipHashes(zipHashUrl: string): Promise<string[] | undefined> {\n return withCache(\n {\n namespace: `datasource-${TerraformProviderDatasource.id}`,\n key: `getZipHashes:${zipHashUrl}`,\n },\n () => this._getZipHashes(zipHashUrl),\n );\n }\n\n private async _getReleaseBackendIndex(\n backendLookUpName: string,\n version: string,\n ): Promise<VersionDetailResponse> {\n return (\n await this.http.getJson(\n `${TerraformProviderDatasource.hashicorpReleaseUrl}/${backendLookUpName}/${version}/index.json`,\n VersionDetailResponse,\n )\n ).body;\n }\n\n getReleaseBackendIndex(\n backendLookUpName: string,\n version: string,\n ): Promise<VersionDetailResponse> {\n return withCache(\n {\n namespace: `datasource-${TerraformProviderDatasource.id}`,\n key: `getReleaseBackendIndex:${backendLookUpName}/${version}`,\n },\n () => this._getReleaseBackendIndex(backendLookUpName, version),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAuBA,IAAa,8BAAb,MAAa,oCAAoC,oBAAoB;CACnE,OAAyB,KAAK;CAE9B,OAAgB,sBAAsB;CAEtC,OAAgB,sBAAsB,CACpC,4BAA4B,sBAC5B,4B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AAK;GAAW,GAClB,sCAAsC,YACxC;GACA;EACF;EAEA,OAAO,YACJ,QAAQ,CAAC,CACT,MAAM,IAAI,CAAC,CACX,KAAK,SAAS,KAAK,MAAM,MAAM,IAAI,CAAC,CAAC,CAAC,EAAE;CAC7C;CAEA,aAAa,YAAmD;EAC9D,OAAO,UACL;GACE,WAAW,cAAc,4BAA4B;GACrD,KAAK,gBAAgB;EACvB,SACM,KAAK,cAAc,UAAU,CACrC;CACF;CAEA,MAAc,wBACZ,mBACA,SACgC;EAChC,QACE,MAAM,KAAK,KAAK,QACd,GAAG,4BAA4B,oBAAoB,GAAG,kBAAkB,GAAG,QAAQ,cACnF,qBACF,EAAA,CACA;CACJ;CAEA,uBACE,mBACA,SACgC;EAChC,OAAO,UACL;GACE,WAAW,cAAc,4BAA4B;GACrD,KAAK,0BAA0B,kBAAkB,GAAG;EACtD,SACM,KAAK,wBAAwB,mBAAmB,OAAO,CAC/D;CACF;AACF"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { regEx } from "../../../util/regex.js";
|
|
2
2
|
//#region lib/modules/manager/ansible-galaxy/util.ts
|
|
3
|
-
const newBlockRegEx = /^\s*-\s*((\w+):\s*(.*))
|
|
4
|
-
const blockLineRegEx = /^\s*((\w+):\s*(\S+))\s
|
|
5
|
-
const galaxyDepRegex = /[\w-]+\.[\w-]
|
|
6
|
-
const dependencyRegex = /^dependencies
|
|
3
|
+
const newBlockRegEx = regEx(/^\s*-\s*((\w+):\s*(.*))$/);
|
|
4
|
+
const blockLineRegEx = regEx(/^\s*((\w+):\s*(\S+))\s*$/);
|
|
5
|
+
const galaxyDepRegex = regEx(/[\w-]+\.[\w-]+/);
|
|
6
|
+
const dependencyRegex = regEx(/^dependencies:/);
|
|
7
7
|
const galaxyRegEx = regEx(/^\s+["']?(?<packageName>[\w.]+)["']?:\s*["']?(?<version>.+?)["']?\s*(\s#.*)?$/);
|
|
8
8
|
const nameMatchRegex = regEx(/(?<source>((git\+)?(?:(git|ssh|https?):\/\/)?(.*@)?(?<hostname>[\w.-]+)(?:(:\d+)?\/|:))(?<depName>[\w./-]+)(?:\.git)?)(,(?<version>[\w.]*))?/);
|
|
9
9
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","names":[],"sources":["../../../../lib/modules/manager/ansible-galaxy/util.ts"],"sourcesContent":["import { regEx } from '../../../util/regex.ts';\n\nexport const newBlockRegEx = /^\\s*-\\s*((\\w+):\\s*(.*))
|
|
1
|
+
{"version":3,"file":"util.js","names":[],"sources":["../../../../lib/modules/manager/ansible-galaxy/util.ts"],"sourcesContent":["import { regEx } from '../../../util/regex.ts';\n\nexport const newBlockRegEx = regEx(/^\\s*-\\s*((\\w+):\\s*(.*))$/);\nexport const blockLineRegEx = regEx(/^\\s*((\\w+):\\s*(\\S+))\\s*$/);\nexport const galaxyDepRegex = regEx(/[\\w-]+\\.[\\w-]+/);\nexport const dependencyRegex = regEx(/^dependencies:/);\nexport const galaxyRegEx = regEx(\n /^\\s+[\"']?(?<packageName>[\\w.]+)[\"']?:\\s*[\"']?(?<version>.+?)[\"']?\\s*(\\s#.*)?$/,\n);\nexport const nameMatchRegex = regEx(\n /(?<source>((git\\+)?(?:(git|ssh|https?):\\/\\/)?(.*@)?(?<hostname>[\\w.-]+)(?:(:\\d+)?\\/|:))(?<depName>[\\w./-]+)(?:\\.git)?)(,(?<version>[\\w.]*))?/,\n);\n"],"mappings":";;AAEA,MAAa,gBAAgB,MAAM,0BAA0B;AAC7D,MAAa,iBAAiB,MAAM,0BAA0B;AAC9D,MAAa,iBAAiB,MAAM,gBAAgB;AACpD,MAAa,kBAAkB,MAAM,gBAAgB;AACrD,MAAa,cAAc,MACzB,+EACF;AACA,MAAa,iBAAiB,MAC5B,8IACF"}
|
|
@@ -21,7 +21,7 @@ const hugoDefinition = {
|
|
|
21
21
|
datasource: GithubReleasesDatasource.id,
|
|
22
22
|
packageName: "gohugoio/hugo",
|
|
23
23
|
extractVersion: "^v(?<version>\\S+)",
|
|
24
|
-
currentValue: version.replace(/^extended_
|
|
24
|
+
currentValue: version.replace(regEx(/^extended_/), "")
|
|
25
25
|
})
|
|
26
26
|
};
|
|
27
27
|
const upgradeableTooling = {
|
|
@@ -389,25 +389,25 @@ const upgradeableTooling = {
|
|
|
389
389
|
java: {
|
|
390
390
|
asdfPluginUrl: "https://github.com/halcyon/asdf-java",
|
|
391
391
|
config: (version) => {
|
|
392
|
-
const adoptOpenJdkMatches = /^adoptopenjdk-(?<version>\d\S+)
|
|
392
|
+
const adoptOpenJdkMatches = regEx(/^adoptopenjdk-(?<version>\d\S+)/).exec(version)?.groups;
|
|
393
393
|
if (adoptOpenJdkMatches) return {
|
|
394
394
|
datasource: JavaVersionDatasource.id,
|
|
395
395
|
packageName: "java-jdk",
|
|
396
396
|
currentValue: adoptOpenJdkMatches.version
|
|
397
397
|
};
|
|
398
|
-
const adoptOpenJreMatches = /^adoptopenjdk-jre-(?<version>\d\S+)
|
|
398
|
+
const adoptOpenJreMatches = regEx(/^adoptopenjdk-jre-(?<version>\d\S+)/).exec(version)?.groups;
|
|
399
399
|
if (adoptOpenJreMatches) return {
|
|
400
400
|
datasource: JavaVersionDatasource.id,
|
|
401
401
|
packageName: "java-jre",
|
|
402
402
|
currentValue: adoptOpenJreMatches.version
|
|
403
403
|
};
|
|
404
|
-
const temurinJdkMatches = /^temurin-(?<version>\d\S+)
|
|
404
|
+
const temurinJdkMatches = regEx(/^temurin-(?<version>\d\S+)/).exec(version)?.groups;
|
|
405
405
|
if (temurinJdkMatches) return {
|
|
406
406
|
datasource: JavaVersionDatasource.id,
|
|
407
407
|
packageName: "java-jdk",
|
|
408
408
|
currentValue: temurinJdkMatches.version
|
|
409
409
|
};
|
|
410
|
-
const temurinJreMatches = /^temurin-jre-(?<version>\d\S+)
|
|
410
|
+
const temurinJreMatches = regEx(/^temurin-jre-(?<version>\d\S+)/).exec(version)?.groups;
|
|
411
411
|
if (temurinJreMatches) return {
|
|
412
412
|
datasource: JavaVersionDatasource.id,
|
|
413
413
|
packageName: "java-jre",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgradeable-tooling.js","names":["regexVersioning.id","semverVersioning.id"],"sources":["../../../../lib/modules/manager/asdf/upgradeable-tooling.ts"],"sourcesContent":["import { regEx } from '../../../util/regex.ts';\nimport { DartVersionDatasource } from '../../datasource/dart-version/index.ts';\nimport { DockerDatasource } from '../../datasource/docker/index.ts';\nimport { DotnetVersionDatasource } from '../../datasource/dotnet-version/index.ts';\nimport { FlutterVersionDatasource } from '../../datasource/flutter-version/index.ts';\nimport { GithubReleasesDatasource } from '../../datasource/github-releases/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { HexpmBobDatasource } from '../../datasource/hexpm-bob/index.ts';\nimport { JavaVersionDatasource } from '../../datasource/java-version/index.ts';\nimport { NodeVersionDatasource } from '../../datasource/node-version/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 { RustVersionDatasource } from '../../datasource/rust-version/index.ts';\nimport * as regexVersioning from '../../versioning/regex/index.ts';\nimport * as semverVersioning from '../../versioning/semver/index.ts';\nimport type { PackageDependency } from '../types.ts';\n\nexport type StaticTooling = Partial<PackageDependency> &\n Required<Pick<PackageDependency, 'datasource'>>;\n\nexport type DynamicTooling = (version: string) => StaticTooling | undefined;\n\nexport type ToolingConfig = StaticTooling | DynamicTooling;\nexport interface ToolingDefinition {\n config: ToolingConfig;\n asdfPluginUrl: string;\n}\n\nconst hugoDefinition: ToolingDefinition = {\n // This plugin supports the names `hugo` & `gohugo`\n asdfPluginUrl: 'https://github.com/NeoHsu/asdf-hugo',\n config: (version) => ({\n datasource: GithubReleasesDatasource.id,\n packageName: 'gohugoio/hugo',\n extractVersion: '^v(?<version>\\\\S+)',\n // The asdf hugo plugin supports prefixing the version with\n // `extended_`. Extended versions feature Sass support.\n currentValue: version.replace(/^extended_/, ''),\n }),\n};\n\nexport const upgradeableTooling: Record<string, ToolingDefinition> = {\n act: {\n asdfPluginUrl: 'https://github.com/grimoh/asdf-act.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'nektos/act',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n actionlint: {\n asdfPluginUrl: 'https://github.com/crazy-matt/asdf-actionlint',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'rhysd/actionlint',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'adr-tools': {\n asdfPluginUrl: 'https://gitlab.com/td7x/asdf/adr-tools.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'npryce/adr-tools',\n },\n },\n apm: {\n asdfPluginUrl: 'https://github.com/edwinhern/asdf-apm',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'microsoft/apm',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n argocd: {\n asdfPluginUrl: 'https://github.com/beardix/asdf-argocd',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'argoproj/argo-cd',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'asdf-plugin-manager': {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-plugin-manager',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'asdf-community/asdf-plugin-manager',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n atmos: {\n asdfPluginUrl: 'https://github.com/cloudposse/asdf-atmos',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'cloudposse/atmos',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n awscli: {\n asdfPluginUrl: 'https://github.com/MetricMike/asdf-awscli',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'aws/aws-cli',\n },\n },\n 'azure-cli': {\n asdfPluginUrl: 'https://github.com/sourcesense/asdf-azure-cli',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'Azure/azure-cli',\n extractVersion: '^azure-cli-(?<version>\\\\S+)',\n },\n },\n bun: {\n asdfPluginUrl: 'https://github.com/cometkim/asdf-bun',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'oven-sh/bun',\n extractVersion: '^bun-v(?<version>\\\\S+)',\n },\n },\n 'cargo-make': {\n asdfPluginUrl: 'https://github.com/mise-plugins/asdf-cargo-make',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'sagiegurari/cargo-make',\n },\n },\n checkov: {\n asdfPluginUrl: 'https://github.com/bosmak/asdf-checkov.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'bridgecrewio/checkov',\n },\n },\n clojure: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-clojure',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'clojure/brew-install',\n versioning: `${regexVersioning.id}:^(?<major>\\\\d+?)\\\\.(?<minor>\\\\d+?)\\\\.(?<patch>\\\\d+)\\\\.(?<build>\\\\d+)$`,\n },\n },\n clusterctl: {\n asdfPluginUrl: 'https://github.com/pfnet-research/asdf-clusterctl',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'kubernetes-sigs/cluster-api',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n conftest: {\n asdfPluginUrl: 'https://github.com/looztra/asdf-conftest',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'open-policy-agent/conftest',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'container-structure-test': {\n asdfPluginUrl:\n 'https://github.com/FeryET/asdf-container-structure-test.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'GoogleContainerTools/container-structure-test',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n cookiecutter: {\n asdfPluginUrl: 'https://github.com/shawon-crosen/asdf-cookiecutter',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'cookiecutter/cookiecutter',\n versioning: semverVersioning.id,\n },\n },\n cosign: {\n asdfPluginUrl: 'https://gitlab.com/wt0f/asdf-cosign',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'sigstore/cosign',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n crystal: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-crystal',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'crystal-lang/crystal',\n },\n },\n dart: {\n asdfPluginUrl: 'https://github.com/PatOConnor43/asdf-dart',\n config: {\n datasource: DartVersionDatasource.id,\n },\n },\n deno: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-deno',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'denoland/deno',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n direnv: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-direnv',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'direnv/direnv',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'dotnet-core': {\n asdfPluginUrl: 'https://github.com/emersonsoares/asdf-dotnet-core',\n config: {\n datasource: DotnetVersionDatasource.id,\n packageName: 'dotnet-sdk',\n },\n },\n dprint: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-dprint',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'dprint/dprint',\n },\n },\n ecspresso: {\n asdfPluginUrl: 'https://github.com/kayac/asdf-ecspresso',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'kayac/ecspresso',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'editorconfig-checker': {\n asdfPluginUrl: 'https://github.com/gabitchov/asdf-editorconfig-checker',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'editorconfig-checker/editorconfig-checker',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n elixir: {\n asdfPluginUrl: 'https://github.com/asdf-vm/asdf-elixir',\n config: {\n datasource: HexpmBobDatasource.id,\n },\n },\n elm: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-elm',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'elm/compiler',\n },\n },\n erlang: {\n asdfPluginUrl: 'https://github.com/asdf-vm/asdf-erlang',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'erlang/otp',\n extractVersion: '^OTP-(?<version>\\\\S+)',\n versioning: `${regexVersioning.id}:^(?<major>\\\\d+?)\\\\.(?<minor>\\\\d+?)(\\\\.(?<patch>\\\\d+))?$`,\n },\n },\n flutter: {\n asdfPluginUrl: 'https://github.com/oae/asdf-flutter',\n config: (version) => ({\n datasource: FlutterVersionDatasource.id,\n // asdf-flutter plugin supports channel on version suffix.\n currentValue: version.replace(regEx(/-(stable|beta|dev)$/), ''),\n }),\n },\n flux2: {\n asdfPluginUrl: 'https://github.com/tablexi/asdf-flux2.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'fluxcd/flux2',\n extractVersion: '^v(?<version>.+)',\n },\n },\n gauche: {\n asdfPluginUrl: 'https://github.com/sakuro/asdf-gauche',\n config: {\n datasource: DockerDatasource.id,\n packageName: 'practicalscheme/gauche',\n },\n },\n 'github-cli': {\n asdfPluginUrl: 'https://github.com/bartlomiejdanek/asdf-github-cli.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'cli/cli',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n gitleaks: {\n asdfPluginUrl: 'https://github.com/jmcvetta/asdf-gitleaks',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'gitleaks/gitleaks',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n ginkgo: {\n asdfPluginUrl: 'https://github.com/jimmidyson/asdf-ginkgo',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'onsi/ginkgo',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n gleam: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-gleam.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'gleam-lang/gleam',\n extractVersion: '^v(?<version>.+)',\n },\n },\n gohugo: hugoDefinition,\n golang: {\n asdfPluginUrl: 'https://github.com/kennyp/asdf-golang',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'golang/go',\n extractVersion: '^go(?<version>\\\\S+)',\n },\n },\n 'golangci-lint': {\n asdfPluginUrl: 'https://github.com/hypnoglow/asdf-golangci-lint.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'golangci/golangci-lint',\n extractVersion: '^v(?<version>.+)',\n },\n },\n gomplate: {\n asdfPluginUrl: 'https://github.com/sneakybeaky/asdf-gomplate',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'hairyhenderson/gomplate',\n extractVersion: '^v(?<version>.+)',\n },\n },\n gotestsum: {\n asdfPluginUrl: 'https://github.com/hpcsc/asdf-gotestsum',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'gotestyourself/gotestsum',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n hadolint: {\n asdfPluginUrl: 'https://github.com/looztra/asdf-hadolint.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'hadolint/hadolint',\n extractVersion: '^v(?<version>.+)',\n },\n },\n haskell: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-haskell',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'ghc/ghc',\n extractVersion: '^ghc-(?<version>\\\\S+?)-release',\n },\n },\n helm: {\n asdfPluginUrl: 'https://github.com/Antiarchitect/asdf-helm',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'helm/helm',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'helm-docs': {\n asdfPluginUrl: 'https://github.com/sudermanjr/asdf-helm-docs.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'norwoodj/helm-docs',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n helmfile: {\n asdfPluginUrl: 'https://github.com/feniix/asdf-helmfile',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'helmfile/helmfile',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n hugo: hugoDefinition,\n idris: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-idris',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'idris-lang/Idris-dev',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n istioctl: {\n asdfPluginUrl: 'https://github.com/virtualstaticvoid/asdf-istioctl',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'istio/istio',\n versioning: semverVersioning.id,\n },\n },\n java: {\n asdfPluginUrl: 'https://github.com/halcyon/asdf-java',\n config: (version) => {\n const adoptOpenJdkMatches = /^adoptopenjdk-(?<version>\\d\\S+)/.exec(\n version,\n )?.groups;\n if (adoptOpenJdkMatches) {\n return {\n datasource: JavaVersionDatasource.id,\n packageName: 'java-jdk',\n currentValue: adoptOpenJdkMatches.version,\n };\n }\n const adoptOpenJreMatches = /^adoptopenjdk-jre-(?<version>\\d\\S+)/.exec(\n version,\n )?.groups;\n if (adoptOpenJreMatches) {\n return {\n datasource: JavaVersionDatasource.id,\n packageName: 'java-jre',\n currentValue: adoptOpenJreMatches.version,\n };\n }\n const temurinJdkMatches = /^temurin-(?<version>\\d\\S+)/.exec(\n version,\n )?.groups;\n if (temurinJdkMatches) {\n return {\n datasource: JavaVersionDatasource.id,\n packageName: 'java-jdk',\n currentValue: temurinJdkMatches.version,\n };\n }\n const temurinJreMatches = /^temurin-jre-(?<version>\\d\\S+)/.exec(\n version,\n )?.groups;\n if (temurinJreMatches) {\n return {\n datasource: JavaVersionDatasource.id,\n packageName: 'java-jre',\n currentValue: temurinJreMatches.version,\n };\n }\n\n return undefined;\n },\n },\n julia: {\n asdfPluginUrl: 'https://github.com/rkyleg/asdf-julia',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'JuliaLang/julia',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n just: {\n asdfPluginUrl: 'https://github.com/olofvndrhr/asdf-just',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'casey/just',\n },\n },\n k3s: {\n asdfPluginUrl: 'https://github.com/dmpe/asdf-k3s',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'k3s-io/k3s',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n kind: {\n asdfPluginUrl: 'https://github.com/johnlayton/asdf-kind',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'kubernetes-sigs/kind',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n kotlin: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-kotlin',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'JetBrains/kotlin',\n extractVersion: '^(Kotlin |v)(?<version>\\\\S+)',\n },\n },\n kubebuilder: {\n asdfPluginUrl: 'https://github.com/virtualstaticvoid/asdf-kubebuilder.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'kubernetes-sigs/kubebuilder',\n extractVersion: '^v(?<version>.+)',\n },\n },\n kubectl: {\n asdfPluginUrl: 'https://github.com/Banno/asdf-kubectl.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'kubernetes/kubernetes',\n extractVersion: '^v(?<version>.+)',\n },\n },\n kubetail: {\n asdfPluginUrl: 'https://github.com/janpieper/asdf-kubetail.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'johanhaleby/kubetail',\n },\n },\n kustomize: {\n asdfPluginUrl: 'https://github.com/Banno/asdf-kustomize',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'kubernetes-sigs/kustomize',\n extractVersion: '^kustomize/v(?<version>\\\\S+)',\n },\n },\n localstack: {\n asdfPluginUrl: 'https://github.com/Azulinho/asdf-localstack',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'localstack/localstack',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n lua: {\n asdfPluginUrl: 'https://github.com/Stratus3D/asdf-lua',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'lua/lua',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'markdownlint-cli2': {\n asdfPluginUrl:\n 'https://github.com/paulo-ferraz-oliveira/asdf-markdownlint-cli2',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'DavidAnson/markdownlint-cli2',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n maven: {\n asdfPluginUrl: 'https://github.com/halcyon/asdf-maven',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'apache/maven',\n },\n },\n mimirtool: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-mimirtool',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'grafana/mimir',\n extractVersion: '^mimir-(?<version>\\\\S+)',\n },\n },\n minikube: {\n asdfPluginUrl: 'https://github.com/alvarobp/asdf-minikube.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'kubernetes/minikube',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n mockery: {\n asdfPluginUrl: 'https://github.com/cabify/asdf-mockery.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'vektra/mockery',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n nim: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-nim',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'nim-lang/Nim',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n nodejs: {\n asdfPluginUrl: 'https://github.com/asdf-vm/asdf-nodejs',\n config: {\n depName: 'node',\n datasource: NodeVersionDatasource.id,\n },\n },\n ocaml: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-ocaml',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'ocaml/ocaml',\n },\n },\n oci: {\n asdfPluginUrl: 'https://github.com/yasn77/asdf-oci',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'oracle/oci-cli',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n opa: {\n asdfPluginUrl: 'https://github.com/tochukwuvictor/asdf-opa',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'open-policy-agent/opa',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n opentofu: {\n asdfPluginUrl: 'https://github.com/virtualroot/asdf-opentofu',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'opentofu/opentofu',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n packer: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-hashicorp',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'hashicorp/packer',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n perl: {\n asdfPluginUrl: 'https://github.com/ouest/asdf-perl',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'Perl/perl5',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n php: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-php',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'php/php-src',\n extractVersion: '^php-(?<version>\\\\S+)',\n },\n },\n pnpm: {\n asdfPluginUrl: 'https://github.com/jonathanmorley/asdf-pnpm',\n config: {\n datasource: NpmDatasource.id,\n packageName: 'pnpm',\n versioning: semverVersioning.id,\n },\n },\n poetry: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-poetry',\n config: {\n datasource: PypiDatasource.id,\n packageName: 'poetry',\n },\n },\n 'pre-commit': {\n asdfPluginUrl: 'https://github.com/jonathanmorley/asdf-pre-commit.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'pre-commit/pre-commit',\n extractVersion: '^v(?<version>.+)',\n },\n },\n protoc: {\n asdfPluginUrl: 'https://github.com/paxosglobal/asdf-protoc.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'protocolbuffers/protobuf',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n pulumi: {\n asdfPluginUrl: 'https://github.com/canha/asdf-pulumi.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'pulumi/pulumi',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n python: {\n asdfPluginUrl: 'https://github.com/danhper/asdf-python',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'python/cpython',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n rebar: {\n asdfPluginUrl: 'https://github.com/Stratus3D/asdf-rebar.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'erlang/rebar3',\n },\n },\n ruby: {\n asdfPluginUrl: 'https://github.com/asdf-vm/asdf-ruby',\n config: {\n datasource: RubyVersionDatasource.id,\n packageName: 'ruby-version',\n versioning: semverVersioning.id,\n },\n },\n rust: {\n asdfPluginUrl: 'https://github.com/code-lever/asdf-rust',\n config: {\n datasource: RustVersionDatasource.id,\n packageName: 'rust',\n },\n },\n sbt: {\n asdfPluginUrl: 'https://github.com/bram2000/asdf-sbt.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'sbt/sbt',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n scala: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-scala',\n config: (version) => {\n if (version.startsWith('2')) {\n return {\n datasource: GithubTagsDatasource.id,\n packageName: 'scala/scala',\n extractVersion: '^v(?<version>\\\\S+)',\n };\n }\n if (version.startsWith('3')) {\n return {\n datasource: GithubTagsDatasource.id,\n packageName: 'lampepfl/dotty',\n };\n }\n\n return undefined;\n },\n },\n shellcheck: {\n asdfPluginUrl: 'https://github.com/luizm/asdf-shellcheck',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'koalaman/shellcheck',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n shfmt: {\n asdfPluginUrl: 'https://github.com/luizm/asdf-shfmt',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'mvdan/sh',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n skaffold: {\n asdfPluginUrl: 'https://github.com/nklmilojevic/asdf-skaffold',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'GoogleContainerTools/skaffold',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n sops: {\n asdfPluginUrl: 'https://github.com/feniix/asdf-sops',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'mozilla/sops',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n steampipe: {\n asdfPluginUrl: 'https://github.com/carnei-ro/asdf-steampipe',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'turbot/steampipe',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n talhelper: {\n asdfPluginUrl: 'https://github.com/bjw-s/asdf-talhelper',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'budimanjojo/talhelper',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n talosctl: {\n asdfPluginUrl: 'https://github.com/bjw-s/asdf-talosctl',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'siderolabs/talos',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n terraform: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-hashicorp',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'hashicorp/terraform',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'terraform-docs': {\n asdfPluginUrl: 'https://github.com/looztra/asdf-terraform-docs.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'terraform-docs/terraform-docs',\n extractVersion: '^v(?<version>.+)',\n },\n },\n terraformer: {\n asdfPluginUrl: 'https://github.com/grimoh/asdf-terraformer',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'GoogleCloudPlatform/terraformer',\n },\n },\n terragrunt: {\n asdfPluginUrl: 'https://github.com/ohmer/asdf-terragrunt',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'gruntwork-io/terragrunt',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n terramate: {\n asdfPluginUrl: 'https://github.com/martinlindner/asdf-terramate',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'terramate-io/terramate',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n tflint: {\n asdfPluginUrl: 'https://github.com/skyzyx/asdf-tflint.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'terraform-linters/tflint',\n extractVersion: '^v(?<version>.+)',\n },\n },\n tfsec: {\n asdfPluginUrl: 'https://github.com/woneill/asdf-tfsec.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'aquasecurity/tfsec',\n extractVersion: '^v(?<version>.+)',\n },\n },\n trivy: {\n asdfPluginUrl: 'https://github.com/zufardhiyaulhaq/asdf-trivy',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'aquasecurity/trivy',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n vault: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-hashicorp',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'hashicorp/vault',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n yamllint: {\n asdfPluginUrl: 'https://github.com/ericcornelissen/asdf-yamllint',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'adrienverge/yamllint',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n yq: {\n asdfPluginUrl: 'https://github.com/sudermanjr/asdf-yq',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'mikefarah/yq',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n zig: {\n asdfPluginUrl: 'https://github.com/cheetah/asdf-zig',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'ziglang/zig',\n },\n },\n maestro: {\n asdfPluginUrl: 'https://github.com/dotanuki-labs/asdf-maestro',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'mobile-dev-inc/maestro',\n extractVersion: '^cli-(?<version>\\\\S+)',\n },\n },\n detekt: {\n asdfPluginUrl: 'https://github.com/dotanuki-labs/asdf-detekt',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'detekt/detekt',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n ktlint: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-ktlint',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'pinterest/ktlint',\n },\n },\n yamlfmt: {\n asdfPluginUrl: 'https://github.com/mise-plugins/asdf-yamlfmt',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'google/yamlfmt',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n tuist: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-tuist',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'tuist/tuist',\n },\n },\n typos: {\n asdfPluginUrl: 'https://github.com/aschiavon91/asdf-typos',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'crate-ci/typos',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n uv: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-uv',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'astral-sh/uv',\n },\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AA6BA,MAAM,iBAAoC;CAExC,eAAe;CACf,SAAS,aAAa;EACpB,YAAY,yBAAyB;EACrC,aAAa;EACb,gBAAgB;EAGhB,cAAc,QAAQ,QAAQ,cAAc,EAAE;CAChD;AACF;AAEA,MAAa,qBAAwD;CACnE,KAAK;EACH,eAAe;EACf,QAAQ;GACN,YAAY,yBAAyB;GACrC,aAAa;GACb,gBAAgB;EAClB;CACF;CACA,YAAY;EACV,eAAe;EACf,QAAQ;GACN,YAAY,yBAAyB;GACrC,aAAa;GACb,gBAAgB;EAClB;CACF;CACA,aAAa;EACX,eAAe;EACf,QAAQ;GACN,YAAY,qBAAqB;GACjC,aAAa;EACf;CACF;CACA,KAAK;EACH,eAAe;EACf,QAAQ;GACN,YAAY,yBAAyB;G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yBAAyB;GACrC,aAAa;EACf;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"upgradeable-tooling.js","names":["regexVersioning.id","semverVersioning.id"],"sources":["../../../../lib/modules/manager/asdf/upgradeable-tooling.ts"],"sourcesContent":["import { regEx } from '../../../util/regex.ts';\nimport { DartVersionDatasource } from '../../datasource/dart-version/index.ts';\nimport { DockerDatasource } from '../../datasource/docker/index.ts';\nimport { DotnetVersionDatasource } from '../../datasource/dotnet-version/index.ts';\nimport { FlutterVersionDatasource } from '../../datasource/flutter-version/index.ts';\nimport { GithubReleasesDatasource } from '../../datasource/github-releases/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { HexpmBobDatasource } from '../../datasource/hexpm-bob/index.ts';\nimport { JavaVersionDatasource } from '../../datasource/java-version/index.ts';\nimport { NodeVersionDatasource } from '../../datasource/node-version/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 { RustVersionDatasource } from '../../datasource/rust-version/index.ts';\nimport * as regexVersioning from '../../versioning/regex/index.ts';\nimport * as semverVersioning from '../../versioning/semver/index.ts';\nimport type { PackageDependency } from '../types.ts';\n\nexport type StaticTooling = Partial<PackageDependency> &\n Required<Pick<PackageDependency, 'datasource'>>;\n\nexport type DynamicTooling = (version: string) => StaticTooling | undefined;\n\nexport type ToolingConfig = StaticTooling | DynamicTooling;\nexport interface ToolingDefinition {\n config: ToolingConfig;\n asdfPluginUrl: string;\n}\n\nconst hugoDefinition: ToolingDefinition = {\n // This plugin supports the names `hugo` & `gohugo`\n asdfPluginUrl: 'https://github.com/NeoHsu/asdf-hugo',\n config: (version) => ({\n datasource: GithubReleasesDatasource.id,\n packageName: 'gohugoio/hugo',\n extractVersion: '^v(?<version>\\\\S+)',\n // The asdf hugo plugin supports prefixing the version with\n // `extended_`. Extended versions feature Sass support.\n currentValue: version.replace(regEx(/^extended_/), ''),\n }),\n};\n\nexport const upgradeableTooling: Record<string, ToolingDefinition> = {\n act: {\n asdfPluginUrl: 'https://github.com/grimoh/asdf-act.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'nektos/act',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n actionlint: {\n asdfPluginUrl: 'https://github.com/crazy-matt/asdf-actionlint',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'rhysd/actionlint',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'adr-tools': {\n asdfPluginUrl: 'https://gitlab.com/td7x/asdf/adr-tools.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'npryce/adr-tools',\n },\n },\n apm: {\n asdfPluginUrl: 'https://github.com/edwinhern/asdf-apm',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'microsoft/apm',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n argocd: {\n asdfPluginUrl: 'https://github.com/beardix/asdf-argocd',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'argoproj/argo-cd',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'asdf-plugin-manager': {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-plugin-manager',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'asdf-community/asdf-plugin-manager',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n atmos: {\n asdfPluginUrl: 'https://github.com/cloudposse/asdf-atmos',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'cloudposse/atmos',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n awscli: {\n asdfPluginUrl: 'https://github.com/MetricMike/asdf-awscli',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'aws/aws-cli',\n },\n },\n 'azure-cli': {\n asdfPluginUrl: 'https://github.com/sourcesense/asdf-azure-cli',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'Azure/azure-cli',\n extractVersion: '^azure-cli-(?<version>\\\\S+)',\n },\n },\n bun: {\n asdfPluginUrl: 'https://github.com/cometkim/asdf-bun',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'oven-sh/bun',\n extractVersion: '^bun-v(?<version>\\\\S+)',\n },\n },\n 'cargo-make': {\n asdfPluginUrl: 'https://github.com/mise-plugins/asdf-cargo-make',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'sagiegurari/cargo-make',\n },\n },\n checkov: {\n asdfPluginUrl: 'https://github.com/bosmak/asdf-checkov.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'bridgecrewio/checkov',\n },\n },\n clojure: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-clojure',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'clojure/brew-install',\n versioning: `${regexVersioning.id}:^(?<major>\\\\d+?)\\\\.(?<minor>\\\\d+?)\\\\.(?<patch>\\\\d+)\\\\.(?<build>\\\\d+)$`,\n },\n },\n clusterctl: {\n asdfPluginUrl: 'https://github.com/pfnet-research/asdf-clusterctl',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'kubernetes-sigs/cluster-api',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n conftest: {\n asdfPluginUrl: 'https://github.com/looztra/asdf-conftest',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'open-policy-agent/conftest',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'container-structure-test': {\n asdfPluginUrl:\n 'https://github.com/FeryET/asdf-container-structure-test.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'GoogleContainerTools/container-structure-test',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n cookiecutter: {\n asdfPluginUrl: 'https://github.com/shawon-crosen/asdf-cookiecutter',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'cookiecutter/cookiecutter',\n versioning: semverVersioning.id,\n },\n },\n cosign: {\n asdfPluginUrl: 'https://gitlab.com/wt0f/asdf-cosign',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'sigstore/cosign',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n crystal: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-crystal',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'crystal-lang/crystal',\n },\n },\n dart: {\n asdfPluginUrl: 'https://github.com/PatOConnor43/asdf-dart',\n config: {\n datasource: DartVersionDatasource.id,\n },\n },\n deno: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-deno',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'denoland/deno',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n direnv: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-direnv',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'direnv/direnv',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'dotnet-core': {\n asdfPluginUrl: 'https://github.com/emersonsoares/asdf-dotnet-core',\n config: {\n datasource: DotnetVersionDatasource.id,\n packageName: 'dotnet-sdk',\n },\n },\n dprint: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-dprint',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'dprint/dprint',\n },\n },\n ecspresso: {\n asdfPluginUrl: 'https://github.com/kayac/asdf-ecspresso',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'kayac/ecspresso',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'editorconfig-checker': {\n asdfPluginUrl: 'https://github.com/gabitchov/asdf-editorconfig-checker',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'editorconfig-checker/editorconfig-checker',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n elixir: {\n asdfPluginUrl: 'https://github.com/asdf-vm/asdf-elixir',\n config: {\n datasource: HexpmBobDatasource.id,\n },\n },\n elm: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-elm',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'elm/compiler',\n },\n },\n erlang: {\n asdfPluginUrl: 'https://github.com/asdf-vm/asdf-erlang',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'erlang/otp',\n extractVersion: '^OTP-(?<version>\\\\S+)',\n versioning: `${regexVersioning.id}:^(?<major>\\\\d+?)\\\\.(?<minor>\\\\d+?)(\\\\.(?<patch>\\\\d+))?$`,\n },\n },\n flutter: {\n asdfPluginUrl: 'https://github.com/oae/asdf-flutter',\n config: (version) => ({\n datasource: FlutterVersionDatasource.id,\n // asdf-flutter plugin supports channel on version suffix.\n currentValue: version.replace(regEx(/-(stable|beta|dev)$/), ''),\n }),\n },\n flux2: {\n asdfPluginUrl: 'https://github.com/tablexi/asdf-flux2.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'fluxcd/flux2',\n extractVersion: '^v(?<version>.+)',\n },\n },\n gauche: {\n asdfPluginUrl: 'https://github.com/sakuro/asdf-gauche',\n config: {\n datasource: DockerDatasource.id,\n packageName: 'practicalscheme/gauche',\n },\n },\n 'github-cli': {\n asdfPluginUrl: 'https://github.com/bartlomiejdanek/asdf-github-cli.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'cli/cli',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n gitleaks: {\n asdfPluginUrl: 'https://github.com/jmcvetta/asdf-gitleaks',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'gitleaks/gitleaks',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n ginkgo: {\n asdfPluginUrl: 'https://github.com/jimmidyson/asdf-ginkgo',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'onsi/ginkgo',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n gleam: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-gleam.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'gleam-lang/gleam',\n extractVersion: '^v(?<version>.+)',\n },\n },\n gohugo: hugoDefinition,\n golang: {\n asdfPluginUrl: 'https://github.com/kennyp/asdf-golang',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'golang/go',\n extractVersion: '^go(?<version>\\\\S+)',\n },\n },\n 'golangci-lint': {\n asdfPluginUrl: 'https://github.com/hypnoglow/asdf-golangci-lint.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'golangci/golangci-lint',\n extractVersion: '^v(?<version>.+)',\n },\n },\n gomplate: {\n asdfPluginUrl: 'https://github.com/sneakybeaky/asdf-gomplate',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'hairyhenderson/gomplate',\n extractVersion: '^v(?<version>.+)',\n },\n },\n gotestsum: {\n asdfPluginUrl: 'https://github.com/hpcsc/asdf-gotestsum',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'gotestyourself/gotestsum',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n hadolint: {\n asdfPluginUrl: 'https://github.com/looztra/asdf-hadolint.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'hadolint/hadolint',\n extractVersion: '^v(?<version>.+)',\n },\n },\n haskell: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-haskell',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'ghc/ghc',\n extractVersion: '^ghc-(?<version>\\\\S+?)-release',\n },\n },\n helm: {\n asdfPluginUrl: 'https://github.com/Antiarchitect/asdf-helm',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'helm/helm',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'helm-docs': {\n asdfPluginUrl: 'https://github.com/sudermanjr/asdf-helm-docs.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'norwoodj/helm-docs',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n helmfile: {\n asdfPluginUrl: 'https://github.com/feniix/asdf-helmfile',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'helmfile/helmfile',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n hugo: hugoDefinition,\n idris: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-idris',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'idris-lang/Idris-dev',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n istioctl: {\n asdfPluginUrl: 'https://github.com/virtualstaticvoid/asdf-istioctl',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'istio/istio',\n versioning: semverVersioning.id,\n },\n },\n java: {\n asdfPluginUrl: 'https://github.com/halcyon/asdf-java',\n config: (version) => {\n const adoptOpenJdkMatches = regEx(/^adoptopenjdk-(?<version>\\d\\S+)/).exec(\n version,\n )?.groups;\n if (adoptOpenJdkMatches) {\n return {\n datasource: JavaVersionDatasource.id,\n packageName: 'java-jdk',\n currentValue: adoptOpenJdkMatches.version,\n };\n }\n const adoptOpenJreMatches = regEx(\n /^adoptopenjdk-jre-(?<version>\\d\\S+)/,\n ).exec(version)?.groups;\n if (adoptOpenJreMatches) {\n return {\n datasource: JavaVersionDatasource.id,\n packageName: 'java-jre',\n currentValue: adoptOpenJreMatches.version,\n };\n }\n const temurinJdkMatches = regEx(/^temurin-(?<version>\\d\\S+)/).exec(\n version,\n )?.groups;\n if (temurinJdkMatches) {\n return {\n datasource: JavaVersionDatasource.id,\n packageName: 'java-jdk',\n currentValue: temurinJdkMatches.version,\n };\n }\n const temurinJreMatches = regEx(/^temurin-jre-(?<version>\\d\\S+)/).exec(\n version,\n )?.groups;\n if (temurinJreMatches) {\n return {\n datasource: JavaVersionDatasource.id,\n packageName: 'java-jre',\n currentValue: temurinJreMatches.version,\n };\n }\n\n return undefined;\n },\n },\n julia: {\n asdfPluginUrl: 'https://github.com/rkyleg/asdf-julia',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'JuliaLang/julia',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n just: {\n asdfPluginUrl: 'https://github.com/olofvndrhr/asdf-just',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'casey/just',\n },\n },\n k3s: {\n asdfPluginUrl: 'https://github.com/dmpe/asdf-k3s',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'k3s-io/k3s',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n kind: {\n asdfPluginUrl: 'https://github.com/johnlayton/asdf-kind',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'kubernetes-sigs/kind',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n kotlin: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-kotlin',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'JetBrains/kotlin',\n extractVersion: '^(Kotlin |v)(?<version>\\\\S+)',\n },\n },\n kubebuilder: {\n asdfPluginUrl: 'https://github.com/virtualstaticvoid/asdf-kubebuilder.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'kubernetes-sigs/kubebuilder',\n extractVersion: '^v(?<version>.+)',\n },\n },\n kubectl: {\n asdfPluginUrl: 'https://github.com/Banno/asdf-kubectl.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'kubernetes/kubernetes',\n extractVersion: '^v(?<version>.+)',\n },\n },\n kubetail: {\n asdfPluginUrl: 'https://github.com/janpieper/asdf-kubetail.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'johanhaleby/kubetail',\n },\n },\n kustomize: {\n asdfPluginUrl: 'https://github.com/Banno/asdf-kustomize',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'kubernetes-sigs/kustomize',\n extractVersion: '^kustomize/v(?<version>\\\\S+)',\n },\n },\n localstack: {\n asdfPluginUrl: 'https://github.com/Azulinho/asdf-localstack',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'localstack/localstack',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n lua: {\n asdfPluginUrl: 'https://github.com/Stratus3D/asdf-lua',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'lua/lua',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'markdownlint-cli2': {\n asdfPluginUrl:\n 'https://github.com/paulo-ferraz-oliveira/asdf-markdownlint-cli2',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'DavidAnson/markdownlint-cli2',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n maven: {\n asdfPluginUrl: 'https://github.com/halcyon/asdf-maven',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'apache/maven',\n },\n },\n mimirtool: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-mimirtool',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'grafana/mimir',\n extractVersion: '^mimir-(?<version>\\\\S+)',\n },\n },\n minikube: {\n asdfPluginUrl: 'https://github.com/alvarobp/asdf-minikube.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'kubernetes/minikube',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n mockery: {\n asdfPluginUrl: 'https://github.com/cabify/asdf-mockery.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'vektra/mockery',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n nim: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-nim',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'nim-lang/Nim',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n nodejs: {\n asdfPluginUrl: 'https://github.com/asdf-vm/asdf-nodejs',\n config: {\n depName: 'node',\n datasource: NodeVersionDatasource.id,\n },\n },\n ocaml: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-ocaml',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'ocaml/ocaml',\n },\n },\n oci: {\n asdfPluginUrl: 'https://github.com/yasn77/asdf-oci',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'oracle/oci-cli',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n opa: {\n asdfPluginUrl: 'https://github.com/tochukwuvictor/asdf-opa',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'open-policy-agent/opa',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n opentofu: {\n asdfPluginUrl: 'https://github.com/virtualroot/asdf-opentofu',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'opentofu/opentofu',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n packer: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-hashicorp',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'hashicorp/packer',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n perl: {\n asdfPluginUrl: 'https://github.com/ouest/asdf-perl',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'Perl/perl5',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n php: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-php',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'php/php-src',\n extractVersion: '^php-(?<version>\\\\S+)',\n },\n },\n pnpm: {\n asdfPluginUrl: 'https://github.com/jonathanmorley/asdf-pnpm',\n config: {\n datasource: NpmDatasource.id,\n packageName: 'pnpm',\n versioning: semverVersioning.id,\n },\n },\n poetry: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-poetry',\n config: {\n datasource: PypiDatasource.id,\n packageName: 'poetry',\n },\n },\n 'pre-commit': {\n asdfPluginUrl: 'https://github.com/jonathanmorley/asdf-pre-commit.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'pre-commit/pre-commit',\n extractVersion: '^v(?<version>.+)',\n },\n },\n protoc: {\n asdfPluginUrl: 'https://github.com/paxosglobal/asdf-protoc.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'protocolbuffers/protobuf',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n pulumi: {\n asdfPluginUrl: 'https://github.com/canha/asdf-pulumi.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'pulumi/pulumi',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n python: {\n asdfPluginUrl: 'https://github.com/danhper/asdf-python',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'python/cpython',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n rebar: {\n asdfPluginUrl: 'https://github.com/Stratus3D/asdf-rebar.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'erlang/rebar3',\n },\n },\n ruby: {\n asdfPluginUrl: 'https://github.com/asdf-vm/asdf-ruby',\n config: {\n datasource: RubyVersionDatasource.id,\n packageName: 'ruby-version',\n versioning: semverVersioning.id,\n },\n },\n rust: {\n asdfPluginUrl: 'https://github.com/code-lever/asdf-rust',\n config: {\n datasource: RustVersionDatasource.id,\n packageName: 'rust',\n },\n },\n sbt: {\n asdfPluginUrl: 'https://github.com/bram2000/asdf-sbt.git',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'sbt/sbt',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n scala: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-scala',\n config: (version) => {\n if (version.startsWith('2')) {\n return {\n datasource: GithubTagsDatasource.id,\n packageName: 'scala/scala',\n extractVersion: '^v(?<version>\\\\S+)',\n };\n }\n if (version.startsWith('3')) {\n return {\n datasource: GithubTagsDatasource.id,\n packageName: 'lampepfl/dotty',\n };\n }\n\n return undefined;\n },\n },\n shellcheck: {\n asdfPluginUrl: 'https://github.com/luizm/asdf-shellcheck',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'koalaman/shellcheck',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n shfmt: {\n asdfPluginUrl: 'https://github.com/luizm/asdf-shfmt',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'mvdan/sh',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n skaffold: {\n asdfPluginUrl: 'https://github.com/nklmilojevic/asdf-skaffold',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'GoogleContainerTools/skaffold',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n sops: {\n asdfPluginUrl: 'https://github.com/feniix/asdf-sops',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'mozilla/sops',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n steampipe: {\n asdfPluginUrl: 'https://github.com/carnei-ro/asdf-steampipe',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'turbot/steampipe',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n talhelper: {\n asdfPluginUrl: 'https://github.com/bjw-s/asdf-talhelper',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'budimanjojo/talhelper',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n talosctl: {\n asdfPluginUrl: 'https://github.com/bjw-s/asdf-talosctl',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'siderolabs/talos',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n terraform: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-hashicorp',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'hashicorp/terraform',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n 'terraform-docs': {\n asdfPluginUrl: 'https://github.com/looztra/asdf-terraform-docs.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'terraform-docs/terraform-docs',\n extractVersion: '^v(?<version>.+)',\n },\n },\n terraformer: {\n asdfPluginUrl: 'https://github.com/grimoh/asdf-terraformer',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'GoogleCloudPlatform/terraformer',\n },\n },\n terragrunt: {\n asdfPluginUrl: 'https://github.com/ohmer/asdf-terragrunt',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'gruntwork-io/terragrunt',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n terramate: {\n asdfPluginUrl: 'https://github.com/martinlindner/asdf-terramate',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'terramate-io/terramate',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n tflint: {\n asdfPluginUrl: 'https://github.com/skyzyx/asdf-tflint.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'terraform-linters/tflint',\n extractVersion: '^v(?<version>.+)',\n },\n },\n tfsec: {\n asdfPluginUrl: 'https://github.com/woneill/asdf-tfsec.git',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'aquasecurity/tfsec',\n extractVersion: '^v(?<version>.+)',\n },\n },\n trivy: {\n asdfPluginUrl: 'https://github.com/zufardhiyaulhaq/asdf-trivy',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'aquasecurity/trivy',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n vault: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-hashicorp',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'hashicorp/vault',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n yamllint: {\n asdfPluginUrl: 'https://github.com/ericcornelissen/asdf-yamllint',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'adrienverge/yamllint',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n yq: {\n asdfPluginUrl: 'https://github.com/sudermanjr/asdf-yq',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'mikefarah/yq',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n zig: {\n asdfPluginUrl: 'https://github.com/cheetah/asdf-zig',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'ziglang/zig',\n },\n },\n maestro: {\n asdfPluginUrl: 'https://github.com/dotanuki-labs/asdf-maestro',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'mobile-dev-inc/maestro',\n extractVersion: '^cli-(?<version>\\\\S+)',\n },\n },\n detekt: {\n asdfPluginUrl: 'https://github.com/dotanuki-labs/asdf-detekt',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'detekt/detekt',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n ktlint: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-ktlint',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'pinterest/ktlint',\n },\n },\n yamlfmt: {\n asdfPluginUrl: 'https://github.com/mise-plugins/asdf-yamlfmt',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'google/yamlfmt',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n tuist: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-tuist',\n config: {\n datasource: GithubTagsDatasource.id,\n packageName: 'tuist/tuist',\n },\n },\n typos: {\n asdfPluginUrl: 'https://github.com/aschiavon91/asdf-typos',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'crate-ci/typos',\n extractVersion: '^v(?<version>\\\\S+)',\n },\n },\n uv: {\n asdfPluginUrl: 'https://github.com/asdf-community/asdf-uv',\n config: {\n datasource: GithubReleasesDatasource.id,\n packageName: 'astral-sh/uv',\n },\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AA6BA,MAAM,iBAAoC;CAExC,eAAe;CACf,SAAS,aAAa;EACpB,YAAY,yBAAyB;EACrC,aAAa;EACb,gBAAgB;EAGhB,cAAc,QAAQ,QAAQ,MAAM,YAAY,GAAG,EAAE;CACvD;AACF;AAEA,MAAa,qBAAwD;CACnE,KAAK;EACH,eAAe;EACf,QAAQ;GACN,YAAY,yBAAyB;GACrC,aAAa;GACb,gBAAgB;EAClB;CACF;CACA,YAAY;EACV,eAAe;EACf,QAAQ;GACN,YAAY,yBAAyB;GACrC,aAAa;GACb,gBAAgB;EAClB;CACF;CACA,aAAa;EACX,eAAe;EACf,QAAQ;GACN,YAAY,qBAAqB;GACjC,aAAa;EACf;CACF;CACA,KAAK;EACH,eAAe;EACf,QAAQ;GACN,YAAY,yBAAyB;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aAAa;GACb,gBAAgB;EAClB;CACF;CACA,IAAI;EACF,eAAe;EACf,QAAQ;GACN,YAAY,yBAAyB;GACrC,aAAa;EACf;CACF;AACF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { regEx } from "../../../util/regex.js";
|
|
1
2
|
import { logger } from "../../../logger/index.js";
|
|
2
3
|
import { isNotNullOrUndefined } from "../../../util/array.js";
|
|
3
4
|
import { LooseArray } from "../../../util/schema-utils/index.js";
|
|
@@ -44,7 +45,7 @@ async function extractPackageFile(content, packageFile, config) {
|
|
|
44
45
|
}
|
|
45
46
|
async function extractBazelPfc(records, packageFile) {
|
|
46
47
|
const pfc = LooseArray(RuleToBazelModulePackageDep).transform(toPackageDependencies).transform((deps) => ({ deps })).parse(records);
|
|
47
|
-
const registryUrls = (await read(upath.dirname(packageFile))).filter((ce) => ce.config === void 0).map((ce) => ce.getOption("registry")?.value).map((url) => url?.replace(/^["']|["']$/g, "")).filter(isNotNullOrUndefined);
|
|
48
|
+
const registryUrls = (await read(upath.dirname(packageFile))).filter((ce) => ce.config === void 0).map((ce) => ce.getOption("registry")?.value).map((url) => url?.replace(regEx(/^["']|["']$/g), "")).filter(isNotNullOrUndefined);
|
|
48
49
|
if (registryUrls.length) pfc.registryUrls = registryUrls;
|
|
49
50
|
return pfc;
|
|
50
51
|
}
|