@backstage/integration 1.5.1-next.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @backstage/integration
2
2
 
3
+ ## 1.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 443afcf7f567: Added `buildGerritGitilesArchiveUrl()` to construct a Gitiles URL to download an archive.
8
+ Gitiles URL that uses an authenticated prefix (`/a/`) can now be parsed by the integration.
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+ - @backstage/config@1.0.8
14
+ - @backstage/errors@1.2.1
15
+
16
+ ## 1.5.1
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+ - @backstage/errors@1.2.1
22
+ - @backstage/config@1.0.8
23
+
3
24
  ## 1.5.1-next.0
4
25
 
5
26
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -121,7 +121,13 @@ function readAwsS3IntegrationConfigs(configs) {
121
121
  return result;
122
122
  }
123
123
 
124
- const _AwsS3Integration = class {
124
+ var __defProp$c = Object.defineProperty;
125
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
126
+ var __publicField$c = (obj, key, value) => {
127
+ __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
128
+ return value;
129
+ };
130
+ const _AwsS3Integration = class _AwsS3Integration {
125
131
  constructor(integrationConfig) {
126
132
  this.integrationConfig = integrationConfig;
127
133
  }
@@ -142,8 +148,7 @@ const _AwsS3Integration = class {
142
148
  return url;
143
149
  }
144
150
  };
145
- let AwsS3Integration = _AwsS3Integration;
146
- AwsS3Integration.factory = ({ config }) => {
151
+ __publicField$c(_AwsS3Integration, "factory", ({ config }) => {
147
152
  var _a;
148
153
  const configs = readAwsS3IntegrationConfigs(
149
154
  (_a = config.getOptionalConfigArray("integrations.awsS3")) != null ? _a : []
@@ -152,7 +157,8 @@ AwsS3Integration.factory = ({ config }) => {
152
157
  configs.map((c) => new _AwsS3Integration(c)),
153
158
  (i) => i.config.host
154
159
  );
155
- };
160
+ });
161
+ let AwsS3Integration = _AwsS3Integration;
156
162
 
157
163
  var __accessCheck = (obj, member, msg) => {
158
164
  if (!member.has(obj))
@@ -174,7 +180,7 @@ var __privateSet = (obj, member, value, setter) => {
174
180
  };
175
181
  var _origin, _owner, _project, _repo, _path, _ref, _baseUrl;
176
182
  const VERSION_PREFIX_GIT_BRANCH = "GB";
177
- const _AzureUrl = class {
183
+ const _AzureUrl = class _AzureUrl {
178
184
  constructor(origin, owner, project, repo, path, ref) {
179
185
  __privateAdd(this, _origin, void 0);
180
186
  __privateAdd(this, _owner, void 0);
@@ -334,7 +340,6 @@ const _AzureUrl = class {
334
340
  return __privateGet(this, _ref);
335
341
  }
336
342
  };
337
- let AzureUrl = _AzureUrl;
338
343
  _origin = new WeakMap();
339
344
  _owner = new WeakMap();
340
345
  _project = new WeakMap();
@@ -342,6 +347,7 @@ _repo = new WeakMap();
342
347
  _path = new WeakMap();
343
348
  _ref = new WeakMap();
344
349
  _baseUrl = new WeakMap();
350
+ let AzureUrl = _AzureUrl;
345
351
 
346
352
  const AZURE_HOST = "dev.azure.com";
347
353
  const isAzureClientSecretCredential = (credential) => {
@@ -390,7 +396,13 @@ function readAzureIntegrationConfigs(configs) {
390
396
  return result;
391
397
  }
392
398
 
393
- const _AzureIntegration = class {
399
+ var __defProp$b = Object.defineProperty;
400
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
401
+ var __publicField$b = (obj, key, value) => {
402
+ __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
403
+ return value;
404
+ };
405
+ const _AzureIntegration = class _AzureIntegration {
394
406
  constructor(integrationConfig) {
395
407
  this.integrationConfig = integrationConfig;
396
408
  }
@@ -435,8 +447,7 @@ const _AzureIntegration = class {
435
447
  return url;
436
448
  }
437
449
  };
438
- let AzureIntegration = _AzureIntegration;
439
- AzureIntegration.factory = ({ config }) => {
450
+ __publicField$b(_AzureIntegration, "factory", ({ config }) => {
440
451
  var _a;
441
452
  const configs = readAzureIntegrationConfigs(
442
453
  (_a = config.getOptionalConfigArray("integrations.azure")) != null ? _a : []
@@ -445,7 +456,8 @@ AzureIntegration.factory = ({ config }) => {
445
456
  configs.map((c) => new _AzureIntegration(c)),
446
457
  (i) => i.config.host
447
458
  );
448
- };
459
+ });
460
+ let AzureIntegration = _AzureIntegration;
449
461
 
450
462
  function getAzureFileFetchUrl(url) {
451
463
  return AzureUrl.fromRepoUrl(url).toFileUrl();
@@ -523,7 +535,13 @@ function readBitbucketIntegrationConfigs(configs) {
523
535
  return result;
524
536
  }
525
537
 
526
- const _BitbucketIntegration = class {
538
+ var __defProp$a = Object.defineProperty;
539
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
540
+ var __publicField$a = (obj, key, value) => {
541
+ __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
542
+ return value;
543
+ };
544
+ const _BitbucketIntegration = class _BitbucketIntegration {
527
545
  constructor(integrationConfig) {
528
546
  this.integrationConfig = integrationConfig;
529
547
  }
@@ -558,8 +576,7 @@ const _BitbucketIntegration = class {
558
576
  return editUrl.toString();
559
577
  }
560
578
  };
561
- let BitbucketIntegration = _BitbucketIntegration;
562
- BitbucketIntegration.factory = ({
579
+ __publicField$a(_BitbucketIntegration, "factory", ({
563
580
  config
564
581
  }) => {
565
582
  var _a, _b, _c;
@@ -576,7 +593,8 @@ BitbucketIntegration.factory = ({
576
593
  configs.map((c) => new _BitbucketIntegration(c)),
577
594
  (i) => i.config.host
578
595
  );
579
- };
596
+ });
597
+ let BitbucketIntegration = _BitbucketIntegration;
580
598
 
581
599
  async function getBitbucketDefaultBranch(url, config) {
582
600
  const { name: repoName, owner: project, resource } = parseGitUrl__default["default"](url);
@@ -683,7 +701,13 @@ function readBitbucketCloudIntegrationConfigs(configs) {
683
701
  return result;
684
702
  }
685
703
 
686
- const _BitbucketCloudIntegration = class {
704
+ var __defProp$9 = Object.defineProperty;
705
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
706
+ var __publicField$9 = (obj, key, value) => {
707
+ __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
708
+ return value;
709
+ };
710
+ const _BitbucketCloudIntegration = class _BitbucketCloudIntegration {
687
711
  constructor(integrationConfig) {
688
712
  this.integrationConfig = integrationConfig;
689
713
  }
@@ -713,8 +737,7 @@ const _BitbucketCloudIntegration = class {
713
737
  return editUrl.toString();
714
738
  }
715
739
  };
716
- let BitbucketCloudIntegration = _BitbucketCloudIntegration;
717
- BitbucketCloudIntegration.factory = ({
740
+ __publicField$9(_BitbucketCloudIntegration, "factory", ({
718
741
  config
719
742
  }) => {
720
743
  var _a;
@@ -725,7 +748,8 @@ BitbucketCloudIntegration.factory = ({
725
748
  configs.map((c) => new _BitbucketCloudIntegration(c)),
726
749
  (i) => i.config.host
727
750
  );
728
- };
751
+ });
752
+ let BitbucketCloudIntegration = _BitbucketCloudIntegration;
729
753
 
730
754
  async function getBitbucketCloudDefaultBranch(url, config) {
731
755
  const { name: repoName, owner: project } = parseGitUrl__default["default"](url);
@@ -818,7 +842,13 @@ function readBitbucketServerIntegrationConfigs(configs) {
818
842
  return configs.map(readBitbucketServerIntegrationConfig);
819
843
  }
820
844
 
821
- const _BitbucketServerIntegration = class {
845
+ var __defProp$8 = Object.defineProperty;
846
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
847
+ var __publicField$8 = (obj, key, value) => {
848
+ __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
849
+ return value;
850
+ };
851
+ const _BitbucketServerIntegration = class _BitbucketServerIntegration {
822
852
  constructor(integrationConfig) {
823
853
  this.integrationConfig = integrationConfig;
824
854
  }
@@ -847,8 +877,7 @@ const _BitbucketServerIntegration = class {
847
877
  return url;
848
878
  }
849
879
  };
850
- let BitbucketServerIntegration = _BitbucketServerIntegration;
851
- BitbucketServerIntegration.factory = ({
880
+ __publicField$8(_BitbucketServerIntegration, "factory", ({
852
881
  config
853
882
  }) => {
854
883
  var _a;
@@ -859,7 +888,8 @@ BitbucketServerIntegration.factory = ({
859
888
  configs.map((c) => new _BitbucketServerIntegration(c)),
860
889
  (i) => i.config.host
861
890
  );
862
- };
891
+ });
892
+ let BitbucketServerIntegration = _BitbucketServerIntegration;
863
893
 
864
894
  async function getBitbucketServerDefaultBranch(url, config) {
865
895
  const { name: repoName, owner: project } = parseGitUrl__default["default"](url);
@@ -973,7 +1003,9 @@ function readGerritIntegrationConfigs(configs) {
973
1003
 
974
1004
  const GERRIT_BODY_PREFIX = ")]}'";
975
1005
  function parseGerritGitilesUrl(config, url) {
976
- const urlPath = url.replace(config.gitilesBaseUrl, "");
1006
+ const baseUrlParse = new URL(config.gitilesBaseUrl);
1007
+ const urlParse = new URL(url);
1008
+ const urlPath = urlParse.pathname.substring(urlParse.pathname.startsWith("/a/") ? 2 : 0).replace(baseUrlParse.pathname, "");
977
1009
  const parts = urlPath.split("/").filter((p) => !!p);
978
1010
  const projectEndIndex = parts.indexOf("+");
979
1011
  if (projectEndIndex <= 0) {
@@ -995,9 +1027,21 @@ function parseGerritGitilesUrl(config, url) {
995
1027
  function buildGerritGitilesUrl(config, project, branch, filePath) {
996
1028
  return `${config.gitilesBaseUrl}/${project}/+/refs/heads/${branch}/${lodash.trimStart(filePath, "/")}`;
997
1029
  }
1030
+ function buildGerritGitilesArchiveUrl(config, project, branch, filePath) {
1031
+ const archiveName = filePath === "/" || filePath === "" ? ".tar.gz" : `/${filePath}.tar.gz`;
1032
+ return `${getGitilesAuthenticationUrl(
1033
+ config
1034
+ )}/${project}/+archive/refs/heads/${branch}${archiveName}`;
1035
+ }
998
1036
  function getAuthenticationPrefix(config) {
999
1037
  return config.password ? "/a/" : "/";
1000
1038
  }
1039
+ function getGitilesAuthenticationUrl(config) {
1040
+ const parsedUrl = new URL(config.gitilesBaseUrl);
1041
+ return `${parsedUrl.protocol}//${parsedUrl.host}${getAuthenticationPrefix(
1042
+ config
1043
+ )}${parsedUrl.pathname.substring(1)}`;
1044
+ }
1001
1045
  function getGerritBranchApiUrl(config, url) {
1002
1046
  const { branch, project } = parseGerritGitilesUrl(config, url);
1003
1047
  return `${config.baseUrl}${getAuthenticationPrefix(
@@ -1046,7 +1090,13 @@ async function parseGerritJsonResponse(response) {
1046
1090
  );
1047
1091
  }
1048
1092
 
1049
- const _GerritIntegration = class {
1093
+ var __defProp$7 = Object.defineProperty;
1094
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1095
+ var __publicField$7 = (obj, key, value) => {
1096
+ __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
1097
+ return value;
1098
+ };
1099
+ const _GerritIntegration = class _GerritIntegration {
1050
1100
  constructor(integrationConfig) {
1051
1101
  this.integrationConfig = integrationConfig;
1052
1102
  }
@@ -1080,8 +1130,7 @@ const _GerritIntegration = class {
1080
1130
  return url;
1081
1131
  }
1082
1132
  };
1083
- let GerritIntegration = _GerritIntegration;
1084
- GerritIntegration.factory = ({ config }) => {
1133
+ __publicField$7(_GerritIntegration, "factory", ({ config }) => {
1085
1134
  var _a;
1086
1135
  const configs = readGerritIntegrationConfigs(
1087
1136
  (_a = config.getOptionalConfigArray("integrations.gerrit")) != null ? _a : []
@@ -1090,7 +1139,8 @@ GerritIntegration.factory = ({ config }) => {
1090
1139
  configs.map((c) => new _GerritIntegration(c)),
1091
1140
  (i) => i.config.host
1092
1141
  );
1093
- };
1142
+ });
1143
+ let GerritIntegration = _GerritIntegration;
1094
1144
 
1095
1145
  function readGiteaConfig(config) {
1096
1146
  const host = config.getString("host");
@@ -1155,7 +1205,13 @@ function getGiteaRequestOptions(config) {
1155
1205
  };
1156
1206
  }
1157
1207
 
1158
- const _GiteaIntegration = class {
1208
+ var __defProp$6 = Object.defineProperty;
1209
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1210
+ var __publicField$6 = (obj, key, value) => {
1211
+ __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
1212
+ return value;
1213
+ };
1214
+ const _GiteaIntegration = class _GiteaIntegration {
1159
1215
  constructor(config) {
1160
1216
  this.config = config;
1161
1217
  }
@@ -1172,8 +1228,7 @@ const _GiteaIntegration = class {
1172
1228
  return getGiteaEditContentsUrl(this.config, url);
1173
1229
  }
1174
1230
  };
1175
- let GiteaIntegration = _GiteaIntegration;
1176
- GiteaIntegration.factory = ({ config }) => {
1231
+ __publicField$6(_GiteaIntegration, "factory", ({ config }) => {
1177
1232
  var _a;
1178
1233
  const configs = (_a = config.getOptionalConfigArray("integrations.gitea")) != null ? _a : [];
1179
1234
  const giteaConfigs = configs.map((c) => readGiteaConfig(c));
@@ -1181,7 +1236,8 @@ GiteaIntegration.factory = ({ config }) => {
1181
1236
  giteaConfigs.map((c) => new _GiteaIntegration(c)),
1182
1237
  (gitea) => gitea.config.host
1183
1238
  );
1184
- };
1239
+ });
1240
+ let GiteaIntegration = _GiteaIntegration;
1185
1241
 
1186
1242
  const GITHUB_HOST = "github.com";
1187
1243
  const GITHUB_API_BASE_URL = "https://api.github.com";
@@ -1265,10 +1321,16 @@ function chooseEndpoint(config, credentials) {
1265
1321
  return "raw";
1266
1322
  }
1267
1323
 
1324
+ var __defProp$5 = Object.defineProperty;
1325
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1326
+ var __publicField$5 = (obj, key, value) => {
1327
+ __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
1328
+ return value;
1329
+ };
1268
1330
  class Cache {
1269
1331
  constructor() {
1270
- this.tokenCache = /* @__PURE__ */ new Map();
1271
- this.isExpired = (date) => luxon.DateTime.local() > date;
1332
+ __publicField$5(this, "tokenCache", /* @__PURE__ */ new Map());
1333
+ __publicField$5(this, "isExpired", (date) => luxon.DateTime.local() > date);
1272
1334
  }
1273
1335
  async getOrCreateToken(owner, repo, supplier) {
1274
1336
  let existingInstallationData = this.tokenCache.get(owner);
@@ -1300,7 +1362,11 @@ const HEADERS = {
1300
1362
  class GithubAppManager {
1301
1363
  // undefined allows all installations
1302
1364
  constructor(config, baseUrl) {
1303
- this.cache = new Cache();
1365
+ __publicField$5(this, "appClient");
1366
+ __publicField$5(this, "baseUrl");
1367
+ __publicField$5(this, "baseAuthConfig");
1368
+ __publicField$5(this, "cache", new Cache());
1369
+ __publicField$5(this, "allowedInstallationOwners");
1304
1370
  this.allowedInstallationOwners = config.allowedInstallationOwners;
1305
1371
  this.baseUrl = baseUrl;
1306
1372
  this.baseAuthConfig = {
@@ -1378,6 +1444,7 @@ class GithubAppManager {
1378
1444
  }
1379
1445
  class GithubAppCredentialsMux {
1380
1446
  constructor(config) {
1447
+ __publicField$5(this, "apps");
1381
1448
  var _a, _b;
1382
1449
  this.apps = (_b = (_a = config.apps) == null ? void 0 : _a.map((ac) => new GithubAppManager(ac, config.apiBaseUrl))) != null ? _b : [];
1383
1450
  }
@@ -1419,7 +1486,7 @@ class GithubAppCredentialsMux {
1419
1486
  return void 0;
1420
1487
  }
1421
1488
  }
1422
- const _SingleInstanceGithubCredentialsProvider = class {
1489
+ const _SingleInstanceGithubCredentialsProvider = class _SingleInstanceGithubCredentialsProvider {
1423
1490
  constructor(githubAppCredentialsMux, token) {
1424
1491
  this.githubAppCredentialsMux = githubAppCredentialsMux;
1425
1492
  this.token = token;
@@ -1461,13 +1528,13 @@ const _SingleInstanceGithubCredentialsProvider = class {
1461
1528
  };
1462
1529
  }
1463
1530
  };
1464
- let SingleInstanceGithubCredentialsProvider = _SingleInstanceGithubCredentialsProvider;
1465
- SingleInstanceGithubCredentialsProvider.create = (config) => {
1531
+ __publicField$5(_SingleInstanceGithubCredentialsProvider, "create", (config) => {
1466
1532
  return new _SingleInstanceGithubCredentialsProvider(
1467
1533
  new GithubAppCredentialsMux(config),
1468
1534
  config.token
1469
1535
  );
1470
- };
1536
+ });
1537
+ let SingleInstanceGithubCredentialsProvider = _SingleInstanceGithubCredentialsProvider;
1471
1538
 
1472
1539
  class DefaultGithubCredentialsProvider {
1473
1540
  constructor(providers) {
@@ -1517,7 +1584,13 @@ class DefaultGithubCredentialsProvider {
1517
1584
  }
1518
1585
  }
1519
1586
 
1520
- const _GithubIntegration = class {
1587
+ var __defProp$4 = Object.defineProperty;
1588
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1589
+ var __publicField$4 = (obj, key, value) => {
1590
+ __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
1591
+ return value;
1592
+ };
1593
+ const _GithubIntegration = class _GithubIntegration {
1521
1594
  constructor(integrationConfig) {
1522
1595
  this.integrationConfig = integrationConfig;
1523
1596
  }
@@ -1537,8 +1610,7 @@ const _GithubIntegration = class {
1537
1610
  return replaceGithubUrlType(url, "edit");
1538
1611
  }
1539
1612
  };
1540
- let GithubIntegration = _GithubIntegration;
1541
- GithubIntegration.factory = ({ config }) => {
1613
+ __publicField$4(_GithubIntegration, "factory", ({ config }) => {
1542
1614
  var _a;
1543
1615
  const configs = readGithubIntegrationConfigs(
1544
1616
  (_a = config.getOptionalConfigArray("integrations.github")) != null ? _a : []
@@ -1547,7 +1619,8 @@ GithubIntegration.factory = ({ config }) => {
1547
1619
  configs.map((c) => new _GithubIntegration(c)),
1548
1620
  (i) => i.config.host
1549
1621
  );
1550
- };
1622
+ });
1623
+ let GithubIntegration = _GithubIntegration;
1551
1624
  function replaceGithubUrlType(url, type) {
1552
1625
  return url.replace(
1553
1626
  /\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,
@@ -1557,6 +1630,12 @@ function replaceGithubUrlType(url, type) {
1557
1630
  );
1558
1631
  }
1559
1632
 
1633
+ var __defProp$3 = Object.defineProperty;
1634
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1635
+ var __publicField$3 = (obj, key, value) => {
1636
+ __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
1637
+ return value;
1638
+ };
1560
1639
  const getGitHubFileFetchUrl = getGithubFileFetchUrl;
1561
1640
  class GitHubIntegration extends GithubIntegration {
1562
1641
  constructor(integrationConfig) {
@@ -1566,7 +1645,7 @@ class GitHubIntegration extends GithubIntegration {
1566
1645
  return super.config;
1567
1646
  }
1568
1647
  }
1569
- GitHubIntegration.factory = GithubIntegration.factory;
1648
+ __publicField$3(GitHubIntegration, "factory", GithubIntegration.factory);
1570
1649
  const readGitHubIntegrationConfig = readGithubIntegrationConfig;
1571
1650
  const readGitHubIntegrationConfigs = readGithubIntegrationConfigs;
1572
1651
  const replaceGitHubUrlType = replaceGithubUrlType;
@@ -1686,7 +1765,13 @@ async function getProjectId(target, config) {
1686
1765
  }
1687
1766
  }
1688
1767
 
1689
- const _GitLabIntegration = class {
1768
+ var __defProp$2 = Object.defineProperty;
1769
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1770
+ var __publicField$2 = (obj, key, value) => {
1771
+ __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
1772
+ return value;
1773
+ };
1774
+ const _GitLabIntegration = class _GitLabIntegration {
1690
1775
  constructor(integrationConfig) {
1691
1776
  this.integrationConfig = integrationConfig;
1692
1777
  }
@@ -1706,8 +1791,7 @@ const _GitLabIntegration = class {
1706
1791
  return replaceGitLabUrlType(url, "edit");
1707
1792
  }
1708
1793
  };
1709
- let GitLabIntegration = _GitLabIntegration;
1710
- GitLabIntegration.factory = ({ config }) => {
1794
+ __publicField$2(_GitLabIntegration, "factory", ({ config }) => {
1711
1795
  var _a;
1712
1796
  const configs = readGitLabIntegrationConfigs(
1713
1797
  (_a = config.getOptionalConfigArray("integrations.gitlab")) != null ? _a : []
@@ -1716,12 +1800,19 @@ GitLabIntegration.factory = ({ config }) => {
1716
1800
  configs.map((c) => new _GitLabIntegration(c)),
1717
1801
  (i) => i.config.host
1718
1802
  );
1719
- };
1803
+ });
1804
+ let GitLabIntegration = _GitLabIntegration;
1720
1805
  function replaceGitLabUrlType(url, type) {
1721
1806
  return url.replace(/\/\-\/(blob|tree|edit)\//, `/-/${type}/`);
1722
1807
  }
1723
1808
 
1724
- const _SingleInstanceGitlabCredentialsProvider = class {
1809
+ var __defProp$1 = Object.defineProperty;
1810
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1811
+ var __publicField$1 = (obj, key, value) => {
1812
+ __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
1813
+ return value;
1814
+ };
1815
+ const _SingleInstanceGitlabCredentialsProvider = class _SingleInstanceGitlabCredentialsProvider {
1725
1816
  constructor(token) {
1726
1817
  this.token = token;
1727
1818
  }
@@ -1737,10 +1828,10 @@ const _SingleInstanceGitlabCredentialsProvider = class {
1737
1828
  };
1738
1829
  }
1739
1830
  };
1740
- let SingleInstanceGitlabCredentialsProvider = _SingleInstanceGitlabCredentialsProvider;
1741
- SingleInstanceGitlabCredentialsProvider.create = (config) => {
1831
+ __publicField$1(_SingleInstanceGitlabCredentialsProvider, "create", (config) => {
1742
1832
  return new _SingleInstanceGitlabCredentialsProvider(config.token);
1743
- };
1833
+ });
1834
+ let SingleInstanceGitlabCredentialsProvider = _SingleInstanceGitlabCredentialsProvider;
1744
1835
 
1745
1836
  class DefaultGitlabCredentialsProvider {
1746
1837
  constructor(providers) {
@@ -1778,7 +1869,17 @@ function readGoogleGcsIntegrationConfig(config) {
1778
1869
  return { clientEmail, privateKey };
1779
1870
  }
1780
1871
 
1872
+ var __defProp = Object.defineProperty;
1873
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1874
+ var __publicField = (obj, key, value) => {
1875
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1876
+ return value;
1877
+ };
1781
1878
  class ScmIntegrations {
1879
+ constructor(integrationsByType) {
1880
+ __publicField(this, "byType");
1881
+ this.byType = integrationsByType;
1882
+ }
1782
1883
  static fromConfig(config) {
1783
1884
  return new ScmIntegrations({
1784
1885
  awsS3: AwsS3Integration.factory({ config }),
@@ -1792,9 +1893,6 @@ class ScmIntegrations {
1792
1893
  gitea: GiteaIntegration.factory({ config })
1793
1894
  });
1794
1895
  }
1795
- constructor(integrationsByType) {
1796
- this.byType = integrationsByType;
1797
- }
1798
1896
  get awsS3() {
1799
1897
  return this.byType.awsS3;
1800
1898
  }
@@ -1876,6 +1974,7 @@ exports.GithubAppCredentialsMux = GithubAppCredentialsMux;
1876
1974
  exports.GithubIntegration = GithubIntegration;
1877
1975
  exports.ScmIntegrations = ScmIntegrations;
1878
1976
  exports.SingleInstanceGithubCredentialsProvider = SingleInstanceGithubCredentialsProvider;
1977
+ exports.buildGerritGitilesArchiveUrl = buildGerritGitilesArchiveUrl;
1879
1978
  exports.defaultScmResolveUrl = defaultScmResolveUrl;
1880
1979
  exports.getAzureCommitsUrl = getAzureCommitsUrl;
1881
1980
  exports.getAzureDownloadUrl = getAzureDownloadUrl;