@wrongstack/tools 0.299.0 → 0.300.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.
- package/dist/audit.js +6 -2
- package/dist/bash.js +6 -2
- package/dist/builtin.js +1473 -295
- package/dist/codebase-index/import-extractor.d.ts +39 -0
- package/dist/codebase-index/index.js +1396 -255
- package/dist/codebase-index/languages.d.ts +24 -0
- package/dist/codebase-index/module-resolver.d.ts +78 -0
- package/dist/codebase-index/module-roots.d.ts +81 -0
- package/dist/codebase-index/parser-output.d.ts +29 -0
- package/dist/codebase-index/project-server.js +1379 -236
- package/dist/codebase-index/rs-parser.d.ts +22 -0
- package/dist/codebase-index/schema.d.ts +24 -1
- package/dist/codebase-index/worker.js +1381 -238
- package/dist/codebase-index/writer-graph-helpers.d.ts +17 -5
- package/dist/codebase-index/writer-ref-mapper.d.ts +3 -0
- package/dist/codebase-index/writer-schema.d.ts +15 -3
- package/dist/codebase-index/writer.d.ts +76 -3
- package/dist/exec.js +35 -2
- package/dist/format.js +6 -2
- package/dist/index.js +1473 -295
- package/dist/install.js +6 -2
- package/dist/json.js +51 -2
- package/dist/languages/index.js +6 -2
- package/dist/lint.js +6 -2
- package/dist/outdated.js +6 -2
- package/dist/pack.js +1473 -295
- package/dist/process-registry.d.ts +6 -0
- package/dist/process-registry.js +6 -2
- package/dist/ps-slash.js +6 -2
- package/dist/read.js +1387 -244
- package/dist/test.js +6 -2
- package/dist/tool-tier.js +1473 -295
- package/dist/typecheck.js +6 -2
- package/package.json +3 -3
- package/dist/codebase-index/refs-extractor.d.ts +0 -11
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rust source symbol extraction.
|
|
3
|
+
*
|
|
4
|
+
* Extracts fn, struct, enum, trait, impl, type, const, static and mod with
|
|
5
|
+
* line-anchored regexes. Dependency edges do not come from here — `use` and
|
|
6
|
+
* `mod` declarations are read by `import-extractor.ts` and resolved against the
|
|
7
|
+
* crate's `Cargo.toml` by `module-resolver.ts`.
|
|
8
|
+
*
|
|
9
|
+
* ### Why there is no native `syn` parser
|
|
10
|
+
*
|
|
11
|
+
* There used to be a path that shelled out to a cargo subproject for real AST
|
|
12
|
+
* parsing. It resolved that subproject relative to `process.cwd()` — the
|
|
13
|
+
* *indexed project*, not the wstack installation — and the crate has never
|
|
14
|
+
* existed in this repository. So the branch was unreachable except in the one
|
|
15
|
+
* case where it must never fire: an indexed repository that happens to contain
|
|
16
|
+
* `tools/Cargo.toml`, where indexing would have run `cargo run` inside the
|
|
17
|
+
* user's checkout and written to `tools/syn-parser/src/input.rs`.
|
|
18
|
+
*
|
|
19
|
+
* Indexing reads a repository; it does not execute its build or write to its
|
|
20
|
+
* working tree. Reinstating native parsing means shipping the crate inside the
|
|
21
|
+
* wstack installation and resolving it from there — never from the scan target.
|
|
22
|
+
*/
|
|
1
23
|
import type { FileSymbols, SymbolLang } from './schema.js';
|
|
2
24
|
export declare function parseSymbols(opts: {
|
|
3
25
|
file: string;
|
|
@@ -95,6 +95,29 @@ export interface Ref {
|
|
|
95
95
|
toId?: number | undefined;
|
|
96
96
|
callType: CallType;
|
|
97
97
|
line: number;
|
|
98
|
+
/**
|
|
99
|
+
* Language of the *referencing* file. Name resolution (`toName` → `toId`) is
|
|
100
|
+
* scoped to the referencing language's family, because a global name match
|
|
101
|
+
* links unrelated declarations across languages: `New`/`Get`/`String` in Go,
|
|
102
|
+
* `main`/`__init__` in Python and TS all collide otherwise.
|
|
103
|
+
*/
|
|
104
|
+
lang?: SymbolLang | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Module specifier for `import` refs, verbatim as written in the source
|
|
107
|
+
* (`./foo.js`, `github.com/org/repo/pkg`, `os.path`, `crate::parser`,
|
|
108
|
+
* `com.example.Thing`). `undefined` for every other ref kind.
|
|
109
|
+
*
|
|
110
|
+
* This is deliberately separate from {@link toName}: TS/JS import refs put
|
|
111
|
+
* the imported *symbol* name in `toName` so the dead-code BFS can traverse
|
|
112
|
+
* module boundaries, which means `toName` cannot also carry the module path.
|
|
113
|
+
*/
|
|
114
|
+
module?: string | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Target file an `import` ref resolves to, filled by the post-index module
|
|
117
|
+
* resolution pass. Absolute path, or `undefined` for external/unresolvable
|
|
118
|
+
* modules (stdlib, third-party dependencies).
|
|
119
|
+
*/
|
|
120
|
+
toFile?: string | undefined;
|
|
98
121
|
}
|
|
99
122
|
/**
|
|
100
123
|
* A call site — the enriched result of an incoming/outgoing calls query.
|
|
@@ -161,5 +184,5 @@ export interface CodeMapGraph {
|
|
|
161
184
|
nodes: GraphNode[];
|
|
162
185
|
edges: GraphEdge[];
|
|
163
186
|
}
|
|
164
|
-
export declare const SCHEMA_VERSION =
|
|
187
|
+
export declare const SCHEMA_VERSION = 4;
|
|
165
188
|
//# sourceMappingURL=schema.d.ts.map
|