driftdetect-native 0.9.45 → 0.9.47
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/index.d.ts +21 -0
- package/index.js +3 -1
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -468,6 +468,27 @@ export interface JsDataAccessorInfo {
|
|
|
468
468
|
}
|
|
469
469
|
/** Get all data accessors from SQLite call graph */
|
|
470
470
|
export declare function getCallGraphDataAccessors(rootDir: string): Array<JsDataAccessorInfo>
|
|
471
|
+
/** Caller info returned from call graph queries */
|
|
472
|
+
export interface JsCallerInfo {
|
|
473
|
+
callerId: string
|
|
474
|
+
callerName: string
|
|
475
|
+
callerFile: string
|
|
476
|
+
line: number
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Get all callers of a function from SQLite call graph
|
|
480
|
+
*
|
|
481
|
+
* This queries the calls table to find all functions that call the target.
|
|
482
|
+
* The target can be either a function ID (file:name:line) or just a function name.
|
|
483
|
+
*/
|
|
484
|
+
export declare function getCallGraphCallers(rootDir: string, target: string): Array<JsCallerInfo>
|
|
485
|
+
/**
|
|
486
|
+
* Get all callers for all functions in a file from SQLite call graph
|
|
487
|
+
*
|
|
488
|
+
* This is more efficient than calling get_call_graph_callers for each function
|
|
489
|
+
* when analyzing impact of a file change.
|
|
490
|
+
*/
|
|
491
|
+
export declare function getCallGraphFileCallers(rootDir: string, filePath: string): Array<JsCallerInfo>
|
|
471
492
|
/** Detected pattern exposed to JavaScript */
|
|
472
493
|
export interface JsDetectedPattern {
|
|
473
494
|
category: string
|
package/index.js
CHANGED
|
@@ -310,7 +310,7 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const { scan, parse, supportedLanguages, version, buildCallGraph, buildCallGraphLegacy, scanBoundaries, scanBoundariesSource, analyzeCoupling, analyzeTestTopology, analyzeErrorHandling, analyzeReachability, analyzeInverseReachability, analyzeReachabilitySqlite, analyzeInverseReachabilitySqlite, isCallGraphAvailable, getCallGraphStats, getCallGraphEntryPoints, getCallGraphDataAccessors, analyzeUnified, analyzeConstants, analyzeEnvironment, analyzeWrappers } = nativeBinding
|
|
313
|
+
const { scan, parse, supportedLanguages, version, buildCallGraph, buildCallGraphLegacy, scanBoundaries, scanBoundariesSource, analyzeCoupling, analyzeTestTopology, analyzeErrorHandling, analyzeReachability, analyzeInverseReachability, analyzeReachabilitySqlite, analyzeInverseReachabilitySqlite, isCallGraphAvailable, getCallGraphStats, getCallGraphEntryPoints, getCallGraphDataAccessors, getCallGraphCallers, getCallGraphFileCallers, analyzeUnified, analyzeConstants, analyzeEnvironment, analyzeWrappers } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.scan = scan
|
|
316
316
|
module.exports.parse = parse
|
|
@@ -331,6 +331,8 @@ module.exports.isCallGraphAvailable = isCallGraphAvailable
|
|
|
331
331
|
module.exports.getCallGraphStats = getCallGraphStats
|
|
332
332
|
module.exports.getCallGraphEntryPoints = getCallGraphEntryPoints
|
|
333
333
|
module.exports.getCallGraphDataAccessors = getCallGraphDataAccessors
|
|
334
|
+
module.exports.getCallGraphCallers = getCallGraphCallers
|
|
335
|
+
module.exports.getCallGraphFileCallers = getCallGraphFileCallers
|
|
334
336
|
module.exports.analyzeUnified = analyzeUnified
|
|
335
337
|
module.exports.analyzeConstants = analyzeConstants
|
|
336
338
|
module.exports.analyzeEnvironment = analyzeEnvironment
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "driftdetect-native",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.47",
|
|
4
4
|
"description": "Native Rust core for Drift - high-performance code analysis",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"version": "napi version"
|
|
51
51
|
},
|
|
52
52
|
"optionalDependencies": {
|
|
53
|
-
"driftdetect-native-win32-x64-msvc": "0.9.
|
|
54
|
-
"driftdetect-native-darwin-x64": "0.9.
|
|
55
|
-
"driftdetect-native-linux-x64-gnu": "0.9.
|
|
56
|
-
"driftdetect-native-darwin-arm64": "0.9.
|
|
57
|
-
"driftdetect-native-linux-arm64-gnu": "0.9.
|
|
53
|
+
"driftdetect-native-win32-x64-msvc": "0.9.47",
|
|
54
|
+
"driftdetect-native-darwin-x64": "0.9.47",
|
|
55
|
+
"driftdetect-native-linux-x64-gnu": "0.9.47",
|
|
56
|
+
"driftdetect-native-darwin-arm64": "0.9.47",
|
|
57
|
+
"driftdetect-native-linux-arm64-gnu": "0.9.47"
|
|
58
58
|
}
|
|
59
59
|
}
|