renovate 43.121.0 → 43.123.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/presets/internal/config.preset.js +2 -0
- package/dist/config/presets/internal/config.preset.js.map +1 -1
- package/dist/config/presets/internal/global.preset.js +1 -0
- package/dist/config/presets/internal/global.preset.js.map +1 -1
- package/dist/config/presets/internal/helpers.preset.js +33 -4
- package/dist/config/presets/internal/helpers.preset.js.map +1 -1
- package/dist/manager-list.generated.d.ts +1 -1
- package/dist/manager-list.generated.js +2 -1
- package/dist/manager-list.generated.js.map +1 -1
- package/dist/modules/datasource/api.js +1 -1
- package/dist/modules/datasource/nuget/v3.js +1 -1
- package/dist/modules/datasource/terraform-module/base.js +4 -3
- package/dist/modules/datasource/terraform-module/base.js.map +1 -1
- package/dist/modules/datasource/terraform-module/index.js +46 -67
- package/dist/modules/datasource/terraform-module/index.js.map +1 -1
- package/dist/modules/datasource/terraform-module/schema.js +31 -0
- package/dist/modules/datasource/terraform-module/schema.js.map +1 -0
- package/dist/modules/datasource/terraform-module/utils.js +15 -1
- package/dist/modules/datasource/terraform-module/utils.js.map +1 -1
- package/dist/modules/datasource/terraform-provider/index.js +0 -1
- package/dist/modules/datasource/terraform-provider/index.js.map +1 -1
- package/dist/modules/manager/ant/extract.js +24 -8
- package/dist/modules/manager/ant/extract.js.map +1 -1
- package/dist/modules/manager/api.js +2 -0
- package/dist/modules/manager/api.js.map +1 -1
- package/dist/modules/manager/buildpacks/extract.js +1 -1
- package/dist/modules/manager/fingerprint.generated.js +3 -2
- package/dist/modules/manager/fingerprint.generated.js.map +1 -1
- package/dist/modules/manager/maven/extract.js +1 -1
- package/dist/modules/manager/nuget/extract.js +1 -1
- package/dist/modules/manager/terraform/base.js +2 -2
- package/dist/modules/manager/terraform/base.js.map +1 -1
- package/dist/modules/manager/xcodegen/extract.js +142 -0
- package/dist/modules/manager/xcodegen/extract.js.map +1 -0
- package/dist/modules/manager/xcodegen/index.js +30 -0
- package/dist/modules/manager/xcodegen/index.js.map +1 -0
- package/dist/modules/manager/xcodegen/schema.js +25 -0
- package/dist/modules/manager/xcodegen/schema.js.map +1 -0
- package/dist/modules/platform/github/schema.d.ts +2 -2
- package/dist/modules/versioning/api.js +4 -4
- package/dist/workers/repository/init/vulnerability.js +1 -1
- package/package.json +1 -1
- package/renovate-schema.json +59 -2
|
@@ -32,6 +32,8 @@ const presets = {
|
|
|
32
32
|
"mergeConfidence:age-confidence-badges",
|
|
33
33
|
"replacements:all",
|
|
34
34
|
"workarounds:all",
|
|
35
|
+
"helpers:forgejoDigestChangelogs",
|
|
36
|
+
"helpers:giteaDigestChangelogs",
|
|
35
37
|
"helpers:githubDigestChangelogs",
|
|
36
38
|
"helpers:goXPackagesChangelogLink",
|
|
37
39
|
"helpers:goXPackagesNameLink"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.preset.js","names":[],"sources":["../../../../lib/config/presets/internal/config.preset.ts"],"sourcesContent":["import type { Preset } from '../types.ts';\n\nexport const presets: Record<string, Preset> = {\n 'best-practices': {\n description:\n 'Preset with best practices from the Renovate maintainers. Recommended for advanced users, who want to follow our best practices.',\n extends: [\n 'config:recommended',\n 'docker:pinDigests',\n 'helpers:pinGitHubActionDigests',\n ':configMigration',\n ':pinDevDependencies',\n 'abandonments:recommended',\n 'security:minimumReleaseAgeNpm',\n ':maintainLockFilesWeekly',\n ],\n },\n 'js-app': {\n description: 'Default configuration for webapps.',\n extends: ['config:recommended', ':pinAllExceptPeerDependencies'],\n },\n 'js-lib': {\n description: 'Default configuration for libraries.',\n extends: ['config:recommended', ':pinOnlyDevDependencies'],\n },\n recommended: {\n description:\n 'Recommended configuration for most users. It does not matter what programming language you use.',\n extends: [\n ':dependencyDashboard',\n ':semanticPrefixFixDepsChoreOthers',\n ':ignoreModulesAndTests',\n 'group:monorepos',\n 'group:recommended',\n 'mergeConfidence:age-confidence-badges',\n 'replacements:all',\n 'workarounds:all',\n 'helpers:githubDigestChangelogs',\n 'helpers:goXPackagesChangelogLink',\n 'helpers:goXPackagesNameLink',\n ],\n },\n semverAllMonthly: {\n description:\n 'Preserve SemVer ranges and update everything together once a month. (excluding replacements and lockfile maintenance)',\n extends: [\n ':preserveSemverRanges',\n 'group:all',\n 'schedule:monthly',\n ':maintainLockFilesMonthly',\n ],\n lockFileMaintenance: {\n commitMessageAction: 'Update',\n },\n separateMajorMinor: false,\n },\n semverAllWeekly: {\n description:\n 'Preserve SemVer ranges and update everything together once a week (excluding replacements and lockfile maintenance).',\n extends: [\n ':preserveSemverRanges',\n 'group:all',\n 'schedule:weekly',\n ':maintainLockFilesWeekly',\n ],\n lockFileMaintenance: {\n commitMessageAction: 'Update',\n },\n separateMajorMinor: false,\n },\n};\n"],"mappings":";AAEA,MAAa,UAAkC;CAC7C,kBAAkB;EAChB,aACE;EACF,SAAS;GACP;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF;CACD,UAAU;EACR,aAAa;EACb,SAAS,CAAC,sBAAsB,gCAAgC;EACjE;CACD,UAAU;EACR,aAAa;EACb,SAAS,CAAC,sBAAsB,0BAA0B;EAC3D;CACD,aAAa;EACX,aACE;EACF,SAAS;GACP;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF;CACD,kBAAkB;EAChB,aACE;EACF,SAAS;GACP;GACA;GACA;GACA;GACD;EACD,qBAAqB,EACnB,qBAAqB,UACtB;EACD,oBAAoB;EACrB;CACD,iBAAiB;EACf,aACE;EACF,SAAS;GACP;GACA;GACA;GACA;GACD;EACD,qBAAqB,EACnB,qBAAqB,UACtB;EACD,oBAAoB;EACrB;CACF"}
|
|
1
|
+
{"version":3,"file":"config.preset.js","names":[],"sources":["../../../../lib/config/presets/internal/config.preset.ts"],"sourcesContent":["import type { Preset } from '../types.ts';\n\nexport const presets: Record<string, Preset> = {\n 'best-practices': {\n description:\n 'Preset with best practices from the Renovate maintainers. Recommended for advanced users, who want to follow our best practices.',\n extends: [\n 'config:recommended',\n 'docker:pinDigests',\n 'helpers:pinGitHubActionDigests',\n ':configMigration',\n ':pinDevDependencies',\n 'abandonments:recommended',\n 'security:minimumReleaseAgeNpm',\n ':maintainLockFilesWeekly',\n ],\n },\n 'js-app': {\n description: 'Default configuration for webapps.',\n extends: ['config:recommended', ':pinAllExceptPeerDependencies'],\n },\n 'js-lib': {\n description: 'Default configuration for libraries.',\n extends: ['config:recommended', ':pinOnlyDevDependencies'],\n },\n recommended: {\n description:\n 'Recommended configuration for most users. It does not matter what programming language you use.',\n extends: [\n ':dependencyDashboard',\n ':semanticPrefixFixDepsChoreOthers',\n ':ignoreModulesAndTests',\n 'group:monorepos',\n 'group:recommended',\n 'mergeConfidence:age-confidence-badges',\n 'replacements:all',\n 'workarounds:all',\n 'helpers:forgejoDigestChangelogs',\n 'helpers:giteaDigestChangelogs',\n 'helpers:githubDigestChangelogs',\n 'helpers:goXPackagesChangelogLink',\n 'helpers:goXPackagesNameLink',\n ],\n },\n semverAllMonthly: {\n description:\n 'Preserve SemVer ranges and update everything together once a month. (excluding replacements and lockfile maintenance)',\n extends: [\n ':preserveSemverRanges',\n 'group:all',\n 'schedule:monthly',\n ':maintainLockFilesMonthly',\n ],\n lockFileMaintenance: {\n commitMessageAction: 'Update',\n },\n separateMajorMinor: false,\n },\n semverAllWeekly: {\n description:\n 'Preserve SemVer ranges and update everything together once a week (excluding replacements and lockfile maintenance).',\n extends: [\n ':preserveSemverRanges',\n 'group:all',\n 'schedule:weekly',\n ':maintainLockFilesWeekly',\n ],\n lockFileMaintenance: {\n commitMessageAction: 'Update',\n },\n separateMajorMinor: false,\n },\n};\n"],"mappings":";AAEA,MAAa,UAAkC;CAC7C,kBAAkB;EAChB,aACE;EACF,SAAS;GACP;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF;CACD,UAAU;EACR,aAAa;EACb,SAAS,CAAC,sBAAsB,gCAAgC;EACjE;CACD,UAAU;EACR,aAAa;EACb,SAAS,CAAC,sBAAsB,0BAA0B;EAC3D;CACD,aAAa;EACX,aACE;EACF,SAAS;GACP;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF;CACD,kBAAkB;EAChB,aACE;EACF,SAAS;GACP;GACA;GACA;GACA;GACD;EACD,qBAAqB,EACnB,qBAAqB,UACtB;EACD,oBAAoB;EACrB;CACD,iBAAiB;EACf,aACE;EACF,SAAS;GACP;GACA;GACA;GACA;GACD;EACD,qBAAqB,EACnB,qBAAqB,UACtB;EACD,oBAAoB;EACrB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.preset.js","names":[],"sources":["../../../../lib/config/presets/internal/global.preset.ts"],"sourcesContent":["import type { GlobalPreset } from '../types.ts';\n\nexport const presets: Record<string, GlobalPreset> = {\n safeEnv: {\n allowedEnv: ['GO*'
|
|
1
|
+
{"version":3,"file":"global.preset.js","names":[],"sources":["../../../../lib/config/presets/internal/global.preset.ts"],"sourcesContent":["import type { GlobalPreset } from '../types.ts';\n\nexport const presets: Record<string, GlobalPreset> = {\n safeEnv: {\n allowedEnv: [\n 'BUN_CONFIG_MAX_HTTP_REQUESTS',\n 'GO*',\n 'GRADLE_OPTS',\n 'RUSTC_BOOTSTRAP',\n ],\n description:\n 'Hopefully safe environment variables to allow users to configure.',\n },\n};\n"],"mappings":";AAEA,MAAa,UAAwC,EACnD,SAAS;CACP,YAAY;EACV;EACA;EACA;EACA;EACD;CACD,aACE;CACH,EACF"}
|
|
@@ -16,17 +16,46 @@ const presets = {
|
|
|
16
16
|
description: "Keep `typescript` version in sync with the `rc` tag.",
|
|
17
17
|
extends: [":followTag(typescript, rc)"]
|
|
18
18
|
},
|
|
19
|
+
forgejoDigestChangelogs: {
|
|
20
|
+
description: "Ensure that every dependency pinned by digest and sourced from Forgejo contains a link to the commit-to-commit diff",
|
|
21
|
+
packageRules: [{
|
|
22
|
+
changelogUrl: "{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}",
|
|
23
|
+
matchDatasources: ["forgejo-releases", "forgejo-tags"],
|
|
24
|
+
matchUpdateTypes: ["digest"]
|
|
25
|
+
}, {
|
|
26
|
+
changelogUrl: "{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}",
|
|
27
|
+
matchDatasources: ["git-refs", "git-tags"],
|
|
28
|
+
matchJsonata: ["$detectPlatform(sourceUrl) = 'forgejo'"],
|
|
29
|
+
matchUpdateTypes: ["digest"]
|
|
30
|
+
}]
|
|
31
|
+
},
|
|
32
|
+
giteaDigestChangelogs: {
|
|
33
|
+
description: "Ensure that every dependency pinned by digest and sourced from Gitea contains a link to the commit-to-commit diff",
|
|
34
|
+
packageRules: [{
|
|
35
|
+
changelogUrl: "{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}",
|
|
36
|
+
matchDatasources: ["gitea-releases", "gitea-tags"],
|
|
37
|
+
matchUpdateTypes: ["digest"]
|
|
38
|
+
}, {
|
|
39
|
+
changelogUrl: "{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}",
|
|
40
|
+
matchDatasources: ["git-refs", "git-tags"],
|
|
41
|
+
matchJsonata: ["$detectPlatform(sourceUrl) = 'gitea'"],
|
|
42
|
+
matchUpdateTypes: ["digest"]
|
|
43
|
+
}]
|
|
44
|
+
},
|
|
19
45
|
githubDigestChangelogs: {
|
|
20
|
-
description: "Ensure that every dependency pinned by digest and sourced from GitHub.com contains a link to the commit-to-commit diff",
|
|
46
|
+
description: "Ensure that every dependency pinned by digest and sourced from GitHub.com and Github enterprise contains a link to the commit-to-commit diff",
|
|
21
47
|
packageRules: [{
|
|
22
48
|
changelogUrl: "{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}",
|
|
23
49
|
matchDatasources: [
|
|
24
|
-
"
|
|
25
|
-
"git-tags",
|
|
50
|
+
"github-digest",
|
|
26
51
|
"github-releases",
|
|
27
52
|
"github-tags"
|
|
28
53
|
],
|
|
29
|
-
|
|
54
|
+
matchUpdateTypes: ["digest"]
|
|
55
|
+
}, {
|
|
56
|
+
changelogUrl: "{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}",
|
|
57
|
+
matchDatasources: ["git-refs", "git-tags"],
|
|
58
|
+
matchJsonata: ["$detectPlatform(sourceUrl) = 'github'"],
|
|
30
59
|
matchUpdateTypes: ["digest"]
|
|
31
60
|
}]
|
|
32
61
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.preset.js","names":[],"sources":["../../../../lib/config/presets/internal/helpers.preset.ts"],"sourcesContent":["import type { Preset } from '../types.ts';\n\nexport const presets: Record<string, Preset> = {\n disableTypesNodeMajor: {\n description: 'Disable `major` updates to `@types/node`.',\n packageRules: [\n {\n enabled: false,\n matchPackageNames: ['@types/node'],\n matchUpdateTypes: ['major'],\n },\n ],\n },\n followTypescriptNext: {\n description: 'Keep `typescript` version in sync with the `next` tag.',\n extends: [':followTag(typescript, next)'],\n },\n followTypescriptRc: {\n description: 'Keep `typescript` version in sync with the `rc` tag.',\n extends: [':followTag(typescript, rc)'],\n },\n
|
|
1
|
+
{"version":3,"file":"helpers.preset.js","names":[],"sources":["../../../../lib/config/presets/internal/helpers.preset.ts"],"sourcesContent":["import type { Preset } from '../types.ts';\n\nexport const presets: Record<string, Preset> = {\n disableTypesNodeMajor: {\n description: 'Disable `major` updates to `@types/node`.',\n packageRules: [\n {\n enabled: false,\n matchPackageNames: ['@types/node'],\n matchUpdateTypes: ['major'],\n },\n ],\n },\n followTypescriptNext: {\n description: 'Keep `typescript` version in sync with the `next` tag.',\n extends: [':followTag(typescript, next)'],\n },\n followTypescriptRc: {\n description: 'Keep `typescript` version in sync with the `rc` tag.',\n extends: [':followTag(typescript, rc)'],\n },\n forgejoDigestChangelogs: {\n description:\n 'Ensure that every dependency pinned by digest and sourced from Forgejo contains a link to the commit-to-commit diff',\n packageRules: [\n {\n changelogUrl: '{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}',\n matchDatasources: ['forgejo-releases', 'forgejo-tags'],\n matchUpdateTypes: ['digest'],\n },\n {\n changelogUrl: '{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}',\n matchDatasources: ['git-refs', 'git-tags'],\n matchJsonata: [\"$detectPlatform(sourceUrl) = 'forgejo'\"],\n matchUpdateTypes: ['digest'],\n },\n ],\n },\n giteaDigestChangelogs: {\n description:\n 'Ensure that every dependency pinned by digest and sourced from Gitea contains a link to the commit-to-commit diff',\n packageRules: [\n {\n changelogUrl: '{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}',\n matchDatasources: ['gitea-releases', 'gitea-tags'],\n matchUpdateTypes: ['digest'],\n },\n {\n changelogUrl: '{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}',\n matchDatasources: ['git-refs', 'git-tags'],\n matchJsonata: [\"$detectPlatform(sourceUrl) = 'gitea'\"],\n matchUpdateTypes: ['digest'],\n },\n ],\n },\n githubDigestChangelogs: {\n description:\n 'Ensure that every dependency pinned by digest and sourced from GitHub.com and Github enterprise contains a link to the commit-to-commit diff',\n packageRules: [\n {\n changelogUrl: '{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}',\n matchDatasources: ['github-digest', 'github-releases', 'github-tags'],\n matchUpdateTypes: ['digest'],\n },\n {\n changelogUrl: '{{sourceUrl}}/compare/{{currentDigest}}..{{newDigest}}',\n matchDatasources: ['git-refs', 'git-tags'],\n matchJsonata: [\"$detectPlatform(sourceUrl) = 'github'\"],\n matchUpdateTypes: ['digest'],\n },\n ],\n },\n goXPackagesChangelogLink: {\n description: 'Correctly link to the source code for golang.org/x packages',\n packageRules: [\n {\n matchManagers: ['gomod'],\n // NOTE that digests are not supported with the below diff view\n matchUpdateTypes: ['major', 'minor', 'patch'],\n prBodyDefinitions: {\n Change:\n \"{{#if (containsString depName 'golang.org/x/')}}[`{{{displayFrom}}}` → `{{{displayTo}}}`](https://cs.opensource.google/{{{replace '^golang\\\\.org' 'go' depName}}}/+/refs/tags/{{{currentValue}}}...refs/tags/{{{newValue}}}){{else}}`{{{displayFrom}}}` → `{{{displayTo}}}`{{/if}}\",\n },\n },\n ],\n },\n goXPackagesNameLink: {\n description: \"Link to pkg.go.dev/... for golang.org/x packages' title\",\n packageRules: [\n {\n matchManagers: ['gomod'],\n prBodyDefinitions: {\n Package:\n \"{{#if (containsString depName 'golang.org/x/')}}[{{{depName}}}](https://pkg.go.dev/{{{depName}}}){{else}}{{{depNameLinked}}}{{/if}}\",\n },\n },\n ],\n },\n pinGitHubActionDigests: {\n description: 'Pin `github-action` digests.',\n packageRules: [\n {\n matchDepTypes: ['action'],\n pinDigests: true,\n },\n ],\n },\n pinGitHubActionDigestsToSemver: {\n description: 'Convert pinned GitHub Action digests to SemVer.',\n packageRules: [\n {\n extends: ['helpers:pinGitHubActionDigests'],\n extractVersion: '^(?<version>v?\\\\d+\\\\.\\\\d+\\\\.\\\\d+)$',\n versioning:\n 'regex:^v?(?<major>\\\\d+)(\\\\.(?<minor>\\\\d+)\\\\.(?<patch>\\\\d+))?$',\n },\n ],\n },\n};\n"],"mappings":";AAEA,MAAa,UAAkC;CAC7C,uBAAuB;EACrB,aAAa;EACb,cAAc,CACZ;GACE,SAAS;GACT,mBAAmB,CAAC,cAAc;GAClC,kBAAkB,CAAC,QAAQ;GAC5B,CACF;EACF;CACD,sBAAsB;EACpB,aAAa;EACb,SAAS,CAAC,+BAA+B;EAC1C;CACD,oBAAoB;EAClB,aAAa;EACb,SAAS,CAAC,6BAA6B;EACxC;CACD,yBAAyB;EACvB,aACE;EACF,cAAc,CACZ;GACE,cAAc;GACd,kBAAkB,CAAC,oBAAoB,eAAe;GACtD,kBAAkB,CAAC,SAAS;GAC7B,EACD;GACE,cAAc;GACd,kBAAkB,CAAC,YAAY,WAAW;GAC1C,cAAc,CAAC,yCAAyC;GACxD,kBAAkB,CAAC,SAAS;GAC7B,CACF;EACF;CACD,uBAAuB;EACrB,aACE;EACF,cAAc,CACZ;GACE,cAAc;GACd,kBAAkB,CAAC,kBAAkB,aAAa;GAClD,kBAAkB,CAAC,SAAS;GAC7B,EACD;GACE,cAAc;GACd,kBAAkB,CAAC,YAAY,WAAW;GAC1C,cAAc,CAAC,uCAAuC;GACtD,kBAAkB,CAAC,SAAS;GAC7B,CACF;EACF;CACD,wBAAwB;EACtB,aACE;EACF,cAAc,CACZ;GACE,cAAc;GACd,kBAAkB;IAAC;IAAiB;IAAmB;IAAc;GACrE,kBAAkB,CAAC,SAAS;GAC7B,EACD;GACE,cAAc;GACd,kBAAkB,CAAC,YAAY,WAAW;GAC1C,cAAc,CAAC,wCAAwC;GACvD,kBAAkB,CAAC,SAAS;GAC7B,CACF;EACF;CACD,0BAA0B;EACxB,aAAa;EACb,cAAc,CACZ;GACE,eAAe,CAAC,QAAQ;GAExB,kBAAkB;IAAC;IAAS;IAAS;IAAQ;GAC7C,mBAAmB,EACjB,QACE,sRACH;GACF,CACF;EACF;CACD,qBAAqB;EACnB,aAAa;EACb,cAAc,CACZ;GACE,eAAe,CAAC,QAAQ;GACxB,mBAAmB,EACjB,SACE,uIACH;GACF,CACF;EACF;CACD,wBAAwB;EACtB,aAAa;EACb,cAAc,CACZ;GACE,eAAe,CAAC,SAAS;GACzB,YAAY;GACb,CACF;EACF;CACD,gCAAgC;EAC9B,aAAa;EACb,cAAc,CACZ;GACE,SAAS,CAAC,iCAAiC;GAC3C,gBAAgB;GAChB,YACE;GACH,CACF;EACF;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region lib/manager-list.generated.d.ts
|
|
2
|
-
declare const AllManagersListLiteral: readonly ["ansible", "ansible-galaxy", "ant", "argocd", "asdf", "azure-pipelines", "batect", "batect-wrapper", "bazel", "bazel-module", "bazelisk", "bicep", "bitbucket-pipelines", "bitrise", "buildkite", "buildpacks", "bun", "bun-version", "bundler", "cake", "cargo", "cdnurl", "circleci", "cloudbuild", "cocoapods", "composer", "conan", "copier", "cpanfile", "crossplane", "crow", "deps-edn", "devbox", "devcontainer", "docker-compose", "dockerfile", "droneci", "fleet", "flux", "fvm", "git-submodules", "github-actions", "gitlabci", "gitlabci-include", "glasskube", "gleam", "gomod", "gradle", "gradle-wrapper", "haskell-cabal", "helm-requirements", "helm-values", "helmfile", "helmsman", "helmv3", "hermit", "homeassistant-manifest", "homebrew", "html", "jenkins", "jsonnet-bundler", "kotlin-script", "kubernetes", "kustomize", "leiningen", "maven", "maven-wrapper", "meteor", "mint", "mise", "mix", "nix", "nodenv", "npm", "nuget", "nvm", "ocb", "osgi", "pep621", "pep723", "pip-compile", "pip_requirements", "pip_setup", "pipenv", "pixi", "poetry", "pre-commit", "pub", "puppet", "pyenv", "quadlet", "renovate-config-presets", "ruby-version", "runtime-version", "sbt", "scalafmt", "setup-cfg", "sveltos", "swift", "tekton", "terraform", "terraform-version", "terragrunt", "terragrunt-version", "tflint-plugin", "travis", "typst", "unity3d", "velaci", "vendir", "woodpecker"];
|
|
2
|
+
declare const AllManagersListLiteral: readonly ["ansible", "ansible-galaxy", "ant", "argocd", "asdf", "azure-pipelines", "batect", "batect-wrapper", "bazel", "bazel-module", "bazelisk", "bicep", "bitbucket-pipelines", "bitrise", "buildkite", "buildpacks", "bun", "bun-version", "bundler", "cake", "cargo", "cdnurl", "circleci", "cloudbuild", "cocoapods", "composer", "conan", "copier", "cpanfile", "crossplane", "crow", "deps-edn", "devbox", "devcontainer", "docker-compose", "dockerfile", "droneci", "fleet", "flux", "fvm", "git-submodules", "github-actions", "gitlabci", "gitlabci-include", "glasskube", "gleam", "gomod", "gradle", "gradle-wrapper", "haskell-cabal", "helm-requirements", "helm-values", "helmfile", "helmsman", "helmv3", "hermit", "homeassistant-manifest", "homebrew", "html", "jenkins", "jsonnet-bundler", "kotlin-script", "kubernetes", "kustomize", "leiningen", "maven", "maven-wrapper", "meteor", "mint", "mise", "mix", "nix", "nodenv", "npm", "nuget", "nvm", "ocb", "osgi", "pep621", "pep723", "pip-compile", "pip_requirements", "pip_setup", "pipenv", "pixi", "poetry", "pre-commit", "pub", "puppet", "pyenv", "quadlet", "renovate-config-presets", "ruby-version", "runtime-version", "sbt", "scalafmt", "setup-cfg", "sveltos", "swift", "tekton", "terraform", "terraform-version", "terragrunt", "terragrunt-version", "tflint-plugin", "travis", "typst", "unity3d", "velaci", "vendir", "woodpecker", "xcodegen"];
|
|
3
3
|
type ManagerName = typeof AllManagersListLiteral[number];
|
|
4
4
|
//#endregion
|
|
5
5
|
export { ManagerName };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager-list.generated.js","names":[],"sources":["../lib/manager-list.generated.ts"],"sourcesContent":["\nexport const AllManagersListLiteral = [\"ansible\",\"ansible-galaxy\",\"ant\",\"argocd\",\"asdf\",\"azure-pipelines\",\"batect\",\"batect-wrapper\",\"bazel\",\"bazel-module\",\"bazelisk\",\"bicep\",\"bitbucket-pipelines\",\"bitrise\",\"buildkite\",\"buildpacks\",\"bun\",\"bun-version\",\"bundler\",\"cake\",\"cargo\",\"cdnurl\",\"circleci\",\"cloudbuild\",\"cocoapods\",\"composer\",\"conan\",\"copier\",\"cpanfile\",\"crossplane\",\"crow\",\"deps-edn\",\"devbox\",\"devcontainer\",\"docker-compose\",\"dockerfile\",\"droneci\",\"fleet\",\"flux\",\"fvm\",\"git-submodules\",\"github-actions\",\"gitlabci\",\"gitlabci-include\",\"glasskube\",\"gleam\",\"gomod\",\"gradle\",\"gradle-wrapper\",\"haskell-cabal\",\"helm-requirements\",\"helm-values\",\"helmfile\",\"helmsman\",\"helmv3\",\"hermit\",\"homeassistant-manifest\",\"homebrew\",\"html\",\"jenkins\",\"jsonnet-bundler\",\"kotlin-script\",\"kubernetes\",\"kustomize\",\"leiningen\",\"maven\",\"maven-wrapper\",\"meteor\",\"mint\",\"mise\",\"mix\",\"nix\",\"nodenv\",\"npm\",\"nuget\",\"nvm\",\"ocb\",\"osgi\",\"pep621\",\"pep723\",\"pip-compile\",\"pip_requirements\",\"pip_setup\",\"pipenv\",\"pixi\",\"poetry\",\"pre-commit\",\"pub\",\"puppet\",\"pyenv\",\"quadlet\",\"renovate-config-presets\",\"ruby-version\",\"runtime-version\",\"sbt\",\"scalafmt\",\"setup-cfg\",\"sveltos\",\"swift\",\"tekton\",\"terraform\",\"terraform-version\",\"terragrunt\",\"terragrunt-version\",\"tflint-plugin\",\"travis\",\"typst\",\"unity3d\",\"velaci\",\"vendir\",\"woodpecker\"] as const;\nexport type ManagerName = typeof AllManagersListLiteral[number];\n"],"mappings":";AACA,MAAa,yBAAyB;CAAC;CAAU;CAAiB;CAAM;CAAS;CAAO;CAAkB;CAAS;CAAiB;CAAQ;CAAe;CAAW;CAAQ;CAAsB;CAAU;CAAY;CAAa;CAAM;CAAc;CAAU;CAAO;CAAQ;CAAS;CAAW;CAAa;CAAY;CAAW;CAAQ;CAAS;CAAW;CAAa;CAAO;CAAW;CAAS;CAAe;CAAiB;CAAa;CAAU;CAAQ;CAAO;CAAM;CAAiB;CAAiB;CAAW;CAAmB;CAAY;CAAQ;CAAQ;CAAS;CAAiB;CAAgB;CAAoB;CAAc;CAAW;CAAW;CAAS;CAAS;CAAyB;CAAW;CAAO;CAAU;CAAkB;CAAgB;CAAa;CAAY;CAAY;CAAQ;CAAgB;CAAS;CAAO;CAAO;CAAM;CAAM;CAAS;CAAM;CAAQ;CAAM;CAAM;CAAO;CAAS;CAAS;CAAc;CAAmB;CAAY;CAAS;CAAO;CAAS;CAAa;CAAM;CAAS;CAAQ;CAAU;CAA0B;CAAe;CAAkB;CAAM;CAAW;CAAY;CAAU;CAAQ;CAAS;CAAY;CAAoB;CAAa;CAAqB;CAAgB;CAAS;CAAQ;CAAU;CAAS;CAAS;CAAa"}
|
|
1
|
+
{"version":3,"file":"manager-list.generated.js","names":[],"sources":["../lib/manager-list.generated.ts"],"sourcesContent":["\nexport const AllManagersListLiteral = [\"ansible\",\"ansible-galaxy\",\"ant\",\"argocd\",\"asdf\",\"azure-pipelines\",\"batect\",\"batect-wrapper\",\"bazel\",\"bazel-module\",\"bazelisk\",\"bicep\",\"bitbucket-pipelines\",\"bitrise\",\"buildkite\",\"buildpacks\",\"bun\",\"bun-version\",\"bundler\",\"cake\",\"cargo\",\"cdnurl\",\"circleci\",\"cloudbuild\",\"cocoapods\",\"composer\",\"conan\",\"copier\",\"cpanfile\",\"crossplane\",\"crow\",\"deps-edn\",\"devbox\",\"devcontainer\",\"docker-compose\",\"dockerfile\",\"droneci\",\"fleet\",\"flux\",\"fvm\",\"git-submodules\",\"github-actions\",\"gitlabci\",\"gitlabci-include\",\"glasskube\",\"gleam\",\"gomod\",\"gradle\",\"gradle-wrapper\",\"haskell-cabal\",\"helm-requirements\",\"helm-values\",\"helmfile\",\"helmsman\",\"helmv3\",\"hermit\",\"homeassistant-manifest\",\"homebrew\",\"html\",\"jenkins\",\"jsonnet-bundler\",\"kotlin-script\",\"kubernetes\",\"kustomize\",\"leiningen\",\"maven\",\"maven-wrapper\",\"meteor\",\"mint\",\"mise\",\"mix\",\"nix\",\"nodenv\",\"npm\",\"nuget\",\"nvm\",\"ocb\",\"osgi\",\"pep621\",\"pep723\",\"pip-compile\",\"pip_requirements\",\"pip_setup\",\"pipenv\",\"pixi\",\"poetry\",\"pre-commit\",\"pub\",\"puppet\",\"pyenv\",\"quadlet\",\"renovate-config-presets\",\"ruby-version\",\"runtime-version\",\"sbt\",\"scalafmt\",\"setup-cfg\",\"sveltos\",\"swift\",\"tekton\",\"terraform\",\"terraform-version\",\"terragrunt\",\"terragrunt-version\",\"tflint-plugin\",\"travis\",\"typst\",\"unity3d\",\"velaci\",\"vendir\",\"woodpecker\",\"xcodegen\"] as const;\nexport type ManagerName = typeof AllManagersListLiteral[number];\n"],"mappings":";AACA,MAAa,yBAAyB;CAAC;CAAU;CAAiB;CAAM;CAAS;CAAO;CAAkB;CAAS;CAAiB;CAAQ;CAAe;CAAW;CAAQ;CAAsB;CAAU;CAAY;CAAa;CAAM;CAAc;CAAU;CAAO;CAAQ;CAAS;CAAW;CAAa;CAAY;CAAW;CAAQ;CAAS;CAAW;CAAa;CAAO;CAAW;CAAS;CAAe;CAAiB;CAAa;CAAU;CAAQ;CAAO;CAAM;CAAiB;CAAiB;CAAW;CAAmB;CAAY;CAAQ;CAAQ;CAAS;CAAiB;CAAgB;CAAoB;CAAc;CAAW;CAAW;CAAS;CAAS;CAAyB;CAAW;CAAO;CAAU;CAAkB;CAAgB;CAAa;CAAY;CAAY;CAAQ;CAAgB;CAAS;CAAO;CAAO;CAAM;CAAM;CAAS;CAAM;CAAQ;CAAM;CAAM;CAAO;CAAS;CAAS;CAAc;CAAmB;CAAY;CAAS;CAAO;CAAS;CAAa;CAAM;CAAS;CAAQ;CAAU;CAA0B;CAAe;CAAkB;CAAM;CAAW;CAAY;CAAU;CAAQ;CAAS;CAAY;CAAoB;CAAa;CAAqB;CAAgB;CAAS;CAAQ;CAAU;CAAS;CAAS;CAAa;CAAW"}
|
|
@@ -4,6 +4,7 @@ import { GitTagsDatasource } from "./git-tags/index.js";
|
|
|
4
4
|
import { GithubTagsDatasource } from "./github-tags/index.js";
|
|
5
5
|
import { GalaxyDatasource } from "./galaxy/index.js";
|
|
6
6
|
import { MavenDatasource } from "./maven/index.js";
|
|
7
|
+
import { BuildpacksRegistryDatasource } from "./buildpacks-registry/index.js";
|
|
7
8
|
import { NugetDatasource } from "./nuget/index.js";
|
|
8
9
|
import { HelmDatasource } from "./helm/index.js";
|
|
9
10
|
import { DartVersionDatasource } from "./dart-version/index.js";
|
|
@@ -28,7 +29,6 @@ import { CrateDatasource } from "./crate/index.js";
|
|
|
28
29
|
import { GitRefsDatasource } from "./git-refs/index.js";
|
|
29
30
|
import { AzureBicepResourceDatasource } from "./azure-bicep-resource/index.js";
|
|
30
31
|
import { BitriseDatasource } from "./bitrise/index.js";
|
|
31
|
-
import { BuildpacksRegistryDatasource } from "./buildpacks-registry/index.js";
|
|
32
32
|
import { ArtifactoryDatasource } from "./artifactory/index.js";
|
|
33
33
|
import { AwsEKSAddonDataSource } from "./aws-eks-addon/index.js";
|
|
34
34
|
import { AwsMachineImageDatasource } from "./aws-machine-image/index.js";
|
|
@@ -16,8 +16,8 @@ import { massageUrl, removeBuildMeta, sortNugetVersions } from "./common.js";
|
|
|
16
16
|
import { isNonEmptyString } from "@sindresorhus/is";
|
|
17
17
|
import upath from "upath";
|
|
18
18
|
import { XmlDocument } from "xmldoc";
|
|
19
|
-
import extract from "extract-zip";
|
|
20
19
|
import semver from "semver";
|
|
20
|
+
import extract from "extract-zip";
|
|
21
21
|
//#region lib/modules/datasource/nuget/v3.ts
|
|
22
22
|
var NugetV3Api = class NugetV3Api {
|
|
23
23
|
static cacheNamespace = "datasource-nuget-v3";
|
|
@@ -2,13 +2,16 @@ import { ensureTrailingSlash } from "../../../util/url.js";
|
|
|
2
2
|
import { ExternalHostError } from "../../../types/errors/external-host-error.js";
|
|
3
3
|
import { withCache } from "../../../util/cache/package/with-cache.js";
|
|
4
4
|
import { Datasource } from "../datasource.js";
|
|
5
|
+
import { ServiceDiscoveryResponse } from "./schema.js";
|
|
5
6
|
//#region lib/modules/datasource/terraform-module/base.ts
|
|
6
7
|
const terraformId = "terraform";
|
|
7
8
|
var TerraformDatasource = class TerraformDatasource extends Datasource {
|
|
8
9
|
static id = terraformId;
|
|
10
|
+
static terraformRegistryUrl = "https://registry.terraform.io";
|
|
9
11
|
async _getTerraformServiceDiscoveryResult(registryUrl) {
|
|
10
12
|
const discoveryURL = TerraformDatasource.getDiscoveryUrl(registryUrl);
|
|
11
|
-
|
|
13
|
+
const { body: res } = await this.http.getJson(discoveryURL, ServiceDiscoveryResponse);
|
|
14
|
+
return res;
|
|
12
15
|
}
|
|
13
16
|
getTerraformServiceDiscoveryResult(registryUrl) {
|
|
14
17
|
return withCache({
|
|
@@ -21,9 +24,7 @@ var TerraformDatasource = class TerraformDatasource extends Datasource {
|
|
|
21
24
|
return `${ensureTrailingSlash(registryUrl)}.well-known/terraform.json`;
|
|
22
25
|
}
|
|
23
26
|
handleHttpErrors(err) {
|
|
24
|
-
// istanbul ignore if
|
|
25
27
|
if (["EAI_AGAIN"].includes(err.code)) throw new ExternalHostError(err);
|
|
26
|
-
// istanbul ignore if
|
|
27
28
|
if (err.response?.statusCode === 503) throw new ExternalHostError(err);
|
|
28
29
|
}
|
|
29
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","names":[],"sources":["../../../../lib/modules/datasource/terraform-module/base.ts"],"sourcesContent":["import { ExternalHostError } from '../../../types/errors/external-host-error.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport type { HttpError } from '../../../util/http/index.ts';\nimport { ensureTrailingSlash } from '../../../util/url.ts';\nimport { Datasource } from '../datasource.ts';\nimport
|
|
1
|
+
{"version":3,"file":"base.js","names":[],"sources":["../../../../lib/modules/datasource/terraform-module/base.ts"],"sourcesContent":["import { ExternalHostError } from '../../../types/errors/external-host-error.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport type { HttpError } from '../../../util/http/index.ts';\nimport { ensureTrailingSlash } from '../../../util/url.ts';\nimport { Datasource } from '../datasource.ts';\nimport { ServiceDiscoveryResponse } from './schema.ts';\n\nconst terraformId = 'terraform';\n\n// TODO: extract to a separate directory structure (#10532)\nexport abstract class TerraformDatasource extends Datasource {\n static id = terraformId;\n\n static readonly terraformRegistryUrl = 'https://registry.terraform.io';\n\n private async _getTerraformServiceDiscoveryResult(\n registryUrl: string,\n ): Promise<ServiceDiscoveryResponse> {\n const discoveryURL = TerraformDatasource.getDiscoveryUrl(registryUrl);\n const { body: res } = await this.http.getJson(\n discoveryURL,\n ServiceDiscoveryResponse,\n );\n return res;\n }\n\n getTerraformServiceDiscoveryResult(\n registryUrl: string,\n ): Promise<ServiceDiscoveryResponse> {\n return withCache(\n {\n namespace: `datasource-${terraformId}`,\n key: TerraformDatasource.getDiscoveryUrl(registryUrl),\n ttlMinutes: 1440,\n },\n () => this._getTerraformServiceDiscoveryResult(registryUrl),\n );\n }\n\n private static getDiscoveryUrl(registryUrl: string): string {\n return `${ensureTrailingSlash(registryUrl)}.well-known/terraform.json`;\n }\n\n override handleHttpErrors(err: HttpError): void {\n const failureCodes = ['EAI_AGAIN'];\n if (failureCodes.includes(err.code)) {\n throw new ExternalHostError(err);\n }\n if (err.response?.statusCode === 503) {\n throw new ExternalHostError(err);\n }\n }\n}\n"],"mappings":";;;;;;AAOA,MAAM,cAAc;AAGpB,IAAsB,sBAAtB,MAAsB,4BAA4B,WAAW;CAC3D,OAAO,KAAK;CAEZ,OAAgB,uBAAuB;CAEvC,MAAc,oCACZ,aACmC;EACnC,MAAM,eAAe,oBAAoB,gBAAgB,YAAY;EACrE,MAAM,EAAE,MAAM,QAAQ,MAAM,KAAK,KAAK,QACpC,cACA,yBACD;AACD,SAAO;;CAGT,mCACE,aACmC;AACnC,SAAO,UACL;GACE,WAAW,cAAc;GACzB,KAAK,oBAAoB,gBAAgB,YAAY;GACrD,YAAY;GACb,QACK,KAAK,oCAAoC,YAAY,CAC5D;;CAGH,OAAe,gBAAgB,aAA6B;AAC1D,SAAO,GAAG,oBAAoB,YAAY,CAAC;;CAG7C,iBAA0B,KAAsB;AAE9C,MADqB,CAAC,YAAY,CACjB,SAAS,IAAI,KAAK,CACjC,OAAM,IAAI,kBAAkB,IAAI;AAElC,MAAI,IAAI,UAAU,eAAe,IAC/B,OAAM,IAAI,kBAAkB,IAAI"}
|
|
@@ -1,41 +1,46 @@
|
|
|
1
|
-
import { regEx } from "../../../util/regex.js";
|
|
2
|
-
import { coerceString } from "../../../util/string.js";
|
|
3
1
|
import { logger } from "../../../logger/index.js";
|
|
4
2
|
import { isHttpUrl } from "../../../util/url.js";
|
|
5
3
|
import { withCache } from "../../../util/cache/package/with-cache.js";
|
|
6
|
-
import { asTimestamp } from "../../../util/timestamp.js";
|
|
7
4
|
import { id } from "../../versioning/hashicorp/index.js";
|
|
5
|
+
import { ProtocolModuleResponse, TerraformModuleResponse } from "./schema.js";
|
|
8
6
|
import { TerraformDatasource } from "./base.js";
|
|
9
|
-
import { createSDBackendURL } from "./utils.js";
|
|
7
|
+
import { createSDBackendURL, getRegistryRepository } from "./utils.js";
|
|
10
8
|
//#region lib/modules/datasource/terraform-module/index.ts
|
|
11
9
|
var TerraformModuleDatasource = class TerraformModuleDatasource extends TerraformDatasource {
|
|
12
10
|
static id = "terraform-module";
|
|
11
|
+
static terraformCloudUrl = "https://app.terraform.io";
|
|
12
|
+
static defaultRegistryUrls = [TerraformModuleDatasource.terraformRegistryUrl];
|
|
13
|
+
static extendedApiRegistryUrls = [TerraformModuleDatasource.terraformRegistryUrl, TerraformModuleDatasource.terraformCloudUrl];
|
|
13
14
|
constructor() {
|
|
14
15
|
super(TerraformModuleDatasource.id);
|
|
15
16
|
}
|
|
16
|
-
defaultRegistryUrls =
|
|
17
|
+
defaultRegistryUrls = TerraformModuleDatasource.defaultRegistryUrls;
|
|
17
18
|
defaultVersioning = id;
|
|
18
19
|
releaseTimestampSupport = true;
|
|
19
20
|
releaseTimestampNote = "The release timestamp is only supported for the latest version, and is determined from the `published_at` field in the results.";
|
|
20
21
|
sourceUrlSupport = "package";
|
|
21
22
|
sourceUrlNote = "The source URL is determined from the the `source` field in the results.";
|
|
22
|
-
extendedApiRegistryUrls = ["https://registry.terraform.io", "https://app.terraform.io"];
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* Resolves a module release list for the configured registry.
|
|
25
|
+
*
|
|
26
|
+
* Requests against the public Terraform registry and Terraform Cloud use the
|
|
27
|
+
* registry-specific module endpoint, while other registries use the generic
|
|
28
|
+
* Module Registry Protocol versions endpoint.
|
|
27
29
|
*/
|
|
28
30
|
async _getReleases({ packageName, registryUrl }) {
|
|
29
31
|
/* v8 ignore next 3 -- should never happen */
|
|
30
32
|
if (!registryUrl) return null;
|
|
31
|
-
const { registry
|
|
33
|
+
const { registry, repository } = getRegistryRepository(packageName, registryUrl);
|
|
32
34
|
logger.trace({
|
|
33
|
-
registryUrlNormalized,
|
|
35
|
+
registryUrlNormalized: registry,
|
|
34
36
|
terraformRepository: repository
|
|
35
37
|
}, "terraform-module.getReleases()");
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
try {
|
|
39
|
+
if (TerraformModuleDatasource.extendedApiRegistryUrls.includes(registry)) return await this.queryTerraformRegistry(registry, repository);
|
|
40
|
+
return await this.queryModuleRegistry(registry, repository);
|
|
41
|
+
} catch (err) {
|
|
42
|
+
this.handleGenericErrors(err);
|
|
43
|
+
}
|
|
39
44
|
}
|
|
40
45
|
getReleases(config) {
|
|
41
46
|
return withCache({
|
|
@@ -45,67 +50,41 @@ var TerraformModuleDatasource = class TerraformModuleDatasource extends Terrafor
|
|
|
45
50
|
}, () => this._getReleases(config));
|
|
46
51
|
}
|
|
47
52
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
53
|
+
* Queries the Terraform Registry module endpoint.
|
|
54
|
+
*
|
|
55
|
+
* The response includes the latest published version separately, so only that
|
|
56
|
+
* release can be annotated with `releaseTimestamp`.
|
|
57
|
+
*
|
|
58
|
+
* https://developer.hashicorp.com/terraform/registry/api-docs#get-a-specific-module
|
|
51
59
|
*/
|
|
52
|
-
async
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
res
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
} catch (err) {
|
|
63
|
-
this.handleGenericErrors(err);
|
|
64
|
-
}
|
|
65
|
-
const dep = { releases: res.versions.map((version) => ({ version })) };
|
|
66
|
-
if (res.source) dep.sourceUrl = res.source;
|
|
67
|
-
dep.homepage = `${registryUrl}/modules/${repository}`;
|
|
68
|
-
const latestVersion = dep.releases.find((release) => res.version === release.version);
|
|
69
|
-
if (latestVersion) latestVersion.releaseTimestamp = asTimestamp(res.published_at);
|
|
70
|
-
return dep;
|
|
60
|
+
async queryTerraformRegistry(registryUrl, repository) {
|
|
61
|
+
const pkgUrl = createSDBackendURL(registryUrl, "modules.v1", await this.getTerraformServiceDiscoveryResult(registryUrl), repository);
|
|
62
|
+
const { body: res } = await this.http.getJson(pkgUrl, TerraformModuleResponse);
|
|
63
|
+
return {
|
|
64
|
+
releases: res.versions,
|
|
65
|
+
sourceUrl: res.source,
|
|
66
|
+
homepage: `${registryUrl}/modules/${repository}`
|
|
67
|
+
};
|
|
71
68
|
}
|
|
72
69
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
70
|
+
* Queries a registry through the Terraform Module Registry Protocol.
|
|
71
|
+
*
|
|
72
|
+
* This is the default path for registries implementing the standard module
|
|
73
|
+
* registry protocol. It returns release versions and, when present and valid,
|
|
74
|
+
* the upstream source URL.
|
|
75
|
+
*
|
|
76
|
+
* https://developer.hashicorp.com/terraform/internals/module-registry-protocol
|
|
75
77
|
*/
|
|
76
|
-
async
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
try {
|
|
80
|
-
pkgUrl = createSDBackendURL(registryUrl, "modules.v1", serviceDiscovery, `${repository}/versions`);
|
|
81
|
-
res = (await this.http.getJsonUnchecked(pkgUrl)).body;
|
|
82
|
-
if (res.modules.length < 1) {
|
|
83
|
-
logger.warn({ pkgUrl }, "Terraform registry result mismatch");
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
} catch (err) {
|
|
87
|
-
this.handleGenericErrors(err);
|
|
88
|
-
}
|
|
89
|
-
const dep = { releases: res.modules[0].versions.map(({ version }) => ({ version })) };
|
|
90
|
-
if (isHttpUrl(res.modules[0].source)) dep.sourceUrl = res.modules[0].source;
|
|
91
|
-
return dep;
|
|
92
|
-
}
|
|
93
|
-
static getRegistryRepository(packageName, registryUrl) {
|
|
94
|
-
let registry;
|
|
95
|
-
const split = packageName.split("/");
|
|
96
|
-
if (split.length > 3 && split[0].includes(".")) {
|
|
97
|
-
[registry] = split;
|
|
98
|
-
split.shift();
|
|
99
|
-
} else registry = coerceString(registryUrl);
|
|
100
|
-
if (!regEx(/^https?:\/\//).test(registry)) registry = `https://${registry}`;
|
|
101
|
-
const repository = split.join("/");
|
|
78
|
+
async queryModuleRegistry(registryUrl, repository) {
|
|
79
|
+
const pkgUrl = createSDBackendURL(registryUrl, "modules.v1", await this.getTerraformServiceDiscoveryResult(registryUrl), `${repository}/versions`);
|
|
80
|
+
const { body: res } = await this.http.getJson(pkgUrl, ProtocolModuleResponse);
|
|
102
81
|
return {
|
|
103
|
-
|
|
104
|
-
|
|
82
|
+
releases: res.versions,
|
|
83
|
+
sourceUrl: isHttpUrl(res.source) ? res.source : void 0
|
|
105
84
|
};
|
|
106
85
|
}
|
|
107
86
|
static getCacheKey({ packageName, registryUrl }) {
|
|
108
|
-
const { registry, repository } =
|
|
87
|
+
const { registry, repository } = getRegistryRepository(packageName, registryUrl);
|
|
109
88
|
return `${registry}/${repository}`;
|
|
110
89
|
}
|
|
111
90
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["hashicorpVersioning.id"],"sources":["../../../../lib/modules/datasource/terraform-module/index.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","names":["hashicorpVersioning.id"],"sources":["../../../../lib/modules/datasource/terraform-module/index.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { withCache } from '../../../util/cache/package/with-cache.ts';\nimport { isHttpUrl } from '../../../util/url.ts';\nimport * as hashicorpVersioning from '../../versioning/hashicorp/index.ts';\nimport type { GetReleasesConfig, ReleaseResult } from '../types.ts';\nimport { TerraformDatasource } from './base.ts';\nimport { ProtocolModuleResponse, TerraformModuleResponse } from './schema.ts';\nimport { createSDBackendURL, getRegistryRepository } from './utils.ts';\n\nexport class TerraformModuleDatasource extends TerraformDatasource {\n static override readonly id = 'terraform-module';\n\n static readonly terraformCloudUrl = 'https://app.terraform.io';\n\n static readonly defaultRegistryUrls = [\n TerraformModuleDatasource.terraformRegistryUrl,\n ];\n\n static readonly extendedApiRegistryUrls = [\n TerraformModuleDatasource.terraformRegistryUrl,\n TerraformModuleDatasource.terraformCloudUrl,\n ];\n\n constructor() {\n super(TerraformModuleDatasource.id);\n }\n\n override readonly defaultRegistryUrls =\n TerraformModuleDatasource.defaultRegistryUrls;\n\n override readonly defaultVersioning = hashicorpVersioning.id;\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is only supported for the latest version, and is determined from the `published_at` field in the results.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the the `source` field in the results.';\n\n /**\n * Resolves a module release list for the configured registry.\n *\n * Requests against the public Terraform registry and Terraform Cloud use the\n * registry-specific module endpoint, while other registries use the generic\n * Module Registry Protocol versions endpoint.\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\n const { registry, repository } = getRegistryRepository(\n packageName,\n registryUrl,\n );\n logger.trace(\n { registryUrlNormalized: registry, terraformRepository: repository },\n 'terraform-module.getReleases()',\n );\n\n try {\n if (\n TerraformModuleDatasource.extendedApiRegistryUrls.includes(registry)\n ) {\n return await this.queryTerraformRegistry(registry, repository);\n }\n\n // Use the standard Module Registry Protocol for other conformant registries.\n return await this.queryModuleRegistry(registry, repository);\n } catch (err) {\n this.handleGenericErrors(err);\n }\n }\n\n getReleases(config: GetReleasesConfig): Promise<ReleaseResult | null> {\n return withCache(\n {\n namespace: `datasource-${TerraformModuleDatasource.id}`,\n key: TerraformModuleDatasource.getCacheKey(config),\n fallback: true,\n },\n () => this._getReleases(config),\n );\n }\n\n /**\n * Queries the Terraform Registry module endpoint.\n *\n * The response includes the latest published version separately, so only that\n * release can be annotated with `releaseTimestamp`.\n *\n * https://developer.hashicorp.com/terraform/registry/api-docs#get-a-specific-module\n */\n private async queryTerraformRegistry(\n registryUrl: string,\n repository: string,\n ): Promise<ReleaseResult> {\n const serviceDiscovery =\n await this.getTerraformServiceDiscoveryResult(registryUrl);\n const pkgUrl = createSDBackendURL(\n registryUrl,\n 'modules.v1',\n serviceDiscovery,\n repository,\n );\n const { body: res } = await this.http.getJson(\n pkgUrl,\n TerraformModuleResponse,\n );\n return {\n releases: res.versions,\n sourceUrl: res.source,\n homepage: `${registryUrl}/modules/${repository}`,\n };\n }\n\n /**\n * Queries a registry through the Terraform Module Registry Protocol.\n *\n * This is the default path for registries implementing the standard module\n * registry protocol. It returns release versions and, when present and valid,\n * the upstream source URL.\n *\n * https://developer.hashicorp.com/terraform/internals/module-registry-protocol\n */\n private async queryModuleRegistry(\n registryUrl: string,\n repository: string,\n ): Promise<ReleaseResult | null> {\n const serviceDiscovery =\n await this.getTerraformServiceDiscoveryResult(registryUrl);\n const pkgUrl = createSDBackendURL(\n registryUrl,\n 'modules.v1',\n serviceDiscovery,\n `${repository}/versions`,\n );\n const { body: res } = await this.http.getJson(\n pkgUrl,\n ProtocolModuleResponse,\n );\n return {\n releases: res.versions,\n sourceUrl: isHttpUrl(res.source) ? res.source : undefined,\n };\n }\n\n private static getCacheKey({\n packageName,\n registryUrl,\n }: GetReleasesConfig): string {\n const { registry, repository } = getRegistryRepository(\n packageName,\n registryUrl,\n );\n return `${registry}/${repository}`;\n }\n}\n"],"mappings":";;;;;;;;AASA,IAAa,4BAAb,MAAa,kCAAkC,oBAAoB;CACjE,OAAyB,KAAK;CAE9B,OAAgB,oBAAoB;CAEpC,OAAgB,sBAAsB,CACpC,0BAA0B,qBAC3B;CAED,OAAgB,0BAA0B,CACxC,0BAA0B,sBAC1B,0BAA0B,kBAC3B;CAED,cAAc;AACZ,QAAM,0BAA0B,GAAG;;CAGrC,sBACE,0BAA0B;CAE5B,oBAAsCA;CAEtC,0BAA4C;CAC5C,uBACE;CACF,mBAAqC;CACrC,gBACE;;;;;;;;CASF,MAAc,aAAa,EACzB,aACA,eACmD;;AAEnD,MAAI,CAAC,YACH,QAAO;EAGT,MAAM,EAAE,UAAU,eAAe,sBAC/B,aACA,YACD;AACD,SAAO,MACL;GAAE,uBAAuB;GAAU,qBAAqB;GAAY,EACpE,iCACD;AAED,MAAI;AACF,OACE,0BAA0B,wBAAwB,SAAS,SAAS,CAEpE,QAAO,MAAM,KAAK,uBAAuB,UAAU,WAAW;AAIhE,UAAO,MAAM,KAAK,oBAAoB,UAAU,WAAW;WACpD,KAAK;AACZ,QAAK,oBAAoB,IAAI;;;CAIjC,YAAY,QAA0D;AACpE,SAAO,UACL;GACE,WAAW,cAAc,0BAA0B;GACnD,KAAK,0BAA0B,YAAY,OAAO;GAClD,UAAU;GACX,QACK,KAAK,aAAa,OAAO,CAChC;;;;;;;;;;CAWH,MAAc,uBACZ,aACA,YACwB;EAGxB,MAAM,SAAS,mBACb,aACA,cAHA,MAAM,KAAK,mCAAmC,YAAY,EAK1D,WACD;EACD,MAAM,EAAE,MAAM,QAAQ,MAAM,KAAK,KAAK,QACpC,QACA,wBACD;AACD,SAAO;GACL,UAAU,IAAI;GACd,WAAW,IAAI;GACf,UAAU,GAAG,YAAY,WAAW;GACrC;;;;;;;;;;;CAYH,MAAc,oBACZ,aACA,YAC+B;EAG/B,MAAM,SAAS,mBACb,aACA,cAHA,MAAM,KAAK,mCAAmC,YAAY,EAK1D,GAAG,WAAW,WACf;EACD,MAAM,EAAE,MAAM,QAAQ,MAAM,KAAK,KAAK,QACpC,QACA,uBACD;AACD,SAAO;GACL,UAAU,IAAI;GACd,WAAW,UAAU,IAAI,OAAO,GAAG,IAAI,SAAS,KAAA;GACjD;;CAGH,OAAe,YAAY,EACzB,aACA,eAC4B;EAC5B,MAAM,EAAE,UAAU,eAAe,sBAC/B,aACA,YACD;AACD,SAAO,GAAG,SAAS,GAAG"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LooseArray } from "../../../util/schema-utils/index.js";
|
|
2
|
+
import { MaybeTimestamp } from "../../../util/timestamp.js";
|
|
3
|
+
import { isNonEmptyArray } from "@sindresorhus/is";
|
|
4
|
+
import { z } from "zod/v3";
|
|
5
|
+
//#region lib/modules/datasource/terraform-module/schema.ts
|
|
6
|
+
const ServiceDiscoveryResponse = z.object({
|
|
7
|
+
"modules.v1": z.string().optional(),
|
|
8
|
+
"providers.v1": z.string().optional()
|
|
9
|
+
});
|
|
10
|
+
const TerraformModuleResponse = z.object({
|
|
11
|
+
source: z.string().optional(),
|
|
12
|
+
versions: z.array(z.string()),
|
|
13
|
+
version: z.string(),
|
|
14
|
+
published_at: MaybeTimestamp
|
|
15
|
+
}).transform((resource) => ({
|
|
16
|
+
source: resource.source,
|
|
17
|
+
versions: resource.versions.map((version) => ({
|
|
18
|
+
version,
|
|
19
|
+
...version === resource.version && { releaseTimestamp: resource.published_at }
|
|
20
|
+
}))
|
|
21
|
+
}));
|
|
22
|
+
const TerraformModuleVersion = z.object({ version: z.string() }).transform(({ version }) => ({ version }));
|
|
23
|
+
const TerraformModule = z.object({
|
|
24
|
+
versions: LooseArray(TerraformModuleVersion),
|
|
25
|
+
source: z.string().optional()
|
|
26
|
+
}).refine(({ versions }) => isNonEmptyArray(versions), "Empty versions array in module response");
|
|
27
|
+
const ProtocolModuleResponse = z.object({ modules: LooseArray(TerraformModule) }).refine(({ modules }) => isNonEmptyArray(modules), "Empty response from `/v1/modules` endpoint").transform(({ modules: [module] }) => module);
|
|
28
|
+
//#endregion
|
|
29
|
+
export { ProtocolModuleResponse, ServiceDiscoveryResponse, TerraformModuleResponse };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/terraform-module/schema.ts"],"sourcesContent":["import { isNonEmptyArray } from '@sindresorhus/is';\nimport { z } from 'zod/v3';\nimport { LooseArray } from '../../../util/schema-utils/index.ts';\nimport { MaybeTimestamp } from '../../../util/timestamp.ts';\nimport type { Release } from '../types.ts';\n\nexport const ServiceDiscoveryResponse = z.object({\n 'modules.v1': z.string().optional(),\n 'providers.v1': z.string().optional(),\n});\n\nexport type ServiceDiscoveryResponse = z.infer<typeof ServiceDiscoveryResponse>;\nexport type ServiceDiscoveryEndpointType = keyof ServiceDiscoveryResponse;\n\nexport const TerraformModuleResponse = z\n .object({\n source: z.string().optional(),\n versions: z.array(z.string()),\n version: z.string(),\n published_at: MaybeTimestamp,\n })\n .transform((resource) => ({\n source: resource.source,\n versions: resource.versions.map(\n (version): Release => ({\n version,\n ...(version === resource.version && {\n releaseTimestamp: resource.published_at,\n }),\n }),\n ),\n }));\n\nexport type TerraformModuleResponse = z.infer<typeof TerraformModuleResponse>;\n\nexport const TerraformModuleVersion = z\n .object({ version: z.string() })\n .transform(({ version }): Release => ({ version }));\n\nexport const TerraformModule = z\n .object({\n versions: LooseArray(TerraformModuleVersion),\n source: z.string().optional(),\n })\n .refine(\n ({ versions }) => isNonEmptyArray(versions),\n 'Empty versions array in module response',\n );\n\nexport const ProtocolModuleResponse = z\n .object({ modules: LooseArray(TerraformModule) })\n .refine(\n ({ modules }) => isNonEmptyArray(modules),\n 'Empty response from `/v1/modules` endpoint',\n )\n .transform(({ modules: [module] }) => module);\n\nexport type ProtocolModuleResponse = z.infer<typeof ProtocolModuleResponse>;\n"],"mappings":";;;;;AAMA,MAAa,2BAA2B,EAAE,OAAO;CAC/C,cAAc,EAAE,QAAQ,CAAC,UAAU;CACnC,gBAAgB,EAAE,QAAQ,CAAC,UAAU;CACtC,CAAC;AAKF,MAAa,0BAA0B,EACpC,OAAO;CACN,QAAQ,EAAE,QAAQ,CAAC,UAAU;CAC7B,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC;CAC7B,SAAS,EAAE,QAAQ;CACnB,cAAc;CACf,CAAC,CACD,WAAW,cAAc;CACxB,QAAQ,SAAS;CACjB,UAAU,SAAS,SAAS,KACzB,aAAsB;EACrB;EACA,GAAI,YAAY,SAAS,WAAW,EAClC,kBAAkB,SAAS,cAC5B;EACF,EACF;CACF,EAAE;AAIL,MAAa,yBAAyB,EACnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAC/B,WAAW,EAAE,eAAwB,EAAE,SAAS,EAAE;AAErD,MAAa,kBAAkB,EAC5B,OAAO;CACN,UAAU,WAAW,uBAAuB;CAC5C,QAAQ,EAAE,QAAQ,CAAC,UAAU;CAC9B,CAAC,CACD,QACE,EAAE,eAAe,gBAAgB,SAAS,EAC3C,0CACD;AAEH,MAAa,yBAAyB,EACnC,OAAO,EAAE,SAAS,WAAW,gBAAgB,EAAE,CAAC,CAChD,QACE,EAAE,cAAc,gBAAgB,QAAQ,EACzC,6CACD,CACA,WAAW,EAAE,SAAS,CAAC,cAAc,OAAO"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { regEx } from "../../../util/regex.js";
|
|
2
|
+
import { coerceString } from "../../../util/string.js";
|
|
1
3
|
import { isHttpUrl, joinUrlParts } from "../../../util/url.js";
|
|
2
4
|
//#region lib/modules/datasource/terraform-module/utils.ts
|
|
3
5
|
function createSDBackendURL(registryURL, sdType, sdResult, subPath) {
|
|
@@ -5,7 +7,19 @@ function createSDBackendURL(registryURL, sdType, sdResult, subPath) {
|
|
|
5
7
|
if (isHttpUrl(fullPath)) return fullPath;
|
|
6
8
|
return joinUrlParts(registryURL, fullPath);
|
|
7
9
|
}
|
|
10
|
+
function getRegistryRepository(packageName, registryUrl) {
|
|
11
|
+
let registry;
|
|
12
|
+
const split = packageName.split("/");
|
|
13
|
+
if (split.length > 3 && split[0].includes(".")) registry = split.shift();
|
|
14
|
+
else registry = coerceString(registryUrl);
|
|
15
|
+
if (!regEx(/^https?:\/\//).test(registry)) registry = `https://${registry}`;
|
|
16
|
+
const repository = split.join("/");
|
|
17
|
+
return {
|
|
18
|
+
registry,
|
|
19
|
+
repository
|
|
20
|
+
};
|
|
21
|
+
}
|
|
8
22
|
//#endregion
|
|
9
|
-
export { createSDBackendURL };
|
|
23
|
+
export { createSDBackendURL, getRegistryRepository };
|
|
10
24
|
|
|
11
25
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":[],"sources":["../../../../lib/modules/datasource/terraform-module/utils.ts"],"sourcesContent":["import { isHttpUrl, joinUrlParts } from '../../../util/url.ts';\nimport type {\n ServiceDiscoveryEndpointType,\n
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../../lib/modules/datasource/terraform-module/utils.ts"],"sourcesContent":["import { regEx } from '../../../util/regex.ts';\nimport { coerceString } from '../../../util/string.ts';\nimport { isHttpUrl, joinUrlParts } from '../../../util/url.ts';\nimport type {\n ServiceDiscoveryEndpointType,\n ServiceDiscoveryResponse,\n} from './schema.ts';\nimport type { RegistryRepository } from './types.ts';\n\nexport function createSDBackendURL(\n registryURL: string,\n sdType: ServiceDiscoveryEndpointType,\n sdResult: ServiceDiscoveryResponse,\n subPath: string,\n): string {\n const sdEndpoint = sdResult[sdType] ?? '';\n const fullPath = joinUrlParts(sdEndpoint, subPath);\n if (isHttpUrl(fullPath)) {\n return fullPath;\n }\n return joinUrlParts(registryURL, fullPath);\n}\n\nexport function getRegistryRepository(\n packageName: string,\n registryUrl: string | undefined,\n): RegistryRepository {\n let registry: string;\n const split = packageName.split('/');\n if (split.length > 3 && split[0].includes('.')) {\n registry = split.shift()!;\n } else {\n registry = coerceString(registryUrl);\n }\n if (!regEx(/^https?:\\/\\//).test(registry)) {\n registry = `https://${registry}`;\n }\n const repository = split.join('/');\n return {\n registry,\n repository,\n };\n}\n"],"mappings":";;;;AASA,SAAgB,mBACd,aACA,QACA,UACA,SACQ;CAER,MAAM,WAAW,aADE,SAAS,WAAW,IACG,QAAQ;AAClD,KAAI,UAAU,SAAS,CACrB,QAAO;AAET,QAAO,aAAa,aAAa,SAAS;;AAG5C,SAAgB,sBACd,aACA,aACoB;CACpB,IAAI;CACJ,MAAM,QAAQ,YAAY,MAAM,IAAI;AACpC,KAAI,MAAM,SAAS,KAAK,MAAM,GAAG,SAAS,IAAI,CAC5C,YAAW,MAAM,OAAO;KAExB,YAAW,aAAa,YAAY;AAEtC,KAAI,CAAC,MAAM,eAAe,CAAC,KAAK,SAAS,CACvC,YAAW,WAAW;CAExB,MAAM,aAAa,MAAM,KAAK,IAAI;AAClC,QAAO;EACL;EACA;EACD"}
|
|
@@ -12,7 +12,6 @@ import { TerraformProviderV2Response } from "./schema.js";
|
|
|
12
12
|
var TerraformProviderDatasource = class TerraformProviderDatasource extends TerraformDatasource {
|
|
13
13
|
static id = "terraform-provider";
|
|
14
14
|
static hashicorpReleaseUrl = "https://releases.hashicorp.com";
|
|
15
|
-
static terraformRegistryUrl = "https://registry.terraform.io";
|
|
16
15
|
static defaultRegistryUrls = [TerraformProviderDatasource.terraformRegistryUrl, TerraformProviderDatasource.hashicorpReleaseUrl];
|
|
17
16
|
static repositoryRegex = regEx(/^hashicorp\/(?<packageName>\S+)$/);
|
|
18
17
|
constructor() {
|