@catladder/cli 0.0.0-main-fb266e7f → 0.0.0-main-49cf4dd9
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 +160 -150
- package/dist/bundles/cli/index.js +380 -228
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js +16 -7
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js.map +1 -1
- package/dist/pipeline/src/build/index.js +1 -0
- package/dist/pipeline/src/build/index.js.map +1 -1
- package/dist/pipeline/src/build/types.d.ts +10 -0
- package/dist/pipeline/src/build/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
|
@@ -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) =>
|
|
1223
|
-
:
|
|
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
|
|
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")];
|
|
@@ -1981,6 +1990,7 @@ exports.BUILD_TYPES = {
|
|
|
1981
1990
|
buildCommand: "yarn build",
|
|
1982
1991
|
startCommand: "yarn start",
|
|
1983
1992
|
artifactsPaths: ["dist", ".next"],
|
|
1993
|
+
artifactsExcludePaths: [".next/cache/**/*"],
|
|
1984
1994
|
}),
|
|
1985
1995
|
},
|
|
1986
1996
|
"node-static": {
|
|
@@ -8858,7 +8868,7 @@ module.exports = parse;
|
|
|
8858
8868
|
|
|
8859
8869
|
|
|
8860
8870
|
var path = __nccwpck_require__(1017);
|
|
8861
|
-
var which = __nccwpck_require__(
|
|
8871
|
+
var which = __nccwpck_require__(3672);
|
|
8862
8872
|
var LRU = __nccwpck_require__(4144);
|
|
8863
8873
|
|
|
8864
8874
|
var commandCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec
|
|
@@ -9364,6 +9374,148 @@ function Entry (key, value, length, now, maxAge) {
|
|
|
9364
9374
|
}
|
|
9365
9375
|
|
|
9366
9376
|
|
|
9377
|
+
/***/ }),
|
|
9378
|
+
|
|
9379
|
+
/***/ 3672:
|
|
9380
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
9381
|
+
|
|
9382
|
+
module.exports = which
|
|
9383
|
+
which.sync = whichSync
|
|
9384
|
+
|
|
9385
|
+
var isWindows = process.platform === 'win32' ||
|
|
9386
|
+
process.env.OSTYPE === 'cygwin' ||
|
|
9387
|
+
process.env.OSTYPE === 'msys'
|
|
9388
|
+
|
|
9389
|
+
var path = __nccwpck_require__(1017)
|
|
9390
|
+
var COLON = isWindows ? ';' : ':'
|
|
9391
|
+
var isexe = __nccwpck_require__(5930)
|
|
9392
|
+
|
|
9393
|
+
function getNotFoundError (cmd) {
|
|
9394
|
+
var er = new Error('not found: ' + cmd)
|
|
9395
|
+
er.code = 'ENOENT'
|
|
9396
|
+
|
|
9397
|
+
return er
|
|
9398
|
+
}
|
|
9399
|
+
|
|
9400
|
+
function getPathInfo (cmd, opt) {
|
|
9401
|
+
var colon = opt.colon || COLON
|
|
9402
|
+
var pathEnv = opt.path || process.env.PATH || ''
|
|
9403
|
+
var pathExt = ['']
|
|
9404
|
+
|
|
9405
|
+
pathEnv = pathEnv.split(colon)
|
|
9406
|
+
|
|
9407
|
+
var pathExtExe = ''
|
|
9408
|
+
if (isWindows) {
|
|
9409
|
+
pathEnv.unshift(process.cwd())
|
|
9410
|
+
pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM')
|
|
9411
|
+
pathExt = pathExtExe.split(colon)
|
|
9412
|
+
|
|
9413
|
+
|
|
9414
|
+
// Always test the cmd itself first. isexe will check to make sure
|
|
9415
|
+
// it's found in the pathExt set.
|
|
9416
|
+
if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
|
|
9417
|
+
pathExt.unshift('')
|
|
9418
|
+
}
|
|
9419
|
+
|
|
9420
|
+
// If it has a slash, then we don't bother searching the pathenv.
|
|
9421
|
+
// just check the file itself, and that's it.
|
|
9422
|
+
if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
|
|
9423
|
+
pathEnv = ['']
|
|
9424
|
+
|
|
9425
|
+
return {
|
|
9426
|
+
env: pathEnv,
|
|
9427
|
+
ext: pathExt,
|
|
9428
|
+
extExe: pathExtExe
|
|
9429
|
+
}
|
|
9430
|
+
}
|
|
9431
|
+
|
|
9432
|
+
function which (cmd, opt, cb) {
|
|
9433
|
+
if (typeof opt === 'function') {
|
|
9434
|
+
cb = opt
|
|
9435
|
+
opt = {}
|
|
9436
|
+
}
|
|
9437
|
+
|
|
9438
|
+
var info = getPathInfo(cmd, opt)
|
|
9439
|
+
var pathEnv = info.env
|
|
9440
|
+
var pathExt = info.ext
|
|
9441
|
+
var pathExtExe = info.extExe
|
|
9442
|
+
var found = []
|
|
9443
|
+
|
|
9444
|
+
;(function F (i, l) {
|
|
9445
|
+
if (i === l) {
|
|
9446
|
+
if (opt.all && found.length)
|
|
9447
|
+
return cb(null, found)
|
|
9448
|
+
else
|
|
9449
|
+
return cb(getNotFoundError(cmd))
|
|
9450
|
+
}
|
|
9451
|
+
|
|
9452
|
+
var pathPart = pathEnv[i]
|
|
9453
|
+
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
|
|
9454
|
+
pathPart = pathPart.slice(1, -1)
|
|
9455
|
+
|
|
9456
|
+
var p = path.join(pathPart, cmd)
|
|
9457
|
+
if (!pathPart && (/^\.[\\\/]/).test(cmd)) {
|
|
9458
|
+
p = cmd.slice(0, 2) + p
|
|
9459
|
+
}
|
|
9460
|
+
;(function E (ii, ll) {
|
|
9461
|
+
if (ii === ll) return F(i + 1, l)
|
|
9462
|
+
var ext = pathExt[ii]
|
|
9463
|
+
isexe(p + ext, { pathExt: pathExtExe }, function (er, is) {
|
|
9464
|
+
if (!er && is) {
|
|
9465
|
+
if (opt.all)
|
|
9466
|
+
found.push(p + ext)
|
|
9467
|
+
else
|
|
9468
|
+
return cb(null, p + ext)
|
|
9469
|
+
}
|
|
9470
|
+
return E(ii + 1, ll)
|
|
9471
|
+
})
|
|
9472
|
+
})(0, pathExt.length)
|
|
9473
|
+
})(0, pathEnv.length)
|
|
9474
|
+
}
|
|
9475
|
+
|
|
9476
|
+
function whichSync (cmd, opt) {
|
|
9477
|
+
opt = opt || {}
|
|
9478
|
+
|
|
9479
|
+
var info = getPathInfo(cmd, opt)
|
|
9480
|
+
var pathEnv = info.env
|
|
9481
|
+
var pathExt = info.ext
|
|
9482
|
+
var pathExtExe = info.extExe
|
|
9483
|
+
var found = []
|
|
9484
|
+
|
|
9485
|
+
for (var i = 0, l = pathEnv.length; i < l; i ++) {
|
|
9486
|
+
var pathPart = pathEnv[i]
|
|
9487
|
+
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
|
|
9488
|
+
pathPart = pathPart.slice(1, -1)
|
|
9489
|
+
|
|
9490
|
+
var p = path.join(pathPart, cmd)
|
|
9491
|
+
if (!pathPart && /^\.[\\\/]/.test(cmd)) {
|
|
9492
|
+
p = cmd.slice(0, 2) + p
|
|
9493
|
+
}
|
|
9494
|
+
for (var j = 0, ll = pathExt.length; j < ll; j ++) {
|
|
9495
|
+
var cur = p + pathExt[j]
|
|
9496
|
+
var is
|
|
9497
|
+
try {
|
|
9498
|
+
is = isexe.sync(cur, { pathExt: pathExtExe })
|
|
9499
|
+
if (is) {
|
|
9500
|
+
if (opt.all)
|
|
9501
|
+
found.push(cur)
|
|
9502
|
+
else
|
|
9503
|
+
return cur
|
|
9504
|
+
}
|
|
9505
|
+
} catch (ex) {}
|
|
9506
|
+
}
|
|
9507
|
+
}
|
|
9508
|
+
|
|
9509
|
+
if (opt.all && found.length)
|
|
9510
|
+
return found
|
|
9511
|
+
|
|
9512
|
+
if (opt.nothrow)
|
|
9513
|
+
return null
|
|
9514
|
+
|
|
9515
|
+
throw getNotFoundError(cmd)
|
|
9516
|
+
}
|
|
9517
|
+
|
|
9518
|
+
|
|
9367
9519
|
/***/ }),
|
|
9368
9520
|
|
|
9369
9521
|
/***/ 4071:
|
|
@@ -41144,148 +41296,6 @@ module.exports.implForWrapper = function (wrapper) {
|
|
|
41144
41296
|
|
|
41145
41297
|
|
|
41146
41298
|
|
|
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
41299
|
/***/ }),
|
|
41290
41300
|
|
|
41291
41301
|
/***/ 9904:
|