bug-report-sender
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -106,5 +106,15 @@ 'use strict'; | ||
if (error || !is_valid) { | ||
return reject(error); | ||
return reject({ | ||
error: error, | ||
body: body, | ||
response: response, | ||
options: options | ||
}); | ||
} else { | ||
return resolve(body); | ||
return resolve({ | ||
error: null, | ||
body: body, | ||
response: response, | ||
options: options | ||
}); | ||
} | ||
@@ -128,2 +138,2 @@ }); | ||
})(); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbmRlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztnQ0FBK0Isc0JBQXNCOzt3QkFDcEMsV0FBVzs7OzsyQkFDVixjQUFjOzs7O2tCQUNqQixJQUFJOzs7O3dCQUNKLFVBQVU7Ozs7QUFFekIsTUFBTSxDQUFDLE9BQU87QUFDRCxXQURVLE1BQU0sQ0FDZixHQUFHLEVBQUU7MEJBREksTUFBTTs7QUFFekIsUUFBSSxDQUFDLE9BQU8sR0FBRyw4QkFBTSxFQUFFLEVBQUU7QUFDdkIsaUJBQVcsRUFBRSxhQUFhO0FBQzFCLFdBQUssRUFBRSxPQUFPO0FBQ2QsY0FBUSxFQUFFLFlBQVk7QUFDdEIsZUFBUyxFQUFFLFNBQVM7QUFDcEIsY0FBUSxFQUFFLE9BQU87QUFDakIsWUFBTSxFQUFFO0FBQ04sWUFBSSxFQUFFLGdCQUFHLFFBQVEsRUFBRTtBQUNuQixZQUFJLEVBQUUsT0FBTyxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUU7QUFDM0IsV0FBRyxFQUFFLE9BQU8sQ0FBQyxHQUFHO09BQ2pCO0tBQ0YsRUFDRCxHQUFHLENBQUMsQ0FBQztHQUNOOztlQWZvQixNQUFNOztXQWlCbkIsb0JBQUc7QUFDVCxVQUFJLEdBQUcsR0FBRyxJQUFJLE1BQU0sQ0FBQyxFQUFFLENBQUMsQ0FBQztBQU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G9uc2Uuc3RhdHVzQ29kZSA9PT0gMjAwIHx8IHJlc3BvbnNlLnN0YXR1c0NvZGUgPT09IDIwMSk7XG4gICAgICAgIGlmIChlcnJvciB8fCAhaXNfdmFsaWQpIHtcbiAgICAgICAgICByZXR1cm4gcmVqZWN0KHtcbiAgICAgICAgICAgIGVycm9yOiBlcnJvcixcbiAgICAgICAgICAgIGJvZHk6IGJvZHksXG4gICAgICAgICAgICByZXNwb25zZTogcmVzcG9uc2UsXG4gICAgICAgICAgICBvcHRpb25zOiBvcHRpb25zXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmV0dXJuIHJlc29sdmUoe1xuICAgICAgICAgICAgZXJyb3I6IG51bGwsXG4gICAgICAgICAgICBib2R5OiBib2R5LFxuICAgICAgICAgICAgcmVzcG9uc2U6IHJlc3BvbnNlLFxuICAgICAgICAgICAgb3B0aW9uczogb3B0aW9uc1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxuXG4gIHNlbmQob3B0cykge1xuICAgIHZhciByZXF1ZXN0RnVuY3Rpb24gPSBvcHRzLmxpYnMucmVxdWVzdEZ1bmN0aW9uIHx8IHJlcXVpcmUoJ3JlcXVlc3QnKTtcbiAgICByZXR1cm4gdGhpcy5fcHJlcGFyZShvcHRzLmVyciwgb3B0cy5leHRyYV92YWx1ZXMpXG4gICAgLnRoZW4oKCkgPT4geyByZXR1cm4gdGhpcy5fc2VuZChyZXF1ZXN0RnVuY3Rpb24sIG9wdHMudXJsKTsgfSk7XG4gIH1cblxufTtcbiJdLCJzb3VyY2VSb290IjoiL2J1Zy1yZXBvcnQtc2VuZGVyOjAuMS42L3NyYyJ9 |
@@ -325,2 +325,2 @@ /*jslint devel: true, nomen: true, plusplus: true, regexp: true, indent: 2, maxlen: 100 */ | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjp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cG9ydC1zZW5kZXI6MC4xLjYvc3JjIn0= |
{ | ||
"name": "bug-report-sender", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "bug report sender", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66932
496