theamify-cli 2.2.5 → 2.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 +9 -1
- package/package.json +1 -1
- package/src/cli.js +12 -7
- package/src/commands/manage.js +29 -0
- package/vendor/theamify +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ theamify info <name> # details + terminal preview
|
|
|
22
22
|
theamify get <name> # download & cache a theme
|
|
23
23
|
theamify get --all # download every theme up front
|
|
24
24
|
sudo theamify use <name> # apply to GRUB + rebuild
|
|
25
|
-
theamify update # update
|
|
25
|
+
theamify update # update from npm, then update tools + re-download themes
|
|
26
26
|
theamify status # GRUB & dependency status
|
|
27
27
|
theamify doctor # diagnose install, GRUB, tools & dependencies
|
|
28
28
|
theamify upgrade # check for & install the latest npm version
|
|
@@ -40,6 +40,14 @@ theamify help # show all commands
|
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
+
## ✨ What's New (v2.3.0 — update from npm & Linux-only)
|
|
44
|
+
|
|
45
|
+
| Feature | Details |
|
|
46
|
+
|---|---|
|
|
47
|
+
| 🔄 **`theamify update` pulls from npm** | `theamify update` first checks the registry and offers to `npm install -g theamify-cli@latest`, *then* refreshes companion tools (chafa, grub-customizer) and re-downloads themes — matching `gitswitch update` |
|
|
48
|
+
| 🐧 **Linux-only by design** | theamify configures **GRUB**, which only exists on Linux. On other OSes the CLI refuses immediately with a clear message instead of failing halfway |
|
|
49
|
+
| 🧭 **Cross-platform CI** | CI matrices + documentation updated across all three CLI packages |
|
|
50
|
+
|
|
43
51
|
## ✨ What's New (v2.2.5 — doc refresh & command parity)
|
|
44
52
|
|
|
45
53
|
| Feature | Details |
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -2,8 +2,7 @@ import { defineCommand, runMain } from 'citty';
|
|
|
2
2
|
import pc from 'picocolors';
|
|
3
3
|
import { createRequire } from 'node:module';
|
|
4
4
|
import { runThemeBrowser } from './wizard/browse.js';
|
|
5
|
-
import { runDoctor, runStatus, runUninstallWizard, runSelfUpgrade, runRepair } from './commands/manage.js';
|
|
6
|
-
import { updateManagedTools } from './lib/tools.js';
|
|
5
|
+
import { runDoctor, runStatus, runUninstallWizard, runSelfUpgrade, runRepair, runFullUpdate } from './commands/manage.js';
|
|
7
6
|
import { runEngine } from './core/engine.js';
|
|
8
7
|
|
|
9
8
|
const require = createRequire(import.meta.url);
|
|
@@ -35,7 +34,7 @@ ${pc.bold('Usage:')}
|
|
|
35
34
|
theamify get <name> Download & cache a theme
|
|
36
35
|
theamify get --all Download every theme
|
|
37
36
|
theamify use <name> Apply theme to GRUB ${pc.dim('[sudo]')}
|
|
38
|
-
theamify update [<name>]
|
|
37
|
+
theamify update [<name>] Update from npm, then tools + re-download themes
|
|
39
38
|
theamify remove <name> Clear local cache (keeps registry entry)
|
|
40
39
|
theamify add <github-url> Add a theme to the registry
|
|
41
40
|
theamify del <name> Remove a theme from the registry
|
|
@@ -73,6 +72,14 @@ const main = defineCommand({
|
|
|
73
72
|
async run({ args }) {
|
|
74
73
|
const [cmd, ...rest] = args._;
|
|
75
74
|
|
|
75
|
+
// theamify configures GRUB, which only exists on Linux. Refuse other OSes
|
|
76
|
+
// up-front with a clear message instead of failing halfway through.
|
|
77
|
+
if (process.platform !== 'linux') {
|
|
78
|
+
console.error(pc.red('theamify is Linux-only: it manages GRUB boot themes, and GRUB does not exist on this OS.'));
|
|
79
|
+
process.exitCode = 1;
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
|
|
76
83
|
// citty parses `-V` as a boolean flag into args.V (never reached via args._);
|
|
77
84
|
// treat it as a version request like the other aliases.
|
|
78
85
|
if (args.V) {
|
|
@@ -114,10 +121,8 @@ const main = defineCommand({
|
|
|
114
121
|
case 'uninstall':
|
|
115
122
|
return runUninstallWizard();
|
|
116
123
|
case 'update':
|
|
117
|
-
//
|
|
118
|
-
|
|
119
|
-
await updateManagedTools();
|
|
120
|
-
return forwardEngine(['update', ...rest]);
|
|
124
|
+
// Full update: pull the latest CLI from npm, then update tools + themes.
|
|
125
|
+
return runFullUpdate(rest);
|
|
121
126
|
case 'use':
|
|
122
127
|
case 'apply':
|
|
123
128
|
case 'set':
|
package/src/commands/manage.js
CHANGED
|
@@ -85,6 +85,7 @@ export async function runStatus() {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/** `theamify upgrade` — self-update the npm CLI if a newer version is published. */
|
|
88
|
+
/** `theamify upgrade` — check for & install the latest npm version. */
|
|
88
89
|
export async function runSelfUpgrade() {
|
|
89
90
|
const { outdated, latest, current } = await checkForUpdate();
|
|
90
91
|
if (!outdated) {
|
|
@@ -95,6 +96,34 @@ export async function runSelfUpgrade() {
|
|
|
95
96
|
await promptSelfUpdate();
|
|
96
97
|
}
|
|
97
98
|
|
|
99
|
+
/**
|
|
100
|
+
* `theamify update` — bring EVERYTHING up to date, exactly like gitswitch's
|
|
101
|
+
* `update`:
|
|
102
|
+
* 1. Pull the latest npm CLI from the registry (prompts, defaults to yes).
|
|
103
|
+
* 2. Then refresh companion tools (chafa, grub-customizer).
|
|
104
|
+
* 3. Then re-download all cached themes.
|
|
105
|
+
* @param {string[]} rest forwarded theme args (e.g. a single theme name)
|
|
106
|
+
*/
|
|
107
|
+
export async function runFullUpdate(rest = []) {
|
|
108
|
+
const { outdated, latest, current } = await checkForUpdate();
|
|
109
|
+
if (outdated) {
|
|
110
|
+
console.log(pc.cyan(`A newer version (v${latest}) is published — you have v${current}.`));
|
|
111
|
+
const updated = await promptSelfUpdate();
|
|
112
|
+
if (updated) {
|
|
113
|
+
console.log(pc.yellow('theamify CLI updated. Re-run `theamify update` (or just `theamify`) to continue updating tools & themes.'));
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
console.log(pc.dim('Continuing — keeping current CLI version.'));
|
|
117
|
+
} else {
|
|
118
|
+
console.log(pc.green(`theamify CLI is on the latest version (v${current}).`));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const { updateManagedTools } = await import('../lib/tools.js');
|
|
122
|
+
await updateManagedTools();
|
|
123
|
+
const { runEngine } = await import('../core/engine.js');
|
|
124
|
+
await runEngine(['update', ...rest]);
|
|
125
|
+
}
|
|
126
|
+
|
|
98
127
|
/** `theamify repair` — fix a broken install by re-provisioning the engine/runtime. */
|
|
99
128
|
export async function runRepair() {
|
|
100
129
|
console.log(pc.bold('\n🔧 theamify Repair\n'));
|
package/vendor/theamify
CHANGED
|
@@ -10,7 +10,7 @@ set -euo pipefail
|
|
|
10
10
|
# -----------------------------------------------------------------------------
|
|
11
11
|
# VERSION & TOOL NAME
|
|
12
12
|
# -----------------------------------------------------------------------------
|
|
13
|
-
readonly VERSION="2.
|
|
13
|
+
readonly VERSION="2.3.0"
|
|
14
14
|
readonly TOOL="theamify"
|
|
15
15
|
|
|
16
16
|
# -----------------------------------------------------------------------------
|