@tng-sh/js 0.1.7 → 0.1.8
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/README.md +1 -1
- package/bin/tng.js +13 -3
- package/binaries/go-ui-darwin-amd64 +0 -0
- package/binaries/go-ui-darwin-arm64 +0 -0
- package/binaries/go-ui-linux-amd64 +0 -0
- package/binaries/go-ui-linux-arm64 +0 -0
- package/index.darwin-arm64.node +0 -0
- package/index.darwin-x64.node +0 -0
- package/index.linux-arm64-gnu.node +0 -0
- package/index.linux-x64-gnu.node +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ npx -p @tng-sh/js tng --deadcode -f path/to/file.js
|
|
|
74
74
|
- **Dead Code Cleanup**: Find and remove unused imports, variables, and unreachable logic.
|
|
75
75
|
- **First-Class TS & React**: Native support for TypeScript, JSX, and TSX.
|
|
76
76
|
|
|
77
|
-
##
|
|
77
|
+
## Configuration
|
|
78
78
|
|
|
79
79
|
Your `tng.config.js` allows for full customization:
|
|
80
80
|
|
package/bin/tng.js
CHANGED
|
@@ -27,8 +27,8 @@ process.on('uncaughtException', (err) => {
|
|
|
27
27
|
|
|
28
28
|
program
|
|
29
29
|
.name('tng')
|
|
30
|
-
.description('TNG - Advanced Code Audit, Test Generation, Visualization, and Dead Code Analysis for JavaScript/TypeScript')
|
|
31
|
-
.version('0.1.
|
|
30
|
+
.description('TNG - Advanced Code Audit, Test Generation, Visualization, Clone Detection, and Dead Code Analysis for JavaScript/TypeScript')
|
|
31
|
+
.version('0.1.8');
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @command init
|
|
@@ -212,7 +212,7 @@ program
|
|
|
212
212
|
.option('-a, --audit', 'Run audit mode instead of test generation')
|
|
213
213
|
.option('--trace', 'Run symbolic trace visualization')
|
|
214
214
|
.option('-c, --clones', 'Run duplicate code detection')
|
|
215
|
-
.option('-l, --level <level>', 'Set clone detection level (1, 2, or all)', 'all')
|
|
215
|
+
.option('-l, --level <level>', 'Set clone detection level (1: token, 2: structural, 3: fuzzy, or all)', 'all')
|
|
216
216
|
.option('-d, --deadcode', 'Run dead code detection (JS/TS/React)')
|
|
217
217
|
.option('--json', 'Output results as JSON events (machine-readable)')
|
|
218
218
|
|
|
@@ -550,4 +550,14 @@ async function generateTest(filePath, methodName, testType, auditMode = false, j
|
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
+
program.on('--help', () => {
|
|
554
|
+
console.log('');
|
|
555
|
+
console.log('Clone Detection Levels:');
|
|
556
|
+
console.log(' 1: Token-based (Near-exact match, catches copy-paste)');
|
|
557
|
+
console.log(' 2: Structural (AST-based, catches logic clones, supports JSX/Classes)');
|
|
558
|
+
console.log(' 3: Fuzzy (Fuzzy structural, catches patterns with small variations)');
|
|
559
|
+
console.log(' all: Runs all detection levels (default)');
|
|
560
|
+
console.log('');
|
|
561
|
+
});
|
|
562
|
+
|
|
553
563
|
program.parse(process.argv);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.darwin-arm64.node
CHANGED
|
Binary file
|
package/index.darwin-x64.node
CHANGED
|
Binary file
|
|
Binary file
|
package/index.linux-x64-gnu.node
CHANGED
|
Binary file
|