driftdetect-core 0.4.5 → 0.4.6
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/LICENSE +21 -0
- package/dist/boundaries/boundary-scanner.d.ts.map +1 -1
- package/dist/boundaries/boundary-scanner.js +184 -18
- package/dist/boundaries/boundary-scanner.js.map +1 -1
- package/dist/boundaries/types.d.ts +34 -2
- package/dist/boundaries/types.d.ts.map +1 -1
- package/dist/call-graph/analysis/graph-builder.d.ts +3 -0
- package/dist/call-graph/analysis/graph-builder.d.ts.map +1 -1
- package/dist/call-graph/analysis/graph-builder.js +81 -18
- package/dist/call-graph/analysis/graph-builder.js.map +1 -1
- package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/csharp-data-access-extractor.js +10 -5
- package/dist/call-graph/extractors/csharp-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/data-access-extractor.d.ts +16 -2
- package/dist/call-graph/extractors/data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/data-access-extractor.js +114 -5
- package/dist/call-graph/extractors/data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/java-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/java-data-access-extractor.js +12 -6
- package/dist/call-graph/extractors/java-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/php-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/php-data-access-extractor.js +12 -6
- package/dist/call-graph/extractors/php-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/python-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/python-data-access-extractor.js +12 -6
- package/dist/call-graph/extractors/python-data-access-extractor.js.map +1 -1
- package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts +4 -0
- package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts.map +1 -1
- package/dist/call-graph/extractors/semantic-data-access-scanner.js +46 -2
- package/dist/call-graph/extractors/semantic-data-access-scanner.js.map +1 -1
- package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts.map +1 -1
- package/dist/call-graph/extractors/typescript-data-access-extractor.js +23 -10
- package/dist/call-graph/extractors/typescript-data-access-extractor.js.map +1 -1
- package/dist/call-graph/index.d.ts +2 -4
- package/dist/call-graph/index.d.ts.map +1 -1
- package/dist/call-graph/index.js +5 -6
- package/dist/call-graph/index.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/language-intelligence/base-normalizer.d.ts +68 -0
- package/dist/language-intelligence/base-normalizer.d.ts.map +1 -0
- package/dist/language-intelligence/base-normalizer.js +210 -0
- package/dist/language-intelligence/base-normalizer.js.map +1 -0
- package/dist/language-intelligence/framework-registry.d.ts +89 -0
- package/dist/language-intelligence/framework-registry.d.ts.map +1 -0
- package/dist/language-intelligence/framework-registry.js +165 -0
- package/dist/language-intelligence/framework-registry.js.map +1 -0
- package/dist/language-intelligence/frameworks/aspnet.d.ts +11 -0
- package/dist/language-intelligence/frameworks/aspnet.d.ts.map +1 -0
- package/dist/language-intelligence/frameworks/aspnet.js +325 -0
- package/dist/language-intelligence/frameworks/aspnet.js.map +1 -0
- package/dist/language-intelligence/frameworks/fastapi.d.ts +11 -0
- package/dist/language-intelligence/frameworks/fastapi.d.ts.map +1 -0
- package/dist/language-intelligence/frameworks/fastapi.js +188 -0
- package/dist/language-intelligence/frameworks/fastapi.js.map +1 -0
- package/dist/language-intelligence/frameworks/index.d.ts +32 -0
- package/dist/language-intelligence/frameworks/index.d.ts.map +1 -0
- package/dist/language-intelligence/frameworks/index.js +51 -0
- package/dist/language-intelligence/frameworks/index.js.map +1 -0
- package/dist/language-intelligence/frameworks/laravel.d.ts +12 -0
- package/dist/language-intelligence/frameworks/laravel.d.ts.map +1 -0
- package/dist/language-intelligence/frameworks/laravel.js +194 -0
- package/dist/language-intelligence/frameworks/laravel.js.map +1 -0
- package/dist/language-intelligence/frameworks/nestjs.d.ts +11 -0
- package/dist/language-intelligence/frameworks/nestjs.d.ts.map +1 -0
- package/dist/language-intelligence/frameworks/nestjs.js +307 -0
- package/dist/language-intelligence/frameworks/nestjs.js.map +1 -0
- package/dist/language-intelligence/frameworks/spring.d.ts +11 -0
- package/dist/language-intelligence/frameworks/spring.d.ts.map +1 -0
- package/dist/language-intelligence/frameworks/spring.js +369 -0
- package/dist/language-intelligence/frameworks/spring.js.map +1 -0
- package/dist/language-intelligence/index.d.ts +33 -0
- package/dist/language-intelligence/index.d.ts.map +1 -0
- package/dist/language-intelligence/index.js +37 -0
- package/dist/language-intelligence/index.js.map +1 -0
- package/dist/language-intelligence/language-intelligence.d.ts +99 -0
- package/dist/language-intelligence/language-intelligence.d.ts.map +1 -0
- package/dist/language-intelligence/language-intelligence.js +239 -0
- package/dist/language-intelligence/language-intelligence.js.map +1 -0
- package/dist/language-intelligence/normalizers/csharp-normalizer.d.ts +39 -0
- package/dist/language-intelligence/normalizers/csharp-normalizer.d.ts.map +1 -0
- package/dist/language-intelligence/normalizers/csharp-normalizer.js +86 -0
- package/dist/language-intelligence/normalizers/csharp-normalizer.js.map +1 -0
- package/dist/language-intelligence/normalizers/index.d.ts +25 -0
- package/dist/language-intelligence/normalizers/index.d.ts.map +1 -0
- package/dist/language-intelligence/normalizers/index.js +60 -0
- package/dist/language-intelligence/normalizers/index.js.map +1 -0
- package/dist/language-intelligence/normalizers/java-normalizer.d.ts +39 -0
- package/dist/language-intelligence/normalizers/java-normalizer.d.ts.map +1 -0
- package/dist/language-intelligence/normalizers/java-normalizer.js +96 -0
- package/dist/language-intelligence/normalizers/java-normalizer.js.map +1 -0
- package/dist/language-intelligence/normalizers/php-normalizer.d.ts +39 -0
- package/dist/language-intelligence/normalizers/php-normalizer.d.ts.map +1 -0
- package/dist/language-intelligence/normalizers/php-normalizer.js +86 -0
- package/dist/language-intelligence/normalizers/php-normalizer.js.map +1 -0
- package/dist/language-intelligence/normalizers/python-normalizer.d.ts +39 -0
- package/dist/language-intelligence/normalizers/python-normalizer.d.ts.map +1 -0
- package/dist/language-intelligence/normalizers/python-normalizer.js +95 -0
- package/dist/language-intelligence/normalizers/python-normalizer.js.map +1 -0
- package/dist/language-intelligence/normalizers/typescript-normalizer.d.ts +39 -0
- package/dist/language-intelligence/normalizers/typescript-normalizer.d.ts.map +1 -0
- package/dist/language-intelligence/normalizers/typescript-normalizer.js +84 -0
- package/dist/language-intelligence/normalizers/typescript-normalizer.js.map +1 -0
- package/dist/language-intelligence/types.d.ts +270 -0
- package/dist/language-intelligence/types.d.ts.map +1 -0
- package/dist/language-intelligence/types.js +9 -0
- package/dist/language-intelligence/types.js.map +1 -0
- package/dist/scanner/file-processor-worker.d.ts +66 -0
- package/dist/scanner/file-processor-worker.d.ts.map +1 -0
- package/dist/scanner/file-processor-worker.js +189 -0
- package/dist/scanner/file-processor-worker.js.map +1 -0
- package/dist/scanner/index.d.ts +2 -0
- package/dist/scanner/index.d.ts.map +1 -1
- package/dist/scanner/index.js +2 -0
- package/dist/scanner/index.js.map +1 -1
- package/dist/scanner/threaded-worker-pool.d.ts +182 -0
- package/dist/scanner/threaded-worker-pool.d.ts.map +1 -0
- package/dist/scanner/threaded-worker-pool.js +243 -0
- package/dist/scanner/threaded-worker-pool.js.map +1 -0
- package/dist/store/types.d.ts +6 -3
- package/dist/store/types.d.ts.map +1 -1
- package/dist/store/types.js.map +1 -1
- package/dist/unified-provider/compat/index.d.ts +11 -0
- package/dist/unified-provider/compat/index.d.ts.map +1 -0
- package/dist/unified-provider/compat/index.js +13 -0
- package/dist/unified-provider/compat/index.js.map +1 -0
- package/dist/unified-provider/compat/legacy-extractors.d.ts +63 -0
- package/dist/unified-provider/compat/legacy-extractors.d.ts.map +1 -0
- package/dist/unified-provider/compat/legacy-extractors.js +80 -0
- package/dist/unified-provider/compat/legacy-extractors.js.map +1 -0
- package/dist/unified-provider/compat/legacy-scanner.d.ts +28 -0
- package/dist/unified-provider/compat/legacy-scanner.d.ts.map +1 -0
- package/dist/unified-provider/compat/legacy-scanner.js +31 -0
- package/dist/unified-provider/compat/legacy-scanner.js.map +1 -0
- package/dist/unified-provider/index.d.ts +28 -0
- package/dist/unified-provider/index.d.ts.map +1 -0
- package/dist/unified-provider/index.js +47 -0
- package/dist/unified-provider/index.js.map +1 -0
- package/dist/unified-provider/integration/index.d.ts +9 -0
- package/dist/unified-provider/integration/index.d.ts.map +1 -0
- package/dist/unified-provider/integration/index.js +11 -0
- package/dist/unified-provider/integration/index.js.map +1 -0
- package/dist/unified-provider/integration/unified-data-access-adapter.d.ts +75 -0
- package/dist/unified-provider/integration/unified-data-access-adapter.d.ts.map +1 -0
- package/dist/unified-provider/integration/unified-data-access-adapter.js +210 -0
- package/dist/unified-provider/integration/unified-data-access-adapter.js.map +1 -0
- package/dist/unified-provider/integration/unified-scanner.d.ts +90 -0
- package/dist/unified-provider/integration/unified-scanner.d.ts.map +1 -0
- package/dist/unified-provider/integration/unified-scanner.js +369 -0
- package/dist/unified-provider/integration/unified-scanner.js.map +1 -0
- package/dist/unified-provider/matching/base-matcher.d.ts +80 -0
- package/dist/unified-provider/matching/base-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/base-matcher.js +196 -0
- package/dist/unified-provider/matching/base-matcher.js.map +1 -0
- package/dist/unified-provider/matching/django-matcher.d.ts +32 -0
- package/dist/unified-provider/matching/django-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/django-matcher.js +107 -0
- package/dist/unified-provider/matching/django-matcher.js.map +1 -0
- package/dist/unified-provider/matching/drizzle-matcher.d.ts +25 -0
- package/dist/unified-provider/matching/drizzle-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/drizzle-matcher.js +123 -0
- package/dist/unified-provider/matching/drizzle-matcher.js.map +1 -0
- package/dist/unified-provider/matching/efcore-matcher.d.ts +27 -0
- package/dist/unified-provider/matching/efcore-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/efcore-matcher.js +88 -0
- package/dist/unified-provider/matching/efcore-matcher.js.map +1 -0
- package/dist/unified-provider/matching/eloquent-matcher.d.ts +32 -0
- package/dist/unified-provider/matching/eloquent-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/eloquent-matcher.js +162 -0
- package/dist/unified-provider/matching/eloquent-matcher.js.map +1 -0
- package/dist/unified-provider/matching/index.d.ts +19 -0
- package/dist/unified-provider/matching/index.d.ts.map +1 -0
- package/dist/unified-provider/matching/index.js +24 -0
- package/dist/unified-provider/matching/index.js.map +1 -0
- package/dist/unified-provider/matching/knex-matcher.d.ts +26 -0
- package/dist/unified-provider/matching/knex-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/knex-matcher.js +109 -0
- package/dist/unified-provider/matching/knex-matcher.js.map +1 -0
- package/dist/unified-provider/matching/matcher-registry.d.ts +55 -0
- package/dist/unified-provider/matching/matcher-registry.d.ts.map +1 -0
- package/dist/unified-provider/matching/matcher-registry.js +130 -0
- package/dist/unified-provider/matching/matcher-registry.js.map +1 -0
- package/dist/unified-provider/matching/mongoose-matcher.d.ts +30 -0
- package/dist/unified-provider/matching/mongoose-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/mongoose-matcher.js +132 -0
- package/dist/unified-provider/matching/mongoose-matcher.js.map +1 -0
- package/dist/unified-provider/matching/prisma-matcher.d.ts +31 -0
- package/dist/unified-provider/matching/prisma-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/prisma-matcher.js +123 -0
- package/dist/unified-provider/matching/prisma-matcher.js.map +1 -0
- package/dist/unified-provider/matching/raw-sql-matcher.d.ts +31 -0
- package/dist/unified-provider/matching/raw-sql-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/raw-sql-matcher.js +173 -0
- package/dist/unified-provider/matching/raw-sql-matcher.js.map +1 -0
- package/dist/unified-provider/matching/sequelize-matcher.d.ts +28 -0
- package/dist/unified-provider/matching/sequelize-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/sequelize-matcher.js +132 -0
- package/dist/unified-provider/matching/sequelize-matcher.js.map +1 -0
- package/dist/unified-provider/matching/spring-data-matcher.d.ts +32 -0
- package/dist/unified-provider/matching/spring-data-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/spring-data-matcher.js +112 -0
- package/dist/unified-provider/matching/spring-data-matcher.js.map +1 -0
- package/dist/unified-provider/matching/sqlalchemy-matcher.d.ts +32 -0
- package/dist/unified-provider/matching/sqlalchemy-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/sqlalchemy-matcher.js +201 -0
- package/dist/unified-provider/matching/sqlalchemy-matcher.js.map +1 -0
- package/dist/unified-provider/matching/supabase-matcher.d.ts +27 -0
- package/dist/unified-provider/matching/supabase-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/supabase-matcher.js +122 -0
- package/dist/unified-provider/matching/supabase-matcher.js.map +1 -0
- package/dist/unified-provider/matching/typeorm-matcher.d.ts +32 -0
- package/dist/unified-provider/matching/typeorm-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/typeorm-matcher.js +169 -0
- package/dist/unified-provider/matching/typeorm-matcher.js.map +1 -0
- package/dist/unified-provider/migration/deprecated-extractors.d.ts +104 -0
- package/dist/unified-provider/migration/deprecated-extractors.d.ts.map +1 -0
- package/dist/unified-provider/migration/deprecated-extractors.js +129 -0
- package/dist/unified-provider/migration/deprecated-extractors.js.map +1 -0
- package/dist/unified-provider/migration/deprecated-scanner.d.ts +40 -0
- package/dist/unified-provider/migration/deprecated-scanner.d.ts.map +1 -0
- package/dist/unified-provider/migration/deprecated-scanner.js +49 -0
- package/dist/unified-provider/migration/deprecated-scanner.js.map +1 -0
- package/dist/unified-provider/migration/index.d.ts +41 -0
- package/dist/unified-provider/migration/index.d.ts.map +1 -0
- package/dist/unified-provider/migration/index.js +43 -0
- package/dist/unified-provider/migration/index.js.map +1 -0
- package/dist/unified-provider/normalization/base-normalizer.d.ts +188 -0
- package/dist/unified-provider/normalization/base-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/base-normalizer.js +339 -0
- package/dist/unified-provider/normalization/base-normalizer.js.map +1 -0
- package/dist/unified-provider/normalization/csharp-normalizer.d.ts +58 -0
- package/dist/unified-provider/normalization/csharp-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/csharp-normalizer.js +467 -0
- package/dist/unified-provider/normalization/csharp-normalizer.js.map +1 -0
- package/dist/unified-provider/normalization/index.d.ts +23 -0
- package/dist/unified-provider/normalization/index.d.ts.map +1 -0
- package/dist/unified-provider/normalization/index.js +62 -0
- package/dist/unified-provider/normalization/index.js.map +1 -0
- package/dist/unified-provider/normalization/java-normalizer.d.ts +54 -0
- package/dist/unified-provider/normalization/java-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/java-normalizer.js +453 -0
- package/dist/unified-provider/normalization/java-normalizer.js.map +1 -0
- package/dist/unified-provider/normalization/php-normalizer.d.ts +54 -0
- package/dist/unified-provider/normalization/php-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/php-normalizer.js +489 -0
- package/dist/unified-provider/normalization/php-normalizer.js.map +1 -0
- package/dist/unified-provider/normalization/python-normalizer.d.ts +61 -0
- package/dist/unified-provider/normalization/python-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/python-normalizer.js +548 -0
- package/dist/unified-provider/normalization/python-normalizer.js.map +1 -0
- package/dist/unified-provider/normalization/typescript-normalizer.d.ts +60 -0
- package/dist/unified-provider/normalization/typescript-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/typescript-normalizer.js +608 -0
- package/dist/unified-provider/normalization/typescript-normalizer.js.map +1 -0
- package/dist/unified-provider/parsing/index.d.ts +5 -0
- package/dist/unified-provider/parsing/index.d.ts.map +1 -0
- package/dist/unified-provider/parsing/index.js +5 -0
- package/dist/unified-provider/parsing/index.js.map +1 -0
- package/dist/unified-provider/parsing/parser-registry.d.ts +70 -0
- package/dist/unified-provider/parsing/parser-registry.d.ts.map +1 -0
- package/dist/unified-provider/parsing/parser-registry.js +260 -0
- package/dist/unified-provider/parsing/parser-registry.js.map +1 -0
- package/dist/unified-provider/provider/index.d.ts +5 -0
- package/dist/unified-provider/provider/index.d.ts.map +1 -0
- package/dist/unified-provider/provider/index.js +5 -0
- package/dist/unified-provider/provider/index.js.map +1 -0
- package/dist/unified-provider/provider/unified-language-provider.d.ts +56 -0
- package/dist/unified-provider/provider/unified-language-provider.d.ts.map +1 -0
- package/dist/unified-provider/provider/unified-language-provider.js +212 -0
- package/dist/unified-provider/provider/unified-language-provider.js.map +1 -0
- package/dist/unified-provider/types.d.ts +389 -0
- package/dist/unified-provider/types.d.ts.map +1 -0
- package/dist/unified-provider/types.js +9 -0
- package/dist/unified-provider/types.js.map +1 -0
- package/package.json +19 -18
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified Language Provider - Core Types
|
|
3
|
+
*
|
|
4
|
+
* Universal type definitions for language-agnostic code extraction.
|
|
5
|
+
* These types enable pattern matching across all supported languages
|
|
6
|
+
* through a normalized representation.
|
|
7
|
+
*/
|
|
8
|
+
import type { DataOperation } from '../boundaries/types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Supported languages for unified extraction
|
|
11
|
+
*/
|
|
12
|
+
export type UnifiedLanguage = 'typescript' | 'javascript' | 'python' | 'java' | 'csharp' | 'php';
|
|
13
|
+
/**
|
|
14
|
+
* Language configuration for parser and normalizer selection
|
|
15
|
+
*/
|
|
16
|
+
export interface LanguageConfig {
|
|
17
|
+
/** Language identifier */
|
|
18
|
+
language: UnifiedLanguage;
|
|
19
|
+
/** File extensions this language handles */
|
|
20
|
+
extensions: string[];
|
|
21
|
+
/** Tree-sitter grammar name */
|
|
22
|
+
treeSitterGrammar: string;
|
|
23
|
+
/** Node types that represent function definitions */
|
|
24
|
+
functionNodeTypes: string[];
|
|
25
|
+
/** Node types that represent class definitions */
|
|
26
|
+
classNodeTypes: string[];
|
|
27
|
+
/** Node types that represent call expressions */
|
|
28
|
+
callNodeTypes: string[];
|
|
29
|
+
/** Node types that represent import statements */
|
|
30
|
+
importNodeTypes: string[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A normalized argument in a call chain
|
|
34
|
+
*
|
|
35
|
+
* Represents any argument passed to a function call in a language-agnostic way.
|
|
36
|
+
* This enables pattern matchers to work with arguments without knowing
|
|
37
|
+
* the source language's AST structure.
|
|
38
|
+
*/
|
|
39
|
+
export interface NormalizedArg {
|
|
40
|
+
/** Argument type */
|
|
41
|
+
type: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'identifier' | 'call' | 'unknown';
|
|
42
|
+
/** Raw text value */
|
|
43
|
+
value: string;
|
|
44
|
+
/** Parsed string value (for string literals) */
|
|
45
|
+
stringValue?: string;
|
|
46
|
+
/** Parsed number value (for numeric literals) */
|
|
47
|
+
numberValue?: number;
|
|
48
|
+
/** Parsed boolean value (for boolean literals) */
|
|
49
|
+
booleanValue?: boolean;
|
|
50
|
+
/** Object properties (for object literals) */
|
|
51
|
+
properties?: Record<string, NormalizedArg>;
|
|
52
|
+
/** Array elements (for array literals) */
|
|
53
|
+
elements?: NormalizedArg[];
|
|
54
|
+
/** Nested call chain (for call expressions as arguments) */
|
|
55
|
+
callChain?: UnifiedCallChain;
|
|
56
|
+
/** Position in source */
|
|
57
|
+
line: number;
|
|
58
|
+
column: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A segment in a call chain
|
|
62
|
+
*
|
|
63
|
+
* Represents a single step in a method chain like:
|
|
64
|
+
* supabase.from('users').select('*').eq('id', 1)
|
|
65
|
+
* ^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^
|
|
66
|
+
* segment 1 segment 2 segment 3
|
|
67
|
+
*/
|
|
68
|
+
export interface CallChainSegment {
|
|
69
|
+
/** Method/property name */
|
|
70
|
+
name: string;
|
|
71
|
+
/** Whether this is a method call (has arguments) vs property access */
|
|
72
|
+
isCall: boolean;
|
|
73
|
+
/** Normalized arguments (empty for property access) */
|
|
74
|
+
args: NormalizedArg[];
|
|
75
|
+
/** Position in source */
|
|
76
|
+
line: number;
|
|
77
|
+
column: number;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A unified call chain representation
|
|
81
|
+
*
|
|
82
|
+
* This is the key abstraction that enables language-agnostic pattern matching.
|
|
83
|
+
* Any method chain in any language can be normalized to this format:
|
|
84
|
+
*
|
|
85
|
+
* TypeScript: supabase.from('users').select('*')
|
|
86
|
+
* Python: supabase.from_('users').select('*')
|
|
87
|
+
* Java: supabase.from("users").select("*")
|
|
88
|
+
*
|
|
89
|
+
* All normalize to the same UnifiedCallChain structure.
|
|
90
|
+
*/
|
|
91
|
+
export interface UnifiedCallChain {
|
|
92
|
+
/** The root receiver (e.g., 'supabase', 'prisma', 'db') */
|
|
93
|
+
receiver: string;
|
|
94
|
+
/** Chain of method calls/property accesses */
|
|
95
|
+
segments: CallChainSegment[];
|
|
96
|
+
/** Full expression text for context */
|
|
97
|
+
fullExpression: string;
|
|
98
|
+
/** Source file */
|
|
99
|
+
file: string;
|
|
100
|
+
/** Start position */
|
|
101
|
+
line: number;
|
|
102
|
+
column: number;
|
|
103
|
+
/** End position */
|
|
104
|
+
endLine: number;
|
|
105
|
+
endColumn: number;
|
|
106
|
+
/** Language this was extracted from */
|
|
107
|
+
language: UnifiedLanguage;
|
|
108
|
+
/** Raw AST node reference for fallback (optional) */
|
|
109
|
+
rawNode?: unknown;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Result of pattern matching against a call chain
|
|
113
|
+
*/
|
|
114
|
+
export interface PatternMatchResult {
|
|
115
|
+
/** Whether the pattern matched */
|
|
116
|
+
matched: boolean;
|
|
117
|
+
/** ORM/database client that matched */
|
|
118
|
+
orm: string;
|
|
119
|
+
/** Detected table name */
|
|
120
|
+
table: string;
|
|
121
|
+
/** Detected field names */
|
|
122
|
+
fields: string[];
|
|
123
|
+
/** Detected operation type */
|
|
124
|
+
operation: DataOperation;
|
|
125
|
+
/** Confidence score (0-1) */
|
|
126
|
+
confidence: number;
|
|
127
|
+
/** Whether this is raw SQL */
|
|
128
|
+
isRawSql: boolean;
|
|
129
|
+
/** Additional metadata */
|
|
130
|
+
metadata?: Record<string, unknown> | undefined;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Pattern matcher interface
|
|
134
|
+
*
|
|
135
|
+
* Each ORM/database client has a matcher that implements this interface.
|
|
136
|
+
* Matchers receive normalized call chains and return match results.
|
|
137
|
+
*/
|
|
138
|
+
export interface PatternMatcher {
|
|
139
|
+
/** Unique identifier for this matcher */
|
|
140
|
+
readonly id: string;
|
|
141
|
+
/** Human-readable name */
|
|
142
|
+
readonly name: string;
|
|
143
|
+
/** Languages this matcher supports */
|
|
144
|
+
readonly languages: UnifiedLanguage[];
|
|
145
|
+
/** Priority (higher = checked first) */
|
|
146
|
+
readonly priority: number;
|
|
147
|
+
/**
|
|
148
|
+
* Attempt to match a call chain against this pattern
|
|
149
|
+
* @returns Match result if pattern matches, null otherwise
|
|
150
|
+
*/
|
|
151
|
+
match(chain: UnifiedCallChain): PatternMatchResult | null;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Unified function extraction
|
|
155
|
+
*/
|
|
156
|
+
export interface UnifiedFunction {
|
|
157
|
+
/** Function/method name */
|
|
158
|
+
name: string;
|
|
159
|
+
/** Qualified name (Class.method or module.function) */
|
|
160
|
+
qualifiedName: string;
|
|
161
|
+
/** Source file */
|
|
162
|
+
file: string;
|
|
163
|
+
/** Start line */
|
|
164
|
+
startLine: number;
|
|
165
|
+
/** End line */
|
|
166
|
+
endLine: number;
|
|
167
|
+
/** Start column */
|
|
168
|
+
startColumn: number;
|
|
169
|
+
/** End column */
|
|
170
|
+
endColumn: number;
|
|
171
|
+
/** Parameters */
|
|
172
|
+
parameters: UnifiedParameter[];
|
|
173
|
+
/** Return type (if available) */
|
|
174
|
+
returnType?: string | undefined;
|
|
175
|
+
/** Whether this is a method */
|
|
176
|
+
isMethod: boolean;
|
|
177
|
+
/** Whether this is static */
|
|
178
|
+
isStatic: boolean;
|
|
179
|
+
/** Whether this is exported/public */
|
|
180
|
+
isExported: boolean;
|
|
181
|
+
/** Whether this is a constructor */
|
|
182
|
+
isConstructor: boolean;
|
|
183
|
+
/** Whether this is async */
|
|
184
|
+
isAsync: boolean;
|
|
185
|
+
/** Class name (if method) */
|
|
186
|
+
className?: string | undefined;
|
|
187
|
+
/** Decorators/annotations */
|
|
188
|
+
decorators: string[];
|
|
189
|
+
/** Body start line */
|
|
190
|
+
bodyStartLine: number;
|
|
191
|
+
/** Body end line */
|
|
192
|
+
bodyEndLine: number;
|
|
193
|
+
/** Language */
|
|
194
|
+
language: UnifiedLanguage;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Unified parameter
|
|
198
|
+
*/
|
|
199
|
+
export interface UnifiedParameter {
|
|
200
|
+
name: string;
|
|
201
|
+
type?: string | undefined;
|
|
202
|
+
hasDefault: boolean;
|
|
203
|
+
isRest: boolean;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Unified class extraction
|
|
207
|
+
*/
|
|
208
|
+
export interface UnifiedClass {
|
|
209
|
+
/** Class name */
|
|
210
|
+
name: string;
|
|
211
|
+
/** Source file */
|
|
212
|
+
file: string;
|
|
213
|
+
/** Start line */
|
|
214
|
+
startLine: number;
|
|
215
|
+
/** End line */
|
|
216
|
+
endLine: number;
|
|
217
|
+
/** Base classes/interfaces */
|
|
218
|
+
baseClasses: string[];
|
|
219
|
+
/** Method names */
|
|
220
|
+
methods: string[];
|
|
221
|
+
/** Whether exported/public */
|
|
222
|
+
isExported: boolean;
|
|
223
|
+
/** Language */
|
|
224
|
+
language: UnifiedLanguage;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Unified import extraction
|
|
228
|
+
*/
|
|
229
|
+
export interface UnifiedImport {
|
|
230
|
+
/** Source module/file */
|
|
231
|
+
source: string;
|
|
232
|
+
/** Imported names */
|
|
233
|
+
names: UnifiedImportedName[];
|
|
234
|
+
/** Line number */
|
|
235
|
+
line: number;
|
|
236
|
+
/** Whether type-only import */
|
|
237
|
+
isTypeOnly: boolean;
|
|
238
|
+
/** Language */
|
|
239
|
+
language: UnifiedLanguage;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Unified imported name
|
|
243
|
+
*/
|
|
244
|
+
export interface UnifiedImportedName {
|
|
245
|
+
/** Name as exported */
|
|
246
|
+
imported: string;
|
|
247
|
+
/** Local alias */
|
|
248
|
+
local: string;
|
|
249
|
+
/** Is default import */
|
|
250
|
+
isDefault: boolean;
|
|
251
|
+
/** Is namespace import */
|
|
252
|
+
isNamespace: boolean;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Unified export extraction
|
|
256
|
+
*/
|
|
257
|
+
export interface UnifiedExport {
|
|
258
|
+
name: string;
|
|
259
|
+
isDefault: boolean;
|
|
260
|
+
isReExport: boolean;
|
|
261
|
+
source?: string | undefined;
|
|
262
|
+
line: number;
|
|
263
|
+
language: UnifiedLanguage;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Unified data access point
|
|
267
|
+
*/
|
|
268
|
+
export interface UnifiedDataAccess {
|
|
269
|
+
/** Unique ID */
|
|
270
|
+
id: string;
|
|
271
|
+
/** Table/collection name */
|
|
272
|
+
table: string;
|
|
273
|
+
/** Field names accessed */
|
|
274
|
+
fields: string[];
|
|
275
|
+
/** Operation type */
|
|
276
|
+
operation: DataOperation;
|
|
277
|
+
/** Source file */
|
|
278
|
+
file: string;
|
|
279
|
+
/** Line number */
|
|
280
|
+
line: number;
|
|
281
|
+
/** Column number */
|
|
282
|
+
column: number;
|
|
283
|
+
/** Context snippet */
|
|
284
|
+
context: string;
|
|
285
|
+
/** Whether raw SQL */
|
|
286
|
+
isRawSql: boolean;
|
|
287
|
+
/** Confidence score */
|
|
288
|
+
confidence: number;
|
|
289
|
+
/** ORM/client that was detected */
|
|
290
|
+
orm: string;
|
|
291
|
+
/** Language */
|
|
292
|
+
language: UnifiedLanguage;
|
|
293
|
+
/** The call chain that produced this access */
|
|
294
|
+
callChain?: UnifiedCallChain;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Complete extraction result from a single file
|
|
298
|
+
*/
|
|
299
|
+
export interface UnifiedExtractionResult {
|
|
300
|
+
/** Source file path */
|
|
301
|
+
file: string;
|
|
302
|
+
/** Detected language */
|
|
303
|
+
language: UnifiedLanguage;
|
|
304
|
+
/** Extracted functions */
|
|
305
|
+
functions: UnifiedFunction[];
|
|
306
|
+
/** Extracted call chains */
|
|
307
|
+
callChains: UnifiedCallChain[];
|
|
308
|
+
/** Extracted data access points */
|
|
309
|
+
dataAccess: UnifiedDataAccess[];
|
|
310
|
+
/** Extracted classes */
|
|
311
|
+
classes: UnifiedClass[];
|
|
312
|
+
/** Extracted imports */
|
|
313
|
+
imports: UnifiedImport[];
|
|
314
|
+
/** Extracted exports */
|
|
315
|
+
exports: UnifiedExport[];
|
|
316
|
+
/** Extraction errors */
|
|
317
|
+
errors: string[];
|
|
318
|
+
/** Extraction statistics */
|
|
319
|
+
stats: ExtractionStats;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Extraction statistics
|
|
323
|
+
*/
|
|
324
|
+
export interface ExtractionStats {
|
|
325
|
+
/** Parse time in ms */
|
|
326
|
+
parseTimeMs: number;
|
|
327
|
+
/** Normalization time in ms */
|
|
328
|
+
normalizeTimeMs: number;
|
|
329
|
+
/** Pattern matching time in ms */
|
|
330
|
+
matchTimeMs: number;
|
|
331
|
+
/** Total time in ms */
|
|
332
|
+
totalTimeMs: number;
|
|
333
|
+
/** Number of AST nodes visited */
|
|
334
|
+
nodesVisited: number;
|
|
335
|
+
/** Number of call chains extracted */
|
|
336
|
+
callChainsExtracted: number;
|
|
337
|
+
/** Number of patterns matched */
|
|
338
|
+
patternsMatched: number;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Options for the unified language provider
|
|
342
|
+
*/
|
|
343
|
+
export interface UnifiedProviderOptions {
|
|
344
|
+
/** Project root directory */
|
|
345
|
+
projectRoot?: string | undefined;
|
|
346
|
+
/** Languages to enable (default: all) */
|
|
347
|
+
languages?: UnifiedLanguage[] | undefined;
|
|
348
|
+
/** Pattern matchers to enable (default: all) */
|
|
349
|
+
matchers?: string[] | undefined;
|
|
350
|
+
/** Whether to include raw AST nodes in results */
|
|
351
|
+
includeRawNodes?: boolean | undefined;
|
|
352
|
+
/** Maximum call chain depth to extract */
|
|
353
|
+
maxChainDepth?: number | undefined;
|
|
354
|
+
/** Whether to extract data access points */
|
|
355
|
+
extractDataAccess?: boolean | undefined;
|
|
356
|
+
/** Whether to extract call graph info */
|
|
357
|
+
extractCallGraph?: boolean | undefined;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Call chain normalizer interface
|
|
361
|
+
*
|
|
362
|
+
* Each language implements this interface to convert its AST
|
|
363
|
+
* into unified call chains.
|
|
364
|
+
*/
|
|
365
|
+
export interface CallChainNormalizer {
|
|
366
|
+
/** Language this normalizer handles */
|
|
367
|
+
readonly language: UnifiedLanguage;
|
|
368
|
+
/**
|
|
369
|
+
* Extract and normalize call chains from an AST node
|
|
370
|
+
*/
|
|
371
|
+
normalizeCallChains(rootNode: unknown, source: string, filePath: string): UnifiedCallChain[];
|
|
372
|
+
/**
|
|
373
|
+
* Extract functions from an AST node
|
|
374
|
+
*/
|
|
375
|
+
extractFunctions(rootNode: unknown, source: string, filePath: string): UnifiedFunction[];
|
|
376
|
+
/**
|
|
377
|
+
* Extract classes from an AST node
|
|
378
|
+
*/
|
|
379
|
+
extractClasses(rootNode: unknown, source: string, filePath: string): UnifiedClass[];
|
|
380
|
+
/**
|
|
381
|
+
* Extract imports from an AST node
|
|
382
|
+
*/
|
|
383
|
+
extractImports(rootNode: unknown, source: string, filePath: string): UnifiedImport[];
|
|
384
|
+
/**
|
|
385
|
+
* Extract exports from an AST node
|
|
386
|
+
*/
|
|
387
|
+
extractExports(rootNode: unknown, source: string, filePath: string): UnifiedExport[];
|
|
388
|
+
}
|
|
389
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/unified-provider/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAM5D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEjG;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,0BAA0B;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,4CAA4C;IAC5C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,+BAA+B;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,kDAAkD;IAClD,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,iDAAiD;IACjD,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,kDAAkD;IAClD,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAMD;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IACpB,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/F,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8CAA8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;CACxC;AAMD;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IAEnC;;OAEG;IACH,mBAAmB,CACjB,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,gBAAgB,EAAE,CAAC;IAEtB;;OAEG;IACH,gBAAgB,CACd,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,eAAe,EAAE,CAAC;IAErB;;OAEG;IACH,cAAc,CACZ,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,YAAY,EAAE,CAAC;IAElB;;OAEG;IACH,cAAc,CACZ,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,aAAa,EAAE,CAAC;IAEnB;;OAEG;IACH,cAAc,CACZ,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,aAAa,EAAE,CAAC;CACpB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified Language Provider - Core Types
|
|
3
|
+
*
|
|
4
|
+
* Universal type definitions for language-agnostic code extraction.
|
|
5
|
+
* These types enable pattern matching across all supported languages
|
|
6
|
+
* through a normalized representation.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/unified-provider/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "driftdetect-core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "Core pattern detection and analysis engine for Drift",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,38 +26,39 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"scripts": {
|
|
30
|
-
"build": "tsc",
|
|
31
|
-
"clean": "rm -rf dist",
|
|
32
|
-
"dev": "tsc --watch",
|
|
33
|
-
"lint": "eslint src --ext .ts",
|
|
34
|
-
"lint:fix": "eslint src --ext .ts --fix",
|
|
35
|
-
"test": "vitest run",
|
|
36
|
-
"test:watch": "vitest",
|
|
37
|
-
"test:coverage": "vitest run --coverage",
|
|
38
|
-
"typecheck": "tsc --noEmit"
|
|
39
|
-
},
|
|
40
29
|
"engines": {
|
|
41
30
|
"node": ">=18 <25"
|
|
42
31
|
},
|
|
43
32
|
"dependencies": {
|
|
44
33
|
"ignore": "^5.3.1",
|
|
45
34
|
"minimatch": "^9.0.3",
|
|
46
|
-
"
|
|
35
|
+
"piscina": "^5.1.4",
|
|
47
36
|
"tree-sitter": "^0.21.1",
|
|
48
|
-
"tree-sitter-
|
|
37
|
+
"tree-sitter-c-sharp": "^0.21.3",
|
|
49
38
|
"tree-sitter-java": "^0.21.0",
|
|
39
|
+
"tree-sitter-javascript": "^0.21.4",
|
|
50
40
|
"tree-sitter-php": "^0.22.0",
|
|
51
|
-
"tree-sitter-
|
|
41
|
+
"tree-sitter-python": "^0.21.0",
|
|
52
42
|
"tree-sitter-typescript": "^0.21.2",
|
|
53
|
-
"
|
|
43
|
+
"typescript": "^5.3.0"
|
|
54
44
|
},
|
|
55
45
|
"devDependencies": {
|
|
56
46
|
"@types/minimatch": "^5.1.2",
|
|
57
|
-
"@types/node": "^20.
|
|
47
|
+
"@types/node": "^20.19.30",
|
|
58
48
|
"@vitest/coverage-v8": "^1.0.0",
|
|
59
49
|
"fast-check": "^3.15.0",
|
|
60
50
|
"typescript": "^5.3.0",
|
|
61
51
|
"vitest": "^1.0.0"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsc",
|
|
55
|
+
"clean": "rm -rf dist",
|
|
56
|
+
"dev": "tsc --watch",
|
|
57
|
+
"lint": "eslint src --ext .ts",
|
|
58
|
+
"lint:fix": "eslint src --ext .ts --fix",
|
|
59
|
+
"test": "vitest run",
|
|
60
|
+
"test:watch": "vitest",
|
|
61
|
+
"test:coverage": "vitest run --coverage",
|
|
62
|
+
"typecheck": "tsc --noEmit"
|
|
62
63
|
}
|
|
63
|
-
}
|
|
64
|
+
}
|