@backstage/integration 1.20.0 → 2.0.0-next.1

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 (52) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/config.d.ts +25 -60
  3. package/dist/ScmIntegrations.cjs.js +1 -17
  4. package/dist/ScmIntegrations.cjs.js.map +1 -1
  5. package/dist/ScmIntegrations.esm.js +1 -17
  6. package/dist/ScmIntegrations.esm.js.map +1 -1
  7. package/dist/azure/config.cjs.js +14 -35
  8. package/dist/azure/config.cjs.js.map +1 -1
  9. package/dist/azure/config.esm.js +14 -35
  10. package/dist/azure/config.esm.js.map +1 -1
  11. package/dist/gerrit/core.cjs.js +6 -33
  12. package/dist/gerrit/core.cjs.js.map +1 -1
  13. package/dist/gerrit/core.esm.js +7 -32
  14. package/dist/gerrit/core.esm.js.map +1 -1
  15. package/dist/github/core.cjs.js +0 -11
  16. package/dist/github/core.cjs.js.map +1 -1
  17. package/dist/github/core.esm.js +1 -11
  18. package/dist/github/core.esm.js.map +1 -1
  19. package/dist/gitlab/GitLabIntegration.cjs.js +69 -0
  20. package/dist/gitlab/GitLabIntegration.cjs.js.map +1 -1
  21. package/dist/gitlab/GitLabIntegration.esm.js +65 -1
  22. package/dist/gitlab/GitLabIntegration.esm.js.map +1 -1
  23. package/dist/gitlab/config.cjs.js +27 -1
  24. package/dist/gitlab/config.cjs.js.map +1 -1
  25. package/dist/gitlab/config.esm.js +27 -1
  26. package/dist/gitlab/config.esm.js.map +1 -1
  27. package/dist/gitlab/core.cjs.js +14 -42
  28. package/dist/gitlab/core.cjs.js.map +1 -1
  29. package/dist/gitlab/core.esm.js +14 -38
  30. package/dist/gitlab/core.esm.js.map +1 -1
  31. package/dist/index.cjs.js +61 -76
  32. package/dist/index.cjs.js.map +1 -1
  33. package/dist/index.d.ts +30 -225
  34. package/dist/index.esm.js +2 -6
  35. package/dist/index.esm.js.map +1 -1
  36. package/package.json +7 -6
  37. package/dist/azure/deprecated.cjs.js +0 -26
  38. package/dist/azure/deprecated.cjs.js.map +0 -1
  39. package/dist/azure/deprecated.esm.js +0 -24
  40. package/dist/azure/deprecated.esm.js.map +0 -1
  41. package/dist/bitbucket/BitbucketIntegration.cjs.js +0 -65
  42. package/dist/bitbucket/BitbucketIntegration.cjs.js.map +0 -1
  43. package/dist/bitbucket/BitbucketIntegration.esm.js +0 -59
  44. package/dist/bitbucket/BitbucketIntegration.esm.js.map +0 -1
  45. package/dist/bitbucket/config.cjs.js +0 -48
  46. package/dist/bitbucket/config.cjs.js.map +0 -1
  47. package/dist/bitbucket/config.esm.js +0 -45
  48. package/dist/bitbucket/config.esm.js.map +0 -1
  49. package/dist/bitbucket/core.cjs.js +0 -95
  50. package/dist/bitbucket/core.cjs.js.map +0 -1
  51. package/dist/bitbucket/core.esm.js +0 -85
  52. package/dist/bitbucket/core.esm.js.map +0 -1
package/dist/index.cjs.js CHANGED
@@ -11,36 +11,32 @@ var AzureIntegration = require('./azure/AzureIntegration.cjs.js');
11
11
  var config$3 = require('./azure/config.cjs.js');
12
12
  var core = require('./azure/core.cjs.js');
13
13
  var DefaultAzureDevOpsCredentialsProvider = require('./azure/DefaultAzureDevOpsCredentialsProvider.cjs.js');
14
- var deprecated = require('./azure/deprecated.cjs.js');
15
- var BitbucketIntegration = require('./bitbucket/BitbucketIntegration.cjs.js');
16
- var config$4 = require('./bitbucket/config.cjs.js');
17
- var core$1 = require('./bitbucket/core.cjs.js');
18
14
  var BitbucketCloudIntegration = require('./bitbucketCloud/BitbucketCloudIntegration.cjs.js');
19
- var config$5 = require('./bitbucketCloud/config.cjs.js');
20
- var core$2 = require('./bitbucketCloud/core.cjs.js');
15
+ var config$4 = require('./bitbucketCloud/config.cjs.js');
16
+ var core$1 = require('./bitbucketCloud/core.cjs.js');
21
17
  var BitbucketServerIntegration = require('./bitbucketServer/BitbucketServerIntegration.cjs.js');
22
- var config$6 = require('./bitbucketServer/config.cjs.js');
23
- var core$3 = require('./bitbucketServer/core.cjs.js');
18
+ var config$5 = require('./bitbucketServer/config.cjs.js');
19
+ var core$2 = require('./bitbucketServer/core.cjs.js');
24
20
  var GerritIntegration = require('./gerrit/GerritIntegration.cjs.js');
25
- var config$7 = require('./gerrit/config.cjs.js');
26
- var core$4 = require('./gerrit/core.cjs.js');
21
+ var config$6 = require('./gerrit/config.cjs.js');
22
+ var core$3 = require('./gerrit/core.cjs.js');
27
23
  var GiteaIntegration = require('./gitea/GiteaIntegration.cjs.js');
28
- var core$5 = require('./gitea/core.cjs.js');
29
- var config$8 = require('./gitea/config.cjs.js');
30
- var config$9 = require('./github/config.cjs.js');
31
- var core$6 = require('./github/core.cjs.js');
24
+ var core$4 = require('./gitea/core.cjs.js');
25
+ var config$7 = require('./gitea/config.cjs.js');
26
+ var config$8 = require('./github/config.cjs.js');
27
+ var core$5 = require('./github/core.cjs.js');
32
28
  var DefaultGithubCredentialsProvider = require('./github/DefaultGithubCredentialsProvider.cjs.js');
33
29
  var SingleInstanceGithubCredentialsProvider = require('./github/SingleInstanceGithubCredentialsProvider.cjs.js');
34
30
  var GithubIntegration = require('./github/GithubIntegration.cjs.js');
35
- var config$a = require('./gitlab/config.cjs.js');
36
- var core$7 = require('./gitlab/core.cjs.js');
31
+ var config$9 = require('./gitlab/config.cjs.js');
32
+ var core$6 = require('./gitlab/core.cjs.js');
37
33
  var GitLabIntegration = require('./gitlab/GitLabIntegration.cjs.js');
38
34
  var DefaultGitlabCredentialsProvider = require('./gitlab/DefaultGitlabCredentialsProvider.cjs.js');
39
- var config$b = require('./googleGcs/config.cjs.js');
35
+ var config$a = require('./googleGcs/config.cjs.js');
40
36
  var GoogleGcsIntegration = require('./googleGcs/GoogleGcsIntegration.cjs.js');
41
37
  var HarnessIntegration = require('./harness/HarnessIntegration.cjs.js');
42
- var core$8 = require('./harness/core.cjs.js');
43
- var config$c = require('./harness/config.cjs.js');
38
+ var core$7 = require('./harness/core.cjs.js');
39
+ var config$b = require('./harness/config.cjs.js');
44
40
  var helpers = require('./helpers.cjs.js');
45
41
  var ScmIntegrations = require('./ScmIntegrations.cjs.js');
46
42
 
@@ -63,77 +59,66 @@ exports.getAzureCommitsUrl = core.getAzureCommitsUrl;
63
59
  exports.getAzureDownloadUrl = core.getAzureDownloadUrl;
64
60
  exports.getAzureFileFetchUrl = core.getAzureFileFetchUrl;
65
61
  exports.DefaultAzureDevOpsCredentialsProvider = DefaultAzureDevOpsCredentialsProvider.DefaultAzureDevOpsCredentialsProvider;
66
- exports.getAzureRequestOptions = deprecated.getAzureRequestOptions;
67
- exports.BitbucketIntegration = BitbucketIntegration.BitbucketIntegration;
68
- exports.readBitbucketIntegrationConfig = config$4.readBitbucketIntegrationConfig;
69
- exports.readBitbucketIntegrationConfigs = config$4.readBitbucketIntegrationConfigs;
70
- exports.getBitbucketDefaultBranch = core$1.getBitbucketDefaultBranch;
71
- exports.getBitbucketDownloadUrl = core$1.getBitbucketDownloadUrl;
72
- exports.getBitbucketFileFetchUrl = core$1.getBitbucketFileFetchUrl;
73
- exports.getBitbucketRequestOptions = core$1.getBitbucketRequestOptions;
74
62
  exports.BitbucketCloudIntegration = BitbucketCloudIntegration.BitbucketCloudIntegration;
75
- exports.readBitbucketCloudIntegrationConfig = config$5.readBitbucketCloudIntegrationConfig;
76
- exports.readBitbucketCloudIntegrationConfigs = config$5.readBitbucketCloudIntegrationConfigs;
77
- exports.getBitbucketCloudDefaultBranch = core$2.getBitbucketCloudDefaultBranch;
78
- exports.getBitbucketCloudDownloadUrl = core$2.getBitbucketCloudDownloadUrl;
79
- exports.getBitbucketCloudFileFetchUrl = core$2.getBitbucketCloudFileFetchUrl;
80
- exports.getBitbucketCloudOAuthToken = core$2.getBitbucketCloudOAuthToken;
81
- exports.getBitbucketCloudRequestOptions = core$2.getBitbucketCloudRequestOptions;
63
+ exports.readBitbucketCloudIntegrationConfig = config$4.readBitbucketCloudIntegrationConfig;
64
+ exports.readBitbucketCloudIntegrationConfigs = config$4.readBitbucketCloudIntegrationConfigs;
65
+ exports.getBitbucketCloudDefaultBranch = core$1.getBitbucketCloudDefaultBranch;
66
+ exports.getBitbucketCloudDownloadUrl = core$1.getBitbucketCloudDownloadUrl;
67
+ exports.getBitbucketCloudFileFetchUrl = core$1.getBitbucketCloudFileFetchUrl;
68
+ exports.getBitbucketCloudOAuthToken = core$1.getBitbucketCloudOAuthToken;
69
+ exports.getBitbucketCloudRequestOptions = core$1.getBitbucketCloudRequestOptions;
82
70
  exports.BitbucketServerIntegration = BitbucketServerIntegration.BitbucketServerIntegration;
83
- exports.readBitbucketServerIntegrationConfig = config$6.readBitbucketServerIntegrationConfig;
84
- exports.readBitbucketServerIntegrationConfigs = config$6.readBitbucketServerIntegrationConfigs;
85
- exports.getBitbucketServerDefaultBranch = core$3.getBitbucketServerDefaultBranch;
86
- exports.getBitbucketServerDownloadUrl = core$3.getBitbucketServerDownloadUrl;
87
- exports.getBitbucketServerFileFetchUrl = core$3.getBitbucketServerFileFetchUrl;
88
- exports.getBitbucketServerRequestOptions = core$3.getBitbucketServerRequestOptions;
71
+ exports.readBitbucketServerIntegrationConfig = config$5.readBitbucketServerIntegrationConfig;
72
+ exports.readBitbucketServerIntegrationConfigs = config$5.readBitbucketServerIntegrationConfigs;
73
+ exports.getBitbucketServerDefaultBranch = core$2.getBitbucketServerDefaultBranch;
74
+ exports.getBitbucketServerDownloadUrl = core$2.getBitbucketServerDownloadUrl;
75
+ exports.getBitbucketServerFileFetchUrl = core$2.getBitbucketServerFileFetchUrl;
76
+ exports.getBitbucketServerRequestOptions = core$2.getBitbucketServerRequestOptions;
89
77
  exports.GerritIntegration = GerritIntegration.GerritIntegration;
90
- exports.readGerritIntegrationConfig = config$7.readGerritIntegrationConfig;
91
- exports.readGerritIntegrationConfigs = config$7.readGerritIntegrationConfigs;
92
- exports.buildGerritGitilesArchiveUrl = core$4.buildGerritGitilesArchiveUrl;
93
- exports.buildGerritGitilesArchiveUrlFromLocation = core$4.buildGerritGitilesArchiveUrlFromLocation;
94
- exports.getGerritBranchApiUrl = core$4.getGerritBranchApiUrl;
95
- exports.getGerritCloneRepoUrl = core$4.getGerritCloneRepoUrl;
96
- exports.getGerritFileContentsApiUrl = core$4.getGerritFileContentsApiUrl;
97
- exports.getGerritProjectsApiUrl = core$4.getGerritProjectsApiUrl;
98
- exports.getGerritRequestOptions = core$4.getGerritRequestOptions;
99
- exports.getGitilesAuthenticationUrl = core$4.getGitilesAuthenticationUrl;
100
- exports.parseGerritGitilesUrl = core$4.parseGerritGitilesUrl;
101
- exports.parseGerritJsonResponse = core$4.parseGerritJsonResponse;
102
- exports.parseGitilesUrlRef = core$4.parseGitilesUrlRef;
78
+ exports.readGerritIntegrationConfig = config$6.readGerritIntegrationConfig;
79
+ exports.readGerritIntegrationConfigs = config$6.readGerritIntegrationConfigs;
80
+ exports.buildGerritGitilesArchiveUrlFromLocation = core$3.buildGerritGitilesArchiveUrlFromLocation;
81
+ exports.getGerritBranchApiUrl = core$3.getGerritBranchApiUrl;
82
+ exports.getGerritCloneRepoUrl = core$3.getGerritCloneRepoUrl;
83
+ exports.getGerritFileContentsApiUrl = core$3.getGerritFileContentsApiUrl;
84
+ exports.getGerritProjectsApiUrl = core$3.getGerritProjectsApiUrl;
85
+ exports.getGerritRequestOptions = core$3.getGerritRequestOptions;
86
+ exports.getGitilesAuthenticationUrl = core$3.getGitilesAuthenticationUrl;
87
+ exports.parseGerritJsonResponse = core$3.parseGerritJsonResponse;
88
+ exports.parseGitilesUrlRef = core$3.parseGitilesUrlRef;
103
89
  exports.GiteaIntegration = GiteaIntegration.GiteaIntegration;
104
- exports.getGiteaArchiveUrl = core$5.getGiteaArchiveUrl;
105
- exports.getGiteaEditContentsUrl = core$5.getGiteaEditContentsUrl;
106
- exports.getGiteaFileContentsUrl = core$5.getGiteaFileContentsUrl;
107
- exports.getGiteaLatestCommitUrl = core$5.getGiteaLatestCommitUrl;
108
- exports.getGiteaRequestOptions = core$5.getGiteaRequestOptions;
109
- exports.parseGiteaUrl = core$5.parseGiteaUrl;
110
- exports.readGiteaConfig = config$8.readGiteaConfig;
111
- exports.readGithubIntegrationConfig = config$9.readGithubIntegrationConfig;
112
- exports.readGithubIntegrationConfigs = config$9.readGithubIntegrationConfigs;
113
- exports.getGitHubRequestOptions = core$6.getGitHubRequestOptions;
114
- exports.getGithubFileFetchUrl = core$6.getGithubFileFetchUrl;
90
+ exports.getGiteaArchiveUrl = core$4.getGiteaArchiveUrl;
91
+ exports.getGiteaEditContentsUrl = core$4.getGiteaEditContentsUrl;
92
+ exports.getGiteaFileContentsUrl = core$4.getGiteaFileContentsUrl;
93
+ exports.getGiteaLatestCommitUrl = core$4.getGiteaLatestCommitUrl;
94
+ exports.getGiteaRequestOptions = core$4.getGiteaRequestOptions;
95
+ exports.parseGiteaUrl = core$4.parseGiteaUrl;
96
+ exports.readGiteaConfig = config$7.readGiteaConfig;
97
+ exports.readGithubIntegrationConfig = config$8.readGithubIntegrationConfig;
98
+ exports.readGithubIntegrationConfigs = config$8.readGithubIntegrationConfigs;
99
+ exports.getGithubFileFetchUrl = core$5.getGithubFileFetchUrl;
115
100
  exports.DefaultGithubCredentialsProvider = DefaultGithubCredentialsProvider.DefaultGithubCredentialsProvider;
116
101
  exports.GithubAppCredentialsMux = SingleInstanceGithubCredentialsProvider.GithubAppCredentialsMux;
117
102
  exports.SingleInstanceGithubCredentialsProvider = SingleInstanceGithubCredentialsProvider.SingleInstanceGithubCredentialsProvider;
118
103
  exports.GithubIntegration = GithubIntegration.GithubIntegration;
119
104
  exports.replaceGithubUrlType = GithubIntegration.replaceGithubUrlType;
120
- exports.getGitLabIntegrationRelativePath = config$a.getGitLabIntegrationRelativePath;
121
- exports.readGitLabIntegrationConfig = config$a.readGitLabIntegrationConfig;
122
- exports.readGitLabIntegrationConfigs = config$a.readGitLabIntegrationConfigs;
123
- exports.getGitLabFileFetchUrl = core$7.getGitLabFileFetchUrl;
124
- exports.getGitLabRequestOptions = core$7.getGitLabRequestOptions;
105
+ exports.getGitLabIntegrationRelativePath = config$9.getGitLabIntegrationRelativePath;
106
+ exports.readGitLabIntegrationConfig = config$9.readGitLabIntegrationConfig;
107
+ exports.readGitLabIntegrationConfigs = config$9.readGitLabIntegrationConfigs;
108
+ exports.getGitLabFileFetchUrl = core$6.getGitLabFileFetchUrl;
109
+ exports.getGitLabRequestOptions = core$6.getGitLabRequestOptions;
125
110
  exports.GitLabIntegration = GitLabIntegration.GitLabIntegration;
126
111
  exports.replaceGitLabUrlType = GitLabIntegration.replaceGitLabUrlType;
127
112
  exports.DefaultGitlabCredentialsProvider = DefaultGitlabCredentialsProvider.DefaultGitlabCredentialsProvider;
128
- exports.readGoogleGcsIntegrationConfig = config$b.readGoogleGcsIntegrationConfig;
113
+ exports.readGoogleGcsIntegrationConfig = config$a.readGoogleGcsIntegrationConfig;
129
114
  exports.GoogleGcsIntegration = GoogleGcsIntegration.GoogleGcsIntegration;
130
115
  exports.HarnessIntegration = HarnessIntegration.HarnessIntegration;
131
- exports.getHarnessArchiveUrl = core$8.getHarnessArchiveUrl;
132
- exports.getHarnessFileContentsUrl = core$8.getHarnessFileContentsUrl;
133
- exports.getHarnessLatestCommitUrl = core$8.getHarnessLatestCommitUrl;
134
- exports.getHarnessRequestOptions = core$8.getHarnessRequestOptions;
135
- exports.parseHarnessUrl = core$8.parseHarnessUrl;
136
- exports.readHarnessConfig = config$c.readHarnessConfig;
116
+ exports.getHarnessArchiveUrl = core$7.getHarnessArchiveUrl;
117
+ exports.getHarnessFileContentsUrl = core$7.getHarnessFileContentsUrl;
118
+ exports.getHarnessLatestCommitUrl = core$7.getHarnessLatestCommitUrl;
119
+ exports.getHarnessRequestOptions = core$7.getHarnessRequestOptions;
120
+ exports.parseHarnessUrl = core$7.parseHarnessUrl;
121
+ exports.readHarnessConfig = config$b.readHarnessConfig;
137
122
  exports.defaultScmResolveUrl = helpers.defaultScmResolveUrl;
138
123
  exports.ScmIntegrations = ScmIntegrations.ScmIntegrations;
139
124
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -351,22 +351,6 @@ type AzureIntegrationConfig = {
351
351
  * Currently only "dev.azure.com" is supported.
352
352
  */
353
353
  host: string;
354
- /**
355
- * The authorization token to use for requests.
356
- *
357
- * If no token is specified, anonymous access is used.
358
- *
359
- * @deprecated Use `credentials` instead.
360
- */
361
- token?: string;
362
- /**
363
- * The credential to use for requests.
364
- *
365
- * If no credential is specified anonymous access is used.
366
- *
367
- * @deprecated Use `credentials` instead.
368
- */
369
- credential?: AzureDevOpsCredential;
370
354
  /**
371
355
  * The credentials to use for requests. If multiple credentials are specified the first one that matches the organization is used.
372
356
  * If not organization matches the first credential without an organization is used.
@@ -584,87 +568,6 @@ declare class BitbucketCloudIntegration implements ScmIntegration {
584
568
  resolveEditUrl(url: string): string;
585
569
  }
586
570
 
587
- /**
588
- * The configuration parameters for a single Bitbucket API provider.
589
- *
590
- * @public
591
- * @deprecated bitbucket integration replaced by integrations bitbucketCloud and bitbucketServer.
592
- */
593
- type BitbucketIntegrationConfig = {
594
- /**
595
- * The host of the target that this matches on, e.g. "bitbucket.org"
596
- */
597
- host: string;
598
- /**
599
- * The base URL of the API of this provider, e.g. "https://api.bitbucket.org/2.0",
600
- * with no trailing slash.
601
- *
602
- * Values omitted at the optional property at the app-config will be deduced
603
- * from the "host" value.
604
- */
605
- apiBaseUrl: string;
606
- /**
607
- * The authorization token to use for requests to a Bitbucket Server provider.
608
- *
609
- * See https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html
610
- *
611
- * If no token is specified, anonymous access is used.
612
- */
613
- token?: string;
614
- /**
615
- * The username to use for requests to Bitbucket Cloud (bitbucket.org).
616
- */
617
- username?: string;
618
- /**
619
- * Authentication with Bitbucket Cloud (bitbucket.org) is done using app passwords.
620
- *
621
- * See https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/
622
- */
623
- appPassword?: string;
624
- /**
625
- * Signing key for commits
626
- */
627
- commitSigningKey?: string;
628
- };
629
- /**
630
- * Reads a single Bitbucket integration config.
631
- *
632
- * @param config - The config object of a single integration
633
- * @public
634
- * @deprecated bitbucket integration replaced by integrations bitbucketCloud and bitbucketServer.
635
- */
636
- declare function readBitbucketIntegrationConfig(config: Config): BitbucketIntegrationConfig;
637
- /**
638
- * Reads a set of Bitbucket integration configs, and inserts some defaults for
639
- * public Bitbucket if not specified.
640
- *
641
- * @param configs - All of the integration config objects
642
- * @public
643
- * @deprecated bitbucket integration replaced by integrations bitbucketCloud and bitbucketServer.
644
- */
645
- declare function readBitbucketIntegrationConfigs(configs: Config[]): BitbucketIntegrationConfig[];
646
-
647
- /**
648
- * A Bitbucket based integration.
649
- *
650
- * @public
651
- * @deprecated replaced by the integrations bitbucketCloud and bitbucketServer.
652
- */
653
- declare class BitbucketIntegration implements ScmIntegration {
654
- private readonly integrationConfig;
655
- static factory: ScmIntegrationsFactory<BitbucketIntegration>;
656
- constructor(integrationConfig: BitbucketIntegrationConfig);
657
- get type(): string;
658
- get title(): string;
659
- get config(): BitbucketIntegrationConfig;
660
- resolveUrl(options: {
661
- url: string;
662
- base: string;
663
- lineNumber?: number;
664
- }): string;
665
- resolveEditUrl(url: string): string;
666
- }
667
-
668
571
  /**
669
572
  * The configuration parameters for a single Bitbucket Server API provider.
670
573
  *
@@ -996,6 +899,26 @@ type GitLabIntegrationConfig = {
996
899
  * Signing key to sign commits
997
900
  */
998
901
  commitSigningKey?: string;
902
+ /**
903
+ * Retry configuration for failed requests.
904
+ */
905
+ retry?: {
906
+ /**
907
+ * Maximum number of retries for failed requests
908
+ * @defaultValue 0
909
+ */
910
+ maxRetries?: number;
911
+ /**
912
+ * HTTP status codes that should trigger a retry
913
+ * @defaultValue []
914
+ */
915
+ retryStatusCodes?: number[];
916
+ /**
917
+ * Rate limit for requests per minute
918
+ * @defaultValue -1
919
+ */
920
+ maxApiRequestsPerMinute?: number;
921
+ };
999
922
  };
1000
923
  /**
1001
924
  * Reads a single GitLab integration config.
@@ -1029,6 +952,7 @@ declare function getGitLabIntegrationRelativePath(config: GitLabIntegrationConfi
1029
952
  declare class GitLabIntegration implements ScmIntegration {
1030
953
  private readonly integrationConfig;
1031
954
  static factory: ScmIntegrationsFactory<GitLabIntegration>;
955
+ private readonly fetchImpl;
1032
956
  constructor(integrationConfig: GitLabIntegrationConfig);
1033
957
  get type(): string;
1034
958
  get title(): string;
@@ -1039,6 +963,9 @@ declare class GitLabIntegration implements ScmIntegration {
1039
963
  lineNumber?: number;
1040
964
  }): string;
1041
965
  resolveEditUrl(url: string): string;
966
+ fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
967
+ private createFetchStrategy;
968
+ private withRetry;
1042
969
  }
1043
970
  /**
1044
971
  * Takes a GitLab URL and replaces the type part (blob, tree etc).
@@ -1161,10 +1088,6 @@ interface ScmIntegrationRegistry extends ScmIntegrationsGroup<ScmIntegration> {
1161
1088
  awsCodeCommit: ScmIntegrationsGroup<AwsCodeCommitIntegration>;
1162
1089
  azureBlobStorage: ScmIntegrationsGroup<AzureBlobStorageIntergation>;
1163
1090
  azure: ScmIntegrationsGroup<AzureIntegration>;
1164
- /**
1165
- * @deprecated in favor of `bitbucketCloud` and `bitbucketServer`
1166
- */
1167
- bitbucket: ScmIntegrationsGroup<BitbucketIntegration>;
1168
1091
  bitbucketCloud: ScmIntegrationsGroup<BitbucketCloudIntegration>;
1169
1092
  bitbucketServer: ScmIntegrationsGroup<BitbucketServerIntegration>;
1170
1093
  gerrit: ScmIntegrationsGroup<GerritIntegration>;
@@ -1304,64 +1227,6 @@ declare class DefaultAzureDevOpsCredentialsProvider implements AzureDevOpsCreden
1304
1227
  }): Promise<AzureDevOpsCredentials | undefined>;
1305
1228
  }
1306
1229
 
1307
- /**
1308
- * Gets the request options necessary to make requests to a given provider.
1309
- *
1310
- * @param config - The relevant provider config
1311
- * @param additionalHeaders - Additional headers for the request
1312
- * @public
1313
- * @deprecated Use {@link AzureDevOpsCredentialsProvider} instead.
1314
- */
1315
- declare function getAzureRequestOptions(config: AzureIntegrationConfig, additionalHeaders?: Record<string, string>): Promise<{
1316
- headers: Record<string, string>;
1317
- }>;
1318
-
1319
- /**
1320
- * Given a URL pointing to a path on a provider, returns the default branch.
1321
- *
1322
- * @param url - A URL pointing to a path
1323
- * @param config - The relevant provider config
1324
- * @public
1325
- * @deprecated no longer in use, bitbucket integration replaced by integrations bitbucketCloud and bitbucketServer.
1326
- */
1327
- declare function getBitbucketDefaultBranch(url: string, config: BitbucketIntegrationConfig): Promise<string>;
1328
- /**
1329
- * Given a URL pointing to a path on a provider, returns a URL that is suitable
1330
- * for downloading the subtree.
1331
- *
1332
- * @param url - A URL pointing to a path
1333
- * @param config - The relevant provider config
1334
- * @public
1335
- * @deprecated no longer in use, bitbucket integration replaced by integrations bitbucketCloud and bitbucketServer.
1336
- */
1337
- declare function getBitbucketDownloadUrl(url: string, config: BitbucketIntegrationConfig): Promise<string>;
1338
- /**
1339
- * Given a URL pointing to a file on a provider, returns a URL that is suitable
1340
- * for fetching the contents of the data.
1341
- *
1342
- * @remarks
1343
- *
1344
- * Converts
1345
- * from: https://bitbucket.org/orgname/reponame/src/master/file.yaml
1346
- * to: https://api.bitbucket.org/2.0/repositories/orgname/reponame/src/master/file.yaml
1347
- *
1348
- * @param url - A URL pointing to a file
1349
- * @param config - The relevant provider config
1350
- * @public
1351
- * @deprecated no longer in use, bitbucket integration replaced by integrations bitbucketCloud and bitbucketServer.
1352
- */
1353
- declare function getBitbucketFileFetchUrl(url: string, config: BitbucketIntegrationConfig): string;
1354
- /**
1355
- * Gets the request options necessary to make requests to a given provider.
1356
- *
1357
- * @param config - The relevant provider config
1358
- * @public
1359
- * @deprecated no longer in use, bitbucket integration replaced by integrations bitbucketCloud and bitbucketServer.
1360
- */
1361
- declare function getBitbucketRequestOptions(config: BitbucketIntegrationConfig): {
1362
- headers: Record<string, string>;
1363
- };
1364
-
1365
1230
  /**
1366
1231
  * Fetches an OAuth access token from Bitbucket Cloud using client credentials flow.
1367
1232
  * Tokens are cached with a 10-minute grace period to account for clock skew.
@@ -1458,37 +1323,6 @@ declare function getBitbucketServerRequestOptions(config: BitbucketServerIntegra
1458
1323
  headers: Record<string, string>;
1459
1324
  };
1460
1325
 
1461
- /**
1462
- * Parse a Gitiles URL and return branch, file path and project.
1463
- *
1464
- * @remarks
1465
- *
1466
- * Gerrit only handles code reviews so it does not have a native way to browse
1467
- * or showing the content of gits. Image if Github only had the "pull requests"
1468
- * tab.
1469
- *
1470
- * Any source code browsing is instead handled by optional services outside
1471
- * Gerrit. The url format chosen for the Gerrit url reader is the one used by
1472
- * the Gitiles project. Gerrit will work perfectly with Backstage without
1473
- * having Gitiles installed but there are some places in the Backstage GUI
1474
- * with links to the url used by the url reader. These will not work unless
1475
- * the urls point to an actual Gitiles installation.
1476
- *
1477
- * Gitiles url:
1478
- * https://g.com/optional_path/\{project\}/+/refs/heads/\{branch\}/\{filePath\}
1479
- * https://g.com/a/optional_path/\{project\}/+/refs/heads/\{branch\}/\{filePath\}
1480
- *
1481
- *
1482
- * @param url - An URL pointing to a file stored in git.
1483
- * @public
1484
- * @deprecated `parseGerritGitilesUrl` is deprecated. Use
1485
- * {@link parseGitilesUrlRef} instead.
1486
- */
1487
- declare function parseGerritGitilesUrl(config: GerritIntegrationConfig, url: string): {
1488
- branch: string;
1489
- filePath: string;
1490
- project: string;
1491
- };
1492
1326
  /**
1493
1327
  * Parses Gitiles urls and returns the following:
1494
1328
  *
@@ -1515,18 +1349,6 @@ declare function parseGitilesUrlRef(config: GerritIntegrationConfig, url: string
1515
1349
  refType: 'sha' | 'branch' | 'tag' | 'head';
1516
1350
  basePath: string;
1517
1351
  };
1518
- /**
1519
- * Build a Gerrit Gitiles archive url that targets a specific branch and path
1520
- *
1521
- * @param config - A Gerrit provider config.
1522
- * @param project - The name of the git project
1523
- * @param branch - The branch we will target.
1524
- * @param filePath - The absolute file path.
1525
- * @public
1526
- * @deprecated `buildGerritGitilesArchiveUrl` is deprecated. Use
1527
- * {@link buildGerritGitilesArchiveUrlFromLocation} instead.
1528
- */
1529
- declare function buildGerritGitilesArchiveUrl(config: GerritIntegrationConfig, project: string, branch: string, filePath: string): string;
1530
1352
  /**
1531
1353
  * Build a Gerrit Gitiles archive url from a Gitiles url.
1532
1354
  *
@@ -1731,16 +1553,6 @@ interface GithubCredentialsProvider {
1731
1553
  * @public
1732
1554
  */
1733
1555
  declare function getGithubFileFetchUrl(url: string, config: GithubIntegrationConfig, credentials: GithubCredentials): string;
1734
- /**
1735
- * Gets the request options necessary to make requests to a given provider.
1736
- *
1737
- * @deprecated This function is no longer used internally
1738
- * @param config - The relevant provider config
1739
- * @public
1740
- */
1741
- declare function getGitHubRequestOptions(config: GithubIntegrationConfig, credentials: GithubCredentials): {
1742
- headers: Record<string, string>;
1743
- };
1744
1556
 
1745
1557
  /**
1746
1558
  * Handles the creation and caching of credentials for GitHub integrations.
@@ -1840,16 +1652,17 @@ declare class SingleInstanceGithubCredentialsProvider implements GithubCredentia
1840
1652
  *
1841
1653
  * Converts
1842
1654
  * from: https://gitlab.example.com/a/b/blob/master/c.yaml
1843
- * to: https://gitlab.com/api/v4/projects/projectId/repository/c.yaml?ref=master
1655
+ * to: https://gitlab.com/api/v4/projects/a%2Fb/repository/files/c.yaml/raw?ref=master
1844
1656
  * -or-
1845
1657
  * from: https://gitlab.com/groupA/teams/teamA/subgroupA/repoA/-/blob/branch/filepath
1846
- * to: https://gitlab.com/api/v4/projects/projectId/repository/files/filepath?ref=branch
1658
+ * to: https://gitlab.com/api/v4/projects/groupA%2Fteams%2FteamA%2FsubgroupA%2FrepoA/repository/files/filepath/raw?ref=branch
1847
1659
  *
1848
1660
  * @param url - A URL pointing to a file
1849
1661
  * @param config - The relevant provider config
1662
+ * @param token - An optional auth token (not used in path extraction, kept for compatibility)
1850
1663
  * @public
1851
1664
  */
1852
- declare function getGitLabFileFetchUrl(url: string, config: GitLabIntegrationConfig, token?: string): Promise<string>;
1665
+ declare function getGitLabFileFetchUrl(url: string, config: GitLabIntegrationConfig, _token?: string): Promise<string>;
1853
1666
  /**
1854
1667
  * Gets the request options necessary to make requests to a given provider.
1855
1668
  *
@@ -2035,10 +1848,6 @@ interface IntegrationsByType {
2035
1848
  awsCodeCommit: ScmIntegrationsGroup<AwsCodeCommitIntegration>;
2036
1849
  azureBlobStorage: ScmIntegrationsGroup<AzureBlobStorageIntergation>;
2037
1850
  azure: ScmIntegrationsGroup<AzureIntegration>;
2038
- /**
2039
- * @deprecated in favor of `bitbucketCloud` and `bitbucketServer`
2040
- */
2041
- bitbucket: ScmIntegrationsGroup<BitbucketIntegration>;
2042
1851
  bitbucketCloud: ScmIntegrationsGroup<BitbucketCloudIntegration>;
2043
1852
  bitbucketServer: ScmIntegrationsGroup<BitbucketServerIntegration>;
2044
1853
  gerrit: ScmIntegrationsGroup<GerritIntegration>;
@@ -2061,10 +1870,6 @@ declare class ScmIntegrations implements ScmIntegrationRegistry {
2061
1870
  get awsCodeCommit(): ScmIntegrationsGroup<AwsCodeCommitIntegration>;
2062
1871
  get azureBlobStorage(): ScmIntegrationsGroup<AzureBlobStorageIntergation>;
2063
1872
  get azure(): ScmIntegrationsGroup<AzureIntegration>;
2064
- /**
2065
- * @deprecated in favor of `bitbucketCloud()` and `bitbucketServer()`
2066
- */
2067
- get bitbucket(): ScmIntegrationsGroup<BitbucketIntegration>;
2068
1873
  get bitbucketCloud(): ScmIntegrationsGroup<BitbucketCloudIntegration>;
2069
1874
  get bitbucketServer(): ScmIntegrationsGroup<BitbucketServerIntegration>;
2070
1875
  get gerrit(): ScmIntegrationsGroup<GerritIntegration>;
@@ -2084,5 +1889,5 @@ declare class ScmIntegrations implements ScmIntegrationRegistry {
2084
1889
  resolveEditUrl(url: string): string;
2085
1890
  }
2086
1891
 
2087
- export { AwsCodeCommitIntegration, AwsS3Integration, AzureBlobStorageIntergation, AzureIntegration, BitbucketCloudIntegration, BitbucketIntegration, BitbucketServerIntegration, DefaultAzureCredentialsManager, DefaultAzureDevOpsCredentialsProvider, DefaultGithubCredentialsProvider, DefaultGitlabCredentialsProvider, GerritIntegration, GitLabIntegration, GiteaIntegration, GithubAppCredentialsMux, GithubIntegration, GoogleGcsIntegration, HarnessIntegration, ScmIntegrations, SingleInstanceGithubCredentialsProvider, buildGerritGitilesArchiveUrl, buildGerritGitilesArchiveUrlFromLocation, defaultScmResolveUrl, getAzureCommitsUrl, getAzureDownloadUrl, getAzureFileFetchUrl, getAzureRequestOptions, getBitbucketCloudDefaultBranch, getBitbucketCloudDownloadUrl, getBitbucketCloudFileFetchUrl, getBitbucketCloudOAuthToken, getBitbucketCloudRequestOptions, getBitbucketDefaultBranch, getBitbucketDownloadUrl, getBitbucketFileFetchUrl, getBitbucketRequestOptions, getBitbucketServerDefaultBranch, getBitbucketServerDownloadUrl, getBitbucketServerFileFetchUrl, getBitbucketServerRequestOptions, getGerritBranchApiUrl, getGerritCloneRepoUrl, getGerritFileContentsApiUrl, getGerritProjectsApiUrl, getGerritRequestOptions, getGitHubRequestOptions, getGitLabFileFetchUrl, getGitLabIntegrationRelativePath, getGitLabRequestOptions, getGiteaArchiveUrl, getGiteaEditContentsUrl, getGiteaFileContentsUrl, getGiteaLatestCommitUrl, getGiteaRequestOptions, getGithubFileFetchUrl, getGitilesAuthenticationUrl, getHarnessArchiveUrl, getHarnessFileContentsUrl, getHarnessLatestCommitUrl, getHarnessRequestOptions, parseGerritGitilesUrl, parseGerritJsonResponse, parseGiteaUrl, parseGitilesUrlRef, parseHarnessUrl, readAwsCodeCommitIntegrationConfig, readAwsCodeCommitIntegrationConfigs, readAwsS3IntegrationConfig, readAwsS3IntegrationConfigs, readAzureBlobStorageIntegrationConfig, readAzureBlobStorageIntegrationConfigs, readAzureIntegrationConfig, readAzureIntegrationConfigs, readBitbucketCloudIntegrationConfig, readBitbucketCloudIntegrationConfigs, readBitbucketIntegrationConfig, readBitbucketIntegrationConfigs, readBitbucketServerIntegrationConfig, readBitbucketServerIntegrationConfigs, readGerritIntegrationConfig, readGerritIntegrationConfigs, readGitLabIntegrationConfig, readGitLabIntegrationConfigs, readGiteaConfig, readGithubIntegrationConfig, readGithubIntegrationConfigs, readGoogleGcsIntegrationConfig, readHarnessConfig, replaceGitLabUrlType, replaceGithubUrlType };
2088
- export type { AwsCodeCommitIntegrationConfig, AwsS3IntegrationConfig, AzureBlobStorageIntegrationConfig, AzureClientSecretCredential, AzureCredentialBase, AzureCredentialsManager, AzureDevOpsCredential, AzureDevOpsCredentialKind, AzureDevOpsCredentialLike, AzureDevOpsCredentialType, AzureDevOpsCredentials, AzureDevOpsCredentialsProvider, AzureIntegrationConfig, AzureManagedIdentityClientAssertionCredential, AzureManagedIdentityCredential, BitbucketCloudIntegrationConfig, BitbucketIntegrationConfig, BitbucketServerIntegrationConfig, GerritIntegrationConfig, GitLabIntegrationConfig, GiteaIntegrationConfig, GithubAppConfig, GithubCredentialType, GithubCredentials, GithubCredentialsProvider, GithubIntegrationConfig, GitlabCredentials, GitlabCredentialsProvider, GoogleGcsIntegrationConfig, HarnessIntegrationConfig, IntegrationsByType, PersonalAccessTokenCredential, RateLimitInfo, ScmIntegration, ScmIntegrationRegistry, ScmIntegrationsFactory, ScmIntegrationsGroup };
1892
+ export { AwsCodeCommitIntegration, AwsS3Integration, AzureBlobStorageIntergation, AzureIntegration, BitbucketCloudIntegration, BitbucketServerIntegration, DefaultAzureCredentialsManager, DefaultAzureDevOpsCredentialsProvider, DefaultGithubCredentialsProvider, DefaultGitlabCredentialsProvider, GerritIntegration, GitLabIntegration, GiteaIntegration, GithubAppCredentialsMux, GithubIntegration, GoogleGcsIntegration, HarnessIntegration, ScmIntegrations, SingleInstanceGithubCredentialsProvider, buildGerritGitilesArchiveUrlFromLocation, defaultScmResolveUrl, getAzureCommitsUrl, getAzureDownloadUrl, getAzureFileFetchUrl, getBitbucketCloudDefaultBranch, getBitbucketCloudDownloadUrl, getBitbucketCloudFileFetchUrl, getBitbucketCloudOAuthToken, getBitbucketCloudRequestOptions, getBitbucketServerDefaultBranch, getBitbucketServerDownloadUrl, getBitbucketServerFileFetchUrl, getBitbucketServerRequestOptions, getGerritBranchApiUrl, getGerritCloneRepoUrl, getGerritFileContentsApiUrl, getGerritProjectsApiUrl, getGerritRequestOptions, getGitLabFileFetchUrl, getGitLabIntegrationRelativePath, getGitLabRequestOptions, getGiteaArchiveUrl, getGiteaEditContentsUrl, getGiteaFileContentsUrl, getGiteaLatestCommitUrl, getGiteaRequestOptions, getGithubFileFetchUrl, getGitilesAuthenticationUrl, getHarnessArchiveUrl, getHarnessFileContentsUrl, getHarnessLatestCommitUrl, getHarnessRequestOptions, parseGerritJsonResponse, parseGiteaUrl, parseGitilesUrlRef, parseHarnessUrl, readAwsCodeCommitIntegrationConfig, readAwsCodeCommitIntegrationConfigs, readAwsS3IntegrationConfig, readAwsS3IntegrationConfigs, readAzureBlobStorageIntegrationConfig, readAzureBlobStorageIntegrationConfigs, readAzureIntegrationConfig, readAzureIntegrationConfigs, readBitbucketCloudIntegrationConfig, readBitbucketCloudIntegrationConfigs, readBitbucketServerIntegrationConfig, readBitbucketServerIntegrationConfigs, readGerritIntegrationConfig, readGerritIntegrationConfigs, readGitLabIntegrationConfig, readGitLabIntegrationConfigs, readGiteaConfig, readGithubIntegrationConfig, readGithubIntegrationConfigs, readGoogleGcsIntegrationConfig, readHarnessConfig, replaceGitLabUrlType, replaceGithubUrlType };
1893
+ export type { AwsCodeCommitIntegrationConfig, AwsS3IntegrationConfig, AzureBlobStorageIntegrationConfig, AzureClientSecretCredential, AzureCredentialBase, AzureCredentialsManager, AzureDevOpsCredential, AzureDevOpsCredentialKind, AzureDevOpsCredentialLike, AzureDevOpsCredentialType, AzureDevOpsCredentials, AzureDevOpsCredentialsProvider, AzureIntegrationConfig, AzureManagedIdentityClientAssertionCredential, AzureManagedIdentityCredential, BitbucketCloudIntegrationConfig, BitbucketServerIntegrationConfig, GerritIntegrationConfig, GitLabIntegrationConfig, GiteaIntegrationConfig, GithubAppConfig, GithubCredentialType, GithubCredentials, GithubCredentialsProvider, GithubIntegrationConfig, GitlabCredentials, GitlabCredentialsProvider, GoogleGcsIntegrationConfig, HarnessIntegrationConfig, IntegrationsByType, PersonalAccessTokenCredential, RateLimitInfo, ScmIntegration, ScmIntegrationRegistry, ScmIntegrationsFactory, ScmIntegrationsGroup };
package/dist/index.esm.js CHANGED
@@ -9,10 +9,6 @@ export { AzureIntegration } from './azure/AzureIntegration.esm.js';
9
9
  export { readAzureIntegrationConfig, readAzureIntegrationConfigs } from './azure/config.esm.js';
10
10
  export { getAzureCommitsUrl, getAzureDownloadUrl, getAzureFileFetchUrl } from './azure/core.esm.js';
11
11
  export { DefaultAzureDevOpsCredentialsProvider } from './azure/DefaultAzureDevOpsCredentialsProvider.esm.js';
12
- export { getAzureRequestOptions } from './azure/deprecated.esm.js';
13
- export { BitbucketIntegration } from './bitbucket/BitbucketIntegration.esm.js';
14
- export { readBitbucketIntegrationConfig, readBitbucketIntegrationConfigs } from './bitbucket/config.esm.js';
15
- export { getBitbucketDefaultBranch, getBitbucketDownloadUrl, getBitbucketFileFetchUrl, getBitbucketRequestOptions } from './bitbucket/core.esm.js';
16
12
  export { BitbucketCloudIntegration } from './bitbucketCloud/BitbucketCloudIntegration.esm.js';
17
13
  export { readBitbucketCloudIntegrationConfig, readBitbucketCloudIntegrationConfigs } from './bitbucketCloud/config.esm.js';
18
14
  export { getBitbucketCloudDefaultBranch, getBitbucketCloudDownloadUrl, getBitbucketCloudFileFetchUrl, getBitbucketCloudOAuthToken, getBitbucketCloudRequestOptions } from './bitbucketCloud/core.esm.js';
@@ -21,12 +17,12 @@ export { readBitbucketServerIntegrationConfig, readBitbucketServerIntegrationCon
21
17
  export { getBitbucketServerDefaultBranch, getBitbucketServerDownloadUrl, getBitbucketServerFileFetchUrl, getBitbucketServerRequestOptions } from './bitbucketServer/core.esm.js';
22
18
  export { GerritIntegration } from './gerrit/GerritIntegration.esm.js';
23
19
  export { readGerritIntegrationConfig, readGerritIntegrationConfigs } from './gerrit/config.esm.js';
24
- export { buildGerritGitilesArchiveUrl, buildGerritGitilesArchiveUrlFromLocation, getGerritBranchApiUrl, getGerritCloneRepoUrl, getGerritFileContentsApiUrl, getGerritProjectsApiUrl, getGerritRequestOptions, getGitilesAuthenticationUrl, parseGerritGitilesUrl, parseGerritJsonResponse, parseGitilesUrlRef } from './gerrit/core.esm.js';
20
+ export { buildGerritGitilesArchiveUrlFromLocation, getGerritBranchApiUrl, getGerritCloneRepoUrl, getGerritFileContentsApiUrl, getGerritProjectsApiUrl, getGerritRequestOptions, getGitilesAuthenticationUrl, parseGerritJsonResponse, parseGitilesUrlRef } from './gerrit/core.esm.js';
25
21
  export { GiteaIntegration } from './gitea/GiteaIntegration.esm.js';
26
22
  export { getGiteaArchiveUrl, getGiteaEditContentsUrl, getGiteaFileContentsUrl, getGiteaLatestCommitUrl, getGiteaRequestOptions, parseGiteaUrl } from './gitea/core.esm.js';
27
23
  export { readGiteaConfig } from './gitea/config.esm.js';
28
24
  export { readGithubIntegrationConfig, readGithubIntegrationConfigs } from './github/config.esm.js';
29
- export { getGitHubRequestOptions, getGithubFileFetchUrl } from './github/core.esm.js';
25
+ export { getGithubFileFetchUrl } from './github/core.esm.js';
30
26
  export { DefaultGithubCredentialsProvider } from './github/DefaultGithubCredentialsProvider.esm.js';
31
27
  export { GithubAppCredentialsMux, SingleInstanceGithubCredentialsProvider } from './github/SingleInstanceGithubCredentialsProvider.esm.js';
32
28
  export { GithubIntegration, replaceGithubUrlType } from './github/GithubIntegration.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/integration",
3
- "version": "1.20.0",
3
+ "version": "2.0.0-next.1",
4
4
  "description": "Helpers for managing integrations towards external systems",
5
5
  "backstage": {
6
6
  "role": "common-library"
@@ -39,18 +39,19 @@
39
39
  "dependencies": {
40
40
  "@azure/identity": "^4.0.0",
41
41
  "@azure/storage-blob": "^12.5.0",
42
- "@backstage/config": "^1.3.6",
43
- "@backstage/errors": "^1.2.7",
42
+ "@backstage/config": "1.3.6",
43
+ "@backstage/errors": "1.2.7",
44
44
  "@octokit/auth-app": "^4.0.0",
45
45
  "@octokit/rest": "^19.0.3",
46
46
  "cross-fetch": "^4.0.0",
47
47
  "git-url-parse": "^15.0.0",
48
48
  "lodash": "^4.17.21",
49
- "luxon": "^3.0.0"
49
+ "luxon": "^3.0.0",
50
+ "p-throttle": "^4.1.1"
50
51
  },
51
52
  "devDependencies": {
52
- "@backstage/cli": "^0.35.4",
53
- "@backstage/config-loader": "^1.10.8",
53
+ "@backstage/cli": "0.36.0-next.1",
54
+ "@backstage/config-loader": "1.10.9-next.0",
54
55
  "msw": "^1.0.0"
55
56
  },
56
57
  "configSchema": "config.d.ts",
@@ -1,26 +0,0 @@
1
- 'use strict';
2
-
3
- var CachedAzureDevOpsCredentialsProvider = require('./CachedAzureDevOpsCredentialsProvider.cjs.js');
4
-
5
- async function getAzureRequestOptions(config, additionalHeaders) {
6
- const headers = additionalHeaders ? { ...additionalHeaders } : {};
7
- const credentialConfig = config.credentials?.filter(
8
- (credential) => credential.organizations === void 0 || credential.organizations.length === 0
9
- )[0];
10
- if (credentialConfig) {
11
- const credentialsProvider = CachedAzureDevOpsCredentialsProvider.CachedAzureDevOpsCredentialsProvider.fromAzureDevOpsCredential(
12
- credentialConfig
13
- );
14
- const credentials = await credentialsProvider.getCredentials();
15
- return {
16
- headers: {
17
- ...credentials?.headers,
18
- ...headers
19
- }
20
- };
21
- }
22
- return { headers };
23
- }
24
-
25
- exports.getAzureRequestOptions = getAzureRequestOptions;
26
- //# sourceMappingURL=deprecated.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deprecated.cjs.js","sources":["../../src/azure/deprecated.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AzureIntegrationConfig } from './config';\nimport { CachedAzureDevOpsCredentialsProvider } from './CachedAzureDevOpsCredentialsProvider';\n\n/**\n * Gets the request options necessary to make requests to a given provider.\n *\n * @param config - The relevant provider config\n * @param additionalHeaders - Additional headers for the request\n * @public\n * @deprecated Use {@link AzureDevOpsCredentialsProvider} instead.\n */\nexport async function getAzureRequestOptions(\n config: AzureIntegrationConfig,\n additionalHeaders?: Record<string, string>,\n): Promise<{ headers: Record<string, string> }> {\n const headers: Record<string, string> = additionalHeaders\n ? { ...additionalHeaders }\n : {};\n\n /*\n * Since we do not have a way to determine which organization the request is for,\n * we will use the first credential that does not have an organization specified.\n */\n const credentialConfig = config.credentials?.filter(\n credential =>\n credential.organizations === undefined ||\n credential.organizations.length === 0,\n )[0];\n\n if (credentialConfig) {\n const credentialsProvider =\n CachedAzureDevOpsCredentialsProvider.fromAzureDevOpsCredential(\n credentialConfig,\n );\n const credentials = await credentialsProvider.getCredentials();\n\n return {\n headers: {\n ...credentials?.headers,\n ...headers,\n },\n };\n }\n\n return { headers };\n}\n"],"names":["CachedAzureDevOpsCredentialsProvider"],"mappings":";;;;AA0BA,eAAsB,sBAAA,CACpB,QACA,iBAAA,EAC8C;AAC9C,EAAA,MAAM,UAAkC,iBAAA,GACpC,EAAE,GAAG,iBAAA,KACL,EAAC;AAML,EAAA,MAAM,gBAAA,GAAmB,OAAO,WAAA,EAAa,MAAA;AAAA,IAC3C,gBACE,UAAA,CAAW,aAAA,KAAkB,MAAA,IAC7B,UAAA,CAAW,cAAc,MAAA,KAAW;AAAA,IACtC,CAAC,CAAA;AAEH,EAAA,IAAI,gBAAA,EAAkB;AACpB,IAAA,MAAM,sBACJA,yEAAA,CAAqC,yBAAA;AAAA,MACnC;AAAA,KACF;AACF,IAAA,MAAM,WAAA,GAAc,MAAM,mBAAA,CAAoB,cAAA,EAAe;AAE7D,IAAA,OAAO;AAAA,MACL,OAAA,EAAS;AAAA,QACP,GAAG,WAAA,EAAa,OAAA;AAAA,QAChB,GAAG;AAAA;AACL,KACF;AAAA,EACF;AAEA,EAAA,OAAO,EAAE,OAAA,EAAQ;AACnB;;;;"}