@backstage/integration 1.5.1-next.0 → 1.5.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.
- package/CHANGELOG.md +8 -0
- package/dist/index.cjs.js +137 -53
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +137 -53
- package/dist/index.esm.js.map +1 -1
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -112,7 +112,13 @@ function readAwsS3IntegrationConfigs(configs) {
|
|
|
112
112
|
return result;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
var __defProp$c = Object.defineProperty;
|
|
116
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
117
|
+
var __publicField$c = (obj, key, value) => {
|
|
118
|
+
__defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
119
|
+
return value;
|
|
120
|
+
};
|
|
121
|
+
const _AwsS3Integration = class _AwsS3Integration {
|
|
116
122
|
constructor(integrationConfig) {
|
|
117
123
|
this.integrationConfig = integrationConfig;
|
|
118
124
|
}
|
|
@@ -133,8 +139,7 @@ const _AwsS3Integration = class {
|
|
|
133
139
|
return url;
|
|
134
140
|
}
|
|
135
141
|
};
|
|
136
|
-
|
|
137
|
-
AwsS3Integration.factory = ({ config }) => {
|
|
142
|
+
__publicField$c(_AwsS3Integration, "factory", ({ config }) => {
|
|
138
143
|
var _a;
|
|
139
144
|
const configs = readAwsS3IntegrationConfigs(
|
|
140
145
|
(_a = config.getOptionalConfigArray("integrations.awsS3")) != null ? _a : []
|
|
@@ -143,7 +148,8 @@ AwsS3Integration.factory = ({ config }) => {
|
|
|
143
148
|
configs.map((c) => new _AwsS3Integration(c)),
|
|
144
149
|
(i) => i.config.host
|
|
145
150
|
);
|
|
146
|
-
};
|
|
151
|
+
});
|
|
152
|
+
let AwsS3Integration = _AwsS3Integration;
|
|
147
153
|
|
|
148
154
|
var __accessCheck = (obj, member, msg) => {
|
|
149
155
|
if (!member.has(obj))
|
|
@@ -165,7 +171,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
165
171
|
};
|
|
166
172
|
var _origin, _owner, _project, _repo, _path, _ref, _baseUrl;
|
|
167
173
|
const VERSION_PREFIX_GIT_BRANCH = "GB";
|
|
168
|
-
const _AzureUrl = class {
|
|
174
|
+
const _AzureUrl = class _AzureUrl {
|
|
169
175
|
constructor(origin, owner, project, repo, path, ref) {
|
|
170
176
|
__privateAdd(this, _origin, void 0);
|
|
171
177
|
__privateAdd(this, _owner, void 0);
|
|
@@ -325,7 +331,6 @@ const _AzureUrl = class {
|
|
|
325
331
|
return __privateGet(this, _ref);
|
|
326
332
|
}
|
|
327
333
|
};
|
|
328
|
-
let AzureUrl = _AzureUrl;
|
|
329
334
|
_origin = new WeakMap();
|
|
330
335
|
_owner = new WeakMap();
|
|
331
336
|
_project = new WeakMap();
|
|
@@ -333,6 +338,7 @@ _repo = new WeakMap();
|
|
|
333
338
|
_path = new WeakMap();
|
|
334
339
|
_ref = new WeakMap();
|
|
335
340
|
_baseUrl = new WeakMap();
|
|
341
|
+
let AzureUrl = _AzureUrl;
|
|
336
342
|
|
|
337
343
|
const AZURE_HOST = "dev.azure.com";
|
|
338
344
|
const isAzureClientSecretCredential = (credential) => {
|
|
@@ -381,7 +387,13 @@ function readAzureIntegrationConfigs(configs) {
|
|
|
381
387
|
return result;
|
|
382
388
|
}
|
|
383
389
|
|
|
384
|
-
|
|
390
|
+
var __defProp$b = Object.defineProperty;
|
|
391
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
392
|
+
var __publicField$b = (obj, key, value) => {
|
|
393
|
+
__defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
394
|
+
return value;
|
|
395
|
+
};
|
|
396
|
+
const _AzureIntegration = class _AzureIntegration {
|
|
385
397
|
constructor(integrationConfig) {
|
|
386
398
|
this.integrationConfig = integrationConfig;
|
|
387
399
|
}
|
|
@@ -426,8 +438,7 @@ const _AzureIntegration = class {
|
|
|
426
438
|
return url;
|
|
427
439
|
}
|
|
428
440
|
};
|
|
429
|
-
|
|
430
|
-
AzureIntegration.factory = ({ config }) => {
|
|
441
|
+
__publicField$b(_AzureIntegration, "factory", ({ config }) => {
|
|
431
442
|
var _a;
|
|
432
443
|
const configs = readAzureIntegrationConfigs(
|
|
433
444
|
(_a = config.getOptionalConfigArray("integrations.azure")) != null ? _a : []
|
|
@@ -436,7 +447,8 @@ AzureIntegration.factory = ({ config }) => {
|
|
|
436
447
|
configs.map((c) => new _AzureIntegration(c)),
|
|
437
448
|
(i) => i.config.host
|
|
438
449
|
);
|
|
439
|
-
};
|
|
450
|
+
});
|
|
451
|
+
let AzureIntegration = _AzureIntegration;
|
|
440
452
|
|
|
441
453
|
function getAzureFileFetchUrl(url) {
|
|
442
454
|
return AzureUrl.fromRepoUrl(url).toFileUrl();
|
|
@@ -514,7 +526,13 @@ function readBitbucketIntegrationConfigs(configs) {
|
|
|
514
526
|
return result;
|
|
515
527
|
}
|
|
516
528
|
|
|
517
|
-
|
|
529
|
+
var __defProp$a = Object.defineProperty;
|
|
530
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
531
|
+
var __publicField$a = (obj, key, value) => {
|
|
532
|
+
__defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
533
|
+
return value;
|
|
534
|
+
};
|
|
535
|
+
const _BitbucketIntegration = class _BitbucketIntegration {
|
|
518
536
|
constructor(integrationConfig) {
|
|
519
537
|
this.integrationConfig = integrationConfig;
|
|
520
538
|
}
|
|
@@ -549,8 +567,7 @@ const _BitbucketIntegration = class {
|
|
|
549
567
|
return editUrl.toString();
|
|
550
568
|
}
|
|
551
569
|
};
|
|
552
|
-
|
|
553
|
-
BitbucketIntegration.factory = ({
|
|
570
|
+
__publicField$a(_BitbucketIntegration, "factory", ({
|
|
554
571
|
config
|
|
555
572
|
}) => {
|
|
556
573
|
var _a, _b, _c;
|
|
@@ -567,7 +584,8 @@ BitbucketIntegration.factory = ({
|
|
|
567
584
|
configs.map((c) => new _BitbucketIntegration(c)),
|
|
568
585
|
(i) => i.config.host
|
|
569
586
|
);
|
|
570
|
-
};
|
|
587
|
+
});
|
|
588
|
+
let BitbucketIntegration = _BitbucketIntegration;
|
|
571
589
|
|
|
572
590
|
async function getBitbucketDefaultBranch(url, config) {
|
|
573
591
|
const { name: repoName, owner: project, resource } = parseGitUrl(url);
|
|
@@ -674,7 +692,13 @@ function readBitbucketCloudIntegrationConfigs(configs) {
|
|
|
674
692
|
return result;
|
|
675
693
|
}
|
|
676
694
|
|
|
677
|
-
|
|
695
|
+
var __defProp$9 = Object.defineProperty;
|
|
696
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
697
|
+
var __publicField$9 = (obj, key, value) => {
|
|
698
|
+
__defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
699
|
+
return value;
|
|
700
|
+
};
|
|
701
|
+
const _BitbucketCloudIntegration = class _BitbucketCloudIntegration {
|
|
678
702
|
constructor(integrationConfig) {
|
|
679
703
|
this.integrationConfig = integrationConfig;
|
|
680
704
|
}
|
|
@@ -704,8 +728,7 @@ const _BitbucketCloudIntegration = class {
|
|
|
704
728
|
return editUrl.toString();
|
|
705
729
|
}
|
|
706
730
|
};
|
|
707
|
-
|
|
708
|
-
BitbucketCloudIntegration.factory = ({
|
|
731
|
+
__publicField$9(_BitbucketCloudIntegration, "factory", ({
|
|
709
732
|
config
|
|
710
733
|
}) => {
|
|
711
734
|
var _a;
|
|
@@ -716,7 +739,8 @@ BitbucketCloudIntegration.factory = ({
|
|
|
716
739
|
configs.map((c) => new _BitbucketCloudIntegration(c)),
|
|
717
740
|
(i) => i.config.host
|
|
718
741
|
);
|
|
719
|
-
};
|
|
742
|
+
});
|
|
743
|
+
let BitbucketCloudIntegration = _BitbucketCloudIntegration;
|
|
720
744
|
|
|
721
745
|
async function getBitbucketCloudDefaultBranch(url, config) {
|
|
722
746
|
const { name: repoName, owner: project } = parseGitUrl(url);
|
|
@@ -809,7 +833,13 @@ function readBitbucketServerIntegrationConfigs(configs) {
|
|
|
809
833
|
return configs.map(readBitbucketServerIntegrationConfig);
|
|
810
834
|
}
|
|
811
835
|
|
|
812
|
-
|
|
836
|
+
var __defProp$8 = Object.defineProperty;
|
|
837
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
838
|
+
var __publicField$8 = (obj, key, value) => {
|
|
839
|
+
__defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
840
|
+
return value;
|
|
841
|
+
};
|
|
842
|
+
const _BitbucketServerIntegration = class _BitbucketServerIntegration {
|
|
813
843
|
constructor(integrationConfig) {
|
|
814
844
|
this.integrationConfig = integrationConfig;
|
|
815
845
|
}
|
|
@@ -838,8 +868,7 @@ const _BitbucketServerIntegration = class {
|
|
|
838
868
|
return url;
|
|
839
869
|
}
|
|
840
870
|
};
|
|
841
|
-
|
|
842
|
-
BitbucketServerIntegration.factory = ({
|
|
871
|
+
__publicField$8(_BitbucketServerIntegration, "factory", ({
|
|
843
872
|
config
|
|
844
873
|
}) => {
|
|
845
874
|
var _a;
|
|
@@ -850,7 +879,8 @@ BitbucketServerIntegration.factory = ({
|
|
|
850
879
|
configs.map((c) => new _BitbucketServerIntegration(c)),
|
|
851
880
|
(i) => i.config.host
|
|
852
881
|
);
|
|
853
|
-
};
|
|
882
|
+
});
|
|
883
|
+
let BitbucketServerIntegration = _BitbucketServerIntegration;
|
|
854
884
|
|
|
855
885
|
async function getBitbucketServerDefaultBranch(url, config) {
|
|
856
886
|
const { name: repoName, owner: project } = parseGitUrl(url);
|
|
@@ -1037,7 +1067,13 @@ async function parseGerritJsonResponse(response) {
|
|
|
1037
1067
|
);
|
|
1038
1068
|
}
|
|
1039
1069
|
|
|
1040
|
-
|
|
1070
|
+
var __defProp$7 = Object.defineProperty;
|
|
1071
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1072
|
+
var __publicField$7 = (obj, key, value) => {
|
|
1073
|
+
__defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1074
|
+
return value;
|
|
1075
|
+
};
|
|
1076
|
+
const _GerritIntegration = class _GerritIntegration {
|
|
1041
1077
|
constructor(integrationConfig) {
|
|
1042
1078
|
this.integrationConfig = integrationConfig;
|
|
1043
1079
|
}
|
|
@@ -1071,8 +1107,7 @@ const _GerritIntegration = class {
|
|
|
1071
1107
|
return url;
|
|
1072
1108
|
}
|
|
1073
1109
|
};
|
|
1074
|
-
|
|
1075
|
-
GerritIntegration.factory = ({ config }) => {
|
|
1110
|
+
__publicField$7(_GerritIntegration, "factory", ({ config }) => {
|
|
1076
1111
|
var _a;
|
|
1077
1112
|
const configs = readGerritIntegrationConfigs(
|
|
1078
1113
|
(_a = config.getOptionalConfigArray("integrations.gerrit")) != null ? _a : []
|
|
@@ -1081,7 +1116,8 @@ GerritIntegration.factory = ({ config }) => {
|
|
|
1081
1116
|
configs.map((c) => new _GerritIntegration(c)),
|
|
1082
1117
|
(i) => i.config.host
|
|
1083
1118
|
);
|
|
1084
|
-
};
|
|
1119
|
+
});
|
|
1120
|
+
let GerritIntegration = _GerritIntegration;
|
|
1085
1121
|
|
|
1086
1122
|
function readGiteaConfig(config) {
|
|
1087
1123
|
const host = config.getString("host");
|
|
@@ -1146,7 +1182,13 @@ function getGiteaRequestOptions(config) {
|
|
|
1146
1182
|
};
|
|
1147
1183
|
}
|
|
1148
1184
|
|
|
1149
|
-
|
|
1185
|
+
var __defProp$6 = Object.defineProperty;
|
|
1186
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1187
|
+
var __publicField$6 = (obj, key, value) => {
|
|
1188
|
+
__defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1189
|
+
return value;
|
|
1190
|
+
};
|
|
1191
|
+
const _GiteaIntegration = class _GiteaIntegration {
|
|
1150
1192
|
constructor(config) {
|
|
1151
1193
|
this.config = config;
|
|
1152
1194
|
}
|
|
@@ -1163,8 +1205,7 @@ const _GiteaIntegration = class {
|
|
|
1163
1205
|
return getGiteaEditContentsUrl(this.config, url);
|
|
1164
1206
|
}
|
|
1165
1207
|
};
|
|
1166
|
-
|
|
1167
|
-
GiteaIntegration.factory = ({ config }) => {
|
|
1208
|
+
__publicField$6(_GiteaIntegration, "factory", ({ config }) => {
|
|
1168
1209
|
var _a;
|
|
1169
1210
|
const configs = (_a = config.getOptionalConfigArray("integrations.gitea")) != null ? _a : [];
|
|
1170
1211
|
const giteaConfigs = configs.map((c) => readGiteaConfig(c));
|
|
@@ -1172,7 +1213,8 @@ GiteaIntegration.factory = ({ config }) => {
|
|
|
1172
1213
|
giteaConfigs.map((c) => new _GiteaIntegration(c)),
|
|
1173
1214
|
(gitea) => gitea.config.host
|
|
1174
1215
|
);
|
|
1175
|
-
};
|
|
1216
|
+
});
|
|
1217
|
+
let GiteaIntegration = _GiteaIntegration;
|
|
1176
1218
|
|
|
1177
1219
|
const GITHUB_HOST = "github.com";
|
|
1178
1220
|
const GITHUB_API_BASE_URL = "https://api.github.com";
|
|
@@ -1256,10 +1298,16 @@ function chooseEndpoint(config, credentials) {
|
|
|
1256
1298
|
return "raw";
|
|
1257
1299
|
}
|
|
1258
1300
|
|
|
1301
|
+
var __defProp$5 = Object.defineProperty;
|
|
1302
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1303
|
+
var __publicField$5 = (obj, key, value) => {
|
|
1304
|
+
__defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1305
|
+
return value;
|
|
1306
|
+
};
|
|
1259
1307
|
class Cache {
|
|
1260
1308
|
constructor() {
|
|
1261
|
-
this
|
|
1262
|
-
this
|
|
1309
|
+
__publicField$5(this, "tokenCache", /* @__PURE__ */ new Map());
|
|
1310
|
+
__publicField$5(this, "isExpired", (date) => DateTime.local() > date);
|
|
1263
1311
|
}
|
|
1264
1312
|
async getOrCreateToken(owner, repo, supplier) {
|
|
1265
1313
|
let existingInstallationData = this.tokenCache.get(owner);
|
|
@@ -1291,7 +1339,11 @@ const HEADERS = {
|
|
|
1291
1339
|
class GithubAppManager {
|
|
1292
1340
|
// undefined allows all installations
|
|
1293
1341
|
constructor(config, baseUrl) {
|
|
1294
|
-
this
|
|
1342
|
+
__publicField$5(this, "appClient");
|
|
1343
|
+
__publicField$5(this, "baseUrl");
|
|
1344
|
+
__publicField$5(this, "baseAuthConfig");
|
|
1345
|
+
__publicField$5(this, "cache", new Cache());
|
|
1346
|
+
__publicField$5(this, "allowedInstallationOwners");
|
|
1295
1347
|
this.allowedInstallationOwners = config.allowedInstallationOwners;
|
|
1296
1348
|
this.baseUrl = baseUrl;
|
|
1297
1349
|
this.baseAuthConfig = {
|
|
@@ -1369,6 +1421,7 @@ class GithubAppManager {
|
|
|
1369
1421
|
}
|
|
1370
1422
|
class GithubAppCredentialsMux {
|
|
1371
1423
|
constructor(config) {
|
|
1424
|
+
__publicField$5(this, "apps");
|
|
1372
1425
|
var _a, _b;
|
|
1373
1426
|
this.apps = (_b = (_a = config.apps) == null ? void 0 : _a.map((ac) => new GithubAppManager(ac, config.apiBaseUrl))) != null ? _b : [];
|
|
1374
1427
|
}
|
|
@@ -1410,7 +1463,7 @@ class GithubAppCredentialsMux {
|
|
|
1410
1463
|
return void 0;
|
|
1411
1464
|
}
|
|
1412
1465
|
}
|
|
1413
|
-
const _SingleInstanceGithubCredentialsProvider = class {
|
|
1466
|
+
const _SingleInstanceGithubCredentialsProvider = class _SingleInstanceGithubCredentialsProvider {
|
|
1414
1467
|
constructor(githubAppCredentialsMux, token) {
|
|
1415
1468
|
this.githubAppCredentialsMux = githubAppCredentialsMux;
|
|
1416
1469
|
this.token = token;
|
|
@@ -1452,13 +1505,13 @@ const _SingleInstanceGithubCredentialsProvider = class {
|
|
|
1452
1505
|
};
|
|
1453
1506
|
}
|
|
1454
1507
|
};
|
|
1455
|
-
|
|
1456
|
-
SingleInstanceGithubCredentialsProvider.create = (config) => {
|
|
1508
|
+
__publicField$5(_SingleInstanceGithubCredentialsProvider, "create", (config) => {
|
|
1457
1509
|
return new _SingleInstanceGithubCredentialsProvider(
|
|
1458
1510
|
new GithubAppCredentialsMux(config),
|
|
1459
1511
|
config.token
|
|
1460
1512
|
);
|
|
1461
|
-
};
|
|
1513
|
+
});
|
|
1514
|
+
let SingleInstanceGithubCredentialsProvider = _SingleInstanceGithubCredentialsProvider;
|
|
1462
1515
|
|
|
1463
1516
|
class DefaultGithubCredentialsProvider {
|
|
1464
1517
|
constructor(providers) {
|
|
@@ -1508,7 +1561,13 @@ class DefaultGithubCredentialsProvider {
|
|
|
1508
1561
|
}
|
|
1509
1562
|
}
|
|
1510
1563
|
|
|
1511
|
-
|
|
1564
|
+
var __defProp$4 = Object.defineProperty;
|
|
1565
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1566
|
+
var __publicField$4 = (obj, key, value) => {
|
|
1567
|
+
__defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1568
|
+
return value;
|
|
1569
|
+
};
|
|
1570
|
+
const _GithubIntegration = class _GithubIntegration {
|
|
1512
1571
|
constructor(integrationConfig) {
|
|
1513
1572
|
this.integrationConfig = integrationConfig;
|
|
1514
1573
|
}
|
|
@@ -1528,8 +1587,7 @@ const _GithubIntegration = class {
|
|
|
1528
1587
|
return replaceGithubUrlType(url, "edit");
|
|
1529
1588
|
}
|
|
1530
1589
|
};
|
|
1531
|
-
|
|
1532
|
-
GithubIntegration.factory = ({ config }) => {
|
|
1590
|
+
__publicField$4(_GithubIntegration, "factory", ({ config }) => {
|
|
1533
1591
|
var _a;
|
|
1534
1592
|
const configs = readGithubIntegrationConfigs(
|
|
1535
1593
|
(_a = config.getOptionalConfigArray("integrations.github")) != null ? _a : []
|
|
@@ -1538,7 +1596,8 @@ GithubIntegration.factory = ({ config }) => {
|
|
|
1538
1596
|
configs.map((c) => new _GithubIntegration(c)),
|
|
1539
1597
|
(i) => i.config.host
|
|
1540
1598
|
);
|
|
1541
|
-
};
|
|
1599
|
+
});
|
|
1600
|
+
let GithubIntegration = _GithubIntegration;
|
|
1542
1601
|
function replaceGithubUrlType(url, type) {
|
|
1543
1602
|
return url.replace(
|
|
1544
1603
|
/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,
|
|
@@ -1548,6 +1607,12 @@ function replaceGithubUrlType(url, type) {
|
|
|
1548
1607
|
);
|
|
1549
1608
|
}
|
|
1550
1609
|
|
|
1610
|
+
var __defProp$3 = Object.defineProperty;
|
|
1611
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1612
|
+
var __publicField$3 = (obj, key, value) => {
|
|
1613
|
+
__defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1614
|
+
return value;
|
|
1615
|
+
};
|
|
1551
1616
|
const getGitHubFileFetchUrl = getGithubFileFetchUrl;
|
|
1552
1617
|
class GitHubIntegration extends GithubIntegration {
|
|
1553
1618
|
constructor(integrationConfig) {
|
|
@@ -1557,7 +1622,7 @@ class GitHubIntegration extends GithubIntegration {
|
|
|
1557
1622
|
return super.config;
|
|
1558
1623
|
}
|
|
1559
1624
|
}
|
|
1560
|
-
GitHubIntegration
|
|
1625
|
+
__publicField$3(GitHubIntegration, "factory", GithubIntegration.factory);
|
|
1561
1626
|
const readGitHubIntegrationConfig = readGithubIntegrationConfig;
|
|
1562
1627
|
const readGitHubIntegrationConfigs = readGithubIntegrationConfigs;
|
|
1563
1628
|
const replaceGitHubUrlType = replaceGithubUrlType;
|
|
@@ -1677,7 +1742,13 @@ async function getProjectId(target, config) {
|
|
|
1677
1742
|
}
|
|
1678
1743
|
}
|
|
1679
1744
|
|
|
1680
|
-
|
|
1745
|
+
var __defProp$2 = Object.defineProperty;
|
|
1746
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1747
|
+
var __publicField$2 = (obj, key, value) => {
|
|
1748
|
+
__defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1749
|
+
return value;
|
|
1750
|
+
};
|
|
1751
|
+
const _GitLabIntegration = class _GitLabIntegration {
|
|
1681
1752
|
constructor(integrationConfig) {
|
|
1682
1753
|
this.integrationConfig = integrationConfig;
|
|
1683
1754
|
}
|
|
@@ -1697,8 +1768,7 @@ const _GitLabIntegration = class {
|
|
|
1697
1768
|
return replaceGitLabUrlType(url, "edit");
|
|
1698
1769
|
}
|
|
1699
1770
|
};
|
|
1700
|
-
|
|
1701
|
-
GitLabIntegration.factory = ({ config }) => {
|
|
1771
|
+
__publicField$2(_GitLabIntegration, "factory", ({ config }) => {
|
|
1702
1772
|
var _a;
|
|
1703
1773
|
const configs = readGitLabIntegrationConfigs(
|
|
1704
1774
|
(_a = config.getOptionalConfigArray("integrations.gitlab")) != null ? _a : []
|
|
@@ -1707,12 +1777,19 @@ GitLabIntegration.factory = ({ config }) => {
|
|
|
1707
1777
|
configs.map((c) => new _GitLabIntegration(c)),
|
|
1708
1778
|
(i) => i.config.host
|
|
1709
1779
|
);
|
|
1710
|
-
};
|
|
1780
|
+
});
|
|
1781
|
+
let GitLabIntegration = _GitLabIntegration;
|
|
1711
1782
|
function replaceGitLabUrlType(url, type) {
|
|
1712
1783
|
return url.replace(/\/\-\/(blob|tree|edit)\//, `/-/${type}/`);
|
|
1713
1784
|
}
|
|
1714
1785
|
|
|
1715
|
-
|
|
1786
|
+
var __defProp$1 = Object.defineProperty;
|
|
1787
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1788
|
+
var __publicField$1 = (obj, key, value) => {
|
|
1789
|
+
__defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1790
|
+
return value;
|
|
1791
|
+
};
|
|
1792
|
+
const _SingleInstanceGitlabCredentialsProvider = class _SingleInstanceGitlabCredentialsProvider {
|
|
1716
1793
|
constructor(token) {
|
|
1717
1794
|
this.token = token;
|
|
1718
1795
|
}
|
|
@@ -1728,10 +1805,10 @@ const _SingleInstanceGitlabCredentialsProvider = class {
|
|
|
1728
1805
|
};
|
|
1729
1806
|
}
|
|
1730
1807
|
};
|
|
1731
|
-
|
|
1732
|
-
SingleInstanceGitlabCredentialsProvider.create = (config) => {
|
|
1808
|
+
__publicField$1(_SingleInstanceGitlabCredentialsProvider, "create", (config) => {
|
|
1733
1809
|
return new _SingleInstanceGitlabCredentialsProvider(config.token);
|
|
1734
|
-
};
|
|
1810
|
+
});
|
|
1811
|
+
let SingleInstanceGitlabCredentialsProvider = _SingleInstanceGitlabCredentialsProvider;
|
|
1735
1812
|
|
|
1736
1813
|
class DefaultGitlabCredentialsProvider {
|
|
1737
1814
|
constructor(providers) {
|
|
@@ -1769,7 +1846,17 @@ function readGoogleGcsIntegrationConfig(config) {
|
|
|
1769
1846
|
return { clientEmail, privateKey };
|
|
1770
1847
|
}
|
|
1771
1848
|
|
|
1849
|
+
var __defProp = Object.defineProperty;
|
|
1850
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1851
|
+
var __publicField = (obj, key, value) => {
|
|
1852
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1853
|
+
return value;
|
|
1854
|
+
};
|
|
1772
1855
|
class ScmIntegrations {
|
|
1856
|
+
constructor(integrationsByType) {
|
|
1857
|
+
__publicField(this, "byType");
|
|
1858
|
+
this.byType = integrationsByType;
|
|
1859
|
+
}
|
|
1773
1860
|
static fromConfig(config) {
|
|
1774
1861
|
return new ScmIntegrations({
|
|
1775
1862
|
awsS3: AwsS3Integration.factory({ config }),
|
|
@@ -1783,9 +1870,6 @@ class ScmIntegrations {
|
|
|
1783
1870
|
gitea: GiteaIntegration.factory({ config })
|
|
1784
1871
|
});
|
|
1785
1872
|
}
|
|
1786
|
-
constructor(integrationsByType) {
|
|
1787
|
-
this.byType = integrationsByType;
|
|
1788
|
-
}
|
|
1789
1873
|
get awsS3() {
|
|
1790
1874
|
return this.byType.awsS3;
|
|
1791
1875
|
}
|