@storyshelf/db-sqlite 0.7.0 → 0.9.0-next-d2cc082

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 (74) hide show
  1. package/dist/better-sqlite3.d.mts +0 -2
  2. package/dist/better-sqlite3.mjs +2 -3
  3. package/dist/bun-sqlite.d.mts +0 -2
  4. package/dist/bun-sqlite.mjs +2 -3
  5. package/dist/d1.d.mts +0 -2
  6. package/dist/d1.mjs +2 -3
  7. package/dist/ddl.d.mts +1 -3
  8. package/dist/ddl.mjs +22 -2
  9. package/dist/ddl.mjs.map +1 -1
  10. package/dist/drizzle-factory.d.mts +0 -2
  11. package/dist/drizzle-factory.mjs +6 -3
  12. package/dist/drizzle-factory.mjs.map +1 -1
  13. package/dist/ensure-db-dir.mjs +2 -4
  14. package/dist/ensure-db-dir.mjs.map +1 -1
  15. package/dist/index.d.mts +4 -3
  16. package/dist/index.mjs +3 -4
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/schema/baseline.d.mts +33 -16
  19. package/dist/schema/baseline.mjs +2 -2
  20. package/dist/schema/baseline.mjs.map +1 -1
  21. package/dist/schema/build-component.d.mts +9 -11
  22. package/dist/schema/build-component.mjs +1 -2
  23. package/dist/schema/build-review.d.mts +7 -9
  24. package/dist/schema/build-review.mjs +1 -2
  25. package/dist/schema/build.d.mts +43 -25
  26. package/dist/schema/build.mjs +2 -2
  27. package/dist/schema/build.mjs.map +1 -1
  28. package/dist/schema/capture-attempt.d.mts +25 -27
  29. package/dist/schema/capture-attempt.mjs +1 -2
  30. package/dist/schema/capture-job.d.mts +0 -2
  31. package/dist/schema/capture-job.mjs +1 -2
  32. package/dist/schema/capture-shard.d.mts +15 -17
  33. package/dist/schema/capture-shard.mjs +1 -2
  34. package/dist/schema/comment.d.mts +12 -14
  35. package/dist/schema/comment.mjs +1 -2
  36. package/dist/schema/connection.d.mts +10 -12
  37. package/dist/schema/connection.mjs +1 -2
  38. package/dist/schema/content-refs.d.mts +0 -2
  39. package/dist/schema/content-refs.mjs +1 -2
  40. package/dist/schema/design.d.mts +53 -35
  41. package/dist/schema/design.mjs +2 -2
  42. package/dist/schema/design.mjs.map +1 -1
  43. package/dist/schema/insight.d.mts +36 -38
  44. package/dist/schema/insight.mjs +1 -2
  45. package/dist/schema/label.d.mts +15 -17
  46. package/dist/schema/label.mjs +1 -2
  47. package/dist/schema/member.d.mts +7 -9
  48. package/dist/schema/member.mjs +1 -2
  49. package/dist/schema/notification.d.mts +20 -22
  50. package/dist/schema/notification.mjs +1 -2
  51. package/dist/schema/project-group-mapping.d.mts +6 -8
  52. package/dist/schema/project-group-mapping.mjs +1 -2
  53. package/dist/schema/project.d.mts +0 -2
  54. package/dist/schema/project.mjs +1 -2
  55. package/dist/schema/site-setting.d.mts +0 -2
  56. package/dist/schema/site-setting.mjs +1 -2
  57. package/dist/schema/snapshot.d.mts +91 -33
  58. package/dist/schema/snapshot.mjs +4 -2
  59. package/dist/schema/snapshot.mjs.map +1 -1
  60. package/dist/schema/token.d.mts +8 -10
  61. package/dist/schema/token.mjs +1 -2
  62. package/dist/schema/usage.d.mts +15 -17
  63. package/dist/schema/usage.mjs +1 -2
  64. package/dist/schema/user-invite.d.mts +7 -9
  65. package/dist/schema/user-invite.mjs +1 -2
  66. package/dist/schema/user.d.mts +0 -2
  67. package/dist/schema/user.mjs +1 -2
  68. package/dist/schema/webhook.d.mts +8 -10
  69. package/dist/schema/webhook.mjs +1 -2
  70. package/dist/schema.d.mts +0 -2
  71. package/dist/schema.mjs +1 -2
  72. package/dist/turso.d.mts +0 -2
  73. package/dist/turso.mjs +2 -3
  74. package/package.json +4 -13
@@ -3,7 +3,7 @@ import "node:url";
3
3
  import.meta.url;
4
4
  import { projects } from "./project.mjs";
5
5
  import { index, integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
6
- //#region src/schema/build.ts
6
+ // src/schema/build.ts
7
7
  /** Narrow `builds` table definition. */
8
8
  const builds = sqliteTable("builds", {
9
9
  id: text("id").primaryKey(),
@@ -16,6 +16,7 @@ const builds = sqliteTable("builds", {
16
16
  message: text("message"),
17
17
  public: integer("public", { mode: "boolean" }).notNull().default(false),
18
18
  status: text("status").$type().notNull().default("pending"),
19
+ retentionState: text("retention_state").notNull().default("available"),
19
20
  snapshotCount: integer("snapshot_count").notNull().default(0),
20
21
  changedCount: integer("changed_count").notNull().default(0),
21
22
  approvedCount: integer("approved_count").notNull().default(0),
@@ -30,7 +31,6 @@ const builds = sqliteTable("builds", {
30
31
  createdAt: text("created_at").notNull(),
31
32
  updatedAt: text("updated_at").notNull()
32
33
  }, (t) => [index("builds_project_gitsha_idx").on(t.projectId, t.gitSha), index("builds_git_branch_idx").on(t.gitBranch)]);
33
- //#endregion
34
34
  export { builds };
35
35
 
36
36
  //# sourceMappingURL=build.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.mjs","names":[],"sources":["../../src/schema/build.ts"],"sourcesContent":["import type { BuildStatus } from \"@storyshelf/core/types\";\nimport { index, integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `builds` table definition. */\nexport const builds = sqliteTable(\n \"builds\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n gitSha: text(\"git_sha\").notNull(),\n gitBranch: text(\"git_branch\").notNull(),\n isDefault: integer(\"is_default\", { mode: \"boolean\" }).notNull().default(false),\n authorEmail: text(\"author_email\"),\n authorName: text(\"author_name\"),\n message: text(\"message\"),\n public: integer(\"public\", { mode: \"boolean\" }).notNull().default(false),\n status: text(\"status\").$type<BuildStatus>().notNull().default(\"pending\"),\n snapshotCount: integer(\"snapshot_count\").notNull().default(0),\n changedCount: integer(\"changed_count\").notNull().default(0),\n approvedCount: integer(\"approved_count\").notNull().default(0),\n rejectedCount: integer(\"rejected_count\").notNull().default(0),\n /** Snapshots inherited from the baseline without rendering (affected capture). */\n inheritedCount: integer(\"inherited_count\").notNull().default(0),\n affectedOnly: integer(\"affected_only\", { mode: \"boolean\" }).notNull().default(true),\n baselineSha: text(\"baseline_sha\"),\n changedFiles: text(\"changed_files\"),\n affectedImportPaths: text(\"affected_import_paths\"),\n testResults: text(\"test_results\"),\n createdAt: text(\"created_at\").notNull(),\n updatedAt: text(\"updated_at\").notNull(),\n },\n (t) => [\n index(\"builds_project_gitsha_idx\").on(t.projectId, t.gitSha),\n index(\"builds_git_branch_idx\").on(t.gitBranch),\n ],\n);\n\n/** A build row. */\nexport interface Build {\n id: string;\n projectId: string;\n gitSha: string;\n gitBranch: string;\n isDefault: boolean;\n authorEmail: string | null;\n authorName: string | null;\n message: string | null;\n public: boolean;\n status: BuildStatus;\n snapshotCount: number;\n changedCount: number;\n approvedCount: number;\n rejectedCount: number;\n inheritedCount: number;\n affectedOnly: boolean;\n baselineSha: string | null;\n changedFiles: string | null;\n affectedImportPaths: string | null;\n testResults: string | null;\n createdAt: string;\n updatedAt: string;\n}\n"],"mappings":";;;;;;;AAKA,MAAa,SAAS,YACpB,UACA;CACE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,QAAQ,KAAK,SAAS,CAAC,CAAC,QAAQ;CAChC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,QAAQ,cAAc,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC7E,aAAa,KAAK,cAAc;CAChC,YAAY,KAAK,aAAa;CAC9B,SAAS,KAAK,SAAS;CACvB,QAAQ,QAAQ,UAAU,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CACtE,QAAQ,KAAK,QAAQ,CAAC,CAAC,MAAmB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,SAAS;CACvE,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC5D,cAAc,QAAQ,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC1D,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC5D,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;;CAE5D,gBAAgB,QAAQ,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC9D,cAAc,QAAQ,iBAAiB,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CAClF,aAAa,KAAK,cAAc;CAChC,cAAc,KAAK,eAAe;CAClC,qBAAqB,KAAK,uBAAuB;CACjD,aAAa,KAAK,cAAc;CAChC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,IACC,MAAM,CACL,MAAM,2BAA2B,CAAC,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,GAC3D,MAAM,uBAAuB,CAAC,CAAC,GAAG,EAAE,SAAS,CAC/C,CACF"}
1
+ {"version":3,"file":"build.mjs","names":[],"sources":["../../src/schema/build.ts"],"sourcesContent":["import type { BuildStatus } from \"@storyshelf/core/types\";\nimport { index, integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `builds` table definition. */\nexport const builds = sqliteTable(\n \"builds\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n gitSha: text(\"git_sha\").notNull(),\n gitBranch: text(\"git_branch\").notNull(),\n isDefault: integer(\"is_default\", { mode: \"boolean\" }).notNull().default(false),\n authorEmail: text(\"author_email\"),\n authorName: text(\"author_name\"),\n message: text(\"message\"),\n public: integer(\"public\", { mode: \"boolean\" }).notNull().default(false),\n status: text(\"status\").$type<BuildStatus>().notNull().default(\"pending\"),\n retentionState: text(\"retention_state\").notNull().default(\"available\"),\n snapshotCount: integer(\"snapshot_count\").notNull().default(0),\n changedCount: integer(\"changed_count\").notNull().default(0),\n approvedCount: integer(\"approved_count\").notNull().default(0),\n rejectedCount: integer(\"rejected_count\").notNull().default(0),\n /** Snapshots inherited from the baseline without rendering (affected capture). */\n inheritedCount: integer(\"inherited_count\").notNull().default(0),\n affectedOnly: integer(\"affected_only\", { mode: \"boolean\" }).notNull().default(true),\n baselineSha: text(\"baseline_sha\"),\n changedFiles: text(\"changed_files\"),\n affectedImportPaths: text(\"affected_import_paths\"),\n testResults: text(\"test_results\"),\n createdAt: text(\"created_at\").notNull(),\n updatedAt: text(\"updated_at\").notNull(),\n },\n (t) => [\n index(\"builds_project_gitsha_idx\").on(t.projectId, t.gitSha),\n index(\"builds_git_branch_idx\").on(t.gitBranch),\n ],\n);\n\n/** A build row. */\nexport interface Build {\n id: string;\n projectId: string;\n gitSha: string;\n gitBranch: string;\n isDefault: boolean;\n authorEmail: string | null;\n authorName: string | null;\n message: string | null;\n public: boolean;\n status: BuildStatus;\n retentionState: string;\n snapshotCount: number;\n changedCount: number;\n approvedCount: number;\n rejectedCount: number;\n inheritedCount: number;\n affectedOnly: boolean;\n baselineSha: string | null;\n changedFiles: string | null;\n affectedImportPaths: string | null;\n testResults: string | null;\n createdAt: string;\n updatedAt: string;\n}\n"],"mappings":";;;;;;;AAKA,MAAa,SAAS,YACpB,UACA;CACE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,QAAQ,KAAK,SAAS,CAAC,CAAC,QAAQ;CAChC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,QAAQ,cAAc,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC7E,aAAa,KAAK,cAAc;CAChC,YAAY,KAAK,aAAa;CAC9B,SAAS,KAAK,SAAS;CACvB,QAAQ,QAAQ,UAAU,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CACtE,QAAQ,KAAK,QAAQ,CAAC,CAAC,MAAmB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,SAAS;CACvE,gBAAgB,KAAK,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,WAAW;CACrE,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC5D,cAAc,QAAQ,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC1D,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC5D,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;;CAE5D,gBAAgB,QAAQ,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC9D,cAAc,QAAQ,iBAAiB,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CAClF,aAAa,KAAK,cAAc;CAChC,cAAc,KAAK,eAAe;CAClC,qBAAqB,KAAK,uBAAuB;CACjD,aAAa,KAAK,cAAc;CAChC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,IACC,MAAM,CACL,MAAM,2BAA2B,CAAC,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,GAC3D,MAAM,uBAAuB,CAAC,CAAC,GAAG,EAAE,SAAS,CAC/C,CACF"}
@@ -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 { JobStatus } from "@storyshelf/core/adapter/capture-queue";
4
- //#region src/schema/capture-attempt.d.ts
5
4
  /** Narrow `capture_attempts` table definition: one row per build capture run. */
6
- declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
5
+ declare const captureAttempts: import("drizzle-orm/sqlite-core/table.js").SQLiteTableWithColumns<{
7
6
  name: "capture_attempts";
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: "capture_attempts";
13
12
  dataType: "string";
@@ -26,7 +25,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
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: "capture_attempts";
32
31
  dataType: "string";
@@ -45,7 +44,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
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: "capture_attempts";
51
50
  dataType: "string";
@@ -64,7 +63,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
64
63
  }, {}, {
65
64
  length: number | undefined;
66
65
  }>;
67
- attemptNo: import("drizzle-orm/sqlite-core").SQLiteColumn<{
66
+ attemptNo: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
68
67
  name: "attempt_no";
69
68
  tableName: "capture_attempts";
70
69
  dataType: "number";
@@ -81,7 +80,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
81
80
  identity: undefined;
82
81
  generated: undefined;
83
82
  }, {}, {}>;
84
- status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
83
+ status: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
85
84
  name: "status";
86
85
  tableName: "capture_attempts";
87
86
  dataType: "string";
@@ -101,7 +100,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
101
100
  length: number | undefined;
102
101
  $type: JobStatus;
103
102
  }>;
104
- error: import("drizzle-orm/sqlite-core").SQLiteColumn<{
103
+ error: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
105
104
  name: "error";
106
105
  tableName: "capture_attempts";
107
106
  dataType: "string";
@@ -120,7 +119,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
120
119
  }, {}, {
121
120
  length: number | undefined;
122
121
  }>;
123
- reqId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
122
+ reqId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
124
123
  name: "req_id";
125
124
  tableName: "capture_attempts";
126
125
  dataType: "string";
@@ -139,7 +138,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
139
138
  }, {}, {
140
139
  length: number | undefined;
141
140
  }>;
142
- storyCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
141
+ storyCount: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
143
142
  name: "story_count";
144
143
  tableName: "capture_attempts";
145
144
  dataType: "number";
@@ -156,7 +155,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
156
155
  identity: undefined;
157
156
  generated: undefined;
158
157
  }, {}, {}>;
159
- failedCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
158
+ failedCount: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
160
159
  name: "failed_count";
161
160
  tableName: "capture_attempts";
162
161
  dataType: "number";
@@ -173,7 +172,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
173
172
  identity: undefined;
174
173
  generated: undefined;
175
174
  }, {}, {}>;
176
- queuedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
175
+ queuedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
177
176
  name: "queued_at";
178
177
  tableName: "capture_attempts";
179
178
  dataType: "string";
@@ -192,7 +191,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
192
191
  }, {}, {
193
192
  length: number | undefined;
194
193
  }>;
195
- startedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
194
+ startedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
196
195
  name: "started_at";
197
196
  tableName: "capture_attempts";
198
197
  dataType: "string";
@@ -211,7 +210,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
211
210
  }, {}, {
212
211
  length: number | undefined;
213
212
  }>;
214
- finishedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
213
+ finishedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
215
214
  name: "finished_at";
216
215
  tableName: "capture_attempts";
217
216
  dataType: "string";
@@ -230,7 +229,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
230
229
  }, {}, {
231
230
  length: number | undefined;
232
231
  }>;
233
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
232
+ createdAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
234
233
  name: "created_at";
235
234
  tableName: "capture_attempts";
236
235
  dataType: "string";
@@ -249,7 +248,7 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
249
248
  }, {}, {
250
249
  length: number | undefined;
251
250
  }>;
252
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
251
+ updatedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
253
252
  name: "updated_at";
254
253
  tableName: "capture_attempts";
255
254
  dataType: "string";
@@ -272,11 +271,11 @@ declare const captureAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWith
272
271
  dialect: 'sqlite';
273
272
  }>;
274
273
  /** Narrow `capture_logs` table definition: every log line of an attempt. */
275
- declare const captureLogs: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
274
+ declare const captureLogs: import("drizzle-orm/sqlite-core/table.js").SQLiteTableWithColumns<{
276
275
  name: "capture_logs";
277
276
  schema: undefined;
278
277
  columns: {
279
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
278
+ id: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
280
279
  name: "id";
281
280
  tableName: "capture_logs";
282
281
  dataType: "string";
@@ -295,7 +294,7 @@ declare const captureLogs: import("drizzle-orm/sqlite-core").SQLiteTableWithColu
295
294
  }, {}, {
296
295
  length: number | undefined;
297
296
  }>;
298
- projectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
297
+ projectId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
299
298
  name: "project_id";
300
299
  tableName: "capture_logs";
301
300
  dataType: "string";
@@ -314,7 +313,7 @@ declare const captureLogs: import("drizzle-orm/sqlite-core").SQLiteTableWithColu
314
313
  }, {}, {
315
314
  length: number | undefined;
316
315
  }>;
317
- buildId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
316
+ buildId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
318
317
  name: "build_id";
319
318
  tableName: "capture_logs";
320
319
  dataType: "string";
@@ -333,7 +332,7 @@ declare const captureLogs: import("drizzle-orm/sqlite-core").SQLiteTableWithColu
333
332
  }, {}, {
334
333
  length: number | undefined;
335
334
  }>;
336
- attemptId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
335
+ attemptId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
337
336
  name: "attempt_id";
338
337
  tableName: "capture_logs";
339
338
  dataType: "string";
@@ -352,7 +351,7 @@ declare const captureLogs: import("drizzle-orm/sqlite-core").SQLiteTableWithColu
352
351
  }, {}, {
353
352
  length: number | undefined;
354
353
  }>;
355
- seq: import("drizzle-orm/sqlite-core").SQLiteColumn<{
354
+ seq: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
356
355
  name: "seq";
357
356
  tableName: "capture_logs";
358
357
  dataType: "number";
@@ -369,7 +368,7 @@ declare const captureLogs: import("drizzle-orm/sqlite-core").SQLiteTableWithColu
369
368
  identity: undefined;
370
369
  generated: undefined;
371
370
  }, {}, {}>;
372
- level: import("drizzle-orm/sqlite-core").SQLiteColumn<{
371
+ level: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
373
372
  name: "level";
374
373
  tableName: "capture_logs";
375
374
  dataType: "string";
@@ -388,7 +387,7 @@ declare const captureLogs: import("drizzle-orm/sqlite-core").SQLiteTableWithColu
388
387
  }, {}, {
389
388
  length: number | undefined;
390
389
  }>;
391
- message: import("drizzle-orm/sqlite-core").SQLiteColumn<{
390
+ message: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
392
391
  name: "message";
393
392
  tableName: "capture_logs";
394
393
  dataType: "string";
@@ -407,7 +406,7 @@ declare const captureLogs: import("drizzle-orm/sqlite-core").SQLiteTableWithColu
407
406
  }, {}, {
408
407
  length: number | undefined;
409
408
  }>;
410
- fields: import("drizzle-orm/sqlite-core").SQLiteColumn<{
409
+ fields: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
411
410
  name: "fields";
412
411
  tableName: "capture_logs";
413
412
  dataType: "string";
@@ -426,7 +425,7 @@ declare const captureLogs: import("drizzle-orm/sqlite-core").SQLiteTableWithColu
426
425
  }, {}, {
427
426
  length: number | undefined;
428
427
  }>;
429
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
428
+ createdAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
430
429
  name: "created_at";
431
430
  tableName: "capture_logs";
432
431
  dataType: "string";
@@ -477,6 +476,5 @@ interface CaptureLog {
477
476
  fields: string | null;
478
477
  createdAt: string;
479
478
  }
480
- //#endregion
481
479
  export { CaptureAttempt, CaptureLog, captureAttempts, captureLogs };
482
480
  //# sourceMappingURL=capture-attempt.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, sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";
7
- //#region src/schema/capture-attempt.ts
7
+ // src/schema/capture-attempt.ts
8
8
  /** Narrow `capture_attempts` table definition: one row per build capture run. */
9
9
  const captureAttempts = sqliteTable("capture_attempts", {
10
10
  id: text("id").primaryKey(),
@@ -34,7 +34,6 @@ const captureLogs = sqliteTable("capture_logs", {
34
34
  fields: text("fields"),
35
35
  createdAt: text("created_at").notNull()
36
36
  }, (t) => [index("capture_logs_attempt_seq_idx").on(t.attemptId, t.seq)]);
37
- //#endregion
38
37
  export { captureAttempts, captureLogs };
39
38
 
40
39
  //# sourceMappingURL=capture-attempt.mjs.map
@@ -1,7 +1,6 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
3
  import { CaptureJobEntry, CaptureJobKind } from "@storyshelf/core/schema";
4
- //#region src/schema/capture-job.d.ts
5
4
  /**
6
5
  * Narrow `capture_jobs` table definition: the database queue's job rows and per-attempt claim rows.
7
6
  * No foreign keys: notify jobs may have no build, and finished rows are purged by retention.
@@ -354,6 +353,5 @@ declare const captureJobs: import("drizzle-orm/sqlite-core").SQLiteTableWithColu
354
353
  };
355
354
  dialect: 'sqlite';
356
355
  }>;
357
- //#endregion
358
356
  export { captureJobs };
359
357
  //# sourceMappingURL=capture-job.d.mts.map
@@ -2,7 +2,7 @@ import "node:path";
2
2
  import "node:url";
3
3
  import.meta.url;
4
4
  import { index, integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
5
- //#region src/schema/capture-job.ts
5
+ // src/schema/capture-job.ts
6
6
  /**
7
7
  * Narrow `capture_jobs` table definition: the database queue's job rows and per-attempt claim rows.
8
8
  * No foreign keys: notify jobs may have no build, and finished rows are purged by retention.
@@ -32,7 +32,6 @@ const captureJobs = sqliteTable("capture_jobs", {
32
32
  index("capture_jobs_build_id_idx").on(table.buildId),
33
33
  index("capture_jobs_entry_created_idx").on(table.entry, table.createdAt)
34
34
  ]);
35
- //#endregion
36
35
  export { captureJobs };
37
36
 
38
37
  //# sourceMappingURL=capture-job.mjs.map
@@ -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 { CaptureShardKind, CaptureShardStatus } from "@storyshelf/core/schema";
4
- //#region src/schema/capture-shard.d.ts
5
4
  /** Narrow `capture_shards` table definition: the stages of a sharded capture and its finalize claim. */
6
- declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
5
+ declare const captureShards: import("drizzle-orm/sqlite-core/table.js").SQLiteTableWithColumns<{
7
6
  name: "capture_shards";
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: "capture_shards";
13
12
  dataType: "string";
@@ -26,7 +25,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
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: "capture_shards";
32
31
  dataType: "string";
@@ -45,7 +44,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
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: "capture_shards";
51
50
  dataType: "string";
@@ -64,7 +63,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
64
63
  }, {}, {
65
64
  length: number | undefined;
66
65
  }>;
67
- kind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
66
+ kind: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
68
67
  name: "kind";
69
68
  tableName: "capture_shards";
70
69
  dataType: "string";
@@ -84,7 +83,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
84
83
  length: number | undefined;
85
84
  $type: CaptureShardKind;
86
85
  }>;
87
- ordinal: import("drizzle-orm/sqlite-core").SQLiteColumn<{
86
+ ordinal: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
88
87
  name: "ordinal";
89
88
  tableName: "capture_shards";
90
89
  dataType: "number";
@@ -101,7 +100,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
101
100
  identity: undefined;
102
101
  generated: undefined;
103
102
  }, {}, {}>;
104
- status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
103
+ status: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
105
104
  name: "status";
106
105
  tableName: "capture_shards";
107
106
  dataType: "string";
@@ -121,7 +120,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
121
120
  length: number | undefined;
122
121
  $type: CaptureShardStatus;
123
122
  }>;
124
- attemptId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
123
+ attemptId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
125
124
  name: "attempt_id";
126
125
  tableName: "capture_shards";
127
126
  dataType: "string";
@@ -140,7 +139,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
140
139
  }, {}, {
141
140
  length: number | undefined;
142
141
  }>;
143
- payload: import("drizzle-orm/sqlite-core").SQLiteColumn<{
142
+ payload: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
144
143
  name: "payload";
145
144
  tableName: "capture_shards";
146
145
  dataType: "string";
@@ -159,7 +158,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
159
158
  }, {}, {
160
159
  length: number | undefined;
161
160
  }>;
162
- result: import("drizzle-orm/sqlite-core").SQLiteColumn<{
161
+ result: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
163
162
  name: "result";
164
163
  tableName: "capture_shards";
165
164
  dataType: "string";
@@ -178,7 +177,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
178
177
  }, {}, {
179
178
  length: number | undefined;
180
179
  }>;
181
- error: import("drizzle-orm/sqlite-core").SQLiteColumn<{
180
+ error: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
182
181
  name: "error";
183
182
  tableName: "capture_shards";
184
183
  dataType: "string";
@@ -197,7 +196,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
197
196
  }, {}, {
198
197
  length: number | undefined;
199
198
  }>;
200
- startedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
199
+ startedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
201
200
  name: "started_at";
202
201
  tableName: "capture_shards";
203
202
  dataType: "string";
@@ -216,7 +215,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
216
215
  }, {}, {
217
216
  length: number | undefined;
218
217
  }>;
219
- finishedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
218
+ finishedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
220
219
  name: "finished_at";
221
220
  tableName: "capture_shards";
222
221
  dataType: "string";
@@ -235,7 +234,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
235
234
  }, {}, {
236
235
  length: number | undefined;
237
236
  }>;
238
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
237
+ createdAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
239
238
  name: "created_at";
240
239
  tableName: "capture_shards";
241
240
  dataType: "string";
@@ -254,7 +253,7 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
254
253
  }, {}, {
255
254
  length: number | undefined;
256
255
  }>;
257
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
256
+ updatedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
258
257
  name: "updated_at";
259
258
  tableName: "capture_shards";
260
259
  dataType: "string";
@@ -276,6 +275,5 @@ declare const captureShards: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
276
275
  };
277
276
  dialect: 'sqlite';
278
277
  }>;
279
- //#endregion
280
278
  export { captureShards };
281
279
  //# sourceMappingURL=capture-shard.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, sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";
7
- //#region src/schema/capture-shard.ts
7
+ // src/schema/capture-shard.ts
8
8
  /** Narrow `capture_shards` table definition: the stages of a sharded capture and its finalize claim. */
9
9
  const captureShards = sqliteTable("capture_shards", {
10
10
  id: text("id").primaryKey(),
@@ -22,7 +22,6 @@ const captureShards = sqliteTable("capture_shards", {
22
22
  createdAt: text("created_at").notNull(),
23
23
  updatedAt: text("updated_at").notNull()
24
24
  }, (t) => [uniqueIndex("capture_shards_build_kind_ordinal_idx").on(t.buildId, t.kind, t.ordinal), index("capture_shards_build_id_idx").on(t.buildId)]);
25
- //#endregion
26
25
  export { captureShards };
27
26
 
28
27
  //# sourceMappingURL=capture-shard.mjs.map
@@ -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/comment.d.ts
4
3
  /** Narrow `comments` table definition. */
5
- declare const comments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4
+ declare const comments: import("drizzle-orm/sqlite-core/table.js").SQLiteTableWithColumns<{
6
5
  name: "comments";
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: "comments";
12
11
  dataType: "string";
@@ -25,7 +24,7 @@ declare const comments: 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: "comments";
31
30
  dataType: "string";
@@ -44,7 +43,7 @@ declare const comments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
44
43
  }, {}, {
45
44
  length: number | undefined;
46
45
  }>;
47
- buildId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
46
+ buildId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
48
47
  name: "build_id";
49
48
  tableName: "comments";
50
49
  dataType: "string";
@@ -63,7 +62,7 @@ declare const comments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
63
62
  }, {}, {
64
63
  length: number | undefined;
65
64
  }>;
66
- snapshotId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
65
+ snapshotId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
67
66
  name: "snapshot_id";
68
67
  tableName: "comments";
69
68
  dataType: "string";
@@ -82,7 +81,7 @@ declare const comments: 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: "comments";
88
87
  dataType: "string";
@@ -101,7 +100,7 @@ declare const comments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
101
100
  }, {}, {
102
101
  length: number | undefined;
103
102
  }>;
104
- body: import("drizzle-orm/sqlite-core").SQLiteColumn<{
103
+ body: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
105
104
  name: "body";
106
105
  tableName: "comments";
107
106
  dataType: "string";
@@ -120,7 +119,7 @@ declare const comments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
120
119
  }, {}, {
121
120
  length: number | undefined;
122
121
  }>;
123
- parentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
122
+ parentId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
124
123
  name: "parent_id";
125
124
  tableName: "comments";
126
125
  dataType: "string";
@@ -139,7 +138,7 @@ declare const comments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
139
138
  }, {}, {
140
139
  length: number | undefined;
141
140
  }>;
142
- resolved: import("drizzle-orm/sqlite-core").SQLiteColumn<{
141
+ resolved: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
143
142
  name: "resolved";
144
143
  tableName: "comments";
145
144
  dataType: "boolean";
@@ -156,7 +155,7 @@ declare const comments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
156
155
  identity: undefined;
157
156
  generated: undefined;
158
157
  }, {}, {}>;
159
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
158
+ createdAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
160
159
  name: "created_at";
161
160
  tableName: "comments";
162
161
  dataType: "string";
@@ -175,7 +174,7 @@ declare const comments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
175
174
  }, {}, {
176
175
  length: number | undefined;
177
176
  }>;
178
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
177
+ updatedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
179
178
  name: "updated_at";
180
179
  tableName: "comments";
181
180
  dataType: "string";
@@ -194,7 +193,7 @@ declare const comments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
194
193
  }, {}, {
195
194
  length: number | undefined;
196
195
  }>;
197
- storyId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
196
+ storyId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
198
197
  name: "story_id";
199
198
  tableName: "comments";
200
199
  dataType: "string";
@@ -230,6 +229,5 @@ interface Comment {
230
229
  updatedAt: string;
231
230
  storyId: string | null;
232
231
  }
233
- //#endregion
234
232
  export { Comment, comments };
235
233
  //# sourceMappingURL=comment.d.mts.map
@@ -6,7 +6,7 @@ import { builds } from "./build.mjs";
6
6
  import { users } from "./user.mjs";
7
7
  import { snapshots } from "./snapshot.mjs";
8
8
  import { index, integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
9
- //#region src/schema/comment.ts
9
+ // src/schema/comment.ts
10
10
  /** Narrow `comments` table definition. */
11
11
  const comments = sqliteTable("comments", {
12
12
  id: text("id").primaryKey(),
@@ -21,7 +21,6 @@ const comments = sqliteTable("comments", {
21
21
  updatedAt: text("updated_at").notNull(),
22
22
  storyId: text("story_id")
23
23
  }, (t) => [index("comments_build_id_idx").on(t.buildId)]);
24
- //#endregion
25
24
  export { comments };
26
25
 
27
26
  //# sourceMappingURL=comment.mjs.map