update version, typos, shit
This commit is contained in:
parent
78e7a15995
commit
2235dcca16
3 changed files with 10 additions and 4 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
|||
build
|
||||
node_modules
|
||||
data.json
|
||||
modpack-data.json
|
||||
mods
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "modpack-client",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"build:linux": "yarn nexe -i src/index.js -o build/modpack-client -t linux-x64-20.11.1 --remote https://files.madhouselabs.net/nexe",
|
||||
|
|
|
@ -67,9 +67,9 @@ async function main() {
|
|||
const { name, modId, fileId } = additions[i];
|
||||
|
||||
const response = await server.getMod(config.host, modId, fileId);
|
||||
const filename = response.url.split("/")[response.url.split("/").length - 1];
|
||||
const filename = "mods/" + response.url.split("/")[response.url.split("/").length - 1];
|
||||
|
||||
await writeFile("mods/" + filename, await response.blob());
|
||||
await writeFile(filename, Buffer.from(await response.arrayBuffer()));
|
||||
|
||||
let data = storage.read();
|
||||
data.mods.push({ name, path: filename });
|
||||
|
@ -90,6 +90,10 @@ async function main() {
|
|||
logger.success("Removed:", name);
|
||||
}
|
||||
|
||||
let data = storage.read();
|
||||
data.version = remoteVersion;
|
||||
storage.write(data);
|
||||
|
||||
logger.success("Done!");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue