@walkeros/server-destination-sqlite 3.4.0-next-1776749829492

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,535 @@
1
+ {
2
+ "$meta": {
3
+ "package": "@walkeros/server-destination-sqlite",
4
+ "version": "3.4.0-next-1776749829492",
5
+ "type": "destination",
6
+ "platform": [
7
+ "server"
8
+ ],
9
+ "docs": "https://www.walkeros.io/docs/destinations/server/sqlite",
10
+ "source": "https://github.com/elbwalker/walkerOS/tree/main/packages/server/destinations/sqlite/src"
11
+ },
12
+ "schemas": {
13
+ "mapping": {
14
+ "$schema": "http://json-schema.org/draft-07/schema#",
15
+ "type": "object",
16
+ "properties": {
17
+ "table": {
18
+ "type": "string",
19
+ "description": "Override target table name for this rule. Takes precedence over settings.sqlite.table."
20
+ }
21
+ },
22
+ "additionalProperties": false
23
+ },
24
+ "settings": {
25
+ "$schema": "http://json-schema.org/draft-07/schema#",
26
+ "type": "object",
27
+ "properties": {
28
+ "sqlite": {
29
+ "type": "object",
30
+ "properties": {
31
+ "url": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "description": "SQLite connection URL. libsql://, http(s)://, ws(s):// route to libSQL/Turso. Anything else is treated as a local file path via better-sqlite3. Use ':memory:' for an ephemeral in-memory database."
35
+ },
36
+ "authToken": {
37
+ "type": "string",
38
+ "description": "libSQL / Turso auth token. Ignored for better-sqlite3 (local) connections."
39
+ },
40
+ "table": {
41
+ "type": "string",
42
+ "description": "Target table name. Defaults to \"events\"."
43
+ },
44
+ "schema": {
45
+ "type": "string",
46
+ "enum": [
47
+ "auto",
48
+ "manual"
49
+ ],
50
+ "description": "\"auto\" creates the canonical events table with CREATE TABLE IF NOT EXISTS on init. \"manual\" skips table creation. The user brings their own schema and mapping."
51
+ }
52
+ },
53
+ "required": [
54
+ "url"
55
+ ],
56
+ "additionalProperties": false,
57
+ "description": "SQLite / libSQL configuration (like { url: './events.db' } or { url: 'libsql://my-db.turso.io', authToken: '...' })"
58
+ }
59
+ },
60
+ "required": [
61
+ "sqlite"
62
+ ],
63
+ "additionalProperties": false
64
+ }
65
+ },
66
+ "examples": {
67
+ "env": {
68
+ "push": {
69
+ "SqliteDriver": {
70
+ "$code": "()=>Promise.resolve(u)"
71
+ }
72
+ },
73
+ "simulation": [
74
+ "call:client.prepare",
75
+ "call:client.execute"
76
+ ]
77
+ },
78
+ "step": {
79
+ "customTable": {
80
+ "in": {
81
+ "name": "form submit",
82
+ "data": {
83
+ "type": "contact"
84
+ },
85
+ "context": {
86
+ "dev": [
87
+ "test",
88
+ 1
89
+ ]
90
+ },
91
+ "globals": {},
92
+ "custom": {
93
+ "completely": "random"
94
+ },
95
+ "user": {
96
+ "session": "sess-99",
97
+ "id": ""
98
+ },
99
+ "nested": [
100
+ {
101
+ "entity": "child",
102
+ "data": {
103
+ "is": "subordinated"
104
+ },
105
+ "nested": [],
106
+ "context": {
107
+ "element": [
108
+ "child",
109
+ 0
110
+ ]
111
+ }
112
+ }
113
+ ],
114
+ "consent": {},
115
+ "id": "evt-2",
116
+ "trigger": "test",
117
+ "entity": "form",
118
+ "action": "submit",
119
+ "timestamp": 1700000101,
120
+ "timing": 3.14,
121
+ "group": "gr0up",
122
+ "count": 1,
123
+ "version": {
124
+ "source": "3.4.0-next-1776749829492",
125
+ "tagging": 1
126
+ },
127
+ "source": {
128
+ "type": "server",
129
+ "id": "https://example.com/contact",
130
+ "previous_id": ""
131
+ }
132
+ },
133
+ "settings": {
134
+ "sqlite": {
135
+ "url": ":memory:",
136
+ "table": "siteEvents"
137
+ }
138
+ },
139
+ "out": [
140
+ [
141
+ "client.runInsert",
142
+ [
143
+ 1700000101,
144
+ "evt-2",
145
+ "form submit",
146
+ "form",
147
+ "submit",
148
+ "sess-99",
149
+ "",
150
+ "https://example.com/contact",
151
+ "",
152
+ "",
153
+ "{\"type\":\"contact\"}",
154
+ "{}",
155
+ "{}"
156
+ ]
157
+ ]
158
+ ]
159
+ },
160
+ "defaultInsert": {
161
+ "in": {
162
+ "name": "page view",
163
+ "data": {
164
+ "title": "Home"
165
+ },
166
+ "context": {
167
+ "dev": [
168
+ "test",
169
+ 1
170
+ ]
171
+ },
172
+ "globals": {
173
+ "env": "prod"
174
+ },
175
+ "custom": {
176
+ "completely": "random"
177
+ },
178
+ "user": {
179
+ "session": "sess-1",
180
+ "id": "user-42"
181
+ },
182
+ "nested": [
183
+ {
184
+ "entity": "child",
185
+ "data": {
186
+ "is": "subordinated"
187
+ },
188
+ "nested": [],
189
+ "context": {
190
+ "element": [
191
+ "child",
192
+ 0
193
+ ]
194
+ }
195
+ }
196
+ ],
197
+ "consent": {
198
+ "analytics": true
199
+ },
200
+ "id": "evt-1",
201
+ "trigger": "load",
202
+ "entity": "page",
203
+ "action": "view",
204
+ "timestamp": 1700000100,
205
+ "timing": 3.14,
206
+ "group": "gr0up",
207
+ "count": 1,
208
+ "version": {
209
+ "source": "3.4.0-next-1776749829492",
210
+ "tagging": 1
211
+ },
212
+ "source": {
213
+ "type": "server",
214
+ "id": "https://example.com/",
215
+ "previous_id": "https://example.com/prev"
216
+ }
217
+ },
218
+ "out": [
219
+ [
220
+ "client.runInsert",
221
+ [
222
+ 1700000100,
223
+ "evt-1",
224
+ "page view",
225
+ "page",
226
+ "view",
227
+ "sess-1",
228
+ "user-42",
229
+ "https://example.com/",
230
+ "Home",
231
+ "https://example.com/prev",
232
+ "{\"title\":\"Home\"}",
233
+ "{\"env\":\"prod\"}",
234
+ "{\"analytics\":true}"
235
+ ]
236
+ ]
237
+ ]
238
+ },
239
+ "ignoredEvent": {
240
+ "in": {
241
+ "name": "debug noise",
242
+ "data": {
243
+ "string": "foo",
244
+ "number": 1,
245
+ "boolean": true,
246
+ "array": [
247
+ 0,
248
+ "text",
249
+ false
250
+ ]
251
+ },
252
+ "context": {
253
+ "dev": [
254
+ "test",
255
+ 1
256
+ ]
257
+ },
258
+ "globals": {
259
+ "lang": "elb"
260
+ },
261
+ "custom": {
262
+ "completely": "random"
263
+ },
264
+ "user": {
265
+ "id": "us3r",
266
+ "device": "c00k13",
267
+ "session": "s3ss10n"
268
+ },
269
+ "nested": [
270
+ {
271
+ "entity": "child",
272
+ "data": {
273
+ "is": "subordinated"
274
+ },
275
+ "nested": [],
276
+ "context": {
277
+ "element": [
278
+ "child",
279
+ 0
280
+ ]
281
+ }
282
+ }
283
+ ],
284
+ "consent": {
285
+ "functional": true
286
+ },
287
+ "id": "evt-5",
288
+ "trigger": "test",
289
+ "entity": "debug",
290
+ "action": "noise",
291
+ "timestamp": 1700000104,
292
+ "timing": 3.14,
293
+ "group": "gr0up",
294
+ "count": 1,
295
+ "version": {
296
+ "source": "3.4.0-next-1776749829492",
297
+ "tagging": 1
298
+ },
299
+ "source": {
300
+ "type": "server",
301
+ "id": "",
302
+ "previous_id": ""
303
+ }
304
+ },
305
+ "mapping": {
306
+ "ignore": true
307
+ },
308
+ "out": []
309
+ },
310
+ "orderComplete": {
311
+ "in": {
312
+ "name": "order complete",
313
+ "data": {
314
+ "id": "ORD-1",
315
+ "total": 99
316
+ },
317
+ "context": {
318
+ "shopping": [
319
+ "complete",
320
+ 0
321
+ ]
322
+ },
323
+ "globals": {},
324
+ "custom": {
325
+ "completely": "random"
326
+ },
327
+ "user": {
328
+ "session": "",
329
+ "id": ""
330
+ },
331
+ "nested": [
332
+ {
333
+ "entity": "product",
334
+ "data": {
335
+ "id": "ers",
336
+ "name": "Everyday Ruck Snack",
337
+ "color": "black",
338
+ "size": "l",
339
+ "price": 420
340
+ },
341
+ "context": {
342
+ "shopping": [
343
+ "complete",
344
+ 0
345
+ ]
346
+ },
347
+ "nested": []
348
+ },
349
+ {
350
+ "entity": "product",
351
+ "data": {
352
+ "id": "cc",
353
+ "name": "Cool Cap",
354
+ "size": "one size",
355
+ "price": 42
356
+ },
357
+ "context": {
358
+ "shopping": [
359
+ "complete",
360
+ 0
361
+ ]
362
+ },
363
+ "nested": []
364
+ },
365
+ {
366
+ "entity": "gift",
367
+ "data": {
368
+ "name": "Surprise"
369
+ },
370
+ "context": {
371
+ "shopping": [
372
+ "complete",
373
+ 0
374
+ ]
375
+ },
376
+ "nested": []
377
+ }
378
+ ],
379
+ "consent": {},
380
+ "id": "evt-3",
381
+ "trigger": "load",
382
+ "entity": "order",
383
+ "action": "complete",
384
+ "timestamp": 1700000102,
385
+ "timing": 3.14,
386
+ "group": "gr0up",
387
+ "count": 1,
388
+ "version": {
389
+ "source": "3.4.0-next-1776749829492",
390
+ "tagging": 1
391
+ },
392
+ "source": {
393
+ "type": "server",
394
+ "id": "",
395
+ "previous_id": ""
396
+ }
397
+ },
398
+ "out": [
399
+ [
400
+ "client.runInsert",
401
+ [
402
+ 1700000102,
403
+ "evt-3",
404
+ "order complete",
405
+ "order",
406
+ "complete",
407
+ "",
408
+ "",
409
+ "",
410
+ "",
411
+ "",
412
+ "{\"id\":\"ORD-1\",\"total\":99}",
413
+ "{}",
414
+ "{}"
415
+ ]
416
+ ]
417
+ ]
418
+ },
419
+ "tableOverride": {
420
+ "in": {
421
+ "name": "order complete",
422
+ "data": {
423
+ "id": "ORD-2",
424
+ "total": 42
425
+ },
426
+ "context": {
427
+ "shopping": [
428
+ "complete",
429
+ 0
430
+ ]
431
+ },
432
+ "globals": {},
433
+ "custom": {
434
+ "completely": "random"
435
+ },
436
+ "user": {
437
+ "session": "",
438
+ "id": ""
439
+ },
440
+ "nested": [
441
+ {
442
+ "entity": "product",
443
+ "data": {
444
+ "id": "ers",
445
+ "name": "Everyday Ruck Snack",
446
+ "color": "black",
447
+ "size": "l",
448
+ "price": 420
449
+ },
450
+ "context": {
451
+ "shopping": [
452
+ "complete",
453
+ 0
454
+ ]
455
+ },
456
+ "nested": []
457
+ },
458
+ {
459
+ "entity": "product",
460
+ "data": {
461
+ "id": "cc",
462
+ "name": "Cool Cap",
463
+ "size": "one size",
464
+ "price": 42
465
+ },
466
+ "context": {
467
+ "shopping": [
468
+ "complete",
469
+ 0
470
+ ]
471
+ },
472
+ "nested": []
473
+ },
474
+ {
475
+ "entity": "gift",
476
+ "data": {
477
+ "name": "Surprise"
478
+ },
479
+ "context": {
480
+ "shopping": [
481
+ "complete",
482
+ 0
483
+ ]
484
+ },
485
+ "nested": []
486
+ }
487
+ ],
488
+ "consent": {},
489
+ "id": "evt-4",
490
+ "trigger": "load",
491
+ "entity": "order",
492
+ "action": "complete",
493
+ "timestamp": 1700000103,
494
+ "timing": 3.14,
495
+ "group": "gr0up",
496
+ "count": 1,
497
+ "version": {
498
+ "source": "3.4.0-next-1776749829492",
499
+ "tagging": 1
500
+ },
501
+ "source": {
502
+ "type": "server",
503
+ "id": "",
504
+ "previous_id": ""
505
+ }
506
+ },
507
+ "mapping": {
508
+ "settings": {
509
+ "table": "orders"
510
+ }
511
+ },
512
+ "out": [
513
+ [
514
+ "client.runInsert",
515
+ [
516
+ 1700000103,
517
+ "evt-4",
518
+ "order complete",
519
+ "order",
520
+ "complete",
521
+ "",
522
+ "",
523
+ "",
524
+ "",
525
+ "",
526
+ "{\"id\":\"ORD-2\",\"total\":42}",
527
+ "{}",
528
+ "{}"
529
+ ]
530
+ ]
531
+ ]
532
+ }
533
+ }
534
+ }
535
+ }
package/package.json ADDED
@@ -0,0 +1,92 @@
1
+ {
2
+ "name": "@walkeros/server-destination-sqlite",
3
+ "description": "SQLite server destination for walkerOS (local via better-sqlite3, remote via libSQL/Turso)",
4
+ "version": "3.4.0-next-1776749829492",
5
+ "license": "MIT",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.mjs",
13
+ "require": "./dist/index.js"
14
+ },
15
+ "./dev": {
16
+ "types": "./dist/dev.d.ts",
17
+ "import": "./dist/dev.mjs",
18
+ "require": "./dist/dev.js"
19
+ },
20
+ "./walkerOS.json": "./dist/walkerOS.json",
21
+ "./examples": {
22
+ "types": "./dist/examples/index.d.ts",
23
+ "import": "./dist/examples/index.mjs",
24
+ "require": "./dist/examples/index.js"
25
+ }
26
+ },
27
+ "files": [
28
+ "dist/**"
29
+ ],
30
+ "scripts": {
31
+ "build": "tsup --silent",
32
+ "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
33
+ "dev": "jest --watchAll --colors",
34
+ "typecheck": "tsc --noEmit",
35
+ "lint": "eslint \"**/*.ts*\"",
36
+ "test": "jest",
37
+ "update": "npx npm-check-updates -u && npm update"
38
+ },
39
+ "dependencies": {
40
+ "@walkeros/core": "3.4.0-next-1776749829492",
41
+ "@walkeros/server-core": "3.4.0-next-1776749829492"
42
+ },
43
+ "peerDependencies": {
44
+ "better-sqlite3": "^11.0.0",
45
+ "@libsql/client": "^0.14.0"
46
+ },
47
+ "peerDependenciesMeta": {
48
+ "better-sqlite3": {
49
+ "optional": true
50
+ },
51
+ "@libsql/client": {
52
+ "optional": true
53
+ }
54
+ },
55
+ "devDependencies": {
56
+ "@walkeros/collector": "3.4.0-next-1776749829492",
57
+ "better-sqlite3": "^11.0.0",
58
+ "@libsql/client": "^0.14.0",
59
+ "@types/better-sqlite3": "^7.6.11"
60
+ },
61
+ "repository": {
62
+ "url": "git+https://github.com/elbwalker/walkerOS.git",
63
+ "directory": "packages/server/destinations/sqlite"
64
+ },
65
+ "author": "elbwalker <hello@elbwalker.com>",
66
+ "homepage": "https://github.com/elbwalker/walkerOS#readme",
67
+ "bugs": {
68
+ "url": "https://github.com/elbwalker/walkerOS/issues"
69
+ },
70
+ "walkerOS": {
71
+ "type": "destination",
72
+ "platform": [
73
+ "server"
74
+ ],
75
+ "docs": "https://www.walkeros.io/docs/destinations/server/sqlite"
76
+ },
77
+ "keywords": [
78
+ "walkerOS",
79
+ "walkerOS-destination",
80
+ "destination",
81
+ "server",
82
+ "sqlite",
83
+ "turso",
84
+ "libsql"
85
+ ],
86
+ "funding": [
87
+ {
88
+ "type": "GitHub Sponsors",
89
+ "url": "https://github.com/sponsors/elbwalker"
90
+ }
91
+ ]
92
+ }