pi-lens 4.5.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG-USER.md +6 -6
- package/CHANGELOG.md +132 -0
- package/README.md +2 -0
- package/config/dependency-cruiser-eager-allowlist.json +1 -0
- package/dist/{chunk-LGH2HHZG.js → chunk-25CAONWT.js} +36 -25
- package/dist/{chunk-ZQSSO7LO.js → chunk-2DWNYVUN.js} +3 -3
- package/dist/{chunk-YCR6ZYTE.js → chunk-2RQREVGO.js} +1 -1
- package/dist/{chunk-VWEBZ2JV.js → chunk-2XALJI2K.js} +40 -40
- package/dist/{chunk-PQXUZYTQ.js → chunk-2YQ5LI7R.js} +4 -4
- package/dist/{chunk-VSQT6IHZ.js → chunk-35UJUF27.js} +18 -4
- package/dist/{chunk-OLWGYBYT.js → chunk-3IWMNN2S.js} +17 -17
- package/dist/chunk-3UTDLQWO.js +88 -0
- package/dist/chunk-3Z7Z3B7V.js +27 -0
- package/dist/{chunk-UNP6Y4JV.js → chunk-4E4OCW3L.js} +16 -16
- package/dist/{chunk-37IDWT6O.js → chunk-4GLSO2EM.js} +13 -11
- package/dist/{chunk-QV3JPCMK.js → chunk-5HVDD7IA.js} +1 -1
- package/dist/{chunk-ZRQMENT4.js → chunk-62PIU4TO.js} +1 -1
- package/dist/{chunk-3TSMQZG6.js → chunk-6MDWNZ7E.js} +2 -2
- package/dist/{chunk-WLD6BGON.js → chunk-6MWX2J5H.js} +4 -0
- package/dist/{chunk-SCU62JLX.js → chunk-6MZLS6CK.js} +7 -7
- package/dist/{chunk-B42AIWPJ.js → chunk-7BWPQZHE.js} +3 -3
- package/dist/{chunk-I3NZVAMN.js → chunk-7JMEPY6P.js} +10 -10
- package/dist/{chunk-7DPXUPRF.js → chunk-7ORBRDFY.js} +2 -2
- package/dist/{chunk-6E5QLMWI.js → chunk-7WAQ3K26.js} +23 -23
- package/dist/{chunk-2H5GHZKC.js → chunk-AB26NAHA.js} +7 -7
- package/dist/{chunk-BBSDJTOV.js → chunk-AFSG6YUB.js} +13 -13
- package/dist/{chunk-XDNWR7SG.js → chunk-ALTHJUZO.js} +2 -2
- package/dist/{chunk-UN72ZAJ5.js → chunk-AOEVZXR6.js} +9 -9
- package/dist/{chunk-HRLF35WL.js → chunk-ARTCVE6I.js} +9 -9
- package/dist/{chunk-LQQNFCQJ.js → chunk-B2QO7GHY.js} +1 -1
- package/dist/{chunk-I2FYOZNW.js → chunk-BJGWP4UX.js} +10 -10
- package/dist/{chunk-G53LBDNU.js → chunk-BKJ6WZKP.js} +6 -6
- package/dist/{chunk-P5MSLVUW.js → chunk-BQ72NQQM.js} +11 -11
- package/dist/{chunk-K7O6AHSJ.js → chunk-BWGNVM33.js} +11 -11
- package/dist/{chunk-ADYQRETD.js → chunk-BYIEU4E4.js} +2 -2
- package/dist/{chunk-7ZVTFLCC.js → chunk-CDAJQBKJ.js} +11 -11
- package/dist/{chunk-BKWFDWYM.js → chunk-D3UQWOCB.js} +16 -16
- package/dist/{chunk-3PAS2ERX.js → chunk-DHFJS2I4.js} +8 -8
- package/dist/{chunk-KNSOA43J.js → chunk-DKXIUGNA.js} +2 -2
- package/dist/{chunk-LOEJFTF2.js → chunk-DLGJYQML.js} +2 -2
- package/dist/{chunk-VGRGW4UL.js → chunk-DNJJVKJZ.js} +31 -31
- package/dist/{chunk-5HBQL7DH.js → chunk-EBXCYEII.js} +3 -3
- package/dist/chunk-EH6EHFW2.js +73 -0
- package/dist/{chunk-W26QZ3OM.js → chunk-EKQDQPX6.js} +10 -10
- package/dist/{chunk-TWEOJE3D.js → chunk-EXHSWN3P.js} +844 -377
- package/dist/{chunk-4IZZEN63.js → chunk-F7BFIENK.js} +33 -33
- package/dist/{chunk-ZI7YHV6I.js → chunk-FD4LJQ6Y.js} +5 -5
- package/dist/{chunk-RIH3UBK4.js → chunk-GFCPPCNR.js} +11 -11
- package/dist/{chunk-5JB4WENL.js → chunk-GIK6VUCY.js} +1 -1
- package/dist/{chunk-PPQHMSPH.js → chunk-GNK2IHVG.js} +15 -15
- package/dist/{chunk-CXQYK4YT.js → chunk-H6DNTQ4V.js} +2 -2
- package/dist/{chunk-NGNBJIUO.js → chunk-HERQPNY6.js} +8 -8
- package/dist/{chunk-INBK3HIT.js → chunk-HFIFEH46.js} +3 -3
- package/dist/{chunk-J2ZB5MDS.js → chunk-HKRESBMC.js} +20 -20
- package/dist/{chunk-AZG5UJYY.js → chunk-HMXWZUQW.js} +1 -1
- package/dist/{chunk-XSC3BCN3.js → chunk-HOWHAKXO.js} +6 -6
- package/dist/{chunk-7CLWC2UH.js → chunk-HUWW77QY.js} +1 -1
- package/dist/{chunk-KZ732ZVW.js → chunk-IO6P3NBP.js} +1 -1
- package/dist/{chunk-7WKVCZI4.js → chunk-J7VNGHLN.js} +2 -2
- package/dist/{chunk-QE7BJQ6K.js → chunk-JGCBMCCS.js} +8 -8
- package/dist/{chunk-PFJLYRO3.js → chunk-KIQSNH3F.js} +34 -34
- package/dist/{chunk-JGUDT5KD.js → chunk-KSQJBGRO.js} +5 -5
- package/dist/{chunk-RJ3APNIP.js → chunk-KXKM2DFP.js} +4 -4
- package/dist/chunk-L3Q72QGQ.js +25 -0
- package/dist/{chunk-6GLMMGCX.js → chunk-LDPY22FS.js} +2 -2
- package/dist/{chunk-3PO4YYOX.js → chunk-M3QGXGY4.js} +3793 -3814
- package/dist/{chunk-NNEQOC3U.js → chunk-MET776XM.js} +9 -7
- package/dist/{chunk-X33QECRJ.js → chunk-MKQFSW2Q.js} +2 -2
- package/dist/{chunk-7U36VQL6.js → chunk-MKW7ZUTT.js} +3 -3
- package/dist/{chunk-PQF6YGYB.js → chunk-N2U644ZW.js} +4 -18
- package/dist/{chunk-DI4AZZNY.js → chunk-NAACKIKT.js} +2 -2
- package/dist/{chunk-O6LCSHHI.js → chunk-NHHS5T52.js} +1 -1
- package/dist/{chunk-DCA2MXVQ.js → chunk-NIZKGBOU.js} +51 -27
- package/dist/{chunk-PKWEBMCA.js → chunk-NNDZ7DOP.js} +194 -111
- package/dist/{chunk-Q7J3JYJ2.js → chunk-NZ7NSKIW.js} +13 -13
- package/dist/{chunk-S6MCMD27.js → chunk-OG3UCAHV.js} +3 -3
- package/dist/{chunk-3QXFUP6T.js → chunk-OHTHVILU.js} +12 -12
- package/dist/{chunk-NHA5K226.js → chunk-P7EV5ISR.js} +17 -2
- package/dist/{chunk-L6BDRYUK.js → chunk-PVV27TOX.js} +5 -5
- package/dist/{chunk-HIRBC72R.js → chunk-Q32RJDYC.js} +4 -4
- package/dist/{chunk-QE5DJ7MX.js → chunk-Q4UQNTLB.js} +4 -4
- package/dist/{chunk-SDYLT45T.js → chunk-QQGZY2BR.js} +2 -2
- package/dist/{chunk-QMWKSYWB.js → chunk-S247BOH2.js} +4 -4
- package/dist/{chunk-ARTYCUGF.js → chunk-S7KUDW73.js} +121 -18
- package/dist/{chunk-6CFSDLHE.js → chunk-SJ2SR432.js} +17 -17
- package/dist/{chunk-CQY2HEH7.js → chunk-SL4G67AP.js} +2 -2
- package/dist/{chunk-LVLPA32Q.js → chunk-T2D2WWP6.js} +48 -11
- package/dist/{chunk-HIJ4CHFF.js → chunk-T7KHGEJ5.js} +3 -3
- package/dist/{chunk-74AMPWNC.js → chunk-TABDCX35.js} +2 -2
- package/dist/chunk-TFSBHRL2.js +25 -0
- package/dist/{chunk-KNJH6WJQ.js → chunk-TQKWR5AZ.js} +7 -7
- package/dist/chunk-TWAQFMLW.js +110 -0
- package/dist/{chunk-TKOFTLGB.js → chunk-UARVPNAU.js} +33 -33
- package/dist/chunk-UWBD3JMH.js +56 -0
- package/dist/{chunk-K4Z7MK6T.js → chunk-VEF3GFOL.js} +15 -15
- package/dist/{chunk-4DAHGU3V.js → chunk-W2JPGW7Q.js} +27 -25
- package/dist/{chunk-CZJGAOKL.js → chunk-W2YHHNY3.js} +7 -7
- package/dist/{chunk-R4L7KZ7R.js → chunk-WA6U2URH.js} +9 -9
- package/dist/{chunk-OZQQ3AIR.js → chunk-WAK2AXQQ.js} +9 -9
- package/dist/{chunk-DFKOA74L.js → chunk-WH6O4IFD.js} +10 -10
- package/dist/{chunk-27JQHK7Y.js → chunk-WJ7GY5WJ.js} +1 -1
- package/dist/{chunk-KXGTLAUW.js → chunk-WWZLT6AM.js} +2 -2
- package/dist/{chunk-O2MHF7QM.js → chunk-XRLZ75YY.js} +38 -38
- package/dist/chunk-XWWFESYZ.js +27 -0
- package/dist/chunk-XZSXSM4K.js +27 -0
- package/dist/{chunk-C5PLBTNR.js → chunk-Y2LIOCA7.js} +1 -1
- package/dist/{chunk-AXAR5ZW2.js → chunk-YIEHUKX2.js} +84 -169
- package/dist/{chunk-B2OXE4AH.js → chunk-YOMLAKU6.js} +182 -180
- package/dist/{chunk-MOAVEPC4.js → chunk-YV7XVYSJ.js} +11 -11
- package/dist/{chunk-ZULZS2I6.js → chunk-ZVQUYCBU.js} +996 -365
- package/dist/index.js +4911 -2376
- package/dist/mcp/analyze-cli.js +8 -8
- package/dist/mcp/cli.js +40 -40
- package/dist/mcp/server.js +321 -234
- package/dist/mcp/worker.js +58 -58
- package/dist/probes/installer.js +21 -21
- package/docs/ci-bot-pr-checks.md +18 -9
- package/docs/ci.md +7 -0
- package/docs/defect-shapes.md +43 -28
- package/docs/globalconfig.md +1 -0
- package/docs/invariants/dispatch-runners.md +15 -0
- package/docs/lsp-capability-matrix.md +3 -3
- package/docs/lsp-idle-eviction.md +3 -2
- package/docs/module-report-read-symbol.md +6 -2
- package/docs/pi-lens-merge-policy.md +3 -2
- package/docs/pi-lens-orchestration.md +2 -1
- package/docs/pi-lens-subagent.md +2 -1
- package/docs/servercapabilities.md +1 -1
- package/docs/settings.md +1 -0
- package/docs/usage.md +1 -0
- package/package.json +1 -1
- package/dist/chunk-2H7NFZ4Q.js +0 -25
- package/dist/chunk-5YJXF2IS.js +0 -56
- package/dist/chunk-GCSDF5IE.js +0 -27
- package/dist/chunk-H5API74E.js +0 -67
- package/dist/chunk-HBX55MWO.js +0 -27
- package/dist/chunk-JOIKBUQN.js +0 -88
- package/dist/chunk-M2YMBT5G.js +0 -73
- package/dist/chunk-MJRGPEQ5.js +0 -25
- package/dist/chunk-TFKN5EIR.js +0 -27
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
deserializeWordIndex,
|
|
4
4
|
recordPersistedWordIndexWireBytes,
|
|
5
5
|
serializeWordIndex
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BQ72NQQM.js";
|
|
7
7
|
import {
|
|
8
8
|
fingerprintProjectSnapshotJson
|
|
9
9
|
} from "./chunk-2BEMIWEW.js";
|
|
@@ -21,20 +21,20 @@ import {
|
|
|
21
21
|
getProjectDataDir,
|
|
22
22
|
isStaleStageFile,
|
|
23
23
|
withGenerationLockSync
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-M3QGXGY4.js";
|
|
25
25
|
import {
|
|
26
26
|
writeFileAtomic
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-EKQDQPX6.js";
|
|
28
28
|
import {
|
|
29
29
|
incrementDegradationCount
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-P7EV5ISR.js";
|
|
31
31
|
import {
|
|
32
32
|
logLatency
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-HUWW77QY.js";
|
|
34
34
|
import {
|
|
35
35
|
BoundedFifoMap,
|
|
36
36
|
normalizeMapKey
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-6MWX2J5H.js";
|
|
38
38
|
|
|
39
39
|
// dist/clients/project-snapshot.js
|
|
40
40
|
import * as fs2 from "node:fs";
|
|
@@ -1402,8 +1402,10 @@ function saveProjectSnapshot(cwd, snapshot) {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
dispatchSnapshotPersist(pending);
|
|
1404
1404
|
}
|
|
1405
|
+
var SNAPSHOT_PERSIST_WAIT_MS = 2e3;
|
|
1405
1406
|
async function waitForProjectSnapshotPersistsForTests() {
|
|
1406
|
-
|
|
1407
|
+
const deadlineAt = Date.now() + SNAPSHOT_PERSIST_WAIT_MS;
|
|
1408
|
+
while (Date.now() < deadlineAt && (_snapshotWorkerRequests.size > 0 || _activeSnapshotPersists.size > 0 || _queuedSnapshotPersists.size > 0)) {
|
|
1407
1409
|
await new Promise((resolve2) => setTimeout(resolve2, 10));
|
|
1408
1410
|
}
|
|
1409
1411
|
}
|
|
@@ -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-NHHS5T52.js";
|
|
8
|
+
import "./chunk-6MWX2J5H.js";
|
|
9
9
|
import "./chunk-NXL4FFQQ.js";
|
|
10
10
|
export {
|
|
11
11
|
FactStore,
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-3MED75HT.js";
|
|
5
5
|
import {
|
|
6
6
|
getProjectDataDir
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-M3QGXGY4.js";
|
|
8
8
|
import {
|
|
9
9
|
writeFileAtomic
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EKQDQPX6.js";
|
|
11
11
|
import {
|
|
12
12
|
normalizeMapKey,
|
|
13
13
|
toProjectRelativePath
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6MWX2J5H.js";
|
|
15
15
|
|
|
16
16
|
// dist/clients/call-graph.js
|
|
17
17
|
import * as fs from "node:fs";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
findPiLensConfigMarkerInDir,
|
|
15
15
|
getPiLensGlobalConfigPath,
|
|
16
16
|
isResolvedGlobalConfigPath
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-DLGJYQML.js";
|
|
18
18
|
import {
|
|
19
19
|
DEGRADATION_ENTRIES_PER_KIND,
|
|
20
20
|
GLOBAL_NON_FLAG_CONFIG_SECTIONS,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
readFlagConfigValue,
|
|
33
33
|
readToolConfig,
|
|
34
34
|
recordDegradationOnce
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-P7EV5ISR.js";
|
|
36
36
|
import {
|
|
37
37
|
CONFIG_SCHEMA_ANCHOR_KEY,
|
|
38
38
|
CONFIG_SCHEMA_ID,
|
|
@@ -41,10 +41,9 @@ import {
|
|
|
41
41
|
withConfigDiagnosticCode
|
|
42
42
|
} from "./chunk-S26LC76R.js";
|
|
43
43
|
import {
|
|
44
|
-
getProcessSingleton,
|
|
45
44
|
redactSecrets,
|
|
46
45
|
toPositiveFinite
|
|
47
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-HUWW77QY.js";
|
|
48
47
|
import {
|
|
49
48
|
BoundedFifoMap,
|
|
50
49
|
BoundedLruCache,
|
|
@@ -54,7 +53,7 @@ import {
|
|
|
54
53
|
realpathOrResolve,
|
|
55
54
|
toPosix,
|
|
56
55
|
walkUpDirs
|
|
57
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-6MWX2J5H.js";
|
|
58
57
|
|
|
59
58
|
// dist/clients/generated-artifacts.js
|
|
60
59
|
import * as fs from "node:fs";
|
|
@@ -380,17 +379,6 @@ var PathKeyedMap = class {
|
|
|
380
379
|
}
|
|
381
380
|
};
|
|
382
381
|
|
|
383
|
-
// dist/clients/spawn-abort-scope.js
|
|
384
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
385
|
-
var FAMILY = "spawn-abort-scope";
|
|
386
|
-
var VERSION = 1;
|
|
387
|
-
var scopes = getProcessSingleton(FAMILY, VERSION, () => ({
|
|
388
|
-
abort: new AsyncLocalStorage(),
|
|
389
|
-
cooldown: new AsyncLocalStorage()
|
|
390
|
-
}));
|
|
391
|
-
var spawnAbortScope = scopes.abort;
|
|
392
|
-
var spawnCooldownScope = scopes.cooldown;
|
|
393
|
-
|
|
394
382
|
// dist/clients/user-notify.js
|
|
395
383
|
var notifierGetter;
|
|
396
384
|
function notifyUserDegradation(message, level = "warning", options) {
|
|
@@ -2618,8 +2606,6 @@ export {
|
|
|
2618
2606
|
isTestFileName,
|
|
2619
2607
|
detectFileRole,
|
|
2620
2608
|
PathKeyedMap,
|
|
2621
|
-
spawnAbortScope,
|
|
2622
|
-
spawnCooldownScope,
|
|
2623
2609
|
notifyUserDegradation,
|
|
2624
2610
|
warnIgnoredConfigOnce,
|
|
2625
2611
|
isRepoTier,
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
GROOVY_FILENAMES,
|
|
4
4
|
KIND_EXTENSIONS,
|
|
5
5
|
SPECIAL_FILENAMES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SL4G67AP.js";
|
|
7
7
|
import {
|
|
8
8
|
compareOrdinal
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-P7EV5ISR.js";
|
|
10
10
|
|
|
11
11
|
// dist/clients/language-registry.js
|
|
12
12
|
var LANGUAGES = [
|
|
@@ -3,48 +3,48 @@ import {
|
|
|
3
3
|
augmentPythonEnvironment,
|
|
4
4
|
detectPythonEnvironment,
|
|
5
5
|
emitBounded
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AB26NAHA.js";
|
|
7
7
|
import {
|
|
8
8
|
scannerReportParentDir
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5HVDD7IA.js";
|
|
10
10
|
import {
|
|
11
11
|
stripAnsi
|
|
12
12
|
} from "./chunk-6HWVI6MI.js";
|
|
13
13
|
import {
|
|
14
|
+
findCommandOnPath,
|
|
14
15
|
resolveToolCwd
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-T2D2WWP6.js";
|
|
16
17
|
import {
|
|
17
18
|
findGlobalBinary,
|
|
18
19
|
findLocalBinAt,
|
|
19
20
|
localBinPath
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-25CAONWT.js";
|
|
21
22
|
import {
|
|
22
23
|
getIsolatedNpxSpawnOptions
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WWZLT6AM.js";
|
|
24
25
|
import {
|
|
25
26
|
resolveLanguageRootForFile
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-HOWHAKXO.js";
|
|
27
28
|
import {
|
|
28
29
|
resolveGitCheckout,
|
|
29
|
-
safeSpawn,
|
|
30
30
|
safeSpawnAsync
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import {
|
|
33
|
-
DOTNET_CSHARP_ROOT_MARKERS,
|
|
34
|
-
detectFileKind
|
|
35
|
-
} from "./chunk-CQY2HEH7.js";
|
|
31
|
+
} from "./chunk-M3QGXGY4.js";
|
|
36
32
|
import {
|
|
37
33
|
PathKeyedMap,
|
|
38
34
|
detectFileRole
|
|
39
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-N2U644ZW.js";
|
|
36
|
+
import {
|
|
37
|
+
DOTNET_CSHARP_ROOT_MARKERS,
|
|
38
|
+
detectFileKind
|
|
39
|
+
} from "./chunk-SL4G67AP.js";
|
|
40
40
|
import {
|
|
41
41
|
findNearestDirWithAnyBasename
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-DLGJYQML.js";
|
|
43
43
|
import {
|
|
44
44
|
LEDGER_FIELD_MAX,
|
|
45
45
|
createSubsystemLogger,
|
|
46
46
|
recordDegradationOnce
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-P7EV5ISR.js";
|
|
48
48
|
import {
|
|
49
49
|
BoundedFifoMap,
|
|
50
50
|
direntsHaveMarkerGlobMatch,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
relativeInside,
|
|
61
61
|
toPosix,
|
|
62
62
|
toProjectRelativePath
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-6MWX2J5H.js";
|
|
64
64
|
|
|
65
65
|
// dist/clients/test-runner-client.js
|
|
66
66
|
import { createHash } from "node:crypto";
|
|
@@ -399,6 +399,25 @@ var RUNNERS = {
|
|
|
399
399
|
// mix test's default output is text-based
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
|
+
function findPathPytest() {
|
|
403
|
+
const isWindows = process.platform === "win32";
|
|
404
|
+
const found = findCommandOnPath("pytest", isWindows);
|
|
405
|
+
if (!found)
|
|
406
|
+
return null;
|
|
407
|
+
if (!isWindows) {
|
|
408
|
+
try {
|
|
409
|
+
fs.accessSync(found, fs.constants.X_OK);
|
|
410
|
+
} catch {
|
|
411
|
+
recordDegradationOnce({
|
|
412
|
+
kind: "test-runner-pytest-not-executable",
|
|
413
|
+
subject: found,
|
|
414
|
+
reason: "the pytest found on PATH lacks the execute bit"
|
|
415
|
+
});
|
|
416
|
+
return null;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
return isAbsoluteFilePath(found) ? found : `${process.cwd()}${path.sep}${found}`;
|
|
420
|
+
}
|
|
402
421
|
function stripWrapperArgs(binName, args) {
|
|
403
422
|
if (args[0] === binName)
|
|
404
423
|
return args.slice(1);
|
|
@@ -603,17 +622,9 @@ var TestRunnerClient = class {
|
|
|
603
622
|
const isPythonSource = typeof sourceFilePath === "string" && sourceFilePath.endsWith(".py");
|
|
604
623
|
if (!isPythonSource)
|
|
605
624
|
return null;
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
timeout: 2e3
|
|
610
|
-
});
|
|
611
|
-
if (result.status === 0) {
|
|
612
|
-
this.log("Detected pytest globally");
|
|
613
|
-
return { runner: "pytest", config: RUNNERS.pytest };
|
|
614
|
-
}
|
|
615
|
-
} catch (err) {
|
|
616
|
-
void err;
|
|
625
|
+
if (findPathPytest()) {
|
|
626
|
+
this.log("Detected pytest on PATH");
|
|
627
|
+
return { runner: "pytest", config: RUNNERS.pytest };
|
|
617
628
|
}
|
|
618
629
|
return null;
|
|
619
630
|
}
|
|
@@ -2180,6 +2191,19 @@ ${stderr}`;
|
|
|
2180
2191
|
ownInstall: true
|
|
2181
2192
|
};
|
|
2182
2193
|
}
|
|
2194
|
+
const pathPytest = findPathPytest();
|
|
2195
|
+
if (pathPytest) {
|
|
2196
|
+
const pythonPath = process.env.PYTHONPATH;
|
|
2197
|
+
return {
|
|
2198
|
+
command: pathPytest,
|
|
2199
|
+
args: stripWrapperArgs("pytest", config.args(testFile, spawnCwd)),
|
|
2200
|
+
env: {
|
|
2201
|
+
...process.env,
|
|
2202
|
+
PYTHONPATH: pythonPath ? `${spawnCwd}${path.delimiter}${pythonPath}` : spawnCwd
|
|
2203
|
+
},
|
|
2204
|
+
ownInstall: false
|
|
2205
|
+
};
|
|
2206
|
+
}
|
|
2183
2207
|
}
|
|
2184
2208
|
if (runner === "phpunit") {
|
|
2185
2209
|
const suffix2 = process.platform === "win32" ? ".bat" : "";
|