@toiroakr/lines-db 0.7.0 → 0.9.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/CHANGELOG.md +22 -0
- package/bin/cli.js +91 -34
- package/dist/index.cjs +145 -7
- package/dist/index.d.cts +70 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +70 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +144 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/cli.ts +118 -55
- package/src/database.ts +71 -11
- package/src/index.ts +7 -0
- package/src/schema-extensions.ts +1 -4
- package/src/type-generator.ts +4 -3
- package/src/types.ts +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @toiroakr/lines-db
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 07b35ed: Export ErrorFormatter and related types (ErrorFormatterOptions, ValidationErrorInfo, ForeignKeyErrorInfo) from package entry point
|
|
8
|
+
|
|
9
|
+
## 0.8.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- c408b92: feat: display per-table validation results for directory validation
|
|
14
|
+
|
|
15
|
+
The `validate` command now shows individual results per table when validating a directory, including record counts for successful tables (e.g., `✓ users (3 records)`).
|
|
16
|
+
- Added `TableValidationResult` type and `tableResults` field to `ValidationResult`
|
|
17
|
+
- Each table result includes `tableName`, `valid`, `rowCount`, `errors`, and `warnings`
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- e61a4ee: fix: gracefully handle foreign key validation when referenced table has errors
|
|
22
|
+
|
|
23
|
+
When validating a directory, if a table had validation errors, any table referencing it via foreign key would crash with a misleading `no such table` SQLite error. Now, foreign key constraints to failed tables are skipped with a clear warning (e.g., `⚠ Skipping foreign key validation for table 'child': referenced table 'parent' has validation errors`), and the child table's own schema validation still runs normally.
|
|
24
|
+
|
|
3
25
|
## 0.7.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/bin/cli.js
CHANGED
|
@@ -423,6 +423,7 @@ var LinesDB = class LinesDB {
|
|
|
423
423
|
async initialize(options) {
|
|
424
424
|
const allErrors = [];
|
|
425
425
|
const allWarnings = [];
|
|
426
|
+
const allRowCounts = /* @__PURE__ */ new Map();
|
|
426
427
|
const tableName = options?.tableName;
|
|
427
428
|
const detailedValidate = options?.detailedValidate ?? false;
|
|
428
429
|
const transform = options?.transform;
|
|
@@ -434,14 +435,27 @@ var LinesDB = class LinesDB {
|
|
|
434
435
|
const attemptedTables = /* @__PURE__ */ new Set();
|
|
435
436
|
for (const tableNameToLoad of tablesToLoad) if (!attemptedTables.has(tableNameToLoad)) {
|
|
436
437
|
const tableTransform = tableNameToLoad === tableName ? transform : void 0;
|
|
437
|
-
const { errors, warnings } = await this.loadTableWithDependencies(tableNameToLoad, loadedTables, loadingTables, attemptedTables, detailedValidate, tableTransform);
|
|
438
|
+
const { errors, warnings, rowCounts: tableRowCounts } = await this.loadTableWithDependencies(tableNameToLoad, loadedTables, loadingTables, attemptedTables, detailedValidate, tableTransform);
|
|
438
439
|
allErrors.push(...errors);
|
|
439
440
|
allWarnings.push(...warnings);
|
|
441
|
+
for (const [k, v] of tableRowCounts) allRowCounts.set(k, v);
|
|
440
442
|
}
|
|
443
|
+
const tableResults = tablesToLoad.map((name) => {
|
|
444
|
+
const tableErrors = allErrors.filter((e) => e.tableName === name);
|
|
445
|
+
const tableWarnings = allWarnings.filter((w) => w.includes(`'${name}'`));
|
|
446
|
+
return {
|
|
447
|
+
tableName: name,
|
|
448
|
+
valid: tableErrors.length === 0,
|
|
449
|
+
rowCount: allRowCounts.get(name) ?? 0,
|
|
450
|
+
errors: tableErrors,
|
|
451
|
+
warnings: tableWarnings
|
|
452
|
+
};
|
|
453
|
+
});
|
|
441
454
|
return {
|
|
442
455
|
valid: allErrors.length === 0,
|
|
443
456
|
errors: allErrors,
|
|
444
|
-
warnings: allWarnings
|
|
457
|
+
warnings: allWarnings,
|
|
458
|
+
tableResults
|
|
445
459
|
};
|
|
446
460
|
}
|
|
447
461
|
/**
|
|
@@ -450,9 +464,11 @@ var LinesDB = class LinesDB {
|
|
|
450
464
|
async loadTableWithDependencies(tableName, loadedTables, loadingTables, attemptedTables, detailedValidate, transform) {
|
|
451
465
|
const errors = [];
|
|
452
466
|
const warnings = [];
|
|
467
|
+
const rowCounts = /* @__PURE__ */ new Map();
|
|
453
468
|
if (attemptedTables.has(tableName)) return {
|
|
454
469
|
errors,
|
|
455
|
-
warnings
|
|
470
|
+
warnings,
|
|
471
|
+
rowCounts
|
|
456
472
|
};
|
|
457
473
|
attemptedTables.add(tableName);
|
|
458
474
|
if (loadingTables.has(tableName)) throw new Error(`Circular dependency detected for table '${tableName}'`);
|
|
@@ -476,10 +492,21 @@ var LinesDB = class LinesDB {
|
|
|
476
492
|
const depResult = await this.loadTableWithDependencies(referencedTable, loadedTables, loadingTables, attemptedTables, detailedValidate, void 0);
|
|
477
493
|
errors.push(...depResult.errors);
|
|
478
494
|
warnings.push(...depResult.warnings);
|
|
495
|
+
for (const [k, v] of depResult.rowCounts) rowCounts.set(k, v);
|
|
479
496
|
} else throw new Error(`Foreign key reference to non-existent table '${referencedTable}' in table '${tableName}'`);
|
|
480
497
|
}
|
|
481
|
-
const
|
|
498
|
+
const failedDependencies = /* @__PURE__ */ new Set();
|
|
499
|
+
if (foreignKeys && foreignKeys.length > 0) {
|
|
500
|
+
for (const fk of foreignKeys) {
|
|
501
|
+
const referencedTable = fk.references.table;
|
|
502
|
+
if (referencedTable === tableName) continue;
|
|
503
|
+
if (attemptedTables.has(referencedTable) && !loadedTables.has(referencedTable)) failedDependencies.add(referencedTable);
|
|
504
|
+
}
|
|
505
|
+
if (failedDependencies.size > 0) for (const dep of failedDependencies) warnings.push(`Skipping foreign key validation for table '${tableName}': referenced table '${dep}' has validation errors`);
|
|
506
|
+
}
|
|
507
|
+
const { loaded, rowCount, errors: loadErrors } = await this.loadTable(tableName, tableConfig, detailedValidate, transform, failedDependencies);
|
|
482
508
|
errors.push(...loadErrors);
|
|
509
|
+
rowCounts.set(tableName, rowCount);
|
|
483
510
|
if (loaded) loadedTables.add(tableName);
|
|
484
511
|
else {
|
|
485
512
|
warnings.push(`Table '${tableName}' was not loaded (no data or skipped)`);
|
|
@@ -490,14 +517,15 @@ var LinesDB = class LinesDB {
|
|
|
490
517
|
}
|
|
491
518
|
return {
|
|
492
519
|
errors,
|
|
493
|
-
warnings
|
|
520
|
+
warnings,
|
|
521
|
+
rowCounts
|
|
494
522
|
};
|
|
495
523
|
}
|
|
496
524
|
/**
|
|
497
525
|
* Load a single table from JSONL file
|
|
498
526
|
* @returns Object with loaded status and validation errors
|
|
499
527
|
*/
|
|
500
|
-
async loadTable(tableName, config, detailedValidate, transform) {
|
|
528
|
+
async loadTable(tableName, config, detailedValidate, transform, failedDependencies) {
|
|
501
529
|
let data = await JsonlReader.read(config.jsonlPath);
|
|
502
530
|
if (transform) data = data.map((row) => transform(row));
|
|
503
531
|
let validationSchema = config.validationSchema;
|
|
@@ -552,6 +580,7 @@ var LinesDB = class LinesDB {
|
|
|
552
580
|
}));
|
|
553
581
|
if (validationErrors.length > 0) return {
|
|
554
582
|
loaded: false,
|
|
583
|
+
rowCount: data.length,
|
|
555
584
|
errors: validationErrorDetails
|
|
556
585
|
};
|
|
557
586
|
let schema;
|
|
@@ -566,6 +595,7 @@ var LinesDB = class LinesDB {
|
|
|
566
595
|
} else if (config.autoInferSchema !== false) {
|
|
567
596
|
if (validatedData.length === 0) return {
|
|
568
597
|
loaded: false,
|
|
598
|
+
rowCount: 0,
|
|
569
599
|
errors: []
|
|
570
600
|
};
|
|
571
601
|
schema = inferredSchema;
|
|
@@ -581,7 +611,7 @@ var LinesDB = class LinesDB {
|
|
|
581
611
|
const idColumn = schema.columns.find((c) => c.name === "id");
|
|
582
612
|
if (idColumn) idColumn.primaryKey = true;
|
|
583
613
|
}
|
|
584
|
-
if (foreignKeys) schema.foreignKeys = foreignKeys;
|
|
614
|
+
if (foreignKeys) schema.foreignKeys = failedDependencies && failedDependencies.size > 0 ? foreignKeys.filter((fk) => !failedDependencies.has(fk.references.table)) : foreignKeys;
|
|
585
615
|
if (indexes) {
|
|
586
616
|
schema.indexes = indexes;
|
|
587
617
|
for (const index of indexes) if (index.unique && index.columns.length === 1) {
|
|
@@ -595,11 +625,13 @@ var LinesDB = class LinesDB {
|
|
|
595
625
|
const insertErrors = this.insertDataWithDetailedValidation(tableName, schema, validatedData, config.jsonlPath);
|
|
596
626
|
if (insertErrors.length > 0) return {
|
|
597
627
|
loaded: false,
|
|
628
|
+
rowCount: data.length,
|
|
598
629
|
errors: insertErrors
|
|
599
630
|
};
|
|
600
631
|
} else this.insertData(tableName, schema, validatedData);
|
|
601
632
|
return {
|
|
602
633
|
loaded: true,
|
|
634
|
+
rowCount: data.length,
|
|
603
635
|
errors: []
|
|
604
636
|
};
|
|
605
637
|
}
|
|
@@ -1353,48 +1385,73 @@ program.command("validate").description("Validate JSONL file(s) against schema")
|
|
|
1353
1385
|
} finally {
|
|
1354
1386
|
await db.close();
|
|
1355
1387
|
}
|
|
1356
|
-
if (
|
|
1357
|
-
for (const warning of result.warnings) console.warn(styleText("yellow", `⚠ ${warning}`));
|
|
1358
|
-
console.log("");
|
|
1359
|
-
}
|
|
1360
|
-
if (result.valid) {
|
|
1361
|
-
console.log("✓ All records are valid");
|
|
1362
|
-
process.exit(0);
|
|
1363
|
-
} else {
|
|
1388
|
+
if (!tableName) {
|
|
1364
1389
|
const formatter = new ErrorFormatter({ verbose: options.verbose });
|
|
1365
|
-
const
|
|
1366
|
-
for (const
|
|
1367
|
-
|
|
1368
|
-
fileErrors.
|
|
1369
|
-
|
|
1370
|
-
}
|
|
1371
|
-
for (const [file, fileErrors] of errorsByFile) {
|
|
1372
|
-
console.error(formatter.formatErrorHeader(fileErrors.length, file));
|
|
1390
|
+
for (const tableResult of result.tableResults) if (tableResult.valid && tableResult.warnings.length === 0) console.log(styleText("green", `✓ ${tableResult.tableName} (${tableResult.rowCount} records)`));
|
|
1391
|
+
else if (tableResult.valid && tableResult.warnings.length > 0) for (const warning of tableResult.warnings) console.warn(styleText("yellow", `⚠ ${warning}`));
|
|
1392
|
+
else {
|
|
1393
|
+
const fileErrors = tableResult.errors;
|
|
1394
|
+
console.error(formatter.formatErrorHeader(fileErrors.length, fileErrors[0]?.file));
|
|
1373
1395
|
console.error("");
|
|
1374
1396
|
const validationErrors = fileErrors.filter((e) => e.type !== "foreignKey" || !e.foreignKeyError);
|
|
1375
1397
|
const foreignKeyErrors = fileErrors.filter((e) => e.type === "foreignKey" && e.foreignKeyError);
|
|
1376
|
-
if (validationErrors.length > 0) {
|
|
1377
|
-
|
|
1398
|
+
if (validationErrors.length > 0) console.error(formatter.formatValidationErrors(validationErrors.map((e) => ({
|
|
1399
|
+
file: e.file,
|
|
1400
|
+
rowIndex: e.rowIndex,
|
|
1401
|
+
issues: e.issues
|
|
1402
|
+
}))));
|
|
1403
|
+
for (const error of foreignKeyErrors) if (error.foreignKeyError) console.error(formatter.formatForeignKeyError({
|
|
1404
|
+
file: error.file,
|
|
1405
|
+
rowIndex: error.rowIndex,
|
|
1406
|
+
column: error.foreignKeyError.column,
|
|
1407
|
+
value: error.foreignKeyError.value,
|
|
1408
|
+
referencedTable: error.foreignKeyError.referencedTable,
|
|
1409
|
+
referencedColumn: error.foreignKeyError.referencedColumn
|
|
1410
|
+
}));
|
|
1411
|
+
console.error("");
|
|
1412
|
+
}
|
|
1413
|
+
if (result.valid) {
|
|
1414
|
+
console.log("");
|
|
1415
|
+
console.log(styleText("green", "✓ All records are valid"));
|
|
1416
|
+
process.exit(0);
|
|
1417
|
+
} else process.exit(1);
|
|
1418
|
+
} else {
|
|
1419
|
+
if (result.warnings.length > 0) {
|
|
1420
|
+
for (const warning of result.warnings) console.warn(styleText("yellow", `⚠ ${warning}`));
|
|
1421
|
+
console.log("");
|
|
1422
|
+
}
|
|
1423
|
+
if (result.valid) {
|
|
1424
|
+
console.log(styleText("green", "✓ All records are valid"));
|
|
1425
|
+
process.exit(0);
|
|
1426
|
+
} else {
|
|
1427
|
+
const formatter = new ErrorFormatter({ verbose: options.verbose });
|
|
1428
|
+
for (const [, fileErrors] of result.errors.reduce((map, error) => {
|
|
1429
|
+
const errors = map.get(error.file) || [];
|
|
1430
|
+
errors.push(error);
|
|
1431
|
+
map.set(error.file, errors);
|
|
1432
|
+
return map;
|
|
1433
|
+
}, /* @__PURE__ */ new Map())) {
|
|
1434
|
+
console.error(formatter.formatErrorHeader(fileErrors.length, fileErrors[0]?.file));
|
|
1435
|
+
console.error("");
|
|
1436
|
+
const validationErrors = fileErrors.filter((e) => e.type !== "foreignKey" || !e.foreignKeyError);
|
|
1437
|
+
const foreignKeyErrors = fileErrors.filter((e) => e.type === "foreignKey" && e.foreignKeyError);
|
|
1438
|
+
if (validationErrors.length > 0) console.error(formatter.formatValidationErrors(validationErrors.map((e) => ({
|
|
1378
1439
|
file: e.file,
|
|
1379
1440
|
rowIndex: e.rowIndex,
|
|
1380
1441
|
issues: e.issues
|
|
1381
|
-
})));
|
|
1382
|
-
console.error(
|
|
1383
|
-
}
|
|
1384
|
-
for (const error of foreignKeyErrors) if (error.foreignKeyError) {
|
|
1385
|
-
const formattedFk = formatter.formatForeignKeyError({
|
|
1442
|
+
}))));
|
|
1443
|
+
for (const error of foreignKeyErrors) if (error.foreignKeyError) console.error(formatter.formatForeignKeyError({
|
|
1386
1444
|
file: error.file,
|
|
1387
1445
|
rowIndex: error.rowIndex,
|
|
1388
1446
|
column: error.foreignKeyError.column,
|
|
1389
1447
|
value: error.foreignKeyError.value,
|
|
1390
1448
|
referencedTable: error.foreignKeyError.referencedTable,
|
|
1391
1449
|
referencedColumn: error.foreignKeyError.referencedColumn
|
|
1392
|
-
});
|
|
1393
|
-
console.error(
|
|
1450
|
+
}));
|
|
1451
|
+
console.error("");
|
|
1394
1452
|
}
|
|
1395
|
-
|
|
1453
|
+
process.exit(1);
|
|
1396
1454
|
}
|
|
1397
|
-
process.exit(1);
|
|
1398
1455
|
}
|
|
1399
1456
|
} catch (error) {
|
|
1400
1457
|
console.error("Error:", error instanceof Error ? error.message : String(error));
|
package/dist/index.cjs
CHANGED
|
@@ -27,6 +27,8 @@ let node_path = require("node:path");
|
|
|
27
27
|
node_path = __toESM(node_path);
|
|
28
28
|
let node_url = require("node:url");
|
|
29
29
|
node_url = __toESM(node_url);
|
|
30
|
+
let node_util = require("node:util");
|
|
31
|
+
node_util = __toESM(node_util);
|
|
30
32
|
|
|
31
33
|
//#region src/runtime.ts
|
|
32
34
|
function detectRuntime() {
|
|
@@ -396,6 +398,7 @@ var LinesDB = class LinesDB {
|
|
|
396
398
|
async initialize(options) {
|
|
397
399
|
const allErrors = [];
|
|
398
400
|
const allWarnings = [];
|
|
401
|
+
const allRowCounts = /* @__PURE__ */ new Map();
|
|
399
402
|
const tableName = options?.tableName;
|
|
400
403
|
const detailedValidate = options?.detailedValidate ?? false;
|
|
401
404
|
const transform = options?.transform;
|
|
@@ -407,14 +410,27 @@ var LinesDB = class LinesDB {
|
|
|
407
410
|
const attemptedTables = /* @__PURE__ */ new Set();
|
|
408
411
|
for (const tableNameToLoad of tablesToLoad) if (!attemptedTables.has(tableNameToLoad)) {
|
|
409
412
|
const tableTransform = tableNameToLoad === tableName ? transform : void 0;
|
|
410
|
-
const { errors, warnings } = await this.loadTableWithDependencies(tableNameToLoad, loadedTables, loadingTables, attemptedTables, detailedValidate, tableTransform);
|
|
413
|
+
const { errors, warnings, rowCounts: tableRowCounts } = await this.loadTableWithDependencies(tableNameToLoad, loadedTables, loadingTables, attemptedTables, detailedValidate, tableTransform);
|
|
411
414
|
allErrors.push(...errors);
|
|
412
415
|
allWarnings.push(...warnings);
|
|
416
|
+
for (const [k, v] of tableRowCounts) allRowCounts.set(k, v);
|
|
413
417
|
}
|
|
418
|
+
const tableResults = tablesToLoad.map((name) => {
|
|
419
|
+
const tableErrors = allErrors.filter((e) => e.tableName === name);
|
|
420
|
+
const tableWarnings = allWarnings.filter((w) => w.includes(`'${name}'`));
|
|
421
|
+
return {
|
|
422
|
+
tableName: name,
|
|
423
|
+
valid: tableErrors.length === 0,
|
|
424
|
+
rowCount: allRowCounts.get(name) ?? 0,
|
|
425
|
+
errors: tableErrors,
|
|
426
|
+
warnings: tableWarnings
|
|
427
|
+
};
|
|
428
|
+
});
|
|
414
429
|
return {
|
|
415
430
|
valid: allErrors.length === 0,
|
|
416
431
|
errors: allErrors,
|
|
417
|
-
warnings: allWarnings
|
|
432
|
+
warnings: allWarnings,
|
|
433
|
+
tableResults
|
|
418
434
|
};
|
|
419
435
|
}
|
|
420
436
|
/**
|
|
@@ -423,9 +439,11 @@ var LinesDB = class LinesDB {
|
|
|
423
439
|
async loadTableWithDependencies(tableName, loadedTables, loadingTables, attemptedTables, detailedValidate, transform) {
|
|
424
440
|
const errors = [];
|
|
425
441
|
const warnings = [];
|
|
442
|
+
const rowCounts = /* @__PURE__ */ new Map();
|
|
426
443
|
if (attemptedTables.has(tableName)) return {
|
|
427
444
|
errors,
|
|
428
|
-
warnings
|
|
445
|
+
warnings,
|
|
446
|
+
rowCounts
|
|
429
447
|
};
|
|
430
448
|
attemptedTables.add(tableName);
|
|
431
449
|
if (loadingTables.has(tableName)) throw new Error(`Circular dependency detected for table '${tableName}'`);
|
|
@@ -449,10 +467,21 @@ var LinesDB = class LinesDB {
|
|
|
449
467
|
const depResult = await this.loadTableWithDependencies(referencedTable, loadedTables, loadingTables, attemptedTables, detailedValidate, void 0);
|
|
450
468
|
errors.push(...depResult.errors);
|
|
451
469
|
warnings.push(...depResult.warnings);
|
|
470
|
+
for (const [k, v] of depResult.rowCounts) rowCounts.set(k, v);
|
|
452
471
|
} else throw new Error(`Foreign key reference to non-existent table '${referencedTable}' in table '${tableName}'`);
|
|
453
472
|
}
|
|
454
|
-
const
|
|
473
|
+
const failedDependencies = /* @__PURE__ */ new Set();
|
|
474
|
+
if (foreignKeys && foreignKeys.length > 0) {
|
|
475
|
+
for (const fk of foreignKeys) {
|
|
476
|
+
const referencedTable = fk.references.table;
|
|
477
|
+
if (referencedTable === tableName) continue;
|
|
478
|
+
if (attemptedTables.has(referencedTable) && !loadedTables.has(referencedTable)) failedDependencies.add(referencedTable);
|
|
479
|
+
}
|
|
480
|
+
if (failedDependencies.size > 0) for (const dep of failedDependencies) warnings.push(`Skipping foreign key validation for table '${tableName}': referenced table '${dep}' has validation errors`);
|
|
481
|
+
}
|
|
482
|
+
const { loaded, rowCount, errors: loadErrors } = await this.loadTable(tableName, tableConfig, detailedValidate, transform, failedDependencies);
|
|
455
483
|
errors.push(...loadErrors);
|
|
484
|
+
rowCounts.set(tableName, rowCount);
|
|
456
485
|
if (loaded) loadedTables.add(tableName);
|
|
457
486
|
else {
|
|
458
487
|
warnings.push(`Table '${tableName}' was not loaded (no data or skipped)`);
|
|
@@ -463,14 +492,15 @@ var LinesDB = class LinesDB {
|
|
|
463
492
|
}
|
|
464
493
|
return {
|
|
465
494
|
errors,
|
|
466
|
-
warnings
|
|
495
|
+
warnings,
|
|
496
|
+
rowCounts
|
|
467
497
|
};
|
|
468
498
|
}
|
|
469
499
|
/**
|
|
470
500
|
* Load a single table from JSONL file
|
|
471
501
|
* @returns Object with loaded status and validation errors
|
|
472
502
|
*/
|
|
473
|
-
async loadTable(tableName, config, detailedValidate, transform) {
|
|
503
|
+
async loadTable(tableName, config, detailedValidate, transform, failedDependencies) {
|
|
474
504
|
let data = await JsonlReader.read(config.jsonlPath);
|
|
475
505
|
if (transform) data = data.map((row) => transform(row));
|
|
476
506
|
let validationSchema = config.validationSchema;
|
|
@@ -525,6 +555,7 @@ var LinesDB = class LinesDB {
|
|
|
525
555
|
}));
|
|
526
556
|
if (validationErrors.length > 0) return {
|
|
527
557
|
loaded: false,
|
|
558
|
+
rowCount: data.length,
|
|
528
559
|
errors: validationErrorDetails
|
|
529
560
|
};
|
|
530
561
|
let schema;
|
|
@@ -539,6 +570,7 @@ var LinesDB = class LinesDB {
|
|
|
539
570
|
} else if (config.autoInferSchema !== false) {
|
|
540
571
|
if (validatedData.length === 0) return {
|
|
541
572
|
loaded: false,
|
|
573
|
+
rowCount: 0,
|
|
542
574
|
errors: []
|
|
543
575
|
};
|
|
544
576
|
schema = inferredSchema;
|
|
@@ -554,7 +586,7 @@ var LinesDB = class LinesDB {
|
|
|
554
586
|
const idColumn = schema.columns.find((c) => c.name === "id");
|
|
555
587
|
if (idColumn) idColumn.primaryKey = true;
|
|
556
588
|
}
|
|
557
|
-
if (foreignKeys) schema.foreignKeys = foreignKeys;
|
|
589
|
+
if (foreignKeys) schema.foreignKeys = failedDependencies && failedDependencies.size > 0 ? foreignKeys.filter((fk) => !failedDependencies.has(fk.references.table)) : foreignKeys;
|
|
558
590
|
if (indexes) {
|
|
559
591
|
schema.indexes = indexes;
|
|
560
592
|
for (const index of indexes) if (index.unique && index.columns.length === 1) {
|
|
@@ -568,11 +600,13 @@ var LinesDB = class LinesDB {
|
|
|
568
600
|
const insertErrors = this.insertDataWithDetailedValidation(tableName, schema, validatedData, config.jsonlPath);
|
|
569
601
|
if (insertErrors.length > 0) return {
|
|
570
602
|
loaded: false,
|
|
603
|
+
rowCount: data.length,
|
|
571
604
|
errors: insertErrors
|
|
572
605
|
};
|
|
573
606
|
} else this.insertData(tableName, schema, validatedData);
|
|
574
607
|
return {
|
|
575
608
|
loaded: true,
|
|
609
|
+
rowCount: data.length,
|
|
576
610
|
errors: []
|
|
577
611
|
};
|
|
578
612
|
}
|
|
@@ -1292,8 +1326,112 @@ async function ensureTableRowsValid(options) {
|
|
|
1292
1326
|
});
|
|
1293
1327
|
}
|
|
1294
1328
|
|
|
1329
|
+
//#endregion
|
|
1330
|
+
//#region src/error-formatter.ts
|
|
1331
|
+
var ErrorFormatter = class {
|
|
1332
|
+
verbose;
|
|
1333
|
+
constructor(options = {}) {
|
|
1334
|
+
this.verbose = options.verbose ?? false;
|
|
1335
|
+
}
|
|
1336
|
+
/**
|
|
1337
|
+
* Format validation errors
|
|
1338
|
+
*/
|
|
1339
|
+
formatValidationErrors(errors) {
|
|
1340
|
+
if (this.verbose) return this.formatValidationErrorsVerbose(errors);
|
|
1341
|
+
return this.formatValidationErrorsCompact(errors);
|
|
1342
|
+
}
|
|
1343
|
+
/**
|
|
1344
|
+
* Format foreign key error
|
|
1345
|
+
*/
|
|
1346
|
+
formatForeignKeyError(error) {
|
|
1347
|
+
if (this.verbose) return this.formatForeignKeyErrorVerbose(error);
|
|
1348
|
+
return this.formatForeignKeyErrorCompact(error);
|
|
1349
|
+
}
|
|
1350
|
+
/**
|
|
1351
|
+
* Format compact (default) validation errors
|
|
1352
|
+
*/
|
|
1353
|
+
formatValidationErrorsCompact(errors) {
|
|
1354
|
+
const lines = [];
|
|
1355
|
+
for (const error of errors) for (const issue of error.issues) {
|
|
1356
|
+
const fieldPath = this.getFieldPath(issue);
|
|
1357
|
+
const line = `${error.file}:${error.rowIndex + 1} • ${fieldPath}: ${issue.message}`;
|
|
1358
|
+
lines.push(line);
|
|
1359
|
+
}
|
|
1360
|
+
return lines.join("\n");
|
|
1361
|
+
}
|
|
1362
|
+
/**
|
|
1363
|
+
* Format verbose validation errors
|
|
1364
|
+
*/
|
|
1365
|
+
formatValidationErrorsVerbose(errors) {
|
|
1366
|
+
const blocks = [];
|
|
1367
|
+
for (let i = 0; i < errors.length; i++) {
|
|
1368
|
+
const error = errors[i];
|
|
1369
|
+
const isLast = i === errors.length - 1;
|
|
1370
|
+
const prefix = isLast ? "└─" : "├─";
|
|
1371
|
+
const linePrefix = isLast ? " " : "│ ";
|
|
1372
|
+
const lines = [`${prefix} ${error.file}:${error.rowIndex + 1}`];
|
|
1373
|
+
for (const issue of error.issues) {
|
|
1374
|
+
const fieldPath = this.getFieldPath(issue);
|
|
1375
|
+
lines.push(`${linePrefix}Field: ${fieldPath}`);
|
|
1376
|
+
lines.push(`${linePrefix}Error: ${issue.message}`);
|
|
1377
|
+
}
|
|
1378
|
+
if (error.originalData !== void 0) lines.push(`${linePrefix}Original data: ${JSON.stringify(error.originalData)}`);
|
|
1379
|
+
if (error.data !== void 0) {
|
|
1380
|
+
const label = error.originalData !== void 0 ? "Transformed data" : "Data";
|
|
1381
|
+
lines.push(`${linePrefix}${label}: ${JSON.stringify(error.data)}`);
|
|
1382
|
+
}
|
|
1383
|
+
blocks.push(lines.join("\n"));
|
|
1384
|
+
}
|
|
1385
|
+
return blocks.join("\n│\n");
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* Format compact foreign key error
|
|
1389
|
+
*/
|
|
1390
|
+
formatForeignKeyErrorCompact(error) {
|
|
1391
|
+
return `${error.file}:${error.rowIndex + 1} • ${error.column}: Foreign key constraint failed - Referenced value ${JSON.stringify(error.value)} does not exist in ${error.referencedTable}(${error.referencedColumn})`;
|
|
1392
|
+
}
|
|
1393
|
+
/**
|
|
1394
|
+
* Format verbose foreign key error
|
|
1395
|
+
*/
|
|
1396
|
+
formatForeignKeyErrorVerbose(error) {
|
|
1397
|
+
const lines = [
|
|
1398
|
+
`└─ ${error.file}:${error.rowIndex + 1}`,
|
|
1399
|
+
` Type: Foreign Key Violation`,
|
|
1400
|
+
` Field: ${error.column}`,
|
|
1401
|
+
` Value: ${JSON.stringify(error.value)}`,
|
|
1402
|
+
` References: ${error.referencedTable}(${error.referencedColumn})`,
|
|
1403
|
+
` Error: Referenced value does not exist in target table`
|
|
1404
|
+
];
|
|
1405
|
+
if (error.data !== void 0) lines.push(` Data: ${JSON.stringify(error.data)}`);
|
|
1406
|
+
return lines.join("\n");
|
|
1407
|
+
}
|
|
1408
|
+
/**
|
|
1409
|
+
* Get field path from issue
|
|
1410
|
+
*/
|
|
1411
|
+
getFieldPath(issue) {
|
|
1412
|
+
if (!issue.path || issue.path.length === 0) return "root";
|
|
1413
|
+
return issue.path.map((segment) => {
|
|
1414
|
+
if (typeof segment === "object" && segment !== null && "key" in segment) return String(segment.key);
|
|
1415
|
+
return String(segment);
|
|
1416
|
+
}).join(".");
|
|
1417
|
+
}
|
|
1418
|
+
/**
|
|
1419
|
+
* Format error header with count
|
|
1420
|
+
*/
|
|
1421
|
+
formatErrorHeader(count, file) {
|
|
1422
|
+
return (0, node_util.styleText)("red", `✗ Found ${count} error(s)${file ? ` in ${file}` : ""}`);
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
* Format migration failure header
|
|
1426
|
+
*/
|
|
1427
|
+
formatMigrationFailureHeader() {
|
|
1428
|
+
return (0, node_util.styleText)("red", "\n✗ Migration failed and was rolled back");
|
|
1429
|
+
}
|
|
1430
|
+
};
|
|
1431
|
+
|
|
1295
1432
|
//#endregion
|
|
1296
1433
|
exports.DirectoryScanner = DirectoryScanner;
|
|
1434
|
+
exports.ErrorFormatter = ErrorFormatter;
|
|
1297
1435
|
exports.JsonlReader = JsonlReader;
|
|
1298
1436
|
exports.JsonlWriter = JsonlWriter;
|
|
1299
1437
|
exports.LinesDB = LinesDB;
|
package/dist/index.d.cts
CHANGED
|
@@ -29,10 +29,18 @@ type StandardSchemaResult<Output> = StandardSchemaV1.Result<Output>;
|
|
|
29
29
|
type StandardSchemaIssue = StandardSchemaV1.Issue;
|
|
30
30
|
type InferInput<T$1> = T$1 extends StandardSchemaV1<infer I, unknown> ? I : never;
|
|
31
31
|
type InferOutput<T$1> = T$1 extends StandardSchemaV1<unknown, infer O> ? O : never;
|
|
32
|
+
interface TableValidationResult {
|
|
33
|
+
tableName: string;
|
|
34
|
+
valid: boolean;
|
|
35
|
+
rowCount: number;
|
|
36
|
+
errors: ValidationErrorDetail[];
|
|
37
|
+
warnings: string[];
|
|
38
|
+
}
|
|
32
39
|
interface ValidationResult {
|
|
33
40
|
valid: boolean;
|
|
34
41
|
errors: ValidationErrorDetail[];
|
|
35
42
|
warnings: string[];
|
|
43
|
+
tableResults: TableValidationResult[];
|
|
36
44
|
}
|
|
37
45
|
interface ValidationErrorDetail {
|
|
38
46
|
file: string;
|
|
@@ -519,6 +527,67 @@ declare function extractTableNameFromSchemaFile(fileName: string): string | null
|
|
|
519
527
|
*/
|
|
520
528
|
declare function rewriteExtensionForImport(filePath: string): string;
|
|
521
529
|
//#endregion
|
|
530
|
+
//#region src/error-formatter.d.ts
|
|
531
|
+
interface ValidationErrorInfo {
|
|
532
|
+
file: string;
|
|
533
|
+
rowIndex: number;
|
|
534
|
+
issues: ReadonlyArray<StandardSchemaIssue>;
|
|
535
|
+
data?: unknown;
|
|
536
|
+
originalData?: unknown;
|
|
537
|
+
}
|
|
538
|
+
interface ForeignKeyErrorInfo {
|
|
539
|
+
file: string;
|
|
540
|
+
rowIndex: number;
|
|
541
|
+
column: string;
|
|
542
|
+
value: unknown;
|
|
543
|
+
referencedTable: string;
|
|
544
|
+
referencedColumn: string;
|
|
545
|
+
data?: unknown;
|
|
546
|
+
}
|
|
547
|
+
interface ErrorFormatterOptions {
|
|
548
|
+
verbose?: boolean;
|
|
549
|
+
}
|
|
550
|
+
declare class ErrorFormatter {
|
|
551
|
+
private verbose;
|
|
552
|
+
constructor(options?: ErrorFormatterOptions);
|
|
553
|
+
/**
|
|
554
|
+
* Format validation errors
|
|
555
|
+
*/
|
|
556
|
+
formatValidationErrors(errors: ValidationErrorInfo[]): string;
|
|
557
|
+
/**
|
|
558
|
+
* Format foreign key error
|
|
559
|
+
*/
|
|
560
|
+
formatForeignKeyError(error: ForeignKeyErrorInfo): string;
|
|
561
|
+
/**
|
|
562
|
+
* Format compact (default) validation errors
|
|
563
|
+
*/
|
|
564
|
+
private formatValidationErrorsCompact;
|
|
565
|
+
/**
|
|
566
|
+
* Format verbose validation errors
|
|
567
|
+
*/
|
|
568
|
+
private formatValidationErrorsVerbose;
|
|
569
|
+
/**
|
|
570
|
+
* Format compact foreign key error
|
|
571
|
+
*/
|
|
572
|
+
private formatForeignKeyErrorCompact;
|
|
573
|
+
/**
|
|
574
|
+
* Format verbose foreign key error
|
|
575
|
+
*/
|
|
576
|
+
private formatForeignKeyErrorVerbose;
|
|
577
|
+
/**
|
|
578
|
+
* Get field path from issue
|
|
579
|
+
*/
|
|
580
|
+
private getFieldPath;
|
|
581
|
+
/**
|
|
582
|
+
* Format error header with count
|
|
583
|
+
*/
|
|
584
|
+
formatErrorHeader(count: number, file?: string): string;
|
|
585
|
+
/**
|
|
586
|
+
* Format migration failure header
|
|
587
|
+
*/
|
|
588
|
+
formatMigrationFailureHeader(): string;
|
|
589
|
+
}
|
|
590
|
+
//#endregion
|
|
522
591
|
//#region src/runtime.d.ts
|
|
523
592
|
/**
|
|
524
593
|
* Runtime detection utilities
|
|
@@ -527,5 +596,5 @@ type RuntimeEnvironment = 'node' | 'unknown';
|
|
|
527
596
|
declare function detectRuntime(): RuntimeEnvironment;
|
|
528
597
|
declare const RUNTIME: RuntimeEnvironment;
|
|
529
598
|
//#endregion
|
|
530
|
-
export { type BiDirectionalSchema, type ColumnDefinition, type DatabaseConfig, DirectoryScanner, type ForeignKeyDefinition, type IndexDefinition, type InferInput, type InferOutput, type JsonArray, type JsonObject, type JsonValue, JsonlReader, JsonlWriter, LinesDB, RUNTIME, type RuntimeEnvironment, SCHEMA_EXTENSIONS, type SQLiteDatabase, type SQLiteStatement, type SchemaExtension, SchemaLoader, type SchemaOptions, type StandardSchema, type StandardSchemaIssue, type StandardSchemaResult, type Table, type TableConfig, type TableDefs, type TableSchema, type TableValidationOptions, TypeGenerator, type TypeGeneratorOptions, type ValidationError, type ValidationErrorDetail, type ValidationResult, defineSchema, detectRuntime, ensureTableRowsValid, extractTableNameFromSchemaFile, findSchemaFile, hasBackward, isSchemaFile, rewriteExtensionForImport };
|
|
599
|
+
export { type BiDirectionalSchema, type ColumnDefinition, type DatabaseConfig, DirectoryScanner, ErrorFormatter, type ErrorFormatterOptions, type ForeignKeyDefinition, type ForeignKeyErrorInfo, type IndexDefinition, type InferInput, type InferOutput, type JsonArray, type JsonObject, type JsonValue, JsonlReader, JsonlWriter, LinesDB, RUNTIME, type RuntimeEnvironment, SCHEMA_EXTENSIONS, type SQLiteDatabase, type SQLiteStatement, type SchemaExtension, SchemaLoader, type SchemaOptions, type StandardSchema, type StandardSchemaIssue, type StandardSchemaResult, type Table, type TableConfig, type TableDefs, type TableSchema, type TableValidationOptions, type TableValidationResult, TypeGenerator, type TypeGeneratorOptions, type ValidationError, type ValidationErrorDetail, type ValidationErrorInfo, type ValidationResult, defineSchema, detectRuntime, ensureTableRowsValid, extractTableNameFromSchemaFile, findSchemaFile, hasBackward, isSchemaFile, rewriteExtensionForImport };
|
|
531
600
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/sqlite-adapter.ts","../src/types.ts","../src/database.ts","../src/jsonl-reader.ts","../src/jsonl-writer.ts","../src/schema-loader.ts","../src/directory-scanner.ts","../src/schema.ts","../src/type-generator.ts","../src/jsonl-migration.ts","../src/schema-extensions.ts","../src/runtime.ts"],"sourcesContent":[],"mappings":";;;;;;;AASA;AAMA;;UANiB,cAAA;wBACO;ECPZ,IAAA,CAAA,GAAK,EAAA,MAAA,CAAA,EAAA,IAAG;EACR,KAAA,EAAA,EAAA,IAAA;;AACY,UDUP,eAAA,CCVO;EACP,GAAA,CAAA,GAAA,MAAA,EAAA,GAAA,EAAA,CAAA,EAAA;IAAQ,OAAA,EAAA,MAAA;IACJ,eAAA,EAAA,MAAA,GAAA,MAAA;EAAO,CAAA;EAAxB,GAAA,CAAA,GAAA,MAAA,EAAA,GAAA,EAAA,CAAA,EAAA,GAAA;EAAgB,GAAA,CAAA,GAAA,MAAA,EAAA,GAAA,EAAA,CAAA,EAAA,GAAA,EAAA;AACpB;;;KALY,KAAA,GAAQ;KACR,6BACI,QAAQ,sBACP,QAAQ,SACrB,iBAAiB,OAAO;ADEX,KCDL,oBDCmB,CACP,MAAA,CAAA,GCFmB,gBAAA,CAAiB,MDErB,CCF4B,MDE5B,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MA;AAciB,iBSyCD,yBAAA,CTzCqB,QAAA,EAAA,MAAA,CAAA,EAAA,MAAA;;;;;;AD/BpB,KWLL,kBAAA,GXMY,MAAA,GAAA,SAAe;AAKtB,iBWTD,aAAA,CAAA,CXSgB,EWTC,kBXSD;cWAnB,SAAO"}
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/sqlite-adapter.ts","../src/types.ts","../src/database.ts","../src/jsonl-reader.ts","../src/jsonl-writer.ts","../src/schema-loader.ts","../src/directory-scanner.ts","../src/schema.ts","../src/type-generator.ts","../src/jsonl-migration.ts","../src/schema-extensions.ts","../src/error-formatter.ts","../src/runtime.ts"],"sourcesContent":[],"mappings":";;;;;;;AASA;AAMA;;UANiB,cAAA;wBACO;ECPZ,IAAA,CAAA,GAAK,EAAA,MAAA,CAAA,EAAG,IAAA;EACR,KAAA,EAAA,EAAA,IAAA;;AACY,UDUP,eAAA,CCVO;EACP,GAAA,CAAA,GAAA,MAAA,EAAA,GAAA,EAAA,CAAA,EAAA;IAAQ,OAAA,EAAA,MAAA;IACJ,eAAA,EAAA,MAAA,GAAA,MAAA;EAAO,CAAA;EAAxB,GAAA,CAAA,GAAA,MAAA,EAAA,GAAA,EAAA,CAAA,EAAA,GAAA;EAAgB,GAAA,CAAA,GAAA,MAAA,EAAA,GAAA,EAAA,CAAA,EAAA,GAAA,EAAA;AACpB;;;KALY,KAAA,GAAQ;KACR,6BACI,QAAQ,sBACP,QAAQ,SACrB,iBAAiB,OAAO;ADEX,KCDL,oBDCmB,CACP,MAAA,CAAA,GCFmB,gBAAA,CAAiB,MDErB,CCF4B,MDE5B,CAAA;AAKtB,KCNL,mBAAA,GAAsB,gBAAA,CAAiB,KDMnB;KCCpB,kBAAgB,YAAU,qCAAqC;KAC/D,mBAAiB,YAAU,qCAAqC;AAdhE,UAiBK,qBAAA,CAjBS;EACd,SAAA,EAAA,MAAc;EACV,KAAA,EAAA,OAAA;EAAQ,QAAA,EAAA,MAAA;EACP,MAA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