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.
- package/README.md +3 -1
- package/dist/commands/config.d.ts +7 -0
- package/dist/commands/config.js +187 -24
- package/dist/commands/setup.d.ts +9 -1
- package/dist/commands/setup.js +66 -55
- package/dist/commands/update.d.ts +2 -2
- package/dist/commands/update.js +22 -101
- package/dist/index.js +22 -17
- package/dist/runner.js +2 -2
- package/dist/steps/catalog.d.ts +2 -0
- package/dist/steps/catalog.js +13 -0
- package/dist/steps/cleanup.d.ts +1 -1
- package/dist/steps/cleanup.js +1 -1
- package/dist/steps/dotnet.d.ts +1 -1
- package/dist/steps/dotnet.js +1 -1
- package/dist/steps/homebrew.d.ts +1 -1
- package/dist/steps/homebrew.js +1 -1
- package/dist/steps/index.d.ts +2 -25
- package/dist/steps/index.js +1 -23
- package/dist/steps/macos.d.ts +1 -1
- package/dist/steps/mas.d.ts +1 -1
- package/dist/steps/mas.js +1 -1
- package/dist/steps/npm.d.ts +1 -1
- package/dist/steps/npm.js +1 -1
- package/dist/steps/nvm.d.ts +1 -1
- package/dist/steps/nvm.js +1 -1
- package/dist/steps/ohmyzsh.d.ts +1 -1
- package/dist/steps/ohmyzsh.js +1 -1
- package/dist/steps/pip.d.ts +1 -1
- package/dist/steps/pip.js +1 -1
- package/dist/steps/pyenv.d.ts +1 -1
- package/dist/steps/pyenv.js +1 -1
- package/dist/steps/runtime.d.ts +7 -0
- package/dist/steps/runtime.js +23 -0
- package/dist/steps/types.d.ts +21 -0
- package/dist/steps/types.js +1 -0
- package/dist/ui/currentStep.d.ts +2 -3
- package/dist/ui/header.d.ts +3 -4
- package/dist/ui/screen.js +1 -5
- package/dist/ui/state.d.ts +1 -30
- package/dist/ui/state.js +1 -14
- package/dist/ui/terminal.d.ts +1 -0
- package/dist/ui/terminal.js +14 -3
- package/dist/ui/versionReport.d.ts +0 -1
- package/dist/ui/versionReport.js +0 -16
- package/dist/update/displayStep.d.ts +4 -0
- package/dist/update/displayStep.js +11 -0
- package/dist/update/engine.d.ts +23 -0
- package/dist/update/engine.js +126 -0
- package/dist/update/state.d.ts +38 -0
- package/dist/update/state.js +15 -0
- package/dist/update/versionCollector.d.ts +2 -0
- package/dist/update/versionCollector.js +16 -0
- 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,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
|
+
}
|