sshifu-server 0.7.1 → 0.7.2

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sshifu-server",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "SSH authentication server with OAuth gateway and certificate authority",
5
5
  "main": "bin/sshifu-server.js",
6
6
  "bin": {
@@ -95,14 +95,28 @@ async function main() {
95
95
  const archiveBinName = `${PACKAGE_NAME}-${platform}${isWindows ? '.exe' : ''}`;
96
96
  const extractedPath = path.join(binDir, archiveBinName);
97
97
  if (isWindows) {
98
- execSync(`powershell -Command "Expand-Archive -Path '${archivePath}' -DestinationPath '${binDir}' -Force"`, { stdio: 'ignore' });
98
+ execSync(`powershell -Command "Expand-Archive -Path '${archivePath.replace(/'/g, "''")}' -DestinationPath '${binDir.replace(/'/g, "''")}' -Force"`, { stdio: 'ignore' });
99
99
  } else {
100
100
  execSync(`tar -xzf "${archivePath}" -C "${binDir}"`, { stdio: 'ignore' });
101
101
  }
102
102
 
103
103
  // Rename to expected name if different
104
- if (archiveBinName !== binName && fs.existsSync(extractedPath)) {
105
- fs.renameSync(extractedPath, binPath);
104
+ console.log(`[sshifu-server] Looking for binary at: ${extractedPath}`);
105
+ console.log(`[sshifu-server] Target path: ${binPath}`);
106
+ if (archiveBinName !== binName) {
107
+ if (fs.existsSync(extractedPath)) {
108
+ console.log(`[sshifu-server] Renaming ${archiveBinName} to ${binName}`);
109
+ fs.renameSync(extractedPath, binPath);
110
+ } else {
111
+ // Try to find the extracted file (in case of path issues)
112
+ const files = fs.readdirSync(binDir);
113
+ console.log(`[sshifu-server] Files in binDir: ${files.join(', ')}`);
114
+ const exeFile = files.find(f => f.endsWith('.exe') && f.startsWith(PACKAGE_NAME));
115
+ if (exeFile) {
116
+ console.log(`[sshifu-server] Found ${exeFile}, renaming to ${binName}`);
117
+ fs.renameSync(path.join(binDir, exeFile), binPath);
118
+ }
119
+ }
106
120
  }
107
121
 
108
122
  // Make executable on Unix
Binary file