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

@nestjs-plugins/nestjs-nats-jetstream-transport

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs-plugins/nestjs-nats-jetstream-transport - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

39

dist/server.js
"use strict";
var __asyncValues = (this && this.__asyncValues) || function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -48,23 +41,12 @@ exports.NatsJetStreamServer = void 0;

const done = (async () => {
var e_1, _a;
try {
for (var subscription_1 = __asyncValues(subscription), subscription_1_1; subscription_1_1 = await subscription_1.next(), !subscription_1_1.done;) {
const msg = subscription_1_1.value;
try {
const data = this.codec.decode(msg.data);
const context = new nats_jetstream_context_1.NatsJetStreamContext([msg]);
this.send((0, rxjs_1.from)(eventHandler(data, context)), () => null);
}
catch (err) {
this.logger.error(err.message, err.stack);
msg.term();
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
for await (const msg of subscription) {
try {
if (subscription_1_1 && !subscription_1_1.done && (_a = subscription_1.return)) await _a.call(subscription_1);
const data = this.codec.decode(msg.data);
const context = new nats_jetstream_context_1.NatsJetStreamContext([msg]);
this.send((0, rxjs_1.from)(eventHandler(data, context)), () => null);
}
finally { if (e_1) throw e_1.error; }
catch (err) {
this.logger.error(err.message, err.stack);
msg.term();
}
}

@@ -102,3 +84,6 @@ })();

if (stream) {
const streamInfo = await this.jsm.streams.update(stream.config.name, Object.assign(Object.assign({}, stream.config), streamConfig));
const streamInfo = await this.jsm.streams.update(stream.config.name, {
...stream.config,
...streamConfig,
});
this.logger.log(`Stream ${streamInfo.config.name} updated`);

@@ -105,0 +90,0 @@ }

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

description && opts.description(description);
durable && opts.durable(`${durable}-${subject.replace(".", "_").replace("*", "_ALL")}`);
durable && opts.durable(`${durable}-${subject.replaceAll(".", "_").replaceAll("*", "_ALL")}`);
filterSubject && opts.filterSubject(filterSubject);

@@ -23,0 +23,0 @@ flowControl && opts.flowControl();

{
"name": "@nestjs-plugins/nestjs-nats-jetstream-transport",
"version": "1.3.3",
"version": "1.3.4",
"description": "Nats JetStream Transport for NestJS",

@@ -33,3 +33,3 @@ "main": "dist/index.js",

"dependencies": {
"@nestjs-plugins/nestjs-nats-jetstream-transport": "^1.3.3",
"@nestjs-plugins/nestjs-nats-jetstream-transport": "^1.3.4",
"nats": "^2.6.1",

@@ -46,3 +46,3 @@ "reflect-metadata": "^0.1.13",

},
"gitHead": "66ad3e341a4b636ffea7d825898a83ea2475ca13"
"gitHead": "6a10e8182359ba43310508fa835976a99eb72e82"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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