batch-exec-cli 1.3.3 → 1.3.4
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/package.json +3 -1
- package/src/cli.js +5 -1
- package/src/directoryLister.js +0 -1
- package/src/ignoreParser.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "batch-exec-cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Efficiently iterate through directories and execute commands with progress display and parallel execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"batch-exec": "src/cli.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
+
"test": "node --test",
|
|
12
|
+
"test:coverage": "node --test --experimental-test-coverage --test-coverage-include='src/**' --test-coverage-exclude='test/**'",
|
|
11
13
|
"lint": "eslint src/ test/"
|
|
12
14
|
},
|
|
13
15
|
"files": [
|
package/src/cli.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { createRequire } from 'module';
|
|
3
4
|
import path from 'path';
|
|
4
5
|
import minimist from 'minimist';
|
|
5
6
|
import { $ } from 'zx';
|
|
6
7
|
import { batchExecute, parseIgnoreFile } from './index.js';
|
|
7
8
|
import { cyan, yellow, green, red, gray, bold, dim, magenta, blue } from './utils/colors.js';
|
|
8
9
|
|
|
10
|
+
const require = createRequire(import.meta.url);
|
|
11
|
+
const { version } = require('../package.json');
|
|
12
|
+
|
|
9
13
|
$.verbose = false;
|
|
10
14
|
|
|
11
15
|
async function main() {
|
|
@@ -68,7 +72,7 @@ async function main() {
|
|
|
68
72
|
|
|
69
73
|
function printHelp() {
|
|
70
74
|
console.log(`
|
|
71
|
-
${bold('Batch Executor')} ${dim(
|
|
75
|
+
${bold('Batch Executor')} ${dim(`v${version}`)}
|
|
72
76
|
|
|
73
77
|
${cyan('Usage:')} batch-exec [options] <directory> <command> [args...]
|
|
74
78
|
|
package/src/directoryLister.js
CHANGED
|
@@ -4,7 +4,6 @@ import { shouldSkipDirectory } from './ignoreParser.js';
|
|
|
4
4
|
|
|
5
5
|
export async function listDirectSubdirectories(targetDir, skipPatterns = []) {
|
|
6
6
|
const absoluteTargetDir = path.resolve(targetDir);
|
|
7
|
-
|
|
8
7
|
try {
|
|
9
8
|
const entries = await fs.readdir(absoluteTargetDir, { withFileTypes: true });
|
|
10
9
|
const subdirs = [];
|
package/src/ignoreParser.js
CHANGED