@dealdeploy/skl 0.1.4 → 0.1.6

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.
Files changed (2) hide show
  1. package/index.ts +23 -17
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -1,22 +1,5 @@
1
1
  #!/usr/bin/env bun
2
2
 
3
- process.on("uncaughtException", (err) => {
4
- console.error(`skl: ${err.message}`);
5
- process.exit(1);
6
- });
7
-
8
- process.on("unhandledRejection", (err) => {
9
- console.error(`skl: ${err instanceof Error ? err.message : err}`);
10
- process.exit(1);
11
- });
12
-
13
- // ── Subcommand routing ───────────────────────────────────────────────
14
- const [subcommand] = process.argv.slice(2);
15
- if (subcommand === "add") {
16
- await import("./add.ts");
17
- process.exit(0);
18
- }
19
-
20
3
  import {
21
4
  createCliRenderer,
22
5
  BoxRenderable,
@@ -38,6 +21,23 @@ import {
38
21
  import { join, resolve } from "path";
39
22
  import { homedir } from "os";
40
23
 
24
+ const VERSION = "0.1.5";
25
+
26
+ // ── Flags ────────────────────────────────────────────────────────────
27
+ const arg = process.argv[2];
28
+ if (arg === "-v" || arg === "--version") {
29
+ console.log(`skl ${VERSION}`);
30
+ process.exit(0);
31
+ }
32
+
33
+ // ── Subcommand routing ───────────────────────────────────────────────
34
+ if (arg === "add") {
35
+ await import("./add.ts");
36
+ process.exit(0);
37
+ }
38
+
39
+ try {
40
+
41
41
  // ── Constants & helpers ─────────────────────────────────────────────
42
42
 
43
43
  const LIBRARY = join(homedir(), "dotfiles/skills");
@@ -638,3 +638,9 @@ renderer.keyInput.on("keypress", (key: KeyEvent) => {
638
638
  if (ci !== null) updateRow(ci);
639
639
  ensureVisible();
640
640
  });
641
+
642
+ } catch (err: any) {
643
+ console.error(`skl: fatal: ${err?.message ?? err}`);
644
+ if (err?.stack) console.error(err.stack);
645
+ process.exit(1);
646
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dealdeploy/skl",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "TUI skill manager for Claude Code agents",
5
5
  "module": "index.ts",
6
6
  "bin": {