braeburn 1.5.0 → 1.5.1

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.
package/README.md CHANGED
@@ -42,6 +42,7 @@ Steps are grouped by system capability. For new setups, braeburn uses a conserva
42
42
  | `mas` | Apps & Packages | off | `mas` |
43
43
  | `macos` | Apps & Packages | off | — |
44
44
  | `npm` | CLI Tools | on | `npm` |
45
+ | `braeburn` | CLI Tools | on | `npm` |
45
46
  | `pip` | CLI Tools | on | `pip3` |
46
47
  | `dotnet` | CLI Tools | on | `dotnet` |
47
48
  | `ohmyzsh` | Shell | off | `~/.oh-my-zsh` |
package/dist/config.js CHANGED
@@ -4,7 +4,7 @@ import { homedir } from "node:os";
4
4
  import { parse, stringify } from "smol-toml";
5
5
  export const PROTECTED_STEP_IDS = new Set(["homebrew"]);
6
6
  export const LEGACY_DEFAULT_OFF_STEP_IDS = new Set(["nvm", "pyenv"]);
7
- export const CONSERVATIVE_DEFAULT_ON_STEP_IDS = new Set(["homebrew", "npm", "pip", "dotnet"]);
7
+ export const CONSERVATIVE_DEFAULT_ON_STEP_IDS = new Set(["homebrew", "npm", "braeburn", "pip", "dotnet"]);
8
8
  const EMPTY_CONFIG = { steps: {} };
9
9
  const LOGO_SETTING_ID = "logo";
10
10
  const DEFAULTS_PROFILE_SETTING_ID = "defaultsProfile";
package/dist/index.js CHANGED
@@ -39,6 +39,7 @@ Step descriptions:
39
39
 
40
40
  System / CLI Tools:
41
41
  npm Update global npm packages (requires: npm)
42
+ braeburn Update braeburn CLI itself (requires: npm)
42
43
  pip Update global pip3 packages (requires: pip3) ⚠ may be fragile
43
44
  dotnet Update .NET global tools (requires: dotnet)
44
45
 
@@ -84,6 +85,7 @@ program
84
85
  .option("--mas", "Show latest Mac App Store log")
85
86
  .option("--ohmyzsh", "Show latest Oh My Zsh log")
86
87
  .option("--npm", "Show latest npm log")
88
+ .option("--braeburn", "Show latest braeburn log")
87
89
  .option("--pip", "Show latest pip3 log")
88
90
  .option("--pyenv", "Show latest pyenv log")
89
91
  .option("--nvm", "Show latest nvm log")
@@ -0,0 +1,3 @@
1
+ import type { Step } from "./types.js";
2
+ declare const braeburnStep: Step;
3
+ export default braeburnStep;
@@ -0,0 +1,14 @@
1
+ import { checkCommandExists } from "./runtime.js";
2
+ const braeburnStep = {
3
+ id: "braeburn",
4
+ name: "braeburn",
5
+ categoryId: "cli-tools",
6
+ description: "Update the braeburn CLI to the latest npm release",
7
+ async checkIsAvailable() {
8
+ return checkCommandExists("npm");
9
+ },
10
+ async run(context) {
11
+ await context.runStep("npm install -g braeburn@latest");
12
+ },
13
+ };
14
+ export default braeburnStep;
@@ -1,4 +1,4 @@
1
- import { pyenvStep, nvmStep, homebrewStep, masStep, ohmyzshStep, npmStep, pipStep, dotnetStep, macosStep, cleanupStep, } from "./index.js";
1
+ import { pyenvStep, nvmStep, homebrewStep, masStep, ohmyzshStep, npmStep, pipStep, dotnetStep, macosStep, cleanupStep, braeburnStep, } from "./index.js";
2
2
  const STEP_BY_ID = {
3
3
  pyenv: pyenvStep,
4
4
  nvm: nvmStep,
@@ -10,6 +10,7 @@ const STEP_BY_ID = {
10
10
  dotnet: dotnetStep,
11
11
  ohmyzsh: ohmyzshStep,
12
12
  cleanup: cleanupStep,
13
+ braeburn: braeburnStep,
13
14
  };
14
15
  const STEP_EXECUTION_ORDER = [
15
16
  "pyenv",
@@ -18,6 +19,7 @@ const STEP_EXECUTION_ORDER = [
18
19
  "mas",
19
20
  "macos",
20
21
  "npm",
22
+ "braeburn",
21
23
  "pip",
22
24
  "dotnet",
23
25
  "ohmyzsh",
@@ -14,3 +14,4 @@ export { default as nvmStep } from "./nvm.js";
14
14
  export { default as dotnetStep } from "./dotnet.js";
15
15
  export { default as macosStep } from "./macos.js";
16
16
  export { default as cleanupStep } from "./cleanup.js";
17
+ export { default as braeburnStep } from "./braeburn.js";
@@ -11,3 +11,4 @@ export { default as nvmStep } from "./nvm.js";
11
11
  export { default as dotnetStep } from "./dotnet.js";
12
12
  export { default as macosStep } from "./macos.js";
13
13
  export { default as cleanupStep } from "./cleanup.js";
14
+ export { default as braeburnStep } from "./braeburn.js";
package/dist/ui/header.js CHANGED
@@ -21,7 +21,9 @@ export function stepTrackerIcon(phase, activityFrameIndex = 0) {
21
21
  return chalk.green("✓ ");
22
22
  if (phase === "failed")
23
23
  return chalk.red("✗ ");
24
- if (phase === "skipped" || phase === "not-available")
24
+ if (phase === "skipped")
25
+ return chalk.yellow("↷ ");
26
+ if (phase === "not-available")
25
27
  return chalk.dim("– ");
26
28
  if (phase === "running" || phase === "installing")
27
29
  return chalk.cyan(`${getActivityIndicatorFrame(activityFrameIndex)} `);
@@ -1,4 +1,4 @@
1
1
  import type { CurrentPrompt } from "./state.js";
2
- export type YesNoForceAnswer = "yes" | "no" | "force";
2
+ export type YesNoForceAnswer = "yes" | "no" | "skip" | "force";
3
3
  export declare function captureYesNo(): Promise<YesNoForceAnswer>;
4
4
  export declare function buildPromptLines(prompt: CurrentPrompt): string[];
package/dist/ui/prompt.js CHANGED
@@ -13,8 +13,9 @@ export function captureYesNo() {
13
13
  }
14
14
  const isConfirm = character === "y" || character === "Y" || key?.name === "return";
15
15
  const isDecline = character === "n" || character === "N";
16
+ const isSkip = character === "s" || character === "S";
16
17
  const isForce = character === "f" || character === "F";
17
- if (!isConfirm && !isDecline && !isForce)
18
+ if (!isConfirm && !isDecline && !isSkip && !isForce)
18
19
  return;
19
20
  process.stdin.removeListener("keypress", handleKeypress);
20
21
  if (process.stdin.isTTY) {
@@ -23,6 +24,8 @@ export function captureYesNo() {
23
24
  process.stdin.pause();
24
25
  if (isForce)
25
26
  resolve("force");
27
+ else if (isSkip)
28
+ resolve("skip");
26
29
  else if (isConfirm)
27
30
  resolve("yes");
28
31
  else
@@ -38,6 +41,6 @@ export function buildPromptLines(prompt) {
38
41
  lines.push(` ${chalk.yellow("⚠")} ${chalk.yellow(prompt.warning)}`);
39
42
  lines.push("");
40
43
  }
41
- lines.push(` ${chalk.cyan("?")} ${prompt.question} ${chalk.dim("[Y/n/f]")}`);
44
+ lines.push(` ${chalk.cyan("?")} ${prompt.question} ${chalk.dim("[Y/n/s/f]")}`);
42
45
  return lines;
43
46
  }
@@ -3,7 +3,7 @@ import { runShellCommand } from "../runner.js";
3
3
  import { createDefaultStepRunContext, type Step } from "../steps/index.js";
4
4
  import { type LogoVisibility, type ResolvedVersion, type UpdateState } from "./state.js";
5
5
  export type PromptMode = "interactive" | "auto-accept";
6
- export type ConfirmationAnswer = "yes" | "no" | "force";
6
+ export type ConfirmationAnswer = "yes" | "no" | "skip" | "force";
7
7
  type UpdateEngineDependencies = {
8
8
  createLogWriter: (stepId: string) => Promise<StepLogWriter>;
9
9
  runCommand: typeof runShellCommand;
@@ -15,7 +15,7 @@ async function resolvePrompt(promptMode, askForConfirmation) {
15
15
  return { promptMode: "auto-accept", decision: "run" };
16
16
  }
17
17
  const answer = await askForConfirmation();
18
- if (answer === "no") {
18
+ if (answer === "no" || answer === "skip") {
19
19
  return { promptMode: "interactive", decision: "skip" };
20
20
  }
21
21
  if (answer === "force") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braeburn",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "macOS system updater CLI",
5
5
  "type": "module",
6
6
  "bin": {