@backstage/integration 1.21.0-next.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 (40) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/config.d.ts +3 -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/index.cjs.js +61 -76
  20. package/dist/index.cjs.js.map +1 -1
  21. package/dist/index.d.ts +2 -222
  22. package/dist/index.esm.js +2 -6
  23. package/dist/index.esm.js.map +1 -1
  24. package/package.json +2 -2
  25. package/dist/azure/deprecated.cjs.js +0 -26
  26. package/dist/azure/deprecated.cjs.js.map +0 -1
  27. package/dist/azure/deprecated.esm.js +0 -24
  28. package/dist/azure/deprecated.esm.js.map +0 -1
  29. package/dist/bitbucket/BitbucketIntegration.cjs.js +0 -65
  30. package/dist/bitbucket/BitbucketIntegration.cjs.js.map +0 -1
  31. package/dist/bitbucket/BitbucketIntegration.esm.js +0 -59
  32. package/dist/bitbucket/BitbucketIntegration.esm.js.map +0 -1
  33. package/dist/bitbucket/config.cjs.js +0 -48
  34. package/dist/bitbucket/config.cjs.js.map +0 -1
  35. package/dist/bitbucket/config.esm.js +0 -45
  36. package/dist/bitbucket/config.esm.js.map +0 -1
  37. package/dist/bitbucket/core.cjs.js +0 -95
  38. package/dist/bitbucket/core.cjs.js.map +0 -1
  39. package/dist/bitbucket/core.esm.js +0 -85
  40. 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
  *
@@ -1185,10 +1088,6 @@ interface ScmIntegrationRegistry extends ScmIntegrationsGroup<ScmIntegration> {
1185
1088
  awsCodeCommit: ScmIntegrationsGroup<AwsCodeCommitIntegration>;
1186
1089
  azureBlobStorage: ScmIntegrationsGroup<AzureBlobStorageIntergation>;
1187
1090
  azure: ScmIntegrationsGroup<AzureIntegration>;
1188
- /**
1189
- * @deprecated in favor of `bitbucketCloud` and `bitbucketServer`
1190
- */
1191
- bitbucket: ScmIntegrationsGroup<BitbucketIntegration>;
1192
1091
  bitbucketCloud: ScmIntegrationsGroup<BitbucketCloudIntegration>;
1193
1092
  bitbucketServer: ScmIntegrationsGroup<BitbucketServerIntegration>;
1194
1093
  gerrit: ScmIntegrationsGroup<GerritIntegration>;
@@ -1328,64 +1227,6 @@ declare class DefaultAzureDevOpsCredentialsProvider implements AzureDevOpsCreden
1328
1227
  }): Promise<AzureDevOpsCredentials | undefined>;
1329
1228
  }
1330
1229
 
1331
- /**
1332
- * Gets the request options necessary to make requests to a given provider.
1333
- *
1334
- * @param config - The relevant provider config
1335
- * @param additionalHeaders - Additional headers for the request
1336
- * @public
1337
- * @deprecated Use {@link AzureDevOpsCredentialsProvider} instead.
1338
- */
1339
- declare function getAzureRequestOptions(config: AzureIntegrationConfig, additionalHeaders?: Record<string, string>): Promise<{
1340
- headers: Record<string, string>;
1341
- }>;
1342
-
1343
- /**
1344
- * Given a URL pointing to a path on a provider, returns the default branch.
1345
- *
1346
- * @param url - A URL pointing to a path
1347
- * @param config - The relevant provider config
1348
- * @public
1349
- * @deprecated no longer in use, bitbucket integration replaced by integrations bitbucketCloud and bitbucketServer.
1350
- */
1351
- declare function getBitbucketDefaultBranch(url: string, config: BitbucketIntegrationConfig): Promise<string>;
1352
- /**
1353
- * Given a URL pointing to a path on a provider, returns a URL that is suitable
1354
- * for downloading the subtree.
1355
- *
1356
- * @param url - A URL pointing to a path
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 getBitbucketDownloadUrl(url: string, config: BitbucketIntegrationConfig): Promise<string>;
1362
- /**
1363
- * Given a URL pointing to a file on a provider, returns a URL that is suitable
1364
- * for fetching the contents of the data.
1365
- *
1366
- * @remarks
1367
- *
1368
- * Converts
1369
- * from: https://bitbucket.org/orgname/reponame/src/master/file.yaml
1370
- * to: https://api.bitbucket.org/2.0/repositories/orgname/reponame/src/master/file.yaml
1371
- *
1372
- * @param url - A URL pointing to a file
1373
- * @param config - The relevant provider config
1374
- * @public
1375
- * @deprecated no longer in use, bitbucket integration replaced by integrations bitbucketCloud and bitbucketServer.
1376
- */
1377
- declare function getBitbucketFileFetchUrl(url: string, config: BitbucketIntegrationConfig): string;
1378
- /**
1379
- * Gets the request options necessary to make requests to a given provider.
1380
- *
1381
- * @param config - The relevant provider config
1382
- * @public
1383
- * @deprecated no longer in use, bitbucket integration replaced by integrations bitbucketCloud and bitbucketServer.
1384
- */
1385
- declare function getBitbucketRequestOptions(config: BitbucketIntegrationConfig): {
1386
- headers: Record<string, string>;
1387
- };
1388
-
1389
1230
  /**
1390
1231
  * Fetches an OAuth access token from Bitbucket Cloud using client credentials flow.
1391
1232
  * Tokens are cached with a 10-minute grace period to account for clock skew.
@@ -1482,37 +1323,6 @@ declare function getBitbucketServerRequestOptions(config: BitbucketServerIntegra
1482
1323
  headers: Record<string, string>;
1483
1324
  };
1484
1325
 
1485
- /**
1486
- * Parse a Gitiles URL and return branch, file path and project.
1487
- *
1488
- * @remarks
1489
- *
1490
- * Gerrit only handles code reviews so it does not have a native way to browse
1491
- * or showing the content of gits. Image if Github only had the "pull requests"
1492
- * tab.
1493
- *
1494
- * Any source code browsing is instead handled by optional services outside
1495
- * Gerrit. The url format chosen for the Gerrit url reader is the one used by
1496
- * the Gitiles project. Gerrit will work perfectly with Backstage without
1497
- * having Gitiles installed but there are some places in the Backstage GUI
1498
- * with links to the url used by the url reader. These will not work unless
1499
- * the urls point to an actual Gitiles installation.
1500
- *
1501
- * Gitiles url:
1502
- * https://g.com/optional_path/\{project\}/+/refs/heads/\{branch\}/\{filePath\}
1503
- * https://g.com/a/optional_path/\{project\}/+/refs/heads/\{branch\}/\{filePath\}
1504
- *
1505
- *
1506
- * @param url - An URL pointing to a file stored in git.
1507
- * @public
1508
- * @deprecated `parseGerritGitilesUrl` is deprecated. Use
1509
- * {@link parseGitilesUrlRef} instead.
1510
- */
1511
- declare function parseGerritGitilesUrl(config: GerritIntegrationConfig, url: string): {
1512
- branch: string;
1513
- filePath: string;
1514
- project: string;
1515
- };
1516
1326
  /**
1517
1327
  * Parses Gitiles urls and returns the following:
1518
1328
  *
@@ -1539,18 +1349,6 @@ declare function parseGitilesUrlRef(config: GerritIntegrationConfig, url: string
1539
1349
  refType: 'sha' | 'branch' | 'tag' | 'head';
1540
1350
  basePath: string;
1541
1351
  };
1542
- /**
1543
- * Build a Gerrit Gitiles archive url that targets a specific branch and path
1544
- *
1545
- * @param config - A Gerrit provider config.
1546
- * @param project - The name of the git project
1547
- * @param branch - The branch we will target.
1548
- * @param filePath - The absolute file path.
1549
- * @public
1550
- * @deprecated `buildGerritGitilesArchiveUrl` is deprecated. Use
1551
- * {@link buildGerritGitilesArchiveUrlFromLocation} instead.
1552
- */
1553
- declare function buildGerritGitilesArchiveUrl(config: GerritIntegrationConfig, project: string, branch: string, filePath: string): string;
1554
1352
  /**
1555
1353
  * Build a Gerrit Gitiles archive url from a Gitiles url.
1556
1354
  *
@@ -1755,16 +1553,6 @@ interface GithubCredentialsProvider {
1755
1553
  * @public
1756
1554
  */
1757
1555
  declare function getGithubFileFetchUrl(url: string, config: GithubIntegrationConfig, credentials: GithubCredentials): string;
1758
- /**
1759
- * Gets the request options necessary to make requests to a given provider.
1760
- *
1761
- * @deprecated This function is no longer used internally
1762
- * @param config - The relevant provider config
1763
- * @public
1764
- */
1765
- declare function getGitHubRequestOptions(config: GithubIntegrationConfig, credentials: GithubCredentials): {
1766
- headers: Record<string, string>;
1767
- };
1768
1556
 
1769
1557
  /**
1770
1558
  * Handles the creation and caching of credentials for GitHub integrations.
@@ -2060,10 +1848,6 @@ interface IntegrationsByType {
2060
1848
  awsCodeCommit: ScmIntegrationsGroup<AwsCodeCommitIntegration>;
2061
1849
  azureBlobStorage: ScmIntegrationsGroup<AzureBlobStorageIntergation>;
2062
1850
  azure: ScmIntegrationsGroup<AzureIntegration>;
2063
- /**
2064
- * @deprecated in favor of `bitbucketCloud` and `bitbucketServer`
2065
- */
2066
- bitbucket: ScmIntegrationsGroup<BitbucketIntegration>;
2067
1851
  bitbucketCloud: ScmIntegrationsGroup<BitbucketCloudIntegration>;
2068
1852
  bitbucketServer: ScmIntegrationsGroup<BitbucketServerIntegration>;
2069
1853
  gerrit: ScmIntegrationsGroup<GerritIntegration>;
@@ -2086,10 +1870,6 @@ declare class ScmIntegrations implements ScmIntegrationRegistry {
2086
1870
  get awsCodeCommit(): ScmIntegrationsGroup<AwsCodeCommitIntegration>;
2087
1871
  get azureBlobStorage(): ScmIntegrationsGroup<AzureBlobStorageIntergation>;
2088
1872
  get azure(): ScmIntegrationsGroup<AzureIntegration>;
2089
- /**
2090
- * @deprecated in favor of `bitbucketCloud()` and `bitbucketServer()`
2091
- */
2092
- get bitbucket(): ScmIntegrationsGroup<BitbucketIntegration>;
2093
1873
  get bitbucketCloud(): ScmIntegrationsGroup<BitbucketCloudIntegration>;
2094
1874
  get bitbucketServer(): ScmIntegrationsGroup<BitbucketServerIntegration>;
2095
1875
  get gerrit(): ScmIntegrationsGroup<GerritIntegration>;
@@ -2109,5 +1889,5 @@ declare class ScmIntegrations implements ScmIntegrationRegistry {
2109
1889
  resolveEditUrl(url: string): string;
2110
1890
  }
2111
1891
 
2112
- 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 };
2113
- 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.21.0-next.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"
@@ -50,7 +50,7 @@
50
50
  "p-throttle": "^4.1.1"
51
51
  },
52
52
  "devDependencies": {
53
- "@backstage/cli": "0.35.5-next.0",
53
+ "@backstage/cli": "0.36.0-next.1",
54
54
  "@backstage/config-loader": "1.10.9-next.0",
55
55
  "msw": "^1.0.0"
56
56
  },
@@ -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;;;;"}
@@ -1,24 +0,0 @@
1
- import { CachedAzureDevOpsCredentialsProvider } from './CachedAzureDevOpsCredentialsProvider.esm.js';
2
-
3
- async function getAzureRequestOptions(config, additionalHeaders) {
4
- const headers = additionalHeaders ? { ...additionalHeaders } : {};
5
- const credentialConfig = config.credentials?.filter(
6
- (credential) => credential.organizations === void 0 || credential.organizations.length === 0
7
- )[0];
8
- if (credentialConfig) {
9
- const credentialsProvider = CachedAzureDevOpsCredentialsProvider.fromAzureDevOpsCredential(
10
- credentialConfig
11
- );
12
- const credentials = await credentialsProvider.getCredentials();
13
- return {
14
- headers: {
15
- ...credentials?.headers,
16
- ...headers
17
- }
18
- };
19
- }
20
- return { headers };
21
- }
22
-
23
- export { getAzureRequestOptions };
24
- //# sourceMappingURL=deprecated.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deprecated.esm.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":[],"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,sBACJ,oCAAA,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;;;;"}