@rhyster/wow-casc-dbc 2.6.5 → 2.6.7

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/dist/index.cjs CHANGED
@@ -311,13 +311,7 @@ class BLTEReader {
311
311
  }
312
312
  if (allowMissingKey) {
313
313
  const buffer = this.processBlock(blockBuffer, blockIndex, allowMissingKey);
314
- if (buffer instanceof Buffer) {
315
- assert__default(
316
- buffer.byteLength === block.decompressedSize,
317
- `[BLTE]: Invalid decompressed size: expected ${block.decompressedSize.toString()}, got ${buffer.byteLength.toString()}`
318
- );
319
- this.buffer = Buffer.concat([this.buffer, buffer]);
320
- } else {
314
+ if (typeof buffer === "string") {
321
315
  missingKeyBlocks.push({
322
316
  offset: this.buffer.byteLength,
323
317
  size: block.decompressedSize,
@@ -328,6 +322,12 @@ class BLTEReader {
328
322
  this.buffer,
329
323
  Buffer.alloc(block.decompressedSize)
330
324
  ]);
325
+ } else {
326
+ assert__default(
327
+ buffer.byteLength === block.decompressedSize,
328
+ `[BLTE]: Invalid decompressed size: expected ${block.decompressedSize.toString()}, got ${buffer.byteLength.toString()}`
329
+ );
330
+ this.buffer = Buffer.concat([this.buffer, buffer]);
331
331
  }
332
332
  } else {
333
333
  const buffer = this.processBlock(blockBuffer, blockIndex, allowMissingKey);
package/dist/index.d.cts CHANGED
@@ -84,7 +84,7 @@ declare class CASCClient {
84
84
  readonly product: string;
85
85
  readonly version: Version;
86
86
  readonly name2FileDataID: Map<string, number>;
87
- readonly keys: Map<string, Uint8Array>;
87
+ readonly keys: Map<string, Uint8Array<ArrayBufferLike>>;
88
88
  preload?: ClientPreloadData;
89
89
  static getProductVersion(region: string, product: string): Promise<Version | undefined>;
90
90
  static LocaleFlags: {
package/dist/index.d.mts CHANGED
@@ -84,7 +84,7 @@ declare class CASCClient {
84
84
  readonly product: string;
85
85
  readonly version: Version;
86
86
  readonly name2FileDataID: Map<string, number>;
87
- readonly keys: Map<string, Uint8Array>;
87
+ readonly keys: Map<string, Uint8Array<ArrayBufferLike>>;
88
88
  preload?: ClientPreloadData;
89
89
  static getProductVersion(region: string, product: string): Promise<Version | undefined>;
90
90
  static LocaleFlags: {
package/dist/index.d.ts CHANGED
@@ -84,7 +84,7 @@ declare class CASCClient {
84
84
  readonly product: string;
85
85
  readonly version: Version;
86
86
  readonly name2FileDataID: Map<string, number>;
87
- readonly keys: Map<string, Uint8Array>;
87
+ readonly keys: Map<string, Uint8Array<ArrayBufferLike>>;
88
88
  preload?: ClientPreloadData;
89
89
  static getProductVersion(region: string, product: string): Promise<Version | undefined>;
90
90
  static LocaleFlags: {
package/dist/index.mjs CHANGED
@@ -299,13 +299,7 @@ class BLTEReader {
299
299
  }
300
300
  if (allowMissingKey) {
301
301
  const buffer = this.processBlock(blockBuffer, blockIndex, allowMissingKey);
302
- if (buffer instanceof Buffer) {
303
- assert(
304
- buffer.byteLength === block.decompressedSize,
305
- `[BLTE]: Invalid decompressed size: expected ${block.decompressedSize.toString()}, got ${buffer.byteLength.toString()}`
306
- );
307
- this.buffer = Buffer.concat([this.buffer, buffer]);
308
- } else {
302
+ if (typeof buffer === "string") {
309
303
  missingKeyBlocks.push({
310
304
  offset: this.buffer.byteLength,
311
305
  size: block.decompressedSize,
@@ -316,6 +310,12 @@ class BLTEReader {
316
310
  this.buffer,
317
311
  Buffer.alloc(block.decompressedSize)
318
312
  ]);
313
+ } else {
314
+ assert(
315
+ buffer.byteLength === block.decompressedSize,
316
+ `[BLTE]: Invalid decompressed size: expected ${block.decompressedSize.toString()}, got ${buffer.byteLength.toString()}`
317
+ );
318
+ this.buffer = Buffer.concat([this.buffer, buffer]);
319
319
  }
320
320
  } else {
321
321
  const buffer = this.processBlock(blockBuffer, blockIndex, allowMissingKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhyster/wow-casc-dbc",
3
- "version": "2.6.5",
3
+ "version": "2.6.7",
4
4
  "description": "Fetch World of Warcraft data files from CASC and parse DBC/DB2 files.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -37,18 +37,18 @@
37
37
  "author": "Rhythm",
38
38
  "license": "MIT",
39
39
  "devDependencies": {
40
- "@rhyster/eslint-config": "^1.4.5",
40
+ "@rhyster/eslint-config": "^1.4.8",
41
41
  "@types/async": "^3.2.24",
42
42
  "@types/cli-progress": "^3.11.6",
43
- "@types/node": "^22.9.1",
43
+ "@types/node": "^22.10.0",
44
44
  "eslint": "^9.15.0",
45
45
  "tsx": "^4.19.2",
46
- "typescript": "^5.6.3",
46
+ "typescript": "^5.7.2",
47
47
  "unbuild": "^2.0.0"
48
48
  },
49
49
  "dependencies": {
50
50
  "async": "^3.2.6",
51
51
  "cli-progress": "^3.12.0"
52
52
  },
53
- "packageManager": "pnpm@9.13.2"
53
+ "packageManager": "pnpm@9.14.2"
54
54
  }