pi-lens 4.4.9 → 4.4.10
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 +80 -0
- package/README.md +2 -0
- package/dist/{chunk-CM6BDY4E.js → chunk-2ADRLTM2.js} +2 -2
- package/dist/{chunk-XO756WE5.js → chunk-2LVJQU3I.js} +15 -14
- package/dist/{chunk-W5E72HJA.js → chunk-3FRI5H4T.js} +13 -1
- package/dist/{chunk-N5CEGQPG.js → chunk-3HM4BUHR.js} +11 -11
- package/dist/{chunk-UAKO2M6B.js → chunk-3QWVOBZJ.js} +30 -30
- package/dist/{chunk-QB7T2PHK.js → chunk-46TQJSUE.js} +3 -1
- package/dist/{chunk-ZZN74OGD.js → chunk-4ITEFRDH.js} +3 -2
- package/dist/{chunk-C3YRO3EU.js → chunk-4NCDHTFI.js} +6 -6
- package/dist/{chunk-G22UNQID.js → chunk-6I44EDNQ.js} +10 -10
- package/dist/{chunk-OUYAUXAT.js → chunk-6MDM5MQT.js} +169 -56
- package/dist/{chunk-CDFJF5YD.js → chunk-7JX3RNG4.js} +1 -1
- package/dist/{chunk-PIIUNJIT.js → chunk-7WJ55KBN.js} +1 -1
- package/dist/{chunk-ZMMHHXSW.js → chunk-A5TEJZGJ.js} +1 -0
- package/dist/{chunk-HEA3EM23.js → chunk-ALIZWXHZ.js} +8 -8
- package/dist/{chunk-MQ4PPCJB.js → chunk-AON2QIJF.js} +32 -36
- package/dist/{chunk-DGKFWQK4.js → chunk-B2YUE6YD.js} +7 -7
- package/dist/{chunk-GQTQUNCG.js → chunk-B6HXETWY.js} +20 -20
- package/dist/{chunk-KR5VGMVT.js → chunk-BDR5MEZY.js} +9 -9
- package/dist/{chunk-MRLH4MYU.js → chunk-BGLS5SDN.js} +1 -1
- package/dist/{chunk-PRHYIA6X.js → chunk-BRESRQBE.js} +4 -4
- package/dist/{chunk-5GEYJJHG.js → chunk-C6AODRNU.js} +7 -7
- package/dist/{chunk-ZZSJAR76.js → chunk-CTB5BAJI.js} +24 -11
- package/dist/{chunk-IICERRFF.js → chunk-CYUJB552.js} +4 -4
- package/dist/{chunk-THYHUIDR.js → chunk-CZAWWXP6.js} +1 -1
- package/dist/{chunk-QJJKOHLH.js → chunk-DBS736MA.js} +27 -27
- package/dist/{chunk-XLAI7UYY.js → chunk-DOUAWKLO.js} +8 -8
- package/dist/{chunk-LAHHGNAY.js → chunk-DVRJBQOJ.js} +12 -12
- package/dist/{chunk-KV6GQOGN.js → chunk-E4VXKTBR.js} +28 -28
- package/dist/{chunk-XKFO2SZV.js → chunk-F6FT6BVQ.js} +26 -26
- package/dist/{chunk-VWLSU3XV.js → chunk-FCQSZQAT.js} +1 -1
- package/dist/{chunk-X5BJ3G2P.js → chunk-FOEPIX76.js} +1 -1
- package/dist/{chunk-F6BEQWAK.js → chunk-GMC4ZGYR.js} +4 -4
- package/dist/{chunk-TOE2RRCS.js → chunk-GTTMQ6XB.js} +1 -1
- package/dist/{chunk-5YSEQHJN.js → chunk-GUGKKGG7.js} +1 -1
- package/dist/{chunk-OSEKJEUU.js → chunk-GVWIU7M7.js} +1 -1
- package/dist/{chunk-TMNUTMT5.js → chunk-H65TYP6V.js} +25 -4
- package/dist/{chunk-7R5GZIA6.js → chunk-HILZE4BQ.js} +5 -4
- package/dist/{chunk-HYSKJMZK.js → chunk-HSYFLOZY.js} +2 -2
- package/dist/{chunk-V2WDBOLZ.js → chunk-I32RSMH6.js} +7 -7
- package/dist/chunk-I74RQGKA.js +88 -0
- package/dist/{chunk-RNXOWDM6.js → chunk-IDCTDKIA.js} +3 -3
- package/dist/{chunk-TYHPVE5H.js → chunk-IK4YS3KC.js} +8 -8
- package/dist/{chunk-ZCQBNPRH.js → chunk-IL6PIV33.js} +2 -2
- package/dist/{chunk-6GPB3JLL.js → chunk-J6BR5XN2.js} +2 -2
- package/dist/{chunk-UC5AXW5Z.js → chunk-JKOZ2Z4U.js} +6 -6
- package/dist/{chunk-WSSLVMDA.js → chunk-JZQGRARR.js} +7 -7
- package/dist/{chunk-7UTSNTWM.js → chunk-K6WIBVMK.js} +4 -3
- package/dist/{chunk-QVBOXT3L.js → chunk-KDCIG23C.js} +6 -6
- package/dist/{chunk-NOWH2VA2.js → chunk-KFRDFAOE.js} +4 -4
- package/dist/{chunk-NMUSOZ2D.js → chunk-KJ3AHOCK.js} +6 -6
- package/dist/{chunk-E65WJVI5.js → chunk-KSTQ4VXT.js} +5 -5
- package/dist/{chunk-4ENEJHF4.js → chunk-MAD4QJTP.js} +9 -9
- package/dist/{chunk-KXMJLOZF.js → chunk-NBM7PNBP.js} +7 -7
- package/dist/{chunk-7YTRG6YW.js → chunk-NE4EFHJX.js} +1 -1
- package/dist/{chunk-AACN5GNE.js → chunk-NPNFGYLV.js} +3 -1
- package/dist/{chunk-H3BVMK47.js → chunk-OPFNQBS5.js} +5 -5
- package/dist/{chunk-WTB4GKMH.js → chunk-OTSTS7L2.js} +11 -2
- package/dist/{chunk-JUZ67QZQ.js → chunk-PTSA6QKL.js} +7 -7
- package/dist/{chunk-ZPM7ZIFL.js → chunk-Q2VCKC3X.js} +3 -3
- package/dist/{chunk-2VZ3VN3N.js → chunk-QHOTTC4A.js} +2 -2
- package/dist/{chunk-L7O774U7.js → chunk-QL37SGTS.js} +105 -13
- package/dist/{chunk-FRUBVFXV.js → chunk-QMV2APEH.js} +27 -27
- package/dist/{chunk-L4Y3ROKQ.js → chunk-QSCZAP24.js} +3 -3
- package/dist/{chunk-IILEH3ZC.js → chunk-QUPYLQA4.js} +4 -4
- package/dist/{chunk-3NPWO5UO.js → chunk-QUQY3IME.js} +4 -4
- package/dist/{chunk-FGNSESAC.js → chunk-QWTHFFU6.js} +8 -8
- package/dist/{chunk-EKNYSXFB.js → chunk-RQRKIRFY.js} +5 -5
- package/dist/{chunk-NCLO6E6N.js → chunk-S3WFVG5P.js} +14 -21
- package/dist/{chunk-RTFMDIKV.js → chunk-SG2JQ2YP.js} +1 -1
- package/dist/{chunk-VO4JFPTV.js → chunk-SJQUWQR6.js} +2 -2
- package/dist/{chunk-SLSMJPEF.js → chunk-SKVNHCT5.js} +32 -32
- package/dist/{chunk-3HTZDY3C.js → chunk-TJQSYX3J.js} +3 -3
- package/dist/{chunk-RNJFRXEN.js → chunk-TLWFZ66Y.js} +3 -3
- package/dist/{chunk-LWOM6LVS.js → chunk-TN5CWX5D.js} +26 -26
- package/dist/{chunk-UTJP6WOS.js → chunk-TQHOKMVZ.js} +11 -11
- package/dist/{chunk-N56BNAA6.js → chunk-TYHOEX4V.js} +15 -15
- package/dist/{chunk-QP33NKYC.js → chunk-UNBRHPHJ.js} +10 -10
- package/dist/{chunk-EY6LY2HO.js → chunk-UOO4D2TK.js} +11 -11
- package/dist/{chunk-47UCC4MM.js → chunk-UY745U35.js} +1 -1
- package/dist/{chunk-ZDMFGACN.js → chunk-V7F7JHS5.js} +71 -55
- package/dist/{chunk-PBZNYHMM.js → chunk-VGTBLTPN.js} +4 -4
- package/dist/{chunk-L6WBJGQS.js → chunk-VPFRU5IG.js} +1 -1
- package/dist/{chunk-Q6JQKWPK.js → chunk-VS2L7QDI.js} +8 -8
- package/dist/{chunk-PXQ45SGD.js → chunk-W4CUK5G6.js} +2 -2
- package/dist/{chunk-MKPDIAZH.js → chunk-WAA63ZJV.js} +1 -1
- package/dist/{chunk-J3Q2NYJR.js → chunk-WS3UFJOU.js} +1 -1
- package/dist/{chunk-T5QSLSMM.js → chunk-XAFZJEXY.js} +16 -16
- package/dist/{chunk-YOXCCJDF.js → chunk-XPGH5O74.js} +56 -46
- package/dist/{chunk-UXTQ3QPD.js → chunk-Y3EHLUPL.js} +2 -2
- package/dist/{chunk-HSOBIN22.js → chunk-YF4G5NN5.js} +2 -2
- package/dist/{chunk-SIQHOB6P.js → chunk-YQA34KAF.js} +7 -7
- package/dist/{chunk-V67D6TMU.js → chunk-YT2VR4SL.js} +4 -4
- package/dist/{chunk-CJS6WE66.js → chunk-ZOPXB2KK.js} +11 -11
- package/dist/{chunk-H6FLQ5NW.js → chunk-ZPFLHB3R.js} +11 -11
- package/dist/{chunk-ZVCDHYWZ.js → chunk-ZZDVGCGG.js} +6 -6
- package/dist/index.js +537 -269
- package/dist/mcp/analyze-cli.js +6 -6
- package/dist/mcp/cli.js +32 -32
- package/dist/mcp/server.js +109 -109
- package/dist/mcp/worker.js +49 -49
- package/dist/probes/installer.js +13 -13
- package/docs/agent-guide.md +2 -1
- package/docs/agent-tools.md +13 -2
- package/docs/configuration.md +9 -4
- package/docs/defect-shapes.md +15 -1
- package/docs/features.md +11 -1
- package/docs/globalconfig.md +13 -0
- package/docs/invariants/language-config.md +9 -1
- package/docs/language-coverage.md +66 -0
- package/docs/lsp-capability-matrix.md +66 -20
- package/docs/lsp-idle-eviction.md +17 -13
- package/docs/pi-lens-fixer.md +8 -6
- package/docs/pi-lens-merge-policy.md +5 -1
- package/docs/pi-lens-release.md +3 -2
- package/docs/pi-lens-reviewer.md +52 -11
- package/docs/servercapabilities.md +1 -1
- package/docs/settings.md +7 -4
- package/docs/usage.md +1 -0
- package/package.json +2 -2
- package/scripts/download-grammars.js +10 -0
- package/scripts/grammars.lock.json +7 -0
- package/vendor/grammars/tree-sitter-groovy.wasm +0 -0
- package/dist/chunk-TGQDAG4B.js +0 -88
|
@@ -2,17 +2,17 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
getLazyInstallAttempt,
|
|
4
4
|
tryLazyInstall
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GMC4ZGYR.js";
|
|
6
6
|
import {
|
|
7
7
|
computeImpactCascade
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HSYFLOZY.js";
|
|
9
9
|
import {
|
|
10
10
|
goClient
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QHOTTC4A.js";
|
|
12
12
|
import {
|
|
13
13
|
isTrivyEnabled,
|
|
14
14
|
resolveSeverityFloor
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-OPFNQBS5.js";
|
|
16
16
|
import {
|
|
17
17
|
IN_FLIGHT_REASON,
|
|
18
18
|
NO_ANALYZER_REASON,
|
|
@@ -36,10 +36,10 @@ import {
|
|
|
36
36
|
spawnFailedWithNoOutput,
|
|
37
37
|
unchecked,
|
|
38
38
|
widgetUncheckedReason
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-4ITEFRDH.js";
|
|
40
40
|
import {
|
|
41
41
|
rustClient
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-W4CUK5G6.js";
|
|
43
43
|
import {
|
|
44
44
|
coveringLaneAvailable,
|
|
45
45
|
createAvailabilityChecker,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
resolveToolCommand,
|
|
56
56
|
resolveToolCommandWithInstallFallback,
|
|
57
57
|
resolveVendorToolCommand
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-S3WFVG5P.js";
|
|
59
59
|
import {
|
|
60
60
|
biomeConfigArgs,
|
|
61
61
|
findCompiledClassesDir,
|
|
@@ -74,21 +74,21 @@ import {
|
|
|
74
74
|
hasYamllintConfig,
|
|
75
75
|
markdownlintConfigArgs,
|
|
76
76
|
ruffConfigArgs
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-HILZE4BQ.js";
|
|
78
78
|
import {
|
|
79
79
|
importFactProvider
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-Y3EHLUPL.js";
|
|
81
81
|
import {
|
|
82
82
|
functionFactProvider
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-2ADRLTM2.js";
|
|
84
84
|
import {
|
|
85
85
|
extractFactsFromTree
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-GTTMQ6XB.js";
|
|
87
87
|
import {
|
|
88
88
|
buildOrUpdateGraph,
|
|
89
89
|
clearReviewGraphWorkspaceCache,
|
|
90
90
|
fileContentProvider
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-2LVJQU3I.js";
|
|
92
92
|
import {
|
|
93
93
|
MAX_BLOCKING_RULE_COMPLEXITY,
|
|
94
94
|
PRIMARY_UNAVAILABLE_CAUSE,
|
|
@@ -124,11 +124,11 @@ import {
|
|
|
124
124
|
tryWarmAttachedCodeActions,
|
|
125
125
|
tryWarmAttachedDiagnostics,
|
|
126
126
|
warmAnswerBinding
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-6MDM5MQT.js";
|
|
128
128
|
import {
|
|
129
129
|
ANY_POSITION,
|
|
130
130
|
retainRecordedFindings
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-FCQSZQAT.js";
|
|
132
132
|
import {
|
|
133
133
|
mapWithConcurrency
|
|
134
134
|
} from "./chunk-XIMYZ3JA.js";
|
|
@@ -144,7 +144,7 @@ import {
|
|
|
144
144
|
resolveSessionConfigRoot,
|
|
145
145
|
resolveShellFileDialect,
|
|
146
146
|
runnerIdentityPopulated
|
|
147
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-XPGH5O74.js";
|
|
148
148
|
import {
|
|
149
149
|
augmentPythonEnvironment,
|
|
150
150
|
describePythonCompileWithheld,
|
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
emitBounded,
|
|
154
154
|
partitionOutrankedPythonCompileVerdicts,
|
|
155
155
|
recordPythonCompileVerdictDrop
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-YT2VR4SL.js";
|
|
157
157
|
import {
|
|
158
158
|
scannerReportParentDir
|
|
159
159
|
} from "./chunk-LT62P654.js";
|
|
@@ -161,17 +161,17 @@ import {
|
|
|
161
161
|
loadProjectSnapshot,
|
|
162
162
|
readJsonCache,
|
|
163
163
|
readJsonCacheAsync
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-BRESRQBE.js";
|
|
165
165
|
import {
|
|
166
166
|
RUNTIME_CONFIG,
|
|
167
167
|
exceedsLspSyncLimits,
|
|
168
168
|
getRunnerTimeoutFloorMs,
|
|
169
169
|
loadAstGrepNapi
|
|
170
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-QL37SGTS.js";
|
|
171
171
|
import {
|
|
172
172
|
buildModuleGraph,
|
|
173
173
|
clearModuleGraphCache
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-K6WIBVMK.js";
|
|
175
175
|
import {
|
|
176
176
|
BUNDLED_QUERIES_ROOT,
|
|
177
177
|
classifyTreeSitterWasmError,
|
|
@@ -191,10 +191,13 @@ import {
|
|
|
191
191
|
ruleFilesForLanguage,
|
|
192
192
|
ruleSourceLanguages,
|
|
193
193
|
walk
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-CTB5BAJI.js";
|
|
195
195
|
import {
|
|
196
196
|
resolvePackagePath
|
|
197
197
|
} from "./chunk-QGITU23N.js";
|
|
198
|
+
import {
|
|
199
|
+
isTypeScriptFile
|
|
200
|
+
} from "./chunk-OTSTS7L2.js";
|
|
198
201
|
import {
|
|
199
202
|
stripAnsi
|
|
200
203
|
} from "./chunk-6HWVI6MI.js";
|
|
@@ -206,36 +209,36 @@ import {
|
|
|
206
209
|
scheduleWordIndexPersist,
|
|
207
210
|
setWordIndexPublishedListener,
|
|
208
211
|
updateWordIndexDocumentForEdit
|
|
209
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-NBM7PNBP.js";
|
|
210
213
|
import {
|
|
211
214
|
WARM_CODE_ACTION_LOOKUP_LIMIT,
|
|
212
215
|
contentHash
|
|
213
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-YF4G5NN5.js";
|
|
214
217
|
import {
|
|
215
218
|
resolveRunnerPath,
|
|
216
219
|
toRunnerDisplayPath
|
|
217
220
|
} from "./chunk-W7TY6HYX.js";
|
|
218
221
|
import {
|
|
219
222
|
withBudget
|
|
220
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-WAA63ZJV.js";
|
|
221
224
|
import {
|
|
222
225
|
findCommandOnPath,
|
|
223
226
|
isSpawnableCommand
|
|
224
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-AON2QIJF.js";
|
|
225
228
|
import {
|
|
226
229
|
logRunnerAdvisoryOnce,
|
|
227
230
|
resolveRunnerCwd,
|
|
228
231
|
resolveRunnerCwdWithReason
|
|
229
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-TLWFZ66Y.js";
|
|
230
233
|
import {
|
|
231
234
|
findLocalBinUpwards,
|
|
232
235
|
localBinPath
|
|
233
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-KSTQ4VXT.js";
|
|
234
237
|
import {
|
|
235
238
|
createAvailabilityProbeFlight,
|
|
236
239
|
getIsolatedNpxSpawnOptions,
|
|
237
240
|
probeToolAsync
|
|
238
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-VPFRU5IG.js";
|
|
239
242
|
import {
|
|
240
243
|
classifyProbeFailure,
|
|
241
244
|
createAvailabilityLatch,
|
|
@@ -245,12 +248,12 @@ import {
|
|
|
245
248
|
logAvailabilityDecision,
|
|
246
249
|
startHostStallSampler,
|
|
247
250
|
transientRetryDelayMs
|
|
248
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-NPNFGYLV.js";
|
|
249
252
|
import {
|
|
250
253
|
getLspCapableKinds,
|
|
251
254
|
getPrimaryDispatchGroup,
|
|
252
255
|
resolveLanguageRootForFile
|
|
253
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-TJQSYX3J.js";
|
|
254
257
|
import {
|
|
255
258
|
getGlobalPiLensDir,
|
|
256
259
|
getProjectDataDir,
|
|
@@ -262,7 +265,7 @@ import {
|
|
|
262
265
|
realIsPidAlive,
|
|
263
266
|
resolvePiLensFlag,
|
|
264
267
|
safeSpawnAsync
|
|
265
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-H65TYP6V.js";
|
|
266
269
|
import {
|
|
267
270
|
DOTNET_CSHARP_PROJECT_MARKERS,
|
|
268
271
|
DOTNET_CSHARP_SOLUTION_MARKERS,
|
|
@@ -280,7 +283,7 @@ import {
|
|
|
280
283
|
reportPiLensConfigRecords,
|
|
281
284
|
resolveOnePiLensConfigDocument,
|
|
282
285
|
resolvePiLensConfig
|
|
283
|
-
} from "./chunk-
|
|
286
|
+
} from "./chunk-FOEPIX76.js";
|
|
284
287
|
import {
|
|
285
288
|
findNearestDirWithAnyBasename,
|
|
286
289
|
findNearestDirWithMarker,
|
|
@@ -292,13 +295,13 @@ import {
|
|
|
292
295
|
projectTrustDenialReason,
|
|
293
296
|
truncatedByOutputCap,
|
|
294
297
|
writeFileAtomic
|
|
295
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-7WJ55KBN.js";
|
|
296
299
|
import {
|
|
297
300
|
createSubsystemLogger,
|
|
298
301
|
incrementDegradationCount,
|
|
299
302
|
logExtension,
|
|
300
303
|
recordDegradationOnce
|
|
301
|
-
} from "./chunk-
|
|
304
|
+
} from "./chunk-3FRI5H4T.js";
|
|
302
305
|
import {
|
|
303
306
|
createNdjsonLogger,
|
|
304
307
|
getGlobalPiLensLogDir,
|
|
@@ -311,7 +314,7 @@ import {
|
|
|
311
314
|
import {
|
|
312
315
|
FactStore,
|
|
313
316
|
setFactStoreEvictionReporter
|
|
314
|
-
} from "./chunk-
|
|
317
|
+
} from "./chunk-A5TEJZGJ.js";
|
|
315
318
|
import {
|
|
316
319
|
BoundedFifoMap,
|
|
317
320
|
BoundedLruCache,
|
|
@@ -1165,6 +1168,11 @@ function configOwnerFor(filePath, root) {
|
|
|
1165
1168
|
function resolveDispatchPolicyConfigForFile(filePath, root) {
|
|
1166
1169
|
return resolveDispatchPolicyConfig(configOwnerFor(filePath, root));
|
|
1167
1170
|
}
|
|
1171
|
+
function ruleThresholdFromResolution(resolution, ruleId) {
|
|
1172
|
+
const rules2 = resolution.value.rules;
|
|
1173
|
+
const threshold = rules2?.[ruleId]?.threshold;
|
|
1174
|
+
return typeof threshold === "number" && threshold > 0 ? threshold : void 0;
|
|
1175
|
+
}
|
|
1168
1176
|
function rulePolicyMapFromResolution(resolution, root) {
|
|
1169
1177
|
const rules2 = resolution.value.rules;
|
|
1170
1178
|
const map = rulePolicyMapFromConfig(rules2);
|
|
@@ -2500,6 +2508,9 @@ function createDispatchContext(filePath, cwd, pi, facts, blockingOnly, modifiedR
|
|
|
2500
2508
|
facts,
|
|
2501
2509
|
projectConfig,
|
|
2502
2510
|
rulePolicy,
|
|
2511
|
+
// Same resolution as `rulePolicy`, so a rule threshold follows the
|
|
2512
|
+
// edited file's nearest `.pi-lens.json` field by field (#5292).
|
|
2513
|
+
ruleThreshold: (ruleId) => ruleThresholdFromResolution(policyConfig, ruleId),
|
|
2503
2514
|
...disabledRunnerIds !== void 0 && { disabledRunnerIds },
|
|
2504
2515
|
blockingOnly,
|
|
2505
2516
|
modifiedRanges,
|
|
@@ -3341,14 +3352,14 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
|
|
|
3341
3352
|
provider: ctx.telemetryProvider
|
|
3342
3353
|
};
|
|
3343
3354
|
if (fixedItems.length > 0) {
|
|
3344
|
-
import("./chunk-
|
|
3355
|
+
import("./chunk-KFRDFAOE.js").then(({ appendToWorklog }) => {
|
|
3345
3356
|
appendToWorklog(ctx.cwd, fixedItems, true, worklogIdentity);
|
|
3346
3357
|
}).catch(() => {
|
|
3347
3358
|
});
|
|
3348
3359
|
}
|
|
3349
3360
|
const fixableWarnings = warnings.filter((d) => d.fixable);
|
|
3350
3361
|
if (fixableWarnings.length > 0) {
|
|
3351
|
-
import("./chunk-
|
|
3362
|
+
import("./chunk-KFRDFAOE.js").then(({ appendToWorklog }) => {
|
|
3352
3363
|
appendToWorklog(ctx.cwd, fixableWarnings, false, worklogIdentity);
|
|
3353
3364
|
}).catch(() => {
|
|
3354
3365
|
});
|
|
@@ -3476,7 +3487,7 @@ function looksLikeDiagnosticCodePath(value) {
|
|
|
3476
3487
|
const text = value.trim();
|
|
3477
3488
|
if (!text)
|
|
3478
3489
|
return false;
|
|
3479
|
-
const base = path4.basename(text
|
|
3490
|
+
const base = path4.basename(toPosix(text));
|
|
3480
3491
|
if (/^lsp:\d+(?::\d+)?$/i.test(text) || /^lsp:\d+(?::\d+)?$/i.test(base)) {
|
|
3481
3492
|
return true;
|
|
3482
3493
|
}
|
|
@@ -5180,7 +5191,7 @@ var commentFactProvider = {
|
|
|
5180
5191
|
provides: ["file.comments"],
|
|
5181
5192
|
requires: ["file.content"],
|
|
5182
5193
|
appliesTo(ctx) {
|
|
5183
|
-
return
|
|
5194
|
+
return isTypeScriptFile(ctx.filePath);
|
|
5184
5195
|
},
|
|
5185
5196
|
async run(ctx, store) {
|
|
5186
5197
|
await extractFactsFromTree(ctx, store, commentFactProvider.id, { "file.comments": [] }, (root) => {
|
|
@@ -5243,7 +5254,7 @@ var tryCatchFactProvider = {
|
|
|
5243
5254
|
provides: ["file.tryCatchSummaries"],
|
|
5244
5255
|
requires: ["file.content"],
|
|
5245
5256
|
appliesTo(ctx) {
|
|
5246
|
-
return
|
|
5257
|
+
return isTypeScriptFile(ctx.filePath);
|
|
5247
5258
|
},
|
|
5248
5259
|
async run(ctx, store) {
|
|
5249
5260
|
await extractFactsFromTree(ctx, store, tryCatchFactProvider.id, { "file.tryCatchSummaries": [] }, (root) => {
|
|
@@ -5402,6 +5413,7 @@ function normalizeBiomeSeverity(raw) {
|
|
|
5402
5413
|
return "hint";
|
|
5403
5414
|
case "warning":
|
|
5404
5415
|
return "warning";
|
|
5416
|
+
case void 0:
|
|
5405
5417
|
default:
|
|
5406
5418
|
return "warning";
|
|
5407
5419
|
}
|
|
@@ -9524,7 +9536,7 @@ var pyrightRunner = {
|
|
|
9524
9536
|
cmd = installedPath;
|
|
9525
9537
|
}
|
|
9526
9538
|
if (!cmd) {
|
|
9527
|
-
const { findCommandAsync } = await import("./chunk-
|
|
9539
|
+
const { findCommandAsync } = await import("./chunk-QUQY3IME.js");
|
|
9528
9540
|
const foundCmd = await findCommandAsync("pyright");
|
|
9529
9541
|
if (foundCmd)
|
|
9530
9542
|
cmd = foundCmd;
|
|
@@ -12306,7 +12318,7 @@ var asyncNoiseRule = {
|
|
|
12306
12318
|
id: "async-noise",
|
|
12307
12319
|
requires: ["file.functionSummaries"],
|
|
12308
12320
|
appliesTo(ctx) {
|
|
12309
|
-
return
|
|
12321
|
+
return isTypeScriptFile(ctx.filePath) && !isTestFile(ctx.filePath);
|
|
12310
12322
|
},
|
|
12311
12323
|
evaluate(ctx, store) {
|
|
12312
12324
|
const summaries = store.getFileFact(ctx.filePath, "file.functionSummaries");
|
|
@@ -12339,7 +12351,7 @@ var asyncUnnecessaryWrapperRule = {
|
|
|
12339
12351
|
id: "async-unnecessary-wrapper",
|
|
12340
12352
|
requires: ["file.functionSummaries"],
|
|
12341
12353
|
appliesTo(ctx) {
|
|
12342
|
-
return
|
|
12354
|
+
return isTypeScriptFile(ctx.filePath);
|
|
12343
12355
|
},
|
|
12344
12356
|
evaluate(ctx, store) {
|
|
12345
12357
|
const fns = store.getFileFact(ctx.filePath, "file.functionSummaries") ?? [];
|
|
@@ -12368,7 +12380,7 @@ var corsWildcardRule = {
|
|
|
12368
12380
|
id: "cors-wildcard",
|
|
12369
12381
|
requires: ["file.content"],
|
|
12370
12382
|
appliesTo(ctx) {
|
|
12371
|
-
return /\.(
|
|
12383
|
+
return isTypeScriptFile(ctx.filePath) || /\.(py|go)$/.test(ctx.filePath);
|
|
12372
12384
|
},
|
|
12373
12385
|
evaluate(ctx, store) {
|
|
12374
12386
|
const content = store.getFileFact(ctx.filePath, "file.content");
|
|
@@ -12414,7 +12426,7 @@ var errorObscuringRule = {
|
|
|
12414
12426
|
id: "error-obscuring",
|
|
12415
12427
|
requires: ["file.tryCatchSummaries"],
|
|
12416
12428
|
appliesTo(ctx) {
|
|
12417
|
-
return
|
|
12429
|
+
return isTypeScriptFile(ctx.filePath);
|
|
12418
12430
|
},
|
|
12419
12431
|
evaluate(ctx, store) {
|
|
12420
12432
|
const summaries = store.getFileFact(ctx.filePath, "file.tryCatchSummaries");
|
|
@@ -12445,7 +12457,7 @@ var errorSwallowingRule = {
|
|
|
12445
12457
|
id: "error-swallowing",
|
|
12446
12458
|
requires: ["file.tryCatchSummaries"],
|
|
12447
12459
|
appliesTo(ctx) {
|
|
12448
|
-
return
|
|
12460
|
+
return isTypeScriptFile(ctx.filePath);
|
|
12449
12461
|
},
|
|
12450
12462
|
evaluate(ctx, store) {
|
|
12451
12463
|
const summaries = store.getFileFact(ctx.filePath, "file.tryCatchSummaries");
|
|
@@ -12518,7 +12530,7 @@ var highComplexityRule = {
|
|
|
12518
12530
|
evaluate(ctx, store) {
|
|
12519
12531
|
const fns = store.getFileFact(ctx.filePath, "file.functionSummaries") ?? [];
|
|
12520
12532
|
const diagnostics = [];
|
|
12521
|
-
const configuredCcThreshold = ctx.
|
|
12533
|
+
const configuredCcThreshold = ctx.ruleThreshold?.("high-complexity");
|
|
12522
12534
|
const activeCcThreshold = configuredCcThreshold ?? DEFAULT_HIGH_COMPLEXITY_THRESHOLD;
|
|
12523
12535
|
for (const f of fns) {
|
|
12524
12536
|
if (isTestSuiteOrganizer(f.outgoingCalls))
|
|
@@ -12554,12 +12566,12 @@ var highFanOutRule = {
|
|
|
12554
12566
|
id: "high-fan-out",
|
|
12555
12567
|
requires: ["file.functionSummaries"],
|
|
12556
12568
|
appliesTo(ctx) {
|
|
12557
|
-
return
|
|
12569
|
+
return isTypeScriptFile(ctx.filePath);
|
|
12558
12570
|
},
|
|
12559
12571
|
evaluate(ctx, store) {
|
|
12560
12572
|
const fns = store.getFileFact(ctx.filePath, "file.functionSummaries") ?? [];
|
|
12561
12573
|
const diagnostics = [];
|
|
12562
|
-
const configuredFanOutThreshold = ctx.
|
|
12574
|
+
const configuredFanOutThreshold = ctx.ruleThreshold?.("high-fan-out");
|
|
12563
12575
|
const activeFanOutThreshold = configuredFanOutThreshold ?? DEFAULT_HIGH_FAN_OUT_THRESHOLD;
|
|
12564
12576
|
for (const f of fns) {
|
|
12565
12577
|
if (isTestSuiteOrganizer(f.outgoingCalls))
|
|
@@ -12593,7 +12605,7 @@ var highImportCouplingRule = {
|
|
|
12593
12605
|
id: "high-import-coupling",
|
|
12594
12606
|
requires: ["file.imports"],
|
|
12595
12607
|
appliesTo(ctx) {
|
|
12596
|
-
return
|
|
12608
|
+
return isTypeScriptFile(ctx.filePath);
|
|
12597
12609
|
},
|
|
12598
12610
|
evaluate(ctx, store) {
|
|
12599
12611
|
if (IMPORT_COUPLING_EXEMPT.test(ctx.filePath))
|
|
@@ -12624,7 +12636,7 @@ var missingErrorPropagationRule = {
|
|
|
12624
12636
|
id: "missing-error-propagation",
|
|
12625
12637
|
requires: ["file.functionSummaries", "file.tryCatchSummaries"],
|
|
12626
12638
|
appliesTo(ctx) {
|
|
12627
|
-
return
|
|
12639
|
+
return isTypeScriptFile(ctx.filePath);
|
|
12628
12640
|
},
|
|
12629
12641
|
evaluate(ctx, store) {
|
|
12630
12642
|
const fns = store.getFileFact(ctx.filePath, "file.functionSummaries") ?? [];
|
|
@@ -12672,7 +12684,11 @@ var CREDENTIAL_PATTERNS = [
|
|
|
12672
12684
|
/(?:api[_-]?key|secret|token)\s*[:=]\s*["'][^"']{6,}/i,
|
|
12673
12685
|
/(?:aws|gcp|azure)[_-]?(?:key|secret|token)\s*[:=]\s*["'][^"']{6,}/i
|
|
12674
12686
|
];
|
|
12675
|
-
var
|
|
12687
|
+
var CREDENTIALS_EXEMPT_NAME = /[/\\](secrets?[-_]?(scanner|detect|check)|scanner|fixture|mock)[^/\\]*$/i;
|
|
12688
|
+
var CREDENTIALS_EXEMPT_DATA_EXTENSION = /\.(ya?ml|json|env)$/i;
|
|
12689
|
+
function isCredentialsExempt(filePath) {
|
|
12690
|
+
return CREDENTIALS_EXEMPT_NAME.test(filePath) && (isTypeScriptFile(filePath) || CREDENTIALS_EXEMPT_DATA_EXTENSION.test(filePath));
|
|
12691
|
+
}
|
|
12676
12692
|
function isCommentLine(line) {
|
|
12677
12693
|
return line.startsWith("//") || line.startsWith("#") || line.startsWith("*");
|
|
12678
12694
|
}
|
|
@@ -12680,7 +12696,7 @@ var commentedCredentialsRule = {
|
|
|
12680
12696
|
id: "no-commented-credentials",
|
|
12681
12697
|
requires: ["file.content"],
|
|
12682
12698
|
appliesTo(ctx) {
|
|
12683
|
-
return /\.(
|
|
12699
|
+
return (isTypeScriptFile(ctx.filePath) || /\.(py|go|rb|ya?ml|json|env)$/.test(ctx.filePath)) && !isCredentialsExempt(ctx.filePath);
|
|
12684
12700
|
},
|
|
12685
12701
|
evaluate(ctx, store) {
|
|
12686
12702
|
const content = store.getFileFact(ctx.filePath, "file.content");
|
|
@@ -12722,7 +12738,7 @@ var passThroughWrappersRule = {
|
|
|
12722
12738
|
id: "pass-through-wrappers",
|
|
12723
12739
|
requires: ["file.functionSummaries", "file.comments"],
|
|
12724
12740
|
appliesTo(ctx) {
|
|
12725
|
-
return
|
|
12741
|
+
return isTypeScriptFile(ctx.filePath) && !isTestFile(ctx.filePath);
|
|
12726
12742
|
},
|
|
12727
12743
|
evaluate(ctx, store) {
|
|
12728
12744
|
const summaries = store.getFileFact(ctx.filePath, "file.functionSummaries");
|
|
@@ -12766,7 +12782,7 @@ var placeholderCommentsRule = {
|
|
|
12766
12782
|
id: "placeholder-comments",
|
|
12767
12783
|
requires: ["file.comments"],
|
|
12768
12784
|
appliesTo(ctx) {
|
|
12769
|
-
return
|
|
12785
|
+
return isTypeScriptFile(ctx.filePath) && !isTestFile(ctx.filePath);
|
|
12770
12786
|
},
|
|
12771
12787
|
evaluate(ctx, store) {
|
|
12772
12788
|
const comments = store.getFileFact(ctx.filePath, "file.comments");
|
|
@@ -12862,7 +12878,7 @@ var unsafeBoundaryRule = {
|
|
|
12862
12878
|
id: "unsafe-boundary",
|
|
12863
12879
|
requires: ["file.functionSummaries", "file.tryCatchSummaries"],
|
|
12864
12880
|
appliesTo(ctx) {
|
|
12865
|
-
return
|
|
12881
|
+
return isTypeScriptFile(ctx.filePath);
|
|
12866
12882
|
},
|
|
12867
12883
|
evaluate(ctx, store) {
|
|
12868
12884
|
const fns = store.getFileFact(ctx.filePath, "file.functionSummaries") ?? [];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
formatToolFailure
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4ITEFRDH.js";
|
|
5
5
|
import {
|
|
6
6
|
scannerReportParentDir
|
|
7
7
|
} from "./chunk-LT62P654.js";
|
|
8
8
|
import {
|
|
9
9
|
createAvailabilityProbeFlight,
|
|
10
10
|
probeToolAsync
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VPFRU5IG.js";
|
|
12
12
|
import {
|
|
13
13
|
classifyProbeFailure,
|
|
14
14
|
createAvailabilityLatch,
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
describeProbeEvidence,
|
|
17
17
|
logAvailabilityDecision,
|
|
18
18
|
startHostStallSampler
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-NPNFGYLV.js";
|
|
20
20
|
import {
|
|
21
21
|
createSingleFlight
|
|
22
22
|
} from "./chunk-AWQWXSW4.js";
|
|
23
23
|
import {
|
|
24
24
|
createSubsystemLogger,
|
|
25
25
|
incrementDegradationCount
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-3FRI5H4T.js";
|
|
27
27
|
|
|
28
28
|
// dist/clients/security-scan-client.js
|
|
29
29
|
import * as fs from "node:fs";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
RustClient,
|
|
4
4
|
resetRustAvailability,
|
|
5
5
|
rustClient
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-W4CUK5G6.js";
|
|
7
|
+
import "./chunk-QSCZAP24.js";
|
|
8
|
+
import "./chunk-VPFRU5IG.js";
|
|
9
|
+
import "./chunk-NPNFGYLV.js";
|
|
10
|
+
import "./chunk-H65TYP6V.js";
|
|
11
11
|
import "./chunk-AWQWXSW4.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-FOEPIX76.js";
|
|
13
13
|
import "./chunk-NL5LSKVD.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-7WJ55KBN.js";
|
|
15
|
+
import "./chunk-3FRI5H4T.js";
|
|
16
16
|
import "./chunk-S26LC76R.js";
|
|
17
17
|
import "./chunk-VCRVNLE7.js";
|
|
18
18
|
import "./chunk-LJDODBBZ.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
createToolchainAvailability
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QSCZAP24.js";
|
|
5
5
|
import {
|
|
6
6
|
createSubsystemLogger
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3FRI5H4T.js";
|
|
8
8
|
|
|
9
9
|
// dist/clients/rust-client.js
|
|
10
10
|
import * as path from "node:path";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
recordDegradationOnce
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3FRI5H4T.js";
|
|
5
5
|
|
|
6
6
|
// dist/clients/deadline-utils.js
|
|
7
7
|
function combineAbortSignals(...signals) {
|
|
@@ -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-3FRI5H4T.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearestMarkerRoot,
|
|
7
7
|
realpathOrResolve,
|
|
@@ -9,29 +9,29 @@ import {
|
|
|
9
9
|
isExcludedTestTarget,
|
|
10
10
|
isRunnerErrorResult,
|
|
11
11
|
stripWrapperArgs
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-DOUAWKLO.js";
|
|
13
|
+
import "./chunk-YT2VR4SL.js";
|
|
14
14
|
import "./chunk-LT62P654.js";
|
|
15
15
|
import "./chunk-ACRJ2GZ5.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-WS3UFJOU.js";
|
|
17
|
+
import "./chunk-OTSTS7L2.js";
|
|
18
18
|
import "./chunk-6HWVI6MI.js";
|
|
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-
|
|
19
|
+
import "./chunk-TLWFZ66Y.js";
|
|
20
|
+
import "./chunk-KSTQ4VXT.js";
|
|
21
|
+
import "./chunk-VPFRU5IG.js";
|
|
22
|
+
import "./chunk-NPNFGYLV.js";
|
|
23
|
+
import "./chunk-TJQSYX3J.js";
|
|
24
|
+
import "./chunk-7JX3RNG4.js";
|
|
25
|
+
import "./chunk-IDCTDKIA.js";
|
|
26
|
+
import "./chunk-IL6PIV33.js";
|
|
27
|
+
import "./chunk-H65TYP6V.js";
|
|
28
28
|
import "./chunk-AWQWXSW4.js";
|
|
29
29
|
import "./chunk-QYF5S6P6.js";
|
|
30
30
|
import "./chunk-CZCAZVTD.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-FOEPIX76.js";
|
|
32
32
|
import "./chunk-NL5LSKVD.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-7WJ55KBN.js";
|
|
34
|
+
import "./chunk-3FRI5H4T.js";
|
|
35
35
|
import "./chunk-S26LC76R.js";
|
|
36
36
|
import "./chunk-VCRVNLE7.js";
|
|
37
37
|
import "./chunk-LJDODBBZ.js";
|