fastify-rabbitmq 3.0.0 → 3.2.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 +33 -34
- package/lib/cjs/errors.js +3 -3
- package/lib/cjs/index.js +14 -13
- package/lib/cjs/validation.js +4 -4
- package/lib/esm/decorate.d.ts +3 -3
- package/lib/esm/errors.js +4 -4
- package/lib/esm/index.d.ts +4 -4
- package/lib/esm/index.js +19 -18
- package/lib/esm/types.d.ts +2 -2
- package/lib/esm/validation.d.ts +1 -1
- package/lib/esm/validation.js +5 -5
- package/lib/types/decorate.d.ts +3 -3
- package/lib/types/index.d.ts +4 -4
- package/lib/types/types.d.ts +2 -2
- package/lib/types/validation.d.ts +1 -1
- package/package.json +30 -25
package/README.md
CHANGED
|
@@ -26,46 +26,46 @@ npm install fastify-rabbitmq
|
|
|
26
26
|
## Basic Usage
|
|
27
27
|
|
|
28
28
|
Register this as a plugin.
|
|
29
|
-
Make sure it is loaded before any
|
|
29
|
+
Make sure it is loaded before any **_routes_** are loaded.
|
|
30
30
|
|
|
31
31
|
### Quick Setup on the Server Side
|
|
32
32
|
|
|
33
33
|
```typescript
|
|
34
34
|
export default fp<FastifyRabbitMQOptions>((fastify, options, done) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
console.log(msg) // ==> bar
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
void fastify.register(fastifyRabbit, {
|
|
36
|
+
connection: `amqp://guest:guest@localhost`,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
void fastify.ready().then(async () => {
|
|
40
|
+
const consumer = fastify.rabbitmq.createConsumer(
|
|
41
|
+
{
|
|
42
|
+
queue: "foo",
|
|
43
|
+
queueOptions: { durable: true },
|
|
44
|
+
},
|
|
45
|
+
async (msg: any) => {
|
|
46
|
+
console.log(msg); // ==> bar
|
|
47
|
+
},
|
|
48
|
+
);
|
|
49
|
+
});
|
|
51
50
|
});
|
|
52
51
|
```
|
|
52
|
+
|
|
53
53
|
### Quick Setup on the Client Side
|
|
54
54
|
|
|
55
|
-
Within any "endpoint" function, or if you have access to
|
|
55
|
+
Within any "endpoint" function, or if you have access to `fastify.rabbitmq` you can then call:
|
|
56
56
|
|
|
57
57
|
```js
|
|
58
|
-
fastify.get(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
})
|
|
58
|
+
fastify.get("/rabbitmq", async (request, reply) => {
|
|
59
|
+
let pub = request.rabbitmq.createPublisher({
|
|
60
|
+
confirm: true,
|
|
61
|
+
maxAttempts: 1,
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
await pub.send("foo", "bar"); // ==> sent to foo queue
|
|
65
|
+
});
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
Sending the string
|
|
68
|
+
Sending the string `bar` to the queue called `foo`.
|
|
69
69
|
|
|
70
70
|
## Full Documentation
|
|
71
71
|
|
|
@@ -73,10 +73,10 @@ Sending the string ```bar``` to the queue called ```foo```.
|
|
|
73
73
|
|
|
74
74
|
```typescript
|
|
75
75
|
export interface FastifyRabbitMQOptions {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
/** Connection String or object pointing to the RabbitMQ Broker Services */
|
|
77
|
+
connection: string | ConnectionOptions;
|
|
78
|
+
/** To set the custom nNamespace within this plugin instance. Used to register this plugin more than one time. */
|
|
79
|
+
namespace?: string;
|
|
80
80
|
}
|
|
81
81
|
```
|
|
82
82
|
|
|
@@ -85,14 +85,13 @@ export interface FastifyRabbitMQOptions {
|
|
|
85
85
|
##### `connection`
|
|
86
86
|
|
|
87
87
|
Connection String or object pointing to the RabbitMQ Broker Services.
|
|
88
|
-
This can be an object of
|
|
88
|
+
This can be an object of `ConnectionOptions` from the `node-rabbitmq-client` plugin options.
|
|
89
89
|
|
|
90
90
|
##### `namespace`
|
|
91
91
|
|
|
92
92
|
If you need more than one "connection" to a different set and/or array of RabbitMQ servers,
|
|
93
93
|
either on network or cloud, each registration of the plugin needs it to be in its own namespace.
|
|
94
|
-
If
|
|
95
|
-
|
|
94
|
+
If the name space is duplicated, it will fail to load.
|
|
96
95
|
|
|
97
96
|
## Acknowledgements
|
|
98
97
|
|
package/lib/cjs/errors.js
CHANGED
|
@@ -7,9 +7,9 @@ exports.errors = void 0;
|
|
|
7
7
|
const error_1 = __importDefault(require("@fastify/error"));
|
|
8
8
|
exports.errors = {
|
|
9
9
|
/** Error if there is an invalid option used during registration. */
|
|
10
|
-
FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS: (0, error_1.default)(
|
|
10
|
+
FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS: (0, error_1.default)("FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS", "Invalid options: %s"),
|
|
11
11
|
/** Error if there is an setup error of the plugin itself. */
|
|
12
|
-
FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS: (0, error_1.default)(
|
|
12
|
+
FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS: (0, error_1.default)("FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS", "Setup error: %s"),
|
|
13
13
|
/** If an invalid usage error was done, this error would pop up. */
|
|
14
|
-
FASTIFY_RABBIT_MQ_ERR_USAGE: (0, error_1.default)(
|
|
14
|
+
FASTIFY_RABBIT_MQ_ERR_USAGE: (0, error_1.default)("FASTIFY_RABBIT_MQ_ERR_USAGE", "Usage error: %s"),
|
|
15
15
|
};
|
package/lib/cjs/index.js
CHANGED
|
@@ -23,29 +23,30 @@ const rabbitmq_client_1 = require("rabbitmq-client");
|
|
|
23
23
|
const errors_js_1 = require("./errors.js");
|
|
24
24
|
const validation_js_1 = require("./validation.js");
|
|
25
25
|
__exportStar(require("./types.js"), exports);
|
|
26
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
26
27
|
const decorateFastifyInstance = (fastify, options, connection) => {
|
|
27
|
-
const { namespace =
|
|
28
|
-
if (typeof namespace !==
|
|
29
|
-
fastify.log.debug(
|
|
28
|
+
const { namespace = "" } = options;
|
|
29
|
+
if (typeof namespace !== "undefined" && namespace !== "") {
|
|
30
|
+
fastify.log.debug("[fastify-rabbitmq] Namespace Attempt: %s", namespace);
|
|
30
31
|
}
|
|
31
|
-
if (typeof namespace !==
|
|
32
|
-
if (typeof fastify.rabbitmq ===
|
|
33
|
-
fastify.decorate(
|
|
32
|
+
if (typeof namespace !== "undefined" && namespace !== "") {
|
|
33
|
+
if (typeof fastify.rabbitmq === "undefined") {
|
|
34
|
+
fastify.decorate("rabbitmq", Object.create(null));
|
|
34
35
|
}
|
|
35
|
-
if (typeof fastify.rabbitmq[namespace] !==
|
|
36
|
+
if (typeof fastify.rabbitmq[namespace] !== "undefined") {
|
|
36
37
|
throw new errors_js_1.errors.FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS(`Already registered with namespace: ${namespace}`);
|
|
37
38
|
}
|
|
38
|
-
fastify.log.trace(
|
|
39
|
+
fastify.log.trace("[fastify-rabbitmq] Decorate Fastify with Namespace: %", namespace);
|
|
39
40
|
fastify.rabbitmq[namespace] = connection;
|
|
40
41
|
}
|
|
41
42
|
else {
|
|
42
|
-
if (typeof fastify.rabbitmq !==
|
|
43
|
-
throw new errors_js_1.errors.FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS(
|
|
43
|
+
if (typeof fastify.rabbitmq !== "undefined") {
|
|
44
|
+
throw new errors_js_1.errors.FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS("Already registered.");
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
|
-
if (typeof fastify.rabbitmq ===
|
|
47
|
-
fastify.log.trace(
|
|
48
|
-
fastify.decorate(
|
|
47
|
+
if (typeof fastify.rabbitmq === "undefined") {
|
|
48
|
+
fastify.log.trace("[fastify-rabbitmq] Decorate Fastify");
|
|
49
|
+
fastify.decorate("rabbitmq", connection);
|
|
49
50
|
}
|
|
50
51
|
};
|
|
51
52
|
exports.decorateFastifyInstance = decorateFastifyInstance;
|
package/lib/cjs/validation.js
CHANGED
|
@@ -4,12 +4,12 @@ exports.validateOpts = void 0;
|
|
|
4
4
|
const errors_js_1 = require("./errors.js");
|
|
5
5
|
const validateOpts = async (options) => {
|
|
6
6
|
// Mandatory
|
|
7
|
-
if (typeof options.connection ===
|
|
8
|
-
throw new errors_js_1.errors.FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS(
|
|
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
9
|
}
|
|
10
10
|
// Mandatory
|
|
11
|
-
if (typeof options.connection !==
|
|
12
|
-
if (typeof options.connection !==
|
|
11
|
+
if (typeof options.connection !== "undefined") {
|
|
12
|
+
if (typeof options.connection !== "object") {
|
|
13
13
|
// we need to do some sort of check here to make sure RabbitMQOptions is "valid"
|
|
14
14
|
}
|
|
15
15
|
}
|
package/lib/esm/decorate.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ConnectionOptions } from
|
|
1
|
+
import { ConnectionOptions } from "rabbitmq-client";
|
|
2
2
|
export interface FastifyRabbitMQOptions {
|
|
3
3
|
/**
|
|
4
4
|
* @since 1.0.0
|
|
5
|
-
* @
|
|
5
|
+
* @remarks Connection String or object pointing to the RabbitMQ Broker Services
|
|
6
6
|
*/
|
|
7
7
|
connection: string | ConnectionOptions;
|
|
8
8
|
/**
|
|
9
9
|
* @since 1.0.0
|
|
10
|
-
* @
|
|
10
|
+
* @remarks To set the custom nNamespace within this plugin instance. Used to register this plugin more than one time.
|
|
11
11
|
*/
|
|
12
12
|
namespace?: string;
|
|
13
13
|
}
|
package/lib/esm/errors.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import createError from
|
|
1
|
+
import createError from "@fastify/error";
|
|
2
2
|
export const errors = {
|
|
3
3
|
/** Error if there is an invalid option used during registration. */
|
|
4
|
-
FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS: createError(
|
|
4
|
+
FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS: createError("FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS", "Invalid options: %s"),
|
|
5
5
|
/** Error if there is an setup error of the plugin itself. */
|
|
6
|
-
FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS: createError(
|
|
6
|
+
FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS: createError("FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS", "Setup error: %s"),
|
|
7
7
|
/** If an invalid usage error was done, this error would pop up. */
|
|
8
|
-
FASTIFY_RABBIT_MQ_ERR_USAGE: createError(
|
|
8
|
+
FASTIFY_RABBIT_MQ_ERR_USAGE: createError("FASTIFY_RABBIT_MQ_ERR_USAGE", "Usage error: %s"),
|
|
9
9
|
};
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FastifyInstance } from
|
|
2
|
-
import { ConnectionOptions } from
|
|
3
|
-
import { FastifyRabbitMQOptions } from
|
|
4
|
-
export * from
|
|
1
|
+
import { FastifyInstance } from "fastify";
|
|
2
|
+
import { ConnectionOptions } from "rabbitmq-client";
|
|
3
|
+
import { FastifyRabbitMQOptions } from "./decorate.js";
|
|
4
|
+
export * from "./types.js";
|
|
5
5
|
declare const decorateFastifyInstance: (fastify: FastifyInstance, options: FastifyRabbitMQOptions, connection: any) => void;
|
|
6
6
|
/**
|
|
7
7
|
* Main Function
|
package/lib/esm/index.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import fp from
|
|
2
|
-
import { Connection as RabbitMQConnection } from
|
|
3
|
-
import { errors } from
|
|
4
|
-
import { validateOpts } from
|
|
5
|
-
export * from
|
|
1
|
+
import fp from "fastify-plugin";
|
|
2
|
+
import { Connection as RabbitMQConnection, } from "rabbitmq-client";
|
|
3
|
+
import { errors } from "./errors.js";
|
|
4
|
+
import { validateOpts } from "./validation.js";
|
|
5
|
+
export * from "./types.js";
|
|
6
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
7
|
const decorateFastifyInstance = (fastify, options, connection) => {
|
|
7
|
-
const { namespace =
|
|
8
|
-
if (typeof namespace !==
|
|
9
|
-
fastify.log.debug(
|
|
8
|
+
const { namespace = "" } = options;
|
|
9
|
+
if (typeof namespace !== "undefined" && namespace !== "") {
|
|
10
|
+
fastify.log.debug("[fastify-rabbitmq] Namespace Attempt: %s", namespace);
|
|
10
11
|
}
|
|
11
|
-
if (typeof namespace !==
|
|
12
|
-
if (typeof fastify.rabbitmq ===
|
|
13
|
-
fastify.decorate(
|
|
12
|
+
if (typeof namespace !== "undefined" && namespace !== "") {
|
|
13
|
+
if (typeof fastify.rabbitmq === "undefined") {
|
|
14
|
+
fastify.decorate("rabbitmq", Object.create(null));
|
|
14
15
|
}
|
|
15
|
-
if (typeof fastify.rabbitmq[namespace] !==
|
|
16
|
+
if (typeof fastify.rabbitmq[namespace] !== "undefined") {
|
|
16
17
|
throw new errors.FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS(`Already registered with namespace: ${namespace}`);
|
|
17
18
|
}
|
|
18
|
-
fastify.log.trace(
|
|
19
|
+
fastify.log.trace("[fastify-rabbitmq] Decorate Fastify with Namespace: %", namespace);
|
|
19
20
|
fastify.rabbitmq[namespace] = connection;
|
|
20
21
|
}
|
|
21
22
|
else {
|
|
22
|
-
if (typeof fastify.rabbitmq !==
|
|
23
|
-
throw new errors.FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS(
|
|
23
|
+
if (typeof fastify.rabbitmq !== "undefined") {
|
|
24
|
+
throw new errors.FASTIFY_RABBIT_MQ_ERR_SETUP_ERRORS("Already registered.");
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
|
-
if (typeof fastify.rabbitmq ===
|
|
27
|
-
fastify.log.trace(
|
|
28
|
-
fastify.decorate(
|
|
27
|
+
if (typeof fastify.rabbitmq === "undefined") {
|
|
28
|
+
fastify.log.trace("[fastify-rabbitmq] Decorate Fastify");
|
|
29
|
+
fastify.decorate("rabbitmq", connection);
|
|
29
30
|
}
|
|
30
31
|
};
|
|
31
32
|
/**
|
package/lib/esm/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Connection as RabbitMQConnection } from
|
|
2
|
-
declare module
|
|
1
|
+
import { Connection as RabbitMQConnection } from "rabbitmq-client";
|
|
2
|
+
declare module "fastify" {
|
|
3
3
|
interface FastifyInstance {
|
|
4
4
|
/** Main Decorator for Fastify **/
|
|
5
5
|
rabbitmq: RabbitMQConnection & fastifyRabbitMQ.FastifyRabbitMQNO;
|
package/lib/esm/validation.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FastifyRabbitMQOptions } from
|
|
1
|
+
import { FastifyRabbitMQOptions } from "./decorate.js";
|
|
2
2
|
export declare const validateOpts: (options: FastifyRabbitMQOptions) => Promise<void>;
|
package/lib/esm/validation.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { errors } from
|
|
1
|
+
import { errors } from "./errors.js";
|
|
2
2
|
export const validateOpts = async (options) => {
|
|
3
3
|
// Mandatory
|
|
4
|
-
if (typeof options.connection ===
|
|
5
|
-
throw new errors.FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS(
|
|
4
|
+
if (typeof options.connection === "undefined") {
|
|
5
|
+
throw new errors.FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS("connection or findServers must be defined.");
|
|
6
6
|
}
|
|
7
7
|
// Mandatory
|
|
8
|
-
if (typeof options.connection !==
|
|
9
|
-
if (typeof options.connection !==
|
|
8
|
+
if (typeof options.connection !== "undefined") {
|
|
9
|
+
if (typeof options.connection !== "object") {
|
|
10
10
|
// we need to do some sort of check here to make sure RabbitMQOptions is "valid"
|
|
11
11
|
}
|
|
12
12
|
}
|
package/lib/types/decorate.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ConnectionOptions } from
|
|
1
|
+
import { ConnectionOptions } from "rabbitmq-client";
|
|
2
2
|
export interface FastifyRabbitMQOptions {
|
|
3
3
|
/**
|
|
4
4
|
* @since 1.0.0
|
|
5
|
-
* @
|
|
5
|
+
* @remarks Connection String or object pointing to the RabbitMQ Broker Services
|
|
6
6
|
*/
|
|
7
7
|
connection: string | ConnectionOptions;
|
|
8
8
|
/**
|
|
9
9
|
* @since 1.0.0
|
|
10
|
-
* @
|
|
10
|
+
* @remarks To set the custom nNamespace within this plugin instance. Used to register this plugin more than one time.
|
|
11
11
|
*/
|
|
12
12
|
namespace?: string;
|
|
13
13
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FastifyInstance } from
|
|
2
|
-
import { ConnectionOptions } from
|
|
3
|
-
import { FastifyRabbitMQOptions } from
|
|
4
|
-
export * from
|
|
1
|
+
import { FastifyInstance } from "fastify";
|
|
2
|
+
import { ConnectionOptions } from "rabbitmq-client";
|
|
3
|
+
import { FastifyRabbitMQOptions } from "./decorate.js";
|
|
4
|
+
export * from "./types.js";
|
|
5
5
|
declare const decorateFastifyInstance: (fastify: FastifyInstance, options: FastifyRabbitMQOptions, connection: any) => void;
|
|
6
6
|
/**
|
|
7
7
|
* Main Function
|
package/lib/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Connection as RabbitMQConnection } from
|
|
2
|
-
declare module
|
|
1
|
+
import { Connection as RabbitMQConnection } from "rabbitmq-client";
|
|
2
|
+
declare module "fastify" {
|
|
3
3
|
interface FastifyInstance {
|
|
4
4
|
/** Main Decorator for Fastify **/
|
|
5
5
|
rabbitmq: RabbitMQConnection & fastifyRabbitMQ.FastifyRabbitMQNO;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FastifyRabbitMQOptions } from
|
|
1
|
+
import { FastifyRabbitMQOptions } from "./decorate.js";
|
|
2
2
|
export declare const validateOpts: (options: FastifyRabbitMQOptions) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fastify-rabbitmq",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.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,18 +14,22 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
-
"lib/"
|
|
17
|
+
"lib/",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
18
20
|
],
|
|
19
21
|
"engines": {
|
|
20
22
|
"node": ">=20.11.0"
|
|
21
23
|
},
|
|
22
24
|
"scripts": {
|
|
23
|
-
"clean": "rm -rf
|
|
25
|
+
"clean": "rm -rf coverage docs lib temp",
|
|
24
26
|
"build": "tsc -p src/tsconfig.esm.json && tsc -p src/tsconfig.cjs.json && tsc -p src/tsconfig.types.json && ./bin/build-types.sh",
|
|
25
27
|
"build:watch": "tsc -p src/tsconfig.esm.json -w",
|
|
26
|
-
"
|
|
27
|
-
"lint": "npmPkgJsonLint .
|
|
28
|
-
"
|
|
28
|
+
"build:watch:cjs": "tsc -p src/tsconfig.cjs.json -w",
|
|
29
|
+
"npm:lint": "npmPkgJsonLint .",
|
|
30
|
+
"format": "prettier --write 'README.md' 'src/**/*.ts' '__tests__/**/*.ts'",
|
|
31
|
+
"lint": "npm run npm:lint && eslint | snazzy",
|
|
32
|
+
"lint:fix": "npm run npm:lint && eslint --fix | snazzy",
|
|
29
33
|
"pack": "npm pack",
|
|
30
34
|
"prepublishOnly": "npm run clean && npm run build && npm run pack",
|
|
31
35
|
"test": "vitest run",
|
|
@@ -34,8 +38,6 @@
|
|
|
34
38
|
"test:coverage": "vitest --coverage",
|
|
35
39
|
"typedoc": "typedoc",
|
|
36
40
|
"typedoc:watch": "typedoc -watch",
|
|
37
|
-
"semantic-release": "semantic-release",
|
|
38
|
-
"semantic-release:dry-run": "semantic-release --dry-run",
|
|
39
41
|
"update": "npx npm-check-updates -u --enginesNode && npm run update:post-update",
|
|
40
42
|
"update:post-update": "npm install && npm run test"
|
|
41
43
|
},
|
|
@@ -57,31 +59,34 @@
|
|
|
57
59
|
},
|
|
58
60
|
"homepage": "https://github.com/Bugs5382/fastify-rabbitmq#readme",
|
|
59
61
|
"dependencies": {
|
|
60
|
-
"@fastify/error": "^4.
|
|
62
|
+
"@fastify/error": "^4.1.0",
|
|
61
63
|
"fastify-plugin": "^5.0.1",
|
|
62
|
-
"rabbitmq-client": "^5.0.
|
|
64
|
+
"rabbitmq-client": "^5.0.2"
|
|
63
65
|
},
|
|
64
66
|
"devDependencies": {
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"@types/
|
|
69
|
-
"@
|
|
70
|
-
"@typescript-eslint/parser": "^8.
|
|
71
|
-
"@vitest/coverage-v8": "^
|
|
72
|
-
"@vitest/ui": "^
|
|
73
|
-
"
|
|
74
|
-
"
|
|
67
|
+
"@eslint/js": "^9.23.0",
|
|
68
|
+
"@shipgirl/typedoc-plugin-versions": "^0.3.0",
|
|
69
|
+
"@types/node": "^22.13.13",
|
|
70
|
+
"@types/tcp-port-used": "^1.0.4",
|
|
71
|
+
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
|
72
|
+
"@typescript-eslint/parser": "^8.28.0",
|
|
73
|
+
"@vitest/coverage-v8": "^3.0.9",
|
|
74
|
+
"@vitest/ui": "^3.0.9",
|
|
75
|
+
"eslint": "^9.23.0",
|
|
76
|
+
"eslint-config-prettier": "^10.1.1",
|
|
77
|
+
"eslint-plugin-prettier": "^5.2.4",
|
|
78
|
+
"fastify": "^5.2.1",
|
|
79
|
+
"npm-check-updates": "^17.1.16",
|
|
75
80
|
"npm-package-json-lint": "^8.0.0",
|
|
81
|
+
"npm-package-json-lint-config-default": "^7.0.1",
|
|
76
82
|
"pre-commit": "^1.2.2",
|
|
77
|
-
"semantic-release": "^24.2.0",
|
|
78
83
|
"snazzy": "^9.0.0",
|
|
79
84
|
"ts-node": "^10.9.2",
|
|
80
|
-
"ts-standard": "^12.0.2",
|
|
81
85
|
"tsd": "^0.31.2",
|
|
82
|
-
"typedoc": "^0.
|
|
83
|
-
"typescript": "^5.
|
|
84
|
-
"
|
|
86
|
+
"typedoc": "^0.28.1",
|
|
87
|
+
"typescript": "^5.8.2",
|
|
88
|
+
"typescript-eslint": "^8.28.0",
|
|
89
|
+
"vitest": "^3.0.9"
|
|
85
90
|
},
|
|
86
91
|
"precommit": [
|
|
87
92
|
"test",
|