@orkestrel/probe 0.0.16 → 0.0.18

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.
@@ -196,7 +196,7 @@ function resolveWorkspaceFile(workspace, target, mutate = false) {
196
196
  *
197
197
  * @example
198
198
  * ```ts
199
- * const file = resolveWorkspaceFile('/srv/checkout', 'tmp/probe/arm-type.ts', true)
199
+ * const file = resolveWorkspaceFile('/srv/checkout', 'tmp/probes/arm-type.ts', true)
200
200
  * writeFileSync(file, 'export type Signal = string\n', { encoding: 'utf8', flag: 'wx' })
201
201
  * overwriteFile(file, 'export type Signal = number\n')
202
202
  * readFileSync(file, 'utf8') // 'export type Signal = number\n'
@@ -239,11 +239,11 @@ function overwriteFile(file, text) {
239
239
  * @example
240
240
  * ```ts
241
241
  * try {
242
- * writeFileSync('tmp/probe/greeting\0.test.ts', '')
242
+ * writeFileSync('tmp/probes/greeting\0.test.ts', '')
243
243
  * } catch (error) {
244
- * isRefusedName('tmp/probe/greeting\0.test.ts', error) // true
244
+ * isRefusedName('tmp/probes/greeting\0.test.ts', error) // true
245
245
  * }
246
- * isRefusedName('tmp/probe/greeting.test.ts', new Error('the runtime stage was destroyed')) // false
246
+ * isRefusedName('tmp/probes/greeting.test.ts', new Error('the runtime stage was destroyed')) // false
247
247
  * ```
248
248
  */
249
249
  function isRefusedName(file, error) {
@@ -590,14 +590,14 @@ function inferTypeProject(path) {
590
590
  *
591
591
  * @example
592
592
  * ```ts
593
- * inferTestProject('tmp/probe/greeting.test.ts') // 'probe'
593
+ * inferTestProject('tmp/probes/greeting.test.ts') // 'probe'
594
594
  * inferTestProject('tests/src/server/helpers.test.ts') // 'src:server'
595
595
  * inferTestProject('tests/config.test.ts') // undefined
596
596
  * ```
597
597
  */
598
598
  function inferTestProject(path) {
599
599
  const [root, axis, environment] = normalizePath(path).split("/");
600
- if (root === "tmp" && axis === "probe") return "probe";
600
+ if (root === "tmp" && axis === "probes") return "probe";
601
601
  if (root !== "tests" || axis === void 0 || environment === void 0) return void 0;
602
602
  if (axis !== "src" && axis !== "app") return void 0;
603
603
  return `${axis}:${environment}`;
@@ -634,9 +634,9 @@ function inferDocumentLanguage(path) {
634
634
  * ```ts
635
635
  * relativeWorkspaceFile(
636
636
  * '/srv/checkout',
637
- * buildRevisionPath('/srv/checkout', 'tmp/probe/greeting.test.ts', '4821-9f0c'),
637
+ * buildRevisionPath('/srv/checkout', 'tmp/probes/greeting.test.ts', '4821-9f0c'),
638
638
  * )
639
- * // 'tmp/probe/greeting.test.probe-4821-9f0c.ts'
639
+ * // 'tmp/probes/greeting.test.probe-4821-9f0c.ts'
640
640
  * ```
641
641
  */
642
642
  function buildRevisionPath(workspace, path, revision) {
@@ -826,7 +826,7 @@ async function guardStage(stage, operation) {
826
826
  *
827
827
  * @example
828
828
  * ```ts
829
- * const test = { path: 'tmp/probe/greeting.test.ts', text: '' }
829
+ * const test = { path: 'tmp/probes/greeting.test.ts', text: '' }
830
830
  * findRefusedPaths({
831
831
  * project: 'tsconfig.json',
832
832
  * case: { files: [{ path: '../../etc/hosts', text: '' }], test },
@@ -1104,9 +1104,8 @@ var Overlay = class {
1104
1104
  };
1105
1105
  //#endregion
1106
1106
  //#region package.json
1107
- var version = "0.0.16";
1107
+ var version = "0.0.18";
1108
1108
  var peerDependencies = {
1109
- "oxlint": "^1.82.0",
1110
1109
  "typescript": "^6.0.3",
1111
1110
  "vitest": "^4.1.11"
1112
1111
  };
@@ -2462,7 +2461,7 @@ var TypeStage = class {
2462
2461
  * },
2463
2462
  * ],
2464
2463
  * test: {
2465
- * path: 'tmp/probe/greeting.test.ts',
2464
+ * path: 'tmp/probes/greeting.test.ts',
2466
2465
  * text: "import { expect, test } from 'vitest'\nimport { createGreeting } from '../../src/core/factories.js'\ntest('greets', () => expect(createGreeting()).toBe('hi'))\n",
2467
2466
  * },
2468
2467
  * },
@@ -2474,7 +2473,7 @@ var TypeStage = class {
2474
2473
  * },
2475
2474
  * ],
2476
2475
  * test: {
2477
- * path: 'tmp/probe/greeting.test.ts',
2476
+ * path: 'tmp/probes/greeting.test.ts',
2478
2477
  * text: "import { expect, test } from 'vitest'\nimport { createGreeting } from '../../src/core/factories.js'\ntest('greets', () => expect(createGreeting()).toBe('hi'))\n",
2479
2478
  * },
2480
2479
  * stage: 'type',
@@ -2484,8 +2483,8 @@ var TypeStage = class {
2484
2483
  *
2485
2484
  * const probe = new Probe({ workspace: process.cwd() })
2486
2485
  * const verdict = await probe.prove(claim)
2487
- * verdict.digest // 'fcb88a2dee987b8673c1fc7107979470'
2488
- * verdict.receipt // 'probe:fcb88a2dee987b8673c1fc7107979470:type:typescript@6.0.3:oxlint@1.83.0:vitest@4.1.11:configs/src/tsconfig.core.json@434f59254d58cf2683d453a26bd0d837'
2486
+ * verdict.digest // 'bdf03e5dfd6bd413ead671c7a2940fcf'
2487
+ * verdict.receipt // 'probe:bdf03e5dfd6bd413ead671c7a2940fcf:type:typescript@6.0.3:oxlint@1.86.0:vitest@4.1.11:configs/src/tsconfig.core.json@434f59254d58cf2683d453a26bd0d837'
2489
2488
  * await probe.destroy()
2490
2489
  * ```
2491
2490
  */
@@ -2631,7 +2630,7 @@ var Probe = class {
2631
2630
  this.#emitter.emit("error", error);
2632
2631
  }
2633
2632
  #workbench() {
2634
- const path = "tmp/probe";
2633
+ const path = "tmp/probes";
2635
2634
  const directory = resolveWorkspaceFile(this.#workspace, path);
2636
2635
  const created = !(0, node_fs.existsSync)(directory);
2637
2636
  try {
@@ -2649,16 +2648,16 @@ var Probe = class {
2649
2648
  }
2650
2649
  async #boot(created) {
2651
2650
  const revision = `${process.pid}-${(0, node_crypto.randomUUID)()}`;
2652
- const typeDependency = buildRevisionPath(this.#workspace, "tmp/probe/arm-type.ts", revision);
2653
- const runtimeDependency = buildRevisionPath(this.#workspace, "tmp/probe/arm-runtime.ts", revision);
2651
+ const typeDependency = buildRevisionPath(this.#workspace, "tmp/probes/arm-type.ts", revision);
2652
+ const runtimeDependency = buildRevisionPath(this.#workspace, "tmp/probes/arm-runtime.ts", revision);
2654
2653
  const typeModule = (0, node_path.basename)(typeDependency, ".ts");
2655
2654
  const runtimeModule = (0, node_path.basename)(runtimeDependency, ".ts");
2656
2655
  const typeTest = {
2657
- path: `tmp/probe/${typeModule}.test.ts`,
2656
+ path: `tmp/probes/${typeModule}.test.ts`,
2658
2657
  text: `import type { Signal } from './${typeModule}.js'\nimport { expect, test } from 'vitest'\nconst SIGNAL: Signal = 'before'\ntest('revalidates a mutated type', () => {\n\texpect(SIGNAL).toBe('before')\n})\n`
2659
2658
  };
2660
2659
  const runtimeTest = {
2661
- path: `tmp/probe/${runtimeModule}.test.ts`,
2660
+ path: `tmp/probes/${runtimeModule}.test.ts`,
2662
2661
  text: `import { SIGNAL } from './${runtimeModule}.js'\nimport { expect, test } from 'vitest'\ntest('revalidates a mutated value', () => {\n\texpect(SIGNAL).toBe('before')\n})\n`
2663
2662
  };
2664
2663
  const typeClaim = {
@@ -2733,7 +2732,7 @@ var Probe = class {
2733
2732
  (0, node_fs.rmSync)(resolveWorkspaceFile(this.#workspace, (0, node_path.relative)(this.#workspace, typeDependency), true), { force: true });
2734
2733
  (0, node_fs.rmSync)(resolveWorkspaceFile(this.#workspace, (0, node_path.relative)(this.#workspace, runtimeDependency), true), { force: true });
2735
2734
  if (created) try {
2736
- (0, node_fs.rmdirSync)(resolveWorkspaceFile(this.#workspace, "tmp/probe", true));
2735
+ (0, node_fs.rmdirSync)(resolveWorkspaceFile(this.#workspace, "tmp/probes", true));
2737
2736
  } catch {}
2738
2737
  }
2739
2738
  }