steam-manifest-tools 0.1.1 → 0.1.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.
Files changed (2) hide show
  1. package/include/lib.js +4 -6
  2. package/package.json +5 -1
package/include/lib.js CHANGED
@@ -220,14 +220,12 @@ module.exports = {
220
220
  }
221
221
  file.chunks.sort((a, b) => a.offset - b.offset);
222
222
 
223
- const chunkPromises = [];
223
+ await fsPromises.mkdir(path.dirname(path.join(installDir, file.filename)), { recursive: true });
224
+ const writeStream = await fsPromises.open(path.join(installDir, file.filename), "w");
224
225
  for (const chunk of file.chunks) {
225
- chunkPromises.push(getChunk(manifest.depot_id, depotKey, chunk.sha));
226
+ await writeStream.write(await getChunk(manifest.depot_id, depotKey, chunk.sha));
226
227
  }
227
- const chunks = await Promise.all(chunkPromises);
228
- const data = Buffer.concat(chunks);
229
- await fsPromises.mkdir(path.dirname(path.join(installDir, file.filename)), { recursive: true });
230
- await fsPromises.writeFile(path.join(installDir, file.filename), data);
228
+ await writeStream.close();
231
229
  if (onFileWritten) {
232
230
  onFileWritten(file.filename, exists);
233
231
  }
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "steam-manifest-tools",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "main": "include/lib.js",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/Sainan/steam-manifest-tools.git"
8
+ },
5
9
  "dependencies": {
6
10
  "@doctormckay/steam-crypto": "^1.2.0",
7
11
  "adm-zip": "^0.5.16",