@herbertgao/pi-extensions 2026.11.20 → 2026.11.21
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 +6 -0
- package/README.md +8 -8
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/node_modules/@estebanforge/pi-antigravity-bridge/CHANGELOG.md +8 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/README.md +9 -5
- package/node_modules/@estebanforge/pi-antigravity-bridge/extensions/index.ts +11 -1
- package/node_modules/@estebanforge/pi-antigravity-bridge/package.json +1 -1
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/config.ts +71 -13
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/provider.ts +148 -47
- package/node_modules/@narumitw/pi-btw/CHANGELOG.md +7 -0
- package/node_modules/@narumitw/pi-btw/dist/chunks/{main-tree-picker-3PXJARQW.ts → main-tree-picker-WMTVRTR2.ts} +1 -1
- package/node_modules/@narumitw/pi-btw/dist/chunks/main-tree-picker-WMTVRTR2.ts.map +7 -0
- package/node_modules/@narumitw/pi-btw/dist/index.ts +1 -1
- package/node_modules/@narumitw/pi-btw/docs/core-alignment.md +6 -0
- package/node_modules/@narumitw/pi-btw/package.json +5 -5
- package/node_modules/@narumitw/pi-btw/src/main-tree-picker.ts +1 -1
- package/node_modules/@narumitw/pi-caffeinate/CHANGELOG.md +7 -0
- package/node_modules/@narumitw/pi-caffeinate/package.json +3 -3
- package/node_modules/pi-lens/CHANGELOG-USER.md +6 -6
- package/node_modules/pi-lens/CHANGELOG.md +121 -0
- package/node_modules/pi-lens/README.md +9 -2
- package/node_modules/pi-lens/dist/{chunk-ZVQUYCBU.js → chunk-2ERVW2UF.js} +161 -100
- package/node_modules/pi-lens/dist/{chunk-AFSG6YUB.js → chunk-2K7BUOKS.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-BJGWP4UX.js → chunk-3JJ4OAJI.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-GIK6VUCY.js → chunk-3UHGSUVL.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-EKQDQPX6.js → chunk-463WN3VP.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-F7BFIENK.js → chunk-4X3ML2UQ.js} +29 -32
- package/node_modules/pi-lens/dist/{chunk-7JMEPY6P.js → chunk-5BI5YP57.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-MKW7ZUTT.js → chunk-5Z4XLUFF.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-NIZKGBOU.js → chunk-62AJH3IN.js} +12 -14
- package/node_modules/pi-lens/dist/{chunk-4GLSO2EM.js → chunk-6F34GMP7.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-35UJUF27.js → chunk-6LIUVGOR.js} +13 -3
- package/node_modules/pi-lens/dist/{chunk-WJ7GY5WJ.js → chunk-6REF4GCO.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-HFIFEH46.js → chunk-7KRR24GO.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-WAK2AXQQ.js → chunk-7OMOMBEQ.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-S7KUDW73.js → chunk-7ZFXICNN.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-VEF3GFOL.js → chunk-ABKRQVOY.js} +28 -52
- package/node_modules/pi-lens/dist/{chunk-Y2LIOCA7.js → chunk-ANSLRJBG.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-ARTCVE6I.js → chunk-AWMFBPGJ.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-H6DNTQ4V.js → chunk-BG7KHGNX.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-FD4LJQ6Y.js → chunk-BK2R2223.js} +10 -8
- package/node_modules/pi-lens/dist/{chunk-TWAQFMLW.js → chunk-BXXC6KRR.js} +31 -34
- package/node_modules/pi-lens/dist/{chunk-S247BOH2.js → chunk-CKJS2AUI.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-GNK2IHVG.js → chunk-COGU5KQJ.js} +15 -15
- package/node_modules/pi-lens/dist/{chunk-P7EV5ISR.js → chunk-CQNXALZJ.js} +12 -6
- package/node_modules/pi-lens/dist/{chunk-IO6P3NBP.js → chunk-CSZESDPP.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-CZ5TCJPB.js +98 -0
- package/node_modules/pi-lens/dist/{chunk-DLGJYQML.js → chunk-D2LFEA5U.js} +9 -2
- package/node_modules/pi-lens/dist/chunk-D3KLF5CD.js +50 -0
- package/node_modules/pi-lens/dist/{chunk-W2JPGW7Q.js → chunk-ENJ2M76Y.js} +20 -20
- package/node_modules/pi-lens/dist/{chunk-2DWNYVUN.js → chunk-EQKF6BAK.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-KIQSNH3F.js → chunk-F2SAP2FM.js} +38 -45
- package/node_modules/pi-lens/dist/{chunk-BYIEU4E4.js → chunk-F6QAJXQV.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-GR2QDWH5.js +25 -0
- package/node_modules/pi-lens/dist/{chunk-T2D2WWP6.js → chunk-GVE5VZYQ.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-HMXWZUQW.js → chunk-GWZZOJD2.js} +1 -1
- package/node_modules/pi-lens/dist/chunk-GZS6VPIE.js +27 -0
- package/node_modules/pi-lens/dist/chunk-H4B4SC7I.js +71 -0
- package/node_modules/pi-lens/dist/{chunk-2RQREVGO.js → chunk-HA6TUJOE.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-NAACKIKT.js → chunk-HKPJTI47.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-NHHS5T52.js → chunk-HPKC55MA.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-B2QO7GHY.js → chunk-I65CQLCG.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-BQ72NQQM.js → chunk-IDKLWVKY.js} +11 -11
- package/node_modules/pi-lens/dist/chunk-IUM2Q7NF.js +25 -0
- package/node_modules/pi-lens/dist/{chunk-PVV27TOX.js → chunk-J24IS3KZ.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-DKXIUGNA.js → chunk-J2DAHH4T.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-CDAJQBKJ.js → chunk-JBDZVOFL.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-T7KHGEJ5.js → chunk-JC6NFC57.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-BWGNVM33.js → chunk-JTHEUTW7.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-WWZLT6AM.js → chunk-JWW3ODBN.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-Q32RJDYC.js → chunk-K3ZIYLHT.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-LDPY22FS.js → chunk-KDPZA2UE.js} +2 -3
- package/node_modules/pi-lens/dist/{chunk-YIEHUKX2.js → chunk-KMY2OU4T.js} +489 -285
- package/node_modules/pi-lens/dist/{chunk-WH6O4IFD.js → chunk-KQF7VT26.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-OG3UCAHV.js → chunk-KVGA7X76.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-TABDCX35.js → chunk-KW7O72AK.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-AOEVZXR6.js → chunk-LEQTVRSV.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-7BWPQZHE.js → chunk-LKPSBM6S.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-WA6U2URH.js → chunk-LKW2HFSZ.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-M3QGXGY4.js → chunk-LURFD4HD.js} +624 -97
- package/node_modules/pi-lens/dist/{chunk-2YQ5LI7R.js → chunk-M6ELTECW.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-OHTHVILU.js → chunk-MGVVYYKW.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-W2YHHNY3.js → chunk-MQBKGRSB.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-MET776XM.js → chunk-MVG2ZEAO.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-2XALJI2K.js → chunk-MY4XNNTX.js} +39 -41
- package/node_modules/pi-lens/dist/{chunk-GFCPPCNR.js → chunk-N4AJVFRF.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-UARVPNAU.js → chunk-OFKKMXWM.js} +31 -36
- package/node_modules/pi-lens/dist/{chunk-DHFJS2I4.js → chunk-OFZE4ANN.js} +8 -8
- package/node_modules/pi-lens/dist/chunk-OLXBUTJR.js +61 -0
- package/node_modules/pi-lens/dist/{chunk-SJ2SR432.js → chunk-OZGEHOSG.js} +38 -17
- package/node_modules/pi-lens/dist/{chunk-6MDWNZ7E.js → chunk-PKGOROPQ.js} +40 -2
- package/node_modules/pi-lens/dist/{chunk-3IWMNN2S.js → chunk-Q6D5QKRG.js} +17 -17
- package/node_modules/pi-lens/dist/{chunk-JGCBMCCS.js → chunk-QECLJFHI.js} +12 -17
- package/node_modules/pi-lens/dist/{chunk-KXKM2DFP.js → chunk-QJA33VD5.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-YV7XVYSJ.js → chunk-R5XVJ6AN.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-62PIU4TO.js → chunk-REZL4OM4.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-NNDZ7DOP.js → chunk-RK5RBREN.js} +74 -107
- package/node_modules/pi-lens/dist/chunk-RP5ZQTHO.js +86 -0
- package/node_modules/pi-lens/dist/{chunk-HKRESBMC.js → chunk-RURPX2YV.js} +23 -23
- package/node_modules/pi-lens/dist/chunk-TB5MGZLS.js +53 -0
- package/node_modules/pi-lens/dist/chunk-TC63XRYP.js +27 -0
- package/node_modules/pi-lens/dist/chunk-TJOYHAXJ.js +69 -0
- package/node_modules/pi-lens/dist/{chunk-NZ7NSKIW.js → chunk-TRXKDCBP.js} +13 -13
- package/node_modules/pi-lens/dist/{chunk-7WAQ3K26.js → chunk-TTK37D7R.js} +22 -23
- package/node_modules/pi-lens/dist/{chunk-ALTHJUZO.js → chunk-UH3QHLR5.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-6MZLS6CK.js → chunk-UNTJJ7GN.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-XRLZ75YY.js → chunk-UPAFSETJ.js} +54 -59
- package/node_modules/pi-lens/dist/{chunk-N2U644ZW.js → chunk-UX75PTQW.js} +50 -17
- package/node_modules/pi-lens/dist/{chunk-EXHSWN3P.js → chunk-V353PYMK.js} +423 -233
- package/node_modules/pi-lens/dist/{chunk-SL4G67AP.js → chunk-V4TFQY5G.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-YOMLAKU6.js → chunk-VC3W54G3.js} +289 -138
- package/node_modules/pi-lens/dist/{chunk-KSQJBGRO.js → chunk-VSBCJVPC.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-EBXCYEII.js → chunk-WAQQGXVV.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-7ORBRDFY.js → chunk-WLEVWR7Y.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-Q4UQNTLB.js → chunk-WPMPVP5I.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-TQKWR5AZ.js → chunk-WXNLFOC2.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-HOWHAKXO.js → chunk-Y3ZNOZZS.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-DNJJVKJZ.js → chunk-YL6JQTWC.js} +29 -32
- package/node_modules/pi-lens/dist/{chunk-HUWW77QY.js → chunk-YVE5Q2UU.js} +86 -217
- package/node_modules/pi-lens/dist/{chunk-25CAONWT.js → chunk-YZNARDMM.js} +12 -9
- package/node_modules/pi-lens/dist/{chunk-HERQPNY6.js → chunk-ZDWNFZJ2.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-MKQFSW2Q.js → chunk-ZEUF7BIN.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-AB26NAHA.js → chunk-ZIF4WLWR.js} +45 -25
- package/node_modules/pi-lens/dist/{chunk-6MWX2J5H.js → chunk-ZSPVF7KI.js} +227 -24
- package/node_modules/pi-lens/dist/{chunk-QQGZY2BR.js → chunk-ZX6OKBVO.js} +2 -2
- package/node_modules/pi-lens/dist/index.js +6455 -5243
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +8 -8
- package/node_modules/pi-lens/dist/mcp/cli.js +39 -41
- package/node_modules/pi-lens/dist/mcp/server.js +870 -559
- package/node_modules/pi-lens/dist/mcp/worker.js +68 -59
- package/node_modules/pi-lens/dist/probes/installer.js +19 -20
- package/node_modules/pi-lens/docs/configuration.md +24 -10
- package/node_modules/pi-lens/docs/defect-shapes.md +18 -2
- package/node_modules/pi-lens/docs/environment-variables.md +18 -9
- package/node_modules/pi-lens/docs/globalconfig.md +16 -0
- package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +7 -0
- package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +33 -3
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +23 -10
- package/node_modules/pi-lens/docs/lsp-idle-eviction.md +8 -3
- package/node_modules/pi-lens/docs/release-qa-baseline.md +22 -17
- package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
- package/node_modules/pi-lens/docs/settings.md +9 -2
- package/node_modules/pi-lens/docs/tools.md +1 -1
- package/node_modules/pi-lens/package.json +3 -3
- package/package.json +7 -7
- package/node_modules/@narumitw/pi-btw/dist/chunks/main-tree-picker-3PXJARQW.ts.map +0 -7
- package/node_modules/pi-lens/dist/chunk-3UTDLQWO.js +0 -88
- package/node_modules/pi-lens/dist/chunk-3Z7Z3B7V.js +0 -27
- package/node_modules/pi-lens/dist/chunk-4E4OCW3L.js +0 -38
- package/node_modules/pi-lens/dist/chunk-5HVDD7IA.js +0 -17
- package/node_modules/pi-lens/dist/chunk-BKJ6WZKP.js +0 -255
- package/node_modules/pi-lens/dist/chunk-D3UQWOCB.js +0 -46
- package/node_modules/pi-lens/dist/chunk-EH6EHFW2.js +0 -73
- package/node_modules/pi-lens/dist/chunk-J7VNGHLN.js +0 -69
- package/node_modules/pi-lens/dist/chunk-L3Q72QGQ.js +0 -25
- package/node_modules/pi-lens/dist/chunk-TFSBHRL2.js +0 -25
- package/node_modules/pi-lens/dist/chunk-UWBD3JMH.js +0 -56
- package/node_modules/pi-lens/dist/chunk-XWWFESYZ.js +0 -27
- package/node_modules/pi-lens/dist/chunk-XZSXSM4K.js +0 -27
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
loadCallGraph,
|
|
8
8
|
parseSymbolKey,
|
|
9
9
|
saveCallGraph
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5Z4XLUFF.js";
|
|
11
11
|
import "./chunk-3MED75HT.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-LURFD4HD.js";
|
|
13
|
+
import "./chunk-UX75PTQW.js";
|
|
14
|
+
import "./chunk-D2LFEA5U.js";
|
|
15
|
+
import "./chunk-463WN3VP.js";
|
|
16
|
+
import "./chunk-CQNXALZJ.js";
|
|
17
17
|
import "./chunk-S26LC76R.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-YVE5Q2UU.js";
|
|
19
19
|
import "./chunk-LJDODBBZ.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-ZSPVF7KI.js";
|
|
21
21
|
import "./chunk-NXL4FFQQ.js";
|
|
22
22
|
export {
|
|
23
23
|
CALL_GRAPH_CACHE_VERSION,
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
MAX_SESSION_FACT_RECORDS,
|
|
5
5
|
getFactStoreEvictionReporter,
|
|
6
6
|
setFactStoreEvictionReporter
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-HPKC55MA.js";
|
|
8
|
+
import "./chunk-ZSPVF7KI.js";
|
|
9
9
|
import "./chunk-NXL4FFQQ.js";
|
|
10
10
|
export {
|
|
11
11
|
FactStore,
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
parseJsonc
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BG7KHGNX.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveLanguage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HKPJTI47.js";
|
|
8
8
|
import {
|
|
9
9
|
extractTomlTableSection,
|
|
10
10
|
hasTomlTable,
|
|
11
11
|
parseTomlScalarString,
|
|
12
12
|
parseTomlStringArray
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-J2DAHH4T.js";
|
|
14
14
|
import {
|
|
15
15
|
getProjectTrustState
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-463WN3VP.js";
|
|
17
17
|
import {
|
|
18
18
|
incrementDegradationCount,
|
|
19
19
|
logExtension,
|
|
20
20
|
recordDegradationOnce
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CQNXALZJ.js";
|
|
22
22
|
import {
|
|
23
|
+
isTestMode,
|
|
23
24
|
logLatency
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-YVE5Q2UU.js";
|
|
25
26
|
import {
|
|
26
27
|
UV_WORKSPACE_EXCLUDE_DIALECT,
|
|
27
28
|
UV_WORKSPACE_MEMBERS_DIALECT,
|
|
@@ -29,7 +30,16 @@ import {
|
|
|
29
30
|
realpathOrResolve,
|
|
30
31
|
relativeInside,
|
|
31
32
|
walkUpDirs
|
|
32
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-ZSPVF7KI.js";
|
|
34
|
+
|
|
35
|
+
// dist/clients/scanner-temp-root.js
|
|
36
|
+
import * as os from "node:os";
|
|
37
|
+
function scannerReportParentDir() {
|
|
38
|
+
if (!isTestMode() && process.env.PI_LENS_TEST_SCANNER_HARNESS !== "1")
|
|
39
|
+
return os.tmpdir();
|
|
40
|
+
const override = process.env.PI_LENS_TEST_SCANNER_TMPDIR?.trim();
|
|
41
|
+
return override && override.length > 0 ? override : os.tmpdir();
|
|
42
|
+
}
|
|
33
43
|
|
|
34
44
|
// dist/clients/bounded-telemetry.js
|
|
35
45
|
var MAX_TRACKED_TURN_CAPS = 64;
|
|
@@ -105,8 +115,25 @@ function resetBoundedTelemetry() {
|
|
|
105
115
|
|
|
106
116
|
// dist/clients/python-environment.js
|
|
107
117
|
import { access, readFile } from "node:fs/promises";
|
|
108
|
-
import
|
|
109
|
-
import path, { dirname, join } from "node:path";
|
|
118
|
+
import os2 from "node:os";
|
|
119
|
+
import path, { dirname, join as join2 } from "node:path";
|
|
120
|
+
|
|
121
|
+
// dist/clients/python-ambient-environment.js
|
|
122
|
+
import { join, posix, win32 } from "node:path";
|
|
123
|
+
var AMBIENT_ENVIRONMENT_VARIABLES = {
|
|
124
|
+
"uv-project-environment": "UV_PROJECT_ENVIRONMENT",
|
|
125
|
+
"virtual-env": "VIRTUAL_ENV",
|
|
126
|
+
conda: "CONDA_PREFIX"
|
|
127
|
+
};
|
|
128
|
+
var AMBIENT_PYTHON_ENVIRONMENT_VARIABLES = Object.values(AMBIENT_ENVIRONMENT_VARIABLES);
|
|
129
|
+
function hasAmbientPythonEnvironment(env = process.env) {
|
|
130
|
+
return AMBIENT_PYTHON_ENVIRONMENT_VARIABLES.some((name) => Boolean(env[name]));
|
|
131
|
+
}
|
|
132
|
+
function pythonEnvironmentBinDir(root, platform = process.platform) {
|
|
133
|
+
return join(root, platform === "win32" ? "Scripts" : "bin");
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// dist/clients/python-environment.js
|
|
110
137
|
var UV_WORKSPACE_TABLE = "tool\\.uv\\.workspace";
|
|
111
138
|
async function findUvWorkspace(startDir, homeDir) {
|
|
112
139
|
let walkStart;
|
|
@@ -163,15 +190,7 @@ var PROJECT_VENV_DIRS = [
|
|
|
163
190
|
{ dir: "venv", source: "project-venv" }
|
|
164
191
|
];
|
|
165
192
|
var PROJECT_VENV_DIR_NAMES = PROJECT_VENV_DIRS.map((venv) => venv.dir);
|
|
166
|
-
|
|
167
|
-
"uv-project-environment": "UV_PROJECT_ENVIRONMENT",
|
|
168
|
-
"virtual-env": "VIRTUAL_ENV",
|
|
169
|
-
conda: "CONDA_PREFIX"
|
|
170
|
-
};
|
|
171
|
-
function hasAmbientPythonEnvironment(env = process.env) {
|
|
172
|
-
return Object.values(AMBIENT_ENVIRONMENT_VARIABLES).some((name) => Boolean(env[name]));
|
|
173
|
-
}
|
|
174
|
-
async function detectPythonEnvironment(projectRoot, homeDir = os.homedir(), options = {}) {
|
|
193
|
+
async function detectPythonEnvironment(projectRoot, homeDir = os2.homedir(), options = {}) {
|
|
175
194
|
const root = realpathOrResolve(projectRoot);
|
|
176
195
|
const uvWorkspace = await findUvWorkspace(root, homeDir);
|
|
177
196
|
const isProjectRoot = uvWorkspace?.isStartDir === true;
|
|
@@ -224,7 +243,7 @@ async function detectPythonEnvironment(projectRoot, homeDir = os.homedir(), opti
|
|
|
224
243
|
}
|
|
225
244
|
continue;
|
|
226
245
|
}
|
|
227
|
-
const binDir =
|
|
246
|
+
const binDir = pythonEnvironmentBinDir(candidate.root);
|
|
228
247
|
const pythonPath = path.join(binDir, process.platform === "win32" ? "python.exe" : "python");
|
|
229
248
|
try {
|
|
230
249
|
await access(pythonPath);
|
|
@@ -376,7 +395,7 @@ async function readRuffTier(dir, pyproject, pyprojectPath) {
|
|
|
376
395
|
let configPath;
|
|
377
396
|
let config;
|
|
378
397
|
for (const name of [".ruff.toml", "ruff.toml"]) {
|
|
379
|
-
const candidatePath =
|
|
398
|
+
const candidatePath = join2(dir, name);
|
|
380
399
|
config = await readDeclarationFile(candidatePath);
|
|
381
400
|
if (config !== void 0) {
|
|
382
401
|
configPath = candidatePath;
|
|
@@ -400,7 +419,7 @@ async function readRuffTier(dir, pyproject, pyprojectPath) {
|
|
|
400
419
|
};
|
|
401
420
|
}
|
|
402
421
|
async function readPyrightTier(dir, pyproject, pyprojectPath) {
|
|
403
|
-
const configPath =
|
|
422
|
+
const configPath = join2(dir, "pyrightconfig.json");
|
|
404
423
|
const config = await readDeclarationFile(configPath);
|
|
405
424
|
if (config !== void 0) {
|
|
406
425
|
return {
|
|
@@ -430,7 +449,7 @@ function readRequiresPythonTier(pyproject, pyprojectPath) {
|
|
|
430
449
|
};
|
|
431
450
|
}
|
|
432
451
|
async function readVersionFileTier(dir) {
|
|
433
|
-
const levelFilePath =
|
|
452
|
+
const levelFilePath = join2(dir, ".python-version");
|
|
434
453
|
const content = await readDeclarationFile(levelFilePath);
|
|
435
454
|
if (content === void 0)
|
|
436
455
|
return { declaration: void 0, owned: false };
|
|
@@ -447,7 +466,7 @@ var PYTHON_DECLARATION_SOURCES = [
|
|
|
447
466
|
"python-version-file"
|
|
448
467
|
];
|
|
449
468
|
async function readPythonDeclarationInDirectory(dir, open) {
|
|
450
|
-
const pyprojectPath =
|
|
469
|
+
const pyprojectPath = join2(dir, "pyproject.toml");
|
|
451
470
|
const pyproject = await readDeclarationFile(pyprojectPath);
|
|
452
471
|
const tiers = [
|
|
453
472
|
["ruff-target-version", () => readRuffTier(dir, pyproject, pyprojectPath)],
|
|
@@ -473,7 +492,7 @@ async function readPythonDeclarationInDirectory(dir, open) {
|
|
|
473
492
|
}
|
|
474
493
|
return { declaration: void 0, closed };
|
|
475
494
|
}
|
|
476
|
-
async function detectPythonTargetVersion(filePath, homeDir =
|
|
495
|
+
async function detectPythonTargetVersion(filePath, homeDir = os2.homedir()) {
|
|
477
496
|
if (resolveLanguage(filePath)?.id !== "python")
|
|
478
497
|
return void 0;
|
|
479
498
|
const open = new Set(PYTHON_DECLARATION_SOURCES);
|
|
@@ -492,10 +511,11 @@ async function detectPythonTargetVersion(filePath, homeDir = os.homedir()) {
|
|
|
492
511
|
}
|
|
493
512
|
|
|
494
513
|
export {
|
|
514
|
+
scannerReportParentDir,
|
|
495
515
|
emitBounded,
|
|
496
516
|
resetBoundedTelemetry,
|
|
497
|
-
PROJECT_VENV_DIR_NAMES,
|
|
498
517
|
hasAmbientPythonEnvironment,
|
|
518
|
+
PROJECT_VENV_DIR_NAMES,
|
|
499
519
|
detectPythonEnvironment,
|
|
500
520
|
augmentPythonEnvironment,
|
|
501
521
|
pythonEnvironmentToolCandidates,
|
|
@@ -1280,14 +1280,22 @@ var assertValidPattern = (pattern) => {
|
|
|
1280
1280
|
|
|
1281
1281
|
// node_modules/minimatch/dist/esm/escape.js
|
|
1282
1282
|
var escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
|
|
1283
|
-
|
|
1284
|
-
|
|
1283
|
+
const e = magicalBraces ? windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&") : windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
1284
|
+
const c = e.charAt(0);
|
|
1285
|
+
if (c === "#") {
|
|
1286
|
+
return (windowsPathsNoEscape ? "[#]" : "\\#") + e.slice(1);
|
|
1287
|
+
}
|
|
1288
|
+
if (c === "!") {
|
|
1289
|
+
return (windowsPathsNoEscape ? "@(!)" : "\\!") + e.slice(1);
|
|
1285
1290
|
}
|
|
1286
|
-
return
|
|
1291
|
+
return e;
|
|
1287
1292
|
};
|
|
1288
1293
|
|
|
1289
1294
|
// node_modules/minimatch/dist/esm/unescape.js
|
|
1290
1295
|
var unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
|
|
1296
|
+
if (windowsPathsNoEscape && s.startsWith("@(!)")) {
|
|
1297
|
+
return "!" + unescape(s.slice(4), { windowsPathsNoEscape, magicalBraces });
|
|
1298
|
+
}
|
|
1291
1299
|
if (magicalBraces) {
|
|
1292
1300
|
return windowsPathsNoEscape ? s.replace(/\[([^/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1");
|
|
1293
1301
|
}
|
|
@@ -1295,27 +1303,131 @@ var unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {})
|
|
|
1295
1303
|
};
|
|
1296
1304
|
|
|
1297
1305
|
// node_modules/minimatch/dist/esm/index.js
|
|
1298
|
-
var
|
|
1306
|
+
var DEFAULT_BRACE_EXPAND_MAX = 1e5;
|
|
1307
|
+
var DEFAULT_GLOB_STAR_RECURSION_MAX = 200;
|
|
1308
|
+
var AWE_KEY = "allowWindowsEscape";
|
|
1309
|
+
var minimatch = (p, pattern, options) => {
|
|
1299
1310
|
assertValidPattern(pattern);
|
|
1300
|
-
if (!options
|
|
1311
|
+
if (!options?.nocomment && pattern.charAt(0) === "#") {
|
|
1301
1312
|
return false;
|
|
1302
1313
|
}
|
|
1303
1314
|
return cachedMinimatch(pattern, options).match(p);
|
|
1304
1315
|
};
|
|
1305
1316
|
var cache = /* @__PURE__ */ new Map();
|
|
1317
|
+
var oldCache = /* @__PURE__ */ new Map();
|
|
1318
|
+
var cacheSize = 0;
|
|
1319
|
+
var cacheTotalWeight = 0;
|
|
1306
1320
|
var cacheMax = 256;
|
|
1307
|
-
var
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1321
|
+
var cacheMaxWeight = 1 << 15;
|
|
1322
|
+
var cacheMaxEntryWeight = 1 << 12;
|
|
1323
|
+
var cacheWeight = (mm) => {
|
|
1324
|
+
let w = mm.pattern.length;
|
|
1325
|
+
for (const s of mm.globSet) {
|
|
1326
|
+
w += s.length + 1;
|
|
1327
|
+
if (w > cacheMaxEntryWeight)
|
|
1328
|
+
break;
|
|
1329
|
+
}
|
|
1330
|
+
return w;
|
|
1331
|
+
};
|
|
1332
|
+
var tri = (v) => v === void 0 ? 0 : v ? 2 : 1;
|
|
1333
|
+
var booleanWeights = new Map(Object.keys({
|
|
1334
|
+
nobrace: 0,
|
|
1335
|
+
nocomment: 0,
|
|
1336
|
+
nonegate: 0,
|
|
1337
|
+
noglobstar: 0,
|
|
1338
|
+
noext: 0,
|
|
1339
|
+
nonull: 0,
|
|
1340
|
+
partial: 0,
|
|
1341
|
+
dot: 0,
|
|
1342
|
+
nocase: 0,
|
|
1343
|
+
nocaseMagicOnly: 0,
|
|
1344
|
+
magicalBraces: 0,
|
|
1345
|
+
matchBase: 0,
|
|
1346
|
+
flipNegate: 0,
|
|
1347
|
+
preserveMultipleSlashes: 0,
|
|
1348
|
+
windowsNoMagicRoot: 0
|
|
1349
|
+
}).map((k, i) => [k, 24 * 3 ** i]));
|
|
1350
|
+
var optionsKey = (o) => {
|
|
1351
|
+
let n = 0;
|
|
1352
|
+
let wpe = false;
|
|
1353
|
+
for (const k in o) {
|
|
1354
|
+
const v = o[k];
|
|
1355
|
+
switch (k) {
|
|
1356
|
+
// the same test as the Minimatch constructor
|
|
1357
|
+
case "windowsPathsNoEscape":
|
|
1358
|
+
if (v)
|
|
1359
|
+
wpe = true;
|
|
1360
|
+
break;
|
|
1361
|
+
case AWE_KEY:
|
|
1362
|
+
if (v === false)
|
|
1363
|
+
wpe = true;
|
|
1364
|
+
break;
|
|
1365
|
+
case "platform": {
|
|
1366
|
+
const p = v || defaultPlatform;
|
|
1367
|
+
if (p === defaultPlatform)
|
|
1368
|
+
break;
|
|
1369
|
+
if (p === "darwin")
|
|
1370
|
+
n += 3;
|
|
1371
|
+
else if (p === "win32")
|
|
1372
|
+
n += 6;
|
|
1373
|
+
else if (p === "linux")
|
|
1374
|
+
n += 9;
|
|
1375
|
+
else
|
|
1376
|
+
return JSON.stringify(o);
|
|
1377
|
+
break;
|
|
1378
|
+
}
|
|
1379
|
+
case "optimizationLevel":
|
|
1380
|
+
if (v === void 0)
|
|
1381
|
+
break;
|
|
1382
|
+
n += v >= 2 ? 1 : v >= 1 ? 0 : 2;
|
|
1383
|
+
break;
|
|
1384
|
+
case "braceExpandMax":
|
|
1385
|
+
if (v !== void 0 && v !== DEFAULT_BRACE_EXPAND_MAX) {
|
|
1386
|
+
return JSON.stringify(o);
|
|
1387
|
+
}
|
|
1388
|
+
break;
|
|
1389
|
+
case "maxGlobstarRecursion":
|
|
1390
|
+
if (v !== void 0 && v !== DEFAULT_GLOB_STAR_RECURSION_MAX) {
|
|
1391
|
+
return JSON.stringify(o);
|
|
1392
|
+
}
|
|
1393
|
+
break;
|
|
1394
|
+
case "normalize":
|
|
1395
|
+
if (v !== void 0)
|
|
1396
|
+
return JSON.stringify(o);
|
|
1397
|
+
break;
|
|
1398
|
+
default:
|
|
1399
|
+
n += (booleanWeights.get(k) ?? 0) * tri(v);
|
|
1316
1400
|
}
|
|
1317
1401
|
}
|
|
1318
|
-
|
|
1402
|
+
return wpe ? n + 12 : n;
|
|
1403
|
+
};
|
|
1404
|
+
var copyOptions = (o) => {
|
|
1405
|
+
const copy = {};
|
|
1406
|
+
for (const k in o)
|
|
1407
|
+
copy[k] = o[k];
|
|
1408
|
+
return copy;
|
|
1409
|
+
};
|
|
1410
|
+
var cachedMinimatch = (pattern, options) => {
|
|
1411
|
+
const key = options ? optionsKey(options) : 0;
|
|
1412
|
+
let mm = cache.get(key)?.get(pattern);
|
|
1413
|
+
if (mm)
|
|
1414
|
+
return mm;
|
|
1415
|
+
mm = oldCache.get(key)?.get(pattern) ?? new Minimatch(pattern, copyOptions(options));
|
|
1416
|
+
const weight = cacheWeight(mm);
|
|
1417
|
+
if (weight > cacheMaxEntryWeight)
|
|
1418
|
+
return mm;
|
|
1419
|
+
if (cacheSize >= cacheMax || cacheTotalWeight + weight > cacheMaxWeight) {
|
|
1420
|
+
oldCache = cache;
|
|
1421
|
+
cache = /* @__PURE__ */ new Map();
|
|
1422
|
+
cacheSize = 0;
|
|
1423
|
+
cacheTotalWeight = 0;
|
|
1424
|
+
}
|
|
1425
|
+
let byPattern = cache.get(key);
|
|
1426
|
+
if (!byPattern)
|
|
1427
|
+
cache.set(key, byPattern = /* @__PURE__ */ new Map());
|
|
1428
|
+
byPattern.set(pattern, mm);
|
|
1429
|
+
cacheSize++;
|
|
1430
|
+
cacheTotalWeight += weight;
|
|
1319
1431
|
return mm;
|
|
1320
1432
|
};
|
|
1321
1433
|
var defaultPlatform = typeof process === "object" && process ? process.env?.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
@@ -1327,7 +1439,10 @@ var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
|
|
|
1327
1439
|
minimatch.sep = sep;
|
|
1328
1440
|
var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
|
|
1329
1441
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
1330
|
-
var filter = (pattern, options
|
|
1442
|
+
var filter = (pattern, options) => {
|
|
1443
|
+
let mm;
|
|
1444
|
+
return (p) => (mm ??= cachedMinimatch(pattern, options)).match(p);
|
|
1445
|
+
};
|
|
1331
1446
|
minimatch.filter = filter;
|
|
1332
1447
|
var ext = (a, b = {}) => Object.assign({}, a, b);
|
|
1333
1448
|
var defaults = (def) => {
|
|
@@ -1361,7 +1476,11 @@ var braceExpand = (pattern, options = {}) => {
|
|
|
1361
1476
|
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
1362
1477
|
return [pattern];
|
|
1363
1478
|
}
|
|
1364
|
-
|
|
1479
|
+
let p = pattern.replace(/\\\\/g, "\\\\\\\\");
|
|
1480
|
+
if (options.windowsPathsNoEscape || options[AWE_KEY] === false) {
|
|
1481
|
+
p = p.replace(/\[([{}])\]/g, "[\\$1]");
|
|
1482
|
+
}
|
|
1483
|
+
return expand(p, { max: options.braceExpandMax });
|
|
1365
1484
|
};
|
|
1366
1485
|
minimatch.braceExpand = braceExpand;
|
|
1367
1486
|
var RANGE_MIN = 100;
|
|
@@ -1423,6 +1542,25 @@ var literal = (pattern, noext) => {
|
|
|
1423
1542
|
}
|
|
1424
1543
|
return lit2;
|
|
1425
1544
|
};
|
|
1545
|
+
var MAX_EXTGLOBS = 256;
|
|
1546
|
+
var extglobCount = (pattern) => {
|
|
1547
|
+
let n = 0;
|
|
1548
|
+
for (let i = 0; i < pattern.length - 1; i++) {
|
|
1549
|
+
const c = pattern.charAt(i);
|
|
1550
|
+
if (c === "\\") {
|
|
1551
|
+
i++;
|
|
1552
|
+
} else if ("+@!?*".includes(c) && pattern.charAt(i + 1) === "(") {
|
|
1553
|
+
n++;
|
|
1554
|
+
i++;
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
return n;
|
|
1558
|
+
};
|
|
1559
|
+
var assertValidExtglobs = (pattern) => {
|
|
1560
|
+
if (extglobCount(pattern) > MAX_EXTGLOBS) {
|
|
1561
|
+
throw new TypeError("pattern has too many extglobs");
|
|
1562
|
+
}
|
|
1563
|
+
};
|
|
1426
1564
|
var extSafe = (pattern) => {
|
|
1427
1565
|
if (/^[?*+@]\(\)$/.test(pattern) || pattern.includes("[:"))
|
|
1428
1566
|
return false;
|
|
@@ -1537,12 +1675,11 @@ var Minimatch = class {
|
|
|
1537
1675
|
assertValidPattern(pattern);
|
|
1538
1676
|
options = options || {};
|
|
1539
1677
|
this.options = options;
|
|
1540
|
-
this.maxGlobstarRecursion = options.maxGlobstarRecursion ??
|
|
1678
|
+
this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? DEFAULT_GLOB_STAR_RECURSION_MAX;
|
|
1541
1679
|
this.pattern = pattern;
|
|
1542
1680
|
this.platform = options.platform || defaultPlatform;
|
|
1543
1681
|
this.isWindows = this.platform === "win32";
|
|
1544
|
-
|
|
1545
|
-
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[awe] === false;
|
|
1682
|
+
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[AWE_KEY] === false;
|
|
1546
1683
|
if (this.windowsPathsNoEscape) {
|
|
1547
1684
|
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
1548
1685
|
}
|
|
@@ -1687,16 +1824,19 @@ var Minimatch = class {
|
|
|
1687
1824
|
let merged = true;
|
|
1688
1825
|
while (merged) {
|
|
1689
1826
|
merged = false;
|
|
1827
|
+
if (this.set.length < 2)
|
|
1828
|
+
return;
|
|
1829
|
+
let keys = this.#mergeKeys();
|
|
1690
1830
|
const len = Math.max(0, ...this.set.map((r) => r.length));
|
|
1691
1831
|
for (let k = 0; k < len; k++) {
|
|
1692
1832
|
const groups = /* @__PURE__ */ new Map();
|
|
1833
|
+
const R = this.set.length + 1;
|
|
1693
1834
|
this.set.forEach((row, i) => {
|
|
1694
1835
|
if (!(row[k] instanceof Matcher || row[k] === PENDING) || !extSafe(this.globParts[i][k])) {
|
|
1695
1836
|
return;
|
|
1696
1837
|
}
|
|
1697
|
-
const
|
|
1698
|
-
|
|
1699
|
-
const key = `${row.length}/${parts.join("/")}`;
|
|
1838
|
+
const { pre, suf } = keys[i];
|
|
1839
|
+
const key = pre[k] * R + suf[k + 1];
|
|
1700
1840
|
const g = groups.get(key);
|
|
1701
1841
|
if (g)
|
|
1702
1842
|
g.push(i);
|
|
@@ -1710,6 +1850,8 @@ var Minimatch = class {
|
|
|
1710
1850
|
const [first, ...rest] = g;
|
|
1711
1851
|
const alts = g.map((i) => this.globParts[i][k]);
|
|
1712
1852
|
const glob = `@(${alts.join("|")})`;
|
|
1853
|
+
if (extglobCount(glob) > MAX_EXTGLOBS)
|
|
1854
|
+
continue;
|
|
1713
1855
|
this.globParts[first][k] = glob;
|
|
1714
1856
|
this.set[first][k] = this.parse(glob);
|
|
1715
1857
|
for (const i of rest)
|
|
@@ -1719,10 +1861,60 @@ var Minimatch = class {
|
|
|
1719
1861
|
merged = true;
|
|
1720
1862
|
this.set = this.set.filter((_, i) => !drop.has(i));
|
|
1721
1863
|
this.globParts = this.globParts.filter((_, i) => !drop.has(i));
|
|
1864
|
+
if (this.set.length < 2)
|
|
1865
|
+
return;
|
|
1866
|
+
keys = this.#mergeKeys();
|
|
1722
1867
|
}
|
|
1723
1868
|
}
|
|
1724
1869
|
}
|
|
1725
1870
|
}
|
|
1871
|
+
// For each row, number ids for its prefixes and suffixes, such that
|
|
1872
|
+
// pre[k] identifies parts[0..k) and suf[k] identifies parts[k..n).
|
|
1873
|
+
// Two rows are the same other than at portion k exactly when they
|
|
1874
|
+
// have the same pre[k] and suf[k + 1]. This is linear in the size of
|
|
1875
|
+
// the rows, where joining the whole row for every k was quadratic.
|
|
1876
|
+
#mergeKeys() {
|
|
1877
|
+
const partIds = /* @__PURE__ */ new Map();
|
|
1878
|
+
const ids = this.globParts.map((parts) => parts.map((s) => {
|
|
1879
|
+
let id = partIds.get(s);
|
|
1880
|
+
if (id === void 0)
|
|
1881
|
+
partIds.set(s, id = partIds.size);
|
|
1882
|
+
return id;
|
|
1883
|
+
}));
|
|
1884
|
+
const P = partIds.size;
|
|
1885
|
+
const len = Math.max(0, ...ids.map((r) => r.length));
|
|
1886
|
+
const keys = ids.map((r) => ({
|
|
1887
|
+
pre: [0],
|
|
1888
|
+
suf: new Array(r.length + 1).fill(0)
|
|
1889
|
+
}));
|
|
1890
|
+
for (let k = 0; k < len; k++) {
|
|
1891
|
+
const m = /* @__PURE__ */ new Map();
|
|
1892
|
+
ids.forEach((r, i) => {
|
|
1893
|
+
if (k >= r.length)
|
|
1894
|
+
return;
|
|
1895
|
+
const { pre } = keys[i];
|
|
1896
|
+
const key = pre[k] * P + r[k];
|
|
1897
|
+
let id = m.get(key);
|
|
1898
|
+
if (id === void 0)
|
|
1899
|
+
m.set(key, id = m.size + 1);
|
|
1900
|
+
pre.push(id);
|
|
1901
|
+
});
|
|
1902
|
+
}
|
|
1903
|
+
for (let k = len - 1; k >= 0; k--) {
|
|
1904
|
+
const m = /* @__PURE__ */ new Map();
|
|
1905
|
+
ids.forEach((r, i) => {
|
|
1906
|
+
if (k >= r.length)
|
|
1907
|
+
return;
|
|
1908
|
+
const { suf } = keys[i];
|
|
1909
|
+
const key = suf[k + 1] * P + r[k];
|
|
1910
|
+
let id = m.get(key);
|
|
1911
|
+
if (id === void 0)
|
|
1912
|
+
m.set(key, id = m.size + 1);
|
|
1913
|
+
suf[k] = id;
|
|
1914
|
+
});
|
|
1915
|
+
}
|
|
1916
|
+
return keys;
|
|
1917
|
+
}
|
|
1726
1918
|
// various transforms to equivalent pattern sets that are
|
|
1727
1919
|
// faster to process in a filesystem walk. The goal is to
|
|
1728
1920
|
// eliminate what we can, and push all ** patterns as far
|
|
@@ -2019,7 +2211,7 @@ var Minimatch = class {
|
|
|
2019
2211
|
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
|
|
2020
2212
|
// this WOULD be allowed if ** did follow symlinks, or * didn't
|
|
2021
2213
|
firstPhasePreProcess(globParts) {
|
|
2022
|
-
const { braceExpandMax =
|
|
2214
|
+
const { braceExpandMax = DEFAULT_BRACE_EXPAND_MAX } = this.options;
|
|
2023
2215
|
let splitCells = 0;
|
|
2024
2216
|
const maxSplitCells = 1e6;
|
|
2025
2217
|
let didSomething = false;
|
|
@@ -2401,6 +2593,8 @@ var Minimatch = class {
|
|
|
2401
2593
|
return PENDING;
|
|
2402
2594
|
let m = this.#matchers.get(pattern);
|
|
2403
2595
|
if (!m) {
|
|
2596
|
+
if (!noext)
|
|
2597
|
+
assertValidExtglobs(pattern);
|
|
2404
2598
|
m = new Matcher(pattern, {
|
|
2405
2599
|
nocase,
|
|
2406
2600
|
noext,
|
|
@@ -2865,13 +3059,22 @@ function homeRelativePath(filePath, homeDir = os.homedir()) {
|
|
|
2865
3059
|
return `~${candidate.slice(home.length)}`;
|
|
2866
3060
|
}
|
|
2867
3061
|
function isUnderDir(child, parent) {
|
|
3062
|
+
if (backslashIsNameChar(child, parent)) {
|
|
3063
|
+
return isWithinForm(path2.resolve(child), path2.resolve(parent)) || isWithinIdentity(child, parent);
|
|
3064
|
+
}
|
|
2868
3065
|
if (isWithinForm(normalizePathSpelling(child), normalizePathSpelling(parent)))
|
|
2869
3066
|
return true;
|
|
2870
3067
|
if (process.platform === "win32")
|
|
2871
3068
|
return false;
|
|
2872
3069
|
return isWithinIdentity(child, parent);
|
|
2873
3070
|
}
|
|
3071
|
+
function backslashIsNameChar(child, parent) {
|
|
3072
|
+
return process.platform !== "win32" && (child.includes("\\") || parent.includes("\\")) && !isWindowsPath(child) && !isWindowsPath(parent);
|
|
3073
|
+
}
|
|
2874
3074
|
function isWithinIdentity(child, parent) {
|
|
3075
|
+
if (backslashIsNameChar(child, parent)) {
|
|
3076
|
+
return isWithinForm(realpathOrResolve(child), realpathOrResolve(parent));
|
|
3077
|
+
}
|
|
2875
3078
|
return isWithinForm(normalizeFilePath(child), normalizeFilePath(parent));
|
|
2876
3079
|
}
|
|
2877
3080
|
function isWithinForm(child, parent) {
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
} from "./chunk-2APSZHHI.js";
|
|
7
7
|
import {
|
|
8
8
|
truncatedByOutputCap
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-463WN3VP.js";
|
|
10
10
|
import {
|
|
11
11
|
LEDGER_FIELD_MAX,
|
|
12
12
|
incrementDegradationCount,
|
|
13
13
|
truncateForLedger
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CQNXALZJ.js";
|
|
15
15
|
|
|
16
16
|
// dist/clients/dispatch/runners/utils/spawn-outcome.js
|
|
17
17
|
function firstOutputLine(text, max = LEDGER_FIELD_MAX) {
|