in src/BasePreviewManager.ts [127:148]
public parseManifestFromActiveEditor(data: string): Promise<string> {
let json;
let self = this;
try {
json = JSON.parse(data);
}
catch (error) {
return this.returnOldPreview(Constants.ErrorMessages.DIRTY_JSON);
}
//this function prepares the packageData
this.deserializeJSON(json);
// Update the oldJSON
this.oldJSON = json;
// Read the README file
return new Promise<string>((resolve, reject) => {
resolve(self.getReadMe());
}).then((promise) => {
return promise;
}).catch(() => {
return Constants.ErrorMessages.GET_MANIFEST_ERROR;
})
}