nterminal 1.2.8 → 1.2.9

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 CHANGED
@@ -1,10 +1,10 @@
1
1
  # NTerminal
2
2
 
3
- <img src="https://cdn.jsdelivr.net/npm/nterminal@1.2.4/public/icons/app-icon-1024.png?v=readme-1.2.8" alt="NTerminal app icon" width="96" height="96">
3
+ <img src="https://cdn.jsdelivr.net/npm/nterminal@1.2.4/public/icons/app-icon-1024.png?v=readme-1.2.9" alt="NTerminal app icon" width="96" height="96">
4
4
 
5
5
  NTerminal turns your own machines into one secure browser workspace for real shells, Codex, Claude, files, and long-running terminal sessions.
6
6
 
7
- <img src="https://cdn.jsdelivr.net/npm/nterminal@1.2.4/assets/screenshot/scr.png?v=readme-1.2.8" alt="NTerminal workspace with split terminal panes" width="100%">
7
+ <img src="https://cdn.jsdelivr.net/npm/nterminal@1.2.4/assets/screenshot/scr.png?v=readme-1.2.9" alt="NTerminal workspace with split terminal panes" width="100%">
8
8
 
9
9
  NTerminal is a single-owner web terminal for machines you control. It is not a hosted shell product, not a SaaS app, and not a multi-user IDE.
10
10
 
package/bin/nterminal.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { existsSync } from 'node:fs';
2
+ import { existsSync, readFileSync } from 'node:fs';
3
3
  import os from 'node:os';
4
4
  import path from 'node:path';
5
5
  import { spawnSync } from 'node:child_process';
@@ -71,10 +71,27 @@ function runCtl(runArgs) {
71
71
  run('bash', [path.join(appDir, 'scripts', 'nterminalctl'), ...runArgs]);
72
72
  }
73
73
 
74
+ function packageVersion() {
75
+ try {
76
+ const packageJson = JSON.parse(readFileSync(path.join(appDir, 'package.json'), 'utf8'));
77
+ if (typeof packageJson.version === 'string' && packageJson.version) {
78
+ return packageJson.version;
79
+ }
80
+ } catch {
81
+ // Fall through to a stable string so version checks never invoke nterminalctl.
82
+ }
83
+ return 'unknown';
84
+ }
85
+
86
+ function printVersion() {
87
+ console.log(packageVersion());
88
+ }
89
+
74
90
  function printHelp() {
75
91
  console.log(`Usage: nterminal <command>
76
92
 
77
93
  Commands:
94
+ version Print the installed NTerminal version.
78
95
  onboarding Run interactive main/secondary onboarding.
79
96
  generate-secrets Print a new NTERMINAL_SESSION_SECRET.
80
97
  status Show process status.
@@ -104,6 +121,11 @@ switch (command) {
104
121
  case 'ctl':
105
122
  runCtl(args);
106
123
  break;
124
+ case 'version':
125
+ case '-v':
126
+ case '--version':
127
+ printVersion();
128
+ break;
107
129
  case 'help':
108
130
  case '-h':
109
131
  case '--help':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nterminal",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "license": "GPL-3.0-only",
5
5
  "type": "module",
6
6
  "packageManager": "npm@10.9.7",