@catladder/pipeline 1.75.4 → 1.76.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/build/base/createBuildJob.js +5 -27
  2. package/dist/build/base/writeBuildInfo.js +0 -3
  3. package/dist/build/custom/buildJob.js +3 -23
  4. package/dist/build/custom/index.js +3 -10
  5. package/dist/build/docker.js +5 -40
  6. package/dist/build/index.js +0 -8
  7. package/dist/build/node/buildJob.js +3 -25
  8. package/dist/build/node/cache.js +3 -21
  9. package/dist/build/node/index.js +3 -16
  10. package/dist/build/node/meteor.js +3 -20
  11. package/dist/build/node/testJob.js +5 -22
  12. package/dist/build/node/yarn.js +5 -18
  13. package/dist/build/rails/build.js +2 -8
  14. package/dist/build/rails/index.js +3 -11
  15. package/dist/build/rails/test.js +5 -18
  16. package/dist/build/types.d.ts +0 -9
  17. package/dist/build/types.js +0 -4
  18. package/dist/bundles/catladder-gitlab/index.js +1 -1
  19. package/dist/catladder-gitlab.js +6 -24
  20. package/dist/config/{configruedEnvs.test.d.ts → __tests__/configruedEnvs.test.d.ts} +0 -0
  21. package/dist/config/{configruedEnvs.test.js → __tests__/configruedEnvs.test.js} +10 -12
  22. package/dist/config/configruedEnvs.js +7 -22
  23. package/dist/config/index.js +0 -4
  24. package/dist/config/readConfig.js +2 -13
  25. package/dist/constants.js +1 -1
  26. package/dist/context/{resolveReferences.test.d.ts → __tests__/resolveReferences.test.d.ts} +0 -0
  27. package/dist/context/{resolveReferences.test.js → __tests__/resolveReferences.test.js} +52 -103
  28. package/dist/context/getEnvConfig.js +0 -8
  29. package/dist/context/getEnvType.js +0 -5
  30. package/dist/context/getEnvironment.js +13 -49
  31. package/dist/context/getEnvironmentContext.js +0 -5
  32. package/dist/context/getEnvironmentVariables.js +20 -83
  33. package/dist/context/getLabels.js +2 -13
  34. package/dist/context/index.js +13 -58
  35. package/dist/context/resolveReferences.js +36 -126
  36. package/dist/deploy/base.js +4 -19
  37. package/dist/deploy/cloudRun/deployJob.js +19 -61
  38. package/dist/deploy/cloudRun/index.js +17 -39
  39. package/dist/deploy/cloudRun/utils/database.js +11 -29
  40. package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.js +0 -4
  41. package/dist/deploy/cloudRun/utils/jobName.js +0 -2
  42. package/dist/deploy/custom/deployJob.js +3 -18
  43. package/dist/deploy/custom/index.js +0 -2
  44. package/dist/deploy/dockerTag/deployJob.js +0 -9
  45. package/dist/deploy/dockerTag/index.js +0 -2
  46. package/dist/deploy/index.js +0 -11
  47. package/dist/deploy/kubernetes/additionalSecretKeys.js +0 -9
  48. package/dist/deploy/kubernetes/cloudSql/index.js +0 -12
  49. package/dist/deploy/kubernetes/deployJob.js +3 -24
  50. package/dist/deploy/kubernetes/index.js +7 -17
  51. package/dist/deploy/kubernetes/kubeEnv.d.ts +0 -1
  52. package/dist/deploy/kubernetes/kubeEnv.js +5 -23
  53. package/dist/deploy/kubernetes/kubeValues.js +6 -24
  54. package/dist/deploy/kubernetes/mongodb.js +0 -24
  55. package/dist/deploy/kubernetes/processSecretsAsFiles.js +2 -10
  56. package/dist/deploy/types/base.d.ts +0 -1
  57. package/dist/deploy/types/custom.d.ts +0 -6
  58. package/dist/deploy/types/googleCloudRun.d.ts +4 -12
  59. package/dist/deploy/types/index.js +0 -10
  60. package/dist/deploy/types/kubernetes.d.ts +0 -28
  61. package/dist/deploy/utils.js +0 -11
  62. package/dist/index.js +0 -10
  63. package/dist/pipeline/commitInfo/getBuildId.d.ts +1 -0
  64. package/dist/pipeline/{createChildPipeline.test.js → commitInfo/getBuildId.js} +25 -84
  65. package/dist/pipeline/commitInfo/getCommitInfo.d.ts +2 -0
  66. package/dist/{build/tests/storybook.test.js → pipeline/commitInfo/getCommitInfo.js} +30 -104
  67. package/dist/pipeline/createChildPipeline.js +19 -76
  68. package/dist/pipeline/createJobs.js +35 -135
  69. package/dist/pipeline/gitlab/makeGitlabJob.d.ts +1 -0
  70. package/dist/pipeline/gitlab/makeGitlabJob.js +13 -15
  71. package/dist/pipeline/index.js +0 -4
  72. package/dist/pipeline/packageManager.js +20 -173
  73. package/dist/pipeline/yarn/yarnUtils.d.ts +4 -0
  74. package/dist/pipeline/yarn/yarnUtils.js +193 -0
  75. package/dist/runner/index.js +0 -3
  76. package/dist/tsconfig.tsbuildinfo +1 -1
  77. package/dist/types/config.d.ts +0 -13
  78. package/dist/types/config.js +5 -15
  79. package/dist/types/context.d.ts +0 -2
  80. package/dist/types/environmentContext.d.ts +0 -1
  81. package/dist/types/gitlab-types.d.ts +0 -1
  82. package/dist/types/index.js +0 -6
  83. package/dist/types/jobs.d.ts +5 -15
  84. package/dist/utils/gitlab.js +3 -13
  85. package/dist/utils/index.js +5 -15
  86. package/examples/__snapshots__/cloud-run-with-sql.ts.snap +1765 -0
  87. package/examples/__snapshots__/custom-build-job.ts.snap +1174 -0
  88. package/examples/__snapshots__/custom-envs.ts.snap +261 -0
  89. package/examples/__snapshots__/wait-for-other-deploy.ts.snap +1626 -0
  90. package/examples/__utils__/helpers.ts +14 -0
  91. package/examples/{cloud-sql.ts → cloud-run-with-sql.ts} +12 -15
  92. package/examples/custom-build-job.ts +4 -1
  93. package/examples/custom-envs.ts +31 -0
  94. package/examples/wait-for-other-deploy.ts +36 -0
  95. package/package.json +2 -2
  96. package/src/config/{configruedEnvs.test.ts → __tests__/configruedEnvs.test.ts} +3 -3
  97. package/src/context/{resolveReferences.test.ts → __tests__/resolveReferences.test.ts} +3 -3
  98. package/src/deploy/cloudRun/index.ts +2 -1
  99. package/src/deploy/types/googleCloudRun.ts +5 -0
  100. package/src/pipeline/commitInfo/getBuildId.ts +6 -0
  101. package/src/pipeline/commitInfo/getCommitInfo.ts +12 -0
  102. package/src/pipeline/createChildPipeline.ts +6 -1
  103. package/src/pipeline/createJobs.ts +3 -10
  104. package/src/pipeline/gitlab/makeGitlabJob.ts +7 -1
  105. package/src/pipeline/packageManager.ts +4 -38
  106. package/src/pipeline/yarn/yarnUtils.ts +37 -0
  107. package/src/types/jobs.ts +2 -1
  108. package/tsconfig.json +1 -1
  109. package/dist/build/tests/storybook.test.d.ts +0 -1
  110. package/dist/pipeline/createChildPipeline.test.d.ts +0 -1
  111. package/src/build/tests/storybook.test.ts +0 -54
  112. package/src/pipeline/createChildPipeline.test.ts +0 -49
@@ -6,7 +6,6 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
6
6
  resolve(value);
7
7
  });
8
8
  }
9
-
10
9
  return new (P || (P = Promise))(function (resolve, reject) {
11
10
  function fulfilled(value) {
12
11
  try {
@@ -15,7 +14,6 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
15
14
  reject(e);
16
15
  }
17
16
  }
18
-
19
17
  function rejected(value) {
20
18
  try {
21
19
  step(generator["throw"](value));
@@ -23,29 +21,26 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
23
21
  reject(e);
24
22
  }
25
23
  }
26
-
27
24
  function step(result) {
28
25
  result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
29
26
  }
30
-
31
27
  step((generator = generator.apply(thisArg, _arguments || [])).next());
32
28
  });
33
29
  };
34
-
35
30
  var __generator = this && this.__generator || function (thisArg, body) {
36
31
  var _ = {
37
- label: 0,
38
- sent: function () {
39
- if (t[0] & 1) throw t[1];
40
- return t[1];
32
+ label: 0,
33
+ sent: function () {
34
+ if (t[0] & 1) throw t[1];
35
+ return t[1];
36
+ },
37
+ trys: [],
38
+ ops: []
41
39
  },
42
- trys: [],
43
- ops: []
44
- },
45
- f,
46
- y,
47
- t,
48
- g;
40
+ f,
41
+ y,
42
+ t,
43
+ g;
49
44
  return g = {
50
45
  next: verb(0),
51
46
  "throw": verb(1),
@@ -53,78 +48,59 @@ var __generator = this && this.__generator || function (thisArg, body) {
53
48
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
54
49
  return this;
55
50
  }), g;
56
-
57
51
  function verb(n) {
58
52
  return function (v) {
59
53
  return step([n, v]);
60
54
  };
61
55
  }
62
-
63
56
  function step(op) {
64
57
  if (f) throw new TypeError("Generator is already executing.");
65
-
66
58
  while (_) try {
67
59
  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;
68
60
  if (y = 0, t) op = [op[0] & 2, t.value];
69
-
70
61
  switch (op[0]) {
71
62
  case 0:
72
63
  case 1:
73
64
  t = op;
74
65
  break;
75
-
76
66
  case 4:
77
67
  _.label++;
78
68
  return {
79
69
  value: op[1],
80
70
  done: false
81
71
  };
82
-
83
72
  case 5:
84
73
  _.label++;
85
74
  y = op[1];
86
75
  op = [0];
87
76
  continue;
88
-
89
77
  case 7:
90
78
  op = _.ops.pop();
91
-
92
79
  _.trys.pop();
93
-
94
80
  continue;
95
-
96
81
  default:
97
82
  if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
98
83
  _ = 0;
99
84
  continue;
100
85
  }
101
-
102
86
  if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
103
87
  _.label = op[1];
104
88
  break;
105
89
  }
106
-
107
90
  if (op[0] === 6 && _.label < t[1]) {
108
91
  _.label = t[1];
109
92
  t = op;
110
93
  break;
111
94
  }
112
-
113
95
  if (t && _.label < t[2]) {
114
96
  _.label = t[2];
115
-
116
97
  _.ops.push(op);
117
-
118
98
  break;
119
99
  }
120
-
121
100
  if (t[2]) _.ops.pop();
122
-
123
101
  _.trys.pop();
124
-
125
102
  continue;
126
103
  }
127
-
128
104
  op = body.call(thisArg, _);
129
105
  } catch (e) {
130
106
  op = [6, e];
@@ -132,7 +108,6 @@ var __generator = this && this.__generator || function (thisArg, body) {
132
108
  } finally {
133
109
  f = t = 0;
134
110
  }
135
-
136
111
  if (op[0] & 5) throw op[1];
137
112
  return {
138
113
  value: op[0] ? op[1] : void 0,
@@ -140,15 +115,13 @@ var __generator = this && this.__generator || function (thisArg, body) {
140
115
  };
141
116
  }
142
117
  };
143
-
144
118
  var __read = this && this.__read || function (o, n) {
145
119
  var m = typeof Symbol === "function" && o[Symbol.iterator];
146
120
  if (!m) return o;
147
121
  var i = m.call(o),
148
- r,
149
- ar = [],
150
- e;
151
-
122
+ r,
123
+ ar = [],
124
+ e;
152
125
  try {
153
126
  while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
154
127
  } catch (error) {
@@ -162,10 +135,8 @@ var __read = this && this.__read || function (o, n) {
162
135
  if (e) throw e.error;
163
136
  }
164
137
  }
165
-
166
138
  return ar;
167
139
  };
168
-
169
140
  var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
170
141
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
171
142
  if (ar || !(i in from)) {
@@ -175,145 +146,25 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
175
146
  }
176
147
  return to.concat(ar || Array.prototype.slice.call(from));
177
148
  };
178
-
179
- var __importDefault = this && this.__importDefault || function (mod) {
180
- return mod && mod.__esModule ? mod : {
181
- "default": mod
182
- };
183
- };
184
-
185
149
  exports.__esModule = true;
186
150
  exports.getPackageManagerInfo = void 0;
187
-
188
- var child_process_promise_1 = require("child-process-promise");
189
-
190
- var path_equal_1 = require("path-equal");
191
-
192
- var memoizee_1 = __importDefault(require("memoizee"));
193
-
194
- var path_1 = require("path");
195
-
196
151
  var fs_1 = require("fs");
197
-
198
- var execOrFail = function (cmd, onFail) {
199
- return __awaiter(void 0, void 0, void 0, function () {
200
- var e_1;
201
- return __generator(this, function (_a) {
202
- switch (_a.label) {
203
- case 0:
204
- _a.trys.push([0, 2,, 3]);
205
-
206
- return [4
207
- /*yield*/
208
- , (0, child_process_promise_1.exec)(cmd).then(function (r) {
209
- return r.stdout;
210
- })];
211
-
212
- case 1:
213
- return [2
214
- /*return*/
215
- , _a.sent()];
216
-
217
- case 2:
218
- e_1 = _a.sent();
219
- return [2
220
- /*return*/
221
- , onFail !== null && onFail !== void 0 ? onFail : null];
222
-
223
- case 3:
224
- return [2
225
- /*return*/
226
- ];
227
- }
228
- });
229
- });
230
- };
231
-
232
- var getYarnVersion = (0, memoizee_1["default"])(function () {
233
- return __awaiter(void 0, void 0, void 0, function () {
234
- return __generator(this, function (_a) {
235
- switch (_a.label) {
236
- case 0:
237
- return [4
238
- /*yield*/
239
- , execOrFail("yarn --version", "")];
240
-
241
- case 1:
242
- return [2
243
- /*return*/
244
- , _a.sent()];
245
- }
246
- });
247
- });
248
- }, {
249
- promise: true
250
- });
251
- var getWorkspaces = (0, memoizee_1["default"])(function (isClassic) {
252
- return __awaiter(void 0, void 0, void 0, function () {
253
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
254
-
255
- var _l, _m;
256
-
257
- return __generator(this, function (_o) {
258
- switch (_o.label) {
259
- case 0:
260
- if (!isClassic) return [3
261
- /*break*/
262
- , 2];
263
- _c = (_b = Object).values;
264
- _e = (_d = JSON).parse;
265
- _g = (_f = JSON).parse;
266
- return [4
267
- /*yield*/
268
- , execOrFail("yarn workspaces --json info", "{}")];
269
-
270
- case 1:
271
- _a = _c.apply(_b, [_e.apply(_d, [(_m = (_l = _g.apply(_f, [_o.sent()])) === null || _l === void 0 ? void 0 : _l.data) !== null && _m !== void 0 ? _m : "{}"])]);
272
- return [3
273
- /*break*/
274
- , 4];
275
-
276
- case 2:
277
- _j = (_h = JSON).parse;
278
- _k = "[".concat;
279
- return [4
280
- /*yield*/
281
- , execOrFail("yarn workspaces list --json --verbose", "")];
282
-
283
- case 3:
284
- _a = _j.apply(_h, [_k.apply("[", [_o.sent().trim().split("\n").join(","), "]"])]);
285
- _o.label = 4;
286
-
287
- case 4:
288
- return [2
289
- /*return*/
290
- , _a];
291
- }
292
- });
293
- });
294
- }, {
295
- promise: true
296
- });
297
-
152
+ var path_1 = require("path");
153
+ var path_equal_1 = require("path-equal");
154
+ var yarnUtils_1 = require("./yarn/yarnUtils");
298
155
  var getPackageManagerInfo = function (config, componentName) {
299
156
  return __awaiter(void 0, void 0, void 0, function () {
300
157
  var version, isClassic, component, workspaces, currentWorkspace, componentIsInWorkspace, workspaceRoot, packageJson, workspacePackageJson, lockFile, configFiles, rcFiles, workspaceDependencies, pathsToCopyInDocker;
301
158
  return __generator(this, function (_a) {
302
159
  switch (_a.label) {
303
160
  case 0:
304
- return [4
305
- /*yield*/
306
- , getYarnVersion()];
307
-
161
+ return [4 /*yield*/, (0, yarnUtils_1.getYarnVersion)()];
308
162
  case 1:
309
163
  version = _a.sent();
310
164
  if (!version) throw new Error("could not get yarn version");
311
165
  isClassic = version.startsWith("1");
312
166
  component = config.components[componentName];
313
- return [4
314
- /*yield*/
315
- , getWorkspaces(isClassic)];
316
-
167
+ return [4 /*yield*/, (0, yarnUtils_1.getWorkspaces)(isClassic)];
317
168
  case 2:
318
169
  workspaces = _a.sent();
319
170
  currentWorkspace = workspaces.find(function (w) {
@@ -332,15 +183,12 @@ var getPackageManagerInfo = function (config, componentName) {
332
183
  });
333
184
  workspaceDependencies = currentWorkspace ? __spreadArray(__spreadArray([], __read(currentWorkspace.workspaceDependencies), false), __read(currentWorkspace.mismatchedWorkspaceDependencies), false).map(function (name) {
334
185
  var _a;
335
-
336
186
  return (_a = workspaces.find(function (w) {
337
187
  return w.name === name;
338
188
  })) === null || _a === void 0 ? void 0 : _a.location;
339
189
  }).filter(Boolean) : [];
340
190
  pathsToCopyInDocker = __spreadArray(__spreadArray(__spreadArray(__spreadArray([packageJson], __read(workspacePackageJson ? [workspacePackageJson] : []), false), [lockFile], false), __read(rcFiles), false), __read(workspaceDependencies), false);
341
- return [2
342
- /*return*/
343
- , {
191
+ return [2 /*return*/, {
344
192
  type: "yarn",
345
193
  workspaces: workspaces,
346
194
  version: version,
@@ -353,5 +201,4 @@ var getPackageManagerInfo = function (config, componentName) {
353
201
  });
354
202
  });
355
203
  };
356
-
357
204
  exports.getPackageManagerInfo = getPackageManagerInfo;
@@ -0,0 +1,4 @@
1
+ import memoizee from "memoizee";
2
+ import type { PackageManagerInfo } from "../../types";
3
+ export declare const getYarnVersion: (() => Promise<string>) & memoizee.Memoized<() => Promise<string>>;
4
+ export declare const getWorkspaces: ((isClassic: boolean) => Promise<PackageManagerInfo["workspaces"]>) & memoizee.Memoized<(isClassic: boolean) => Promise<PackageManagerInfo["workspaces"]>>;
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+
3
+ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
4
+ function adopt(value) {
5
+ return value instanceof P ? value : new P(function (resolve) {
6
+ resolve(value);
7
+ });
8
+ }
9
+ return new (P || (P = Promise))(function (resolve, reject) {
10
+ function fulfilled(value) {
11
+ try {
12
+ step(generator.next(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ }
17
+ function rejected(value) {
18
+ try {
19
+ step(generator["throw"](value));
20
+ } catch (e) {
21
+ reject(e);
22
+ }
23
+ }
24
+ function step(result) {
25
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
26
+ }
27
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
28
+ });
29
+ };
30
+ var __generator = this && this.__generator || function (thisArg, body) {
31
+ var _ = {
32
+ label: 0,
33
+ sent: function () {
34
+ if (t[0] & 1) throw t[1];
35
+ return t[1];
36
+ },
37
+ trys: [],
38
+ ops: []
39
+ },
40
+ f,
41
+ y,
42
+ t,
43
+ g;
44
+ return g = {
45
+ next: verb(0),
46
+ "throw": verb(1),
47
+ "return": verb(2)
48
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
49
+ return this;
50
+ }), g;
51
+ function verb(n) {
52
+ return function (v) {
53
+ return step([n, v]);
54
+ };
55
+ }
56
+ function step(op) {
57
+ if (f) throw new TypeError("Generator is already executing.");
58
+ while (_) try {
59
+ 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;
60
+ if (y = 0, t) op = [op[0] & 2, t.value];
61
+ switch (op[0]) {
62
+ case 0:
63
+ case 1:
64
+ t = op;
65
+ break;
66
+ case 4:
67
+ _.label++;
68
+ return {
69
+ value: op[1],
70
+ done: false
71
+ };
72
+ case 5:
73
+ _.label++;
74
+ y = op[1];
75
+ op = [0];
76
+ continue;
77
+ case 7:
78
+ op = _.ops.pop();
79
+ _.trys.pop();
80
+ continue;
81
+ default:
82
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
83
+ _ = 0;
84
+ continue;
85
+ }
86
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
87
+ _.label = op[1];
88
+ break;
89
+ }
90
+ if (op[0] === 6 && _.label < t[1]) {
91
+ _.label = t[1];
92
+ t = op;
93
+ break;
94
+ }
95
+ if (t && _.label < t[2]) {
96
+ _.label = t[2];
97
+ _.ops.push(op);
98
+ break;
99
+ }
100
+ if (t[2]) _.ops.pop();
101
+ _.trys.pop();
102
+ continue;
103
+ }
104
+ op = body.call(thisArg, _);
105
+ } catch (e) {
106
+ op = [6, e];
107
+ y = 0;
108
+ } finally {
109
+ f = t = 0;
110
+ }
111
+ if (op[0] & 5) throw op[1];
112
+ return {
113
+ value: op[0] ? op[1] : void 0,
114
+ done: true
115
+ };
116
+ }
117
+ };
118
+ var __importDefault = this && this.__importDefault || function (mod) {
119
+ return mod && mod.__esModule ? mod : {
120
+ "default": mod
121
+ };
122
+ };
123
+ exports.__esModule = true;
124
+ exports.getWorkspaces = exports.getYarnVersion = void 0;
125
+ var child_process_promise_1 = require("child-process-promise");
126
+ var memoizee_1 = __importDefault(require("memoizee"));
127
+ var execOrFail = function (cmd, onFail) {
128
+ return __awaiter(void 0, void 0, void 0, function () {
129
+ var e_1;
130
+ return __generator(this, function (_a) {
131
+ switch (_a.label) {
132
+ case 0:
133
+ _a.trys.push([0, 2,, 3]);
134
+ return [4 /*yield*/, (0, child_process_promise_1.exec)(cmd).then(function (r) {
135
+ return r.stdout;
136
+ })];
137
+ case 1:
138
+ return [2 /*return*/, _a.sent()];
139
+ case 2:
140
+ e_1 = _a.sent();
141
+ return [2 /*return*/, onFail !== null && onFail !== void 0 ? onFail : null];
142
+ case 3:
143
+ return [2 /*return*/];
144
+ }
145
+ });
146
+ });
147
+ };
148
+ // export for mocking
149
+ exports.getYarnVersion = (0, memoizee_1["default"])(function () {
150
+ return __awaiter(void 0, void 0, void 0, function () {
151
+ return __generator(this, function (_a) {
152
+ switch (_a.label) {
153
+ case 0:
154
+ return [4 /*yield*/, execOrFail("yarn --version", "")];
155
+ case 1:
156
+ return [2 /*return*/, _a.sent()];
157
+ }
158
+ });
159
+ });
160
+ }, {
161
+ promise: true
162
+ });
163
+ // export for mocking
164
+ exports.getWorkspaces = (0, memoizee_1["default"])(function (isClassic) {
165
+ return __awaiter(void 0, void 0, void 0, function () {
166
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
167
+ var _l, _m;
168
+ return __generator(this, function (_o) {
169
+ switch (_o.label) {
170
+ case 0:
171
+ if (!isClassic) return [3 /*break*/, 2];
172
+ _c = (_b = Object).values;
173
+ _e = (_d = JSON).parse;
174
+ _g = (_f = JSON).parse;
175
+ return [4 /*yield*/, execOrFail("yarn workspaces --json info", "{}")];
176
+ case 1:
177
+ _a = _c.apply(_b, [_e.apply(_d, [(_m = (_l = _g.apply(_f, [_o.sent()])) === null || _l === void 0 ? void 0 : _l.data) !== null && _m !== void 0 ? _m : "{}"])]);
178
+ return [3 /*break*/, 4];
179
+ case 2:
180
+ _j = (_h = JSON).parse;
181
+ _k = "[".concat;
182
+ return [4 /*yield*/, execOrFail("yarn workspaces list --json --verbose", "")];
183
+ case 3:
184
+ _a = _j.apply(_h, [_k.apply("[", [_o.sent().trim().split("\n").join(","), "]"])]);
185
+ _o.label = 4;
186
+ case 4:
187
+ return [2 /*return*/, _a];
188
+ }
189
+ });
190
+ });
191
+ }, {
192
+ promise: true
193
+ });
@@ -2,11 +2,8 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports.getRunnerImage = void 0;
5
-
6
5
  var constants_1 = require("../constants");
7
-
8
6
  var getRunnerImage = function (imageName) {
9
7
  return constants_1.DOCKER_REGISTRY + "/" + imageName + ":" + constants_1.PIPELINE_IMAGE_TAG;
10
8
  };
11
-
12
9
  exports.getRunnerImage = getRunnerImage;