@dinglebear/unraid
Advanced tools
+1
-1
@@ -15,3 +15,3 @@ "use strict"; | ||
| if (platform === "linux" && arch === "x64") { | ||
| return { asset: "runraid-x86_64.tar.gz", binary: "runraid" }; | ||
| return { asset: "runraid-x86_64.tar.gz", archiveBinary: "runraid-linux-x86_64", binary: "runraid" }; | ||
| } | ||
@@ -18,0 +18,0 @@ throw new Error(`Unsupported platform ${platform}/${arch}. Supported target: linux/x64.`); |
+2
-2
| { | ||
| "name": "@dinglebear/unraid", | ||
| "version": "0.2.5", | ||
| "version": "0.3.0", | ||
| "description": "Rust MCP server and CLI for Unraid GraphQL operations across NAS, Docker, VM, and storage workflows.", | ||
@@ -58,3 +58,3 @@ "license": "MIT", | ||
| "mcpName": "ai.dinglebear/unraid", | ||
| "binaryVersion": "0.2.5", | ||
| "binaryVersion": "0.3.0", | ||
| "author": { | ||
@@ -61,0 +61,0 @@ "name": "dinglebear.ai", |
+18
-2
@@ -74,2 +74,14 @@ #!/usr/bin/env node | ||
| } | ||
| function promoteExtractedBinary(target, destination, root = installRoot()) { | ||
| const extracted = path.join(root, target.archiveBinary || target.binary); | ||
| if (!fs.existsSync(extracted)) { | ||
| throw new Error(`archive did not contain expected binary ${path.basename(extracted)}`); | ||
| } | ||
| if (path.resolve(extracted) !== path.resolve(destination)) { | ||
| fs.rmSync(destination, { force: true }); | ||
| fs.renameSync(extracted, destination); | ||
| } | ||
| fs.chmodSync(destination, 0o755); | ||
| } | ||
| async function main() { | ||
@@ -88,6 +100,10 @@ if (process.env.UNRAID_RMCP_SKIP_DOWNLOAD === "1") { log("skipping binary download because UNRAID_RMCP_SKIP_DOWNLOAD=1"); return; } | ||
| extract(archive, installRoot()); | ||
| fs.chmodSync(destination, 0o755); | ||
| promoteExtractedBinary(target, destination); | ||
| log(`installed ${destination}`); | ||
| } finally { fs.rmSync(tempDir, { recursive: true, force: true }); } | ||
| } | ||
| main().catch((error) => { log(error.message); process.exitCode = 1; }); | ||
| if (require.main === module) { | ||
| main().catch((error) => { log(error.message); process.exitCode = 1; }); | ||
| } | ||
| module.exports = { checksumFromText, promoteExtractedBinary }; |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
48953
1.3%601
2.39%