lurqrun 0.0.1 → 0.0.2

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,15 @@
1
+ CREATE TABLE "discovery_queue" (
2
+ "id" serial PRIMARY KEY NOT NULL,
3
+ "name" text NOT NULL,
4
+ "discovered_via" text NOT NULL,
5
+ "pre_score" integer,
6
+ "status" text DEFAULT 'pending' NOT NULL,
7
+ "discovered_at" timestamp with time zone DEFAULT now() NOT NULL,
8
+ CONSTRAINT "discovery_queue_name_unique" UNIQUE("name")
9
+ );
10
+ --> statement-breakpoint
11
+ ALTER TABLE "packages" ADD COLUMN "category_source" text;--> statement-breakpoint
12
+ ALTER TABLE "packages" ADD COLUMN "quality_score" integer;--> statement-breakpoint
13
+ ALTER TABLE "packages" ADD COLUMN "search_vector" "tsvector" GENERATED ALWAYS AS (setweight(to_tsvector('english', coalesce(name, '')), 'A') || setweight(to_tsvector('english', coalesce(category, '')), 'B') || setweight(to_tsvector('english', coalesce(summary, description, '')), 'C')) STORED;--> statement-breakpoint
14
+ CREATE INDEX "discovery_queue_status_idx" ON "discovery_queue" USING btree ("status");--> statement-breakpoint
15
+ CREATE INDEX "packages_search_vector_idx" ON "packages" USING gin ("search_vector");
@@ -0,0 +1,14 @@
1
+ CREATE TABLE "api_keys" (
2
+ "id" serial PRIMARY KEY NOT NULL,
3
+ "key_hash" text NOT NULL,
4
+ "prefix" text NOT NULL,
5
+ "label" text,
6
+ "owner_id" text,
7
+ "tier" text DEFAULT 'free' NOT NULL,
8
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
9
+ "last_used_at" timestamp with time zone,
10
+ "revoked_at" timestamp with time zone,
11
+ CONSTRAINT "api_keys_key_hash_unique" UNIQUE("key_hash")
12
+ );
13
+ --> statement-breakpoint
14
+ CREATE INDEX "api_keys_owner_idx" ON "api_keys" USING btree ("owner_id");
@@ -0,0 +1,482 @@
1
+ {
2
+ "id": "40d3e18c-6ec9-4a71-b866-96ee426cfcdd",
3
+ "prevId": "e242d794-8dd1-4fa8-afb4-5e05625fbeed",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.discovery_queue": {
8
+ "name": "discovery_queue",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "serial",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "name": {
18
+ "name": "name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "discovered_via": {
24
+ "name": "discovered_via",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "pre_score": {
30
+ "name": "pre_score",
31
+ "type": "integer",
32
+ "primaryKey": false,
33
+ "notNull": false
34
+ },
35
+ "status": {
36
+ "name": "status",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true,
40
+ "default": "'pending'"
41
+ },
42
+ "discovered_at": {
43
+ "name": "discovered_at",
44
+ "type": "timestamp with time zone",
45
+ "primaryKey": false,
46
+ "notNull": true,
47
+ "default": "now()"
48
+ }
49
+ },
50
+ "indexes": {
51
+ "discovery_queue_status_idx": {
52
+ "name": "discovery_queue_status_idx",
53
+ "columns": [
54
+ {
55
+ "expression": "status",
56
+ "isExpression": false,
57
+ "asc": true,
58
+ "nulls": "last"
59
+ }
60
+ ],
61
+ "isUnique": false,
62
+ "concurrently": false,
63
+ "method": "btree",
64
+ "with": {}
65
+ }
66
+ },
67
+ "foreignKeys": {},
68
+ "compositePrimaryKeys": {},
69
+ "uniqueConstraints": {
70
+ "discovery_queue_name_unique": {
71
+ "name": "discovery_queue_name_unique",
72
+ "nullsNotDistinct": false,
73
+ "columns": [
74
+ "name"
75
+ ]
76
+ }
77
+ },
78
+ "policies": {},
79
+ "checkConstraints": {},
80
+ "isRLSEnabled": false
81
+ },
82
+ "public.packages": {
83
+ "name": "packages",
84
+ "schema": "",
85
+ "columns": {
86
+ "id": {
87
+ "name": "id",
88
+ "type": "serial",
89
+ "primaryKey": true,
90
+ "notNull": true
91
+ },
92
+ "name": {
93
+ "name": "name",
94
+ "type": "text",
95
+ "primaryKey": false,
96
+ "notNull": true
97
+ },
98
+ "ecosystem": {
99
+ "name": "ecosystem",
100
+ "type": "text",
101
+ "primaryKey": false,
102
+ "notNull": true,
103
+ "default": "'npm'"
104
+ },
105
+ "category": {
106
+ "name": "category",
107
+ "type": "text",
108
+ "primaryKey": false,
109
+ "notNull": false
110
+ },
111
+ "category_source": {
112
+ "name": "category_source",
113
+ "type": "text",
114
+ "primaryKey": false,
115
+ "notNull": false
116
+ },
117
+ "description": {
118
+ "name": "description",
119
+ "type": "text",
120
+ "primaryKey": false,
121
+ "notNull": false
122
+ },
123
+ "summary": {
124
+ "name": "summary",
125
+ "type": "text",
126
+ "primaryKey": false,
127
+ "notNull": false
128
+ },
129
+ "repo_url": {
130
+ "name": "repo_url",
131
+ "type": "text",
132
+ "primaryKey": false,
133
+ "notNull": false
134
+ },
135
+ "homepage": {
136
+ "name": "homepage",
137
+ "type": "text",
138
+ "primaryKey": false,
139
+ "notNull": false
140
+ },
141
+ "latest_version": {
142
+ "name": "latest_version",
143
+ "type": "text",
144
+ "primaryKey": false,
145
+ "notNull": false
146
+ },
147
+ "license": {
148
+ "name": "license",
149
+ "type": "text",
150
+ "primaryKey": false,
151
+ "notNull": false
152
+ },
153
+ "deprecated": {
154
+ "name": "deprecated",
155
+ "type": "boolean",
156
+ "primaryKey": false,
157
+ "notNull": true,
158
+ "default": false
159
+ },
160
+ "archived": {
161
+ "name": "archived",
162
+ "type": "boolean",
163
+ "primaryKey": false,
164
+ "notNull": true,
165
+ "default": false
166
+ },
167
+ "first_published_at": {
168
+ "name": "first_published_at",
169
+ "type": "timestamp with time zone",
170
+ "primaryKey": false,
171
+ "notNull": false
172
+ },
173
+ "last_release_at": {
174
+ "name": "last_release_at",
175
+ "type": "timestamp with time zone",
176
+ "primaryKey": false,
177
+ "notNull": false
178
+ },
179
+ "weekly_downloads": {
180
+ "name": "weekly_downloads",
181
+ "type": "bigint",
182
+ "primaryKey": false,
183
+ "notNull": false
184
+ },
185
+ "download_growth_90d": {
186
+ "name": "download_growth_90d",
187
+ "type": "real",
188
+ "primaryKey": false,
189
+ "notNull": false
190
+ },
191
+ "dependents_count": {
192
+ "name": "dependents_count",
193
+ "type": "integer",
194
+ "primaryKey": false,
195
+ "notNull": false
196
+ },
197
+ "stars": {
198
+ "name": "stars",
199
+ "type": "integer",
200
+ "primaryKey": false,
201
+ "notNull": false
202
+ },
203
+ "open_issues": {
204
+ "name": "open_issues",
205
+ "type": "integer",
206
+ "primaryKey": false,
207
+ "notNull": false
208
+ },
209
+ "closed_issues": {
210
+ "name": "closed_issues",
211
+ "type": "integer",
212
+ "primaryKey": false,
213
+ "notNull": false
214
+ },
215
+ "scorecard": {
216
+ "name": "scorecard",
217
+ "type": "real",
218
+ "primaryKey": false,
219
+ "notNull": false
220
+ },
221
+ "bundle_min_gzip_kb": {
222
+ "name": "bundle_min_gzip_kb",
223
+ "type": "real",
224
+ "primaryKey": false,
225
+ "notNull": false
226
+ },
227
+ "advisories": {
228
+ "name": "advisories",
229
+ "type": "jsonb",
230
+ "primaryKey": false,
231
+ "notNull": false
232
+ },
233
+ "health_score": {
234
+ "name": "health_score",
235
+ "type": "integer",
236
+ "primaryKey": false,
237
+ "notNull": false
238
+ },
239
+ "quality_score": {
240
+ "name": "quality_score",
241
+ "type": "integer",
242
+ "primaryKey": false,
243
+ "notNull": false
244
+ },
245
+ "confidence": {
246
+ "name": "confidence",
247
+ "type": "text",
248
+ "primaryKey": false,
249
+ "notNull": false
250
+ },
251
+ "score_breakdown": {
252
+ "name": "score_breakdown",
253
+ "type": "jsonb",
254
+ "primaryKey": false,
255
+ "notNull": false
256
+ },
257
+ "usage_guide": {
258
+ "name": "usage_guide",
259
+ "type": "jsonb",
260
+ "primaryKey": false,
261
+ "notNull": false
262
+ },
263
+ "embedding": {
264
+ "name": "embedding",
265
+ "type": "vector(1536)",
266
+ "primaryKey": false,
267
+ "notNull": false
268
+ },
269
+ "search_vector": {
270
+ "name": "search_vector",
271
+ "type": "tsvector",
272
+ "primaryKey": false,
273
+ "notNull": false,
274
+ "generated": {
275
+ "as": "setweight(to_tsvector('english', coalesce(name, '')), 'A') || setweight(to_tsvector('english', coalesce(category, '')), 'B') || setweight(to_tsvector('english', coalesce(summary, description, '')), 'C')",
276
+ "type": "stored"
277
+ }
278
+ },
279
+ "data_as_of": {
280
+ "name": "data_as_of",
281
+ "type": "timestamp with time zone",
282
+ "primaryKey": false,
283
+ "notNull": false
284
+ },
285
+ "created_at": {
286
+ "name": "created_at",
287
+ "type": "timestamp with time zone",
288
+ "primaryKey": false,
289
+ "notNull": true,
290
+ "default": "now()"
291
+ },
292
+ "updated_at": {
293
+ "name": "updated_at",
294
+ "type": "timestamp with time zone",
295
+ "primaryKey": false,
296
+ "notNull": true,
297
+ "default": "now()"
298
+ }
299
+ },
300
+ "indexes": {
301
+ "packages_category_idx": {
302
+ "name": "packages_category_idx",
303
+ "columns": [
304
+ {
305
+ "expression": "category",
306
+ "isExpression": false,
307
+ "asc": true,
308
+ "nulls": "last"
309
+ }
310
+ ],
311
+ "isUnique": false,
312
+ "concurrently": false,
313
+ "method": "btree",
314
+ "with": {}
315
+ },
316
+ "packages_health_score_idx": {
317
+ "name": "packages_health_score_idx",
318
+ "columns": [
319
+ {
320
+ "expression": "health_score",
321
+ "isExpression": false,
322
+ "asc": true,
323
+ "nulls": "last"
324
+ }
325
+ ],
326
+ "isUnique": false,
327
+ "concurrently": false,
328
+ "method": "btree",
329
+ "with": {}
330
+ },
331
+ "packages_embedding_idx": {
332
+ "name": "packages_embedding_idx",
333
+ "columns": [
334
+ {
335
+ "expression": "embedding",
336
+ "isExpression": false,
337
+ "asc": true,
338
+ "nulls": "last",
339
+ "opclass": "vector_cosine_ops"
340
+ }
341
+ ],
342
+ "isUnique": false,
343
+ "concurrently": false,
344
+ "method": "hnsw",
345
+ "with": {}
346
+ },
347
+ "packages_search_vector_idx": {
348
+ "name": "packages_search_vector_idx",
349
+ "columns": [
350
+ {
351
+ "expression": "search_vector",
352
+ "isExpression": false,
353
+ "asc": true,
354
+ "nulls": "last"
355
+ }
356
+ ],
357
+ "isUnique": false,
358
+ "concurrently": false,
359
+ "method": "gin",
360
+ "with": {}
361
+ }
362
+ },
363
+ "foreignKeys": {},
364
+ "compositePrimaryKeys": {},
365
+ "uniqueConstraints": {
366
+ "packages_name_unique": {
367
+ "name": "packages_name_unique",
368
+ "nullsNotDistinct": false,
369
+ "columns": [
370
+ "name"
371
+ ]
372
+ }
373
+ },
374
+ "policies": {},
375
+ "checkConstraints": {},
376
+ "isRLSEnabled": false
377
+ },
378
+ "public.seed_packages": {
379
+ "name": "seed_packages",
380
+ "schema": "",
381
+ "columns": {
382
+ "name": {
383
+ "name": "name",
384
+ "type": "text",
385
+ "primaryKey": true,
386
+ "notNull": true
387
+ },
388
+ "category": {
389
+ "name": "category",
390
+ "type": "text",
391
+ "primaryKey": false,
392
+ "notNull": false
393
+ },
394
+ "added_at": {
395
+ "name": "added_at",
396
+ "type": "timestamp with time zone",
397
+ "primaryKey": false,
398
+ "notNull": true,
399
+ "default": "now()"
400
+ }
401
+ },
402
+ "indexes": {},
403
+ "foreignKeys": {},
404
+ "compositePrimaryKeys": {},
405
+ "uniqueConstraints": {},
406
+ "policies": {},
407
+ "checkConstraints": {},
408
+ "isRLSEnabled": false
409
+ },
410
+ "public.sync_runs": {
411
+ "name": "sync_runs",
412
+ "schema": "",
413
+ "columns": {
414
+ "id": {
415
+ "name": "id",
416
+ "type": "serial",
417
+ "primaryKey": true,
418
+ "notNull": true
419
+ },
420
+ "started_at": {
421
+ "name": "started_at",
422
+ "type": "timestamp with time zone",
423
+ "primaryKey": false,
424
+ "notNull": true,
425
+ "default": "now()"
426
+ },
427
+ "finished_at": {
428
+ "name": "finished_at",
429
+ "type": "timestamp with time zone",
430
+ "primaryKey": false,
431
+ "notNull": false
432
+ },
433
+ "packages_seen": {
434
+ "name": "packages_seen",
435
+ "type": "integer",
436
+ "primaryKey": false,
437
+ "notNull": true,
438
+ "default": 0
439
+ },
440
+ "packages_updated": {
441
+ "name": "packages_updated",
442
+ "type": "integer",
443
+ "primaryKey": false,
444
+ "notNull": true,
445
+ "default": 0
446
+ },
447
+ "errors": {
448
+ "name": "errors",
449
+ "type": "jsonb",
450
+ "primaryKey": false,
451
+ "notNull": true,
452
+ "default": "'[]'::jsonb"
453
+ },
454
+ "status": {
455
+ "name": "status",
456
+ "type": "text",
457
+ "primaryKey": false,
458
+ "notNull": true,
459
+ "default": "'running'"
460
+ }
461
+ },
462
+ "indexes": {},
463
+ "foreignKeys": {},
464
+ "compositePrimaryKeys": {},
465
+ "uniqueConstraints": {},
466
+ "policies": {},
467
+ "checkConstraints": {},
468
+ "isRLSEnabled": false
469
+ }
470
+ },
471
+ "enums": {},
472
+ "schemas": {},
473
+ "sequences": {},
474
+ "roles": {},
475
+ "policies": {},
476
+ "views": {},
477
+ "_meta": {
478
+ "columns": {},
479
+ "schemas": {},
480
+ "tables": {}
481
+ }
482
+ }