@nudojs/cli 3.0.0 → 4.0.0-beta.0

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.
Files changed (3) hide show
  1. package/README.md +31 -8
  2. package/dist/index.js +58130 -68482
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -1,17 +1,20 @@
1
1
  # @nudojs/cli
2
2
 
3
- CLI and evaluator API for the [Nudo](https://github.com/nudojs/nudo) type inference engine.
3
+ > **欢迎重回 JS 世界.** — Nudo 不限制你的 JS 表达,只忠实反映中间量与结果,并提供比类型更精确的契约校验。
4
+ > Welcome back to JavaScript. Your JS stays JS — observe intermediates, enforce contracts sharper than types.
5
+
6
+ CLI and evaluator API for the [Nudo](https://github.com/nudojs/nudo) analysis engine.
4
7
 
5
8
  ## What is Nudo?
6
9
 
7
- Nudo is a type inference engine for JavaScript. Instead of a separate type system, it runs your code with symbolic type values via abstract interpretation — no TypeScript, no build step.
10
+ Nudo does not restrict how you write JavaScript. It executes code on Abs (`shape × term × pred × conf`) so you can observe intermediate values/results and enforce contracts sharper than ordinary TypeScript types.
8
11
 
9
12
  ## This package
10
13
 
11
14
  `@nudojs/cli` provides:
12
15
 
13
- - **CLI tool** — the `nudo` command for inferring types and generating `.d.ts` files
14
- - **Evaluator API** — programmatic access to `evaluateFunction`, `evaluateProgram`, and module resolution
16
+ - **CLI tool** — the `nudo` command: `check`, `test`, `contract`, `export`, `health`
17
+ - **Evaluator API** — programmatic access to analysis entrypoints and module resolution
15
18
 
16
19
  ## Install
17
20
 
@@ -22,13 +25,33 @@ npm install @nudojs/cli
22
25
  ## Usage
23
26
 
24
27
  ```bash
25
- # Infer types for a file
26
- npx nudojs infer src/utils.js
28
+ # Day 0 — signatures + L2 entry throws
29
+ npx nudojs check src/utils.js
30
+
31
+ # Day 0 — every inferred case (synthetic call@ / entry@ included)
32
+ npx nudojs test src/utils.js
27
33
 
28
- # Generate .d.ts output
29
- npx nudojs infer src/utils.js --dts
34
+ # Day 1 — draft / emit contracts
35
+ npx nudojs contract --draft src/utils.js --write
36
+ npx nudojs check src/utils.js
37
+
38
+ # Ecosystem — dts / guard / schema / standard projection
39
+ npx nudojs export src/utils.js --format dts --out dist/types
40
+ ```
41
+
42
+ Primary verbs:
43
+
44
+ ```text
45
+ nudo check <path> [--watch] # gate + signatures (CI)
46
+ nudo test <path> [--watch] # case report + declared assertions
47
+ nudo contract <path> # draft / emit interfaces
48
+ nudo export <path> # dts | guard | schema | standard | all
49
+ nudo health [paths] # drift + analysis errors
50
+ nudo health [paths] # analysis errors + drift
30
51
  ```
31
52
 
32
53
  ## License
33
54
 
34
55
  [MIT](https://github.com/nudojs/nudo/blob/main/LICENSE)
56
+
57
+ Docs: https://nudojs.github.io/nudo/ · Playground: https://nudojs.github.io/nudo/playground