unprint 0.15.3 → 0.15.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/app.js +5 -5
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -568,8 +568,6 @@ function queryStyleUrl(context, selector, styleAttribute, customOptions) {
|
|
|
568
568
|
return null;
|
|
569
569
|
}
|
|
570
570
|
|
|
571
|
-
console.log('STYLE', styleAttribute, style);
|
|
572
|
-
|
|
573
571
|
const url = style.match(/url\(['"]?(.*)['"]?\)/)?.[1];
|
|
574
572
|
|
|
575
573
|
return url;
|
|
@@ -1016,7 +1014,6 @@ async function request(url, body, customOptions = {}, method = 'GET') {
|
|
|
1016
1014
|
|
|
1017
1015
|
const instance = axios.create({
|
|
1018
1016
|
method,
|
|
1019
|
-
data: body,
|
|
1020
1017
|
validateStatus: null,
|
|
1021
1018
|
headers: options.headers,
|
|
1022
1019
|
timeout: options.timeout,
|
|
@@ -1038,7 +1035,10 @@ async function request(url, body, customOptions = {}, method = 'GET') {
|
|
|
1038
1035
|
|
|
1039
1036
|
events.emit('requestInit', feedbackBase);
|
|
1040
1037
|
|
|
1041
|
-
const res = await limiter.schedule(async () => instance.request(
|
|
1038
|
+
const res = await limiter.schedule(async () => instance.request({
|
|
1039
|
+
url,
|
|
1040
|
+
data: body,
|
|
1041
|
+
}));
|
|
1042
1042
|
|
|
1043
1043
|
if (!(res.status >= 200 && res.status < 300)) {
|
|
1044
1044
|
handleError(new Error(`HTTP response from ${url} not OK (${res.status} ${res.statusText}): ${res.data}`), 'HTTP_NOT_OK');
|
|
@@ -1074,7 +1074,7 @@ async function request(url, body, customOptions = {}, method = 'GET') {
|
|
|
1074
1074
|
statusText: res.statusText,
|
|
1075
1075
|
});
|
|
1076
1076
|
|
|
1077
|
-
if (res.headers['content-type']
|
|
1077
|
+
if (['application/json', 'application/javascript'].includes(res.headers['content-type']) && typeof res.data === 'object') {
|
|
1078
1078
|
return {
|
|
1079
1079
|
...base,
|
|
1080
1080
|
data: res.data,
|