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

nats

Package Overview
Dependencies
Maintainers
3
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nats - npm Package Compare versions

Comparing version 2.17.1-1 to 2.17.1-2

6

lib/jetstream/internal_mod.d.ts
export { checkJsError, isFlowControlMsg, isHeartbeatMsg, millis, nanos, } from "./jsutil";
export { AdvisoryKind, consumerOpts, DirectMsgHeaders, isConsumerOptsBuilder, JsHeaders, RepublishHeaders, } from "./types";
export type { Advisory, Closed, ConsumerInfoable, ConsumerOpts, ConsumerOptsBuilder, Consumers, Destroyable, JetStreamClient, JetStreamManager, JetStreamManagerOptions, JetStreamOptions, JetStreamPublishOptions, JetStreamPullSubscription, JetStreamSubscription, JetStreamSubscriptionInfoable, JetStreamSubscriptionOptions, JsMsgCallback, KV, KvCodec, KvCodecs, KvEntry, KvLimits, KvOptions, KvPutOptions, KvStatus, KvWatchInclude, KvWatchOptions, ObjectInfo, ObjectResult, ObjectStore, ObjectStoreLink, ObjectStoreMeta, ObjectStoreMetaOptions, ObjectStoreOptions, ObjectStorePutOpts, ObjectStoreStatus, PubAck, Pullable, RoKV, StoredMsg, Stream, StreamAPI, Streams, Views, } from "./types";
export type { Advisory, Closed, ConsumerInfoable, ConsumerOpts, ConsumerOptsBuilder, Consumers, Destroyable, JetStreamClient, JetStreamManager, JetStreamOptions, JetStreamPublishOptions, JetStreamPullSubscription, JetStreamSubscription, JetStreamSubscriptionInfoable, JetStreamSubscriptionOptions, JsMsgCallback, KV, KvCodec, KvCodecs, KvEntry, KvLimits, KvOptions, KvPutOptions, KvStatus, KvWatchInclude, KvWatchOptions, ObjectInfo, ObjectResult, ObjectStore, ObjectStoreLink, ObjectStoreMeta, ObjectStoreMetaOptions, ObjectStoreOptions, ObjectStorePutOpts, ObjectStoreStatus, PubAck, Pullable, RoKV, StoredMsg, Stream, StreamAPI, Streams, Views, } from "./types";
export type { StreamNames } from "./jsbaseclient_api";
export type { AccountLimits, ApiPagedRequest, ClusterInfo, ConsumerConfig, ConsumerInfo, ConsumerUpdateConfig, ExternalStream, JetStreamAccountStats, JetStreamApiStats, JetStreamUsageAccountLimits, LastForMsgRequest, LostStreamData, MsgDeleteRequest, MsgRequest, PeerInfo, Placement, PullOptions, PurgeBySeq, PurgeBySubject, PurgeOpts, PurgeResponse, PurgeTrimOpts, Republish, SeqMsgRequest, SequenceInfo, StreamAlternate, StreamConfig, StreamConsumerLimits, StreamInfo, StreamSource, StreamSourceInfo, StreamState, StreamUpdateConfig, SubjectTransformConfig, } from "./jsapi_types";
export type { AccountLimits, ApiPagedRequest, ClusterInfo, ConsumerConfig, ConsumerInfo, ConsumerUpdateConfig, ExternalStream, JetStreamAccountStats, JetStreamApiStats, JetStreamUsageAccountLimits, LastForMsgRequest, LostStreamData, MsgDeleteRequest, MsgRequest, PeerInfo, Placement, PullOptions, PurgeBySeq, PurgeBySubject, PurgeOpts, PurgeResponse, PurgeTrimOpts, Republish, SeqMsgRequest, SequenceInfo, StreamAlternate, StreamConfig, StreamInfo, StreamSource, StreamSourceInfo, StreamState, StreamUpdateConfig, SubjectTransformConfig, } from "./jsapi_types";
export type { JsMsg } from "./jsmsg";
export type { Lister } from "./jslister";
export { AckPolicy, DeliverPolicy, DiscardPolicy, ReplayPolicy, RetentionPolicy, StorageType, StoreCompression, } from "./jsapi_types";
export { AckPolicy, DeliverPolicy, DiscardPolicy, ReplayPolicy, RetentionPolicy, StorageType, } from "./jsapi_types";
export type { ConsumerAPI } from "./jsmconsumer_api";

@@ -10,0 +10,0 @@ export type { DeliveryInfo, StreamInfoRequestOptions } from "./jsapi_types";

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConsumerEvents = exports.ConsumerDebugEvents = exports.StoreCompression = exports.StorageType = exports.RetentionPolicy = exports.ReplayPolicy = exports.DiscardPolicy = exports.DeliverPolicy = exports.AckPolicy = exports.RepublishHeaders = exports.JsHeaders = exports.isConsumerOptsBuilder = exports.DirectMsgHeaders = exports.consumerOpts = exports.AdvisoryKind = exports.nanos = exports.millis = exports.isHeartbeatMsg = exports.isFlowControlMsg = exports.checkJsError = void 0;
exports.ConsumerEvents = exports.ConsumerDebugEvents = exports.StorageType = exports.RetentionPolicy = exports.ReplayPolicy = exports.DiscardPolicy = exports.DeliverPolicy = exports.AckPolicy = exports.RepublishHeaders = exports.JsHeaders = exports.isConsumerOptsBuilder = exports.DirectMsgHeaders = exports.consumerOpts = exports.AdvisoryKind = exports.nanos = exports.millis = exports.isHeartbeatMsg = exports.isFlowControlMsg = exports.checkJsError = void 0;
/*

@@ -38,3 +38,2 @@ * Copyright 2023 The NATS Authors

Object.defineProperty(exports, "StorageType", { enumerable: true, get: function () { return jsapi_types_1.StorageType; } });
Object.defineProperty(exports, "StoreCompression", { enumerable: true, get: function () { return jsapi_types_1.StoreCompression; } });
var consumer_1 = require("./consumer");

@@ -41,0 +40,0 @@ Object.defineProperty(exports, "ConsumerDebugEvents", { enumerable: true, get: function () { return consumer_1.ConsumerDebugEvents; } });

@@ -24,3 +24,3 @@ import { BaseApiClient } from "./jsbaseclient_api";

constructor(nc: NatsConnection, opts?: JetStreamOptions);
jetstreamManager(checkAPI?: boolean): Promise<JetStreamManager>;
jetstreamManager(): Promise<JetStreamManager>;
get apiPrefix(): string;

@@ -27,0 +27,0 @@ get views(): Views;

@@ -88,5 +88,4 @@ "use strict";

}
jetstreamManager(checkAPI) {
const opts = Object.assign({ checkAPI }, this.opts);
return this.nc.jetstreamManager(opts);
jetstreamManager() {
return this.nc.jetstreamManager(this.opts);
}

@@ -93,0 +92,0 @@ get apiPrefix() {

export { checkJsError, isFlowControlMsg, isHeartbeatMsg, millis, nanos, } from "./internal_mod";
export { AckPolicy, AdvisoryKind, ConsumerDebugEvents, ConsumerEvents, DeliverPolicy, DirectMsgHeaders, DiscardPolicy, JsHeaders, ReplayPolicy, RepublishHeaders, RetentionPolicy, StorageType, StoreCompression, } from "./internal_mod";
export type { AccountLimits, Advisory, ApiPagedRequest, Closed, ClusterInfo, ConsumeBytes, ConsumeCallback, ConsumeMessages, ConsumeOptions, Consumer, ConsumerAPI, ConsumerCallbackFn, ConsumerConfig, ConsumerInfo, ConsumerInfoable, ConsumerMessages, ConsumerOpts, ConsumerOptsBuilder, Consumers, ConsumerStatus, ConsumerUpdateConfig, DeliveryInfo, Destroyable, Expires, ExternalStream, FetchBytes, FetchMessages, FetchOptions, IdleHeartbeat, JetStreamAccountStats, JetStreamApiStats, JetStreamClient, JetStreamManager, JetStreamManagerOptions, JetStreamOptions, JetStreamPublishOptions, JetStreamPullSubscription, JetStreamSubscription, JetStreamSubscriptionOptions, JetStreamUsageAccountLimits, JsMsg, JsMsgCallback, KV, KvCodec, KvCodecs, KvEntry, KvLimits, KvOptions, KvPutOptions, KvStatus, KvWatchInclude, KvWatchOptions, LastForMsgRequest, Lister, LostStreamData, MaxBytes, MaxMessages, MsgDeleteRequest, MsgRequest, ObjectInfo, ObjectResult, ObjectStore, ObjectStoreLink, ObjectStoreMeta, ObjectStoreMetaOptions, ObjectStoreOptions, ObjectStorePutOpts, ObjectStoreStatus, OrderedConsumerOptions, PeerInfo, Placement, PubAck, Pullable, PullOptions, PurgeBySeq, PurgeBySubject, PurgeOpts, PurgeResponse, PurgeTrimOpts, Republish, RoKV, SeqMsgRequest, SequenceInfo, StoredMsg, Stream, StreamAlternate, StreamAPI, StreamConfig, StreamConsumerLimits, StreamInfo, StreamInfoRequestOptions, StreamNames, Streams, StreamSource, StreamSourceInfo, StreamState, StreamUpdateConfig, SubjectTransformConfig, ThresholdBytes, ThresholdMessages, Views, } from "./internal_mod";
export { AckPolicy, AdvisoryKind, ConsumerDebugEvents, ConsumerEvents, DeliverPolicy, DirectMsgHeaders, DiscardPolicy, JsHeaders, ReplayPolicy, RepublishHeaders, RetentionPolicy, StorageType, } from "./internal_mod";
export type { AccountLimits, Advisory, ApiPagedRequest, Closed, ClusterInfo, ConsumeBytes, ConsumeCallback, ConsumeMessages, ConsumeOptions, Consumer, ConsumerAPI, ConsumerCallbackFn, ConsumerConfig, ConsumerInfo, ConsumerInfoable, ConsumerMessages, ConsumerOpts, ConsumerOptsBuilder, Consumers, ConsumerStatus, ConsumerUpdateConfig, DeliveryInfo, Destroyable, Expires, ExternalStream, FetchBytes, FetchMessages, FetchOptions, IdleHeartbeat, JetStreamAccountStats, JetStreamApiStats, JetStreamClient, JetStreamManager, JetStreamOptions, JetStreamPublishOptions, JetStreamPullSubscription, JetStreamSubscription, JetStreamSubscriptionOptions, JetStreamUsageAccountLimits, JsMsg, JsMsgCallback, KV, KvCodec, KvCodecs, KvEntry, KvLimits, KvOptions, KvPutOptions, KvStatus, KvWatchInclude, KvWatchOptions, LastForMsgRequest, Lister, LostStreamData, MaxBytes, MaxMessages, MsgDeleteRequest, MsgRequest, ObjectInfo, ObjectResult, ObjectStore, ObjectStoreLink, ObjectStoreMeta, ObjectStoreMetaOptions, ObjectStoreOptions, ObjectStorePutOpts, ObjectStoreStatus, OrderedConsumerOptions, PeerInfo, Placement, PubAck, Pullable, PullOptions, PurgeBySeq, PurgeBySubject, PurgeOpts, PurgeResponse, PurgeTrimOpts, Republish, RoKV, SeqMsgRequest, SequenceInfo, StoredMsg, Stream, StreamAlternate, StreamAPI, StreamConfig, StreamInfo, StreamInfoRequestOptions, StreamNames, Streams, StreamSource, StreamSourceInfo, StreamState, StreamUpdateConfig, SubjectTransformConfig, ThresholdBytes, ThresholdMessages, Views, } from "./internal_mod";
export { consumerOpts } from "./types";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.consumerOpts = exports.StoreCompression = exports.StorageType = exports.RetentionPolicy = exports.RepublishHeaders = exports.ReplayPolicy = exports.JsHeaders = exports.DiscardPolicy = exports.DirectMsgHeaders = exports.DeliverPolicy = exports.ConsumerEvents = exports.ConsumerDebugEvents = exports.AdvisoryKind = exports.AckPolicy = exports.nanos = exports.millis = exports.isHeartbeatMsg = exports.isFlowControlMsg = exports.checkJsError = void 0;
exports.consumerOpts = exports.StorageType = exports.RetentionPolicy = exports.RepublishHeaders = exports.ReplayPolicy = exports.JsHeaders = exports.DiscardPolicy = exports.DirectMsgHeaders = exports.DeliverPolicy = exports.ConsumerEvents = exports.ConsumerDebugEvents = exports.AdvisoryKind = exports.AckPolicy = exports.nanos = exports.millis = exports.isHeartbeatMsg = exports.isFlowControlMsg = exports.checkJsError = void 0;
/*

@@ -37,5 +37,4 @@ * Copyright 2023 The NATS Authors

Object.defineProperty(exports, "StorageType", { enumerable: true, get: function () { return internal_mod_2.StorageType; } });
Object.defineProperty(exports, "StoreCompression", { enumerable: true, get: function () { return internal_mod_2.StoreCompression; } });
var types_1 = require("./types");
Object.defineProperty(exports, "consumerOpts", { enumerable: true, get: function () { return types_1.consumerOpts; } });
//# sourceMappingURL=mod.js.map

@@ -144,5 +144,4 @@ "use strict";

isLink() {
var _a, _b;
return (((_a = this.info.options) === null || _a === void 0 ? void 0 : _a.link) !== undefined) &&
(((_b = this.info.options) === null || _b === void 0 ? void 0 : _b.link) !== null);
var _a;
return ((_a = this.info.options) === null || _a === void 0 ? void 0 : _a.link) !== undefined;
}

@@ -563,3 +562,2 @@ }

name: n,
bucket: info.bucket,
options: { link: link },

@@ -566,0 +564,0 @@ };

import { Consumer, OrderedConsumerOptions } from "./consumer";
import { JetStreamOptions, MsgHdrs, Nanos, NatsError, Payload, QueuedIterator, ReviverFn, Sub } from "../nats-base-client/core";
export type { JetStreamManagerOptions, JetStreamOptions, } from "../nats-base-client/core";
export type { JetStreamOptions } from "../nats-base-client/core";
import { TypedSubscriptionOptions } from "../nats-base-client/typedsub";

@@ -325,3 +325,3 @@ import { ConsumerConfig, ConsumerInfo, DirectMsgRequest, JetStreamAccountStats, MsgRequest, Placement, PullOptions, PurgeOpts, PurgeResponse, Republish, StorageType, StreamAlternate, StreamConfig, StreamInfo, StreamInfoRequestOptions, StreamSource, StreamUpdateConfig } from "./jsapi_types";

*/
jetstreamManager(checkAPI?: boolean): Promise<JetStreamManager>;
jetstreamManager(): Promise<JetStreamManager>;
getOptions(): JetStreamOptions;

@@ -328,0 +328,0 @@ }

@@ -398,9 +398,2 @@ import { JetStreamClient, JetStreamManager } from "../jetstream/types";

}
export interface JetStreamManagerOptions extends JetStreamOptions {
/**
* Allows disabling a check on the account for JetStream enablement see
* {@link JetStreamManager.getAccountInfo()}.
*/
checkAPI?: boolean;
}
export type Payload = Uint8Array | string;

@@ -508,3 +501,3 @@ export interface NatsConnection {

*/
jetstreamManager(opts?: JetStreamManagerOptions): Promise<JetStreamManager>;
jetstreamManager(opts?: JetStreamOptions): Promise<JetStreamManager>;
/**

@@ -572,13 +565,3 @@ * Returns a {@link JetStreamClient} which allows publishing messages to

}
export type SyncIterator<T> = {
next(): Promise<T | null>;
};
/**
* syncIterator is a utility function that allows an AsyncIterator to be triggered
* by calling next() - the utility will yield null if the underlying iterator is closed.
* Note it is possibly an error to call use this function on an AsyncIterable that has
* already been started (Symbol.asyncIterator() has been called) from a looping construct.
*/
export declare function syncIterator<T>(src: AsyncIterable<T>): SyncIterator<T>;
/**
* Basic interface to a Subscription type

@@ -681,3 +664,3 @@ */

* Optional queue group to run this particular endpoint in. The service's configuration
* queue configuration will be used. See {@link ServiceConfig}.
* queue configuration will be used. See {@link ServiceConfig.queue}.
*/

@@ -717,3 +700,3 @@ queue?: string;

* the group, will use the specified queue unless the endpoint overrides it.
* see {@link EndpointOptions} and {@link ServiceConfig}.
* see {@link EndpointOptions.queue} and {@link ServiceConfig.queue}.
* @param subject

@@ -720,0 +703,0 @@ * @param queue

@@ -16,13 +16,4 @@ "use strict";

*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServiceVerb = exports.DEFAULT_HOST = exports.DEFAULT_PORT = exports.createInbox = exports.ServiceError = exports.ServiceErrorCodeHeader = exports.ServiceErrorHeader = exports.ServiceResponseType = exports.syncIterator = exports.RequestStrategy = exports.Match = exports.NatsError = exports.Messages = exports.isNatsError = exports.ErrorCode = exports.DebugEvents = exports.Events = void 0;
exports.ServiceVerb = exports.DEFAULT_HOST = exports.DEFAULT_PORT = exports.createInbox = exports.ServiceError = exports.ServiceErrorCodeHeader = exports.ServiceErrorHeader = exports.ServiceResponseType = exports.RequestStrategy = exports.Match = exports.NatsError = exports.Messages = exports.isNatsError = exports.ErrorCode = exports.DebugEvents = exports.Events = void 0;
const nuid_1 = require("./nuid");

@@ -179,23 +170,2 @@ /**

})(RequestStrategy || (exports.RequestStrategy = RequestStrategy = {}));
/**
* syncIterator is a utility function that allows an AsyncIterator to be triggered
* by calling next() - the utility will yield null if the underlying iterator is closed.
* Note it is possibly an error to call use this function on an AsyncIterable that has
* already been started (Symbol.asyncIterator() has been called) from a looping construct.
*/
function syncIterator(src) {
const iter = src[Symbol.asyncIterator]();
return {
next() {
return __awaiter(this, void 0, void 0, function* () {
const m = yield iter.next();
if (m.done) {
return Promise.resolve(null);
}
return Promise.resolve(m.value);
});
},
};
}
exports.syncIterator = syncIterator;
var ServiceResponseType;

@@ -202,0 +172,0 @@ (function (ServiceResponseType) {

@@ -21,4 +21,5 @@ export { NatsConnectionImpl } from "./nats";

export * from "./nkeys";
export type { DispatchedFn, IngestionFilterFn, IngestionFilterFnResult, ProtocolFilterFn, } from "./queued_iterator";
export type { DispatchedFn } from "./queued_iterator";
export { QueuedIteratorImpl } from "./queued_iterator";
export type { IngestionFilterFn, IngestionFilterFnResult, ProtocolFilterFn, } from "./queued_iterator";
export type { ParserEvent } from "./parser";

@@ -38,4 +39,9 @@ export { Kind, Parser, State } from "./parser";

export { extractProtocolMessage } from "./transport";
export type { ApiError, Auth, Authenticator, ConnectionOptions, Dispatcher, Endpoint, EndpointInfo, EndpointOptions, EndpointStats, JwtAuth, Msg, MsgHdrs, NamedEndpointStats, Nanos, NatsConnection, NKeyAuth, NoAuth, Payload, PublishOptions, QueuedIterator, Request, RequestManyOptions, RequestOptions, ReviverFn, Server, ServerInfo, ServersChanged, Service, ServiceConfig, ServiceGroup, ServiceHandler, ServiceIdentity, ServiceInfo, ServiceMetadata, ServiceMsg, ServiceResponse, ServicesAPI, ServiceStats, Stats, Status, Sub, SubOpts, Subscription, SubscriptionOptions, SyncIterator, TlsOptions, TokenAuth, UserPass, } from "./core";
export { createInbox, DebugEvents, ErrorCode, Events, isNatsError, Match, NatsError, RequestStrategy, ServiceError, ServiceErrorCodeHeader, ServiceErrorHeader, ServiceResponseType, ServiceVerb, syncIterator, } from "./core";
export { SubscriptionImpl, Subscriptions } from "./protocol";
export type { Msg, Nanos, NatsConnection, Payload, PublishOptions, RequestManyOptions, RequestOptions, ReviverFn, Server, ServerInfo, ServersChanged, Stats, Status, Sub, SubOpts, Subscription, SubscriptionOptions, } from "./core";
export { DebugEvents, Events, RequestStrategy, ServiceResponseType, } from "./core";
export { ServiceErrorCodeHeader, ServiceErrorHeader } from "./core";
export type { ApiError, Auth, Authenticator, ConnectionOptions, Dispatcher, Endpoint, EndpointInfo, EndpointOptions, EndpointStats, JwtAuth, MsgHdrs, NamedEndpointStats, NKeyAuth, NoAuth, QueuedIterator, Request, Service, ServiceConfig, ServiceGroup, ServiceHandler, ServiceIdentity, ServiceInfo, ServiceMetadata, ServiceMsg, ServiceResponse, ServicesAPI, ServiceStats, TlsOptions, TokenAuth, UserPass, } from "./core";
export { createInbox, ErrorCode, isNatsError, Match, NatsError, ServiceError, } from "./core";
export { SubscriptionImpl } from "./protocol";
export { Subscriptions } from "./protocol";
export { ServiceVerb } from "./core";

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

exports.NoopKvCodecs = exports.defaultBucketOpts = exports.Bucket = exports.Base64KeyCodec = exports.TypedSubscription = exports.parseIP = exports.isIP = exports.TE = exports.TD = exports.Metric = exports.Bench = exports.writeAll = exports.readAll = exports.MAX_SIZE = exports.DenoBuffer = exports.State = exports.Parser = exports.Kind = exports.QueuedIteratorImpl = exports.StringCodec = exports.JSONCodec = exports.usernamePasswordAuthenticator = exports.tokenAuthenticator = exports.nkeyAuthenticator = exports.jwtAuthenticator = exports.credsAuthenticator = exports.RequestOne = exports.checkUnsupportedOption = exports.checkOptions = exports.buildAuthenticator = exports.DataBuffer = exports.MuxSubscription = exports.Heartbeat = exports.MsgHdrsImpl = exports.headers = exports.canonicalMIMEHeaderKey = exports.timeout = exports.render = exports.extend = exports.delay = exports.deferred = exports.collect = exports.ProtocolHandler = exports.INFO = exports.Connect = exports.setTransportFactory = exports.MsgImpl = exports.nuid = exports.Nuid = exports.NatsConnectionImpl = void 0;
exports.Subscriptions = exports.SubscriptionImpl = exports.syncIterator = exports.ServiceVerb = exports.ServiceResponseType = exports.ServiceErrorHeader = exports.ServiceErrorCodeHeader = exports.ServiceError = exports.RequestStrategy = exports.NatsError = exports.Match = exports.isNatsError = exports.Events = exports.ErrorCode = exports.DebugEvents = exports.createInbox = exports.extractProtocolMessage = exports.Empty = exports.parseSemVer = exports.compare = void 0;
exports.ServiceVerb = exports.Subscriptions = exports.SubscriptionImpl = exports.ServiceError = exports.NatsError = exports.Match = exports.isNatsError = exports.ErrorCode = exports.createInbox = exports.ServiceErrorHeader = exports.ServiceErrorCodeHeader = exports.ServiceResponseType = exports.RequestStrategy = exports.Events = exports.DebugEvents = exports.extractProtocolMessage = exports.Empty = exports.parseSemVer = exports.compare = void 0;
var nats_1 = require("./nats");

@@ -101,19 +101,22 @@ Object.defineProperty(exports, "NatsConnectionImpl", { enumerable: true, get: function () { return nats_1.NatsConnectionImpl; } });

var core_1 = require("./core");
Object.defineProperty(exports, "createInbox", { enumerable: true, get: function () { return core_1.createInbox; } });
Object.defineProperty(exports, "DebugEvents", { enumerable: true, get: function () { return core_1.DebugEvents; } });
Object.defineProperty(exports, "ErrorCode", { enumerable: true, get: function () { return core_1.ErrorCode; } });
Object.defineProperty(exports, "Events", { enumerable: true, get: function () { return core_1.Events; } });
Object.defineProperty(exports, "isNatsError", { enumerable: true, get: function () { return core_1.isNatsError; } });
Object.defineProperty(exports, "Match", { enumerable: true, get: function () { return core_1.Match; } });
Object.defineProperty(exports, "NatsError", { enumerable: true, get: function () { return core_1.NatsError; } });
Object.defineProperty(exports, "RequestStrategy", { enumerable: true, get: function () { return core_1.RequestStrategy; } });
Object.defineProperty(exports, "ServiceError", { enumerable: true, get: function () { return core_1.ServiceError; } });
Object.defineProperty(exports, "ServiceErrorCodeHeader", { enumerable: true, get: function () { return core_1.ServiceErrorCodeHeader; } });
Object.defineProperty(exports, "ServiceErrorHeader", { enumerable: true, get: function () { return core_1.ServiceErrorHeader; } });
Object.defineProperty(exports, "ServiceResponseType", { enumerable: true, get: function () { return core_1.ServiceResponseType; } });
Object.defineProperty(exports, "ServiceVerb", { enumerable: true, get: function () { return core_1.ServiceVerb; } });
Object.defineProperty(exports, "syncIterator", { enumerable: true, get: function () { return core_1.syncIterator; } });
var core_2 = require("./core");
Object.defineProperty(exports, "ServiceErrorCodeHeader", { enumerable: true, get: function () { return core_2.ServiceErrorCodeHeader; } });
Object.defineProperty(exports, "ServiceErrorHeader", { enumerable: true, get: function () { return core_2.ServiceErrorHeader; } });
var core_3 = require("./core");
Object.defineProperty(exports, "createInbox", { enumerable: true, get: function () { return core_3.createInbox; } });
Object.defineProperty(exports, "ErrorCode", { enumerable: true, get: function () { return core_3.ErrorCode; } });
Object.defineProperty(exports, "isNatsError", { enumerable: true, get: function () { return core_3.isNatsError; } });
Object.defineProperty(exports, "Match", { enumerable: true, get: function () { return core_3.Match; } });
Object.defineProperty(exports, "NatsError", { enumerable: true, get: function () { return core_3.NatsError; } });
Object.defineProperty(exports, "ServiceError", { enumerable: true, get: function () { return core_3.ServiceError; } });
var protocol_2 = require("./protocol");
Object.defineProperty(exports, "SubscriptionImpl", { enumerable: true, get: function () { return protocol_2.SubscriptionImpl; } });
Object.defineProperty(exports, "Subscriptions", { enumerable: true, get: function () { return protocol_2.Subscriptions; } });
var protocol_3 = require("./protocol");
Object.defineProperty(exports, "Subscriptions", { enumerable: true, get: function () { return protocol_3.Subscriptions; } });
var core_4 = require("./core");
Object.defineProperty(exports, "ServiceVerb", { enumerable: true, get: function () { return core_4.ServiceVerb; } });
//# sourceMappingURL=internal_mod.js.map

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

export { Bench, buildAuthenticator, canonicalMIMEHeaderKey, createInbox, credsAuthenticator, DebugEvents, deferred, Empty, ErrorCode, Events, headers, JSONCodec, jwtAuthenticator, Match, Metric, MsgHdrsImpl, NatsError, nkeyAuthenticator, nkeys, Nuid, nuid, RequestStrategy, ServiceError, ServiceErrorCodeHeader, ServiceErrorHeader, ServiceResponseType, ServiceVerb, StringCodec, syncIterator, tokenAuthenticator, usernamePasswordAuthenticator, } from "./internal_mod";
export type { ApiError, Auth, Authenticator, BenchOpts, Codec, ConnectionOptions, Deferred, DispatchedFn, Endpoint, EndpointInfo, EndpointOptions, EndpointStats, IngestionFilterFn, IngestionFilterFnResult, JwtAuth, Msg, MsgAdapter, MsgHdrs, NamedEndpointStats, Nanos, NatsConnection, NKeyAuth, NoAuth, Payload, Perf, ProtocolFilterFn, PublishOptions, QueuedIterator, RequestManyOptions, RequestOptions, ReviverFn, ServerInfo, ServersChanged, Service, ServiceClient, ServiceConfig, ServiceGroup, ServiceHandler, ServiceIdentity, ServiceInfo, ServiceMetadata, ServiceMsg, ServiceResponse, ServicesAPI, ServiceStats, Stats, Status, Sub, SubOpts, Subscription, SubscriptionOptions, SyncIterator, TlsOptions, TokenAuth, TypedCallback, TypedSubscriptionOptions, UserPass, } from "./internal_mod";
export { Bench, buildAuthenticator, canonicalMIMEHeaderKey, createInbox, credsAuthenticator, DebugEvents, deferred, Empty, ErrorCode, Events, headers, JSONCodec, jwtAuthenticator, Match, Metric, MsgHdrsImpl, NatsError, nkeyAuthenticator, nkeys, Nuid, nuid, RequestStrategy, ServiceError, ServiceErrorCodeHeader, ServiceErrorHeader, ServiceResponseType, ServiceVerb, StringCodec, tokenAuthenticator, usernamePasswordAuthenticator, } from "./internal_mod";
export type { ApiError, Auth, Authenticator, BenchOpts, Codec, ConnectionOptions, Deferred, DispatchedFn, Endpoint, EndpointInfo, EndpointOptions, EndpointStats, IngestionFilterFn, IngestionFilterFnResult, JwtAuth, Msg, MsgAdapter, MsgHdrs, NamedEndpointStats, Nanos, NatsConnection, NKeyAuth, NoAuth, Payload, Perf, ProtocolFilterFn, PublishOptions, QueuedIterator, RequestManyOptions, RequestOptions, ReviverFn, ServerInfo, ServersChanged, Service, ServiceClient, ServiceConfig, ServiceGroup, ServiceHandler, ServiceIdentity, ServiceInfo, ServiceMetadata, ServiceMsg, ServiceResponse, ServicesAPI, ServiceStats, Stats, Status, Sub, SubOpts, Subscription, SubscriptionOptions, TlsOptions, TokenAuth, TypedCallback, TypedSubscriptionOptions, UserPass, } from "./internal_mod";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.usernamePasswordAuthenticator = exports.tokenAuthenticator = exports.syncIterator = exports.StringCodec = exports.ServiceVerb = exports.ServiceResponseType = exports.ServiceErrorHeader = exports.ServiceErrorCodeHeader = exports.ServiceError = exports.RequestStrategy = exports.nuid = exports.Nuid = exports.nkeys = exports.nkeyAuthenticator = exports.NatsError = exports.MsgHdrsImpl = exports.Metric = exports.Match = exports.jwtAuthenticator = exports.JSONCodec = exports.headers = exports.Events = exports.ErrorCode = exports.Empty = exports.deferred = exports.DebugEvents = exports.credsAuthenticator = exports.createInbox = exports.canonicalMIMEHeaderKey = exports.buildAuthenticator = exports.Bench = void 0;
exports.usernamePasswordAuthenticator = exports.tokenAuthenticator = exports.StringCodec = exports.ServiceVerb = exports.ServiceResponseType = exports.ServiceErrorHeader = exports.ServiceErrorCodeHeader = exports.ServiceError = exports.RequestStrategy = exports.nuid = exports.Nuid = exports.nkeys = exports.nkeyAuthenticator = exports.NatsError = exports.MsgHdrsImpl = exports.Metric = exports.Match = exports.jwtAuthenticator = exports.JSONCodec = exports.headers = exports.Events = exports.ErrorCode = exports.Empty = exports.deferred = exports.DebugEvents = exports.credsAuthenticator = exports.createInbox = exports.canonicalMIMEHeaderKey = exports.buildAuthenticator = exports.Bench = void 0;
var internal_mod_1 = require("./internal_mod");

@@ -33,5 +33,4 @@ Object.defineProperty(exports, "Bench", { enumerable: true, get: function () { return internal_mod_1.Bench; } });

Object.defineProperty(exports, "StringCodec", { enumerable: true, get: function () { return internal_mod_1.StringCodec; } });
Object.defineProperty(exports, "syncIterator", { enumerable: true, get: function () { return internal_mod_1.syncIterator; } });
Object.defineProperty(exports, "tokenAuthenticator", { enumerable: true, get: function () { return internal_mod_1.tokenAuthenticator; } });
Object.defineProperty(exports, "usernamePasswordAuthenticator", { enumerable: true, get: function () { return internal_mod_1.usernamePasswordAuthenticator; } });
//# sourceMappingURL=mod.js.map

@@ -6,3 +6,3 @@ import { ProtocolHandler } from "./protocol";

import { JetStreamClient, JetStreamManager } from "../jetstream/types";
import { ConnectionOptions, JetStreamManagerOptions, JetStreamOptions, Msg, NatsConnection, Payload, PublishOptions, QueuedIterator, RequestManyOptions, RequestOptions, ServerInfo, Service, ServiceConfig, ServicesAPI, Stats, Status, Subscription, SubscriptionOptions } from "./core";
import { ConnectionOptions, JetStreamOptions, Msg, NatsConnection, Payload, PublishOptions, QueuedIterator, RequestManyOptions, RequestOptions, ServerInfo, Service, ServiceConfig, ServicesAPI, Stats, Status, Subscription, SubscriptionOptions } from "./core";
export declare class NatsConnectionImpl implements NatsConnection {

@@ -36,3 +36,3 @@ options: ConnectionOptions;

stats(): Stats;
jetstreamManager(opts?: JetStreamManagerOptions): Promise<JetStreamManager>;
jetstreamManager(opts?: JetStreamOptions): Promise<JetStreamManager>;
jetstream(opts?: JetStreamOptions): JetStreamClient;

@@ -39,0 +39,0 @@ getServerVersion(): SemVer | undefined;

@@ -414,13 +414,11 @@ "use strict";

const adm = new jsm_1.JetStreamManagerImpl(this, opts);
if (opts.checkAPI !== false) {
try {
yield adm.getAccountInfo();
try {
yield adm.getAccountInfo();
}
catch (err) {
const ne = err;
if (ne.code === core_1.ErrorCode.NoResponders) {
ne.code = core_1.ErrorCode.JetStreamNotEnabled;
}
catch (err) {
const ne = err;
if (ne.code === core_1.ErrorCode.NoResponders) {
ne.code = core_1.ErrorCode.JetStreamNotEnabled;
}
throw ne;
}
throw ne;
}

@@ -427,0 +425,0 @@ return adm;

@@ -51,3 +51,2 @@ import { Deferred } from "./util";

time: number;
yielding: boolean;
constructor();

@@ -54,0 +53,0 @@ [Symbol.asyncIterator](): AsyncIterableIterator<T>;

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

this.time = 0;
this.yielding = false;
}

@@ -77,6 +76,2 @@ [Symbol.asyncIterator]() {

}
if (this.yielding) {
throw new core_1.NatsError("already yielding", core_1.ErrorCode.ApiError);
}
this.yielding = true;
try {

@@ -83,0 +78,0 @@ while (true) {

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

const dns = require("dns");
const VERSION = "2.17.1-1";
const VERSION = "2.17.1-2";
const LANG = "nats.js";

@@ -49,0 +49,0 @@ class NodeTransport {

{
"name": "nats",
"version": "2.17.1-1",
"version": "2.17.1-2",
"description": "Node.js client for NATS, a lightweight, high-performance cloud native messaging system",

@@ -45,3 +45,3 @@ "keywords": [

"clean": "shx rm -Rf ./lib/* ./nats-base-client ./.deps",
"clone-nbc": "shx mkdir -p ./.deps && cd ./.deps && git clone --branch api-check https://github.com/nats-io/nats.deno.git",
"clone-nbc": "shx mkdir -p ./.deps && cd ./.deps && git clone --branch v1.17.0 https://github.com/nats-io/nats.deno.git",
"fmt": "deno fmt ./src/ ./examples/ ./test/",

@@ -48,0 +48,0 @@ "prepack": "npm run clone-nbc && npm run cjs && npm run check-package && npm run build",

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

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