stormlib-js 0.1.0 → 0.1.1

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.
@@ -0,0 +1,242 @@
1
+ /** Raw MPQ header as parsed from disk (normalized to V4 superset) */
2
+ interface MpqHeader {
3
+ /** 'MPQ\x1A' signature */
4
+ dwID: number;
5
+ /** Size of the header */
6
+ dwHeaderSize: number;
7
+ /** 32-bit archive size (V1) */
8
+ dwArchiveSize: number;
9
+ /** Format version: 0=V1, 1=V2, 2=V3, 3=V4 */
10
+ wFormatVersion: number;
11
+ /** Sector size shift (sector size = 512 << wSectorSize) */
12
+ wSectorSize: number;
13
+ /** Hash table offset (relative to archive start) */
14
+ dwHashTablePos: number;
15
+ /** Block table offset (relative to archive start) */
16
+ dwBlockTablePos: number;
17
+ /** Number of hash table entries */
18
+ dwHashTableSize: number;
19
+ /** Number of block table entries */
20
+ dwBlockTableSize: number;
21
+ /** 64-bit hi-block table offset */
22
+ hiBlockTablePos64: bigint;
23
+ /** High 16 bits of hash table offset */
24
+ wHashTablePosHi: number;
25
+ /** High 16 bits of block table offset */
26
+ wBlockTablePosHi: number;
27
+ /** 64-bit archive size */
28
+ archiveSize64: bigint;
29
+ /** 64-bit BET table position */
30
+ betTablePos64: bigint;
31
+ /** 64-bit HET table position */
32
+ hetTablePos64: bigint;
33
+ /** Compressed hash table size */
34
+ hashTableSize64: bigint;
35
+ /** Compressed block table size */
36
+ blockTableSize64: bigint;
37
+ /** Compressed hi-block table size */
38
+ hiBlockTableSize64: bigint;
39
+ /** Compressed HET table size */
40
+ hetTableSize64: bigint;
41
+ /** Compressed BET table size */
42
+ betTableSize64: bigint;
43
+ /** Raw chunk size for MD5 */
44
+ dwRawChunkSize: number;
45
+ /** MD5 checksums (V4) */
46
+ md5BlockTable: Uint8Array;
47
+ md5HashTable: Uint8Array;
48
+ md5HiBlockTable: Uint8Array;
49
+ md5BetTable: Uint8Array;
50
+ md5HetTable: Uint8Array;
51
+ md5MpqHeader: Uint8Array;
52
+ }
53
+ /** User data header that may precede the MPQ header */
54
+ interface MpqUserData {
55
+ dwID: number;
56
+ cbUserDataSize: number;
57
+ dwHeaderOffs: number;
58
+ cbUserDataHeader: number;
59
+ }
60
+ /** Hash table entry (16 bytes on disk) */
61
+ interface MpqHashEntry {
62
+ /** Hash of file path (method A) */
63
+ dwName1: number;
64
+ /** Hash of file path (method B) */
65
+ dwName2: number;
66
+ /** Windows LANGID locale */
67
+ lcLocale: number;
68
+ /** Platform (always 0) */
69
+ platform: number;
70
+ /** Index into block table (0xFFFFFFFF=free, 0xFFFFFFFE=deleted) */
71
+ dwBlockIndex: number;
72
+ }
73
+ /** Block table entry (16 bytes on disk) */
74
+ interface MpqBlockEntry {
75
+ /** File data offset relative to archive start */
76
+ dwFilePos: number;
77
+ /** Compressed file size */
78
+ dwCSize: number;
79
+ /** Uncompressed file size */
80
+ dwFSize: number;
81
+ /** File flags */
82
+ dwFlags: number;
83
+ }
84
+ /** Unified file entry (in-memory representation) */
85
+ interface FileEntry {
86
+ /** Jenkins hash (for BET table) */
87
+ fileNameHash: bigint;
88
+ /** File data offset relative to MPQ header */
89
+ byteOffset: bigint;
90
+ /** File time (FILETIME) from attributes */
91
+ fileTime: bigint;
92
+ /** Decompressed size */
93
+ fileSize: number;
94
+ /** Compressed size */
95
+ cmpSize: number;
96
+ /** File flags */
97
+ flags: number;
98
+ /** CRC32 from attributes */
99
+ crc32: number;
100
+ /** MD5 from attributes */
101
+ md5: Uint8Array;
102
+ /** File name (empty if unknown) */
103
+ fileName: string;
104
+ }
105
+ /** HET table header */
106
+ interface HetTableHeader {
107
+ signature: number;
108
+ version: number;
109
+ dataSize: number;
110
+ tableSize: number;
111
+ maxFileCount: number;
112
+ hashTableSize: number;
113
+ hashEntrySize: number;
114
+ totalIndexSize: number;
115
+ indexSizeExtra: number;
116
+ indexSize: number;
117
+ blockTableSize: number;
118
+ }
119
+ /** BET table header */
120
+ interface BetTableHeader {
121
+ signature: number;
122
+ version: number;
123
+ dataSize: number;
124
+ tableSize: number;
125
+ maxFileCount: number;
126
+ flagCount: number;
127
+ }
128
+ /** File search result */
129
+ interface FileFindData {
130
+ fileName: string;
131
+ plainName: string;
132
+ hashIndex: number;
133
+ blockIndex: number;
134
+ fileSize: number;
135
+ compSize: number;
136
+ fileFlags: number;
137
+ locale: number;
138
+ }
139
+ /** Open archive flags */
140
+ interface OpenArchiveOptions {
141
+ noListfile?: boolean;
142
+ noAttributes?: boolean;
143
+ noHeaderSearch?: boolean;
144
+ forceMpqV1?: boolean;
145
+ checkSectorCrc?: boolean;
146
+ }
147
+
148
+ declare class MpqError extends Error {
149
+ constructor(message: string);
150
+ }
151
+ declare class MpqNotFoundError extends MpqError {
152
+ constructor(message?: string);
153
+ }
154
+ declare class MpqCorruptError extends MpqError {
155
+ constructor(message?: string);
156
+ }
157
+ declare class MpqUnsupportedError extends MpqError {
158
+ constructor(message?: string);
159
+ }
160
+ declare class MpqEncryptionError extends MpqError {
161
+ constructor(message?: string);
162
+ }
163
+ declare class MpqCompressionError extends MpqError {
164
+ constructor(message?: string);
165
+ }
166
+
167
+ declare const ID_MPQ = 441536589;
168
+ declare const ID_MPQ_USERDATA = 458313805;
169
+ declare const MPQ_FORMAT_VERSION_1 = 0;
170
+ declare const MPQ_FORMAT_VERSION_2 = 1;
171
+ declare const MPQ_FORMAT_VERSION_3 = 2;
172
+ declare const MPQ_FORMAT_VERSION_4 = 3;
173
+ declare const MPQ_FILE_IMPLODE = 256;
174
+ declare const MPQ_FILE_COMPRESS = 512;
175
+ declare const MPQ_FILE_ENCRYPTED = 65536;
176
+ declare const MPQ_FILE_KEY_V2 = 131072;
177
+ declare const MPQ_FILE_SINGLE_UNIT = 16777216;
178
+ declare const MPQ_FILE_EXISTS = 2147483648;
179
+ declare const MPQ_COMPRESSION_HUFFMANN = 1;
180
+ declare const MPQ_COMPRESSION_ZLIB = 2;
181
+ declare const MPQ_COMPRESSION_PKWARE = 8;
182
+ declare const MPQ_COMPRESSION_BZIP2 = 16;
183
+ declare const MPQ_COMPRESSION_LZMA = 18;
184
+ declare const MPQ_COMPRESSION_SPARSE = 32;
185
+ declare const MPQ_COMPRESSION_ADPCM_MONO = 64;
186
+ declare const MPQ_COMPRESSION_ADPCM_STEREO = 128;
187
+ declare const LISTFILE_NAME = "(listfile)";
188
+ declare const SIGNATURE_NAME = "(signature)";
189
+ declare const ATTRIBUTES_NAME = "(attributes)";
190
+
191
+ /**
192
+ * Compute MPQ hash of a string. The hashType selects which section of the
193
+ * StormBuffer to use:
194
+ * - MPQ_HASH_TABLE_INDEX (0x000): hash table slot
195
+ * - MPQ_HASH_NAME_A (0x100): file name verification hash 1
196
+ * - MPQ_HASH_NAME_B (0x200): file name verification hash 2
197
+ * - MPQ_HASH_FILE_KEY (0x300): encryption key derivation
198
+ */
199
+ declare function hashString(str: string, hashType: number): number;
200
+ /** Convenience: compute hash table index */
201
+ declare function hashTableIndex(fileName: string): number;
202
+ /** Convenience: compute name hash A */
203
+ declare function hashNameA(fileName: string): number;
204
+ /** Convenience: compute name hash B */
205
+ declare function hashNameB(fileName: string): number;
206
+ /** Convenience: compute file encryption key hash */
207
+ declare function hashFileKey(fileName: string): number;
208
+ /**
209
+ * Jenkins hashlittle2 - used for HET/BET tables (64-bit hash).
210
+ * Produces a 64-bit hash as a BigInt.
211
+ */
212
+ declare function jenkinsHash(str: string): bigint;
213
+
214
+ /**
215
+ * Decrypt an MPQ data block in-place.
216
+ * The buffer must be DWORD-aligned (length must be a multiple of 4).
217
+ *
218
+ * @param data - Buffer to decrypt (modified in place)
219
+ * @param key - Primary encryption key (DWORD)
220
+ */
221
+ declare function decryptBlock(data: Buffer, key: number): void;
222
+ /**
223
+ * Encrypt an MPQ data block in-place.
224
+ *
225
+ * @param data - Buffer to encrypt (modified in place)
226
+ * @param key - Primary encryption key (DWORD)
227
+ */
228
+ declare function encryptBlock(data: Buffer, key: number): void;
229
+ /**
230
+ * Calculate the decryption key for a file within an MPQ archive.
231
+ *
232
+ * @param fileName - Full path of the file within the archive
233
+ * @param byteOffset - File's offset within the archive (lower 32 bits)
234
+ * @param fileSize - Uncompressed file size
235
+ * @param flags - File flags from block table
236
+ * @returns The file decryption key
237
+ */
238
+ declare function decryptFileKey(fileName: string, byteOffset: bigint, fileSize: number, flags: number): number;
239
+
240
+ declare function getStormBuffer(): Uint32Array;
241
+
242
+ export { ATTRIBUTES_NAME as A, type BetTableHeader as B, MpqNotFoundError as C, MpqUnsupportedError as D, type MpqUserData as E, type FileEntry as F, decryptBlock as G, type HetTableHeader as H, ID_MPQ as I, decryptFileKey as J, encryptBlock as K, LISTFILE_NAME as L, type MpqHeader as M, getStormBuffer as N, type OpenArchiveOptions as O, hashFileKey as P, hashNameA as Q, hashNameB as R, SIGNATURE_NAME as S, hashString as T, hashTableIndex as U, jenkinsHash as V, type FileFindData as a, ID_MPQ_USERDATA as b, MPQ_COMPRESSION_ADPCM_MONO as c, MPQ_COMPRESSION_ADPCM_STEREO as d, MPQ_COMPRESSION_BZIP2 as e, MPQ_COMPRESSION_HUFFMANN as f, MPQ_COMPRESSION_LZMA as g, MPQ_COMPRESSION_PKWARE as h, MPQ_COMPRESSION_SPARSE as i, MPQ_COMPRESSION_ZLIB as j, MPQ_FILE_COMPRESS as k, MPQ_FILE_ENCRYPTED as l, MPQ_FILE_EXISTS as m, MPQ_FILE_IMPLODE as n, MPQ_FILE_KEY_V2 as o, MPQ_FILE_SINGLE_UNIT as p, MPQ_FORMAT_VERSION_1 as q, MPQ_FORMAT_VERSION_2 as r, MPQ_FORMAT_VERSION_3 as s, MPQ_FORMAT_VERSION_4 as t, type MpqBlockEntry as u, MpqCompressionError as v, MpqCorruptError as w, MpqEncryptionError as x, MpqError as y, type MpqHashEntry as z };
@@ -0,0 +1,242 @@
1
+ /** Raw MPQ header as parsed from disk (normalized to V4 superset) */
2
+ interface MpqHeader {
3
+ /** 'MPQ\x1A' signature */
4
+ dwID: number;
5
+ /** Size of the header */
6
+ dwHeaderSize: number;
7
+ /** 32-bit archive size (V1) */
8
+ dwArchiveSize: number;
9
+ /** Format version: 0=V1, 1=V2, 2=V3, 3=V4 */
10
+ wFormatVersion: number;
11
+ /** Sector size shift (sector size = 512 << wSectorSize) */
12
+ wSectorSize: number;
13
+ /** Hash table offset (relative to archive start) */
14
+ dwHashTablePos: number;
15
+ /** Block table offset (relative to archive start) */
16
+ dwBlockTablePos: number;
17
+ /** Number of hash table entries */
18
+ dwHashTableSize: number;
19
+ /** Number of block table entries */
20
+ dwBlockTableSize: number;
21
+ /** 64-bit hi-block table offset */
22
+ hiBlockTablePos64: bigint;
23
+ /** High 16 bits of hash table offset */
24
+ wHashTablePosHi: number;
25
+ /** High 16 bits of block table offset */
26
+ wBlockTablePosHi: number;
27
+ /** 64-bit archive size */
28
+ archiveSize64: bigint;
29
+ /** 64-bit BET table position */
30
+ betTablePos64: bigint;
31
+ /** 64-bit HET table position */
32
+ hetTablePos64: bigint;
33
+ /** Compressed hash table size */
34
+ hashTableSize64: bigint;
35
+ /** Compressed block table size */
36
+ blockTableSize64: bigint;
37
+ /** Compressed hi-block table size */
38
+ hiBlockTableSize64: bigint;
39
+ /** Compressed HET table size */
40
+ hetTableSize64: bigint;
41
+ /** Compressed BET table size */
42
+ betTableSize64: bigint;
43
+ /** Raw chunk size for MD5 */
44
+ dwRawChunkSize: number;
45
+ /** MD5 checksums (V4) */
46
+ md5BlockTable: Uint8Array;
47
+ md5HashTable: Uint8Array;
48
+ md5HiBlockTable: Uint8Array;
49
+ md5BetTable: Uint8Array;
50
+ md5HetTable: Uint8Array;
51
+ md5MpqHeader: Uint8Array;
52
+ }
53
+ /** User data header that may precede the MPQ header */
54
+ interface MpqUserData {
55
+ dwID: number;
56
+ cbUserDataSize: number;
57
+ dwHeaderOffs: number;
58
+ cbUserDataHeader: number;
59
+ }
60
+ /** Hash table entry (16 bytes on disk) */
61
+ interface MpqHashEntry {
62
+ /** Hash of file path (method A) */
63
+ dwName1: number;
64
+ /** Hash of file path (method B) */
65
+ dwName2: number;
66
+ /** Windows LANGID locale */
67
+ lcLocale: number;
68
+ /** Platform (always 0) */
69
+ platform: number;
70
+ /** Index into block table (0xFFFFFFFF=free, 0xFFFFFFFE=deleted) */
71
+ dwBlockIndex: number;
72
+ }
73
+ /** Block table entry (16 bytes on disk) */
74
+ interface MpqBlockEntry {
75
+ /** File data offset relative to archive start */
76
+ dwFilePos: number;
77
+ /** Compressed file size */
78
+ dwCSize: number;
79
+ /** Uncompressed file size */
80
+ dwFSize: number;
81
+ /** File flags */
82
+ dwFlags: number;
83
+ }
84
+ /** Unified file entry (in-memory representation) */
85
+ interface FileEntry {
86
+ /** Jenkins hash (for BET table) */
87
+ fileNameHash: bigint;
88
+ /** File data offset relative to MPQ header */
89
+ byteOffset: bigint;
90
+ /** File time (FILETIME) from attributes */
91
+ fileTime: bigint;
92
+ /** Decompressed size */
93
+ fileSize: number;
94
+ /** Compressed size */
95
+ cmpSize: number;
96
+ /** File flags */
97
+ flags: number;
98
+ /** CRC32 from attributes */
99
+ crc32: number;
100
+ /** MD5 from attributes */
101
+ md5: Uint8Array;
102
+ /** File name (empty if unknown) */
103
+ fileName: string;
104
+ }
105
+ /** HET table header */
106
+ interface HetTableHeader {
107
+ signature: number;
108
+ version: number;
109
+ dataSize: number;
110
+ tableSize: number;
111
+ maxFileCount: number;
112
+ hashTableSize: number;
113
+ hashEntrySize: number;
114
+ totalIndexSize: number;
115
+ indexSizeExtra: number;
116
+ indexSize: number;
117
+ blockTableSize: number;
118
+ }
119
+ /** BET table header */
120
+ interface BetTableHeader {
121
+ signature: number;
122
+ version: number;
123
+ dataSize: number;
124
+ tableSize: number;
125
+ maxFileCount: number;
126
+ flagCount: number;
127
+ }
128
+ /** File search result */
129
+ interface FileFindData {
130
+ fileName: string;
131
+ plainName: string;
132
+ hashIndex: number;
133
+ blockIndex: number;
134
+ fileSize: number;
135
+ compSize: number;
136
+ fileFlags: number;
137
+ locale: number;
138
+ }
139
+ /** Open archive flags */
140
+ interface OpenArchiveOptions {
141
+ noListfile?: boolean;
142
+ noAttributes?: boolean;
143
+ noHeaderSearch?: boolean;
144
+ forceMpqV1?: boolean;
145
+ checkSectorCrc?: boolean;
146
+ }
147
+
148
+ declare class MpqError extends Error {
149
+ constructor(message: string);
150
+ }
151
+ declare class MpqNotFoundError extends MpqError {
152
+ constructor(message?: string);
153
+ }
154
+ declare class MpqCorruptError extends MpqError {
155
+ constructor(message?: string);
156
+ }
157
+ declare class MpqUnsupportedError extends MpqError {
158
+ constructor(message?: string);
159
+ }
160
+ declare class MpqEncryptionError extends MpqError {
161
+ constructor(message?: string);
162
+ }
163
+ declare class MpqCompressionError extends MpqError {
164
+ constructor(message?: string);
165
+ }
166
+
167
+ declare const ID_MPQ = 441536589;
168
+ declare const ID_MPQ_USERDATA = 458313805;
169
+ declare const MPQ_FORMAT_VERSION_1 = 0;
170
+ declare const MPQ_FORMAT_VERSION_2 = 1;
171
+ declare const MPQ_FORMAT_VERSION_3 = 2;
172
+ declare const MPQ_FORMAT_VERSION_4 = 3;
173
+ declare const MPQ_FILE_IMPLODE = 256;
174
+ declare const MPQ_FILE_COMPRESS = 512;
175
+ declare const MPQ_FILE_ENCRYPTED = 65536;
176
+ declare const MPQ_FILE_KEY_V2 = 131072;
177
+ declare const MPQ_FILE_SINGLE_UNIT = 16777216;
178
+ declare const MPQ_FILE_EXISTS = 2147483648;
179
+ declare const MPQ_COMPRESSION_HUFFMANN = 1;
180
+ declare const MPQ_COMPRESSION_ZLIB = 2;
181
+ declare const MPQ_COMPRESSION_PKWARE = 8;
182
+ declare const MPQ_COMPRESSION_BZIP2 = 16;
183
+ declare const MPQ_COMPRESSION_LZMA = 18;
184
+ declare const MPQ_COMPRESSION_SPARSE = 32;
185
+ declare const MPQ_COMPRESSION_ADPCM_MONO = 64;
186
+ declare const MPQ_COMPRESSION_ADPCM_STEREO = 128;
187
+ declare const LISTFILE_NAME = "(listfile)";
188
+ declare const SIGNATURE_NAME = "(signature)";
189
+ declare const ATTRIBUTES_NAME = "(attributes)";
190
+
191
+ /**
192
+ * Compute MPQ hash of a string. The hashType selects which section of the
193
+ * StormBuffer to use:
194
+ * - MPQ_HASH_TABLE_INDEX (0x000): hash table slot
195
+ * - MPQ_HASH_NAME_A (0x100): file name verification hash 1
196
+ * - MPQ_HASH_NAME_B (0x200): file name verification hash 2
197
+ * - MPQ_HASH_FILE_KEY (0x300): encryption key derivation
198
+ */
199
+ declare function hashString(str: string, hashType: number): number;
200
+ /** Convenience: compute hash table index */
201
+ declare function hashTableIndex(fileName: string): number;
202
+ /** Convenience: compute name hash A */
203
+ declare function hashNameA(fileName: string): number;
204
+ /** Convenience: compute name hash B */
205
+ declare function hashNameB(fileName: string): number;
206
+ /** Convenience: compute file encryption key hash */
207
+ declare function hashFileKey(fileName: string): number;
208
+ /**
209
+ * Jenkins hashlittle2 - used for HET/BET tables (64-bit hash).
210
+ * Produces a 64-bit hash as a BigInt.
211
+ */
212
+ declare function jenkinsHash(str: string): bigint;
213
+
214
+ /**
215
+ * Decrypt an MPQ data block in-place.
216
+ * The buffer must be DWORD-aligned (length must be a multiple of 4).
217
+ *
218
+ * @param data - Buffer to decrypt (modified in place)
219
+ * @param key - Primary encryption key (DWORD)
220
+ */
221
+ declare function decryptBlock(data: Buffer, key: number): void;
222
+ /**
223
+ * Encrypt an MPQ data block in-place.
224
+ *
225
+ * @param data - Buffer to encrypt (modified in place)
226
+ * @param key - Primary encryption key (DWORD)
227
+ */
228
+ declare function encryptBlock(data: Buffer, key: number): void;
229
+ /**
230
+ * Calculate the decryption key for a file within an MPQ archive.
231
+ *
232
+ * @param fileName - Full path of the file within the archive
233
+ * @param byteOffset - File's offset within the archive (lower 32 bits)
234
+ * @param fileSize - Uncompressed file size
235
+ * @param flags - File flags from block table
236
+ * @returns The file decryption key
237
+ */
238
+ declare function decryptFileKey(fileName: string, byteOffset: bigint, fileSize: number, flags: number): number;
239
+
240
+ declare function getStormBuffer(): Uint32Array;
241
+
242
+ export { ATTRIBUTES_NAME as A, type BetTableHeader as B, MpqNotFoundError as C, MpqUnsupportedError as D, type MpqUserData as E, type FileEntry as F, decryptBlock as G, type HetTableHeader as H, ID_MPQ as I, decryptFileKey as J, encryptBlock as K, LISTFILE_NAME as L, type MpqHeader as M, getStormBuffer as N, type OpenArchiveOptions as O, hashFileKey as P, hashNameA as Q, hashNameB as R, SIGNATURE_NAME as S, hashString as T, hashTableIndex as U, jenkinsHash as V, type FileFindData as a, ID_MPQ_USERDATA as b, MPQ_COMPRESSION_ADPCM_MONO as c, MPQ_COMPRESSION_ADPCM_STEREO as d, MPQ_COMPRESSION_BZIP2 as e, MPQ_COMPRESSION_HUFFMANN as f, MPQ_COMPRESSION_LZMA as g, MPQ_COMPRESSION_PKWARE as h, MPQ_COMPRESSION_SPARSE as i, MPQ_COMPRESSION_ZLIB as j, MPQ_FILE_COMPRESS as k, MPQ_FILE_ENCRYPTED as l, MPQ_FILE_EXISTS as m, MPQ_FILE_IMPLODE as n, MPQ_FILE_KEY_V2 as o, MPQ_FILE_SINGLE_UNIT as p, MPQ_FORMAT_VERSION_1 as q, MPQ_FORMAT_VERSION_2 as r, MPQ_FORMAT_VERSION_3 as s, MPQ_FORMAT_VERSION_4 as t, type MpqBlockEntry as u, MpqCompressionError as v, MpqCorruptError as w, MpqEncryptionError as x, MpqError as y, type MpqHashEntry as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stormlib-js",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Pure TypeScript implementation of StormLib for reading MPQ archives",
5
5
  "author": "changmyeong",
6
6
  "license": "MIT",
@@ -18,11 +18,19 @@
18
18
  "exports": {
19
19
  ".": {
20
20
  "types": "./dist/index.d.ts",
21
+ "browser": "./dist/index.browser.mjs",
21
22
  "import": "./dist/index.mjs",
22
23
  "require": "./dist/index.js"
24
+ },
25
+ "./browser": {
26
+ "types": "./dist/index.browser.d.ts",
27
+ "import": "./dist/index.browser.mjs",
28
+ "require": "./dist/index.browser.js"
23
29
  }
24
30
  },
25
- "files": ["dist"],
31
+ "files": [
32
+ "dist"
33
+ ],
26
34
  "scripts": {
27
35
  "build": "tsup",
28
36
  "prepublishOnly": "npm run build",
@@ -30,8 +38,17 @@
30
38
  "test:watch": "vitest",
31
39
  "typecheck": "tsc --noEmit"
32
40
  },
33
- "keywords": ["mpq", "stormlib", "blizzard", "archive", "diablo", "warcraft", "starcraft"],
41
+ "keywords": [
42
+ "mpq",
43
+ "stormlib",
44
+ "blizzard",
45
+ "archive",
46
+ "diablo",
47
+ "warcraft",
48
+ "starcraft"
49
+ ],
34
50
  "dependencies": {
51
+ "buffer": "^6.0.3",
35
52
  "pako": "^2.1.0"
36
53
  },
37
54
  "devDependencies": {