pi-lens 4.4.4 → 4.4.6
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 +477 -0
- package/README.md +45 -3
- package/config/biome/core.jsonc +3 -3
- package/config/dependency-cruiser-eager-allowlist.json +1 -0
- package/dist/{chunk-UBOQLVT2.js → chunk-2DDDCJDL.js} +4 -4
- package/dist/{chunk-RKKOYPRA.js → chunk-2DMLM3ZO.js} +13 -15
- package/dist/chunk-2F47TQOA.js +73 -0
- package/dist/{chunk-O4NWQT6I.js → chunk-2PHMIAKO.js} +4 -4
- package/dist/{chunk-DGUKIYSI.js → chunk-2RLWJO5K.js} +8 -10
- package/dist/{chunk-S67KYG37.js → chunk-2X4VLOCC.js} +2 -2
- package/dist/{chunk-TIQ2PKDW.js → chunk-3MYEA7QD.js} +4 -4
- package/dist/{chunk-3DA2JDOL.js → chunk-3WEPUD2V.js} +551 -203
- package/dist/{chunk-AMERCH6V.js → chunk-4AVZ3TG7.js} +15 -16
- package/dist/{chunk-IYNJ6YPZ.js → chunk-4PCQCU47.js} +4 -4
- package/dist/chunk-4WX4CTUE.js +57 -0
- package/dist/{chunk-P63GXC37.js → chunk-5APMQ2IJ.js} +31 -4
- package/dist/{chunk-ZIVJBOO3.js → chunk-5CV5ITZF.js} +2 -2
- package/dist/{chunk-6DLWKFEX.js → chunk-5ZR3APIM.js} +41 -42
- package/dist/{chunk-XTBDCR27.js → chunk-63RIVFQI.js} +4 -4
- package/dist/{chunk-GSLNCYGG.js → chunk-75SY4F24.js} +13 -14
- package/dist/{chunk-U44DJXQP.js → chunk-7RQXA5GG.js} +15 -18
- package/dist/chunk-A3YNG5KP.js +45 -0
- package/dist/{chunk-5OFV52AM.js → chunk-AE37FEGH.js} +1 -1
- package/dist/{chunk-BWD5EPKO.js → chunk-AMXIUN2R.js} +4 -6
- package/dist/{chunk-3KAZU3VR.js → chunk-ARD426WI.js} +2 -2
- package/dist/{chunk-BW5KFIQC.js → chunk-AWQWXSW4.js} +1 -0
- package/dist/{chunk-YH5MVY2U.js → chunk-BHUWL2Y3.js} +7 -7
- package/dist/{chunk-CT4MN5IU.js → chunk-BI5LAQ3Y.js} +353 -359
- package/dist/{chunk-KAPJINKN.js → chunk-BM5GS6ZH.js} +2 -2
- package/dist/{chunk-TLX72JTG.js → chunk-BWYQUPOS.js} +1 -1
- package/dist/chunk-CFRQMBGP.js +49 -0
- package/dist/{chunk-RMLC67LF.js → chunk-CJYKEW2L.js} +2 -30
- package/dist/chunk-CKEQFGLT.js +32 -0
- package/dist/{chunk-IWDLU6K3.js → chunk-DC4CFXM5.js} +4 -6
- package/dist/{chunk-ZVUL7QYY.js → chunk-DMSLNKF7.js} +29 -32
- package/dist/{chunk-KN35K52N.js → chunk-DQXSPYRI.js} +3 -3
- package/dist/{chunk-HYGZEMX6.js → chunk-EVDGNG4F.js} +11 -5
- package/dist/{chunk-SRYEJNES.js → chunk-F5Z6URKM.js} +2 -2
- package/dist/{chunk-UMS2MFPZ.js → chunk-F6X3YJWD.js} +2 -3
- package/dist/{chunk-XYURS6EN.js → chunk-FA5LDARD.js} +15 -17
- package/dist/{chunk-24AKHFGP.js → chunk-FFL3A2VP.js} +6 -6
- package/dist/chunk-FJIVKLPH.js +31 -0
- package/dist/chunk-G2B7F6ZU.js +88 -0
- package/dist/{chunk-US7ECLD7.js → chunk-GAACZY6R.js} +131 -41
- package/dist/{chunk-MZGQNL3Y.js → chunk-GMTFDAOK.js} +12 -13
- package/dist/{chunk-VOOAPROD.js → chunk-GNSIWBAT.js} +3 -3
- package/dist/chunk-GTAI2J6U.js +27 -0
- package/dist/{chunk-RVK72CZX.js → chunk-GZE7WOI4.js} +1362 -459
- package/dist/{chunk-IUE7SSKV.js → chunk-H7HTEQUZ.js} +13 -7
- package/dist/{chunk-EUXZEFTV.js → chunk-HK6JVFZC.js} +3 -3
- package/dist/chunk-IPDG45G5.js +26 -0
- package/dist/{chunk-5HSRT26B.js → chunk-J6JP25XU.js} +16 -15
- package/dist/{chunk-HWCCCQNX.js → chunk-JL6CXUMW.js} +13 -6
- package/dist/{chunk-EBC36LNN.js → chunk-K2YGBXOA.js} +17 -17
- package/dist/{chunk-WMYE35PX.js → chunk-KLQVC3XC.js} +7 -5
- package/dist/{chunk-ATKJFDQN.js → chunk-KSR7RGQY.js} +12 -14
- package/dist/{chunk-POMLXPMY.js → chunk-KXF5R4UN.js} +1 -1
- package/dist/{chunk-LLJNQKQW.js → chunk-LEJOJDXL.js} +20 -13
- package/dist/{chunk-JUKMK5Y4.js → chunk-MA77RSFN.js} +10 -11
- package/dist/{chunk-GAQ7OQG6.js → chunk-MKVZQUEG.js} +85 -96
- package/dist/{chunk-2EECBNC5.js → chunk-MN7MHUXQ.js} +75 -0
- package/dist/{chunk-DEL2U6CM.js → chunk-MT6BVNFW.js} +16 -14
- package/dist/chunk-NDMCVUYK.js +507 -0
- package/dist/{chunk-HRNHZA3N.js → chunk-NIU2IPC5.js} +12 -16
- package/dist/{chunk-AGSS7277.js → chunk-NNKXDXXS.js} +7 -24
- package/dist/{chunk-V35JG4JB.js → chunk-OJLTLYHB.js} +152 -334
- package/dist/{chunk-J6MPGQTS.js → chunk-OLAWH5UQ.js} +81 -15
- package/dist/{chunk-T57LYLZT.js → chunk-OOU2WZZE.js} +1 -1
- package/dist/{chunk-CYRKQRPM.js → chunk-OSTKYB55.js} +2 -4
- package/dist/chunk-P4QNXS6I.js +27 -0
- package/dist/chunk-PKES3ISE.js +297 -0
- package/dist/{chunk-ROYSX2S5.js → chunk-PO45POGF.js} +2 -2
- package/dist/{chunk-T7FEBKXN.js → chunk-PPIBVH4R.js} +7 -9
- package/dist/{chunk-3RKP3FMS.js → chunk-PQJFG24Z.js} +295 -23
- package/dist/{chunk-KUA4OJ5Y.js → chunk-Q3UZHW6N.js} +846 -350
- package/dist/{chunk-N5FLEO7W.js → chunk-Q4EMRFNA.js} +37 -37
- package/dist/{chunk-5IUSNGOC.js → chunk-Q4FCYCRE.js} +28 -21
- package/dist/chunk-Q6D6VMI4.js +22 -0
- package/dist/{chunk-UZ2XCLYS.js → chunk-QGSTQH4D.js} +8 -8
- package/dist/{chunk-DUO2TU77.js → chunk-RZOXUSPC.js} +10 -4
- package/dist/{chunk-JMYYOTQG.js → chunk-S26LC76R.js} +13 -1
- package/dist/{chunk-GMX5OS7B.js → chunk-S67UJDGQ.js} +11 -12
- package/dist/chunk-SCIUNBPF.js +44 -0
- package/dist/{chunk-RKBXZN3A.js → chunk-SJJYRZB4.js} +2 -2
- package/dist/chunk-SXGD4ANG.js +25 -0
- package/dist/{chunk-YCWYO6TQ.js → chunk-T7FTXGS3.js} +48 -45
- package/dist/{chunk-FM4RDMKT.js → chunk-TIQJPRDD.js} +115 -61
- package/dist/{chunk-XHJBS436.js → chunk-TIYGSODX.js} +25 -25
- package/dist/{chunk-S2HEXIWI.js → chunk-U2SDMG7C.js} +10 -6
- package/dist/{chunk-2KXTHF3M.js → chunk-U6OC3QEM.js} +253 -33
- package/dist/{chunk-AWSCPCN2.js → chunk-UCGQT677.js} +19 -19
- package/dist/chunk-UHGF5UT5.js +32 -0
- package/dist/{chunk-JW3YWBVB.js → chunk-UN4TEBWN.js} +17 -19
- package/dist/{chunk-ZHH37KZL.js → chunk-V3APN3DY.js} +17 -17
- package/dist/{chunk-ED36RF6Y.js → chunk-V63BC55Q.js} +1 -1
- package/dist/{chunk-XBJVAEEO.js → chunk-VG5JS5SW.js} +3 -2
- package/dist/{chunk-W66O5E25.js → chunk-VPBIMOAQ.js} +13 -15
- package/dist/chunk-VQH24FIP.js +37 -0
- package/dist/{chunk-YNE3RP52.js → chunk-VSFLRN5Y.js} +8 -1
- package/dist/{chunk-7D6L4MTX.js → chunk-W2V54OCL.js} +3 -3
- package/dist/{chunk-2FN63LPV.js → chunk-W5LGKNET.js} +13 -14
- package/dist/{chunk-IQWN5JCP.js → chunk-W5R5SABV.js} +13 -14
- package/dist/{chunk-R3T7CLQ2.js → chunk-WIZWZR4C.js} +41 -41
- package/dist/{chunk-TOY6QKOH.js → chunk-WQOIR3QY.js} +17 -17
- package/dist/{chunk-Y6GZHWSJ.js → chunk-XAIT2YGS.js} +6 -6
- package/dist/chunk-XCUHKYCQ.js +23 -0
- package/dist/{chunk-GSM5UU7A.js → chunk-XQCSWV2G.js} +44 -35
- package/dist/{chunk-OHKJ7PQF.js → chunk-YBSONGSZ.js} +43 -39
- package/dist/{chunk-GXFV6MYU.js → chunk-YISME6ON.js} +72 -39
- package/dist/chunk-YRD4ISED.js +30 -0
- package/dist/{chunk-SD4I7ZO4.js → chunk-YSBHPOY6.js} +43 -53
- package/dist/{chunk-QBFBRV2B.js → chunk-Z2XAOKHK.js} +4 -2
- package/dist/{chunk-5VSF4UUQ.js → chunk-Z7IGUAXL.js} +34 -39
- package/dist/{chunk-MPNJLASA.js → chunk-ZKXQKGWZ.js} +10 -13
- package/dist/{chunk-J64T55EI.js → chunk-ZQ6NZZTB.js} +75 -9
- package/dist/chunk-ZUUI3ZSA.js +38 -0
- package/dist/{chunk-7HXE67BN.js → chunk-ZYNI26MI.js} +2 -2
- package/dist/index.js +32674 -27567
- package/dist/mcp/analyze-cli.js +11 -12
- package/dist/mcp/cli.js +46 -45
- package/dist/mcp/server.js +1210 -574
- package/dist/mcp/worker.js +65 -65
- package/dist/probes/installer.js +21 -23
- package/docs/adr/0010-trace-validation-session-lifecycle.md +390 -0
- package/docs/adr/README.md +1 -0
- package/docs/agent-tools.md +28 -7
- package/docs/ast-grep_rules_catalog.md +5 -3
- package/docs/configuration.md +12 -1
- package/docs/defect-shapes.md +738 -0
- package/docs/engineering-principles.md +12 -0
- package/docs/environment-variables.md +20 -0
- package/docs/features.md +16 -1
- package/docs/globalconfig.md +37 -8
- package/docs/invariants/caches-stores.md +30 -0
- package/docs/invariants/dispatch-runners.md +164 -0
- package/docs/invariants/git-guard-host.md +53 -0
- package/docs/invariants/language-config.md +31 -0
- package/docs/invariants/lsp-trust-exec.md +286 -0
- package/docs/invariants/paths-os.md +59 -0
- package/docs/invariants/session-telemetry.md +74 -0
- package/docs/lsp-capability-matrix.md +105 -12
- package/docs/lsp-idle-eviction.md +37 -18
- package/docs/pi-lens-fixer.md +24 -2
- package/docs/pi-lens-investigator.md +14 -0
- package/docs/pi-lens-merge-policy.md +32 -17
- package/docs/pi-lens-monitor.md +66 -10
- package/docs/pi-lens-orchestration.md +41 -0
- package/docs/pi-lens-release.md +20 -0
- package/docs/pi-lens-retro.md +5 -4
- package/docs/pi-lens-reviewer.md +54 -7
- package/docs/pi-lens-subagent.md +10 -3
- package/docs/release-qa-baseline.md +19 -7
- package/docs/servercapabilities.md +47 -47
- package/docs/settings.md +9 -5
- package/docs/subagent-compat.md +1 -1
- package/docs/usage.md +1 -0
- package/package.json +8 -5
- package/rules/ast-grep-rules/rule-tests/no-return-value-in-generator-test.yml +17 -0
- package/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-js-test.yml +86 -0
- package/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-test.yml +86 -0
- package/rules/ast-grep-rules/rule-tests/unchecked-numeric-parse-python-test.yml +15 -0
- package/rules/ast-grep-rules/rules/no-return-value-in-generator.yml +9 -4
- package/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +119 -0
- package/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +119 -0
- package/rules/ast-grep-rules/rules/unchecked-numeric-parse-python.yml +13 -2
- package/rules/rule-catalog.json +25 -1
- package/scripts/analyze-pi-lens-logs.mjs +15 -5
- package/scripts/lib/is-main-module.mjs +27 -0
- package/scripts/lib/scratch-home-env.mjs +21 -0
- package/scripts/rpc-load-check.mjs +4 -6
- package/scripts/warm-loader-cache.mjs +2 -5
- package/dist/chunk-3PTHXJXR.js +0 -28
- package/dist/chunk-3QED2P4V.js +0 -31
- package/dist/chunk-5WRPDP2A.js +0 -47
- package/dist/chunk-ABBOA7UD.js +0 -157
- package/dist/chunk-CUHSHSB6.js +0 -273
- package/dist/chunk-GL5LUMZE.js +0 -51
- package/dist/chunk-HAD7QRQI.js +0 -30
- package/dist/chunk-JORED7EX.js +0 -44
- package/dist/chunk-KYUB6QDC.js +0 -72
- package/dist/chunk-LZSEQW6A.js +0 -57
- package/dist/chunk-M2IFVFWU.js +0 -79
- package/dist/chunk-M2UD3LPU.js +0 -88
- package/dist/chunk-MBKQHGA7.js +0 -39
- package/dist/chunk-R7YOCSNV.js +0 -23
- package/dist/chunk-SKAMFC7A.js +0 -28
- package/dist/chunk-SYE6T2EB.js +0 -28
- package/dist/chunk-TRETHTQO.js +0 -26
- package/dist/chunk-UA7ZXYDR.js +0 -184
- package/dist/chunk-XTFDJI3T.js +0 -24
- package/dist/chunk-Z3CCVDUB.js +0 -76
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
walkUpDirs
|
|
4
|
+
} from "./chunk-PQJFG24Z.js";
|
|
2
5
|
import {
|
|
3
6
|
__export
|
|
4
7
|
} from "./chunk-NXL4FFQQ.js";
|
|
@@ -12,19 +15,14 @@ function getPackageRoot(importMetaUrl) {
|
|
|
12
15
|
const cached = packageRootCache.get(importMetaUrl);
|
|
13
16
|
if (cached)
|
|
14
17
|
return cached;
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
const parent = path.dirname(current);
|
|
22
|
-
if (parent === current) {
|
|
23
|
-
packageRootCache.set(importMetaUrl, current);
|
|
24
|
-
return current;
|
|
25
|
-
}
|
|
26
|
-
current = parent;
|
|
18
|
+
let root = "";
|
|
19
|
+
for (const dir of walkUpDirs(path.dirname(fileURLToPath(importMetaUrl)))) {
|
|
20
|
+
root = dir;
|
|
21
|
+
if (fs.existsSync(path.join(dir, "package.json")))
|
|
22
|
+
break;
|
|
27
23
|
}
|
|
24
|
+
packageRootCache.set(importMetaUrl, root);
|
|
25
|
+
return root;
|
|
28
26
|
}
|
|
29
27
|
function resolvePackagePath(importMetaUrl, ...segments) {
|
|
30
28
|
return path.join(getPackageRoot(importMetaUrl), ...segments);
|
|
@@ -757,7 +755,6 @@ var Schema = class Schema2 {
|
|
|
757
755
|
case "mapping":
|
|
758
756
|
if (tag.matchByTagPrefix) prefix.mapping.push(tag);
|
|
759
757
|
else exact.mapping[tag.tagName] = tag;
|
|
760
|
-
break;
|
|
761
758
|
}
|
|
762
759
|
}
|
|
763
760
|
const implicitScalarAnyFirstChar = implicitScalarTags.filter((tag) => tag.implicitFirstChars === null);
|
|
@@ -1267,16 +1264,17 @@ function getBlockValue(input, start, end, indent, chomping, folded) {
|
|
|
1267
1264
|
}
|
|
1268
1265
|
const content = line.slice(textIndent);
|
|
1269
1266
|
const first = content.charCodeAt(0);
|
|
1270
|
-
if (folded)
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
atMoreIndented
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
if (
|
|
1278
|
-
|
|
1279
|
-
|
|
1267
|
+
if (folded) {
|
|
1268
|
+
if (first === 32 || first === 9) {
|
|
1269
|
+
atMoreIndented = true;
|
|
1270
|
+
result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines);
|
|
1271
|
+
} else if (atMoreIndented) {
|
|
1272
|
+
atMoreIndented = false;
|
|
1273
|
+
result += "\n".repeat(emptyLines + 1);
|
|
1274
|
+
} else if (emptyLines === 0) {
|
|
1275
|
+
if (didReadContent) result += " ";
|
|
1276
|
+
} else result += "\n".repeat(emptyLines);
|
|
1277
|
+
} else result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines);
|
|
1280
1278
|
result += content;
|
|
1281
1279
|
didReadContent = true;
|
|
1282
1280
|
emptyLines = 0;
|
|
@@ -1308,24 +1306,69 @@ var DEFAULT_TAG_HANDLERS = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
|
1308
1306
|
"!": "!",
|
|
1309
1307
|
"!!": "tag:yaml.org,2002:"
|
|
1310
1308
|
});
|
|
1311
|
-
|
|
1312
|
-
|
|
1309
|
+
var TAG_SUFFIX_CHARS = "-#;/?:@&=+$_.~*'()";
|
|
1310
|
+
var TAG_URI_CHARS = TAG_SUFFIX_CHARS + "!,[]";
|
|
1311
|
+
var HEX = "0123456789ABCDEF";
|
|
1312
|
+
function percentByte(byte) {
|
|
1313
|
+
return "%" + HEX[byte >> 4] + HEX[byte & 15];
|
|
1314
|
+
}
|
|
1315
|
+
function tagPercentEncode(source, isSuffix) {
|
|
1316
|
+
const allowed = isSuffix ? TAG_SUFFIX_CHARS : TAG_URI_CHARS;
|
|
1317
|
+
let result = "";
|
|
1318
|
+
for (let index = 0; index < source.length; index++) {
|
|
1319
|
+
let ch = source.charCodeAt(index);
|
|
1320
|
+
if (ch >= 48 && ch <= 57 || ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || allowed.includes(source[index])) {
|
|
1321
|
+
result += source[index];
|
|
1322
|
+
continue;
|
|
1323
|
+
}
|
|
1324
|
+
if (ch >= 55296 && ch <= 56319) ch = 65536 + ((ch & 1023) << 10) + (source.charCodeAt(++index) & 1023);
|
|
1325
|
+
if (ch < 128) result += percentByte(ch);
|
|
1326
|
+
else if (ch < 2048) result += percentByte(192 | ch >> 6) + percentByte(128 | ch & 63);
|
|
1327
|
+
else if (ch < 65536) result += percentByte(224 | ch >> 12) + percentByte(128 | ch >> 6 & 63) + percentByte(128 | ch & 63);
|
|
1328
|
+
else result += percentByte(240 | ch >> 18) + percentByte(128 | ch >> 12 & 63) + percentByte(128 | ch >> 6 & 63) + percentByte(128 | ch & 63);
|
|
1329
|
+
}
|
|
1330
|
+
return result;
|
|
1331
|
+
}
|
|
1332
|
+
function tagPercentDecode(source) {
|
|
1333
|
+
let result = "";
|
|
1334
|
+
let index = 0;
|
|
1335
|
+
while (index < source.length) {
|
|
1336
|
+
if (source.charCodeAt(index) !== 37) {
|
|
1337
|
+
result += source[index++];
|
|
1338
|
+
continue;
|
|
1339
|
+
}
|
|
1340
|
+
let ch = parseInt(source.slice(index + 1, index + 3), 16);
|
|
1341
|
+
index += 3;
|
|
1342
|
+
if (ch >= 192) {
|
|
1343
|
+
let remaining = ch < 224 ? 1 : ch < 240 ? 2 : 3;
|
|
1344
|
+
ch &= (1 << 6 - remaining) - 1;
|
|
1345
|
+
while (remaining-- > 0) {
|
|
1346
|
+
ch = ch << 6 | parseInt(source.slice(index + 1, index + 3), 16) & 63;
|
|
1347
|
+
index += 3;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
if (ch < 65536) result += String.fromCharCode(ch);
|
|
1351
|
+
else {
|
|
1352
|
+
ch -= 65536;
|
|
1353
|
+
result += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
return result;
|
|
1313
1357
|
}
|
|
1314
1358
|
function tagNameFull(rawTag2, tagHandlers) {
|
|
1315
|
-
if (rawTag2.startsWith("!<") && rawTag2.endsWith(">")) return
|
|
1359
|
+
if (rawTag2.startsWith("!<") && rawTag2.endsWith(">")) return tagPercentDecode(rawTag2.slice(2, -1));
|
|
1316
1360
|
const handleEnd = rawTag2.indexOf("!", 1);
|
|
1317
1361
|
const handle = handleEnd === -1 ? "!" : rawTag2.slice(0, handleEnd + 1);
|
|
1318
|
-
|
|
1319
|
-
return decodeURIComponent(prefix) + decodeURIComponent(rawTag2.slice(handle.length));
|
|
1362
|
+
return tagPercentDecode(tagHandlers?.[handle] ?? DEFAULT_TAG_HANDLERS[handle] ?? handle) + tagPercentDecode(rawTag2.slice(handle.length));
|
|
1320
1363
|
}
|
|
1321
1364
|
function tagNameShort(fullTag) {
|
|
1322
1365
|
let tag = fullTag;
|
|
1323
1366
|
if (tag.charCodeAt(0) === 33) {
|
|
1324
1367
|
tag = tag.slice(1);
|
|
1325
|
-
return `!${tagPercentEncode(tag)}`;
|
|
1368
|
+
return `!${tagPercentEncode(tag, true)}`;
|
|
1326
1369
|
}
|
|
1327
|
-
if (tag.slice(0, 18) === "tag:yaml.org,2002:") return `!!${tagPercentEncode(tag.slice(18))}`;
|
|
1328
|
-
return `!<${tagPercentEncode(tag)}>`;
|
|
1370
|
+
if (tag.slice(0, 18) === "tag:yaml.org,2002:") return `!!${tagPercentEncode(tag.slice(18), true)}`;
|
|
1371
|
+
return `!<${tagPercentEncode(tag, false)}>`;
|
|
1329
1372
|
}
|
|
1330
1373
|
var NO_RANGE$2 = -1;
|
|
1331
1374
|
var MERGE_TAG_NAME = "tag:yaml.org,2002:merge";
|
|
@@ -1788,7 +1831,11 @@ function skipUntilLineEnd(state) {
|
|
|
1788
1831
|
while (ch !== 0 && !isEol(ch)) ch = state.input.charCodeAt(++state.position);
|
|
1789
1832
|
}
|
|
1790
1833
|
function checkPrintable(state, start, end) {
|
|
1791
|
-
|
|
1834
|
+
const match = PATTERN_NON_PRINTABLE.exec(state.input.slice(start, end));
|
|
1835
|
+
if (match !== null) {
|
|
1836
|
+
state.position = start + match.index + match[0].length - 1;
|
|
1837
|
+
throwError(state, "the stream contains non-printable characters");
|
|
1838
|
+
}
|
|
1792
1839
|
}
|
|
1793
1840
|
function readTagProperty(state, props, inFlow) {
|
|
1794
1841
|
if (state.input.charCodeAt(state.position) !== 33) return false;
|
|
@@ -1815,12 +1862,14 @@ function readTagProperty(state, props, inFlow) {
|
|
|
1815
1862
|
state.position++;
|
|
1816
1863
|
} else {
|
|
1817
1864
|
while (ch !== 0 && !isWsOrEol(ch) && !(inFlow && isFlowIndicator(ch))) {
|
|
1818
|
-
if (ch === 33)
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1865
|
+
if (ch === 33) {
|
|
1866
|
+
if (!isNamed) {
|
|
1867
|
+
tagHandle = state.input.slice(suffixStart - 1, state.position + 1);
|
|
1868
|
+
if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, "named tag handle cannot contain such characters");
|
|
1869
|
+
isNamed = true;
|
|
1870
|
+
suffixStart = state.position + 1;
|
|
1871
|
+
} else throwError(state, "tag suffix cannot contain exclamation marks");
|
|
1872
|
+
}
|
|
1824
1873
|
ch = state.input.charCodeAt(++state.position);
|
|
1825
1874
|
}
|
|
1826
1875
|
tagName = state.input.slice(suffixStart, state.position);
|
|
@@ -2004,7 +2053,7 @@ function readBlockScalar(state, parentIndent, props) {
|
|
|
2004
2053
|
function canStartPlainScalar(state, nodeContext) {
|
|
2005
2054
|
const ch = state.input.charCodeAt(state.position);
|
|
2006
2055
|
const inFlow = nodeContext === CONTEXT_FLOW_IN;
|
|
2007
|
-
if (ch === 0 || isWsOrEol(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96 ||
|
|
2056
|
+
if (ch === 0 || isWsOrEol(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96 || isFlowIndicator(ch)) return false;
|
|
2008
2057
|
if (ch === 63 || ch === 45) {
|
|
2009
2058
|
const following = state.input.charCodeAt(state.position + 1);
|
|
2010
2059
|
if (isWsOrEolOrEnd(following) || inFlow && isFlowIndicator(following)) return false;
|
|
@@ -2276,19 +2325,20 @@ function parseNode(state, parentIndent, nodeContext, allowToSeek, allowCompact,
|
|
|
2276
2325
|
if (indentStatus === 1 || nodeContext === CONTEXT_BLOCK_OUT) {
|
|
2277
2326
|
const flowIndent = nodeContext === CONTEXT_FLOW_IN || nodeContext === CONTEXT_FLOW_OUT ? parentIndent : parentIndent + 1;
|
|
2278
2327
|
const blockIndent = state.position - state.lineStart;
|
|
2279
|
-
if (indentStatus === 1)
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2328
|
+
if (indentStatus === 1) {
|
|
2329
|
+
if (allowBlockCollections && (readBlockSequence(state, blockIndent, props) || readBlockMapping(state, blockIndent, flowIndent, props)) || readFlowCollection(state, flowIndent, props)) hasContent = true;
|
|
2330
|
+
else {
|
|
2331
|
+
const ch = state.input.charCodeAt(state.position);
|
|
2332
|
+
if (propertyStart !== null && allowPropertyMapping && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62) {
|
|
2333
|
+
const fallbackState = snapshotState(state);
|
|
2334
|
+
const propertyIndent = propertyStart.position - propertyStart.lineStart;
|
|
2335
|
+
restoreState(state, propertyStart);
|
|
2336
|
+
if (readBlockMapping(state, propertyIndent, flowIndent, emptyProperties()) && state.events[fallbackState.eventsLength]?.type === EVENT_ID.MAPPING) hasContent = true;
|
|
2337
|
+
else restoreState(state, fallbackState);
|
|
2338
|
+
}
|
|
2339
|
+
if (!hasContent && (allowBlockScalars && readBlockScalar(state, flowIndent, props) || readSingleQuotedScalar(state, flowIndent, props) || readDoubleQuotedScalar(state, flowIndent, props) || readAlias(state, props) || readPlainScalar(state, flowIndent, nodeContext, props))) hasContent = true;
|
|
2288
2340
|
}
|
|
2289
|
-
|
|
2290
|
-
}
|
|
2291
|
-
else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent, props);
|
|
2341
|
+
} else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent, props);
|
|
2292
2342
|
}
|
|
2293
2343
|
allowBlockScalars = allowBlockScalars && !hasContent;
|
|
2294
2344
|
if (!hasContent && (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1 || allowBlockScalars)) {
|
|
@@ -2589,7 +2639,6 @@ function visitNode(node, visitor, ctx) {
|
|
|
2589
2639
|
isKey: false
|
|
2590
2640
|
})) return true;
|
|
2591
2641
|
}
|
|
2592
|
-
break;
|
|
2593
2642
|
}
|
|
2594
2643
|
return false;
|
|
2595
2644
|
}
|
|
@@ -3027,8 +3076,10 @@ function writeBlockMapping(state, level, node, compact) {
|
|
|
3027
3076
|
const keyHasLineBreak = key.kind === "scalar" && key.value.indexOf("\n") !== -1;
|
|
3028
3077
|
const keyIsTooLong = keyText.length > 1024 && /^[\s\S]{1025}/u.test(keyText);
|
|
3029
3078
|
const explicitPair = keyIsBlock || keyHasLineBreak || keyIsTooLong;
|
|
3030
|
-
if (explicitPair)
|
|
3031
|
-
|
|
3079
|
+
if (explicitPair) {
|
|
3080
|
+
if (keyText && CHAR_LINE_FEED === keyText.charCodeAt(0)) pairBuffer += "?";
|
|
3081
|
+
else pairBuffer += "? ";
|
|
3082
|
+
}
|
|
3032
3083
|
pairBuffer += keyText;
|
|
3033
3084
|
if (explicitPair) pairBuffer += generateNextLine(state, level);
|
|
3034
3085
|
const valueText = writeNode(state, level + 1, value, node, {
|
|
@@ -3064,12 +3115,15 @@ function writeNode(state, level, node, parent, ctx) {
|
|
|
3064
3115
|
let body;
|
|
3065
3116
|
let shouldPrintTag = node.tagged;
|
|
3066
3117
|
const useBlockCollection = block && (node.kind === "mapping" || node.kind === "sequence") && node.style === COLLECTION_STYLE.BLOCK && node.items.length !== 0;
|
|
3067
|
-
if (node.kind === "mapping")
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
else
|
|
3071
|
-
|
|
3072
|
-
|
|
3118
|
+
if (node.kind === "mapping") {
|
|
3119
|
+
if (useBlockCollection) body = writeBlockMapping(state, level, node, compact);
|
|
3120
|
+
else body = writeFlowMapping(state, level, node);
|
|
3121
|
+
} else if (node.kind === "sequence") {
|
|
3122
|
+
if (useBlockCollection) {
|
|
3123
|
+
if (state.seqNoIndent && !isblockseq && level > 0) body = writeBlockSequence(state, level - 1, node, compact);
|
|
3124
|
+
else body = writeBlockSequence(state, level, node, compact);
|
|
3125
|
+
} else body = writeFlowSequence(state, level, node);
|
|
3126
|
+
} else {
|
|
3073
3127
|
const layout = scalarLayout(state, node, parent, level, iskey, !block);
|
|
3074
3128
|
detectAllowedStyles(layout);
|
|
3075
3129
|
for (const rule of state.scalarStyleRules) rule(layout);
|
|
@@ -3363,5 +3417,5 @@ export {
|
|
|
3363
3417
|
/*! Bundled license information:
|
|
3364
3418
|
|
|
3365
3419
|
js-yaml/dist/js-yaml.mjs:
|
|
3366
|
-
(*! js-yaml 5.
|
|
3420
|
+
(*! js-yaml 5.5.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
3367
3421
|
*/
|
|
@@ -6,15 +6,11 @@ import {
|
|
|
6
6
|
buildReverseDependencyIndexFromGraph,
|
|
7
7
|
getLSPService,
|
|
8
8
|
rankFilesByReverseDependencyCentrality
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
createGitIdentityResolver,
|
|
12
|
-
resolveGitIdentity
|
|
13
|
-
} from "./chunk-UA7ZXYDR.js";
|
|
9
|
+
} from "./chunk-GZE7WOI4.js";
|
|
14
10
|
import {
|
|
15
11
|
notePersistWorkerMessageFault,
|
|
16
12
|
readWorkerHeapStatistics
|
|
17
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PPIBVH4R.js";
|
|
18
14
|
import {
|
|
19
15
|
buildQualifiedName,
|
|
20
16
|
findOwnerName
|
|
@@ -30,46 +26,48 @@ import {
|
|
|
30
26
|
resolveProjectReferenceImport,
|
|
31
27
|
resolveWorkspacePackageImport,
|
|
32
28
|
symbolExtractionGrammar
|
|
33
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-OJLTLYHB.js";
|
|
34
30
|
import {
|
|
35
31
|
classifyTreeSitterWasmError,
|
|
36
32
|
getSharedTreeSitterClient,
|
|
37
33
|
logTreeSitterCacheStats,
|
|
38
34
|
withTreeSitterRoot
|
|
39
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-GAACZY6R.js";
|
|
40
36
|
import {
|
|
41
37
|
getReviewGraphMaxFilesDerived
|
|
42
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-ZYNI26MI.js";
|
|
43
39
|
import {
|
|
44
40
|
readGzipStageWorkerResult,
|
|
45
41
|
reapStageFile
|
|
46
42
|
} from "./chunk-IJYGIDF4.js";
|
|
47
43
|
import {
|
|
48
44
|
collectSourceFilesWithBudgetAsync
|
|
49
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-2RLWJO5K.js";
|
|
50
46
|
import {
|
|
51
47
|
collectUntrackedIgnoredIds,
|
|
48
|
+
createGitIdentityResolver,
|
|
52
49
|
getProjectDataDir,
|
|
53
|
-
isStaleStageFile
|
|
54
|
-
|
|
50
|
+
isStaleStageFile,
|
|
51
|
+
resolveGitIdentity
|
|
52
|
+
} from "./chunk-Q3UZHW6N.js";
|
|
55
53
|
import {
|
|
56
54
|
KIND_EXTENSIONS,
|
|
57
55
|
detectFileKind
|
|
58
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-RZOXUSPC.js";
|
|
59
57
|
import {
|
|
60
58
|
detectFileRole
|
|
61
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-OLAWH5UQ.js";
|
|
62
60
|
import {
|
|
63
61
|
writeFileAtomic
|
|
64
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-MN7MHUXQ.js";
|
|
65
63
|
import {
|
|
66
64
|
compareOrdinal,
|
|
67
65
|
escapeRegExp,
|
|
68
66
|
incrementDegradationCount
|
|
69
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-ZQ6NZZTB.js";
|
|
70
68
|
import {
|
|
71
69
|
logLatency
|
|
72
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-Z2XAOKHK.js";
|
|
73
71
|
import {
|
|
74
72
|
createNdjsonLogger,
|
|
75
73
|
getGlobalPiLensLogDir,
|
|
@@ -77,21 +75,19 @@ import {
|
|
|
77
75
|
getTurnId,
|
|
78
76
|
isTestMode,
|
|
79
77
|
lazyEnvNumber
|
|
80
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-VSFLRN5Y.js";
|
|
81
79
|
import {
|
|
82
80
|
FactStore
|
|
83
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-OSTKYB55.js";
|
|
84
82
|
import {
|
|
85
83
|
BoundedFifoMap,
|
|
86
|
-
BoundedLruCache
|
|
87
|
-
} from "./chunk-ABBOA7UD.js";
|
|
88
|
-
import {
|
|
84
|
+
BoundedLruCache,
|
|
89
85
|
isAtOrAboveHomeDir,
|
|
90
86
|
isUnderDir,
|
|
91
87
|
normalizeFilePath,
|
|
92
88
|
normalizeMapKey,
|
|
93
89
|
toProjectRelativePath
|
|
94
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-PQJFG24Z.js";
|
|
95
91
|
|
|
96
92
|
// dist/clients/review-graph/builder.js
|
|
97
93
|
import { createHash as createHash2 } from "node:crypto";
|
|
@@ -423,6 +419,9 @@ function normalizeGraphSourcePath(memo, raw) {
|
|
|
423
419
|
memo.normalizeCalls.value++;
|
|
424
420
|
return normalized;
|
|
425
421
|
}
|
|
422
|
+
function _resetReviewGraphExtractorCacheForTests() {
|
|
423
|
+
extractorCache.clear();
|
|
424
|
+
}
|
|
426
425
|
function _resetReviewGraphSourcePathMemoForTests() {
|
|
427
426
|
_sourcePathMemos.clear();
|
|
428
427
|
}
|
|
@@ -2479,8 +2478,8 @@ async function ensureReviewGraphFacts(filePath, cwd, facts, contentOverride) {
|
|
|
2479
2478
|
}
|
|
2480
2479
|
try {
|
|
2481
2480
|
const [{ importFactProvider }, { functionFactProvider }] = await Promise.all([
|
|
2482
|
-
import("./chunk-
|
|
2483
|
-
import("./chunk-
|
|
2481
|
+
import("./chunk-YRD4ISED.js"),
|
|
2482
|
+
import("./chunk-FJIVKLPH.js")
|
|
2484
2483
|
]);
|
|
2485
2484
|
await importFactProvider.run(ctx, facts);
|
|
2486
2485
|
await functionFactProvider.run(ctx, facts);
|
|
@@ -4162,6 +4161,7 @@ export {
|
|
|
4162
4161
|
reviewGraphIrContentHash,
|
|
4163
4162
|
publishReviewGraphFileIr,
|
|
4164
4163
|
REVIEW_GRAPH_VERSION,
|
|
4164
|
+
_resetReviewGraphExtractorCacheForTests,
|
|
4165
4165
|
_resetReviewGraphSourcePathMemoForTests,
|
|
4166
4166
|
graphWasmTrapDetail,
|
|
4167
4167
|
getGraphBuildInfoForGraph,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
CODE_KINDS,
|
|
4
|
+
DOTNET_CSHARP_PROJECT_MARKERS,
|
|
4
5
|
DOTNET_CSHARP_ROOT_MARKERS,
|
|
6
|
+
DOTNET_CSHARP_SOLUTION_MARKERS,
|
|
5
7
|
DOTNET_FSHARP_ROOT_MARKERS,
|
|
6
8
|
KIND_EXTENSIONS,
|
|
7
9
|
LEAN_ROOT_MARKERS,
|
|
@@ -17,16 +19,18 @@ import {
|
|
|
17
19
|
isHelmYamlTemplatePath,
|
|
18
20
|
isJstsFactFile,
|
|
19
21
|
isReadableSourceFile
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-RZOXUSPC.js";
|
|
23
|
+
import "./chunk-J6JP25XU.js";
|
|
24
|
+
import "./chunk-S26LC76R.js";
|
|
25
|
+
import "./chunk-Z2XAOKHK.js";
|
|
26
|
+
import "./chunk-VSFLRN5Y.js";
|
|
27
|
+
import "./chunk-PQJFG24Z.js";
|
|
26
28
|
import "./chunk-NXL4FFQQ.js";
|
|
27
29
|
export {
|
|
28
30
|
CODE_KINDS,
|
|
31
|
+
DOTNET_CSHARP_PROJECT_MARKERS,
|
|
29
32
|
DOTNET_CSHARP_ROOT_MARKERS,
|
|
33
|
+
DOTNET_CSHARP_SOLUTION_MARKERS,
|
|
30
34
|
DOTNET_FSHARP_ROOT_MARKERS,
|
|
31
35
|
KIND_EXTENSIONS,
|
|
32
36
|
LEAN_ROOT_MARKERS,
|