@storyshelf/db-sqlite 0.6.2 → 0.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 (93) hide show
  1. package/README.md +9 -9
  2. package/dist/better-sqlite3.d.mts +0 -2
  3. package/dist/better-sqlite3.mjs +8 -4
  4. package/dist/better-sqlite3.mjs.map +1 -1
  5. package/dist/bun-sqlite.d.mts +0 -2
  6. package/dist/bun-sqlite.mjs +8 -4
  7. package/dist/bun-sqlite.mjs.map +1 -1
  8. package/dist/d1.d.mts +0 -2
  9. package/dist/d1.mjs +6 -5
  10. package/dist/d1.mjs.map +1 -1
  11. package/dist/ddl.d.mts +10 -4
  12. package/dist/ddl.mjs +247 -16
  13. package/dist/ddl.mjs.map +1 -1
  14. package/dist/drizzle-factory.d.mts +0 -2
  15. package/dist/drizzle-factory.mjs +6 -3
  16. package/dist/drizzle-factory.mjs.map +1 -1
  17. package/dist/ensure-db-dir.mjs +2 -4
  18. package/dist/ensure-db-dir.mjs.map +1 -1
  19. package/dist/index.d.mts +4 -3
  20. package/dist/index.mjs +9 -5
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/schema/baseline.d.mts +87 -13
  23. package/dist/schema/baseline.mjs +6 -3
  24. package/dist/schema/baseline.mjs.map +1 -1
  25. package/dist/schema/{status-config.d.mts → build-component.d.mts} +41 -36
  26. package/dist/schema/build-component.mjs +21 -0
  27. package/dist/schema/build-component.mjs.map +1 -0
  28. package/dist/schema/build-review.d.mts +127 -0
  29. package/dist/schema/build-review.mjs +19 -0
  30. package/dist/schema/build-review.mjs.map +1 -0
  31. package/dist/schema/build.d.mts +81 -25
  32. package/dist/schema/build.mjs +5 -2
  33. package/dist/schema/build.mjs.map +1 -1
  34. package/dist/schema/capture-attempt.d.mts +25 -27
  35. package/dist/schema/capture-attempt.mjs +1 -2
  36. package/dist/schema/capture-job.d.mts +357 -0
  37. package/dist/schema/capture-job.mjs +37 -0
  38. package/dist/schema/capture-job.mjs.map +1 -0
  39. package/dist/schema/capture-shard.d.mts +279 -0
  40. package/dist/schema/capture-shard.mjs +27 -0
  41. package/dist/schema/capture-shard.mjs.map +1 -0
  42. package/dist/schema/comment.d.mts +31 -13
  43. package/dist/schema/comment.mjs +4 -4
  44. package/dist/schema/comment.mjs.map +1 -1
  45. package/dist/schema/connection.d.mts +189 -0
  46. package/dist/schema/connection.mjs +25 -0
  47. package/dist/schema/connection.mjs.map +1 -0
  48. package/dist/schema/content-refs.d.mts +0 -2
  49. package/dist/schema/content-refs.mjs +1 -2
  50. package/dist/schema/design.d.mts +647 -0
  51. package/dist/schema/design.mjs +48 -0
  52. package/dist/schema/design.mjs.map +1 -0
  53. package/dist/schema/insight.d.mts +687 -0
  54. package/dist/schema/insight.mjs +52 -0
  55. package/dist/schema/insight.mjs.map +1 -0
  56. package/dist/schema/label.d.mts +15 -17
  57. package/dist/schema/label.mjs +1 -2
  58. package/dist/schema/member.d.mts +7 -9
  59. package/dist/schema/member.mjs +1 -2
  60. package/dist/schema/notification.d.mts +58 -20
  61. package/dist/schema/notification.mjs +3 -2
  62. package/dist/schema/notification.mjs.map +1 -1
  63. package/dist/schema/project-group-mapping.d.mts +6 -8
  64. package/dist/schema/project-group-mapping.mjs +1 -2
  65. package/dist/schema/project.d.mts +132 -2
  66. package/dist/schema/project.mjs +9 -3
  67. package/dist/schema/project.mjs.map +1 -1
  68. package/dist/schema/site-setting.d.mts +107 -0
  69. package/dist/schema/site-setting.mjs +16 -0
  70. package/dist/schema/site-setting.mjs.map +1 -0
  71. package/dist/schema/snapshot.d.mts +203 -27
  72. package/dist/schema/snapshot.mjs +15 -3
  73. package/dist/schema/snapshot.mjs.map +1 -1
  74. package/dist/schema/token.d.mts +8 -10
  75. package/dist/schema/token.mjs +1 -2
  76. package/dist/schema/usage.d.mts +291 -0
  77. package/dist/schema/usage.mjs +29 -0
  78. package/dist/schema/usage.mjs.map +1 -0
  79. package/dist/schema/user-invite.d.mts +7 -9
  80. package/dist/schema/user-invite.mjs +1 -2
  81. package/dist/schema/user.d.mts +0 -2
  82. package/dist/schema/user.mjs +1 -2
  83. package/dist/schema/webhook.d.mts +8 -10
  84. package/dist/schema/webhook.mjs +1 -2
  85. package/dist/schema.d.mts +24 -5
  86. package/dist/schema.mjs +26 -6
  87. package/dist/schema.mjs.map +1 -1
  88. package/dist/turso.d.mts +2 -4
  89. package/dist/turso.mjs +20 -8
  90. package/dist/turso.mjs.map +1 -1
  91. package/package.json +7 -7
  92. package/dist/schema/status-config.mjs +0 -20
  93. package/dist/schema/status-config.mjs.map +0 -1
@@ -1,13 +1,12 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
3
  import { SnapshotStatus } from "@storyshelf/core/types";
4
- //#region src/schema/snapshot.d.ts
5
4
  /** Narrow `snapshots` table definition. */
6
- declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
5
+ declare const snapshots: import("drizzle-orm/sqlite-core/table.js").SQLiteTableWithColumns<{
7
6
  name: "snapshots";
8
7
  schema: undefined;
9
8
  columns: {
10
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
9
+ id: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
11
10
  name: "id";
12
11
  tableName: "snapshots";
13
12
  dataType: "string";
@@ -26,7 +25,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
26
25
  }, {}, {
27
26
  length: number | undefined;
28
27
  }>;
29
- projectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
28
+ projectId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
30
29
  name: "project_id";
31
30
  tableName: "snapshots";
32
31
  dataType: "string";
@@ -45,7 +44,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
45
44
  }, {}, {
46
45
  length: number | undefined;
47
46
  }>;
48
- buildId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
47
+ buildId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
49
48
  name: "build_id";
50
49
  tableName: "snapshots";
51
50
  dataType: "string";
@@ -64,7 +63,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
64
63
  }, {}, {
65
64
  length: number | undefined;
66
65
  }>;
67
- storyId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
66
+ storyId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
68
67
  name: "story_id";
69
68
  tableName: "snapshots";
70
69
  dataType: "string";
@@ -83,7 +82,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
83
82
  }, {}, {
84
83
  length: number | undefined;
85
84
  }>;
86
- storyName: import("drizzle-orm/sqlite-core").SQLiteColumn<{
85
+ storyName: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
87
86
  name: "story_name";
88
87
  tableName: "snapshots";
89
88
  dataType: "string";
@@ -102,7 +101,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
102
101
  }, {}, {
103
102
  length: number | undefined;
104
103
  }>;
105
- storyTitle: import("drizzle-orm/sqlite-core").SQLiteColumn<{
104
+ storyTitle: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
106
105
  name: "story_title";
107
106
  tableName: "snapshots";
108
107
  dataType: "string";
@@ -121,7 +120,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
121
120
  }, {}, {
122
121
  length: number | undefined;
123
122
  }>;
124
- storyImportPath: import("drizzle-orm/sqlite-core").SQLiteColumn<{
123
+ storyImportPath: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
125
124
  name: "story_import_path";
126
125
  tableName: "snapshots";
127
126
  dataType: "string";
@@ -140,7 +139,26 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
140
139
  }, {}, {
141
140
  length: number | undefined;
142
141
  }>;
143
- viewportName: import("drizzle-orm/sqlite-core").SQLiteColumn<{
142
+ designUrl: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
143
+ name: "design_url";
144
+ tableName: "snapshots";
145
+ dataType: "string";
146
+ columnType: "SQLiteText";
147
+ data: string;
148
+ driverParam: string;
149
+ notNull: false;
150
+ hasDefault: false;
151
+ isPrimaryKey: false;
152
+ isAutoincrement: false;
153
+ hasRuntimeDefault: false;
154
+ enumValues: [string, ...string[]];
155
+ baseColumn: never;
156
+ identity: undefined;
157
+ generated: undefined;
158
+ }, {}, {
159
+ length: number | undefined;
160
+ }>;
161
+ viewportName: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
144
162
  name: "viewport_name";
145
163
  tableName: "snapshots";
146
164
  dataType: "string";
@@ -159,7 +177,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
159
177
  }, {}, {
160
178
  length: number | undefined;
161
179
  }>;
162
- viewportWidth: import("drizzle-orm/sqlite-core").SQLiteColumn<{
180
+ viewportWidth: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
163
181
  name: "viewport_width";
164
182
  tableName: "snapshots";
165
183
  dataType: "number";
@@ -176,7 +194,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
176
194
  identity: undefined;
177
195
  generated: undefined;
178
196
  }, {}, {}>;
179
- viewportHeight: import("drizzle-orm/sqlite-core").SQLiteColumn<{
197
+ viewportHeight: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
180
198
  name: "viewport_height";
181
199
  tableName: "snapshots";
182
200
  dataType: "number";
@@ -193,7 +211,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
193
211
  identity: undefined;
194
212
  generated: undefined;
195
213
  }, {}, {}>;
196
- screenshotPath: import("drizzle-orm/sqlite-core").SQLiteColumn<{
214
+ screenshotPath: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
197
215
  name: "screenshot_path";
198
216
  tableName: "snapshots";
199
217
  dataType: "string";
@@ -212,7 +230,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
212
230
  }, {}, {
213
231
  length: number | undefined;
214
232
  }>;
215
- diffPath: import("drizzle-orm/sqlite-core").SQLiteColumn<{
233
+ diffPath: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
216
234
  name: "diff_path";
217
235
  tableName: "snapshots";
218
236
  dataType: "string";
@@ -231,7 +249,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
231
249
  }, {}, {
232
250
  length: number | undefined;
233
251
  }>;
234
- diffPixels: import("drizzle-orm/sqlite-core").SQLiteColumn<{
252
+ diffPixels: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
235
253
  name: "diff_pixels";
236
254
  tableName: "snapshots";
237
255
  dataType: "number";
@@ -248,7 +266,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
248
266
  identity: undefined;
249
267
  generated: undefined;
250
268
  }, {}, {}>;
251
- diffRatio: import("drizzle-orm/sqlite-core").SQLiteColumn<{
269
+ diffRatio: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
252
270
  name: "diff_ratio";
253
271
  tableName: "snapshots";
254
272
  dataType: "number";
@@ -265,7 +283,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
265
283
  identity: undefined;
266
284
  generated: undefined;
267
285
  }, {}, {}>;
268
- diffPassed: import("drizzle-orm/sqlite-core").SQLiteColumn<{
286
+ diffPassed: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
269
287
  name: "diff_passed";
270
288
  tableName: "snapshots";
271
289
  dataType: "boolean";
@@ -282,7 +300,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
282
300
  identity: undefined;
283
301
  generated: undefined;
284
302
  }, {}, {}>;
285
- status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
303
+ status: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
286
304
  name: "status";
287
305
  tableName: "snapshots";
288
306
  dataType: "string";
@@ -302,7 +320,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
302
320
  length: number | undefined;
303
321
  $type: "approved" | "changed" | "new" | "pending" | "rejected" | "unchanged";
304
322
  }>;
305
- reviewedBy: import("drizzle-orm/sqlite-core").SQLiteColumn<{
323
+ reviewedBy: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
306
324
  name: "reviewed_by";
307
325
  tableName: "snapshots";
308
326
  dataType: "string";
@@ -321,7 +339,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
321
339
  }, {}, {
322
340
  length: number | undefined;
323
341
  }>;
324
- reviewedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
342
+ reviewedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
325
343
  name: "reviewed_at";
326
344
  tableName: "snapshots";
327
345
  dataType: "string";
@@ -340,7 +358,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
340
358
  }, {}, {
341
359
  length: number | undefined;
342
360
  }>;
343
- infraHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
361
+ infraHash: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
344
362
  name: "infra_hash";
345
363
  tableName: "snapshots";
346
364
  dataType: "string";
@@ -359,7 +377,26 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
359
377
  }, {}, {
360
378
  length: number | undefined;
361
379
  }>;
362
- inherited: import("drizzle-orm/sqlite-core").SQLiteColumn<{
380
+ envChange: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
381
+ name: "env_change";
382
+ tableName: "snapshots";
383
+ dataType: "string";
384
+ columnType: "SQLiteText";
385
+ data: string;
386
+ driverParam: string;
387
+ notNull: false;
388
+ hasDefault: false;
389
+ isPrimaryKey: false;
390
+ isAutoincrement: false;
391
+ hasRuntimeDefault: false;
392
+ enumValues: [string, ...string[]];
393
+ baseColumn: never;
394
+ identity: undefined;
395
+ generated: undefined;
396
+ }, {}, {
397
+ length: number | undefined;
398
+ }>;
399
+ inherited: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
363
400
  name: "inherited";
364
401
  tableName: "snapshots";
365
402
  dataType: "boolean";
@@ -376,7 +413,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
376
413
  identity: undefined;
377
414
  generated: undefined;
378
415
  }, {}, {}>;
379
- baselineId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
416
+ baselineId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
380
417
  name: "baseline_id";
381
418
  tableName: "snapshots";
382
419
  dataType: "string";
@@ -395,7 +432,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
395
432
  }, {}, {
396
433
  length: number | undefined;
397
434
  }>;
398
- baselineVersion: import("drizzle-orm/sqlite-core").SQLiteColumn<{
435
+ baselineVersion: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
399
436
  name: "baseline_version";
400
437
  tableName: "snapshots";
401
438
  dataType: "string";
@@ -414,7 +451,138 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
414
451
  }, {}, {
415
452
  length: number | undefined;
416
453
  }>;
417
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
454
+ sourceBuildId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
455
+ name: "source_build_id";
456
+ tableName: "snapshots";
457
+ dataType: "string";
458
+ columnType: "SQLiteText";
459
+ data: string;
460
+ driverParam: string;
461
+ notNull: false;
462
+ hasDefault: false;
463
+ isPrimaryKey: false;
464
+ isAutoincrement: false;
465
+ hasRuntimeDefault: false;
466
+ enumValues: [string, ...string[]];
467
+ baseColumn: never;
468
+ identity: undefined;
469
+ generated: undefined;
470
+ }, {}, {
471
+ length: number | undefined;
472
+ }>;
473
+ comparisonImagePath: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
474
+ name: "comparison_image_path";
475
+ tableName: "snapshots";
476
+ dataType: "string";
477
+ columnType: "SQLiteText";
478
+ data: string;
479
+ driverParam: string;
480
+ notNull: false;
481
+ hasDefault: false;
482
+ isPrimaryKey: false;
483
+ isAutoincrement: false;
484
+ hasRuntimeDefault: false;
485
+ enumValues: [string, ...string[]];
486
+ baseColumn: never;
487
+ identity: undefined;
488
+ generated: undefined;
489
+ }, {}, {
490
+ length: number | undefined;
491
+ }>;
492
+ comparisonMetadata: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
493
+ name: "comparison_metadata";
494
+ tableName: "snapshots";
495
+ dataType: "string";
496
+ columnType: "SQLiteText";
497
+ data: string;
498
+ driverParam: string;
499
+ notNull: false;
500
+ hasDefault: false;
501
+ isPrimaryKey: false;
502
+ isAutoincrement: false;
503
+ hasRuntimeDefault: false;
504
+ enumValues: [string, ...string[]];
505
+ baseColumn: never;
506
+ identity: undefined;
507
+ generated: undefined;
508
+ }, {}, {
509
+ length: number | undefined;
510
+ }>;
511
+ mode: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
512
+ name: "mode";
513
+ tableName: "snapshots";
514
+ dataType: "string";
515
+ columnType: "SQLiteText";
516
+ data: string;
517
+ driverParam: string;
518
+ notNull: false;
519
+ hasDefault: false;
520
+ isPrimaryKey: false;
521
+ isAutoincrement: false;
522
+ hasRuntimeDefault: false;
523
+ enumValues: [string, ...string[]];
524
+ baseColumn: never;
525
+ identity: undefined;
526
+ generated: undefined;
527
+ }, {}, {
528
+ length: number | undefined;
529
+ }>;
530
+ browser: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
531
+ name: "browser";
532
+ tableName: "snapshots";
533
+ dataType: "string";
534
+ columnType: "SQLiteText";
535
+ data: string;
536
+ driverParam: string;
537
+ notNull: true;
538
+ hasDefault: true;
539
+ isPrimaryKey: false;
540
+ isAutoincrement: false;
541
+ hasRuntimeDefault: false;
542
+ enumValues: [string, ...string[]];
543
+ baseColumn: never;
544
+ identity: undefined;
545
+ generated: undefined;
546
+ }, {}, {
547
+ length: number | undefined;
548
+ }>;
549
+ durationMs: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
550
+ name: "duration_ms";
551
+ tableName: "snapshots";
552
+ dataType: "number";
553
+ columnType: "SQLiteInteger";
554
+ data: number;
555
+ driverParam: number;
556
+ notNull: false;
557
+ hasDefault: false;
558
+ isPrimaryKey: false;
559
+ isAutoincrement: false;
560
+ hasRuntimeDefault: false;
561
+ enumValues: undefined;
562
+ baseColumn: never;
563
+ identity: undefined;
564
+ generated: undefined;
565
+ }, {}, {}>;
566
+ a11yViolations: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
567
+ name: "a11y_violations";
568
+ tableName: "snapshots";
569
+ dataType: "string";
570
+ columnType: "SQLiteText";
571
+ data: string;
572
+ driverParam: string;
573
+ notNull: false;
574
+ hasDefault: false;
575
+ isPrimaryKey: false;
576
+ isAutoincrement: false;
577
+ hasRuntimeDefault: false;
578
+ enumValues: [string, ...string[]];
579
+ baseColumn: never;
580
+ identity: undefined;
581
+ generated: undefined;
582
+ }, {}, {
583
+ length: number | undefined;
584
+ }>;
585
+ createdAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
418
586
  name: "created_at";
419
587
  tableName: "snapshots";
420
588
  dataType: "string";
@@ -433,7 +601,7 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
433
601
  }, {}, {
434
602
  length: number | undefined;
435
603
  }>;
436
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
604
+ updatedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
437
605
  name: "updated_at";
438
606
  tableName: "snapshots";
439
607
  dataType: "string";
@@ -464,6 +632,7 @@ interface Snapshot {
464
632
  storyName: string;
465
633
  storyTitle: string;
466
634
  storyImportPath: string | null;
635
+ designUrl: string | null;
467
636
  viewportName: string;
468
637
  viewportWidth: number;
469
638
  viewportHeight: number;
@@ -476,12 +645,19 @@ interface Snapshot {
476
645
  reviewedBy: string | null;
477
646
  reviewedAt: string | null;
478
647
  infraHash: string | null;
648
+ envChange: string | null;
479
649
  inherited: boolean;
480
650
  baselineId: string | null;
481
651
  baselineVersion: string | null;
652
+ sourceBuildId: string | null;
653
+ comparisonImagePath: string | null;
654
+ comparisonMetadata: string | null;
655
+ mode: string | null;
656
+ browser: string;
657
+ durationMs: number | null;
658
+ a11yViolations: string | null;
482
659
  createdAt: string;
483
660
  updatedAt: string;
484
661
  }
485
- //#endregion
486
662
  export { Snapshot, snapshots };
487
663
  //# sourceMappingURL=snapshot.d.mts.map
@@ -4,7 +4,7 @@ import.meta.url;
4
4
  import { projects } from "./project.mjs";
5
5
  import { builds } from "./build.mjs";
6
6
  import { index, integer, real, sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";
7
- //#region src/schema/snapshot.ts
7
+ // src/schema/snapshot.ts
8
8
  /** Narrow `snapshots` table definition. */
9
9
  const snapshots = sqliteTable("snapshots", {
10
10
  id: text("id").primaryKey(),
@@ -14,6 +14,7 @@ const snapshots = sqliteTable("snapshots", {
14
14
  storyName: text("story_name").notNull(),
15
15
  storyTitle: text("story_title").notNull(),
16
16
  storyImportPath: text("story_import_path"),
17
+ designUrl: text("design_url"),
17
18
  viewportName: text("viewport_name").notNull().default("desktop"),
18
19
  viewportWidth: integer("viewport_width").notNull().default(1280),
19
20
  viewportHeight: integer("viewport_height").notNull().default(720),
@@ -26,13 +27,24 @@ const snapshots = sqliteTable("snapshots", {
26
27
  reviewedBy: text("reviewed_by"),
27
28
  reviewedAt: text("reviewed_at"),
28
29
  infraHash: text("infra_hash"),
30
+ envChange: text("env_change"),
29
31
  inherited: integer("inherited", { mode: "boolean" }).notNull().default(false),
30
32
  baselineId: text("baseline_id"),
31
33
  baselineVersion: text("baseline_version"),
34
+ sourceBuildId: text("source_build_id"),
35
+ comparisonImagePath: text("comparison_image_path"),
36
+ comparisonMetadata: text("comparison_metadata"),
37
+ mode: text("mode"),
38
+ browser: text("browser").notNull().default("chromium"),
39
+ durationMs: integer("duration_ms"),
40
+ a11yViolations: text("a11y_violations"),
32
41
  createdAt: text("created_at").notNull(),
33
42
  updatedAt: text("updated_at").notNull()
34
- }, (t) => [uniqueIndex("snapshots_build_story_viewport_idx").on(t.buildId, t.storyId, t.viewportName), index("snapshots_build_id_idx").on(t.buildId)]);
35
- //#endregion
43
+ }, (t) => [
44
+ uniqueIndex("snapshots_build_story_mode_browser_idx").on(t.buildId, t.storyId, t.viewportName, t.browser),
45
+ index("snapshots_build_id_idx").on(t.buildId),
46
+ index("snapshots_project_import_path_idx").on(t.projectId, t.storyImportPath)
47
+ ]);
36
48
  export { snapshots };
37
49
 
38
50
  //# sourceMappingURL=snapshot.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.mjs","names":[],"sources":["../../src/schema/snapshot.ts"],"sourcesContent":["import type { SnapshotStatus } from \"@storyshelf/core/types\";\nimport { index, integer, real, sqliteTable, text, uniqueIndex } from \"drizzle-orm/sqlite-core\";\nimport { builds } from \"./build.ts\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `snapshots` table definition. */\nexport const snapshots = sqliteTable(\n \"snapshots\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n buildId: text(\"build_id\")\n .notNull()\n .references(() => builds.id, { onDelete: \"cascade\" }),\n storyId: text(\"story_id\").notNull(),\n storyName: text(\"story_name\").notNull(),\n storyTitle: text(\"story_title\").notNull(),\n storyImportPath: text(\"story_import_path\"),\n viewportName: text(\"viewport_name\").notNull().default(\"desktop\"),\n viewportWidth: integer(\"viewport_width\").notNull().default(1280),\n viewportHeight: integer(\"viewport_height\").notNull().default(720),\n screenshotPath: text(\"screenshot_path\").notNull(),\n diffPath: text(\"diff_path\"),\n diffPixels: integer(\"diff_pixels\"),\n diffRatio: real(\"diff_ratio\"),\n diffPassed: integer(\"diff_passed\", { mode: \"boolean\" }),\n status: text(\"status\").$type<SnapshotStatus>().notNull().default(\"pending\"),\n reviewedBy: text(\"reviewed_by\"),\n reviewedAt: text(\"reviewed_at\"),\n infraHash: text(\"infra_hash\"),\n inherited: integer(\"inherited\", { mode: \"boolean\" }).notNull().default(false),\n baselineId: text(\"baseline_id\"),\n baselineVersion: text(\"baseline_version\"),\n createdAt: text(\"created_at\").notNull(),\n updatedAt: text(\"updated_at\").notNull(),\n },\n (t) => [\n uniqueIndex(\"snapshots_build_story_viewport_idx\").on(t.buildId, t.storyId, t.viewportName),\n index(\"snapshots_build_id_idx\").on(t.buildId),\n ],\n);\n\n/** A snapshot row. */\nexport interface Snapshot {\n id: string;\n projectId: string;\n buildId: string;\n storyId: string;\n storyName: string;\n storyTitle: string;\n storyImportPath: string | null;\n viewportName: string;\n viewportWidth: number;\n viewportHeight: number;\n screenshotPath: string;\n diffPath: string | null;\n diffPixels: number | null;\n diffRatio: number | null;\n diffPassed: boolean | null;\n status: SnapshotStatus;\n reviewedBy: string | null;\n reviewedAt: string | null;\n infraHash: string | null;\n inherited: boolean;\n baselineId: string | null;\n baselineVersion: string | null;\n createdAt: string;\n updatedAt: string;\n}\n"],"mappings":";;;;;;;;AAMA,MAAa,YAAY,YACvB,aACA;CACE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,SAAS,KAAK,UAAU,CAAC,CACtB,QAAQ,CAAC,CACT,iBAAiB,OAAO,IAAI,EAAE,UAAU,UAAU,CAAC;CACtD,SAAS,KAAK,UAAU,CAAC,CAAC,QAAQ;CAClC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,YAAY,KAAK,aAAa,CAAC,CAAC,QAAQ;CACxC,iBAAiB,KAAK,mBAAmB;CACzC,cAAc,KAAK,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,SAAS;CAC/D,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CAC/D,gBAAgB,QAAQ,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAG;CAChE,gBAAgB,KAAK,iBAAiB,CAAC,CAAC,QAAQ;CAChD,UAAU,KAAK,WAAW;CAC1B,YAAY,QAAQ,aAAa;CACjC,WAAW,KAAK,YAAY;CAC5B,YAAY,QAAQ,eAAe,EAAE,MAAM,UAAU,CAAC;CACtD,QAAQ,KAAK,QAAQ,CAAC,CAAC,MAAsB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,SAAS;CAC1E,YAAY,KAAK,aAAa;CAC9B,YAAY,KAAK,aAAa;CAC9B,WAAW,KAAK,YAAY;CAC5B,WAAW,QAAQ,aAAa,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC5E,YAAY,KAAK,aAAa;CAC9B,iBAAiB,KAAK,kBAAkB;CACxC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,IACC,MAAM,CACL,YAAY,oCAAoC,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,GACzF,MAAM,wBAAwB,CAAC,CAAC,GAAG,EAAE,OAAO,CAC9C,CACF"}
1
+ {"version":3,"file":"snapshot.mjs","names":[],"sources":["../../src/schema/snapshot.ts"],"sourcesContent":["import type { SnapshotStatus } from \"@storyshelf/core/types\";\nimport { index, integer, real, sqliteTable, text, uniqueIndex } from \"drizzle-orm/sqlite-core\";\nimport { builds } from \"./build.ts\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `snapshots` table definition. */\nexport const snapshots = sqliteTable(\n \"snapshots\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n buildId: text(\"build_id\")\n .notNull()\n .references(() => builds.id, { onDelete: \"cascade\" }),\n storyId: text(\"story_id\").notNull(),\n storyName: text(\"story_name\").notNull(),\n storyTitle: text(\"story_title\").notNull(),\n storyImportPath: text(\"story_import_path\"),\n designUrl: text(\"design_url\"),\n viewportName: text(\"viewport_name\").notNull().default(\"desktop\"),\n viewportWidth: integer(\"viewport_width\").notNull().default(1280),\n viewportHeight: integer(\"viewport_height\").notNull().default(720),\n screenshotPath: text(\"screenshot_path\").notNull(),\n diffPath: text(\"diff_path\"),\n diffPixels: integer(\"diff_pixels\"),\n diffRatio: real(\"diff_ratio\"),\n diffPassed: integer(\"diff_passed\", { mode: \"boolean\" }),\n status: text(\"status\").$type<SnapshotStatus>().notNull().default(\"pending\"),\n reviewedBy: text(\"reviewed_by\"),\n reviewedAt: text(\"reviewed_at\"),\n infraHash: text(\"infra_hash\"),\n envChange: text(\"env_change\"),\n inherited: integer(\"inherited\", { mode: \"boolean\" }).notNull().default(false),\n baselineId: text(\"baseline_id\"),\n baselineVersion: text(\"baseline_version\"),\n sourceBuildId: text(\"source_build_id\"),\n comparisonImagePath: text(\"comparison_image_path\"),\n comparisonMetadata: text(\"comparison_metadata\"),\n mode: text(\"mode\"),\n browser: text(\"browser\").notNull().default(\"chromium\"),\n durationMs: integer(\"duration_ms\"),\n a11yViolations: text(\"a11y_violations\"),\n createdAt: text(\"created_at\").notNull(),\n updatedAt: text(\"updated_at\").notNull(),\n },\n (t) => [\n uniqueIndex(\"snapshots_build_story_mode_browser_idx\").on(\n t.buildId,\n t.storyId,\n t.viewportName,\n t.browser,\n ),\n index(\"snapshots_build_id_idx\").on(t.buildId),\n index(\"snapshots_project_import_path_idx\").on(t.projectId, t.storyImportPath),\n ],\n);\n\n/** A snapshot row. */\nexport interface Snapshot {\n id: string;\n projectId: string;\n buildId: string;\n storyId: string;\n storyName: string;\n storyTitle: string;\n storyImportPath: string | null;\n designUrl: string | null;\n viewportName: string;\n viewportWidth: number;\n viewportHeight: number;\n screenshotPath: string;\n diffPath: string | null;\n diffPixels: number | null;\n diffRatio: number | null;\n diffPassed: boolean | null;\n status: SnapshotStatus;\n reviewedBy: string | null;\n reviewedAt: string | null;\n infraHash: string | null;\n envChange: string | null;\n inherited: boolean;\n baselineId: string | null;\n baselineVersion: string | null;\n sourceBuildId: string | null;\n comparisonImagePath: string | null;\n comparisonMetadata: string | null;\n mode: string | null;\n browser: string;\n durationMs: number | null;\n a11yViolations: string | null;\n createdAt: string;\n updatedAt: string;\n}\n"],"mappings":";;;;;;;;AAMA,MAAa,YAAY,YACvB,aACA;CACE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,SAAS,KAAK,UAAU,CAAC,CACtB,QAAQ,CAAC,CACT,iBAAiB,OAAO,IAAI,EAAE,UAAU,UAAU,CAAC;CACtD,SAAS,KAAK,UAAU,CAAC,CAAC,QAAQ;CAClC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,YAAY,KAAK,aAAa,CAAC,CAAC,QAAQ;CACxC,iBAAiB,KAAK,mBAAmB;CACzC,WAAW,KAAK,YAAY;CAC5B,cAAc,KAAK,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,SAAS;CAC/D,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CAC/D,gBAAgB,QAAQ,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAG;CAChE,gBAAgB,KAAK,iBAAiB,CAAC,CAAC,QAAQ;CAChD,UAAU,KAAK,WAAW;CAC1B,YAAY,QAAQ,aAAa;CACjC,WAAW,KAAK,YAAY;CAC5B,YAAY,QAAQ,eAAe,EAAE,MAAM,UAAU,CAAC;CACtD,QAAQ,KAAK,QAAQ,CAAC,CAAC,MAAsB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,SAAS;CAC1E,YAAY,KAAK,aAAa;CAC9B,YAAY,KAAK,aAAa;CAC9B,WAAW,KAAK,YAAY;CAC5B,WAAW,KAAK,YAAY;CAC5B,WAAW,QAAQ,aAAa,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC5E,YAAY,KAAK,aAAa;CAC9B,iBAAiB,KAAK,kBAAkB;CACxC,eAAe,KAAK,iBAAiB;CACrC,qBAAqB,KAAK,uBAAuB;CACjD,oBAAoB,KAAK,qBAAqB;CAC9C,MAAM,KAAK,MAAM;CACjB,SAAS,KAAK,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,UAAU;CACrD,YAAY,QAAQ,aAAa;CACjC,gBAAgB,KAAK,iBAAiB;CACtC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,IACC,MAAM;CACL,YAAY,wCAAwC,CAAC,CAAC,GACpD,EAAE,SACF,EAAE,SACF,EAAE,cACF,EAAE,OACJ;CACA,MAAM,wBAAwB,CAAC,CAAC,GAAG,EAAE,OAAO;CAC5C,MAAM,mCAAmC,CAAC,CAAC,GAAG,EAAE,WAAW,EAAE,eAAe;AAC9E,CACF"}
@@ -1,12 +1,11 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
- //#region src/schema/token.d.ts
4
3
  /** Narrow `tokens` table definition. */
5
- declare const tokens: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4
+ declare const tokens: import("drizzle-orm/sqlite-core/table.js").SQLiteTableWithColumns<{
6
5
  name: "tokens";
7
6
  schema: undefined;
8
7
  columns: {
9
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
8
+ id: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
10
9
  name: "id";
11
10
  tableName: "tokens";
12
11
  dataType: "string";
@@ -25,7 +24,7 @@ declare const tokens: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
25
24
  }, {}, {
26
25
  length: number | undefined;
27
26
  }>;
28
- projectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
27
+ projectId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
29
28
  name: "project_id";
30
29
  tableName: "tokens";
31
30
  dataType: "string";
@@ -44,7 +43,7 @@ declare const tokens: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
44
43
  }, {}, {
45
44
  length: number | undefined;
46
45
  }>;
47
- name: import("drizzle-orm/sqlite-core").SQLiteColumn<{
46
+ name: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
48
47
  name: "name";
49
48
  tableName: "tokens";
50
49
  dataType: "string";
@@ -63,7 +62,7 @@ declare const tokens: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
63
62
  }, {}, {
64
63
  length: number | undefined;
65
64
  }>;
66
- hash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
65
+ hash: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
67
66
  name: "hash";
68
67
  tableName: "tokens";
69
68
  dataType: "string";
@@ -82,7 +81,7 @@ declare const tokens: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
82
81
  }, {}, {
83
82
  length: number | undefined;
84
83
  }>;
85
- userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
84
+ userId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
86
85
  name: "user_id";
87
86
  tableName: "tokens";
88
87
  dataType: "string";
@@ -101,7 +100,7 @@ declare const tokens: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
101
100
  }, {}, {
102
101
  length: number | undefined;
103
102
  }>;
104
- lastUsedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
103
+ lastUsedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
105
104
  name: "last_used_at";
106
105
  tableName: "tokens";
107
106
  dataType: "string";
@@ -120,7 +119,7 @@ declare const tokens: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
120
119
  }, {}, {
121
120
  length: number | undefined;
122
121
  }>;
123
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
122
+ createdAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
124
123
  name: "created_at";
125
124
  tableName: "tokens";
126
125
  dataType: "string";
@@ -152,6 +151,5 @@ interface Token {
152
151
  lastUsedAt: string | null;
153
152
  createdAt: string;
154
153
  }
155
- //#endregion
156
154
  export { Token, tokens };
157
155
  //# sourceMappingURL=token.d.mts.map
@@ -4,7 +4,7 @@ import.meta.url;
4
4
  import { projects } from "./project.mjs";
5
5
  import { users } from "./user.mjs";
6
6
  import { sqliteTable, text } from "drizzle-orm/sqlite-core";
7
- //#region src/schema/token.ts
7
+ // src/schema/token.ts
8
8
  /** Narrow `tokens` table definition. */
9
9
  const tokens = sqliteTable("tokens", {
10
10
  id: text("id").primaryKey(),
@@ -15,7 +15,6 @@ const tokens = sqliteTable("tokens", {
15
15
  lastUsedAt: text("last_used_at"),
16
16
  createdAt: text("created_at").notNull()
17
17
  });
18
- //#endregion
19
18
  export { tokens };
20
19
 
21
20
  //# sourceMappingURL=token.mjs.map