Socket
Socket
Sign inDemoInstall

@orion-js/http

Package Overview
Dependencies
Maintainers
3
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orion-js/http - npm Package Compare versions

Comparing version 3.0.37 to 3.0.40

2

lib/routes/executeRequest.js

@@ -24,3 +24,3 @@ "use strict";

// add body to response
if (result.body) {
if (!(0, lodash_1.isNil)(result.body)) {
if ((0, lodash_1.isPlainObject)(result.body)) {

@@ -27,0 +27,0 @@ res.json(result.body);

@@ -94,2 +94,21 @@ "use strict";

});
test('It should handle 302 route types', async () => {
const testRoute = (0, route_1.default)({
path: '/test7',
method: 'get',
async resolve(req, res, viewer) {
return {
statusCode: 302,
body: '',
headers: {
location: '/test8'
}
};
}
});
(0, registerRoute_1.default)(testRoute);
const response = await (0, supertest_1.default)(app).get('/test7');
expect(response.statusCode).toBe(302);
expect(response.header.location).toBe('/test8');
});
});
{
"name": "@orion-js/http",
"version": "3.0.37",
"version": "3.0.40",
"main": "lib/index.js",

@@ -42,3 +42,3 @@ "types": "lib/index.d.ts",

},
"gitHead": "741691d7603f3d42e6e3e8fa9dc0f9de51a29424"
"gitHead": "c0632276e6b8247bfe6ae2b2eee8815a3bcd441f"
}
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