@backstage/integration 1.10.0-next.0 → 1.11.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 (94) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/config.d.ts +18 -0
  3. package/dist/ScmIntegrations.esm.js +114 -0
  4. package/dist/ScmIntegrations.esm.js.map +1 -0
  5. package/dist/awsCodeCommit/AwsCodeCommitIntegration.esm.js +63 -0
  6. package/dist/awsCodeCommit/AwsCodeCommitIntegration.esm.js.map +1 -0
  7. package/dist/awsCodeCommit/config.esm.js +28 -0
  8. package/dist/awsCodeCommit/config.esm.js.map +1 -0
  9. package/dist/awsS3/AwsS3Integration.esm.js +44 -0
  10. package/dist/awsS3/AwsS3Integration.esm.js.map +1 -0
  11. package/dist/awsS3/config.esm.js +51 -0
  12. package/dist/awsS3/config.esm.js.map +1 -0
  13. package/dist/azure/AzureIntegration.esm.js +69 -0
  14. package/dist/azure/AzureIntegration.esm.js.map +1 -0
  15. package/dist/azure/AzureUrl.esm.js +191 -0
  16. package/dist/azure/AzureUrl.esm.js.map +1 -0
  17. package/dist/azure/CachedAzureDevOpsCredentialsProvider.esm.js +80 -0
  18. package/dist/azure/CachedAzureDevOpsCredentialsProvider.esm.js.map +1 -0
  19. package/dist/azure/DefaultAzureDevOpsCredentialsProvider.esm.js +76 -0
  20. package/dist/azure/DefaultAzureDevOpsCredentialsProvider.esm.js.map +1 -0
  21. package/dist/azure/config.esm.js +153 -0
  22. package/dist/azure/config.esm.js.map +1 -0
  23. package/dist/azure/core.esm.js +14 -0
  24. package/dist/azure/core.esm.js.map +1 -0
  25. package/dist/azure/deprecated.esm.js +25 -0
  26. package/dist/azure/deprecated.esm.js.map +1 -0
  27. package/dist/bitbucket/BitbucketIntegration.esm.js +67 -0
  28. package/dist/bitbucket/BitbucketIntegration.esm.js.map +1 -0
  29. package/dist/bitbucket/config.esm.js +45 -0
  30. package/dist/bitbucket/config.esm.js.map +1 -0
  31. package/dist/bitbucket/core.esm.js +85 -0
  32. package/dist/bitbucket/core.esm.js.map +1 -0
  33. package/dist/bitbucketCloud/BitbucketCloudIntegration.esm.js +56 -0
  34. package/dist/bitbucketCloud/BitbucketCloudIntegration.esm.js.map +1 -0
  35. package/dist/bitbucketCloud/config.esm.js +28 -0
  36. package/dist/bitbucketCloud/config.esm.js.map +1 -0
  37. package/dist/bitbucketCloud/core.esm.js +68 -0
  38. package/dist/bitbucketCloud/core.esm.js.map +1 -0
  39. package/dist/bitbucketServer/BitbucketServerIntegration.esm.js +54 -0
  40. package/dist/bitbucketServer/BitbucketServerIntegration.esm.js.map +1 -0
  41. package/dist/bitbucketServer/config.esm.js +34 -0
  42. package/dist/bitbucketServer/config.esm.js.map +1 -0
  43. package/dist/bitbucketServer/core.esm.js +63 -0
  44. package/dist/bitbucketServer/core.esm.js.map +1 -0
  45. package/dist/gerrit/GerritIntegration.esm.js +58 -0
  46. package/dist/gerrit/GerritIntegration.esm.js.map +1 -0
  47. package/dist/gerrit/config.esm.js +58 -0
  48. package/dist/gerrit/config.esm.js.map +1 -0
  49. package/dist/gerrit/core.esm.js +106 -0
  50. package/dist/gerrit/core.esm.js.map +1 -0
  51. package/dist/gitea/GiteaIntegration.esm.js +40 -0
  52. package/dist/gitea/GiteaIntegration.esm.js.map +1 -0
  53. package/dist/gitea/config.esm.js +33 -0
  54. package/dist/gitea/config.esm.js.map +1 -0
  55. package/dist/gitea/core.esm.js +53 -0
  56. package/dist/gitea/core.esm.js.map +1 -0
  57. package/dist/github/DefaultGithubCredentialsProvider.esm.js +52 -0
  58. package/dist/github/DefaultGithubCredentialsProvider.esm.js.map +1 -0
  59. package/dist/github/GithubIntegration.esm.js +56 -0
  60. package/dist/github/GithubIntegration.esm.js.map +1 -0
  61. package/dist/github/SingleInstanceGithubCredentialsProvider.esm.js +222 -0
  62. package/dist/github/SingleInstanceGithubCredentialsProvider.esm.js.map +1 -0
  63. package/dist/github/config.esm.js +53 -0
  64. package/dist/github/config.esm.js.map +1 -0
  65. package/dist/github/core.esm.js +38 -0
  66. package/dist/github/core.esm.js.map +1 -0
  67. package/dist/github/deprecated.esm.js +26 -0
  68. package/dist/github/deprecated.esm.js.map +1 -0
  69. package/dist/gitlab/DefaultGitlabCredentialsProvider.esm.js +28 -0
  70. package/dist/gitlab/DefaultGitlabCredentialsProvider.esm.js.map +1 -0
  71. package/dist/gitlab/GitLabIntegration.esm.js +46 -0
  72. package/dist/gitlab/GitLabIntegration.esm.js.map +1 -0
  73. package/dist/gitlab/SingleInstanceGitlabCredentialsProvider.esm.js +29 -0
  74. package/dist/gitlab/SingleInstanceGitlabCredentialsProvider.esm.js.map +1 -0
  75. package/dist/gitlab/config.esm.js +57 -0
  76. package/dist/gitlab/config.esm.js.map +1 -0
  77. package/dist/gitlab/core.esm.js +69 -0
  78. package/dist/gitlab/core.esm.js.map +1 -0
  79. package/dist/googleGcs/config.esm.js +14 -0
  80. package/dist/googleGcs/config.esm.js.map +1 -0
  81. package/dist/harness/HarnessIntegration.esm.js +40 -0
  82. package/dist/harness/HarnessIntegration.esm.js.map +1 -0
  83. package/dist/harness/config.esm.js +20 -0
  84. package/dist/harness/config.esm.js.map +1 -0
  85. package/dist/harness/core.esm.js +73 -0
  86. package/dist/harness/core.esm.js.map +1 -0
  87. package/dist/helpers.esm.js +62 -0
  88. package/dist/helpers.esm.js.map +1 -0
  89. package/dist/index.cjs.js +214 -85
  90. package/dist/index.cjs.js.map +1 -1
  91. package/dist/index.d.ts +73 -1
  92. package/dist/index.esm.js +40 -2323
  93. package/dist/index.esm.js.map +1 -1
  94. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -990,6 +990,51 @@ declare class GiteaIntegration implements ScmIntegration {
990
990
  resolveEditUrl(url: string): string;
991
991
  }
992
992
 
993
+ /**
994
+ * The configuration for a single Harness integration.
995
+ *
996
+ * @public
997
+ */
998
+ type HarnessIntegrationConfig = {
999
+ /**
1000
+ * The host of the target that this matches on, e.g. "app.harness.io"
1001
+ */
1002
+ host: string;
1003
+ /**
1004
+ * The password or http token to use for authentication.
1005
+ */
1006
+ token?: string;
1007
+ /**
1008
+ * The API key to use for authentication.
1009
+ */
1010
+ apiKey?: string;
1011
+ };
1012
+ /**
1013
+ * Parses a location config block for use in HarnessIntegration
1014
+ *
1015
+ * @public
1016
+ */
1017
+ declare function readHarnessConfig(config: Config): HarnessIntegrationConfig;
1018
+
1019
+ /**
1020
+ * A Harness Code based integration.
1021
+ *
1022
+ * @public
1023
+ */
1024
+ declare class HarnessIntegration implements ScmIntegration {
1025
+ readonly config: HarnessIntegrationConfig;
1026
+ static factory: ScmIntegrationsFactory<HarnessIntegration>;
1027
+ constructor(config: HarnessIntegrationConfig);
1028
+ get type(): string;
1029
+ get title(): string;
1030
+ resolveUrl(options: {
1031
+ url: string;
1032
+ base: string;
1033
+ lineNumber?: number | undefined;
1034
+ }): string;
1035
+ resolveEditUrl(url: string): string;
1036
+ }
1037
+
993
1038
  /**
994
1039
  * Holds all registered SCM integrations, of all types.
995
1040
  *
@@ -1009,6 +1054,7 @@ interface ScmIntegrationRegistry extends ScmIntegrationsGroup<ScmIntegration> {
1009
1054
  github: ScmIntegrationsGroup<GithubIntegration>;
1010
1055
  gitlab: ScmIntegrationsGroup<GitLabIntegration>;
1011
1056
  gitea: ScmIntegrationsGroup<GiteaIntegration>;
1057
+ harness: ScmIntegrationsGroup<HarnessIntegration>;
1012
1058
  /**
1013
1059
  * Resolves an absolute or relative URL in relation to a base URL.
1014
1060
  *
@@ -1648,6 +1694,30 @@ type GoogleGcsIntegrationConfig = {
1648
1694
  */
1649
1695
  declare function readGoogleGcsIntegrationConfig(config: Config): GoogleGcsIntegrationConfig;
1650
1696
 
1697
+ /**
1698
+ * Given a file path URL,
1699
+ * it returns an API URL which returns the contents of the file.
1700
+ * @remarks
1701
+ *
1702
+ * Converts
1703
+ * from: https://app.harness.io/ng/account/accountId/module/code/orgs/orgName/projects/projName/repos/repoName/files/refMain/~/all-apis.yaml
1704
+ * to: https://app.harness.io/gateway/code/api/v1/repos/accountId/orgName/projName/repoName/+/content/all-apis.yaml?routingId=accountId&include_commit=false&ref=refMain
1705
+ *
1706
+ * @param url - A URL pointing to a file
1707
+ * @param config - The relevant provider config
1708
+ * @public
1709
+ */
1710
+ declare function getHarnessFileContentsUrl(config: HarnessIntegrationConfig, url: string): string;
1711
+ /**
1712
+ * Return request headers for a Harness Code provider.
1713
+ *
1714
+ * @param config - A Harness Code provider config
1715
+ * @public
1716
+ */
1717
+ declare function getHarnessRequestOptions(config: HarnessIntegrationConfig): {
1718
+ headers?: Record<string, string>;
1719
+ };
1720
+
1651
1721
  /**
1652
1722
  * Default implementation of {@link ScmIntegration} `resolveUrl`, that only
1653
1723
  * works with URL pathname based providers.
@@ -1679,6 +1749,7 @@ interface IntegrationsByType {
1679
1749
  github: ScmIntegrationsGroup<GithubIntegration>;
1680
1750
  gitlab: ScmIntegrationsGroup<GitLabIntegration>;
1681
1751
  gitea: ScmIntegrationsGroup<GiteaIntegration>;
1752
+ harness: ScmIntegrationsGroup<HarnessIntegration>;
1682
1753
  }
1683
1754
  /**
1684
1755
  * Exposes the set of supported integrations.
@@ -1702,6 +1773,7 @@ declare class ScmIntegrations implements ScmIntegrationRegistry {
1702
1773
  get github(): ScmIntegrationsGroup<GithubIntegration>;
1703
1774
  get gitlab(): ScmIntegrationsGroup<GitLabIntegration>;
1704
1775
  get gitea(): ScmIntegrationsGroup<GiteaIntegration>;
1776
+ get harness(): ScmIntegrationsGroup<HarnessIntegration>;
1705
1777
  list(): ScmIntegration[];
1706
1778
  byUrl(url: string | URL): ScmIntegration | undefined;
1707
1779
  byHost(host: string): ScmIntegration | undefined;
@@ -1713,4 +1785,4 @@ declare class ScmIntegrations implements ScmIntegrationRegistry {
1713
1785
  resolveEditUrl(url: string): string;
1714
1786
  }
1715
1787
 
1716
- 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, 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, 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, replaceGitHubUrlType, replaceGitLabUrlType, replaceGithubUrlType };
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 };