@bakers-build/core 0.21.0 → 0.21.1-next.2

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.
@@ -120,7 +120,7 @@ export function resolveConfigPath(override, cwd = process.cwd(), conductorName)
120
120
  if (name !== undefined && name !== '') {
121
121
  const candidate = join(bakersDir, fileForStem(name));
122
122
  if (!existsSync(candidate)) {
123
- throw new Error(`no conductor '${name}' in ${bakersDir}; available: ${stems.join(', ')}`);
123
+ throw new Error(`no runner '${name}' in ${bakersDir}; available: ${stems.join(', ')}`);
124
124
  }
125
125
  return candidate;
126
126
  }
@@ -130,8 +130,8 @@ export function resolveConfigPath(override, cwd = process.cwd(), conductorName)
130
130
  if (stems.length === 1) {
131
131
  return join(bakersDir, fileForStem(stems[0]));
132
132
  }
133
- throw new Error(`${stems.length} conductors in ${bakersDir} (${stems.join(', ')}); ` +
134
- 'select one with --conductor <name> or $BAKERS_CONDUCTOR');
133
+ throw new Error(`${stems.length} runners in ${bakersDir} (${stems.join(', ')}); ` +
134
+ 'select one with --runner <name> or $BAKERS_CONDUCTOR');
135
135
  }
136
136
  /** Walk upward for current project connection files only. Legacy engine files
137
137
  * are migration input, never runtime connection sources. */
@@ -380,7 +380,7 @@ export function inventoryConfig(options = {}) {
380
380
  const key = problem.key || null;
381
381
  const at = key ? `${key} in ${shellQuote(path)}` : shellQuote(path);
382
382
  add(problem.code, key, key ? `${key}: ${problem.message}` : problem.message, problem.code === 'not_checked' || problem.code === 'options_not_checked'
383
- ? `Nothing to repair offline; the loader checks ${at} when the conductor starts.`
383
+ ? `Nothing to repair offline; the loader checks ${at} when the runner starts.`
384
384
  : `Repair ${at}: ${problem.message.replace(/\.$/, '')}.`, 'schema', problem.severity, key ? source.properties.get(key) : undefined);
385
385
  if (problem.line !== undefined) {
386
386
  const finding = report.findings.at(-1);
@@ -176,7 +176,7 @@ export function validateConfig(kind, value, opts = {}) {
176
176
  key,
177
177
  code: 'invalid_value',
178
178
  severity: 'error',
179
- message: 'must be a literal: the conductor reads project without running the file (BAKERS_PROJECT overrides the name)',
179
+ message: 'must be a literal: the runner reads project without running the file (BAKERS_PROJECT overrides the name)',
180
180
  }));
181
181
  const notChecked = [...computed, ...partial]
182
182
  .filter((key) => !identity.includes(key))
@@ -185,8 +185,8 @@ export function validateConfig(kind, value, opts = {}) {
185
185
  code: 'not_checked',
186
186
  severity: 'warning',
187
187
  message: computed.includes(key)
188
- ? 'value is computed; it is checked when the conductor loads the file'
189
- : 'object has a spread; its keys are checked when the conductor loads the file',
188
+ ? 'value is computed; it is checked when the runner loads the file'
189
+ : 'object has a spread; its keys are checked when the runner loads the file',
190
190
  }));
191
191
  return [...schema, ...identityProblems, ...notChecked].sort((a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0);
192
192
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * A dispatch failure that cannot heal by itself: the conductor holds the
3
+ * ticket and claims it again only once `recheck` reports it healed.
4
+ */
5
+ export declare class DispatchBlocked extends Error {
6
+ /** True once the cause is gone. */
7
+ readonly recheck: () => boolean | Promise<boolean>;
8
+ constructor(message: string,
9
+ /** True once the cause is gone. */
10
+ recheck: () => boolean | Promise<boolean>);
11
+ }
12
+ /** Duck-typed, so it holds across copies of this package. */
13
+ export declare const isDispatchBlocked: (err: unknown) => err is DispatchBlocked;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * A dispatch failure that cannot heal by itself: the conductor holds the
3
+ * ticket and claims it again only once `recheck` reports it healed.
4
+ */
5
+ export class DispatchBlocked extends Error {
6
+ recheck;
7
+ constructor(message,
8
+ /** True once the cause is gone. */
9
+ recheck) {
10
+ super(message);
11
+ this.recheck = recheck;
12
+ this.name = 'DispatchBlocked';
13
+ }
14
+ }
15
+ /** Duck-typed, so it holds across copies of this package. */
16
+ export const isDispatchBlocked = (err) => err instanceof Error &&
17
+ err.name === 'DispatchBlocked' &&
18
+ typeof err.recheck === 'function';
@@ -7,8 +7,8 @@ import { readdirSync, readFileSync, statSync } from 'node:fs';
7
7
  * is "is a bakers conductor foreground loop", not an exact argv match.
8
8
  */
9
9
  const CONDUCTOR_CMDLINE_MARKERS = ['start', '--foreground'];
10
- /** `conductor`, or `oven` for a conductor an older CLI started. */
11
- const CONDUCTOR_COMMAND = /(^|[\s\0])(conductor|oven)([\s\0]|$)/;
10
+ /** `runner`, or `conductor` for a runner an older CLI started. */
11
+ const CONDUCTOR_COMMAND = /(^|[\s\0])(runner|conductor)([\s\0]|$)/;
12
12
  function looksLikeBbConductor(cmdline) {
13
13
  return (CONDUCTOR_COMMAND.test(cmdline) &&
14
14
  CONDUCTOR_CMDLINE_MARKERS.every((marker) => cmdline.includes(marker)));
@@ -44,21 +44,21 @@ function identifyProcess(input) {
44
44
  return {
45
45
  ok: false,
46
46
  reason: 'no-pid',
47
- message: 'no pid on record for this conductor — it must have been started in a way that records one',
47
+ message: 'no pid on record for this runner — it must have been started in a way that records one',
48
48
  };
49
49
  }
50
50
  if (!hostKey || hostKey !== thisHostKey) {
51
51
  return {
52
52
  ok: false,
53
53
  reason: 'host-mismatch',
54
- message: `conductor's host_key (${hostKey ?? '(none)'}) is not this machine's (${thisHostKey}) — refusing to signal a conductor on another host`,
54
+ message: `runner's host_key (${hostKey ?? '(none)'}) is not this machine's (${thisHostKey}) — refusing to signal a runner on another host`,
55
55
  };
56
56
  }
57
57
  if (!probe.supported) {
58
58
  return {
59
59
  ok: false,
60
60
  reason: 'unverifiable-platform',
61
- message: `cannot verify on this platform that pid ${pid} is a bakers conductor; refusing to signal an unverified pid`,
61
+ message: `cannot verify on this platform that pid ${pid} is a bakers runner; refusing to signal an unverified pid`,
62
62
  };
63
63
  }
64
64
  const cmdline = probe.cmdlineOf(pid);
@@ -73,7 +73,7 @@ function identifyProcess(input) {
73
73
  return {
74
74
  ok: false,
75
75
  reason: 'stale-pid',
76
- message: `pid ${pid} is running something else (not a bakers conductor) — the pid was recycled by another process; not signalling it`,
76
+ message: `pid ${pid} is running something else (not a bakers runner) — the pid was recycled by another process; not signalling it`,
77
77
  };
78
78
  }
79
79
  const uid = probe.uidOf(pid);
@@ -18,6 +18,7 @@ export { BB_PACKAGE, checkForUpdate, declineUpdate, defaultUpdateCachePath, fetc
18
18
  export { discoverBbWorkspaces, loadReadyBbConnection, resolveWorkspaceSelector, type WorkspaceChoice, type WorkspaceRecoveryOptions, workspaceSearchCommand, } from './cli/workspace-recovery.js';
19
19
  export type { ConnectionConfig, MachineConfig, ProjectConfig, } from './config-types.generated.js';
20
20
  export { configHomeOf, defaultRootGitExec, deriveCheckoutRoot, type RootGitExec, stopMarkerOf, } from './core/checkout-root.js';
21
+ export { DispatchBlocked, isDispatchBlocked, } from './core/dispatch-blocked.js';
21
22
  export { CommandRunner, ExecError, exec, setDefaultCommandRunner, } from './core/exec.js';
22
23
  export { type GitSandboxPaths, gitSandboxPaths, withoutGitDirs, } from './core/git-sandbox.js';
23
24
  export { hostCommandEntry, unprotectedEntryPoints, } from './core/host-commands.js';
package/dist/src/index.js CHANGED
@@ -19,6 +19,7 @@ export { resolveModuleEslintStyle } from './cli/resolve-module.js';
19
19
  export { BB_PACKAGE, checkForUpdate, declineUpdate, defaultUpdateCachePath, fetchLatestVersion, fetchUpdateNotice, printVersionLine, REGISTRY_LATEST_URL, readCliVersion, resolveCliVersion, UNKNOWN_VERSION, UPDATE_CHECK_TTL_MS, updateNotice, } from './cli/version-check.js';
20
20
  export { discoverBbWorkspaces, loadReadyBbConnection, resolveWorkspaceSelector, workspaceSearchCommand, } from './cli/workspace-recovery.js';
21
21
  export { configHomeOf, defaultRootGitExec, deriveCheckoutRoot, stopMarkerOf, } from './core/checkout-root.js';
22
+ export { DispatchBlocked, isDispatchBlocked, } from './core/dispatch-blocked.js';
22
23
  export { CommandRunner, ExecError, exec, setDefaultCommandRunner, } from './core/exec.js';
23
24
  export { gitSandboxPaths, withoutGitDirs, } from './core/git-sandbox.js';
24
25
  export { hostCommandEntry, unprotectedEntryPoints, } from './core/host-commands.js';
@@ -128,7 +128,7 @@ function routeByKind(factory, opts, kind, acc) {
128
128
  * written for an older release keeps loading after an update.
129
129
  */
130
130
  const RETIRED_ADDONS = {
131
- '@bakers-build/addon-ports-ui': 'the Ports panel now comes from @bakers-build/addon-ports in the conductor config (the ticket Addons tab); remove the entry',
131
+ '@bakers-build/addon-ports-ui': 'the Ports panel now comes from @bakers-build/addon-ports in the runner config (the ticket Addons tab); remove the entry',
132
132
  };
133
133
  /** Is `spec` a retired addon (skipped with a warning by `discoverAddons`)? */
134
134
  export function isRetiredAddon(spec) {
@@ -20,7 +20,7 @@ export interface CommandDescriptor {
20
20
  export?: string;
21
21
  /** Keep dispatch available while omitting the command from help. */
22
22
  hidden?: boolean;
23
- /** Hidden alternative names that run this command (`oven` → `conductor`). */
23
+ /** Hidden alternative names that run this command (`conductor` → `runner`). */
24
24
  aliases?: string[];
25
25
  /** `bakers help <name>` runs `bakers <name> --help`, for plugins that render their own help. */
26
26
  forwardHelp?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/core",
3
- "version": "0.21.0",
3
+ "version": "0.21.1-next.2",
4
4
  "description": "bakers.build surface-agnostic kernel: host contract, split-config helpers, addon preset/discovery machinery, shared primitives.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "yaml": "^2.7.0"
42
42
  },
43
43
  "bakersBuild": {
44
- "commit": "a3a7417bfbbd14a550213883dbaea762909095ae",
45
- "channel": "latest"
44
+ "commit": "a87e7555360eb6a9ec167dc172c66d8e98293e34",
45
+ "channel": "next"
46
46
  }
47
47
  }