@orkestrel/probe 0.0.26 → 0.0.27
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/src/core/index.cjs +29 -29
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +65 -65
- package/dist/src/core/index.d.ts +65 -65
- package/dist/src/core/index.js +28 -28
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +18 -18
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +21 -21
- package/dist/src/server/index.d.ts +21 -21
- package/dist/src/server/index.js +20 -20
- package/dist/src/server/index.js.map +1 -1
- package/package.json +13 -13
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Case } from '@orkestrel/probe';
|
|
2
|
-
import type { Check } from '@orkestrel/probe';
|
|
3
2
|
import type { Claim } from '@orkestrel/probe';
|
|
4
3
|
import type { EmitterInterface } from '@orkestrel/emitter';
|
|
5
4
|
import type { EventEmitter } from 'node:events';
|
|
@@ -12,6 +11,7 @@ import type { ProbeInterface } from '@orkestrel/probe';
|
|
|
12
11
|
import type { ProbeOptions } from '@orkestrel/probe';
|
|
13
12
|
import type { Project } from '@orkestrel/probe';
|
|
14
13
|
import type { Stage } from '@orkestrel/probe';
|
|
14
|
+
import type { StageResult } from '@orkestrel/probe';
|
|
15
15
|
import type { Toolchain } from '@orkestrel/probe';
|
|
16
16
|
import type { Verdict } from '@orkestrel/probe';
|
|
17
17
|
import type * as VitestNode from 'vitest/node';
|
|
@@ -86,10 +86,10 @@ export declare function collectWorkspaceFiles(workspace: string): readonly strin
|
|
|
86
86
|
*
|
|
87
87
|
* @example
|
|
88
88
|
* ```ts
|
|
89
|
-
*
|
|
89
|
+
* computeWorkspaceDigest('/srv/checkout', { strict: true }).length // 32
|
|
90
90
|
* ```
|
|
91
91
|
*/
|
|
92
|
-
export declare function
|
|
92
|
+
export declare function computeWorkspaceDigest(workspace: string, value: unknown): string;
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
95
|
* Creates the protocol failure returned when the MCP handshake cannot arm the probe.
|
|
@@ -397,7 +397,7 @@ export declare function isRefusedName(file: string, error: unknown): boolean;
|
|
|
397
397
|
*
|
|
398
398
|
* @remarks
|
|
399
399
|
* Starting launches the target workspace's Oxlint binary with its Language Server Protocol mode
|
|
400
|
-
* and hands the conversation to `@orkestrel/lsp`: `
|
|
400
|
+
* and hands the conversation to `@orkestrel/lsp`: `createLSPStdioTransport` owns the child
|
|
401
401
|
* process and its bytes, and `createLSPClient` owns the framing, the request correlation, the
|
|
402
402
|
* capabilities this stage advertises, and the choice between pulled and pushed diagnostics. This
|
|
403
403
|
* stage owns the workspace, the candidate identity, and the projection from a diagnostic to an
|
|
@@ -425,7 +425,7 @@ export declare function isRefusedName(file: string, error: unknown): boolean;
|
|
|
425
425
|
* @example
|
|
426
426
|
* ```ts
|
|
427
427
|
* const stage = new LintStage('/srv/checkout')
|
|
428
|
-
* const
|
|
428
|
+
* const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
|
|
429
429
|
* await stage.destroy()
|
|
430
430
|
* ```
|
|
431
431
|
*/
|
|
@@ -441,7 +441,7 @@ export declare class LintStage implements LintStageInterface {
|
|
|
441
441
|
get progress(): number;
|
|
442
442
|
get exit(): Promise<never>;
|
|
443
443
|
start(): Promise<void>;
|
|
444
|
-
inspect(subject: Case, options?: InspectionOptions): Promise<
|
|
444
|
+
inspect(subject: Case, options?: InspectionOptions): Promise<StageResult>;
|
|
445
445
|
destroy(): Promise<void>;
|
|
446
446
|
}
|
|
447
447
|
|
|
@@ -461,7 +461,7 @@ export declare class LintStage implements LintStageInterface {
|
|
|
461
461
|
*
|
|
462
462
|
* @example
|
|
463
463
|
* ```ts
|
|
464
|
-
* const
|
|
464
|
+
* const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
|
|
465
465
|
* ```
|
|
466
466
|
*/
|
|
467
467
|
export declare interface LintStageInterface extends StageInterface {
|
|
@@ -478,10 +478,10 @@ export declare interface LintStageInterface extends StageInterface {
|
|
|
478
478
|
*
|
|
479
479
|
* @example
|
|
480
480
|
* ```ts
|
|
481
|
-
* const
|
|
481
|
+
* const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
|
|
482
482
|
* ```
|
|
483
483
|
*/
|
|
484
|
-
inspect(subject: Case, options?: InspectionOptions): Promise<
|
|
484
|
+
inspect(subject: Case, options?: InspectionOptions): Promise<StageResult>;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
/**
|
|
@@ -1307,7 +1307,7 @@ export declare function resolveWorkspaceModule(workspace: string, specifier: str
|
|
|
1307
1307
|
* @example
|
|
1308
1308
|
* ```ts
|
|
1309
1309
|
* const stage = new RuntimeStage('/srv/checkout')
|
|
1310
|
-
* const
|
|
1310
|
+
* const result = await stage.inspect(subject)
|
|
1311
1311
|
* await stage.destroy()
|
|
1312
1312
|
* ```
|
|
1313
1313
|
*/
|
|
@@ -1335,7 +1335,7 @@ export declare class RuntimeStage implements StageInterface {
|
|
|
1335
1335
|
* @returns One outcome for this stage
|
|
1336
1336
|
* @throws When the workspace's own tool cannot start or has already been destroyed
|
|
1337
1337
|
*/
|
|
1338
|
-
inspect(subject: Case): Promise<
|
|
1338
|
+
inspect(subject: Case): Promise<StageResult>;
|
|
1339
1339
|
/**
|
|
1340
1340
|
* Tears down the resident tool or the mirror and releases its resources.
|
|
1341
1341
|
*
|
|
@@ -1395,8 +1395,8 @@ export declare function scanDiagnostics(text: string): readonly Diagnostic[];
|
|
|
1395
1395
|
*
|
|
1396
1396
|
* @example
|
|
1397
1397
|
* ```ts
|
|
1398
|
-
* const
|
|
1399
|
-
* console.log(
|
|
1398
|
+
* const result = await stage.inspect(subject)
|
|
1399
|
+
* console.log(result.stage)
|
|
1400
1400
|
* await stage.destroy()
|
|
1401
1401
|
* ```
|
|
1402
1402
|
*/
|
|
@@ -1430,11 +1430,11 @@ export declare interface StageInterface {
|
|
|
1430
1430
|
*
|
|
1431
1431
|
* @example
|
|
1432
1432
|
* ```ts
|
|
1433
|
-
* const
|
|
1434
|
-
* console.log(
|
|
1433
|
+
* const result = await stage.inspect(subject)
|
|
1434
|
+
* console.log(result.stage, result.elapsed, result.issues.length)
|
|
1435
1435
|
* ```
|
|
1436
1436
|
*/
|
|
1437
|
-
inspect(subject: Case): Promise<
|
|
1437
|
+
inspect(subject: Case): Promise<StageResult>;
|
|
1438
1438
|
/**
|
|
1439
1439
|
* Tears down the resident tool or the mirror and releases its resources.
|
|
1440
1440
|
*
|
|
@@ -1484,7 +1484,7 @@ export declare interface StageInterface {
|
|
|
1484
1484
|
* @example
|
|
1485
1485
|
* ```ts
|
|
1486
1486
|
* const stage = new TypeStage('/srv/checkout')
|
|
1487
|
-
* const
|
|
1487
|
+
* const result = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
|
|
1488
1488
|
* await stage.destroy()
|
|
1489
1489
|
* ```
|
|
1490
1490
|
*/
|
|
@@ -1514,7 +1514,7 @@ export declare class TypeStage implements TypeStageInterface {
|
|
|
1514
1514
|
* @throws When the workspace refuses the mirror, when a project the run reads is malformed, or
|
|
1515
1515
|
* when the stage has already been destroyed
|
|
1516
1516
|
*/
|
|
1517
|
-
inspect(subject: Case, project?: string): Promise<
|
|
1517
|
+
inspect(subject: Case, project?: string): Promise<StageResult>;
|
|
1518
1518
|
/**
|
|
1519
1519
|
* Resolves one project to the path and digest this stage applies for it.
|
|
1520
1520
|
*
|
|
@@ -1555,7 +1555,7 @@ export declare class TypeStage implements TypeStageInterface {
|
|
|
1555
1555
|
* @example
|
|
1556
1556
|
* ```ts
|
|
1557
1557
|
* const project = await stage.resolve('configs/src/tsconfig.core.json')
|
|
1558
|
-
* const
|
|
1558
|
+
* const result = await stage.inspect(subject, project.path)
|
|
1559
1559
|
* ```
|
|
1560
1560
|
*/
|
|
1561
1561
|
export declare interface TypeStageInterface extends StageInterface {
|
|
@@ -1571,10 +1571,10 @@ export declare interface TypeStageInterface extends StageInterface {
|
|
|
1571
1571
|
*
|
|
1572
1572
|
* @example
|
|
1573
1573
|
* ```ts
|
|
1574
|
-
* const
|
|
1574
|
+
* const result = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
|
|
1575
1575
|
* ```
|
|
1576
1576
|
*/
|
|
1577
|
-
inspect(subject: Case, project?: string): Promise<
|
|
1577
|
+
inspect(subject: Case, project?: string): Promise<StageResult>;
|
|
1578
1578
|
/**
|
|
1579
1579
|
* Resolves one project to the path and digest the stage applies for it.
|
|
1580
1580
|
* Calls `start()` before reading the project.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Case } from '@orkestrel/probe';
|
|
2
|
-
import type { Check } from '@orkestrel/probe';
|
|
3
2
|
import type { Claim } from '@orkestrel/probe';
|
|
4
3
|
import type { EmitterInterface } from '@orkestrel/emitter';
|
|
5
4
|
import type { EventEmitter } from 'node:events';
|
|
@@ -12,6 +11,7 @@ import type { ProbeInterface } from '@orkestrel/probe';
|
|
|
12
11
|
import type { ProbeOptions } from '@orkestrel/probe';
|
|
13
12
|
import type { Project } from '@orkestrel/probe';
|
|
14
13
|
import type { Stage } from '@orkestrel/probe';
|
|
14
|
+
import type { StageResult } from '@orkestrel/probe';
|
|
15
15
|
import type { Toolchain } from '@orkestrel/probe';
|
|
16
16
|
import type { Verdict } from '@orkestrel/probe';
|
|
17
17
|
import type * as VitestNode from 'vitest/node';
|
|
@@ -86,10 +86,10 @@ export declare function collectWorkspaceFiles(workspace: string): readonly strin
|
|
|
86
86
|
*
|
|
87
87
|
* @example
|
|
88
88
|
* ```ts
|
|
89
|
-
*
|
|
89
|
+
* computeWorkspaceDigest('/srv/checkout', { strict: true }).length // 32
|
|
90
90
|
* ```
|
|
91
91
|
*/
|
|
92
|
-
export declare function
|
|
92
|
+
export declare function computeWorkspaceDigest(workspace: string, value: unknown): string;
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
95
|
* Creates the protocol failure returned when the MCP handshake cannot arm the probe.
|
|
@@ -397,7 +397,7 @@ export declare function isRefusedName(file: string, error: unknown): boolean;
|
|
|
397
397
|
*
|
|
398
398
|
* @remarks
|
|
399
399
|
* Starting launches the target workspace's Oxlint binary with its Language Server Protocol mode
|
|
400
|
-
* and hands the conversation to `@orkestrel/lsp`: `
|
|
400
|
+
* and hands the conversation to `@orkestrel/lsp`: `createLSPStdioTransport` owns the child
|
|
401
401
|
* process and its bytes, and `createLSPClient` owns the framing, the request correlation, the
|
|
402
402
|
* capabilities this stage advertises, and the choice between pulled and pushed diagnostics. This
|
|
403
403
|
* stage owns the workspace, the candidate identity, and the projection from a diagnostic to an
|
|
@@ -425,7 +425,7 @@ export declare function isRefusedName(file: string, error: unknown): boolean;
|
|
|
425
425
|
* @example
|
|
426
426
|
* ```ts
|
|
427
427
|
* const stage = new LintStage('/srv/checkout')
|
|
428
|
-
* const
|
|
428
|
+
* const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
|
|
429
429
|
* await stage.destroy()
|
|
430
430
|
* ```
|
|
431
431
|
*/
|
|
@@ -441,7 +441,7 @@ export declare class LintStage implements LintStageInterface {
|
|
|
441
441
|
get progress(): number;
|
|
442
442
|
get exit(): Promise<never>;
|
|
443
443
|
start(): Promise<void>;
|
|
444
|
-
inspect(subject: Case, options?: InspectionOptions): Promise<
|
|
444
|
+
inspect(subject: Case, options?: InspectionOptions): Promise<StageResult>;
|
|
445
445
|
destroy(): Promise<void>;
|
|
446
446
|
}
|
|
447
447
|
|
|
@@ -461,7 +461,7 @@ export declare class LintStage implements LintStageInterface {
|
|
|
461
461
|
*
|
|
462
462
|
* @example
|
|
463
463
|
* ```ts
|
|
464
|
-
* const
|
|
464
|
+
* const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
|
|
465
465
|
* ```
|
|
466
466
|
*/
|
|
467
467
|
export declare interface LintStageInterface extends StageInterface {
|
|
@@ -478,10 +478,10 @@ export declare interface LintStageInterface extends StageInterface {
|
|
|
478
478
|
*
|
|
479
479
|
* @example
|
|
480
480
|
* ```ts
|
|
481
|
-
* const
|
|
481
|
+
* const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
|
|
482
482
|
* ```
|
|
483
483
|
*/
|
|
484
|
-
inspect(subject: Case, options?: InspectionOptions): Promise<
|
|
484
|
+
inspect(subject: Case, options?: InspectionOptions): Promise<StageResult>;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
/**
|
|
@@ -1307,7 +1307,7 @@ export declare function resolveWorkspaceModule(workspace: string, specifier: str
|
|
|
1307
1307
|
* @example
|
|
1308
1308
|
* ```ts
|
|
1309
1309
|
* const stage = new RuntimeStage('/srv/checkout')
|
|
1310
|
-
* const
|
|
1310
|
+
* const result = await stage.inspect(subject)
|
|
1311
1311
|
* await stage.destroy()
|
|
1312
1312
|
* ```
|
|
1313
1313
|
*/
|
|
@@ -1335,7 +1335,7 @@ export declare class RuntimeStage implements StageInterface {
|
|
|
1335
1335
|
* @returns One outcome for this stage
|
|
1336
1336
|
* @throws When the workspace's own tool cannot start or has already been destroyed
|
|
1337
1337
|
*/
|
|
1338
|
-
inspect(subject: Case): Promise<
|
|
1338
|
+
inspect(subject: Case): Promise<StageResult>;
|
|
1339
1339
|
/**
|
|
1340
1340
|
* Tears down the resident tool or the mirror and releases its resources.
|
|
1341
1341
|
*
|
|
@@ -1395,8 +1395,8 @@ export declare function scanDiagnostics(text: string): readonly Diagnostic[];
|
|
|
1395
1395
|
*
|
|
1396
1396
|
* @example
|
|
1397
1397
|
* ```ts
|
|
1398
|
-
* const
|
|
1399
|
-
* console.log(
|
|
1398
|
+
* const result = await stage.inspect(subject)
|
|
1399
|
+
* console.log(result.stage)
|
|
1400
1400
|
* await stage.destroy()
|
|
1401
1401
|
* ```
|
|
1402
1402
|
*/
|
|
@@ -1430,11 +1430,11 @@ export declare interface StageInterface {
|
|
|
1430
1430
|
*
|
|
1431
1431
|
* @example
|
|
1432
1432
|
* ```ts
|
|
1433
|
-
* const
|
|
1434
|
-
* console.log(
|
|
1433
|
+
* const result = await stage.inspect(subject)
|
|
1434
|
+
* console.log(result.stage, result.elapsed, result.issues.length)
|
|
1435
1435
|
* ```
|
|
1436
1436
|
*/
|
|
1437
|
-
inspect(subject: Case): Promise<
|
|
1437
|
+
inspect(subject: Case): Promise<StageResult>;
|
|
1438
1438
|
/**
|
|
1439
1439
|
* Tears down the resident tool or the mirror and releases its resources.
|
|
1440
1440
|
*
|
|
@@ -1484,7 +1484,7 @@ export declare interface StageInterface {
|
|
|
1484
1484
|
* @example
|
|
1485
1485
|
* ```ts
|
|
1486
1486
|
* const stage = new TypeStage('/srv/checkout')
|
|
1487
|
-
* const
|
|
1487
|
+
* const result = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
|
|
1488
1488
|
* await stage.destroy()
|
|
1489
1489
|
* ```
|
|
1490
1490
|
*/
|
|
@@ -1514,7 +1514,7 @@ export declare class TypeStage implements TypeStageInterface {
|
|
|
1514
1514
|
* @throws When the workspace refuses the mirror, when a project the run reads is malformed, or
|
|
1515
1515
|
* when the stage has already been destroyed
|
|
1516
1516
|
*/
|
|
1517
|
-
inspect(subject: Case, project?: string): Promise<
|
|
1517
|
+
inspect(subject: Case, project?: string): Promise<StageResult>;
|
|
1518
1518
|
/**
|
|
1519
1519
|
* Resolves one project to the path and digest this stage applies for it.
|
|
1520
1520
|
*
|
|
@@ -1555,7 +1555,7 @@ export declare class TypeStage implements TypeStageInterface {
|
|
|
1555
1555
|
* @example
|
|
1556
1556
|
* ```ts
|
|
1557
1557
|
* const project = await stage.resolve('configs/src/tsconfig.core.json')
|
|
1558
|
-
* const
|
|
1558
|
+
* const result = await stage.inspect(subject, project.path)
|
|
1559
1559
|
* ```
|
|
1560
1560
|
*/
|
|
1561
1561
|
export declare interface TypeStageInterface extends StageInterface {
|
|
@@ -1571,10 +1571,10 @@ export declare interface TypeStageInterface extends StageInterface {
|
|
|
1571
1571
|
*
|
|
1572
1572
|
* @example
|
|
1573
1573
|
* ```ts
|
|
1574
|
-
* const
|
|
1574
|
+
* const result = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
|
|
1575
1575
|
* ```
|
|
1576
1576
|
*/
|
|
1577
|
-
inspect(subject: Case, project?: string): Promise<
|
|
1577
|
+
inspect(subject: Case, project?: string): Promise<StageResult>;
|
|
1578
1578
|
/**
|
|
1579
1579
|
* Resolves one project to the path and digest the stage applies for it.
|
|
1580
1580
|
* Calls `start()` before reading the project.
|
package/dist/src/server/index.js
CHANGED
|
@@ -5,14 +5,14 @@ import { createHash, randomUUID } from "node:crypto";
|
|
|
5
5
|
import { basename, dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
6
6
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
7
7
|
import { attempt, compileGuard, compileSchema, isArray, isError, isFunction, isNumber, isObject, isRecord, isString, parseJSON, schemaToParameters } from "@orkestrel/contract";
|
|
8
|
-
import { CLAIM_SHAPE, LINT_DEADLINE, LINT_TEARDOWN, PROBE_DEADLINE, PROBE_KEYS, PROBE_RESTARTS, PROBE_SPECIFICATIONS, PROBE_WARM, ProbeError, RUNTIME_PLUGIN, TYPE_MIRROR, computeReceipt, createDestroyedError,
|
|
8
|
+
import { CLAIM_SHAPE, LINT_DEADLINE, LINT_TEARDOWN, PROBE_DEADLINE, PROBE_KEYS, PROBE_RESTARTS, PROBE_SPECIFICATIONS, PROBE_WARM, ProbeError, RUNTIME_PLUGIN, TYPE_MIRROR, computeReceipt, createDestroyedError, formatReceipt, formatSpecification, formatStageResult, formatVerdict, isClaim, isDraft, isProbeError, isVerdict, matchesSpecification } from "../core/index.js";
|
|
9
9
|
import { inspectProcess, killTree } from "@orkestrel/process/server";
|
|
10
10
|
import { Emitter } from "@orkestrel/emitter";
|
|
11
11
|
import { createPool, isPoolError } from "@orkestrel/pool";
|
|
12
12
|
import { createLSPClient, isLSPError } from "@orkestrel/lsp";
|
|
13
13
|
import { addAbortListener } from "node:events";
|
|
14
14
|
import { createTimeout } from "@orkestrel/timeout";
|
|
15
|
-
import {
|
|
15
|
+
import { createLSPStdioTransport } from "@orkestrel/lsp/server";
|
|
16
16
|
import { PassThrough } from "node:stream";
|
|
17
17
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
18
18
|
import { spawn } from "node:child_process";
|
|
@@ -896,10 +896,10 @@ function normalizeValue(workspace, value) {
|
|
|
896
896
|
*
|
|
897
897
|
* @example
|
|
898
898
|
* ```ts
|
|
899
|
-
*
|
|
899
|
+
* computeWorkspaceDigest('/srv/checkout', { strict: true }).length // 32
|
|
900
900
|
* ```
|
|
901
901
|
*/
|
|
902
|
-
function
|
|
902
|
+
function computeWorkspaceDigest(workspace, value) {
|
|
903
903
|
return createHash("sha256").update(JSON.stringify(normalizeValue(workspace, value))).digest("hex").slice(0, 32);
|
|
904
904
|
}
|
|
905
905
|
/**
|
|
@@ -1093,7 +1093,7 @@ var Overlay = class {
|
|
|
1093
1093
|
}
|
|
1094
1094
|
};
|
|
1095
1095
|
// package.json
|
|
1096
|
-
var version = "0.0.
|
|
1096
|
+
var version = "0.0.27";
|
|
1097
1097
|
var peerDependencies = {
|
|
1098
1098
|
"typescript": "^6.0.3 || ^7.0.2",
|
|
1099
1099
|
"vitest": "^4.1.12 || ^5.0.5"
|
|
@@ -1104,7 +1104,7 @@ var peerDependencies = {
|
|
|
1104
1104
|
*
|
|
1105
1105
|
* @remarks
|
|
1106
1106
|
* Starting launches the target workspace's Oxlint binary with its Language Server Protocol mode
|
|
1107
|
-
* and hands the conversation to `@orkestrel/lsp`: `
|
|
1107
|
+
* and hands the conversation to `@orkestrel/lsp`: `createLSPStdioTransport` owns the child
|
|
1108
1108
|
* process and its bytes, and `createLSPClient` owns the framing, the request correlation, the
|
|
1109
1109
|
* capabilities this stage advertises, and the choice between pulled and pushed diagnostics. This
|
|
1110
1110
|
* stage owns the workspace, the candidate identity, and the projection from a diagnostic to an
|
|
@@ -1132,7 +1132,7 @@ var peerDependencies = {
|
|
|
1132
1132
|
* @example
|
|
1133
1133
|
* ```ts
|
|
1134
1134
|
* const stage = new LintStage('/srv/checkout')
|
|
1135
|
-
* const
|
|
1135
|
+
* const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
|
|
1136
1136
|
* await stage.destroy()
|
|
1137
1137
|
* ```
|
|
1138
1138
|
*/
|
|
@@ -1205,7 +1205,7 @@ var LintStage = class {
|
|
|
1205
1205
|
}
|
|
1206
1206
|
async #warm() {
|
|
1207
1207
|
const binary = resolveWorkspaceBinary(this.#workspace, "oxlint");
|
|
1208
|
-
const transport =
|
|
1208
|
+
const transport = createLSPStdioTransport({
|
|
1209
1209
|
server: {
|
|
1210
1210
|
command: [
|
|
1211
1211
|
process.execPath,
|
|
@@ -1373,7 +1373,7 @@ var LintStage = class {
|
|
|
1373
1373
|
* @example
|
|
1374
1374
|
* ```ts
|
|
1375
1375
|
* const stage = new RuntimeStage('/srv/checkout')
|
|
1376
|
-
* const
|
|
1376
|
+
* const result = await stage.inspect(subject)
|
|
1377
1377
|
* await stage.destroy()
|
|
1378
1378
|
* ```
|
|
1379
1379
|
*/
|
|
@@ -2019,7 +2019,7 @@ var RuntimeStage = class {
|
|
|
2019
2019
|
* @example
|
|
2020
2020
|
* ```ts
|
|
2021
2021
|
* const stage = new TypeStage('/srv/checkout')
|
|
2022
|
-
* const
|
|
2022
|
+
* const result = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
|
|
2023
2023
|
* await stage.destroy()
|
|
2024
2024
|
* ```
|
|
2025
2025
|
*/
|
|
@@ -2158,7 +2158,7 @@ var TypeStage = class {
|
|
|
2158
2158
|
}
|
|
2159
2159
|
return {
|
|
2160
2160
|
path: contained,
|
|
2161
|
-
digest:
|
|
2161
|
+
digest: computeWorkspaceDigest(this.#workspace, config.compilerOptions)
|
|
2162
2162
|
};
|
|
2163
2163
|
}
|
|
2164
2164
|
async #destroy() {
|
|
@@ -2609,7 +2609,7 @@ var Probe = class {
|
|
|
2609
2609
|
const started = performance.now();
|
|
2610
2610
|
const id = randomUUID();
|
|
2611
2611
|
const project = await this.#resolve(claim);
|
|
2612
|
-
const digest =
|
|
2612
|
+
const digest = computeWorkspaceDigest(this.#workspace, {
|
|
2613
2613
|
case: claim.case,
|
|
2614
2614
|
control: claim.control
|
|
2615
2615
|
});
|
|
@@ -2773,21 +2773,21 @@ var Probe = class {
|
|
|
2773
2773
|
const beforeType = await this.#inspect(typeClaim.case, typeClaim);
|
|
2774
2774
|
const beforeRuntime = await this.#inspect(runtimeClaim.case, runtimeClaim);
|
|
2775
2775
|
const before = [...beforeType, ...beforeRuntime];
|
|
2776
|
-
if (before.some((
|
|
2776
|
+
if (before.some((result) => result.issues.length > 0)) throw new ProbeError(`The probe boot control did not begin clean\n${before.map(formatStageResult).join("\n")}`, {
|
|
2777
2777
|
origin: "instrument",
|
|
2778
2778
|
code: "malformed"
|
|
2779
2779
|
});
|
|
2780
2780
|
resolveWorkspaceFile(this.#workspace, relative(this.#workspace, typeDependency), true);
|
|
2781
2781
|
overwriteFile(typeDependency, formatSpecification("export type Signal = number\n", revision));
|
|
2782
2782
|
const afterType = await this.#inspect(typeClaim.control, typeClaim);
|
|
2783
|
-
const type = afterType.find((
|
|
2784
|
-
const tolerant = afterType.find((
|
|
2785
|
-
if (type === void 0 || type.issues.length === 0) throw new ProbeError(`The probe boot type control did not detect a mutated dependency\n${afterType.map(
|
|
2783
|
+
const type = afterType.find((result) => result.stage === typeClaim.control.stage);
|
|
2784
|
+
const tolerant = afterType.find((result) => result.stage === "runtime");
|
|
2785
|
+
if (type === void 0 || type.issues.length === 0) throw new ProbeError(`The probe boot type control did not detect a mutated dependency\n${afterType.map(formatStageResult).join("\n")}`, {
|
|
2786
2786
|
origin: "instrument",
|
|
2787
2787
|
code: "malformed",
|
|
2788
2788
|
context: { stage: typeClaim.control.stage }
|
|
2789
2789
|
});
|
|
2790
|
-
if (tolerant === void 0 || tolerant.issues.length > 0) throw new ProbeError(`The probe boot type control did not remain runtime-clean\n${afterType.map(
|
|
2790
|
+
if (tolerant === void 0 || tolerant.issues.length > 0) throw new ProbeError(`The probe boot type control did not remain runtime-clean\n${afterType.map(formatStageResult).join("\n")}`, {
|
|
2791
2791
|
origin: "instrument",
|
|
2792
2792
|
code: "malformed",
|
|
2793
2793
|
context: { stage: "runtime" }
|
|
@@ -2795,8 +2795,8 @@ var Probe = class {
|
|
|
2795
2795
|
resolveWorkspaceFile(this.#workspace, relative(this.#workspace, runtimeDependency), true);
|
|
2796
2796
|
overwriteFile(runtimeDependency, formatSpecification("export const SIGNAL = 'after'\n", revision));
|
|
2797
2797
|
const afterRuntime = await this.#inspect(runtimeClaim.control, runtimeClaim);
|
|
2798
|
-
const runtime = afterRuntime.find((
|
|
2799
|
-
if (runtime === void 0 || runtime.issues.length === 0) throw new ProbeError(`The probe boot runtime control did not detect a mutated dependency\n${afterRuntime.map(
|
|
2798
|
+
const runtime = afterRuntime.find((result) => result.stage === runtimeClaim.control.stage);
|
|
2799
|
+
if (runtime === void 0 || runtime.issues.length === 0) throw new ProbeError(`The probe boot runtime control did not detect a mutated dependency\n${afterRuntime.map(formatStageResult).join("\n")}`, {
|
|
2800
2800
|
origin: "instrument",
|
|
2801
2801
|
code: "malformed",
|
|
2802
2802
|
context: { stage: runtimeClaim.control.stage }
|
|
@@ -3251,6 +3251,6 @@ var ProbeServer = class {
|
|
|
3251
3251
|
] : [rendered, minimal]).find((arm) => isBoundedJSON(arm, bounds)) ?? minimal;
|
|
3252
3252
|
}
|
|
3253
3253
|
};
|
|
3254
|
-
export { LintStage, Overlay, Probe, ProbeServer, RuntimeStage, TypeStage, buildRevisionPath, captureListeners, collectWorkspaceFiles,
|
|
3254
|
+
export { LintStage, Overlay, Probe, ProbeServer, RuntimeStage, TypeStage, buildRevisionPath, captureListeners, collectWorkspaceFiles, computeWorkspaceDigest, createHandshakeError, describeUnknown, escapesRoot, filterUniqueIssues, findRefusedPaths, guardStage, inferDocumentLanguage, inferTestProject, inferTypeProject, isRefusedName, loadWorkspaceVitest, matchesLiveProcess, matchesWorkspaceModule, normalizePath, normalizeValue, overwriteFile, parseProjectConfig, parseRevisionOwner, readFaultCode, readWorkspaceManifest, relativeWorkspaceFile, relativeWorkspaceMessage, releaseListeners, resolveWorkspaceBinary, resolveWorkspaceFile, resolveWorkspaceModule, scanDiagnostics };
|
|
3255
3255
|
|
|
3256
3256
|
//# sourceMappingURL=index.js.map
|