@catladder/cli 0.0.0-kube-command-59ed84cc → 0.0.0-lintstaged-7b3be981
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 +417 -175
- package/dist/bundles/cli/index.js +784 -488
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -130202,7 +130202,7 @@ module.exports = (stack, options) => {
|
|
|
130202
130202
|
|
|
130203
130203
|
"use strict";
|
|
130204
130204
|
|
|
130205
|
-
var restoreCursor = __nccwpck_require__(
|
|
130205
|
+
var restoreCursor = __nccwpck_require__(17301);
|
|
130206
130206
|
var hidden = false;
|
|
130207
130207
|
|
|
130208
130208
|
exports.show = function () {
|
|
@@ -130229,6 +130229,62 @@ exports.toggle = function (force) {
|
|
|
130229
130229
|
};
|
|
130230
130230
|
|
|
130231
130231
|
|
|
130232
|
+
/***/ }),
|
|
130233
|
+
|
|
130234
|
+
/***/ 17677:
|
|
130235
|
+
/***/ ((module) => {
|
|
130236
|
+
|
|
130237
|
+
"use strict";
|
|
130238
|
+
|
|
130239
|
+
module.exports = function (fn, errMsg) {
|
|
130240
|
+
if (typeof fn !== 'function') {
|
|
130241
|
+
throw new TypeError('Expected a function');
|
|
130242
|
+
}
|
|
130243
|
+
|
|
130244
|
+
var ret;
|
|
130245
|
+
var called = false;
|
|
130246
|
+
var fnName = fn.displayName || fn.name || (/function ([^\(]+)/.exec(fn.toString()) || [])[1];
|
|
130247
|
+
|
|
130248
|
+
var onetime = function () {
|
|
130249
|
+
if (called) {
|
|
130250
|
+
if (errMsg === true) {
|
|
130251
|
+
fnName = fnName ? fnName + '()' : 'Function';
|
|
130252
|
+
throw new Error(fnName + ' can only be called once.');
|
|
130253
|
+
}
|
|
130254
|
+
|
|
130255
|
+
return ret;
|
|
130256
|
+
}
|
|
130257
|
+
|
|
130258
|
+
called = true;
|
|
130259
|
+
ret = fn.apply(this, arguments);
|
|
130260
|
+
fn = null;
|
|
130261
|
+
|
|
130262
|
+
return ret;
|
|
130263
|
+
};
|
|
130264
|
+
|
|
130265
|
+
onetime.displayName = fnName;
|
|
130266
|
+
|
|
130267
|
+
return onetime;
|
|
130268
|
+
};
|
|
130269
|
+
|
|
130270
|
+
|
|
130271
|
+
/***/ }),
|
|
130272
|
+
|
|
130273
|
+
/***/ 17301:
|
|
130274
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
130275
|
+
|
|
130276
|
+
"use strict";
|
|
130277
|
+
|
|
130278
|
+
var onetime = __nccwpck_require__(17677);
|
|
130279
|
+
var exitHook = __nccwpck_require__(24793);
|
|
130280
|
+
|
|
130281
|
+
module.exports = onetime(function () {
|
|
130282
|
+
exitHook(function () {
|
|
130283
|
+
process.stdout.write('\u001b[?25h');
|
|
130284
|
+
});
|
|
130285
|
+
});
|
|
130286
|
+
|
|
130287
|
+
|
|
130232
130288
|
/***/ }),
|
|
130233
130289
|
|
|
130234
130290
|
/***/ 89992:
|
|
@@ -178822,60 +178878,6 @@ module.exports = () => {
|
|
|
178822
178878
|
};
|
|
178823
178879
|
|
|
178824
178880
|
|
|
178825
|
-
/***/ }),
|
|
178826
|
-
|
|
178827
|
-
/***/ 48504:
|
|
178828
|
-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
178829
|
-
|
|
178830
|
-
"use strict";
|
|
178831
|
-
|
|
178832
|
-
var numberIsNan = __nccwpck_require__(68955);
|
|
178833
|
-
|
|
178834
|
-
module.exports = function (x) {
|
|
178835
|
-
if (numberIsNan(x)) {
|
|
178836
|
-
return false;
|
|
178837
|
-
}
|
|
178838
|
-
|
|
178839
|
-
// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369
|
|
178840
|
-
|
|
178841
|
-
// code points are derived from:
|
|
178842
|
-
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
|
|
178843
|
-
if (x >= 0x1100 && (
|
|
178844
|
-
x <= 0x115f || // Hangul Jamo
|
|
178845
|
-
0x2329 === x || // LEFT-POINTING ANGLE BRACKET
|
|
178846
|
-
0x232a === x || // RIGHT-POINTING ANGLE BRACKET
|
|
178847
|
-
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
178848
|
-
(0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
|
|
178849
|
-
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
178850
|
-
0x3250 <= x && x <= 0x4dbf ||
|
|
178851
|
-
// CJK Unified Ideographs .. Yi Radicals
|
|
178852
|
-
0x4e00 <= x && x <= 0xa4c6 ||
|
|
178853
|
-
// Hangul Jamo Extended-A
|
|
178854
|
-
0xa960 <= x && x <= 0xa97c ||
|
|
178855
|
-
// Hangul Syllables
|
|
178856
|
-
0xac00 <= x && x <= 0xd7a3 ||
|
|
178857
|
-
// CJK Compatibility Ideographs
|
|
178858
|
-
0xf900 <= x && x <= 0xfaff ||
|
|
178859
|
-
// Vertical Forms
|
|
178860
|
-
0xfe10 <= x && x <= 0xfe19 ||
|
|
178861
|
-
// CJK Compatibility Forms .. Small Form Variants
|
|
178862
|
-
0xfe30 <= x && x <= 0xfe6b ||
|
|
178863
|
-
// Halfwidth and Fullwidth Forms
|
|
178864
|
-
0xff01 <= x && x <= 0xff60 ||
|
|
178865
|
-
0xffe0 <= x && x <= 0xffe6 ||
|
|
178866
|
-
// Kana Supplement
|
|
178867
|
-
0x1b000 <= x && x <= 0x1b001 ||
|
|
178868
|
-
// Enclosed Ideographic Supplement
|
|
178869
|
-
0x1f200 <= x && x <= 0x1f251 ||
|
|
178870
|
-
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
178871
|
-
0x20000 <= x && x <= 0x3fffd)) {
|
|
178872
|
-
return true;
|
|
178873
|
-
}
|
|
178874
|
-
|
|
178875
|
-
return false;
|
|
178876
|
-
}
|
|
178877
|
-
|
|
178878
|
-
|
|
178879
178881
|
/***/ }),
|
|
178880
178882
|
|
|
178881
178883
|
/***/ 86878:
|
|
@@ -210161,158 +210163,6 @@ module.exports = Keyv;
|
|
|
210161
210163
|
}.call(this));
|
|
210162
210164
|
|
|
210163
210165
|
|
|
210164
|
-
/***/ }),
|
|
210165
|
-
|
|
210166
|
-
/***/ 12860:
|
|
210167
|
-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
210168
|
-
|
|
210169
|
-
"use strict";
|
|
210170
|
-
|
|
210171
|
-
var ansiEscapes = __nccwpck_require__(11598);
|
|
210172
|
-
var cliCursor = __nccwpck_require__(22701);
|
|
210173
|
-
|
|
210174
|
-
function main(stream) {
|
|
210175
|
-
var prevLineCount = 0;
|
|
210176
|
-
|
|
210177
|
-
var render = function () {
|
|
210178
|
-
cliCursor.hide();
|
|
210179
|
-
var out = [].join.call(arguments, ' ') + '\n';
|
|
210180
|
-
stream.write(ansiEscapes.eraseLines(prevLineCount) + out);
|
|
210181
|
-
prevLineCount = out.split('\n').length;
|
|
210182
|
-
};
|
|
210183
|
-
|
|
210184
|
-
render.clear = function () {
|
|
210185
|
-
stream.write(ansiEscapes.eraseLines(prevLineCount));
|
|
210186
|
-
prevLineCount = 0;
|
|
210187
|
-
};
|
|
210188
|
-
|
|
210189
|
-
render.done = function () {
|
|
210190
|
-
prevLineCount = 0;
|
|
210191
|
-
cliCursor.show();
|
|
210192
|
-
};
|
|
210193
|
-
|
|
210194
|
-
return render;
|
|
210195
|
-
}
|
|
210196
|
-
|
|
210197
|
-
module.exports = main(process.stdout);
|
|
210198
|
-
module.exports.stderr = main(process.stderr);
|
|
210199
|
-
module.exports.create = main;
|
|
210200
|
-
|
|
210201
|
-
|
|
210202
|
-
/***/ }),
|
|
210203
|
-
|
|
210204
|
-
/***/ 11598:
|
|
210205
|
-
/***/ ((module) => {
|
|
210206
|
-
|
|
210207
|
-
"use strict";
|
|
210208
|
-
|
|
210209
|
-
var ESC = '\u001b[';
|
|
210210
|
-
var x = module.exports;
|
|
210211
|
-
|
|
210212
|
-
x.cursorTo = function (x, y) {
|
|
210213
|
-
if (arguments.length === 0) {
|
|
210214
|
-
return ESC + 'H';
|
|
210215
|
-
}
|
|
210216
|
-
|
|
210217
|
-
if (arguments.length === 1) {
|
|
210218
|
-
return ESC + (x + 1) + 'G';
|
|
210219
|
-
}
|
|
210220
|
-
|
|
210221
|
-
return ESC + (y + 1) + ';' + (x + 1) + 'H';
|
|
210222
|
-
};
|
|
210223
|
-
|
|
210224
|
-
x.cursorMove = function (x, y) {
|
|
210225
|
-
var ret = '';
|
|
210226
|
-
|
|
210227
|
-
if (x < 0) {
|
|
210228
|
-
ret += ESC + (-x) + 'D';
|
|
210229
|
-
} else if (x > 0) {
|
|
210230
|
-
ret += ESC + x + 'C';
|
|
210231
|
-
}
|
|
210232
|
-
|
|
210233
|
-
if (y < 0) {
|
|
210234
|
-
ret += ESC + (-y) + 'A';
|
|
210235
|
-
} else if (y > 0) {
|
|
210236
|
-
ret += ESC + y + 'B';
|
|
210237
|
-
}
|
|
210238
|
-
|
|
210239
|
-
return ret;
|
|
210240
|
-
};
|
|
210241
|
-
|
|
210242
|
-
x.cursorUp = function (count) {
|
|
210243
|
-
return ESC + (typeof count === 'number' ? count : 1) + 'A';
|
|
210244
|
-
};
|
|
210245
|
-
|
|
210246
|
-
x.cursorDown = function (count) {
|
|
210247
|
-
return ESC + (typeof count === 'number' ? count : 1) + 'B';
|
|
210248
|
-
};
|
|
210249
|
-
|
|
210250
|
-
x.cursorForward = function (count) {
|
|
210251
|
-
return ESC + (typeof count === 'number' ? count : 1) + 'C';
|
|
210252
|
-
};
|
|
210253
|
-
|
|
210254
|
-
x.cursorBackward = function (count) {
|
|
210255
|
-
return ESC + (typeof count === 'number' ? count : 1) + 'D';
|
|
210256
|
-
};
|
|
210257
|
-
|
|
210258
|
-
x.cursorLeft = ESC + '1000D';
|
|
210259
|
-
x.cursorSavePosition = ESC + 's';
|
|
210260
|
-
x.cursorRestorePosition = ESC + 'u';
|
|
210261
|
-
x.cursorGetPosition = ESC + '6n';
|
|
210262
|
-
x.cursorNextLine = ESC + 'E';
|
|
210263
|
-
x.cursorPrevLine = ESC + 'F';
|
|
210264
|
-
x.cursorHide = ESC + '?25l';
|
|
210265
|
-
x.cursorShow = ESC + '?25h';
|
|
210266
|
-
|
|
210267
|
-
x.eraseLines = function (count) {
|
|
210268
|
-
var clear = '';
|
|
210269
|
-
|
|
210270
|
-
for (var i = 0; i < count; i++) {
|
|
210271
|
-
clear += x.cursorLeft + x.eraseEndLine + (i < count - 1 ? x.cursorUp() : '');
|
|
210272
|
-
}
|
|
210273
|
-
|
|
210274
|
-
return clear;
|
|
210275
|
-
};
|
|
210276
|
-
|
|
210277
|
-
x.eraseEndLine = ESC + 'K';
|
|
210278
|
-
x.eraseStartLine = ESC + '1K';
|
|
210279
|
-
x.eraseLine = ESC + '2K';
|
|
210280
|
-
x.eraseDown = ESC + 'J';
|
|
210281
|
-
x.eraseUp = ESC + '1J';
|
|
210282
|
-
x.eraseScreen = ESC + '2J';
|
|
210283
|
-
x.scrollUp = ESC + 'S';
|
|
210284
|
-
x.scrollDown = ESC + 'T';
|
|
210285
|
-
|
|
210286
|
-
x.clearScreen = '\u001bc';
|
|
210287
|
-
x.beep = '\u0007';
|
|
210288
|
-
|
|
210289
|
-
x.image = function (buf, opts) {
|
|
210290
|
-
opts = opts || {};
|
|
210291
|
-
|
|
210292
|
-
var ret = '\u001b]1337;File=inline=1';
|
|
210293
|
-
|
|
210294
|
-
if (opts.width) {
|
|
210295
|
-
ret += ';width=' + opts.width;
|
|
210296
|
-
}
|
|
210297
|
-
|
|
210298
|
-
if (opts.height) {
|
|
210299
|
-
ret += ';height=' + opts.height;
|
|
210300
|
-
}
|
|
210301
|
-
|
|
210302
|
-
if (opts.preserveAspectRatio === false) {
|
|
210303
|
-
ret += ';preserveAspectRatio=0';
|
|
210304
|
-
}
|
|
210305
|
-
|
|
210306
|
-
return ret + ':' + buf.toString('base64') + '\u0007';
|
|
210307
|
-
};
|
|
210308
|
-
|
|
210309
|
-
x.iTerm = {};
|
|
210310
|
-
|
|
210311
|
-
x.iTerm.setCwd = function (cwd) {
|
|
210312
|
-
return '\u001b]50;CurrentDir=' + (cwd || process.cwd()) + '\u0007';
|
|
210313
|
-
};
|
|
210314
|
-
|
|
210315
|
-
|
|
210316
210166
|
/***/ }),
|
|
210317
210167
|
|
|
210318
210168
|
/***/ 64633:
|
|
@@ -212316,27 +212166,6 @@ function populateMaps (extensions, types) {
|
|
|
212316
212166
|
}
|
|
212317
212167
|
|
|
212318
212168
|
|
|
212319
|
-
/***/ }),
|
|
212320
|
-
|
|
212321
|
-
/***/ 43471:
|
|
212322
|
-
/***/ ((module) => {
|
|
212323
|
-
|
|
212324
|
-
"use strict";
|
|
212325
|
-
|
|
212326
|
-
|
|
212327
|
-
const mimicFn = (to, from) => {
|
|
212328
|
-
for (const prop of Reflect.ownKeys(from)) {
|
|
212329
|
-
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
212330
|
-
}
|
|
212331
|
-
|
|
212332
|
-
return to;
|
|
212333
|
-
};
|
|
212334
|
-
|
|
212335
|
-
module.exports = mimicFn;
|
|
212336
|
-
// TODO: Remove this for the next major release
|
|
212337
|
-
module.exports["default"] = mimicFn;
|
|
212338
|
-
|
|
212339
|
-
|
|
212340
212169
|
/***/ }),
|
|
212341
212170
|
|
|
212342
212171
|
/***/ 21963:
|
|
@@ -220470,7 +220299,7 @@ function onceStrict (fn) {
|
|
|
220470
220299
|
|
|
220471
220300
|
"use strict";
|
|
220472
220301
|
|
|
220473
|
-
const mimicFn = __nccwpck_require__(
|
|
220302
|
+
const mimicFn = __nccwpck_require__(60283);
|
|
220474
220303
|
|
|
220475
220304
|
const calledFunctions = new WeakMap();
|
|
220476
220305
|
|
|
@@ -220515,6 +220344,27 @@ module.exports.callCount = function_ => {
|
|
|
220515
220344
|
};
|
|
220516
220345
|
|
|
220517
220346
|
|
|
220347
|
+
/***/ }),
|
|
220348
|
+
|
|
220349
|
+
/***/ 60283:
|
|
220350
|
+
/***/ ((module) => {
|
|
220351
|
+
|
|
220352
|
+
"use strict";
|
|
220353
|
+
|
|
220354
|
+
|
|
220355
|
+
const mimicFn = (to, from) => {
|
|
220356
|
+
for (const prop of Reflect.ownKeys(from)) {
|
|
220357
|
+
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
220358
|
+
}
|
|
220359
|
+
|
|
220360
|
+
return to;
|
|
220361
|
+
};
|
|
220362
|
+
|
|
220363
|
+
module.exports = mimicFn;
|
|
220364
|
+
// TODO: Remove this for the next major release
|
|
220365
|
+
module.exports["default"] = mimicFn;
|
|
220366
|
+
|
|
220367
|
+
|
|
220518
220368
|
/***/ }),
|
|
220519
220369
|
|
|
220520
220370
|
/***/ 14247:
|
|
@@ -304197,7 +304047,7 @@ module.exports = QuickLRU;
|
|
|
304197
304047
|
var readline = __nccwpck_require__(14521);
|
|
304198
304048
|
var MuteStream = __nccwpck_require__(84778);
|
|
304199
304049
|
var codePointAt = __nccwpck_require__(62257);
|
|
304200
|
-
var isFullwidthCodePoint = __nccwpck_require__(
|
|
304050
|
+
var isFullwidthCodePoint = __nccwpck_require__(29535);
|
|
304201
304051
|
|
|
304202
304052
|
var Interface = module.exports = {};
|
|
304203
304053
|
|
|
@@ -304316,6 +304166,60 @@ function stripVTControlCharacters (str) {
|
|
|
304316
304166
|
}
|
|
304317
304167
|
|
|
304318
304168
|
|
|
304169
|
+
/***/ }),
|
|
304170
|
+
|
|
304171
|
+
/***/ 29535:
|
|
304172
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
304173
|
+
|
|
304174
|
+
"use strict";
|
|
304175
|
+
|
|
304176
|
+
var numberIsNan = __nccwpck_require__(68955);
|
|
304177
|
+
|
|
304178
|
+
module.exports = function (x) {
|
|
304179
|
+
if (numberIsNan(x)) {
|
|
304180
|
+
return false;
|
|
304181
|
+
}
|
|
304182
|
+
|
|
304183
|
+
// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369
|
|
304184
|
+
|
|
304185
|
+
// code points are derived from:
|
|
304186
|
+
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
|
|
304187
|
+
if (x >= 0x1100 && (
|
|
304188
|
+
x <= 0x115f || // Hangul Jamo
|
|
304189
|
+
0x2329 === x || // LEFT-POINTING ANGLE BRACKET
|
|
304190
|
+
0x232a === x || // RIGHT-POINTING ANGLE BRACKET
|
|
304191
|
+
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
304192
|
+
(0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
|
|
304193
|
+
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
304194
|
+
0x3250 <= x && x <= 0x4dbf ||
|
|
304195
|
+
// CJK Unified Ideographs .. Yi Radicals
|
|
304196
|
+
0x4e00 <= x && x <= 0xa4c6 ||
|
|
304197
|
+
// Hangul Jamo Extended-A
|
|
304198
|
+
0xa960 <= x && x <= 0xa97c ||
|
|
304199
|
+
// Hangul Syllables
|
|
304200
|
+
0xac00 <= x && x <= 0xd7a3 ||
|
|
304201
|
+
// CJK Compatibility Ideographs
|
|
304202
|
+
0xf900 <= x && x <= 0xfaff ||
|
|
304203
|
+
// Vertical Forms
|
|
304204
|
+
0xfe10 <= x && x <= 0xfe19 ||
|
|
304205
|
+
// CJK Compatibility Forms .. Small Form Variants
|
|
304206
|
+
0xfe30 <= x && x <= 0xfe6b ||
|
|
304207
|
+
// Halfwidth and Fullwidth Forms
|
|
304208
|
+
0xff01 <= x && x <= 0xff60 ||
|
|
304209
|
+
0xffe0 <= x && x <= 0xffe6 ||
|
|
304210
|
+
// Kana Supplement
|
|
304211
|
+
0x1b000 <= x && x <= 0x1b001 ||
|
|
304212
|
+
// Enclosed Ideographic Supplement
|
|
304213
|
+
0x1f200 <= x && x <= 0x1f251 ||
|
|
304214
|
+
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
304215
|
+
0x20000 <= x && x <= 0x3fffd)) {
|
|
304216
|
+
return true;
|
|
304217
|
+
}
|
|
304218
|
+
|
|
304219
|
+
return false;
|
|
304220
|
+
}
|
|
304221
|
+
|
|
304222
|
+
|
|
304319
304223
|
/***/ }),
|
|
304320
304224
|
|
|
304321
304225
|
/***/ 12757:
|
|
@@ -307985,62 +307889,6 @@ class Response extends Readable {
|
|
|
307985
307889
|
module.exports = Response;
|
|
307986
307890
|
|
|
307987
307891
|
|
|
307988
|
-
/***/ }),
|
|
307989
|
-
|
|
307990
|
-
/***/ 74390:
|
|
307991
|
-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
307992
|
-
|
|
307993
|
-
"use strict";
|
|
307994
|
-
|
|
307995
|
-
var onetime = __nccwpck_require__(38197);
|
|
307996
|
-
var exitHook = __nccwpck_require__(24793);
|
|
307997
|
-
|
|
307998
|
-
module.exports = onetime(function () {
|
|
307999
|
-
exitHook(function () {
|
|
308000
|
-
process.stdout.write('\u001b[?25h');
|
|
308001
|
-
});
|
|
308002
|
-
});
|
|
308003
|
-
|
|
308004
|
-
|
|
308005
|
-
/***/ }),
|
|
308006
|
-
|
|
308007
|
-
/***/ 38197:
|
|
308008
|
-
/***/ ((module) => {
|
|
308009
|
-
|
|
308010
|
-
"use strict";
|
|
308011
|
-
|
|
308012
|
-
module.exports = function (fn, errMsg) {
|
|
308013
|
-
if (typeof fn !== 'function') {
|
|
308014
|
-
throw new TypeError('Expected a function');
|
|
308015
|
-
}
|
|
308016
|
-
|
|
308017
|
-
var ret;
|
|
308018
|
-
var called = false;
|
|
308019
|
-
var fnName = fn.displayName || fn.name || (/function ([^\(]+)/.exec(fn.toString()) || [])[1];
|
|
308020
|
-
|
|
308021
|
-
var onetime = function () {
|
|
308022
|
-
if (called) {
|
|
308023
|
-
if (errMsg === true) {
|
|
308024
|
-
fnName = fnName ? fnName + '()' : 'Function';
|
|
308025
|
-
throw new Error(fnName + ' can only be called once.');
|
|
308026
|
-
}
|
|
308027
|
-
|
|
308028
|
-
return ret;
|
|
308029
|
-
}
|
|
308030
|
-
|
|
308031
|
-
called = true;
|
|
308032
|
-
ret = fn.apply(this, arguments);
|
|
308033
|
-
fn = null;
|
|
308034
|
-
|
|
308035
|
-
return ret;
|
|
308036
|
-
};
|
|
308037
|
-
|
|
308038
|
-
onetime.displayName = fnName;
|
|
308039
|
-
|
|
308040
|
-
return onetime;
|
|
308041
|
-
};
|
|
308042
|
-
|
|
308043
|
-
|
|
308044
307892
|
/***/ }),
|
|
308045
307893
|
|
|
308046
307894
|
/***/ 6716:
|
|
@@ -342380,7 +342228,7 @@ var inquirer = __nccwpck_require__(8622);
|
|
|
342380
342228
|
var EventEmitter = (__nccwpck_require__(82361).EventEmitter);
|
|
342381
342229
|
var chalk = __nccwpck_require__(48173);
|
|
342382
342230
|
var util = __nccwpck_require__(29821);
|
|
342383
|
-
var logUpdate = __nccwpck_require__(
|
|
342231
|
+
var logUpdate = __nccwpck_require__(75758);
|
|
342384
342232
|
|
|
342385
342233
|
var UI = function (_EventEmitter) {
|
|
342386
342234
|
_inherits(UI, _EventEmitter);
|
|
@@ -344786,6 +344634,120 @@ Object.defineProperty(vorpal, 'activeCommand', {
|
|
|
344786
344634
|
}
|
|
344787
344635
|
});
|
|
344788
344636
|
|
|
344637
|
+
/***/ }),
|
|
344638
|
+
|
|
344639
|
+
/***/ 37374:
|
|
344640
|
+
/***/ ((module) => {
|
|
344641
|
+
|
|
344642
|
+
"use strict";
|
|
344643
|
+
|
|
344644
|
+
var ESC = '\u001b[';
|
|
344645
|
+
var x = module.exports;
|
|
344646
|
+
|
|
344647
|
+
x.cursorTo = function (x, y) {
|
|
344648
|
+
if (arguments.length === 0) {
|
|
344649
|
+
return ESC + 'H';
|
|
344650
|
+
}
|
|
344651
|
+
|
|
344652
|
+
if (arguments.length === 1) {
|
|
344653
|
+
return ESC + (x + 1) + 'G';
|
|
344654
|
+
}
|
|
344655
|
+
|
|
344656
|
+
return ESC + (y + 1) + ';' + (x + 1) + 'H';
|
|
344657
|
+
};
|
|
344658
|
+
|
|
344659
|
+
x.cursorMove = function (x, y) {
|
|
344660
|
+
var ret = '';
|
|
344661
|
+
|
|
344662
|
+
if (x < 0) {
|
|
344663
|
+
ret += ESC + (-x) + 'D';
|
|
344664
|
+
} else if (x > 0) {
|
|
344665
|
+
ret += ESC + x + 'C';
|
|
344666
|
+
}
|
|
344667
|
+
|
|
344668
|
+
if (y < 0) {
|
|
344669
|
+
ret += ESC + (-y) + 'A';
|
|
344670
|
+
} else if (y > 0) {
|
|
344671
|
+
ret += ESC + y + 'B';
|
|
344672
|
+
}
|
|
344673
|
+
|
|
344674
|
+
return ret;
|
|
344675
|
+
};
|
|
344676
|
+
|
|
344677
|
+
x.cursorUp = function (count) {
|
|
344678
|
+
return ESC + (typeof count === 'number' ? count : 1) + 'A';
|
|
344679
|
+
};
|
|
344680
|
+
|
|
344681
|
+
x.cursorDown = function (count) {
|
|
344682
|
+
return ESC + (typeof count === 'number' ? count : 1) + 'B';
|
|
344683
|
+
};
|
|
344684
|
+
|
|
344685
|
+
x.cursorForward = function (count) {
|
|
344686
|
+
return ESC + (typeof count === 'number' ? count : 1) + 'C';
|
|
344687
|
+
};
|
|
344688
|
+
|
|
344689
|
+
x.cursorBackward = function (count) {
|
|
344690
|
+
return ESC + (typeof count === 'number' ? count : 1) + 'D';
|
|
344691
|
+
};
|
|
344692
|
+
|
|
344693
|
+
x.cursorLeft = ESC + '1000D';
|
|
344694
|
+
x.cursorSavePosition = ESC + 's';
|
|
344695
|
+
x.cursorRestorePosition = ESC + 'u';
|
|
344696
|
+
x.cursorGetPosition = ESC + '6n';
|
|
344697
|
+
x.cursorNextLine = ESC + 'E';
|
|
344698
|
+
x.cursorPrevLine = ESC + 'F';
|
|
344699
|
+
x.cursorHide = ESC + '?25l';
|
|
344700
|
+
x.cursorShow = ESC + '?25h';
|
|
344701
|
+
|
|
344702
|
+
x.eraseLines = function (count) {
|
|
344703
|
+
var clear = '';
|
|
344704
|
+
|
|
344705
|
+
for (var i = 0; i < count; i++) {
|
|
344706
|
+
clear += x.cursorLeft + x.eraseEndLine + (i < count - 1 ? x.cursorUp() : '');
|
|
344707
|
+
}
|
|
344708
|
+
|
|
344709
|
+
return clear;
|
|
344710
|
+
};
|
|
344711
|
+
|
|
344712
|
+
x.eraseEndLine = ESC + 'K';
|
|
344713
|
+
x.eraseStartLine = ESC + '1K';
|
|
344714
|
+
x.eraseLine = ESC + '2K';
|
|
344715
|
+
x.eraseDown = ESC + 'J';
|
|
344716
|
+
x.eraseUp = ESC + '1J';
|
|
344717
|
+
x.eraseScreen = ESC + '2J';
|
|
344718
|
+
x.scrollUp = ESC + 'S';
|
|
344719
|
+
x.scrollDown = ESC + 'T';
|
|
344720
|
+
|
|
344721
|
+
x.clearScreen = '\u001bc';
|
|
344722
|
+
x.beep = '\u0007';
|
|
344723
|
+
|
|
344724
|
+
x.image = function (buf, opts) {
|
|
344725
|
+
opts = opts || {};
|
|
344726
|
+
|
|
344727
|
+
var ret = '\u001b]1337;File=inline=1';
|
|
344728
|
+
|
|
344729
|
+
if (opts.width) {
|
|
344730
|
+
ret += ';width=' + opts.width;
|
|
344731
|
+
}
|
|
344732
|
+
|
|
344733
|
+
if (opts.height) {
|
|
344734
|
+
ret += ';height=' + opts.height;
|
|
344735
|
+
}
|
|
344736
|
+
|
|
344737
|
+
if (opts.preserveAspectRatio === false) {
|
|
344738
|
+
ret += ';preserveAspectRatio=0';
|
|
344739
|
+
}
|
|
344740
|
+
|
|
344741
|
+
return ret + ':' + buf.toString('base64') + '\u0007';
|
|
344742
|
+
};
|
|
344743
|
+
|
|
344744
|
+
x.iTerm = {};
|
|
344745
|
+
|
|
344746
|
+
x.iTerm.setCwd = function (cwd) {
|
|
344747
|
+
return '\u001b]50;CurrentDir=' + (cwd || process.cwd()) + '\u0007';
|
|
344748
|
+
};
|
|
344749
|
+
|
|
344750
|
+
|
|
344789
344751
|
/***/ }),
|
|
344790
344752
|
|
|
344791
344753
|
/***/ 96901:
|
|
@@ -344996,6 +344958,98 @@ module.exports.stripColor = stripAnsi;
|
|
|
344996
344958
|
module.exports.supportsColor = supportsColor;
|
|
344997
344959
|
|
|
344998
344960
|
|
|
344961
|
+
/***/ }),
|
|
344962
|
+
|
|
344963
|
+
/***/ 26666:
|
|
344964
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
344965
|
+
|
|
344966
|
+
"use strict";
|
|
344967
|
+
|
|
344968
|
+
var numberIsNan = __nccwpck_require__(68955);
|
|
344969
|
+
|
|
344970
|
+
module.exports = function (x) {
|
|
344971
|
+
if (numberIsNan(x)) {
|
|
344972
|
+
return false;
|
|
344973
|
+
}
|
|
344974
|
+
|
|
344975
|
+
// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1369
|
|
344976
|
+
|
|
344977
|
+
// code points are derived from:
|
|
344978
|
+
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
|
|
344979
|
+
if (x >= 0x1100 && (
|
|
344980
|
+
x <= 0x115f || // Hangul Jamo
|
|
344981
|
+
0x2329 === x || // LEFT-POINTING ANGLE BRACKET
|
|
344982
|
+
0x232a === x || // RIGHT-POINTING ANGLE BRACKET
|
|
344983
|
+
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
344984
|
+
(0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
|
|
344985
|
+
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
344986
|
+
0x3250 <= x && x <= 0x4dbf ||
|
|
344987
|
+
// CJK Unified Ideographs .. Yi Radicals
|
|
344988
|
+
0x4e00 <= x && x <= 0xa4c6 ||
|
|
344989
|
+
// Hangul Jamo Extended-A
|
|
344990
|
+
0xa960 <= x && x <= 0xa97c ||
|
|
344991
|
+
// Hangul Syllables
|
|
344992
|
+
0xac00 <= x && x <= 0xd7a3 ||
|
|
344993
|
+
// CJK Compatibility Ideographs
|
|
344994
|
+
0xf900 <= x && x <= 0xfaff ||
|
|
344995
|
+
// Vertical Forms
|
|
344996
|
+
0xfe10 <= x && x <= 0xfe19 ||
|
|
344997
|
+
// CJK Compatibility Forms .. Small Form Variants
|
|
344998
|
+
0xfe30 <= x && x <= 0xfe6b ||
|
|
344999
|
+
// Halfwidth and Fullwidth Forms
|
|
345000
|
+
0xff01 <= x && x <= 0xff60 ||
|
|
345001
|
+
0xffe0 <= x && x <= 0xffe6 ||
|
|
345002
|
+
// Kana Supplement
|
|
345003
|
+
0x1b000 <= x && x <= 0x1b001 ||
|
|
345004
|
+
// Enclosed Ideographic Supplement
|
|
345005
|
+
0x1f200 <= x && x <= 0x1f251 ||
|
|
345006
|
+
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
345007
|
+
0x20000 <= x && x <= 0x3fffd)) {
|
|
345008
|
+
return true;
|
|
345009
|
+
}
|
|
345010
|
+
|
|
345011
|
+
return false;
|
|
345012
|
+
}
|
|
345013
|
+
|
|
345014
|
+
|
|
345015
|
+
/***/ }),
|
|
345016
|
+
|
|
345017
|
+
/***/ 75758:
|
|
345018
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
345019
|
+
|
|
345020
|
+
"use strict";
|
|
345021
|
+
|
|
345022
|
+
var ansiEscapes = __nccwpck_require__(37374);
|
|
345023
|
+
var cliCursor = __nccwpck_require__(22701);
|
|
345024
|
+
|
|
345025
|
+
function main(stream) {
|
|
345026
|
+
var prevLineCount = 0;
|
|
345027
|
+
|
|
345028
|
+
var render = function () {
|
|
345029
|
+
cliCursor.hide();
|
|
345030
|
+
var out = [].join.call(arguments, ' ') + '\n';
|
|
345031
|
+
stream.write(ansiEscapes.eraseLines(prevLineCount) + out);
|
|
345032
|
+
prevLineCount = out.split('\n').length;
|
|
345033
|
+
};
|
|
345034
|
+
|
|
345035
|
+
render.clear = function () {
|
|
345036
|
+
stream.write(ansiEscapes.eraseLines(prevLineCount));
|
|
345037
|
+
prevLineCount = 0;
|
|
345038
|
+
};
|
|
345039
|
+
|
|
345040
|
+
render.done = function () {
|
|
345041
|
+
prevLineCount = 0;
|
|
345042
|
+
cliCursor.show();
|
|
345043
|
+
};
|
|
345044
|
+
|
|
345045
|
+
return render;
|
|
345046
|
+
}
|
|
345047
|
+
|
|
345048
|
+
module.exports = main(process.stdout);
|
|
345049
|
+
module.exports.stderr = main(process.stderr);
|
|
345050
|
+
module.exports.create = main;
|
|
345051
|
+
|
|
345052
|
+
|
|
344999
345053
|
/***/ }),
|
|
345000
345054
|
|
|
345001
345055
|
/***/ 61389:
|
|
@@ -345005,7 +345059,7 @@ module.exports.supportsColor = supportsColor;
|
|
|
345005
345059
|
|
|
345006
345060
|
var stripAnsi = __nccwpck_require__(87668);
|
|
345007
345061
|
var codePointAt = __nccwpck_require__(62257);
|
|
345008
|
-
var isFullwidthCodePoint = __nccwpck_require__(
|
|
345062
|
+
var isFullwidthCodePoint = __nccwpck_require__(26666);
|
|
345009
345063
|
|
|
345010
345064
|
// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345
|
|
345011
345065
|
module.exports = function (str) {
|
|
@@ -350385,18 +350439,22 @@ var requiresDockerBuild = function (context) {
|
|
|
350385
350439
|
return false;
|
|
350386
350440
|
};
|
|
350387
350441
|
exports.requiresDockerBuild = requiresDockerBuild;
|
|
350442
|
+
var getDockerBaseVariables = function () {
|
|
350443
|
+
return {
|
|
350444
|
+
DOCKER_HOST: "tcp://0.0.0.0:2375",
|
|
350445
|
+
DOCKER_TLS_CERTDIR: "",
|
|
350446
|
+
DOCKER_DRIVER: "overlay2",
|
|
350447
|
+
DOCKER_BUILDKIT: "1"
|
|
350448
|
+
};
|
|
350449
|
+
};
|
|
350388
350450
|
var getDockerBuildVariables = function (context) {
|
|
350389
350451
|
var _a, _b, _c, _d;
|
|
350390
|
-
return __assign(__assign(__assign({}, DOCKER_RUNNER_BUILD_VARIABLES), {
|
|
350391
|
-
DOCKER_BUILDKIT: "1",
|
|
350452
|
+
return __assign(__assign(__assign(__assign({}, DOCKER_RUNNER_BUILD_VARIABLES), {
|
|
350392
350453
|
DOCKERFILE_ADDITIONS: (_b = (_a = context.componentConfig.build.docker) === null || _a === void 0 ? void 0 : _a.additionsBegin) === null || _b === void 0 ? void 0 : _b.join("\n"),
|
|
350393
350454
|
DOCKERFILE_ADDITIONS_END: (_d = (_c = context.componentConfig.build.docker) === null || _c === void 0 ? void 0 : _c.additionsEnd) === null || _d === void 0 ? void 0 : _d.join("\n"),
|
|
350394
350455
|
APP_DIR: context.componentConfig.dir,
|
|
350395
|
-
|
|
350396
|
-
|
|
350397
|
-
DOCKER_DIR: ".",
|
|
350398
|
-
DOCKER_DRIVER: "overlay2"
|
|
350399
|
-
}), (0, exports.getDockerImageVariables)(context));
|
|
350456
|
+
DOCKER_DIR: "."
|
|
350457
|
+
}), getDockerBaseVariables()), (0, exports.getDockerImageVariables)(context));
|
|
350400
350458
|
};
|
|
350401
350459
|
exports.getDockerBuildVariables = getDockerBuildVariables;
|
|
350402
350460
|
exports.DOCKER_BUILD_JOB_NAME = "🔨 docker";
|
|
@@ -350407,7 +350465,7 @@ var getDockerJobBaseProps = function (context) {
|
|
|
350407
350465
|
name: "docker:20-dind",
|
|
350408
350466
|
command: ["--tls=false"]
|
|
350409
350467
|
}],
|
|
350410
|
-
variables: (
|
|
350468
|
+
variables: getDockerBaseVariables()
|
|
350411
350469
|
};
|
|
350412
350470
|
};
|
|
350413
350471
|
exports.getDockerJobBaseProps = getDockerJobBaseProps;
|
|
@@ -350420,7 +350478,9 @@ var createDockerBuildJobBase = function (context, _a) {
|
|
|
350420
350478
|
stage: "build"
|
|
350421
350479
|
}, (0, exports.getDockerJobBaseProps)(context)), {
|
|
350422
350480
|
script: script || []
|
|
350423
|
-
}),
|
|
350481
|
+
}), {
|
|
350482
|
+
variables: (0, exports.getDockerBuildVariables)(context)
|
|
350483
|
+
}, def);
|
|
350424
350484
|
};
|
|
350425
350485
|
exports.createDockerBuildJobBase = createDockerBuildJobBase;
|
|
350426
350486
|
exports.gitlabDockerLogin = "docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY";
|
|
@@ -351069,29 +351129,25 @@ exports.createRailsBuildJobs = void 0;
|
|
|
351069
351129
|
var types_1 = __nccwpck_require__(71197);
|
|
351070
351130
|
var docker_1 = __nccwpck_require__(33219);
|
|
351071
351131
|
var createRailsBuildJobs = function (context) {
|
|
351072
|
-
var _a, _b, _c
|
|
351132
|
+
var _a, _b, _c;
|
|
351073
351133
|
var buildConfig = context.componentConfig.build;
|
|
351074
351134
|
if (!(0, types_1.isOfBuildType)(buildConfig, "rails")) {
|
|
351075
351135
|
// should not happen
|
|
351076
351136
|
throw new Error("build type is not rails");
|
|
351077
351137
|
}
|
|
351078
351138
|
var cnbConf = buildConfig.cnbBuilder;
|
|
351079
|
-
|
|
351080
|
-
// TODO: remove when all projects are migrated
|
|
351081
|
-
var packEnvArgs = (_c = (_b = (_a = buildConfig.extraVars) === null || _a === void 0 ? void 0 : _a.CNB_ENV_VARS) === null || _b === void 0 ? void 0 : _b.split(" ").map(function (v) {
|
|
351082
|
-
return "--env '".concat(v, "'");
|
|
351083
|
-
})) !== null && _c !== void 0 ? _c : Object.entries((_d = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.buildVars) !== null && _d !== void 0 ? _d : {}).map(function (_a) {
|
|
351139
|
+
var packEnvArgs = Object.entries((_a = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.buildVars) !== null && _a !== void 0 ? _a : {}).map(function (_a) {
|
|
351084
351140
|
var _b = __read(_a, 2),
|
|
351085
351141
|
k = _b[0],
|
|
351086
351142
|
v = _b[1];
|
|
351087
351143
|
return "--env '".concat(k).concat(v ? "=".concat(v) : "", "'");
|
|
351088
|
-
});
|
|
351144
|
+
}).join(" ");
|
|
351089
351145
|
return [(0, docker_1.createDockerBuildJobBase)(context, {
|
|
351090
351146
|
variables: context.componentConfig.build.extraVars,
|
|
351091
351147
|
// custom script
|
|
351092
351148
|
script: [docker_1.gitlabDockerLogin, "docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "/pack-v").concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "-linux.tgz | tar -zx --directory /usr/local/bin pack"), "chmod +x /usr/local/bin/pack",
|
|
351093
351149
|
// replace private git ssh gem sources with https to make bundler with credentials via env var work
|
|
351094
|
-
"sed --in-place 's|git@\\([^:]*\\):|https://\\1/|g' Gemfile Gemfile.lock", "pack build \"$DOCKER_IMAGE:$DOCKER_IMAGE_TAG\" --builder '".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.image, "' --publish --cache-image \"$DOCKER_CACHE_IMAGE\" ").concat(packEnvArgs
|
|
351150
|
+
"sed --in-place 's|git@\\([^:]*\\):|https://\\1/|g' Gemfile Gemfile.lock", "pack build \"$DOCKER_IMAGE:$DOCKER_IMAGE_TAG\" --builder '".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.image, "' --publish --cache-image \"$DOCKER_CACHE_IMAGE\" ").concat(packEnvArgs, " ").concat((_c = (_b = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packExtraArgs) === null || _b === void 0 ? void 0 : _b.join(" ")) !== null && _c !== void 0 ? _c : "")]
|
|
351095
351151
|
})];
|
|
351096
351152
|
};
|
|
351097
351153
|
exports.createRailsBuildJobs = createRailsBuildJobs;
|
|
@@ -351438,7 +351494,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
351438
351494
|
|
|
351439
351495
|
exports.__esModule = true;
|
|
351440
351496
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
351441
|
-
exports.PIPELINE_IMAGE_TAG = "
|
|
351497
|
+
exports.PIPELINE_IMAGE_TAG = "lintstaged-7b3be981" || 0;
|
|
351442
351498
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
351443
351499
|
|
|
351444
351500
|
/***/ }),
|
|
@@ -354170,27 +354226,174 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
354170
354226
|
}
|
|
354171
354227
|
};
|
|
354172
354228
|
exports.__esModule = true;
|
|
354173
|
-
exports.getBuildId = void 0;
|
|
354174
|
-
var child_process_promise_1 = __nccwpck_require__(75763);
|
|
354175
|
-
var getBuildId = function () {
|
|
354229
|
+
exports.getBuildId = void 0;
|
|
354230
|
+
var child_process_promise_1 = __nccwpck_require__(75763);
|
|
354231
|
+
var getBuildId = function () {
|
|
354232
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
354233
|
+
return __generator(this, function (_a) {
|
|
354234
|
+
switch (_a.label) {
|
|
354235
|
+
case 0:
|
|
354236
|
+
return [4 /*yield*/, (0, child_process_promise_1.exec)("git describe --tags || git rev-parse HEAD").then(function (s) {
|
|
354237
|
+
return s.stdout.trim();
|
|
354238
|
+
})];
|
|
354239
|
+
case 1:
|
|
354240
|
+
return [2 /*return*/, _a.sent()];
|
|
354241
|
+
}
|
|
354242
|
+
});
|
|
354243
|
+
});
|
|
354244
|
+
};
|
|
354245
|
+
exports.getBuildId = getBuildId;
|
|
354246
|
+
|
|
354247
|
+
/***/ }),
|
|
354248
|
+
|
|
354249
|
+
/***/ 5923:
|
|
354250
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
354251
|
+
|
|
354252
|
+
"use strict";
|
|
354253
|
+
|
|
354254
|
+
|
|
354255
|
+
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
354256
|
+
function adopt(value) {
|
|
354257
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
354258
|
+
resolve(value);
|
|
354259
|
+
});
|
|
354260
|
+
}
|
|
354261
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
354262
|
+
function fulfilled(value) {
|
|
354263
|
+
try {
|
|
354264
|
+
step(generator.next(value));
|
|
354265
|
+
} catch (e) {
|
|
354266
|
+
reject(e);
|
|
354267
|
+
}
|
|
354268
|
+
}
|
|
354269
|
+
function rejected(value) {
|
|
354270
|
+
try {
|
|
354271
|
+
step(generator["throw"](value));
|
|
354272
|
+
} catch (e) {
|
|
354273
|
+
reject(e);
|
|
354274
|
+
}
|
|
354275
|
+
}
|
|
354276
|
+
function step(result) {
|
|
354277
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
354278
|
+
}
|
|
354279
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
354280
|
+
});
|
|
354281
|
+
};
|
|
354282
|
+
var __generator = this && this.__generator || function (thisArg, body) {
|
|
354283
|
+
var _ = {
|
|
354284
|
+
label: 0,
|
|
354285
|
+
sent: function () {
|
|
354286
|
+
if (t[0] & 1) throw t[1];
|
|
354287
|
+
return t[1];
|
|
354288
|
+
},
|
|
354289
|
+
trys: [],
|
|
354290
|
+
ops: []
|
|
354291
|
+
},
|
|
354292
|
+
f,
|
|
354293
|
+
y,
|
|
354294
|
+
t,
|
|
354295
|
+
g;
|
|
354296
|
+
return g = {
|
|
354297
|
+
next: verb(0),
|
|
354298
|
+
"throw": verb(1),
|
|
354299
|
+
"return": verb(2)
|
|
354300
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
354301
|
+
return this;
|
|
354302
|
+
}), g;
|
|
354303
|
+
function verb(n) {
|
|
354304
|
+
return function (v) {
|
|
354305
|
+
return step([n, v]);
|
|
354306
|
+
};
|
|
354307
|
+
}
|
|
354308
|
+
function step(op) {
|
|
354309
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
354310
|
+
while (_) try {
|
|
354311
|
+
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;
|
|
354312
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
354313
|
+
switch (op[0]) {
|
|
354314
|
+
case 0:
|
|
354315
|
+
case 1:
|
|
354316
|
+
t = op;
|
|
354317
|
+
break;
|
|
354318
|
+
case 4:
|
|
354319
|
+
_.label++;
|
|
354320
|
+
return {
|
|
354321
|
+
value: op[1],
|
|
354322
|
+
done: false
|
|
354323
|
+
};
|
|
354324
|
+
case 5:
|
|
354325
|
+
_.label++;
|
|
354326
|
+
y = op[1];
|
|
354327
|
+
op = [0];
|
|
354328
|
+
continue;
|
|
354329
|
+
case 7:
|
|
354330
|
+
op = _.ops.pop();
|
|
354331
|
+
_.trys.pop();
|
|
354332
|
+
continue;
|
|
354333
|
+
default:
|
|
354334
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
354335
|
+
_ = 0;
|
|
354336
|
+
continue;
|
|
354337
|
+
}
|
|
354338
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
354339
|
+
_.label = op[1];
|
|
354340
|
+
break;
|
|
354341
|
+
}
|
|
354342
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
354343
|
+
_.label = t[1];
|
|
354344
|
+
t = op;
|
|
354345
|
+
break;
|
|
354346
|
+
}
|
|
354347
|
+
if (t && _.label < t[2]) {
|
|
354348
|
+
_.label = t[2];
|
|
354349
|
+
_.ops.push(op);
|
|
354350
|
+
break;
|
|
354351
|
+
}
|
|
354352
|
+
if (t[2]) _.ops.pop();
|
|
354353
|
+
_.trys.pop();
|
|
354354
|
+
continue;
|
|
354355
|
+
}
|
|
354356
|
+
op = body.call(thisArg, _);
|
|
354357
|
+
} catch (e) {
|
|
354358
|
+
op = [6, e];
|
|
354359
|
+
y = 0;
|
|
354360
|
+
} finally {
|
|
354361
|
+
f = t = 0;
|
|
354362
|
+
}
|
|
354363
|
+
if (op[0] & 5) throw op[1];
|
|
354364
|
+
return {
|
|
354365
|
+
value: op[0] ? op[1] : void 0,
|
|
354366
|
+
done: true
|
|
354367
|
+
};
|
|
354368
|
+
}
|
|
354369
|
+
};
|
|
354370
|
+
exports.__esModule = true;
|
|
354371
|
+
exports.getBaseCommitInfo = void 0;
|
|
354372
|
+
var getBuildId_1 = __nccwpck_require__(60630);
|
|
354373
|
+
var getBaseCommitInfo = function () {
|
|
354176
354374
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
354177
|
-
|
|
354178
|
-
|
|
354375
|
+
var _a;
|
|
354376
|
+
var _b;
|
|
354377
|
+
return __generator(this, function (_c) {
|
|
354378
|
+
switch (_c.label) {
|
|
354179
354379
|
case 0:
|
|
354180
|
-
|
|
354181
|
-
|
|
354182
|
-
|
|
354380
|
+
_a = {
|
|
354381
|
+
refName: (_b = process.env.CI_COMMIT_REF_NAME) !== null && _b !== void 0 ? _b : "unknown",
|
|
354382
|
+
reviewSlug: process.env.CI_MERGE_REQUEST_IID ? "mr".concat(process.env.CI_MERGE_REQUEST_IID) : "unknown",
|
|
354383
|
+
buildTime: new Date().toISOString()
|
|
354384
|
+
};
|
|
354385
|
+
return [4 /*yield*/, (0, getBuildId_1.getBuildId)()];
|
|
354183
354386
|
case 1:
|
|
354184
|
-
return [2 /*return*/, _a.sent()];
|
|
354387
|
+
return [2 /*return*/, (_a.buildId = _c.sent(), _a)];
|
|
354185
354388
|
}
|
|
354186
354389
|
});
|
|
354187
354390
|
});
|
|
354188
354391
|
};
|
|
354189
|
-
exports.
|
|
354392
|
+
exports.getBaseCommitInfo = getBaseCommitInfo;
|
|
354190
354393
|
|
|
354191
354394
|
/***/ }),
|
|
354192
354395
|
|
|
354193
|
-
/***/
|
|
354396
|
+
/***/ 17052:
|
|
354194
354397
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
354195
354398
|
|
|
354196
354399
|
"use strict";
|
|
@@ -354312,28 +354515,52 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
354312
354515
|
}
|
|
354313
354516
|
};
|
|
354314
354517
|
exports.__esModule = true;
|
|
354315
|
-
exports.
|
|
354316
|
-
var
|
|
354317
|
-
var
|
|
354518
|
+
exports.createAllJobs = void 0;
|
|
354519
|
+
var config_1 = __nccwpck_require__(33138);
|
|
354520
|
+
var createJobsForComponent_1 = __nccwpck_require__(80962);
|
|
354521
|
+
var createAllJobs = function (config, trigger) {
|
|
354318
354522
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
354319
|
-
var _a;
|
|
354320
|
-
var _b;
|
|
354523
|
+
var _a, _b;
|
|
354321
354524
|
return __generator(this, function (_c) {
|
|
354322
354525
|
switch (_c.label) {
|
|
354323
354526
|
case 0:
|
|
354324
|
-
_a =
|
|
354325
|
-
|
|
354326
|
-
|
|
354327
|
-
|
|
354328
|
-
|
|
354329
|
-
|
|
354527
|
+
_b = (_a = Object).fromEntries;
|
|
354528
|
+
return [4 /*yield*/, Promise.all(Object.keys(config.components).map(function (componentName) {
|
|
354529
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
354530
|
+
var envs, _a, _b, _c;
|
|
354531
|
+
return __generator(this, function (_d) {
|
|
354532
|
+
switch (_d.label) {
|
|
354533
|
+
case 0:
|
|
354534
|
+
envs = (0, config_1.getAllEnvsByTrigger)(config, componentName, trigger);
|
|
354535
|
+
_a = [componentName];
|
|
354536
|
+
_c = (_b = Object).fromEntries;
|
|
354537
|
+
return [4 /*yield*/, Promise.all(envs.map(function (env) {
|
|
354538
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
354539
|
+
var _a;
|
|
354540
|
+
return __generator(this, function (_b) {
|
|
354541
|
+
switch (_b.label) {
|
|
354542
|
+
case 0:
|
|
354543
|
+
_a = [env];
|
|
354544
|
+
return [4 /*yield*/, (0, createJobsForComponent_1.createJobsForComponent)(config, componentName, env, trigger)];
|
|
354545
|
+
case 1:
|
|
354546
|
+
return [2 /*return*/, _a.concat([_b.sent()])];
|
|
354547
|
+
}
|
|
354548
|
+
});
|
|
354549
|
+
});
|
|
354550
|
+
}))];
|
|
354551
|
+
case 1:
|
|
354552
|
+
return [2 /*return*/, _a.concat([_c.apply(_b, [_d.sent()])])];
|
|
354553
|
+
}
|
|
354554
|
+
});
|
|
354555
|
+
});
|
|
354556
|
+
}))];
|
|
354330
354557
|
case 1:
|
|
354331
|
-
return [2 /*return*/, (_a
|
|
354558
|
+
return [2 /*return*/, _b.apply(_a, [_c.sent()])];
|
|
354332
354559
|
}
|
|
354333
354560
|
});
|
|
354334
354561
|
});
|
|
354335
354562
|
};
|
|
354336
|
-
exports.
|
|
354563
|
+
exports.createAllJobs = createAllJobs;
|
|
354337
354564
|
|
|
354338
354565
|
/***/ }),
|
|
354339
354566
|
|
|
@@ -354343,16 +354570,6 @@ exports.getBaseCommitInfo = getBaseCommitInfo;
|
|
|
354343
354570
|
"use strict";
|
|
354344
354571
|
|
|
354345
354572
|
|
|
354346
|
-
var __assign = this && this.__assign || function () {
|
|
354347
|
-
__assign = Object.assign || function (t) {
|
|
354348
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
354349
|
-
s = arguments[i];
|
|
354350
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
354351
|
-
}
|
|
354352
|
-
return t;
|
|
354353
|
-
};
|
|
354354
|
-
return __assign.apply(this, arguments);
|
|
354355
|
-
};
|
|
354356
354573
|
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
354357
354574
|
function adopt(value) {
|
|
354358
354575
|
return value instanceof P ? value : new P(function (resolve) {
|
|
@@ -354505,54 +354722,40 @@ var config_1 = __nccwpck_require__(33138);
|
|
|
354505
354722
|
var rules_1 = __nccwpck_require__(42020);
|
|
354506
354723
|
var runner_1 = __nccwpck_require__(55071);
|
|
354507
354724
|
var jobs_1 = __nccwpck_require__(62339);
|
|
354508
|
-
var
|
|
354725
|
+
var createAllJobs_1 = __nccwpck_require__(17052);
|
|
354726
|
+
var createGitlabJobs_1 = __nccwpck_require__(63920);
|
|
354509
354727
|
var createChildPipeline = function (type, trigger, config) {
|
|
354510
354728
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
354511
|
-
var
|
|
354512
|
-
|
|
354513
|
-
|
|
354729
|
+
var jobs, allEnvs, stages, pipeline;
|
|
354730
|
+
var _a;
|
|
354731
|
+
return __generator(this, function (_b) {
|
|
354732
|
+
switch (_b.label) {
|
|
354514
354733
|
case 0:
|
|
354515
|
-
|
|
354516
|
-
return [4 /*yield*/, components.reduce(function (acc, componentName) {
|
|
354517
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
354518
|
-
var envs, _a, _b;
|
|
354519
|
-
return __generator(this, function (_c) {
|
|
354520
|
-
switch (_c.label) {
|
|
354521
|
-
case 0:
|
|
354522
|
-
envs = (0, config_1.getAllEnvsByTrigger)(config, componentName, trigger);
|
|
354523
|
-
_a = [{}];
|
|
354524
|
-
return [4 /*yield*/, acc];
|
|
354525
|
-
case 1:
|
|
354526
|
-
_b = [__assign.apply(void 0, _a.concat([_c.sent()]))];
|
|
354527
|
-
return [4 /*yield*/, (0, createJobs_1.createJobs)(type, envs, config, componentName, trigger)];
|
|
354528
|
-
case 2:
|
|
354529
|
-
return [2 /*return*/, __assign.apply(void 0, _b.concat([_c.sent()]))];
|
|
354530
|
-
}
|
|
354531
|
-
});
|
|
354532
|
-
});
|
|
354533
|
-
}, Promise.resolve({}))];
|
|
354734
|
+
return [4 /*yield*/, (0, createAllJobs_1.createAllJobs)(config, trigger)];
|
|
354534
354735
|
case 1:
|
|
354535
|
-
jobs =
|
|
354736
|
+
jobs = _b.sent();
|
|
354536
354737
|
allEnvs = (0, config_1.getAllEnvsInAllComponents)(config);
|
|
354537
354738
|
stages = jobs_1.BASE_STAGES.reduce(function (acc, baseStage) {
|
|
354538
354739
|
return __spreadArray(__spreadArray(__spreadArray([], __read(acc), false), [baseStage], false), __read(allEnvs.map(function (e) {
|
|
354539
354740
|
return "".concat(baseStage, " ").concat(e);
|
|
354540
354741
|
})), false);
|
|
354541
354742
|
}, []);
|
|
354542
|
-
if (type === "gitlab")
|
|
354543
|
-
|
|
354544
|
-
|
|
354545
|
-
|
|
354546
|
-
|
|
354547
|
-
|
|
354548
|
-
|
|
354549
|
-
|
|
354550
|
-
|
|
354551
|
-
|
|
354552
|
-
|
|
354553
|
-
|
|
354554
|
-
|
|
354555
|
-
|
|
354743
|
+
if (!(type === "gitlab")) return [3 /*break*/, 3];
|
|
354744
|
+
_a = {
|
|
354745
|
+
image: (0, runner_1.getRunnerImage)("jobs-default"),
|
|
354746
|
+
variables: {
|
|
354747
|
+
FF_USE_FASTZIP: "true"
|
|
354748
|
+
},
|
|
354749
|
+
workflow: {
|
|
354750
|
+
rules: rules_1.RULES_ALWAYS
|
|
354751
|
+
},
|
|
354752
|
+
stages: stages
|
|
354753
|
+
};
|
|
354754
|
+
return [4 /*yield*/, (0, createGitlabJobs_1.createGitlabJobs)(jobs)];
|
|
354755
|
+
case 2:
|
|
354756
|
+
pipeline = (_a.jobs = _b.sent(), _a);
|
|
354757
|
+
return [2 /*return*/, pipeline];
|
|
354758
|
+
case 3:
|
|
354556
354759
|
throw new Error("".concat(type, " is not supported"));
|
|
354557
354760
|
}
|
|
354558
354761
|
});
|
|
@@ -354562,7 +354765,7 @@ exports.createChildPipeline = createChildPipeline;
|
|
|
354562
354765
|
|
|
354563
354766
|
/***/ }),
|
|
354564
354767
|
|
|
354565
|
-
/***/
|
|
354768
|
+
/***/ 80962:
|
|
354566
354769
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
354567
354770
|
|
|
354568
354771
|
"use strict";
|
|
@@ -354733,14 +354936,12 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
354733
354936
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
354734
354937
|
};
|
|
354735
354938
|
exports.__esModule = true;
|
|
354736
|
-
exports.
|
|
354939
|
+
exports.createJobsForComponent = void 0;
|
|
354737
354940
|
var lodash_1 = __nccwpck_require__(23255);
|
|
354738
354941
|
var build_1 = __nccwpck_require__(73760);
|
|
354739
354942
|
var context_1 = __nccwpck_require__(22041);
|
|
354740
354943
|
var deploy_1 = __nccwpck_require__(90223);
|
|
354741
|
-
var utils_1 = __nccwpck_require__(37461);
|
|
354742
354944
|
var getCommitInfo_1 = __nccwpck_require__(5923);
|
|
354743
|
-
var makeGitlabJob_1 = __nccwpck_require__(15715);
|
|
354744
354945
|
var packageManager_1 = __nccwpck_require__(69168);
|
|
354745
354946
|
var injectDefaultVarsInCustomJobs = function (context, jobs) {
|
|
354746
354947
|
return jobs.map(function (_a) {
|
|
@@ -354768,71 +354969,9 @@ var createRawJobs = function (context) {
|
|
|
354768
354969
|
var customJobs = getCustomJobs(context);
|
|
354769
354970
|
return __spreadArray(__spreadArray(__spreadArray([], __read(buildJobs), false), __read(deployJobs), false), __read(customJobs), false);
|
|
354770
354971
|
};
|
|
354771
|
-
var
|
|
354772
|
-
if (env) {
|
|
354773
|
-
return "".concat(componentName, " ").concat(name, " | ").concat(env, " ");
|
|
354774
|
-
}
|
|
354775
|
-
return "".concat(componentName, " ").concat(name);
|
|
354776
|
-
};
|
|
354777
|
-
var getFullReferencedJobName = function (referencedJobName, componentName, env, allRawJobs) {
|
|
354778
|
-
var referencedJob = allRawJobs.find(function (j) {
|
|
354779
|
-
return j.name === referencedJobName;
|
|
354780
|
-
});
|
|
354781
|
-
if (!referencedJob) {
|
|
354782
|
-
throw new Error("unknown job referenced: " + referencedJobName);
|
|
354783
|
-
}
|
|
354784
|
-
var envToSet = referencedJob.envMode !== "none" ? env : null;
|
|
354785
|
-
return getFullJobName(referencedJobName, componentName, envToSet);
|
|
354786
|
-
};
|
|
354787
|
-
// replaces references to other jobs with the full name
|
|
354788
|
-
// the full name contains the componentname and the env name (if any)
|
|
354789
|
-
var replaceReferences = function (job, componentName, env, allRawJobs) {
|
|
354790
|
-
var _a, _b, _c;
|
|
354791
|
-
var stage = job.envMode === "stagePerEnv" ? "".concat(job.stage, " ").concat(env) : job.stage;
|
|
354792
|
-
var cleanedNeeds = __spreadArray(__spreadArray([], __read((_a = job.needs) !== null && _a !== void 0 ? _a : []), false), __read((_b = job.needsOtherComponent) !== null && _b !== void 0 ? _b : []), false);
|
|
354793
|
-
var needs = cleanedNeeds === null || cleanedNeeds === void 0 ? void 0 : cleanedNeeds.map(function (n) {
|
|
354794
|
-
var _a;
|
|
354795
|
-
return (0, lodash_1.isObject)(n) ? {
|
|
354796
|
-
job: getFullReferencedJobName(n.job, (_a = n.componentName) !== null && _a !== void 0 ? _a : componentName, env, allRawJobs),
|
|
354797
|
-
artifacts: n.artifacts
|
|
354798
|
-
} : getFullReferencedJobName(n, componentName, env, allRawJobs);
|
|
354799
|
-
});
|
|
354800
|
-
return __assign(__assign({}, job), {
|
|
354801
|
-
stage: stage,
|
|
354802
|
-
needs: needs,
|
|
354803
|
-
environment: ((_c = job.environment) === null || _c === void 0 ? void 0 : _c.on_stop) ? __assign(__assign({}, job.environment), {
|
|
354804
|
-
on_stop: getFullReferencedJobName(job.environment.on_stop, componentName, env, allRawJobs)
|
|
354805
|
-
}) : job.environment
|
|
354806
|
-
});
|
|
354807
|
-
};
|
|
354808
|
-
// this can be removed once https://gitlab.com/gitlab-org/gitlab/-/issues/220758 is resolved
|
|
354809
|
-
var addStageNeeds = function (jobs) {
|
|
354810
|
-
// when a job defines needsStages, we add these as needs
|
|
354811
|
-
return jobs.map(function (job) {
|
|
354812
|
-
var _a;
|
|
354813
|
-
if (!job.needsStages || job.needsStages.length === 0) {
|
|
354814
|
-
return job;
|
|
354815
|
-
}
|
|
354816
|
-
var neededJobs = jobs.map(function (j) {
|
|
354817
|
-
var _a, _b;
|
|
354818
|
-
var neededStage = (_a = job.needsStages) === null || _a === void 0 ? void 0 : _a.find(function (s) {
|
|
354819
|
-
return j.stage === s.stage;
|
|
354820
|
-
});
|
|
354821
|
-
if (neededStage) {
|
|
354822
|
-
return {
|
|
354823
|
-
job: j.name,
|
|
354824
|
-
artifacts: (_b = neededStage.artifacts) !== null && _b !== void 0 ? _b : false
|
|
354825
|
-
};
|
|
354826
|
-
}
|
|
354827
|
-
}).filter(utils_1.notNil);
|
|
354828
|
-
return __assign(__assign({}, job), {
|
|
354829
|
-
needs: __spreadArray(__spreadArray([], __read((_a = job.needs) !== null && _a !== void 0 ? _a : []), false), __read(neededJobs), false)
|
|
354830
|
-
});
|
|
354831
|
-
});
|
|
354832
|
-
};
|
|
354833
|
-
var createJobs = function (type, envs, config, componentName, trigger) {
|
|
354972
|
+
var createJobsForComponent = function (config, componentName, env, trigger) {
|
|
354834
354973
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
354835
|
-
var commitInfo, _a, packageManagerInfo;
|
|
354974
|
+
var commitInfo, _a, packageManagerInfo, context;
|
|
354836
354975
|
return __generator(this, function (_b) {
|
|
354837
354976
|
switch (_b.label) {
|
|
354838
354977
|
case 0:
|
|
@@ -354845,47 +354984,19 @@ var createJobs = function (type, envs, config, componentName, trigger) {
|
|
|
354845
354984
|
return [4 /*yield*/, (0, packageManager_1.getPackageManagerInfo)(config, componentName)];
|
|
354846
354985
|
case 2:
|
|
354847
354986
|
packageManagerInfo = _b.sent();
|
|
354848
|
-
return [
|
|
354849
|
-
|
|
354850
|
-
|
|
354851
|
-
|
|
354852
|
-
switch (_f.label) {
|
|
354853
|
-
case 0:
|
|
354854
|
-
return [4 /*yield*/, (0, context_1.createContext)(config, componentName, env, commitInfo, packageManagerInfo)];
|
|
354855
|
-
case 1:
|
|
354856
|
-
context = _f.sent();
|
|
354857
|
-
jobs = addStageNeeds(createRawJobs(context));
|
|
354858
|
-
_a = [{}];
|
|
354859
|
-
return [4 /*yield*/, acc];
|
|
354860
|
-
case 2:
|
|
354861
|
-
_b = [__assign.apply(void 0, _a.concat([_f.sent()]))];
|
|
354862
|
-
_d = (_c = jobs).reduce;
|
|
354863
|
-
_e = [function (acc, job) {
|
|
354864
|
-
var _a;
|
|
354865
|
-
var jobWithResolvedReferences = replaceReferences(job, componentName, env, jobs);
|
|
354866
|
-
var jobName = getFullJobName(job.name, componentName, job.envMode !== "none" ? env : undefined);
|
|
354867
|
-
if (type === "gitlab") {
|
|
354868
|
-
return __assign(__assign({}, acc), (_a = {}, _a[jobName] = (0, makeGitlabJob_1.makeGitlabJob)(jobWithResolvedReferences), _a));
|
|
354869
|
-
}
|
|
354870
|
-
throw new Error("not supported");
|
|
354871
|
-
}];
|
|
354872
|
-
return [4 /*yield*/, Promise.resolve({})];
|
|
354873
|
-
case 3:
|
|
354874
|
-
result = __assign.apply(void 0, _b.concat([_d.apply(_c, _e.concat([_f.sent()]))]));
|
|
354875
|
-
return [2 /*return*/, result];
|
|
354876
|
-
}
|
|
354877
|
-
});
|
|
354878
|
-
});
|
|
354879
|
-
}, {})];
|
|
354987
|
+
return [4 /*yield*/, (0, context_1.createContext)(config, componentName, env, commitInfo, packageManagerInfo)];
|
|
354988
|
+
case 3:
|
|
354989
|
+
context = _b.sent();
|
|
354990
|
+
return [2 /*return*/, createRawJobs(context)];
|
|
354880
354991
|
}
|
|
354881
354992
|
});
|
|
354882
354993
|
});
|
|
354883
354994
|
};
|
|
354884
|
-
exports.
|
|
354995
|
+
exports.createJobsForComponent = createJobsForComponent;
|
|
354885
354996
|
|
|
354886
354997
|
/***/ }),
|
|
354887
354998
|
|
|
354888
|
-
/***/
|
|
354999
|
+
/***/ 63920:
|
|
354889
355000
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
354890
355001
|
|
|
354891
355002
|
"use strict";
|
|
@@ -354901,6 +355012,121 @@ var __assign = this && this.__assign || function () {
|
|
|
354901
355012
|
};
|
|
354902
355013
|
return __assign.apply(this, arguments);
|
|
354903
355014
|
};
|
|
355015
|
+
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
355016
|
+
function adopt(value) {
|
|
355017
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
355018
|
+
resolve(value);
|
|
355019
|
+
});
|
|
355020
|
+
}
|
|
355021
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
355022
|
+
function fulfilled(value) {
|
|
355023
|
+
try {
|
|
355024
|
+
step(generator.next(value));
|
|
355025
|
+
} catch (e) {
|
|
355026
|
+
reject(e);
|
|
355027
|
+
}
|
|
355028
|
+
}
|
|
355029
|
+
function rejected(value) {
|
|
355030
|
+
try {
|
|
355031
|
+
step(generator["throw"](value));
|
|
355032
|
+
} catch (e) {
|
|
355033
|
+
reject(e);
|
|
355034
|
+
}
|
|
355035
|
+
}
|
|
355036
|
+
function step(result) {
|
|
355037
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
355038
|
+
}
|
|
355039
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
355040
|
+
});
|
|
355041
|
+
};
|
|
355042
|
+
var __generator = this && this.__generator || function (thisArg, body) {
|
|
355043
|
+
var _ = {
|
|
355044
|
+
label: 0,
|
|
355045
|
+
sent: function () {
|
|
355046
|
+
if (t[0] & 1) throw t[1];
|
|
355047
|
+
return t[1];
|
|
355048
|
+
},
|
|
355049
|
+
trys: [],
|
|
355050
|
+
ops: []
|
|
355051
|
+
},
|
|
355052
|
+
f,
|
|
355053
|
+
y,
|
|
355054
|
+
t,
|
|
355055
|
+
g;
|
|
355056
|
+
return g = {
|
|
355057
|
+
next: verb(0),
|
|
355058
|
+
"throw": verb(1),
|
|
355059
|
+
"return": verb(2)
|
|
355060
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
355061
|
+
return this;
|
|
355062
|
+
}), g;
|
|
355063
|
+
function verb(n) {
|
|
355064
|
+
return function (v) {
|
|
355065
|
+
return step([n, v]);
|
|
355066
|
+
};
|
|
355067
|
+
}
|
|
355068
|
+
function step(op) {
|
|
355069
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
355070
|
+
while (_) try {
|
|
355071
|
+
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;
|
|
355072
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
355073
|
+
switch (op[0]) {
|
|
355074
|
+
case 0:
|
|
355075
|
+
case 1:
|
|
355076
|
+
t = op;
|
|
355077
|
+
break;
|
|
355078
|
+
case 4:
|
|
355079
|
+
_.label++;
|
|
355080
|
+
return {
|
|
355081
|
+
value: op[1],
|
|
355082
|
+
done: false
|
|
355083
|
+
};
|
|
355084
|
+
case 5:
|
|
355085
|
+
_.label++;
|
|
355086
|
+
y = op[1];
|
|
355087
|
+
op = [0];
|
|
355088
|
+
continue;
|
|
355089
|
+
case 7:
|
|
355090
|
+
op = _.ops.pop();
|
|
355091
|
+
_.trys.pop();
|
|
355092
|
+
continue;
|
|
355093
|
+
default:
|
|
355094
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
355095
|
+
_ = 0;
|
|
355096
|
+
continue;
|
|
355097
|
+
}
|
|
355098
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
355099
|
+
_.label = op[1];
|
|
355100
|
+
break;
|
|
355101
|
+
}
|
|
355102
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
355103
|
+
_.label = t[1];
|
|
355104
|
+
t = op;
|
|
355105
|
+
break;
|
|
355106
|
+
}
|
|
355107
|
+
if (t && _.label < t[2]) {
|
|
355108
|
+
_.label = t[2];
|
|
355109
|
+
_.ops.push(op);
|
|
355110
|
+
break;
|
|
355111
|
+
}
|
|
355112
|
+
if (t[2]) _.ops.pop();
|
|
355113
|
+
_.trys.pop();
|
|
355114
|
+
continue;
|
|
355115
|
+
}
|
|
355116
|
+
op = body.call(thisArg, _);
|
|
355117
|
+
} catch (e) {
|
|
355118
|
+
op = [6, e];
|
|
355119
|
+
y = 0;
|
|
355120
|
+
} finally {
|
|
355121
|
+
f = t = 0;
|
|
355122
|
+
}
|
|
355123
|
+
if (op[0] & 5) throw op[1];
|
|
355124
|
+
return {
|
|
355125
|
+
value: op[0] ? op[1] : void 0,
|
|
355126
|
+
done: true
|
|
355127
|
+
};
|
|
355128
|
+
}
|
|
355129
|
+
};
|
|
354904
355130
|
var __rest = this && this.__rest || function (s, e) {
|
|
354905
355131
|
var t = {};
|
|
354906
355132
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
@@ -354941,29 +355167,99 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
354941
355167
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
354942
355168
|
};
|
|
354943
355169
|
exports.__esModule = true;
|
|
354944
|
-
exports.makeGitlabJob = void 0;
|
|
355170
|
+
exports.createGitlabJobs = exports.makeGitlabJob = void 0;
|
|
354945
355171
|
var lodash_1 = __nccwpck_require__(23255);
|
|
354946
355172
|
var defaults_1 = __nccwpck_require__(87383);
|
|
355173
|
+
var getFullJobName = function (name, componentName, env) {
|
|
355174
|
+
if (env) {
|
|
355175
|
+
return "".concat(componentName, " ").concat(name, " | ").concat(env, " ");
|
|
355176
|
+
}
|
|
355177
|
+
return "".concat(componentName, " ").concat(name);
|
|
355178
|
+
};
|
|
355179
|
+
var getFullReferencedJobName = function (referencedJobName, componentName, env, allJobs) {
|
|
355180
|
+
var _a, _b;
|
|
355181
|
+
var referencedJob = (_b = (_a = allJobs[componentName]) === null || _a === void 0 ? void 0 : _a[env]) === null || _b === void 0 ? void 0 : _b.find(function (j) {
|
|
355182
|
+
return j.name === referencedJobName;
|
|
355183
|
+
});
|
|
355184
|
+
if (!referencedJob) {
|
|
355185
|
+
throw new Error("unknown job referenced: '".concat(referencedJobName, "' from '").concat(env, ":").concat(componentName, "'"));
|
|
355186
|
+
}
|
|
355187
|
+
var envToSet = referencedJob.envMode !== "none" ? env : null;
|
|
355188
|
+
return getFullJobName(referencedJobName, componentName, envToSet);
|
|
355189
|
+
};
|
|
354947
355190
|
var getJobName = function (need) {
|
|
354948
355191
|
return (0, lodash_1.isObject)(need) ? need.job : need;
|
|
354949
355192
|
};
|
|
354950
|
-
var makeGitlabJob = function (_a) {
|
|
355193
|
+
var makeGitlabJob = function (componentName, env, _a, allJobs) {
|
|
355194
|
+
var _b;
|
|
354951
355195
|
var envMode = _a.envMode,
|
|
354952
355196
|
needsStages = _a.needsStages,
|
|
354953
355197
|
needsOtherComponent = _a.needsOtherComponent,
|
|
354954
355198
|
name = _a.name,
|
|
354955
355199
|
needs = _a.needs,
|
|
354956
|
-
|
|
354957
|
-
|
|
355200
|
+
job = __rest(_a, ["envMode", "needsStages", "needsOtherComponent", "name", "needs"]);
|
|
355201
|
+
var stage = envMode === "stagePerEnv" ? "".concat(job.stage, " ").concat(env) : job.stage;
|
|
355202
|
+
var needsFromStages = needsStages === null || needsStages === void 0 ? void 0 : needsStages.flatMap(function (n) {
|
|
355203
|
+
var _a, _b, _c, _d;
|
|
355204
|
+
var referencedComponentName = componentName;
|
|
355205
|
+
var allJobNamesFromThatStage = (_d = (_c = (_b = (_a = allJobs[referencedComponentName]) === null || _a === void 0 ? void 0 : _a[env]) === null || _b === void 0 ? void 0 : _b.filter(function (j) {
|
|
355206
|
+
return j.stage === n.stage;
|
|
355207
|
+
})) === null || _c === void 0 ? void 0 : _c.map(function (j) {
|
|
355208
|
+
return j.name;
|
|
355209
|
+
})) !== null && _d !== void 0 ? _d : [];
|
|
355210
|
+
return allJobNamesFromThatStage.map(function (job) {
|
|
355211
|
+
var _a;
|
|
355212
|
+
return {
|
|
355213
|
+
job: job,
|
|
355214
|
+
artifacts: (_a = n.artifacts) !== null && _a !== void 0 ? _a : false,
|
|
355215
|
+
componentName: referencedComponentName
|
|
355216
|
+
};
|
|
355217
|
+
});
|
|
355218
|
+
});
|
|
355219
|
+
var cleanedNeeds = __spreadArray(__spreadArray(__spreadArray([], __read(needs !== null && needs !== void 0 ? needs : []), false), __read(needsOtherComponent !== null && needsOtherComponent !== void 0 ? needsOtherComponent : []), false), __read(needsFromStages !== null && needsFromStages !== void 0 ? needsFromStages : []), false);
|
|
355220
|
+
var gitlabNeeds = cleanedNeeds === null || cleanedNeeds === void 0 ? void 0 : cleanedNeeds.map(function (n) {
|
|
355221
|
+
var _a;
|
|
355222
|
+
return (0, lodash_1.isObject)(n) ? {
|
|
355223
|
+
job: getFullReferencedJobName(n.job, (_a = n.componentName) !== null && _a !== void 0 ? _a : componentName, env, allJobs),
|
|
355224
|
+
artifacts: n.artifacts
|
|
355225
|
+
} : getFullReferencedJobName(n, componentName, env, allJobs);
|
|
355226
|
+
}).sort(function (a, b) {
|
|
355227
|
+
return getJobName(a).localeCompare(getJobName(b));
|
|
355228
|
+
});
|
|
355229
|
+
var fullJobName = getFullJobName(name, componentName, envMode !== "none" ? env : undefined);
|
|
355230
|
+
var gitlabJob = __assign(__assign({}, job), {
|
|
355231
|
+
stage: stage,
|
|
355232
|
+
environment: ((_b = job.environment) === null || _b === void 0 ? void 0 : _b.on_stop) ? __assign(__assign({}, job.environment), {
|
|
355233
|
+
on_stop: getFullReferencedJobName(job.environment.on_stop, componentName, env, allJobs)
|
|
355234
|
+
}) : job.environment,
|
|
354958
355235
|
// sort in a predictable manner for snapshot tests
|
|
354959
|
-
needs:
|
|
354960
|
-
return getJobName(a).localeCompare(getJobName(b));
|
|
354961
|
-
}) : undefined,
|
|
355236
|
+
needs: gitlabNeeds,
|
|
354962
355237
|
retry: defaults_1.BASE_RETRY,
|
|
354963
355238
|
interruptible: true
|
|
354964
355239
|
});
|
|
355240
|
+
return [fullJobName, gitlabJob];
|
|
354965
355241
|
};
|
|
354966
355242
|
exports.makeGitlabJob = makeGitlabJob;
|
|
355243
|
+
var createGitlabJobs = function (allJobs) {
|
|
355244
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
355245
|
+
return __generator(this, function (_a) {
|
|
355246
|
+
return [2 /*return*/, Object.keys(allJobs).reduce(function (accForComponents, componentName) {
|
|
355247
|
+
var componentJobs = allJobs[componentName];
|
|
355248
|
+
return __assign(__assign({}, accForComponents), Object.keys(componentJobs).reduce(function (accForEnvs, env) {
|
|
355249
|
+
var jobs = componentJobs[env];
|
|
355250
|
+
return __assign(__assign({}, accForEnvs), jobs.reduce(function (accForJobs, job) {
|
|
355251
|
+
var _a;
|
|
355252
|
+
var _b = __read((0, exports.makeGitlabJob)(componentName, env, job, allJobs), 2),
|
|
355253
|
+
fullJobName = _b[0],
|
|
355254
|
+
gitlabJob = _b[1];
|
|
355255
|
+
return __assign(__assign({}, accForJobs), (_a = {}, _a[fullJobName] = gitlabJob, _a));
|
|
355256
|
+
}, {}));
|
|
355257
|
+
}, {}));
|
|
355258
|
+
}, {})];
|
|
355259
|
+
});
|
|
355260
|
+
});
|
|
355261
|
+
};
|
|
355262
|
+
exports.createGitlabJobs = createGitlabJobs;
|
|
354967
355263
|
|
|
354968
355264
|
/***/ }),
|
|
354969
355265
|
|
|
@@ -354990,7 +355286,7 @@ var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
|
354990
355286
|
};
|
|
354991
355287
|
exports.__esModule = true;
|
|
354992
355288
|
__exportStar(__nccwpck_require__(78974), exports);
|
|
354993
|
-
__exportStar(__nccwpck_require__(
|
|
355289
|
+
__exportStar(__nccwpck_require__(80962), exports);
|
|
354994
355290
|
|
|
354995
355291
|
/***/ }),
|
|
354996
355292
|
|