typescript bump and npm audit

This commit is contained in:
Skillbert
2025-01-29 11:09:51 +01:00
parent e5195ded04
commit 3d0ff5e4fa
4 changed files with 1726 additions and 1807 deletions

3521
package-lock.json generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -59,7 +59,7 @@
"stream-browserify": "^3.0.0",
"three": "^0.162.0",
"ts-loader": "^9.2.8",
"typescript": "^5.1.6",
"typescript": "^5.7.3",
"util": "^0.12.4",
"webpack": "^5.70.0",
"webpack-cli": "^4.9.2",

View File

@@ -34,7 +34,7 @@ export const glTypeIds: { [id in typeids]: { gltype: vartypeEnum, constr: ArrayB
//in js typedarrays must be aligned in memory according to their elements size
export function alignedRefOrCopy<T>(constr: ArrayBufferConstructor<T>, source: Uint8Array, offset: number, length: number) {
let srcbuffer: ArrayBuffer;
let srcbuffer: ArrayBufferLike;
let disalignment = (source.byteOffset + offset) % constr.BYTES_PER_ELEMENT;
if (disalignment != 0) {
//use prototype slice here since nodejs Buffer creates a new view instead of a copy

View File

@@ -752,7 +752,7 @@ const rendermodeInteractions: RenderMode<"interactions"> = function (engine, con
};
}
let textual = prettyJson({ locs, locdatas, rect, hashimgs, pxpertile: thiscnf.pxpersquare, dxdy: thiscnf.dxdy, dzdy: thiscnf.dzdy }, { indent: "\t" });
let buf = Buffer.from(textual, "utf8");
let buf: Buffer = Buffer.from(textual, "utf8");
if (thiscnf.usegzip) {
buf = zlib.gzipSync(buf);
}
@@ -996,7 +996,7 @@ const rendermodeLocs: RenderMode<"height"> = function (engine, config, cnf, deps
let rect = { x: singlerect.x * chunkSize, z: singlerect.z * chunkSize, xsize: chunkSize, zsize: chunkSize };
let { locdatas, locs } = chunkSummary(grid, modeldata, rect);
let textual = prettyJson({ locdatas, locs, rect }, { indent: "\t" });
let buf = Buffer.from(textual, "utf8");
let buf: Buffer = Buffer.from(textual, "utf8");
if (thiscnf.usegzip) {
buf = zlib.gzipSync(buf);
}
@@ -1019,7 +1019,7 @@ const rendermodeMaplabels: RenderMode<"height"> = function (engine, config, cnf,
let locs = chunks.flatMap(ch => ch.chunk?.locs ?? []);
let iconjson = await jsonIcons(engine, locs, rawarea, thiscnf.level);
let textual = prettyJson(iconjson, { indent: "\t" });
let buf = Buffer.from(textual, "utf8");
let buf: Buffer = Buffer.from(textual, "utf8");
if (thiscnf.usegzip) {
buf = zlib.gzipSync(buf);
}
@@ -1040,7 +1040,7 @@ const rendermodeRenderMeta: RenderMode<"rendermeta"> = function (engine, config,
let obj = chunks[0].loaded.rendermeta;
let file = Buffer.from(JSON.stringify(obj), "utf8");
if (thiscnf.usegzip) {
file = zlib.gzipSync(file);
file = zlib.gzipSync(file) as any;
}
return { file: () => Promise.resolve(file) };
}