@toiroakr/lines-db 0.9.2 → 0.10.1

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/index.d.cts DELETED
@@ -1,604 +0,0 @@
1
- import { StandardSchemaV1 } from "@standard-schema/spec";
2
-
3
- //#region src/sqlite-adapter.d.ts
4
- /**
5
- * SQLite adapter for Node.js
6
- */
7
- /**
8
- * Common interface for SQLite database
9
- */
10
- interface SQLiteDatabase {
11
- prepare(sql: string): SQLiteStatement;
12
- exec(sql: string): void;
13
- close(): void;
14
- }
15
- interface SQLiteStatement {
16
- run(...params: any[]): {
17
- changes: number;
18
- lastInsertRowid: number | bigint;
19
- };
20
- get(...params: any[]): any;
21
- all(...params: any[]): any[];
22
- }
23
- //#endregion
24
- //#region src/types.d.ts
25
- type Table = Record<string, unknown>;
26
- type StandardSchema<Input extends Table = Table, Output extends Table = Input> = StandardSchemaV1<Input, Output>;
27
- type StandardSchemaResult<Output> = StandardSchemaV1.Result<Output>;
28
- type StandardSchemaIssue = StandardSchemaV1.Issue;
29
- type InferInput<T> = T extends StandardSchemaV1<infer I, unknown> ? I : never;
30
- type InferOutput<T> = T extends StandardSchemaV1<unknown, infer O> ? O : never;
31
- interface TableValidationResult {
32
- tableName: string;
33
- valid: boolean;
34
- rowCount: number;
35
- errors: ValidationErrorDetail[];
36
- warnings: string[];
37
- }
38
- interface ValidationResult {
39
- valid: boolean;
40
- errors: ValidationErrorDetail[];
41
- warnings: string[];
42
- tableResults: TableValidationResult[];
43
- }
44
- interface ValidationErrorDetail {
45
- file: string;
46
- tableName: string;
47
- rowIndex: number;
48
- issues: ReadonlyArray<StandardSchemaIssue>;
49
- type?: 'schema' | 'foreignKey';
50
- foreignKeyError?: {
51
- column: string;
52
- value: unknown;
53
- referencedTable: string;
54
- referencedColumn: string;
55
- };
56
- }
57
- interface ForeignKeyDefinition {
58
- column: string;
59
- references: {
60
- table: string;
61
- column: string;
62
- };
63
- onDelete?: 'CASCADE' | 'SET NULL' | 'RESTRICT' | 'NO ACTION';
64
- onUpdate?: 'CASCADE' | 'SET NULL' | 'RESTRICT' | 'NO ACTION';
65
- }
66
- interface IndexDefinition {
67
- name?: string;
68
- columns: string[];
69
- unique?: boolean;
70
- }
71
- interface TableSchema {
72
- name: string;
73
- columns: ColumnDefinition[];
74
- foreignKeys?: ForeignKeyDefinition[];
75
- indexes?: IndexDefinition[];
76
- }
77
- interface ColumnDefinition {
78
- name: string;
79
- type: 'TEXT' | 'INTEGER' | 'REAL' | 'BLOB' | 'NULL' | 'JSON';
80
- primaryKey?: boolean;
81
- notNull?: boolean;
82
- unique?: boolean;
83
- valueType?: 'boolean';
84
- }
85
- type TableDefs = Record<string, Table>;
86
- declare const TABLES_BRAND: unique symbol;
87
- interface DatabaseConfig<_Tables extends TableDefs = TableDefs> {
88
- dataDir: string;
89
- readonly [TABLES_BRAND]?: _Tables;
90
- }
91
- interface TableConfig {
92
- jsonlPath: string;
93
- schema?: TableSchema;
94
- autoInferSchema?: boolean;
95
- validationSchema?: StandardSchema;
96
- }
97
- interface ValidationError extends Error {
98
- name: 'ValidationError';
99
- issues: ReadonlyArray<StandardSchemaIssue>;
100
- }
101
- type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
102
- interface JsonObject {
103
- [key: string]: JsonValue;
104
- }
105
- type JsonArray = JsonValue[];
106
- type WhereValue<T> = T | ((value: T) => boolean);
107
- type WhereObject<T extends Table> = { [K in keyof T]?: WhereValue<T[K]> };
108
- type WhereCondition<T extends Table> = WhereObject<T> | WhereConditionArray<T>;
109
- type WhereConditionArray<T extends Table> = Array<WhereObject<T> | WhereConditionArray<T>>;
110
- //#endregion
111
- //#region src/database.d.ts
112
- declare class LinesDB<Tables extends TableDefs> {
113
- private db;
114
- private config;
115
- private schemas;
116
- private validationSchemas;
117
- private tables;
118
- private inTransaction;
119
- private constructor();
120
- static create<Tables extends TableDefs>(config: DatabaseConfig<Tables>, dbPath?: string): LinesDB<Tables>;
121
- /**
122
- * Initialize database by loading all JSONL files or a specific table
123
- * Uses dependency resolution to ensure foreign key references are loaded in correct order
124
- * @param options Optional configuration for initialization
125
- * @param options.tableName Optional table name to initialize. If not provided, initializes all tables
126
- * @param options.detailedValidate If true, performs detailed validation by inserting rows one by one to catch constraint violations
127
- * @param options.transform Optional transform function to apply to rows before validation (only applied to the specified tableName)
128
- * @returns ValidationResult containing validation status, errors, and warnings
129
- */
130
- initialize(options?: {
131
- tableName?: string;
132
- detailedValidate?: boolean;
133
- transform?: (row: JsonObject) => JsonObject;
134
- }): Promise<ValidationResult>;
135
- /**
136
- * Load a table and its dependencies recursively
137
- */
138
- private loadTableWithDependencies;
139
- /**
140
- * Load a single table from JSONL file
141
- * @returns Object with loaded status and validation errors
142
- */
143
- private loadTable;
144
- /**
145
- * Create table in SQLite with constraints and indexes
146
- */
147
- private createTable;
148
- /**
149
- * Quote table name to handle special characters in SQL
150
- */
151
- private quoteTableName;
152
- /**
153
- * Quote identifier for SQL statements, escaping embedded quotes
154
- */
155
- private quoteIdentifier;
156
- /**
157
- * Insert data into table using batch insert (multiple rows per SQL)
158
- * SQLite has a parameter limit (default 999), so we batch rows accordingly
159
- * Throws exception if any constraint violation occurs
160
- */
161
- private insertData;
162
- /**
163
- * Insert data into table one row at a time with detailed error reporting
164
- * This is used for validation to catch constraint violations
165
- */
166
- private insertDataWithDetailedValidation;
167
- /**
168
- * Analyze constraint error and extract detailed information
169
- */
170
- private analyzeConstraintError;
171
- /**
172
- * Validate a deferred foreign key constraint after all tables have been loaded.
173
- * Used for circular dependency FK validation.
174
- */
175
- private validateDeferredForeignKey;
176
- /**
177
- * Execute a raw SQL query
178
- */
179
- query<T = unknown>(sql: string, params?: (string | number | bigint | null | Uint8Array)[]): T[];
180
- /**
181
- * Execute a SQL query that returns a single row
182
- */
183
- queryOne<T = unknown>(sql: string, params?: (string | number | bigint | null | Uint8Array)[]): T | null;
184
- /**
185
- * Execute a SQL statement (INSERT, UPDATE, DELETE)
186
- */
187
- execute(sql: string, params?: (string | number | bigint | null | Uint8Array)[]): {
188
- changes: number | bigint;
189
- lastInsertRowid: number | bigint;
190
- };
191
- /**
192
- * Find rows by condition (supports OR/AND with arrays and function filters)
193
- * If where is not provided, returns all rows
194
- */
195
- find<K extends keyof Tables & string>(tableName: K, where?: WhereCondition<Tables[K]>): Tables[K][];
196
- /**
197
- * Find a single row by condition (supports OR/AND with arrays and function filters)
198
- */
199
- findOne<K extends keyof Tables & string>(tableName: K, where: WhereCondition<Tables[K]>): Tables[K] | null;
200
- /**
201
- * Deserialize JSON columns in a row
202
- */
203
- private deserializeRow;
204
- /**
205
- * Validate data using StandardSchema and return the transformed value
206
- * Note: Only synchronous validation is supported
207
- */
208
- private validateAndTransform;
209
- /**
210
- * Validate data using StandardSchema (without returning transformed value)
211
- * Note: Only synchronous validation is supported
212
- */
213
- private validateData;
214
- /**
215
- * Insert a row into a table with validation
216
- */
217
- insert<K extends keyof Tables & string>(tableName: K, data: Tables[K]): {
218
- changes: number | bigint;
219
- lastInsertRowid: number | bigint;
220
- };
221
- /**
222
- * Batch insert rows with validation per record.
223
- */
224
- batchInsert<K extends keyof Tables & string>(tableName: K, records: Tables[K][]): {
225
- changes: number | bigint;
226
- lastInsertRowid: number | bigint;
227
- };
228
- /**
229
- * Update rows in a table with validation (supports OR/AND with arrays)
230
- * Note: Function filters are not supported for update operations
231
- * Note: By default, validation is enabled. For partial updates, existing data is fetched
232
- * and merged before validation. Set options.validate = false to disable validation.
233
- */
234
- update<K extends keyof Tables & string>(tableName: K, data: Partial<Tables[K]>, where: WhereCondition<Tables[K]>, options?: {
235
- validate?: boolean;
236
- }): {
237
- changes: number | bigint;
238
- lastInsertRowid: number | bigint;
239
- };
240
- /**
241
- * Batch update rows with record-specific values and validation.
242
- * Each record must include the primary key to identify the target row.
243
- * Validation runs once per merged record unless explicitly disabled.
244
- */
245
- batchUpdate<K extends keyof Tables & string>(tableName: K, records: Array<Partial<Tables[K]> & Record<string, unknown>>, options?: {
246
- validate?: boolean;
247
- }): {
248
- changes: number | bigint;
249
- lastInsertRowid: number | bigint;
250
- };
251
- /**
252
- * Delete rows from a table (supports OR/AND with arrays)
253
- * Note: Function filters are not supported for delete operations
254
- */
255
- delete<K extends keyof Tables & string>(tableName: K, where: WhereCondition<Tables[K]>): {
256
- changes: number | bigint;
257
- lastInsertRowid: number | bigint;
258
- };
259
- /**
260
- * Batch delete rows by primary key.
261
- */
262
- batchDelete<K extends keyof Tables & string>(tableName: K, records: Array<Partial<Tables[K]> & Record<string, unknown>>): {
263
- changes: number | bigint;
264
- lastInsertRowid: number | bigint;
265
- };
266
- /**
267
- * Normalize value for SQLite
268
- */
269
- private normalizeValue;
270
- /**
271
- * Build WHERE clause from condition (supports OR/AND with arrays and functions)
272
- */
273
- private buildWhereClause;
274
- /**
275
- * Apply OR condition with function filters by evaluating each row against the condition
276
- */
277
- private applyOrConditionWithFilters;
278
- /**
279
- * Check if a row matches an OR/AND condition (recursively)
280
- */
281
- private matchesOrCondition;
282
- /**
283
- * Apply function filters to rows
284
- */
285
- private applyFunctionFilters;
286
- /**
287
- * Get table schema
288
- */
289
- getSchema(tableName: string): TableSchema | undefined;
290
- /**
291
- * Get all table names
292
- */
293
- getTableNames(): string[];
294
- /**
295
- * Sync a specific table back to its JSONL file
296
- * Uses backward transformation when available
297
- */
298
- private syncTable;
299
- /**
300
- * Sync database changes back to JSONL files
301
- * Uses backward transformation when available
302
- * @param tableName Optional table name to sync. If not provided, syncs all loaded tables
303
- */
304
- sync(tableName?: string): Promise<void>;
305
- /**
306
- * Execute a function within a transaction
307
- * Automatically commits on success or rolls back on error
308
- */
309
- transaction<T>(fn: (tx: LinesDB<Tables>) => Promise<T> | T): Promise<T>;
310
- /**
311
- * Close the database connection
312
- */
313
- close(): Promise<void>;
314
- /**
315
- * Get the underlying SQLite database instance
316
- */
317
- getDb(): SQLiteDatabase;
318
- }
319
- //#endregion
320
- //#region src/jsonl-reader.d.ts
321
- declare class JsonlReader {
322
- private static overrides;
323
- /**
324
- * Temporarily override the data returned for specific JSONL files.
325
- * Useful for scenarios like migration validation where in-memory data should be used.
326
- */
327
- static withOverrides<T>(overrides: Map<string, JsonObject[]>, fn: () => Promise<T>): Promise<T>;
328
- /**
329
- * Read JSONL file and parse each line as JSON
330
- */
331
- static read(filePath: string): Promise<JsonObject[]>;
332
- /**
333
- * Infer schema from JSONL data
334
- */
335
- static inferSchema(tableName: string, data: JsonObject[]): TableSchema;
336
- private static inferType;
337
- }
338
- //#endregion
339
- //#region src/jsonl-writer.d.ts
340
- declare class JsonlWriter {
341
- /**
342
- * Write data to JSONL file
343
- */
344
- static write(filePath: string, data: JsonObject[]): Promise<void>;
345
- /**
346
- * Append data to JSONL file
347
- */
348
- static append(filePath: string, data: JsonObject[]): Promise<void>;
349
- }
350
- //#endregion
351
- //#region src/schema-loader.d.ts
352
- declare class SchemaLoader {
353
- /**
354
- * Check if a schema file exists for a table
355
- */
356
- static hasSchema(jsonlPath: string): Promise<boolean>;
357
- /**
358
- * Load a validation schema file for a table
359
- * Requires ${tableName}.schema.{ts,mts,cts} to exist alongside the JSONL file
360
- */
361
- static loadSchema(jsonlPath: string): Promise<StandardSchema>;
362
- /**
363
- * Check if an object implements the StandardSchema interface
364
- */
365
- private static isStandardSchema;
366
- }
367
- //#endregion
368
- //#region src/directory-scanner.d.ts
369
- declare class DirectoryScanner {
370
- /**
371
- * Scan directory for JSONL files and create table configurations
372
- */
373
- static scanDirectory(dataDir: string): Promise<Map<string, TableConfig>>;
374
- }
375
- //#endregion
376
- //#region src/schema.d.ts
377
- /**
378
- * Schema options for defining constraints and indexes
379
- * When Input and Output types differ, backward transformation is required
380
- */
381
- type SchemaOptions<Input extends Table, Output extends Table> = {
382
- /**
383
- * Primary key column
384
- */
385
- primaryKey?: string;
386
- /**
387
- * Foreign key constraints
388
- */
389
- foreignKeys?: ForeignKeyDefinition[];
390
- /**
391
- * Indexes to create
392
- */
393
- indexes?: IndexDefinition[];
394
- } & (Output extends Input ? {
395
- /**
396
- * Backward transformation from Output to Input (optional when output is substitutable for input)
397
- */
398
- backward?: (output: Output) => Input;
399
- } : {
400
- /**
401
- * Backward transformation from Output to Input (REQUIRED when types differ)
402
- */
403
- backward: (output: Output) => Input;
404
- });
405
- /**
406
- * BiDirectional Schema interface
407
- * Extends StandardSchema with optional backward transformation and schema metadata
408
- */
409
- interface BiDirectionalSchema<Input extends Table = Table, Output extends Table = Input> extends StandardSchema<Input, Output> {
410
- /**
411
- * Backward transformation from Output to Input
412
- * Required when Input and Output types differ (e.g., with transformations)
413
- */
414
- backward?: (output: Output) => Input;
415
- /**
416
- * Primary key column
417
- */
418
- primaryKey?: string;
419
- /**
420
- * Foreign key constraints
421
- */
422
- foreignKeys?: ForeignKeyDefinition[];
423
- /**
424
- * Indexes to create
425
- */
426
- indexes?: IndexDefinition[];
427
- }
428
- /**
429
- * Define a bidirectional schema with optional backward transformation
430
- *
431
- * @param schema - Standard Schema for validation
432
- * @param options - SchemaOptions object. When Input and Output types differ, backward transformation is required
433
- *
434
- * @example
435
- * // No transformation - backward not needed
436
- * const schema = defineSchema(
437
- * v.object({ id: v.number(), name: v.string() })
438
- * );
439
- *
440
- * @example
441
- * // With transformation - backward REQUIRED
442
- * const schema = defineSchema(
443
- * v.pipe(v.string(), v.transform(Number)),
444
- * {
445
- * backward: (num) => String(num) // backward: number → string (REQUIRED)
446
- * }
447
- * );
448
- *
449
- * @example
450
- * // With primary key and foreign key
451
- * const schema = defineSchema(
452
- * v.object({ id: v.number(), customerId: v.number() }),
453
- * {
454
- * primaryKey: 'id',
455
- * foreignKeys: [
456
- * { column: 'customerId', references: { table: 'users', column: 'id' } }
457
- * ]
458
- * }
459
- * );
460
- */
461
- declare function defineSchema<Input extends Table, Output extends Table>(schema: StandardSchema<Input, Output>, ...args: Output extends Input ? [options?: SchemaOptions<Input, Output>] : [options: SchemaOptions<Input, Output>]): BiDirectionalSchema<Input, Output>;
462
- /**
463
- * Check if a schema has backward transformation
464
- */
465
- declare function hasBackward<Input extends Table, Output extends Table>(schema: StandardSchema<Input, Output>): schema is BiDirectionalSchema<Input, Output>;
466
- //#endregion
467
- //#region src/type-generator.d.ts
468
- interface TypeGeneratorOptions {
469
- dataDir: string;
470
- projectRoot?: string;
471
- output?: string;
472
- }
473
- declare class TypeGenerator {
474
- private dataDir;
475
- private projectRoot;
476
- private outputFile;
477
- private dataDirPath;
478
- constructor(options: TypeGeneratorOptions);
479
- /**
480
- * Generate types file from JSONL files and their optional schema files.
481
- */
482
- generate(): Promise<string>;
483
- /**
484
- * Find all *.jsonl files and check if they have corresponding *.schema.ts files
485
- */
486
- private findTables;
487
- /**
488
- * Generate type declaration content
489
- */
490
- private generateTypeDeclarations;
491
- private createSchemaIdentifier;
492
- private formatTableKey;
493
- }
494
- //#endregion
495
- //#region src/jsonl-migration.d.ts
496
- interface TableValidationOptions {
497
- dataDir: string;
498
- tableName: string;
499
- rows: JsonObject[];
500
- }
501
- /**
502
- * Validate a table by temporarily supplying in-memory rows while reusing the existing LinesDB validation pipeline.
503
- * If validation fails, throws an error with validation details.
504
- */
505
- declare function ensureTableRowsValid(options: TableValidationOptions): Promise<void>;
506
- //#endregion
507
- //#region src/schema-extensions.d.ts
508
- /**
509
- * Supported schema file extensions, in priority order.
510
- * The first match wins when discovering schema files.
511
- */
512
- declare const SCHEMA_EXTENSIONS: readonly [".schema.ts", ".schema.mts", ".schema.cts"];
513
- type SchemaExtension = (typeof SCHEMA_EXTENSIONS)[number];
514
- /**
515
- * Try each supported schema extension and return the full path of the first
516
- * one that exists on disk. Returns undefined if none is found.
517
- */
518
- declare function findSchemaFile(dir: string, tableName: string): Promise<string | undefined>;
519
- /**
520
- * Check if a filename matches any supported schema file pattern.
521
- */
522
- declare function isSchemaFile(fileName: string): boolean;
523
- /**
524
- * Extract table name from a schema filename.
525
- * e.g., "users.schema.ts" -> "users", "users.schema.mts" -> "users"
526
- */
527
- declare function extractTableNameFromSchemaFile(fileName: string): string | null;
528
- /**
529
- * Rewrite a TypeScript path to its JavaScript counterpart for ESM imports.
530
- * ".schema.ts" -> ".schema.js", ".schema.mts" -> ".schema.mjs", ".schema.cts" -> ".schema.cjs"
531
- */
532
- declare function rewriteExtensionForImport(filePath: string): string;
533
- //#endregion
534
- //#region src/error-formatter.d.ts
535
- interface ValidationErrorInfo {
536
- file: string;
537
- rowIndex: number;
538
- issues: ReadonlyArray<StandardSchemaIssue>;
539
- data?: unknown;
540
- originalData?: unknown;
541
- }
542
- interface ForeignKeyErrorInfo {
543
- file: string;
544
- rowIndex: number;
545
- column: string;
546
- value: unknown;
547
- referencedTable: string;
548
- referencedColumn: string;
549
- data?: unknown;
550
- }
551
- interface ErrorFormatterOptions {
552
- verbose?: boolean;
553
- }
554
- declare class ErrorFormatter {
555
- private verbose;
556
- constructor(options?: ErrorFormatterOptions);
557
- /**
558
- * Format validation errors
559
- */
560
- formatValidationErrors(errors: ValidationErrorInfo[]): string;
561
- /**
562
- * Format foreign key error
563
- */
564
- formatForeignKeyError(error: ForeignKeyErrorInfo): string;
565
- /**
566
- * Format compact (default) validation errors
567
- */
568
- private formatValidationErrorsCompact;
569
- /**
570
- * Format verbose validation errors
571
- */
572
- private formatValidationErrorsVerbose;
573
- /**
574
- * Format compact foreign key error
575
- */
576
- private formatForeignKeyErrorCompact;
577
- /**
578
- * Format verbose foreign key error
579
- */
580
- private formatForeignKeyErrorVerbose;
581
- /**
582
- * Get field path from issue
583
- */
584
- private getFieldPath;
585
- /**
586
- * Format error header with count
587
- */
588
- formatErrorHeader(count: number, file?: string): string;
589
- /**
590
- * Format migration failure header
591
- */
592
- formatMigrationFailureHeader(): string;
593
- }
594
- //#endregion
595
- //#region src/runtime.d.ts
596
- /**
597
- * Runtime detection utilities
598
- */
599
- type RuntimeEnvironment = 'node' | 'unknown';
600
- declare function detectRuntime(): RuntimeEnvironment;
601
- declare const RUNTIME: RuntimeEnvironment;
602
- //#endregion
603
- 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 };
604
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
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"],"mappings":";;;;;;AASA;;;AAAA,UAAiB,cAAA;EACf,OAAA,CAAQ,GAAA,WAAc,eAAA;EACtB,IAAA,CAAK,GAAA;EACL,KAAA;AAAA;AAAA,UAGe,eAAA;EACf,GAAA,IAAO,MAAA;IAAkB,OAAA;IAAiB,eAAA;EAAA;EAC1C,GAAA,IAAO,MAAA;EACP,GAAA,IAAO,MAAA;AAAA;;;KCfG,KAAA,GAAQ,MAAA;AAAA,KACR,cAAA,eAA6B,KAAA,GAAQ,KAAA,iBAAsB,KAAA,GAAQ,KAAA,IAAS,gBAAA,CAAiB,KAAA,EAAO,MAAA;AAAA,KACpG,oBAAA,WAA+B,gBAAA,CAAiB,MAAA,CAAO,MAAA;AAAA,KACvD,mBAAA,GAAsB,gBAAA,CAA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