sensemaking 0.17.1 → 0.18.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 (425) hide show
  1. package/README.md +15 -13
  2. package/dist/cjs/cli/map.js +144 -3
  3. package/dist/cjs/cli/map.js.map +1 -1
  4. package/dist/cjs/cli/named.js +19 -11
  5. package/dist/cjs/cli/named.js.map +1 -1
  6. package/dist/cjs/cli/path.js +186 -26
  7. package/dist/cjs/cli/path.js.map +1 -1
  8. package/dist/cjs/cli/peek.js +145 -4
  9. package/dist/cjs/cli/peek.js.map +1 -1
  10. package/dist/cjs/cli/related.js +2 -2
  11. package/dist/cjs/cli/related.js.map +1 -1
  12. package/dist/cjs/cli/search.js +2 -2
  13. package/dist/cjs/cli/search.js.map +1 -1
  14. package/dist/cjs/cli/shared.d.cts +3 -3
  15. package/dist/cjs/cli/shared.d.ts +3 -3
  16. package/dist/cjs/cli/shared.js +156 -58
  17. package/dist/cjs/cli/shared.js.map +1 -1
  18. package/dist/cjs/cli/sql.js +151 -10
  19. package/dist/cjs/cli/sql.js.map +1 -1
  20. package/dist/cjs/cli/status.js +177 -52
  21. package/dist/cjs/cli/status.js.map +1 -1
  22. package/dist/cjs/commands/map.d.cts +2 -2
  23. package/dist/cjs/commands/map.d.ts +2 -2
  24. package/dist/cjs/commands/map.js +373 -67
  25. package/dist/cjs/commands/map.js.map +1 -1
  26. package/dist/cjs/commands/peek.d.cts +2 -2
  27. package/dist/cjs/commands/peek.d.ts +2 -2
  28. package/dist/cjs/commands/peek.js +321 -79
  29. package/dist/cjs/commands/peek.js.map +1 -1
  30. package/dist/cjs/commands/related.d.cts +2 -2
  31. package/dist/cjs/commands/related.d.ts +2 -2
  32. package/dist/cjs/commands/related.js +55 -10
  33. package/dist/cjs/commands/related.js.map +1 -1
  34. package/dist/cjs/commands/scope.d.cts +7 -7
  35. package/dist/cjs/commands/scope.d.ts +7 -7
  36. package/dist/cjs/commands/scope.js +382 -45
  37. package/dist/cjs/commands/scope.js.map +1 -1
  38. package/dist/cjs/commands/search.d.cts +2 -2
  39. package/dist/cjs/commands/search.d.ts +2 -2
  40. package/dist/cjs/commands/search.js +292 -99
  41. package/dist/cjs/commands/search.js.map +1 -1
  42. package/dist/cjs/commands/signals.d.cts +4 -10
  43. package/dist/cjs/commands/signals.d.ts +4 -10
  44. package/dist/cjs/commands/signals.js +91 -45
  45. package/dist/cjs/commands/signals.js.map +1 -1
  46. package/dist/cjs/commands/status.d.cts +2 -2
  47. package/dist/cjs/commands/status.d.ts +2 -2
  48. package/dist/cjs/commands/status.js +247 -10
  49. package/dist/cjs/commands/status.js.map +1 -1
  50. package/dist/cjs/config/access.d.cts +1 -0
  51. package/dist/cjs/config/access.d.ts +1 -0
  52. package/dist/cjs/config/access.js +7 -0
  53. package/dist/cjs/config/access.js.map +1 -1
  54. package/dist/cjs/config/index.d.cts +1 -1
  55. package/dist/cjs/config/index.d.ts +1 -1
  56. package/dist/cjs/config/index.js +3 -0
  57. package/dist/cjs/config/index.js.map +1 -1
  58. package/dist/cjs/config/types.d.cts +1 -0
  59. package/dist/cjs/config/types.d.ts +1 -0
  60. package/dist/cjs/config/types.js.map +1 -1
  61. package/dist/cjs/config/validate.js +10 -1
  62. package/dist/cjs/config/validate.js.map +1 -1
  63. package/dist/cjs/embed/distribution.d.cts +3 -3
  64. package/dist/cjs/embed/distribution.d.ts +3 -3
  65. package/dist/cjs/embed/distribution.js +162 -6
  66. package/dist/cjs/embed/distribution.js.map +1 -1
  67. package/dist/cjs/embed/langfit.d.cts +2 -2
  68. package/dist/cjs/embed/langfit.d.ts +2 -2
  69. package/dist/cjs/embed/langfit.js +57 -44
  70. package/dist/cjs/embed/langfit.js.map +1 -1
  71. package/dist/cjs/embed/query.d.cts +6 -13
  72. package/dist/cjs/embed/query.d.ts +6 -13
  73. package/dist/cjs/embed/query.js +56 -168
  74. package/dist/cjs/embed/query.js.map +1 -1
  75. package/dist/cjs/embed/types.d.cts +1 -0
  76. package/dist/cjs/embed/types.d.ts +1 -0
  77. package/dist/cjs/embed/types.js +11 -2
  78. package/dist/cjs/embed/types.js.map +1 -1
  79. package/dist/cjs/errors.d.cts +1 -1
  80. package/dist/cjs/errors.d.ts +1 -1
  81. package/dist/cjs/errors.js.map +1 -1
  82. package/dist/cjs/features/embed.js +218 -11
  83. package/dist/cjs/features/embed.js.map +1 -1
  84. package/dist/cjs/features/index.d.cts +1 -1
  85. package/dist/cjs/features/index.d.ts +1 -1
  86. package/dist/cjs/features/index.js +6 -0
  87. package/dist/cjs/features/index.js.map +1 -1
  88. package/dist/cjs/features/links.d.cts +7 -2
  89. package/dist/cjs/features/links.d.ts +7 -2
  90. package/dist/cjs/features/links.js +710 -198
  91. package/dist/cjs/features/links.js.map +1 -1
  92. package/dist/cjs/features/rank.js +231 -31
  93. package/dist/cjs/features/rank.js.map +1 -1
  94. package/dist/cjs/features/sections.js +218 -8
  95. package/dist/cjs/features/sections.js.map +1 -1
  96. package/dist/cjs/features/tags.js +236 -40
  97. package/dist/cjs/features/tags.js.map +1 -1
  98. package/dist/cjs/features/types.d.cts +9 -5
  99. package/dist/cjs/features/types.d.ts +9 -5
  100. package/dist/cjs/graph/traverse.d.cts +2 -2
  101. package/dist/cjs/graph/traverse.d.ts +2 -2
  102. package/dist/cjs/graph/traverse.js +321 -42
  103. package/dist/cjs/graph/traverse.js.map +1 -1
  104. package/dist/cjs/index.d.cts +3 -2
  105. package/dist/cjs/index.d.ts +3 -2
  106. package/dist/cjs/index.js +2 -2
  107. package/dist/cjs/index.js.map +1 -1
  108. package/dist/cjs/lib/guarded-tick.d.cts +1 -0
  109. package/dist/cjs/lib/guarded-tick.d.ts +1 -0
  110. package/dist/cjs/lib/guarded-tick.js +19 -0
  111. package/dist/cjs/lib/guarded-tick.js.map +1 -0
  112. package/dist/cjs/output/column-hint.d.cts +1 -2
  113. package/dist/cjs/output/column-hint.d.ts +1 -2
  114. package/dist/cjs/output/column-hint.js +1 -4
  115. package/dist/cjs/output/column-hint.js.map +1 -1
  116. package/dist/cjs/output/output.d.cts +2 -1
  117. package/dist/cjs/output/output.d.ts +2 -1
  118. package/dist/cjs/output/output.js +515 -97
  119. package/dist/cjs/output/output.js.map +1 -1
  120. package/dist/cjs/scan/frontmatter.js.map +1 -1
  121. package/dist/cjs/scan/index.js.map +1 -1
  122. package/dist/cjs/scan/reparse.d.cts +10 -0
  123. package/dist/cjs/scan/reparse.d.ts +10 -0
  124. package/dist/cjs/scan/reparse.js +104 -0
  125. package/dist/cjs/scan/reparse.js.map +1 -0
  126. package/dist/cjs/store/duckdb/batch.d.cts +16 -0
  127. package/dist/cjs/store/duckdb/batch.d.ts +16 -0
  128. package/dist/cjs/store/duckdb/batch.js +208 -0
  129. package/dist/cjs/store/duckdb/batch.js.map +1 -0
  130. package/dist/cjs/store/duckdb/connection.d.cts +5 -0
  131. package/dist/cjs/store/duckdb/connection.d.ts +5 -0
  132. package/dist/cjs/store/duckdb/connection.js +772 -0
  133. package/dist/cjs/store/duckdb/connection.js.map +1 -0
  134. package/dist/cjs/store/duckdb/lexical.d.cts +10 -0
  135. package/dist/cjs/store/duckdb/lexical.d.ts +10 -0
  136. package/dist/cjs/store/duckdb/lexical.js +502 -0
  137. package/dist/cjs/store/duckdb/lexical.js.map +1 -0
  138. package/dist/cjs/store/duckdb/native.d.cts +3 -0
  139. package/dist/cjs/store/duckdb/native.d.ts +3 -0
  140. package/dist/cjs/store/duckdb/native.js +360 -0
  141. package/dist/cjs/store/duckdb/native.js.map +1 -0
  142. package/dist/cjs/store/duckdb/open.d.cts +12 -0
  143. package/dist/cjs/store/duckdb/open.d.ts +12 -0
  144. package/dist/cjs/store/duckdb/open.js +501 -0
  145. package/dist/cjs/store/duckdb/open.js.map +1 -0
  146. package/dist/cjs/store/duckdb/reconcile.d.cts +6 -0
  147. package/dist/cjs/store/duckdb/reconcile.d.ts +6 -0
  148. package/dist/cjs/store/duckdb/reconcile.js +753 -0
  149. package/dist/cjs/store/duckdb/reconcile.js.map +1 -0
  150. package/dist/cjs/store/duckdb/sql-functions.d.cts +2 -0
  151. package/dist/cjs/store/duckdb/sql-functions.d.ts +2 -0
  152. package/dist/cjs/store/duckdb/sql-functions.js +203 -0
  153. package/dist/cjs/store/duckdb/sql-functions.js.map +1 -0
  154. package/dist/cjs/store/duckdb/store.d.cts +5 -0
  155. package/dist/cjs/store/duckdb/store.d.ts +5 -0
  156. package/dist/cjs/store/duckdb/store.js +504 -0
  157. package/dist/cjs/store/duckdb/store.js.map +1 -0
  158. package/dist/cjs/store/duckdb/vectors.d.cts +9 -0
  159. package/dist/cjs/store/duckdb/vectors.d.ts +9 -0
  160. package/dist/cjs/store/duckdb/vectors.js +502 -0
  161. package/dist/cjs/store/duckdb/vectors.js.map +1 -0
  162. package/dist/cjs/store/index.d.cts +7 -0
  163. package/dist/cjs/store/index.d.ts +7 -0
  164. package/dist/cjs/store/index.js +201 -0
  165. package/dist/cjs/store/index.js.map +1 -0
  166. package/dist/cjs/store/meta.d.cts +3 -0
  167. package/dist/cjs/store/meta.d.ts +3 -0
  168. package/dist/cjs/store/meta.js +215 -0
  169. package/dist/cjs/store/meta.js.map +1 -0
  170. package/dist/cjs/store/shared.d.cts +5 -0
  171. package/dist/cjs/store/shared.d.ts +5 -0
  172. package/dist/cjs/store/shared.js +252 -0
  173. package/dist/cjs/store/shared.js.map +1 -0
  174. package/dist/cjs/store/sql-functions.d.cts +2 -0
  175. package/dist/cjs/store/sql-functions.d.ts +2 -0
  176. package/dist/cjs/store/sql-functions.js +48 -0
  177. package/dist/cjs/store/sql-functions.js.map +1 -0
  178. package/dist/cjs/store/sqlite/connection.d.cts +3 -0
  179. package/dist/cjs/store/sqlite/connection.d.ts +3 -0
  180. package/dist/cjs/store/sqlite/connection.js +516 -0
  181. package/dist/cjs/store/sqlite/connection.js.map +1 -0
  182. package/dist/cjs/store/sqlite/lexical.d.cts +2 -0
  183. package/dist/cjs/store/sqlite/lexical.d.ts +2 -0
  184. package/dist/cjs/store/sqlite/lexical.js +177 -0
  185. package/dist/cjs/store/sqlite/lexical.js.map +1 -0
  186. package/dist/cjs/{db → store/sqlite}/open.d.cts +5 -5
  187. package/dist/cjs/{db → store/sqlite}/open.d.ts +5 -5
  188. package/dist/cjs/store/sqlite/open.js +604 -0
  189. package/dist/cjs/store/sqlite/open.js.map +1 -0
  190. package/dist/cjs/store/sqlite/reconcile.d.cts +10 -0
  191. package/dist/cjs/store/sqlite/reconcile.d.ts +10 -0
  192. package/dist/cjs/store/sqlite/reconcile.js +1020 -0
  193. package/dist/cjs/store/sqlite/reconcile.js.map +1 -0
  194. package/dist/cjs/store/sqlite/sql-functions.js +34 -0
  195. package/dist/cjs/store/sqlite/sql-functions.js.map +1 -0
  196. package/dist/cjs/store/sqlite/store.d.cts +5 -0
  197. package/dist/cjs/store/sqlite/store.d.ts +5 -0
  198. package/dist/cjs/store/sqlite/store.js +588 -0
  199. package/dist/cjs/store/sqlite/store.js.map +1 -0
  200. package/dist/cjs/store/sqlite/vectors.d.cts +13 -0
  201. package/dist/cjs/store/sqlite/vectors.d.ts +13 -0
  202. package/dist/cjs/store/sqlite/vectors.js +470 -0
  203. package/dist/cjs/store/sqlite/vectors.js.map +1 -0
  204. package/dist/cjs/store/transaction.d.cts +5 -0
  205. package/dist/cjs/store/transaction.d.ts +5 -0
  206. package/dist/cjs/store/transaction.js +297 -0
  207. package/dist/cjs/store/transaction.js.map +1 -0
  208. package/dist/cjs/store/types.d.cts +91 -0
  209. package/dist/cjs/store/types.d.ts +91 -0
  210. package/dist/cjs/store/types.js +15 -0
  211. package/dist/cjs/store/types.js.map +1 -0
  212. package/dist/cjs/watch.d.cts +3 -0
  213. package/dist/cjs/watch.d.ts +3 -0
  214. package/dist/cjs/watch.js +215 -73
  215. package/dist/cjs/watch.js.map +1 -1
  216. package/dist/esm/cli/map.js +4 -4
  217. package/dist/esm/cli/map.js.map +1 -1
  218. package/dist/esm/cli/named.js +2 -2
  219. package/dist/esm/cli/named.js.map +1 -1
  220. package/dist/esm/cli/path.js +4 -4
  221. package/dist/esm/cli/path.js.map +1 -1
  222. package/dist/esm/cli/peek.js +4 -4
  223. package/dist/esm/cli/peek.js.map +1 -1
  224. package/dist/esm/cli/related.js +2 -2
  225. package/dist/esm/cli/related.js.map +1 -1
  226. package/dist/esm/cli/search.js +1 -1
  227. package/dist/esm/cli/search.js.map +1 -1
  228. package/dist/esm/cli/shared.d.ts +3 -3
  229. package/dist/esm/cli/shared.js +17 -17
  230. package/dist/esm/cli/shared.js.map +1 -1
  231. package/dist/esm/cli/sql.js +2 -2
  232. package/dist/esm/cli/sql.js.map +1 -1
  233. package/dist/esm/cli/status.js +23 -22
  234. package/dist/esm/cli/status.js.map +1 -1
  235. package/dist/esm/commands/map.d.ts +2 -2
  236. package/dist/esm/commands/map.js +51 -41
  237. package/dist/esm/commands/map.js.map +1 -1
  238. package/dist/esm/commands/peek.d.ts +2 -2
  239. package/dist/esm/commands/peek.js +58 -50
  240. package/dist/esm/commands/peek.js.map +1 -1
  241. package/dist/esm/commands/related.d.ts +2 -2
  242. package/dist/esm/commands/related.js +9 -9
  243. package/dist/esm/commands/related.js.map +1 -1
  244. package/dist/esm/commands/scope.d.ts +7 -7
  245. package/dist/esm/commands/scope.js +28 -17
  246. package/dist/esm/commands/scope.js.map +1 -1
  247. package/dist/esm/commands/search.d.ts +2 -2
  248. package/dist/esm/commands/search.js +42 -35
  249. package/dist/esm/commands/search.js.map +1 -1
  250. package/dist/esm/commands/signals.d.ts +4 -10
  251. package/dist/esm/commands/signals.js +17 -13
  252. package/dist/esm/commands/signals.js.map +1 -1
  253. package/dist/esm/commands/status.d.ts +2 -2
  254. package/dist/esm/commands/status.js +13 -7
  255. package/dist/esm/commands/status.js.map +1 -1
  256. package/dist/esm/config/access.d.ts +1 -0
  257. package/dist/esm/config/access.js +5 -0
  258. package/dist/esm/config/access.js.map +1 -1
  259. package/dist/esm/config/index.d.ts +1 -1
  260. package/dist/esm/config/index.js +1 -1
  261. package/dist/esm/config/index.js.map +1 -1
  262. package/dist/esm/config/types.d.ts +1 -0
  263. package/dist/esm/config/types.js.map +1 -1
  264. package/dist/esm/config/validate.js +10 -1
  265. package/dist/esm/config/validate.js.map +1 -1
  266. package/dist/esm/embed/distribution.d.ts +3 -3
  267. package/dist/esm/embed/distribution.js +5 -5
  268. package/dist/esm/embed/distribution.js.map +1 -1
  269. package/dist/esm/embed/langfit.d.ts +2 -2
  270. package/dist/esm/embed/langfit.js +4 -4
  271. package/dist/esm/embed/langfit.js.map +1 -1
  272. package/dist/esm/embed/query.d.ts +6 -13
  273. package/dist/esm/embed/query.js +23 -84
  274. package/dist/esm/embed/query.js.map +1 -1
  275. package/dist/esm/embed/types.d.ts +1 -0
  276. package/dist/esm/embed/types.js +5 -3
  277. package/dist/esm/embed/types.js.map +1 -1
  278. package/dist/esm/errors.d.ts +1 -1
  279. package/dist/esm/errors.js.map +1 -1
  280. package/dist/esm/features/embed.js +22 -10
  281. package/dist/esm/features/embed.js.map +1 -1
  282. package/dist/esm/features/index.d.ts +1 -1
  283. package/dist/esm/features/index.js +1 -1
  284. package/dist/esm/features/index.js.map +1 -1
  285. package/dist/esm/features/links.d.ts +7 -2
  286. package/dist/esm/features/links.js +124 -97
  287. package/dist/esm/features/links.js.map +1 -1
  288. package/dist/esm/features/rank.js +15 -8
  289. package/dist/esm/features/rank.js.map +1 -1
  290. package/dist/esm/features/sections.js +20 -7
  291. package/dist/esm/features/sections.js.map +1 -1
  292. package/dist/esm/features/tags.js +19 -18
  293. package/dist/esm/features/tags.js.map +1 -1
  294. package/dist/esm/features/types.d.ts +9 -5
  295. package/dist/esm/features/types.js +1 -1
  296. package/dist/esm/features/types.js.map +1 -1
  297. package/dist/esm/graph/traverse.d.ts +2 -2
  298. package/dist/esm/graph/traverse.js +26 -23
  299. package/dist/esm/graph/traverse.js.map +1 -1
  300. package/dist/esm/index.d.ts +3 -2
  301. package/dist/esm/index.js +1 -1
  302. package/dist/esm/index.js.map +1 -1
  303. package/dist/esm/lib/guarded-tick.d.ts +1 -0
  304. package/dist/esm/lib/guarded-tick.js +8 -0
  305. package/dist/esm/lib/guarded-tick.js.map +1 -0
  306. package/dist/esm/output/column-hint.d.ts +1 -2
  307. package/dist/esm/output/column-hint.js +3 -2
  308. package/dist/esm/output/column-hint.js.map +1 -1
  309. package/dist/esm/output/output.d.ts +2 -1
  310. package/dist/esm/output/output.js +27 -23
  311. package/dist/esm/output/output.js.map +1 -1
  312. package/dist/esm/scan/frontmatter.js +1 -1
  313. package/dist/esm/scan/frontmatter.js.map +1 -1
  314. package/dist/esm/scan/index.js +1 -1
  315. package/dist/esm/scan/index.js.map +1 -1
  316. package/dist/esm/scan/reparse.d.ts +10 -0
  317. package/dist/esm/scan/reparse.js +30 -0
  318. package/dist/esm/scan/reparse.js.map +1 -0
  319. package/dist/esm/store/duckdb/batch.d.ts +16 -0
  320. package/dist/esm/store/duckdb/batch.js +96 -0
  321. package/dist/esm/store/duckdb/batch.js.map +1 -0
  322. package/dist/esm/store/duckdb/connection.d.ts +5 -0
  323. package/dist/esm/store/duckdb/connection.js +97 -0
  324. package/dist/esm/store/duckdb/connection.js.map +1 -0
  325. package/dist/esm/store/duckdb/lexical.d.ts +10 -0
  326. package/dist/esm/store/duckdb/lexical.js +163 -0
  327. package/dist/esm/store/duckdb/lexical.js.map +1 -0
  328. package/dist/esm/store/duckdb/native.d.ts +3 -0
  329. package/dist/esm/store/duckdb/native.js +96 -0
  330. package/dist/esm/store/duckdb/native.js.map +1 -0
  331. package/dist/esm/store/duckdb/open.d.ts +12 -0
  332. package/dist/esm/store/duckdb/open.js +127 -0
  333. package/dist/esm/store/duckdb/open.js.map +1 -0
  334. package/dist/esm/store/duckdb/reconcile.d.ts +6 -0
  335. package/dist/esm/store/duckdb/reconcile.js +141 -0
  336. package/dist/esm/store/duckdb/reconcile.js.map +1 -0
  337. package/dist/esm/store/duckdb/sql-functions.d.ts +2 -0
  338. package/dist/esm/store/duckdb/sql-functions.js +56 -0
  339. package/dist/esm/store/duckdb/sql-functions.js.map +1 -0
  340. package/dist/esm/store/duckdb/store.d.ts +5 -0
  341. package/dist/esm/store/duckdb/store.js +104 -0
  342. package/dist/esm/store/duckdb/store.js.map +1 -0
  343. package/dist/esm/store/duckdb/vectors.d.ts +9 -0
  344. package/dist/esm/store/duckdb/vectors.js +171 -0
  345. package/dist/esm/store/duckdb/vectors.js.map +1 -0
  346. package/dist/esm/store/index.d.ts +7 -0
  347. package/dist/esm/store/index.js +35 -0
  348. package/dist/esm/store/index.js.map +1 -0
  349. package/dist/esm/store/meta.d.ts +3 -0
  350. package/dist/esm/store/meta.js +17 -0
  351. package/dist/esm/store/meta.js.map +1 -0
  352. package/dist/esm/store/shared.d.ts +5 -0
  353. package/dist/esm/store/shared.js +24 -0
  354. package/dist/esm/store/shared.js.map +1 -0
  355. package/dist/esm/store/sql-functions.d.ts +2 -0
  356. package/dist/esm/store/sql-functions.js +29 -0
  357. package/dist/esm/store/sql-functions.js.map +1 -0
  358. package/dist/esm/store/sqlite/connection.d.ts +3 -0
  359. package/dist/esm/store/sqlite/connection.js +50 -0
  360. package/dist/esm/store/sqlite/connection.js.map +1 -0
  361. package/dist/esm/store/sqlite/lexical.d.ts +2 -0
  362. package/dist/esm/store/sqlite/lexical.js +21 -0
  363. package/dist/esm/store/sqlite/lexical.js.map +1 -0
  364. package/dist/esm/{db → store/sqlite}/open.d.ts +5 -5
  365. package/dist/esm/store/sqlite/open.js +193 -0
  366. package/dist/esm/store/sqlite/open.js.map +1 -0
  367. package/dist/esm/store/sqlite/reconcile.d.ts +10 -0
  368. package/dist/esm/{db → store/sqlite}/reconcile.js +101 -99
  369. package/dist/esm/store/sqlite/reconcile.js.map +1 -0
  370. package/dist/esm/store/sqlite/sql-functions.js +23 -0
  371. package/dist/esm/store/sqlite/sql-functions.js.map +1 -0
  372. package/dist/esm/store/sqlite/store.d.ts +5 -0
  373. package/dist/esm/store/sqlite/store.js +82 -0
  374. package/dist/esm/store/sqlite/store.js.map +1 -0
  375. package/dist/esm/store/sqlite/vectors.d.ts +13 -0
  376. package/dist/esm/store/sqlite/vectors.js +90 -0
  377. package/dist/esm/store/sqlite/vectors.js.map +1 -0
  378. package/dist/esm/store/transaction.d.ts +5 -0
  379. package/dist/esm/store/transaction.js +57 -0
  380. package/dist/esm/store/transaction.js.map +1 -0
  381. package/dist/esm/store/types.d.ts +91 -0
  382. package/dist/esm/store/types.js +11 -0
  383. package/dist/esm/store/types.js.map +1 -0
  384. package/dist/esm/watch.d.ts +3 -0
  385. package/dist/esm/watch.js +39 -22
  386. package/dist/esm/watch.js.map +1 -1
  387. package/package.json +3 -1
  388. package/schema.json +5 -0
  389. package/skills/sense/EXAMPLES.md +3 -3
  390. package/skills/sense/SKILL.md +16 -14
  391. package/skills/sense-bases/EXAMPLES.md +2 -2
  392. package/skills/sense-bases/SKILL.md +6 -6
  393. package/skills/sense-setup/EXAMPLES.md +1 -1
  394. package/skills/sense-setup/SKILL.md +5 -4
  395. package/dist/cjs/db/index.d.cts +0 -4
  396. package/dist/cjs/db/index.d.ts +0 -4
  397. package/dist/cjs/db/index.js +0 -42
  398. package/dist/cjs/db/index.js.map +0 -1
  399. package/dist/cjs/db/open.js +0 -230
  400. package/dist/cjs/db/open.js.map +0 -1
  401. package/dist/cjs/db/reconcile.d.cts +0 -10
  402. package/dist/cjs/db/reconcile.d.ts +0 -10
  403. package/dist/cjs/db/reconcile.js +0 -579
  404. package/dist/cjs/db/reconcile.js.map +0 -1
  405. package/dist/cjs/db/shared.d.cts +0 -5
  406. package/dist/cjs/db/shared.d.ts +0 -5
  407. package/dist/cjs/db/shared.js +0 -45
  408. package/dist/cjs/db/shared.js.map +0 -1
  409. package/dist/cjs/db/sql-functions.js +0 -64
  410. package/dist/cjs/db/sql-functions.js.map +0 -1
  411. package/dist/esm/db/index.d.ts +0 -4
  412. package/dist/esm/db/index.js +0 -5
  413. package/dist/esm/db/index.js.map +0 -1
  414. package/dist/esm/db/open.js +0 -165
  415. package/dist/esm/db/open.js.map +0 -1
  416. package/dist/esm/db/reconcile.d.ts +0 -10
  417. package/dist/esm/db/reconcile.js.map +0 -1
  418. package/dist/esm/db/shared.d.ts +0 -5
  419. package/dist/esm/db/shared.js +0 -20
  420. package/dist/esm/db/shared.js.map +0 -1
  421. package/dist/esm/db/sql-functions.js +0 -47
  422. package/dist/esm/db/sql-functions.js.map +0 -1
  423. /package/dist/cjs/{db → store/sqlite}/sql-functions.d.cts +0 -0
  424. /package/dist/cjs/{db → store/sqlite}/sql-functions.d.ts +0 -0
  425. /package/dist/esm/{db → store/sqlite}/sql-functions.d.ts +0 -0
@@ -0,0 +1,753 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "reconcile", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return reconcile;
9
+ }
10
+ });
11
+ var _errorsts = require("../../errors.js");
12
+ var _indexts = require("../../features/index.js");
13
+ var _progressts = require("../../output/progress.js");
14
+ var _indexts1 = require("../../scan/index.js");
15
+ var _reparsets = require("../../scan/reparse.js");
16
+ var _sharedts = require("../shared.js");
17
+ var _transactionts = require("../transaction.js");
18
+ function _array_like_to_array(arr, len) {
19
+ if (len == null || len > arr.length) len = arr.length;
20
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
21
+ return arr2;
22
+ }
23
+ function _array_without_holes(arr) {
24
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
25
+ }
26
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
27
+ try {
28
+ var info = gen[key](arg);
29
+ var value = info.value;
30
+ } catch (error) {
31
+ reject(error);
32
+ return;
33
+ }
34
+ if (info.done) resolve(value);
35
+ else Promise.resolve(value).then(_next, _throw);
36
+ }
37
+ function _async_to_generator(fn) {
38
+ return function() {
39
+ var self = this, args = arguments;
40
+ return new Promise(function(resolve, reject) {
41
+ var gen = fn.apply(self, args);
42
+ function _next(value) {
43
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
44
+ }
45
+ function _throw(err) {
46
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
47
+ }
48
+ _next(undefined);
49
+ });
50
+ };
51
+ }
52
+ function _iterable_to_array(iter) {
53
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
54
+ return Array.from(iter);
55
+ }
56
+ }
57
+ function _non_iterable_spread() {
58
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
59
+ }
60
+ function _to_consumable_array(arr) {
61
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
62
+ }
63
+ function _ts_generator(thisArg, body) {
64
+ var f, y, t, _ = {
65
+ label: 0,
66
+ sent: function() {
67
+ if (t[0] & 1) throw t[1];
68
+ return t[1];
69
+ },
70
+ trys: [],
71
+ ops: []
72
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
73
+ return d(g, "next", {
74
+ value: verb(0)
75
+ }), d(g, "throw", {
76
+ value: verb(1)
77
+ }), d(g, "return", {
78
+ value: verb(2)
79
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
80
+ value: function() {
81
+ return this;
82
+ }
83
+ }), g;
84
+ function verb(n) {
85
+ return function(v) {
86
+ return step([
87
+ n,
88
+ v
89
+ ]);
90
+ };
91
+ }
92
+ function step(op) {
93
+ if (f) throw new TypeError("Generator is already executing.");
94
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
95
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
96
+ if (y = 0, t) op = [
97
+ op[0] & 2,
98
+ t.value
99
+ ];
100
+ switch(op[0]){
101
+ case 0:
102
+ case 1:
103
+ t = op;
104
+ break;
105
+ case 4:
106
+ _.label++;
107
+ return {
108
+ value: op[1],
109
+ done: false
110
+ };
111
+ case 5:
112
+ _.label++;
113
+ y = op[1];
114
+ op = [
115
+ 0
116
+ ];
117
+ continue;
118
+ case 7:
119
+ op = _.ops.pop();
120
+ _.trys.pop();
121
+ continue;
122
+ default:
123
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
124
+ _ = 0;
125
+ continue;
126
+ }
127
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
128
+ _.label = op[1];
129
+ break;
130
+ }
131
+ if (op[0] === 6 && _.label < t[1]) {
132
+ _.label = t[1];
133
+ t = op;
134
+ break;
135
+ }
136
+ if (t && _.label < t[2]) {
137
+ _.label = t[2];
138
+ _.ops.push(op);
139
+ break;
140
+ }
141
+ if (t[2]) _.ops.pop();
142
+ _.trys.pop();
143
+ continue;
144
+ }
145
+ op = body.call(thisArg, _);
146
+ } catch (e) {
147
+ op = [
148
+ 6,
149
+ e
150
+ ];
151
+ y = 0;
152
+ } finally{
153
+ f = t = 0;
154
+ }
155
+ if (op[0] & 5) throw op[1];
156
+ return {
157
+ value: op[0] ? op[1] : void 0,
158
+ done: true
159
+ };
160
+ }
161
+ }
162
+ function _ts_values(o) {
163
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
164
+ if (m) {
165
+ return m.call(o);
166
+ }
167
+ if (o && typeof o.length === "number") {
168
+ return {
169
+ next: function() {
170
+ if (o && i >= o.length) {
171
+ o = void 0;
172
+ }
173
+ return {
174
+ value: o && o[i++],
175
+ done: !o
176
+ };
177
+ }
178
+ };
179
+ }
180
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
181
+ }
182
+ function _unsupported_iterable_to_array(o, minLen) {
183
+ if (!o) return;
184
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
185
+ var n = Object.prototype.toString.call(o).slice(8, -1);
186
+ if (n === "Object" && o.constructor) n = o.constructor.name;
187
+ if (n === "Map" || n === "Set") return Array.from(n);
188
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
189
+ }
190
+ // Mirrors src/store/sqlite/reconcile.ts's frontmatter-upsert shape (dynamic ALTER TABLE per
191
+ // discovered key, ON CONFLICT upsert keeping the row's identity stable). `content` is a plain
192
+ // table, not FTS-virtual (D1: DuckDB's fts index is built lazily, on first lexical query, from
193
+ // this table -- see duckdb/lexical.ts), so its rows are maintained here unconditionally. The one
194
+ // forced divergence for frontmatter itself is the ALTER TABLE type: DuckDB requires a declared
195
+ // column type where sqlite accepts none, so every dynamic frontmatter column is VARIANT (the
196
+ // only DuckDB type that can hold the different JS types mapValue() produces across files for
197
+ // the same key).
198
+ var CORE_FRONTMATTER_COLUMNS = new Set([
199
+ 'path',
200
+ '_mtime',
201
+ '_ctime',
202
+ '_size',
203
+ '_parse_error'
204
+ ]);
205
+ // No rowid coupling needed (unlike sqlite's content, which links to frontmatter's rowid):
206
+ // `path` is content's own primary key, so this is a plain per-doc row.
207
+ var INSERT_CONTENT_SQL = 'INSERT INTO content ("path", title, summary, text) VALUES (?, ?, ?, ?)';
208
+ function contentRow(doc) {
209
+ return [
210
+ doc.relPath,
211
+ doc.search.title,
212
+ doc.search.summary,
213
+ doc.search.text
214
+ ];
215
+ }
216
+ // No compile-time column cap in DuckDB (unlike SQLite's SQLITE_MAX_COLUMN); kept as a sanity
217
+ // fence anyway so a runaway frontmatter generator fails with a clear message instead of an
218
+ // unbounded ALTER TABLE loop.
219
+ var MAX_FRONTMATTER_COLUMNS = 10000;
220
+ function reconcile(conn, cfg, baseDir) {
221
+ return _async_to_generator(function() {
222
+ var files, currentSet, existingStmt, existingRows, existing, vanished, toReparse, features, seenColumns, report, _reparseFiles, parsedDocs, warnings, newColumns, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, col, allColumns, writableColumns, insertSql, added, delta, addedSet, reparsedExisting;
223
+ return _ts_generator(this, function(_state) {
224
+ switch(_state.label){
225
+ case 0:
226
+ files = (0, _indexts1.listFiles)(cfg, baseDir);
227
+ currentSet = new Set(files.map(function(f) {
228
+ return f.relPath;
229
+ }));
230
+ return [
231
+ 4,
232
+ conn.prepare('SELECT "path", "_mtime", "_size" FROM frontmatter')
233
+ ];
234
+ case 1:
235
+ existingStmt = _state.sent();
236
+ return [
237
+ 4,
238
+ existingStmt.all()
239
+ ];
240
+ case 2:
241
+ existingRows = _state.sent();
242
+ existing = new Map(existingRows.map(function(r) {
243
+ return [
244
+ r.path,
245
+ r
246
+ ];
247
+ }));
248
+ vanished = existingRows.filter(function(r) {
249
+ return !currentSet.has(r.path);
250
+ }).map(function(r) {
251
+ return r.path;
252
+ });
253
+ toReparse = files.filter(function(f) {
254
+ var row = existing.get(f.relPath);
255
+ return !row || row._mtime !== f.mtimeMs || row._size !== f.size;
256
+ });
257
+ if (vanished.length === 0 && toReparse.length === 0) return [
258
+ 2,
259
+ {
260
+ parsed: 0,
261
+ warnings: []
262
+ }
263
+ ];
264
+ features = (0, _indexts.activeFeatures)(cfg);
265
+ return [
266
+ 4,
267
+ (0, _sharedts.getColumns)(conn)
268
+ ];
269
+ case 3:
270
+ seenColumns = _state.sent();
271
+ report = (0, _progressts.progress)('reparsing files', toReparse.length);
272
+ _reparseFiles = (0, _reparsets.reparseFiles)(toReparse, features, cfg, seenColumns, report.tick), parsedDocs = _reparseFiles.docs, warnings = _reparseFiles.warnings, newColumns = _reparseFiles.newColumns;
273
+ report.finish();
274
+ _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
275
+ try {
276
+ for(_iterator = newColumns[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
277
+ col = _step.value;
278
+ seenColumns.add(col);
279
+ }
280
+ } catch (err) {
281
+ _didIteratorError = true;
282
+ _iteratorError = err;
283
+ } finally{
284
+ try {
285
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
286
+ _iterator.return();
287
+ }
288
+ } finally{
289
+ if (_didIteratorError) {
290
+ throw _iteratorError;
291
+ }
292
+ }
293
+ }
294
+ allColumns = _to_consumable_array(seenColumns);
295
+ if (allColumns.length > MAX_FRONTMATTER_COLUMNS) {
296
+ throw new _errorsts.SenseError('COLUMN_LIMIT', "frontmatter would need ".concat(allColumns.length, " columns, crossing this store's sanity limit (").concat(MAX_FRONTMATTER_COLUMNS, "). Narrow the presets' include globs so fewer/other files are indexed, or fix whatever is generating unbounded frontmatter keys."));
297
+ }
298
+ writableColumns = allColumns.filter(function(c) {
299
+ return CORE_FRONTMATTER_COLUMNS.has(c) || !_indexts1.RESERVED_COLUMNS.has(c);
300
+ });
301
+ insertSql = "INSERT INTO frontmatter (".concat(writableColumns.map(_sharedts.quoteIdent).join(', '), ") VALUES (").concat(writableColumns.map(function() {
302
+ return '?';
303
+ }).join(', '), ') ON CONFLICT("path") DO UPDATE SET ').concat(writableColumns.filter(function(c) {
304
+ return c !== 'path';
305
+ }).map(function(c) {
306
+ return "".concat((0, _sharedts.quoteIdent)(c), " = excluded.").concat((0, _sharedts.quoteIdent)(c));
307
+ }).join(', '));
308
+ added = toReparse.filter(function(f) {
309
+ return !existing.has(f.relPath);
310
+ }).map(function(f) {
311
+ return f.relPath;
312
+ });
313
+ delta = {
314
+ files: files,
315
+ reparsed: parsedDocs.map(function(d) {
316
+ return d.relPath;
317
+ }),
318
+ added: added,
319
+ vanished: vanished
320
+ };
321
+ addedSet = new Set(added);
322
+ reparsedExisting = parsedDocs.map(function(d) {
323
+ return d.relPath;
324
+ }).filter(function(p) {
325
+ return !addedSet.has(p);
326
+ });
327
+ return [
328
+ 4,
329
+ (0, _transactionts.withTransaction)(conn, function() {
330
+ return _async_to_generator(function() {
331
+ var _feature_remove, _feature_afterReconcile, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, col, err, rows, contentTouched, presetTouched, presetRows, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator1, _step1, doc, _iterator2, _step2, presetName, removedPaths, _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3, _iterator3, _step3, feature, err, _iteratorNormalCompletion4, _didIteratorError4, _iteratorError4, _loop, _iterator4, _step4, err, _iteratorNormalCompletion5, _didIteratorError5, _iteratorError5, _iterator5, _step5, feature1, err;
332
+ return _ts_generator(this, function(_state) {
333
+ switch(_state.label){
334
+ case 0:
335
+ _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
336
+ _state.label = 1;
337
+ case 1:
338
+ _state.trys.push([
339
+ 1,
340
+ 6,
341
+ 7,
342
+ 8
343
+ ]);
344
+ _iterator = newColumns[Symbol.iterator]();
345
+ _state.label = 2;
346
+ case 2:
347
+ if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
348
+ 3,
349
+ 5
350
+ ];
351
+ col = _step.value;
352
+ return [
353
+ 4,
354
+ conn.exec("ALTER TABLE frontmatter ADD COLUMN ".concat((0, _sharedts.quoteIdent)(col), " VARIANT"))
355
+ ];
356
+ case 3:
357
+ _state.sent();
358
+ _state.label = 4;
359
+ case 4:
360
+ _iteratorNormalCompletion = true;
361
+ return [
362
+ 3,
363
+ 2
364
+ ];
365
+ case 5:
366
+ return [
367
+ 3,
368
+ 8
369
+ ];
370
+ case 6:
371
+ err = _state.sent();
372
+ _didIteratorError = true;
373
+ _iteratorError = err;
374
+ return [
375
+ 3,
376
+ 8
377
+ ];
378
+ case 7:
379
+ try {
380
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
381
+ _iterator.return();
382
+ }
383
+ } finally{
384
+ if (_didIteratorError) {
385
+ throw _iteratorError;
386
+ }
387
+ }
388
+ return [
389
+ 7
390
+ ];
391
+ case 8:
392
+ if (!(parsedDocs.length > 0)) return [
393
+ 3,
394
+ 10
395
+ ];
396
+ rows = parsedDocs.map(function(doc) {
397
+ return writableColumns.map(function(col) {
398
+ var _doc_data_col;
399
+ if (col === 'path') return doc.relPath;
400
+ if (col === '_mtime') return doc.mtimeMs;
401
+ if (col === '_ctime') return doc.ctimeMs;
402
+ if (col === '_size') return doc.size;
403
+ if (col === '_parse_error') return doc.parseError;
404
+ return (_doc_data_col = doc.data[col]) !== null && _doc_data_col !== void 0 ? _doc_data_col : null;
405
+ });
406
+ });
407
+ return [
408
+ 4,
409
+ conn.runBatch(insertSql, rows)
410
+ ];
411
+ case 9:
412
+ _state.sent();
413
+ _state.label = 10;
414
+ case 10:
415
+ contentTouched = _to_consumable_array(vanished).concat(_to_consumable_array(reparsedExisting));
416
+ if (!(contentTouched.length > 0)) return [
417
+ 3,
418
+ 12
419
+ ];
420
+ return [
421
+ 4,
422
+ conn.runBatch('DELETE FROM content WHERE "path" = ?', contentTouched.map(function(p) {
423
+ return [
424
+ p
425
+ ];
426
+ }))
427
+ ];
428
+ case 11:
429
+ _state.sent();
430
+ _state.label = 12;
431
+ case 12:
432
+ if (!(parsedDocs.length > 0)) return [
433
+ 3,
434
+ 14
435
+ ];
436
+ return [
437
+ 4,
438
+ conn.runBatch(INSERT_CONTENT_SQL, parsedDocs.map(contentRow))
439
+ ];
440
+ case 13:
441
+ _state.sent();
442
+ _state.label = 14;
443
+ case 14:
444
+ if (!(vanished.length > 0)) return [
445
+ 3,
446
+ 16
447
+ ];
448
+ return [
449
+ 4,
450
+ conn.runBatch('DELETE FROM frontmatter WHERE "path" = ?', vanished.map(function(p) {
451
+ return [
452
+ p
453
+ ];
454
+ }))
455
+ ];
456
+ case 15:
457
+ _state.sent();
458
+ _state.label = 16;
459
+ case 16:
460
+ // A preset edit forces a full rebuild, so an unchanged doc's coverage is already correct;
461
+ // new docs have nothing to clear, which keeps cold builds linear.
462
+ presetTouched = _to_consumable_array(vanished).concat(_to_consumable_array(reparsedExisting));
463
+ if (!(presetTouched.length > 0)) return [
464
+ 3,
465
+ 18
466
+ ];
467
+ return [
468
+ 4,
469
+ conn.runBatch('DELETE FROM preset_files WHERE "path" = ?', presetTouched.map(function(p) {
470
+ return [
471
+ p
472
+ ];
473
+ }))
474
+ ];
475
+ case 17:
476
+ _state.sent();
477
+ _state.label = 18;
478
+ case 18:
479
+ presetRows = [];
480
+ _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined, _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
481
+ try {
482
+ for(_iterator1 = parsedDocs[Symbol.iterator](); !(_iteratorNormalCompletion2 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion2 = true){
483
+ doc = _step1.value;
484
+ try {
485
+ for(_iterator2 = doc.presets[Symbol.iterator](); !(_iteratorNormalCompletion1 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion1 = true){
486
+ presetName = _step2.value;
487
+ presetRows.push([
488
+ doc.relPath,
489
+ presetName
490
+ ]);
491
+ }
492
+ } catch (err) {
493
+ _didIteratorError1 = true;
494
+ _iteratorError1 = err;
495
+ } finally{
496
+ try {
497
+ if (!_iteratorNormalCompletion1 && _iterator2.return != null) {
498
+ _iterator2.return();
499
+ }
500
+ } finally{
501
+ if (_didIteratorError1) {
502
+ throw _iteratorError1;
503
+ }
504
+ }
505
+ }
506
+ }
507
+ } catch (err) {
508
+ _didIteratorError2 = true;
509
+ _iteratorError2 = err;
510
+ } finally{
511
+ try {
512
+ if (!_iteratorNormalCompletion2 && _iterator1.return != null) {
513
+ _iterator1.return();
514
+ }
515
+ } finally{
516
+ if (_didIteratorError2) {
517
+ throw _iteratorError2;
518
+ }
519
+ }
520
+ }
521
+ if (!(presetRows.length > 0)) return [
522
+ 3,
523
+ 20
524
+ ];
525
+ return [
526
+ 4,
527
+ conn.runBatch('INSERT INTO preset_files ("path", preset) VALUES (?, ?)', presetRows)
528
+ ];
529
+ case 19:
530
+ _state.sent();
531
+ _state.label = 20;
532
+ case 20:
533
+ removedPaths = _to_consumable_array(vanished).concat(_to_consumable_array(reparsedExisting));
534
+ _iteratorNormalCompletion3 = true, _didIteratorError3 = false, _iteratorError3 = undefined;
535
+ if (!(removedPaths.length > 0)) return [
536
+ 3,
537
+ 28
538
+ ];
539
+ _state.label = 21;
540
+ case 21:
541
+ _state.trys.push([
542
+ 21,
543
+ 26,
544
+ 27,
545
+ 28
546
+ ]);
547
+ _iterator3 = features[Symbol.iterator]();
548
+ _state.label = 22;
549
+ case 22:
550
+ if (!!(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done)) return [
551
+ 3,
552
+ 25
553
+ ];
554
+ feature = _step3.value;
555
+ return [
556
+ 4,
557
+ (_feature_remove = feature.remove) === null || _feature_remove === void 0 ? void 0 : _feature_remove.call(feature, conn, removedPaths, delta)
558
+ ];
559
+ case 23:
560
+ _state.sent();
561
+ _state.label = 24;
562
+ case 24:
563
+ _iteratorNormalCompletion3 = true;
564
+ return [
565
+ 3,
566
+ 22
567
+ ];
568
+ case 25:
569
+ return [
570
+ 3,
571
+ 28
572
+ ];
573
+ case 26:
574
+ err = _state.sent();
575
+ _didIteratorError3 = true;
576
+ _iteratorError3 = err;
577
+ return [
578
+ 3,
579
+ 28
580
+ ];
581
+ case 27:
582
+ try {
583
+ if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
584
+ _iterator3.return();
585
+ }
586
+ } finally{
587
+ if (_didIteratorError3) {
588
+ throw _iteratorError3;
589
+ }
590
+ }
591
+ return [
592
+ 7
593
+ ];
594
+ case 28:
595
+ _iteratorNormalCompletion4 = true, _didIteratorError4 = false, _iteratorError4 = undefined;
596
+ _state.label = 29;
597
+ case 29:
598
+ _state.trys.push([
599
+ 29,
600
+ 34,
601
+ 35,
602
+ 36
603
+ ]);
604
+ _loop = function() {
605
+ var feature, _feature_store, docsForFeature;
606
+ return _ts_generator(this, function(_state) {
607
+ switch(_state.label){
608
+ case 0:
609
+ feature = _step4.value;
610
+ docsForFeature = parsedDocs.map(function(doc) {
611
+ return {
612
+ path: doc.relPath,
613
+ extracted: doc.extracted[feature.name]
614
+ };
615
+ });
616
+ return [
617
+ 4,
618
+ (_feature_store = feature.store) === null || _feature_store === void 0 ? void 0 : _feature_store.call(feature, conn, docsForFeature, delta)
619
+ ];
620
+ case 1:
621
+ _state.sent();
622
+ return [
623
+ 2
624
+ ];
625
+ }
626
+ });
627
+ };
628
+ _iterator4 = features[Symbol.iterator]();
629
+ _state.label = 30;
630
+ case 30:
631
+ if (!!(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done)) return [
632
+ 3,
633
+ 33
634
+ ];
635
+ return [
636
+ 5,
637
+ _ts_values(_loop())
638
+ ];
639
+ case 31:
640
+ _state.sent();
641
+ _state.label = 32;
642
+ case 32:
643
+ _iteratorNormalCompletion4 = true;
644
+ return [
645
+ 3,
646
+ 30
647
+ ];
648
+ case 33:
649
+ return [
650
+ 3,
651
+ 36
652
+ ];
653
+ case 34:
654
+ err = _state.sent();
655
+ _didIteratorError4 = true;
656
+ _iteratorError4 = err;
657
+ return [
658
+ 3,
659
+ 36
660
+ ];
661
+ case 35:
662
+ try {
663
+ if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
664
+ _iterator4.return();
665
+ }
666
+ } finally{
667
+ if (_didIteratorError4) {
668
+ throw _iteratorError4;
669
+ }
670
+ }
671
+ return [
672
+ 7
673
+ ];
674
+ case 36:
675
+ _iteratorNormalCompletion5 = true, _didIteratorError5 = false, _iteratorError5 = undefined;
676
+ _state.label = 37;
677
+ case 37:
678
+ _state.trys.push([
679
+ 37,
680
+ 42,
681
+ 43,
682
+ 44
683
+ ]);
684
+ _iterator5 = features[Symbol.iterator]();
685
+ _state.label = 38;
686
+ case 38:
687
+ if (!!(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done)) return [
688
+ 3,
689
+ 41
690
+ ];
691
+ feature1 = _step5.value;
692
+ return [
693
+ 4,
694
+ (_feature_afterReconcile = feature1.afterReconcile) === null || _feature_afterReconcile === void 0 ? void 0 : _feature_afterReconcile.call(feature1, conn, delta)
695
+ ];
696
+ case 39:
697
+ _state.sent();
698
+ _state.label = 40;
699
+ case 40:
700
+ _iteratorNormalCompletion5 = true;
701
+ return [
702
+ 3,
703
+ 38
704
+ ];
705
+ case 41:
706
+ return [
707
+ 3,
708
+ 44
709
+ ];
710
+ case 42:
711
+ err = _state.sent();
712
+ _didIteratorError5 = true;
713
+ _iteratorError5 = err;
714
+ return [
715
+ 3,
716
+ 44
717
+ ];
718
+ case 43:
719
+ try {
720
+ if (!_iteratorNormalCompletion5 && _iterator5.return != null) {
721
+ _iterator5.return();
722
+ }
723
+ } finally{
724
+ if (_didIteratorError5) {
725
+ throw _iteratorError5;
726
+ }
727
+ }
728
+ return [
729
+ 7
730
+ ];
731
+ case 44:
732
+ return [
733
+ 2
734
+ ];
735
+ }
736
+ });
737
+ })();
738
+ })
739
+ ];
740
+ case 4:
741
+ _state.sent();
742
+ return [
743
+ 2,
744
+ {
745
+ parsed: parsedDocs.length,
746
+ warnings: warnings
747
+ }
748
+ ];
749
+ }
750
+ });
751
+ })();
752
+ }
753
+ /* CJS INTEROP */ if (exports.__esModule && exports.default) { try { Object.defineProperty(exports.default, '__esModule', { value: true }); for (var key in exports) { exports.default[key] = exports[key]; } } catch (_) {}; module.exports = exports.default; }