@untestutils/core 0.5.4 → 0.6.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAe,MAAM,SAAS,CAAC;AAM5D,MAAM,WAAW,mBAAmB;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAiBD,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ3E;AAED,wBAAsB,cAAc,CAClC,WAAW,EAAE,MAAM,GAAG,MAAM,EAC5B,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,cAAc,CAAC,CAoIzB;AAkGD,wBAAsB,cAAc,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC1E;AAED,8FAA8F;AAC9F,wBAAsB,mBAAmB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/E;AAED,6FAA6F;AAC7F,wBAAgB,yBAAyB,IAAI,IAAI,CAIhD;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,SAAS,EAAE,aAAa,CA0B7F"}
1
+ {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAe,MAAM,SAAS,CAAC;AAM5D,MAAM,WAAW,mBAAmB;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAiBD,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB3E;AAED,wBAAsB,cAAc,CAClC,WAAW,EAAE,MAAM,GAAG,MAAM,EAC5B,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,cAAc,CAAC,CAoIzB;AAkGD,wBAAsB,cAAc,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC1E;AAED,8FAA8F;AAC9F,wBAAsB,mBAAmB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/E;AAED,6FAA6F;AAC7F,wBAAgB,yBAAyB,IAAI,IAAI,CAIhD;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,SAAS,EAAE,aAAa,CA0B7F"}
@@ -10,7 +10,7 @@ import { progress } from "./progress.mjs";
10
10
  import { defaultReady } from "./ready.mjs";
11
11
  import { createRunHelper } from "./run-helper.mjs";
12
12
  import { TargetRegistry } from "./target-registry.mjs";
13
- import { getRegisteredRecipe } from "./recipes.mjs";
13
+ import { getRegisteredRecipe, listRegisteredRecipes } from "./recipes.mjs";
14
14
  import { isPidAlive, killPidTree } from "./process.mjs";
15
15
  import { ofetch } from "ofetch";
16
16
  import { constants } from "node:fs";
@@ -25,7 +25,11 @@ function rememberLive(id, running, meta, stop) {
25
25
  export async function resolveRecipe(input) {
26
26
  if (typeof input === "string") {
27
27
  const r = getRegisteredRecipe(input);
28
- if (!r) throw new Error(`[untestutils] unknown recipe id "${input}". Did you call defineRecipes()?`);
28
+ if (!r) {
29
+ const known = listRegisteredRecipes().map((x) => x.id).filter(Boolean).sort();
30
+ const hint = known.length > 0 ? ` Known ids: ${known.join(", ")}.` : " Did you call defineRecipes(..., import.meta.url)?";
31
+ throw new Error(`[untestutils] unknown recipe id "${input}".${hint}`);
32
+ }
29
33
  return r;
30
34
  }
31
35
  return input;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@untestutils/core",
3
- "version": "0.5.4",
3
+ "version": "0.6.0",
4
4
  "description": "Recipe harness core — locks, registry, orchestrator, drivers",
5
5
  "homepage": "https://s00d.github.io/untestutils/",
6
6
  "license": "MIT",