@backstage/integration 1.11.0-next.0 → 1.12.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/ScmIntegrations.esm.js +4 -10
  3. package/dist/ScmIntegrations.esm.js.map +1 -1
  4. package/dist/awsCodeCommit/AwsCodeCommitIntegration.esm.js +13 -21
  5. package/dist/awsCodeCommit/AwsCodeCommitIntegration.esm.js.map +1 -1
  6. package/dist/awsCodeCommit/config.esm.js +1 -2
  7. package/dist/awsCodeCommit/config.esm.js.map +1 -1
  8. package/dist/awsS3/AwsS3Integration.esm.js +11 -19
  9. package/dist/awsS3/AwsS3Integration.esm.js.map +1 -1
  10. package/dist/awsS3/config.esm.js +2 -3
  11. package/dist/awsS3/config.esm.js.map +1 -1
  12. package/dist/azure/AzureIntegration.esm.js +12 -21
  13. package/dist/azure/AzureIntegration.esm.js.map +1 -1
  14. package/dist/azure/AzureUrl.esm.js +72 -76
  15. package/dist/azure/AzureUrl.esm.js.map +1 -1
  16. package/dist/azure/CachedAzureDevOpsCredentialsProvider.esm.js +2 -8
  17. package/dist/azure/CachedAzureDevOpsCredentialsProvider.esm.js.map +1 -1
  18. package/dist/azure/DefaultAzureDevOpsCredentialsProvider.esm.js +3 -6
  19. package/dist/azure/DefaultAzureDevOpsCredentialsProvider.esm.js.map +1 -1
  20. package/dist/azure/config.esm.js +12 -15
  21. package/dist/azure/config.esm.js.map +1 -1
  22. package/dist/azure/deprecated.esm.js +2 -3
  23. package/dist/azure/deprecated.esm.js.map +1 -1
  24. package/dist/bitbucket/BitbucketIntegration.esm.js +19 -27
  25. package/dist/bitbucket/BitbucketIntegration.esm.js.map +1 -1
  26. package/dist/bitbucket/config.esm.js +3 -4
  27. package/dist/bitbucket/config.esm.js.map +1 -1
  28. package/dist/bitbucketCloud/BitbucketCloudIntegration.esm.js +13 -21
  29. package/dist/bitbucketCloud/BitbucketCloudIntegration.esm.js.map +1 -1
  30. package/dist/bitbucketCloud/config.esm.js +1 -2
  31. package/dist/bitbucketCloud/config.esm.js.map +1 -1
  32. package/dist/bitbucketServer/BitbucketServerIntegration.esm.js +13 -21
  33. package/dist/bitbucketServer/BitbucketServerIntegration.esm.js.map +1 -1
  34. package/dist/bitbucketServer/config.esm.js +1 -2
  35. package/dist/bitbucketServer/config.esm.js.map +1 -1
  36. package/dist/gerrit/GerritIntegration.esm.js +11 -19
  37. package/dist/gerrit/GerritIntegration.esm.js.map +1 -1
  38. package/dist/gerrit/config.esm.js +1 -2
  39. package/dist/gerrit/config.esm.js.map +1 -1
  40. package/dist/gitea/GiteaIntegration.esm.js +10 -18
  41. package/dist/gitea/GiteaIntegration.esm.js.map +1 -1
  42. package/dist/gitea/config.esm.js +1 -2
  43. package/dist/gitea/config.esm.js.map +1 -1
  44. package/dist/gitea/core.esm.js +1 -2
  45. package/dist/gitea/core.esm.js.map +1 -1
  46. package/dist/github/GithubIntegration.esm.js +11 -19
  47. package/dist/github/GithubIntegration.esm.js.map +1 -1
  48. package/dist/github/SingleInstanceGithubCredentialsProvider.esm.js +22 -40
  49. package/dist/github/SingleInstanceGithubCredentialsProvider.esm.js.map +1 -1
  50. package/dist/github/config.esm.js +3 -4
  51. package/dist/github/config.esm.js.map +1 -1
  52. package/dist/github/deprecated.esm.js +1 -7
  53. package/dist/github/deprecated.esm.js.map +1 -1
  54. package/dist/gitlab/GitLabIntegration.esm.js +11 -19
  55. package/dist/gitlab/GitLabIntegration.esm.js.map +1 -1
  56. package/dist/gitlab/SingleInstanceGitlabCredentialsProvider.esm.js +5 -12
  57. package/dist/gitlab/SingleInstanceGitlabCredentialsProvider.esm.js.map +1 -1
  58. package/dist/gitlab/config.esm.js +1 -2
  59. package/dist/gitlab/config.esm.js.map +1 -1
  60. package/dist/harness/HarnessIntegration.esm.js +10 -18
  61. package/dist/harness/HarnessIntegration.esm.js.map +1 -1
  62. package/dist/harness/core.esm.js +48 -46
  63. package/dist/harness/core.esm.js.map +1 -1
  64. package/dist/index.cjs.js +323 -471
  65. package/dist/index.cjs.js.map +1 -1
  66. package/dist/index.d.ts +50 -2
  67. package/dist/index.esm.js +1 -1
  68. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -1696,7 +1696,7 @@ declare function readGoogleGcsIntegrationConfig(config: Config): GoogleGcsIntegr
1696
1696
 
1697
1697
  /**
1698
1698
  * Given a file path URL,
1699
- * it returns an API URL which returns the contents of the file.
1699
+ * it returns an API URL which returns the contents of the file .
1700
1700
  * @remarks
1701
1701
  *
1702
1702
  * Converts
@@ -1708,6 +1708,36 @@ declare function readGoogleGcsIntegrationConfig(config: Config): GoogleGcsIntegr
1708
1708
  * @public
1709
1709
  */
1710
1710
  declare function getHarnessFileContentsUrl(config: HarnessIntegrationConfig, url: string): string;
1711
+ /**
1712
+ * Given a URL pointing to a repository/path, returns a URL
1713
+ * for archive contents of the repository.
1714
+ *
1715
+ * @remarks
1716
+ *
1717
+ * Converts
1718
+ * from: https://qa.harness.io/ng/account/accountId/module/code/orgs/orgId/projects/projectName/repos/repoName/files/branch/~/fileName
1719
+ * to: https://qa.harness.io/gateway/code/api/v1/repos/accountId/orgId/projectName/repoName/+/archive/branch.zip?routingId=accountId
1720
+ *
1721
+ * @param url - A URL pointing to a repository/path
1722
+ * @param config - The relevant provider config
1723
+ * @public
1724
+ */
1725
+ declare function getHarnessArchiveUrl(config: HarnessIntegrationConfig, url: string): string;
1726
+ /**
1727
+ * Given a URL pointing to a repository branch, returns a URL
1728
+ * for latest commit information.
1729
+ *
1730
+ * @remarks
1731
+ *
1732
+ * Converts
1733
+ * from: https://app.harness.io/ng/account/accountId/module/code/orgs/orgName/projects/projectName/repos/repoName/files/branchName
1734
+ * to: https://app.harness.io/gateway/code/api/v1/repos/accountId/orgName/projectName/repoName/+/content?routingId=accountId&include_commit=true&git_ref=refs/heads/branchName
1735
+ *
1736
+ * @param url - A URL pointing to a repository branch
1737
+ * @param config - The relevant provider config
1738
+ * @public
1739
+ */
1740
+ declare function getHarnessLatestCommitUrl(config: HarnessIntegrationConfig, url: string): string;
1711
1741
  /**
1712
1742
  * Return request headers for a Harness Code provider.
1713
1743
  *
@@ -1717,6 +1747,24 @@ declare function getHarnessFileContentsUrl(config: HarnessIntegrationConfig, url
1717
1747
  declare function getHarnessRequestOptions(config: HarnessIntegrationConfig): {
1718
1748
  headers?: Record<string, string>;
1719
1749
  };
1750
+ /**
1751
+ * Return parsed git url properties.
1752
+ *
1753
+ * @param config - A Harness provider config
1754
+ * @param url - A URL pointing to a repository
1755
+ * @public
1756
+ */
1757
+ declare function parseHarnessUrl(config: HarnessIntegrationConfig, url: string): {
1758
+ baseUrl: string;
1759
+ accountId: string;
1760
+ orgName: string;
1761
+ projectName: string;
1762
+ refString: string;
1763
+ repoName: string;
1764
+ path: string;
1765
+ refDashStr: string;
1766
+ branch: string;
1767
+ };
1720
1768
 
1721
1769
  /**
1722
1770
  * Default implementation of {@link ScmIntegration} `resolveUrl`, that only
@@ -1785,4 +1833,4 @@ declare class ScmIntegrations implements ScmIntegrationRegistry {
1785
1833
  resolveEditUrl(url: string): string;
1786
1834
  }
1787
1835
 
1788
- export { AwsCodeCommitIntegration, type AwsCodeCommitIntegrationConfig, AwsS3Integration, type AwsS3IntegrationConfig, type AzureClientSecretCredential, type AzureCredentialBase, type AzureDevOpsCredential, type AzureDevOpsCredentialKind, type AzureDevOpsCredentialLike, type AzureDevOpsCredentialType, type AzureDevOpsCredentials, type AzureDevOpsCredentialsProvider, AzureIntegration, type AzureIntegrationConfig, type AzureManagedIdentityCredential, BitbucketCloudIntegration, type BitbucketCloudIntegrationConfig, BitbucketIntegration, type BitbucketIntegrationConfig, BitbucketServerIntegration, type BitbucketServerIntegrationConfig, DefaultAzureDevOpsCredentialsProvider, DefaultGithubCredentialsProvider, DefaultGitlabCredentialsProvider, GerritIntegration, type GerritIntegrationConfig, GitHubIntegration, type GitHubIntegrationConfig, GitLabIntegration, type GitLabIntegrationConfig, GiteaIntegration, type GiteaIntegrationConfig, type GithubAppConfig, GithubAppCredentialsMux, type GithubCredentialType, type GithubCredentials, type GithubCredentialsProvider, GithubIntegration, type GithubIntegrationConfig, type GitlabCredentials, type GitlabCredentialsProvider, type GoogleGcsIntegrationConfig, HarnessIntegration, type HarnessIntegrationConfig, type IntegrationsByType, type PersonalAccessTokenCredential, type RateLimitInfo, type ScmIntegration, type ScmIntegrationRegistry, ScmIntegrations, type ScmIntegrationsFactory, type 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, getHarnessFileContentsUrl, getHarnessRequestOptions, parseGerritGitilesUrl, parseGerritJsonResponse, parseGiteaUrl, readAwsCodeCommitIntegrationConfig, readAwsCodeCommitIntegrationConfigs, readAwsS3IntegrationConfig, readAwsS3IntegrationConfigs, readAzureIntegrationConfig, readAzureIntegrationConfigs, readBitbucketCloudIntegrationConfig, readBitbucketCloudIntegrationConfigs, readBitbucketIntegrationConfig, readBitbucketIntegrationConfigs, readBitbucketServerIntegrationConfig, readBitbucketServerIntegrationConfigs, readGerritIntegrationConfig, readGerritIntegrationConfigs, readGitHubIntegrationConfig, readGitHubIntegrationConfigs, readGitLabIntegrationConfig, readGitLabIntegrationConfigs, readGiteaConfig, readGithubIntegrationConfig, readGithubIntegrationConfigs, readGoogleGcsIntegrationConfig, readHarnessConfig, replaceGitHubUrlType, replaceGitLabUrlType, replaceGithubUrlType };
1836
+ export { AwsCodeCommitIntegration, type AwsCodeCommitIntegrationConfig, AwsS3Integration, type AwsS3IntegrationConfig, type AzureClientSecretCredential, type AzureCredentialBase, type AzureDevOpsCredential, type AzureDevOpsCredentialKind, type AzureDevOpsCredentialLike, type AzureDevOpsCredentialType, type AzureDevOpsCredentials, type AzureDevOpsCredentialsProvider, AzureIntegration, type AzureIntegrationConfig, type AzureManagedIdentityCredential, BitbucketCloudIntegration, type BitbucketCloudIntegrationConfig, BitbucketIntegration, type BitbucketIntegrationConfig, BitbucketServerIntegration, type BitbucketServerIntegrationConfig, DefaultAzureDevOpsCredentialsProvider, DefaultGithubCredentialsProvider, DefaultGitlabCredentialsProvider, GerritIntegration, type GerritIntegrationConfig, GitHubIntegration, type GitHubIntegrationConfig, GitLabIntegration, type GitLabIntegrationConfig, GiteaIntegration, type GiteaIntegrationConfig, type GithubAppConfig, GithubAppCredentialsMux, type GithubCredentialType, type GithubCredentials, type GithubCredentialsProvider, GithubIntegration, type GithubIntegrationConfig, type GitlabCredentials, type GitlabCredentialsProvider, type GoogleGcsIntegrationConfig, HarnessIntegration, type HarnessIntegrationConfig, type IntegrationsByType, type PersonalAccessTokenCredential, type RateLimitInfo, type ScmIntegration, type ScmIntegrationRegistry, ScmIntegrations, type ScmIntegrationsFactory, type 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, getHarnessArchiveUrl, getHarnessFileContentsUrl, getHarnessLatestCommitUrl, getHarnessRequestOptions, parseGerritGitilesUrl, parseGerritJsonResponse, parseGiteaUrl, parseHarnessUrl, readAwsCodeCommitIntegrationConfig, readAwsCodeCommitIntegrationConfigs, readAwsS3IntegrationConfig, readAwsS3IntegrationConfigs, readAzureIntegrationConfig, readAzureIntegrationConfigs, readBitbucketCloudIntegrationConfig, readBitbucketCloudIntegrationConfigs, readBitbucketIntegrationConfig, readBitbucketIntegrationConfigs, readBitbucketServerIntegrationConfig, readBitbucketServerIntegrationConfigs, readGerritIntegrationConfig, readGerritIntegrationConfigs, readGitHubIntegrationConfig, readGitHubIntegrationConfigs, readGitLabIntegrationConfig, readGitLabIntegrationConfigs, readGiteaConfig, readGithubIntegrationConfig, readGithubIntegrationConfigs, readGoogleGcsIntegrationConfig, readHarnessConfig, replaceGitHubUrlType, replaceGitLabUrlType, replaceGithubUrlType };
package/dist/index.esm.js CHANGED
@@ -34,7 +34,7 @@ export { GitLabIntegration, replaceGitLabUrlType } from './gitlab/GitLabIntegrat
34
34
  export { DefaultGitlabCredentialsProvider } from './gitlab/DefaultGitlabCredentialsProvider.esm.js';
35
35
  export { readGoogleGcsIntegrationConfig } from './googleGcs/config.esm.js';
36
36
  export { HarnessIntegration } from './harness/HarnessIntegration.esm.js';
37
- export { getHarnessFileContentsUrl, getHarnessRequestOptions } from './harness/core.esm.js';
37
+ export { getHarnessArchiveUrl, getHarnessFileContentsUrl, getHarnessLatestCommitUrl, getHarnessRequestOptions, parseHarnessUrl } from './harness/core.esm.js';
38
38
  export { readHarnessConfig } from './harness/config.esm.js';
39
39
  export { defaultScmResolveUrl } from './helpers.esm.js';
40
40
  export { ScmIntegrations } from './ScmIntegrations.esm.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/integration",
3
- "version": "1.11.0-next.0",
3
+ "version": "1.12.0-next.0",
4
4
  "description": "Helpers for managing integrations towards external systems",
5
5
  "backstage": {
6
6
  "role": "common-library"
@@ -48,7 +48,7 @@
48
48
  "luxon": "^3.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@backstage/cli": "^0.26.5-next.1",
51
+ "@backstage/cli": "^0.26.7-next.2",
52
52
  "@backstage/config-loader": "^1.8.0",
53
53
  "@types/luxon": "^3.0.0",
54
54
  "msw": "^1.0.0"