@rawdash/adapter-libsql 0.4.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.
@@ -0,0 +1,387 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "ef2445c8-d1b8-4cc2-9c2b-cb7426886fb4",
5
+ "prevId": "efd9fbb0-84e0-4a66-863e-614fbd940135",
6
+ "tables": {
7
+ "distributions": {
8
+ "name": "distributions",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "integer",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": true
16
+ },
17
+ "connector_id": {
18
+ "name": "connector_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "name": {
25
+ "name": "name",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "ts": {
32
+ "name": "ts",
33
+ "type": "integer",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "kind": {
39
+ "name": "kind",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "data": {
46
+ "name": "data",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "attributes": {
53
+ "name": "attributes",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false,
58
+ "default": "'{}'"
59
+ }
60
+ },
61
+ "indexes": {
62
+ "distributions_conn_name_ts": {
63
+ "name": "distributions_conn_name_ts",
64
+ "columns": ["connector_id", "name", "ts"],
65
+ "isUnique": false
66
+ }
67
+ },
68
+ "foreignKeys": {},
69
+ "compositePrimaryKeys": {},
70
+ "uniqueConstraints": {},
71
+ "checkConstraints": {}
72
+ },
73
+ "edges": {
74
+ "name": "edges",
75
+ "columns": {
76
+ "connector_id": {
77
+ "name": "connector_id",
78
+ "type": "text",
79
+ "primaryKey": false,
80
+ "notNull": true,
81
+ "autoincrement": false
82
+ },
83
+ "from_type": {
84
+ "name": "from_type",
85
+ "type": "text",
86
+ "primaryKey": false,
87
+ "notNull": true,
88
+ "autoincrement": false
89
+ },
90
+ "from_id": {
91
+ "name": "from_id",
92
+ "type": "text",
93
+ "primaryKey": false,
94
+ "notNull": true,
95
+ "autoincrement": false
96
+ },
97
+ "kind": {
98
+ "name": "kind",
99
+ "type": "text",
100
+ "primaryKey": false,
101
+ "notNull": true,
102
+ "autoincrement": false
103
+ },
104
+ "to_type": {
105
+ "name": "to_type",
106
+ "type": "text",
107
+ "primaryKey": false,
108
+ "notNull": true,
109
+ "autoincrement": false
110
+ },
111
+ "to_id": {
112
+ "name": "to_id",
113
+ "type": "text",
114
+ "primaryKey": false,
115
+ "notNull": true,
116
+ "autoincrement": false
117
+ },
118
+ "attributes": {
119
+ "name": "attributes",
120
+ "type": "text",
121
+ "primaryKey": false,
122
+ "notNull": true,
123
+ "autoincrement": false,
124
+ "default": "'{}'"
125
+ },
126
+ "updated_at": {
127
+ "name": "updated_at",
128
+ "type": "integer",
129
+ "primaryKey": false,
130
+ "notNull": true,
131
+ "autoincrement": false
132
+ }
133
+ },
134
+ "indexes": {
135
+ "edges_conn_kind": {
136
+ "name": "edges_conn_kind",
137
+ "columns": ["connector_id", "kind"],
138
+ "isUnique": false
139
+ },
140
+ "edges_conn_from": {
141
+ "name": "edges_conn_from",
142
+ "columns": ["connector_id", "from_type", "from_id"],
143
+ "isUnique": false
144
+ }
145
+ },
146
+ "foreignKeys": {},
147
+ "compositePrimaryKeys": {
148
+ "edges_connector_id_from_type_from_id_kind_to_type_to_id_pk": {
149
+ "columns": [
150
+ "connector_id",
151
+ "from_type",
152
+ "from_id",
153
+ "kind",
154
+ "to_type",
155
+ "to_id"
156
+ ],
157
+ "name": "edges_connector_id_from_type_from_id_kind_to_type_to_id_pk"
158
+ }
159
+ },
160
+ "uniqueConstraints": {},
161
+ "checkConstraints": {}
162
+ },
163
+ "entities": {
164
+ "name": "entities",
165
+ "columns": {
166
+ "connector_id": {
167
+ "name": "connector_id",
168
+ "type": "text",
169
+ "primaryKey": false,
170
+ "notNull": true,
171
+ "autoincrement": false
172
+ },
173
+ "type": {
174
+ "name": "type",
175
+ "type": "text",
176
+ "primaryKey": false,
177
+ "notNull": true,
178
+ "autoincrement": false
179
+ },
180
+ "id": {
181
+ "name": "id",
182
+ "type": "text",
183
+ "primaryKey": false,
184
+ "notNull": true,
185
+ "autoincrement": false
186
+ },
187
+ "attributes": {
188
+ "name": "attributes",
189
+ "type": "text",
190
+ "primaryKey": false,
191
+ "notNull": true,
192
+ "autoincrement": false,
193
+ "default": "'{}'"
194
+ },
195
+ "updated_at": {
196
+ "name": "updated_at",
197
+ "type": "integer",
198
+ "primaryKey": false,
199
+ "notNull": true,
200
+ "autoincrement": false
201
+ }
202
+ },
203
+ "indexes": {
204
+ "entities_conn_type": {
205
+ "name": "entities_conn_type",
206
+ "columns": ["connector_id", "type"],
207
+ "isUnique": false
208
+ }
209
+ },
210
+ "foreignKeys": {},
211
+ "compositePrimaryKeys": {
212
+ "entities_connector_id_type_id_pk": {
213
+ "columns": ["connector_id", "type", "id"],
214
+ "name": "entities_connector_id_type_id_pk"
215
+ }
216
+ },
217
+ "uniqueConstraints": {},
218
+ "checkConstraints": {}
219
+ },
220
+ "events": {
221
+ "name": "events",
222
+ "columns": {
223
+ "id": {
224
+ "name": "id",
225
+ "type": "integer",
226
+ "primaryKey": true,
227
+ "notNull": true,
228
+ "autoincrement": true
229
+ },
230
+ "connector_id": {
231
+ "name": "connector_id",
232
+ "type": "text",
233
+ "primaryKey": false,
234
+ "notNull": true,
235
+ "autoincrement": false
236
+ },
237
+ "name": {
238
+ "name": "name",
239
+ "type": "text",
240
+ "primaryKey": false,
241
+ "notNull": true,
242
+ "autoincrement": false
243
+ },
244
+ "start_ts": {
245
+ "name": "start_ts",
246
+ "type": "integer",
247
+ "primaryKey": false,
248
+ "notNull": true,
249
+ "autoincrement": false
250
+ },
251
+ "end_ts": {
252
+ "name": "end_ts",
253
+ "type": "integer",
254
+ "primaryKey": false,
255
+ "notNull": false,
256
+ "autoincrement": false
257
+ },
258
+ "attributes": {
259
+ "name": "attributes",
260
+ "type": "text",
261
+ "primaryKey": false,
262
+ "notNull": true,
263
+ "autoincrement": false,
264
+ "default": "'{}'"
265
+ }
266
+ },
267
+ "indexes": {
268
+ "events_conn_name_start": {
269
+ "name": "events_conn_name_start",
270
+ "columns": ["connector_id", "name", "start_ts"],
271
+ "isUnique": false
272
+ }
273
+ },
274
+ "foreignKeys": {},
275
+ "compositePrimaryKeys": {},
276
+ "uniqueConstraints": {},
277
+ "checkConstraints": {}
278
+ },
279
+ "metrics": {
280
+ "name": "metrics",
281
+ "columns": {
282
+ "id": {
283
+ "name": "id",
284
+ "type": "integer",
285
+ "primaryKey": true,
286
+ "notNull": true,
287
+ "autoincrement": true
288
+ },
289
+ "connector_id": {
290
+ "name": "connector_id",
291
+ "type": "text",
292
+ "primaryKey": false,
293
+ "notNull": true,
294
+ "autoincrement": false
295
+ },
296
+ "name": {
297
+ "name": "name",
298
+ "type": "text",
299
+ "primaryKey": false,
300
+ "notNull": true,
301
+ "autoincrement": false
302
+ },
303
+ "ts": {
304
+ "name": "ts",
305
+ "type": "integer",
306
+ "primaryKey": false,
307
+ "notNull": true,
308
+ "autoincrement": false
309
+ },
310
+ "value": {
311
+ "name": "value",
312
+ "type": "real",
313
+ "primaryKey": false,
314
+ "notNull": true,
315
+ "autoincrement": false
316
+ },
317
+ "attributes": {
318
+ "name": "attributes",
319
+ "type": "text",
320
+ "primaryKey": false,
321
+ "notNull": true,
322
+ "autoincrement": false,
323
+ "default": "'{}'"
324
+ }
325
+ },
326
+ "indexes": {
327
+ "metrics_conn_name_ts": {
328
+ "name": "metrics_conn_name_ts",
329
+ "columns": ["connector_id", "name", "ts"],
330
+ "isUnique": false
331
+ }
332
+ },
333
+ "foreignKeys": {},
334
+ "compositePrimaryKeys": {},
335
+ "uniqueConstraints": {},
336
+ "checkConstraints": {}
337
+ },
338
+ "sync_state": {
339
+ "name": "sync_state",
340
+ "columns": {
341
+ "id": {
342
+ "name": "id",
343
+ "type": "integer",
344
+ "primaryKey": true,
345
+ "notNull": true,
346
+ "autoincrement": false
347
+ },
348
+ "status": {
349
+ "name": "status",
350
+ "type": "text",
351
+ "primaryKey": false,
352
+ "notNull": true,
353
+ "autoincrement": false
354
+ },
355
+ "last_sync_at": {
356
+ "name": "last_sync_at",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": false,
360
+ "autoincrement": false
361
+ },
362
+ "last_error": {
363
+ "name": "last_error",
364
+ "type": "text",
365
+ "primaryKey": false,
366
+ "notNull": false,
367
+ "autoincrement": false
368
+ }
369
+ },
370
+ "indexes": {},
371
+ "foreignKeys": {},
372
+ "compositePrimaryKeys": {},
373
+ "uniqueConstraints": {},
374
+ "checkConstraints": {}
375
+ }
376
+ },
377
+ "views": {},
378
+ "enums": {},
379
+ "_meta": {
380
+ "schemas": {},
381
+ "tables": {},
382
+ "columns": {}
383
+ },
384
+ "internal": {
385
+ "indexes": {}
386
+ }
387
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "sqlite",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "6",
8
+ "when": 1776686961515,
9
+ "tag": "0000_nosy_wendell_vaughn",
10
+ "breakpoints": true
11
+ },
12
+ {
13
+ "idx": 1,
14
+ "version": "6",
15
+ "when": 1776691516753,
16
+ "tag": "0001_clumsy_siren",
17
+ "breakpoints": true
18
+ }
19
+ ]
20
+ }
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@rawdash/adapter-libsql",
3
+ "version": "0.4.0",
4
+ "description": "Rawdash libSQL/Turso storage adapter",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/rawdash/rawdash.git",
10
+ "directory": "packages/adapters/libsql"
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "migrations",
15
+ "README.md",
16
+ "LICENSE"
17
+ ],
18
+ "exports": {
19
+ ".": {
20
+ "@rawdash/source": "./src/index.ts",
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "build": "tsup",
27
+ "typecheck": "tsc --noEmit",
28
+ "lint": "eslint src",
29
+ "test": "vitest run",
30
+ "db:bundle": "node scripts/bundle-migrations.mjs",
31
+ "db:generate": "drizzle-kit generate && pnpm db:bundle"
32
+ },
33
+ "dependencies": {
34
+ "@rawdash/core": "workspace:*",
35
+ "kysely": "^0.29.0",
36
+ "kysely-libsql": "^0.7.0"
37
+ },
38
+ "peerDependencies": {
39
+ "@libsql/client": ">=0.14.0 <1.0.0"
40
+ },
41
+ "devDependencies": {
42
+ "@libsql/client": "^0.17.0",
43
+ "@types/node": "^22.19.17",
44
+ "drizzle-kit": "^0.31.10",
45
+ "drizzle-orm": "^0.38.4",
46
+ "tsup": "^8.0.0",
47
+ "typescript": "^5.7.2",
48
+ "vitest": "^4.1.4"
49
+ }
50
+ }