Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@whatwg-node/server

Package Overview
Dependencies
Maintainers
1
Versions
736
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@whatwg-node/server - npm Package Compare versions

Comparing version 0.9.54 to 0.9.55-alpha-20241113130810-11f18a2ca304ad9b9e37556238407455c4e28c61

76

cjs/utils.js

@@ -448,70 +448,14 @@ "use strict";

}
originalCtx = {};
return {
waitUntil(promise) {
waitUntilPromises?.push(promise.catch(err => console.error(err)));
},
};
}
const extraProps = {};
const deletedProps = new Set();
return new Proxy(originalCtx, {
get(originalCtx, prop) {
if (waitUntilPromises != null && prop === 'waitUntil') {
return function waitUntil(promise) {
waitUntilPromises.push(promise.catch(err => console.error(err)));
};
}
const extraPropVal = extraProps[prop];
if (extraPropVal != null) {
if (typeof extraPropVal === 'function') {
return extraPropVal.bind(extraProps);
}
return extraPropVal;
}
if (deletedProps.has(prop)) {
return undefined;
}
return originalCtx[prop];
return Object.create(originalCtx, {
waitUntil: {
value(promise) {
waitUntilPromises?.push(promise.catch(err => console.error(err)));
},
},
set(_originalCtx, prop, value) {
extraProps[prop] = value;
return true;
},
has(originalCtx, prop) {
if (waitUntilPromises != null && prop === 'waitUntil') {
return true;
}
if (deletedProps.has(prop)) {
return false;
}
if (prop in extraProps) {
return true;
}
return prop in originalCtx;
},
defineProperty(_originalCtx, prop, descriptor) {
return Reflect.defineProperty(extraProps, prop, descriptor);
},
deleteProperty(_originalCtx, prop) {
if (prop in extraProps) {
return Reflect.deleteProperty(extraProps, prop);
}
deletedProps.add(prop);
return true;
},
ownKeys(originalCtx) {
const extraKeys = Reflect.ownKeys(extraProps);
const originalKeys = Reflect.ownKeys(originalCtx);
const deletedKeys = Array.from(deletedProps);
const allKeys = new Set(extraKeys.concat(originalKeys.filter(keys => !deletedKeys.includes(keys))));
if (waitUntilPromises != null) {
allKeys.add('waitUntil');
}
return Array.from(allKeys);
},
getOwnPropertyDescriptor(originalCtx, prop) {
if (prop in extraProps) {
return Reflect.getOwnPropertyDescriptor(extraProps, prop);
}
if (deletedProps.has(prop)) {
return undefined;
}
return Reflect.getOwnPropertyDescriptor(originalCtx, prop);
},
});

@@ -518,0 +462,0 @@ }

@@ -426,70 +426,14 @@ export function isAsyncIterable(body) {

}
originalCtx = {};
return {
waitUntil(promise) {
waitUntilPromises?.push(promise.catch(err => console.error(err)));
},
};
}
const extraProps = {};
const deletedProps = new Set();
return new Proxy(originalCtx, {
get(originalCtx, prop) {
if (waitUntilPromises != null && prop === 'waitUntil') {
return function waitUntil(promise) {
waitUntilPromises.push(promise.catch(err => console.error(err)));
};
}
const extraPropVal = extraProps[prop];
if (extraPropVal != null) {
if (typeof extraPropVal === 'function') {
return extraPropVal.bind(extraProps);
}
return extraPropVal;
}
if (deletedProps.has(prop)) {
return undefined;
}
return originalCtx[prop];
return Object.create(originalCtx, {
waitUntil: {
value(promise) {
waitUntilPromises?.push(promise.catch(err => console.error(err)));
},
},
set(_originalCtx, prop, value) {
extraProps[prop] = value;
return true;
},
has(originalCtx, prop) {
if (waitUntilPromises != null && prop === 'waitUntil') {
return true;
}
if (deletedProps.has(prop)) {
return false;
}
if (prop in extraProps) {
return true;
}
return prop in originalCtx;
},
defineProperty(_originalCtx, prop, descriptor) {
return Reflect.defineProperty(extraProps, prop, descriptor);
},
deleteProperty(_originalCtx, prop) {
if (prop in extraProps) {
return Reflect.deleteProperty(extraProps, prop);
}
deletedProps.add(prop);
return true;
},
ownKeys(originalCtx) {
const extraKeys = Reflect.ownKeys(extraProps);
const originalKeys = Reflect.ownKeys(originalCtx);
const deletedKeys = Array.from(deletedProps);
const allKeys = new Set(extraKeys.concat(originalKeys.filter(keys => !deletedKeys.includes(keys))));
if (waitUntilPromises != null) {
allKeys.add('waitUntil');
}
return Array.from(allKeys);
},
getOwnPropertyDescriptor(originalCtx, prop) {
if (prop in extraProps) {
return Reflect.getOwnPropertyDescriptor(extraProps, prop);
}
if (deletedProps.has(prop)) {
return undefined;
}
return Reflect.getOwnPropertyDescriptor(originalCtx, prop);
},
});

@@ -496,0 +440,0 @@ }

2

package.json
{
"name": "@whatwg-node/server",
"version": "0.9.54",
"version": "0.9.55-alpha-20241113130810-11f18a2ca304ad9b9e37556238407455c4e28c61",
"description": "Fetch API compliant HTTP Server adapter",

@@ -5,0 +5,0 @@ "sideEffects": false,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc