@silenteer/natsu
Advanced tools
Comparing version 1.0.25 to 1.0.26
@@ -1,2 +0,3 @@ | ||
import type { NatsService } from '@silenteer/natsu-type'; | ||
import type { Msg, RequestOptions, PublishOptions, SubscriptionOptions } from 'nats'; | ||
import type { NatsService, NatsRequest, NatsResponse } from '@silenteer/natsu-type'; | ||
import type { NatsInjection, NatsHandler } from './type'; | ||
@@ -15,4 +16,10 @@ declare const _default: { | ||
register: (handlers: NatsHandler<NatsService<string, unknown, unknown>, TInjection>[]) => Promise<void>; | ||
getNatsService: () => { | ||
request: (subject: string, data?: NatsRequest<unknown>, opts?: RequestOptions) => Promise<Msg>; | ||
publish: (subject: string, data?: NatsResponse, opts?: PublishOptions) => Promise<void>; | ||
subscribe: (subject: string, opts?: SubscriptionOptions) => import("nats").Subscription; | ||
drain: () => Promise<void>; | ||
}; | ||
}; | ||
}; | ||
export default _default; |
@@ -24,2 +24,5 @@ "use strict"; | ||
verbose, | ||
reconnect: true, | ||
maxReconnectAttempts: 3, | ||
reconnectTimeWait: 1000, | ||
}); | ||
@@ -146,3 +149,3 @@ const natsService = createNatsService(client); | ||
prefix: `[${subject}]`, | ||
logService: injection.logService, | ||
logService: injection === null || injection === void 0 ? void 0 : injection.logService, | ||
logLevels, | ||
@@ -489,2 +492,3 @@ }); | ||
}), | ||
getNatsService: () => natsService, | ||
}; | ||
@@ -491,0 +495,0 @@ return client; |
{ | ||
"name": "@silenteer/natsu", | ||
"version": "1.0.25", | ||
"version": "1.0.26", | ||
"license": "MIT", | ||
@@ -22,3 +22,3 @@ "private": false, | ||
"@silenteer/natsu-type": "*", | ||
"nats": "^2.2.0" | ||
"nats": "2.6.1" | ||
}, | ||
@@ -25,0 +25,0 @@ "devDependencies": { |
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
52141
13
731
+ Addednats@2.6.1(transitive)
- Removednats@2.28.2(transitive)
Updatednats@2.6.1