codeanalyzer-typescript 0.2.0__py3-none-win_amd64.whl → 0.2.1__py3-none-win_amd64.whl

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.
@@ -18,7 +18,7 @@ import sys
18
18
  from importlib import resources
19
19
  from pathlib import Path
20
20
 
21
- __version__ = "0.2.0"
21
+ __version__ = "0.2.1"
22
22
 
23
23
  __all__ = ["bin_path", "__version__"]
24
24
 
@@ -0,0 +1,34 @@
1
+ """Console-script entry point: run the bundled ``cants`` binary.
2
+
3
+ ``pip install codeanalyzer-typescript`` installs a ``cants`` launcher (see
4
+ ``[project.scripts]`` in ``pyproject.toml``) that calls :func:`main`. We locate
5
+ the platform binary via :func:`bin_path` and hand off the process to it, passing
6
+ through every CLI argument and the exit code unchanged.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import os
12
+ import subprocess
13
+ import sys
14
+
15
+ from . import bin_path
16
+
17
+
18
+ def main() -> "int | None":
19
+ """Exec the bundled ``cants`` binary with the current argv (minus argv[0])."""
20
+ binary = str(bin_path())
21
+ args = [binary, *sys.argv[1:]]
22
+
23
+ if os.name == "posix":
24
+ # Replace this process with the binary: no extra Python process lingers,
25
+ # and signals/exit codes are handled by cants directly.
26
+ os.execv(binary, args)
27
+ # os.execv never returns on success.
28
+
29
+ # Windows has no execv that behaves like POSIX; spawn and propagate the code.
30
+ return subprocess.call(args)
31
+
32
+
33
+ if __name__ == "__main__":
34
+ sys.exit(main())
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codeanalyzer-typescript
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Prebuilt codeanalyzer-typescript backend binary for CLDK (codellm-devkit).
5
5
  Project-URL: Homepage, https://codellm-devkit.info
6
6
  Project-URL: Repository, https://github.com/codellm-devkit/codeanalyzer-ts
@@ -25,6 +25,16 @@ It is the TypeScript backend behind [CLDK](https://github.com/codellm-devkit/pyt
25
25
  mirroring its [Python](https://github.com/codellm-devkit/codeanalyzer-python) and
26
26
  [Java](https://github.com/codellm-devkit/codeanalyzer-java) siblings.
27
27
 
28
+ ## Install
29
+
30
+ ```bash
31
+ pip install codeanalyzer-typescript
32
+ ```
33
+
34
+ The wheel bundles a prebuilt, self-contained `cants` binary for your platform (no Bun or
35
+ Node required to run it) and installs a `cants` command on your `PATH`. CLDK's Python SDK
36
+ depends on this package to locate the analyzer backend.
37
+
28
38
  ## Usage
29
39
 
30
40
  The analyzer provides a command-line interface for performing static analysis on
@@ -51,8 +61,9 @@ Options:
51
61
  -o, --output <dir> output directory for analysis.json
52
62
  (omit ⇒ compact JSON to stdout)
53
63
  -f, --format <fmt> output format: json | msgpack (default: "json")
54
- -a, --analysis-level <n> 1 = tsc resolver call graph + RTA (default);
55
- 2 = + CodeQL enrichment (default: "1")
64
+ -a, --analysis-level <n> analysis depth: 1 = symbol table + tsc resolver
65
+ call graph + RTA (default); 2 = call graph
66
+ (default: "1")
56
67
  -t, --target-files <paths...> restrict analysis to specific files (incremental)
57
68
  --skip-tests skip test trees (default)
58
69
  --include-tests include test trees
@@ -90,14 +101,14 @@ Options:
90
101
  This saves the results to `analysis.msgpack`, a binary format that is more compact for
91
102
  storage and transmission.
92
103
 
93
- 3. **Deeper analysis with CodeQL enrichment (experimental):**
104
+ 3. **Selecting an analysis level:**
94
105
  ```bash
95
106
  cants --input ./my-ts-project --analysis-level 2
96
107
  ```
97
108
 
98
- Every run produces a symbol table **and** a call graph. At level 1, edges come from the
99
- TypeScript compiler's resolver plus Rapid Type Analysis (RTA), with phantom nodes for
100
- calls into imported libraries. Level 2 additionally merges in CodeQL-derived edges.
109
+ Every run produces a symbol table **and** a call graph. Edges come from the TypeScript
110
+ compiler's resolver plus Rapid Type Analysis (RTA), with phantom nodes for calls into
111
+ imported libraries.
101
112
 
102
113
  4. **Incremental analysis of specific files:**
103
114
  ```bash
@@ -0,0 +1,8 @@
1
+ codeanalyzer_typescript/__init__.py,sha256=Hw1tNYgyQ4tfINY8HBmrPfsjrD-440CFX9Kv5HmqktI,1836
2
+ codeanalyzer_typescript/__main__.py,sha256=f8C3GgPB5RutSyYkwjas31c3M0zae5sKeudYWXHuQIg,1054
3
+ codeanalyzer_typescript/_bin/.gitignore,sha256=_mZ_61eDWQ65V05VrmLP33rSeppQmwCwV8_qsgHUOHM,251
4
+ codeanalyzer_typescript/_bin/cants.exe,sha256=uVoKpzAyRSHbVW0QPuiggxB7FrP9RYvHPGKlk_9f304,111491584
5
+ codeanalyzer_typescript-0.2.1.dist-info/METADATA,sha256=2OkUhCjNpAXZF9Suikzix5fEwkbADkBkEwE-zQc-LUU,8779
6
+ codeanalyzer_typescript-0.2.1.dist-info/WHEEL,sha256=pp_iTzO0EBcCvlZZV2dJYp6L2tdDWBsn1ceo50wEt8Q,94
7
+ codeanalyzer_typescript-0.2.1.dist-info/entry_points.txt,sha256=-kWzUa53_kUEbiwup53Q5GqeSOdQM1iIRJHzPIwV7S0,64
8
+ codeanalyzer_typescript-0.2.1.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ cants = codeanalyzer_typescript.__main__:main
@@ -1,6 +0,0 @@
1
- codeanalyzer_typescript/__init__.py,sha256=w_G2b2FETBJH7KqvG-e-kOMewShb69rc5--_B53A2ug,1836
2
- codeanalyzer_typescript/_bin/.gitignore,sha256=_mZ_61eDWQ65V05VrmLP33rSeppQmwCwV8_qsgHUOHM,251
3
- codeanalyzer_typescript/_bin/cants.exe,sha256=KTRR1UtbgwZmbhPWKga38qCfRjYxKlhT9835Mwnqf8c,111492608
4
- codeanalyzer_typescript-0.2.0.dist-info/METADATA,sha256=iiupqvPre6UG3Fz74gRdtPbUQtF-4soER-XX8cv2x5k,8518
5
- codeanalyzer_typescript-0.2.0.dist-info/WHEEL,sha256=pp_iTzO0EBcCvlZZV2dJYp6L2tdDWBsn1ceo50wEt8Q,94
6
- codeanalyzer_typescript-0.2.0.dist-info/RECORD,,