@dappnode/dappnodesdk
Version:
dappnodesdk is a tool to make the creation of new dappnode packages as simple as possible. It helps to initialize and publish in ethereum blockchain
19 lines • 588 B
JavaScript
import os from "os";
/**
* Returns the architecture of the host machine doing the build
*/
export function getOsArchitecture() {
// Returns the operating system CPU architecture for which the Node.js binary was compiled.
const arch = os.arch();
// TODO: DAppNode Packages are run in Linux-based systems. This solves the edge case when building in ARM
if (arch === "arm64") {
return "linux/arm64";
}
else if (arch === "x64") {
return "linux/amd64";
}
else {
return "unsupported";
}
}
//# sourceMappingURL=getArchitecture.js.map