@arkhera30/cli 0.1.2 → 0.1.3
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/dist/index.js +15 -1
- package/package.json +9 -7
package/dist/index.js
CHANGED
|
@@ -212,7 +212,15 @@ function toResult(result) {
|
|
|
212
212
|
}
|
|
213
213
|
async function tryCommand(command, args) {
|
|
214
214
|
try {
|
|
215
|
-
await execa(command, args, { reject: false });
|
|
215
|
+
const result = await execa(command, args, { reject: false });
|
|
216
|
+
return result.exitCode === 0;
|
|
217
|
+
} catch {
|
|
218
|
+
return false;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
async function commandExists(command) {
|
|
222
|
+
try {
|
|
223
|
+
await execa(command, ["--version"], { reject: false });
|
|
216
224
|
return true;
|
|
217
225
|
} catch {
|
|
218
226
|
return false;
|
|
@@ -279,6 +287,12 @@ async function detectRuntime(preferred) {
|
|
|
279
287
|
if (hasPodman) {
|
|
280
288
|
return createRuntime("podman");
|
|
281
289
|
}
|
|
290
|
+
const podmanInstalled = await commandExists("podman");
|
|
291
|
+
if (podmanInstalled) {
|
|
292
|
+
throw new Error(
|
|
293
|
+
"Podman is installed but `podman compose` is not working.\n\nFix options:\n 1. Ensure your Podman machine is running: podman machine start\n 2. Install podman-compose: pip3 install podman-compose\n 3. Upgrade Podman to v5+: brew upgrade podman\n"
|
|
294
|
+
);
|
|
295
|
+
}
|
|
282
296
|
throw new Error(
|
|
283
297
|
"No container runtime found.\n\nHorus requires Docker or Podman with the Compose plugin.\n\nInstall one of:\n - Docker Desktop: https://www.docker.com/products/docker-desktop/\n - Podman Desktop: https://podman-desktop.io/\n"
|
|
284
298
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkhera30/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "CLI for managing the Horus AI development stack",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,20 +9,22 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsup src/index.ts --format esm --dts",
|
|
11
11
|
"dev": "tsup src/index.ts --format esm --watch",
|
|
12
|
-
"typecheck": "tsc --noEmit"
|
|
12
|
+
"typecheck": "tsc --noEmit",
|
|
13
|
+
"test": "vitest run"
|
|
13
14
|
},
|
|
14
15
|
"dependencies": {
|
|
15
16
|
"@inquirer/prompts": "^7.0.0",
|
|
17
|
+
"chalk": "^5.0.0",
|
|
16
18
|
"commander": "^12.0.0",
|
|
17
19
|
"execa": "^8.0.0",
|
|
18
|
-
"
|
|
19
|
-
"yaml": "^2.0.0"
|
|
20
|
-
"ora": "^8.0.0"
|
|
20
|
+
"ora": "^8.0.0",
|
|
21
|
+
"yaml": "^2.0.0"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
|
-
"
|
|
24
|
+
"@types/node": "^20.0.0",
|
|
24
25
|
"tsup": "^8.0.0",
|
|
25
|
-
"
|
|
26
|
+
"typescript": "^5.4.0",
|
|
27
|
+
"vitest": "^4.0.18"
|
|
26
28
|
},
|
|
27
29
|
"engines": {
|
|
28
30
|
"node": ">=18"
|