Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
4a57f7070a | |||
f36bdcb181 | |||
d3c90b0e7e | |||
2397e69572 | |||
7f7738d69f | |||
f375e36a99 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/webrequest",
|
"name": "@pushrocks/webrequest",
|
||||||
"version": "3.0.24",
|
"version": "3.0.27",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "securely request from browsers",
|
"description": "securely request from browsers",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/webrequest',
|
name: '@pushrocks/webrequest',
|
||||||
version: '3.0.24',
|
version: '3.0.27',
|
||||||
description: 'securely request from browsers'
|
description: 'securely request from browsers'
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@ export class WebRequest {
|
|||||||
this.polyfillStatusEvaluated = true;
|
this.polyfillStatusEvaluated = true;
|
||||||
const smartenv = new plugins.smartenv.Smartenv();
|
const smartenv = new plugins.smartenv.Smartenv();
|
||||||
if (!smartenv.isBrowser) {
|
if (!smartenv.isBrowser) {
|
||||||
console.log('webrequest using node context.');
|
|
||||||
this.polyfillStatusEvaluated = true;
|
this.polyfillStatusEvaluated = true;
|
||||||
const fetchMod = await smartenv.getSafeNodeModule('@adobe/fetch');
|
const fetchMod = await smartenv.getSafeNodeModule('@adobe/fetch');
|
||||||
this.neededPolyfillsLoadedDeferred.resolve({
|
this.neededPolyfillsLoadedDeferred.resolve({
|
||||||
@ -36,7 +35,6 @@ export class WebRequest {
|
|||||||
helixTimeout: fetchMod.timeoutSignal,
|
helixTimeout: fetchMod.timeoutSignal,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log('webrequest using browser context.');
|
|
||||||
this.neededPolyfillsLoadedDeferred.resolve({
|
this.neededPolyfillsLoadedDeferred.resolve({
|
||||||
fetch: (...args) => {
|
fetch: (...args) => {
|
||||||
return fetch(...args);
|
return fetch(...args);
|
||||||
|
Reference in New Issue
Block a user