1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const errors_1 = require("../errors");
|
4 | class FileParser {
|
5 | static parseLockFile(lockFileContent) {
|
6 | try {
|
7 | return JSON.parse(lockFileContent);
|
8 | }
|
9 | catch (e) {
|
10 | throw new errors_1.ParseError(`Failed to parse lock file. Error: ${e.message}`);
|
11 | }
|
12 | }
|
13 | static parseManifestFile(manifestFileContent) {
|
14 | try {
|
15 | return JSON.parse(manifestFileContent);
|
16 | }
|
17 | catch (e) {
|
18 | throw new errors_1.ParseError(`Failed to parse manifest file. Error: ${e.message}`);
|
19 | }
|
20 | }
|
21 | }
|
22 | exports.FileParser = FileParser;
|
23 |
|
\ | No newline at end of file |