@hasna/terminal 0.8.1 → 1.0.1

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/cli.js CHANGED
@@ -4,7 +4,7 @@ import { render } from "ink";
4
4
  const args = process.argv.slice(2);
5
5
  // ── Help / Version ───────────────────────────────────────────────────────────
6
6
  if (args[0] === "--help" || args[0] === "-h" || args[0] === "help") {
7
- console.log(`open-terminal v0.6.1 — Smart terminal for AI agents and humans
7
+ console.log(`open-terminal v1.0.0 — Smart terminal for AI agents and humans
8
8
 
9
9
  USAGE:
10
10
  terminal Launch interactive NL terminal (TUI)
@@ -48,7 +48,15 @@ ENVIRONMENT:
48
48
  process.exit(0);
49
49
  }
50
50
  if (args[0] === "--version" || args[0] === "-v") {
51
- console.log("0.6.1");
51
+ const { readFileSync } = await import("fs");
52
+ const { join, dirname } = await import("path");
53
+ try {
54
+ const pkg = JSON.parse(readFileSync(join(dirname(new URL(import.meta.url).pathname), "..", "package.json"), "utf8"));
55
+ console.log(pkg.version);
56
+ }
57
+ catch {
58
+ console.log("1.0.0");
59
+ }
52
60
  process.exit(0);
53
61
  }
54
62
  // ── Exec command — smart execution for agents ────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/terminal",
3
- "version": "0.8.1",
3
+ "version": "1.0.1",
4
4
  "description": "Smart terminal wrapper for AI agents and humans — structured output, token compression, MCP server, natural language",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.tsx CHANGED
@@ -7,7 +7,7 @@ const args = process.argv.slice(2);
7
7
  // ── Help / Version ───────────────────────────────────────────────────────────
8
8
 
9
9
  if (args[0] === "--help" || args[0] === "-h" || args[0] === "help") {
10
- console.log(`open-terminal v0.6.1 — Smart terminal for AI agents and humans
10
+ console.log(`open-terminal v1.0.0 — Smart terminal for AI agents and humans
11
11
 
12
12
  USAGE:
13
13
  terminal Launch interactive NL terminal (TUI)
@@ -52,7 +52,12 @@ ENVIRONMENT:
52
52
  }
53
53
 
54
54
  if (args[0] === "--version" || args[0] === "-v") {
55
- console.log("0.6.1");
55
+ const { readFileSync } = await import("fs");
56
+ const { join, dirname } = await import("path");
57
+ try {
58
+ const pkg = JSON.parse(readFileSync(join(dirname(new URL(import.meta.url).pathname), "..", "package.json"), "utf8"));
59
+ console.log(pkg.version);
60
+ } catch { console.log("1.0.0"); }
56
61
  process.exit(0);
57
62
  }
58
63