sshifu-server 0.6.0

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.
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * sshifu-server CLI wrapper
5
+ * Executes the sshifu-server binary from the bin directory
6
+ */
7
+
8
+ const { spawn } = require('child_process');
9
+ const path = require('path');
10
+ const fs = require('fs');
11
+
12
+ const binName = process.platform === 'win32' ? 'sshifu-server.exe' : 'sshifu-server';
13
+ const binPath = path.join(__dirname, binName);
14
+
15
+ if (!fs.existsSync(binPath)) {
16
+ console.error(`Error: sshifu-server binary not found at ${binPath}`);
17
+ console.error('The postinstall script may have failed. Try running:');
18
+ console.error(' npm rebuild sshifu-server');
19
+ process.exit(1);
20
+ }
21
+
22
+ const child = spawn(binPath, process.argv.slice(2), {
23
+ stdio: 'inherit',
24
+ });
25
+
26
+ child.on('error', (err) => {
27
+ console.error(`Failed to start sshifu-server: ${err.message}`);
28
+ process.exit(1);
29
+ });
30
+
31
+ child.on('close', (code) => {
32
+ process.exit(code);
33
+ });
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "sshifu-server",
3
+ "version": "0.6.0",
4
+ "description": "SSH authentication server with OAuth gateway and certificate authority",
5
+ "main": "bin/sshifu-server.js",
6
+ "bin": {
7
+ "sshifu-server": "bin/sshifu-server.js"
8
+ },
9
+ "scripts": {
10
+ "postinstall": "node scripts/install.js"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/azophy/sshifu.git"
15
+ },
16
+ "keywords": [
17
+ "ssh",
18
+ "certificate",
19
+ "oauth",
20
+ "github",
21
+ "authentication",
22
+ "security",
23
+ "server"
24
+ ],
25
+ "author": "azophy",
26
+ "license": "MIT",
27
+ "bugs": {
28
+ "url": "https://github.com/azophy/sshifu/issues"
29
+ },
30
+ "homepage": "https://github.com/azophy/sshifu#readme",
31
+ "os": [
32
+ "linux",
33
+ "darwin",
34
+ "win32"
35
+ ],
36
+ "cpu": [
37
+ "x64",
38
+ "arm64",
39
+ "arm"
40
+ ],
41
+ "engines": {
42
+ "node": ">=14.0.0"
43
+ }
44
+ }