@nestjs/microservices
Advanced tools
@@ -301,2 +301,7 @@ import { InjectionToken, Type } from '@nestjs/common'; | ||
| consumer?: ConsumerConfig; | ||
| /** | ||
| * Options passed to KafkaJS consumer.run(). | ||
| * Note: `partitionsConsumedConcurrently` (KafkaJS parameter) controls | ||
| * concurrent processing at the partition level (not topic level). | ||
| */ | ||
| run?: Omit<ConsumerRunConfig, 'eachBatch' | 'eachMessage'>; | ||
@@ -303,0 +308,0 @@ subscribe?: Omit<ConsumerSubscribeTopics, 'topics'>; |
+4
-4
| { | ||
| "name": "@nestjs/microservices", | ||
| "version": "11.1.13", | ||
| "version": "11.1.14", | ||
| "description": "Nest - modern, fast, powerful node.js web framework (@microservices)", | ||
@@ -25,4 +25,4 @@ "author": "Kamil Mysliwiec", | ||
| "devDependencies": { | ||
| "@nestjs/common": "11.1.13", | ||
| "@nestjs/core": "11.1.13" | ||
| "@nestjs/common": "11.1.14", | ||
| "@nestjs/core": "11.1.14" | ||
| }, | ||
@@ -73,3 +73,3 @@ "peerDependencies": { | ||
| }, | ||
| "gitHead": "e3a958ac3efebe7995e6d487e00bbc6fd6267fd5" | ||
| "gitHead": "5d31df7eb62d89952d827eadc19123fb441f541e" | ||
| } |
| export declare const GRPC_CANCELLED = "Cancelled"; | ||
| export declare const RABBITMQ_REPLY_QUEUE = "amq.rabbitmq.reply-to"; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.RABBITMQ_REPLY_QUEUE = exports.GRPC_CANCELLED = void 0; | ||
| exports.GRPC_CANCELLED = 'Cancelled'; | ||
| exports.RABBITMQ_REPLY_QUEUE = 'amq.rabbitmq.reply-to'; |
| import { EventEmitter } from 'events'; | ||
| /** | ||
| * @see https://github.com/mqttjs/MQTT.js/ | ||
| * | ||
| * @publicApi | ||
| * | ||
| */ | ||
| export declare class MqttClient extends EventEmitter { | ||
| connected: boolean; | ||
| disconnecting: boolean; | ||
| disconnected: boolean; | ||
| reconnecting: boolean; | ||
| incomingStore: any; | ||
| outgoingStore: any; | ||
| options: any; | ||
| queueQoSZero: boolean; | ||
| constructor(streamBuilder: (client: MqttClient) => any, options: any); | ||
| on(event: 'message', cb: any): this; | ||
| on(event: 'packetsend' | 'packetreceive', cb: any): this; | ||
| on(event: 'error', cb: any): this; | ||
| on(event: string, cb: Function): this; | ||
| once(event: 'message', cb: any): this; | ||
| once(event: 'packetsend' | 'packetreceive', cb: any): this; | ||
| once(event: 'error', cb: any): this; | ||
| once(event: string, cb: Function): this; | ||
| /** | ||
| * publish - publish <message> to <topic> | ||
| * | ||
| * @param {String} topic - topic to publish to | ||
| * @param {(String|Buffer)} message - message to publish | ||
| * | ||
| * @param {Object} [opts] - publish options, includes: | ||
| * @param {Number} [opts.qos] - qos level to publish on | ||
| * @param {Boolean} [opts.retain] - whether or not to retain the message | ||
| * | ||
| * @param {Function} [callback] - function(err){} | ||
| * called when publish succeeds or fails | ||
| * @returns {Client} this - for chaining | ||
| * @api public | ||
| * | ||
| * @example client.publish('topic', 'message') | ||
| * @example | ||
| * client.publish('topic', 'message', {qos: 1, retain: true}) | ||
| * @example client.publish('topic', 'message', console.log) | ||
| */ | ||
| publish(topic: string, message: string | Buffer, opts: any, callback?: any): this; | ||
| publish(topic: string, message: string | Buffer, callback?: any): this; | ||
| /** | ||
| * subscribe - subscribe to <topic> | ||
| * | ||
| * @param {String, Array, Object} topic - topic(s) to subscribe to, supports objects in the form {'topic': qos} | ||
| * @param {Object} [opts] - optional subscription options, includes: | ||
| * @param {Number} [opts.qos] - subscribe qos level | ||
| * @param {Function} [callback] - function(err, granted){} where: | ||
| * {Error} err - subscription error (none at the moment!) | ||
| * {Array} granted - array of {topic: 't', qos: 0} | ||
| * @returns {MqttClient} this - for chaining | ||
| * @api public | ||
| * @example client.subscribe('topic') | ||
| * @example client.subscribe('topic', {qos: 1}) | ||
| * @example client.subscribe({'topic': 0, 'topic2': 1}, console.log) | ||
| * @example client.subscribe('topic', console.log) | ||
| */ | ||
| subscribe(topic: string | string[], opts: any, callback?: any): this; | ||
| subscribe(topic: string | string[] | any, callback?: any): this; | ||
| /** | ||
| * unsubscribe - unsubscribe from topic(s) | ||
| * | ||
| * @param {string|Array} topic - topics to unsubscribe from | ||
| * @param {Function} [callback] - callback fired on unsuback | ||
| * @returns {MqttClient} this - for chaining | ||
| * @api public | ||
| * @example client.unsubscribe('topic') | ||
| * @example client.unsubscribe('topic', console.log) | ||
| */ | ||
| unsubscribe(topic: string | string[], callback?: any): this; | ||
| /** | ||
| * end - close connection | ||
| * | ||
| * @returns {MqttClient} this - for chaining | ||
| * @param {Boolean} force - do not wait for all in-flight messages to be acked | ||
| * @param {Function} cb - called when the client has been closed | ||
| * | ||
| * @api public | ||
| */ | ||
| end(force?: boolean, cb?: any): this; | ||
| /** | ||
| * removeOutgoingMessage - remove a message in outgoing store | ||
| * the outgoing callback will be called withe Error('Message removed') if the message is removed | ||
| * | ||
| * @param {Number} mid - messageId to remove message | ||
| * @returns {MqttClient} this - for chaining | ||
| * @api public | ||
| * | ||
| * @example client.removeOutgoingMessage(client.getLastMessageId()); | ||
| */ | ||
| removeOutgoingMessage(mid: number): this; | ||
| /** | ||
| * reconnect - connect again using the same options as connect() | ||
| * | ||
| * @param {Object} [opts] - optional reconnect options, includes: | ||
| * {any} incomingStore - a store for the incoming packets | ||
| * {any} outgoingStore - a store for the outgoing packets | ||
| * if opts is not given, current stores are used | ||
| * | ||
| * @returns {MqttClient} this - for chaining | ||
| * | ||
| * @api public | ||
| */ | ||
| reconnect(opts?: any): this; | ||
| /** | ||
| * Handle messages with backpressure support, one at a time. | ||
| * Override at will. | ||
| * | ||
| * @param packet packet the packet | ||
| * @param callback callback call when finished | ||
| * @api public | ||
| */ | ||
| handleMessage(packet: any, callback: any): void; | ||
| /** | ||
| * getLastMessageId | ||
| */ | ||
| getLastMessageId(): number; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
| /** | ||
| * @see https://github.com/nats-io/nats.js | ||
| * | ||
| * @publicApi | ||
| */ | ||
| export interface NatsCodec<T> { | ||
| encode(d: T): Uint8Array; | ||
| decode(a: Uint8Array): T; | ||
| } | ||
| interface RequestOptions { | ||
| timeout: number; | ||
| headers?: any; | ||
| noMux?: boolean; | ||
| reply?: string; | ||
| } | ||
| interface PublishOptions { | ||
| reply?: string; | ||
| headers?: any; | ||
| } | ||
| interface SubOpts<T> { | ||
| queue?: string; | ||
| max?: number; | ||
| timeout?: number; | ||
| callback?: (err: object | null, msg: T) => void; | ||
| } | ||
| declare type SubscriptionOptions = SubOpts<NatsMsg>; | ||
| export interface NatsMsg { | ||
| subject: string; | ||
| sid: number; | ||
| reply?: string; | ||
| data: Uint8Array; | ||
| headers?: any; | ||
| respond(data?: Uint8Array, opts?: PublishOptions): boolean; | ||
| } | ||
| interface Sub<T> extends AsyncIterable<T> { | ||
| unsubscribe(max?: number): void; | ||
| drain(): Promise<void>; | ||
| isDraining(): boolean; | ||
| isClosed(): boolean; | ||
| callback(err: object | null, msg: NatsMsg): void; | ||
| getSubject(): string; | ||
| getReceived(): number; | ||
| getProcessed(): number; | ||
| getPending(): number; | ||
| getID(): number; | ||
| getMax(): number | undefined; | ||
| } | ||
| declare type Subscription = Sub<NatsMsg>; | ||
| declare enum Events { | ||
| Disconnect = "disconnect", | ||
| Reconnect = "reconnect", | ||
| Update = "update", | ||
| LDM = "ldm", | ||
| Error = "error" | ||
| } | ||
| interface Status { | ||
| type: Events | DebugEvents; | ||
| data: string | number; | ||
| } | ||
| declare enum DebugEvents { | ||
| Reconnecting = "reconnecting", | ||
| PingTimer = "pingTimer", | ||
| StaleConnection = "staleConnection" | ||
| } | ||
| export declare class Client { | ||
| info?: Record<string, any>; | ||
| closed(): Promise<void | Error>; | ||
| close(): Promise<void>; | ||
| publish(subject: string, data?: Uint8Array, options?: PublishOptions): void; | ||
| subscribe(subject: string, opts?: SubscriptionOptions): Subscription; | ||
| request(subject: string, data?: Uint8Array, opts?: RequestOptions): Promise<NatsMsg>; | ||
| flush(): Promise<void>; | ||
| drain(): Promise<void>; | ||
| isClosed(): boolean; | ||
| isDraining(): boolean; | ||
| getServer(): string; | ||
| status(): AsyncIterable<Status>; | ||
| stats(): Record<string, any>; | ||
| jetstreamManager(opts?: Record<string, any>): Promise<any>; | ||
| jetstream(opts?: Record<string, any>): any; | ||
| } | ||
| export {}; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
| export interface Closeable { | ||
| close(): void; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
462345
-1.55%272
-2.86%11135
-1.91%