pi-lens 4.4.12 → 4.5.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/CHANGELOG-USER.md +6 -6
- package/CHANGELOG.md +172 -0
- package/README.md +103 -217
- package/dist/{chunk-KXDQD34C.js → chunk-27JQHK7Y.js} +1 -1
- package/dist/{chunk-W6VLB6LL.js → chunk-2APSZHHI.js} +61 -3
- package/dist/{chunk-5EEWCJG7.js → chunk-2H5GHZKC.js} +8 -8
- package/dist/{chunk-TS5EIWEF.js → chunk-2H7NFZ4Q.js} +11 -11
- package/dist/{chunk-6GWCYEP7.js → chunk-37IDWT6O.js} +64 -16
- package/dist/{chunk-OEPWTSUG.js → chunk-3PAS2ERX.js} +8 -8
- package/dist/{chunk-ET3DSSFZ.js → chunk-3PO4YYOX.js} +9 -17
- package/dist/{chunk-C6V2DSZZ.js → chunk-3QXFUP6T.js} +11 -11
- package/dist/{chunk-HWMNTQBJ.js → chunk-3TSMQZG6.js} +32 -11
- package/dist/{chunk-QY6J2FTK.js → chunk-4DAHGU3V.js} +15 -14
- package/dist/{chunk-PCREZ4HJ.js → chunk-4IZZEN63.js} +33 -34
- package/dist/{chunk-OYXD2MOM.js → chunk-5HBQL7DH.js} +2 -2
- package/dist/{chunk-B4FAFEBP.js → chunk-5JB4WENL.js} +1 -1
- package/dist/chunk-5YJXF2IS.js +56 -0
- package/dist/{chunk-GHATCG2A.js → chunk-6CFSDLHE.js} +22 -18
- package/dist/{chunk-FVQKX5KI.js → chunk-6E5QLMWI.js} +24 -22
- package/dist/{chunk-AVBEPUCD.js → chunk-6GLMMGCX.js} +2 -2
- package/dist/{chunk-YTXFNCVN.js → chunk-74AMPWNC.js} +2 -2
- package/dist/{chunk-K2GV34T2.js → chunk-7CLWC2UH.js} +26 -37
- package/dist/{chunk-MOEWCPMC.js → chunk-7DPXUPRF.js} +2 -2
- package/dist/{chunk-7BEADGAZ.js → chunk-7U36VQL6.js} +2 -2
- package/dist/{chunk-PPYUBO6Y.js → chunk-7WKVCZI4.js} +1 -1
- package/dist/{chunk-ILC2B7IJ.js → chunk-7ZVTFLCC.js} +10 -10
- package/dist/{chunk-IT7MFVGP.js → chunk-ADYQRETD.js} +2 -2
- package/dist/{chunk-NCDH2JB7.js → chunk-ARTYCUGF.js} +25 -10
- package/dist/{chunk-Z6WTLVUL.js → chunk-AXAR5ZW2.js} +225 -104
- package/dist/{chunk-PK3GDU4M.js → chunk-AZG5UJYY.js} +1 -1
- package/dist/{chunk-NRVWLTOY.js → chunk-B2OXE4AH.js} +60 -21
- package/dist/{chunk-ORYQGVC3.js → chunk-B42AIWPJ.js} +2 -2
- package/dist/{chunk-IC4L65U7.js → chunk-BBSDJTOV.js} +12 -13
- package/dist/{chunk-HJWF7CGW.js → chunk-BKWFDWYM.js} +16 -16
- package/dist/{chunk-D2ZYRI7M.js → chunk-C5PLBTNR.js} +1 -1
- package/dist/{chunk-SRXYSLMW.js → chunk-CQY2HEH7.js} +1 -1
- package/dist/{chunk-7424ANRU.js → chunk-CXQYK4YT.js} +1 -1
- package/dist/{chunk-HYR25MV3.js → chunk-CZJGAOKL.js} +8 -7
- package/dist/{chunk-DIIDMDZU.js → chunk-DCA2MXVQ.js} +11 -11
- package/dist/{chunk-K2LD6YNH.js → chunk-DFKOA74L.js} +9 -9
- package/dist/{chunk-AYDE7RFV.js → chunk-DI4AZZNY.js} +2 -2
- package/dist/{chunk-6EXGCXM5.js → chunk-G53LBDNU.js} +99 -5
- package/dist/chunk-GCSDF5IE.js +27 -0
- package/dist/{chunk-5KLRCUDT.js → chunk-H5API74E.js} +6 -6
- package/dist/chunk-HBX55MWO.js +27 -0
- package/dist/{chunk-JRSS6KM4.js → chunk-HIJ4CHFF.js} +2 -2
- package/dist/{chunk-3MHY4BQY.js → chunk-HIRBC72R.js} +4 -4
- package/dist/{chunk-F7AMFFVK.js → chunk-HRLF35WL.js} +8 -8
- package/dist/{chunk-HSTN27NR.js → chunk-I2FYOZNW.js} +9 -9
- package/dist/{chunk-5FDUKJZO.js → chunk-I3NZVAMN.js} +9 -9
- package/dist/{chunk-NZINZCHB.js → chunk-INBK3HIT.js} +3 -3
- package/dist/{chunk-PXGVB2CY.js → chunk-J2ZB5MDS.js} +20 -18
- package/dist/{chunk-HYDJUVOE.js → chunk-JGUDT5KD.js} +4 -4
- package/dist/chunk-JOIKBUQN.js +88 -0
- package/dist/{chunk-AZXTLZHE.js → chunk-K4Z7MK6T.js} +169 -165
- package/dist/{chunk-WTSQKJAR.js → chunk-K7O6AHSJ.js} +10 -10
- package/dist/{chunk-S6ZQFPOX.js → chunk-KNJH6WJQ.js} +6 -6
- package/dist/{chunk-SUIZOCSY.js → chunk-KNSOA43J.js} +1 -1
- package/dist/{chunk-3QMLB4TI.js → chunk-KXGTLAUW.js} +2 -2
- package/dist/{chunk-OHEUOWYT.js → chunk-KZ732ZVW.js} +1 -1
- package/dist/{chunk-G3LR6V6N.js → chunk-L6BDRYUK.js} +19 -17
- package/dist/{chunk-OVPR3GQ6.js → chunk-LGH2HHZG.js} +24 -6
- package/dist/{chunk-3R3Z54J7.js → chunk-LOEJFTF2.js} +1 -1
- package/dist/{chunk-HGEE5LDW.js → chunk-LQQNFCQJ.js} +1 -1
- package/dist/chunk-LVLPA32Q.js +810 -0
- package/dist/chunk-M2YMBT5G.js +73 -0
- package/dist/{chunk-Z2W5YJBW.js → chunk-MJRGPEQ5.js} +11 -11
- package/dist/{chunk-3EIZMRXI.js → chunk-MOAVEPC4.js} +10 -10
- package/dist/{chunk-TOOXNL6M.js → chunk-NGNBJIUO.js} +7 -7
- package/dist/{chunk-AGEQRJ5A.js → chunk-NHA5K226.js} +1 -1
- package/dist/{chunk-YLW26OHX.js → chunk-NNEQOC3U.js} +31 -59
- package/dist/{chunk-ZWZD4TJ5.js → chunk-O2MHF7QM.js} +35 -36
- package/dist/{chunk-PTJXMYRY.js → chunk-OLWGYBYT.js} +15 -16
- package/dist/{chunk-JKAVKTMY.js → chunk-OZQQ3AIR.js} +17 -20
- package/dist/{chunk-6JLNZ6DP.js → chunk-P5MSLVUW.js} +10 -10
- package/dist/{chunk-OF2YGDUE.js → chunk-PFJLYRO3.js} +37 -38
- package/dist/chunk-PKWEBMCA.js +2957 -0
- package/dist/{chunk-JLMS7EMD.js → chunk-PPQHMSPH.js} +16 -15
- package/dist/{chunk-6EIV3H7O.js → chunk-PQF6YGYB.js} +12 -5
- package/dist/{chunk-VU2PRGRI.js → chunk-PQXUZYTQ.js} +4 -4
- package/dist/{chunk-MV6ST2KT.js → chunk-Q7J3JYJ2.js} +13 -12
- package/dist/{chunk-BMMRLJA4.js → chunk-QE5DJ7MX.js} +27 -10
- package/dist/{chunk-IZ36G463.js → chunk-QE7BJQ6K.js} +7 -7
- package/dist/{chunk-E5SSUV2A.js → chunk-QMWKSYWB.js} +4 -4
- package/dist/{chunk-QJ4T73J5.js → chunk-QV3JPCMK.js} +1 -1
- package/dist/{chunk-3PMLYGJN.js → chunk-R4L7KZ7R.js} +5 -5
- package/dist/{chunk-7ZVEFWOE.js → chunk-RIH3UBK4.js} +10 -10
- package/dist/{chunk-T5EGSBM2.js → chunk-RJ3APNIP.js} +3 -3
- package/dist/{chunk-AAIVSSUU.js → chunk-S6MCMD27.js} +35 -12
- package/dist/{chunk-SF7KSXB5.js → chunk-SCU62JLX.js} +6 -6
- package/dist/{chunk-FDLGJFAE.js → chunk-SDYLT45T.js} +3 -3
- package/dist/chunk-TFKN5EIR.js +27 -0
- package/dist/{chunk-Y7XMKBFP.js → chunk-TKOFTLGB.js} +34 -26
- package/dist/chunk-TQWRH25U.js +35 -0
- package/dist/{chunk-DZSQXG66.js → chunk-TWEOJE3D.js} +277 -62
- package/dist/{chunk-R67WQ5RY.js → chunk-UN72ZAJ5.js} +8 -8
- package/dist/{chunk-AD7JDEI6.js → chunk-UNP6Y4JV.js} +16 -16
- package/dist/{chunk-D6ANA6YU.js → chunk-VGRGW4UL.js} +63 -55
- package/dist/{chunk-DFAY7JUN.js → chunk-VSQT6IHZ.js} +2 -2
- package/dist/{chunk-7T64QA5D.js → chunk-VWEBZ2JV.js} +39 -38
- package/dist/{chunk-HRQTYU2T.js → chunk-W26QZ3OM.js} +1 -1
- package/dist/{chunk-2HWVG3IM.js → chunk-XDNWR7SG.js} +2 -2
- package/dist/{chunk-75TVYCQW.js → chunk-XSC3BCN3.js} +5 -5
- package/dist/{chunk-ME6MF2N2.js → chunk-YCR6ZYTE.js} +1 -1
- package/dist/{chunk-LD7SXICE.js → chunk-ZI7YHV6I.js} +5 -5
- package/dist/{chunk-E3PNZDPH.js → chunk-ZQSSO7LO.js} +33 -1
- package/dist/{chunk-T6PPK3T6.js → chunk-ZULZS2I6.js} +385 -407
- package/dist/index.js +6508 -5413
- package/dist/mcp/analyze-cli.js +9 -9
- package/dist/mcp/cli.js +39 -38
- package/dist/mcp/server.js +602 -345
- package/dist/mcp/worker.js +57 -58
- package/dist/probes/installer.js +19 -17
- package/docs/architecture.md +113 -0
- package/docs/ast-grep_rules_catalog.md +2 -2
- package/docs/ci.md +18 -4
- package/docs/defect-shapes.md +41 -3
- package/docs/dependencies.md +10 -10
- package/docs/features.md +3 -3
- package/docs/invariants/dispatch-runners.md +13 -1
- package/docs/invariants/lsp-trust-exec.md +19 -0
- package/docs/language-coverage.md +39 -0
- package/docs/lsp-capability-matrix.md +10 -4
- package/docs/lsp-idle-eviction.md +1 -1
- package/docs/pi-lens-fixer.md +4 -0
- package/docs/pi-lens-merge-policy.md +1 -1
- package/docs/pi-lens-reviewer.md +4 -5
- package/docs/pi-lens-subagent.md +5 -2
- package/docs/prose-standard.md +112 -0
- package/docs/servercapabilities.md +1 -1
- package/docs/usage.md +50 -0
- package/package.json +1 -1
- package/rules/ast-grep-rules/rule-tests/array-callback-return-js-test.yml +23 -0
- package/rules/ast-grep-rules/rule-tests/array-callback-return-test.yml +23 -0
- package/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-js-test.yml +8 -0
- package/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-test.yml +8 -0
- package/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-js-test.yml +16 -0
- package/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-test.yml +16 -0
- package/rules/ast-grep-rules/rules/array-callback-return-js.yml +8 -0
- package/rules/ast-grep-rules/rules/array-callback-return.yml +8 -0
- package/rules/ast-grep-rules/rules/no-negation-in-equality-check-js.yml +17 -5
- package/rules/ast-grep-rules/rules/no-negation-in-equality-check.yml +17 -5
- package/rules/ast-grep-rules/rules/unchecked-throwing-call-js.yml +8 -1
- package/rules/ast-grep-rules/rules/unchecked-throwing-call.yml +8 -1
- package/rules/tree-sitter-queries/typescript/ts-react-antipatterns.yml +8 -0
- package/dist/chunk-3VWEZ6H2.js +0 -72
- package/dist/chunk-7KWI5UHL.js +0 -28
- package/dist/chunk-7M64NTAK.js +0 -38
- package/dist/chunk-BEIPWPVR.js +0 -1037
- package/dist/chunk-D7OEGXDX.js +0 -2417
- package/dist/chunk-KUDUKKQE.js +0 -89
- package/dist/chunk-TM3A3K7T.js +0 -28
- package/dist/chunk-VD7MQFEV.js +0 -56
- package/dist/chunk-YLHJWAQS.js +0 -256
- package/dist/chunk-YULIERZW.js +0 -27
|
@@ -2,18 +2,18 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
computeImpactCascade,
|
|
4
4
|
computeTransitiveImpact
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HIJ4CHFF.js";
|
|
6
6
|
import "./chunk-PKLB2XJL.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-JGUDT5KD.js";
|
|
8
|
+
import "./chunk-KNSOA43J.js";
|
|
9
|
+
import "./chunk-3PO4YYOX.js";
|
|
10
|
+
import "./chunk-CQY2HEH7.js";
|
|
11
|
+
import "./chunk-PQF6YGYB.js";
|
|
12
|
+
import "./chunk-LOEJFTF2.js";
|
|
13
|
+
import "./chunk-W26QZ3OM.js";
|
|
14
|
+
import "./chunk-NHA5K226.js";
|
|
15
15
|
import "./chunk-S26LC76R.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-7CLWC2UH.js";
|
|
17
17
|
import "./chunk-LJDODBBZ.js";
|
|
18
18
|
import "./chunk-WLD6BGON.js";
|
|
19
19
|
import "./chunk-NXL4FFQQ.js";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
getStartupScanMaxSourceFilesDerived
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ADYQRETD.js";
|
|
5
5
|
import {
|
|
6
6
|
shouldRecurseIntoDir,
|
|
7
7
|
walkTreeStackAsync,
|
|
8
8
|
walkTreeStackSync
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-74AMPWNC.js";
|
|
10
10
|
import {
|
|
11
11
|
getProjectIgnoreMatcher
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3PO4YYOX.js";
|
|
13
13
|
import {
|
|
14
14
|
isJstsFactFile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CQY2HEH7.js";
|
|
16
16
|
import {
|
|
17
17
|
getDirectoryMarkers,
|
|
18
18
|
registerWorkspaceTopologyReset
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-LOEJFTF2.js";
|
|
20
20
|
import {
|
|
21
21
|
lazyEnvNumber
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7CLWC2UH.js";
|
|
23
23
|
import {
|
|
24
24
|
BoundedLruCache,
|
|
25
25
|
isAtOrAboveHomeDir,
|
|
@@ -1,7 +1,7 @@
|
|
|
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-NHA5K226.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearestMarkerRoot,
|
|
7
7
|
realpathOrResolve,
|
|
@@ -2,10 +2,10 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
getGlobalPiLensDir,
|
|
4
4
|
safeSpawnAsync
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3PO4YYOX.js";
|
|
6
6
|
import {
|
|
7
7
|
createSingleFlight
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5JB4WENL.js";
|
|
9
9
|
|
|
10
10
|
// dist/clients/tool-probe.js
|
|
11
11
|
import * as fs from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
withTreeSitterRoot
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-37IDWT6O.js";
|
|
5
5
|
|
|
6
6
|
// dist/clients/dispatch/facts/tree-sitter-facts.js
|
|
7
7
|
var withFactTree = withTreeSitterRoot;
|
|
@@ -2,25 +2,24 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
getSecretsLaneAllowlistPaths,
|
|
4
4
|
isUnderSecretsLaneScratchTree,
|
|
5
|
-
nestedWorktreeOffsets
|
|
6
|
-
|
|
5
|
+
nestedWorktreeOffsets,
|
|
6
|
+
rootPathRegexSource
|
|
7
|
+
} from "./chunk-S6MCMD27.js";
|
|
7
8
|
import {
|
|
8
9
|
SecurityScanClient
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZI7YHV6I.js";
|
|
10
11
|
import {
|
|
11
12
|
parseReportJson
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-INBK3HIT.js";
|
|
13
14
|
import {
|
|
14
15
|
collectTrackedFiles,
|
|
15
16
|
collectUntrackedIgnoredIds,
|
|
16
17
|
safeSpawnAsync
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import {
|
|
19
|
-
escapeRegExp
|
|
20
|
-
} from "./chunk-AGEQRJ5A.js";
|
|
18
|
+
} from "./chunk-3PO4YYOX.js";
|
|
21
19
|
import {
|
|
22
20
|
normalizeEphemeralMapKey,
|
|
23
21
|
normalizeMapKey,
|
|
22
|
+
realpathOrResolve,
|
|
24
23
|
relativeInside,
|
|
25
24
|
walkUpDirs
|
|
26
25
|
} from "./chunk-WLD6BGON.js";
|
|
@@ -56,14 +55,13 @@ var PLACEHOLDER_SECRET_REGEXES = [
|
|
|
56
55
|
String.raw`(?i)^(changeme|change[-_]me|example|placeholder|dummy|fake|redacted|xxxxxxxx)$`
|
|
57
56
|
];
|
|
58
57
|
function worktreeAllowlistPath(worktree) {
|
|
59
|
-
|
|
60
|
-
return `^${segments.join("[/\\\\]")}(?:[/\\\\].*)?$`;
|
|
58
|
+
return `^${rootPathRegexSource(worktree)}(?:[/\\\\].*)?$`;
|
|
61
59
|
}
|
|
62
60
|
function writeScopedGitleaksConfig(outDir, cwd) {
|
|
63
61
|
const localConfig = findLocalGitleaksConfig(cwd);
|
|
64
62
|
const extendLine = localConfig ? `path = ${JSON.stringify(localConfig)}` : "useDefault = true";
|
|
65
63
|
const pathPatterns = [
|
|
66
|
-
...getSecretsLaneAllowlistPaths(),
|
|
64
|
+
...getSecretsLaneAllowlistPaths(cwd),
|
|
67
65
|
...nestedWorktreeOffsets(cwd).map((offset) => worktreeAllowlistPath(path.join(cwd, offset)))
|
|
68
66
|
].map((p) => ` ${JSON.stringify(p)},`).join("\n");
|
|
69
67
|
const regexPatterns = PLACEHOLDER_SECRET_REGEXES.map((r) => ` ${JSON.stringify(r)},`).join("\n");
|
|
@@ -165,7 +163,7 @@ var GitleaksClient = class _GitleaksClient extends SecurityScanClient {
|
|
|
165
163
|
* `GovulncheckClient`).
|
|
166
164
|
*/
|
|
167
165
|
async scan(cwd, options) {
|
|
168
|
-
const targetDir =
|
|
166
|
+
const targetDir = realpathOrResolve(cwd);
|
|
169
167
|
const scannedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
170
168
|
const requireSignal = options?.requireSignal ?? true;
|
|
171
169
|
if (requireSignal && !_GitleaksClient.hasGitleaksSignal(targetDir)) {
|
|
@@ -232,10 +230,14 @@ var GitleaksClient = class _GitleaksClient extends SecurityScanClient {
|
|
|
232
230
|
}
|
|
233
231
|
};
|
|
234
232
|
function isInsideNestedGitRepository(file, cwd) {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
if (relativeInside(root, absoluteFile) === void 0)
|
|
238
|
-
|
|
233
|
+
let root = path.resolve(cwd);
|
|
234
|
+
let absoluteFile = path.isAbsolute(file) ? path.resolve(file) : path.resolve(root, file);
|
|
235
|
+
if (relativeInside(root, absoluteFile) === void 0) {
|
|
236
|
+
root = realpathOrResolve(root);
|
|
237
|
+
absoluteFile = realpathOrResolve(absoluteFile);
|
|
238
|
+
if (relativeInside(root, absoluteFile) === void 0)
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
239
241
|
for (const directory of walkUpDirs(path.dirname(absoluteFile), {
|
|
240
242
|
spelling: true
|
|
241
243
|
})) {
|
|
@@ -259,7 +261,7 @@ async function classifyAndFilterFindings(findings, cwd) {
|
|
|
259
261
|
]);
|
|
260
262
|
const classified = [];
|
|
261
263
|
for (const finding of findings) {
|
|
262
|
-
if (isUnderSecretsLaneScratchTree(finding.file)) {
|
|
264
|
+
if (isUnderSecretsLaneScratchTree(finding.file, cwd)) {
|
|
263
265
|
classified.push({ ...finding, pathStatus: "scratch" });
|
|
264
266
|
continue;
|
|
265
267
|
}
|
|
@@ -2,14 +2,17 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
createAvailabilityProbeFlight,
|
|
4
4
|
probeToolAsync
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KXGTLAUW.js";
|
|
6
|
+
import {
|
|
7
|
+
registerBackgroundWriteDrain
|
|
8
|
+
} from "./chunk-UYXV5NIS.js";
|
|
6
9
|
import {
|
|
7
10
|
classifyFinderFailure,
|
|
8
11
|
createAvailabilityLatch,
|
|
9
12
|
isTransientDecision,
|
|
10
13
|
logAvailabilityDecision,
|
|
11
14
|
startHostStallSampler
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6GLMMGCX.js";
|
|
13
16
|
import {
|
|
14
17
|
NODE_MODULES_BIN_DIRS,
|
|
15
18
|
createGenerationSource,
|
|
@@ -17,14 +20,15 @@ import {
|
|
|
17
20
|
projectLocalBinDirs,
|
|
18
21
|
recordProjectCommandRefusal,
|
|
19
22
|
safeSpawnAsync
|
|
20
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-3PO4YYOX.js";
|
|
21
24
|
import {
|
|
22
|
-
getProjectTrustState
|
|
23
|
-
|
|
25
|
+
getProjectTrustState,
|
|
26
|
+
withDeadline
|
|
27
|
+
} from "./chunk-W26QZ3OM.js";
|
|
24
28
|
import {
|
|
25
29
|
logExtension,
|
|
26
30
|
recordDegradationOnce
|
|
27
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-NHA5K226.js";
|
|
28
32
|
import {
|
|
29
33
|
isAtOrAboveHomeDir,
|
|
30
34
|
isUnderDir,
|
|
@@ -246,6 +250,16 @@ async function allAvailableGlobalBinDirs(onTransient) {
|
|
|
246
250
|
}
|
|
247
251
|
return dirs;
|
|
248
252
|
}
|
|
253
|
+
var primesRunning = 0;
|
|
254
|
+
var primesSettled = Promise.resolve();
|
|
255
|
+
var PRIME_SETTLE_BOUND_MS = 1e4;
|
|
256
|
+
function settlePrimedGlobalBinDirsForTests() {
|
|
257
|
+
return withDeadline(primesSettled, {
|
|
258
|
+
ms: PRIME_SETTLE_BOUND_MS,
|
|
259
|
+
onTimeout: "undefined"
|
|
260
|
+
}).then(() => primesRunning > 0 ? "global-bin-dir prime still running after the bounded wait" : void 0);
|
|
261
|
+
}
|
|
262
|
+
registerBackgroundWriteDrain(settlePrimedGlobalBinDirsForTests);
|
|
249
263
|
async function findGlobalBinary(command, windowsExt = ".cmd") {
|
|
250
264
|
const candidates = onWindows() ? [`${command}${windowsExt}`, `${command}.exe`, command] : [command];
|
|
251
265
|
try {
|
|
@@ -265,6 +279,9 @@ async function findGlobalBinary(command, windowsExt = ".cmd") {
|
|
|
265
279
|
}
|
|
266
280
|
return void 0;
|
|
267
281
|
}
|
|
282
|
+
function isLocalBinTrustRefusal(value) {
|
|
283
|
+
return typeof value === "object" && value !== null && value.kind === "refused-by-trust";
|
|
284
|
+
}
|
|
268
285
|
function localBinPath(value) {
|
|
269
286
|
return typeof value === "string" ? value : void 0;
|
|
270
287
|
}
|
|
@@ -354,6 +371,7 @@ export {
|
|
|
354
371
|
updateArgs,
|
|
355
372
|
allAvailableGlobalBinDirs,
|
|
356
373
|
findGlobalBinary,
|
|
374
|
+
isLocalBinTrustRefusal,
|
|
357
375
|
localBinPath,
|
|
358
376
|
isProjectLocalBinPath,
|
|
359
377
|
commandSearchReachesProject,
|
|
@@ -2,7 +2,7 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
getProcessSingleton,
|
|
4
4
|
logLatency
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7CLWC2UH.js";
|
|
6
6
|
|
|
7
7
|
// dist/clients/lsp/workspace-sweep-hold.js
|
|
8
8
|
var SWEEP_IDLE_SAFETY_MARGIN_MS = 6e4;
|