braeburn 1.2.2 → 1.3.0
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 +15 -2
- package/dist/commands/config.d.ts +13 -2
- package/dist/commands/config.js +25 -36
- package/dist/commands/setup.d.ts +11 -0
- package/dist/commands/setup.js +41 -49
- package/dist/commands/update.d.ts +4 -2
- package/dist/commands/update.js +20 -28
- package/dist/config.d.ts +3 -1
- package/dist/config.js +43 -9
- package/dist/index.js +22 -23
- package/dist/logger.d.ts +3 -3
- package/dist/logger.js +15 -15
- package/dist/logo.js +0 -2
- package/dist/runner.d.ts +2 -1
- package/dist/runner.js +2 -2
- package/dist/steps/cleanup.js +3 -2
- package/dist/steps/dotnet.js +3 -3
- package/dist/steps/homebrew.js +3 -2
- package/dist/steps/index.d.ts +8 -0
- package/dist/steps/index.js +10 -1
- package/dist/steps/macos.js +6 -8
- package/dist/steps/mas.js +3 -2
- package/dist/steps/npm.js +3 -3
- package/dist/steps/nvm.js +3 -3
- package/dist/steps/ohmyzsh.js +3 -3
- package/dist/steps/pip.js +4 -5
- package/dist/steps/pyenv.js +6 -8
- package/dist/ui/header.d.ts +9 -2
- package/dist/ui/header.js +35 -22
- package/dist/ui/outputBox.d.ts +5 -1
- package/dist/ui/outputBox.js +14 -8
- package/dist/ui/screen.d.ts +4 -2
- package/dist/ui/screen.js +14 -11
- package/dist/ui/state.d.ts +5 -3
- package/dist/ui/state.js +3 -3
- package/dist/ui/terminal.d.ts +6 -0
- package/dist/ui/terminal.js +16 -0
- package/package.json +5 -2
package/dist/ui/state.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export function createInitialAppState(steps, version,
|
|
1
|
+
export function createInitialAppState(steps, version, logoVisibility) {
|
|
2
2
|
return {
|
|
3
3
|
steps,
|
|
4
4
|
version,
|
|
5
|
-
|
|
5
|
+
logoVisibility,
|
|
6
6
|
currentStepIndex: 0,
|
|
7
7
|
currentPhase: "checking-availability",
|
|
8
8
|
completedStepRecords: [],
|
|
9
9
|
currentOutputLines: [],
|
|
10
10
|
currentPrompt: undefined,
|
|
11
|
-
|
|
11
|
+
runCompletion: "in-progress",
|
|
12
12
|
versionReport: undefined,
|
|
13
13
|
};
|
|
14
14
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function hideCursorDuringExecution(options = {}) {
|
|
2
|
+
const output = options.output ?? process.stdout;
|
|
3
|
+
output.write("\x1b[?25l");
|
|
4
|
+
const restoreOnExit = () => output.write("\x1b[?25h");
|
|
5
|
+
const restoreAndExitOnInterrupt = () => {
|
|
6
|
+
output.write("\x1b[?25h\n");
|
|
7
|
+
process.exit(130);
|
|
8
|
+
};
|
|
9
|
+
process.on("exit", restoreOnExit);
|
|
10
|
+
process.on("SIGINT", restoreAndExitOnInterrupt);
|
|
11
|
+
return () => {
|
|
12
|
+
process.removeListener("exit", restoreOnExit);
|
|
13
|
+
process.removeListener("SIGINT", restoreAndExitOnInterrupt);
|
|
14
|
+
output.write("\x1b[?25h");
|
|
15
|
+
};
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braeburn",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "macOS system updater CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"postbuild": "chmod +x dist/index.js",
|
|
18
18
|
"dev": "tsx src/index.ts",
|
|
19
19
|
"start": "node dist/index.js",
|
|
20
|
+
"test": "vitest run",
|
|
21
|
+
"test:watch": "vitest",
|
|
20
22
|
"prepublishOnly": "npm run build"
|
|
21
23
|
},
|
|
22
24
|
"dependencies": {
|
|
@@ -28,6 +30,7 @@
|
|
|
28
30
|
"devDependencies": {
|
|
29
31
|
"@types/node": "^24.0.0",
|
|
30
32
|
"tsx": "^4.7.0",
|
|
31
|
-
"typescript": "^5.5.0"
|
|
33
|
+
"typescript": "^5.5.0",
|
|
34
|
+
"vitest": "^4.0.18"
|
|
32
35
|
}
|
|
33
36
|
}
|