@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.
@@ -897,10 +897,10 @@ function normalizeValue(workspace, value) {
897
897
  *
898
898
  * @example
899
899
  * ```ts
900
- * computeDigest('/srv/checkout', { strict: true }).length // 32
900
+ * computeWorkspaceDigest('/srv/checkout', { strict: true }).length // 32
901
901
  * ```
902
902
  */
903
- function computeDigest(workspace, value) {
903
+ function computeWorkspaceDigest(workspace, value) {
904
904
  return (0, node_crypto.createHash)("sha256").update(JSON.stringify(normalizeValue(workspace, value))).digest("hex").slice(0, 32);
905
905
  }
906
906
  /**
@@ -1094,7 +1094,7 @@ var Overlay = class {
1094
1094
  }
1095
1095
  };
1096
1096
  // package.json
1097
- var version = "0.0.26";
1097
+ var version = "0.0.27";
1098
1098
  var peerDependencies = {
1099
1099
  "typescript": "^6.0.3 || ^7.0.2",
1100
1100
  "vitest": "^4.1.12 || ^5.0.5"
@@ -1105,7 +1105,7 @@ var peerDependencies = {
1105
1105
  *
1106
1106
  * @remarks
1107
1107
  * Starting launches the target workspace's Oxlint binary with its Language Server Protocol mode
1108
- * and hands the conversation to `@orkestrel/lsp`: `createStdioClientTransport` owns the child
1108
+ * and hands the conversation to `@orkestrel/lsp`: `createLSPStdioTransport` owns the child
1109
1109
  * process and its bytes, and `createLSPClient` owns the framing, the request correlation, the
1110
1110
  * capabilities this stage advertises, and the choice between pulled and pushed diagnostics. This
1111
1111
  * stage owns the workspace, the candidate identity, and the projection from a diagnostic to an
@@ -1133,7 +1133,7 @@ var peerDependencies = {
1133
1133
  * @example
1134
1134
  * ```ts
1135
1135
  * const stage = new LintStage('/srv/checkout')
1136
- * const check = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
1136
+ * const result = await stage.inspect(subject, { signal: AbortSignal.timeout(30_000) })
1137
1137
  * await stage.destroy()
1138
1138
  * ```
1139
1139
  */
@@ -1206,7 +1206,7 @@ var LintStage = class {
1206
1206
  }
1207
1207
  async #warm() {
1208
1208
  const binary = resolveWorkspaceBinary(this.#workspace, "oxlint");
1209
- const transport = (0, _orkestrel_lsp_server.createStdioClientTransport)({
1209
+ const transport = (0, _orkestrel_lsp_server.createLSPStdioTransport)({
1210
1210
  server: {
1211
1211
  command: [
1212
1212
  process.execPath,
@@ -1374,7 +1374,7 @@ var LintStage = class {
1374
1374
  * @example
1375
1375
  * ```ts
1376
1376
  * const stage = new RuntimeStage('/srv/checkout')
1377
- * const check = await stage.inspect(subject)
1377
+ * const result = await stage.inspect(subject)
1378
1378
  * await stage.destroy()
1379
1379
  * ```
1380
1380
  */
@@ -2020,7 +2020,7 @@ var RuntimeStage = class {
2020
2020
  * @example
2021
2021
  * ```ts
2022
2022
  * const stage = new TypeStage('/srv/checkout')
2023
- * const check = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
2023
+ * const result = await stage.inspect(subject, 'configs/src/tsconfig.core.json')
2024
2024
  * await stage.destroy()
2025
2025
  * ```
2026
2026
  */
@@ -2159,7 +2159,7 @@ var TypeStage = class {
2159
2159
  }
2160
2160
  return {
2161
2161
  path: contained,
2162
- digest: computeDigest(this.#workspace, config.compilerOptions)
2162
+ digest: computeWorkspaceDigest(this.#workspace, config.compilerOptions)
2163
2163
  };
2164
2164
  }
2165
2165
  async #destroy() {
@@ -2610,7 +2610,7 @@ var Probe = class {
2610
2610
  const started = performance.now();
2611
2611
  const id = (0, node_crypto.randomUUID)();
2612
2612
  const project = await this.#resolve(claim);
2613
- const digest = computeDigest(this.#workspace, {
2613
+ const digest = computeWorkspaceDigest(this.#workspace, {
2614
2614
  case: claim.case,
2615
2615
  control: claim.control
2616
2616
  });
@@ -2774,21 +2774,21 @@ var Probe = class {
2774
2774
  const beforeType = await this.#inspect(typeClaim.case, typeClaim);
2775
2775
  const beforeRuntime = await this.#inspect(runtimeClaim.case, runtimeClaim);
2776
2776
  const before = [...beforeType, ...beforeRuntime];
2777
- if (before.some((check) => check.issues.length > 0)) throw new _src_core.ProbeError(`The probe boot control did not begin clean\n${before.map(_src_core.formatCheck).join("\n")}`, {
2777
+ if (before.some((result) => result.issues.length > 0)) throw new _src_core.ProbeError(`The probe boot control did not begin clean\n${before.map(_src_core.formatStageResult).join("\n")}`, {
2778
2778
  origin: "instrument",
2779
2779
  code: "malformed"
2780
2780
  });
2781
2781
  resolveWorkspaceFile(this.#workspace, (0, node_path.relative)(this.#workspace, typeDependency), true);
2782
2782
  overwriteFile(typeDependency, (0, _src_core.formatSpecification)("export type Signal = number\n", revision));
2783
2783
  const afterType = await this.#inspect(typeClaim.control, typeClaim);
2784
- const type = afterType.find((check) => check.stage === typeClaim.control.stage);
2785
- const tolerant = afterType.find((check) => check.stage === "runtime");
2786
- if (type === void 0 || type.issues.length === 0) throw new _src_core.ProbeError(`The probe boot type control did not detect a mutated dependency\n${afterType.map(_src_core.formatCheck).join("\n")}`, {
2784
+ const type = afterType.find((result) => result.stage === typeClaim.control.stage);
2785
+ const tolerant = afterType.find((result) => result.stage === "runtime");
2786
+ if (type === void 0 || type.issues.length === 0) throw new _src_core.ProbeError(`The probe boot type control did not detect a mutated dependency\n${afterType.map(_src_core.formatStageResult).join("\n")}`, {
2787
2787
  origin: "instrument",
2788
2788
  code: "malformed",
2789
2789
  context: { stage: typeClaim.control.stage }
2790
2790
  });
2791
- if (tolerant === void 0 || tolerant.issues.length > 0) throw new _src_core.ProbeError(`The probe boot type control did not remain runtime-clean\n${afterType.map(_src_core.formatCheck).join("\n")}`, {
2791
+ if (tolerant === void 0 || tolerant.issues.length > 0) throw new _src_core.ProbeError(`The probe boot type control did not remain runtime-clean\n${afterType.map(_src_core.formatStageResult).join("\n")}`, {
2792
2792
  origin: "instrument",
2793
2793
  code: "malformed",
2794
2794
  context: { stage: "runtime" }
@@ -2796,8 +2796,8 @@ var Probe = class {
2796
2796
  resolveWorkspaceFile(this.#workspace, (0, node_path.relative)(this.#workspace, runtimeDependency), true);
2797
2797
  overwriteFile(runtimeDependency, (0, _src_core.formatSpecification)("export const SIGNAL = 'after'\n", revision));
2798
2798
  const afterRuntime = await this.#inspect(runtimeClaim.control, runtimeClaim);
2799
- const runtime = afterRuntime.find((check) => check.stage === runtimeClaim.control.stage);
2800
- if (runtime === void 0 || runtime.issues.length === 0) throw new _src_core.ProbeError(`The probe boot runtime control did not detect a mutated dependency\n${afterRuntime.map(_src_core.formatCheck).join("\n")}`, {
2799
+ const runtime = afterRuntime.find((result) => result.stage === runtimeClaim.control.stage);
2800
+ if (runtime === void 0 || runtime.issues.length === 0) throw new _src_core.ProbeError(`The probe boot runtime control did not detect a mutated dependency\n${afterRuntime.map(_src_core.formatStageResult).join("\n")}`, {
2801
2801
  origin: "instrument",
2802
2802
  code: "malformed",
2803
2803
  context: { stage: runtimeClaim.control.stage }
@@ -3261,7 +3261,7 @@ exports.TypeStage = TypeStage;
3261
3261
  exports.buildRevisionPath = buildRevisionPath;
3262
3262
  exports.captureListeners = captureListeners;
3263
3263
  exports.collectWorkspaceFiles = collectWorkspaceFiles;
3264
- exports.computeDigest = computeDigest;
3264
+ exports.computeWorkspaceDigest = computeWorkspaceDigest;
3265
3265
  exports.createHandshakeError = createHandshakeError;
3266
3266
  exports.describeUnknown = describeUnknown;
3267
3267
  exports.escapesRoot = escapesRoot;