@backstage/integration 1.8.0-next.1 → 1.9.0-next.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/CHANGELOG.md +24 -0
- package/dist/index.cjs.js +5 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.esm.js +5 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Config } from '@backstage/config';
|
|
2
|
+
import { ConsumedResponse } from '@backstage/errors';
|
|
2
3
|
import { RestEndpointMethodTypes } from '@octokit/rest';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -86,6 +87,14 @@ interface ScmIntegrationsGroup<T extends ScmIntegration> {
|
|
|
86
87
|
type ScmIntegrationsFactory<T extends ScmIntegration> = (options: {
|
|
87
88
|
config: Config;
|
|
88
89
|
}) => ScmIntegrationsGroup<T>;
|
|
90
|
+
/**
|
|
91
|
+
* Encapsulates information about the RateLimit state
|
|
92
|
+
*
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
interface RateLimitInfo {
|
|
96
|
+
isRateLimited: boolean;
|
|
97
|
+
}
|
|
89
98
|
|
|
90
99
|
/**
|
|
91
100
|
* The configuration parameters for a single AWS S3 provider.
|
|
@@ -771,6 +780,7 @@ declare class GithubIntegration implements ScmIntegration {
|
|
|
771
780
|
lineNumber?: number;
|
|
772
781
|
}): string;
|
|
773
782
|
resolveEditUrl(url: string): string;
|
|
783
|
+
parseRateLimitInfo(response: ConsumedResponse): RateLimitInfo;
|
|
774
784
|
}
|
|
775
785
|
/**
|
|
776
786
|
* Takes a GitHub URL and replaces the type part (blob, tree etc).
|
|
@@ -1637,4 +1647,4 @@ declare class ScmIntegrations implements ScmIntegrationRegistry {
|
|
|
1637
1647
|
resolveEditUrl(url: string): string;
|
|
1638
1648
|
}
|
|
1639
1649
|
|
|
1640
|
-
export { AwsS3Integration, AwsS3IntegrationConfig, AzureClientSecretCredential, AzureCredentialBase, AzureDevOpsCredential, AzureDevOpsCredentialKind, AzureDevOpsCredentialLike, AzureDevOpsCredentialType, AzureDevOpsCredentials, AzureDevOpsCredentialsProvider, AzureIntegration, AzureIntegrationConfig, AzureManagedIdentityCredential, BitbucketCloudIntegration, BitbucketCloudIntegrationConfig, BitbucketIntegration, BitbucketIntegrationConfig, BitbucketServerIntegration, BitbucketServerIntegrationConfig, DefaultAzureDevOpsCredentialsProvider, DefaultGithubCredentialsProvider, DefaultGitlabCredentialsProvider, GerritIntegration, GerritIntegrationConfig, GitHubIntegration, GitHubIntegrationConfig, GitLabIntegration, GitLabIntegrationConfig, GiteaIntegration, GiteaIntegrationConfig, GithubAppConfig, GithubAppCredentialsMux, GithubCredentialType, GithubCredentials, GithubCredentialsProvider, GithubIntegration, GithubIntegrationConfig, GitlabCredentials, GitlabCredentialsProvider, GoogleGcsIntegrationConfig, IntegrationsByType, PersonalAccessTokenCredential, ScmIntegration, ScmIntegrationRegistry, ScmIntegrations, ScmIntegrationsFactory, ScmIntegrationsGroup, SingleInstanceGithubCredentialsProvider, buildGerritGitilesArchiveUrl, defaultScmResolveUrl, getAzureCommitsUrl, getAzureDownloadUrl, getAzureFileFetchUrl, getAzureRequestOptions, getBitbucketCloudDefaultBranch, getBitbucketCloudDownloadUrl, getBitbucketCloudFileFetchUrl, getBitbucketCloudRequestOptions, getBitbucketDefaultBranch, getBitbucketDownloadUrl, getBitbucketFileFetchUrl, getBitbucketRequestOptions, getBitbucketServerDefaultBranch, getBitbucketServerDownloadUrl, getBitbucketServerFileFetchUrl, getBitbucketServerRequestOptions, getGerritBranchApiUrl, getGerritCloneRepoUrl, getGerritFileContentsApiUrl, getGerritProjectsApiUrl, getGerritRequestOptions, getGitHubFileFetchUrl, getGitHubRequestOptions, getGitLabFileFetchUrl, getGitLabIntegrationRelativePath, getGitLabRequestOptions, getGiteaArchiveUrl, getGiteaEditContentsUrl, getGiteaFileContentsUrl, getGiteaLatestCommitUrl, getGiteaRequestOptions, getGithubFileFetchUrl, parseGerritGitilesUrl, parseGerritJsonResponse, parseGiteaUrl, readAwsS3IntegrationConfig, readAwsS3IntegrationConfigs, readAzureIntegrationConfig, readAzureIntegrationConfigs, readBitbucketCloudIntegrationConfig, readBitbucketCloudIntegrationConfigs, readBitbucketIntegrationConfig, readBitbucketIntegrationConfigs, readBitbucketServerIntegrationConfig, readBitbucketServerIntegrationConfigs, readGerritIntegrationConfig, readGerritIntegrationConfigs, readGitHubIntegrationConfig, readGitHubIntegrationConfigs, readGitLabIntegrationConfig, readGitLabIntegrationConfigs, readGiteaConfig, readGithubIntegrationConfig, readGithubIntegrationConfigs, readGoogleGcsIntegrationConfig, replaceGitHubUrlType, replaceGitLabUrlType, replaceGithubUrlType };
|
|
1650
|
+
export { AwsS3Integration, AwsS3IntegrationConfig, AzureClientSecretCredential, AzureCredentialBase, AzureDevOpsCredential, AzureDevOpsCredentialKind, AzureDevOpsCredentialLike, AzureDevOpsCredentialType, AzureDevOpsCredentials, AzureDevOpsCredentialsProvider, AzureIntegration, AzureIntegrationConfig, AzureManagedIdentityCredential, BitbucketCloudIntegration, BitbucketCloudIntegrationConfig, BitbucketIntegration, BitbucketIntegrationConfig, BitbucketServerIntegration, BitbucketServerIntegrationConfig, DefaultAzureDevOpsCredentialsProvider, DefaultGithubCredentialsProvider, DefaultGitlabCredentialsProvider, GerritIntegration, GerritIntegrationConfig, GitHubIntegration, GitHubIntegrationConfig, GitLabIntegration, GitLabIntegrationConfig, GiteaIntegration, GiteaIntegrationConfig, GithubAppConfig, GithubAppCredentialsMux, GithubCredentialType, GithubCredentials, GithubCredentialsProvider, GithubIntegration, GithubIntegrationConfig, GitlabCredentials, GitlabCredentialsProvider, GoogleGcsIntegrationConfig, IntegrationsByType, PersonalAccessTokenCredential, RateLimitInfo, ScmIntegration, ScmIntegrationRegistry, ScmIntegrations, ScmIntegrationsFactory, ScmIntegrationsGroup, SingleInstanceGithubCredentialsProvider, buildGerritGitilesArchiveUrl, defaultScmResolveUrl, getAzureCommitsUrl, getAzureDownloadUrl, getAzureFileFetchUrl, getAzureRequestOptions, getBitbucketCloudDefaultBranch, getBitbucketCloudDownloadUrl, getBitbucketCloudFileFetchUrl, getBitbucketCloudRequestOptions, getBitbucketDefaultBranch, getBitbucketDownloadUrl, getBitbucketFileFetchUrl, getBitbucketRequestOptions, getBitbucketServerDefaultBranch, getBitbucketServerDownloadUrl, getBitbucketServerFileFetchUrl, getBitbucketServerRequestOptions, getGerritBranchApiUrl, getGerritCloneRepoUrl, getGerritFileContentsApiUrl, getGerritProjectsApiUrl, getGerritRequestOptions, getGitHubFileFetchUrl, getGitHubRequestOptions, getGitLabFileFetchUrl, getGitLabIntegrationRelativePath, getGitLabRequestOptions, getGiteaArchiveUrl, getGiteaEditContentsUrl, getGiteaFileContentsUrl, getGiteaLatestCommitUrl, getGiteaRequestOptions, getGithubFileFetchUrl, parseGerritGitilesUrl, parseGerritJsonResponse, parseGiteaUrl, readAwsS3IntegrationConfig, readAwsS3IntegrationConfigs, readAzureIntegrationConfig, readAzureIntegrationConfigs, readBitbucketCloudIntegrationConfig, readBitbucketCloudIntegrationConfigs, readBitbucketIntegrationConfig, readBitbucketIntegrationConfigs, readBitbucketServerIntegrationConfig, readBitbucketServerIntegrationConfigs, readGerritIntegrationConfig, readGerritIntegrationConfigs, readGitHubIntegrationConfig, readGitHubIntegrationConfigs, readGitLabIntegrationConfig, readGitLabIntegrationConfigs, readGiteaConfig, readGithubIntegrationConfig, readGithubIntegrationConfigs, readGoogleGcsIntegrationConfig, replaceGitHubUrlType, replaceGitLabUrlType, replaceGithubUrlType };
|
package/dist/index.esm.js
CHANGED
|
@@ -1869,6 +1869,11 @@ const _GithubIntegration = class _GithubIntegration {
|
|
|
1869
1869
|
resolveEditUrl(url) {
|
|
1870
1870
|
return replaceGithubUrlType(url, "edit");
|
|
1871
1871
|
}
|
|
1872
|
+
parseRateLimitInfo(response) {
|
|
1873
|
+
return {
|
|
1874
|
+
isRateLimited: response.status === 429 || response.status === 403 && response.headers.get("x-ratelimit-remaining") === "0"
|
|
1875
|
+
};
|
|
1876
|
+
}
|
|
1872
1877
|
};
|
|
1873
1878
|
__publicField$4(_GithubIntegration, "factory", ({ config }) => {
|
|
1874
1879
|
var _a;
|