@catladder/cli 0.0.0-main-fb266e7f → 0.0.0-main-6545ebf1

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.
@@ -1217,10 +1217,9 @@ const createBuildJobArtifacts = (context) => {
1217
1217
  const paths = context.type === "workspace"
1218
1218
  ? context.components.flatMap((c) => getArtifactsPathForComponent(c))
1219
1219
  : getArtifactsPathForComponent(context, ["__build_info.json"]);
1220
- // esxclude .env files if generated
1221
1220
  const exclude = context.type === "workspace"
1222
- ? context.components.flatMap((c) => getDotEnvPathsForComponent(c))
1223
- : getDotEnvPathsForComponent(context);
1221
+ ? context.components.flatMap((c) => getAllArtifactExcludePathsForComponent(c))
1222
+ : getAllArtifactExcludePathsForComponent(context);
1224
1223
  return {
1225
1224
  paths: (0, lodash_1.uniq)(paths).sort((a, b) => a.localeCompare(b)),
1226
1225
  ...(exclude.length > 0 ? { exclude } : {}),
@@ -1236,12 +1235,10 @@ const createBuildJobArtifacts = (context) => {
1236
1235
  };
1237
1236
  };
1238
1237
  exports.createBuildJobArtifacts = createBuildJobArtifacts;
1239
- const getArtifactsPathForComponent = (c, additionalPaths) => {
1238
+ const _getArtifactPathsForComponent = (c, configKey, additionalPaths) => {
1240
1239
  var _a, _b;
1241
1240
  return (_b = [
1242
- ...(c.build.type !== "disabled"
1243
- ? ((_a = c.build.config.artifactsPaths) !== null && _a !== void 0 ? _a : [])
1244
- : []),
1241
+ ...(c.build.type !== "disabled" ? ((_a = c.build.config[configKey]) !== null && _a !== void 0 ? _a : []) : []),
1245
1242
  ...(additionalPaths !== null && additionalPaths !== void 0 ? additionalPaths : []),
1246
1243
  ]) === null || _b === void 0 ? void 0 : _b.flatMap((artifact) => c.build
1247
1244
  // in theory, we only need "direct",
@@ -1250,6 +1247,18 @@ const getArtifactsPathForComponent = (c, additionalPaths) => {
1250
1247
  .getComponentDirs("all")
1251
1248
  .flatMap((cDir) => (0, path_1.join)(cDir, artifact)));
1252
1249
  };
1250
+ const getArtifactsPathForComponent = (c, additionalPaths) => {
1251
+ return _getArtifactPathsForComponent(c, "artifactsPaths", additionalPaths);
1252
+ };
1253
+ const getAllArtifactExcludePathsForComponent = (c) => {
1254
+ return [
1255
+ ...getDotEnvPathsForComponent(c), // always exclude .env files
1256
+ ...getArtifactExcludePathsForComponent(c),
1257
+ ];
1258
+ };
1259
+ const getArtifactExcludePathsForComponent = (c, additionalPaths) => {
1260
+ return _getArtifactPathsForComponent(c, "artifactsExcludePaths", additionalPaths);
1261
+ };
1253
1262
  const getDotEnvPathsForComponent = (c) => {
1254
1263
  if ((0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(c)) {
1255
1264
  return [(0, path_1.join)(c.build.dir, ".env")];
@@ -8858,7 +8867,7 @@ module.exports = parse;
8858
8867
 
8859
8868
 
8860
8869
  var path = __nccwpck_require__(1017);
8861
- var which = __nccwpck_require__(3623);
8870
+ var which = __nccwpck_require__(3672);
8862
8871
  var LRU = __nccwpck_require__(4144);
8863
8872
 
8864
8873
  var commandCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec
@@ -9364,6 +9373,148 @@ function Entry (key, value, length, now, maxAge) {
9364
9373
  }
9365
9374
 
9366
9375
 
9376
+ /***/ }),
9377
+
9378
+ /***/ 3672:
9379
+ /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
9380
+
9381
+ module.exports = which
9382
+ which.sync = whichSync
9383
+
9384
+ var isWindows = process.platform === 'win32' ||
9385
+ process.env.OSTYPE === 'cygwin' ||
9386
+ process.env.OSTYPE === 'msys'
9387
+
9388
+ var path = __nccwpck_require__(1017)
9389
+ var COLON = isWindows ? ';' : ':'
9390
+ var isexe = __nccwpck_require__(5930)
9391
+
9392
+ function getNotFoundError (cmd) {
9393
+ var er = new Error('not found: ' + cmd)
9394
+ er.code = 'ENOENT'
9395
+
9396
+ return er
9397
+ }
9398
+
9399
+ function getPathInfo (cmd, opt) {
9400
+ var colon = opt.colon || COLON
9401
+ var pathEnv = opt.path || process.env.PATH || ''
9402
+ var pathExt = ['']
9403
+
9404
+ pathEnv = pathEnv.split(colon)
9405
+
9406
+ var pathExtExe = ''
9407
+ if (isWindows) {
9408
+ pathEnv.unshift(process.cwd())
9409
+ pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM')
9410
+ pathExt = pathExtExe.split(colon)
9411
+
9412
+
9413
+ // Always test the cmd itself first. isexe will check to make sure
9414
+ // it's found in the pathExt set.
9415
+ if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
9416
+ pathExt.unshift('')
9417
+ }
9418
+
9419
+ // If it has a slash, then we don't bother searching the pathenv.
9420
+ // just check the file itself, and that's it.
9421
+ if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
9422
+ pathEnv = ['']
9423
+
9424
+ return {
9425
+ env: pathEnv,
9426
+ ext: pathExt,
9427
+ extExe: pathExtExe
9428
+ }
9429
+ }
9430
+
9431
+ function which (cmd, opt, cb) {
9432
+ if (typeof opt === 'function') {
9433
+ cb = opt
9434
+ opt = {}
9435
+ }
9436
+
9437
+ var info = getPathInfo(cmd, opt)
9438
+ var pathEnv = info.env
9439
+ var pathExt = info.ext
9440
+ var pathExtExe = info.extExe
9441
+ var found = []
9442
+
9443
+ ;(function F (i, l) {
9444
+ if (i === l) {
9445
+ if (opt.all && found.length)
9446
+ return cb(null, found)
9447
+ else
9448
+ return cb(getNotFoundError(cmd))
9449
+ }
9450
+
9451
+ var pathPart = pathEnv[i]
9452
+ if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
9453
+ pathPart = pathPart.slice(1, -1)
9454
+
9455
+ var p = path.join(pathPart, cmd)
9456
+ if (!pathPart && (/^\.[\\\/]/).test(cmd)) {
9457
+ p = cmd.slice(0, 2) + p
9458
+ }
9459
+ ;(function E (ii, ll) {
9460
+ if (ii === ll) return F(i + 1, l)
9461
+ var ext = pathExt[ii]
9462
+ isexe(p + ext, { pathExt: pathExtExe }, function (er, is) {
9463
+ if (!er && is) {
9464
+ if (opt.all)
9465
+ found.push(p + ext)
9466
+ else
9467
+ return cb(null, p + ext)
9468
+ }
9469
+ return E(ii + 1, ll)
9470
+ })
9471
+ })(0, pathExt.length)
9472
+ })(0, pathEnv.length)
9473
+ }
9474
+
9475
+ function whichSync (cmd, opt) {
9476
+ opt = opt || {}
9477
+
9478
+ var info = getPathInfo(cmd, opt)
9479
+ var pathEnv = info.env
9480
+ var pathExt = info.ext
9481
+ var pathExtExe = info.extExe
9482
+ var found = []
9483
+
9484
+ for (var i = 0, l = pathEnv.length; i < l; i ++) {
9485
+ var pathPart = pathEnv[i]
9486
+ if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
9487
+ pathPart = pathPart.slice(1, -1)
9488
+
9489
+ var p = path.join(pathPart, cmd)
9490
+ if (!pathPart && /^\.[\\\/]/.test(cmd)) {
9491
+ p = cmd.slice(0, 2) + p
9492
+ }
9493
+ for (var j = 0, ll = pathExt.length; j < ll; j ++) {
9494
+ var cur = p + pathExt[j]
9495
+ var is
9496
+ try {
9497
+ is = isexe.sync(cur, { pathExt: pathExtExe })
9498
+ if (is) {
9499
+ if (opt.all)
9500
+ found.push(cur)
9501
+ else
9502
+ return cur
9503
+ }
9504
+ } catch (ex) {}
9505
+ }
9506
+ }
9507
+
9508
+ if (opt.all && found.length)
9509
+ return found
9510
+
9511
+ if (opt.nothrow)
9512
+ return null
9513
+
9514
+ throw getNotFoundError(cmd)
9515
+ }
9516
+
9517
+
9367
9518
  /***/ }),
9368
9519
 
9369
9520
  /***/ 4071:
@@ -41144,148 +41295,6 @@ module.exports.implForWrapper = function (wrapper) {
41144
41295
 
41145
41296
 
41146
41297
 
41147
- /***/ }),
41148
-
41149
- /***/ 3623:
41150
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
41151
-
41152
- module.exports = which
41153
- which.sync = whichSync
41154
-
41155
- var isWindows = process.platform === 'win32' ||
41156
- process.env.OSTYPE === 'cygwin' ||
41157
- process.env.OSTYPE === 'msys'
41158
-
41159
- var path = __nccwpck_require__(1017)
41160
- var COLON = isWindows ? ';' : ':'
41161
- var isexe = __nccwpck_require__(5930)
41162
-
41163
- function getNotFoundError (cmd) {
41164
- var er = new Error('not found: ' + cmd)
41165
- er.code = 'ENOENT'
41166
-
41167
- return er
41168
- }
41169
-
41170
- function getPathInfo (cmd, opt) {
41171
- var colon = opt.colon || COLON
41172
- var pathEnv = opt.path || process.env.PATH || ''
41173
- var pathExt = ['']
41174
-
41175
- pathEnv = pathEnv.split(colon)
41176
-
41177
- var pathExtExe = ''
41178
- if (isWindows) {
41179
- pathEnv.unshift(process.cwd())
41180
- pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM')
41181
- pathExt = pathExtExe.split(colon)
41182
-
41183
-
41184
- // Always test the cmd itself first. isexe will check to make sure
41185
- // it's found in the pathExt set.
41186
- if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
41187
- pathExt.unshift('')
41188
- }
41189
-
41190
- // If it has a slash, then we don't bother searching the pathenv.
41191
- // just check the file itself, and that's it.
41192
- if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
41193
- pathEnv = ['']
41194
-
41195
- return {
41196
- env: pathEnv,
41197
- ext: pathExt,
41198
- extExe: pathExtExe
41199
- }
41200
- }
41201
-
41202
- function which (cmd, opt, cb) {
41203
- if (typeof opt === 'function') {
41204
- cb = opt
41205
- opt = {}
41206
- }
41207
-
41208
- var info = getPathInfo(cmd, opt)
41209
- var pathEnv = info.env
41210
- var pathExt = info.ext
41211
- var pathExtExe = info.extExe
41212
- var found = []
41213
-
41214
- ;(function F (i, l) {
41215
- if (i === l) {
41216
- if (opt.all && found.length)
41217
- return cb(null, found)
41218
- else
41219
- return cb(getNotFoundError(cmd))
41220
- }
41221
-
41222
- var pathPart = pathEnv[i]
41223
- if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
41224
- pathPart = pathPart.slice(1, -1)
41225
-
41226
- var p = path.join(pathPart, cmd)
41227
- if (!pathPart && (/^\.[\\\/]/).test(cmd)) {
41228
- p = cmd.slice(0, 2) + p
41229
- }
41230
- ;(function E (ii, ll) {
41231
- if (ii === ll) return F(i + 1, l)
41232
- var ext = pathExt[ii]
41233
- isexe(p + ext, { pathExt: pathExtExe }, function (er, is) {
41234
- if (!er && is) {
41235
- if (opt.all)
41236
- found.push(p + ext)
41237
- else
41238
- return cb(null, p + ext)
41239
- }
41240
- return E(ii + 1, ll)
41241
- })
41242
- })(0, pathExt.length)
41243
- })(0, pathEnv.length)
41244
- }
41245
-
41246
- function whichSync (cmd, opt) {
41247
- opt = opt || {}
41248
-
41249
- var info = getPathInfo(cmd, opt)
41250
- var pathEnv = info.env
41251
- var pathExt = info.ext
41252
- var pathExtExe = info.extExe
41253
- var found = []
41254
-
41255
- for (var i = 0, l = pathEnv.length; i < l; i ++) {
41256
- var pathPart = pathEnv[i]
41257
- if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
41258
- pathPart = pathPart.slice(1, -1)
41259
-
41260
- var p = path.join(pathPart, cmd)
41261
- if (!pathPart && /^\.[\\\/]/.test(cmd)) {
41262
- p = cmd.slice(0, 2) + p
41263
- }
41264
- for (var j = 0, ll = pathExt.length; j < ll; j ++) {
41265
- var cur = p + pathExt[j]
41266
- var is
41267
- try {
41268
- is = isexe.sync(cur, { pathExt: pathExtExe })
41269
- if (is) {
41270
- if (opt.all)
41271
- found.push(cur)
41272
- else
41273
- return cur
41274
- }
41275
- } catch (ex) {}
41276
- }
41277
- }
41278
-
41279
- if (opt.all && found.length)
41280
- return found
41281
-
41282
- if (opt.nothrow)
41283
- return null
41284
-
41285
- throw getNotFoundError(cmd)
41286
- }
41287
-
41288
-
41289
41298
  /***/ }),
41290
41299
 
41291
41300
  /***/ 9904: