pi-lens 4.4.6 → 4.4.8
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.md +232 -0
- package/README.md +17 -3
- package/config/markdownlint/run-no-fix.mjs +36 -0
- package/dist/{chunk-ZQ6NZZTB.js → chunk-2453RRJ2.js} +44 -6
- package/dist/{chunk-GZE7WOI4.js → chunk-2BKUFQKR.js} +696 -330
- package/dist/chunk-2TS4GLOJ.js +31 -0
- package/dist/{chunk-2DMLM3ZO.js → chunk-2ZE3AUJQ.js} +12 -14
- package/dist/{chunk-OJLTLYHB.js → chunk-35WKJWO5.js} +51 -33
- package/dist/chunk-3JAHQBSY.js +27 -0
- package/dist/{chunk-PO45POGF.js → chunk-3O5EII3W.js} +2 -2
- package/dist/chunk-447YZL4S.js +25 -0
- package/dist/{chunk-TIYGSODX.js → chunk-4B2YFN4U.js} +28 -22
- package/dist/{chunk-OSTKYB55.js → chunk-4BKU7PV3.js} +1 -1
- package/dist/{chunk-XQCSWV2G.js → chunk-4LL2VRNY.js} +27 -28
- package/dist/{chunk-MA77RSFN.js → chunk-4NBWFYWW.js} +9 -9
- package/dist/{chunk-75SY4F24.js → chunk-4QG55RRC.js} +12 -12
- package/dist/{chunk-K2YGBXOA.js → chunk-4W52ZKZX.js} +2 -2
- package/dist/{chunk-Z2XAOKHK.js → chunk-565VRUP4.js} +2 -2
- package/dist/{chunk-CFRQMBGP.js → chunk-57X2CDRX.js} +23 -23
- package/dist/{chunk-XAIT2YGS.js → chunk-5F3XF3SX.js} +7 -15
- package/dist/{chunk-UHGF5UT5.js → chunk-5RNB4HVK.js} +1 -1
- package/dist/{chunk-Q4EMRFNA.js → chunk-5T5A6YAJ.js} +35 -34
- package/dist/{chunk-W5LGKNET.js → chunk-6FIRFP6A.js} +12 -12
- package/dist/{chunk-KLQVC3XC.js → chunk-6GMGEKQN.js} +36 -9
- package/dist/{chunk-UN4TEBWN.js → chunk-6LJOJ6EO.js} +20 -15
- package/dist/{chunk-HK6JVFZC.js → chunk-6YUNI7B5.js} +3 -3
- package/dist/{chunk-PKES3ISE.js → chunk-7ANZ7XDD.js} +2 -2
- package/dist/{chunk-VQH24FIP.js → chunk-7CGIDRIK.js} +16 -15
- package/dist/{chunk-SCIUNBPF.js → chunk-7MAD5ZAY.js} +16 -17
- package/dist/{chunk-OOU2WZZE.js → chunk-7TNILKGY.js} +1 -1
- package/dist/{chunk-LEJOJDXL.js → chunk-A5GRLYPZ.js} +9 -9
- package/dist/{chunk-AE37FEGH.js → chunk-AGGUWKRK.js} +1 -1
- package/dist/{chunk-BWYQUPOS.js → chunk-BBET6HD6.js} +1 -1
- package/dist/{chunk-GAACZY6R.js → chunk-BHWW6FAX.js} +14 -13
- package/dist/{chunk-A3YNG5KP.js → chunk-BOPDQ7AZ.js} +23 -21
- package/dist/{chunk-MKVZQUEG.js → chunk-BQG2QFVO.js} +215 -134
- package/dist/{chunk-EVDGNG4F.js → chunk-BUZIQDFS.js} +3 -3
- package/dist/{chunk-2PHMIAKO.js → chunk-CM73PPGD.js} +4 -4
- package/dist/{chunk-63RIVFQI.js → chunk-CUDD35TW.js} +10 -9
- package/dist/{chunk-BM5GS6ZH.js → chunk-CZL44WFN.js} +2 -2
- package/dist/{chunk-QGSTQH4D.js → chunk-DIWK3LBC.js} +12 -15
- package/dist/{chunk-JL6CXUMW.js → chunk-DYRZGUMA.js} +2 -2
- package/dist/{chunk-NDMCVUYK.js → chunk-FHEV6T4L.js} +22 -18
- package/dist/{chunk-4PCQCU47.js → chunk-FRLAUP2B.js} +4 -4
- package/dist/{chunk-RZOXUSPC.js → chunk-G5GV2Q7K.js} +2 -2
- package/dist/{chunk-2RLWJO5K.js → chunk-G6JKM4O7.js} +7 -7
- package/dist/chunk-GGYOZWHW.js +27 -0
- package/dist/{chunk-DC4CFXM5.js → chunk-GIRBSBGL.js} +6 -5
- package/dist/{chunk-PQJFG24Z.js → chunk-GMROJJRN.js} +1292 -946
- package/dist/{chunk-ZUUI3ZSA.js → chunk-HHR7WGCI.js} +3 -3
- package/dist/{chunk-TIQJPRDD.js → chunk-HKIL6DCL.js} +3 -2
- package/dist/{chunk-VPBIMOAQ.js → chunk-HUAM7QG3.js} +15 -13
- package/dist/{chunk-ZYNI26MI.js → chunk-HXFUTMX2.js} +2 -2
- package/dist/{chunk-W5R5SABV.js → chunk-I22THIHI.js} +12 -12
- package/dist/chunk-IE5D3RA5.js +58 -0
- package/dist/{chunk-MT6BVNFW.js → chunk-IYVYZQRL.js} +10 -16
- package/dist/{chunk-ARD426WI.js → chunk-JBP7KESM.js} +1 -1
- package/dist/{chunk-MN7MHUXQ.js → chunk-JE6HKLC7.js} +2 -2
- package/dist/{chunk-3MYEA7QD.js → chunk-JPRDTY5S.js} +85 -3
- package/dist/{chunk-CJYKEW2L.js → chunk-JYLOYTZD.js} +17 -1
- package/dist/{chunk-5APMQ2IJ.js → chunk-JZRP4DGP.js} +2 -2
- package/dist/{chunk-AMXIUN2R.js → chunk-KZ4ALBCH.js} +2 -2
- package/dist/{chunk-W2V54OCL.js → chunk-L3CLUGDY.js} +3 -3
- package/dist/{chunk-DMSLNKF7.js → chunk-L4NEVZ4T.js} +28 -27
- package/dist/chunk-LPYTPNOJ.js +22 -0
- package/dist/{chunk-BI5LAQ3Y.js → chunk-LSFXZLPW.js} +2071 -1725
- package/dist/{chunk-2DDDCJDL.js → chunk-MC6VB2E5.js} +4 -4
- package/dist/{chunk-U2SDMG7C.js → chunk-NM2NWH55.js} +5 -5
- package/dist/{chunk-Q4FCYCRE.js → chunk-NSPVR3FN.js} +19 -18
- package/dist/{chunk-VG5JS5SW.js → chunk-O2ARHQKF.js} +2 -2
- package/dist/{chunk-KSR7RGQY.js → chunk-O4N5BQ3T.js} +10 -10
- package/dist/{chunk-5ZR3APIM.js → chunk-OC7VWJBZ.js} +39 -40
- package/dist/chunk-OFNMHPBT.js +89 -0
- package/dist/{chunk-YSBHPOY6.js → chunk-OWTG6UMO.js} +21 -21
- package/dist/{chunk-7RQXA5GG.js → chunk-OY7WZI7Q.js} +13 -12
- package/dist/{chunk-5CV5ITZF.js → chunk-OZWXLJMX.js} +2 -2
- package/dist/{chunk-F6X3YJWD.js → chunk-PIQQM32Y.js} +2 -2
- package/dist/chunk-PKLB2XJL.js +8 -0
- package/dist/{chunk-DQXSPYRI.js → chunk-PKSUMEPT.js} +17 -4
- package/dist/{chunk-YISME6ON.js → chunk-PPKECBPP.js} +1 -1
- package/dist/{chunk-4AVZ3TG7.js → chunk-R2QQC33W.js} +14 -14
- package/dist/{chunk-GMTFDAOK.js → chunk-R4QWJQ2H.js} +11 -11
- package/dist/{chunk-V63BC55Q.js → chunk-RGGH6M34.js} +1 -1
- package/dist/{chunk-SJJYRZB4.js → chunk-RZG472YW.js} +116 -26
- package/dist/{chunk-NIU2IPC5.js → chunk-SDFKOLSF.js} +6 -6
- package/dist/{chunk-H7HTEQUZ.js → chunk-SFLHSL5R.js} +9 -9
- package/dist/{chunk-FA5LDARD.js → chunk-SP4TFY5F.js} +14 -13
- package/dist/{chunk-J6JP25XU.js → chunk-SQC7K3SP.js} +4 -3
- package/dist/{chunk-T7FTXGS3.js → chunk-T2S3FNNJ.js} +44 -42
- package/dist/{chunk-S67UJDGQ.js → chunk-TV6RXRYH.js} +10 -10
- package/dist/{chunk-GNSIWBAT.js → chunk-U3AS2FR6.js} +3 -3
- package/dist/{chunk-WIZWZR4C.js → chunk-UHHLR2VY.js} +43 -41
- package/dist/chunk-UYXV5NIS.js +20 -0
- package/dist/{chunk-VSFLRN5Y.js → chunk-VLQ7UKZH.js} +1 -1
- package/dist/{chunk-FFL3A2VP.js → chunk-VN3L2JWZ.js} +46 -72
- package/dist/{chunk-Z7IGUAXL.js → chunk-VOP4PJKA.js} +12 -8
- package/dist/{chunk-F5Z6URKM.js → chunk-VOXTCULR.js} +2 -2
- package/dist/{chunk-NNKXDXXS.js → chunk-VPLBLWFO.js} +14 -8
- package/dist/chunk-W3BGKBBK.js +27 -0
- package/dist/{chunk-ZKXQKGWZ.js → chunk-WC6WRNQT.js} +4 -3
- package/dist/{chunk-Q3UZHW6N.js → chunk-WMDUT4KH.js} +1150 -1138
- package/dist/{chunk-KXF5R4UN.js → chunk-WQV6BI4Q.js} +1 -1
- package/dist/chunk-WXUDRAG6.js +24 -0
- package/dist/{chunk-OLAWH5UQ.js → chunk-X35S7HSB.js} +29 -10
- package/dist/{chunk-YBSONGSZ.js → chunk-X66YJ2SS.js} +40 -34
- package/dist/{chunk-U6OC3QEM.js → chunk-XOMGO63G.js} +22 -21
- package/dist/{chunk-WQOIR3QY.js → chunk-XWIME22V.js} +13 -13
- package/dist/{chunk-3WEPUD2V.js → chunk-XYLC35E4.js} +202 -103
- package/dist/{chunk-UCGQT677.js → chunk-YHGYAEFH.js} +18 -18
- package/dist/{chunk-V3APN3DY.js → chunk-ZFORSIED.js} +13 -13
- package/dist/{chunk-BHUWL2Y3.js → chunk-ZKLTNLAW.js} +64 -73
- package/dist/chunk-ZONZ6YY3.js +74 -0
- package/dist/chunk-ZSM35JF4.js +30 -0
- package/dist/{chunk-PPIBVH4R.js → chunk-ZZDIOAAJ.js} +15 -6
- package/dist/index.js +8817 -6239
- package/dist/mcp/analyze-cli.js +10 -10
- package/dist/mcp/cli.js +44 -42
- package/dist/mcp/server.js +2236 -861
- package/dist/mcp/worker.js +62 -61
- package/dist/probes/installer.js +20 -19
- package/docs/adr/0003-git-guard-latch-writer.md +11 -6
- package/docs/agent-tools.md +29 -11
- package/docs/alignment-families.md +29 -0
- package/docs/ast-grep_rules_catalog.md +6 -4
- package/docs/ci-bot-pr-checks.md +126 -0
- package/docs/configuration.md +99 -3
- package/docs/defect-shapes.md +68 -11
- package/docs/dependencies.md +1 -0
- package/docs/engineering-principles.md +27 -2
- package/docs/environment-variables.md +14 -0
- package/docs/features.md +13 -3
- package/docs/globalconfig.md +12 -1
- package/docs/invariants/git-guard-host.md +38 -0
- package/docs/invariants/language-config.md +15 -4
- package/docs/invariants/lsp-trust-exec.md +22 -2
- package/docs/invariants/paths-os.md +4 -2
- package/docs/invariants/session-telemetry.md +42 -2
- package/docs/lsp-capability-matrix.md +208 -84
- package/docs/lsp-idle-eviction.md +3 -5
- package/docs/merge-queue-rollout.md +1 -1
- package/docs/pi-lens-fixer.md +31 -17
- package/docs/pi-lens-merge-policy.md +27 -15
- package/docs/pi-lens-monitor.md +9 -0
- package/docs/pi-lens-orchestration.md +4 -1
- package/docs/pi-lens-reviewer.md +5 -5
- package/docs/pi-lens-subagent.md +13 -7
- package/docs/public-api-stability.md +18 -2
- package/docs/schema/pi-lens-config-v1.json +33 -0
- package/docs/servercapabilities.md +1 -1
- package/docs/settings.md +15 -6
- package/docs/usage.md +5 -0
- package/docs/word-index.md +17 -5
- package/package.json +5 -3
- 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/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/dist/chunk-2F47TQOA.js +0 -73
- package/dist/chunk-2X4VLOCC.js +0 -55
- package/dist/chunk-4WX4CTUE.js +0 -57
- package/dist/chunk-FJIVKLPH.js +0 -31
- package/dist/chunk-G2B7F6ZU.js +0 -88
- package/dist/chunk-GTAI2J6U.js +0 -27
- package/dist/chunk-IPDG45G5.js +0 -26
- package/dist/chunk-P4QNXS6I.js +0 -27
- package/dist/chunk-Q6D6VMI4.js +0 -22
- package/dist/chunk-SXGD4ANG.js +0 -25
- package/dist/chunk-XCUHKYCQ.js +0 -23
- package/dist/chunk-YRD4ISED.js +0 -30
|
@@ -1,86 +1,88 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-2X4VLOCC.js";
|
|
3
|
+
nestedWorktreeOffsets
|
|
4
|
+
} from "./chunk-KZ4ALBCH.js";
|
|
6
5
|
import {
|
|
7
6
|
scannerReportParentDir
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RGGH6M34.js";
|
|
9
8
|
import {
|
|
10
|
-
|
|
11
|
-
} from "./chunk-
|
|
9
|
+
formatToolFailure
|
|
10
|
+
} from "./chunk-RZG472YW.js";
|
|
12
11
|
import {
|
|
13
12
|
createAvailabilityChecker,
|
|
14
13
|
findManagedNodeToolBinary,
|
|
15
14
|
resolveAvailableOrInstall
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-ZFORSIED.js";
|
|
16
|
+
import "./chunk-5F3XF3SX.js";
|
|
17
|
+
import "./chunk-XYLC35E4.js";
|
|
18
|
+
import "./chunk-DYRZGUMA.js";
|
|
19
|
+
import "./chunk-FHEV6T4L.js";
|
|
20
|
+
import "./chunk-ZZDIOAAJ.js";
|
|
21
|
+
import "./chunk-7ANZ7XDD.js";
|
|
22
|
+
import "./chunk-WC6WRNQT.js";
|
|
23
|
+
import "./chunk-HHR7WGCI.js";
|
|
24
|
+
import "./chunk-HKIL6DCL.js";
|
|
25
|
+
import "./chunk-PPKECBPP.js";
|
|
26
|
+
import "./chunk-5RNB4HVK.js";
|
|
28
27
|
import "./chunk-CKEQFGLT.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-JYLOYTZD.js";
|
|
29
|
+
import "./chunk-HUAM7QG3.js";
|
|
31
30
|
import {
|
|
32
31
|
getJscpdMaxEntriesDerived
|
|
33
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-HXFUTMX2.js";
|
|
34
33
|
import "./chunk-2BEMIWEW.js";
|
|
35
34
|
import "./chunk-IJYGIDF4.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-BQG2QFVO.js";
|
|
36
|
+
import "./chunk-IYVYZQRL.js";
|
|
38
37
|
import {
|
|
39
38
|
findNodeToolBinary
|
|
40
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-VOP4PJKA.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-JBP7KESM.js";
|
|
43
|
+
import "./chunk-UYXV5NIS.js";
|
|
44
|
+
import "./chunk-JZRP4DGP.js";
|
|
45
|
+
import "./chunk-SDFKOLSF.js";
|
|
46
|
+
import "./chunk-BBET6HD6.js";
|
|
47
|
+
import "./chunk-G6JKM4O7.js";
|
|
48
48
|
import {
|
|
49
49
|
shouldRecurseIntoDir,
|
|
50
50
|
walkTreeStackSync
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-O2ARHQKF.js";
|
|
52
52
|
import {
|
|
53
53
|
getExcludedDirGlobs,
|
|
54
54
|
getProjectIgnoreGlobs,
|
|
55
55
|
getProjectIgnoreMatcher,
|
|
56
56
|
safeSpawnAsync
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-WMDUT4KH.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-G5GV2Q7K.js";
|
|
61
|
+
import "./chunk-X35S7HSB.js";
|
|
62
|
+
import "./chunk-SQC7K3SP.js";
|
|
63
|
+
import "./chunk-JE6HKLC7.js";
|
|
64
64
|
import {
|
|
65
65
|
incrementDegradationCount
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-2453RRJ2.js";
|
|
67
67
|
import {
|
|
68
68
|
createSubsystemLogger
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-WQV6BI4Q.js";
|
|
70
70
|
import "./chunk-S26LC76R.js";
|
|
71
|
-
import "./chunk-
|
|
72
|
-
import "./chunk-
|
|
71
|
+
import "./chunk-565VRUP4.js";
|
|
72
|
+
import "./chunk-VLQ7UKZH.js";
|
|
73
73
|
import "./chunk-LJDODBBZ.js";
|
|
74
74
|
import {
|
|
75
75
|
isAtOrAboveHomeDir,
|
|
76
76
|
isFullyQualified,
|
|
77
|
+
realpathOrResolve,
|
|
77
78
|
toPosix
|
|
78
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-GMROJJRN.js";
|
|
79
80
|
import "./chunk-NXL4FFQQ.js";
|
|
80
81
|
|
|
81
82
|
// dist/clients/jscpd-client.js
|
|
82
83
|
import * as fs from "node:fs";
|
|
83
84
|
import { mkdtempSync } from "node:fs";
|
|
85
|
+
import * as os from "node:os";
|
|
84
86
|
import * as path from "node:path";
|
|
85
87
|
var EMPTY_RESULT = {
|
|
86
88
|
success: false,
|
|
@@ -264,7 +266,7 @@ var JscpdClient = class {
|
|
|
264
266
|
*/
|
|
265
267
|
async scan(cwd, minLines = 5, minTokens = 50, isTsProject = false, options = {}) {
|
|
266
268
|
const targetDir = path.resolve(cwd);
|
|
267
|
-
if (isAtOrAboveHomeDir(targetDir, options.homeDir)) {
|
|
269
|
+
if (isAtOrAboveHomeDir(realpathOrResolve(targetDir), realpathOrResolve(options.homeDir ?? os.homedir()))) {
|
|
268
270
|
this.log(`Refusing scan of unsafe root at/above home: ${targetDir}`);
|
|
269
271
|
return { ...EMPTY_RESULT };
|
|
270
272
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// dist/clients/background-write-drains.js
|
|
4
|
+
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("pi-lens.background-write-drains.v1");
|
|
5
|
+
var host = globalThis;
|
|
6
|
+
function registry() {
|
|
7
|
+
const existing = host[REGISTRY_KEY];
|
|
8
|
+
if (existing instanceof Set)
|
|
9
|
+
return existing;
|
|
10
|
+
const fresh = /* @__PURE__ */ new Set();
|
|
11
|
+
host[REGISTRY_KEY] = fresh;
|
|
12
|
+
return fresh;
|
|
13
|
+
}
|
|
14
|
+
function registerBackgroundWriteDrain(drain) {
|
|
15
|
+
registry().add(drain);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
registerBackgroundWriteDrain
|
|
20
|
+
};
|
|
@@ -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-KZ4ALBCH.js";
|
|
10
7
|
import {
|
|
11
8
|
SecurityScanClient
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JPRDTY5S.js";
|
|
13
10
|
import {
|
|
14
11
|
collectTrackedFiles,
|
|
15
12
|
collectUntrackedIgnoredIds,
|
|
16
13
|
safeSpawnAsync
|
|
17
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WMDUT4KH.js";
|
|
18
15
|
import {
|
|
19
16
|
escapeRegExp
|
|
20
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2453RRJ2.js";
|
|
21
18
|
import {
|
|
22
19
|
normalizeEphemeralMapKey,
|
|
23
|
-
normalizeMapKey
|
|
24
|
-
|
|
20
|
+
normalizeMapKey,
|
|
21
|
+
relativeInside,
|
|
22
|
+
walkUpDirs
|
|
23
|
+
} from "./chunk-GMROJJRN.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
|
}
|
|
@@ -2,14 +2,14 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
createAvailabilityProbeFlight,
|
|
4
4
|
probeToolAsync
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JBP7KESM.js";
|
|
6
6
|
import {
|
|
7
7
|
classifyProbeFailure,
|
|
8
8
|
createAvailabilityLatch,
|
|
9
9
|
isTransientDecision,
|
|
10
10
|
logAvailabilityDecision,
|
|
11
11
|
startHostStallSampler
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JZRP4DGP.js";
|
|
13
13
|
import {
|
|
14
14
|
NODE_MODULES_BIN_DIRS,
|
|
15
15
|
createGenerationSource,
|
|
@@ -17,21 +17,22 @@ import {
|
|
|
17
17
|
projectLocalBinDirs,
|
|
18
18
|
recordProjectCommandRefusal,
|
|
19
19
|
safeSpawnAsync
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WMDUT4KH.js";
|
|
21
21
|
import {
|
|
22
22
|
getProjectTrustState
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-JE6HKLC7.js";
|
|
24
24
|
import {
|
|
25
25
|
recordDegradationOnce
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2453RRJ2.js";
|
|
27
27
|
import {
|
|
28
28
|
logExtension
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-WQV6BI4Q.js";
|
|
30
30
|
import {
|
|
31
31
|
isAtOrAboveHomeDir,
|
|
32
32
|
isUnderDir,
|
|
33
|
+
realpathOrResolve,
|
|
33
34
|
walkUpDirs
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-GMROJJRN.js";
|
|
35
36
|
|
|
36
37
|
// dist/clients/package-manager.js
|
|
37
38
|
import * as fs from "node:fs";
|
|
@@ -316,8 +317,11 @@ function* matchesInDir(dir, names, binDirs) {
|
|
|
316
317
|
function* localBinMatches(tools, startDir, options) {
|
|
317
318
|
const { windowsExt = ".cmd", homeDir = os.homedir(), binDirs = NODE_MODULES_BIN_DIRS, isWindows = onWindows(), ceiling = true } = options;
|
|
318
319
|
const names = expandCandidateNames(tools, windowsExt, isWindows);
|
|
320
|
+
const home = ceiling ? realpathOrResolve(homeDir) : homeDir;
|
|
321
|
+
let startIsReal;
|
|
319
322
|
for (const dir of walkUpDirs(startDir, { spelling: true })) {
|
|
320
|
-
|
|
323
|
+
startIsReal ??= ceiling && realpathOrResolve(dir) === dir;
|
|
324
|
+
if (ceiling && isAtOrAboveHomeDir(startIsReal ? dir : realpathOrResolve(dir), home))
|
|
321
325
|
return;
|
|
322
326
|
yield* matchesInDir(dir, names, binDirs);
|
|
323
327
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
logLatency
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-565VRUP4.js";
|
|
5
5
|
import {
|
|
6
6
|
getProcessSingleton
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VLQ7UKZH.js";
|
|
8
8
|
|
|
9
9
|
// dist/clients/lsp/workspace-sweep-hold.js
|
|
10
10
|
var SWEEP_IDLE_SAFETY_MARGIN_MS = 6e4;
|
|
@@ -2,8 +2,10 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
normalizeHostToolPath,
|
|
4
4
|
normalizeMapKey,
|
|
5
|
+
relativeInside,
|
|
6
|
+
toPosix,
|
|
5
7
|
walkUpDirs
|
|
6
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GMROJJRN.js";
|
|
7
9
|
|
|
8
10
|
// dist/clients/content-stamp.js
|
|
9
11
|
import { createHash } from "node:crypto";
|
|
@@ -15,6 +17,13 @@ function hashContentBytes(bytes) {
|
|
|
15
17
|
function hashFileBytes(filePath) {
|
|
16
18
|
return hashContentBytes(fs.readFileSync(filePath));
|
|
17
19
|
}
|
|
20
|
+
function stampContentBytes(bytes, mtimeMs) {
|
|
21
|
+
return {
|
|
22
|
+
size: bytes.byteLength,
|
|
23
|
+
mtimeMs,
|
|
24
|
+
...bytes.byteLength <= CONTENT_HASH_MAX_BYTES ? { sha256: hashContentBytes(bytes) } : {}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
18
27
|
|
|
19
28
|
// dist/clients/dispatch/runner-context.js
|
|
20
29
|
import * as fs2 from "node:fs";
|
|
@@ -24,8 +33,8 @@ function resolveAgainstAncestors(cwd, filePath) {
|
|
|
24
33
|
if (path.isAbsolute(filePath)) {
|
|
25
34
|
return filePath;
|
|
26
35
|
}
|
|
27
|
-
const normalizedRelative = filePath
|
|
28
|
-
const cwdBaseName = path.basename(path.resolve(cwd))
|
|
36
|
+
const normalizedRelative = toPosix(filePath);
|
|
37
|
+
const cwdBaseName = toPosix(path.basename(path.resolve(cwd)));
|
|
29
38
|
if (cwdBaseName && (normalizedRelative === cwdBaseName || normalizedRelative.startsWith(`${cwdBaseName}/`))) {
|
|
30
39
|
const trimmedRelative = normalizedRelative === cwdBaseName ? "" : normalizedRelative.slice(cwdBaseName.length + 1);
|
|
31
40
|
const trimmedCandidate = trimmedRelative ? path.resolve(cwd, trimmedRelative) : path.resolve(cwd);
|
|
@@ -51,17 +60,14 @@ function resolveRunnerPath(cwd, filePath) {
|
|
|
51
60
|
function toRunnerDisplayPath(cwd, filePath) {
|
|
52
61
|
const cwdKey = normalizeMapKey(path.resolve(cwd));
|
|
53
62
|
const fileKey = resolveRunnerPath(cwd, filePath);
|
|
54
|
-
|
|
55
|
-
if (relative2 && relative2 !== "." && !relative2.startsWith("../")) {
|
|
56
|
-
return relative2;
|
|
57
|
-
}
|
|
58
|
-
return fileKey;
|
|
63
|
+
return relativeInside(cwdKey, fileKey) || fileKey;
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
export {
|
|
62
67
|
CONTENT_HASH_MAX_BYTES,
|
|
63
68
|
hashContentBytes,
|
|
64
69
|
hashFileBytes,
|
|
70
|
+
stampContentBytes,
|
|
65
71
|
resolveRunnerPath,
|
|
66
72
|
toRunnerDisplayPath
|
|
67
73
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
GovulncheckClient,
|
|
4
|
+
parseGovulncheckJson
|
|
5
|
+
} from "./chunk-SFLHSL5R.js";
|
|
6
|
+
import "./chunk-JPRDTY5S.js";
|
|
7
|
+
import "./chunk-RGGH6M34.js";
|
|
8
|
+
import "./chunk-RZG472YW.js";
|
|
9
|
+
import "./chunk-JBP7KESM.js";
|
|
10
|
+
import "./chunk-JZRP4DGP.js";
|
|
11
|
+
import "./chunk-WMDUT4KH.js";
|
|
12
|
+
import "./chunk-AWQWXSW4.js";
|
|
13
|
+
import "./chunk-X35S7HSB.js";
|
|
14
|
+
import "./chunk-SQC7K3SP.js";
|
|
15
|
+
import "./chunk-JE6HKLC7.js";
|
|
16
|
+
import "./chunk-2453RRJ2.js";
|
|
17
|
+
import "./chunk-WQV6BI4Q.js";
|
|
18
|
+
import "./chunk-S26LC76R.js";
|
|
19
|
+
import "./chunk-565VRUP4.js";
|
|
20
|
+
import "./chunk-VLQ7UKZH.js";
|
|
21
|
+
import "./chunk-LJDODBBZ.js";
|
|
22
|
+
import "./chunk-GMROJJRN.js";
|
|
23
|
+
import "./chunk-NXL4FFQQ.js";
|
|
24
|
+
export {
|
|
25
|
+
GovulncheckClient,
|
|
26
|
+
parseGovulncheckJson
|
|
27
|
+
};
|
|
@@ -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-WQV6BI4Q.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearestMarkerRoot,
|
|
7
|
+
realpathOrResolve,
|
|
7
8
|
walkUpDirs
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GMROJJRN.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
|
});
|