claude-code-log 0.9.0 → 0.9.1
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/bin/cli.js +37 -10
- package/package.json +2 -2
package/bin/cli.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const { spawn, execSync } = require('child_process');
|
|
4
|
-
const path = require('path');
|
|
5
4
|
|
|
6
|
-
const REPO_URL = 'git+https://github.com/
|
|
5
|
+
const REPO_URL = 'git+https://github.com/nhannguyenhuu241/claude-reporter.git';
|
|
7
6
|
const PACKAGE_NAME = 'claude-code-log';
|
|
8
7
|
|
|
9
8
|
// Check if a command exists
|
|
@@ -24,12 +23,43 @@ if (args.length === 0) {
|
|
|
24
23
|
args.push('--tui');
|
|
25
24
|
}
|
|
26
25
|
|
|
26
|
+
// Filter stderr to hide uvx/pipx internal messages
|
|
27
|
+
function createFilteredSpawn(cmd, cmdArgs) {
|
|
28
|
+
const child = spawn(cmd, cmdArgs, {
|
|
29
|
+
stdio: ['inherit', 'inherit', 'pipe']
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// Filter stderr - hide git/pip update messages
|
|
33
|
+
child.stderr.on('data', (data) => {
|
|
34
|
+
const text = data.toString();
|
|
35
|
+
// Skip lines containing git URLs, pip warnings, or update messages
|
|
36
|
+
const lines = text.split('\n').filter(line => {
|
|
37
|
+
const lower = line.toLowerCase();
|
|
38
|
+
return !(
|
|
39
|
+
lower.includes('github.com') ||
|
|
40
|
+
lower.includes('updating') ||
|
|
41
|
+
lower.includes('updated') ||
|
|
42
|
+
lower.includes('building') ||
|
|
43
|
+
lower.includes('built') ||
|
|
44
|
+
lower.includes('installed') ||
|
|
45
|
+
lower.includes('resolved') ||
|
|
46
|
+
lower.includes('prepared') ||
|
|
47
|
+
lower.includes('warning') ||
|
|
48
|
+
lower.includes('deprecation') ||
|
|
49
|
+
line.trim() === ''
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
if (lines.length > 0) {
|
|
53
|
+
process.stderr.write(lines.join('\n') + '\n');
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
return child;
|
|
58
|
+
}
|
|
59
|
+
|
|
27
60
|
// Try to run with uvx first (fastest)
|
|
28
61
|
if (commandExists('uvx')) {
|
|
29
|
-
const child =
|
|
30
|
-
stdio: 'inherit',
|
|
31
|
-
shell: true
|
|
32
|
-
});
|
|
62
|
+
const child = createFilteredSpawn('uvx', ['--from', REPO_URL, PACKAGE_NAME, ...args]);
|
|
33
63
|
|
|
34
64
|
child.on('close', (code) => {
|
|
35
65
|
process.exit(code);
|
|
@@ -42,10 +72,7 @@ if (commandExists('uvx')) {
|
|
|
42
72
|
}
|
|
43
73
|
// Try pipx
|
|
44
74
|
else if (commandExists('pipx')) {
|
|
45
|
-
const child =
|
|
46
|
-
stdio: 'inherit',
|
|
47
|
-
shell: true
|
|
48
|
-
});
|
|
75
|
+
const child = createFilteredSpawn('pipx', ['run', '--spec', REPO_URL, PACKAGE_NAME, ...args]);
|
|
49
76
|
|
|
50
77
|
child.on('close', (code) => {
|
|
51
78
|
process.exit(code);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-log",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Convert Claude Code transcript JSONL files to HTML with interactive TUI",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claude-code-log": "./bin/cli.js"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "https://github.com/
|
|
21
|
+
"url": "https://github.com/nhannguyenhuu241/claude-reporter.git"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=16"
|