steam-manifest-tools 0.1.8 → 0.1.9
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.
- package/lib.js +3 -3
- package/mango.js +8 -0
- package/package.json +1 -1
package/lib.js
CHANGED
|
@@ -57,7 +57,7 @@ const getAvailableWorker = () => {
|
|
|
57
57
|
w.reject(x);
|
|
58
58
|
});
|
|
59
59
|
w.inst.on("exit", (code) => {
|
|
60
|
-
console.log(`Worker exited with code ${code}`);
|
|
60
|
+
//console.log(`Worker exited with code ${code}`);
|
|
61
61
|
workers.splice(workers.indexOf(w), 1);
|
|
62
62
|
});
|
|
63
63
|
workers.push(w);
|
|
@@ -450,8 +450,7 @@ module.exports = {
|
|
|
450
450
|
verifyChunks: async (depotId, depotKey, onDeletedFile) => {
|
|
451
451
|
const files = await fsPromises.readdir(`depot/${depotId}/chunk`);
|
|
452
452
|
let promises = [];
|
|
453
|
-
for (const
|
|
454
|
-
const hash = file.substr(file.length - 40);
|
|
453
|
+
for (const hash of files) {
|
|
455
454
|
if (promises.length > 100) {
|
|
456
455
|
await Promise.all(promises);
|
|
457
456
|
promises = [];
|
|
@@ -464,6 +463,7 @@ module.exports = {
|
|
|
464
463
|
catch (e) {
|
|
465
464
|
//console.log(e);
|
|
466
465
|
}
|
|
466
|
+
const file = path.resolve(`depot/${depotId}/chunk`, hash);
|
|
467
467
|
await fsPromises.unlink(file);
|
|
468
468
|
if (onDeletedFile) {
|
|
469
469
|
onDeletedFile(file, hash);
|
package/mango.js
CHANGED
|
@@ -34,6 +34,7 @@ switch (tool) {
|
|
|
34
34
|
const { fetchManifest } = require("./lib.js");
|
|
35
35
|
|
|
36
36
|
(async () => {
|
|
37
|
+
console.log(`Fetching manifest...`);
|
|
37
38
|
await fetchManifest(depotId, manifestId);
|
|
38
39
|
console.log(`Saved in manifests/${depotId}_${manifestId}.manifest`);
|
|
39
40
|
})();
|
|
@@ -53,6 +54,7 @@ switch (tool) {
|
|
|
53
54
|
const hosts = args["--lancache"] ? ["http://lancache.steamcontent.com"] : DEFAULT_HOSTS;
|
|
54
55
|
|
|
55
56
|
(async () => {
|
|
57
|
+
console.log(`Fetching manifest...`);
|
|
56
58
|
const manifest = ContentManifest.parse(await fetchManifest(depotId, manifestId));
|
|
57
59
|
await downloadChunks(
|
|
58
60
|
manifest,
|
|
@@ -77,6 +79,7 @@ switch (tool) {
|
|
|
77
79
|
const { fetchManifest, fetchDepotKey, populateChunks } = require("./lib.js");
|
|
78
80
|
|
|
79
81
|
(async () => {
|
|
82
|
+
console.log(`Fetching manifest...`);
|
|
80
83
|
const manifest = ContentManifest.parse(await fetchManifest(depotId, manifestId));
|
|
81
84
|
console.log(`Fetching depot key...`);
|
|
82
85
|
let depotKey = await fetchDepotKey(manifest.depot_id);
|
|
@@ -189,6 +192,7 @@ switch (tool) {
|
|
|
189
192
|
const { fetchManifest, fetchDepotKey, install } = require("./lib.js");
|
|
190
193
|
|
|
191
194
|
(async () => {
|
|
195
|
+
console.log(`Fetching manifest...`);
|
|
192
196
|
const manifest = ContentManifest.parse(await fetchManifest(depotId, manifestId));
|
|
193
197
|
console.log(`Fetching depot key...`);
|
|
194
198
|
let depotKey = await fetchDepotKey(manifest.depot_id);
|
|
@@ -214,6 +218,7 @@ switch (tool) {
|
|
|
214
218
|
const hosts = args["--lancache"] ? ["http://lancache.steamcontent.com"] : DEFAULT_HOSTS;
|
|
215
219
|
|
|
216
220
|
(async () => {
|
|
221
|
+
console.log(`Fetching manifest...`);
|
|
217
222
|
const manifest = ContentManifest.parse(await fetchManifest(depotId, manifestId));
|
|
218
223
|
|
|
219
224
|
console.log(`Fetching depot key...`);
|
|
@@ -259,6 +264,7 @@ switch (tool) {
|
|
|
259
264
|
const { fetchManifest, fetchDepotKey } = require("./lib.js");
|
|
260
265
|
|
|
261
266
|
(async () => {
|
|
267
|
+
console.log(`Fetching manifest...`);
|
|
262
268
|
const manifest = ContentManifest.parse(await fetchManifest(depotId, manifestId));
|
|
263
269
|
if (manifest.filenames_encrypted && !args["--no-decrypt"]) {
|
|
264
270
|
console.log("Fetching depot key to decrypt filenames...");
|
|
@@ -286,6 +292,7 @@ switch (tool) {
|
|
|
286
292
|
const { fetchManifest, fetchDepotKey } = require("./lib.js");
|
|
287
293
|
|
|
288
294
|
(async () => {
|
|
295
|
+
console.log(`Fetching manifest...`);
|
|
289
296
|
const manifest = ContentManifest.parse(await fetchManifest(depotId, manifestId));
|
|
290
297
|
if (manifest.filenames_encrypted) {
|
|
291
298
|
console.log("Manifest has encrypted filenames. Fetching depot key...");
|
|
@@ -331,6 +338,7 @@ switch (tool) {
|
|
|
331
338
|
|
|
332
339
|
(async () => {
|
|
333
340
|
const { fetchManifest } = require("./lib.js");
|
|
341
|
+
console.log(`Fetching manifest...`);
|
|
334
342
|
const manifest = ContentManifest.parse(await fetchManifest(depotId, manifestId));
|
|
335
343
|
const file = manifest.files.find(x => x.sha_content == fileHash);
|
|
336
344
|
if (!file) {
|