Skip to content

Commit fa5df35

Browse files
do same for wemparser
1 parent 9e76575 commit fa5df35

6 files changed

Lines changed: 20 additions & 2 deletions

File tree

dist/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ import { PSARC } from './psarc';
99
import { SongEbeat, SongNote, Song2014 } from './song2014';
1010
import { DEFAULT_VALUES } from './common';
1111
import * as BNKParser from './bnkparser';
12-
export { PSARC, SNG, DDS, WEM, WAAPI, GENERIC, BNK, Song2014, SongEbeat, SongNote, MANIFEST, DEFAULT_VALUES, BNKParser, };
12+
import * as WEMParser from './wemparser';
13+
export { PSARC, SNG, DDS, WEM, WAAPI, GENERIC, BNK, Song2014, SongEbeat, SongNote, MANIFEST, DEFAULT_VALUES, BNKParser, WEMParser };

dist/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
1919
return result;
2020
};
2121
Object.defineProperty(exports, "__esModule", { value: true });
22-
exports.BNKParser = exports.DEFAULT_VALUES = exports.MANIFEST = exports.SongNote = exports.SongEbeat = exports.Song2014 = exports.BNK = exports.GENERIC = exports.WAAPI = exports.WEM = exports.DDS = exports.SNG = exports.PSARC = void 0;
22+
exports.WEMParser = exports.BNKParser = exports.DEFAULT_VALUES = exports.MANIFEST = exports.SongNote = exports.SongEbeat = exports.Song2014 = exports.BNK = exports.GENERIC = exports.WAAPI = exports.WEM = exports.DDS = exports.SNG = exports.PSARC = void 0;
2323
var sng_1 = require("./sng");
2424
Object.defineProperty(exports, "SNG", { enumerable: true, get: function () { return sng_1.SNG; } });
2525
var dds_1 = require("./dds");
@@ -44,3 +44,5 @@ var common_1 = require("./common");
4444
Object.defineProperty(exports, "DEFAULT_VALUES", { enumerable: true, get: function () { return common_1.DEFAULT_VALUES; } });
4545
var BNKParser = __importStar(require("./bnkparser"));
4646
exports.BNKParser = BNKParser;
47+
var WEMParser = __importStar(require("./wemparser"));
48+
exports.WEMParser = WEMParser;

dist/wem.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
/// <reference types="node" />
12
export declare class WEM {
23
static convert(file: string, tag?: string): Promise<string>;
34
static parse(wemFile: string): Promise<any>;
5+
static parseData(data: Buffer): Promise<any>;
46
}

dist/wem.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ var WEM = /** @class */ (function () {
8888
});
8989
});
9090
};
91+
WEM.parseData = function (data) {
92+
return __awaiter(this, void 0, void 0, function () {
93+
return __generator(this, function (_a) {
94+
return [2 /*return*/, WEMParser.WEMDATA.parse(data)];
95+
});
96+
});
97+
};
9198
return WEM;
9299
}());
93100
exports.WEM = WEM;

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
import { DEFAULT_VALUES } from './common';
1313

1414
import * as BNKParser from './bnkparser';
15+
import * as WEMParser from './wemparser';
1516

1617
export {
1718
PSARC,
@@ -27,4 +28,5 @@ export {
2728
MANIFEST,
2829
DEFAULT_VALUES,
2930
BNKParser,
31+
WEMParser
3032
}

src/wem.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ export class WEM {
1111
const data = await promises.readFile(wemFile);
1212
return WEMParser.WEMDATA.parse(data);
1313
}
14+
15+
static async parseData(data: Buffer) {
16+
return WEMParser.WEMDATA.parse(data);
17+
}
1418
}

0 commit comments

Comments
 (0)