eminiar 0.5.2 → 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.
package/dist/hook.js CHANGED
@@ -26027,7 +26027,8 @@ var ConfigSchema = external_exports.object({
26027
26027
  "**/*.mjs",
26028
26028
  "**/*.cjs",
26029
26029
  "**/*.py",
26030
- "**/*.go"
26030
+ "**/*.go",
26031
+ "**/*.php"
26031
26032
  ]),
26032
26033
  exclude: external_exports.array(external_exports.string()).default([
26033
26034
  "**/node_modules/**",
@@ -26041,7 +26042,8 @@ var ConfigSchema = external_exports.object({
26041
26042
  "**/__pycache__/**",
26042
26043
  "**/site-packages/**",
26043
26044
  "**/vendor/**",
26044
- "**/*.min.js"
26045
+ "**/*.min.js",
26046
+ "**/*.blade.php"
26045
26047
  ])
26046
26048
  }).prefault({}),
26047
26049
  git: external_exports.object({
@@ -28317,12 +28319,18 @@ var SqliteAdapter = class _SqliteAdapter {
28317
28319
  const ids = this.db.prepare("SELECT id FROM graph_nodes WHERE source = ? AND path = ?").all(source, path2).map((r) => r.id);
28318
28320
  const fileId2 = `file:${path2}`;
28319
28321
  const all = ids.includes(fileId2) ? ids : [...ids, fileId2];
28322
+ this.db.prepare(
28323
+ "DELETE FROM graph_edges WHERE source = ? AND kind = 'handles' AND dst IN (SELECT id FROM graph_nodes WHERE source = ? AND path = ? AND kind = 'route')"
28324
+ ).run(source, source, path2);
28325
+ const foreignRoute = "AND NOT (kind = 'handles' AND dst IN (SELECT id FROM graph_nodes WHERE kind = 'route' AND path IS NOT ?))";
28320
28326
  for (let i = 0; i < all.length; i += 400) {
28321
28327
  const slice = all.slice(i, i + 400);
28322
28328
  const ph = slice.map(() => "?").join(",");
28323
- this.db.prepare(`DELETE FROM graph_edges WHERE source = ? AND src IN (${ph})`).run(source, ...slice);
28329
+ this.db.prepare(`DELETE FROM graph_edges WHERE source = ? AND src IN (${ph}) ${foreignRoute}`).run(source, ...slice, path2);
28324
28330
  }
28325
- this.db.prepare("DELETE FROM graph_edges WHERE source = ? AND src LIKE ? ESCAPE '\\'").run(source, `sym:${path2.replace(/[%_\\]/g, "\\$&")}#%`);
28331
+ this.db.prepare(
28332
+ `DELETE FROM graph_edges WHERE source = ? AND src LIKE ? ESCAPE '\\' ${foreignRoute}`
28333
+ ).run(source, `sym:${path2.replace(/[%_\\]/g, "\\$&")}#%`, path2);
28326
28334
  if (opts.keepFile) {
28327
28335
  this.db.prepare("DELETE FROM graph_nodes WHERE source = ? AND path = ? AND kind != 'file'").run(source, path2);
28328
28336
  } else {
@@ -28750,7 +28758,7 @@ var postToolUse = (input2) => {
28750
28758
  const call = drafts.find((d) => d.category === "tool_call");
28751
28759
  if (call) detectLoop(db, sessionId, String(call.payload.key), String(call.payload.summary));
28752
28760
  for (const d of drafts) {
28753
- if (d.category === "files" && typeof d.payload.path === "string" && /\.(m?[jt]sx?|c[jt]s|py|pyi|go)$/.test(d.payload.path)) {
28761
+ if (d.category === "files" && typeof d.payload.path === "string" && /\.(m?[jt]sx?|c[jt]s|py|pyi|go|php)$/.test(d.payload.path)) {
28754
28762
  db.reindexQueuePush(d.payload.path, String(d.payload.action ?? "edit"));
28755
28763
  }
28756
28764
  }
@@ -29221,7 +29229,16 @@ function hookLog(level, msg) {
29221
29229
  }
29222
29230
 
29223
29231
  // src/hooks/routing.ts
29224
- var SYMBOL_KINDS = ["function", "class", "method", "interface", "type", "enum", "variable"];
29232
+ var SYMBOL_KINDS = [
29233
+ "function",
29234
+ "class",
29235
+ "method",
29236
+ "interface",
29237
+ "trait",
29238
+ "type",
29239
+ "enum",
29240
+ "variable"
29241
+ ];
29225
29242
  function literalOf(pattern) {
29226
29243
  const runs = pattern.match(/[A-Za-z_][A-Za-z0-9_]{2,}/g) ?? [];
29227
29244
  const best = runs.sort((a, b) => b.length - a.length)[0];