renovate 41.39.0 → 41.41.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/options/index.js +26 -11
- package/dist/config/options/index.js.map +1 -1
- package/dist/config/presets/forgejo/index.d.ts +5 -0
- package/dist/config/presets/forgejo/index.js +43 -0
- package/dist/config/presets/forgejo/index.js.map +1 -0
- package/dist/config/presets/index.js +6 -4
- package/dist/config/presets/index.js.map +1 -1
- package/dist/config/presets/local/index.js +2 -0
- package/dist/config/presets/local/index.js.map +1 -1
- package/dist/config/presets/parse.js +4 -0
- package/dist/config/presets/parse.js.map +1 -1
- package/dist/config/validation.js +0 -2
- package/dist/config/validation.js.map +1 -1
- package/dist/constants/platforms.d.ts +2 -1
- package/dist/constants/platforms.js +8 -1
- package/dist/constants/platforms.js.map +1 -1
- package/dist/modules/datasource/api.js +4 -0
- package/dist/modules/datasource/api.js.map +1 -1
- package/dist/modules/datasource/forgejo-releases/index.d.ts +17 -0
- package/dist/modules/datasource/forgejo-releases/index.js +80 -0
- package/dist/modules/datasource/forgejo-releases/index.js.map +1 -0
- package/dist/modules/datasource/forgejo-releases/schema.d.ts +39 -0
- package/dist/modules/datasource/forgejo-releases/schema.js +14 -0
- package/dist/modules/datasource/forgejo-releases/schema.js.map +1 -0
- package/dist/modules/datasource/forgejo-tags/index.d.ts +21 -0
- package/dist/modules/datasource/forgejo-tags/index.js +96 -0
- package/dist/modules/datasource/forgejo-tags/index.js.map +1 -0
- package/dist/modules/datasource/forgejo-tags/schema.d.ts +65 -0
- package/dist/modules/datasource/forgejo-tags/schema.js +19 -0
- package/dist/modules/datasource/forgejo-tags/schema.js.map +1 -0
- package/dist/modules/manager/fingerprint.generated.js +1 -1
- package/dist/modules/manager/fingerprint.generated.js.map +1 -1
- package/dist/modules/manager/github-actions/extract.js +8 -2
- package/dist/modules/manager/github-actions/extract.js.map +1 -1
- package/dist/modules/platform/api.d.ts +1 -1
- package/dist/modules/platform/api.js +2 -0
- package/dist/modules/platform/api.js.map +1 -1
- package/dist/modules/platform/forgejo/forgejo-helper.d.ts +36 -0
- package/dist/modules/platform/forgejo/forgejo-helper.js +282 -0
- package/dist/modules/platform/forgejo/forgejo-helper.js.map +1 -0
- package/dist/modules/platform/forgejo/index.d.ts +6 -0
- package/dist/modules/platform/forgejo/index.js +749 -0
- package/dist/modules/platform/forgejo/index.js.map +1 -0
- package/dist/modules/platform/forgejo/pr-cache.d.ts +23 -0
- package/dist/modules/platform/forgejo/pr-cache.js +134 -0
- package/dist/modules/platform/forgejo/pr-cache.js.map +1 -0
- package/dist/modules/platform/forgejo/types.d.ts +185 -0
- package/dist/modules/platform/forgejo/types.js +3 -0
- package/dist/modules/platform/forgejo/types.js.map +1 -0
- package/dist/modules/platform/forgejo/utils.d.ts +20 -0
- package/dist/modules/platform/forgejo/utils.js +142 -0
- package/dist/modules/platform/forgejo/utils.js.map +1 -0
- package/dist/modules/platform/gitea/index.js +1 -0
- package/dist/modules/platform/gitea/index.js.map +1 -1
- package/dist/modules/platform/scm.d.ts +1 -1
- package/dist/util/cache/package/namespaces.d.ts +1 -1
- package/dist/util/cache/package/namespaces.js +4 -0
- package/dist/util/cache/package/namespaces.js.map +1 -1
- package/dist/util/cache/repository/impl/base.d.ts +1 -1
- package/dist/util/cache/repository/types.d.ts +3 -0
- package/dist/util/cache/repository/types.js.map +1 -1
- package/dist/util/common.d.ts +1 -1
- package/dist/util/common.js +10 -3
- package/dist/util/common.js.map +1 -1
- package/dist/util/http/forgejo.d.ts +11 -0
- package/dist/util/http/forgejo.js +57 -0
- package/dist/util/http/forgejo.js.map +1 -0
- package/dist/workers/repository/update/pr/changelog/api.js +8 -6
- package/dist/workers/repository/update/pr/changelog/api.js.map +1 -1
- package/dist/workers/repository/update/pr/changelog/forgejo/index.d.ts +4 -0
- package/dist/workers/repository/update/pr/changelog/forgejo/index.js +62 -0
- package/dist/workers/repository/update/pr/changelog/forgejo/index.js.map +1 -0
- package/dist/workers/repository/update/pr/changelog/forgejo/source.d.ts +8 -0
- package/dist/workers/repository/update/pr/changelog/forgejo/source.js +20 -0
- package/dist/workers/repository/update/pr/changelog/forgejo/source.js.map +1 -0
- package/dist/workers/repository/update/pr/changelog/release-notes.js +17 -12
- package/dist/workers/repository/update/pr/changelog/release-notes.js.map +1 -1
- package/dist/workers/repository/update/pr/changelog/source.d.ts +1 -1
- package/dist/workers/repository/update/pr/changelog/source.js.map +1 -1
- package/dist/workers/repository/update/pr/changelog/types.d.ts +1 -1
- package/dist/workers/repository/update/pr/changelog/types.js.map +1 -1
- package/package.json +1 -1
- package/renovate-schema.json +1 -0
- package/dist/config/validation-helpers/managers.d.ts +0 -6
- package/dist/config/validation-helpers/managers.js +0 -29
- package/dist/config/validation-helpers/managers.js.map +0 -1
@@ -1,11 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.BITBUCKET_SERVER_API_USING_HOST_TYPES = exports.BITBUCKET_API_USING_HOST_TYPES = exports.GITLAB_API_USING_HOST_TYPES = exports.GITHUB_API_USING_HOST_TYPES = exports.GITEA_API_USING_HOST_TYPES = exports.PLATFORM_HOST_TYPES = void 0;
|
3
|
+
exports.BITBUCKET_SERVER_API_USING_HOST_TYPES = exports.BITBUCKET_API_USING_HOST_TYPES = exports.GITLAB_API_USING_HOST_TYPES = exports.GITHUB_API_USING_HOST_TYPES = exports.FORGEJO_API_USING_HOST_TYPES = exports.GITEA_API_USING_HOST_TYPES = exports.PLATFORM_HOST_TYPES = void 0;
|
4
4
|
exports.PLATFORM_HOST_TYPES = [
|
5
5
|
'azure',
|
6
6
|
'bitbucket',
|
7
7
|
'bitbucket-server',
|
8
8
|
'codecommit',
|
9
|
+
'forgejo',
|
9
10
|
'gerrit',
|
10
11
|
'gitea',
|
11
12
|
'github',
|
@@ -18,6 +19,12 @@ exports.GITEA_API_USING_HOST_TYPES = [
|
|
18
19
|
'gitea-releases',
|
19
20
|
'gitea-tags',
|
20
21
|
];
|
22
|
+
exports.FORGEJO_API_USING_HOST_TYPES = [
|
23
|
+
'forgejo',
|
24
|
+
'forgejo-changelog',
|
25
|
+
'forgejo-releases',
|
26
|
+
'forgejo-tags',
|
27
|
+
];
|
21
28
|
exports.GITHUB_API_USING_HOST_TYPES = [
|
22
29
|
'github',
|
23
30
|
'github-releases',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platforms.js","sourceRoot":"","sources":["../../lib/constants/platforms.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;IACjC,OAAO;IACP,WAAW;IACX,kBAAkB;IAClB,YAAY;IACZ,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,OAAO;CACC,CAAC;AAIE,QAAA,0BAA0B,GAAG;IACxC,OAAO;IACP,iBAAiB;IACjB,gBAAgB;IAChB,YAAY;CACb,CAAC;AAEW,QAAA,2BAA2B,GAAG;IACzC,QAAQ;IACR,iBAAiB;IACjB,4BAA4B;IAC5B,aAAa;IACb,KAAK;IACL,QAAQ;IACR,kBAAkB;IAClB,OAAO;CACR,CAAC;AAEW,QAAA,2BAA2B,GAAG;IACzC,QAAQ;IACR,iBAAiB;IACjB,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IAClB,MAAM;CACP,CAAC;AAEW,QAAA,8BAA8B,GAAG;IAC5C,WAAW;IACX,qBAAqB;IACrB,gBAAgB;CACjB,CAAC;AAEW,QAAA,qCAAqC,GAAG;IACnD,kBAAkB;IAClB,4BAA4B;IAC5B,uBAAuB;CACxB,CAAC","sourcesContent":["export const PLATFORM_HOST_TYPES = [\n 'azure',\n 'bitbucket',\n 'bitbucket-server',\n 'codecommit',\n 'gerrit',\n 'gitea',\n 'github',\n 'gitlab',\n 'local',\n] as const;\n\nexport type PlatformId = (typeof PLATFORM_HOST_TYPES)[number];\n\nexport const GITEA_API_USING_HOST_TYPES = [\n 'gitea',\n 'gitea-changelog',\n 'gitea-releases',\n 'gitea-tags',\n];\n\nexport const GITHUB_API_USING_HOST_TYPES = [\n 'github',\n 'github-releases',\n 'github-release-attachments',\n 'github-tags',\n 'pod',\n 'hermit',\n 'github-changelog',\n 'conan',\n];\n\nexport const GITLAB_API_USING_HOST_TYPES = [\n 'gitlab',\n 'gitlab-releases',\n 'gitlab-tags',\n 'gitlab-packages',\n 'gitlab-changelog',\n 'pypi',\n];\n\nexport const BITBUCKET_API_USING_HOST_TYPES = [\n 'bitbucket',\n 'bitbucket-changelog',\n 'bitbucket-tags',\n];\n\nexport const BITBUCKET_SERVER_API_USING_HOST_TYPES = [\n 'bitbucket-server',\n 'bitbucket-server-changelog',\n 'bitbucket-server-tags',\n];\n"]}
|
1
|
+
{"version":3,"file":"platforms.js","sourceRoot":"","sources":["../../lib/constants/platforms.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;IACjC,OAAO;IACP,WAAW;IACX,kBAAkB;IAClB,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,OAAO;CACC,CAAC;AAIE,QAAA,0BAA0B,GAAG;IACxC,OAAO;IACP,iBAAiB;IACjB,gBAAgB;IAChB,YAAY;CACb,CAAC;AAEW,QAAA,4BAA4B,GAAG;IAC1C,SAAS;IACT,mBAAmB;IACnB,kBAAkB;IAClB,cAAc;CACf,CAAC;AAEW,QAAA,2BAA2B,GAAG;IACzC,QAAQ;IACR,iBAAiB;IACjB,4BAA4B;IAC5B,aAAa;IACb,KAAK;IACL,QAAQ;IACR,kBAAkB;IAClB,OAAO;CACR,CAAC;AAEW,QAAA,2BAA2B,GAAG;IACzC,QAAQ;IACR,iBAAiB;IACjB,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IAClB,MAAM;CACP,CAAC;AAEW,QAAA,8BAA8B,GAAG;IAC5C,WAAW;IACX,qBAAqB;IACrB,gBAAgB;CACjB,CAAC;AAEW,QAAA,qCAAqC,GAAG;IACnD,kBAAkB;IAClB,4BAA4B;IAC5B,uBAAuB;CACxB,CAAC","sourcesContent":["export const PLATFORM_HOST_TYPES = [\n 'azure',\n 'bitbucket',\n 'bitbucket-server',\n 'codecommit',\n 'forgejo',\n 'gerrit',\n 'gitea',\n 'github',\n 'gitlab',\n 'local',\n] as const;\n\nexport type PlatformId = (typeof PLATFORM_HOST_TYPES)[number];\n\nexport const GITEA_API_USING_HOST_TYPES = [\n 'gitea',\n 'gitea-changelog',\n 'gitea-releases',\n 'gitea-tags',\n];\n\nexport const FORGEJO_API_USING_HOST_TYPES = [\n 'forgejo',\n 'forgejo-changelog',\n 'forgejo-releases',\n 'forgejo-tags',\n];\n\nexport const GITHUB_API_USING_HOST_TYPES = [\n 'github',\n 'github-releases',\n 'github-release-attachments',\n 'github-tags',\n 'pod',\n 'hermit',\n 'github-changelog',\n 'conan',\n];\n\nexport const GITLAB_API_USING_HOST_TYPES = [\n 'gitlab',\n 'gitlab-releases',\n 'gitlab-tags',\n 'gitlab-packages',\n 'gitlab-changelog',\n 'pypi',\n];\n\nexport const BITBUCKET_API_USING_HOST_TYPES = [\n 'bitbucket',\n 'bitbucket-changelog',\n 'bitbucket-tags',\n];\n\nexport const BITBUCKET_SERVER_API_USING_HOST_TYPES = [\n 'bitbucket-server',\n 'bitbucket-server-changelog',\n 'bitbucket-server-tags',\n];\n"]}
|
@@ -27,6 +27,8 @@ const docker_1 = require("./docker");
|
|
27
27
|
const dotnet_version_1 = require("./dotnet-version");
|
28
28
|
const endoflife_date_1 = require("./endoflife-date");
|
29
29
|
const flutter_version_1 = require("./flutter-version");
|
30
|
+
const forgejo_releases_1 = require("./forgejo-releases");
|
31
|
+
const forgejo_tags_1 = require("./forgejo-tags");
|
30
32
|
const galaxy_1 = require("./galaxy");
|
31
33
|
const galaxy_collection_1 = require("./galaxy-collection");
|
32
34
|
const git_refs_1 = require("./git-refs");
|
@@ -101,6 +103,8 @@ api.set(docker_1.DockerDatasource.id, new docker_1.DockerDatasource());
|
|
101
103
|
api.set(dotnet_version_1.DotnetVersionDatasource.id, new dotnet_version_1.DotnetVersionDatasource());
|
102
104
|
api.set(endoflife_date_1.EndoflifeDateDatasource.id, new endoflife_date_1.EndoflifeDateDatasource());
|
103
105
|
api.set(flutter_version_1.FlutterVersionDatasource.id, new flutter_version_1.FlutterVersionDatasource());
|
106
|
+
api.set(forgejo_releases_1.ForgejoReleasesDatasource.id, new forgejo_releases_1.ForgejoReleasesDatasource());
|
107
|
+
api.set(forgejo_tags_1.ForgejoTagsDatasource.id, new forgejo_tags_1.ForgejoTagsDatasource());
|
104
108
|
api.set(galaxy_1.GalaxyDatasource.id, new galaxy_1.GalaxyDatasource());
|
105
109
|
api.set(galaxy_collection_1.GalaxyCollectionDatasource.id, new galaxy_collection_1.GalaxyCollectionDatasource());
|
106
110
|
api.set(git_refs_1.GitRefsDatasource.id, new git_refs_1.GitRefsDatasource());
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../lib/modules/datasource/api.ts"],"names":[],"mappings":";;AAAA,+CAAsD;AACtD,mDAAwD;AACxD,2DAAgE;AAChE,uCAA6C;AAC7C,iEAAsE;AACtE,mEAAwE;AACxE,mCAA0C;AAC1C,mEAAwE;AACxE,qDAA2D;AAC3D,uCAA8C;AAC9C,+DAAqE;AACrE,mCAA0C;AAC1C,uCAA8C;AAC9C,mCAA0C;AAC1C,mCAA0C;AAC1C,iCAAwC;AACxC,mCAA0C;AAC1C,qCAA4C;AAC5C,iCAAwC;AACxC,iDAAuD;AACvD,+BAAsC;AACtC,iCAAwC;AACxC,qCAA4C;AAC5C,qCAA4C;AAC5C,qDAA2D;AAC3D,qDAA2D;AAC3D,uDAA6D;AAC7D,qCAA4C;AAC5C,2DAAiE;AACjE,yCAA+C;AAC/C,yCAA+C;AAC/C,qDAA2D;AAC3D,6CAAmD;AACnD,6EAAkF;AAClF,uDAA6D;AAC7D,qDAA2D;AAC3D,+CAAqD;AACrD,uDAA6D;AAC7D,uDAA6D;AAC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,GAAG,CAAC,GAAG,CAAC,mBAAa,CAAC,EAAE,EAAE,IAAI,mBAAa,EAAE,CAAC,CAAC;AAC/C,GAAG,CAAC,GAAG,CAAC,oCAAqB,CAAC,EAAE,EAAE,IAAI,oCAAqB,EAAE,CAAC,CAAC;AAC/D,GAAG,CAAC,GAAG,CAAC,6BAAkB,CAAC,EAAE,EAAE,IAAI,6BAAkB,EAAE,CAAC,CAAC;AACzD,GAAG,CAAC,GAAG,CAAC,kCAAoB,CAAC,EAAE,EAAE,IAAI,kCAAoB,EAAE,CAAC,CAAC;AAC7D,GAAG,CAAC,GAAG,CAAC,gCAAmB,CAAC,EAAE,EAAE,IAAI,gCAAmB,EAAE,CAAC,CAAC;AAC3D,GAAG,CAAC,GAAG,CAAC,4CAAyB,CAAC,EAAE,EAAE,IAAI,4CAAyB,EAAE,CAAC,CAAC;AACvE,GAAG,CAAC,GAAG,CAAC,gDAA2B,CAAC,EAAE,EAAE,IAAI,gDAA2B,EAAE,CAAC,CAAC;AAC3E,GAAG,CAAC,GAAG,CAAC,2BAAiB,CAAC,EAAE,EAAE,IAAI,2BAAiB,EAAE,CAAC,CAAC;AACvD,GAAG,CAAC,GAAG,CAAC,4CAAyB,CAAC,EAAE,EAAE,IAAI,4CAAyB,EAAE,CAAC,CAAC","sourcesContent":["import { ArtifactoryDatasource } from './artifactory';\nimport { AwsEKSAddonDataSource } from './aws-eks-addon';\nimport { AwsMachineImageDatasource } from './aws-machine-image';\nimport { AwsRdsDatasource } from './aws-rds';\nimport { AzureBicepResourceDatasource } from './azure-bicep-resource';\nimport { AzurePipelinesTasksDatasource } from './azure-pipelines-tasks';\nimport { BazelDatasource } from './bazel';\nimport { BitbucketServerTagsDatasource } from './bitbucket-server-tags';\nimport { BitbucketTagsDatasource } from './bitbucket-tags';\nimport { BitriseDatasource } from './bitrise';\nimport { BuildpacksRegistryDatasource } from './buildpacks-registry';\nimport { CdnjsDatasource } from './cdnjs';\nimport { ClojureDatasource } from './clojure';\nimport { ConanDatasource } from './conan';\nimport { CondaDatasource } from './conda';\nimport { CpanDatasource } from './cpan';\nimport { CrateDatasource } from './crate';\nimport { CustomDatasource } from './custom';\nimport { DartDatasource } from './dart';\nimport { DartVersionDatasource } from './dart-version';\nimport { DebDatasource } from './deb';\nimport { DenoDatasource } from './deno';\nimport { DevboxDatasource } from './devbox';\nimport { DockerDatasource } from './docker';\nimport { DotnetVersionDatasource } from './dotnet-version';\nimport { EndoflifeDateDatasource } from './endoflife-date';\nimport { FlutterVersionDatasource } from './flutter-version';\nimport { GalaxyDatasource } from './galaxy';\nimport { GalaxyCollectionDatasource } from './galaxy-collection';\nimport { GitRefsDatasource } from './git-refs';\nimport { GitTagsDatasource } from './git-tags';\nimport { GiteaReleasesDatasource } from './gitea-releases';\nimport { GiteaTagsDatasource } from './gitea-tags';\nimport { GithubReleaseAttachmentsDatasource } from './github-release-attachments';\nimport { GithubReleasesDatasource } from './github-releases';\nimport { GithubRunnersDatasource } from './github-runners';\nimport { GithubTagsDatasource } from './github-tags';\nimport { GitlabPackagesDatasource } from './gitlab-packages';\nimport { GitlabReleasesDatasource } from './gitlab-releases';\nimport { GitlabTagsDatasource } from './gitlab-tags';\nimport { GlasskubePackagesDatasource } from './glasskube-packages';\nimport { GoDatasource } from './go';\nimport { GolangVersionDatasource } from './golang-version';\nimport { GradleVersionDatasource } from './gradle-version';\nimport { HackageDatasource } from './hackage';\nimport { HelmDatasource } from './helm';\nimport { HermitDatasource } from './hermit';\nimport { HexDatasource } from './hex';\nimport { HexpmBobDatasource } from './hexpm-bob';\nimport { JavaVersionDatasource } from './java-version';\nimport { JenkinsPluginsDatasource } from './jenkins-plugins';\nimport { KubernetesApiDatasource } from './kubernetes-api';\nimport { MavenDatasource } from './maven';\nimport { NodeVersionDatasource } from './node-version';\nimport { NpmDatasource } from './npm';\nimport { NugetDatasource } from './nuget';\nimport { OrbDatasource } from './orb';\nimport { PackagistDatasource } from './packagist';\nimport { PodDatasource } from './pod';\nimport { PuppetForgeDatasource } from './puppet-forge';\nimport { PypiDatasource } from './pypi';\nimport { PythonVersionDatasource } from './python-version';\nimport { RepologyDatasource } from './repology';\nimport { RpmDatasource } from './rpm';\nimport { RubyVersionDatasource } from './ruby-version';\nimport { RubygemsDatasource } from './rubygems';\nimport { SbtPackageDatasource } from './sbt-package';\nimport { SbtPluginDatasource } from './sbt-plugin';\nimport { TerraformModuleDatasource } from './terraform-module';\nimport { TerraformProviderDatasource } from './terraform-provider';\nimport type { DatasourceApi } from './types';\nimport { Unity3dDatasource } from './unity3d';\nimport { Unity3dPackagesDatasource } from './unity3d-packages';\n\nconst api = new Map<string, DatasourceApi>();\nexport default api;\n\napi.set(ArtifactoryDatasource.id, new ArtifactoryDatasource());\napi.set(AwsEKSAddonDataSource.id, new AwsEKSAddonDataSource());\napi.set(AwsMachineImageDatasource.id, new AwsMachineImageDatasource());\napi.set(AwsRdsDatasource.id, new AwsRdsDatasource());\napi.set(AzureBicepResourceDatasource.id, new AzureBicepResourceDatasource());\napi.set(AzurePipelinesTasksDatasource.id, new AzurePipelinesTasksDatasource());\napi.set(BazelDatasource.id, new BazelDatasource());\napi.set(BitbucketServerTagsDatasource.id, new BitbucketServerTagsDatasource());\napi.set(BitbucketTagsDatasource.id, new BitbucketTagsDatasource());\napi.set(BitriseDatasource.id, new BitriseDatasource());\napi.set(BuildpacksRegistryDatasource.id, new BuildpacksRegistryDatasource());\napi.set(CdnjsDatasource.id, new CdnjsDatasource());\napi.set(ClojureDatasource.id, new ClojureDatasource());\napi.set(ConanDatasource.id, new ConanDatasource());\napi.set(CondaDatasource.id, new CondaDatasource());\napi.set(CpanDatasource.id, new CpanDatasource());\napi.set(CrateDatasource.id, new CrateDatasource());\napi.set(CustomDatasource.id, new CustomDatasource());\napi.set(DartDatasource.id, new DartDatasource());\napi.set(DartVersionDatasource.id, new DartVersionDatasource());\napi.set(DebDatasource.id, new DebDatasource());\napi.set(DenoDatasource.id, new DenoDatasource());\napi.set(DevboxDatasource.id, new DevboxDatasource());\napi.set(DockerDatasource.id, new DockerDatasource());\napi.set(DotnetVersionDatasource.id, new DotnetVersionDatasource());\napi.set(EndoflifeDateDatasource.id, new EndoflifeDateDatasource());\napi.set(FlutterVersionDatasource.id, new FlutterVersionDatasource());\napi.set(GalaxyDatasource.id, new GalaxyDatasource());\napi.set(GalaxyCollectionDatasource.id, new GalaxyCollectionDatasource());\napi.set(GitRefsDatasource.id, new GitRefsDatasource());\napi.set(GitTagsDatasource.id, new GitTagsDatasource());\napi.set(GiteaReleasesDatasource.id, new GiteaReleasesDatasource());\napi.set(GiteaTagsDatasource.id, new GiteaTagsDatasource());\napi.set(\n GithubReleaseAttachmentsDatasource.id,\n new GithubReleaseAttachmentsDatasource(),\n);\napi.set(GithubReleasesDatasource.id, new GithubReleasesDatasource());\napi.set(GithubRunnersDatasource.id, new GithubRunnersDatasource());\napi.set(GithubTagsDatasource.id, new GithubTagsDatasource());\napi.set(GitlabPackagesDatasource.id, new GitlabPackagesDatasource());\napi.set(GitlabReleasesDatasource.id, new GitlabReleasesDatasource());\napi.set(GitlabTagsDatasource.id, new GitlabTagsDatasource());\napi.set(GlasskubePackagesDatasource.id, new GlasskubePackagesDatasource());\napi.set(GoDatasource.id, new GoDatasource());\napi.set(GolangVersionDatasource.id, new GolangVersionDatasource());\napi.set(GradleVersionDatasource.id, new GradleVersionDatasource());\napi.set(HackageDatasource.id, new HackageDatasource());\napi.set(HelmDatasource.id, new HelmDatasource());\napi.set(HermitDatasource.id, new HermitDatasource());\napi.set(HexDatasource.id, new HexDatasource());\napi.set(HexpmBobDatasource.id, new HexpmBobDatasource());\napi.set(JavaVersionDatasource.id, new JavaVersionDatasource());\napi.set(JenkinsPluginsDatasource.id, new JenkinsPluginsDatasource());\napi.set(KubernetesApiDatasource.id, new KubernetesApiDatasource());\napi.set(MavenDatasource.id, new MavenDatasource());\napi.set(NodeVersionDatasource.id, new NodeVersionDatasource());\napi.set(NpmDatasource.id, new NpmDatasource());\napi.set(NugetDatasource.id, new NugetDatasource());\napi.set(OrbDatasource.id, new OrbDatasource());\napi.set(PackagistDatasource.id, new PackagistDatasource());\napi.set(PodDatasource.id, new PodDatasource());\napi.set(PuppetForgeDatasource.id, new PuppetForgeDatasource());\napi.set(PypiDatasource.id, new PypiDatasource());\napi.set(PythonVersionDatasource.id, new PythonVersionDatasource());\napi.set(RepologyDatasource.id, new RepologyDatasource());\napi.set(RpmDatasource.id, new RpmDatasource());\napi.set(RubyVersionDatasource.id, new RubyVersionDatasource());\napi.set(RubygemsDatasource.id, new RubygemsDatasource());\napi.set(SbtPackageDatasource.id, new SbtPackageDatasource());\napi.set(SbtPluginDatasource.id, new SbtPluginDatasource());\napi.set(TerraformModuleDatasource.id, new TerraformModuleDatasource());\napi.set(TerraformProviderDatasource.id, new TerraformProviderDatasource());\napi.set(Unity3dDatasource.id, new Unity3dDatasource());\napi.set(Unity3dPackagesDatasource.id, new Unity3dPackagesDatasource());\n"]}
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../lib/modules/datasource/api.ts"],"names":[],"mappings":";;AAAA,+CAAsD;AACtD,mDAAwD;AACxD,2DAAgE;AAChE,uCAA6C;AAC7C,iEAAsE;AACtE,mEAAwE;AACxE,mCAA0C;AAC1C,mEAAwE;AACxE,qDAA2D;AAC3D,uCAA8C;AAC9C,+DAAqE;AACrE,mCAA0C;AAC1C,uCAA8C;AAC9C,mCAA0C;AAC1C,mCAA0C;AAC1C,iCAAwC;AACxC,mCAA0C;AAC1C,qCAA4C;AAC5C,iCAAwC;AACxC,iDAAuD;AACvD,+BAAsC;AACtC,iCAAwC;AACxC,qCAA4C;AAC5C,qCAA4C;AAC5C,qDAA2D;AAC3D,qDAA2D;AAC3D,uDAA6D;AAC7D,yDAA+D;AAC/D,iDAAuD;AACvD,qCAA4C;AAC5C,2DAAiE;AACjE,yCAA+C;AAC/C,yCAA+C;AAC/C,qDAA2D;AAC3D,6CAAmD;AACnD,6EAAkF;AAClF,uDAA6D;AAC7D,qDA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,CAAC,EAAE,EAAE,IAAI,qBAAc,EAAE,CAAC,CAAC;AACjD,GAAG,CAAC,GAAG,CAAC,wCAAuB,CAAC,EAAE,EAAE,IAAI,wCAAuB,EAAE,CAAC,CAAC;AACnE,GAAG,CAAC,GAAG,CAAC,6BAAkB,CAAC,EAAE,EAAE,IAAI,6BAAkB,EAAE,CAAC,CAAC;AACzD,GAAG,CAAC,GAAG,CAAC,mBAAa,CAAC,EAAE,EAAE,IAAI,mBAAa,EAAE,CAAC,CAAC;AAC/C,GAAG,CAAC,GAAG,CAAC,oCAAqB,CAAC,EAAE,EAAE,IAAI,oCAAqB,EAAE,CAAC,CAAC;AAC/D,GAAG,CAAC,GAAG,CAAC,6BAAkB,CAAC,EAAE,EAAE,IAAI,6BAAkB,EAAE,CAAC,CAAC;AACzD,GAAG,CAAC,GAAG,CAAC,kCAAoB,CAAC,EAAE,EAAE,IAAI,kCAAoB,EAAE,CAAC,CAAC;AAC7D,GAAG,CAAC,GAAG,CAAC,gCAAmB,CAAC,EAAE,EAAE,IAAI,gCAAmB,EAAE,CAAC,CAAC;AAC3D,GAAG,CAAC,GAAG,CAAC,4CAAyB,CAAC,EAAE,EAAE,IAAI,4CAAyB,EAAE,CAAC,CAAC;AACvE,GAAG,CAAC,GAAG,CAAC,gDAA2B,CAAC,EAAE,EAAE,IAAI,gDAA2B,EAAE,CAAC,CAAC;AAC3E,GAAG,CAAC,GAAG,CAAC,2BAAiB,CAAC,EAAE,EAAE,IAAI,2BAAiB,EAAE,CAAC,CAAC;AACvD,GAAG,CAAC,GAAG,CAAC,4CAAyB,CAAC,EAAE,EAAE,IAAI,4CAAyB,EAAE,CAAC,CAAC","sourcesContent":["import { ArtifactoryDatasource } from './artifactory';\nimport { AwsEKSAddonDataSource } from './aws-eks-addon';\nimport { AwsMachineImageDatasource } from './aws-machine-image';\nimport { AwsRdsDatasource } from './aws-rds';\nimport { AzureBicepResourceDatasource } from './azure-bicep-resource';\nimport { AzurePipelinesTasksDatasource } from './azure-pipelines-tasks';\nimport { BazelDatasource } from './bazel';\nimport { BitbucketServerTagsDatasource } from './bitbucket-server-tags';\nimport { BitbucketTagsDatasource } from './bitbucket-tags';\nimport { BitriseDatasource } from './bitrise';\nimport { BuildpacksRegistryDatasource } from './buildpacks-registry';\nimport { CdnjsDatasource } from './cdnjs';\nimport { ClojureDatasource } from './clojure';\nimport { ConanDatasource } from './conan';\nimport { CondaDatasource } from './conda';\nimport { CpanDatasource } from './cpan';\nimport { CrateDatasource } from './crate';\nimport { CustomDatasource } from './custom';\nimport { DartDatasource } from './dart';\nimport { DartVersionDatasource } from './dart-version';\nimport { DebDatasource } from './deb';\nimport { DenoDatasource } from './deno';\nimport { DevboxDatasource } from './devbox';\nimport { DockerDatasource } from './docker';\nimport { DotnetVersionDatasource } from './dotnet-version';\nimport { EndoflifeDateDatasource } from './endoflife-date';\nimport { FlutterVersionDatasource } from './flutter-version';\nimport { ForgejoReleasesDatasource } from './forgejo-releases';\nimport { ForgejoTagsDatasource } from './forgejo-tags';\nimport { GalaxyDatasource } from './galaxy';\nimport { GalaxyCollectionDatasource } from './galaxy-collection';\nimport { GitRefsDatasource } from './git-refs';\nimport { GitTagsDatasource } from './git-tags';\nimport { GiteaReleasesDatasource } from './gitea-releases';\nimport { GiteaTagsDatasource } from './gitea-tags';\nimport { GithubReleaseAttachmentsDatasource } from './github-release-attachments';\nimport { GithubReleasesDatasource } from './github-releases';\nimport { GithubRunnersDatasource } from './github-runners';\nimport { GithubTagsDatasource } from './github-tags';\nimport { GitlabPackagesDatasource } from './gitlab-packages';\nimport { GitlabReleasesDatasource } from './gitlab-releases';\nimport { GitlabTagsDatasource } from './gitlab-tags';\nimport { GlasskubePackagesDatasource } from './glasskube-packages';\nimport { GoDatasource } from './go';\nimport { GolangVersionDatasource } from './golang-version';\nimport { GradleVersionDatasource } from './gradle-version';\nimport { HackageDatasource } from './hackage';\nimport { HelmDatasource } from './helm';\nimport { HermitDatasource } from './hermit';\nimport { HexDatasource } from './hex';\nimport { HexpmBobDatasource } from './hexpm-bob';\nimport { JavaVersionDatasource } from './java-version';\nimport { JenkinsPluginsDatasource } from './jenkins-plugins';\nimport { KubernetesApiDatasource } from './kubernetes-api';\nimport { MavenDatasource } from './maven';\nimport { NodeVersionDatasource } from './node-version';\nimport { NpmDatasource } from './npm';\nimport { NugetDatasource } from './nuget';\nimport { OrbDatasource } from './orb';\nimport { PackagistDatasource } from './packagist';\nimport { PodDatasource } from './pod';\nimport { PuppetForgeDatasource } from './puppet-forge';\nimport { PypiDatasource } from './pypi';\nimport { PythonVersionDatasource } from './python-version';\nimport { RepologyDatasource } from './repology';\nimport { RpmDatasource } from './rpm';\nimport { RubyVersionDatasource } from './ruby-version';\nimport { RubygemsDatasource } from './rubygems';\nimport { SbtPackageDatasource } from './sbt-package';\nimport { SbtPluginDatasource } from './sbt-plugin';\nimport { TerraformModuleDatasource } from './terraform-module';\nimport { TerraformProviderDatasource } from './terraform-provider';\nimport type { DatasourceApi } from './types';\nimport { Unity3dDatasource } from './unity3d';\nimport { Unity3dPackagesDatasource } from './unity3d-packages';\n\nconst api = new Map<string, DatasourceApi>();\nexport default api;\n\napi.set(ArtifactoryDatasource.id, new ArtifactoryDatasource());\napi.set(AwsEKSAddonDataSource.id, new AwsEKSAddonDataSource());\napi.set(AwsMachineImageDatasource.id, new AwsMachineImageDatasource());\napi.set(AwsRdsDatasource.id, new AwsRdsDatasource());\napi.set(AzureBicepResourceDatasource.id, new AzureBicepResourceDatasource());\napi.set(AzurePipelinesTasksDatasource.id, new AzurePipelinesTasksDatasource());\napi.set(BazelDatasource.id, new BazelDatasource());\napi.set(BitbucketServerTagsDatasource.id, new BitbucketServerTagsDatasource());\napi.set(BitbucketTagsDatasource.id, new BitbucketTagsDatasource());\napi.set(BitriseDatasource.id, new BitriseDatasource());\napi.set(BuildpacksRegistryDatasource.id, new BuildpacksRegistryDatasource());\napi.set(CdnjsDatasource.id, new CdnjsDatasource());\napi.set(ClojureDatasource.id, new ClojureDatasource());\napi.set(ConanDatasource.id, new ConanDatasource());\napi.set(CondaDatasource.id, new CondaDatasource());\napi.set(CpanDatasource.id, new CpanDatasource());\napi.set(CrateDatasource.id, new CrateDatasource());\napi.set(CustomDatasource.id, new CustomDatasource());\napi.set(DartDatasource.id, new DartDatasource());\napi.set(DartVersionDatasource.id, new DartVersionDatasource());\napi.set(DebDatasource.id, new DebDatasource());\napi.set(DenoDatasource.id, new DenoDatasource());\napi.set(DevboxDatasource.id, new DevboxDatasource());\napi.set(DockerDatasource.id, new DockerDatasource());\napi.set(DotnetVersionDatasource.id, new DotnetVersionDatasource());\napi.set(EndoflifeDateDatasource.id, new EndoflifeDateDatasource());\napi.set(FlutterVersionDatasource.id, new FlutterVersionDatasource());\napi.set(ForgejoReleasesDatasource.id, new ForgejoReleasesDatasource());\napi.set(ForgejoTagsDatasource.id, new ForgejoTagsDatasource());\napi.set(GalaxyDatasource.id, new GalaxyDatasource());\napi.set(GalaxyCollectionDatasource.id, new GalaxyCollectionDatasource());\napi.set(GitRefsDatasource.id, new GitRefsDatasource());\napi.set(GitTagsDatasource.id, new GitTagsDatasource());\napi.set(GiteaReleasesDatasource.id, new GiteaReleasesDatasource());\napi.set(GiteaTagsDatasource.id, new GiteaTagsDatasource());\napi.set(\n GithubReleaseAttachmentsDatasource.id,\n new GithubReleaseAttachmentsDatasource(),\n);\napi.set(GithubReleasesDatasource.id, new GithubReleasesDatasource());\napi.set(GithubRunnersDatasource.id, new GithubRunnersDatasource());\napi.set(GithubTagsDatasource.id, new GithubTagsDatasource());\napi.set(GitlabPackagesDatasource.id, new GitlabPackagesDatasource());\napi.set(GitlabReleasesDatasource.id, new GitlabReleasesDatasource());\napi.set(GitlabTagsDatasource.id, new GitlabTagsDatasource());\napi.set(GlasskubePackagesDatasource.id, new GlasskubePackagesDatasource());\napi.set(GoDatasource.id, new GoDatasource());\napi.set(GolangVersionDatasource.id, new GolangVersionDatasource());\napi.set(GradleVersionDatasource.id, new GradleVersionDatasource());\napi.set(HackageDatasource.id, new HackageDatasource());\napi.set(HelmDatasource.id, new HelmDatasource());\napi.set(HermitDatasource.id, new HermitDatasource());\napi.set(HexDatasource.id, new HexDatasource());\napi.set(HexpmBobDatasource.id, new HexpmBobDatasource());\napi.set(JavaVersionDatasource.id, new JavaVersionDatasource());\napi.set(JenkinsPluginsDatasource.id, new JenkinsPluginsDatasource());\napi.set(KubernetesApiDatasource.id, new KubernetesApiDatasource());\napi.set(MavenDatasource.id, new MavenDatasource());\napi.set(NodeVersionDatasource.id, new NodeVersionDatasource());\napi.set(NpmDatasource.id, new NpmDatasource());\napi.set(NugetDatasource.id, new NugetDatasource());\napi.set(OrbDatasource.id, new OrbDatasource());\napi.set(PackagistDatasource.id, new PackagistDatasource());\napi.set(PodDatasource.id, new PodDatasource());\napi.set(PuppetForgeDatasource.id, new PuppetForgeDatasource());\napi.set(PypiDatasource.id, new PypiDatasource());\napi.set(PythonVersionDatasource.id, new PythonVersionDatasource());\napi.set(RepologyDatasource.id, new RepologyDatasource());\napi.set(RpmDatasource.id, new RpmDatasource());\napi.set(RubyVersionDatasource.id, new RubyVersionDatasource());\napi.set(RubygemsDatasource.id, new RubygemsDatasource());\napi.set(SbtPackageDatasource.id, new SbtPackageDatasource());\napi.set(SbtPluginDatasource.id, new SbtPluginDatasource());\napi.set(TerraformModuleDatasource.id, new TerraformModuleDatasource());\napi.set(TerraformProviderDatasource.id, new TerraformProviderDatasource());\napi.set(Unity3dDatasource.id, new Unity3dDatasource());\napi.set(Unity3dPackagesDatasource.id, new Unity3dPackagesDatasource());\n"]}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { ForgejoHttp } from '../../../util/http/forgejo';
|
2
|
+
import { Datasource } from '../datasource';
|
3
|
+
import type { DigestConfig, GetReleasesConfig, ReleaseResult } from '../types';
|
4
|
+
export declare class ForgejoReleasesDatasource extends Datasource {
|
5
|
+
static readonly id = "forgejo-releases";
|
6
|
+
http: ForgejoHttp;
|
7
|
+
static readonly defaultRegistryUrls: string[];
|
8
|
+
private static readonly cacheNamespace;
|
9
|
+
readonly releaseTimestampSupport = true;
|
10
|
+
readonly releaseTimestampNote = "The release timestamp is determined from the `published_at` field in the results.";
|
11
|
+
readonly sourceUrlSupport = "package";
|
12
|
+
readonly sourceUrlNote = "The source URL is determined by using the `packageName` and `registryUrl`.";
|
13
|
+
constructor();
|
14
|
+
getReleases({ registryUrl, packageName: repo, }: GetReleasesConfig): Promise<ReleaseResult | null>;
|
15
|
+
getTagCommit(registryUrl: string | undefined, repo: string, tag: string): Promise<string | null>;
|
16
|
+
getDigest({ packageName: repo, registryUrl }: DigestConfig, newValue?: string): Promise<string | null>;
|
17
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ForgejoReleasesDatasource = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const decorator_1 = require("../../../util/cache/package/decorator");
|
6
|
+
const forgejo_1 = require("../../../util/http/forgejo");
|
7
|
+
const datasource_1 = require("../datasource");
|
8
|
+
const forgejo_tags_1 = require("../forgejo-tags");
|
9
|
+
const schema_1 = require("../forgejo-tags/schema");
|
10
|
+
const schema_2 = require("./schema");
|
11
|
+
class ForgejoReleasesDatasource extends datasource_1.Datasource {
|
12
|
+
static id = 'forgejo-releases';
|
13
|
+
http = new forgejo_1.ForgejoHttp(ForgejoReleasesDatasource.id);
|
14
|
+
static defaultRegistryUrls = ['https://code.forgejo.org'];
|
15
|
+
static cacheNamespace = `datasource-${ForgejoReleasesDatasource.id}`;
|
16
|
+
releaseTimestampSupport = true;
|
17
|
+
releaseTimestampNote = 'The release timestamp is determined from the `published_at` field in the results.';
|
18
|
+
sourceUrlSupport = 'package';
|
19
|
+
sourceUrlNote = 'The source URL is determined by using the `packageName` and `registryUrl`.';
|
20
|
+
constructor() {
|
21
|
+
super(ForgejoReleasesDatasource.id);
|
22
|
+
}
|
23
|
+
// getReleases fetches list of tags for the repository
|
24
|
+
async getReleases({ registryUrl, packageName: repo, }) {
|
25
|
+
const url = `${forgejo_tags_1.ForgejoTagsDatasource.getApiUrl(registryUrl)}repos/${repo}/releases?draft=false`;
|
26
|
+
const tags = (await this.http.getJson(url, {
|
27
|
+
paginate: true,
|
28
|
+
}, schema_2.ReleasesSchema)).body;
|
29
|
+
const dependency = {
|
30
|
+
sourceUrl: forgejo_tags_1.ForgejoTagsDatasource.getSourceUrl(repo, registryUrl),
|
31
|
+
registryUrl: forgejo_tags_1.ForgejoTagsDatasource.getRegistryURL(registryUrl),
|
32
|
+
releases: tags.map(({ tag_name, published_at, prerelease }) => ({
|
33
|
+
version: tag_name,
|
34
|
+
gitRef: tag_name,
|
35
|
+
releaseTimestamp: published_at,
|
36
|
+
isStable: !prerelease,
|
37
|
+
})),
|
38
|
+
};
|
39
|
+
return dependency;
|
40
|
+
}
|
41
|
+
// getTagCommit fetched the commit has for specified tag
|
42
|
+
async getTagCommit(registryUrl, repo, tag) {
|
43
|
+
const url = `${forgejo_tags_1.ForgejoTagsDatasource.getApiUrl(registryUrl)}repos/${repo}/tags/${tag}`;
|
44
|
+
const { body } = await this.http.getJson(url, schema_1.TagSchema);
|
45
|
+
return body.commit.sha;
|
46
|
+
}
|
47
|
+
// getDigest fetched the latest commit for repository main branch
|
48
|
+
// however, if newValue is provided, then getTagCommit is called
|
49
|
+
async getDigest({ packageName: repo, registryUrl }, newValue) {
|
50
|
+
if (newValue?.length) {
|
51
|
+
return this.getTagCommit(registryUrl, repo, newValue);
|
52
|
+
}
|
53
|
+
const url = `${forgejo_tags_1.ForgejoTagsDatasource.getApiUrl(registryUrl)}repos/${repo}/commits?stat=false&verification=false&files=false&page=1&limit=1`;
|
54
|
+
const { body } = await this.http.getJson(url, schema_1.CommitsSchema);
|
55
|
+
if (body.length === 0) {
|
56
|
+
return null;
|
57
|
+
}
|
58
|
+
return body[0].sha;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
exports.ForgejoReleasesDatasource = ForgejoReleasesDatasource;
|
62
|
+
tslib_1.__decorate([
|
63
|
+
(0, decorator_1.cache)({
|
64
|
+
namespace: ForgejoReleasesDatasource.cacheNamespace,
|
65
|
+
key: ({ registryUrl, packageName }) => forgejo_tags_1.ForgejoTagsDatasource.getCacheKey(registryUrl, packageName, 'releases'),
|
66
|
+
})
|
67
|
+
], ForgejoReleasesDatasource.prototype, "getReleases", null);
|
68
|
+
tslib_1.__decorate([
|
69
|
+
(0, decorator_1.cache)({
|
70
|
+
namespace: ForgejoReleasesDatasource.cacheNamespace,
|
71
|
+
key: (registryUrl, repo, tag) => forgejo_tags_1.ForgejoTagsDatasource.getCacheKey(registryUrl, repo, `tag-${tag}`),
|
72
|
+
})
|
73
|
+
], ForgejoReleasesDatasource.prototype, "getTagCommit", null);
|
74
|
+
tslib_1.__decorate([
|
75
|
+
(0, decorator_1.cache)({
|
76
|
+
namespace: ForgejoReleasesDatasource.cacheNamespace,
|
77
|
+
key: ({ registryUrl, packageName }) => forgejo_tags_1.ForgejoTagsDatasource.getCacheKey(registryUrl, packageName, 'digest'),
|
78
|
+
})
|
79
|
+
], ForgejoReleasesDatasource.prototype, "getDigest", null);
|
80
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/datasource/forgejo-releases/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAE9D,wDAAyD;AACzD,8CAA2C;AAC3C,kDAAwD;AACxD,mDAAkE;AAElE,qCAA0C;AAE1C,MAAa,yBAA0B,SAAQ,uBAAU;IACvD,MAAM,CAAU,EAAE,GAAG,kBAAkB,CAAC;IAE/B,IAAI,GAAG,IAAI,qBAAW,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC;IAE9D,MAAM,CAAU,mBAAmB,GAAG,CAAC,0BAA0B,CAAC,CAAC;IAE3D,MAAM,CAAU,cAAc,GAA0B,cAAc,yBAAyB,CAAC,EAAE,E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;IALd,IAAA,iBAAK,EAAC;QACL,SAAS,EAAE,yBAAyB,CAAC,cAAc;QACnD,GAAG,EAAE,CAAC,EAAE,WAAW,EAAE,WAAW,EAAgB,EAAE,EAAE,CAClD,oCAAqB,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAC;KACxE,CAAC;0DAmBD","sourcesContent":["import { cache } from '../../../util/cache/package/decorator';\nimport type { PackageCacheNamespace } from '../../../util/cache/package/types';\nimport { ForgejoHttp } from '../../../util/http/forgejo';\nimport { Datasource } from '../datasource';\nimport { ForgejoTagsDatasource } from '../forgejo-tags';\nimport { CommitsSchema, TagSchema } from '../forgejo-tags/schema';\nimport type { DigestConfig, GetReleasesConfig, ReleaseResult } from '../types';\nimport { ReleasesSchema } from './schema';\n\nexport class ForgejoReleasesDatasource extends Datasource {\n static readonly id = 'forgejo-releases';\n\n override http = new ForgejoHttp(ForgejoReleasesDatasource.id);\n\n static readonly defaultRegistryUrls = ['https://code.forgejo.org'];\n\n private static readonly cacheNamespace: PackageCacheNamespace = `datasource-${ForgejoReleasesDatasource.id}`;\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp 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 by using the `packageName` and `registryUrl`.';\n\n constructor() {\n super(ForgejoReleasesDatasource.id);\n }\n\n // getReleases fetches list of tags for the repository\n @cache({\n namespace: ForgejoReleasesDatasource.cacheNamespace,\n key: ({ registryUrl, packageName }: GetReleasesConfig) =>\n ForgejoTagsDatasource.getCacheKey(registryUrl, packageName, 'releases'),\n })\n async getReleases({\n registryUrl,\n packageName: repo,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n const url = `${ForgejoTagsDatasource.getApiUrl(\n registryUrl,\n )}repos/${repo}/releases?draft=false`;\n const tags = (\n await this.http.getJson(\n url,\n {\n paginate: true,\n },\n ReleasesSchema,\n )\n ).body;\n\n const dependency: ReleaseResult = {\n sourceUrl: ForgejoTagsDatasource.getSourceUrl(repo, registryUrl),\n registryUrl: ForgejoTagsDatasource.getRegistryURL(registryUrl),\n releases: tags.map(({ tag_name, published_at, prerelease }) => ({\n version: tag_name,\n gitRef: tag_name,\n releaseTimestamp: published_at,\n isStable: !prerelease,\n })),\n };\n\n return dependency;\n }\n\n // getTagCommit fetched the commit has for specified tag\n @cache({\n namespace: ForgejoReleasesDatasource.cacheNamespace,\n key: (registryUrl: string | undefined, repo: string, tag: string): string =>\n ForgejoTagsDatasource.getCacheKey(registryUrl, repo, `tag-${tag}`),\n })\n async getTagCommit(\n registryUrl: string | undefined,\n repo: string,\n tag: string,\n ): Promise<string | null> {\n const url = `${ForgejoTagsDatasource.getApiUrl(\n registryUrl,\n )}repos/${repo}/tags/${tag}`;\n\n const { body } = await this.http.getJson(url, TagSchema);\n\n return body.commit.sha;\n }\n\n // getDigest fetched the latest commit for repository main branch\n // however, if newValue is provided, then getTagCommit is called\n @cache({\n namespace: ForgejoReleasesDatasource.cacheNamespace,\n key: ({ registryUrl, packageName }: DigestConfig) =>\n ForgejoTagsDatasource.getCacheKey(registryUrl, packageName, 'digest'),\n })\n override async getDigest(\n { packageName: repo, registryUrl }: DigestConfig,\n newValue?: string,\n ): Promise<string | null> {\n if (newValue?.length) {\n return this.getTagCommit(registryUrl, repo, newValue);\n }\n\n const url = `${ForgejoTagsDatasource.getApiUrl(\n registryUrl,\n )}repos/${repo}/commits?stat=false&verification=false&files=false&page=1&limit=1`;\n const { body } = await this.http.getJson(url, CommitsSchema);\n\n if (body.length === 0) {\n return null;\n }\n\n return body[0].sha;\n }\n}\n"]}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const ReleaseSchema: z.ZodObject<{
|
3
|
+
name: z.ZodString;
|
4
|
+
tag_name: z.ZodString;
|
5
|
+
body: z.ZodString;
|
6
|
+
prerelease: z.ZodBoolean;
|
7
|
+
published_at: z.ZodCatch<z.ZodNullable<z.ZodEffects<z.ZodUnknown, import("../../../util/timestamp").Timestamp, unknown>>>;
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
9
|
+
name: string;
|
10
|
+
prerelease: boolean;
|
11
|
+
body: string;
|
12
|
+
tag_name: string;
|
13
|
+
published_at: import("../../../util/timestamp").Timestamp | null;
|
14
|
+
}, {
|
15
|
+
name: string;
|
16
|
+
prerelease: boolean;
|
17
|
+
body: string;
|
18
|
+
tag_name: string;
|
19
|
+
published_at?: unknown;
|
20
|
+
}>;
|
21
|
+
export declare const ReleasesSchema: z.ZodArray<z.ZodObject<{
|
22
|
+
name: z.ZodString;
|
23
|
+
tag_name: z.ZodString;
|
24
|
+
body: z.ZodString;
|
25
|
+
prerelease: z.ZodBoolean;
|
26
|
+
published_at: z.ZodCatch<z.ZodNullable<z.ZodEffects<z.ZodUnknown, import("../../../util/timestamp").Timestamp, unknown>>>;
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
28
|
+
name: string;
|
29
|
+
prerelease: boolean;
|
30
|
+
body: string;
|
31
|
+
tag_name: string;
|
32
|
+
published_at: import("../../../util/timestamp").Timestamp | null;
|
33
|
+
}, {
|
34
|
+
name: string;
|
35
|
+
prerelease: boolean;
|
36
|
+
body: string;
|
37
|
+
tag_name: string;
|
38
|
+
published_at?: unknown;
|
39
|
+
}>, "many">;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ReleasesSchema = exports.ReleaseSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const timestamp_1 = require("../../../util/timestamp");
|
6
|
+
exports.ReleaseSchema = zod_1.z.object({
|
7
|
+
name: zod_1.z.string(),
|
8
|
+
tag_name: zod_1.z.string(),
|
9
|
+
body: zod_1.z.string(),
|
10
|
+
prerelease: zod_1.z.boolean(),
|
11
|
+
published_at: timestamp_1.MaybeTimestamp,
|
12
|
+
});
|
13
|
+
exports.ReleasesSchema = zod_1.z.array(exports.ReleaseSchema);
|
14
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/datasource/forgejo-releases/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,uDAAyD;AAE5C,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE;IACvB,YAAY,EAAE,0BAAc;CAC7B,CAAC,CAAC;AAEU,QAAA,cAAc,GAAG,OAAC,CAAC,KAAK,CAAC,qBAAa,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { MaybeTimestamp } from '../../../util/timestamp';\n\nexport const ReleaseSchema = z.object({\n name: z.string(),\n tag_name: z.string(),\n body: z.string(),\n prerelease: z.boolean(),\n published_at: MaybeTimestamp,\n});\n\nexport const ReleasesSchema = z.array(ReleaseSchema);\n"]}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { ForgejoHttp } from '../../../util/http/forgejo';
|
2
|
+
import { Datasource } from '../datasource';
|
3
|
+
import type { DigestConfig, GetReleasesConfig, ReleaseResult } from '../types';
|
4
|
+
export declare class ForgejoTagsDatasource extends Datasource {
|
5
|
+
static readonly id = "forgejo-tags";
|
6
|
+
http: ForgejoHttp;
|
7
|
+
static readonly defaultRegistryUrls: string[];
|
8
|
+
private static readonly cacheNamespace;
|
9
|
+
readonly releaseTimestampSupport = true;
|
10
|
+
readonly releaseTimestampNote = "The release timestamp is determined from the `created` field in the results.";
|
11
|
+
readonly sourceUrlSupport = "package";
|
12
|
+
readonly sourceUrlNote = "The source URL is determined by using the `packageName` and `registryUrl`.";
|
13
|
+
constructor();
|
14
|
+
static getRegistryURL(registryUrl?: string): string;
|
15
|
+
static getApiUrl(registryUrl?: string): string;
|
16
|
+
static getCacheKey(registryUrl: string | undefined, repo: string, type: string): string;
|
17
|
+
static getSourceUrl(packageName: string, registryUrl?: string): string;
|
18
|
+
getReleases({ registryUrl, packageName: repo, }: GetReleasesConfig): Promise<ReleaseResult | null>;
|
19
|
+
getTagCommit(registryUrl: string | undefined, repo: string, tag: string): Promise<string | null>;
|
20
|
+
getDigest({ packageName: repo, registryUrl }: DigestConfig, newValue?: string): Promise<string | null>;
|
21
|
+
}
|
@@ -0,0 +1,96 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ForgejoTagsDatasource = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const decorator_1 = require("../../../util/cache/package/decorator");
|
6
|
+
const forgejo_1 = require("../../../util/http/forgejo");
|
7
|
+
const regex_1 = require("../../../util/regex");
|
8
|
+
const url_1 = require("../../../util/url");
|
9
|
+
const datasource_1 = require("../datasource");
|
10
|
+
const schema_1 = require("./schema");
|
11
|
+
class ForgejoTagsDatasource extends datasource_1.Datasource {
|
12
|
+
static id = 'forgejo-tags';
|
13
|
+
http = new forgejo_1.ForgejoHttp(ForgejoTagsDatasource.id);
|
14
|
+
static defaultRegistryUrls = ['https://code.forgejo.org'];
|
15
|
+
static cacheNamespace = `datasource-${ForgejoTagsDatasource.id}`;
|
16
|
+
releaseTimestampSupport = true;
|
17
|
+
releaseTimestampNote = 'The release timestamp is determined from the `created` field in the results.';
|
18
|
+
sourceUrlSupport = 'package';
|
19
|
+
sourceUrlNote = 'The source URL is determined by using the `packageName` and `registryUrl`.';
|
20
|
+
constructor() {
|
21
|
+
super(ForgejoTagsDatasource.id);
|
22
|
+
}
|
23
|
+
static getRegistryURL(registryUrl) {
|
24
|
+
// fallback to default API endpoint if custom not provided
|
25
|
+
return registryUrl ?? this.defaultRegistryUrls[0];
|
26
|
+
}
|
27
|
+
static getApiUrl(registryUrl) {
|
28
|
+
const res = ForgejoTagsDatasource.getRegistryURL(registryUrl).replace((0, regex_1.regEx)(/\/api\/v1$/), '');
|
29
|
+
return `${(0, url_1.ensureTrailingSlash)(res)}api/v1/`;
|
30
|
+
}
|
31
|
+
static getCacheKey(registryUrl, repo, type) {
|
32
|
+
return `${ForgejoTagsDatasource.getRegistryURL(registryUrl)}:${repo}:${type}`;
|
33
|
+
}
|
34
|
+
static getSourceUrl(packageName, registryUrl) {
|
35
|
+
const url = ForgejoTagsDatasource.getRegistryURL(registryUrl);
|
36
|
+
const normalizedUrl = (0, url_1.ensureTrailingSlash)(url);
|
37
|
+
return `${normalizedUrl}${packageName}`;
|
38
|
+
}
|
39
|
+
// getReleases fetches list of tags for the repository
|
40
|
+
async getReleases({ registryUrl, packageName: repo, }) {
|
41
|
+
const url = `${ForgejoTagsDatasource.getApiUrl(registryUrl)}repos/${repo}/tags`;
|
42
|
+
const tags = (await this.http.getJson(url, {
|
43
|
+
paginate: true,
|
44
|
+
}, schema_1.TagsSchema)).body;
|
45
|
+
const dependency = {
|
46
|
+
sourceUrl: ForgejoTagsDatasource.getSourceUrl(repo, registryUrl),
|
47
|
+
registryUrl: ForgejoTagsDatasource.getRegistryURL(registryUrl),
|
48
|
+
releases: tags.map(({ name, commit }) => ({
|
49
|
+
version: name,
|
50
|
+
gitRef: name,
|
51
|
+
newDigest: commit.sha,
|
52
|
+
releaseTimestamp: commit.created,
|
53
|
+
})),
|
54
|
+
};
|
55
|
+
return dependency;
|
56
|
+
}
|
57
|
+
// getTagCommit fetched the commit has for specified tag
|
58
|
+
async getTagCommit(registryUrl, repo, tag) {
|
59
|
+
const url = `${ForgejoTagsDatasource.getApiUrl(registryUrl)}repos/${repo}/tags/${tag}`;
|
60
|
+
const { body } = await this.http.getJson(url, schema_1.TagSchema);
|
61
|
+
return body.commit.sha;
|
62
|
+
}
|
63
|
+
// getDigest fetched the latest commit for repository main branch
|
64
|
+
// however, if newValue is provided, then getTagCommit is called
|
65
|
+
async getDigest({ packageName: repo, registryUrl }, newValue) {
|
66
|
+
if (newValue?.length) {
|
67
|
+
return this.getTagCommit(registryUrl, repo, newValue);
|
68
|
+
}
|
69
|
+
const url = `${ForgejoTagsDatasource.getApiUrl(registryUrl)}repos/${repo}/commits?stat=false&verification=false&files=false&page=1&limit=1`;
|
70
|
+
const { body } = await this.http.getJson(url, schema_1.CommitsSchema);
|
71
|
+
if (body.length === 0) {
|
72
|
+
return null;
|
73
|
+
}
|
74
|
+
return body[0].sha;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
exports.ForgejoTagsDatasource = ForgejoTagsDatasource;
|
78
|
+
tslib_1.__decorate([
|
79
|
+
(0, decorator_1.cache)({
|
80
|
+
namespace: ForgejoTagsDatasource.cacheNamespace,
|
81
|
+
key: ({ registryUrl, packageName }) => ForgejoTagsDatasource.getCacheKey(registryUrl, packageName, 'tags'),
|
82
|
+
})
|
83
|
+
], ForgejoTagsDatasource.prototype, "getReleases", null);
|
84
|
+
tslib_1.__decorate([
|
85
|
+
(0, decorator_1.cache)({
|
86
|
+
namespace: ForgejoTagsDatasource.cacheNamespace,
|
87
|
+
key: (registryUrl, repo, tag) => ForgejoTagsDatasource.getCacheKey(registryUrl, repo, `tag-${tag}`),
|
88
|
+
})
|
89
|
+
], ForgejoTagsDatasource.prototype, "getTagCommit", null);
|
90
|
+
tslib_1.__decorate([
|
91
|
+
(0, decorator_1.cache)({
|
92
|
+
namespace: ForgejoTagsDatasource.cacheNamespace,
|
93
|
+
key: ({ registryUrl, packageName }) => ForgejoTagsDatasource.getCacheKey(registryUrl, packageName, 'digest'),
|
94
|
+
})
|
95
|
+
], ForgejoTagsDatasource.prototype, "getDigest", null);
|
96
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/datasource/forgejo-tags/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAE9D,wD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W,EAAgB,EAAE,EAAE,CAClD,qBAAqB,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAC;KACxE,CAAC;sDAmBD","sourcesContent":["import { cache } from '../../../util/cache/package/decorator';\nimport type { PackageCacheNamespace } from '../../../util/cache/package/types';\nimport { ForgejoHttp } from '../../../util/http/forgejo';\nimport { regEx } from '../../../util/regex';\nimport { ensureTrailingSlash } from '../../../util/url';\nimport { Datasource } from '../datasource';\nimport type { DigestConfig, GetReleasesConfig, ReleaseResult } from '../types';\nimport { CommitsSchema, TagSchema, TagsSchema } from './schema';\n\nexport class ForgejoTagsDatasource extends Datasource {\n static readonly id = 'forgejo-tags';\n\n override http = new ForgejoHttp(ForgejoTagsDatasource.id);\n\n static readonly defaultRegistryUrls = ['https://code.forgejo.org'];\n\n private static readonly cacheNamespace: PackageCacheNamespace = `datasource-${ForgejoTagsDatasource.id}`;\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from the `created` field in the results.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined by using the `packageName` and `registryUrl`.';\n\n constructor() {\n super(ForgejoTagsDatasource.id);\n }\n\n static getRegistryURL(registryUrl?: string): string {\n // fallback to default API endpoint if custom not provided\n return registryUrl ?? this.defaultRegistryUrls[0];\n }\n\n static getApiUrl(registryUrl?: string): string {\n const res = ForgejoTagsDatasource.getRegistryURL(registryUrl).replace(\n regEx(/\\/api\\/v1$/),\n '',\n );\n return `${ensureTrailingSlash(res)}api/v1/`;\n }\n\n static getCacheKey(\n registryUrl: string | undefined,\n repo: string,\n type: string,\n ): string {\n return `${ForgejoTagsDatasource.getRegistryURL(registryUrl)}:${repo}:${type}`;\n }\n\n static getSourceUrl(packageName: string, registryUrl?: string): string {\n const url = ForgejoTagsDatasource.getRegistryURL(registryUrl);\n const normalizedUrl = ensureTrailingSlash(url);\n return `${normalizedUrl}${packageName}`;\n }\n\n // getReleases fetches list of tags for the repository\n @cache({\n namespace: ForgejoTagsDatasource.cacheNamespace,\n key: ({ registryUrl, packageName }: GetReleasesConfig) =>\n ForgejoTagsDatasource.getCacheKey(registryUrl, packageName, 'tags'),\n })\n async getReleases({\n registryUrl,\n packageName: repo,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n const url = `${ForgejoTagsDatasource.getApiUrl(\n registryUrl,\n )}repos/${repo}/tags`;\n const tags = (\n await this.http.getJson(\n url,\n {\n paginate: true,\n },\n TagsSchema,\n )\n ).body;\n\n const dependency: ReleaseResult = {\n sourceUrl: ForgejoTagsDatasource.getSourceUrl(repo, registryUrl),\n registryUrl: ForgejoTagsDatasource.getRegistryURL(registryUrl),\n releases: tags.map(({ name, commit }) => ({\n version: name,\n gitRef: name,\n newDigest: commit.sha,\n releaseTimestamp: commit.created,\n })),\n };\n\n return dependency;\n }\n\n // getTagCommit fetched the commit has for specified tag\n @cache({\n namespace: ForgejoTagsDatasource.cacheNamespace,\n key: (registryUrl: string | undefined, repo: string, tag: string): string =>\n ForgejoTagsDatasource.getCacheKey(registryUrl, repo, `tag-${tag}`),\n })\n async getTagCommit(\n registryUrl: string | undefined,\n repo: string,\n tag: string,\n ): Promise<string | null> {\n const url = `${ForgejoTagsDatasource.getApiUrl(\n registryUrl,\n )}repos/${repo}/tags/${tag}`;\n\n const { body } = await this.http.getJson(url, TagSchema);\n\n return body.commit.sha;\n }\n\n // getDigest fetched the latest commit for repository main branch\n // however, if newValue is provided, then getTagCommit is called\n @cache({\n namespace: ForgejoTagsDatasource.cacheNamespace,\n key: ({ registryUrl, packageName }: DigestConfig) =>\n ForgejoTagsDatasource.getCacheKey(registryUrl, packageName, 'digest'),\n })\n override async getDigest(\n { packageName: repo, registryUrl }: DigestConfig,\n newValue?: string,\n ): Promise<string | null> {\n if (newValue?.length) {\n return this.getTagCommit(registryUrl, repo, newValue);\n }\n\n const url = `${ForgejoTagsDatasource.getApiUrl(\n registryUrl,\n )}repos/${repo}/commits?stat=false&verification=false&files=false&page=1&limit=1`;\n const { body } = await this.http.getJson(url, CommitsSchema);\n\n if (body.length === 0) {\n return null;\n }\n\n return body[0].sha;\n }\n}\n"]}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const CommitSchema: z.ZodObject<{
|
3
|
+
sha: z.ZodString;
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
5
|
+
sha: string;
|
6
|
+
}, {
|
7
|
+
sha: string;
|
8
|
+
}>;
|
9
|
+
export declare const CommitsSchema: z.ZodArray<z.ZodObject<{
|
10
|
+
sha: z.ZodString;
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
12
|
+
sha: string;
|
13
|
+
}, {
|
14
|
+
sha: string;
|
15
|
+
}>, "many">;
|
16
|
+
export declare const TagSchema: z.ZodObject<{
|
17
|
+
name: z.ZodString;
|
18
|
+
commit: z.ZodObject<{
|
19
|
+
sha: z.ZodString;
|
20
|
+
created: z.ZodCatch<z.ZodNullable<z.ZodEffects<z.ZodUnknown, import("../../../util/timestamp").Timestamp, unknown>>>;
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
22
|
+
created: import("../../../util/timestamp").Timestamp | null;
|
23
|
+
sha: string;
|
24
|
+
}, {
|
25
|
+
sha: string;
|
26
|
+
created?: unknown;
|
27
|
+
}>;
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
29
|
+
commit: {
|
30
|
+
created: import("../../../util/timestamp").Timestamp | null;
|
31
|
+
sha: string;
|
32
|
+
};
|
33
|
+
name: string;
|
34
|
+
}, {
|
35
|
+
commit: {
|
36
|
+
sha: string;
|
37
|
+
created?: unknown;
|
38
|
+
};
|
39
|
+
name: string;
|
40
|
+
}>;
|
41
|
+
export declare const TagsSchema: z.ZodArray<z.ZodObject<{
|
42
|
+
name: z.ZodString;
|
43
|
+
commit: z.ZodObject<{
|
44
|
+
sha: z.ZodString;
|
45
|
+
created: z.ZodCatch<z.ZodNullable<z.ZodEffects<z.ZodUnknown, import("../../../util/timestamp").Timestamp, unknown>>>;
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
47
|
+
created: import("../../../util/timestamp").Timestamp | null;
|
48
|
+
sha: string;
|
49
|
+
}, {
|
50
|
+
sha: string;
|
51
|
+
created?: unknown;
|
52
|
+
}>;
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
54
|
+
commit: {
|
55
|
+
created: import("../../../util/timestamp").Timestamp | null;
|
56
|
+
sha: string;
|
57
|
+
};
|
58
|
+
name: string;
|
59
|
+
}, {
|
60
|
+
commit: {
|
61
|
+
sha: string;
|
62
|
+
created?: unknown;
|
63
|
+
};
|
64
|
+
name: string;
|
65
|
+
}>, "many">;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.TagsSchema = exports.TagSchema = exports.CommitsSchema = exports.CommitSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const timestamp_1 = require("../../../util/timestamp");
|
6
|
+
exports.CommitSchema = zod_1.z.object({
|
7
|
+
sha: zod_1.z.string(),
|
8
|
+
});
|
9
|
+
exports.CommitsSchema = zod_1.z.array(exports.CommitSchema);
|
10
|
+
const TagCommitSchema = zod_1.z.object({
|
11
|
+
sha: zod_1.z.string(),
|
12
|
+
created: timestamp_1.MaybeTimestamp,
|
13
|
+
});
|
14
|
+
exports.TagSchema = zod_1.z.object({
|
15
|
+
name: zod_1.z.string(),
|
16
|
+
commit: TagCommitSchema,
|
17
|
+
});
|
18
|
+
exports.TagsSchema = zod_1.z.array(exports.TagSchema);
|
19
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/datasource/forgejo-tags/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,uDAAyD;AAE5C,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,OAAC,CAAC,KAAK,CAAC,oBAAY,CAAC,CAAC;AAEnD,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,OAAO,EAAE,0BAAc;CACxB,CAAC,CAAC;AAEU,QAAA,SAAS,GAAG,OAAC,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,eAAe;CACxB,CAAC,CAAC;AACU,QAAA,UAAU,GAAG,OAAC,CAAC,KAAK,CAAC,iBAAS,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { MaybeTimestamp } from '../../../util/timestamp';\n\nexport const CommitSchema = z.object({\n sha: z.string(),\n});\n\nexport const CommitsSchema = z.array(CommitSchema);\n\nconst TagCommitSchema = z.object({\n sha: z.string(),\n created: MaybeTimestamp,\n});\n\nexport const TagSchema = z.object({\n name: z.string(),\n commit: TagCommitSchema,\n});\nexport const TagsSchema = z.array(TagSchema);\n"]}
|
@@ -41,7 +41,7 @@ exports.hashMap.set('fleet', '642e8e7ab739fba65bce7222b6f3e80fe44806c4190c8e93c5
|
|
41
41
|
exports.hashMap.set('flux', '3b87b351f98c11ca0e6cb275deb708dc9bf601a7e578f7a3a7e83fe6e15eb540');
|
42
42
|
exports.hashMap.set('fvm', 'aa154dd5ffe3caced30713a9a55967360b7a0f35edd2fc06bd6f3e73c5c87570');
|
43
43
|
exports.hashMap.set('git-submodules', 'd49d744fffb965dea648af37ea16591b4a0ecf32c4f103b04f4555b58d0f3573');
|
44
|
-
exports.hashMap.set('github-actions', '
|
44
|
+
exports.hashMap.set('github-actions', '902ce58637d6e84737822ee924cd63d0044a339dccfe2dc98f21f630ac6b5a5a');
|
45
45
|
exports.hashMap.set('gitlabci', '1bad97e9892ea652b6522154d521aa91b299c52e5618943f04e65f78031a13a9');
|
46
46
|
exports.hashMap.set('gitlabci-include', '5bc01de9b40ecc8888a37690152f4a2f9cacc509b9cb5902aac024ca7a7c8e65');
|
47
47
|
exports.hashMap.set('glasskube', 'fd415356a866ad174a5b70522d662e4289a2c5d5e34c55d57542b0d8968f1645');
|