@bakers-build/core 0.5.1-next.758 → 0.5.1-next.776

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.
@@ -14,7 +14,7 @@ export function withBakersClientHeader(http) {
14
14
  }
15
15
  /** Shared normal dropsh authentication, context and request-hook composition. */
16
16
  export async function createBbConnectionContext(connection, options = {}) {
17
- const [{ resolveAuth }, { createHttpClient, createJsonApiClient, PluginError },] = await Promise.all([import('dropsh'), import('dropsh/plugin')]);
17
+ const [{ resolveAuth }, { createHttpClient, createJsonApiClient, PluginError, AuthError },] = await Promise.all([import('dropsh'), import('dropsh/plugin')]);
18
18
  // BB-607: a write whose response is lost may already have applied, and
19
19
  // dropsh's client retries every request after a network failure; a
20
20
  // re-sent POST created the same entity up to four times. Reads keep the
@@ -33,6 +33,11 @@ export async function createBbConnectionContext(connection, options = {}) {
33
33
  now: Date.now,
34
34
  ...(options.stateDir ? { stateDir: options.stateDir } : {}),
35
35
  ...(options.profile ? { profile: options.profile } : {}),
36
+ }).catch((error) => {
37
+ if (error instanceof AuthError) {
38
+ error.message = error.message.replace("Run 'dropsh auth login", "Run 'bakers auth login");
39
+ }
40
+ throw error;
36
41
  }));
37
42
  const context = {
38
43
  http,
@@ -204,7 +209,7 @@ export async function verifyConfigConnections(report, options) {
204
209
  related: [],
205
210
  statically_determined: false,
206
211
  remediation: authFailure
207
- ? `Check credentials in ${shellQuote(file.path)}; run bakers dropsh --config ${shellQuote(file.path)} auth login, then ${recheck}.`
212
+ ? `Check credentials in ${shellQuote(file.path)}; run bakers auth login --config ${shellQuote(file.path)}, then ${recheck}.`
208
213
  : `Inspect ${shellQuote(file.path)}; run ${recheck}.`,
209
214
  recheck,
210
215
  });
@@ -2,7 +2,7 @@ import { shellQuote } from '../core/shell.js';
2
2
  import { createBbConnectionClient } from './config-online.js';
3
3
  import { loadBbConnectionBootstrap, } from './load-bakers-config.js';
4
4
  export function workspaceSearchCommand(path) {
5
- return `bakers dropsh --config ${shellQuote(path)} --format md search bb_workspace`;
5
+ return `bakers tools --config ${shellQuote(path)} tool_api__bakers_workspace_list`;
6
6
  }
7
7
  /** A UUID looks like `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`. */
8
8
  const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -18,6 +18,10 @@ export interface CommandDescriptor {
18
18
  describe: string;
19
19
  /** Named export to pick instead of the module default. */
20
20
  export?: string;
21
+ /** Keep dispatch available while omitting the command from help. */
22
+ hidden?: boolean;
23
+ /** `bakers help <name>` runs `bakers <name> --help`, for plugins that render their own help. */
24
+ forwardHelp?: boolean;
21
25
  }
22
26
  /** The three surfaces, each named for its config home (surface = file = plugins). */
23
27
  export type BbSurface = 'command' | 'conductor' | 'connection';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/core",
3
- "version": "0.5.1-next.758",
3
+ "version": "0.5.1-next.776",
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",