@vite-hub/comments 0.3.1 → 0.5.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 (67) hide show
  1. package/README.md +37 -15
  2. package/dist/anchor.d.ts +2 -2
  3. package/dist/{client-diagnostics-CcFpkbAk.js → client-diagnostics-Bubm7Shd.js} +20 -5
  4. package/dist/client-files-CJZl5Kc4.js +53 -0
  5. package/dist/client.d.ts +567 -13
  6. package/dist/client.js +1209 -34
  7. package/dist/{console-h4KlhIik.d.ts → console-D1lwNMZn.d.ts} +2 -0
  8. package/dist/{migrate-BDQ8xqUs.js → database-6hXRnqDE.js} +47 -2
  9. package/dist/database-CTo7mx6t.d.ts +575 -0
  10. package/dist/database.d.ts +2 -1
  11. package/dist/database.js +2 -2
  12. package/dist/{define-43mMR39K.js → define-BMBSVbD9.js} +1 -1
  13. package/dist/{define-B3TF9zzn.d.ts → define-CmIFU96x.d.ts} +8 -4
  14. package/dist/{errors-4gelGVmK.js → errors-BJTZ9iyv.js} +24 -0
  15. package/dist/{errors-C6qptPoG.js → errors-Dq4AHjza.js} +23 -3
  16. package/dist/index-RiHzmV16.d.ts +194 -0
  17. package/dist/index.d.ts +6 -7
  18. package/dist/index.js +57 -9
  19. package/dist/{install-W9ghhGoh.d.ts → install-BGGQKbQ4.d.ts} +9 -3
  20. package/dist/{install-BcMPgPk_.js → install-DrAse1Fa.js} +912 -60
  21. package/dist/{installed-B-PfERBU.js → installed-C3EoqJEY.js} +7 -6
  22. package/dist/{operations-GLeOqgMt.d.ts → operations-BKhUWYkb.d.ts} +10 -5
  23. package/dist/{operations-D4A1Fcgf.d.ts → operations-VyyNZusz.d.ts} +13 -2
  24. package/dist/{operations-DMMIfYPW.js → operations-lsVKE0GH.js} +312 -219
  25. package/dist/operations.d.ts +2 -2
  26. package/dist/operations.js +2 -2
  27. package/dist/overlay/client-DBmJ4C1M.js +4 -0
  28. package/dist/overlay/overlay.js +41 -65
  29. package/dist/page/loader.js +39 -47
  30. package/dist/{page-DtbMOEMd.d.ts → page-Bzj0CszG.d.ts} +1 -10
  31. package/dist/{page-B41ozN63.js → page-DRz_sDY4.js} +1 -1
  32. package/dist/{page-tools-shared-NHUjKI8E.js → page-tools-shared-BNnuPK93.js} +6 -3
  33. package/dist/{plugin-PS8PMYus.js → plugin-DRsNaJaK.js} +34 -8
  34. package/dist/realtime.d.ts +2 -2
  35. package/dist/realtime.js +2 -2
  36. package/dist/reply-id-P_bSuEng.js +12 -0
  37. package/dist/request-log-Dj9Vw7qG.js +105 -0
  38. package/dist/request-origin-CFU0TQ7E.js +49 -0
  39. package/dist/{rpc-RKPAusHp.js → rpc-BQqYx8kb.js} +23 -7
  40. package/dist/{rpc-HBcWtg0T.d.ts → rpc-CuJ5GLIz.d.ts} +1 -1
  41. package/dist/rpc.d.ts +1 -1
  42. package/dist/rpc.js +1 -1
  43. package/dist/runtime/auth.d.ts +2 -2
  44. package/dist/runtime/auth.js +2 -2
  45. package/dist/runtime/console.d.ts +1 -1
  46. package/dist/runtime/console.js +3 -3
  47. package/dist/runtime/index.d.ts +42 -13
  48. package/dist/runtime/index.js +224 -22
  49. package/dist/{server-D8k-0GXe.js → server-Yk610niJ.js} +1 -1
  50. package/dist/server.d.ts +6 -5
  51. package/dist/server.js +6 -6
  52. package/dist/service-Bj-Mg63c.d.ts +73 -0
  53. package/dist/{service-GHhhyQj4.js → service-DA5BwfPQ.js} +71 -14
  54. package/dist/{session-DVx-1Tym.d.ts → session-DUcEor2W.d.ts} +3 -3
  55. package/dist/{session-EkudzUmm.js → session-X_g9dnU5.js} +27 -30
  56. package/dist/{service-CFVm23k7.d.ts → store-CsUNfC1w.d.ts} +11 -72
  57. package/dist/table-names-B9LlRC0B.js +16 -0
  58. package/dist/testing.d.ts +1 -1
  59. package/dist/testing.js +38 -5
  60. package/dist/{types-CZujrMFd.d.ts → types-BLaYh0_f.d.ts} +48 -4
  61. package/dist/{types-BIS0hCEl.d.ts → types-C35INXIs.d.ts} +88 -4
  62. package/dist/vite.d.ts +24 -7
  63. package/dist/vite.js +322 -173
  64. package/package.json +9 -9
  65. package/dist/errors-CyQyKAvy.d.ts +0 -185
  66. package/dist/index-DNhy69Wt.d.ts +0 -83
  67. package/dist/overlay/client-DmsSMOzi.js +0 -4
@@ -48,6 +48,8 @@ interface ViteHubResourceSummary {
48
48
  owner: string;
49
49
  /** Absent when no id is known yet. */
50
50
  source?: ViteHubResourceIdSource;
51
+ /** The resource is in the Wrangler config of a standalone Provider Output Worker, not in Nitro's. */
52
+ standalone?: boolean;
51
53
  }
52
54
  interface ViteHubInspectionContributor {
53
55
  definitions?: readonly ViteHubDefinitionInspector[];
@@ -1,4 +1,4 @@
1
- import { t as commentsErrorDiagnostics } from "./errors-C6qptPoG.js";
1
+ import { t as commentsErrorDiagnostics } from "./errors-Dq4AHjza.js";
2
2
  import { sql } from "drizzle-orm";
3
3
  import { index, integer, sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";
4
4
  //#region src/operations-core/database.ts
@@ -286,4 +286,49 @@ function commentsSchemaGate(db, owner, options = {}) {
286
286
  };
287
287
  }
288
288
  //#endregion
289
- export { migrateComments as a, commentForge as c, commentsSchema as d, liveThreadsBackup as i, commentMessages as l, commentsSchemaGate as n, commentsTables as o, commentsSchemaState as r, commentCounters as s, commentsMigrationSql as t, commentThreads as u };
289
+ //#region src/send/database.ts
290
+ /**
291
+ * One row for each send: the member, the threads it carried with the last message of each, and the read token. `threads`
292
+ * holds JSON, `[{ id, message, role }]`, and `sender` the member as Comments knew them when they sent. The token is
293
+ * kept as its SHA-256 hash.
294
+ */
295
+ const commentSends = sqliteTable("vitehub_comment_sends", {
296
+ id: text("id").primaryKey(),
297
+ member: text("member").notNull(),
298
+ subjectKind: text("subject_kind").notNull(),
299
+ subjectId: text("subject_id").notNull(),
300
+ page: text("page").notNull(),
301
+ threads: text("threads").notNull(),
302
+ key: text("key").notNull(),
303
+ state: text("state", { enum: [
304
+ "pending",
305
+ "sent",
306
+ "working",
307
+ "done",
308
+ "failed"
309
+ ] }).notNull(),
310
+ delivery: text("delivery"),
311
+ endpoint: text("endpoint"),
312
+ thread: text("thread"),
313
+ error: text("error"),
314
+ sender: text("sender").notNull(),
315
+ tokenHash: text("token_hash"),
316
+ tokenExpiresAt: integer("token_expires_at"),
317
+ createdAt: integer("created_at").notNull(),
318
+ updatedAt: integer("updated_at").notNull()
319
+ }, (table) => [
320
+ index("vitehub_comment_sends_member").on(table.member, table.createdAt),
321
+ index("vitehub_comment_sends_subject").on(table.subjectKind, table.subjectId, table.createdAt),
322
+ uniqueIndex("vitehub_comment_sends_live_key").on(table.key).where(sql`${table.state} <> 'failed'`)
323
+ ]);
324
+ /** The tables of Send, for a Database contribution. Comments adds them only when `defineComments({ send })` is on. */
325
+ const commentSendsSchema = { commentSends };
326
+ /** `commentSendsSchema` as SQLite statements that are safe to run on every start. */
327
+ const commentSendsTables = [
328
+ "CREATE TABLE IF NOT EXISTS `vitehub_comment_sends` (`id` text PRIMARY KEY NOT NULL, `member` text NOT NULL, `subject_kind` text NOT NULL, `subject_id` text NOT NULL, `page` text NOT NULL, `threads` text NOT NULL, `key` text NOT NULL, `state` text NOT NULL, `delivery` text, `endpoint` text, `thread` text, `error` text, `sender` text NOT NULL, `token_hash` text, `token_expires_at` integer, `created_at` integer NOT NULL, `updated_at` integer NOT NULL)",
329
+ "CREATE INDEX IF NOT EXISTS `vitehub_comment_sends_member` ON `vitehub_comment_sends` (`member`,`created_at`)",
330
+ "CREATE INDEX IF NOT EXISTS `vitehub_comment_sends_subject` ON `vitehub_comment_sends` (`subject_kind`,`subject_id`,`created_at`)",
331
+ "CREATE UNIQUE INDEX IF NOT EXISTS `vitehub_comment_sends_live_key` ON `vitehub_comment_sends` (`key`) WHERE `state` <> 'failed'"
332
+ ];
333
+ //#endregion
334
+ export { commentsSchemaGate as a, migrateComments as c, commentForge as d, commentMessages as f, commentsMigrationSql as i, commentsTables as l, commentsSchema as m, commentSendsSchema as n, commentsSchemaState as o, commentThreads as p, commentSendsTables as r, liveThreadsBackup as s, commentSends as t, commentCounters as u };
@@ -0,0 +1,575 @@
1
+ //#region src/send/database.d.ts
2
+ /** Where a send is: delivered, read by the agent, answered, or not delivered. */
3
+ type CommentSendState = "pending" | "sent" | "working" | "done" | "failed";
4
+ /**
5
+ * One row for each send: the member, the threads it carried with the last message of each, and the read token. `threads`
6
+ * holds JSON, `[{ id, message, role }]`, and `sender` the member as Comments knew them when they sent. The token is
7
+ * kept as its SHA-256 hash.
8
+ */
9
+ declare const commentSends: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
10
+ name: "vitehub_comment_sends";
11
+ schema: undefined;
12
+ columns: {
13
+ id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
14
+ name: string;
15
+ tableName: "vitehub_comment_sends";
16
+ dataType: "string";
17
+ data: string;
18
+ driverParam: string;
19
+ notNull: true;
20
+ hasDefault: false;
21
+ isPrimaryKey: true;
22
+ isAutoincrement: false;
23
+ hasRuntimeDefault: false;
24
+ enumValues: [string, ...string[]];
25
+ baseColumn: never;
26
+ identity: undefined;
27
+ generated: undefined;
28
+ }, {}>;
29
+ member: import("drizzle-orm/sqlite-core").SQLiteColumn<{
30
+ name: string;
31
+ tableName: "vitehub_comment_sends";
32
+ dataType: "string";
33
+ data: string;
34
+ driverParam: string;
35
+ notNull: true;
36
+ hasDefault: false;
37
+ isPrimaryKey: false;
38
+ isAutoincrement: false;
39
+ hasRuntimeDefault: false;
40
+ enumValues: [string, ...string[]];
41
+ baseColumn: never;
42
+ identity: undefined;
43
+ generated: undefined;
44
+ }, {}>;
45
+ subjectKind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
46
+ name: string;
47
+ tableName: "vitehub_comment_sends";
48
+ dataType: "string";
49
+ data: string;
50
+ driverParam: string;
51
+ notNull: true;
52
+ hasDefault: false;
53
+ isPrimaryKey: false;
54
+ isAutoincrement: false;
55
+ hasRuntimeDefault: false;
56
+ enumValues: [string, ...string[]];
57
+ baseColumn: never;
58
+ identity: undefined;
59
+ generated: undefined;
60
+ }, {}>;
61
+ subjectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
62
+ name: string;
63
+ tableName: "vitehub_comment_sends";
64
+ dataType: "string";
65
+ data: string;
66
+ driverParam: string;
67
+ notNull: true;
68
+ hasDefault: false;
69
+ isPrimaryKey: false;
70
+ isAutoincrement: false;
71
+ hasRuntimeDefault: false;
72
+ enumValues: [string, ...string[]];
73
+ baseColumn: never;
74
+ identity: undefined;
75
+ generated: undefined;
76
+ }, {}>;
77
+ page: import("drizzle-orm/sqlite-core").SQLiteColumn<{
78
+ name: string;
79
+ tableName: "vitehub_comment_sends";
80
+ dataType: "string";
81
+ data: string;
82
+ driverParam: string;
83
+ notNull: true;
84
+ hasDefault: false;
85
+ isPrimaryKey: false;
86
+ isAutoincrement: false;
87
+ hasRuntimeDefault: false;
88
+ enumValues: [string, ...string[]];
89
+ baseColumn: never;
90
+ identity: undefined;
91
+ generated: undefined;
92
+ }, {}>;
93
+ threads: import("drizzle-orm/sqlite-core").SQLiteColumn<{
94
+ name: string;
95
+ tableName: "vitehub_comment_sends";
96
+ dataType: "string";
97
+ data: string;
98
+ driverParam: string;
99
+ notNull: true;
100
+ hasDefault: false;
101
+ isPrimaryKey: false;
102
+ isAutoincrement: false;
103
+ hasRuntimeDefault: false;
104
+ enumValues: [string, ...string[]];
105
+ baseColumn: never;
106
+ identity: undefined;
107
+ generated: undefined;
108
+ }, {}>;
109
+ key: import("drizzle-orm/sqlite-core").SQLiteColumn<{
110
+ name: string;
111
+ tableName: "vitehub_comment_sends";
112
+ dataType: "string";
113
+ data: string;
114
+ driverParam: string;
115
+ notNull: true;
116
+ hasDefault: false;
117
+ isPrimaryKey: false;
118
+ isAutoincrement: false;
119
+ hasRuntimeDefault: false;
120
+ enumValues: [string, ...string[]];
121
+ baseColumn: never;
122
+ identity: undefined;
123
+ generated: undefined;
124
+ }, {}>;
125
+ state: import("drizzle-orm/sqlite-core").SQLiteColumn<{
126
+ name: string;
127
+ tableName: "vitehub_comment_sends";
128
+ dataType: "string enum";
129
+ data: "pending" | "sent" | "working" | "done" | "failed";
130
+ driverParam: string;
131
+ notNull: true;
132
+ hasDefault: false;
133
+ isPrimaryKey: false;
134
+ isAutoincrement: false;
135
+ hasRuntimeDefault: false;
136
+ enumValues: ["pending", "sent", "working", "done", "failed"];
137
+ baseColumn: never;
138
+ identity: undefined;
139
+ generated: undefined;
140
+ }, {}>;
141
+ delivery: import("drizzle-orm/sqlite-core").SQLiteColumn<{
142
+ name: string;
143
+ tableName: "vitehub_comment_sends";
144
+ dataType: "string";
145
+ data: string;
146
+ driverParam: string;
147
+ notNull: false;
148
+ hasDefault: false;
149
+ isPrimaryKey: false;
150
+ isAutoincrement: false;
151
+ hasRuntimeDefault: false;
152
+ enumValues: [string, ...string[]];
153
+ baseColumn: never;
154
+ identity: undefined;
155
+ generated: undefined;
156
+ }, {}>;
157
+ endpoint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
158
+ name: string;
159
+ tableName: "vitehub_comment_sends";
160
+ dataType: "string";
161
+ data: string;
162
+ driverParam: string;
163
+ notNull: false;
164
+ hasDefault: false;
165
+ isPrimaryKey: false;
166
+ isAutoincrement: false;
167
+ hasRuntimeDefault: false;
168
+ enumValues: [string, ...string[]];
169
+ baseColumn: never;
170
+ identity: undefined;
171
+ generated: undefined;
172
+ }, {}>;
173
+ thread: import("drizzle-orm/sqlite-core").SQLiteColumn<{
174
+ name: string;
175
+ tableName: "vitehub_comment_sends";
176
+ dataType: "string";
177
+ data: string;
178
+ driverParam: string;
179
+ notNull: false;
180
+ hasDefault: false;
181
+ isPrimaryKey: false;
182
+ isAutoincrement: false;
183
+ hasRuntimeDefault: false;
184
+ enumValues: [string, ...string[]];
185
+ baseColumn: never;
186
+ identity: undefined;
187
+ generated: undefined;
188
+ }, {}>;
189
+ error: import("drizzle-orm/sqlite-core").SQLiteColumn<{
190
+ name: string;
191
+ tableName: "vitehub_comment_sends";
192
+ dataType: "string";
193
+ data: string;
194
+ driverParam: string;
195
+ notNull: false;
196
+ hasDefault: false;
197
+ isPrimaryKey: false;
198
+ isAutoincrement: false;
199
+ hasRuntimeDefault: false;
200
+ enumValues: [string, ...string[]];
201
+ baseColumn: never;
202
+ identity: undefined;
203
+ generated: undefined;
204
+ }, {}>;
205
+ sender: import("drizzle-orm/sqlite-core").SQLiteColumn<{
206
+ name: string;
207
+ tableName: "vitehub_comment_sends";
208
+ dataType: "string";
209
+ data: string;
210
+ driverParam: string;
211
+ notNull: true;
212
+ hasDefault: false;
213
+ isPrimaryKey: false;
214
+ isAutoincrement: false;
215
+ hasRuntimeDefault: false;
216
+ enumValues: [string, ...string[]];
217
+ baseColumn: never;
218
+ identity: undefined;
219
+ generated: undefined;
220
+ }, {}>;
221
+ tokenHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
222
+ name: string;
223
+ tableName: "vitehub_comment_sends";
224
+ dataType: "string";
225
+ data: string;
226
+ driverParam: string;
227
+ notNull: false;
228
+ hasDefault: false;
229
+ isPrimaryKey: false;
230
+ isAutoincrement: false;
231
+ hasRuntimeDefault: false;
232
+ enumValues: [string, ...string[]];
233
+ baseColumn: never;
234
+ identity: undefined;
235
+ generated: undefined;
236
+ }, {}>;
237
+ tokenExpiresAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
238
+ name: string;
239
+ tableName: "vitehub_comment_sends";
240
+ dataType: "number int53";
241
+ data: number;
242
+ driverParam: number;
243
+ notNull: false;
244
+ hasDefault: false;
245
+ isPrimaryKey: false;
246
+ isAutoincrement: false;
247
+ hasRuntimeDefault: false;
248
+ enumValues: undefined;
249
+ baseColumn: never;
250
+ identity: undefined;
251
+ generated: undefined;
252
+ }, {}>;
253
+ createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
254
+ name: string;
255
+ tableName: "vitehub_comment_sends";
256
+ dataType: "number int53";
257
+ data: number;
258
+ driverParam: number;
259
+ notNull: true;
260
+ hasDefault: false;
261
+ isPrimaryKey: false;
262
+ isAutoincrement: false;
263
+ hasRuntimeDefault: false;
264
+ enumValues: undefined;
265
+ baseColumn: never;
266
+ identity: undefined;
267
+ generated: undefined;
268
+ }, {}>;
269
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
270
+ name: string;
271
+ tableName: "vitehub_comment_sends";
272
+ dataType: "number int53";
273
+ data: number;
274
+ driverParam: number;
275
+ notNull: true;
276
+ hasDefault: false;
277
+ isPrimaryKey: false;
278
+ isAutoincrement: false;
279
+ hasRuntimeDefault: false;
280
+ enumValues: undefined;
281
+ baseColumn: never;
282
+ identity: undefined;
283
+ generated: undefined;
284
+ }, {}>;
285
+ };
286
+ dialect: "sqlite";
287
+ isAlias: false;
288
+ }>;
289
+ /** The tables of Send, for a Database contribution. Comments adds them only when `defineComments({ send })` is on. */
290
+ declare const commentSendsSchema: {
291
+ commentSends: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
292
+ name: "vitehub_comment_sends";
293
+ schema: undefined;
294
+ columns: {
295
+ id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
296
+ name: string;
297
+ tableName: "vitehub_comment_sends";
298
+ dataType: "string";
299
+ data: string;
300
+ driverParam: string;
301
+ notNull: true;
302
+ hasDefault: false;
303
+ isPrimaryKey: true;
304
+ isAutoincrement: false;
305
+ hasRuntimeDefault: false;
306
+ enumValues: [string, ...string[]];
307
+ baseColumn: never;
308
+ identity: undefined;
309
+ generated: undefined;
310
+ }, {}>;
311
+ member: import("drizzle-orm/sqlite-core").SQLiteColumn<{
312
+ name: string;
313
+ tableName: "vitehub_comment_sends";
314
+ dataType: "string";
315
+ data: string;
316
+ driverParam: string;
317
+ notNull: true;
318
+ hasDefault: false;
319
+ isPrimaryKey: false;
320
+ isAutoincrement: false;
321
+ hasRuntimeDefault: false;
322
+ enumValues: [string, ...string[]];
323
+ baseColumn: never;
324
+ identity: undefined;
325
+ generated: undefined;
326
+ }, {}>;
327
+ subjectKind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
328
+ name: string;
329
+ tableName: "vitehub_comment_sends";
330
+ dataType: "string";
331
+ data: string;
332
+ driverParam: string;
333
+ notNull: true;
334
+ hasDefault: false;
335
+ isPrimaryKey: false;
336
+ isAutoincrement: false;
337
+ hasRuntimeDefault: false;
338
+ enumValues: [string, ...string[]];
339
+ baseColumn: never;
340
+ identity: undefined;
341
+ generated: undefined;
342
+ }, {}>;
343
+ subjectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
344
+ name: string;
345
+ tableName: "vitehub_comment_sends";
346
+ dataType: "string";
347
+ data: string;
348
+ driverParam: string;
349
+ notNull: true;
350
+ hasDefault: false;
351
+ isPrimaryKey: false;
352
+ isAutoincrement: false;
353
+ hasRuntimeDefault: false;
354
+ enumValues: [string, ...string[]];
355
+ baseColumn: never;
356
+ identity: undefined;
357
+ generated: undefined;
358
+ }, {}>;
359
+ page: import("drizzle-orm/sqlite-core").SQLiteColumn<{
360
+ name: string;
361
+ tableName: "vitehub_comment_sends";
362
+ dataType: "string";
363
+ data: string;
364
+ driverParam: string;
365
+ notNull: true;
366
+ hasDefault: false;
367
+ isPrimaryKey: false;
368
+ isAutoincrement: false;
369
+ hasRuntimeDefault: false;
370
+ enumValues: [string, ...string[]];
371
+ baseColumn: never;
372
+ identity: undefined;
373
+ generated: undefined;
374
+ }, {}>;
375
+ threads: import("drizzle-orm/sqlite-core").SQLiteColumn<{
376
+ name: string;
377
+ tableName: "vitehub_comment_sends";
378
+ dataType: "string";
379
+ data: string;
380
+ driverParam: string;
381
+ notNull: true;
382
+ hasDefault: false;
383
+ isPrimaryKey: false;
384
+ isAutoincrement: false;
385
+ hasRuntimeDefault: false;
386
+ enumValues: [string, ...string[]];
387
+ baseColumn: never;
388
+ identity: undefined;
389
+ generated: undefined;
390
+ }, {}>;
391
+ key: import("drizzle-orm/sqlite-core").SQLiteColumn<{
392
+ name: string;
393
+ tableName: "vitehub_comment_sends";
394
+ dataType: "string";
395
+ data: string;
396
+ driverParam: string;
397
+ notNull: true;
398
+ hasDefault: false;
399
+ isPrimaryKey: false;
400
+ isAutoincrement: false;
401
+ hasRuntimeDefault: false;
402
+ enumValues: [string, ...string[]];
403
+ baseColumn: never;
404
+ identity: undefined;
405
+ generated: undefined;
406
+ }, {}>;
407
+ state: import("drizzle-orm/sqlite-core").SQLiteColumn<{
408
+ name: string;
409
+ tableName: "vitehub_comment_sends";
410
+ dataType: "string enum";
411
+ data: "pending" | "sent" | "working" | "done" | "failed";
412
+ driverParam: string;
413
+ notNull: true;
414
+ hasDefault: false;
415
+ isPrimaryKey: false;
416
+ isAutoincrement: false;
417
+ hasRuntimeDefault: false;
418
+ enumValues: ["pending", "sent", "working", "done", "failed"];
419
+ baseColumn: never;
420
+ identity: undefined;
421
+ generated: undefined;
422
+ }, {}>;
423
+ delivery: import("drizzle-orm/sqlite-core").SQLiteColumn<{
424
+ name: string;
425
+ tableName: "vitehub_comment_sends";
426
+ dataType: "string";
427
+ data: string;
428
+ driverParam: string;
429
+ notNull: false;
430
+ hasDefault: false;
431
+ isPrimaryKey: false;
432
+ isAutoincrement: false;
433
+ hasRuntimeDefault: false;
434
+ enumValues: [string, ...string[]];
435
+ baseColumn: never;
436
+ identity: undefined;
437
+ generated: undefined;
438
+ }, {}>;
439
+ endpoint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
440
+ name: string;
441
+ tableName: "vitehub_comment_sends";
442
+ dataType: "string";
443
+ data: string;
444
+ driverParam: string;
445
+ notNull: false;
446
+ hasDefault: false;
447
+ isPrimaryKey: false;
448
+ isAutoincrement: false;
449
+ hasRuntimeDefault: false;
450
+ enumValues: [string, ...string[]];
451
+ baseColumn: never;
452
+ identity: undefined;
453
+ generated: undefined;
454
+ }, {}>;
455
+ thread: import("drizzle-orm/sqlite-core").SQLiteColumn<{
456
+ name: string;
457
+ tableName: "vitehub_comment_sends";
458
+ dataType: "string";
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
+ error: import("drizzle-orm/sqlite-core").SQLiteColumn<{
472
+ name: string;
473
+ tableName: "vitehub_comment_sends";
474
+ dataType: "string";
475
+ data: string;
476
+ driverParam: string;
477
+ notNull: false;
478
+ hasDefault: false;
479
+ isPrimaryKey: false;
480
+ isAutoincrement: false;
481
+ hasRuntimeDefault: false;
482
+ enumValues: [string, ...string[]];
483
+ baseColumn: never;
484
+ identity: undefined;
485
+ generated: undefined;
486
+ }, {}>;
487
+ sender: import("drizzle-orm/sqlite-core").SQLiteColumn<{
488
+ name: string;
489
+ tableName: "vitehub_comment_sends";
490
+ dataType: "string";
491
+ data: string;
492
+ driverParam: string;
493
+ notNull: true;
494
+ hasDefault: false;
495
+ isPrimaryKey: false;
496
+ isAutoincrement: false;
497
+ hasRuntimeDefault: false;
498
+ enumValues: [string, ...string[]];
499
+ baseColumn: never;
500
+ identity: undefined;
501
+ generated: undefined;
502
+ }, {}>;
503
+ tokenHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
504
+ name: string;
505
+ tableName: "vitehub_comment_sends";
506
+ dataType: "string";
507
+ data: string;
508
+ driverParam: string;
509
+ notNull: false;
510
+ hasDefault: false;
511
+ isPrimaryKey: false;
512
+ isAutoincrement: false;
513
+ hasRuntimeDefault: false;
514
+ enumValues: [string, ...string[]];
515
+ baseColumn: never;
516
+ identity: undefined;
517
+ generated: undefined;
518
+ }, {}>;
519
+ tokenExpiresAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
520
+ name: string;
521
+ tableName: "vitehub_comment_sends";
522
+ dataType: "number int53";
523
+ data: number;
524
+ driverParam: number;
525
+ notNull: false;
526
+ hasDefault: false;
527
+ isPrimaryKey: false;
528
+ isAutoincrement: false;
529
+ hasRuntimeDefault: false;
530
+ enumValues: undefined;
531
+ baseColumn: never;
532
+ identity: undefined;
533
+ generated: undefined;
534
+ }, {}>;
535
+ createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
536
+ name: string;
537
+ tableName: "vitehub_comment_sends";
538
+ dataType: "number int53";
539
+ data: number;
540
+ driverParam: number;
541
+ notNull: true;
542
+ hasDefault: false;
543
+ isPrimaryKey: false;
544
+ isAutoincrement: false;
545
+ hasRuntimeDefault: false;
546
+ enumValues: undefined;
547
+ baseColumn: never;
548
+ identity: undefined;
549
+ generated: undefined;
550
+ }, {}>;
551
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
552
+ name: string;
553
+ tableName: "vitehub_comment_sends";
554
+ dataType: "number int53";
555
+ data: number;
556
+ driverParam: number;
557
+ notNull: true;
558
+ hasDefault: false;
559
+ isPrimaryKey: false;
560
+ isAutoincrement: false;
561
+ hasRuntimeDefault: false;
562
+ enumValues: undefined;
563
+ baseColumn: never;
564
+ identity: undefined;
565
+ generated: undefined;
566
+ }, {}>;
567
+ };
568
+ dialect: "sqlite";
569
+ isAlias: false;
570
+ }>;
571
+ };
572
+ /** `commentSendsSchema` as SQLite statements that are safe to run on every start. */
573
+ declare const commentSendsTables: readonly string[];
574
+ //#endregion
575
+ export { commentSendsTables as i, commentSends as n, commentSendsSchema as r, CommentSendState as t };
@@ -1,4 +1,5 @@
1
1
  import { a as commentsSchema, i as commentThreads, n as commentForge, r as commentMessages, t as commentCounters } from "./database-CA1aHKN7.js";
2
+ import { i as commentSendsTables, n as commentSends, r as commentSendsSchema, t as CommentSendState } from "./database-CTo7mx6t.js";
2
3
  import { a as commentsMigrationSql, c as migrateComments, i as CommentsSchemaState, n as CommentsMigrationOptions, o as commentsSchemaState, s as liveThreadsBackup, t as CommentsMigration } from "./migrate-B0k_0swk.js";
3
4
  //#region src/tables.d.ts
4
5
  /**
@@ -9,4 +10,4 @@ import { a as commentsMigrationSql, c as migrateComments, i as CommentsSchemaSta
9
10
  */
10
11
  export declare const commentsTables: readonly string[];
11
12
  //#endregion
12
- export { type CommentsMigration, type CommentsMigrationOptions, type CommentsSchemaState, commentCounters, commentForge, commentMessages, commentThreads, commentsMigrationSql, commentsSchema, commentsSchemaState, liveThreadsBackup, migrateComments };
13
+ export { type CommentSendState, type CommentsMigration, type CommentsMigrationOptions, type CommentsSchemaState, commentCounters, commentForge, commentMessages, commentSends, commentSendsSchema, commentSendsTables, commentThreads, commentsMigrationSql, commentsSchema, commentsSchemaState, liveThreadsBackup, migrateComments };
package/dist/database.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as migrateComments, c as commentForge, d as commentsSchema, i as liveThreadsBackup, l as commentMessages, o as commentsTables, r as commentsSchemaState, s as commentCounters, t as commentsMigrationSql, u as commentThreads } from "./migrate-BDQ8xqUs.js";
2
- export { commentCounters, commentForge, commentMessages, commentThreads, commentsMigrationSql, commentsSchema, commentsSchemaState, commentsTables, liveThreadsBackup, migrateComments };
1
+ import { c as migrateComments, d as commentForge, f as commentMessages, i as commentsMigrationSql, l as commentsTables, m as commentsSchema, n as commentSendsSchema, o as commentsSchemaState, p as commentThreads, r as commentSendsTables, s as liveThreadsBackup, t as commentSends, u as commentCounters } from "./database-6hXRnqDE.js";
2
+ export { commentCounters, commentForge, commentMessages, commentSends, commentSendsSchema, commentSendsTables, commentThreads, commentsMigrationSql, commentsSchema, commentsSchemaState, commentsTables, liveThreadsBackup, migrateComments };
@@ -1,4 +1,4 @@
1
- import { t as commentsErrorDiagnostics } from "./errors-C6qptPoG.js";
1
+ import { t as commentsErrorDiagnostics } from "./errors-Dq4AHjza.js";
2
2
  //#region src/operations-core/define.ts
3
3
  const marker = Symbol.for("vitehub.comments.definition");
4
4
  /** Marks a definition, so the build can check what `server/comments.ts` exports. */