view-ignored 0.4.5 → 0.4.6
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.
|
@@ -4,7 +4,7 @@ import { type RealScanOptions } from '../lib.js';
|
|
|
4
4
|
import { File } from './file.js';
|
|
5
5
|
export type DeepStreamEventEmitter = EventEmitter<DeepStreamEventMap> & {
|
|
6
6
|
endPromise: Promise<DeepStreamDataRoot>;
|
|
7
|
-
run():
|
|
7
|
+
run(): Promise<DeepStreamDataRoot>;
|
|
8
8
|
};
|
|
9
9
|
export type DeepStreamDataRoot = {
|
|
10
10
|
tree: Directory;
|
package/out/cli.js
CHANGED
|
@@ -222,36 +222,37 @@ export async function actionScan() {
|
|
|
222
222
|
cwd: optionsReal.cwd,
|
|
223
223
|
modules: optionsReal.modules,
|
|
224
224
|
});
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
let name = decorCondition(flags.decor, { ifNerd: bind.icon?.value, postfix: ' ' })
|
|
238
|
-
+ bind.name;
|
|
239
|
-
if (bind.icon?.color !== undefined) {
|
|
240
|
-
name = chalk.hex('#' + bind.icon.color)(name);
|
|
225
|
+
try {
|
|
226
|
+
if (flags.parsable) {
|
|
227
|
+
await stream.run();
|
|
228
|
+
const fileInfoList = await scan(stream, {
|
|
229
|
+
...optionsReal,
|
|
230
|
+
target: flags.target,
|
|
231
|
+
filter: flags.filter,
|
|
232
|
+
maxDepth: flags.depth,
|
|
233
|
+
});
|
|
234
|
+
console.log(fileInfoList.map(fileInfo => fileInfo.relativePath + (flags.showSources && fileInfo.source !== undefined
|
|
235
|
+
? '<' + (fileInfo.source.relativePath)
|
|
236
|
+
: '')).join(','));
|
|
241
237
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
238
|
+
else {
|
|
239
|
+
let name = decorCondition(flags.decor, { ifNerd: bind.icon?.value, postfix: ' ' })
|
|
240
|
+
+ bind.name;
|
|
241
|
+
if (bind.icon?.color !== undefined) {
|
|
242
|
+
name = chalk.hex('#' + bind.icon.color)(name);
|
|
243
|
+
}
|
|
244
|
+
const context = {
|
|
245
|
+
progress: { current: 0, directories: 0, files: 0, total: 0 },
|
|
246
|
+
fileInfoList: [],
|
|
247
|
+
stream,
|
|
248
|
+
message: '',
|
|
249
|
+
reading: new Promise((resolve) => {
|
|
250
|
+
stream.on('end', (data) => {
|
|
251
|
+
resolve(data);
|
|
252
|
+
});
|
|
253
|
+
}),
|
|
254
|
+
};
|
|
255
|
+
await context.stream.run();
|
|
255
256
|
console.log(`${name} ${chalk.hex('#73A7DE')(flags.filter)} ${cwd}`);
|
|
256
257
|
await oraPromise(async (spinner) => {
|
|
257
258
|
const proc = scan(context.stream, {
|
|
@@ -305,13 +306,13 @@ export async function actionScan() {
|
|
|
305
306
|
message += '\n';
|
|
306
307
|
}
|
|
307
308
|
context.message = message;
|
|
309
|
+
console.log(context.message);
|
|
308
310
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
311
|
+
}
|
|
312
|
+
catch (error) {
|
|
313
|
+
if (!(error instanceof ViewIgnoredError)) {
|
|
314
|
+
logError(format(error), { title: 'view-ignored - Error while scan.' });
|
|
313
315
|
}
|
|
314
|
-
console.log(context.message);
|
|
315
316
|
}
|
|
316
317
|
}
|
|
317
318
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "view-ignored",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "Retrieve list of files ignored/included by Git, NPM, Yarn, JSR, VSCE or other tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
"prerelease": "bun run build:pub && bun run lint",
|
|
12
12
|
"test": "bun run node --test out/**/*.test.js",
|
|
13
13
|
"build": "bun run build:clean && bun run tsc -p src",
|
|
14
|
-
"build:pub": "bun run build:clean && bun run tsc -p src --sourceMap false
|
|
15
|
-
"build:watch": "bun run build:clean && bun run tsc -p src --watch",
|
|
14
|
+
"build:pub": "bun run build:clean && bun run tsc -p src/tsconfig.pub.json --sourceMap false",
|
|
16
15
|
"build:clean": "rm -rf out",
|
|
17
16
|
"lint": "bun run eslint .",
|
|
18
17
|
"release:major": "bun run release-it --increment=major",
|
|
@@ -87,7 +86,7 @@
|
|
|
87
86
|
"strip-json-comments": "^5.0.2",
|
|
88
87
|
"treeify": "^1.1.0",
|
|
89
88
|
"yaml": "^2.8.0",
|
|
90
|
-
"zod": "^
|
|
89
|
+
"zod": "^4.0.14"
|
|
91
90
|
},
|
|
92
91
|
"devDependencies": {
|
|
93
92
|
"@eslint/js": "^9.30.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|