nudojs 0.0.0 → 0.2.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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/bin/nudo.mjs +10 -0
  4. package/package.json +39 -11
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nudo Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # nudojs
2
+
3
+ Thin installer shell for the **`nudo`** command — it exists so that `npm i -g nudojs` (or `npx nudojs`) gives you the `nudo` CLI directly. Everything is delegated to [`@nudojs/cli`](https://www.npmjs.com/package/@nudojs/cli), the CLI of the Nudo type inference engine for JavaScript.
4
+
5
+ > The bare npm name `nudo` was unavailable, so this package is published as **`nudojs`**. The installed command is still `nudo`.
6
+
7
+ ```bash
8
+ npm i -g nudojs
9
+ nudo infer file.js
10
+
11
+ # or without installing
12
+ npx nudojs infer file.js
13
+ ```
14
+
15
+ Nudo infers types by executing your code with symbolic type values (`T.number`, `T.string`, …) — see the monorepo packages for the actual engine:
16
+
17
+ - [`@nudojs/cli`](https://github.com/nudojs/nudo/tree/main/packages/cli) — CLI (`infer`, `check`, `types`, `watch`, `generate`, `interface`, …)
18
+ - [`@nudojs/core`](https://github.com/nudojs/nudo/tree/main/packages/core) — the Abs type system (shape × term × pred × conf)
19
+ - [`@nudojs/parser`](https://github.com/nudojs/nudo/tree/main/packages/parser) — Babel-based parser and `@nudo:` directive extraction
20
+ - [`@nudojs/service`](https://github.com/nudojs/nudo/tree/main/packages/service) — analyzer orchestration, TypeValue evaluator API (`@nudojs/service/evaluator`), dts generation, harvest
21
+ - [`@nudojs/env`](https://github.com/nudojs/nudo/tree/main/packages/env) — ES / Web / Node API type definitions
22
+
23
+ > Installing both `nudojs` and `@nudojs/cli` globally is redundant; pick one. This package only re-exports the CLI entry under the short `nudo` bin.
24
+
25
+ Full documentation (English + 中文): <https://nudojs.github.io/nudo/>
package/bin/nudo.mjs ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ // Thin shell for the `nudo` command. Published as `nudojs` on npm (the bare
3
+ // `nudo` name was unavailable) and hands execution to @nudojs/cli, whose
4
+ // package entry (`exports` "." → dist/index.js) is the same module as its
5
+ // `nudo` bin.
6
+ //
7
+ // No argv/exit-code plumbing is needed: the CLI entry parses process.argv
8
+ // itself (its slice(2) args are exactly the args passed to this wrapper) and
9
+ // reports outcomes via process.exitCode, both of which are this process's.
10
+ import "@nudojs/cli";
package/package.json CHANGED
@@ -1,13 +1,41 @@
1
1
  {
2
2
  "name": "nudojs",
3
- "version": "0.0.0",
4
- "description": "",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "keywords": [],
10
- "author": "",
11
- "license": "ISC",
12
- "type": "commonjs"
13
- }
3
+ "version": "0.2.1",
4
+ "engines": {
5
+ "node": ">=20"
6
+ },
7
+ "description": "Thin installer shell for the `nudo` command — delegates to @nudojs/cli, the CLI of the Nudo type inference engine",
8
+ "type": "module",
9
+ "private": false,
10
+ "license": "MIT",
11
+ "keywords": [
12
+ "nudo",
13
+ "nudojs",
14
+ "type-inference",
15
+ "javascript",
16
+ "cli",
17
+ "dts",
18
+ "abstract-interpretation"
19
+ ],
20
+ "bin": {
21
+ "nudo": "./bin/nudo.mjs"
22
+ },
23
+ "files": [
24
+ "bin"
25
+ ],
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/nudojs/nudo.git",
29
+ "directory": "packages/nudojs"
30
+ },
31
+ "homepage": "https://github.com/nudojs/nudo/tree/main/packages/nudojs",
32
+ "bugs": "https://github.com/nudojs/nudo/issues",
33
+ "publishConfig": {
34
+ "access": "public",
35
+ "provenance": true,
36
+ "registry": "https://registry.npmjs.org"
37
+ },
38
+ "dependencies": {
39
+ "@nudojs/cli": "1.0.0"
40
+ }
41
+ }