sliftutils 1.7.1 → 1.7.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sliftutils",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.3",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"preact-old-types": "^10.28.1",
|
|
58
58
|
"shell-quote": "^1.8.3",
|
|
59
59
|
"socket-function": "^1.2.4",
|
|
60
|
-
"typenode": "^6.6.
|
|
60
|
+
"typenode": "^6.6.1",
|
|
61
61
|
"typesafecss": "*",
|
|
62
62
|
"ws": "^8.18.3",
|
|
63
63
|
"yargs": "15.4.1"
|
|
@@ -5,6 +5,9 @@ import { STREAM_EXTENSION, StreamEntry, parseStream, streamReaderFromEntries } f
|
|
|
5
5
|
import { formatNumber, formatTime } from "socket-function/src/formatting/format";
|
|
6
6
|
import { blue, red } from "socket-function/src/formatting/logColors";
|
|
7
7
|
|
|
8
|
+
// Duplicated from BulkDatabaseBase to avoid a circular import — used only to build a fuller storage-relative path for log messages.
|
|
9
|
+
const BULK_ROOT_FOLDER = "bulkDatabases2";
|
|
10
|
+
|
|
8
11
|
export type BulkFileInfo = { fileName: string; level: number; timestamp: number };
|
|
9
12
|
export type StreamFileInfo = { fileName: string; timestamp: number };
|
|
10
13
|
export type StreamReaderCacheEntry = { readSize: number; parsedPos: number; entries: StreamEntry[] };
|
|
@@ -257,7 +260,7 @@ export async function loadFileReader(name: string, storage: FileStorage, f: Bulk
|
|
|
257
260
|
const raw = await makeRawGetRange(storage, f.fileName);
|
|
258
261
|
const fileId = nullJoin(name, f.fileName);
|
|
259
262
|
const opened = await blockCache.open(fileId, raw.size, raw.rawGetRange);
|
|
260
|
-
const reader = await loadBulkDatabase({ totalBytes: opened.uncompressedSize, getRange: opened.getRange, name: f.fileName });
|
|
263
|
+
const reader = await loadBulkDatabase({ totalBytes: opened.uncompressedSize, getRange: opened.getRange, name: `${BULK_ROOT_FOLDER}/${name}/${f.fileName}` });
|
|
261
264
|
cache.set(f.fileName, reader);
|
|
262
265
|
return reader;
|
|
263
266
|
}
|
|
@@ -333,11 +336,11 @@ function pruneSubCaches(bulkFiles: BulkFileInfo[], streamFiles: StreamFileInfo[]
|
|
|
333
336
|
// visible without flooding the log on every rebuild.
|
|
334
337
|
const warnedCorruptReads = new Set<string>();
|
|
335
338
|
function warnCorruptRead(db: BaseBulkDatabaseReader, column: string, e: unknown): void {
|
|
336
|
-
const
|
|
337
|
-
const dedupeKey = nullJoin(
|
|
339
|
+
const path = db.name || "(unknown source)";
|
|
340
|
+
const dedupeKey = nullJoin(path, column);
|
|
338
341
|
if (warnedCorruptReads.has(dedupeKey)) return;
|
|
339
342
|
warnedCorruptReads.add(dedupeKey);
|
|
340
|
-
console.warn(`${red("corrupt read")}: file ${
|
|
343
|
+
console.warn(`${red("corrupt read")}: file ${path} column ${JSON.stringify(column)} could not be read - skipping it (its data is dropped from results): ${(e as Error).message}`);
|
|
341
344
|
}
|
|
342
345
|
|
|
343
346
|
function joinBulkDatabases(databases: BaseBulkDatabaseReader[]): ResolvedReader {
|
package/yarn.lock
CHANGED
|
@@ -2095,10 +2095,10 @@ typenode@^6.0.1:
|
|
|
2095
2095
|
source-map-support "https://github.com/7rulnik/node-source-map-support"
|
|
2096
2096
|
typescript "5.3.3"
|
|
2097
2097
|
|
|
2098
|
-
typenode@^6.6.
|
|
2099
|
-
version "6.6.
|
|
2100
|
-
resolved "https://registry.yarnpkg.com/typenode/-/typenode-6.6.
|
|
2101
|
-
integrity sha512-
|
|
2098
|
+
typenode@^6.6.1:
|
|
2099
|
+
version "6.6.1"
|
|
2100
|
+
resolved "https://registry.yarnpkg.com/typenode/-/typenode-6.6.1.tgz#a7236a618bca1e2dc8c7126ddf303349388a7a38"
|
|
2101
|
+
integrity sha512-gFvy6F3dUE7WivTDrtZvgKH5aRrDORXeO2+4RtSVf3k4SKTHHUlh8wvsMi6aE9hYOgjmb9X03fKDvUDlC9T4PA==
|
|
2102
2102
|
dependencies:
|
|
2103
2103
|
"@types/pegjs" "^0.10.3"
|
|
2104
2104
|
source-map-support "https://github.com/7rulnik/node-source-map-support"
|