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

@silenteer/natsu

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@silenteer/natsu - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

52

dist/nats-client.js

@@ -45,31 +45,39 @@ "use strict";

const injection = Object.assign(Object.assign({}, params.injections), { message, natsService: client });
const validationResult = yield handler.validate(data, injection);
if (validationResult.code !== 'OK') {
respond({
message,
data: responseCodec.encode(Object.assign(Object.assign({}, data), { code: validationResult.code, body: encodeBody(validationResult.errors) })),
});
continue;
if (handler.validate) {
const validationResult = yield handler.validate(data, injection);
if (validationResult.code !== 'OK') {
respond({
message,
data: responseCodec.encode(Object.assign(Object.assign({}, data), { code: validationResult.code, body: encodeBody(validationResult.errors) })),
});
continue;
}
}
const authorizationResult = yield handler.authorize(data, injection);
if (authorizationResult.code !== 'OK') {
respond({
message,
data: responseCodec.encode(Object.assign(Object.assign({}, data), { code: authorizationResult.code, body: encodeBody(authorizationResult.message) })),
});
continue;
if (handler.authorize) {
const authorizationResult = yield handler.authorize(data, injection);
if (authorizationResult.code !== 'OK') {
respond({
message,
data: responseCodec.encode(Object.assign(Object.assign({}, data), { code: authorizationResult.code, body: encodeBody(authorizationResult.message) })),
});
continue;
}
}
const handleResult = yield handler.handle(data, injection);
if (handleResult.code !== 200) {
if (handler.handle) {
const handleResult = yield handler.handle(data, injection);
if (handleResult.code !== 200) {
respond({
message,
data: responseCodec.encode(Object.assign(Object.assign({}, data), { code: handleResult.code, body: encodeBody(handleResult.errors) })),
});
continue;
}
respond({
message,
data: responseCodec.encode(Object.assign(Object.assign({}, data), { code: handleResult.code, body: encodeBody(handleResult.errors) })),
data: responseCodec.encode(Object.assign(Object.assign({}, data), { headers: handleResult.headers
? Object.assign(Object.assign({}, data.headers), handleResult.headers) : data.headers, code: handleResult.code, body: encodeBody(handleResult.body) })),
});
continue;
}
respond({
message,
data: responseCodec.encode(Object.assign(Object.assign({}, data), { headers: handleResult.headers
? Object.assign(Object.assign({}, data.headers), handleResult.headers) : data.headers, code: handleResult.code, body: encodeBody(handleResult.body) })),
});
respond({ message });
}

@@ -76,0 +84,0 @@ catch (error) {

{
"name": "@silenteer/natsu",
"version": "1.0.6",
"version": "1.0.7",
"license": "MIT",

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

Sorry, the diff of this file is not supported yet

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