Skip to content

Commit

Permalink
fix: run npm run build
Browse files Browse the repository at this point in the history
  • Loading branch information
frol committed Sep 3, 2024
1 parent 96f4752 commit 0390ca6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions npm/dist/getBinary.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const os = require("os");
function getPlatform() {
const type = os.type();
const arch = os.arch();
if ((type === "Linux" || type === "Darwin") && arch === "x64") {
// Darwind x86_64 is not supported for quite some time :(
if (type === "Linux" && arch === "x64") {
return [type, "x86_64"];
}
else if (type === "Darwin" && arch === "arm64") {
Expand All @@ -17,7 +18,7 @@ function getPlatform() {
}
function AWSUrl() {
const [platform, arch] = getPlatform();
return `https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore/${platform}-${arch}/1.40.0/7dd0b5993577f592be15eb102e5a3da37be66271/near-sandbox.tar.gz`;
return `https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore/${platform}-${arch}/2.1.1/near-sandbox.tar.gz`;
}
exports.AWSUrl = AWSUrl;
function getBinary(name = "near-sandbox") {
Expand Down
6 changes: 5 additions & 1 deletion npm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ class Binary {
get binPath() {
return (0, path_1.join)(this.installDir, this.name);
}
download(url) {
async download(url) {
// Ensure the install directory exists
if (!await (0, utils_1.fileExists)(this.installDir)) {
await fs.mkdir(this.installDir, { recursive: true });
}
return pipeline(got_1.default.stream(url), new stream.PassThrough(), tar.x({ strip: 1, C: this.installDir }));
}
async install() {
Expand Down

0 comments on commit 0390ca6

Please sign in to comment.