driftdetect-core 0.1.2 → 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/dist/boundaries/boundary-store.d.ts +92 -0
- package/dist/boundaries/boundary-store.d.ts.map +1 -0
- package/dist/boundaries/boundary-store.js +458 -0
- package/dist/boundaries/boundary-store.js.map +1 -0
- package/dist/boundaries/index.d.ts +8 -0
- package/dist/boundaries/index.d.ts.map +1 -0
- package/dist/boundaries/index.js +8 -0
- package/dist/boundaries/index.js.map +1 -0
- package/dist/boundaries/types.d.ts +237 -0
- package/dist/boundaries/types.d.ts.map +1 -0
- package/dist/boundaries/types.js +8 -0
- package/dist/boundaries/types.js.map +1 -0
- package/dist/dna/ai-context.d.ts +10 -0
- package/dist/dna/ai-context.d.ts.map +1 -0
- package/dist/dna/ai-context.js +46 -0
- package/dist/dna/ai-context.js.map +1 -0
- package/dist/dna/dna-analyzer.d.ts +34 -0
- package/dist/dna/dna-analyzer.d.ts.map +1 -0
- package/dist/dna/dna-analyzer.js +110 -0
- package/dist/dna/dna-analyzer.js.map +1 -0
- package/dist/dna/dna-store.d.ts +13 -0
- package/dist/dna/dna-store.d.ts.map +1 -0
- package/dist/dna/dna-store.js +43 -0
- package/dist/dna/dna-store.js.map +1 -0
- package/dist/dna/gene-extractors/animation-approach.d.ts +15 -0
- package/dist/dna/gene-extractors/animation-approach.d.ts.map +1 -0
- package/dist/dna/gene-extractors/animation-approach.js +97 -0
- package/dist/dna/gene-extractors/animation-approach.js.map +1 -0
- package/dist/dna/gene-extractors/base-extractor.d.ts +53 -0
- package/dist/dna/gene-extractors/base-extractor.d.ts.map +1 -0
- package/dist/dna/gene-extractors/base-extractor.js +76 -0
- package/dist/dna/gene-extractors/base-extractor.js.map +1 -0
- package/dist/dna/gene-extractors/index.d.ts +16 -0
- package/dist/dna/gene-extractors/index.d.ts.map +1 -0
- package/dist/dna/gene-extractors/index.js +38 -0
- package/dist/dna/gene-extractors/index.js.map +1 -0
- package/dist/dna/gene-extractors/responsive-approach.d.ts +10 -0
- package/dist/dna/gene-extractors/responsive-approach.d.ts.map +1 -0
- package/dist/dna/gene-extractors/responsive-approach.js +30 -0
- package/dist/dna/gene-extractors/responsive-approach.js.map +1 -0
- package/dist/dna/gene-extractors/spacing-philosophy.d.ts +10 -0
- package/dist/dna/gene-extractors/spacing-philosophy.d.ts.map +1 -0
- package/dist/dna/gene-extractors/spacing-philosophy.js +30 -0
- package/dist/dna/gene-extractors/spacing-philosophy.js.map +1 -0
- package/dist/dna/gene-extractors/state-styling.d.ts +10 -0
- package/dist/dna/gene-extractors/state-styling.d.ts.map +1 -0
- package/dist/dna/gene-extractors/state-styling.js +29 -0
- package/dist/dna/gene-extractors/state-styling.js.map +1 -0
- package/dist/dna/gene-extractors/theming.d.ts +10 -0
- package/dist/dna/gene-extractors/theming.d.ts.map +1 -0
- package/dist/dna/gene-extractors/theming.js +30 -0
- package/dist/dna/gene-extractors/theming.js.map +1 -0
- package/dist/dna/gene-extractors/variant-handling.d.ts +13 -0
- package/dist/dna/gene-extractors/variant-handling.d.ts.map +1 -0
- package/dist/dna/gene-extractors/variant-handling.js +38 -0
- package/dist/dna/gene-extractors/variant-handling.js.map +1 -0
- package/dist/dna/health-calculator.d.ts +21 -0
- package/dist/dna/health-calculator.d.ts.map +1 -0
- package/dist/dna/health-calculator.js +113 -0
- package/dist/dna/health-calculator.js.map +1 -0
- package/dist/dna/index.d.ts +21 -0
- package/dist/dna/index.d.ts.map +1 -0
- package/dist/dna/index.js +19 -0
- package/dist/dna/index.js.map +1 -0
- package/dist/dna/mutation-detector.d.ts +10 -0
- package/dist/dna/mutation-detector.d.ts.map +1 -0
- package/dist/dna/mutation-detector.js +39 -0
- package/dist/dna/mutation-detector.js.map +1 -0
- package/dist/dna/playbook-generator.d.ts +6 -0
- package/dist/dna/playbook-generator.d.ts.map +1 -0
- package/dist/dna/playbook-generator.js +53 -0
- package/dist/dna/playbook-generator.js.map +1 -0
- package/dist/dna/types.d.ts +95 -0
- package/dist/dna/types.d.ts.map +1 -0
- package/dist/dna/types.js +8 -0
- package/dist/dna/types.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/parsers/parser-manager.d.ts.map +1 -1
- package/dist/parsers/parser-manager.js +2 -0
- package/dist/parsers/parser-manager.js.map +1 -1
- package/dist/parsers/tree-sitter/config.d.ts +82 -0
- package/dist/parsers/tree-sitter/config.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/config.js +200 -0
- package/dist/parsers/tree-sitter/config.js.map +1 -0
- package/dist/parsers/tree-sitter/csharp-ast-converter.d.ts +64 -0
- package/dist/parsers/tree-sitter/csharp-ast-converter.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/csharp-ast-converter.js +271 -0
- package/dist/parsers/tree-sitter/csharp-ast-converter.js.map +1 -0
- package/dist/parsers/tree-sitter/csharp-loader.d.ts +43 -0
- package/dist/parsers/tree-sitter/csharp-loader.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/csharp-loader.js +146 -0
- package/dist/parsers/tree-sitter/csharp-loader.js.map +1 -0
- package/dist/parsers/tree-sitter/index.d.ts +26 -0
- package/dist/parsers/tree-sitter/index.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/index.js +47 -0
- package/dist/parsers/tree-sitter/index.js.map +1 -0
- package/dist/parsers/tree-sitter/java/annotation-extractor.d.ts +79 -0
- package/dist/parsers/tree-sitter/java/annotation-extractor.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/java/annotation-extractor.js +540 -0
- package/dist/parsers/tree-sitter/java/annotation-extractor.js.map +1 -0
- package/dist/parsers/tree-sitter/java/class-extractor.d.ts +40 -0
- package/dist/parsers/tree-sitter/java/class-extractor.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/java/class-extractor.js +770 -0
- package/dist/parsers/tree-sitter/java/class-extractor.js.map +1 -0
- package/dist/parsers/tree-sitter/java/index.d.ts +14 -0
- package/dist/parsers/tree-sitter/java/index.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/java/index.js +25 -0
- package/dist/parsers/tree-sitter/java/index.js.map +1 -0
- package/dist/parsers/tree-sitter/java/method-extractor.d.ts +88 -0
- package/dist/parsers/tree-sitter/java/method-extractor.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/java/method-extractor.js +551 -0
- package/dist/parsers/tree-sitter/java/method-extractor.js.map +1 -0
- package/dist/parsers/tree-sitter/java/types.d.ts +545 -0
- package/dist/parsers/tree-sitter/java/types.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/java/types.js +81 -0
- package/dist/parsers/tree-sitter/java/types.js.map +1 -0
- package/dist/parsers/tree-sitter/loader.d.ts +50 -0
- package/dist/parsers/tree-sitter/loader.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/loader.js +156 -0
- package/dist/parsers/tree-sitter/loader.js.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/config-extractor.d.ts +78 -0
- package/dist/parsers/tree-sitter/pydantic/config-extractor.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/config-extractor.js +278 -0
- package/dist/parsers/tree-sitter/pydantic/config-extractor.js.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/constraint-parser.d.ts +84 -0
- package/dist/parsers/tree-sitter/pydantic/constraint-parser.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/constraint-parser.js +321 -0
- package/dist/parsers/tree-sitter/pydantic/constraint-parser.js.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/field-extractor.d.ts +74 -0
- package/dist/parsers/tree-sitter/pydantic/field-extractor.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/field-extractor.js +285 -0
- package/dist/parsers/tree-sitter/pydantic/field-extractor.js.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/index.d.ts +18 -0
- package/dist/parsers/tree-sitter/pydantic/index.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/index.js +23 -0
- package/dist/parsers/tree-sitter/pydantic/index.js.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/inheritance-resolver.d.ts +70 -0
- package/dist/parsers/tree-sitter/pydantic/inheritance-resolver.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/inheritance-resolver.js +251 -0
- package/dist/parsers/tree-sitter/pydantic/inheritance-resolver.js.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/pydantic-extractor.d.ts +102 -0
- package/dist/parsers/tree-sitter/pydantic/pydantic-extractor.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/pydantic-extractor.js +399 -0
- package/dist/parsers/tree-sitter/pydantic/pydantic-extractor.js.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/type-resolver.d.ts +89 -0
- package/dist/parsers/tree-sitter/pydantic/type-resolver.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/type-resolver.js +426 -0
- package/dist/parsers/tree-sitter/pydantic/type-resolver.js.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/types.d.ts +177 -0
- package/dist/parsers/tree-sitter/pydantic/types.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/types.js +139 -0
- package/dist/parsers/tree-sitter/pydantic/types.js.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/validator-extractor.d.ts +88 -0
- package/dist/parsers/tree-sitter/pydantic/validator-extractor.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/pydantic/validator-extractor.js +315 -0
- package/dist/parsers/tree-sitter/pydantic/validator-extractor.js.map +1 -0
- package/dist/parsers/tree-sitter/python-ast-converter.d.ts +140 -0
- package/dist/parsers/tree-sitter/python-ast-converter.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/python-ast-converter.js +360 -0
- package/dist/parsers/tree-sitter/python-ast-converter.js.map +1 -0
- package/dist/parsers/tree-sitter/tree-sitter-csharp-parser.d.ts +465 -0
- package/dist/parsers/tree-sitter/tree-sitter-csharp-parser.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/tree-sitter-csharp-parser.js +1146 -0
- package/dist/parsers/tree-sitter/tree-sitter-csharp-parser.js.map +1 -0
- package/dist/parsers/tree-sitter/tree-sitter-python-parser.d.ts +86 -0
- package/dist/parsers/tree-sitter/tree-sitter-python-parser.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/tree-sitter-python-parser.js +177 -0
- package/dist/parsers/tree-sitter/tree-sitter-python-parser.js.map +1 -0
- package/dist/parsers/tree-sitter/types.d.ts +399 -0
- package/dist/parsers/tree-sitter/types.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/types.js +20 -0
- package/dist/parsers/tree-sitter/types.js.map +1 -0
- package/dist/parsers/types.d.ts +1 -1
- package/dist/parsers/types.d.ts.map +1 -1
- package/dist/scanner/file-walker.d.ts.map +1 -1
- package/dist/scanner/file-walker.js +5 -0
- package/dist/scanner/file-walker.js.map +1 -1
- package/dist/store/history-store.d.ts +85 -269
- package/dist/store/history-store.d.ts.map +1 -1
- package/dist/store/history-store.js +272 -624
- package/dist/store/history-store.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/java-type-mapping.d.ts +79 -0
- package/dist/types/java-type-mapping.d.ts.map +1 -0
- package/dist/types/java-type-mapping.js +290 -0
- package/dist/types/java-type-mapping.js.map +1 -0
- package/package.json +8 -3
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pydantic Module Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions specific to Pydantic model extraction.
|
|
5
|
+
* Extends the base types with additional extraction-specific interfaces.
|
|
6
|
+
*
|
|
7
|
+
* @module pydantic/types
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Create a default extraction context.
|
|
11
|
+
*/
|
|
12
|
+
export function createExtractionContext(source, options = {}) {
|
|
13
|
+
return {
|
|
14
|
+
source,
|
|
15
|
+
maxTypeDepth: options.maxTypeDepth ?? 10,
|
|
16
|
+
knownModels: options.knownModels ?? new Set(),
|
|
17
|
+
typeAliases: options.typeAliases ?? new Map(),
|
|
18
|
+
imports: options.imports ?? new Map(),
|
|
19
|
+
includePositions: options.includePositions ?? true,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Python to contract type mapping.
|
|
24
|
+
*/
|
|
25
|
+
export const PYTHON_TYPE_MAP = {
|
|
26
|
+
// Primitives
|
|
27
|
+
str: 'string',
|
|
28
|
+
int: 'number',
|
|
29
|
+
float: 'number',
|
|
30
|
+
bool: 'boolean',
|
|
31
|
+
bytes: 'string',
|
|
32
|
+
// None/null
|
|
33
|
+
None: 'null',
|
|
34
|
+
NoneType: 'null',
|
|
35
|
+
// Collections
|
|
36
|
+
list: 'array',
|
|
37
|
+
List: 'array',
|
|
38
|
+
tuple: 'array',
|
|
39
|
+
Tuple: 'array',
|
|
40
|
+
set: 'array',
|
|
41
|
+
Set: 'array',
|
|
42
|
+
frozenset: 'array',
|
|
43
|
+
FrozenSet: 'array',
|
|
44
|
+
Sequence: 'array',
|
|
45
|
+
Iterable: 'array',
|
|
46
|
+
// Mappings
|
|
47
|
+
dict: 'object',
|
|
48
|
+
Dict: 'object',
|
|
49
|
+
Mapping: 'object',
|
|
50
|
+
MutableMapping: 'object',
|
|
51
|
+
// Any
|
|
52
|
+
Any: 'any',
|
|
53
|
+
object: 'any',
|
|
54
|
+
// Date/time (serialized as strings)
|
|
55
|
+
date: 'string',
|
|
56
|
+
datetime: 'string',
|
|
57
|
+
time: 'string',
|
|
58
|
+
timedelta: 'string',
|
|
59
|
+
// Other common types
|
|
60
|
+
UUID: 'string',
|
|
61
|
+
Decimal: 'number',
|
|
62
|
+
Path: 'string',
|
|
63
|
+
EmailStr: 'string',
|
|
64
|
+
HttpUrl: 'string',
|
|
65
|
+
AnyUrl: 'string',
|
|
66
|
+
SecretStr: 'string',
|
|
67
|
+
SecretBytes: 'string',
|
|
68
|
+
Json: 'any',
|
|
69
|
+
};
|
|
70
|
+
// ============================================
|
|
71
|
+
// Constraint Types
|
|
72
|
+
// ============================================
|
|
73
|
+
/**
|
|
74
|
+
* Numeric constraint names.
|
|
75
|
+
*/
|
|
76
|
+
export const NUMERIC_CONSTRAINTS = ['ge', 'le', 'gt', 'lt', 'multiple_of'];
|
|
77
|
+
/**
|
|
78
|
+
* String constraint names.
|
|
79
|
+
*/
|
|
80
|
+
export const STRING_CONSTRAINTS = ['min_length', 'max_length', 'pattern', 'regex'];
|
|
81
|
+
/**
|
|
82
|
+
* All constraint names.
|
|
83
|
+
*/
|
|
84
|
+
export const ALL_CONSTRAINTS = [
|
|
85
|
+
...NUMERIC_CONSTRAINTS,
|
|
86
|
+
...STRING_CONSTRAINTS,
|
|
87
|
+
'alias',
|
|
88
|
+
'title',
|
|
89
|
+
'description',
|
|
90
|
+
'examples',
|
|
91
|
+
'deprecated',
|
|
92
|
+
'frozen',
|
|
93
|
+
'exclude',
|
|
94
|
+
'include',
|
|
95
|
+
'discriminator',
|
|
96
|
+
'json_schema_extra',
|
|
97
|
+
'strict',
|
|
98
|
+
'default',
|
|
99
|
+
'default_factory',
|
|
100
|
+
];
|
|
101
|
+
/**
|
|
102
|
+
* Known Pydantic base classes.
|
|
103
|
+
*/
|
|
104
|
+
export const PYDANTIC_BASE_CLASSES = new Set([
|
|
105
|
+
'BaseModel',
|
|
106
|
+
'BaseSettings',
|
|
107
|
+
'GenericModel',
|
|
108
|
+
'pydantic.BaseModel',
|
|
109
|
+
'pydantic.BaseSettings',
|
|
110
|
+
'pydantic.generics.GenericModel',
|
|
111
|
+
]);
|
|
112
|
+
// ============================================
|
|
113
|
+
// Position Helpers
|
|
114
|
+
// ============================================
|
|
115
|
+
/**
|
|
116
|
+
* Extract position from a tree-sitter node.
|
|
117
|
+
*/
|
|
118
|
+
export function extractPosition(node) {
|
|
119
|
+
return {
|
|
120
|
+
row: node.startPosition.row,
|
|
121
|
+
column: node.startPosition.column,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Extract start and end positions from a node.
|
|
126
|
+
*/
|
|
127
|
+
export function extractPositionRange(node) {
|
|
128
|
+
return {
|
|
129
|
+
startPosition: {
|
|
130
|
+
row: node.startPosition.row,
|
|
131
|
+
column: node.startPosition.column,
|
|
132
|
+
},
|
|
133
|
+
endPosition: {
|
|
134
|
+
row: node.endPosition.row,
|
|
135
|
+
column: node.endPosition.column,
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/parsers/tree-sitter/pydantic/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA4BH;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAc,EACd,UAAsC,EAAE;IAExC,OAAO;QACL,MAAM;QACN,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;QACxC,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAI,GAAG,EAAE;QAC7C,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAI,GAAG,EAAE;QAC7C,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,IAAI,GAAG,EAAE;QACrC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,IAAI,IAAI;KACnD,CAAC;AACJ,CAAC;AA0DD;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAA2B;IACrD,aAAa;IACb,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,QAAQ;IACb,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,QAAQ;IAEf,YAAY;IACZ,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,MAAM;IAEhB,cAAc;IACd,IAAI,EAAE,OAAO;IACb,IAAI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QAAQ;IACR,SAAS;IACT,iBAAiB;CACT,CAAC;AA2FX;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IAC3C,WAAW;IACX,cAAc;IACd,cAAc;IACd,oBAAoB;IACpB,uBAAuB;IACvB,gCAAgC;CACjC,CAAC,CAAC;AAEH,+CAA+C;AAC/C,mBAAmB;AACnB,+CAA+C;AAE/C;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,IAAoB;IAClD,OAAO;QACL,GAAG,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG;QAC3B,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;KAClC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAoB;IAIvD,OAAO;QACL,aAAa,EAAE;YACb,GAAG,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG;YAC3B,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;SAClC;QACD,WAAW,EAAE;YACX,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG;YACzB,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM;SAChC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pydantic Validator Extractor
|
|
3
|
+
*
|
|
4
|
+
* Extracts validator definitions from Pydantic model classes.
|
|
5
|
+
* Handles both v1 (@validator, @root_validator) and v2 (@field_validator, @model_validator).
|
|
6
|
+
*
|
|
7
|
+
* @module pydantic/validator-extractor
|
|
8
|
+
*/
|
|
9
|
+
import type { TreeSitterNode } from '../types.js';
|
|
10
|
+
import type { PydanticValidatorInfo } from '../types.js';
|
|
11
|
+
import type { ExtractionContext } from './types.js';
|
|
12
|
+
/**
|
|
13
|
+
* Extracts Pydantic validator definitions.
|
|
14
|
+
*
|
|
15
|
+
* Handles:
|
|
16
|
+
* - v1: @validator('field1', 'field2', pre=True)
|
|
17
|
+
* - v1: @root_validator(pre=True)
|
|
18
|
+
* - v2: @field_validator('field1', 'field2', mode='before')
|
|
19
|
+
* - v2: @model_validator(mode='before')
|
|
20
|
+
* - v2: @computed_field
|
|
21
|
+
*/
|
|
22
|
+
export declare class ValidatorExtractor {
|
|
23
|
+
/**
|
|
24
|
+
* Extract all validators from a class body.
|
|
25
|
+
*
|
|
26
|
+
* @param bodyNode - The class body (block) node
|
|
27
|
+
* @param context - Extraction context
|
|
28
|
+
* @returns Array of validator information
|
|
29
|
+
*/
|
|
30
|
+
extractValidators(bodyNode: TreeSitterNode, context: ExtractionContext): PydanticValidatorInfo[];
|
|
31
|
+
/**
|
|
32
|
+
* Extract a single validator from a decorated definition.
|
|
33
|
+
*/
|
|
34
|
+
private extractValidator;
|
|
35
|
+
/**
|
|
36
|
+
* Find all decorators in a decorated definition.
|
|
37
|
+
*/
|
|
38
|
+
private findDecorators;
|
|
39
|
+
/**
|
|
40
|
+
* Find a validator decorator among decorators.
|
|
41
|
+
*/
|
|
42
|
+
private findValidatorDecorator;
|
|
43
|
+
/**
|
|
44
|
+
* Determine the validator decorator type.
|
|
45
|
+
*/
|
|
46
|
+
private getValidatorDecoratorType;
|
|
47
|
+
/**
|
|
48
|
+
* Find the function definition in a decorated definition.
|
|
49
|
+
*/
|
|
50
|
+
private findFunctionDefinition;
|
|
51
|
+
/**
|
|
52
|
+
* Extract raw validator data from AST nodes.
|
|
53
|
+
*/
|
|
54
|
+
private extractRawValidatorData;
|
|
55
|
+
/**
|
|
56
|
+
* Extract arguments from decorator call.
|
|
57
|
+
*/
|
|
58
|
+
private extractDecoratorArgs;
|
|
59
|
+
/**
|
|
60
|
+
* Extract field names from validator decorator.
|
|
61
|
+
*/
|
|
62
|
+
private extractValidatorFields;
|
|
63
|
+
/**
|
|
64
|
+
* Extract validator mode.
|
|
65
|
+
*/
|
|
66
|
+
private extractValidatorMode;
|
|
67
|
+
/**
|
|
68
|
+
* Extract a boolean argument.
|
|
69
|
+
*/
|
|
70
|
+
private extractBooleanArg;
|
|
71
|
+
/**
|
|
72
|
+
* Remove quotes from a string value.
|
|
73
|
+
*/
|
|
74
|
+
private unquote;
|
|
75
|
+
/**
|
|
76
|
+
* Check if a string is a valid validator mode.
|
|
77
|
+
*/
|
|
78
|
+
private isValidMode;
|
|
79
|
+
/**
|
|
80
|
+
* Process raw validator data into PydanticValidatorInfo.
|
|
81
|
+
*/
|
|
82
|
+
private processRawValidator;
|
|
83
|
+
/**
|
|
84
|
+
* Determine the validator type category.
|
|
85
|
+
*/
|
|
86
|
+
private determineValidatorType;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=validator-extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator-extractor.d.ts","sourceRoot":"","sources":["../../../../src/parsers/tree-sitter/pydantic/validator-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAA2D,MAAM,YAAY,CAAC;AAO7G;;;;;;;;;GASG;AACH,qBAAa,kBAAkB;IAC7B;;;;;;OAMG;IACH,iBAAiB,CACf,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,iBAAiB,GACzB,qBAAqB,EAAE;IAgB1B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAoCxB;;OAEG;IACH,OAAO,CAAC,cAAc;IAYtB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAY9B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAsCjC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAc9B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAqC/B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA8B5B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA2B9B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAyB5B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAQzB;;OAEG;IACH,OAAO,CAAC,OAAO;IASf;;OAEG;IACH,OAAO,CAAC,WAAW;IAQnB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAyB3B;;OAEG;IACH,OAAO,CAAC,sBAAsB;CAgB/B"}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pydantic Validator Extractor
|
|
3
|
+
*
|
|
4
|
+
* Extracts validator definitions from Pydantic model classes.
|
|
5
|
+
* Handles both v1 (@validator, @root_validator) and v2 (@field_validator, @model_validator).
|
|
6
|
+
*
|
|
7
|
+
* @module pydantic/validator-extractor
|
|
8
|
+
*/
|
|
9
|
+
import { extractPositionRange } from './types.js';
|
|
10
|
+
// ============================================
|
|
11
|
+
// Validator Extractor Class
|
|
12
|
+
// ============================================
|
|
13
|
+
/**
|
|
14
|
+
* Extracts Pydantic validator definitions.
|
|
15
|
+
*
|
|
16
|
+
* Handles:
|
|
17
|
+
* - v1: @validator('field1', 'field2', pre=True)
|
|
18
|
+
* - v1: @root_validator(pre=True)
|
|
19
|
+
* - v2: @field_validator('field1', 'field2', mode='before')
|
|
20
|
+
* - v2: @model_validator(mode='before')
|
|
21
|
+
* - v2: @computed_field
|
|
22
|
+
*/
|
|
23
|
+
export class ValidatorExtractor {
|
|
24
|
+
/**
|
|
25
|
+
* Extract all validators from a class body.
|
|
26
|
+
*
|
|
27
|
+
* @param bodyNode - The class body (block) node
|
|
28
|
+
* @param context - Extraction context
|
|
29
|
+
* @returns Array of validator information
|
|
30
|
+
*/
|
|
31
|
+
extractValidators(bodyNode, context) {
|
|
32
|
+
const validators = [];
|
|
33
|
+
for (const child of bodyNode.namedChildren) {
|
|
34
|
+
// Look for decorated function definitions
|
|
35
|
+
if (child.type === 'decorated_definition') {
|
|
36
|
+
const validator = this.extractValidator(child, context);
|
|
37
|
+
if (validator) {
|
|
38
|
+
validators.push(validator);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return validators;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Extract a single validator from a decorated definition.
|
|
46
|
+
*/
|
|
47
|
+
extractValidator(node, context) {
|
|
48
|
+
// Find the decorator
|
|
49
|
+
const decorators = this.findDecorators(node);
|
|
50
|
+
const validatorDecorator = this.findValidatorDecorator(decorators);
|
|
51
|
+
if (!validatorDecorator) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
// Find the function definition
|
|
55
|
+
const funcDef = this.findFunctionDefinition(node);
|
|
56
|
+
if (!funcDef) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
// Extract raw data
|
|
60
|
+
const rawData = this.extractRawValidatorData(funcDef, validatorDecorator.decorator, validatorDecorator.type);
|
|
61
|
+
if (!rawData) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return this.processRawValidator(rawData, context);
|
|
65
|
+
}
|
|
66
|
+
// ============================================
|
|
67
|
+
// Decorator Detection
|
|
68
|
+
// ============================================
|
|
69
|
+
/**
|
|
70
|
+
* Find all decorators in a decorated definition.
|
|
71
|
+
*/
|
|
72
|
+
findDecorators(node) {
|
|
73
|
+
const decorators = [];
|
|
74
|
+
for (const child of node.namedChildren) {
|
|
75
|
+
if (child.type === 'decorator') {
|
|
76
|
+
decorators.push(child);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return decorators;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Find a validator decorator among decorators.
|
|
83
|
+
*/
|
|
84
|
+
findValidatorDecorator(decorators) {
|
|
85
|
+
for (const decorator of decorators) {
|
|
86
|
+
const type = this.getValidatorDecoratorType(decorator);
|
|
87
|
+
if (type) {
|
|
88
|
+
return { decorator, type };
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Determine the validator decorator type.
|
|
95
|
+
*/
|
|
96
|
+
getValidatorDecoratorType(decorator) {
|
|
97
|
+
// Get the decorator content (call or identifier)
|
|
98
|
+
const content = decorator.namedChildren[0];
|
|
99
|
+
if (!content)
|
|
100
|
+
return null;
|
|
101
|
+
let name;
|
|
102
|
+
if (content.type === 'call') {
|
|
103
|
+
const func = content.childForFieldName('function');
|
|
104
|
+
name = func?.text ?? '';
|
|
105
|
+
}
|
|
106
|
+
else if (content.type === 'identifier' || content.type === 'attribute') {
|
|
107
|
+
name = content.text;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
// Check for validator types
|
|
113
|
+
if (name === 'validator' || name.endsWith('.validator')) {
|
|
114
|
+
return 'validator';
|
|
115
|
+
}
|
|
116
|
+
if (name === 'root_validator' || name.endsWith('.root_validator')) {
|
|
117
|
+
return 'root_validator';
|
|
118
|
+
}
|
|
119
|
+
if (name === 'field_validator' || name.endsWith('.field_validator')) {
|
|
120
|
+
return 'field_validator';
|
|
121
|
+
}
|
|
122
|
+
if (name === 'model_validator' || name.endsWith('.model_validator')) {
|
|
123
|
+
return 'model_validator';
|
|
124
|
+
}
|
|
125
|
+
if (name === 'computed_field' || name.endsWith('.computed_field')) {
|
|
126
|
+
return 'computed_field';
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Find the function definition in a decorated definition.
|
|
132
|
+
*/
|
|
133
|
+
findFunctionDefinition(node) {
|
|
134
|
+
for (const child of node.namedChildren) {
|
|
135
|
+
if (child.type === 'function_definition' ||
|
|
136
|
+
child.type === 'async_function_definition') {
|
|
137
|
+
return child;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
// ============================================
|
|
143
|
+
// Raw Data Extraction
|
|
144
|
+
// ============================================
|
|
145
|
+
/**
|
|
146
|
+
* Extract raw validator data from AST nodes.
|
|
147
|
+
*/
|
|
148
|
+
extractRawValidatorData(funcDef, decorator, decoratorType) {
|
|
149
|
+
// Get function name
|
|
150
|
+
const nameNode = funcDef.childForFieldName('name');
|
|
151
|
+
if (!nameNode)
|
|
152
|
+
return null;
|
|
153
|
+
const name = nameNode.text;
|
|
154
|
+
// Get decorator arguments
|
|
155
|
+
const decoratorContent = decorator.namedChildren[0];
|
|
156
|
+
const args = this.extractDecoratorArgs(decoratorContent);
|
|
157
|
+
// Extract fields (for field validators)
|
|
158
|
+
const fields = this.extractValidatorFields(args, decoratorType);
|
|
159
|
+
// Extract mode
|
|
160
|
+
const mode = this.extractValidatorMode(args, decoratorType);
|
|
161
|
+
// Extract v1 flags
|
|
162
|
+
const isPre = this.extractBooleanArg(args, 'pre');
|
|
163
|
+
const isAlways = this.extractBooleanArg(args, 'always');
|
|
164
|
+
const skipOnFailure = this.extractBooleanArg(args, 'check_fields') === false;
|
|
165
|
+
return {
|
|
166
|
+
name,
|
|
167
|
+
decoratorType,
|
|
168
|
+
fields,
|
|
169
|
+
mode,
|
|
170
|
+
isPre,
|
|
171
|
+
isAlways,
|
|
172
|
+
skipOnFailure,
|
|
173
|
+
node: funcDef,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Extract arguments from decorator call.
|
|
178
|
+
*/
|
|
179
|
+
extractDecoratorArgs(content) {
|
|
180
|
+
const args = new Map();
|
|
181
|
+
if (!content || content.type !== 'call') {
|
|
182
|
+
return args;
|
|
183
|
+
}
|
|
184
|
+
const argsNode = content.childForFieldName('arguments');
|
|
185
|
+
if (!argsNode)
|
|
186
|
+
return args;
|
|
187
|
+
let positionalIndex = 0;
|
|
188
|
+
for (const child of argsNode.namedChildren) {
|
|
189
|
+
if (child.type === 'keyword_argument') {
|
|
190
|
+
const nameNode = child.childForFieldName('name');
|
|
191
|
+
const valueNode = child.childForFieldName('value');
|
|
192
|
+
if (nameNode && valueNode) {
|
|
193
|
+
args.set(nameNode.text, valueNode.text);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
// Positional argument - use index as key
|
|
198
|
+
args.set(`__pos_${positionalIndex}`, child.text);
|
|
199
|
+
positionalIndex++;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return args;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Extract field names from validator decorator.
|
|
206
|
+
*/
|
|
207
|
+
extractValidatorFields(args, decoratorType) {
|
|
208
|
+
// Root/model validators don't have fields
|
|
209
|
+
if (decoratorType === 'root_validator' ||
|
|
210
|
+
decoratorType === 'model_validator' ||
|
|
211
|
+
decoratorType === 'computed_field') {
|
|
212
|
+
return [];
|
|
213
|
+
}
|
|
214
|
+
const fields = [];
|
|
215
|
+
// Positional arguments are field names
|
|
216
|
+
for (const [key, value] of args) {
|
|
217
|
+
if (key?.startsWith('__pos_')) {
|
|
218
|
+
// Remove quotes from string
|
|
219
|
+
const field = this.unquote(value);
|
|
220
|
+
if (field && field !== '*') {
|
|
221
|
+
fields.push(field);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return fields;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Extract validator mode.
|
|
229
|
+
*/
|
|
230
|
+
extractValidatorMode(args, decoratorType) {
|
|
231
|
+
// v2 style: mode='before'
|
|
232
|
+
const modeArg = args.get('mode');
|
|
233
|
+
if (modeArg) {
|
|
234
|
+
const mode = this.unquote(modeArg);
|
|
235
|
+
if (this.isValidMode(mode)) {
|
|
236
|
+
return mode;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
// v1 style: pre=True means 'before'
|
|
240
|
+
if (decoratorType === 'validator' || decoratorType === 'root_validator') {
|
|
241
|
+
const preArg = args.get('pre');
|
|
242
|
+
if (preArg === 'True') {
|
|
243
|
+
return 'before';
|
|
244
|
+
}
|
|
245
|
+
return 'after'; // Default for v1
|
|
246
|
+
}
|
|
247
|
+
return null;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Extract a boolean argument.
|
|
251
|
+
*/
|
|
252
|
+
extractBooleanArg(args, name) {
|
|
253
|
+
const value = args.get(name);
|
|
254
|
+
return value === 'True';
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Remove quotes from a string value.
|
|
258
|
+
*/
|
|
259
|
+
unquote(value) {
|
|
260
|
+
const trimmed = value.trim();
|
|
261
|
+
if ((trimmed.startsWith('"') && trimmed.endsWith('"')) ||
|
|
262
|
+
(trimmed.startsWith("'") && trimmed.endsWith("'"))) {
|
|
263
|
+
return trimmed.slice(1, -1);
|
|
264
|
+
}
|
|
265
|
+
return trimmed;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Check if a string is a valid validator mode.
|
|
269
|
+
*/
|
|
270
|
+
isValidMode(mode) {
|
|
271
|
+
return ['before', 'after', 'wrap', 'plain'].includes(mode);
|
|
272
|
+
}
|
|
273
|
+
// ============================================
|
|
274
|
+
// Processing
|
|
275
|
+
// ============================================
|
|
276
|
+
/**
|
|
277
|
+
* Process raw validator data into PydanticValidatorInfo.
|
|
278
|
+
*/
|
|
279
|
+
processRawValidator(raw, context) {
|
|
280
|
+
// Determine validator type
|
|
281
|
+
const type = this.determineValidatorType(raw.decoratorType);
|
|
282
|
+
// Determine mode
|
|
283
|
+
const mode = raw.mode ?? (raw.isPre ? 'before' : 'after');
|
|
284
|
+
// Build position info
|
|
285
|
+
const positions = context.includePositions
|
|
286
|
+
? extractPositionRange(raw.node)
|
|
287
|
+
: { startPosition: { row: 0, column: 0 }, endPosition: { row: 0, column: 0 } };
|
|
288
|
+
return {
|
|
289
|
+
name: raw.name,
|
|
290
|
+
fields: raw.fields,
|
|
291
|
+
mode,
|
|
292
|
+
type,
|
|
293
|
+
isClassmethod: true, // Validators are always classmethods
|
|
294
|
+
...positions,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Determine the validator type category.
|
|
299
|
+
*/
|
|
300
|
+
determineValidatorType(decoratorType) {
|
|
301
|
+
switch (decoratorType) {
|
|
302
|
+
case 'validator':
|
|
303
|
+
case 'field_validator':
|
|
304
|
+
case 'computed_field':
|
|
305
|
+
return 'field';
|
|
306
|
+
case 'root_validator':
|
|
307
|
+
return 'root';
|
|
308
|
+
case 'model_validator':
|
|
309
|
+
return 'model';
|
|
310
|
+
default:
|
|
311
|
+
return 'field';
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
//# sourceMappingURL=validator-extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator-extractor.js","sourceRoot":"","sources":["../../../../src/parsers/tree-sitter/pydantic/validator-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,+CAA+C;AAC/C,4BAA4B;AAC5B,+CAA+C;AAE/C;;;;;;;;;GASG;AACH,MAAM,OAAO,kBAAkB;IAC7B;;;;;;OAMG;IACH,iBAAiB,CACf,QAAwB,EACxB,OAA0B;QAE1B,MAAM,UAAU,GAA4B,EAAE,CAAC;QAE/C,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,aAAa,EAAE,CAAC;YAC3C,0CAA0C;YAC1C,IAAI,KAAK,CAAC,IAAI,KAAK,sBAAsB,EAAE,CAAC;gBAC1C,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;gBACxD,IAAI,SAAS,EAAE,CAAC;oBACd,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAC7B,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;IAED;;OAEG;IACK,gBAAgB,CACtB,IAAoB,EACpB,OAA0B;QAE1B,qBAAqB;QACrB,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAA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