braeburn 1.3.1 → 1.4.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.
Files changed (54) hide show
  1. package/README.md +3 -1
  2. package/dist/commands/config.d.ts +7 -0
  3. package/dist/commands/config.js +187 -24
  4. package/dist/commands/setup.d.ts +9 -1
  5. package/dist/commands/setup.js +66 -55
  6. package/dist/commands/update.d.ts +2 -2
  7. package/dist/commands/update.js +22 -101
  8. package/dist/index.js +22 -17
  9. package/dist/runner.js +2 -2
  10. package/dist/steps/catalog.d.ts +2 -0
  11. package/dist/steps/catalog.js +13 -0
  12. package/dist/steps/cleanup.d.ts +1 -1
  13. package/dist/steps/cleanup.js +1 -1
  14. package/dist/steps/dotnet.d.ts +1 -1
  15. package/dist/steps/dotnet.js +1 -1
  16. package/dist/steps/homebrew.d.ts +1 -1
  17. package/dist/steps/homebrew.js +1 -1
  18. package/dist/steps/index.d.ts +2 -25
  19. package/dist/steps/index.js +1 -23
  20. package/dist/steps/macos.d.ts +1 -1
  21. package/dist/steps/mas.d.ts +1 -1
  22. package/dist/steps/mas.js +1 -1
  23. package/dist/steps/npm.d.ts +1 -1
  24. package/dist/steps/npm.js +1 -1
  25. package/dist/steps/nvm.d.ts +1 -1
  26. package/dist/steps/nvm.js +1 -1
  27. package/dist/steps/ohmyzsh.d.ts +1 -1
  28. package/dist/steps/ohmyzsh.js +1 -1
  29. package/dist/steps/pip.d.ts +1 -1
  30. package/dist/steps/pip.js +1 -1
  31. package/dist/steps/pyenv.d.ts +1 -1
  32. package/dist/steps/pyenv.js +1 -1
  33. package/dist/steps/runtime.d.ts +7 -0
  34. package/dist/steps/runtime.js +23 -0
  35. package/dist/steps/types.d.ts +21 -0
  36. package/dist/steps/types.js +1 -0
  37. package/dist/ui/currentStep.d.ts +2 -3
  38. package/dist/ui/header.d.ts +3 -4
  39. package/dist/ui/screen.js +1 -5
  40. package/dist/ui/state.d.ts +1 -30
  41. package/dist/ui/state.js +1 -14
  42. package/dist/ui/terminal.d.ts +1 -0
  43. package/dist/ui/terminal.js +14 -3
  44. package/dist/ui/versionReport.d.ts +0 -1
  45. package/dist/ui/versionReport.js +0 -16
  46. package/dist/update/displayStep.d.ts +4 -0
  47. package/dist/update/displayStep.js +11 -0
  48. package/dist/update/engine.d.ts +23 -0
  49. package/dist/update/engine.js +126 -0
  50. package/dist/update/state.d.ts +38 -0
  51. package/dist/update/state.js +15 -0
  52. package/dist/update/versionCollector.d.ts +2 -0
  53. package/dist/update/versionCollector.js +16 -0
  54. package/package.json +1 -1
@@ -0,0 +1,15 @@
1
+ export function createInitialUpdateState(steps, version, logoVisibility) {
2
+ return {
3
+ steps,
4
+ version,
5
+ logoVisibility,
6
+ currentStepIndex: 0,
7
+ currentPhase: "checking-availability",
8
+ completedStepRecords: [],
9
+ currentOutputLines: [],
10
+ currentPrompt: undefined,
11
+ runCompletion: "in-progress",
12
+ versionReport: undefined,
13
+ };
14
+ }
15
+ export const createInitialAppState = createInitialUpdateState;
@@ -0,0 +1,2 @@
1
+ import type { ResolvedVersion } from "./state.js";
2
+ export declare function collectVersions(): Promise<ResolvedVersion[]>;
@@ -0,0 +1,16 @@
1
+ import { captureShellCommandOutput } from "../runner.js";
2
+ const VERSION_ENTRIES = [
3
+ { label: "macOS", shellCommand: "sw_vers -productVersion" },
4
+ { label: "Homebrew", shellCommand: "brew --version | head -n1" },
5
+ { label: "Node", shellCommand: "node -v 2>/dev/null" },
6
+ { label: "NPM", shellCommand: "npm -v 2>/dev/null" },
7
+ { label: "Python", shellCommand: "python3 --version 2>/dev/null" },
8
+ { label: "pip3", shellCommand: "pip3 --version 2>/dev/null | cut -d' ' -f1-2" },
9
+ { label: "Zsh", shellCommand: "zsh --version 2>/dev/null" },
10
+ ];
11
+ export async function collectVersions() {
12
+ return Promise.all(VERSION_ENTRIES.map(async ({ label, shellCommand }) => {
13
+ const value = await captureShellCommandOutput({ shellCommand }).catch(() => "");
14
+ return { label, value: value || "not installed" };
15
+ }));
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braeburn",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "description": "macOS system updater CLI",
5
5
  "type": "module",
6
6
  "bin": {