@omfalos/mokosh 0.2.0 → 0.3.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/README.md +4 -1
- package/dist/cli.js +27 -26
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +27 -26
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +11 -7
- package/dist/index.d.ts +11 -7
- package/dist/index.js +20 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -19
- package/dist/index.mjs.map +1 -1
- package/dist/mcp.js +20 -19
- package/dist/mcp.js.map +1 -1
- package/dist/mcp.mjs +20 -19
- package/dist/mcp.mjs.map +1 -1
- package/dist/parse-worker.js +2 -1
- package/dist/parse-worker.js.map +1 -1
- package/dist/parse-worker.mjs +2 -1
- package/dist/parse-worker.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -357,8 +357,9 @@ interface FunctionCallInfo {
|
|
|
357
357
|
* field matches `functionName`. Callees are found by looking at the defining
|
|
358
358
|
* file's `callEdges` for edges whose `from` field matches `functionName`.
|
|
359
359
|
*
|
|
360
|
-
* Call edges are populated only for TypeScript/JavaScript
|
|
361
|
-
*
|
|
360
|
+
* Call edges are populated only for TypeScript/JavaScript, Go, and Python files
|
|
361
|
+
* (see `CALL_EDGE_TYPES` in `../language-support`). Functions in other language
|
|
362
|
+
* files will return empty `callers` and `callees` arrays.
|
|
362
363
|
*
|
|
363
364
|
* @param {Graph} graph - The import graph that carries `callEdges` on each node.
|
|
364
365
|
* @param {string} functionName - Exact name of the function to look up.
|
|
@@ -956,7 +957,8 @@ interface FindComplexFunctionsOptions {
|
|
|
956
957
|
}
|
|
957
958
|
/**
|
|
958
959
|
* @description Scans every file's per-function complexity breakdown and returns functions/methods
|
|
959
|
-
* at or above the given threshold, sorted worst-first. TypeScript/JavaScript
|
|
960
|
+
* at or above the given threshold, sorted worst-first. Populated for TypeScript/JavaScript, Go,
|
|
961
|
+
* and Python.
|
|
960
962
|
* @param graph - The graph to scan.
|
|
961
963
|
* @param options - `metric` picks which score to threshold/sort on (default `cognitiveComplexity`); `threshold` is the minimum score to include (default 10); `limit` caps the results (default 20).
|
|
962
964
|
* @returns Matching functions, sorted worst-first.
|
|
@@ -1012,7 +1014,7 @@ declare function hasCoverageData(graph: Graph): boolean;
|
|
|
1012
1014
|
|
|
1013
1015
|
/** Symbol-name lookup across the whole graph — generalizes queryCallGraph beyond TS/JS functions. */
|
|
1014
1016
|
|
|
1015
|
-
type SymbolPrecision = "call" | "
|
|
1017
|
+
type SymbolPrecision = "call" | "file-level";
|
|
1016
1018
|
interface SymbolCaller {
|
|
1017
1019
|
file: string;
|
|
1018
1020
|
callerFunction: string;
|
|
@@ -1031,9 +1033,11 @@ interface SymbolMatch {
|
|
|
1031
1033
|
/**
|
|
1032
1034
|
* @description Finds every file that exports a symbol by name, with the best available
|
|
1033
1035
|
* usage info per match. Precision depends on what the defining file's language parser
|
|
1034
|
-
* tracks: TS/JS
|
|
1035
|
-
*
|
|
1036
|
-
* symbol-level
|
|
1036
|
+
* tracks: TS/JS, Go, and Python get function-level callers via call edges (`"call"`);
|
|
1037
|
+
* everything else falls back to whole-file dependents (`"file-level"` — import-level, not
|
|
1038
|
+
* symbol-level, since the file might not even use this specific export). Coverage still
|
|
1039
|
+
* differs across the `"call"` languages: TS/JS tracks any directly imported symbol, Go only
|
|
1040
|
+
* package-qualified calls, Python only bare calls to `from <module> import <name>` symbols.
|
|
1037
1041
|
* @param graph - The graph to search.
|
|
1038
1042
|
* @param name - Exact export name to look up.
|
|
1039
1043
|
* @returns One entry per file that exports `name`; empty if no file does (including
|
package/dist/index.d.ts
CHANGED
|
@@ -357,8 +357,9 @@ interface FunctionCallInfo {
|
|
|
357
357
|
* field matches `functionName`. Callees are found by looking at the defining
|
|
358
358
|
* file's `callEdges` for edges whose `from` field matches `functionName`.
|
|
359
359
|
*
|
|
360
|
-
* Call edges are populated only for TypeScript/JavaScript
|
|
361
|
-
*
|
|
360
|
+
* Call edges are populated only for TypeScript/JavaScript, Go, and Python files
|
|
361
|
+
* (see `CALL_EDGE_TYPES` in `../language-support`). Functions in other language
|
|
362
|
+
* files will return empty `callers` and `callees` arrays.
|
|
362
363
|
*
|
|
363
364
|
* @param {Graph} graph - The import graph that carries `callEdges` on each node.
|
|
364
365
|
* @param {string} functionName - Exact name of the function to look up.
|
|
@@ -956,7 +957,8 @@ interface FindComplexFunctionsOptions {
|
|
|
956
957
|
}
|
|
957
958
|
/**
|
|
958
959
|
* @description Scans every file's per-function complexity breakdown and returns functions/methods
|
|
959
|
-
* at or above the given threshold, sorted worst-first. TypeScript/JavaScript
|
|
960
|
+
* at or above the given threshold, sorted worst-first. Populated for TypeScript/JavaScript, Go,
|
|
961
|
+
* and Python.
|
|
960
962
|
* @param graph - The graph to scan.
|
|
961
963
|
* @param options - `metric` picks which score to threshold/sort on (default `cognitiveComplexity`); `threshold` is the minimum score to include (default 10); `limit` caps the results (default 20).
|
|
962
964
|
* @returns Matching functions, sorted worst-first.
|
|
@@ -1012,7 +1014,7 @@ declare function hasCoverageData(graph: Graph): boolean;
|
|
|
1012
1014
|
|
|
1013
1015
|
/** Symbol-name lookup across the whole graph — generalizes queryCallGraph beyond TS/JS functions. */
|
|
1014
1016
|
|
|
1015
|
-
type SymbolPrecision = "call" | "
|
|
1017
|
+
type SymbolPrecision = "call" | "file-level";
|
|
1016
1018
|
interface SymbolCaller {
|
|
1017
1019
|
file: string;
|
|
1018
1020
|
callerFunction: string;
|
|
@@ -1031,9 +1033,11 @@ interface SymbolMatch {
|
|
|
1031
1033
|
/**
|
|
1032
1034
|
* @description Finds every file that exports a symbol by name, with the best available
|
|
1033
1035
|
* usage info per match. Precision depends on what the defining file's language parser
|
|
1034
|
-
* tracks: TS/JS
|
|
1035
|
-
*
|
|
1036
|
-
* symbol-level
|
|
1036
|
+
* tracks: TS/JS, Go, and Python get function-level callers via call edges (`"call"`);
|
|
1037
|
+
* everything else falls back to whole-file dependents (`"file-level"` — import-level, not
|
|
1038
|
+
* symbol-level, since the file might not even use this specific export). Coverage still
|
|
1039
|
+
* differs across the `"call"` languages: TS/JS tracks any directly imported symbol, Go only
|
|
1040
|
+
* package-qualified calls, Python only bare calls to `from <module> import <name>` symbols.
|
|
1037
1041
|
* @param graph - The graph to search.
|
|
1038
1042
|
* @param name - Exact export name to look up.
|
|
1039
1043
|
* @returns One entry per file that exports `name`; empty if no file does (including
|