Added logging for unzip

This commit is contained in:
Tornado Contrib 2024-10-04 17:11:28 +00:00
parent 42db44ca3b
commit 58b3110125
Signed by: tornadocontrib
GPG Key ID: 60B4DF1A076C64B1
6 changed files with 8 additions and 3 deletions

1
dist/index.js vendored

@ -3844,6 +3844,7 @@ function downloadZip(_0) {
} }
} }
const { [zipName]: content } = yield unzipAsync(data); const { [zipName]: content } = yield unzipAsync(data);
console.log(`Downloaded ${url}${zipDigest ? ` ( Digest: ${zipDigest} )` : ""}`);
if (parseJson) { if (parseJson) {
return JSON.parse(new TextDecoder().decode(content)); return JSON.parse(new TextDecoder().decode(content));
} }

1
dist/index.mjs vendored

@ -3823,6 +3823,7 @@ function downloadZip(_0) {
} }
} }
const { [zipName]: content } = yield unzipAsync(data); const { [zipName]: content } = yield unzipAsync(data);
console.log(`Downloaded ${url}${zipDigest ? ` ( Digest: ${zipDigest} )` : ""}`);
if (parseJson) { if (parseJson) {
return JSON.parse(new TextDecoder().decode(content)); return JSON.parse(new TextDecoder().decode(content));
} }

1
dist/tornado.umd.js vendored

@ -78742,6 +78742,7 @@ function downloadZip(_0) {
} }
} }
const { [zipName]: content } = yield unzipAsync(data); const { [zipName]: content } = yield unzipAsync(data);
console.log(`Downloaded ${url}${zipDigest ? ` ( Digest: ${zipDigest} )` : ""}`);
if (parseJson) { if (parseJson) {
return JSON.parse(new TextDecoder().decode(content)); return JSON.parse(new TextDecoder().decode(content));
} }

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
import { openDB, deleteDB, OpenDBCallbacks, IDBPDatabase } from 'idb'; import { openDB, deleteDB, OpenDBCallbacks, IDBPDatabase } from 'idb';
import { getConfig, getNetworkConfig, NetId, NetIdType } from './networkConfig'; import { getConfig, NetId, NetIdType } from './networkConfig';
export const INDEX_DB_ERROR = 'A mutation operation was attempted on a database that did not allow mutations.'; export const INDEX_DB_ERROR = 'A mutation operation was attempted on a database that did not allow mutations.';

@ -58,6 +58,8 @@ export async function downloadZip<T>({
const { [zipName]: content } = await unzipAsync(data); const { [zipName]: content } = await unzipAsync(data);
console.log(`Downloaded ${url}${zipDigest ? ` ( Digest: ${zipDigest} )` : ''}`);
if (parseJson) { if (parseJson) {
return JSON.parse(new TextDecoder().decode(content)) as T; return JSON.parse(new TextDecoder().decode(content)) as T;
} }