shellshare 2.0.5

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 ADDED
@@ -0,0 +1,20 @@
1
+ # shellshare
2
+
3
+ Live terminal broadcasting. Share your terminal session via a web link with a single command.
4
+
5
+ ```bash
6
+ npx shellshare
7
+ ```
8
+
9
+ This prints a link like `https://shellshare.net/r/EPbZJ7VZNakS9vwUlS`. Everything you type is broadcast live to anyone watching that page, read-only, until you exit the shell (Ctrl+D).
10
+
11
+ Or install it globally:
12
+
13
+ ```bash
14
+ npm install -g shellshare
15
+ shellshare
16
+ ```
17
+
18
+ This package is a thin launcher around the prebuilt `shellshare` binary for your platform (Linux x64, macOS x64/arm64, Windows x64), fetched automatically through npm's `optionalDependencies` — no postinstall scripts.
19
+
20
+ Docs, FAQ and other install methods: [shellshare.net](https://shellshare.net) · Source: [github.com/vitorbaptista/shellshare](https://github.com/vitorbaptista/shellshare)
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+ // Thin launcher: resolves the platform-specific package (installed via
3
+ // optionalDependencies) and execs the real shellshare binary with the
4
+ // terminal's stdio inherited, so raw mode, Ctrl+C and resize pass through.
5
+ 'use strict';
6
+
7
+ const { spawnSync } = require('child_process');
8
+
9
+ const PLATFORMS = {
10
+ 'linux x64': 'shellshare-linux-x64',
11
+ 'darwin x64': 'shellshare-darwin-x64',
12
+ 'darwin arm64': 'shellshare-darwin-arm64',
13
+ // "windows" not "win32": npm's spam filter rejects new win32-* names
14
+ 'win32 x64': 'shellshare-windows-x64',
15
+ };
16
+
17
+ const key = process.platform + ' ' + process.arch;
18
+ const pkg = PLATFORMS[key];
19
+ if (!pkg) {
20
+ console.error('shellshare: unsupported platform: ' + key);
21
+ console.error('Supported platforms: ' + Object.keys(PLATFORMS).join(', '));
22
+ console.error('Prebuilt binaries for other setups: https://github.com/vitorbaptista/shellshare/releases');
23
+ process.exit(1);
24
+ }
25
+
26
+ const exe = process.platform === 'win32' ? 'shellshare.exe' : 'shellshare';
27
+ let binPath;
28
+ try {
29
+ binPath = require.resolve(pkg + '/bin/' + exe);
30
+ } catch (err) {
31
+ console.error('shellshare: the platform package "' + pkg + '" is not installed.');
32
+ console.error('This usually means optional dependencies were skipped. Reinstall with:');
33
+ console.error(' npm install -g shellshare --force --include=optional');
34
+ process.exit(1);
35
+ }
36
+
37
+ const result = spawnSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
38
+ if (result.error) {
39
+ console.error('shellshare: failed to start ' + binPath + ': ' + result.error.message);
40
+ process.exit(1);
41
+ }
42
+ if (result.signal) {
43
+ // Re-raise so the parent sees the same termination signal.
44
+ process.kill(process.pid, result.signal);
45
+ } else {
46
+ process.exit(result.status === null ? 1 : result.status);
47
+ }
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "shellshare",
3
+ "version": "2.0.5",
4
+ "description": "Live terminal broadcasting - share your terminal via a web link",
5
+ "bin": {
6
+ "shellshare": "bin/shellshare.js"
7
+ },
8
+ "files": [
9
+ "bin/shellshare.js"
10
+ ],
11
+ "license": "Apache-2.0",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/vitorbaptista/shellshare.git"
15
+ },
16
+ "homepage": "https://shellshare.net",
17
+ "keywords": [
18
+ "terminal",
19
+ "broadcast",
20
+ "shell",
21
+ "live",
22
+ "tty"
23
+ ],
24
+ "engines": {
25
+ "node": ">=14"
26
+ },
27
+ "optionalDependencies": {
28
+ "shellshare-linux-x64": "2.0.5",
29
+ "shellshare-darwin-x64": "2.0.5",
30
+ "shellshare-darwin-arm64": "2.0.5",
31
+ "shellshare-windows-x64": "2.0.5"
32
+ }
33
+ }