pi-lens 4.4.8 → 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 +31 -0
- package/CHANGELOG.md +258 -0
- package/README.md +4 -1
- package/config/dependency-cruiser-eager-allowlist.json +1 -1
- package/dist/{chunk-6YUNI7B5.js → chunk-2ADRLTM2.js} +14 -60
- package/dist/{chunk-4B2YFN4U.js → chunk-2LVJQU3I.js} +46 -33
- package/dist/{chunk-2453RRJ2.js → chunk-3FRI5H4T.js} +72 -23
- package/dist/{chunk-7MAD5ZAY.js → chunk-3HM4BUHR.js} +14 -16
- package/dist/chunk-3QWVOBZJ.js +73 -0
- package/dist/{chunk-PIQQM32Y.js → chunk-46TQJSUE.js} +4 -2
- package/dist/{chunk-RZG472YW.js → chunk-4ITEFRDH.js} +84 -46
- package/dist/{chunk-6FIRFP6A.js → chunk-4NCDHTFI.js} +10 -12
- package/dist/{chunk-7CGIDRIK.js → chunk-6I44EDNQ.js} +14 -16
- package/dist/{chunk-2BKUFQKR.js → chunk-6MDM5MQT.js} +554 -217
- package/dist/{chunk-BBET6HD6.js → chunk-7JX3RNG4.js} +1 -1
- package/dist/{chunk-JE6HKLC7.js → chunk-7WJ55KBN.js} +2 -4
- package/dist/{chunk-4BKU7PV3.js → chunk-A5TEJZGJ.js} +2 -1
- package/dist/{chunk-7ANZ7XDD.js → chunk-ACRJ2GZ5.js} +2 -2
- package/dist/{chunk-2ZE3AUJQ.js → chunk-ALIZWXHZ.js} +13 -15
- package/dist/{chunk-BQG2QFVO.js → chunk-AON2QIJF.js} +43 -55
- package/dist/chunk-B2YUE6YD.js +23 -0
- package/dist/{chunk-L4NEVZ4T.js → chunk-B6HXETWY.js} +25 -27
- package/dist/chunk-BDR5MEZY.js +25 -0
- package/dist/{chunk-HXFUTMX2.js → chunk-BGLS5SDN.js} +2 -2
- package/dist/{chunk-ZZDIOAAJ.js → chunk-BRESRQBE.js} +6 -6
- package/dist/{chunk-WXUDRAG6.js → chunk-C6AODRNU.js} +10 -12
- package/dist/{chunk-GMROJJRN.js → chunk-CB7PEVOJ.js} +9 -1
- package/dist/{chunk-BHWW6FAX.js → chunk-CTB5BAJI.js} +53 -22
- package/dist/{chunk-VN3L2JWZ.js → chunk-CYUJB552.js} +5 -5
- package/dist/{chunk-6GMGEKQN.js → chunk-CZAWWXP6.js} +39 -12
- package/dist/{chunk-G5GV2Q7K.js → chunk-CZCAZVTD.js} +16 -2
- package/dist/chunk-DBS736MA.js +57 -0
- package/dist/{chunk-OWTG6UMO.js → chunk-DOUAWKLO.js} +75 -22
- package/dist/{chunk-BOPDQ7AZ.js → chunk-DVRJBQOJ.js} +19 -21
- package/dist/{chunk-UHHLR2VY.js → chunk-E4VXKTBR.js} +38 -41
- package/dist/{chunk-X66YJ2SS.js → chunk-F6FT6BVQ.js} +33 -34
- package/dist/{chunk-GIRBSBGL.js → chunk-FCQSZQAT.js} +3 -3
- package/dist/{chunk-X35S7HSB.js → chunk-FOEPIX76.js} +41 -30
- package/dist/{chunk-MC6VB2E5.js → chunk-GMC4ZGYR.js} +17 -5
- package/dist/{chunk-7TNILKGY.js → chunk-GTTMQ6XB.js} +1 -1
- package/dist/{chunk-HHR7WGCI.js → chunk-GUGKKGG7.js} +3 -3
- package/dist/{chunk-OZWXLJMX.js → chunk-GVWIU7M7.js} +2 -2
- package/dist/{chunk-WMDUT4KH.js → chunk-H65TYP6V.js} +94 -90
- package/dist/{chunk-5F3XF3SX.js → chunk-HILZE4BQ.js} +9 -8
- package/dist/{chunk-PKSUMEPT.js → chunk-HSYFLOZY.js} +3 -3
- package/dist/{chunk-4QG55RRC.js → chunk-I32RSMH6.js} +10 -12
- package/dist/chunk-I74RQGKA.js +88 -0
- package/dist/{chunk-G6JKM4O7.js → chunk-IDCTDKIA.js} +10 -10
- package/dist/chunk-IK4YS3KC.js +25 -0
- package/dist/{chunk-O2ARHQKF.js → chunk-IL6PIV33.js} +2 -2
- package/dist/{chunk-L3CLUGDY.js → chunk-J6BR5XN2.js} +3 -3
- package/dist/chunk-JKOZ2Z4U.js +20 -0
- package/dist/{chunk-SP4TFY5F.js → chunk-JZQGRARR.js} +11 -13
- package/dist/{chunk-CUDD35TW.js → chunk-K6WIBVMK.js} +6 -5
- package/dist/{chunk-DIWK3LBC.js → chunk-KDCIG23C.js} +8 -10
- package/dist/{chunk-4NBWFYWW.js → chunk-KFRDFAOE.js} +8 -33
- package/dist/{chunk-I22THIHI.js → chunk-KJ3AHOCK.js} +10 -12
- package/dist/{chunk-VOP4PJKA.js → chunk-KSTQ4VXT.js} +7 -9
- package/dist/{chunk-RGGH6M34.js → chunk-LT62P654.js} +1 -1
- package/dist/chunk-MAD4QJTP.js +198 -0
- package/dist/{chunk-CM73PPGD.js → chunk-MN635QYA.js} +3 -4
- package/dist/{chunk-HUAM7QG3.js → chunk-NBM7PNBP.js} +25 -23
- package/dist/{chunk-DYRZGUMA.js → chunk-NE4EFHJX.js} +2 -2
- package/dist/{chunk-SQC7K3SP.js → chunk-NL5LSKVD.js} +2 -2
- package/dist/{chunk-JZRP4DGP.js → chunk-NPNFGYLV.js} +4 -2
- package/dist/{chunk-NM2NWH55.js → chunk-NUSXS6YB.js} +6 -5
- package/dist/{chunk-ZKLTNLAW.js → chunk-OPFNQBS5.js} +6 -6
- package/dist/{chunk-PPKECBPP.js → chunk-OTSTS7L2.js} +19 -1
- package/dist/{chunk-SFLHSL5R.js → chunk-PTSA6QKL.js} +18 -7
- package/dist/{chunk-OY7WZI7Q.js → chunk-Q2VCKC3X.js} +6 -6
- package/dist/{chunk-HKIL6DCL.js → chunk-QGITU23N.js} +1 -1
- package/dist/{chunk-3O5EII3W.js → chunk-QHOTTC4A.js} +2 -2
- package/dist/{chunk-35WKJWO5.js → chunk-QL37SGTS.js} +112 -20
- package/dist/{chunk-OC7VWJBZ.js → chunk-QMV2APEH.js} +35 -37
- package/dist/{chunk-BUZIQDFS.js → chunk-QSCZAP24.js} +3 -3
- package/dist/{chunk-O4N5BQ3T.js → chunk-QUPYLQA4.js} +8 -10
- package/dist/{chunk-A5GRLYPZ.js → chunk-QUQY3IME.js} +7 -13
- package/dist/{chunk-R2QQC33W.js → chunk-QWTHFFU6.js} +12 -14
- package/dist/{chunk-TV6RXRYH.js → chunk-RQRKIRFY.js} +8 -10
- package/dist/{chunk-ZFORSIED.js → chunk-S3WFVG5P.js} +15 -42
- package/dist/{chunk-5RNB4HVK.js → chunk-SG2JQ2YP.js} +1 -1
- package/dist/{chunk-KZ4ALBCH.js → chunk-SJQUWQR6.js} +2 -2
- package/dist/{chunk-T2S3FNNJ.js → chunk-SKVNHCT5.js} +41 -42
- package/dist/{chunk-SDFKOLSF.js → chunk-TJQSYX3J.js} +8 -6
- package/dist/{chunk-IYVYZQRL.js → chunk-TLWFZ66Y.js} +5 -7
- package/dist/{chunk-5T5A6YAJ.js → chunk-TN5CWX5D.js} +33 -34
- package/dist/chunk-TQHOKMVZ.js +28 -0
- package/dist/{chunk-XOMGO63G.js → chunk-TYHOEX4V.js} +19 -21
- package/dist/{chunk-6LJOJ6EO.js → chunk-UNBRHPHJ.js} +14 -16
- package/dist/{chunk-4LL2VRNY.js → chunk-UOO4D2TK.js} +16 -18
- package/dist/{chunk-AGGUWKRK.js → chunk-UY745U35.js} +1 -1
- package/dist/{chunk-LSFXZLPW.js → chunk-V7F7JHS5.js} +218 -253
- package/dist/{chunk-VLQ7UKZH.js → chunk-VCRVNLE7.js} +135 -2
- package/dist/{chunk-JPRDTY5S.js → chunk-VGTBLTPN.js} +8 -10
- package/dist/{chunk-JBP7KESM.js → chunk-VPFRU5IG.js} +1 -1
- package/dist/chunk-VS2L7QDI.js +25 -0
- package/dist/{chunk-4W52ZKZX.js → chunk-W4CUK5G6.js} +2 -2
- package/dist/{chunk-VPLBLWFO.js → chunk-W7TY6HYX.js} +1 -1
- package/dist/{chunk-JYLOYTZD.js → chunk-WAA63ZJV.js} +5 -1
- package/dist/{chunk-WC6WRNQT.js → chunk-WS3UFJOU.js} +2 -2
- package/dist/chunk-XAFZJEXY.js +50 -0
- package/dist/{chunk-XYLC35E4.js → chunk-XPGH5O74.js} +555 -336
- package/dist/{chunk-VOXTCULR.js → chunk-XVB3Q2PG.js} +2 -4
- package/dist/{chunk-FRLAUP2B.js → chunk-Y3EHLUPL.js} +4 -4
- package/dist/{chunk-CZL44WFN.js → chunk-YF4G5NN5.js} +2 -2
- package/dist/{chunk-XWIME22V.js → chunk-YQA34KAF.js} +11 -13
- package/dist/{chunk-FHEV6T4L.js → chunk-YT2VR4SL.js} +8 -10
- package/dist/chunk-ZD4KVFXI.js +234 -0
- package/dist/{chunk-NSPVR3FN.js → chunk-ZOPXB2KK.js} +17 -19
- package/dist/chunk-ZPFLHB3R.js +28 -0
- package/dist/{chunk-R4QWJQ2H.js → chunk-ZZDVGCGG.js} +9 -11
- package/dist/index.js +5398 -4438
- package/dist/mcp/analyze-cli.js +12 -17
- package/dist/mcp/cli.js +41 -42
- package/dist/mcp/server.js +1466 -663
- package/dist/mcp/worker.js +59 -60
- package/dist/probes/installer.js +17 -19
- package/docs/agent-guide.md +2 -1
- package/docs/agent-tools.md +53 -10
- package/docs/analysisall.md +1 -1
- package/docs/ci-bot-pr-checks.md +7 -5
- package/docs/configuration.md +60 -13
- package/docs/defect-shapes.md +67 -4
- package/docs/environment-variables.md +18 -1
- package/docs/features.md +23 -6
- package/docs/globalconfig.md +24 -3
- package/docs/invariants/language-config.md +9 -1
- package/docs/invariants/lsp-trust-exec.md +9 -2
- package/docs/invariants/session-telemetry.md +2 -2
- package/docs/language-coverage.md +67 -0
- package/docs/lsp-capability-matrix.md +121 -53
- package/docs/lsp-idle-eviction.md +20 -13
- package/docs/merge-queue-rollout.md +10 -8
- package/docs/module-report-read-symbol.md +34 -23
- package/docs/pi-lens-fixer.md +19 -7
- package/docs/pi-lens-investigator.md +3 -0
- package/docs/pi-lens-merge-policy.md +20 -8
- package/docs/pi-lens-release.md +3 -2
- package/docs/pi-lens-reviewer.md +53 -12
- package/docs/pi-lens-subagent.md +13 -0
- package/docs/public-api-stability.md +39 -5
- package/docs/release-qa-baseline.md +7 -4
- package/docs/schema/pi-lens-config-v1.json +11 -2
- package/docs/servercapabilities.md +3 -1
- package/docs/settings.md +9 -6
- package/docs/usage.md +1 -0
- package/docs/word-index.md +3 -2
- package/package.json +9 -4
- 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/scripts/download-grammars.js +13 -2
- package/scripts/grammars.lock.json +7 -0
- package/skills/pi-lens-lsp-navigation/SKILL.md +5 -1
- package/vendor/grammars/tree-sitter-groovy.wasm +0 -0
- package/dist/chunk-2TS4GLOJ.js +0 -31
- package/dist/chunk-3JAHQBSY.js +0 -27
- package/dist/chunk-447YZL4S.js +0 -25
- package/dist/chunk-565VRUP4.js +0 -136
- package/dist/chunk-57X2CDRX.js +0 -49
- package/dist/chunk-GGYOZWHW.js +0 -27
- package/dist/chunk-IE5D3RA5.js +0 -58
- package/dist/chunk-LPYTPNOJ.js +0 -22
- package/dist/chunk-OFNMHPBT.js +0 -89
- package/dist/chunk-U3AS2FR6.js +0 -106
- package/dist/chunk-W3BGKBBK.js +0 -27
- package/dist/chunk-WQV6BI4Q.js +0 -48
- package/dist/chunk-YHGYAEFH.js +0 -443
- package/dist/chunk-ZONZ6YY3.js +0 -74
- package/dist/chunk-ZSM35JF4.js +0 -30
|
@@ -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-BGLS5SDN.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-FOEPIX76.js";
|
|
20
21
|
import {
|
|
21
22
|
incrementDegradationCount
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
logLatency
|
|
25
|
-
} from "./chunk-565VRUP4.js";
|
|
23
|
+
} from "./chunk-3FRI5H4T.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-KJ3AHOCK.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-KJ3AHOCK.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-JZQGRARR.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-JZQGRARR.js");
|
|
1821
1823
|
const existing = loadProjectSnapshot(cwd);
|
|
1822
1824
|
const snapshot = existing ?? {
|
|
1823
1825
|
version: PROJECT_SNAPSHOT_VERSION,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolveOpengrepRulePack
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SG2JQ2YP.js";
|
|
5
5
|
import {
|
|
6
6
|
findLocalToolConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CB7PEVOJ.js";
|
|
8
8
|
|
|
9
9
|
// dist/clients/opengrep-config.js
|
|
10
10
|
import * as path from "node:path";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-S26LC76R.js";
|
|
7
7
|
import {
|
|
8
8
|
logLatency
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VCRVNLE7.js";
|
|
10
10
|
import {
|
|
11
11
|
isWindowsPath,
|
|
12
12
|
nameMatchesMarkerGlob,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
realpathOrResolve,
|
|
15
15
|
toPosix,
|
|
16
16
|
walkUpDirs
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CB7PEVOJ.js";
|
|
18
18
|
|
|
19
19
|
// dist/clients/workspace-topology.js
|
|
20
20
|
import * as fs2 from "node:fs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
getProjectTrustGeneration
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7WJ55KBN.js";
|
|
5
5
|
import {
|
|
6
6
|
logLatency
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VCRVNLE7.js";
|
|
8
8
|
|
|
9
9
|
// dist/clients/dispatch/runners/utils/availability-policy.js
|
|
10
10
|
function describeProbeEvidence(result, command) {
|
|
@@ -39,6 +39,8 @@ function describeInstallAttempt(attempt, options = {}) {
|
|
|
39
39
|
install: "unavailable",
|
|
40
40
|
...reason && { installReason: reason }
|
|
41
41
|
};
|
|
42
|
+
case "declined":
|
|
43
|
+
case "skipped":
|
|
42
44
|
default:
|
|
43
45
|
return {
|
|
44
46
|
install: "not-attempted",
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
DOTNET_CSHARP_ROOT_MARKERS,
|
|
6
6
|
DOTNET_CSHARP_SOLUTION_MARKERS,
|
|
7
7
|
DOTNET_FSHARP_ROOT_MARKERS,
|
|
8
|
+
GROOVY_FILENAMES,
|
|
8
9
|
KIND_EXTENSIONS,
|
|
9
10
|
LEAN_ROOT_MARKERS,
|
|
10
11
|
NON_CODE_KINDS,
|
|
@@ -19,12 +20,11 @@ import {
|
|
|
19
20
|
isHelmYamlTemplatePath,
|
|
20
21
|
isJstsFactFile,
|
|
21
22
|
isReadableSourceFile
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-CZCAZVTD.js";
|
|
24
|
+
import "./chunk-NL5LSKVD.js";
|
|
24
25
|
import "./chunk-S26LC76R.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-GMROJJRN.js";
|
|
26
|
+
import "./chunk-VCRVNLE7.js";
|
|
27
|
+
import "./chunk-CB7PEVOJ.js";
|
|
28
28
|
import "./chunk-NXL4FFQQ.js";
|
|
29
29
|
export {
|
|
30
30
|
CODE_KINDS,
|
|
@@ -32,6 +32,7 @@ export {
|
|
|
32
32
|
DOTNET_CSHARP_ROOT_MARKERS,
|
|
33
33
|
DOTNET_CSHARP_SOLUTION_MARKERS,
|
|
34
34
|
DOTNET_FSHARP_ROOT_MARKERS,
|
|
35
|
+
GROOVY_FILENAMES,
|
|
35
36
|
KIND_EXTENSIONS,
|
|
36
37
|
LEAN_ROOT_MARKERS,
|
|
37
38
|
NON_CODE_KINDS,
|
|
@@ -2,24 +2,24 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
getScratchTreeGlobPatterns,
|
|
4
4
|
nestedWorktreeOffsets
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SJQUWQR6.js";
|
|
6
6
|
import {
|
|
7
7
|
SecurityScanClient
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VGTBLTPN.js";
|
|
9
9
|
import {
|
|
10
10
|
safeSpawnAsync
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-H65TYP6V.js";
|
|
12
12
|
import {
|
|
13
13
|
loadPiLensProjectConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FOEPIX76.js";
|
|
15
15
|
import {
|
|
16
16
|
incrementDegradationCount
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3FRI5H4T.js";
|
|
18
18
|
import {
|
|
19
19
|
isUnderDir,
|
|
20
20
|
normalizeMapKey,
|
|
21
21
|
toPosix
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CB7PEVOJ.js";
|
|
23
23
|
|
|
24
24
|
// dist/clients/trivy-client.js
|
|
25
25
|
import * as fs from "node:fs";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
+
GROOVY_FILENAMES,
|
|
3
4
|
SPECIAL_FILENAMES
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CZCAZVTD.js";
|
|
5
6
|
|
|
6
7
|
// dist/clients/language-registry.js
|
|
7
8
|
var LANGUAGES = [
|
|
@@ -109,6 +110,18 @@ var LANGUAGES = [
|
|
|
109
110
|
// file-kinds.ts deliberately does not classify them.
|
|
110
111
|
{ id: "go-mod", extensions: [".mod", ".sum"], lspId: "go" },
|
|
111
112
|
{ id: "graphql", extensions: [".graphql", ".gql"] },
|
|
113
|
+
// Groovy source plus the two named Gradle scripts and the Jenkins pipeline
|
|
114
|
+
// entrypoint (#5235). The vendored grammar reaches `.groovy .gvy .gy .gsh`
|
|
115
|
+
// by extension and `Jenkinsfile`/`build.gradle`/`settings.gradle` by kind;
|
|
116
|
+
// `.gradle` stays out of `grammarExtensions` because it would claim every
|
|
117
|
+
// `.gradle` file, which `GROOVY_FILENAMES` deliberately does not.
|
|
118
|
+
{
|
|
119
|
+
id: "groovy",
|
|
120
|
+
kind: "groovy",
|
|
121
|
+
extensions: [".groovy", ".gvy", ".gy", ".gsh"],
|
|
122
|
+
filenames: GROOVY_FILENAMES,
|
|
123
|
+
grammar: "groovy"
|
|
124
|
+
},
|
|
112
125
|
{ id: "haskell", kind: "haskell", extensions: [".hs", ".lhs"] },
|
|
113
126
|
{ id: "helm", kind: "helm-template", extensions: [".tpl"] },
|
|
114
127
|
{
|
|
@@ -410,6 +423,10 @@ function resolveLanguage(filePath) {
|
|
|
410
423
|
}
|
|
411
424
|
return void 0;
|
|
412
425
|
}
|
|
426
|
+
var TYPESCRIPT_EXTENSIONS = new Set(LANGUAGES.flatMap((entry) => entry.id === "typescript" || entry.id === "typescriptreact" ? entry.extensions : []));
|
|
427
|
+
function isTypeScriptFile(filePath) {
|
|
428
|
+
return TYPESCRIPT_EXTENSIONS.has(extensionOf(filePath));
|
|
429
|
+
}
|
|
413
430
|
var EXTENSION_TO_LSP_ID = Object.freeze(Object.fromEntries(LANGUAGES.flatMap((entry) => entry.extensions.map((extension) => [extension, lspLanguageId(entry)]))));
|
|
414
431
|
var EXTENSION_TO_GRAMMAR = Object.freeze(Object.fromEntries(LANGUAGES.flatMap((entry) => grammarExtensionsOf(entry).map((extension) => [extension, entry.grammar]))));
|
|
415
432
|
var KIND_TO_GRAMMAR = Object.freeze(Object.fromEntries([...BY_KIND.entries()].filter(([, entry]) => Boolean(entry.grammar)).map(([kind, entry]) => [kind, entry.grammar])));
|
|
@@ -453,6 +470,7 @@ export {
|
|
|
453
470
|
extensionsForLanguageToken,
|
|
454
471
|
resolveFilenameLanguage,
|
|
455
472
|
resolveLanguage,
|
|
473
|
+
isTypeScriptFile,
|
|
456
474
|
EXTENSION_TO_LSP_ID,
|
|
457
475
|
EXTENSION_TO_GRAMMAR,
|
|
458
476
|
KIND_TO_GRAMMAR,
|
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
SecurityScanClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VGTBLTPN.js";
|
|
5
5
|
import {
|
|
6
6
|
firstOutputLine,
|
|
7
7
|
spawnFailedWithNoOutput
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4ITEFRDH.js";
|
|
9
9
|
import {
|
|
10
10
|
probeToolAsync
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VPFRU5IG.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-NPNFGYLV.js";
|
|
19
19
|
import {
|
|
20
20
|
isUntrustedProjectPath,
|
|
21
21
|
recordProjectCommandRefusal,
|
|
22
22
|
safeSpawnAsync
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-H65TYP6V.js";
|
|
24
24
|
import {
|
|
25
25
|
assertInstallAllowed
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7WJ55KBN.js";
|
|
27
27
|
import {
|
|
28
28
|
recordDegradationOnce
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3FRI5H4T.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;
|
|
@@ -1,29 +1,29 @@
|
|
|
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-BGLS5SDN.js";
|
|
5
5
|
import {
|
|
6
6
|
shouldRecurseIntoDir,
|
|
7
7
|
walkTreeStackAsync,
|
|
8
8
|
walkTreeStackSync
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IL6PIV33.js";
|
|
10
10
|
import {
|
|
11
11
|
getProjectIgnoreMatcher
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-H65TYP6V.js";
|
|
13
13
|
import {
|
|
14
14
|
getDirectoryMarkers,
|
|
15
15
|
registerWorkspaceTopologyReset
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NL5LSKVD.js";
|
|
17
17
|
import {
|
|
18
18
|
lazyEnvNumber
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VCRVNLE7.js";
|
|
20
20
|
import {
|
|
21
21
|
BoundedLruCache,
|
|
22
22
|
isAtOrAboveHomeDir,
|
|
23
23
|
normalizeMapKey,
|
|
24
24
|
realpathOrResolve,
|
|
25
25
|
walkUpDirs
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-CB7PEVOJ.js";
|
|
27
27
|
|
|
28
28
|
// dist/clients/startup-scan.js
|
|
29
29
|
import * as os from "node:os";
|
|
@@ -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/go-client.js
|
|
10
10
|
import * as path from "node:path";
|
|
@@ -1,59 +1,62 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
buildModuleGraph
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-K6WIBVMK.js";
|
|
5
5
|
import {
|
|
6
6
|
aliasedImportTargets,
|
|
7
7
|
referencedProjectImportTarget
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ACRJ2GZ5.js";
|
|
9
9
|
import {
|
|
10
10
|
getSharedTreeSitterClient,
|
|
11
11
|
loadWebTreeSitter,
|
|
12
12
|
logTreeSitterDiagnostic,
|
|
13
13
|
resolveTreeSitterLanguage,
|
|
14
14
|
wasmQueryInput
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CTB5BAJI.js";
|
|
16
16
|
import {
|
|
17
17
|
EXTENSION_TO_GRAMMAR,
|
|
18
18
|
KIND_TO_GRAMMAR
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-OTSTS7L2.js";
|
|
20
20
|
import {
|
|
21
21
|
HOOK_WALL_BUDGET_MS
|
|
22
22
|
} from "./chunk-CKEQFGLT.js";
|
|
23
|
-
import {
|
|
24
|
-
bounded
|
|
25
|
-
} from "./chunk-JYLOYTZD.js";
|
|
26
23
|
import {
|
|
27
24
|
hashContentBytes,
|
|
28
25
|
toRunnerDisplayPath
|
|
29
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-W7TY6HYX.js";
|
|
27
|
+
import {
|
|
28
|
+
bounded
|
|
29
|
+
} from "./chunk-WAA63ZJV.js";
|
|
30
30
|
import {
|
|
31
|
+
LSP_QUERY_MAX_FILE_LINES_MAX,
|
|
32
|
+
getGlobalLspQueryMaxFileLines,
|
|
31
33
|
loadPiLensGlobalConfig
|
|
32
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-H65TYP6V.js";
|
|
33
35
|
import {
|
|
34
36
|
isFileKind
|
|
35
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-CZCAZVTD.js";
|
|
36
38
|
import {
|
|
37
39
|
isDeclarationFile
|
|
38
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-FOEPIX76.js";
|
|
39
41
|
import {
|
|
40
42
|
incrementDegradationCount,
|
|
41
43
|
recordDegradationOnce
|
|
42
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-3FRI5H4T.js";
|
|
43
45
|
import {
|
|
44
46
|
freshnessFromMtime
|
|
45
47
|
} from "./chunk-S26LC76R.js";
|
|
46
48
|
import {
|
|
47
49
|
toPositiveFinite
|
|
48
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-VCRVNLE7.js";
|
|
49
51
|
import {
|
|
50
52
|
BoundedFifoMap,
|
|
51
53
|
BoundedLruCache,
|
|
52
54
|
isUnderDir,
|
|
55
|
+
isWithinForm,
|
|
53
56
|
normalizeEphemeralMapKey,
|
|
54
57
|
normalizeMapKey,
|
|
55
58
|
walkUpDirs
|
|
56
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-CB7PEVOJ.js";
|
|
57
60
|
|
|
58
61
|
// dist/clients/blocker-freshness.js
|
|
59
62
|
import * as fs4 from "node:fs";
|
|
@@ -98,6 +101,12 @@ var RUNTIME_CONFIG = {
|
|
|
98
101
|
pipeline: {
|
|
99
102
|
lspMaxFileBytes: 2 * 1024 * 1024,
|
|
100
103
|
lspMaxFileLines: 5e3,
|
|
104
|
+
// #5306: hard cap (ms) on the per-server diagnostics wait of the explicit
|
|
105
|
+
// single-file `lens_diagnostics source=lsp` query when it passes an explicit
|
|
106
|
+
// `waitMs` (`LSPTouchFileOptions.explicitQuery`). 30 s covers clangd on a
|
|
107
|
+
// 20,000-line file (~11 s measured, investigation #5306) with margin, and
|
|
108
|
+
// keeps one tool call from parking a turn for an arbitrary caller-chosen time.
|
|
109
|
+
lspExplicitQueryMaxWaitMs: 3e4,
|
|
101
110
|
cascadeMaxFiles: 5,
|
|
102
111
|
cascadeMaxDiagnosticsPerFile: 20,
|
|
103
112
|
// Hard cap on how long the pipeline will wait for an LSP client to spawn.
|
|
@@ -196,23 +205,39 @@ function lineTextAt(content, line) {
|
|
|
196
205
|
// dist/clients/lsp/content-limits.js
|
|
197
206
|
var LSP_MAX_FILE_BYTES = RUNTIME_CONFIG.pipeline.lspMaxFileBytes;
|
|
198
207
|
var LSP_MAX_FILE_LINES = RUNTIME_CONFIG.pipeline.lspMaxFileLines;
|
|
199
|
-
function exceedsLspSyncLimits(content) {
|
|
208
|
+
function exceedsLspSyncLimits(content, maxLines = LSP_MAX_FILE_LINES) {
|
|
200
209
|
const sizeBytes = Buffer.byteLength(content, "utf-8");
|
|
201
210
|
if (sizeBytes > LSP_MAX_FILE_BYTES) {
|
|
202
211
|
return {
|
|
203
212
|
tooLarge: true,
|
|
204
|
-
reason: `${sizeBytes} bytes > ${LSP_MAX_FILE_BYTES} limit
|
|
213
|
+
reason: `${sizeBytes} bytes > ${LSP_MAX_FILE_BYTES} limit`,
|
|
214
|
+
bound: "bytes"
|
|
205
215
|
};
|
|
206
216
|
}
|
|
207
217
|
const lineCount = countLfNewlines(content) + 1;
|
|
208
|
-
if (lineCount >
|
|
218
|
+
if (lineCount > maxLines) {
|
|
209
219
|
return {
|
|
210
220
|
tooLarge: true,
|
|
211
|
-
reason: `${lineCount} lines > ${
|
|
221
|
+
reason: `${lineCount} lines > ${maxLines} limit`,
|
|
222
|
+
bound: "lines"
|
|
212
223
|
};
|
|
213
224
|
}
|
|
214
225
|
return { tooLarge: false, reason: "" };
|
|
215
226
|
}
|
|
227
|
+
function exceedsExplicitQueryLimits(content) {
|
|
228
|
+
const shared = exceedsLspSyncLimits(content);
|
|
229
|
+
if (shared.bound !== "lines")
|
|
230
|
+
return shared;
|
|
231
|
+
const maxLines = getGlobalLspQueryMaxFileLines() ?? LSP_MAX_FILE_LINES;
|
|
232
|
+
const verdict = exceedsLspSyncLimits(content, maxLines);
|
|
233
|
+
if (!verdict.tooLarge || maxLines >= LSP_QUERY_MAX_FILE_LINES_MAX) {
|
|
234
|
+
return verdict;
|
|
235
|
+
}
|
|
236
|
+
return {
|
|
237
|
+
...verdict,
|
|
238
|
+
reason: `${verdict.reason}; this single-file query can raise its line limit with lsp.queryMaxFileLines in the user-level pi-lens config (up to ${LSP_QUERY_MAX_FILE_LINES_MAX})`
|
|
239
|
+
};
|
|
240
|
+
}
|
|
216
241
|
|
|
217
242
|
// dist/clients/lsp/implicit-scope.js
|
|
218
243
|
function isGoSourceFile(filePath) {
|
|
@@ -1237,6 +1262,70 @@ var SYMBOL_QUERIES = {
|
|
|
1237
1262
|
name: (command_name (word) @callIdent)) @callRef
|
|
1238
1263
|
`
|
|
1239
1264
|
},
|
|
1265
|
+
// #5235: tree-sitter-groovy (dekobon v0.3.0, vendored as is). Node names
|
|
1266
|
+
// were probed against the committed wasm. A Spock feature name
|
|
1267
|
+
// (`def "adds two numbers"()`) parses as `quoted_identifier`, so the method
|
|
1268
|
+
// name keeps its quotes. Named closures are limited to class fields and
|
|
1269
|
+
// top-level script variables: a method-local `def c = {}` is also a
|
|
1270
|
+
// `local_variable_declaration`, and listing it would put locals in the
|
|
1271
|
+
// module outline. Closure-taking calls (`list.each { }`, DSL blocks) parse
|
|
1272
|
+
// as sibling statements or `command_chain`, not `method_invocation`, so
|
|
1273
|
+
// they yield no call ref; only `foo(1)`, `a.b(2)` and `new X()` do. The
|
|
1274
|
+
// grammar's known parse gaps are in docs/language-coverage.md.
|
|
1275
|
+
groovy: {
|
|
1276
|
+
defs: `
|
|
1277
|
+
(class_declaration
|
|
1278
|
+
name: (identifier) @className) @classDef
|
|
1279
|
+
|
|
1280
|
+
(trait_declaration
|
|
1281
|
+
name: (identifier) @className) @classDef
|
|
1282
|
+
|
|
1283
|
+
(enum_declaration
|
|
1284
|
+
name: (identifier) @className) @classDef
|
|
1285
|
+
|
|
1286
|
+
(record_declaration
|
|
1287
|
+
name: (identifier) @className) @classDef
|
|
1288
|
+
|
|
1289
|
+
(interface_declaration
|
|
1290
|
+
name: (identifier) @interfaceName) @interfaceDef
|
|
1291
|
+
|
|
1292
|
+
(method_declaration
|
|
1293
|
+
name: [(identifier) (quoted_identifier)] @methodName
|
|
1294
|
+
parameters: (formal_parameters) @methodParams) @methodDef
|
|
1295
|
+
|
|
1296
|
+
(constructor_declaration
|
|
1297
|
+
name: (identifier) @funcName
|
|
1298
|
+
parameters: (formal_parameters) @funcParams) @funcDef
|
|
1299
|
+
|
|
1300
|
+
(field_declaration
|
|
1301
|
+
(variable_declarator
|
|
1302
|
+
name: (identifier) @arrowName
|
|
1303
|
+
value: (closure))) @arrowDef
|
|
1304
|
+
|
|
1305
|
+
(source_file
|
|
1306
|
+
(local_variable_declaration
|
|
1307
|
+
(variable_declarator
|
|
1308
|
+
name: (identifier) @arrowName
|
|
1309
|
+
value: (closure))) @arrowDef)
|
|
1310
|
+
`,
|
|
1311
|
+
refs: `
|
|
1312
|
+
(method_invocation
|
|
1313
|
+
function: (identifier) @callIdent) @callRef
|
|
1314
|
+
|
|
1315
|
+
(method_invocation
|
|
1316
|
+
function: (field_access
|
|
1317
|
+
field: (identifier) @callMethod)) @callMethodRef
|
|
1318
|
+
|
|
1319
|
+
(object_creation_expression
|
|
1320
|
+
type: (type_identifier) @newIdent) @newRef
|
|
1321
|
+
|
|
1322
|
+
(object_creation_expression
|
|
1323
|
+
type: (generic_type
|
|
1324
|
+
base: (type_identifier) @newIdent)) @newRef
|
|
1325
|
+
|
|
1326
|
+
(type_identifier) @typeIdent
|
|
1327
|
+
`
|
|
1328
|
+
},
|
|
1240
1329
|
// #1522: tree-sitter-cue (eonpatapon/tree-sitter-cue, vendored per #1520) has
|
|
1241
1330
|
// no `label:`/`value:` field names on `field` — verified directly against the
|
|
1242
1331
|
// committed wasm (`value:` fails query compilation with "Bad field name");
|
|
@@ -1435,6 +1524,9 @@ var IMPORT_QUERIES = {
|
|
|
1435
1524
|
(word) @importSource
|
|
1436
1525
|
(#match? @_m "^(source|\\.)$"))
|
|
1437
1526
|
`,
|
|
1527
|
+
// import a.b.C / import static a.b.C.m / import a.b.* — `name:` is the
|
|
1528
|
+
// qualified_name on every form, aliases (`as X`) included (#5235).
|
|
1529
|
+
groovy: `(import_declaration name: (qualified_name) @importSource)`,
|
|
1438
1530
|
// import "strings" / import x "encoding/json" — `import_spec`'s `path:`
|
|
1439
1531
|
// field is verified against the committed wasm. Block-form
|
|
1440
1532
|
// (`import (\n\t"strings"\n)`) nests each `import_spec` one level deeper,
|
|
@@ -1975,8 +2067,7 @@ function createImplicitScopeCheck(runtime, cwd) {
|
|
|
1975
2067
|
return role;
|
|
1976
2068
|
};
|
|
1977
2069
|
const rootKey = normalizeMapKey(nodePath.resolve(cwd));
|
|
1978
|
-
const
|
|
1979
|
-
const inRoot = (file) => file === rootKey || file.startsWith(rootPrefix);
|
|
2070
|
+
const inRoot = (file) => isWithinForm(file, rootKey);
|
|
1980
2071
|
let scanned;
|
|
1981
2072
|
const feeding = [];
|
|
1982
2073
|
let newestUnknownTs = Number.NEGATIVE_INFINITY;
|
|
@@ -2477,6 +2568,7 @@ export {
|
|
|
2477
2568
|
scanDocumentContent,
|
|
2478
2569
|
lineTextAt,
|
|
2479
2570
|
exceedsLspSyncLimits,
|
|
2571
|
+
exceedsExplicitQueryLimits,
|
|
2480
2572
|
loadAstGrepNapi,
|
|
2481
2573
|
isGoSourceFile,
|
|
2482
2574
|
goPackageFiles,
|