fastify-rabbitmq 1.2.0 → 1.4.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.
@@ -67,11 +67,10 @@ exports.decorateFastifyInstance = decorateFastifyInstance;
67
67
  * @see [https://cody-greene.github.io/node-rabbitmq-client/latest/index.html](https://cody-greene.github.io/node-rabbitmq-client/latest/index.html)
68
68
  *
69
69
  */
70
- const fastifyRabbit = (0, fastify_plugin_1.default)(async (fastify, opts, done) => {
70
+ const fastifyRabbit = (0, fastify_plugin_1.default)(async (fastify, opts) => {
71
71
  await (0, validation_js_1.validateOpts)(opts);
72
72
  const { connection } = opts;
73
73
  const c = new rabbitmq_client_1.Connection(connection);
74
74
  decorateFastifyInstance(fastify, opts, c);
75
- done();
76
75
  });
77
76
  exports.default = fastifyRabbit;
@@ -46,12 +46,11 @@ const decorateFastifyInstance = (fastify, options, connection) => {
46
46
  * @see [https://cody-greene.github.io/node-rabbitmq-client/latest/index.html](https://cody-greene.github.io/node-rabbitmq-client/latest/index.html)
47
47
  *
48
48
  */
49
- const fastifyRabbit = fp(async (fastify, opts, done) => {
49
+ const fastifyRabbit = fp(async (fastify, opts) => {
50
50
  await validateOpts(opts);
51
51
  const { connection } = opts;
52
52
  const c = new RabbitMQConnection(connection);
53
53
  decorateFastifyInstance(fastify, opts, c);
54
- done();
55
54
  });
56
55
  export default fastifyRabbit;
57
56
  export { decorateFastifyInstance };
@@ -1 +1 @@
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,C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- "module": "./dist/esm/index.js",
6
- "main": "./dist/cjs/index.js",
7
- "types": "./dist/types/index.d.ts",
8
- "release": {
9
- "branches": [
10
- "main"
11
- ]
12
- },
5
+ "module": "./lib/esm/index.js",
6
+ "main": "./lib/cjs/index.js",
7
+ "types": "./lib/types/index.d.ts",
13
8
  "exports": {
14
9
  ".": {
15
- "types": "./dist/types/index.d.ts",
16
- "import": "./dist/esm/index.js",
17
- "require": "./dist/cjs/index.js",
18
- "default": "./dist/cjs/index.js"
10
+ "types": "./lib/types/index.d.ts",
11
+ "import": "./lib/esm/index.js",
12
+ "require": "./lib/cjs/index.js",
13
+ "default": "./lib/cjs/index.js"
19
14
  }
20
15
  },
21
16
  "files": [
22
- "dist/**/*"
17
+ "lib/**/**"
23
18
  ],
24
19
  "scripts": {
25
- "clean": "rm -rf dist coverage",
20
+ "clean": "rm -rf lib coverage",
26
21
  "build": "tsc && tsc -p tsconfig.cjs.json && tsc -p tsconfig.types.json && ./bin/build-types.sh",
27
22
  "build:watch": "tsc -w",
28
- "lint": "ts-standard --parser @typescript-eslint/parser | snazzy",
29
- "lint:fix": "ts-standard --fix --parser @typescript-eslint/parser | snazzy",
30
- "pack": "npm run clean && npm run test:ci && npm run build && npm pack",
31
- "prepublishOnly": "npm run clean && npm run build",
23
+ "lint": "ts-standard | snazzy",
24
+ "lint:fix": "ts-standard | snazzy",
25
+ "pack": "npm pack",
26
+ "prepublishOnly": "npm run clean && npm run build && npm run test:ci && npm run pack",
32
27
  "test": "jest",
28
+ "test:open": "jest --detectOpenHandles",
33
29
  "test:ci": "jest --ci",
34
30
  "test:coverage": "jest --coverage",
35
31
  "typedoc": "typedoc",
36
32
  "typedoc:watch": "typedoc -watch",
37
33
  "semantic-release": "semantic-release",
38
- "semantic-release:dryRun": "semantic-release --dry-run",
39
- "update": "npx npm-check-updates -u && npm install && npm run test"
34
+ "semantic-release:dry-run": "semantic-release --dry-run",
35
+ "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
+ "update:post-update": "npm install && npm run test:ci"
40
42
  },
41
43
  "repository": {
42
44
  "type": "git",
43
- "url": "https://github.com/Bugs5382/fastify-rabbitmq"
45
+ "url": "git+https://github.com/Bugs5382/fastify-rabbitmq.git"
44
46
  },
45
47
  "keywords": [
46
48
  "rabbitmq-client",
@@ -65,23 +67,24 @@
65
67
  "@semantic-release/commit-analyzer": "^11.1.0",
66
68
  "@semantic-release/git": "^10.0.1",
67
69
  "@semantic-release/release-notes-generator": "^12.1.0",
68
- "@types/jest": "^29.5.8",
69
- "@types/node": "^20.9.0",
70
+ "@the-rabbit-hole/semantic-release-config": "^1.4.0",
71
+ "@types/jest": "^29.5.11",
72
+ "@types/node": "^20.10.5",
70
73
  "@types/randomstring": "^1.1.11",
71
- "@typescript-eslint/parser": "^6.11.0",
72
- "fastify": "^4.24.3",
74
+ "@typescript-eslint/parser": "^6.15.0",
75
+ "fastify": "^4.25.1",
73
76
  "jest": "^29.7.0",
74
77
  "jest-ts-webcompat-resolver": "^1.0.0",
75
- "npm-check-updates": "^16.14.6",
78
+ "npm-check-updates": "^16.14.12",
76
79
  "pre-commit": "^1.2.2",
77
- "semantic-release": "^22.0.7",
80
+ "semantic-release": "^22.0.12",
78
81
  "snazzy": "^9.0.0",
79
82
  "ts-jest": "^29.1.1",
80
- "ts-node": "^10.9.1",
83
+ "ts-node": "^10.9.2",
81
84
  "ts-standard": "^12.0.2",
82
- "tsd": "^0.29.0",
83
- "typedoc": "^0.25.3",
84
- "typescript": "^5.2.2"
85
+ "tsd": "^0.30.0",
86
+ "typedoc": "^0.25.4",
87
+ "typescript": "^5.3.3"
85
88
  },
86
89
  "pre-commit": []
87
90
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes