You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return`t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(${e}&&e[${e}]){var t;if("function"!=typeof(t=e[${e}]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,${e},{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),${e}&&Object.defineProperty(t,${e},{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,${e_.toLowerCase()}(e))}`.trim().toString();
12
-
})
6
+
returnvars.map((e_)=>{
7
+
return`t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(${e}&&e[${e}]){var t;if("function"!=typeof(t=e[${e}]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,${e},{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),${e}&&Object.defineProperty(t,${e},{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,${e_.toLowerCase()}(e))}`
8
+
.trim()
9
+
.toString();
10
+
});
13
11
});
14
12
15
13
conststringToFix='t.promisify=function(e){}';
@@ -26,7 +24,8 @@ if (content !== fixedContent) {
26
24
console.log('Worker bundle patched');
27
25
}else{
28
26
if(!content.includes(stringToFix)){
29
-
thrownewError('Unable to fix worker bundle');
27
+
console.info('Worker bundle already patched');
28
+
// throw new Error('Unable to fix worker bundle');
0 commit comments