UNPKG

715 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const errors_1 = require("../errors");
4class 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}
22exports.FileParser = FileParser;
23//# sourceMappingURL=file-parser.js.map
\No newline at end of file