@compilr-dev/sdk 0.9.2 → 0.9.3
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/compressors/bash.js +4 -4
- package/package.json +1 -1
package/dist/compressors/bash.js
CHANGED
|
@@ -293,7 +293,7 @@ function compressFileList(output) {
|
|
|
293
293
|
const lines = output.split('\n').filter((l) => l.trim());
|
|
294
294
|
if (lines.length <= 20)
|
|
295
295
|
return output;
|
|
296
|
-
// Group by top-level directory, cap entries
|
|
296
|
+
// Group by top-level directory, cap entries per directory
|
|
297
297
|
const groups = new Map();
|
|
298
298
|
for (const line of lines) {
|
|
299
299
|
const parts = line.replace(/^\.\//, '').split('/');
|
|
@@ -302,16 +302,16 @@ function compressFileList(output) {
|
|
|
302
302
|
arr.push(line);
|
|
303
303
|
groups.set(dir, arr);
|
|
304
304
|
}
|
|
305
|
-
const maxPerDir =
|
|
305
|
+
const maxPerDir = 5;
|
|
306
306
|
const result = [];
|
|
307
307
|
for (const [dir, files] of groups) {
|
|
308
308
|
if (dir !== '.')
|
|
309
|
-
result.push(`${dir}
|
|
309
|
+
result.push(`${dir}/ (${String(files.length)} files)`);
|
|
310
310
|
const shown = files.slice(0, maxPerDir);
|
|
311
311
|
for (const f of shown)
|
|
312
312
|
result.push(f);
|
|
313
313
|
if (files.length > maxPerDir) {
|
|
314
|
-
result.push(` ... +${String(files.length - maxPerDir)} more
|
|
314
|
+
result.push(` ... +${String(files.length - maxPerDir)} more`);
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
if (result.length < lines.length) {
|