fastify-rabbitmq 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,19 +5,22 @@ It uses the [rabbitmq-client](https://github.com/cody-greene/node-rabbitmq-clien
5
5
 
6
6
  The build exports this to valid ESM and CJS for ease of cross-compatibility.
7
7
 
8
+ If you are using this NPM package, please consider giving it a :star: star.
9
+ This will increase its visibility and solicit more contribution from the outside.
10
+
8
11
  ## Table of Contents
9
12
 
10
13
  1. [Install](#install)
11
14
  2. [Basic Usage](#basic-usage)
12
15
  3. [Full Documentation](#full-documentation)
13
- 1) [Options](#options)
16
+ 1. [Options](#options)
14
17
  4. [Acknowledgements](#acknowledgements)
15
18
  5. [License](#license)
16
19
 
17
20
  ## Install
18
21
 
19
- ```markdown
20
- npm i fastify-rabbitmq
22
+ ```
23
+ npm install fastify-rabbitmq
21
24
  ```
22
25
 
23
26
  ## Basic Usage
package/lib/cjs/errors.js CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.errors = void 0;
7
- const error_1 = __importDefault(require("@fastify/error"));
7
+ var error_1 = __importDefault(require("@fastify/error"));
8
8
  exports.errors = {
9
9
  /** Error if there is an invalid option used during registration. */
10
10
  FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS: (0, error_1.default)('FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS', 'Invalid options: %s'),
package/lib/cjs/index.js CHANGED
@@ -13,18 +13,54 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
13
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ var __generator = (this && this.__generator) || function (thisArg, body) {
26
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
27
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
+ function verb(n) { return function (v) { return step([n, v]); }; }
29
+ function step(op) {
30
+ if (f) throw new TypeError("Generator is already executing.");
31
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
32
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
33
+ if (y = 0, t) op = [op[0] & 2, t.value];
34
+ switch (op[0]) {
35
+ case 0: case 1: t = op; break;
36
+ case 4: _.label++; return { value: op[1], done: false };
37
+ case 5: _.label++; y = op[1]; op = [0]; continue;
38
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
39
+ default:
40
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
41
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
42
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
43
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
44
+ if (t[2]) _.ops.pop();
45
+ _.trys.pop(); continue;
46
+ }
47
+ op = body.call(thisArg, _);
48
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
49
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
+ }
51
+ };
16
52
  var __importDefault = (this && this.__importDefault) || function (mod) {
17
53
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
54
  };
19
55
  Object.defineProperty(exports, "__esModule", { value: true });
20
56
  exports.decorateFastifyInstance = void 0;
21
- const fastify_plugin_1 = __importDefault(require("fastify-plugin"));
22
- const rabbitmq_client_1 = require("rabbitmq-client");
23
- const errors_js_1 = require("./errors.js");
24
- const validation_js_1 = require("./validation.js");
57
+ var fastify_plugin_1 = __importDefault(require("fastify-plugin"));
58
+ var rabbitmq_client_1 = require("rabbitmq-client");
59
+ var errors_js_1 = require("./errors.js");
60
+ var validation_js_1 = require("./validation.js");
25
61
  __exportStar(require("./types.js"), exports);
26
- const decorateFastifyInstance = (fastify, options, connection) => {
27
- const { namespace = '' } = options;
62
+ var decorateFastifyInstance = function (fastify, options, connection) {
63
+ var _a = options.namespace, namespace = _a === void 0 ? '' : _a;
28
64
  if (typeof namespace !== 'undefined') {
29
65
  fastify.log.debug('[fastify-rabbitmq] Namespace: %s', namespace);
30
66
  }
@@ -33,7 +69,7 @@ const decorateFastifyInstance = (fastify, options, connection) => {
33
69
  fastify.decorate('rabbitmq', Object.create(null));
34
70
  }
35
71
  if (typeof fastify.rabbitmq[namespace] !== 'undefined') {
36
- throw new errors_js_1.errors.FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS(`Already registered with namespace: ${namespace}`);
72
+ throw new errors_js_1.errors.FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS("Already registered with namespace: ".concat(namespace));
37
73
  }
38
74
  fastify.log.trace('[fastify-rabbitmq] Decorate Fastify with Namespace: %', namespace);
39
75
  fastify.rabbitmq[namespace] = connection;
@@ -67,10 +103,18 @@ exports.decorateFastifyInstance = decorateFastifyInstance;
67
103
  * @see [https://cody-greene.github.io/node-rabbitmq-client/latest/index.html](https://cody-greene.github.io/node-rabbitmq-client/latest/index.html)
68
104
  *
69
105
  */
70
- const fastifyRabbit = (0, fastify_plugin_1.default)(async (fastify, opts) => {
71
- await (0, validation_js_1.validateOpts)(opts);
72
- const { connection } = opts;
73
- const c = new rabbitmq_client_1.Connection(connection);
74
- decorateFastifyInstance(fastify, opts, c);
75
- });
106
+ var fastifyRabbit = (0, fastify_plugin_1.default)(function (fastify, opts) { return __awaiter(void 0, void 0, void 0, function () {
107
+ var connection, c;
108
+ return __generator(this, function (_a) {
109
+ switch (_a.label) {
110
+ case 0: return [4 /*yield*/, (0, validation_js_1.validateOpts)(opts)];
111
+ case 1:
112
+ _a.sent();
113
+ connection = opts.connection;
114
+ c = new rabbitmq_client_1.Connection(connection);
115
+ decorateFastifyInstance(fastify, opts, c);
116
+ return [2 /*return*/];
117
+ }
118
+ });
119
+ }); });
76
120
  exports.default = fastifyRabbit;
@@ -1,17 +1,56 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
2
38
  Object.defineProperty(exports, "__esModule", { value: true });
3
39
  exports.validateOpts = void 0;
4
- const errors_js_1 = require("./errors.js");
5
- const validateOpts = async (options) => {
6
- // Mandatory
7
- if (typeof options.connection === 'undefined') {
8
- throw new errors_js_1.errors.FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS('connection or findServers must be defined.');
9
- }
10
- // Mandatory
11
- if (typeof options.connection !== 'undefined') {
12
- if (typeof options.connection !== 'object') {
13
- // we need to do some sort of check here to make sure RabbitMQOptions is "valid"
40
+ var errors_js_1 = require("./errors.js");
41
+ var validateOpts = function (options) { return __awaiter(void 0, void 0, void 0, function () {
42
+ return __generator(this, function (_a) {
43
+ // Mandatory
44
+ if (typeof options.connection === 'undefined') {
45
+ throw new errors_js_1.errors.FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS('connection or findServers must be defined.');
14
46
  }
15
- }
16
- };
47
+ // Mandatory
48
+ if (typeof options.connection !== 'undefined') {
49
+ if (typeof options.connection !== 'object') {
50
+ // we need to do some sort of check here to make sure RabbitMQOptions is "valid"
51
+ }
52
+ }
53
+ return [2 /*return*/];
54
+ });
55
+ }); };
17
56
  exports.validateOpts = validateOpts;
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=decorate.js.map
package/lib/esm/errors.js CHANGED
@@ -7,4 +7,3 @@ export const errors = {
7
7
  /** If an invalid usage error was done, this error would pop up. */
8
8
  FASTIFY_RABBIT_MQ_ERR_USAGE: createError('FASTIFY_RABBIT_MQ_ERR_USAGE', 'Usage error: %s')
9
9
  };
10
- //# sourceMappingURL=errors.js.map
package/lib/esm/index.js CHANGED
@@ -54,4 +54,3 @@ const fastifyRabbit = fp(async (fastify, opts) => {
54
54
  });
55
55
  export default fastifyRabbit;
56
56
  export { decorateFastifyInstance };
57
- //# sourceMappingURL=index.js.map
package/lib/esm/types.js CHANGED
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=types.js.map
@@ -11,4 +11,3 @@ export const validateOpts = async (options) => {
11
11
  }
12
12
  }
13
13
  };
14
- //# sourceMappingURL=validation.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastify-rabbitmq",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "A Fastify RabbitMQ Plugin Developed in Pure TypeScript.",
5
5
  "module": "./lib/esm/index.js",
6
6
  "main": "./lib/cjs/index.js",
@@ -14,16 +14,21 @@
14
14
  }
15
15
  },
16
16
  "files": [
17
- "lib/**/**"
17
+ "lib/"
18
18
  ],
19
+ "engines": {
20
+ "node": "^18 || ^20"
21
+ },
19
22
  "scripts": {
20
23
  "clean": "rm -rf lib coverage",
21
- "build": "tsc && tsc -p tsconfig.cjs.json && tsc -p tsconfig.types.json && ./bin/build-types.sh",
22
- "build:watch": "tsc -w",
23
- "lint": "ts-standard | snazzy",
24
- "lint:fix": "ts-standard | snazzy",
24
+ "build": "tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && tsc -p tsconfig.types.json && ./bin/build-types.sh",
25
+ "build:watch": "tsc -p tsconfig.esm.json -w",
26
+ "npmPkgJsonLint": "npmPkgJsonLint .",
27
+ "lint": "npmPkgJsonLint . && ts-standard | snazzy",
28
+ "lint:fix": "npmPkgJsonLint . && ts-standard --fix | snazzy",
25
29
  "pack": "npm pack",
26
- "prepublishOnly": "npm run clean && npm run build && npm run test:ci && npm run pack",
30
+ "publish": "clean-publish",
31
+ "prepublishOnly": "npm run clean && npm run build && npm run pack",
27
32
  "test": "jest",
28
33
  "test:open": "jest --detectOpenHandles",
29
34
  "test:ci": "jest --ci",
@@ -33,11 +38,6 @@
33
38
  "semantic-release": "semantic-release",
34
39
  "semantic-release:dry-run": "semantic-release --dry-run",
35
40
  "update": "npx npm-check-updates -u && npm run update:post-update",
36
- "update:greatest": "npx npm-check-updates --target greatest",
37
- "update:minor": "npx npm-check-updates --target minor -u && npm run update:post-update",
38
- "update:newest": "npx npm-check-updates --target newest",
39
- "update:patch": "npx npm-check-updates --target patch",
40
- "update:semver": "npx npm-check-updates --target semver",
41
41
  "update:post-update": "npm install && npm run test:ci"
42
42
  },
43
43
  "repository": {
@@ -60,7 +60,7 @@
60
60
  "dependencies": {
61
61
  "@fastify/error": "^3.4.1",
62
62
  "fastify-plugin": "^4.5.1",
63
- "rabbitmq-client": "^4.4.0"
63
+ "rabbitmq-client": "^4.5.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@semantic-release/changelog": "^6.0.3",
@@ -68,21 +68,23 @@
68
68
  "@semantic-release/git": "^10.0.1",
69
69
  "@semantic-release/release-notes-generator": "^12.1.0",
70
70
  "@the-rabbit-hole/semantic-release-config": "^1.4.0",
71
+ "clean-publish": "^4.2.0",
71
72
  "@types/jest": "^29.5.11",
72
73
  "@types/node": "^20.10.5",
73
74
  "@types/randomstring": "^1.1.11",
74
- "@typescript-eslint/parser": "^6.15.0",
75
- "fastify": "^4.25.1",
75
+ "@typescript-eslint/parser": "^6.16.0",
76
+ "fastify": "^4.25.2",
76
77
  "jest": "^29.7.0",
77
78
  "jest-ts-webcompat-resolver": "^1.0.0",
78
79
  "npm-check-updates": "^16.14.12",
80
+ "npm-package-json-lint": "^7.1.0",
79
81
  "pre-commit": "^1.2.2",
80
82
  "semantic-release": "^22.0.12",
81
83
  "snazzy": "^9.0.0",
82
84
  "ts-jest": "^29.1.1",
83
85
  "ts-node": "^10.9.2",
84
86
  "ts-standard": "^12.0.2",
85
- "tsd": "^0.30.0",
87
+ "tsd": "^0.30.1",
86
88
  "typedoc": "^0.25.4",
87
89
  "typescript": "^5.3.3"
88
90
  },
@@ -1,13 +0,0 @@
1
- import { ConnectionOptions } from 'rabbitmq-client';
2
- export interface FastifyRabbitMQOptions {
3
- /**
4
- * @since 1.0.0
5
- * @description Connection String or object pointing to the RabbitMQ Broker Services
6
- */
7
- connection: string | ConnectionOptions;
8
- /**
9
- * @since 1.0.0
10
- * @description To set the custom nNamespace within this plugin instance. Used to register this plugin more than one time.
11
- */
12
- namespace?: string;
13
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"decorate.js","sourceRoot":"","sources":["../../src/decorate.ts"],"names":[],"mappings":""}
@@ -1,14 +0,0 @@
1
- export declare const errors: {
2
- /** Error if there is an invalid option used during registration. */
3
- FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS: import("@fastify/error").FastifyErrorConstructor<{
4
- code: "FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS";
5
- }, [any?, any?, any?]>;
6
- /** Error if there is an setup error of the plugin itself. */
7
- FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS: import("@fastify/error").FastifyErrorConstructor<{
8
- code: "FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS";
9
- }, [any?, any?, any?]>;
10
- /** If an invalid usage error was done, this error would pop up. */
11
- FASTIFY_RABBIT_MQ_ERR_USAGE: import("@fastify/error").FastifyErrorConstructor<{
12
- code: "FASTIFY_RABBIT_MQ_ERR_USAGE";
13
- }, [any?, any?, any?]>;
14
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAA;AAExC,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,oEAAoE;IACpE,kCAAkC,EAAE,WAAW,CAC7C,oCAAoC,EACpC,qBAAqB,CACtB;IACD,6DAA6D;IAC7D,kCAAkC,EAAE,WAAW,CAC7C,oCAAoC,EACpC,iBAAiB,CAClB;IACD,mEAAmE;IACnE,2BAA2B,EAAE,WAAW,CACtC,6BAA6B,EAC7B,iBAAiB,CAClB;CACF,CAAA"}
@@ -1,26 +0,0 @@
1
- import { FastifyInstance } from 'fastify';
2
- import { ConnectionOptions } from 'rabbitmq-client';
3
- import { FastifyRabbitMQOptions } from './decorate.js';
4
- export * from './types.js';
5
- declare const decorateFastifyInstance: (fastify: FastifyInstance, options: FastifyRabbitMQOptions, connection: any) => void;
6
- /**
7
- * Main Function
8
- * @since 1.0.0
9
- * @example
10
- * This is the basics on how to use this plugin:
11
- * ```js
12
- * app.register(fastifyRabbit, {
13
- * connection: 'amqp://guest:guest@localhost'
14
- * })
15
- * ```
16
- * This will allow you to read from your Fastify "object" and
17
- * use this plugin at the "rabbitmq" level. From there you can execute and maintain
18
- * the RabbitMQ Connection using the 'rabbitmq-client' package, which is wrapping around
19
- * this plugin to execute functions it provides.
20
- *
21
- * @see [https://cody-greene.github.io/node-rabbitmq-client/latest/index.html](https://cody-greene.github.io/node-rabbitmq-client/latest/index.html)
22
- *
23
- */
24
- declare const fastifyRabbit: import("fastify").FastifyPluginCallback<FastifyRabbitMQOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault, import("fastify").FastifyBaseLogger>;
25
- export default fastifyRabbit;
26
- export { decorateFastifyInstance, FastifyRabbitMQOptions, ConnectionOptions };
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAC/B,OAAO,EAAqB,UAAU,IAAI,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAErF,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,cAAc,YAAY,CAAA;AAE1B,MAAM,uBAAuB,GAAG,CAAC,OAAwB,EAAE,OAA+B,EAAE,UAAe,EAAQ,EAAE;IACnH,MAAM,EACJ,SAAS,GAAG,EAAE,EACf,GAAG,OAAO,CAAA;IAEX,IAAI,OAAO,SAAS,KAAK,WAAW,EAAE,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAA;IAClE,CAAC;IACD,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,KAAK,EAAE,EAAE,CAAC;QACzD,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,WAAW,EAAE,CAAC;YAC5C,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;QACnD,CAAC;QAED,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,WAAW,EAAE,CAAC;YACvD,MAAM,IAAI,MAAM,CAAC,kCAAkC,CAAC,sCAAsC,SAAS,EAAE,CAAC,CAAA;QACxG,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,uDAAuD,EAAE,SAAS,CAAC,CAAA;QACrF,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,UAAU,CAAA;IAC1C,CAAC;SAAM,CAAC;QACN,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,WAAW,EAAE,CAAC;YAC5C,MAAM,IAAI,MAAM,CAAC,kCAAkC,CAAC,qBAAqB,CAAC,CAAA;QAC5E,CAAC;IACH,CAAC;IAED,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,WAAW,EAAE,CAAC;QAC5C,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAA;QACxD,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;IAC1C,CAAC;AACH,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,aAAa,GAAG,EAAE,CAAyB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACvE,MAAM,YAAY,CAAC,IAAI,CAAC,CAAA;IAExB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IAE3B,MAAM,CAAC,GAAG,IAAI,kBAAkB,CAAC,UAAU,CAAC,CAAA;IAE5C,uBAAuB,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;AAC3C,CAAC,CAAC,CAAA;AAEF,eAAe,aAAa,CAAA;AAE5B,OAAO,EAAE,uBAAuB,EAA6C,CAAA"}
@@ -1,12 +0,0 @@
1
- import { Connection as RabbitMQConnection } from 'rabbitmq-client';
2
- declare module 'fastify' {
3
- interface FastifyInstance {
4
- /** Main Decorator for Fastify **/
5
- rabbitmq: RabbitMQConnection & fastifyRabbitMQ.FastifyRabbitMQNO;
6
- }
7
- }
8
- export declare namespace fastifyRabbitMQ {
9
- interface FastifyRabbitMQNO {
10
- [namespace: string]: RabbitMQConnection;
11
- }
12
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import { FastifyRabbitMQOptions } from './decorate.js';
2
- export declare const validateOpts: (options: FastifyRabbitMQOptions) => Promise<void>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,OAA+B,EAAiB,EAAE;IACnF,YAAY;IACZ,IAAI,OAAO,OAAO,CAAC,UAAU,KAAK,WAAW,EAAE,CAAC;QAC9C,MAAM,IAAI,MAAM,CAAC,kCAAkC,CAAC,4CAA4C,CAAC,CAAA;IACnG,CAAC;IAED,YAAY;IACZ,IAAI,OAAO,OAAO,CAAC,UAAU,KAAK,WAAW,EAAE,CAAC;QAC9C,IAAI,OAAO,OAAO,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;YAC3C,gFAAgF;QAClF,CAAC;IACH,CAAC;AACH,CAAC,CAAA"}