@orkestrel/probe 0.0.24 → 0.0.26
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/dist/bin/main.js +1 -2
- package/dist/src/core/index.cjs +35 -33
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +9 -10
- package/dist/src/core/index.d.ts +9 -10
- package/dist/src/core/index.js +36 -34
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +245 -260
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +31 -7
- package/dist/src/server/index.d.ts +31 -7
- package/dist/src/server/index.js +247 -262
- package/dist/src/server/index.js.map +1 -1
- package/package.json +23 -22
|
@@ -524,13 +524,11 @@ export declare type ListenerCapture = ReadonlyMap<string, readonly Function[]>;
|
|
|
524
524
|
export declare function loadWorkspaceVitest(workspace: string): typeof VitestNode;
|
|
525
525
|
|
|
526
526
|
/**
|
|
527
|
-
* Reports whether
|
|
527
|
+
* Reports whether a file's owning host is running or cannot be judged.
|
|
528
528
|
*
|
|
529
529
|
* @remarks
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
* than a process, so both answer true: the safe direction is to keep a file this package cannot
|
|
533
|
-
* account for.
|
|
530
|
+
* Keeps a file when its identity is invalid or `inspectProcess` reports existence, denied
|
|
531
|
+
* permission, or an indeterminate host failure. Only a confirmed absent process answers false.
|
|
534
532
|
*
|
|
535
533
|
* @param id - The process id a file's own revision names
|
|
536
534
|
* @returns True if that process is running or cannot be judged; false otherwise
|
|
@@ -586,7 +584,8 @@ export declare function normalizePath(path: string): string;
|
|
|
586
584
|
* its relative form keeps one commit checked out at two roots reading to one digest. A path that
|
|
587
585
|
* escapes the workspace is left as it stands, because rewriting it would name a file outside the
|
|
588
586
|
* tree by a relative spelling. Key order is the compiler's own and it differs between the supported
|
|
589
|
-
* majors, so sorting removes a difference that means nothing.
|
|
587
|
+
* majors, so sorting removes a difference that means nothing. A `__proto__` key is dropped, as
|
|
588
|
+
* the earlier assignment-built record dropped it, so a digest stays the same across releases.
|
|
590
589
|
*
|
|
591
590
|
* @param workspace - The target workspace root
|
|
592
591
|
* @param value - The value to rewrite
|
|
@@ -843,6 +842,8 @@ export declare function parseRevisionOwner(revision: string): number | undefined
|
|
|
843
842
|
* Answers claims through its type, lint, and runtime stages.
|
|
844
843
|
*
|
|
845
844
|
* @remarks
|
|
845
|
+
* The workspace peers are TypeScript `^6.0.3 || ^7.0.2` and Vitest `^4.1.12 || ^5.0.5`.
|
|
846
|
+
* Starting refuses TypeScript majors outside 6 and 7 before a stage starts.
|
|
846
847
|
* Construction resolves the target workspace's toolchain. Starting warms every stage and waits
|
|
847
848
|
* for lint and runtime; type warming and the boot controls continue behind that gate. The boot
|
|
848
849
|
* controls mutate imported dependencies and refuse service unless the type and runtime stages
|
|
@@ -891,7 +892,7 @@ export declare function parseRevisionOwner(revision: string): number | undefined
|
|
|
891
892
|
* const probe = new Probe({ workspace: process.cwd() })
|
|
892
893
|
* const verdict = await probe.prove(claim)
|
|
893
894
|
* verdict.digest // 'bdf03e5dfd6bd413ead671c7a2940fcf'
|
|
894
|
-
* verdict.receipt //
|
|
895
|
+
* verdict.receipt?.startsWith(`probe:${verdict.digest}:type:`) // true
|
|
895
896
|
* await probe.destroy()
|
|
896
897
|
* ```
|
|
897
898
|
*/
|
|
@@ -1183,6 +1184,8 @@ export declare function releaseListeners(emitter: EventEmitter, capture: Listene
|
|
|
1183
1184
|
* @remarks
|
|
1184
1185
|
* A package publishes its binaries under keys of its own choosing, and that key is often not the
|
|
1185
1186
|
* package name: `typescript` publishes `tsc`. Name the key as `command` wherever the two differ.
|
|
1187
|
+
* Resolution reads `package.json` and its `bin` field, so TypeScript 6 and 7 need no exported
|
|
1188
|
+
* `typescript/bin/tsc` subpath.
|
|
1186
1189
|
* Default: the package name.
|
|
1187
1190
|
*
|
|
1188
1191
|
* @param workspace - The target workspace root
|
|
@@ -1247,6 +1250,11 @@ export declare function resolveWorkspaceModule(workspace: string, specifier: str
|
|
|
1247
1250
|
* Inspects tests through one resident Vitest service from the target workspace.
|
|
1248
1251
|
*
|
|
1249
1252
|
* @remarks
|
|
1253
|
+
* Vitest 4.1.12 and 5.0.5 share the mode-first `createVitest` overload used by this stage.
|
|
1254
|
+
* Result eviction removes one file from Vitest 4's results cache. Vitest 5 exposes only a full
|
|
1255
|
+
* cache clear, so eviction clears its results, dependency, and filesystem module caches.
|
|
1256
|
+
* Warming removes termination handlers registered within the factory's async context before
|
|
1257
|
+
* signal delivery, while retaining handlers the host registers outside that context.
|
|
1250
1258
|
* Starting launches Vitest with the threads pool and instruments each inline or function-declared
|
|
1251
1259
|
* project with a Vite plugin that reads the active inspection's candidate overlay. A selected
|
|
1252
1260
|
* string-declared project reports a workspace issue because its configuration carries no runtime
|
|
@@ -1447,6 +1455,8 @@ export declare interface StageInterface {
|
|
|
1447
1455
|
* Inspects TypeScript source by running the target workspace's own compiler over a mirror of it.
|
|
1448
1456
|
*
|
|
1449
1457
|
* @remarks
|
|
1458
|
+
* TypeScript 6 and 7 run through the `tsc` entry in their package manifest; neither a compiler API
|
|
1459
|
+
* nor an exported binary subpath is required.
|
|
1450
1460
|
* The compiler is a process this stage spawns rather than a module it loads, so nothing here holds
|
|
1451
1461
|
* a resident program and the host's event loop is free for the whole check. Starting sweeps a
|
|
1452
1462
|
* mirror an earlier host left behind, copies the workspace into a fresh one under
|
|
@@ -1513,6 +1523,8 @@ export declare class TypeStage implements TypeStageInterface {
|
|
|
1513
1523
|
* refreshed from the workspace first on a cache miss, so the digest names the configuration the
|
|
1514
1524
|
* check applies. The reading is cached per project for the life of the stage, so a draft written
|
|
1515
1525
|
* afterward cannot move it.
|
|
1526
|
+
* Before returning the identity, validates the project with `--noEmit` unless an unoverlaid check
|
|
1527
|
+
* already validated it. TypeScript 7's `--showConfig` can succeed for a malformed project.
|
|
1516
1528
|
*
|
|
1517
1529
|
* @param project - The workspace-relative TypeScript project to resolve
|
|
1518
1530
|
* @returns The resolved workspace-relative path and the digest of its compiler options
|
|
@@ -1520,6 +1532,14 @@ export declare class TypeStage implements TypeStageInterface {
|
|
|
1520
1532
|
* stage has already been destroyed
|
|
1521
1533
|
*/
|
|
1522
1534
|
resolve(project: string): Promise<Project>;
|
|
1535
|
+
/**
|
|
1536
|
+
* Tears down the compiler processes and releases the mirror without awaiting inspections.
|
|
1537
|
+
*
|
|
1538
|
+
* @remarks
|
|
1539
|
+
* On Windows, awaits each tree termination attempt before removing the mirror. Each attempt
|
|
1540
|
+
* uses `PROBE_DEADLINE`, the existing default inspection budget, as its utility timeout.
|
|
1541
|
+
* On POSIX, sends `SIGTERM` to each compiler. Warming settles before the mirror is removed.
|
|
1542
|
+
*/
|
|
1523
1543
|
destroy(): Promise<void>;
|
|
1524
1544
|
}
|
|
1525
1545
|
|
|
@@ -1559,6 +1579,10 @@ export declare interface TypeStageInterface extends StageInterface {
|
|
|
1559
1579
|
* Resolves one project to the path and digest the stage applies for it.
|
|
1560
1580
|
* Calls `start()` before reading the project.
|
|
1561
1581
|
*
|
|
1582
|
+
* @remarks
|
|
1583
|
+
* Validates the project with `--noEmit` unless warming or an earlier unoverlaid check already
|
|
1584
|
+
* validated it, because TypeScript 7's `--showConfig` can print partial JSON for a malformed project.
|
|
1585
|
+
*
|
|
1562
1586
|
* @param project - The workspace-relative TypeScript project to resolve
|
|
1563
1587
|
* @returns The resolved workspace-relative path and the digest of its compiler options
|
|
1564
1588
|
* @throws When the project escapes the workspace, when the compiler refuses it, or when the
|
|
@@ -524,13 +524,11 @@ export declare type ListenerCapture = ReadonlyMap<string, readonly Function[]>;
|
|
|
524
524
|
export declare function loadWorkspaceVitest(workspace: string): typeof VitestNode;
|
|
525
525
|
|
|
526
526
|
/**
|
|
527
|
-
* Reports whether
|
|
527
|
+
* Reports whether a file's owning host is running or cannot be judged.
|
|
528
528
|
*
|
|
529
529
|
* @remarks
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
* than a process, so both answer true: the safe direction is to keep a file this package cannot
|
|
533
|
-
* account for.
|
|
530
|
+
* Keeps a file when its identity is invalid or `inspectProcess` reports existence, denied
|
|
531
|
+
* permission, or an indeterminate host failure. Only a confirmed absent process answers false.
|
|
534
532
|
*
|
|
535
533
|
* @param id - The process id a file's own revision names
|
|
536
534
|
* @returns True if that process is running or cannot be judged; false otherwise
|
|
@@ -586,7 +584,8 @@ export declare function normalizePath(path: string): string;
|
|
|
586
584
|
* its relative form keeps one commit checked out at two roots reading to one digest. A path that
|
|
587
585
|
* escapes the workspace is left as it stands, because rewriting it would name a file outside the
|
|
588
586
|
* tree by a relative spelling. Key order is the compiler's own and it differs between the supported
|
|
589
|
-
* majors, so sorting removes a difference that means nothing.
|
|
587
|
+
* majors, so sorting removes a difference that means nothing. A `__proto__` key is dropped, as
|
|
588
|
+
* the earlier assignment-built record dropped it, so a digest stays the same across releases.
|
|
590
589
|
*
|
|
591
590
|
* @param workspace - The target workspace root
|
|
592
591
|
* @param value - The value to rewrite
|
|
@@ -843,6 +842,8 @@ export declare function parseRevisionOwner(revision: string): number | undefined
|
|
|
843
842
|
* Answers claims through its type, lint, and runtime stages.
|
|
844
843
|
*
|
|
845
844
|
* @remarks
|
|
845
|
+
* The workspace peers are TypeScript `^6.0.3 || ^7.0.2` and Vitest `^4.1.12 || ^5.0.5`.
|
|
846
|
+
* Starting refuses TypeScript majors outside 6 and 7 before a stage starts.
|
|
846
847
|
* Construction resolves the target workspace's toolchain. Starting warms every stage and waits
|
|
847
848
|
* for lint and runtime; type warming and the boot controls continue behind that gate. The boot
|
|
848
849
|
* controls mutate imported dependencies and refuse service unless the type and runtime stages
|
|
@@ -891,7 +892,7 @@ export declare function parseRevisionOwner(revision: string): number | undefined
|
|
|
891
892
|
* const probe = new Probe({ workspace: process.cwd() })
|
|
892
893
|
* const verdict = await probe.prove(claim)
|
|
893
894
|
* verdict.digest // 'bdf03e5dfd6bd413ead671c7a2940fcf'
|
|
894
|
-
* verdict.receipt //
|
|
895
|
+
* verdict.receipt?.startsWith(`probe:${verdict.digest}:type:`) // true
|
|
895
896
|
* await probe.destroy()
|
|
896
897
|
* ```
|
|
897
898
|
*/
|
|
@@ -1183,6 +1184,8 @@ export declare function releaseListeners(emitter: EventEmitter, capture: Listene
|
|
|
1183
1184
|
* @remarks
|
|
1184
1185
|
* A package publishes its binaries under keys of its own choosing, and that key is often not the
|
|
1185
1186
|
* package name: `typescript` publishes `tsc`. Name the key as `command` wherever the two differ.
|
|
1187
|
+
* Resolution reads `package.json` and its `bin` field, so TypeScript 6 and 7 need no exported
|
|
1188
|
+
* `typescript/bin/tsc` subpath.
|
|
1186
1189
|
* Default: the package name.
|
|
1187
1190
|
*
|
|
1188
1191
|
* @param workspace - The target workspace root
|
|
@@ -1247,6 +1250,11 @@ export declare function resolveWorkspaceModule(workspace: string, specifier: str
|
|
|
1247
1250
|
* Inspects tests through one resident Vitest service from the target workspace.
|
|
1248
1251
|
*
|
|
1249
1252
|
* @remarks
|
|
1253
|
+
* Vitest 4.1.12 and 5.0.5 share the mode-first `createVitest` overload used by this stage.
|
|
1254
|
+
* Result eviction removes one file from Vitest 4's results cache. Vitest 5 exposes only a full
|
|
1255
|
+
* cache clear, so eviction clears its results, dependency, and filesystem module caches.
|
|
1256
|
+
* Warming removes termination handlers registered within the factory's async context before
|
|
1257
|
+
* signal delivery, while retaining handlers the host registers outside that context.
|
|
1250
1258
|
* Starting launches Vitest with the threads pool and instruments each inline or function-declared
|
|
1251
1259
|
* project with a Vite plugin that reads the active inspection's candidate overlay. A selected
|
|
1252
1260
|
* string-declared project reports a workspace issue because its configuration carries no runtime
|
|
@@ -1447,6 +1455,8 @@ export declare interface StageInterface {
|
|
|
1447
1455
|
* Inspects TypeScript source by running the target workspace's own compiler over a mirror of it.
|
|
1448
1456
|
*
|
|
1449
1457
|
* @remarks
|
|
1458
|
+
* TypeScript 6 and 7 run through the `tsc` entry in their package manifest; neither a compiler API
|
|
1459
|
+
* nor an exported binary subpath is required.
|
|
1450
1460
|
* The compiler is a process this stage spawns rather than a module it loads, so nothing here holds
|
|
1451
1461
|
* a resident program and the host's event loop is free for the whole check. Starting sweeps a
|
|
1452
1462
|
* mirror an earlier host left behind, copies the workspace into a fresh one under
|
|
@@ -1513,6 +1523,8 @@ export declare class TypeStage implements TypeStageInterface {
|
|
|
1513
1523
|
* refreshed from the workspace first on a cache miss, so the digest names the configuration the
|
|
1514
1524
|
* check applies. The reading is cached per project for the life of the stage, so a draft written
|
|
1515
1525
|
* afterward cannot move it.
|
|
1526
|
+
* Before returning the identity, validates the project with `--noEmit` unless an unoverlaid check
|
|
1527
|
+
* already validated it. TypeScript 7's `--showConfig` can succeed for a malformed project.
|
|
1516
1528
|
*
|
|
1517
1529
|
* @param project - The workspace-relative TypeScript project to resolve
|
|
1518
1530
|
* @returns The resolved workspace-relative path and the digest of its compiler options
|
|
@@ -1520,6 +1532,14 @@ export declare class TypeStage implements TypeStageInterface {
|
|
|
1520
1532
|
* stage has already been destroyed
|
|
1521
1533
|
*/
|
|
1522
1534
|
resolve(project: string): Promise<Project>;
|
|
1535
|
+
/**
|
|
1536
|
+
* Tears down the compiler processes and releases the mirror without awaiting inspections.
|
|
1537
|
+
*
|
|
1538
|
+
* @remarks
|
|
1539
|
+
* On Windows, awaits each tree termination attempt before removing the mirror. Each attempt
|
|
1540
|
+
* uses `PROBE_DEADLINE`, the existing default inspection budget, as its utility timeout.
|
|
1541
|
+
* On POSIX, sends `SIGTERM` to each compiler. Warming settles before the mirror is removed.
|
|
1542
|
+
*/
|
|
1523
1543
|
destroy(): Promise<void>;
|
|
1524
1544
|
}
|
|
1525
1545
|
|
|
@@ -1559,6 +1579,10 @@ export declare interface TypeStageInterface extends StageInterface {
|
|
|
1559
1579
|
* Resolves one project to the path and digest the stage applies for it.
|
|
1560
1580
|
* Calls `start()` before reading the project.
|
|
1561
1581
|
*
|
|
1582
|
+
* @remarks
|
|
1583
|
+
* Validates the project with `--noEmit` unless warming or an earlier unoverlaid check already
|
|
1584
|
+
* validated it, because TypeScript 7's `--showConfig` can print partial JSON for a malformed project.
|
|
1585
|
+
*
|
|
1562
1586
|
* @param project - The workspace-relative TypeScript project to resolve
|
|
1563
1587
|
* @returns The resolved workspace-relative path and the digest of its compiler options
|
|
1564
1588
|
* @throws When the project escapes the workspace, when the compiler refuses it, or when the
|