@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/CHANGELOG.md
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -121,7 +121,13 @@ function readAwsS3IntegrationConfigs(configs) {
|
|
|
121
121
|
return result;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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);
|
|
@@ -1046,7 +1076,13 @@ async function parseGerritJsonResponse(response) {
|
|
|
1046
1076
|
);
|
|
1047
1077
|
}
|
|
1048
1078
|
|
|
1049
|
-
|
|
1079
|
+
var __defProp$7 = Object.defineProperty;
|
|
1080
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1081
|
+
var __publicField$7 = (obj, key, value) => {
|
|
1082
|
+
__defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1083
|
+
return value;
|
|
1084
|
+
};
|
|
1085
|
+
const _GerritIntegration = class _GerritIntegration {
|
|
1050
1086
|
constructor(integrationConfig) {
|
|
1051
1087
|
this.integrationConfig = integrationConfig;
|
|
1052
1088
|
}
|
|
@@ -1080,8 +1116,7 @@ const _GerritIntegration = class {
|
|
|
1080
1116
|
return url;
|
|
1081
1117
|
}
|
|
1082
1118
|
};
|
|
1083
|
-
|
|
1084
|
-
GerritIntegration.factory = ({ config }) => {
|
|
1119
|
+
__publicField$7(_GerritIntegration, "factory", ({ config }) => {
|
|
1085
1120
|
var _a;
|
|
1086
1121
|
const configs = readGerritIntegrationConfigs(
|
|
1087
1122
|
(_a = config.getOptionalConfigArray("integrations.gerrit")) != null ? _a : []
|
|
@@ -1090,7 +1125,8 @@ GerritIntegration.factory = ({ config }) => {
|
|
|
1090
1125
|
configs.map((c) => new _GerritIntegration(c)),
|
|
1091
1126
|
(i) => i.config.host
|
|
1092
1127
|
);
|
|
1093
|
-
};
|
|
1128
|
+
});
|
|
1129
|
+
let GerritIntegration = _GerritIntegration;
|
|
1094
1130
|
|
|
1095
1131
|
function readGiteaConfig(config) {
|
|
1096
1132
|
const host = config.getString("host");
|
|
@@ -1155,7 +1191,13 @@ function getGiteaRequestOptions(config) {
|
|
|
1155
1191
|
};
|
|
1156
1192
|
}
|
|
1157
1193
|
|
|
1158
|
-
|
|
1194
|
+
var __defProp$6 = Object.defineProperty;
|
|
1195
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1196
|
+
var __publicField$6 = (obj, key, value) => {
|
|
1197
|
+
__defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1198
|
+
return value;
|
|
1199
|
+
};
|
|
1200
|
+
const _GiteaIntegration = class _GiteaIntegration {
|
|
1159
1201
|
constructor(config) {
|
|
1160
1202
|
this.config = config;
|
|
1161
1203
|
}
|
|
@@ -1172,8 +1214,7 @@ const _GiteaIntegration = class {
|
|
|
1172
1214
|
return getGiteaEditContentsUrl(this.config, url);
|
|
1173
1215
|
}
|
|
1174
1216
|
};
|
|
1175
|
-
|
|
1176
|
-
GiteaIntegration.factory = ({ config }) => {
|
|
1217
|
+
__publicField$6(_GiteaIntegration, "factory", ({ config }) => {
|
|
1177
1218
|
var _a;
|
|
1178
1219
|
const configs = (_a = config.getOptionalConfigArray("integrations.gitea")) != null ? _a : [];
|
|
1179
1220
|
const giteaConfigs = configs.map((c) => readGiteaConfig(c));
|
|
@@ -1181,7 +1222,8 @@ GiteaIntegration.factory = ({ config }) => {
|
|
|
1181
1222
|
giteaConfigs.map((c) => new _GiteaIntegration(c)),
|
|
1182
1223
|
(gitea) => gitea.config.host
|
|
1183
1224
|
);
|
|
1184
|
-
};
|
|
1225
|
+
});
|
|
1226
|
+
let GiteaIntegration = _GiteaIntegration;
|
|
1185
1227
|
|
|
1186
1228
|
const GITHUB_HOST = "github.com";
|
|
1187
1229
|
const GITHUB_API_BASE_URL = "https://api.github.com";
|
|
@@ -1265,10 +1307,16 @@ function chooseEndpoint(config, credentials) {
|
|
|
1265
1307
|
return "raw";
|
|
1266
1308
|
}
|
|
1267
1309
|
|
|
1310
|
+
var __defProp$5 = Object.defineProperty;
|
|
1311
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1312
|
+
var __publicField$5 = (obj, key, value) => {
|
|
1313
|
+
__defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1314
|
+
return value;
|
|
1315
|
+
};
|
|
1268
1316
|
class Cache {
|
|
1269
1317
|
constructor() {
|
|
1270
|
-
this
|
|
1271
|
-
this
|
|
1318
|
+
__publicField$5(this, "tokenCache", /* @__PURE__ */ new Map());
|
|
1319
|
+
__publicField$5(this, "isExpired", (date) => luxon.DateTime.local() > date);
|
|
1272
1320
|
}
|
|
1273
1321
|
async getOrCreateToken(owner, repo, supplier) {
|
|
1274
1322
|
let existingInstallationData = this.tokenCache.get(owner);
|
|
@@ -1300,7 +1348,11 @@ const HEADERS = {
|
|
|
1300
1348
|
class GithubAppManager {
|
|
1301
1349
|
// undefined allows all installations
|
|
1302
1350
|
constructor(config, baseUrl) {
|
|
1303
|
-
this
|
|
1351
|
+
__publicField$5(this, "appClient");
|
|
1352
|
+
__publicField$5(this, "baseUrl");
|
|
1353
|
+
__publicField$5(this, "baseAuthConfig");
|
|
1354
|
+
__publicField$5(this, "cache", new Cache());
|
|
1355
|
+
__publicField$5(this, "allowedInstallationOwners");
|
|
1304
1356
|
this.allowedInstallationOwners = config.allowedInstallationOwners;
|
|
1305
1357
|
this.baseUrl = baseUrl;
|
|
1306
1358
|
this.baseAuthConfig = {
|
|
@@ -1378,6 +1430,7 @@ class GithubAppManager {
|
|
|
1378
1430
|
}
|
|
1379
1431
|
class GithubAppCredentialsMux {
|
|
1380
1432
|
constructor(config) {
|
|
1433
|
+
__publicField$5(this, "apps");
|
|
1381
1434
|
var _a, _b;
|
|
1382
1435
|
this.apps = (_b = (_a = config.apps) == null ? void 0 : _a.map((ac) => new GithubAppManager(ac, config.apiBaseUrl))) != null ? _b : [];
|
|
1383
1436
|
}
|
|
@@ -1419,7 +1472,7 @@ class GithubAppCredentialsMux {
|
|
|
1419
1472
|
return void 0;
|
|
1420
1473
|
}
|
|
1421
1474
|
}
|
|
1422
|
-
const _SingleInstanceGithubCredentialsProvider = class {
|
|
1475
|
+
const _SingleInstanceGithubCredentialsProvider = class _SingleInstanceGithubCredentialsProvider {
|
|
1423
1476
|
constructor(githubAppCredentialsMux, token) {
|
|
1424
1477
|
this.githubAppCredentialsMux = githubAppCredentialsMux;
|
|
1425
1478
|
this.token = token;
|
|
@@ -1461,13 +1514,13 @@ const _SingleInstanceGithubCredentialsProvider = class {
|
|
|
1461
1514
|
};
|
|
1462
1515
|
}
|
|
1463
1516
|
};
|
|
1464
|
-
|
|
1465
|
-
SingleInstanceGithubCredentialsProvider.create = (config) => {
|
|
1517
|
+
__publicField$5(_SingleInstanceGithubCredentialsProvider, "create", (config) => {
|
|
1466
1518
|
return new _SingleInstanceGithubCredentialsProvider(
|
|
1467
1519
|
new GithubAppCredentialsMux(config),
|
|
1468
1520
|
config.token
|
|
1469
1521
|
);
|
|
1470
|
-
};
|
|
1522
|
+
});
|
|
1523
|
+
let SingleInstanceGithubCredentialsProvider = _SingleInstanceGithubCredentialsProvider;
|
|
1471
1524
|
|
|
1472
1525
|
class DefaultGithubCredentialsProvider {
|
|
1473
1526
|
constructor(providers) {
|
|
@@ -1517,7 +1570,13 @@ class DefaultGithubCredentialsProvider {
|
|
|
1517
1570
|
}
|
|
1518
1571
|
}
|
|
1519
1572
|
|
|
1520
|
-
|
|
1573
|
+
var __defProp$4 = Object.defineProperty;
|
|
1574
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1575
|
+
var __publicField$4 = (obj, key, value) => {
|
|
1576
|
+
__defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1577
|
+
return value;
|
|
1578
|
+
};
|
|
1579
|
+
const _GithubIntegration = class _GithubIntegration {
|
|
1521
1580
|
constructor(integrationConfig) {
|
|
1522
1581
|
this.integrationConfig = integrationConfig;
|
|
1523
1582
|
}
|
|
@@ -1537,8 +1596,7 @@ const _GithubIntegration = class {
|
|
|
1537
1596
|
return replaceGithubUrlType(url, "edit");
|
|
1538
1597
|
}
|
|
1539
1598
|
};
|
|
1540
|
-
|
|
1541
|
-
GithubIntegration.factory = ({ config }) => {
|
|
1599
|
+
__publicField$4(_GithubIntegration, "factory", ({ config }) => {
|
|
1542
1600
|
var _a;
|
|
1543
1601
|
const configs = readGithubIntegrationConfigs(
|
|
1544
1602
|
(_a = config.getOptionalConfigArray("integrations.github")) != null ? _a : []
|
|
@@ -1547,7 +1605,8 @@ GithubIntegration.factory = ({ config }) => {
|
|
|
1547
1605
|
configs.map((c) => new _GithubIntegration(c)),
|
|
1548
1606
|
(i) => i.config.host
|
|
1549
1607
|
);
|
|
1550
|
-
};
|
|
1608
|
+
});
|
|
1609
|
+
let GithubIntegration = _GithubIntegration;
|
|
1551
1610
|
function replaceGithubUrlType(url, type) {
|
|
1552
1611
|
return url.replace(
|
|
1553
1612
|
/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,
|
|
@@ -1557,6 +1616,12 @@ function replaceGithubUrlType(url, type) {
|
|
|
1557
1616
|
);
|
|
1558
1617
|
}
|
|
1559
1618
|
|
|
1619
|
+
var __defProp$3 = Object.defineProperty;
|
|
1620
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1621
|
+
var __publicField$3 = (obj, key, value) => {
|
|
1622
|
+
__defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1623
|
+
return value;
|
|
1624
|
+
};
|
|
1560
1625
|
const getGitHubFileFetchUrl = getGithubFileFetchUrl;
|
|
1561
1626
|
class GitHubIntegration extends GithubIntegration {
|
|
1562
1627
|
constructor(integrationConfig) {
|
|
@@ -1566,7 +1631,7 @@ class GitHubIntegration extends GithubIntegration {
|
|
|
1566
1631
|
return super.config;
|
|
1567
1632
|
}
|
|
1568
1633
|
}
|
|
1569
|
-
GitHubIntegration
|
|
1634
|
+
__publicField$3(GitHubIntegration, "factory", GithubIntegration.factory);
|
|
1570
1635
|
const readGitHubIntegrationConfig = readGithubIntegrationConfig;
|
|
1571
1636
|
const readGitHubIntegrationConfigs = readGithubIntegrationConfigs;
|
|
1572
1637
|
const replaceGitHubUrlType = replaceGithubUrlType;
|
|
@@ -1686,7 +1751,13 @@ async function getProjectId(target, config) {
|
|
|
1686
1751
|
}
|
|
1687
1752
|
}
|
|
1688
1753
|
|
|
1689
|
-
|
|
1754
|
+
var __defProp$2 = Object.defineProperty;
|
|
1755
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1756
|
+
var __publicField$2 = (obj, key, value) => {
|
|
1757
|
+
__defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1758
|
+
return value;
|
|
1759
|
+
};
|
|
1760
|
+
const _GitLabIntegration = class _GitLabIntegration {
|
|
1690
1761
|
constructor(integrationConfig) {
|
|
1691
1762
|
this.integrationConfig = integrationConfig;
|
|
1692
1763
|
}
|
|
@@ -1706,8 +1777,7 @@ const _GitLabIntegration = class {
|
|
|
1706
1777
|
return replaceGitLabUrlType(url, "edit");
|
|
1707
1778
|
}
|
|
1708
1779
|
};
|
|
1709
|
-
|
|
1710
|
-
GitLabIntegration.factory = ({ config }) => {
|
|
1780
|
+
__publicField$2(_GitLabIntegration, "factory", ({ config }) => {
|
|
1711
1781
|
var _a;
|
|
1712
1782
|
const configs = readGitLabIntegrationConfigs(
|
|
1713
1783
|
(_a = config.getOptionalConfigArray("integrations.gitlab")) != null ? _a : []
|
|
@@ -1716,12 +1786,19 @@ GitLabIntegration.factory = ({ config }) => {
|
|
|
1716
1786
|
configs.map((c) => new _GitLabIntegration(c)),
|
|
1717
1787
|
(i) => i.config.host
|
|
1718
1788
|
);
|
|
1719
|
-
};
|
|
1789
|
+
});
|
|
1790
|
+
let GitLabIntegration = _GitLabIntegration;
|
|
1720
1791
|
function replaceGitLabUrlType(url, type) {
|
|
1721
1792
|
return url.replace(/\/\-\/(blob|tree|edit)\//, `/-/${type}/`);
|
|
1722
1793
|
}
|
|
1723
1794
|
|
|
1724
|
-
|
|
1795
|
+
var __defProp$1 = Object.defineProperty;
|
|
1796
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1797
|
+
var __publicField$1 = (obj, key, value) => {
|
|
1798
|
+
__defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1799
|
+
return value;
|
|
1800
|
+
};
|
|
1801
|
+
const _SingleInstanceGitlabCredentialsProvider = class _SingleInstanceGitlabCredentialsProvider {
|
|
1725
1802
|
constructor(token) {
|
|
1726
1803
|
this.token = token;
|
|
1727
1804
|
}
|
|
@@ -1737,10 +1814,10 @@ const _SingleInstanceGitlabCredentialsProvider = class {
|
|
|
1737
1814
|
};
|
|
1738
1815
|
}
|
|
1739
1816
|
};
|
|
1740
|
-
|
|
1741
|
-
SingleInstanceGitlabCredentialsProvider.create = (config) => {
|
|
1817
|
+
__publicField$1(_SingleInstanceGitlabCredentialsProvider, "create", (config) => {
|
|
1742
1818
|
return new _SingleInstanceGitlabCredentialsProvider(config.token);
|
|
1743
|
-
};
|
|
1819
|
+
});
|
|
1820
|
+
let SingleInstanceGitlabCredentialsProvider = _SingleInstanceGitlabCredentialsProvider;
|
|
1744
1821
|
|
|
1745
1822
|
class DefaultGitlabCredentialsProvider {
|
|
1746
1823
|
constructor(providers) {
|
|
@@ -1778,7 +1855,17 @@ function readGoogleGcsIntegrationConfig(config) {
|
|
|
1778
1855
|
return { clientEmail, privateKey };
|
|
1779
1856
|
}
|
|
1780
1857
|
|
|
1858
|
+
var __defProp = Object.defineProperty;
|
|
1859
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1860
|
+
var __publicField = (obj, key, value) => {
|
|
1861
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1862
|
+
return value;
|
|
1863
|
+
};
|
|
1781
1864
|
class ScmIntegrations {
|
|
1865
|
+
constructor(integrationsByType) {
|
|
1866
|
+
__publicField(this, "byType");
|
|
1867
|
+
this.byType = integrationsByType;
|
|
1868
|
+
}
|
|
1782
1869
|
static fromConfig(config) {
|
|
1783
1870
|
return new ScmIntegrations({
|
|
1784
1871
|
awsS3: AwsS3Integration.factory({ config }),
|
|
@@ -1792,9 +1879,6 @@ class ScmIntegrations {
|
|
|
1792
1879
|
gitea: GiteaIntegration.factory({ config })
|
|
1793
1880
|
});
|
|
1794
1881
|
}
|
|
1795
|
-
constructor(integrationsByType) {
|
|
1796
|
-
this.byType = integrationsByType;
|
|
1797
|
-
}
|
|
1798
1882
|
get awsS3() {
|
|
1799
1883
|
return this.byType.awsS3;
|
|
1800
1884
|
}
|