Comparing version 2.14.0-1 to 2.14.0-2
@@ -22,3 +22,3 @@ import { ConsumeOptions, Consumer, ConsumerAPI, ConsumerCallbackFn, ConsumerConfig, ConsumerInfo, ConsumerMessages, DeliverPolicy, FetchOptions, JsMsg, NextOptions, ReplayPolicy } from "./types"; | ||
export type OrderedConsumerOptions = { | ||
filterSubjects: string[]; | ||
filterSubjects: string[] | string; | ||
deliver_policy: DeliverPolicy; | ||
@@ -25,0 +25,0 @@ opt_start_seq: number; |
@@ -200,2 +200,5 @@ "use strict"; | ||
} | ||
if (typeof this.consumerOpts.filterSubjects === "string") { | ||
config.filter_subject = this.consumerOpts.filterSubjects; | ||
} | ||
// this is the initial request - tweak some options | ||
@@ -211,4 +214,9 @@ if (seq === this.startSeq + 1) { | ||
} | ||
// this requires a filter subject - we only set if they didn't | ||
// set anything, and to be pre-2.10 we set it as filter_subject | ||
if (config.deliver_policy === types_1.DeliverPolicy.LastPerSubject) { | ||
config.filter_subjects = config.filter_subjects || [">"]; | ||
if (typeof config.filter_subjects === "undefined" && | ||
typeof config.filter_subject === "undefined") { | ||
config.filter_subject = ">"; | ||
} | ||
} | ||
@@ -215,0 +223,0 @@ if (this.consumerOpts.opt_start_time) { |
@@ -44,8 +44,2 @@ "use strict"; | ||
} | ||
if (ordered) { | ||
const fv = this.api.nc.features.get(semver_1.Feature.JS_CONSUMER_FILTER_SUBJECTS); | ||
if (!fv.ok) { | ||
return Promise.reject(new Error(`consumers framework's ordered consumer is only supported on servers ${fv.min} or better`)); | ||
} | ||
} | ||
return Promise.resolve(); | ||
@@ -52,0 +46,0 @@ } |
export { NatsConnectionImpl } from "./nats"; | ||
export { Nuid, nuid } from "./nuid"; | ||
export { ErrorCode, isNatsError, NatsError } from "./error"; | ||
export type { AccountLimits, Advisory, ApiError, ApiPagedRequest, callbackFn, Closed, ClusterInfo, ConnectionOptions, Consumer, ConsumerAPI, ConsumerConfig, ConsumerInfo, ConsumerInfoable, ConsumerMessages, ConsumerOpts, ConsumerOptsBuilder, ConsumerUpdateConfig, DeliveryInfo, Destroyable, ExternalStream, JetStreamAccountStats, JetStreamApiStats, JetStreamClient, JetStreamManager, JetStreamOptions, JetStreamPublishOptions, JetStreamPullSubscription, JetStreamSubscription, JetStreamSubscriptionOptions, JetStreamUsageAccountLimits, JsMsg, JsMsgCallback, KV, KvCodec, KvCodecs, KvEntry, KvLimits, KvOptions, KvPutOptions, KvRemove, KvStatus, KvWatchOptions, LastForMsgRequest, Lister, LostStreamData, Msg, MsgDeleteRequest, MsgRequest, Nanos, NatsConnection, ObjectInfo, ObjectResult, ObjectStore, ObjectStoreLink, ObjectStoreMeta, ObjectStoreMetaOptions, ObjectStoreOptions, ObjectStorePutOpts, ObjectStoreStatus, PeerInfo, Placement, PubAck, PublishOptions, Pullable, PullOptions, PurgeBySeq, PurgeBySubject, PurgeOpts, PurgeResponse, PurgeTrimOpts, Republish, RequestManyOptions, RequestOptions, RoKV, SeqMsgRequest, SequenceInfo, Server, ServerInfo, ServersChanged, ServiceClient, ServicesAPI, Stats, Status, StoredMsg, StreamAlternate, StreamAPI, StreamConfig, StreamInfo, StreamInfoRequestOptions, StreamNames, StreamSource, StreamSourceInfo, StreamState, StreamUpdateConfig, Sub, SubOpts, Subscription, SubscriptionOptions, TlsOptions, TypedSubscriptionOptions, Views, } from "./types"; | ||
export type { AccountLimits, Advisory, ApiError, ApiPagedRequest, callbackFn, Closed, ClusterInfo, ConnectionOptions, ConsumeBytes, ConsumeCallback, ConsumeMessages, ConsumeOptions, Consumer, ConsumerAPI, ConsumerCallbackFn, ConsumerConfig, ConsumerDebugEvents, ConsumerEvents, 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, KvRemove, KvStatus, KvWatchOptions, LastForMsgRequest, Lister, LostStreamData, MaxBytes, MaxMessages, Msg, MsgDeleteRequest, MsgRequest, Nanos, NatsConnection, ObjectInfo, ObjectResult, ObjectStore, ObjectStoreLink, ObjectStoreMeta, ObjectStoreMetaOptions, ObjectStoreOptions, ObjectStorePutOpts, ObjectStoreStatus, OrderedConsumerOptions, PeerInfo, Placement, PubAck, PublishOptions, Pullable, PullOptions, PurgeBySeq, PurgeBySubject, PurgeOpts, PurgeResponse, PurgeTrimOpts, Republish, RequestManyOptions, RequestOptions, RoKV, SeqMsgRequest, SequenceInfo, Server, ServerInfo, ServersChanged, ServiceClient, ServicesAPI, Stats, Status, StoredMsg, Stream, StreamAlternate, StreamAPI, StreamConfig, StreamInfo, StreamInfoRequestOptions, StreamNames, Streams, StreamSource, StreamSourceInfo, StreamState, StreamUpdateConfig, Sub, SubjectTransformConfig, SubOpts, Subscription, SubscriptionOptions, ThresholdBytes, ThresholdMessages, TlsOptions, TypedSubscriptionOptions, Views, } from "./types"; | ||
export { AckPolicy, AdvisoryKind, DeliverPolicy, DirectMsgHeaders, DiscardPolicy, ReplayPolicy, RepublishHeaders, RequestStrategy, RetentionPolicy, StorageType, } from "./types"; | ||
@@ -49,2 +49,2 @@ export { consumerOpts } from "./jsconsumeropts"; | ||
export { ServiceError, ServiceErrorCodeHeader, ServiceErrorHeader, ServiceVerb, } from "./service"; | ||
export type { Endpoint, EndpointOptions, EndpointSchema, EndpointStats, NamedEndpointStats, Service, ServiceConfig, ServiceGroup, ServiceHandler, ServiceIdentity, ServiceInfo, ServiceMsg, ServiceResponse, ServiceResponseType, ServiceStats, } from "./service"; | ||
export type { Endpoint, EndpointOptions, EndpointSchema, EndpointStats, NamedEndpointStats, Service, ServiceConfig, ServiceGroup, ServiceHandler, ServiceIdentity, ServiceInfo, ServiceMetadata, ServiceMsg, ServiceResponse, ServiceResponseType, ServiceStats, } from "./service"; |
export { AckPolicy, AdvisoryKind, Bench, canonicalMIMEHeaderKey, checkJsError, consumerOpts, createInbox, credsAuthenticator, DebugEvents, deferred, DeliverPolicy, DiscardPolicy, Empty, ErrorCode, Events, headers, isFlowControlMsg, isHeartbeatMsg, JsHeaders, JSONCodec, jwtAuthenticator, Match, Metric, millis, MsgHdrsImpl, nanos, NatsError, nkeyAuthenticator, Nuid, nuid, ReplayPolicy, RequestStrategy, RetentionPolicy, ServiceError, ServiceErrorCodeHeader, ServiceErrorHeader, ServiceVerb, StorageType, StringCodec, toJsMsg, tokenAuthenticator, usernamePasswordAuthenticator, } from "./internal_mod"; | ||
export type { AccountLimits, Advisory, ApiError, ApiPagedRequest, Auth, Authenticator, BenchOpts, callbackFn, Closed, ClusterInfo, Codec, ConnectionOptions, Consumer, ConsumerAPI, ConsumerConfig, ConsumerInfo, ConsumerInfoable, ConsumerMessages, ConsumerOpts, ConsumerOptsBuilder, ConsumerUpdateConfig, Deferred, DeliveryInfo, Destroyable, DirectMsgHeaders, DispatchedFn, Endpoint, EndpointOptions, EndpointSchema, EndpointStats, ExternalStream, IngestionFilterFn, IngestionFilterFnResult, JetStreamAccountStats, JetStreamApiStats, JetStreamClient, JetStreamManager, JetStreamOptions, JetStreamPublishOptions, JetStreamPullSubscription, JetStreamSubscription, JetStreamSubscriptionOptions, JetStreamUsageAccountLimits, JsMsg, JsMsgCallback, JwtAuth, KV, KvCodec, KvCodecs, KvEntry, KvLimits, KvOptions, KvPutOptions, KvStatus, KvWatchOptions, LastForMsgRequest, Lister, LostStreamData, Msg, MsgAdapter, MsgDeleteRequest, MsgHdrs, MsgRequest, NamedEndpointStats, Nanos, NatsConnection, NKeyAuth, NoAuth, ObjectInfo, ObjectResult, ObjectStore, ObjectStoreLink, ObjectStoreMeta, ObjectStoreMetaOptions, ObjectStoreOptions, ObjectStorePutOpts, ObjectStoreStatus, PeerInfo, Perf, Placement, ProtocolFilterFn, PubAck, PublishOptions, Pullable, PullOptions, PurgeBySeq, PurgeBySubject, PurgeOpts, PurgeResponse, PurgeTrimOpts, QueuedIterator, Republish, RepublishHeaders, RequestManyOptions, RequestOptions, RoKV, SeqMsgRequest, SequenceInfo, ServerInfo, ServersChanged, Service, ServiceClient, ServiceConfig, ServiceGroup, ServiceHandler, ServiceIdentity, ServiceInfo, ServiceMsg, ServiceResponse, ServiceResponseType, ServicesAPI, ServiceStats, Stats, Status, StoredMsg, StreamAlternate, StreamAPI, StreamConfig, StreamInfo, StreamInfoRequestOptions, StreamNames, StreamSource, StreamSourceInfo, StreamState, StreamUpdateConfig, Sub, SubOpts, Subscription, SubscriptionOptions, TlsOptions, TokenAuth, TypedCallback, TypedSubscriptionOptions, UserPass, Views, } from "./internal_mod"; | ||
export type { AccountLimits, Advisory, ApiError, ApiPagedRequest, Auth, Authenticator, BenchOpts, callbackFn, Closed, ClusterInfo, Codec, ConnectionOptions, ConsumeBytes, ConsumeCallback, ConsumeMessages, ConsumeOptions, Consumer, ConsumerAPI, ConsumerCallbackFn, ConsumerConfig, ConsumerDebugEvents, ConsumerEvents, ConsumerInfo, ConsumerInfoable, ConsumerMessages, ConsumerOpts, ConsumerOptsBuilder, Consumers, ConsumerStatus, ConsumerUpdateConfig, Deferred, DeliveryInfo, Destroyable, DirectMsgHeaders, DispatchedFn, Endpoint, EndpointOptions, EndpointSchema, EndpointStats, Expires, ExternalStream, FetchBytes, FetchMessages, FetchOptions, IdleHeartbeat, IngestionFilterFn, IngestionFilterFnResult, JetStreamAccountStats, JetStreamApiStats, JetStreamClient, JetStreamManager, JetStreamOptions, JetStreamPublishOptions, JetStreamPullSubscription, JetStreamSubscription, JetStreamSubscriptionOptions, JetStreamUsageAccountLimits, JsMsg, JsMsgCallback, JwtAuth, KV, KvCodec, KvCodecs, KvEntry, KvLimits, KvOptions, KvPutOptions, KvStatus, KvWatchOptions, LastForMsgRequest, Lister, LostStreamData, MaxBytes, MaxMessages, Msg, MsgAdapter, MsgDeleteRequest, MsgHdrs, MsgRequest, NamedEndpointStats, Nanos, NatsConnection, NKeyAuth, NoAuth, ObjectInfo, ObjectResult, ObjectStore, ObjectStoreLink, ObjectStoreMeta, ObjectStoreMetaOptions, ObjectStoreOptions, ObjectStorePutOpts, ObjectStoreStatus, OrderedConsumerOptions, PeerInfo, Perf, Placement, ProtocolFilterFn, PubAck, PublishOptions, Pullable, PullOptions, PurgeBySeq, PurgeBySubject, PurgeOpts, PurgeResponse, PurgeTrimOpts, QueuedIterator, Republish, RepublishHeaders, RequestManyOptions, RequestOptions, RoKV, SeqMsgRequest, SequenceInfo, ServerInfo, ServersChanged, Service, ServiceClient, ServiceConfig, ServiceGroup, ServiceHandler, ServiceIdentity, ServiceInfo, ServiceMetadata, ServiceMsg, ServiceResponse, ServiceResponseType, ServicesAPI, ServiceStats, Stats, Status, StoredMsg, Stream, StreamAlternate, StreamAPI, StreamConfig, StreamInfo, StreamInfoRequestOptions, StreamNames, Streams, StreamSource, StreamSourceInfo, StreamState, StreamUpdateConfig, Sub, SubjectTransformConfig, SubOpts, Subscription, SubscriptionOptions, ThresholdBytes, ThresholdMessages, TlsOptions, TokenAuth, TypedCallback, TypedSubscriptionOptions, UserPass, Views, } from "./internal_mod"; |
@@ -46,3 +46,3 @@ "use strict"; | ||
const dns = require("dns"); | ||
const VERSION = "2.14.0-1"; | ||
const VERSION = "2.14.0-2"; | ||
const LANG = "nats.js"; | ||
@@ -49,0 +49,0 @@ class NodeTransport { |
{ | ||
"name": "nats", | ||
"version": "2.14.0-1", | ||
"version": "2.14.0-2", | ||
"description": "Node.js client for NATS, a lightweight, high-performance cloud native messaging system", | ||
@@ -43,3 +43,3 @@ "keywords": [ | ||
"clean": "shx rm -Rf ./lib/* ./nats-base-client ./.deps", | ||
"clone-nbc": "shx mkdir -p ./.deps && cd ./.deps && git clone --branch dev https://github.com/nats-io/nats.deno.git", | ||
"clone-nbc": "shx mkdir -p ./.deps && cd ./.deps && git clone --branch main https://github.com/nats-io/nats.deno.git", | ||
"fmt": "deno fmt ./src/ ./examples/ ./test/", | ||
@@ -46,0 +46,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 too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1059483
18252