haoshoku 2.0.0 → 2.0.2
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 +1 -1
- package/package.json +1 -1
- package/src/os_scripts/debian_server.js +12 -4
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ bun haoshoku.js
|
|
|
17
17
|
**Haoshoku** (formerly Bankai) is a modular, multi-distro Linux setup and configuration toolkit. It automates the installation of essential applications, developer tools, terminal configs, and user environment tweaks.
|
|
18
18
|
|
|
19
19
|
> [!NOTE]
|
|
20
|
-
> **Haoshoku** (
|
|
20
|
+
> **Haoshoku** (referencing ["Supreme King Haki"](https://onepiece.fandom.com/wiki/Haki/Supreme_King_Haki) from *One Piece*) serves as an authoritative configuration manager, enforcing a strict and consistent environment setup across your Linux systems.
|
|
21
21
|
|
|
22
22
|
> [!IMPORTANT]
|
|
23
23
|
> **Rebranding & Migration**: This project was previously known as **Bankai** and was available on **PyPI** (Python). It has been renamed to **Haoshoku** and is now available on **NPM** (JavaScript/Bun).
|
package/package.json
CHANGED
|
@@ -29,7 +29,10 @@ async function promptUser(message, initial = false) {
|
|
|
29
29
|
async function installEssentials() {
|
|
30
30
|
log.info("Updating system and installing essentials...");
|
|
31
31
|
await runCommand("sudo apt update && sudo apt upgrade -y");
|
|
32
|
-
|
|
32
|
+
// Split installation to ensure core tools are installed even if optional ones fail
|
|
33
|
+
await runCommand("sudo apt install -y curl wget git vim ufw fail2ban");
|
|
34
|
+
// Try installing software-properties-common separately as it might not be available on all minimal images
|
|
35
|
+
await runCommand("sudo apt install -y software-properties-common", { check: false });
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
async function setupSsh() {
|
|
@@ -56,8 +59,11 @@ async function setupSsh() {
|
|
|
56
59
|
async function configureFishShell() {
|
|
57
60
|
if (!(await commandExists("fish"))) {
|
|
58
61
|
log.info("Installing Fish shell...");
|
|
59
|
-
|
|
60
|
-
await
|
|
62
|
+
// Only try adding PPA if software-properties-common was installed successfully
|
|
63
|
+
if (await commandExists("add-apt-repository")) {
|
|
64
|
+
await runCommand("sudo apt-add-repository -y ppa:fish-shell/release-3");
|
|
65
|
+
await runCommand("sudo apt update");
|
|
66
|
+
}
|
|
61
67
|
await runCommand("sudo apt install -y fish");
|
|
62
68
|
}
|
|
63
69
|
|
|
@@ -77,8 +83,10 @@ async function configureFishShell() {
|
|
|
77
83
|
// Ensure fish config dir exists
|
|
78
84
|
fs.mkdirSync(FISH_CONFIG_DIR, { recursive: true });
|
|
79
85
|
|
|
86
|
+
// Install Fisher itself first
|
|
87
|
+
await runCommand('fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher"');
|
|
88
|
+
|
|
80
89
|
const fisherPlugins = [
|
|
81
|
-
"jorgebucaran/fisher",
|
|
82
90
|
"meaningful-ooo/sponge",
|
|
83
91
|
"jorgebucaran/nvm.fish",
|
|
84
92
|
"franciscolourenco/done",
|