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

ice-node

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ice-node - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

62

lib.js

@@ -68,16 +68,13 @@ const core = require("./build/Release/ice_node_core");

};
// Why setImmediate ?
setImmediate(() => {
try {
let r = handler(req);
if (r && r.then) {
r.then(ok, err);
} else {
ok(r);
}
} catch (e) {
err(e);
try {
let r = handler(req);
if (r && r.then) {
r.then(ok, err);
} else {
ok(r);
}
});
} catch (e) {
err(e);
}
}

@@ -158,24 +155,27 @@ });

core.add_endpoint(this.server, rt.path, async call_info => {
let req = new Request(self, rt, call_info);
for (const mw of mws) {
try {
await mw.handler(req, mw);
} catch (e) {
if (e instanceof Response) {
e.send(self, call_info);
} else {
console.log(e);
new Response({
status: 500,
body: "Internal error"
}).send(self, call_info);
core.add_endpoint(this.server, rt.path, call_info => {
// Why setImmediate ?
setImmediate(async () => {
let req = new Request(self, rt, call_info);
for (const mw of mws) {
try {
await mw.handler(req, mw);
} catch (e) {
if (e instanceof Response) {
e.send(self, call_info);
} else {
console.log(e);
new Response({
status: 500,
body: "Internal error"
}).send(self, call_info);
}
return;
}
return;
}
}
rt.handler(req);
rt.handler(req);
});
}, flags);
}
core.add_endpoint(this.server, "", call_info => this.not_found_handler(call_info));
core.add_endpoint(this.server, "", call_info => setImmediate(() => this.not_found_handler(call_info)));

@@ -182,0 +182,0 @@ core.listen(this.server, addr);

{
"name": "ice-node",
"version": "0.1.4",
"version": "0.1.5",
"description": "Bindings for the Ice Web Framework",

@@ -5,0 +5,0 @@ "main": "lib.js",

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