cull paths unlikely to escape & add strictRewrites flag

This commit is contained in:
velzie 2024-10-20 12:05:04 -04:00
parent ba0aa479f0
commit bdf5fd4f95
No known key found for this signature in database
GPG key ID: AA51AEFB0A1F3820
6 changed files with 25 additions and 7 deletions

View file

@ -45,12 +45,13 @@ export default function (client: ScramjetClient, self: typeof globalThis) {
client.Proxy("Promise.prototype.catch", {
apply(ctx) {
ctx.args[0] = new Proxy(ctx.args[0], {
apply(target, thisArg, argArray) {
// console.warn("CAUGHT PROMISE REJECTION", argArray);
Reflect.apply(target, thisArg, argArray);
},
});
if (ctx.args[0])
ctx.args[0] = new Proxy(ctx.args[0], {
apply(target, thisArg, argArray) {
// console.warn("CAUGHT PROMISE REJECTION", argArray);
Reflect.apply(target, thisArg, argArray);
},
});
},
});
}