@wrongstack/tools 0.317.2 → 0.319.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 (84) hide show
  1. package/dist/_util.d.ts +13 -0
  2. package/dist/audit.js +4 -4
  3. package/dist/bash.js +2 -2
  4. package/dist/builtin.js +38 -38
  5. package/dist/{chunk-TKA4VEX2.js → chunk-2472NT76.js} +2 -2
  6. package/dist/{chunk-UE3UBMCP.js → chunk-4Q7LFU4T.js} +3 -3
  7. package/dist/{chunk-RMB76PDS.js → chunk-65EMYN5G.js} +3 -3
  8. package/dist/{chunk-A6BRWIXN.js → chunk-6IEBD27U.js} +20 -5
  9. package/dist/{chunk-P7ZQ2FAJ.js → chunk-7WV3D4S3.js} +2 -2
  10. package/dist/{chunk-NKX4SJ5R.js → chunk-C3W3V54D.js} +4 -4
  11. package/dist/{chunk-RUOMW2I6.js → chunk-COUNXG4X.js} +3 -3
  12. package/dist/{chunk-VB3MJGCV.js → chunk-D4CXUZIF.js} +2 -2
  13. package/dist/{chunk-5WNDJHT6.js → chunk-DPKTXJQS.js} +2 -2
  14. package/dist/{chunk-ELFFQ4RU.js → chunk-DTQ75VBC.js} +2 -1
  15. package/dist/{chunk-EMRGN4KM.js → chunk-HBM4QNXU.js} +2 -2
  16. package/dist/{chunk-J5SKD6LN.js → chunk-HWDB2G7J.js} +2 -2
  17. package/dist/{chunk-ZLTFLC25.js → chunk-IIF5HIVF.js} +2 -2
  18. package/dist/{chunk-UKGMDCXT.js → chunk-KD5EHYA2.js} +2 -2
  19. package/dist/{chunk-A2PX7M7A.js → chunk-MRKWZCHZ.js} +3 -3
  20. package/dist/{chunk-BANPF4LY.js → chunk-MYRMD6PZ.js} +3 -3
  21. package/dist/{chunk-S2JRYDYG.js → chunk-N5O3FK5Q.js} +3 -3
  22. package/dist/{chunk-EEOFQDT6.js → chunk-OCUXN6Y3.js} +46 -2
  23. package/dist/{chunk-3QQSBUXR.js → chunk-ODFVG54U.js} +3 -3
  24. package/dist/{chunk-ICAXDRP6.js → chunk-OJ4FIBAN.js} +3 -3
  25. package/dist/{chunk-6RR5VX6U.js → chunk-OYVPBPCL.js} +3 -3
  26. package/dist/{chunk-WI3VDXHD.js → chunk-PMHVSHMU.js} +40 -10
  27. package/dist/{chunk-TDLZIDCY.js → chunk-PRXZOIEW.js} +3 -3
  28. package/dist/{chunk-D33S4RQG.js → chunk-QLF74MSV.js} +7 -1
  29. package/dist/{chunk-CVALEVGA.js → chunk-QZDOQRF7.js} +3 -3
  30. package/dist/{chunk-AK2K4KHR.js → chunk-RK47IWO3.js} +67 -68
  31. package/dist/{chunk-FYDKHXN7.js → chunk-SYXW3Y5Z.js} +2 -2
  32. package/dist/{chunk-TFEGJDH5.js → chunk-TFMVHYJI.js} +5 -4
  33. package/dist/{chunk-JJQB6R7Y.js → chunk-TX3R5NVV.js} +6 -6
  34. package/dist/{chunk-SOG7XIRF.js → chunk-UC3RKRIV.js} +2 -2
  35. package/dist/{chunk-ZE6KLBUO.js → chunk-UMXVT7ST.js} +2 -2
  36. package/dist/{chunk-XVGB6KYU.js → chunk-VALQFAY2.js} +109 -34
  37. package/dist/{chunk-4AEZIFOW.js → chunk-VFF3Q5Z3.js} +3 -3
  38. package/dist/{chunk-UOXX4SQZ.js → chunk-W4GAAI3M.js} +2 -2
  39. package/dist/{chunk-HTYEO67J.js → chunk-WNUJR3H4.js} +2 -2
  40. package/dist/{chunk-CPVLVQYT.js → chunk-Y7QXSE7N.js} +3 -3
  41. package/dist/{chunk-CPSAF2AU.js → chunk-YZHK4TLF.js} +2 -2
  42. package/dist/{chunk-MRZOVQ5D.js → chunk-Z4VBTVUM.js} +3 -3
  43. package/dist/{chunk-4E42D7UF.js → chunk-ZDUGI5BC.js} +2 -2
  44. package/dist/{chunk-WJYXMB2R.js → chunk-ZKSBHXVB.js} +3 -3
  45. package/dist/codebase-index/generic-parser.d.ts +8 -1
  46. package/dist/codebase-index/index.d.ts +1 -0
  47. package/dist/codebase-index/index.js +15 -10
  48. package/dist/codebase-index/parser-worker-script.js +3 -3
  49. package/dist/codebase-index/project-server.js +6 -6
  50. package/dist/codebase-index/worker.js +5 -5
  51. package/dist/codebase-index/writer-refs.d.ts +1 -1
  52. package/dist/diff.js +2 -2
  53. package/dist/document.js +2 -2
  54. package/dist/e2e.js +2 -2
  55. package/dist/edit.js +9 -9
  56. package/dist/exec.js +2 -2
  57. package/dist/fetch.js +2 -2
  58. package/dist/format.js +4 -4
  59. package/dist/{generic-parser-VUXDIAOZ.js → generic-parser-WFMIRHBX.js} +2 -2
  60. package/dist/git.js +2 -2
  61. package/dist/glob.js +3 -3
  62. package/dist/grep.js +3 -3
  63. package/dist/index.js +40 -40
  64. package/dist/install.js +4 -4
  65. package/dist/json.js +2 -2
  66. package/dist/languages/index.js +2 -2
  67. package/dist/{legacy-bridge-SFNXIRAP.js → legacy-bridge-EC7GM2IW.js} +4 -4
  68. package/dist/lint.js +4 -4
  69. package/dist/logs.js +2 -2
  70. package/dist/outdated.js +2 -2
  71. package/dist/pack.js +39 -39
  72. package/dist/{parser-dispatch-X62UWXJS.js → parser-dispatch-3PDBKIQ7.js} +4 -4
  73. package/dist/patch.js +9 -9
  74. package/dist/{py-parser-TDXSQZBC.js → py-parser-RFWG2HYI.js} +3 -3
  75. package/dist/read.js +9 -9
  76. package/dist/replace.js +9 -9
  77. package/dist/scaffold.js +2 -2
  78. package/dist/test.js +4 -4
  79. package/dist/tool-tier.js +40 -40
  80. package/dist/{tree-sitter-parser-AIERW3YI.js → tree-sitter-parser-FGKHJGSX.js} +2 -2
  81. package/dist/tree.js +2 -2
  82. package/dist/typecheck.js +4 -4
  83. package/dist/write.js +9 -9
  84. package/package.json +5 -5
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  normalizeCommandOutput,
6
6
  safeResolveReal
7
- } from "./chunk-D33S4RQG.js";
7
+ } from "./chunk-QLF74MSV.js";
8
8
 
9
9
  // src/languages/detect.ts
10
10
  import { createHash } from "node:crypto";
@@ -3515,4 +3515,4 @@ export {
3515
3515
  languagePackageTool,
3516
3516
  languageInfoTool
3517
3517
  };
3518
- //# sourceMappingURL=chunk-SOG7XIRF.js.map
3518
+ //# sourceMappingURL=chunk-UC3RKRIV.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  COMMAND_OUTPUT_MAX_BYTES,
3
3
  normalizeCommandOutput
4
- } from "./chunk-D33S4RQG.js";
4
+ } from "./chunk-QLF74MSV.js";
5
5
 
6
6
  // src/git.ts
7
7
  import { spawn } from "node:child_process";
@@ -313,4 +313,4 @@ function runGit(args, cwd, signal) {
313
313
  export {
314
314
  gitTool
315
315
  };
316
- //# sourceMappingURL=chunk-ZE6KLBUO.js.map
316
+ //# sourceMappingURL=chunk-UMXVT7ST.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  e2ePlanTool
3
- } from "./chunk-5WNDJHT6.js";
3
+ } from "./chunk-DPKTXJQS.js";
4
4
  import {
5
5
  codebaseAstReplaceTool,
6
6
  codebaseImpactAnalysisTool,
@@ -14,7 +14,7 @@ import {
14
14
  codebaseStatsTool,
15
15
  codebaseTargetedTestTool,
16
16
  deadCodeScanTool
17
- } from "./chunk-AK2K4KHR.js";
17
+ } from "./chunk-RK47IWO3.js";
18
18
  import {
19
19
  planTool
20
20
  } from "./chunk-H6AWAZ2Y.js";
@@ -38,73 +38,73 @@ import {
38
38
  } from "./chunk-6RNIFLG4.js";
39
39
  import {
40
40
  testTool
41
- } from "./chunk-CPVLVQYT.js";
41
+ } from "./chunk-Y7QXSE7N.js";
42
42
  import {
43
43
  installTool
44
- } from "./chunk-UE3UBMCP.js";
44
+ } from "./chunk-4Q7LFU4T.js";
45
45
  import {
46
46
  auditTool
47
- } from "./chunk-CVALEVGA.js";
47
+ } from "./chunk-QZDOQRF7.js";
48
48
  import {
49
49
  outdatedTool
50
- } from "./chunk-MRZOVQ5D.js";
50
+ } from "./chunk-Z4VBTVUM.js";
51
51
  import {
52
52
  logsTool
53
- } from "./chunk-CPSAF2AU.js";
53
+ } from "./chunk-YZHK4TLF.js";
54
54
  import {
55
55
  documentTool
56
- } from "./chunk-EMRGN4KM.js";
56
+ } from "./chunk-HBM4QNXU.js";
57
57
  import {
58
58
  scaffoldTool
59
- } from "./chunk-TKA4VEX2.js";
59
+ } from "./chunk-2472NT76.js";
60
60
  import {
61
61
  gitTool
62
- } from "./chunk-ZE6KLBUO.js";
62
+ } from "./chunk-UMXVT7ST.js";
63
63
  import {
64
64
  patchTool
65
- } from "./chunk-RUOMW2I6.js";
65
+ } from "./chunk-COUNXG4X.js";
66
66
  import {
67
67
  jsonTool
68
- } from "./chunk-VB3MJGCV.js";
68
+ } from "./chunk-D4CXUZIF.js";
69
69
  import {
70
70
  diffTool
71
- } from "./chunk-P7ZQ2FAJ.js";
71
+ } from "./chunk-7WV3D4S3.js";
72
72
  import {
73
73
  treeTool
74
- } from "./chunk-J5SKD6LN.js";
74
+ } from "./chunk-HWDB2G7J.js";
75
75
  import {
76
76
  lintTool
77
- } from "./chunk-WJYXMB2R.js";
77
+ } from "./chunk-ZKSBHXVB.js";
78
78
  import {
79
79
  formatTool
80
- } from "./chunk-3QQSBUXR.js";
80
+ } from "./chunk-ODFVG54U.js";
81
81
  import {
82
82
  typecheckTool
83
- } from "./chunk-4AEZIFOW.js";
83
+ } from "./chunk-VFF3Q5Z3.js";
84
84
  import {
85
85
  languageInfoTool,
86
86
  languagePackageTool,
87
87
  languageTool
88
- } from "./chunk-SOG7XIRF.js";
88
+ } from "./chunk-UC3RKRIV.js";
89
89
  import {
90
90
  replaceTool
91
- } from "./chunk-6RR5VX6U.js";
91
+ } from "./chunk-OYVPBPCL.js";
92
92
  import {
93
93
  globTool
94
- } from "./chunk-ICAXDRP6.js";
94
+ } from "./chunk-OJ4FIBAN.js";
95
95
  import {
96
96
  grepTool
97
- } from "./chunk-S2JRYDYG.js";
97
+ } from "./chunk-N5O3FK5Q.js";
98
98
  import {
99
99
  bashTool,
100
100
  checkAndBlockKillCommand,
101
101
  diagnoseBashism,
102
102
  shellArgs
103
- } from "./chunk-HTYEO67J.js";
103
+ } from "./chunk-WNUJR3H4.js";
104
104
  import {
105
105
  detectDanger,
106
106
  execTool
107
- } from "./chunk-WI3VDXHD.js";
107
+ } from "./chunk-PMHVSHMU.js";
108
108
  import {
109
109
  buildChildEnv
110
110
  } from "./chunk-BTSFTGIL.js";
@@ -118,7 +118,7 @@ import {
118
118
  } from "./chunk-3PVYQFRQ.js";
119
119
  import {
120
120
  fetchTool
121
- } from "./chunk-UKGMDCXT.js";
121
+ } from "./chunk-KD5EHYA2.js";
122
122
  import {
123
123
  searchTool
124
124
  } from "./chunk-PQTONQ4P.js";
@@ -133,20 +133,21 @@ import {
133
133
  } from "./chunk-45JPRMC2.js";
134
134
  import {
135
135
  readTool
136
- } from "./chunk-NKX4SJ5R.js";
136
+ } from "./chunk-C3W3V54D.js";
137
137
  import {
138
138
  writeTool
139
- } from "./chunk-BANPF4LY.js";
139
+ } from "./chunk-MYRMD6PZ.js";
140
140
  import {
141
141
  editTool
142
- } from "./chunk-TDLZIDCY.js";
142
+ } from "./chunk-PRXZOIEW.js";
143
143
  import {
144
144
  resolvePowerShell
145
145
  } from "./chunk-V43EQ6VR.js";
146
146
  import {
147
147
  normalizeCommandOutput,
148
+ safeResolveProjectPath,
148
149
  safeResolveReal
149
- } from "./chunk-D33S4RQG.js";
150
+ } from "./chunk-QLF74MSV.js";
150
151
 
151
152
  // src/clarify.ts
152
153
  import { toErrorMessage } from "@wrongstack/core/utils";
@@ -251,6 +252,75 @@ $ErrorActionPreference = 'Stop'
251
252
  ${command}
252
253
  if ($LASTEXITCODE -is [int]) { exit $LASTEXITCODE }`;
253
254
  }
255
+ function tokenizePwshCommand(command) {
256
+ const tokens = [];
257
+ let current = "";
258
+ const push = () => {
259
+ if (current !== "") {
260
+ tokens.push(current);
261
+ current = "";
262
+ }
263
+ };
264
+ for (let i = 0; i < command.length; i++) {
265
+ const ch = command.charAt(i);
266
+ if (ch === "`") {
267
+ const next = command.charAt(i + 1);
268
+ if (next !== "") {
269
+ current += next;
270
+ i++;
271
+ }
272
+ continue;
273
+ }
274
+ if (ch === "'" || ch === '"') {
275
+ const quote = ch;
276
+ i++;
277
+ while (i < command.length) {
278
+ const qch = command.charAt(i);
279
+ if (qch === quote) {
280
+ if (command.charAt(i + 1) === quote) {
281
+ current += quote;
282
+ i += 2;
283
+ continue;
284
+ }
285
+ break;
286
+ }
287
+ if (quote === '"' && qch === "`") {
288
+ const next = command.charAt(i + 1);
289
+ if (next !== "") {
290
+ current += next;
291
+ i += 2;
292
+ continue;
293
+ }
294
+ }
295
+ current += qch;
296
+ i++;
297
+ }
298
+ continue;
299
+ }
300
+ if (/\s/.test(ch)) {
301
+ push();
302
+ continue;
303
+ }
304
+ current += ch;
305
+ }
306
+ push();
307
+ return tokens;
308
+ }
309
+ var DANGER_LEVEL_RANK = {
310
+ safe: 0,
311
+ caution: 1,
312
+ destructive: 2
313
+ };
314
+ function mergeDanger(...assessments) {
315
+ const top = assessments.reduce(
316
+ (acc, cur) => DANGER_LEVEL_RANK[cur.level] > DANGER_LEVEL_RANK[acc.level] ? cur : acc
317
+ );
318
+ const reasons = [...new Set(assessments.flatMap((a) => a.reasons))];
319
+ if (top.level === "safe") return { level: "safe", reasons: [] };
320
+ const result = { level: top.level, reasons };
321
+ if (top.matchedRule !== void 0) result.matchedRule = top.matchedRule;
322
+ return result;
323
+ }
254
324
  var pwshTool = {
255
325
  name: "pwsh",
256
326
  category: "Shell",
@@ -539,10 +609,10 @@ Working directory: ${targetCwd}`,
539
609
  queue.push(c);
540
610
  }
541
611
  };
542
- const next = () => new Promise((resolve2) => {
612
+ const next = () => new Promise((resolve) => {
543
613
  const c = queue.shift();
544
- if (c) resolve2(c);
545
- else resolveNext = resolve2;
614
+ if (c) resolve(c);
615
+ else resolveNext = resolve;
546
616
  });
547
617
  let buf = "";
548
618
  let pending = "";
@@ -624,7 +694,12 @@ Working directory: ${targetCwd}`,
624
694
  }
625
695
  }
626
696
  const hint = !timedOut && typeof c.code === "number" && c.code !== 0 ? diagnoseBashism(input.command, "pwsh") : void 0;
627
- const danger = detectDanger("pwsh", [input.command]);
697
+ const tokens = tokenizePwshCommand(input.command);
698
+ const danger = mergeDanger(
699
+ detectDanger("pwsh", tokens),
700
+ detectDanger(tokens[0] ?? "pwsh", tokens.slice(1)),
701
+ detectDanger("pwsh", [input.command])
702
+ );
628
703
  const cautionText = danger.level === "caution" && danger.reasons.length > 0 ? `
629
704
  [caution: ${danger.reasons.join("; ")}]` : "";
630
705
  const finalResultText = formattedOutput + (spooled ? spoolNote(spooled) : "") + (hint ? `
@@ -830,7 +905,7 @@ var securityAstScanTool = {
830
905
  let targetFile = input.file ?? "inline-code.ts";
831
906
  let content = input.content;
832
907
  if (!content && input.file) {
833
- const absPath = path.isAbsolute(input.file) ? input.file : path.resolve(projectRoot, input.file);
908
+ const absPath = await safeResolveProjectPath(input.file, ctx);
834
909
  targetFile = path.relative(projectRoot, absPath).replace(/\\/g, "/");
835
910
  content = await fs.readFile(absPath, "utf8");
836
911
  }
@@ -1089,4 +1164,4 @@ export {
1089
1164
  TIER3_TOOLS,
1090
1165
  builtinTools
1091
1166
  };
1092
- //# sourceMappingURL=chunk-XVGB6KYU.js.map
1167
+ //# sourceMappingURL=chunk-VALQFAY2.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tryLegacyCodeOperation
3
- } from "./chunk-4E42D7UF.js";
3
+ } from "./chunk-ZDUGI5BC.js";
4
4
  import {
5
5
  spawnStream
6
6
  } from "./chunk-ZHH3BEWU.js";
@@ -8,7 +8,7 @@ import {
8
8
  detectPackageManager,
9
9
  normalizeCommandOutput,
10
10
  safeResolveReal
11
- } from "./chunk-D33S4RQG.js";
11
+ } from "./chunk-QLF74MSV.js";
12
12
 
13
13
  // src/typecheck.ts
14
14
  import * as path from "node:path";
@@ -135,4 +135,4 @@ async function findTsConfig(cwd) {
135
135
  export {
136
136
  typecheckTool
137
137
  };
138
- //# sourceMappingURL=chunk-4AEZIFOW.js.map
138
+ //# sourceMappingURL=chunk-VFF3Q5Z3.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveIndexDir
3
- } from "./chunk-TFEGJDH5.js";
3
+ } from "./chunk-TFMVHYJI.js";
4
4
 
5
5
  // src/codebase-index/binary-frame.ts
6
6
  import { decode, encode } from "@msgpack/msgpack";
@@ -120,4 +120,4 @@ export {
120
120
  PROJECT_INDEX_SERVER_MAX_FRAME_CHARS,
121
121
  encodeProjectServerMessage
122
122
  };
123
- //# sourceMappingURL=chunk-UOXX4SQZ.js.map
123
+ //# sourceMappingURL=chunk-W4GAAI3M.js.map
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-V43EQ6VR.js";
18
18
  import {
19
19
  normalizeCommandOutput
20
- } from "./chunk-D33S4RQG.js";
20
+ } from "./chunk-QLF74MSV.js";
21
21
 
22
22
  // src/bash.ts
23
23
  import { spawn } from "node:child_process";
@@ -953,4 +953,4 @@ export {
953
953
  checkAndBlockKillCommand,
954
954
  bashTool
955
955
  };
956
- //# sourceMappingURL=chunk-HTYEO67J.js.map
956
+ //# sourceMappingURL=chunk-WNUJR3H4.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  tryLegacyCodeOperation
3
- } from "./chunk-4E42D7UF.js";
3
+ } from "./chunk-ZDUGI5BC.js";
4
4
  import {
5
5
  spawnStream
6
6
  } from "./chunk-ZHH3BEWU.js";
7
7
  import {
8
8
  normalizeCommandOutput,
9
9
  safeResolveReal
10
- } from "./chunk-D33S4RQG.js";
10
+ } from "./chunk-QLF74MSV.js";
11
11
 
12
12
  // src/test.ts
13
13
  import * as path from "node:path";
@@ -197,4 +197,4 @@ function parseResult(runner, result, duration) {
197
197
  export {
198
198
  testTool
199
199
  };
200
- //# sourceMappingURL=chunk-CPVLVQYT.js.map
200
+ //# sourceMappingURL=chunk-Y7QXSE7N.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-Q5JPPCZC.js";
4
4
  import {
5
5
  safeResolveReal
6
- } from "./chunk-D33S4RQG.js";
6
+ } from "./chunk-QLF74MSV.js";
7
7
 
8
8
  // src/logs.ts
9
9
  import { spawn } from "node:child_process";
@@ -229,4 +229,4 @@ function parseLine(line) {
229
229
  export {
230
230
  logsTool
231
231
  };
232
- //# sourceMappingURL=chunk-CPSAF2AU.js.map
232
+ //# sourceMappingURL=chunk-YZHK4TLF.js.map
@@ -7,7 +7,7 @@ import {
7
7
  detectPackageManager,
8
8
  normalizeCommandOutput,
9
9
  safeResolveReal
10
- } from "./chunk-D33S4RQG.js";
10
+ } from "./chunk-QLF74MSV.js";
11
11
 
12
12
  // src/outdated.ts
13
13
  import { spawn } from "node:child_process";
@@ -53,7 +53,7 @@ var outdatedTool = {
53
53
  const manager = await detectPackageManager(cwd, ctx.projectRoot);
54
54
  if (manager === "npm") {
55
55
  try {
56
- const { detectNonJsEcosystem } = await import("./legacy-bridge-SFNXIRAP.js");
56
+ const { detectNonJsEcosystem } = await import("./legacy-bridge-EC7GM2IW.js");
57
57
  const nonJs = await detectNonJsEcosystem(cwd, ctx.projectRoot);
58
58
  if (nonJs) {
59
59
  const { planLanguageOperation, executePackagePlan } = await import("./languages/index.js");
@@ -195,4 +195,4 @@ Note: exit code 1 from \`outdated\` means outdated packages were found (expected
195
195
  export {
196
196
  outdatedTool
197
197
  };
198
- //# sourceMappingURL=chunk-MRZOVQ5D.js.map
198
+ //# sourceMappingURL=chunk-Z4VBTVUM.js.map
@@ -2,7 +2,7 @@ import {
2
2
  executeLanguagePlan,
3
3
  executePackagePlan,
4
4
  planLanguageOperation
5
- } from "./chunk-SOG7XIRF.js";
5
+ } from "./chunk-UC3RKRIV.js";
6
6
 
7
7
  // src/languages/legacy-bridge.ts
8
8
  import * as fs from "node:fs/promises";
@@ -98,4 +98,4 @@ export {
98
98
  tryLegacyCodeOperation,
99
99
  tryLegacyPackageOperation
100
100
  };
101
- //# sourceMappingURL=chunk-4E42D7UF.js.map
101
+ //# sourceMappingURL=chunk-ZDUGI5BC.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  tryLegacyCodeOperation
3
- } from "./chunk-4E42D7UF.js";
3
+ } from "./chunk-ZDUGI5BC.js";
4
4
  import {
5
5
  spawnStream
6
6
  } from "./chunk-ZHH3BEWU.js";
7
7
  import {
8
8
  normalizeCommandOutput,
9
9
  safeResolveReal
10
- } from "./chunk-D33S4RQG.js";
10
+ } from "./chunk-QLF74MSV.js";
11
11
 
12
12
  // src/lint.ts
13
13
  var lintTool = {
@@ -132,4 +132,4 @@ async function detectLinter(cwd) {
132
132
  export {
133
133
  lintTool
134
134
  };
135
- //# sourceMappingURL=chunk-WJYXMB2R.js.map
135
+ //# sourceMappingURL=chunk-ZKSBHXVB.js.map
@@ -12,7 +12,14 @@
12
12
  import type { FileSymbols, SymbolLang } from './schema.js';
13
13
  /** Soft default: enough for normal sources without runaway regex on minified blobs. */
14
14
  export declare const GENERIC_MAX_SYMBOLS_DEFAULT = 500;
15
- /** Only the leading window is scanned — huge generated files stay cheap. */
15
+ /**
16
+ * Only the leading window is scanned — huge generated files stay cheap.
17
+ * H-10 (security report VF-11): lowered from 512 KB. The fallback regex
18
+ * extractor is a last resort (tree-sitter missing/failed), and a whitespace
19
+ * bomb under the old window needed only ~500 bytes to stall the indexer for
20
+ * seconds — the remaining risk scales with window size, so the window itself
21
+ * is bounded well below real source-file sizes.
22
+ */
16
23
  export declare const GENERIC_MAX_FILE_CHARS: number;
17
24
  /**
18
25
  * Extract symbols with language-tuned regexes. Never throws.
@@ -35,6 +35,7 @@ export { extractDirectorySkeleton, extractFileSkeleton, type FileSkeletonResult,
35
35
  export { deadCodeScanTool, runDeadCodeScan } from './dead-code-scan.js';
36
36
  export type { DeadCodeScanInput, DeadCodeScanOutput, DeadFile, DeadPackage, DeadSymbol, } from './dead-code-scan.js';
37
37
  export { runIndexer } from './indexer.js';
38
+ export { compileGitignore, loadGitignoreMatcher, type IgnoreMatcher, } from './gitignore.js';
38
39
  export { detectLang, INDEXABLE_EXTENSIONS, isIndexablePath } from './languages.js';
39
40
  export { internalKindToLspKind, lspKindToInternalKind, } from './lsp-kind.js';
40
41
  export type { ProjectIndexServerClientHealth, ProjectIndexServerConnectionState, ProjectIndexServerConnectionStatus, } from './project-server-client.js';
@@ -18,8 +18,8 @@ import {
18
18
  polyglotInvariantEngine,
19
19
  replaceSymbolInFile,
20
20
  runDeadCodeScan
21
- } from "../chunk-AK2K4KHR.js";
22
- import "../chunk-EEOFQDT6.js";
21
+ } from "../chunk-RK47IWO3.js";
22
+ import "../chunk-OCUXN6Y3.js";
23
23
  import "../chunk-ZHH3BEWU.js";
24
24
  import "../chunk-2VSZC6QM.js";
25
25
  import "../chunk-3PVYQFRQ.js";
@@ -45,11 +45,11 @@ import {
45
45
  shutdownCodebaseIndexHost,
46
46
  shutdownCodebaseIndexServer,
47
47
  symbolGraphService
48
- } from "../chunk-A2PX7M7A.js";
48
+ } from "../chunk-MRKWZCHZ.js";
49
49
  import {
50
50
  projectIndexServerEndpoint,
51
51
  projectIndexServerMetadataPath
52
- } from "../chunk-UOXX4SQZ.js";
52
+ } from "../chunk-W4GAAI3M.js";
53
53
  import {
54
54
  CircuitOpenError,
55
55
  IndexCircuitBreaker,
@@ -66,19 +66,22 @@ import {
66
66
  resolveIndexDir,
67
67
  runIndexer,
68
68
  tokenise
69
- } from "../chunk-TFEGJDH5.js";
70
- import "../chunk-JJQB6R7Y.js";
71
- import "../chunk-ZLTFLC25.js";
72
- import "../chunk-A6BRWIXN.js";
69
+ } from "../chunk-TFMVHYJI.js";
70
+ import "../chunk-TX3R5NVV.js";
71
+ import "../chunk-IIF5HIVF.js";
72
+ import "../chunk-6IEBD27U.js";
73
73
  import "../chunk-UCYQTZ7F.js";
74
74
  import {
75
75
  INDEXABLE_EXTENSIONS,
76
76
  detectLang,
77
77
  isIndexablePath
78
78
  } from "../chunk-YOHO4DVT.js";
79
- import "../chunk-ELFFQ4RU.js";
79
+ import {
80
+ compileGitignore,
81
+ loadGitignoreMatcher
82
+ } from "../chunk-DTQ75VBC.js";
80
83
  import "../chunk-V43EQ6VR.js";
81
- import "../chunk-D33S4RQG.js";
84
+ import "../chunk-QLF74MSV.js";
82
85
  export {
83
86
  CircuitOpenError,
84
87
  INDEXABLE_EXTENSIONS,
@@ -104,6 +107,7 @@ export {
104
107
  codebaseSkeletonTool,
105
108
  codebaseStatsTool,
106
109
  codebaseTargetedTestTool,
110
+ compileGitignore,
107
111
  deadCodeScanTool,
108
112
  detectLang,
109
113
  enqueueReindex,
@@ -120,6 +124,7 @@ export {
120
124
  isIndexableFile,
121
125
  isIndexablePath,
122
126
  isIndexing,
127
+ loadGitignoreMatcher,
123
128
  lspKindToInternalKind,
124
129
  onIndexStateChange,
125
130
  outgoingCallsService,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  parseFilesContent
3
- } from "../chunk-JJQB6R7Y.js";
4
- import "../chunk-ZLTFLC25.js";
5
- import "../chunk-A6BRWIXN.js";
3
+ } from "../chunk-TX3R5NVV.js";
4
+ import "../chunk-IIF5HIVF.js";
5
+ import "../chunk-6IEBD27U.js";
6
6
  import "../chunk-UCYQTZ7F.js";
7
7
  import "../chunk-YOHO4DVT.js";
8
8
  import "../chunk-V43EQ6VR.js";
@@ -10,7 +10,7 @@ import {
10
10
  projectIndexServerBuildId,
11
11
  projectIndexServerEndpoint,
12
12
  projectIndexServerMetadataPath
13
- } from "../chunk-UOXX4SQZ.js";
13
+ } from "../chunk-W4GAAI3M.js";
14
14
  import {
15
15
  fileGraphService,
16
16
  incomingCallsService,
@@ -22,15 +22,15 @@ import {
22
22
  searchService,
23
23
  statsService,
24
24
  symbolGraphService
25
- } from "../chunk-TFEGJDH5.js";
26
- import "../chunk-JJQB6R7Y.js";
27
- import "../chunk-ZLTFLC25.js";
28
- import "../chunk-A6BRWIXN.js";
25
+ } from "../chunk-TFMVHYJI.js";
26
+ import "../chunk-TX3R5NVV.js";
27
+ import "../chunk-IIF5HIVF.js";
28
+ import "../chunk-6IEBD27U.js";
29
29
  import "../chunk-UCYQTZ7F.js";
30
30
  import {
31
31
  isIndexablePath
32
32
  } from "../chunk-YOHO4DVT.js";
33
- import "../chunk-ELFFQ4RU.js";
33
+ import "../chunk-DTQ75VBC.js";
34
34
  import "../chunk-V43EQ6VR.js";
35
35
 
36
36
  // src/codebase-index/project-server.ts
@@ -7,13 +7,13 @@ import {
7
7
  searchService,
8
8
  statsService,
9
9
  symbolGraphService
10
- } from "../chunk-TFEGJDH5.js";
11
- import "../chunk-JJQB6R7Y.js";
12
- import "../chunk-ZLTFLC25.js";
13
- import "../chunk-A6BRWIXN.js";
10
+ } from "../chunk-TFMVHYJI.js";
11
+ import "../chunk-TX3R5NVV.js";
12
+ import "../chunk-IIF5HIVF.js";
13
+ import "../chunk-6IEBD27U.js";
14
14
  import "../chunk-UCYQTZ7F.js";
15
15
  import "../chunk-YOHO4DVT.js";
16
- import "../chunk-ELFFQ4RU.js";
16
+ import "../chunk-DTQ75VBC.js";
17
17
  import "../chunk-V43EQ6VR.js";
18
18
 
19
19
  // src/codebase-index/worker.ts
@@ -1,4 +1,4 @@
1
- export declare const FAMILY_MATCH_SQL = "(\n sym.lang = refs.lang\n OR EXISTS (\n SELECT 1 FROM lang_family lf1\n JOIN lang_family lf2 ON lf1.family = lf2.family\n WHERE lf1.lang = sym.lang AND lf2.lang = refs.lang\n )\n OR ? IN (\n SELECT family FROM lang_family WHERE lang = refs.lang\n )\n)";
1
+ export declare const FAMILY_MATCH_SQL = "(\n sym.lang = refs.lang\n OR refs.lang = ''\n OR EXISTS (\n SELECT 1 FROM lang_family lf1\n JOIN lang_family lf2 ON lf1.family = lf2.family\n WHERE lf1.lang = sym.lang AND lf2.lang = refs.lang\n )\n OR ? IN (\n SELECT family FROM lang_family WHERE lang = refs.lang\n )\n)";
2
2
  export declare function getNamespaceDeclarationsWithStatement(stmtFn: (sql: string) => {
3
3
  all: () => unknown[];
4
4
  }): Array<{
package/dist/diff.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  diffTool
3
- } from "./chunk-P7ZQ2FAJ.js";
4
- import "./chunk-D33S4RQG.js";
3
+ } from "./chunk-7WV3D4S3.js";
4
+ import "./chunk-QLF74MSV.js";
5
5
  export {
6
6
  diffTool
7
7
  };
package/dist/document.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  documentTool
3
- } from "./chunk-EMRGN4KM.js";
4
- import "./chunk-D33S4RQG.js";
3
+ } from "./chunk-HBM4QNXU.js";
4
+ import "./chunk-QLF74MSV.js";
5
5
  export {
6
6
  documentTool
7
7
  };
package/dist/e2e.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  discoverE2EProjects,
3
3
  e2ePlanTool
4
- } from "./chunk-5WNDJHT6.js";
5
- import "./chunk-D33S4RQG.js";
4
+ } from "./chunk-DPKTXJQS.js";
5
+ import "./chunk-QLF74MSV.js";
6
6
  export {
7
7
  discoverE2EProjects,
8
8
  e2ePlanTool