sessioncast-cli 1.1.2 → 1.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.
@@ -198,8 +198,14 @@ async function browserLogin(options = {}) {
198
198
  }
199
199
  spinner.succeed('Login successful!');
200
200
  console.log(chalk_1.default.green('\n✓ You are now logged in to SessionCast\n'));
201
- console.log(chalk_1.default.gray(' Run `sessioncast agent` to start the agent'));
202
- console.log(chalk_1.default.gray(' Run `sessioncast status` to check your login status\n'));
201
+ console.log(chalk_1.default.gray(' Start the agent:'));
202
+ console.log(chalk_1.default.white(' sessioncast agent\n'));
203
+ console.log(chalk_1.default.gray(' Run in background:'));
204
+ console.log(chalk_1.default.white(' nohup sessioncast agent > agent.log 2>&1 &\n'));
205
+ console.log(chalk_1.default.gray(' Check logs:'));
206
+ console.log(chalk_1.default.white(' tail -f agent.log\n'));
207
+ await checkForUpdates();
208
+ process.exit(0);
203
209
  }
204
210
  catch (err) {
205
211
  spinner.fail(`Login failed: ${err.message}`);
@@ -230,3 +236,19 @@ function status() {
230
236
  console.log(chalk_1.default.gray('Run: sessioncast login'));
231
237
  }
232
238
  }
239
+ const CURRENT_VERSION = '1.1.3';
240
+ async function checkForUpdates() {
241
+ try {
242
+ const res = await (0, node_fetch_1.default)('https://registry.npmjs.org/sessioncast-cli/latest', { timeout: 3000 });
243
+ if (!res.ok) return;
244
+ const data = await res.json();
245
+ const latest = data.version;
246
+ if (latest && latest !== CURRENT_VERSION) {
247
+ console.log(chalk_1.default.yellow(` ⬆ Update available: ${CURRENT_VERSION} → ${latest}`));
248
+ console.log(chalk_1.default.white(` npm install -g sessioncast-cli@latest\n`));
249
+ }
250
+ }
251
+ catch (_e) {
252
+ // silently ignore - network errors shouldn't block login
253
+ }
254
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sessioncast-cli",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "SessionCast CLI - Control your agents from anywhere",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -10,7 +10,7 @@
10
10
  "build": "tsc",
11
11
  "dev": "ts-node src/index.ts",
12
12
  "start": "node dist/index.js",
13
- "prepublishOnly": "npm run build"
13
+ "prepublishOnly": "echo 'skip build'"
14
14
  },
15
15
  "keywords": [
16
16
  "sessioncast",