view-ignored 0.2.1 → 0.2.2
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/out/src/browser/lib.js +6 -6
- package/out/src/cli.js +13 -13
- package/package.json +1 -2
package/out/src/browser/lib.js
CHANGED
|
@@ -61,6 +61,12 @@ export async function scanProject(arg1, options) {
|
|
|
61
61
|
}
|
|
62
62
|
return scanProject(bind.methodology, Object.assign(options, bind.scanOptions));
|
|
63
63
|
}
|
|
64
|
+
const allFilePaths = await glob("**", {
|
|
65
|
+
...options,
|
|
66
|
+
nodir: true,
|
|
67
|
+
dot: true,
|
|
68
|
+
posix: true,
|
|
69
|
+
});
|
|
64
70
|
// Find good source.
|
|
65
71
|
const { filter = "included", fsa = FS, cwd = process.cwd() } = options;
|
|
66
72
|
for (const methodology of arg1) {
|
|
@@ -69,12 +75,6 @@ export async function scanProject(arg1, options) {
|
|
|
69
75
|
if (sourceInfoList.length < 1) {
|
|
70
76
|
continue;
|
|
71
77
|
}
|
|
72
|
-
const allFilePaths = await glob("**", {
|
|
73
|
-
...options,
|
|
74
|
-
nodir: true,
|
|
75
|
-
dot: true,
|
|
76
|
-
posix: true,
|
|
77
|
-
});
|
|
78
78
|
const cache = new Set();
|
|
79
79
|
let noSource = false;
|
|
80
80
|
for (const filePath of allFilePaths) {
|
package/out/src/cli.js
CHANGED
|
@@ -7,9 +7,9 @@ import { decorCondition, formatFiles } from "./browser/styling.js";
|
|
|
7
7
|
import { ErrorNoSources, scanProject, Sorting } from "./lib.js";
|
|
8
8
|
import { boxError, formatConfigConflicts } from "./styling.js";
|
|
9
9
|
import ora from "ora";
|
|
10
|
-
import
|
|
10
|
+
import { createRequire } from "module";
|
|
11
11
|
import { format } from "util";
|
|
12
|
-
export const { version } =
|
|
12
|
+
export const { version } = createRequire(import.meta.url)('../package.json');
|
|
13
13
|
export function logError(message, options) {
|
|
14
14
|
console.log(boxError(message, { noColor: getColorLevel(program.opts()) === 0, ...options }));
|
|
15
15
|
}
|
|
@@ -19,17 +19,6 @@ export function logError(message, options) {
|
|
|
19
19
|
export async function programInit() {
|
|
20
20
|
Config.configManager.load();
|
|
21
21
|
program.version('v' + version, '-v');
|
|
22
|
-
program.addOption(new Option("--no-color", 'force disable colors').default(false));
|
|
23
|
-
Config.configValueLinkCliOption("plugins", program, new Option('--plugins <modules...>', 'import modules to modify behavior'), parseArgArrStr);
|
|
24
|
-
Config.configValueLinkCliOption("color", program, new Option("--color <level>", 'the interface color level'), parseArgInt);
|
|
25
|
-
Config.configValueLinkCliOption("decor", program, new Option("--decor <decor>", "the interface decorations"));
|
|
26
|
-
Config.configValueLinkCliOption("parsable", scanProgram, new Option('-p, --parsable [parsable]', "print parsable text"), parseArgBool);
|
|
27
|
-
Config.configValueLinkCliOption("target", scanProgram, new Option("-t, --target <ignorer>", 'the scan target'));
|
|
28
|
-
Config.configValueLinkCliOption("filter", scanProgram, new Option("--filter <filter>", 'filter results'));
|
|
29
|
-
Config.configValueLinkCliOption("sort", scanProgram, new Option("--sort <sorter>", 'sort results'));
|
|
30
|
-
Config.configValueLinkCliOption("style", scanProgram, new Option("--style <style>", 'results view mode'));
|
|
31
|
-
Config.configValueLinkCliOption("depth", scanProgram, new Option("--depth <depth>", 'the max results depth'), parseArgInt);
|
|
32
|
-
Config.configValueLinkCliOption("showSources", scanProgram, new Option("--show-sources [show]", 'show scan sources'), parseArgBool);
|
|
33
22
|
program.parseOptions(process.argv);
|
|
34
23
|
const flags = program.opts();
|
|
35
24
|
const chalk = getChalk(flags);
|
|
@@ -58,6 +47,17 @@ export async function programInit() {
|
|
|
58
47
|
logError(format(reason));
|
|
59
48
|
process.exit(1);
|
|
60
49
|
}
|
|
50
|
+
program.addOption(new Option("--no-color", 'force disable colors').default(false));
|
|
51
|
+
Config.configValueLinkCliOption("plugins", program, new Option('--plugins <modules...>', 'import modules to modify behavior'), parseArgArrStr);
|
|
52
|
+
Config.configValueLinkCliOption("color", program, new Option("--color <level>", 'the interface color level'), parseArgInt);
|
|
53
|
+
Config.configValueLinkCliOption("decor", program, new Option("--decor <decor>", "the interface decorations"));
|
|
54
|
+
Config.configValueLinkCliOption("parsable", scanProgram, new Option('-p, --parsable [parsable]', "print parsable text"), parseArgBool);
|
|
55
|
+
Config.configValueLinkCliOption("target", scanProgram, new Option("-t, --target <ignorer>", 'the scan target'));
|
|
56
|
+
Config.configValueLinkCliOption("filter", scanProgram, new Option("--filter <filter>", 'filter results'));
|
|
57
|
+
Config.configValueLinkCliOption("sort", scanProgram, new Option("--sort <sorter>", 'sort results'));
|
|
58
|
+
Config.configValueLinkCliOption("style", scanProgram, new Option("--style <style>", 'results view mode'));
|
|
59
|
+
Config.configValueLinkCliOption("depth", scanProgram, new Option("--depth <depth>", 'the max results depth'), parseArgInt);
|
|
60
|
+
Config.configValueLinkCliOption("showSources", scanProgram, new Option("--show-sources [show]", 'show scan sources'), parseArgBool);
|
|
61
61
|
program.parse();
|
|
62
62
|
}
|
|
63
63
|
/** Chalk, but configured by view-ignored cli. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "view-ignored",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Retrieve list of files ignored/included by Git, NPM, Yarn and VSC Extension.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"prerelease": "pnpm lint && pnpm build:pub && pnpm test",
|
|
12
|
-
"postinstall": "pnpm run build",
|
|
13
12
|
"test": "pnpm mocha ./out/test/**/*.test.js",
|
|
14
13
|
"build": "pnpm shx rm -rf out && pnpm tsc",
|
|
15
14
|
"build:pub": "pnpm shx rm -rf out && pnpm tsc --sourceMap false",
|