ts-runtime-validation 1.7.0 → 1.8.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.
Files changed (43) hide show
  1. package/README.md +93 -30
  2. package/dist/SchemaGenerator.deterministic-extended.test.js +420 -0
  3. package/dist/SchemaGenerator.deterministic-extended.test.js.map +1 -0
  4. package/dist/SchemaGenerator.deterministic.test.js +251 -0
  5. package/dist/SchemaGenerator.deterministic.test.js.map +1 -0
  6. package/dist/SchemaGenerator.integration.test.js +3 -3
  7. package/dist/SchemaGenerator.integration.test.js.map +1 -1
  8. package/dist/SchemaGenerator.test.js +94 -0
  9. package/dist/SchemaGenerator.test.js.map +1 -1
  10. package/dist/cli.test.js +155 -0
  11. package/dist/cli.test.js.map +1 -0
  12. package/dist/index.js +1 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/services/CodeGenerator.js +29 -13
  15. package/dist/services/CodeGenerator.js.map +1 -1
  16. package/dist/services/FileDiscovery.js +4 -2
  17. package/dist/services/FileDiscovery.js.map +1 -1
  18. package/dist/services/FileDiscovery.test.js +1 -1
  19. package/dist/services/FileDiscovery.test.js.map +1 -1
  20. package/dist/services/SchemaProcessor.js +27 -11
  21. package/dist/services/SchemaProcessor.js.map +1 -1
  22. package/dist/services/SchemaProcessor.test.js +61 -1
  23. package/dist/services/SchemaProcessor.test.js.map +1 -1
  24. package/dist/services/SchemaWriter.test.js +1 -1
  25. package/dist/services/SchemaWriter.test.js.map +1 -1
  26. package/package.json +1 -1
  27. package/src/SchemaGenerator.deterministic-extended.test.ts +429 -0
  28. package/src/SchemaGenerator.deterministic.test.ts +276 -0
  29. package/src/SchemaGenerator.integration.test.ts +3 -3
  30. package/src/SchemaGenerator.test.ts +111 -0
  31. package/src/cli.test.ts +130 -0
  32. package/src/index.ts +1 -1
  33. package/src/services/CodeGenerator.ts +30 -12
  34. package/src/services/FileDiscovery.test.ts +1 -1
  35. package/src/services/FileDiscovery.ts +5 -2
  36. package/src/services/SchemaProcessor.test.ts +73 -1
  37. package/src/services/SchemaProcessor.ts +30 -9
  38. package/src/services/SchemaWriter.test.ts +1 -1
  39. package/.claude/settings.local.json +0 -9
  40. package/dist/test/output/duplicate-symbols-identitcal-implementation/ValidationType.js +0 -3
  41. package/dist/test/output/duplicate-symbols-identitcal-implementation/ValidationType.js.map +0 -1
  42. package/dist/test/output/duplicate-symbols-identitcal-implementation/isValidSchema.js +0 -49
  43. package/dist/test/output/duplicate-symbols-identitcal-implementation/isValidSchema.js.map +0 -1
package/README.md CHANGED
@@ -2,11 +2,14 @@
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/ts-runtime-validation.svg)](https://www.npmjs.com/package/ts-runtime-validation)
4
4
 
5
- Generate bulletproof runtime type validation from your TypeScript interfaces and type aliases. No manual schema writing, no decorators, just your existing TypeScript types.
5
+ Automatically generate type-safe runtime validation from your existing TypeScript interfaces. Zero configuration, zero decorators - just add JSDoc comments for validation rules and get bulletproof runtime type checking with full TypeScript support.
6
+
7
+ 📖 **[Project Marketing Page](https://www.thegalah.com/projects/ts-runtime-validation)**
6
8
 
7
9
  ## ✨ Features
8
10
 
9
11
  ### Core Features
12
+
10
13
  - 🚀 **Zero-effort validation** - Automatically generates JSON Schema validators from TypeScript interfaces
11
14
  - 🔒 **Type-safe** - Full TypeScript support with type inference and type guards
12
15
  - 📦 **Lightweight** - Minimal dependencies, can be installed as a dev dependency
@@ -15,6 +18,7 @@ Generate bulletproof runtime type validation from your TypeScript interfaces and
15
18
  - 📝 **JSDoc annotations** - Add validation rules (min/max length, patterns, formats) directly in your TypeScript code
16
19
 
17
20
  ### Performance & Optimization
21
+
18
22
  - ⚡ **Incremental builds** - File-based caching for faster subsequent builds
19
23
  - 🔄 **Parallel processing** - Concurrent file processing for improved performance
20
24
  - 📊 **Progress reporting** - Visual feedback for long-running operations
@@ -182,7 +186,7 @@ Output Optimization:
182
186
  --minify Minify generated JSON schemas
183
187
  --tree-shaking Generate tree-shaking friendly exports
184
188
  --lazy-load Generate lazy-loaded validators
185
-
189
+
186
190
  General:
187
191
  -h, --help Display help information
188
192
  ```
@@ -191,12 +195,12 @@ General:
191
195
 
192
196
  The tool generates optimized files in your output directory:
193
197
 
194
- | File | Description | Optimizations |
195
- | ------------------------ | ----------------------------------------------------- | -------------------------------- |
196
- | `validation.schema.json` | JSON Schema definitions for all your types | Minification with `--minify` |
197
- | `SchemaDefinition.ts` | TypeScript interface mapping schema paths to types | Tree-shaking ready imports |
198
- | `isValidSchema.ts` | Type guard helper with runtime validation | Lazy loading with `--lazy-load` |
199
- | `ValidationType.ts` | Centralized type exports | Individual exports or namespace |
198
+ | File | Description | Optimizations |
199
+ | ------------------------ | -------------------------------------------------- | ------------------------------- |
200
+ | `validation.schema.json` | JSON Schema definitions for all your types | Minification with `--minify` |
201
+ | `SchemaDefinition.ts` | TypeScript interface mapping schema paths to types | Tree-shaking ready imports |
202
+ | `isValidSchema.ts` | Type guard helper with runtime validation | Lazy loading with `--lazy-load` |
203
+ | `ValidationType.ts` | Centralized type exports | Individual exports or namespace |
200
204
 
201
205
  ### Programmatic API
202
206
 
@@ -210,7 +214,7 @@ const generator = new SchemaGenerator({
210
214
  output: "./validation",
211
215
  helpers: true,
212
216
  additionalProperties: false,
213
- tsconfigPath: ""
217
+ tsconfigPath: "",
214
218
  });
215
219
 
216
220
  await generator.Generate();
@@ -224,10 +228,10 @@ const devGenerator = new SchemaGenerator({
224
228
  additionalProperties: false,
225
229
  tsconfigPath: "",
226
230
  // Development optimizations
227
- cache: true, // Enable incremental builds
228
- progress: true, // Show progress feedback
229
- verbose: true, // Detailed logging
230
- parallel: true // Faster processing
231
+ cache: true, // Enable incremental builds
232
+ progress: true, // Show progress feedback
233
+ verbose: true, // Detailed logging
234
+ parallel: true, // Faster processing
231
235
  });
232
236
 
233
237
  // Production configuration (optimized output)
@@ -239,11 +243,11 @@ const prodGenerator = new SchemaGenerator({
239
243
  additionalProperties: false,
240
244
  tsconfigPath: "./tsconfig.json",
241
245
  // Production optimizations
242
- cache: true, // Faster builds
243
- minify: true, // Smaller output files
244
- treeShaking: true, // Bundle optimization
245
- lazyLoad: false, // Eager loading for performance
246
- parallel: true // Maximum speed
246
+ cache: true, // Faster builds
247
+ minify: true, // Smaller output files
248
+ treeShaking: true, // Bundle optimization
249
+ lazyLoad: false, // Eager loading for performance
250
+ parallel: true, // Maximum speed
247
251
  });
248
252
 
249
253
  // Large project configuration (memory efficient)
@@ -254,25 +258,25 @@ const largeProjectGenerator = new SchemaGenerator({
254
258
  helpers: true,
255
259
  additionalProperties: false,
256
260
  tsconfigPath: "",
257
- // Large project optimizations
258
- cache: true, // Essential for large projects
259
- progress: true, // Track long operations
260
- lazyLoad: true, // Reduce initial memory usage
261
- treeShaking: true, // Optimize bundle size
262
- minify: true // Reduce file size
261
+ // Large project optimizations
262
+ cache: true, // Essential for large projects
263
+ progress: true, // Track long operations
264
+ lazyLoad: true, // Reduce initial memory usage
265
+ treeShaking: true, // Optimize bundle size
266
+ minify: true, // Reduce file size
263
267
  });
264
268
 
265
269
  // Execute generation
266
270
  try {
267
271
  await generator.Generate();
268
- console.log('Schema generation completed successfully!');
272
+ console.log("Schema generation completed successfully!");
269
273
  } catch (error) {
270
- console.error('Generation failed:', error.message);
274
+ console.error("Generation failed:", error.message);
271
275
  }
272
276
 
273
277
  // Utility methods
274
- generator.clearCache(); // Clear file cache
275
- await generator.cleanOutput(); // Remove generated files
278
+ generator.clearCache(); // Clear file cache
279
+ await generator.cleanOutput(); // Remove generated files
276
280
  ```
277
281
 
278
282
  ### Watch Mode & Development Workflows
@@ -330,26 +334,48 @@ ts-runtime-validation --cache
330
334
  ```
331
335
 
332
336
  **How it works:**
337
+
333
338
  - Generates MD5 hashes of source files to detect changes
334
339
  - Stores cache in `.ts-runtime-validation-cache/`
335
340
  - Only processes files that have been modified
336
341
  - Provides significant speedup for large projects
337
342
 
343
+ **Clearing the cache:**
344
+
345
+ If you encounter issues with stale generated files or need to force a full regeneration:
346
+
347
+ ```bash
348
+ # Method 1: Delete cache directory
349
+ rm -rf .ts-runtime-validation-cache
350
+
351
+ # Method 2: Using programmatic API
352
+ const generator = new SchemaGenerator(options);
353
+ generator.clearCache();
354
+
355
+ # Method 3: Add a clean script to package.json
356
+ "scripts": {
357
+ "generate-types:clean": "rm -rf .ts-runtime-validation-cache && ts-runtime-validation --cache"
358
+ }
359
+ ```
360
+
338
361
  ### Performance Tips
339
362
 
340
363
  **Development Workflow:**
364
+
341
365
  ```bash
342
366
  # Fast iterations with caching and progress
343
367
  ts-runtime-validation --cache --progress --verbose
344
368
  ```
345
369
 
346
370
  **Production Builds:**
371
+
347
372
  ```bash
348
373
  # Optimized output for deployment
349
374
  ts-runtime-validation --cache --minify --tree-shaking
350
375
  ```
351
376
 
352
377
  **Large Projects:**
378
+
353
379
  ```bash
354
380
  # Memory efficient processing
355
381
  ts-runtime-validation --cache --lazy-load --progress
@@ -358,18 +384,21 @@ ts-runtime-validation --cache --lazy-load --progress
358
384
  ### Bundle Optimization
359
385
 
360
386
  **Tree-shaking friendly exports:**
387
+
361
388
  ```typescript
362
389
  // With --tree-shaking flag
363
- export type IUser = _IUser; // Individual exports
390
+ export type IUser = _IUser; // Individual exports
364
391
  export type IProduct = _IProduct;
365
392
 
366
393
  // Default behavior
367
- namespace ValidationType { // Namespace exports
394
+ namespace ValidationType {
395
+ // Namespace exports
368
396
  export type IUser = _IUser;
369
397
  }
370
398
  ```
371
399
 
372
400
  **Lazy-loaded validators:**
401
+
373
402
  ```typescript
374
403
  // With --lazy-load flag
375
404
  let validator: any = null;
@@ -426,6 +455,7 @@ ts-runtime-validation uses a modern service-oriented architecture:
426
455
  ### Contributing Guidelines
427
456
 
428
457
  See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed information about:
458
+
429
459
  - Service-oriented architecture patterns
430
460
  - Error handling strategies
431
461
  - Performance optimization techniques
@@ -488,3 +518,36 @@ Choose **alternatives** when you:
488
518
  - Prefer schema-first design (define validation, derive types)
489
519
  - Need complex runtime transformations or coercions
490
520
  - Want extensive built-in validation methods and error messages
521
+
522
+ ## 🔧 Troubleshooting
523
+
524
+ ### Generated files are not updating
525
+
526
+ If your generated files seem stale or aren't reflecting recent changes:
527
+
528
+ ```bash
529
+ # Clear the cache and regenerate
530
+ rm -rf .ts-runtime-validation-cache
531
+ ts-runtime-validation --cache
532
+ ```
533
+
534
+ ### Hash inconsistencies between runs
535
+
536
+ Version 1.8.0+ includes fixes for deterministic output generation. If you're experiencing different file hashes between runs, ensure you're using the latest version.
537
+
538
+ ### Performance issues with large projects
539
+
540
+ For optimal performance with large codebases:
541
+
542
+ ```bash
543
+ # Enable all performance optimizations
544
+ ts-runtime-validation --cache --parallel --minify --tree-shaking
545
+ ```
546
+
547
+ ### Cache-related issues
548
+
549
+ The cache directory `.ts-runtime-validation-cache/` can occasionally become corrupted. If you experience unexpected behavior:
550
+
551
+ 1. Clear the cache directory: `rm -rf .ts-runtime-validation-cache`
552
+ 2. Run generation again with cache enabled: `ts-runtime-validation --cache`
553
+ 3. Add `.ts-runtime-validation-cache/` to your `.gitignore` file
@@ -0,0 +1,420 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ const SchemaGenerator_1 = require("./SchemaGenerator");
46
+ const fs = __importStar(require("fs"));
47
+ const path = __importStar(require("path"));
48
+ const crypto = __importStar(require("crypto"));
49
+ describe("SchemaGenerator - Extended Deterministic Tests", () => {
50
+ const baseTestDir = path.join(__dirname, "../.test-tmp/deterministic-extended");
51
+ const createTestEnv = (name) => {
52
+ const testDir = path.join(baseTestDir, name);
53
+ const outputDir1 = path.join(testDir, "output-1");
54
+ const outputDir2 = path.join(testDir, "output-2");
55
+ const srcDir = path.join(testDir, "src");
56
+ return { testDir, outputDir1, outputDir2, srcDir };
57
+ };
58
+ beforeEach(() => {
59
+ if (fs.existsSync(baseTestDir)) {
60
+ fs.rmSync(baseTestDir, { recursive: true, force: true });
61
+ }
62
+ });
63
+ afterEach(() => {
64
+ if (fs.existsSync(baseTestDir)) {
65
+ fs.rmSync(baseTestDir, { recursive: true, force: true });
66
+ }
67
+ });
68
+ const getFileHash = (filePath) => {
69
+ if (!fs.existsSync(filePath)) {
70
+ return "";
71
+ }
72
+ const content = fs.readFileSync(filePath, "utf-8");
73
+ return crypto.createHash("md5").update(content).digest("hex");
74
+ };
75
+ const compareDirectories = (dir1, dir2) => {
76
+ const files1 = fs.existsSync(dir1) ? fs.readdirSync(dir1).sort() : [];
77
+ const files2 = fs.existsSync(dir2) ? fs.readdirSync(dir2).sort() : [];
78
+ if (files1.length !== files2.length)
79
+ return false;
80
+ if (!files1.every((f, i) => f === files2[i]))
81
+ return false;
82
+ return files1.every(file => {
83
+ const hash1 = getFileHash(path.join(dir1, file));
84
+ const hash2 = getFileHash(path.join(dir2, file));
85
+ return hash1 === hash2;
86
+ });
87
+ };
88
+ const createTestFiles = (srcDir, files) => __awaiter(void 0, void 0, void 0, function* () {
89
+ yield fs.promises.mkdir(srcDir, { recursive: true });
90
+ for (const [filename, content] of Object.entries(files)) {
91
+ yield fs.promises.writeFile(path.join(srcDir, filename), content);
92
+ }
93
+ });
94
+ it("should generate identical output with complex nested interfaces", () => __awaiter(void 0, void 0, void 0, function* () {
95
+ const { srcDir, outputDir1, outputDir2 } = createTestEnv("nested-interfaces");
96
+ yield createTestFiles(srcDir, {
97
+ "user.jsonschema.ts": `
98
+ export interface IAddress {
99
+ street: string;
100
+ city: string;
101
+ country: string;
102
+ }
103
+
104
+ export interface IUser {
105
+ id: string;
106
+ name: string;
107
+ addresses: IAddress[];
108
+ metadata: {
109
+ created: Date;
110
+ updated: Date;
111
+ tags: string[];
112
+ };
113
+ }
114
+ `,
115
+ "product.jsonschema.ts": `
116
+ export interface ICategory {
117
+ id: number;
118
+ name: string;
119
+ parent?: ICategory;
120
+ }
121
+
122
+ export interface IProduct {
123
+ sku: string;
124
+ name: string;
125
+ price: number;
126
+ categories: ICategory[];
127
+ }
128
+ `
129
+ });
130
+ const baseOptions = {
131
+ glob: "**/*.jsonschema.ts",
132
+ rootPath: srcDir,
133
+ output: "",
134
+ tsconfigPath: "",
135
+ helpers: true,
136
+ additionalProperties: false,
137
+ verbose: false,
138
+ progress: false,
139
+ minify: false,
140
+ cache: false,
141
+ parallel: true,
142
+ treeShaking: false,
143
+ lazyLoad: false,
144
+ };
145
+ // Generate twice
146
+ const generator1 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, baseOptions), { output: outputDir1 }));
147
+ yield generator1.Generate();
148
+ const generator2 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, baseOptions), { output: outputDir2 }));
149
+ yield generator2.Generate();
150
+ expect(compareDirectories(outputDir1, outputDir2)).toBe(true);
151
+ }));
152
+ it("should maintain determinism with circular references", () => __awaiter(void 0, void 0, void 0, function* () {
153
+ const { srcDir, outputDir1, outputDir2 } = createTestEnv("circular-refs");
154
+ yield createTestFiles(srcDir, {
155
+ "models.jsonschema.ts": `
156
+ export interface INode {
157
+ id: string;
158
+ value: any;
159
+ parent?: INode;
160
+ children: INode[];
161
+ }
162
+
163
+ export interface IGraph {
164
+ nodes: INode[];
165
+ edges: IEdge[];
166
+ }
167
+
168
+ export interface IEdge {
169
+ from: INode;
170
+ to: INode;
171
+ weight?: number;
172
+ }
173
+ `
174
+ });
175
+ const options = {
176
+ glob: "**/*.jsonschema.ts",
177
+ rootPath: srcDir,
178
+ output: "",
179
+ tsconfigPath: "",
180
+ helpers: true,
181
+ additionalProperties: false,
182
+ verbose: false,
183
+ progress: false,
184
+ minify: false,
185
+ cache: false,
186
+ parallel: true,
187
+ treeShaking: false,
188
+ lazyLoad: false,
189
+ };
190
+ const generator1 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, options), { output: outputDir1 }));
191
+ yield generator1.Generate();
192
+ const generator2 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, options), { output: outputDir2 }));
193
+ yield generator2.Generate();
194
+ expect(compareDirectories(outputDir1, outputDir2)).toBe(true);
195
+ }));
196
+ it("should be deterministic with many files processed in parallel", () => __awaiter(void 0, void 0, void 0, function* () {
197
+ const { srcDir } = createTestEnv("many-files");
198
+ const files = {};
199
+ for (let i = 0; i < 5; i++) { // Reduced to 5 files for faster tests
200
+ files[`model${i}.jsonschema.ts`] = `
201
+ export interface IModel${i} {
202
+ id: string;
203
+ index: number;
204
+ data: {
205
+ value${i}: string;
206
+ timestamp: Date;
207
+ };
208
+ }
209
+
210
+ export type Model${i}Type = "type_${i}_a" | "type_${i}_b";
211
+ `;
212
+ }
213
+ yield createTestFiles(srcDir, files);
214
+ const options = {
215
+ glob: "**/*.jsonschema.ts",
216
+ rootPath: srcDir,
217
+ output: "",
218
+ tsconfigPath: "",
219
+ helpers: true,
220
+ additionalProperties: false,
221
+ verbose: false,
222
+ progress: false,
223
+ minify: false,
224
+ cache: false,
225
+ parallel: true,
226
+ treeShaking: false,
227
+ lazyLoad: false,
228
+ };
229
+ // Run multiple times to ensure consistency
230
+ const outputs = [];
231
+ for (let run = 0; run < 2; run++) { // Reduced from 3 to 2 runs
232
+ const outputDir = path.join(baseTestDir, `many-files/output-run-${run}`);
233
+ const generator = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, options), { output: outputDir }));
234
+ yield generator.Generate();
235
+ const schemaPath = path.join(outputDir, "validation.schema.json");
236
+ const hash = getFileHash(schemaPath);
237
+ outputs.push(hash);
238
+ }
239
+ // All runs should produce identical output
240
+ expect(outputs.every(h => h === outputs[0])).toBe(true);
241
+ }), 30000); // 30 second timeout for this test
242
+ it("should be deterministic with mixed export types", () => __awaiter(void 0, void 0, void 0, function* () {
243
+ const { srcDir, outputDir1, outputDir2 } = createTestEnv("mixed-exports");
244
+ yield createTestFiles(srcDir, {
245
+ "types.jsonschema.ts": `
246
+ export interface IInterface {
247
+ field: string;
248
+ }
249
+
250
+ export type StringAlias = string;
251
+
252
+ export type UnionType = "option1" | "option2" | "option3";
253
+
254
+ export type IntersectionType = IInterface & {
255
+ extra: number;
256
+ };
257
+
258
+ export enum Status {
259
+ Active = "ACTIVE",
260
+ Inactive = "INACTIVE",
261
+ Pending = "PENDING"
262
+ }
263
+
264
+ export type ComplexType = {
265
+ status: Status;
266
+ union: UnionType;
267
+ data: IInterface | null;
268
+ };
269
+ `
270
+ });
271
+ const options = {
272
+ glob: "**/*.jsonschema.ts",
273
+ rootPath: srcDir,
274
+ output: "",
275
+ tsconfigPath: "",
276
+ helpers: true,
277
+ additionalProperties: false,
278
+ verbose: false,
279
+ progress: false,
280
+ minify: false,
281
+ cache: false,
282
+ parallel: false, // Test with sequential processing too
283
+ treeShaking: false,
284
+ lazyLoad: false,
285
+ };
286
+ const generator1 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, options), { output: outputDir1 }));
287
+ yield generator1.Generate();
288
+ const generator2 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, options), { output: outputDir2, parallel: true }));
289
+ yield generator2.Generate();
290
+ expect(compareDirectories(outputDir1, outputDir2)).toBe(true);
291
+ }));
292
+ it("should maintain order with tree-shaking and lazy-loading enabled", () => __awaiter(void 0, void 0, void 0, function* () {
293
+ const { srcDir, outputDir1, outputDir2 } = createTestEnv("optimization-flags");
294
+ yield createTestFiles(srcDir, {
295
+ "api.jsonschema.ts": `
296
+ export interface IRequest {
297
+ method: string;
298
+ url: string;
299
+ headers: Record<string, string>;
300
+ body?: unknown;
301
+ }
302
+
303
+ export interface IResponse {
304
+ status: number;
305
+ headers: Record<string, string>;
306
+ data: unknown;
307
+ }
308
+ `
309
+ });
310
+ const baseOptions = {
311
+ glob: "**/*.jsonschema.ts",
312
+ rootPath: srcDir,
313
+ output: "",
314
+ tsconfigPath: "",
315
+ helpers: true,
316
+ additionalProperties: false,
317
+ verbose: false,
318
+ progress: false,
319
+ minify: true,
320
+ cache: false,
321
+ parallel: true,
322
+ treeShaking: true,
323
+ lazyLoad: true,
324
+ };
325
+ // Test multiple combinations
326
+ const generator1 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, baseOptions), { output: outputDir1 }));
327
+ yield generator1.Generate();
328
+ const generator2 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, baseOptions), { output: outputDir2 }));
329
+ yield generator2.Generate();
330
+ expect(compareDirectories(outputDir1, outputDir2)).toBe(true);
331
+ }));
332
+ it("should handle files with same symbols consistently", () => __awaiter(void 0, void 0, void 0, function* () {
333
+ const { srcDir, outputDir1, outputDir2 } = createTestEnv("duplicate-symbols");
334
+ yield createTestFiles(srcDir, {
335
+ "module1.jsonschema.ts": `
336
+ export interface IShared {
337
+ id: string;
338
+ name: string;
339
+ }
340
+
341
+ export interface IModule1 {
342
+ shared: IShared;
343
+ specific1: string;
344
+ }
345
+ `,
346
+ "module2.jsonschema.ts": `
347
+ export interface IShared {
348
+ id: string;
349
+ name: string;
350
+ }
351
+
352
+ export interface IModule2 {
353
+ shared: IShared;
354
+ specific2: number;
355
+ }
356
+ `
357
+ });
358
+ const options = {
359
+ glob: "**/*.jsonschema.ts",
360
+ rootPath: srcDir,
361
+ output: "",
362
+ tsconfigPath: "",
363
+ helpers: true,
364
+ additionalProperties: false,
365
+ verbose: false,
366
+ progress: false,
367
+ minify: false,
368
+ cache: false,
369
+ parallel: true,
370
+ treeShaking: false,
371
+ lazyLoad: false,
372
+ };
373
+ const generator1 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, options), { output: outputDir1 }));
374
+ yield generator1.Generate();
375
+ const generator2 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, options), { output: outputDir2 }));
376
+ yield generator2.Generate();
377
+ expect(compareDirectories(outputDir1, outputDir2)).toBe(true);
378
+ }));
379
+ it("should generate deterministic output with cache enabled", () => __awaiter(void 0, void 0, void 0, function* () {
380
+ const { srcDir, outputDir1, outputDir2 } = createTestEnv("with-cache");
381
+ yield createTestFiles(srcDir, {
382
+ "cached.jsonschema.ts": `
383
+ export interface ICached {
384
+ id: string;
385
+ value: number;
386
+ timestamp: Date;
387
+ }
388
+ `
389
+ });
390
+ const options = {
391
+ glob: "**/*.jsonschema.ts",
392
+ rootPath: srcDir,
393
+ output: "",
394
+ tsconfigPath: "",
395
+ helpers: true,
396
+ additionalProperties: false,
397
+ verbose: false,
398
+ progress: false,
399
+ minify: false,
400
+ cache: true, // Enable caching
401
+ parallel: true,
402
+ treeShaking: false,
403
+ lazyLoad: false,
404
+ };
405
+ // First run with cache
406
+ const generator1 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, options), { output: outputDir1 }));
407
+ yield generator1.Generate();
408
+ // Second run should use cache
409
+ const generator2 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, options), { output: outputDir2 }));
410
+ yield generator2.Generate();
411
+ expect(compareDirectories(outputDir1, outputDir2)).toBe(true);
412
+ // Clear cache and run again
413
+ generator2.clearCache();
414
+ const outputDir3 = path.join(baseTestDir, "with-cache/output-3");
415
+ const generator3 = new SchemaGenerator_1.SchemaGenerator(Object.assign(Object.assign({}, options), { output: outputDir3 }));
416
+ yield generator3.Generate();
417
+ expect(compareDirectories(outputDir1, outputDir3)).toBe(true);
418
+ }));
419
+ });
420
+ //# sourceMappingURL=SchemaGenerator.deterministic-extended.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaGenerator.deterministic-extended.test.js","sourceRoot":"","sources":["../src/SchemaGenerator.deterministic-extended.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAoD;AAEpD,uCAAyB;AACzB,2CAA6B;AAC7B,+CAAiC;AAEjC,QAAQ,CAAC,gDAAgD,EAAE,GAAG,EAAE;IAC5D,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qCAAqC,CAAC,CAAC;IAEhF,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,EAAE;QACnC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAC7C,MAAM,UAAU,G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