@zipbul/gildash 0.5.1 → 0.6.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 (40) hide show
  1. package/README.ko.md +28 -6
  2. package/README.md +29 -5
  3. package/dist/index.js +7 -5
  4. package/dist/index.js.map +42 -28
  5. package/dist/migrations/0003_majestic_mongu.sql +1 -0
  6. package/dist/migrations/0004_cool_firestar.sql +23 -0
  7. package/dist/migrations/meta/0003_snapshot.json +422 -0
  8. package/dist/migrations/meta/0004_snapshot.json +429 -0
  9. package/dist/migrations/meta/_journal.json +14 -0
  10. package/dist/src/errors.d.ts +1 -1
  11. package/dist/src/extractor/relation-extractor.d.ts +2 -1
  12. package/dist/src/gildash/context.d.ts +91 -0
  13. package/dist/src/gildash/extract-api.d.ts +9 -0
  14. package/dist/src/gildash/graph-api.d.ts +30 -0
  15. package/dist/src/gildash/index.d.ts +92 -0
  16. package/dist/src/gildash/lifecycle.d.ts +62 -0
  17. package/dist/src/gildash/misc-api.d.ts +22 -0
  18. package/dist/src/gildash/parse-api.d.ts +11 -0
  19. package/dist/src/gildash/query-api.d.ts +35 -0
  20. package/dist/src/gildash/semantic-api.d.ts +22 -0
  21. package/dist/src/gildash/types.d.ts +160 -0
  22. package/dist/src/index.d.ts +2 -1
  23. package/dist/src/indexer/index-coordinator.d.ts +8 -2
  24. package/dist/src/indexer/relation-indexer.d.ts +6 -0
  25. package/dist/src/search/dependency-graph.d.ts +1 -0
  26. package/dist/src/search/relation-search.d.ts +11 -1
  27. package/dist/src/search/symbol-search.d.ts +6 -0
  28. package/dist/src/semantic/ast-node-utils.d.ts +9 -0
  29. package/dist/src/semantic/implementation-finder.d.ts +22 -0
  30. package/dist/src/semantic/index.d.ts +68 -0
  31. package/dist/src/semantic/reference-resolver.d.ts +19 -0
  32. package/dist/src/semantic/symbol-graph.d.ts +36 -0
  33. package/dist/src/semantic/tsc-program.d.ts +67 -0
  34. package/dist/src/semantic/type-collector.d.ts +27 -0
  35. package/dist/src/semantic/types.d.ts +103 -0
  36. package/dist/src/store/repositories/relation.repository.d.ts +14 -2
  37. package/dist/src/store/repositories/symbol.repository.d.ts +2 -0
  38. package/dist/src/store/schema.d.ts +38 -0
  39. package/package.json +3 -2
  40. package/dist/src/gildash.d.ts +0 -821
@@ -0,0 +1 @@
1
+ ALTER TABLE `symbols` ADD `resolved_type` text;
@@ -0,0 +1,23 @@
1
+ PRAGMA foreign_keys=OFF;--> statement-breakpoint
2
+ CREATE TABLE `__new_relations` (
3
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
4
+ `project` text NOT NULL,
5
+ `type` text NOT NULL,
6
+ `src_file_path` text NOT NULL,
7
+ `src_symbol_name` text,
8
+ `dst_project` text NOT NULL,
9
+ `dst_file_path` text NOT NULL,
10
+ `dst_symbol_name` text,
11
+ `meta_json` text,
12
+ FOREIGN KEY (`project`,`src_file_path`) REFERENCES `files`(`project`,`file_path`) ON UPDATE no action ON DELETE cascade,
13
+ FOREIGN KEY (`dst_project`,`dst_file_path`) REFERENCES `files`(`project`,`file_path`) ON UPDATE no action ON DELETE cascade
14
+ );
15
+ --> statement-breakpoint
16
+ INSERT INTO `__new_relations`("id", "project", "type", "src_file_path", "src_symbol_name", "dst_project", "dst_file_path", "dst_symbol_name", "meta_json") SELECT "id", "project", "type", "src_file_path", "src_symbol_name", "project", "dst_file_path", "dst_symbol_name", "meta_json" FROM `relations`;--> statement-breakpoint
17
+ DROP TABLE `relations`;--> statement-breakpoint
18
+ ALTER TABLE `__new_relations` RENAME TO `relations`;--> statement-breakpoint
19
+ PRAGMA foreign_keys=ON;--> statement-breakpoint
20
+ CREATE INDEX `idx_relations_src` ON `relations` (`project`,`src_file_path`);--> statement-breakpoint
21
+ CREATE INDEX `idx_relations_dst` ON `relations` (`dst_project`,`dst_file_path`);--> statement-breakpoint
22
+ CREATE INDEX `idx_relations_type` ON `relations` (`project`,`type`);--> statement-breakpoint
23
+ INSERT OR REPLACE INTO sqlite_sequence (name, seq) SELECT 'relations', COALESCE(MAX(id), 0) FROM relations;
@@ -0,0 +1,422 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "5b9c3951-b14d-4b77-b125-ca1e30793c73",
5
+ "prevId": "dde10964-60b8-4981-af9f-7d4664d0d20a",
6
+ "tables": {
7
+ "files": {
8
+ "name": "files",
9
+ "columns": {
10
+ "project": {
11
+ "name": "project",
12
+ "type": "text",
13
+ "primaryKey": false,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "file_path": {
18
+ "name": "file_path",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "mtime_ms": {
25
+ "name": "mtime_ms",
26
+ "type": "real",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "size": {
32
+ "name": "size",
33
+ "type": "integer",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "content_hash": {
39
+ "name": "content_hash",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "updated_at": {
46
+ "name": "updated_at",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "line_count": {
53
+ "name": "line_count",
54
+ "type": "integer",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ }
59
+ },
60
+ "indexes": {},
61
+ "foreignKeys": {},
62
+ "compositePrimaryKeys": {
63
+ "files_project_file_path_pk": {
64
+ "columns": [
65
+ "project",
66
+ "file_path"
67
+ ],
68
+ "name": "files_project_file_path_pk"
69
+ }
70
+ },
71
+ "uniqueConstraints": {},
72
+ "checkConstraints": {}
73
+ },
74
+ "relations": {
75
+ "name": "relations",
76
+ "columns": {
77
+ "id": {
78
+ "name": "id",
79
+ "type": "integer",
80
+ "primaryKey": true,
81
+ "notNull": true,
82
+ "autoincrement": true
83
+ },
84
+ "project": {
85
+ "name": "project",
86
+ "type": "text",
87
+ "primaryKey": false,
88
+ "notNull": true,
89
+ "autoincrement": false
90
+ },
91
+ "type": {
92
+ "name": "type",
93
+ "type": "text",
94
+ "primaryKey": false,
95
+ "notNull": true,
96
+ "autoincrement": false
97
+ },
98
+ "src_file_path": {
99
+ "name": "src_file_path",
100
+ "type": "text",
101
+ "primaryKey": false,
102
+ "notNull": true,
103
+ "autoincrement": false
104
+ },
105
+ "src_symbol_name": {
106
+ "name": "src_symbol_name",
107
+ "type": "text",
108
+ "primaryKey": false,
109
+ "notNull": false,
110
+ "autoincrement": false
111
+ },
112
+ "dst_file_path": {
113
+ "name": "dst_file_path",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": true,
117
+ "autoincrement": false
118
+ },
119
+ "dst_symbol_name": {
120
+ "name": "dst_symbol_name",
121
+ "type": "text",
122
+ "primaryKey": false,
123
+ "notNull": false,
124
+ "autoincrement": false
125
+ },
126
+ "meta_json": {
127
+ "name": "meta_json",
128
+ "type": "text",
129
+ "primaryKey": false,
130
+ "notNull": false,
131
+ "autoincrement": false
132
+ }
133
+ },
134
+ "indexes": {
135
+ "idx_relations_src": {
136
+ "name": "idx_relations_src",
137
+ "columns": [
138
+ "project",
139
+ "src_file_path"
140
+ ],
141
+ "isUnique": false
142
+ },
143
+ "idx_relations_dst": {
144
+ "name": "idx_relations_dst",
145
+ "columns": [
146
+ "project",
147
+ "dst_file_path"
148
+ ],
149
+ "isUnique": false
150
+ },
151
+ "idx_relations_type": {
152
+ "name": "idx_relations_type",
153
+ "columns": [
154
+ "project",
155
+ "type"
156
+ ],
157
+ "isUnique": false
158
+ }
159
+ },
160
+ "foreignKeys": {
161
+ "relations_project_src_file_path_files_project_file_path_fk": {
162
+ "name": "relations_project_src_file_path_files_project_file_path_fk",
163
+ "tableFrom": "relations",
164
+ "tableTo": "files",
165
+ "columnsFrom": [
166
+ "project",
167
+ "src_file_path"
168
+ ],
169
+ "columnsTo": [
170
+ "project",
171
+ "file_path"
172
+ ],
173
+ "onDelete": "cascade",
174
+ "onUpdate": "no action"
175
+ },
176
+ "relations_project_dst_file_path_files_project_file_path_fk": {
177
+ "name": "relations_project_dst_file_path_files_project_file_path_fk",
178
+ "tableFrom": "relations",
179
+ "tableTo": "files",
180
+ "columnsFrom": [
181
+ "project",
182
+ "dst_file_path"
183
+ ],
184
+ "columnsTo": [
185
+ "project",
186
+ "file_path"
187
+ ],
188
+ "onDelete": "cascade",
189
+ "onUpdate": "no action"
190
+ }
191
+ },
192
+ "compositePrimaryKeys": {},
193
+ "uniqueConstraints": {},
194
+ "checkConstraints": {}
195
+ },
196
+ "symbols": {
197
+ "name": "symbols",
198
+ "columns": {
199
+ "id": {
200
+ "name": "id",
201
+ "type": "integer",
202
+ "primaryKey": true,
203
+ "notNull": true,
204
+ "autoincrement": true
205
+ },
206
+ "project": {
207
+ "name": "project",
208
+ "type": "text",
209
+ "primaryKey": false,
210
+ "notNull": true,
211
+ "autoincrement": false
212
+ },
213
+ "file_path": {
214
+ "name": "file_path",
215
+ "type": "text",
216
+ "primaryKey": false,
217
+ "notNull": true,
218
+ "autoincrement": false
219
+ },
220
+ "kind": {
221
+ "name": "kind",
222
+ "type": "text",
223
+ "primaryKey": false,
224
+ "notNull": true,
225
+ "autoincrement": false
226
+ },
227
+ "name": {
228
+ "name": "name",
229
+ "type": "text",
230
+ "primaryKey": false,
231
+ "notNull": true,
232
+ "autoincrement": false
233
+ },
234
+ "start_line": {
235
+ "name": "start_line",
236
+ "type": "integer",
237
+ "primaryKey": false,
238
+ "notNull": true,
239
+ "autoincrement": false
240
+ },
241
+ "start_column": {
242
+ "name": "start_column",
243
+ "type": "integer",
244
+ "primaryKey": false,
245
+ "notNull": true,
246
+ "autoincrement": false
247
+ },
248
+ "end_line": {
249
+ "name": "end_line",
250
+ "type": "integer",
251
+ "primaryKey": false,
252
+ "notNull": true,
253
+ "autoincrement": false
254
+ },
255
+ "end_column": {
256
+ "name": "end_column",
257
+ "type": "integer",
258
+ "primaryKey": false,
259
+ "notNull": true,
260
+ "autoincrement": false
261
+ },
262
+ "is_exported": {
263
+ "name": "is_exported",
264
+ "type": "integer",
265
+ "primaryKey": false,
266
+ "notNull": true,
267
+ "autoincrement": false,
268
+ "default": 0
269
+ },
270
+ "signature": {
271
+ "name": "signature",
272
+ "type": "text",
273
+ "primaryKey": false,
274
+ "notNull": false,
275
+ "autoincrement": false
276
+ },
277
+ "fingerprint": {
278
+ "name": "fingerprint",
279
+ "type": "text",
280
+ "primaryKey": false,
281
+ "notNull": false,
282
+ "autoincrement": false
283
+ },
284
+ "detail_json": {
285
+ "name": "detail_json",
286
+ "type": "text",
287
+ "primaryKey": false,
288
+ "notNull": false,
289
+ "autoincrement": false
290
+ },
291
+ "content_hash": {
292
+ "name": "content_hash",
293
+ "type": "text",
294
+ "primaryKey": false,
295
+ "notNull": true,
296
+ "autoincrement": false
297
+ },
298
+ "indexed_at": {
299
+ "name": "indexed_at",
300
+ "type": "text",
301
+ "primaryKey": false,
302
+ "notNull": true,
303
+ "autoincrement": false
304
+ },
305
+ "resolved_type": {
306
+ "name": "resolved_type",
307
+ "type": "text",
308
+ "primaryKey": false,
309
+ "notNull": false,
310
+ "autoincrement": false
311
+ }
312
+ },
313
+ "indexes": {
314
+ "idx_symbols_project_file": {
315
+ "name": "idx_symbols_project_file",
316
+ "columns": [
317
+ "project",
318
+ "file_path"
319
+ ],
320
+ "isUnique": false
321
+ },
322
+ "idx_symbols_project_kind": {
323
+ "name": "idx_symbols_project_kind",
324
+ "columns": [
325
+ "project",
326
+ "kind"
327
+ ],
328
+ "isUnique": false
329
+ },
330
+ "idx_symbols_project_name": {
331
+ "name": "idx_symbols_project_name",
332
+ "columns": [
333
+ "project",
334
+ "name"
335
+ ],
336
+ "isUnique": false
337
+ },
338
+ "idx_symbols_fingerprint": {
339
+ "name": "idx_symbols_fingerprint",
340
+ "columns": [
341
+ "project",
342
+ "fingerprint"
343
+ ],
344
+ "isUnique": false
345
+ }
346
+ },
347
+ "foreignKeys": {
348
+ "symbols_project_file_path_files_project_file_path_fk": {
349
+ "name": "symbols_project_file_path_files_project_file_path_fk",
350
+ "tableFrom": "symbols",
351
+ "tableTo": "files",
352
+ "columnsFrom": [
353
+ "project",
354
+ "file_path"
355
+ ],
356
+ "columnsTo": [
357
+ "project",
358
+ "file_path"
359
+ ],
360
+ "onDelete": "cascade",
361
+ "onUpdate": "no action"
362
+ }
363
+ },
364
+ "compositePrimaryKeys": {},
365
+ "uniqueConstraints": {},
366
+ "checkConstraints": {}
367
+ },
368
+ "watcher_owner": {
369
+ "name": "watcher_owner",
370
+ "columns": {
371
+ "id": {
372
+ "name": "id",
373
+ "type": "integer",
374
+ "primaryKey": true,
375
+ "notNull": true,
376
+ "autoincrement": false
377
+ },
378
+ "pid": {
379
+ "name": "pid",
380
+ "type": "integer",
381
+ "primaryKey": false,
382
+ "notNull": true,
383
+ "autoincrement": false
384
+ },
385
+ "started_at": {
386
+ "name": "started_at",
387
+ "type": "text",
388
+ "primaryKey": false,
389
+ "notNull": true,
390
+ "autoincrement": false
391
+ },
392
+ "heartbeat_at": {
393
+ "name": "heartbeat_at",
394
+ "type": "text",
395
+ "primaryKey": false,
396
+ "notNull": true,
397
+ "autoincrement": false
398
+ }
399
+ },
400
+ "indexes": {},
401
+ "foreignKeys": {},
402
+ "compositePrimaryKeys": {},
403
+ "uniqueConstraints": {},
404
+ "checkConstraints": {
405
+ "watcher_owner_singleton": {
406
+ "name": "watcher_owner_singleton",
407
+ "value": "\"watcher_owner\".\"id\" = 1"
408
+ }
409
+ }
410
+ }
411
+ },
412
+ "views": {},
413
+ "enums": {},
414
+ "_meta": {
415
+ "schemas": {},
416
+ "tables": {},
417
+ "columns": {}
418
+ },
419
+ "internal": {
420
+ "indexes": {}
421
+ }
422
+ }