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

@nats-io/jetstream

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nats-io/jetstream - npm Package Compare versions

Comparing version 3.0.0-14 to 3.0.0-15

2

lib/consumer.js

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

this._push(() => {
nc.publish(subj, this.consumer.api.jc.encode(opts), { reply: this.inbox });
nc.publish(subj, JSON.stringify(opts), { reply: this.inbox });
this.notify(types_1.ConsumerDebugEvents.Next, opts);

@@ -447,0 +447,0 @@ });

@@ -1,2 +0,2 @@

import type { Codec, Msg, NatsConnection, NatsConnectionImpl, RequestOptions } from "@nats-io/nats-core/internal";
import type { Msg, NatsConnection, NatsConnectionImpl, RequestOptions } from "@nats-io/nats-core/internal";
import type { JetStreamOptions } from "./types";

@@ -15,3 +15,2 @@ export declare function defaultJsOptions(opts?: JetStreamOptions): JetStreamOptions;

timeout: number;
jc: Codec<unknown>;
constructor(nc: NatsConnection, opts?: JetStreamOptions);

@@ -18,0 +17,0 @@ getOptions(): JetStreamOptions;

@@ -36,3 +36,2 @@ "use strict";

timeout;
jc;
constructor(nc, opts) {

@@ -44,3 +43,2 @@ this.nc = nc;

this.timeout = this.opts.timeout;
this.jc = (0, internal_1.JSONCodec)();
}

@@ -66,3 +64,3 @@ getOptions() {

if (data) {
a = this.jc.encode(data);
a = new TextEncoder().encode(JSON.stringify(data));
}

@@ -103,3 +101,3 @@ let { retries } = opts;

parseJsResponse(m) {
const v = this.jc.decode(m.data);
const v = JSON.parse(new TextDecoder().decode(m.data));
const r = v;

@@ -106,0 +104,0 @@ if (r.error) {

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

}
const payload = qq ? this.jc.encode(qq) : internal_1.Empty;
const payload = qq ? JSON.stringify(qq) : internal_1.Empty;
const pre = this.opts.apiPrefix || "$JS.API";

@@ -134,3 +134,3 @@ const subj = last_by_subj

json(reviver) {
return (0, internal_1.JSONCodec)(reviver).decode(this.data);
return JSON.parse(new TextDecoder().decode(this.data), reviver);
}

@@ -137,0 +137,0 @@ string() {

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

if (millis) {
payload = (0, internal_1.StringCodec)().encode(`-NAK ${JSON.stringify({ delay: (0, internal_1.nanos)(millis) })}`);
payload = new TextEncoder().encode(`-NAK ${JSON.stringify({ delay: (0, internal_1.nanos)(millis) })}`);
}

@@ -167,3 +167,3 @@ this.doAck(payload);

}
const data = (0, internal_1.JSONCodec)().encode(args);
const data = new TextEncoder().encode(JSON.stringify(args));
const payload = internal_1.DataBuffer.concat(NXT, SPACE, data);

@@ -176,3 +176,3 @@ const reqOpts = subj ? { reply: subj } : undefined;

if (reason?.length > 0) {
term = (0, internal_1.StringCodec)().encode(`+TERM ${reason}`);
term = new TextEncoder().encode(`+TERM ${reason}`);
}

@@ -179,0 +179,0 @@ this.doAck(term);

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

json(reviver) {
return (0, internal_1.JSONCodec)(reviver).decode(this.data);
return JSON.parse(new TextDecoder().decode(this.data), reviver);
}

@@ -513,0 +513,0 @@ string() {

{
"name": "@nats-io/jetstream",
"version": "3.0.0-14",
"version": "3.0.0-15",
"files": [

@@ -37,3 +37,3 @@ "lib/",

"dependencies": {
"@nats-io/nats-core": "~3.0.0-29"
"@nats-io/nats-core": "~3.0.0-30"
},

@@ -40,0 +40,0 @@ "devDependencies": {

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

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