Skip to content

Commit ae485a0

Browse files
committed
chore: update dependencies
1 parent 4256c06 commit ae485a0

9 files changed

Lines changed: 1379 additions & 1112 deletions

File tree

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,27 @@
2323
"dependencies": {
2424
"@arkntools/unity-js-tools": "^3.2.0",
2525
"aes-js": "^3.1.2",
26-
"es-toolkit": "^1.10.1",
26+
"es-toolkit": "^1.39.6",
2727
"jimp": "^0.22.12",
2828
"jszip": "^3.10.1"
2929
},
3030
"devDependencies": {
3131
"@tsuk1ko/postversion": "^1.0.2",
3232
"@types/aes-js": "^3.1.4",
33-
"@typescript-eslint/eslint-plugin": "^7.13.0",
34-
"@typescript-eslint/parser": "^7.13.0",
35-
"eslint": "^8.57.0",
33+
"@typescript-eslint/eslint-plugin": "^7.18.0",
34+
"@typescript-eslint/parser": "^7.18.0",
35+
"eslint": "^8.57.1",
3636
"eslint-config-love": "^47.0.0",
3737
"eslint-config-prettier": "^9.1.0",
38-
"eslint-import-resolver-typescript": "^3.6.1",
39-
"eslint-plugin-import": "^2.29.1",
40-
"eslint-plugin-n": "^17.8.1",
41-
"eslint-plugin-promise": "^6.2.0",
42-
"lint-staged": "^15.2.7",
43-
"prettier": "^3.3.2",
44-
"rimraf": "^5.0.7",
38+
"eslint-import-resolver-typescript": "^3.10.1",
39+
"eslint-plugin-import": "^2.32.0",
40+
"eslint-plugin-n": "^17.21.0",
41+
"eslint-plugin-promise": "^6.6.0",
42+
"lint-staged": "^16.1.2",
43+
"prettier": "^3.6.2",
44+
"rimraf": "^6.0.1",
4545
"ts-node": "^10.9.2",
46-
"typescript": "^5.4.5",
46+
"typescript": "^5.8.3",
4747
"yorkie": "^2.0.0"
4848
},
4949
"gitHooks": {

src/bundle.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,17 +295,21 @@ export class Bundle {
295295

296296
switch (type) {
297297
case CompressionType.LZMA:
298-
return decompressLzmaWithSize(new Uint8Array(data), uncompressedSize);
298+
return decompressLzmaWithSize(
299+
new Uint8Array(data),
300+
uncompressedSize,
301+
) as unknown as ArrayBuffer;
299302

300303
case CompressionType.LZ4:
301304
case CompressionType.LZ4_HC:
302-
return decompressLz4(new Uint8Array(data), uncompressedSize).buffer;
305+
return decompressLz4(new Uint8Array(data), uncompressedSize)
306+
.buffer as unknown as ArrayBuffer;
303307
}
304308

305309
const isArknights = this.options?.env === BundleEnv.ARKNIGHTS;
306310

307311
if (isArknights && (type === CompressionType.CUSTOM_4 || type === CompressionType.CUSTOM_5)) {
308-
return decompressArkLz4(data, uncompressedSize).buffer;
312+
return decompressArkLz4(data, uncompressedSize).buffer as unknown as ArrayBuffer;
309313
}
310314

311315
throw new Error(`Unsupported compression type: ${CompressionType[type] || type}`);

src/classes/mesh.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class VertexData {
6969
throw new Error('VertexData version[0] < 5 not implemented.');
7070
} else {
7171
const channels = this.channels!;
72-
const streamCount = maxBy(channels, ({ stream }) => stream).stream + 1;
72+
const streamCount = maxBy(channels, ({ stream }) => stream)!.stream + 1;
7373
this.streams = [];
7474
for (let s = 0, offset = 0; s < streamCount; s++) {
7575
let channelMask = 0;

src/classes/sprite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class Sprite extends AssetBase {
7474
const bitmap = this.getImageJimp()?.bitmap;
7575
if (!bitmap) return;
7676
return {
77-
data: bitmap.data.buffer,
77+
data: bitmap.data.buffer as unknown as ArrayBuffer,
7878
width: bitmap.width,
7979
height: bitmap.height,
8080
};

src/classes/texture2d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class Texture2D extends AssetBase {
8181
getImageBitmap(): ImgBitMap {
8282
const { bitmap } = this.getImageJimp();
8383
return {
84-
data: bitmap.data.buffer,
84+
data: bitmap.data.buffer as unknown as ArrayBuffer,
8585
width: bitmap.width,
8686
height: bitmap.height,
8787
};

src/utils/aes.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ import crypto from 'crypto';
22

33
export const aesEcbEncrypt = (data: ArrayBuffer, key: Uint8Array): Uint8Array => {
44
const cipher = crypto.createCipheriv('aes-128-ecb', key, null);
5-
return Buffer.concat([cipher.update(new Uint8Array(data)), cipher.final()]);
5+
return Buffer.concat([
6+
cipher.update(new Uint8Array(data)) as unknown as Uint8Array,
7+
cipher.final() as unknown as Uint8Array,
8+
]) as unknown as Uint8Array;
69
};

src/utils/buffer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ export const concatArrayBuffer = (buffers: ArrayBuffer[]) => {
3636
};
3737

3838
export const ensureArrayBuffer = (data: Buffer | ArrayBuffer | Uint8Array): ArrayBuffer =>
39-
data instanceof ArrayBuffer ? data : data.buffer || data;
39+
data instanceof ArrayBuffer ? data : ((data.buffer || data) as unknown as ArrayBuffer);

src/utils/reader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export class ArrayBufferReader {
22
private offset = 0;
3-
private readonly view: DataView;
3+
private readonly view: DataView<ArrayBuffer>;
44
private readonly textDecoder = new TextDecoder();
55

66
constructor(

0 commit comments

Comments
 (0)