office-addin-manifest
Advanced tools
Comparing version 1.10.4 to 1.11.0
@@ -144,3 +144,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
const validation = yield (0, validate_1.validateManifest)(manifestPath, verifyProduction); | ||
if (validation.report) { | ||
if (validation.status && validation.status != 200) { | ||
console.log(`Unable to validate the manifest.\n${validation.status}\n${validation.statusText}`); | ||
} | ||
else if (validation.report) { | ||
logManifestValidationInfos(validation.report.notes); | ||
@@ -147,0 +150,0 @@ logManifestValidationErrors(validation.report.errors); |
@@ -46,4 +46,5 @@ export declare class ManifestValidationDetails { | ||
status?: number; | ||
statusText?: string; | ||
constructor(); | ||
} | ||
export declare function validateManifest(manifestPath: string, verifyProduction?: boolean): Promise<ManifestValidation>; |
@@ -79,8 +79,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
} | ||
validation.status = response.status; | ||
validation.statusText = response.statusText; | ||
const text = yield response.text(); | ||
const json = JSON.parse(text.trim()); | ||
if (json) { | ||
validation.report = json; | ||
validation.status = response.status; | ||
try { | ||
const json = JSON.parse(text.trim()); | ||
if (json) { | ||
validation.report = json; | ||
} | ||
} | ||
catch (_a) { } // eslint-disable-line no-empty | ||
if (validation.report) { | ||
@@ -87,0 +91,0 @@ const result = validation.report.status; |
{ | ||
"name": "office-addin-manifest", | ||
"version": "1.10.4", | ||
"version": "1.11.0", | ||
"description": "Read and modify Office Add-in manifest files.", | ||
@@ -62,3 +62,3 @@ "main": "./lib/main.js", | ||
"prettier": "office-addin-prettier-config", | ||
"gitHead": "e9cd6b6456c7b79621e5d4c07206e6cc1ab47df9" | ||
"gitHead": "4946544a1b36ffa8f07ee13c32846c574701d24f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
98548
1484