@vibgrate/cli 1.0.22 → 1.0.23
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.
|
@@ -130,6 +130,80 @@ var SKIP_DIRS = /* @__PURE__ */ new Set([
|
|
|
130
130
|
"packages",
|
|
131
131
|
"TestResults"
|
|
132
132
|
]);
|
|
133
|
+
var SKIP_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
134
|
+
// Fonts
|
|
135
|
+
".woff",
|
|
136
|
+
".woff2",
|
|
137
|
+
".ttf",
|
|
138
|
+
".otf",
|
|
139
|
+
".eot",
|
|
140
|
+
// Images & vector
|
|
141
|
+
".png",
|
|
142
|
+
".jpg",
|
|
143
|
+
".jpeg",
|
|
144
|
+
".gif",
|
|
145
|
+
".ico",
|
|
146
|
+
".bmp",
|
|
147
|
+
".tiff",
|
|
148
|
+
".tif",
|
|
149
|
+
".webp",
|
|
150
|
+
".avif",
|
|
151
|
+
".svg",
|
|
152
|
+
".heic",
|
|
153
|
+
".heif",
|
|
154
|
+
".jfif",
|
|
155
|
+
".psd",
|
|
156
|
+
".ai",
|
|
157
|
+
".eps",
|
|
158
|
+
".raw",
|
|
159
|
+
".cr2",
|
|
160
|
+
".nef",
|
|
161
|
+
".dng",
|
|
162
|
+
// Video
|
|
163
|
+
".mp4",
|
|
164
|
+
".webm",
|
|
165
|
+
".avi",
|
|
166
|
+
".mov",
|
|
167
|
+
".mkv",
|
|
168
|
+
".wmv",
|
|
169
|
+
".flv",
|
|
170
|
+
".m4v",
|
|
171
|
+
".mpg",
|
|
172
|
+
".mpeg",
|
|
173
|
+
".3gp",
|
|
174
|
+
".ogv",
|
|
175
|
+
// Audio
|
|
176
|
+
".mp3",
|
|
177
|
+
".wav",
|
|
178
|
+
".ogg",
|
|
179
|
+
".flac",
|
|
180
|
+
".aac",
|
|
181
|
+
".wma",
|
|
182
|
+
".m4a",
|
|
183
|
+
".opus",
|
|
184
|
+
".aiff",
|
|
185
|
+
".mid",
|
|
186
|
+
".midi",
|
|
187
|
+
// Archives
|
|
188
|
+
".zip",
|
|
189
|
+
".tar",
|
|
190
|
+
".gz",
|
|
191
|
+
".bz2",
|
|
192
|
+
".7z",
|
|
193
|
+
".rar",
|
|
194
|
+
// Compiled / binary
|
|
195
|
+
".exe",
|
|
196
|
+
".dll",
|
|
197
|
+
".so",
|
|
198
|
+
".dylib",
|
|
199
|
+
".o",
|
|
200
|
+
".a",
|
|
201
|
+
".class",
|
|
202
|
+
".pyc",
|
|
203
|
+
".pdb",
|
|
204
|
+
// Source maps & lockfiles (large, not useful for drift analysis)
|
|
205
|
+
".map"
|
|
206
|
+
]);
|
|
133
207
|
var TEXT_CACHE_MAX_BYTES = 1048576;
|
|
134
208
|
var FileCache = class _FileCache {
|
|
135
209
|
/** Directory walk results keyed by rootDir */
|
|
@@ -207,6 +281,9 @@ var FileCache = class _FileCache {
|
|
|
207
281
|
const stuckDirs = this._stuckPaths;
|
|
208
282
|
async function walk(dir) {
|
|
209
283
|
const relDir = path2.relative(rootDir, dir);
|
|
284
|
+
if (onProgress) {
|
|
285
|
+
onProgress(foundCount, relDir || ".");
|
|
286
|
+
}
|
|
210
287
|
let entries;
|
|
211
288
|
try {
|
|
212
289
|
const readPromise = fs.readdir(dir, { withFileTypes: true });
|
|
@@ -234,6 +311,8 @@ var FileCache = class _FileCache {
|
|
|
234
311
|
results.push({ absPath, relPath, name: e.name, isFile: false, isDirectory: true });
|
|
235
312
|
subWalks.push(sem.run(() => walk(absPath)));
|
|
236
313
|
} else if (e.isFile()) {
|
|
314
|
+
const ext = path2.extname(e.name).toLowerCase();
|
|
315
|
+
if (SKIP_EXTENSIONS.has(ext)) continue;
|
|
237
316
|
results.push({ absPath, relPath, name: e.name, isFile: true, isDirectory: false });
|
|
238
317
|
foundCount++;
|
|
239
318
|
if (onProgress && foundCount - lastReported >= REPORT_INTERVAL) {
|
|
@@ -370,7 +449,8 @@ async function quickTreeCount(rootDir, excludePatterns) {
|
|
|
370
449
|
totalDirs++;
|
|
371
450
|
subs.push(sem.run(() => count(path2.join(dir, e.name))));
|
|
372
451
|
} else if (e.isFile()) {
|
|
373
|
-
|
|
452
|
+
const ext = path2.extname(e.name).toLowerCase();
|
|
453
|
+
if (!SKIP_EXTENSIONS.has(ext)) totalFiles++;
|
|
374
454
|
}
|
|
375
455
|
}
|
|
376
456
|
await Promise.all(subs);
|
|
@@ -396,7 +476,8 @@ async function findFiles(rootDir, predicate) {
|
|
|
396
476
|
if (SKIP_DIRS.has(e.name)) continue;
|
|
397
477
|
subDirectoryWalks.push(readDirSemaphore.run(() => walk(path2.join(dir, e.name))));
|
|
398
478
|
} else if (e.isFile() && predicate(e.name)) {
|
|
399
|
-
|
|
479
|
+
const ext = path2.extname(e.name).toLowerCase();
|
|
480
|
+
if (!SKIP_EXTENSIONS.has(ext)) results.push(path2.join(dir, e.name));
|
|
400
481
|
}
|
|
401
482
|
}
|
|
402
483
|
await Promise.all(subDirectoryWalks);
|
|
@@ -4170,7 +4251,7 @@ var SKIP_DIRS2 = /* @__PURE__ */ new Set([
|
|
|
4170
4251
|
".output",
|
|
4171
4252
|
".svelte-kit"
|
|
4172
4253
|
]);
|
|
4173
|
-
var
|
|
4254
|
+
var SKIP_EXTENSIONS2 = /* @__PURE__ */ new Set([
|
|
4174
4255
|
".map",
|
|
4175
4256
|
".lock",
|
|
4176
4257
|
".png",
|
|
@@ -4182,6 +4263,7 @@ var SKIP_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
|
4182
4263
|
".woff",
|
|
4183
4264
|
".woff2",
|
|
4184
4265
|
".ttf",
|
|
4266
|
+
".otf",
|
|
4185
4267
|
".eot",
|
|
4186
4268
|
".mp4",
|
|
4187
4269
|
".webm"
|
|
@@ -4195,7 +4277,7 @@ async function scanFileHotspots(rootDir, cache) {
|
|
|
4195
4277
|
for (const entry of entries) {
|
|
4196
4278
|
if (!entry.isFile) continue;
|
|
4197
4279
|
const ext = path14.extname(entry.name).toLowerCase();
|
|
4198
|
-
if (
|
|
4280
|
+
if (SKIP_EXTENSIONS2.has(ext)) continue;
|
|
4199
4281
|
const depth = entry.relPath.split(path14.sep).length - 1;
|
|
4200
4282
|
if (depth > maxDepth) maxDepth = depth;
|
|
4201
4283
|
extensionCounts[ext] = (extensionCounts[ext] ?? 0) + 1;
|
|
@@ -4228,7 +4310,7 @@ async function scanFileHotspots(rootDir, cache) {
|
|
|
4228
4310
|
await walk(path14.join(dir, e.name), depth + 1);
|
|
4229
4311
|
} else if (e.isFile) {
|
|
4230
4312
|
const ext = path14.extname(e.name).toLowerCase();
|
|
4231
|
-
if (
|
|
4313
|
+
if (SKIP_EXTENSIONS2.has(ext)) continue;
|
|
4232
4314
|
extensionCounts[ext] = (extensionCounts[ext] ?? 0) + 1;
|
|
4233
4315
|
try {
|
|
4234
4316
|
const stat4 = await fs5.stat(path14.join(dir, e.name));
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-GN3IWKSY.js";
|
|
5
5
|
import {
|
|
6
6
|
baselineCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KQUBDWWG.js";
|
|
8
8
|
import {
|
|
9
9
|
VERSION,
|
|
10
10
|
dsnCommand,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
readJsonFile,
|
|
16
16
|
scanCommand,
|
|
17
17
|
writeDefaultConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PG7GQN5E.js";
|
|
19
19
|
|
|
20
20
|
// src/cli.ts
|
|
21
21
|
import { Command as Command4 } from "commander";
|
|
@@ -38,7 +38,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
|
|
|
38
38
|
console.log(chalk.green("\u2714") + ` Created ${chalk.bold("vibgrate.config.ts")}`);
|
|
39
39
|
}
|
|
40
40
|
if (opts.baseline) {
|
|
41
|
-
const { runBaseline } = await import("./baseline-
|
|
41
|
+
const { runBaseline } = await import("./baseline-4KY5EKYR.js");
|
|
42
42
|
await runBaseline(rootDir);
|
|
43
43
|
}
|
|
44
44
|
console.log("");
|
package/dist/index.js
CHANGED