@tng-sh/js 0.0.1 → 0.0.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/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # @tng-sh/js: TNG JavaScript CLI
2
+
3
+ High-performance test generation and context analysis for JavaScript/TypeScript, powered by Rust (NAPI-RS and OXC).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @tng-sh/js --save-dev
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ### 1. Initialize
14
+ Run the init command to create a `tng.config.js` configuration file in your project:
15
+
16
+ ```bash
17
+ npx tng init
18
+ ```
19
+
20
+ ### 2. Generate Tests
21
+ Generate a test for a specific function in a file:
22
+
23
+ ```bash
24
+ npx tng -f path/to/file.js -m functionName
25
+ ```
26
+
27
+ ### 3. Interactive Mode
28
+ Launch the interactive UI to explore and generate tests visually:
29
+
30
+ ```bash
31
+ npx tng i
32
+ ```
33
+
34
+ ## Features
35
+
36
+ - ⚡️ **Fast AST Analysis**: Powered by Rust and the `oxc` parser for blazing fast static analysis.
37
+ - 🖥️ **Interactive UI**: Rich Go-based terminal UI for managing test generation.
38
+ - 🎨 **Prettier Integration**: Automatically formats generated tests to match your project style.
39
+ - 📘 **TypeScript Support**: First-class support for TypeScript analysis.
40
+
41
+ ## Configuration
42
+
43
+ The `tng.config.js` file allows you to customize the behavior:
44
+
45
+ ```javascript
46
+ module.exports = {
47
+ // API Configuration
48
+ API_KEY: "your-api-key-here",
49
+ API_URL: "https://app.tng.sh/",
50
+
51
+ // Framework Detection
52
+ // Options: express, nextjs, nestjs, generic
53
+ FRAMEWORK: "express",
54
+
55
+ // Testing Configuration
56
+ // Options: jest, mocha, vitest
57
+ TEST_FRAMEWORK: "jest",
58
+
59
+ // Test Directory
60
+ TEST_DIRECTORY: "tests"
61
+ };
62
+ ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tng-sh/js",
3
- "version": "0.0.1",
4
- "description": "TNG JavaScript core - HTTP transport and utilities",
3
+ "version": "0.0.2",
4
+ "description": "TNG JavaScript CLI",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/tng-sh/tng-js-public.git"
Binary file
Binary file
Binary file
Binary file