pi-lens 4.4.7 → 4.4.9
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/CHANGELOG-USER.md +31 -0
- package/CHANGELOG.md +327 -0
- package/README.md +13 -2
- package/config/dependency-cruiser-eager-allowlist.json +1 -1
- package/config/markdownlint/run-no-fix.mjs +36 -0
- package/dist/{chunk-4LM3VAZH.js → chunk-2VZ3VN3N.js} +2 -2
- package/dist/{chunk-PUZ3E2J4.js → chunk-3HTZDY3C.js} +8 -6
- package/dist/{chunk-RORGS5II.js → chunk-3NPWO5UO.js} +7 -13
- package/dist/{chunk-MNJIXFX4.js → chunk-47UCC4MM.js} +1 -1
- package/dist/chunk-4ENEJHF4.js +198 -0
- package/dist/chunk-5GEYJJHG.js +22 -0
- package/dist/{chunk-U6VN4NVL.js → chunk-5YSEQHJN.js} +3 -3
- package/dist/{chunk-6IR3ZYIB.js → chunk-6GPB3JLL.js} +3 -3
- package/dist/{chunk-MB6PXBUA.js → chunk-7R5GZIA6.js} +7 -15
- package/dist/{chunk-DH5JPM3K.js → chunk-7UTSNTWM.js} +10 -9
- package/dist/{chunk-24BILSZW.js → chunk-7YTRG6YW.js} +2 -2
- package/dist/{chunk-KW5JQPO5.js → chunk-AACN5GNE.js} +2 -2
- package/dist/{chunk-PKES3ISE.js → chunk-ACRJ2GZ5.js} +2 -2
- package/dist/{chunk-4ZYJHQMB.js → chunk-C3YRO3EU.js} +10 -12
- package/dist/{chunk-PQJFG24Z.js → chunk-CB7PEVOJ.js} +1300 -946
- package/dist/{chunk-ABPKUVA4.js → chunk-CDFJF5YD.js} +1 -1
- package/dist/{chunk-T7A2HK2B.js → chunk-CJS6WE66.js} +17 -18
- package/dist/{chunk-3YY7IXIL.js → chunk-CM6BDY4E.js} +14 -60
- package/dist/{chunk-RZOXUSPC.js → chunk-CZCAZVTD.js} +16 -2
- package/dist/chunk-DGKFWQK4.js +23 -0
- package/dist/{chunk-NA7SEXHE.js → chunk-E65WJVI5.js} +7 -9
- package/dist/{chunk-2TF6RXWB.js → chunk-EKNYSXFB.js} +8 -10
- package/dist/{chunk-RRV3FNNM.js → chunk-EY6LY2HO.js} +27 -30
- package/dist/{chunk-LBLBAFG3.js → chunk-F6BEQWAK.js} +17 -5
- package/dist/{chunk-4L36HG27.js → chunk-FGNSESAC.js} +12 -14
- package/dist/{chunk-3FRLWYBG.js → chunk-FRUBVFXV.js} +39 -42
- package/dist/{chunk-FB5SCCPT.js → chunk-G22UNQID.js} +14 -15
- package/dist/{chunk-LV4UMYVH.js → chunk-GQTQUNCG.js} +26 -27
- package/dist/{chunk-E7HJ56Y7.js → chunk-H3BVMK47.js} +64 -73
- package/dist/chunk-H6FLQ5NW.js +28 -0
- package/dist/{chunk-QHSNL7B2.js → chunk-HEA3EM23.js} +15 -19
- package/dist/{chunk-AWDSEDER.js → chunk-HSOBIN22.js} +2 -2
- package/dist/{chunk-EAOK7MIZ.js → chunk-HYSKJMZK.js} +17 -4
- package/dist/{chunk-VUZWQ7UG.js → chunk-IICERRFF.js} +46 -72
- package/dist/{chunk-OXOI55RU.js → chunk-IILEH3ZC.js} +8 -10
- package/dist/{chunk-ZKXQKGWZ.js → chunk-J3Q2NYJR.js} +4 -3
- package/dist/{chunk-YHC2O2WO.js → chunk-JUZ67QZQ.js} +20 -9
- package/dist/chunk-KR5VGMVT.js +25 -0
- package/dist/{chunk-F7K5IBZG.js → chunk-KV6GQOGN.js} +41 -44
- package/dist/{chunk-SNDXCFRS.js → chunk-KXMJLOZF.js} +25 -23
- package/dist/{chunk-CB4WHS4H.js → chunk-L4Y3ROKQ.js} +3 -3
- package/dist/{chunk-3F6BMY53.js → chunk-L6WBJGQS.js} +1 -1
- package/dist/{chunk-MPKRJBPK.js → chunk-L7O774U7.js} +30 -32
- package/dist/{chunk-URCQWAQ4.js → chunk-LAHHGNAY.js} +21 -21
- package/dist/{chunk-V63BC55Q.js → chunk-LT62P654.js} +1 -1
- package/dist/{chunk-ZMAUPOMG.js → chunk-LWOM6LVS.js} +34 -34
- package/dist/{chunk-HO6LWE2E.js → chunk-MKPDIAZH.js} +21 -1
- package/dist/{chunk-2PHMIAKO.js → chunk-MN635QYA.js} +3 -4
- package/dist/{chunk-KDX35VXP.js → chunk-MQ4PPCJB.js} +166 -149
- package/dist/{chunk-QOE342SU.js → chunk-MRLH4MYU.js} +2 -2
- package/dist/{chunk-CE6VMBCB.js → chunk-N56BNAA6.js} +20 -21
- package/dist/{chunk-L3CMBQMH.js → chunk-N5CEGQPG.js} +14 -17
- package/dist/{chunk-7E2563GA.js → chunk-NCLO6E6N.js} +13 -33
- package/dist/{chunk-J6JP25XU.js → chunk-NL5LSKVD.js} +4 -3
- package/dist/{chunk-U7BD2QL7.js → chunk-NMUSOZ2D.js} +10 -12
- package/dist/{chunk-BZARLRJW.js → chunk-NOWH2VA2.js} +8 -33
- package/dist/{chunk-U2SDMG7C.js → chunk-NUSXS6YB.js} +6 -5
- package/dist/{chunk-ZJTT47IG.js → chunk-OSEKJEUU.js} +2 -2
- package/dist/{chunk-FZKFVUEC.js → chunk-OUYAUXAT.js} +647 -355
- package/dist/{chunk-ZE3KXHS7.js → chunk-PBZNYHMM.js} +84 -4
- package/dist/{chunk-U5HPROLA.js → chunk-PIIUNJIT.js} +2 -4
- package/dist/chunk-PKLB2XJL.js +8 -0
- package/dist/{chunk-RC2Z6K47.js → chunk-PRHYIA6X.js} +15 -6
- package/dist/{chunk-RQS4QQSD.js → chunk-PXQ45SGD.js} +2 -2
- package/dist/chunk-Q6JQKWPK.js +25 -0
- package/dist/{chunk-F6X3YJWD.js → chunk-QB7T2PHK.js} +2 -2
- package/dist/{chunk-TIQJPRDD.js → chunk-QGITU23N.js} +3 -2
- package/dist/chunk-QJJKOHLH.js +57 -0
- package/dist/{chunk-4LOE5R5P.js → chunk-QP33NKYC.js} +18 -15
- package/dist/{chunk-N5WSK2K7.js → chunk-QVBOXT3L.js} +12 -17
- package/dist/{chunk-DPGEAHZT.js → chunk-RNJFRXEN.js} +10 -18
- package/dist/{chunk-EKWX4WD3.js → chunk-RNXOWDM6.js} +10 -10
- package/dist/{chunk-O4BJFESU.js → chunk-RTFMDIKV.js} +1 -1
- package/dist/{chunk-LS3QJRUB.js → chunk-SIQHOB6P.js} +11 -13
- package/dist/{chunk-3K2F6UDZ.js → chunk-SLSMJPEF.js} +43 -42
- package/dist/chunk-T5QSLSMM.js +50 -0
- package/dist/chunk-TGQDAG4B.js +88 -0
- package/dist/{chunk-4YHYPW2G.js → chunk-THYHUIDR.js} +44 -13
- package/dist/{chunk-YVHBNSME.js → chunk-TMNUTMT5.js} +1099 -1100
- package/dist/{chunk-WDBICWH3.js → chunk-TOE2RRCS.js} +1 -1
- package/dist/chunk-TYHPVE5H.js +25 -0
- package/dist/chunk-UAKO2M6B.js +73 -0
- package/dist/chunk-UC5AXW5Z.js +20 -0
- package/dist/chunk-UTJP6WOS.js +28 -0
- package/dist/{chunk-DQZFQSR5.js → chunk-UXTQ3QPD.js} +4 -4
- package/dist/chunk-UYXV5NIS.js +20 -0
- package/dist/{chunk-KKCK636N.js → chunk-V2WDBOLZ.js} +10 -12
- package/dist/{chunk-PR6PO3ES.js → chunk-V67D6TMU.js} +22 -20
- package/dist/{chunk-VSFLRN5Y.js → chunk-VCRVNLE7.js} +135 -2
- package/dist/{chunk-CPSR3AVL.js → chunk-VO4JFPTV.js} +2 -2
- package/dist/{chunk-XT2HTCJ5.js → chunk-VWLSU3XV.js} +6 -5
- package/dist/{chunk-WME2OQST.js → chunk-W5E72HJA.js} +66 -24
- package/dist/{chunk-LLS45EWB.js → chunk-W7TY6HYX.js} +6 -8
- package/dist/{chunk-CCV2EU7T.js → chunk-WSSLVMDA.js} +12 -13
- package/dist/{chunk-YISME6ON.js → chunk-WTB4GKMH.js} +10 -1
- package/dist/{chunk-KPPJTH44.js → chunk-X5BJ3G2P.js} +64 -35
- package/dist/{chunk-JMEKXFOL.js → chunk-XKFO2SZV.js} +39 -34
- package/dist/{chunk-HR3OJ3TH.js → chunk-XLAI7UYY.js} +84 -31
- package/dist/{chunk-H7OR7DFZ.js → chunk-XO756WE5.js} +53 -37
- package/dist/{chunk-F5Z6URKM.js → chunk-XVB3Q2PG.js} +2 -4
- package/dist/{chunk-R5MOQM2H.js → chunk-YOXCCJDF.js} +607 -366
- package/dist/{chunk-ZGSJDWQU.js → chunk-ZCQBNPRH.js} +2 -2
- package/dist/chunk-ZD4KVFXI.js +234 -0
- package/dist/{chunk-WGRJOXED.js → chunk-ZDMFGACN.js} +1295 -966
- package/dist/{chunk-OSTKYB55.js → chunk-ZMMHHXSW.js} +1 -1
- package/dist/{chunk-75GAYVNO.js → chunk-ZPM7ZIFL.js} +6 -6
- package/dist/{chunk-LUBPZN36.js → chunk-ZVCDHYWZ.js} +9 -11
- package/dist/{chunk-Y7F7IEE3.js → chunk-ZZN74OGD.js} +102 -7
- package/dist/{chunk-L5JYIU47.js → chunk-ZZSJAR76.js} +39 -20
- package/dist/index.js +10933 -8644
- package/dist/mcp/analyze-cli.js +12 -17
- package/dist/mcp/cli.js +43 -42
- package/dist/mcp/server.js +3073 -1147
- package/dist/mcp/worker.js +61 -61
- package/dist/probes/installer.js +18 -19
- package/docs/adr/0003-git-guard-latch-writer.md +11 -6
- package/docs/agent-tools.md +58 -16
- package/docs/alignment-families.md +29 -0
- package/docs/analysisall.md +1 -1
- package/docs/ast-grep_rules_catalog.md +6 -4
- package/docs/ci-bot-pr-checks.md +128 -0
- package/docs/configuration.md +150 -12
- package/docs/defect-shapes.md +107 -15
- package/docs/engineering-principles.md +27 -2
- package/docs/environment-variables.md +18 -1
- package/docs/features.md +14 -7
- package/docs/globalconfig.md +11 -3
- package/docs/invariants/git-guard-host.md +7 -3
- package/docs/invariants/language-config.md +15 -4
- package/docs/invariants/lsp-trust-exec.md +25 -4
- package/docs/invariants/paths-os.md +4 -2
- package/docs/invariants/session-telemetry.md +2 -2
- package/docs/language-coverage.md +1 -0
- package/docs/lsp-capability-matrix.md +167 -65
- package/docs/lsp-idle-eviction.md +4 -1
- package/docs/merge-queue-rollout.md +10 -8
- package/docs/module-report-read-symbol.md +34 -23
- package/docs/pi-lens-fixer.md +34 -17
- package/docs/pi-lens-investigator.md +3 -0
- package/docs/pi-lens-merge-policy.md +34 -17
- package/docs/pi-lens-monitor.md +9 -0
- package/docs/pi-lens-orchestration.md +4 -1
- package/docs/pi-lens-reviewer.md +6 -6
- package/docs/pi-lens-subagent.md +19 -3
- package/docs/public-api-stability.md +57 -7
- package/docs/release-qa-baseline.md +7 -4
- package/docs/schema/pi-lens-config-v1.json +21 -2
- package/docs/servercapabilities.md +3 -1
- package/docs/settings.md +11 -7
- package/docs/word-index.md +20 -7
- package/package.json +11 -4
- package/rules/ast-grep-rules/rule-tests/no-accumulating-spread-js-test.yml +37 -0
- package/rules/ast-grep-rules/rule-tests/ts-redundant-filter-map-test.yml +12 -1
- package/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-js-test.yml +12 -0
- package/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-test.yml +25 -0
- package/rules/ast-grep-rules/rules/no-accumulating-spread-js.yml +49 -1
- package/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +1 -2
- package/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +1 -2
- package/rules/ast-grep-rules/rules/ts-redundant-filter-map.yml +9 -1
- package/rules/ast-grep-rules/rules-disabled/filter-then-map-js.yml +17 -0
- package/rules/ast-grep-rules/rules-disabled/filter-then-map.yml +36 -0
- package/rules/ast-grep-rules/self-scan-baseline.json +1 -1
- package/scripts/download-grammars.js +3 -2
- package/skills/pi-lens-lsp-navigation/SKILL.md +5 -1
- package/dist/chunk-46TNM7XZ.js +0 -88
- package/dist/chunk-72OKUXSD.js +0 -31
- package/dist/chunk-7GLOLOSH.js +0 -57
- package/dist/chunk-AKUUMGD5.js +0 -26
- package/dist/chunk-ASUXV767.js +0 -22
- package/dist/chunk-CTADOKYM.js +0 -25
- package/dist/chunk-GNSIWBAT.js +0 -106
- package/dist/chunk-HWDAVBFU.js +0 -49
- package/dist/chunk-JJ2RRESP.js +0 -58
- package/dist/chunk-KXF5R4UN.js +0 -48
- package/dist/chunk-LSC3VADM.js +0 -23
- package/dist/chunk-OE5ZBP7F.js +0 -443
- package/dist/chunk-SHLDT3OI.js +0 -27
- package/dist/chunk-UF7RTZSO.js +0 -27
- package/dist/chunk-W4WP2ERB.js +0 -30
- package/dist/chunk-YES5CACN.js +0 -73
- package/dist/chunk-Z2XAOKHK.js +0 -136
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
scannerReportParentDir
|
|
4
|
-
} from "./chunk-V63BC55Q.js";
|
|
5
2
|
import {
|
|
6
3
|
getSecretsLaneAllowlistPaths,
|
|
7
4
|
isUnderSecretsLaneScratchTree,
|
|
8
5
|
nestedWorktreeOffsets
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VO4JFPTV.js";
|
|
10
7
|
import {
|
|
11
8
|
SecurityScanClient
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PBZNYHMM.js";
|
|
13
10
|
import {
|
|
14
11
|
collectTrackedFiles,
|
|
15
12
|
collectUntrackedIgnoredIds,
|
|
16
13
|
safeSpawnAsync
|
|
17
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TMNUTMT5.js";
|
|
18
15
|
import {
|
|
19
16
|
escapeRegExp
|
|
20
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-W5E72HJA.js";
|
|
21
18
|
import {
|
|
22
19
|
normalizeEphemeralMapKey,
|
|
23
|
-
normalizeMapKey
|
|
24
|
-
|
|
20
|
+
normalizeMapKey,
|
|
21
|
+
relativeInside,
|
|
22
|
+
walkUpDirs
|
|
23
|
+
} from "./chunk-CB7PEVOJ.js";
|
|
25
24
|
|
|
26
25
|
// dist/clients/gitleaks-client.js
|
|
27
26
|
import * as fs from "node:fs";
|
|
28
27
|
import * as path from "node:path";
|
|
29
|
-
import { mkdtempSync } from "node:fs";
|
|
30
28
|
var EMPTY_RESULT = {
|
|
31
29
|
success: false,
|
|
32
30
|
findings: []
|
|
@@ -184,84 +182,60 @@ var GitleaksClient = class _GitleaksClient extends SecurityScanClient {
|
|
|
184
182
|
}
|
|
185
183
|
return this.dedupeScan(targetDir, () => this.runScan(targetDir));
|
|
186
184
|
}
|
|
187
|
-
|
|
188
|
-
const scannedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
185
|
+
runScan(cwd) {
|
|
189
186
|
const bin = this.binaryPath ?? "gitleaks";
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
if (!fs.existsSync(reportPath)) {
|
|
187
|
+
return this.runReportScan({
|
|
188
|
+
spawn: ({ outDir, reportPath }) => {
|
|
189
|
+
const configPath = writeScopedGitleaksConfig(outDir, cwd);
|
|
190
|
+
return safeSpawnAsync(bin, [
|
|
191
|
+
"detect",
|
|
192
|
+
"--no-git",
|
|
193
|
+
"--source",
|
|
194
|
+
cwd,
|
|
195
|
+
"--config",
|
|
196
|
+
configPath,
|
|
197
|
+
"--report-format",
|
|
198
|
+
"json",
|
|
199
|
+
"--report-path",
|
|
200
|
+
reportPath,
|
|
201
|
+
"--exit-code",
|
|
202
|
+
"0",
|
|
203
|
+
"--no-banner"
|
|
204
|
+
], { cwd, timeout: SCAN_TIMEOUT_MS });
|
|
205
|
+
},
|
|
206
|
+
// gitleaks writes the report file even when nothing is found, so a
|
|
207
|
+
// missing file (the seam's no-report outcome) means the scan stopped
|
|
208
|
+
// before writing it.
|
|
209
|
+
parse: async (raw, scannedAt) => {
|
|
210
|
+
const rawFindings = parseGitleaksReport(raw);
|
|
211
|
+
const findings = await classifyAndFilterFindings(rawFindings, cwd);
|
|
218
212
|
return {
|
|
219
|
-
...EMPTY_RESULT,
|
|
220
213
|
success: true,
|
|
221
|
-
|
|
222
|
-
|
|
214
|
+
analyzed: true,
|
|
215
|
+
findings,
|
|
216
|
+
scannedAt
|
|
223
217
|
};
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
return {
|
|
228
|
-
success: true,
|
|
229
|
-
analyzed: true,
|
|
230
|
-
findings,
|
|
231
|
-
scannedAt
|
|
232
|
-
};
|
|
233
|
-
} catch (err) {
|
|
234
|
-
return {
|
|
235
|
-
...EMPTY_RESULT,
|
|
236
|
-
scannedAt,
|
|
237
|
-
summary: err instanceof Error ? err.message.slice(0, 200) : String(err)
|
|
238
|
-
};
|
|
239
|
-
} finally {
|
|
240
|
-
try {
|
|
241
|
-
fs.rmSync(outDir, { recursive: true, force: true });
|
|
242
|
-
} catch {
|
|
243
|
-
}
|
|
244
|
-
}
|
|
218
|
+
},
|
|
219
|
+
fail: (failure) => ({ ...EMPTY_RESULT, ...failure })
|
|
220
|
+
});
|
|
245
221
|
}
|
|
246
222
|
};
|
|
247
223
|
function isInsideNestedGitRepository(file, cwd) {
|
|
248
224
|
const root = path.resolve(cwd);
|
|
249
225
|
const absoluteFile = path.isAbsolute(file) ? path.resolve(file) : path.resolve(root, file);
|
|
250
|
-
|
|
251
|
-
if (relative2 === ".." || relative2.startsWith(`..${path.sep}`) || path.isAbsolute(relative2))
|
|
226
|
+
if (relativeInside(root, absoluteFile) === void 0)
|
|
252
227
|
return false;
|
|
253
|
-
|
|
254
|
-
|
|
228
|
+
for (const directory of walkUpDirs(path.dirname(absoluteFile), {
|
|
229
|
+
spelling: true
|
|
230
|
+
})) {
|
|
231
|
+
if (directory === root)
|
|
232
|
+
return false;
|
|
255
233
|
try {
|
|
256
234
|
if (fs.existsSync(path.join(directory, ".git")))
|
|
257
235
|
return true;
|
|
258
236
|
} catch {
|
|
259
237
|
return false;
|
|
260
238
|
}
|
|
261
|
-
const parent = path.dirname(directory);
|
|
262
|
-
if (parent === directory)
|
|
263
|
-
return false;
|
|
264
|
-
directory = parent;
|
|
265
239
|
}
|
|
266
240
|
return false;
|
|
267
241
|
}
|
|
@@ -36,19 +36,17 @@ import {
|
|
|
36
36
|
updateWordIndexDocumentForEdit,
|
|
37
37
|
wordIndexKey,
|
|
38
38
|
wordIndexPostingHits
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-
|
|
39
|
+
} from "./chunk-KXMJLOZF.js";
|
|
40
|
+
import "./chunk-MRLH4MYU.js";
|
|
41
41
|
import "./chunk-AWQWXSW4.js";
|
|
42
42
|
import "./chunk-QYF5S6P6.js";
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-KXF5R4UN.js";
|
|
43
|
+
import "./chunk-CZCAZVTD.js";
|
|
44
|
+
import "./chunk-X5BJ3G2P.js";
|
|
45
|
+
import "./chunk-NL5LSKVD.js";
|
|
46
|
+
import "./chunk-W5E72HJA.js";
|
|
48
47
|
import "./chunk-S26LC76R.js";
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-PQJFG24Z.js";
|
|
48
|
+
import "./chunk-VCRVNLE7.js";
|
|
49
|
+
import "./chunk-CB7PEVOJ.js";
|
|
52
50
|
import "./chunk-NXL4FFQQ.js";
|
|
53
51
|
export {
|
|
54
52
|
WORD_INDEX_FORMAT_VERSION,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
logExtension
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-W5E72HJA.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearestMarkerRoot,
|
|
7
|
+
realpathOrResolve,
|
|
7
8
|
walkUpDirs
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CB7PEVOJ.js";
|
|
9
10
|
|
|
10
11
|
// dist/clients/cargo-manifest.js
|
|
11
12
|
import { readFile } from "node:fs/promises";
|
|
@@ -141,7 +142,7 @@ function readWorkspacePackageEdition(content) {
|
|
|
141
142
|
return parseTomlScalarString(workspaceSection, "edition");
|
|
142
143
|
}
|
|
143
144
|
async function resolveCargoPackageEdition(filePath, homeDir = os.homedir()) {
|
|
144
|
-
const startDir = path.dirname(
|
|
145
|
+
const startDir = path.dirname(realpathOrResolve(filePath));
|
|
145
146
|
const packageDir = findNearestMarkerRoot(startDir, ["Cargo.toml"], {
|
|
146
147
|
homeDir
|
|
147
148
|
});
|
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
SecurityScanClient
|
|
4
|
+
} from "./chunk-PBZNYHMM.js";
|
|
2
5
|
import {
|
|
3
6
|
firstOutputLine,
|
|
4
7
|
spawnFailedWithNoOutput
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
SecurityScanClient
|
|
8
|
-
} from "./chunk-ZE3KXHS7.js";
|
|
8
|
+
} from "./chunk-ZZN74OGD.js";
|
|
9
9
|
import {
|
|
10
10
|
probeToolAsync
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-L6WBJGQS.js";
|
|
12
12
|
import {
|
|
13
13
|
INSTALL_TRANSIENT_MAX_ATTEMPTS,
|
|
14
14
|
classifyProbeFailure,
|
|
15
15
|
describeProbeEvidence,
|
|
16
16
|
logAvailabilityDecision,
|
|
17
17
|
startHostStallSampler
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AACN5GNE.js";
|
|
19
19
|
import {
|
|
20
20
|
isUntrustedProjectPath,
|
|
21
21
|
recordProjectCommandRefusal,
|
|
22
22
|
safeSpawnAsync
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TMNUTMT5.js";
|
|
24
24
|
import {
|
|
25
25
|
assertInstallAllowed
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-PIIUNJIT.js";
|
|
27
27
|
import {
|
|
28
28
|
recordDegradationOnce
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-W5E72HJA.js";
|
|
30
|
+
import {
|
|
31
|
+
isToolInstallDisabled
|
|
32
|
+
} from "./chunk-VCRVNLE7.js";
|
|
30
33
|
|
|
31
34
|
// dist/clients/govulncheck-client.js
|
|
32
35
|
import * as fs from "node:fs";
|
|
@@ -69,6 +72,14 @@ var GovulncheckClient = class _GovulncheckClient extends SecurityScanClient {
|
|
|
69
72
|
if (!assertInstallAllowed("govulncheck go install")) {
|
|
70
73
|
return false;
|
|
71
74
|
}
|
|
75
|
+
if (isToolInstallDisabled()) {
|
|
76
|
+
recordDegradationOnce({
|
|
77
|
+
kind: "install-disabled",
|
|
78
|
+
subject: "govulncheck",
|
|
79
|
+
reason: "installation disabled by PI_LENS_DISABLE_TOOL_INSTALL=1"
|
|
80
|
+
});
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
72
83
|
const goProbeStartedAt = Date.now();
|
|
73
84
|
const goSampler = startHostStallSampler();
|
|
74
85
|
let goOnPath;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
GovulncheckClient,
|
|
4
|
+
parseGovulncheckJson
|
|
5
|
+
} from "./chunk-JUZ67QZQ.js";
|
|
6
|
+
import "./chunk-PBZNYHMM.js";
|
|
7
|
+
import "./chunk-ZZN74OGD.js";
|
|
8
|
+
import "./chunk-LT62P654.js";
|
|
9
|
+
import "./chunk-L6WBJGQS.js";
|
|
10
|
+
import "./chunk-AACN5GNE.js";
|
|
11
|
+
import "./chunk-TMNUTMT5.js";
|
|
12
|
+
import "./chunk-AWQWXSW4.js";
|
|
13
|
+
import "./chunk-X5BJ3G2P.js";
|
|
14
|
+
import "./chunk-NL5LSKVD.js";
|
|
15
|
+
import "./chunk-PIIUNJIT.js";
|
|
16
|
+
import "./chunk-W5E72HJA.js";
|
|
17
|
+
import "./chunk-S26LC76R.js";
|
|
18
|
+
import "./chunk-VCRVNLE7.js";
|
|
19
|
+
import "./chunk-LJDODBBZ.js";
|
|
20
|
+
import "./chunk-CB7PEVOJ.js";
|
|
21
|
+
import "./chunk-NXL4FFQQ.js";
|
|
22
|
+
export {
|
|
23
|
+
GovulncheckClient,
|
|
24
|
+
parseGovulncheckJson
|
|
25
|
+
};
|
|
@@ -1,82 +1,79 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
formatToolFailure
|
|
4
|
-
} from "./chunk-Y7F7IEE3.js";
|
|
5
|
-
import "./chunk-JJ2RRESP.js";
|
|
6
|
-
import {
|
|
7
|
-
scannerReportParentDir
|
|
8
|
-
} from "./chunk-V63BC55Q.js";
|
|
9
2
|
import {
|
|
10
3
|
nestedWorktreeOffsets
|
|
11
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VO4JFPTV.js";
|
|
5
|
+
import {
|
|
6
|
+
formatToolFailure
|
|
7
|
+
} from "./chunk-ZZN74OGD.js";
|
|
12
8
|
import {
|
|
13
9
|
createAvailabilityChecker,
|
|
14
10
|
findManagedNodeToolBinary,
|
|
15
11
|
resolveAvailableOrInstall
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-NCLO6E6N.js";
|
|
13
|
+
import "./chunk-7R5GZIA6.js";
|
|
14
|
+
import "./chunk-YOXCCJDF.js";
|
|
15
|
+
import "./chunk-7YTRG6YW.js";
|
|
16
|
+
import "./chunk-V67D6TMU.js";
|
|
17
|
+
import {
|
|
18
|
+
scannerReportParentDir
|
|
19
|
+
} from "./chunk-LT62P654.js";
|
|
20
|
+
import "./chunk-PRHYIA6X.js";
|
|
21
|
+
import "./chunk-ACRJ2GZ5.js";
|
|
22
|
+
import "./chunk-J3Q2NYJR.js";
|
|
23
|
+
import "./chunk-5YSEQHJN.js";
|
|
24
|
+
import "./chunk-QGITU23N.js";
|
|
25
|
+
import "./chunk-WTB4GKMH.js";
|
|
26
|
+
import "./chunk-RTFMDIKV.js";
|
|
28
27
|
import "./chunk-CKEQFGLT.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-SNDXCFRS.js";
|
|
28
|
+
import "./chunk-KXMJLOZF.js";
|
|
31
29
|
import {
|
|
32
30
|
getJscpdMaxEntriesDerived
|
|
33
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-MRLH4MYU.js";
|
|
32
|
+
import "./chunk-MKPDIAZH.js";
|
|
34
33
|
import "./chunk-2BEMIWEW.js";
|
|
35
34
|
import "./chunk-IJYGIDF4.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-MQ4PPCJB.js";
|
|
36
|
+
import "./chunk-RNJFRXEN.js";
|
|
38
37
|
import {
|
|
39
38
|
findNodeToolBinary
|
|
40
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-E65WJVI5.js";
|
|
41
40
|
import {
|
|
42
41
|
getIsolatedNpxSpawnOptions
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
42
|
+
} from "./chunk-L6WBJGQS.js";
|
|
43
|
+
import "./chunk-UYXV5NIS.js";
|
|
44
|
+
import "./chunk-AACN5GNE.js";
|
|
45
|
+
import "./chunk-3HTZDY3C.js";
|
|
46
|
+
import "./chunk-CDFJF5YD.js";
|
|
47
|
+
import "./chunk-RNXOWDM6.js";
|
|
48
48
|
import {
|
|
49
49
|
shouldRecurseIntoDir,
|
|
50
50
|
walkTreeStackSync
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-ZCQBNPRH.js";
|
|
52
52
|
import {
|
|
53
53
|
getExcludedDirGlobs,
|
|
54
54
|
getProjectIgnoreGlobs,
|
|
55
55
|
getProjectIgnoreMatcher,
|
|
56
56
|
safeSpawnAsync
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-TMNUTMT5.js";
|
|
58
58
|
import "./chunk-AWQWXSW4.js";
|
|
59
59
|
import "./chunk-QYF5S6P6.js";
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-CZCAZVTD.js";
|
|
61
|
+
import "./chunk-X5BJ3G2P.js";
|
|
62
|
+
import "./chunk-NL5LSKVD.js";
|
|
63
|
+
import "./chunk-PIIUNJIT.js";
|
|
64
64
|
import {
|
|
65
|
+
createSubsystemLogger,
|
|
65
66
|
incrementDegradationCount
|
|
66
|
-
} from "./chunk-
|
|
67
|
-
import {
|
|
68
|
-
createSubsystemLogger
|
|
69
|
-
} from "./chunk-KXF5R4UN.js";
|
|
67
|
+
} from "./chunk-W5E72HJA.js";
|
|
70
68
|
import "./chunk-S26LC76R.js";
|
|
71
|
-
import "./chunk-
|
|
72
|
-
import "./chunk-VSFLRN5Y.js";
|
|
69
|
+
import "./chunk-VCRVNLE7.js";
|
|
73
70
|
import "./chunk-LJDODBBZ.js";
|
|
74
71
|
import {
|
|
75
72
|
isAtOrAboveHomeDir,
|
|
76
73
|
isFullyQualified,
|
|
77
74
|
realpathOrResolve,
|
|
78
75
|
toPosix
|
|
79
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-CB7PEVOJ.js";
|
|
80
77
|
import "./chunk-NXL4FFQQ.js";
|
|
81
78
|
|
|
82
79
|
// dist/clients/jscpd-client.js
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
getWordIndexMaxFilesDerived
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MRLH4MYU.js";
|
|
5
5
|
import {
|
|
6
6
|
createSingleFlight
|
|
7
7
|
} from "./chunk-AWQWXSW4.js";
|
|
@@ -11,30 +11,29 @@ import {
|
|
|
11
11
|
yieldIfOverBudget
|
|
12
12
|
} from "./chunk-QYF5S6P6.js";
|
|
13
13
|
import {
|
|
14
|
-
KIND_EXTENSIONS
|
|
15
|
-
|
|
14
|
+
KIND_EXTENSIONS,
|
|
15
|
+
SPECIAL_FILENAMES
|
|
16
|
+
} from "./chunk-CZCAZVTD.js";
|
|
16
17
|
import {
|
|
17
18
|
PathKeyedMap,
|
|
18
19
|
isTestFileName
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-X5BJ3G2P.js";
|
|
20
21
|
import {
|
|
21
22
|
incrementDegradationCount
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
logLatency
|
|
25
|
-
} from "./chunk-Z2XAOKHK.js";
|
|
23
|
+
} from "./chunk-W5E72HJA.js";
|
|
26
24
|
import {
|
|
27
25
|
createNdjsonLogger,
|
|
28
26
|
getGlobalPiLensLogDir,
|
|
29
27
|
getMaxLogSizeMB,
|
|
30
|
-
isTestMode
|
|
31
|
-
|
|
28
|
+
isTestMode,
|
|
29
|
+
logLatency
|
|
30
|
+
} from "./chunk-VCRVNLE7.js";
|
|
32
31
|
import {
|
|
33
32
|
isAtOrAboveHomeDir,
|
|
34
33
|
normalizeEphemeralMapKey,
|
|
35
34
|
normalizeFilePath,
|
|
36
35
|
realpathOrResolve
|
|
37
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-CB7PEVOJ.js";
|
|
38
37
|
|
|
39
38
|
// dist/clients/word-index.js
|
|
40
39
|
import * as fs from "node:fs";
|
|
@@ -861,11 +860,12 @@ async function updateWordIndexDocumentAsyncUnsafe(index, doc, shouldContinue) {
|
|
|
861
860
|
}
|
|
862
861
|
var WORD_INDEX_MAX_BYTES = 512 * 1024;
|
|
863
862
|
async function collectWordIndexDocs(root, shouldContinue = () => true, preflightFiles) {
|
|
864
|
-
const { collectSourceFilesAsync } = await import("./chunk-
|
|
863
|
+
const { collectSourceFilesAsync } = await import("./chunk-NMUSOZ2D.js");
|
|
865
864
|
const maxFiles = preflightFiles?.length ?? getWordIndexMaxFilesDerived(root);
|
|
866
865
|
const files = preflightFiles ? preflightFiles.map((file) => file.path) : await collectSourceFilesAsync(root, {
|
|
867
866
|
maxFiles,
|
|
868
|
-
prioritizeCodeKinds: true
|
|
867
|
+
prioritizeCodeKinds: true,
|
|
868
|
+
includeNamedFiles: true
|
|
869
869
|
});
|
|
870
870
|
const truncated = preflightFiles?.truncated ?? files.length === maxFiles;
|
|
871
871
|
const docs = Object.assign([], { truncated, skipped: 0 });
|
|
@@ -910,12 +910,13 @@ async function refreshWordIndexIncrementally(index, root, shouldContinue = () =>
|
|
|
910
910
|
timings: { sourceWalkMs: 0, statWalkMs: 0, refreshReadsMs: 0 }
|
|
911
911
|
};
|
|
912
912
|
}
|
|
913
|
-
const { collectSourceFilesAsync } = await import("./chunk-
|
|
913
|
+
const { collectSourceFilesAsync } = await import("./chunk-NMUSOZ2D.js");
|
|
914
914
|
const maxFiles = getWordIndexMaxFilesDerived(root);
|
|
915
915
|
const sourceWalkStartMs = Date.now();
|
|
916
916
|
const walked = await collectSourceFilesAsync(root, {
|
|
917
917
|
maxFiles,
|
|
918
|
-
prioritizeCodeKinds: true
|
|
918
|
+
prioritizeCodeKinds: true,
|
|
919
|
+
includeNamedFiles: true
|
|
919
920
|
});
|
|
920
921
|
const sourceWalkMs = Date.now() - sourceWalkStartMs;
|
|
921
922
|
if (!shouldContinue())
|
|
@@ -1097,33 +1098,34 @@ function parseWordIndexQuery(query) {
|
|
|
1097
1098
|
}
|
|
1098
1099
|
return { terms: termParts.join(" "), filters };
|
|
1099
1100
|
}
|
|
1100
|
-
function
|
|
1101
|
+
function resolveLangMatcher(value) {
|
|
1101
1102
|
const kind = value.toLowerCase();
|
|
1102
1103
|
const extensions = KIND_EXTENSIONS[kind];
|
|
1103
1104
|
if (!extensions) {
|
|
1104
1105
|
const known = Object.keys(KIND_EXTENSIONS).sort((a, b) => a < b ? -1 : a > b ? 1 : 0).join(", ");
|
|
1105
1106
|
throw new WordIndexQueryError(`Unknown lang: "${value}" in word-index query \u2014 supported languages: ${known}.`);
|
|
1106
1107
|
}
|
|
1107
|
-
|
|
1108
|
+
const named = SPECIAL_FILENAMES.flatMap((entry) => entry.kind === kind ? [entry.pattern] : []);
|
|
1109
|
+
return (file) => extensions.includes(path2.extname(file).toLowerCase()) || named.some((pattern) => pattern.test(path2.basename(file)));
|
|
1108
1110
|
}
|
|
1109
1111
|
function normalizeExtFilterValue(value) {
|
|
1110
1112
|
return `.${value.replace(/^\.+/, "").toLowerCase()}`;
|
|
1111
1113
|
}
|
|
1112
1114
|
function resolveWordIndexFilter(filter) {
|
|
1113
1115
|
if (filter.key === "lang") {
|
|
1114
|
-
const
|
|
1116
|
+
const matchesLang = resolveLangMatcher(filter.value);
|
|
1115
1117
|
return {
|
|
1116
1118
|
key: filter.key,
|
|
1117
1119
|
negated: filter.negated,
|
|
1118
|
-
test:
|
|
1120
|
+
test: matchesLang
|
|
1119
1121
|
};
|
|
1120
1122
|
}
|
|
1121
1123
|
if (filter.key === "ext") {
|
|
1122
|
-
const
|
|
1124
|
+
const suffix = normalizeExtFilterValue(filter.value);
|
|
1123
1125
|
return {
|
|
1124
1126
|
key: filter.key,
|
|
1125
1127
|
negated: filter.negated,
|
|
1126
|
-
test: (
|
|
1128
|
+
test: (_file, displayPath) => displayPath.toLowerCase().endsWith(suffix)
|
|
1127
1129
|
};
|
|
1128
1130
|
}
|
|
1129
1131
|
const needle = wordIndexKey(filter.value);
|
|
@@ -1750,7 +1752,7 @@ function triggerBackgroundWordIndexBuild(cwd, dbg, options = {}) {
|
|
|
1750
1752
|
void (async () => {
|
|
1751
1753
|
const startMs = Date.now();
|
|
1752
1754
|
try {
|
|
1753
|
-
const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-
|
|
1755
|
+
const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-WSSLVMDA.js");
|
|
1754
1756
|
const docs = await collectWordIndexDocs(key);
|
|
1755
1757
|
const index = await buildWordIndexAsync(docs);
|
|
1756
1758
|
const existing = loadProjectSnapshot(key);
|
|
@@ -1817,7 +1819,7 @@ function getWordIndexPersistScheduler() {
|
|
|
1817
1819
|
async function writeWordIndexSnapshot(cwd, index, dbg) {
|
|
1818
1820
|
const persistStartedAt = Date.now();
|
|
1819
1821
|
try {
|
|
1820
|
-
const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-
|
|
1822
|
+
const { loadProjectSnapshot, saveProjectSnapshot, PROJECT_SNAPSHOT_VERSION } = await import("./chunk-WSSLVMDA.js");
|
|
1821
1823
|
const existing = loadProjectSnapshot(cwd);
|
|
1822
1824
|
const snapshot = existing ?? {
|
|
1823
1825
|
version: PROJECT_SNAPSHOT_VERSION,
|
|
@@ -2,18 +2,18 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
createAvailabilityProbeFlight,
|
|
4
4
|
probeToolAsync
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-L6WBJGQS.js";
|
|
6
6
|
import {
|
|
7
7
|
classifyProbeFailure,
|
|
8
8
|
createAvailabilityLatch,
|
|
9
9
|
logAvailabilityDecision,
|
|
10
10
|
startHostStallSampler
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AACN5GNE.js";
|
|
12
12
|
import {
|
|
13
13
|
createGenerationSource,
|
|
14
14
|
isUntrustedProjectPath,
|
|
15
15
|
recordProjectCommandRefusal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TMNUTMT5.js";
|
|
17
17
|
import {
|
|
18
18
|
createSingleFlight
|
|
19
19
|
} from "./chunk-AWQWXSW4.js";
|