@catladder/cli 0.0.0-main-049e2ce6 → 0.0.0-main-e8632d85
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/dist/bundles/catenv/index.js +120 -109
- package/dist/bundles/cli/index.js +136 -116
- package/dist/cli/src/gcloud/serviceAccounts.js +16 -7
- package/dist/cli/src/gcloud/serviceAccounts.js.map +1 -1
- package/dist/pipeline/src/context/createComponentContext.d.ts +16 -0
- package/dist/pipeline/src/context/createComponentContext.js +112 -0
- package/dist/pipeline/src/context/createComponentContext.js.map +1 -0
- package/dist/pipeline/src/context/index.d.ts +1 -16
- package/dist/pipeline/src/context/index.js +1 -109
- package/dist/pipeline/src/context/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/gcloud/serviceAccounts.ts +25 -7
|
@@ -3934,6 +3934,125 @@ exports.DOCKER_REGISTRY = process.env.INLINE_DOCKER_REGISTRY ||
|
|
|
3934
3934
|
|
|
3935
3935
|
/***/ }),
|
|
3936
3936
|
|
|
3937
|
+
/***/ 2775:
|
|
3938
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
3939
|
+
|
|
3940
|
+
"use strict";
|
|
3941
|
+
|
|
3942
|
+
var __assign = (this && this.__assign) || function () {
|
|
3943
|
+
__assign = Object.assign || function(t) {
|
|
3944
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3945
|
+
s = arguments[i];
|
|
3946
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
3947
|
+
t[p] = s[p];
|
|
3948
|
+
}
|
|
3949
|
+
return t;
|
|
3950
|
+
};
|
|
3951
|
+
return __assign.apply(this, arguments);
|
|
3952
|
+
};
|
|
3953
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3954
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3955
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3956
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
3957
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
3958
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
3959
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3960
|
+
});
|
|
3961
|
+
};
|
|
3962
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
3963
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
3964
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
3965
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
3966
|
+
function step(op) {
|
|
3967
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
3968
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
3969
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
3970
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
3971
|
+
switch (op[0]) {
|
|
3972
|
+
case 0: case 1: t = op; break;
|
|
3973
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
3974
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
3975
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
3976
|
+
default:
|
|
3977
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
3978
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
3979
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
3980
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
3981
|
+
if (t[2]) _.ops.pop();
|
|
3982
|
+
_.trys.pop(); continue;
|
|
3983
|
+
}
|
|
3984
|
+
op = body.call(thisArg, _);
|
|
3985
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
3986
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
3987
|
+
}
|
|
3988
|
+
};
|
|
3989
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3990
|
+
exports.createContext = exports.createComponentContext = void 0;
|
|
3991
|
+
var lodash_1 = __nccwpck_require__(3255);
|
|
3992
|
+
var build_1 = __nccwpck_require__(7862);
|
|
3993
|
+
var deploy_1 = __nccwpck_require__(8483);
|
|
3994
|
+
var utils_1 = __nccwpck_require__(2497);
|
|
3995
|
+
var getEnvironment_1 = __nccwpck_require__(5699);
|
|
3996
|
+
var getEnvironmentContext_1 = __nccwpck_require__(3663);
|
|
3997
|
+
var createComponentContext = function (ctx) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3998
|
+
var envContext, componentConfigWithoutDefaults, defaults, componentConfig, environment, deploy, build, customJobs, dir, context, resolvedCustomJobs;
|
|
3999
|
+
return __generator(this, function (_a) {
|
|
4000
|
+
switch (_a.label) {
|
|
4001
|
+
case 0:
|
|
4002
|
+
if (!/^[a-z0-9-]+$/.test(ctx.componentName)) {
|
|
4003
|
+
throw new Error("componentName may only contain lower case letters, numbers and -");
|
|
4004
|
+
}
|
|
4005
|
+
envContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
|
|
4006
|
+
componentConfigWithoutDefaults = envContext.envConfigRaw;
|
|
4007
|
+
defaults = componentConfigWithoutDefaults.deploy
|
|
4008
|
+
? {
|
|
4009
|
+
build: build_1.BUILD_TYPES[componentConfigWithoutDefaults.build.type].defaults(envContext),
|
|
4010
|
+
deploy: deploy_1.DEPLOY_TYPES[componentConfigWithoutDefaults.deploy.type].defaults(envContext),
|
|
4011
|
+
}
|
|
4012
|
+
: {
|
|
4013
|
+
build: {},
|
|
4014
|
+
deploy: {},
|
|
4015
|
+
};
|
|
4016
|
+
componentConfig = (0, utils_1.mergeWithMergingArrays)(defaults, componentConfigWithoutDefaults);
|
|
4017
|
+
return [4 /*yield*/, (0, getEnvironment_1.getEnvironment)(ctx)];
|
|
4018
|
+
case 1:
|
|
4019
|
+
environment = _a.sent();
|
|
4020
|
+
deploy = componentConfig.deploy, build = componentConfig.build, customJobs = componentConfig.customJobs, dir = componentConfig.dir;
|
|
4021
|
+
context = {
|
|
4022
|
+
fullConfig: ctx.config,
|
|
4023
|
+
componentConfig: componentConfig,
|
|
4024
|
+
build: {
|
|
4025
|
+
dir: dir,
|
|
4026
|
+
packageManagerInfo: ctx.packageManagerInfo,
|
|
4027
|
+
config: build,
|
|
4028
|
+
},
|
|
4029
|
+
deploy: deploy
|
|
4030
|
+
? {
|
|
4031
|
+
config: deploy,
|
|
4032
|
+
}
|
|
4033
|
+
: null,
|
|
4034
|
+
componentName: ctx.componentName,
|
|
4035
|
+
environment: environment,
|
|
4036
|
+
packageManagerInfo: ctx.packageManagerInfo,
|
|
4037
|
+
pipelineType: ctx.pipelineType,
|
|
4038
|
+
trigger: ctx.trigger,
|
|
4039
|
+
};
|
|
4040
|
+
resolvedCustomJobs = (0, lodash_1.isFunction)(customJobs)
|
|
4041
|
+
? customJobs(context)
|
|
4042
|
+
: customJobs;
|
|
4043
|
+
return [2 /*return*/, __assign(__assign({}, context), { customJobs: resolvedCustomJobs })];
|
|
4044
|
+
}
|
|
4045
|
+
});
|
|
4046
|
+
}); };
|
|
4047
|
+
exports.createComponentContext = createComponentContext;
|
|
4048
|
+
/**
|
|
4049
|
+
* @deprecated use createComponentContext instead
|
|
4050
|
+
*/
|
|
4051
|
+
exports.createContext = exports.createComponentContext;
|
|
4052
|
+
//# sourceMappingURL=createComponentContext.js.map
|
|
4053
|
+
|
|
4054
|
+
/***/ }),
|
|
4055
|
+
|
|
3937
4056
|
/***/ 7827:
|
|
3938
4057
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
3939
4058
|
|
|
@@ -4388,17 +4507,6 @@ exports.getReviewSlug = getReviewSlug;
|
|
|
4388
4507
|
|
|
4389
4508
|
"use strict";
|
|
4390
4509
|
|
|
4391
|
-
var __assign = (this && this.__assign) || function () {
|
|
4392
|
-
__assign = Object.assign || function(t) {
|
|
4393
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4394
|
-
s = arguments[i];
|
|
4395
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
4396
|
-
t[p] = s[p];
|
|
4397
|
-
}
|
|
4398
|
-
return t;
|
|
4399
|
-
};
|
|
4400
|
-
return __assign.apply(this, arguments);
|
|
4401
|
-
};
|
|
4402
4510
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4403
4511
|
if (k2 === undefined) k2 = k;
|
|
4404
4512
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -4413,107 +4521,10 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
4413
4521
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
4414
4522
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
4415
4523
|
};
|
|
4416
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4417
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4418
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4419
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
4420
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
4421
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
4422
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4423
|
-
});
|
|
4424
|
-
};
|
|
4425
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
4426
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
4427
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
4428
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
4429
|
-
function step(op) {
|
|
4430
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
4431
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
4432
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
4433
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
4434
|
-
switch (op[0]) {
|
|
4435
|
-
case 0: case 1: t = op; break;
|
|
4436
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
4437
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
4438
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
4439
|
-
default:
|
|
4440
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
4441
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
4442
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
4443
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
4444
|
-
if (t[2]) _.ops.pop();
|
|
4445
|
-
_.trys.pop(); continue;
|
|
4446
|
-
}
|
|
4447
|
-
op = body.call(thisArg, _);
|
|
4448
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
4449
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
4450
|
-
}
|
|
4451
|
-
};
|
|
4452
4524
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4453
|
-
|
|
4454
|
-
var lodash_1 = __nccwpck_require__(3255);
|
|
4455
|
-
var build_1 = __nccwpck_require__(7862);
|
|
4456
|
-
var deploy_1 = __nccwpck_require__(8483);
|
|
4457
|
-
var utils_1 = __nccwpck_require__(2497);
|
|
4458
|
-
var getEnvironment_1 = __nccwpck_require__(5699);
|
|
4459
|
-
var getEnvironmentContext_1 = __nccwpck_require__(3663);
|
|
4525
|
+
__exportStar(__nccwpck_require__(2775), exports);
|
|
4460
4526
|
__exportStar(__nccwpck_require__(5699), exports);
|
|
4461
4527
|
__exportStar(__nccwpck_require__(5133), exports);
|
|
4462
|
-
var createComponentContext = function (ctx) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4463
|
-
var envContext, componentConfigWithoutDefaults, defaults, componentConfig, environment, deploy, build, customJobs, dir, context, resolvedCustomJobs;
|
|
4464
|
-
return __generator(this, function (_a) {
|
|
4465
|
-
switch (_a.label) {
|
|
4466
|
-
case 0:
|
|
4467
|
-
if (!/^[a-z0-9-]+$/.test(ctx.componentName)) {
|
|
4468
|
-
throw new Error("componentName may only contain lower case letters, numbers and -");
|
|
4469
|
-
}
|
|
4470
|
-
envContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
|
|
4471
|
-
componentConfigWithoutDefaults = envContext.envConfigRaw;
|
|
4472
|
-
defaults = componentConfigWithoutDefaults.deploy
|
|
4473
|
-
? {
|
|
4474
|
-
build: build_1.BUILD_TYPES[componentConfigWithoutDefaults.build.type].defaults(envContext),
|
|
4475
|
-
deploy: deploy_1.DEPLOY_TYPES[componentConfigWithoutDefaults.deploy.type].defaults(envContext),
|
|
4476
|
-
}
|
|
4477
|
-
: {
|
|
4478
|
-
build: {},
|
|
4479
|
-
deploy: {},
|
|
4480
|
-
};
|
|
4481
|
-
componentConfig = (0, utils_1.mergeWithMergingArrays)(defaults, componentConfigWithoutDefaults);
|
|
4482
|
-
return [4 /*yield*/, (0, getEnvironment_1.getEnvironment)(ctx)];
|
|
4483
|
-
case 1:
|
|
4484
|
-
environment = _a.sent();
|
|
4485
|
-
deploy = componentConfig.deploy, build = componentConfig.build, customJobs = componentConfig.customJobs, dir = componentConfig.dir;
|
|
4486
|
-
context = {
|
|
4487
|
-
fullConfig: ctx.config,
|
|
4488
|
-
componentConfig: componentConfig,
|
|
4489
|
-
build: {
|
|
4490
|
-
dir: dir,
|
|
4491
|
-
packageManagerInfo: ctx.packageManagerInfo,
|
|
4492
|
-
config: build,
|
|
4493
|
-
},
|
|
4494
|
-
deploy: deploy
|
|
4495
|
-
? {
|
|
4496
|
-
config: deploy,
|
|
4497
|
-
}
|
|
4498
|
-
: null,
|
|
4499
|
-
componentName: ctx.componentName,
|
|
4500
|
-
environment: environment,
|
|
4501
|
-
packageManagerInfo: ctx.packageManagerInfo,
|
|
4502
|
-
pipelineType: ctx.pipelineType,
|
|
4503
|
-
trigger: ctx.trigger,
|
|
4504
|
-
};
|
|
4505
|
-
resolvedCustomJobs = (0, lodash_1.isFunction)(customJobs)
|
|
4506
|
-
? customJobs(context)
|
|
4507
|
-
: customJobs;
|
|
4508
|
-
return [2 /*return*/, __assign(__assign({}, context), { customJobs: resolvedCustomJobs })];
|
|
4509
|
-
}
|
|
4510
|
-
});
|
|
4511
|
-
}); };
|
|
4512
|
-
exports.createComponentContext = createComponentContext;
|
|
4513
|
-
/**
|
|
4514
|
-
* @deprecated use createComponentContext instead
|
|
4515
|
-
*/
|
|
4516
|
-
exports.createContext = exports.createComponentContext;
|
|
4517
4528
|
//# sourceMappingURL=index.js.map
|
|
4518
4529
|
|
|
4519
4530
|
/***/ }),
|
|
@@ -7442,18 +7442,27 @@ var accountExists = function (fullIdentifier) { return __awaiter(void 0, void 0,
|
|
|
7442
7442
|
}); };
|
|
7443
7443
|
exports.accountExists = accountExists;
|
|
7444
7444
|
var upsertGcloudServiceAccount = function (context, account) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7445
|
-
var projectId, name, displayName, roles, description, namePrefix,
|
|
7445
|
+
var projectId, name, displayName, roles, description, namePrefix, nameSuffixRaw, nameMiddleRaw, MAX_LENGTH, NUM_SEPARATORS, middleMaxLength, nameMiddle, nameSuffix, fullName, fullDisplayName, fullIdentifier, existing, memberName, roles_1, roles_1_1, role, e_1_1, keys, keys_1, keys_1_1, key, e_2_1;
|
|
7446
7446
|
var e_1, _a, e_2, _b;
|
|
7447
7447
|
return __generator(this, function (_c) {
|
|
7448
7448
|
switch (_c.label) {
|
|
7449
7449
|
case 0:
|
|
7450
7450
|
projectId = account.projectId, name = account.name, displayName = account.displayName, roles = account.roles, description = account.description;
|
|
7451
|
-
namePrefix = "".concat(name
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7451
|
+
namePrefix = "".concat(name);
|
|
7452
|
+
nameSuffixRaw = "".concat(context.environment.shortName, "-").concat(context.componentName);
|
|
7453
|
+
nameMiddleRaw = "".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName);
|
|
7454
|
+
MAX_LENGTH = 30;
|
|
7455
|
+
NUM_SEPARATORS = 2;
|
|
7456
|
+
middleMaxLength = MAX_LENGTH - namePrefix.length - nameSuffixRaw.length - NUM_SEPARATORS;
|
|
7457
|
+
if (middleMaxLength < 1) {
|
|
7458
|
+
nameMiddle = hashIfNessecary(nameMiddleRaw, 1);
|
|
7459
|
+
nameSuffix = hashIfNessecary(nameSuffixRaw, MAX_LENGTH - namePrefix.length - 1 - NUM_SEPARATORS);
|
|
7460
|
+
}
|
|
7461
|
+
else {
|
|
7462
|
+
nameMiddle = hashIfNessecary(nameMiddleRaw, middleMaxLength);
|
|
7463
|
+
nameSuffix = nameSuffixRaw;
|
|
7464
|
+
}
|
|
7465
|
+
fullName = "".concat(namePrefix, "-").concat(nameMiddle, "-").concat(nameSuffix);
|
|
7457
7466
|
fullDisplayName = "".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName, " ").concat(context.environment.shortName, ":").concat(context.componentName, " | ").concat(displayName);
|
|
7458
7467
|
fullIdentifier = "".concat(fullName, "@").concat(projectId, ".iam.gserviceaccount.com");
|
|
7459
7468
|
return [4 /*yield*/, (0, exports.accountExists)(fullIdentifier)];
|
|
@@ -11371,6 +11380,125 @@ exports.DOCKER_REGISTRY = process.env.INLINE_DOCKER_REGISTRY ||
|
|
|
11371
11380
|
|
|
11372
11381
|
/***/ }),
|
|
11373
11382
|
|
|
11383
|
+
/***/ 92775:
|
|
11384
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
11385
|
+
|
|
11386
|
+
"use strict";
|
|
11387
|
+
|
|
11388
|
+
var __assign = (this && this.__assign) || function () {
|
|
11389
|
+
__assign = Object.assign || function(t) {
|
|
11390
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
11391
|
+
s = arguments[i];
|
|
11392
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11393
|
+
t[p] = s[p];
|
|
11394
|
+
}
|
|
11395
|
+
return t;
|
|
11396
|
+
};
|
|
11397
|
+
return __assign.apply(this, arguments);
|
|
11398
|
+
};
|
|
11399
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11400
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11401
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11402
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11403
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
11404
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11405
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11406
|
+
});
|
|
11407
|
+
};
|
|
11408
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11409
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
11410
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
11411
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
11412
|
+
function step(op) {
|
|
11413
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
11414
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
11415
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
11416
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
11417
|
+
switch (op[0]) {
|
|
11418
|
+
case 0: case 1: t = op; break;
|
|
11419
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
11420
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
11421
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
11422
|
+
default:
|
|
11423
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
11424
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
11425
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
11426
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
11427
|
+
if (t[2]) _.ops.pop();
|
|
11428
|
+
_.trys.pop(); continue;
|
|
11429
|
+
}
|
|
11430
|
+
op = body.call(thisArg, _);
|
|
11431
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
11432
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
11433
|
+
}
|
|
11434
|
+
};
|
|
11435
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11436
|
+
exports.createContext = exports.createComponentContext = void 0;
|
|
11437
|
+
var lodash_1 = __nccwpck_require__(23255);
|
|
11438
|
+
var build_1 = __nccwpck_require__(67862);
|
|
11439
|
+
var deploy_1 = __nccwpck_require__(68483);
|
|
11440
|
+
var utils_1 = __nccwpck_require__(32497);
|
|
11441
|
+
var getEnvironment_1 = __nccwpck_require__(45699);
|
|
11442
|
+
var getEnvironmentContext_1 = __nccwpck_require__(13663);
|
|
11443
|
+
var createComponentContext = function (ctx) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11444
|
+
var envContext, componentConfigWithoutDefaults, defaults, componentConfig, environment, deploy, build, customJobs, dir, context, resolvedCustomJobs;
|
|
11445
|
+
return __generator(this, function (_a) {
|
|
11446
|
+
switch (_a.label) {
|
|
11447
|
+
case 0:
|
|
11448
|
+
if (!/^[a-z0-9-]+$/.test(ctx.componentName)) {
|
|
11449
|
+
throw new Error("componentName may only contain lower case letters, numbers and -");
|
|
11450
|
+
}
|
|
11451
|
+
envContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
|
|
11452
|
+
componentConfigWithoutDefaults = envContext.envConfigRaw;
|
|
11453
|
+
defaults = componentConfigWithoutDefaults.deploy
|
|
11454
|
+
? {
|
|
11455
|
+
build: build_1.BUILD_TYPES[componentConfigWithoutDefaults.build.type].defaults(envContext),
|
|
11456
|
+
deploy: deploy_1.DEPLOY_TYPES[componentConfigWithoutDefaults.deploy.type].defaults(envContext),
|
|
11457
|
+
}
|
|
11458
|
+
: {
|
|
11459
|
+
build: {},
|
|
11460
|
+
deploy: {},
|
|
11461
|
+
};
|
|
11462
|
+
componentConfig = (0, utils_1.mergeWithMergingArrays)(defaults, componentConfigWithoutDefaults);
|
|
11463
|
+
return [4 /*yield*/, (0, getEnvironment_1.getEnvironment)(ctx)];
|
|
11464
|
+
case 1:
|
|
11465
|
+
environment = _a.sent();
|
|
11466
|
+
deploy = componentConfig.deploy, build = componentConfig.build, customJobs = componentConfig.customJobs, dir = componentConfig.dir;
|
|
11467
|
+
context = {
|
|
11468
|
+
fullConfig: ctx.config,
|
|
11469
|
+
componentConfig: componentConfig,
|
|
11470
|
+
build: {
|
|
11471
|
+
dir: dir,
|
|
11472
|
+
packageManagerInfo: ctx.packageManagerInfo,
|
|
11473
|
+
config: build,
|
|
11474
|
+
},
|
|
11475
|
+
deploy: deploy
|
|
11476
|
+
? {
|
|
11477
|
+
config: deploy,
|
|
11478
|
+
}
|
|
11479
|
+
: null,
|
|
11480
|
+
componentName: ctx.componentName,
|
|
11481
|
+
environment: environment,
|
|
11482
|
+
packageManagerInfo: ctx.packageManagerInfo,
|
|
11483
|
+
pipelineType: ctx.pipelineType,
|
|
11484
|
+
trigger: ctx.trigger,
|
|
11485
|
+
};
|
|
11486
|
+
resolvedCustomJobs = (0, lodash_1.isFunction)(customJobs)
|
|
11487
|
+
? customJobs(context)
|
|
11488
|
+
: customJobs;
|
|
11489
|
+
return [2 /*return*/, __assign(__assign({}, context), { customJobs: resolvedCustomJobs })];
|
|
11490
|
+
}
|
|
11491
|
+
});
|
|
11492
|
+
}); };
|
|
11493
|
+
exports.createComponentContext = createComponentContext;
|
|
11494
|
+
/**
|
|
11495
|
+
* @deprecated use createComponentContext instead
|
|
11496
|
+
*/
|
|
11497
|
+
exports.createContext = exports.createComponentContext;
|
|
11498
|
+
//# sourceMappingURL=createComponentContext.js.map
|
|
11499
|
+
|
|
11500
|
+
/***/ }),
|
|
11501
|
+
|
|
11374
11502
|
/***/ 17827:
|
|
11375
11503
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
11376
11504
|
|
|
@@ -11825,17 +11953,6 @@ exports.getReviewSlug = getReviewSlug;
|
|
|
11825
11953
|
|
|
11826
11954
|
"use strict";
|
|
11827
11955
|
|
|
11828
|
-
var __assign = (this && this.__assign) || function () {
|
|
11829
|
-
__assign = Object.assign || function(t) {
|
|
11830
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
11831
|
-
s = arguments[i];
|
|
11832
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11833
|
-
t[p] = s[p];
|
|
11834
|
-
}
|
|
11835
|
-
return t;
|
|
11836
|
-
};
|
|
11837
|
-
return __assign.apply(this, arguments);
|
|
11838
|
-
};
|
|
11839
11956
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11840
11957
|
if (k2 === undefined) k2 = k;
|
|
11841
11958
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -11850,107 +11967,10 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
11850
11967
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
11851
11968
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11852
11969
|
};
|
|
11853
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11854
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11855
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11856
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11857
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
11858
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11859
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11860
|
-
});
|
|
11861
|
-
};
|
|
11862
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11863
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
11864
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
11865
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
11866
|
-
function step(op) {
|
|
11867
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
11868
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
11869
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
11870
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
11871
|
-
switch (op[0]) {
|
|
11872
|
-
case 0: case 1: t = op; break;
|
|
11873
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
11874
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
11875
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
11876
|
-
default:
|
|
11877
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
11878
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
11879
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
11880
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
11881
|
-
if (t[2]) _.ops.pop();
|
|
11882
|
-
_.trys.pop(); continue;
|
|
11883
|
-
}
|
|
11884
|
-
op = body.call(thisArg, _);
|
|
11885
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
11886
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
11887
|
-
}
|
|
11888
|
-
};
|
|
11889
11970
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11890
|
-
|
|
11891
|
-
var lodash_1 = __nccwpck_require__(23255);
|
|
11892
|
-
var build_1 = __nccwpck_require__(67862);
|
|
11893
|
-
var deploy_1 = __nccwpck_require__(68483);
|
|
11894
|
-
var utils_1 = __nccwpck_require__(32497);
|
|
11895
|
-
var getEnvironment_1 = __nccwpck_require__(45699);
|
|
11896
|
-
var getEnvironmentContext_1 = __nccwpck_require__(13663);
|
|
11971
|
+
__exportStar(__nccwpck_require__(92775), exports);
|
|
11897
11972
|
__exportStar(__nccwpck_require__(45699), exports);
|
|
11898
11973
|
__exportStar(__nccwpck_require__(45133), exports);
|
|
11899
|
-
var createComponentContext = function (ctx) { return __awaiter(void 0, void 0, void 0, function () {
|
|
11900
|
-
var envContext, componentConfigWithoutDefaults, defaults, componentConfig, environment, deploy, build, customJobs, dir, context, resolvedCustomJobs;
|
|
11901
|
-
return __generator(this, function (_a) {
|
|
11902
|
-
switch (_a.label) {
|
|
11903
|
-
case 0:
|
|
11904
|
-
if (!/^[a-z0-9-]+$/.test(ctx.componentName)) {
|
|
11905
|
-
throw new Error("componentName may only contain lower case letters, numbers and -");
|
|
11906
|
-
}
|
|
11907
|
-
envContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
|
|
11908
|
-
componentConfigWithoutDefaults = envContext.envConfigRaw;
|
|
11909
|
-
defaults = componentConfigWithoutDefaults.deploy
|
|
11910
|
-
? {
|
|
11911
|
-
build: build_1.BUILD_TYPES[componentConfigWithoutDefaults.build.type].defaults(envContext),
|
|
11912
|
-
deploy: deploy_1.DEPLOY_TYPES[componentConfigWithoutDefaults.deploy.type].defaults(envContext),
|
|
11913
|
-
}
|
|
11914
|
-
: {
|
|
11915
|
-
build: {},
|
|
11916
|
-
deploy: {},
|
|
11917
|
-
};
|
|
11918
|
-
componentConfig = (0, utils_1.mergeWithMergingArrays)(defaults, componentConfigWithoutDefaults);
|
|
11919
|
-
return [4 /*yield*/, (0, getEnvironment_1.getEnvironment)(ctx)];
|
|
11920
|
-
case 1:
|
|
11921
|
-
environment = _a.sent();
|
|
11922
|
-
deploy = componentConfig.deploy, build = componentConfig.build, customJobs = componentConfig.customJobs, dir = componentConfig.dir;
|
|
11923
|
-
context = {
|
|
11924
|
-
fullConfig: ctx.config,
|
|
11925
|
-
componentConfig: componentConfig,
|
|
11926
|
-
build: {
|
|
11927
|
-
dir: dir,
|
|
11928
|
-
packageManagerInfo: ctx.packageManagerInfo,
|
|
11929
|
-
config: build,
|
|
11930
|
-
},
|
|
11931
|
-
deploy: deploy
|
|
11932
|
-
? {
|
|
11933
|
-
config: deploy,
|
|
11934
|
-
}
|
|
11935
|
-
: null,
|
|
11936
|
-
componentName: ctx.componentName,
|
|
11937
|
-
environment: environment,
|
|
11938
|
-
packageManagerInfo: ctx.packageManagerInfo,
|
|
11939
|
-
pipelineType: ctx.pipelineType,
|
|
11940
|
-
trigger: ctx.trigger,
|
|
11941
|
-
};
|
|
11942
|
-
resolvedCustomJobs = (0, lodash_1.isFunction)(customJobs)
|
|
11943
|
-
? customJobs(context)
|
|
11944
|
-
: customJobs;
|
|
11945
|
-
return [2 /*return*/, __assign(__assign({}, context), { customJobs: resolvedCustomJobs })];
|
|
11946
|
-
}
|
|
11947
|
-
});
|
|
11948
|
-
}); };
|
|
11949
|
-
exports.createComponentContext = createComponentContext;
|
|
11950
|
-
/**
|
|
11951
|
-
* @deprecated use createComponentContext instead
|
|
11952
|
-
*/
|
|
11953
|
-
exports.createContext = exports.createComponentContext;
|
|
11954
11974
|
//# sourceMappingURL=index.js.map
|
|
11955
11975
|
|
|
11956
11976
|
/***/ }),
|
|
@@ -70,18 +70,27 @@ var accountExists = function (fullIdentifier) { return __awaiter(void 0, void 0,
|
|
|
70
70
|
}); };
|
|
71
71
|
exports.accountExists = accountExists;
|
|
72
72
|
var upsertGcloudServiceAccount = function (context, account) { return __awaiter(void 0, void 0, void 0, function () {
|
|
73
|
-
var projectId, name, displayName, roles, description, namePrefix,
|
|
73
|
+
var projectId, name, displayName, roles, description, namePrefix, nameSuffixRaw, nameMiddleRaw, MAX_LENGTH, NUM_SEPARATORS, middleMaxLength, nameMiddle, nameSuffix, fullName, fullDisplayName, fullIdentifier, existing, memberName, roles_1, roles_1_1, role, e_1_1, keys, keys_1, keys_1_1, key, e_2_1;
|
|
74
74
|
var e_1, _a, e_2, _b;
|
|
75
75
|
return __generator(this, function (_c) {
|
|
76
76
|
switch (_c.label) {
|
|
77
77
|
case 0:
|
|
78
78
|
projectId = account.projectId, name = account.name, displayName = account.displayName, roles = account.roles, description = account.description;
|
|
79
|
-
namePrefix = "".concat(name
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
namePrefix = "".concat(name);
|
|
80
|
+
nameSuffixRaw = "".concat(context.environment.shortName, "-").concat(context.componentName);
|
|
81
|
+
nameMiddleRaw = "".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName);
|
|
82
|
+
MAX_LENGTH = 30;
|
|
83
|
+
NUM_SEPARATORS = 2;
|
|
84
|
+
middleMaxLength = MAX_LENGTH - namePrefix.length - nameSuffixRaw.length - NUM_SEPARATORS;
|
|
85
|
+
if (middleMaxLength < 1) {
|
|
86
|
+
nameMiddle = hashIfNessecary(nameMiddleRaw, 1);
|
|
87
|
+
nameSuffix = hashIfNessecary(nameSuffixRaw, MAX_LENGTH - namePrefix.length - 1 - NUM_SEPARATORS);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
nameMiddle = hashIfNessecary(nameMiddleRaw, middleMaxLength);
|
|
91
|
+
nameSuffix = nameSuffixRaw;
|
|
92
|
+
}
|
|
93
|
+
fullName = "".concat(namePrefix, "-").concat(nameMiddle, "-").concat(nameSuffix);
|
|
85
94
|
fullDisplayName = "".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName, " ").concat(context.environment.shortName, ":").concat(context.componentName, " | ").concat(displayName);
|
|
86
95
|
fullIdentifier = "".concat(fullName, "@").concat(projectId, ".iam.gserviceaccount.com");
|
|
87
96
|
return [4 /*yield*/, (0, exports.accountExists)(fullIdentifier)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceAccounts.js","sourceRoot":"","sources":["../../../../src/gcloud/serviceAccounts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+DAA6C;AAC7C,iCAAoC;AAEpC,0CAAqD;AAE9C,IAAM,aAAa,GAAG,UAAO,cAAsB;;;;;;gBAEtD,qBAAM,IAAA,4BAAI,EAAC,+CAAwC,cAAc,CAAE,CAAC,EAAA;;gBAApE,SAAoE,CAAC;gBACrE,sBAAO,IAAI,EAAC;;;gBAEZ,sBAAO,KAAK,EAAC;;;;KAEhB,CAAC;AAPW,QAAA,aAAa,iBAOxB;AASF,IAAM,0BAA0B,GAAG,UACjC,OAAyB,EACzB,OAAuB;;;;;;gBAEf,SAAS,GAA4C,OAAO,UAAnD,EAAE,IAAI,GAAsC,OAAO,KAA7C,EAAE,WAAW,GAAyB,OAAO,YAAhC,EAAE,KAAK,GAAkB,OAAO,MAAzB,EAAE,WAAW,GAAK,OAAO,YAAZ,CAAa;gBAG/D,UAAU,GAAG,UAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"serviceAccounts.js","sourceRoot":"","sources":["../../../../src/gcloud/serviceAccounts.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PipelineType } from "../types";
|
|
2
|
+
import type { Config, PipelineTrigger } from "../types/config";
|
|
3
|
+
import type { ComponentContext, PackageManagerInfo } from "../types/context";
|
|
4
|
+
export type CreateComponentContextContext = {
|
|
5
|
+
config: Config;
|
|
6
|
+
componentName: string;
|
|
7
|
+
env: string;
|
|
8
|
+
pipelineType?: PipelineType;
|
|
9
|
+
trigger?: PipelineTrigger;
|
|
10
|
+
packageManagerInfo?: PackageManagerInfo;
|
|
11
|
+
};
|
|
12
|
+
export declare const createComponentContext: (ctx: CreateComponentContextContext) => Promise<ComponentContext>;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated use createComponentContext instead
|
|
15
|
+
*/
|
|
16
|
+
export declare const createContext: (ctx: CreateComponentContextContext) => Promise<ComponentContext>;
|