@dooor-ai/cortexdb 0.6.1 ā 0.6.2
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/schema-cli/index.js +889 -14
- package/dist/schema-cli/index.js.map +1 -1
- package/dist/schema-decorators/decorators.d.ts +175 -0
- package/dist/schema-decorators/decorators.d.ts.map +1 -0
- package/dist/schema-decorators/decorators.js +277 -0
- package/dist/schema-decorators/decorators.js.map +1 -0
- package/dist/schema-decorators/index.d.ts +10 -0
- package/dist/schema-decorators/index.d.ts.map +1 -0
- package/dist/schema-decorators/index.js +25 -0
- package/dist/schema-decorators/index.js.map +1 -0
- package/dist/schema-decorators/loader.d.ts +12 -0
- package/dist/schema-decorators/loader.d.ts.map +1 -0
- package/dist/schema-decorators/loader.js +161 -0
- package/dist/schema-decorators/loader.js.map +1 -0
- package/dist/schema-decorators/validator.d.ts +26 -0
- package/dist/schema-decorators/validator.d.ts.map +1 -0
- package/dist/schema-decorators/validator.js +193 -0
- package/dist/schema-decorators/validator.js.map +1 -0
- package/package.json +18 -1
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Schema Validator for CortexDB TypeScript Schemas
|
|
4
|
+
*
|
|
5
|
+
* Validates relationships and schema consistency, similar to Prisma's validation.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.validateSchema = validateSchema;
|
|
9
|
+
exports.formatValidationErrors = formatValidationErrors;
|
|
10
|
+
const types_1 = require("../types");
|
|
11
|
+
/**
|
|
12
|
+
* Validate all loaded collections for consistency
|
|
13
|
+
*/
|
|
14
|
+
function validateSchema(collections) {
|
|
15
|
+
const errors = [];
|
|
16
|
+
const warnings = [];
|
|
17
|
+
// Build a map of collection names for quick lookup
|
|
18
|
+
const collectionMap = new Map();
|
|
19
|
+
const classNameToCollection = new Map();
|
|
20
|
+
for (const col of collections) {
|
|
21
|
+
collectionMap.set(col.name, col);
|
|
22
|
+
// Also map by class name if available
|
|
23
|
+
if (col.className) {
|
|
24
|
+
classNameToCollection.set(col.className, col.name);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
for (const collection of collections) {
|
|
28
|
+
// Validate each field
|
|
29
|
+
for (const field of collection.fields) {
|
|
30
|
+
// Check for relationship fields (they end with _id or _ids)
|
|
31
|
+
if (field.name.endsWith('_id')) {
|
|
32
|
+
const relationName = field.name.slice(0, -3); // Remove _id
|
|
33
|
+
// Check if there's a corresponding target (we need metadata for this)
|
|
34
|
+
// For now, warn if it looks like a foreign key but target is unknown
|
|
35
|
+
if (field.description?.includes('Foreign key to')) {
|
|
36
|
+
const targetMatch = field.description.match(/Foreign key to (\w+)/);
|
|
37
|
+
if (targetMatch) {
|
|
38
|
+
const targetClassName = targetMatch[1];
|
|
39
|
+
const targetCollection = classNameToCollection.get(targetClassName);
|
|
40
|
+
if (!targetCollection && !collectionMap.has(targetClassName.toLowerCase())) {
|
|
41
|
+
errors.push({
|
|
42
|
+
collection: collection.name,
|
|
43
|
+
field: field.name,
|
|
44
|
+
message: `Relationship target "${targetClassName}" not found`,
|
|
45
|
+
suggestion: `Create a collection with @Collection decorator for "${targetClassName}" or check if the class is exported from your schema file`,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
// Check for Many-to-Many fields
|
|
52
|
+
if (field.name.endsWith('_ids') && field.type === 'json') {
|
|
53
|
+
const relationName = field.name.slice(0, -4); // Remove _ids
|
|
54
|
+
if (field.description?.includes('Many-to-many relationship with')) {
|
|
55
|
+
const targetMatch = field.description.match(/Many-to-many relationship with (\w+)/);
|
|
56
|
+
if (targetMatch) {
|
|
57
|
+
const targetName = targetMatch[1];
|
|
58
|
+
// ManyToMany should have a corresponding relationship on the other side
|
|
59
|
+
// This is a warning, not an error, since it can be unidirectional
|
|
60
|
+
const targetCollection = collectionMap.get(targetName.toLowerCase());
|
|
61
|
+
if (!targetCollection) {
|
|
62
|
+
warnings.push({
|
|
63
|
+
collection: collection.name,
|
|
64
|
+
field: field.name,
|
|
65
|
+
message: `Many-to-many target "${targetName}" not found in schema`,
|
|
66
|
+
suggestion: `If "${targetName}" is a valid collection, make sure it's defined in your schema files`,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// Validate enum fields have values
|
|
73
|
+
if (field.type === 'enum' && (!field.values || field.values.length === 0)) {
|
|
74
|
+
errors.push({
|
|
75
|
+
collection: collection.name,
|
|
76
|
+
field: field.name,
|
|
77
|
+
message: `Enum field "${field.name}" has no values defined`,
|
|
78
|
+
suggestion: `Add values array: @Field({ type: FieldType.ENUM, values: ["value1", "value2"] })`,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
// Validate vectorize fields have appropriate store_in
|
|
82
|
+
if (field.vectorize) {
|
|
83
|
+
const storeIn = (field.store_in || []);
|
|
84
|
+
const hasQdrant = storeIn.some(s => s === types_1.StoreLocation.QDRANT || s === types_1.StoreLocation.QDRANT_PAYLOAD);
|
|
85
|
+
if (!hasQdrant) {
|
|
86
|
+
warnings.push({
|
|
87
|
+
collection: collection.name,
|
|
88
|
+
field: field.name,
|
|
89
|
+
message: `Field "${field.name}" has vectorize=true but is not stored in Qdrant`,
|
|
90
|
+
suggestion: `Add StoreLocation.QDRANT to storeIn for vector search to work`,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// Validate file fields
|
|
95
|
+
if (field.type === 'file') {
|
|
96
|
+
const storeIn = (field.store_in || []);
|
|
97
|
+
const hasMinio = storeIn.some(s => s === types_1.StoreLocation.MINIO);
|
|
98
|
+
if (!hasMinio) {
|
|
99
|
+
warnings.push({
|
|
100
|
+
collection: collection.name,
|
|
101
|
+
field: field.name,
|
|
102
|
+
message: `File field "${field.name}" is not stored in MinIO`,
|
|
103
|
+
suggestion: `Add StoreLocation.MINIO to storeIn for file storage`,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// Check for duplicate field names
|
|
108
|
+
const fieldNames = collection.fields.map(f => f.name);
|
|
109
|
+
const duplicates = fieldNames.filter((name, index) => fieldNames.indexOf(name) !== index);
|
|
110
|
+
if (duplicates.length > 0) {
|
|
111
|
+
errors.push({
|
|
112
|
+
collection: collection.name,
|
|
113
|
+
message: `Duplicate field names: ${[...new Set(duplicates)].join(', ')}`,
|
|
114
|
+
suggestion: `Remove duplicate @Field decorators or rename the fields`,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// Validate collection has at least one field
|
|
119
|
+
if (collection.fields.length === 0) {
|
|
120
|
+
warnings.push({
|
|
121
|
+
collection: collection.name,
|
|
122
|
+
message: `Collection "${collection.name}" has no fields defined`,
|
|
123
|
+
suggestion: `Add at least one @Field decorator to your collection class`,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
// Validate collection name is lowercase and valid
|
|
127
|
+
if (collection.name !== collection.name.toLowerCase()) {
|
|
128
|
+
warnings.push({
|
|
129
|
+
collection: collection.name,
|
|
130
|
+
message: `Collection name "${collection.name}" contains uppercase letters`,
|
|
131
|
+
suggestion: `Use lowercase names for consistency (e.g., "${collection.name.toLowerCase()}")`,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
if (!/^[a-z][a-z0-9_]*$/.test(collection.name)) {
|
|
135
|
+
errors.push({
|
|
136
|
+
collection: collection.name,
|
|
137
|
+
message: `Invalid collection name "${collection.name}"`,
|
|
138
|
+
suggestion: `Collection names must start with a letter and contain only lowercase letters, numbers, and underscores`,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// Check for duplicate collection names
|
|
143
|
+
const collectionNames = collections.map(c => c.name);
|
|
144
|
+
const duplicateCollections = collectionNames.filter((name, index) => collectionNames.indexOf(name) !== index);
|
|
145
|
+
if (duplicateCollections.length > 0) {
|
|
146
|
+
errors.push({
|
|
147
|
+
collection: duplicateCollections[0],
|
|
148
|
+
message: `Duplicate collection names: ${[...new Set(duplicateCollections)].join(', ')}`,
|
|
149
|
+
suggestion: `Each collection must have a unique name`,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
valid: errors.length === 0,
|
|
154
|
+
errors,
|
|
155
|
+
warnings,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Format validation errors for display
|
|
160
|
+
*/
|
|
161
|
+
function formatValidationErrors(result) {
|
|
162
|
+
const lines = [];
|
|
163
|
+
if (result.errors.length > 0) {
|
|
164
|
+
lines.push('\nā Schema validation errors:\n');
|
|
165
|
+
for (const error of result.errors) {
|
|
166
|
+
const location = error.field
|
|
167
|
+
? `${error.collection}.${error.field}`
|
|
168
|
+
: error.collection;
|
|
169
|
+
lines.push(` Error in ${location}:`);
|
|
170
|
+
lines.push(` ${error.message}`);
|
|
171
|
+
if (error.suggestion) {
|
|
172
|
+
lines.push(` š” ${error.suggestion}`);
|
|
173
|
+
}
|
|
174
|
+
lines.push('');
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (result.warnings.length > 0) {
|
|
178
|
+
lines.push('\nā ļø Schema warnings:\n');
|
|
179
|
+
for (const warning of result.warnings) {
|
|
180
|
+
const location = warning.field
|
|
181
|
+
? `${warning.collection}.${warning.field}`
|
|
182
|
+
: warning.collection;
|
|
183
|
+
lines.push(` Warning in ${location}:`);
|
|
184
|
+
lines.push(` ${warning.message}`);
|
|
185
|
+
if (warning.suggestion) {
|
|
186
|
+
lines.push(` š” ${warning.suggestion}`);
|
|
187
|
+
}
|
|
188
|
+
lines.push('');
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return lines.join('\n');
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/schema-decorators/validator.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAqBH,wCAiKC;AAKD,wDAkCC;AA1ND,oCAAyC;AAezC;;GAEG;AACH,SAAgB,cAAc,CAAC,WAA+B;IAC5D,MAAM,MAAM,GAAsB,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAsB,EAAE,CAAC;IAEvC,mDAAmD;IACnD,MAAM,aAAa,GAAG,IAAI,GAAG,EAA4B,CAAC;IAC1D,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAAkB,CAAC;IAExD,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QAC9B,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACjC,sCAAsC;QACtC,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC;YAClB,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IAED,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACrC,sBAAsB;QACtB,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;YACtC,4DAA4D;YAC5D,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC/B,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa;gBAE3D,sEAAsE;gBACtE,qEAAqE;gBACrE,IAAI,KAAK,CAAC,WAAW,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;oBAClD,MAAM,WAAW,GAAG,KAAK,CAAC,WA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QAAQ,GAAG,CAAC,CAAC;YACxC,KAAK,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;YACrC,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;gBACvB,KAAK,CAAC,IAAI,CAAC,UAAU,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;YAC7C,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dooor-ai/cortexdb",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Official TypeScript/JavaScript SDK for CortexDB - Multi-modal RAG Platform with advanced document processing",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"require": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./schema-decorators": {
|
|
14
|
+
"import": "./dist/schema-decorators/index.js",
|
|
15
|
+
"require": "./dist/schema-decorators/index.js",
|
|
16
|
+
"types": "./dist/schema-decorators/index.d.ts"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"typesVersions": {
|
|
20
|
+
"*": {
|
|
21
|
+
"schema-decorators": ["dist/schema-decorators/index.d.ts"]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
7
24
|
"bin": {
|
|
8
25
|
"cortexdb-schema": "dist/schema-cli/index.js"
|
|
9
26
|
},
|