@autofleet/rabbit 3.6.0-beta---beta.0.0 → 4.0.0-beta.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/coverage/clover.xml +669 -0
- package/coverage/coverage-final.json +9 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +131 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/index.html +131 -0
- package/coverage/lcov-report/src/index.ts.html +3826 -0
- package/coverage/lcov-report/src/lib/celery.ts.html +352 -0
- package/coverage/lcov-report/src/lib/consts.ts.html +142 -0
- package/coverage/lcov-report/src/lib/index.html +191 -0
- package/coverage/lcov-report/src/lib/rabbitError.ts.html +103 -0
- package/coverage/lcov-report/src/lib/redis.ts.html +133 -0
- package/coverage/lcov-report/src/lib/types.ts.html +268 -0
- package/coverage/lcov-report/src/lib/utils.ts.html +142 -0
- package/coverage/lcov-report/src/logger.ts.html +100 -0
- package/coverage/lcov.info +1076 -0
- package/dist/index.d.ts +15 -22
- package/dist/index.js +162 -281
- package/dist/lib/celery.js +0 -1
- package/dist/lib/consts.d.ts +2 -0
- package/dist/lib/consts.js +3 -2
- package/dist/lib/rabbitError.js +0 -1
- package/dist/lib/redis.js +0 -1
- package/dist/lib/types.d.ts +0 -8
- package/dist/lib/types.js +0 -1
- package/dist/lib/utils.js +0 -1
- package/dist/logger.js +0 -1
- package/dist/{mock/index.d.ts → mock.d.ts} +1 -1
- package/dist/{mock/index.js → mock.js} +1 -2
- package/package.json +16 -22
- package/src/index.ts +187 -329
- package/src/lib/consts.ts +2 -0
- package/src/lib/types.ts +0 -10
- package/src/{mock/index.ts → mock.ts} +2 -2
- package/tsconfig.json +2 -2
- package/.claude/settings.local.json +0 -3
- package/dist/index.js.map +0 -1
- package/dist/lib/celery.js.map +0 -1
- package/dist/lib/consts.js.map +0 -1
- package/dist/lib/rabbitError.js.map +0 -1
- package/dist/lib/redis.js.map +0 -1
- package/dist/lib/types.js.map +0 -1
- package/dist/lib/utils.js.map +0 -1
- package/dist/logger.js.map +0 -1
- package/dist/mock/index.js.map +0 -1
- package/dist/mock/vitest.d.ts +0 -13
- package/dist/mock/vitest.js +0 -18
- package/dist/mock/vitest.js.map +0 -1
- package/src/mock/vitest.ts +0 -24
- package/tsconfig.build.json +0 -5
- package/vitest.config.ts +0 -16
package/dist/lib/celery.js
CHANGED
package/dist/lib/consts.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare const USER_TRACING_HEADER = "x-af-user-id";
|
|
|
6
6
|
export declare const AUTOMATION_ID_HEADER = "x-af-automation-id";
|
|
7
7
|
export declare const USER_OBJECT = "userObject";
|
|
8
8
|
export declare const DEFAULT_USE_CONSUME_WITH_LOCK = false;
|
|
9
|
+
export declare const CONNECTION_CREATED_CONST = "connectionCreated";
|
|
10
|
+
export declare const CONNECTION_FAILED_CONST = "connectionFailed";
|
|
9
11
|
export declare const DEFAULT_OPTIONS: {
|
|
10
12
|
limit: number;
|
|
11
13
|
retries: number;
|
package/dist/lib/consts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_OPTIONS = exports.DEFAULT_USE_CONSUME_WITH_LOCK = exports.USER_OBJECT = exports.AUTOMATION_ID_HEADER = exports.USER_TRACING_HEADER = exports.TRACING_HEADER = exports.RETRY_HEADER = exports.DEFAULT_LOCK_TIMEOUT = exports.DEFAULT_DEAD_TTL_TWO_DAYS = void 0;
|
|
3
|
+
exports.DEFAULT_OPTIONS = exports.CONNECTION_FAILED_CONST = exports.CONNECTION_CREATED_CONST = exports.DEFAULT_USE_CONSUME_WITH_LOCK = exports.USER_OBJECT = exports.AUTOMATION_ID_HEADER = exports.USER_TRACING_HEADER = exports.TRACING_HEADER = exports.RETRY_HEADER = exports.DEFAULT_LOCK_TIMEOUT = exports.DEFAULT_DEAD_TTL_TWO_DAYS = void 0;
|
|
4
4
|
exports.DEFAULT_DEAD_TTL_TWO_DAYS = 60000 * 60 * 12;
|
|
5
5
|
exports.DEFAULT_LOCK_TIMEOUT = 1000 * 5;
|
|
6
6
|
exports.RETRY_HEADER = 'x-retry-count';
|
|
@@ -9,6 +9,8 @@ exports.USER_TRACING_HEADER = 'x-af-user-id';
|
|
|
9
9
|
exports.AUTOMATION_ID_HEADER = 'x-af-automation-id';
|
|
10
10
|
exports.USER_OBJECT = 'userObject';
|
|
11
11
|
exports.DEFAULT_USE_CONSUME_WITH_LOCK = false;
|
|
12
|
+
exports.CONNECTION_CREATED_CONST = 'connectionCreated';
|
|
13
|
+
exports.CONNECTION_FAILED_CONST = 'connectionFailed';
|
|
12
14
|
exports.DEFAULT_OPTIONS = {
|
|
13
15
|
limit: 1,
|
|
14
16
|
retries: 1,
|
|
@@ -18,4 +20,3 @@ exports.DEFAULT_OPTIONS = {
|
|
|
18
20
|
auditContext: null,
|
|
19
21
|
enableRabbitTrace: false,
|
|
20
22
|
};
|
|
21
|
-
//# sourceMappingURL=consts.js.map
|
package/dist/lib/rabbitError.js
CHANGED
package/dist/lib/redis.js
CHANGED
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AmqpConnectionManager } from 'amqp-connection-manager';
|
|
2
1
|
import { ConsumeMessage, Options, Replies } from 'amqplib';
|
|
3
2
|
export interface ExchangesCache {
|
|
4
3
|
[key: string]: any;
|
|
@@ -43,10 +42,3 @@ export type AfConsumer = {
|
|
|
43
42
|
options: ConsumeOptions | undefined;
|
|
44
43
|
};
|
|
45
44
|
export declare const CONSUMER_DEFAULT_OPTIONS: Options.Consume;
|
|
46
|
-
export type ConnectionData = {
|
|
47
|
-
amqpConnection: AmqpConnectionManager | null;
|
|
48
|
-
creatingConnection: boolean;
|
|
49
|
-
connectionCreatedEventName: string;
|
|
50
|
-
connectionFailedEventName: string;
|
|
51
|
-
blockReconnect: boolean;
|
|
52
|
-
};
|
package/dist/lib/types.js
CHANGED
package/dist/lib/utils.js
CHANGED
package/dist/logger.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// eslint-disable-next-line import/no-
|
|
3
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
4
4
|
require("jest");
|
|
5
5
|
class RabbitMq {
|
|
6
6
|
constructor() {
|
|
@@ -16,4 +16,3 @@ class RabbitMq {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
exports.default = RabbitMq;
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autofleet/rabbit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-beta.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -10,47 +10,41 @@
|
|
|
10
10
|
"postinstall": "echo '\\033[0;31m\nWARNING: in case of migrating to new version of @autofleet/rabbit \nyou might have to delete existing queues or the deployment will fail.\\033[0m\n'",
|
|
11
11
|
"start": "ts-node src/index.ts",
|
|
12
12
|
"example": "ts-node src/example.ts",
|
|
13
|
-
"build": "rm -rf dist && tsc
|
|
14
|
-
"linter": "eslint .",
|
|
15
|
-
"test": "
|
|
16
|
-
"test-local": "RABBITMQ_SERVICE_HOST=localhost:5672
|
|
17
|
-
"coverage": "
|
|
13
|
+
"build": "rm -rf dist && tsc",
|
|
14
|
+
"linter": "./node_modules/.bin/eslint .",
|
|
15
|
+
"test": "jest --runInBand --forceExit",
|
|
16
|
+
"test-local": "RABBITMQ_SERVICE_HOST=localhost:5672 jest --forceExit",
|
|
17
|
+
"coverage": "jest --coverage --forceExit && rm -rf ./coverage",
|
|
18
18
|
"dev": "nodemon"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@autofleet/zehut": "^3.1.2",
|
|
22
|
-
"amqp-connection-manager": "4.1.
|
|
23
|
-
"amqplib": "0.10.
|
|
22
|
+
"amqp-connection-manager": "4.1.9",
|
|
23
|
+
"amqplib": "0.10.3",
|
|
24
|
+
"axios": "^1.7.9",
|
|
24
25
|
"bluebird": "^3.7.2",
|
|
25
|
-
"moment": "^2.
|
|
26
|
+
"moment": "^2.29.1",
|
|
26
27
|
"redis": "^3.1.2",
|
|
27
28
|
"redis-lock": "^0.1.4"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
30
|
-
"@autofleet/logger": "*"
|
|
31
|
-
"jest": "*"
|
|
32
|
-
},
|
|
33
|
-
"peerDependenciesMeta": {
|
|
34
|
-
"jest": {
|
|
35
|
-
"optional": true
|
|
36
|
-
}
|
|
31
|
+
"@autofleet/logger": "*"
|
|
37
32
|
},
|
|
38
33
|
"devDependencies": {
|
|
39
34
|
"@autofleet/logger": "4.0.6",
|
|
40
|
-
"@types/amqplib": "0.
|
|
41
|
-
"@types/bluebird": "^3.5.42",
|
|
35
|
+
"@types/amqplib": "0.8.2",
|
|
42
36
|
"@types/jest": "^29.5.12",
|
|
43
37
|
"@types/node": "^20.14.11",
|
|
44
38
|
"@typescript-eslint/eslint-plugin": "^4.8.1",
|
|
45
|
-
"@vitest/coverage-v8": "^3.1.3",
|
|
46
39
|
"eslint": "^7.13.0",
|
|
47
40
|
"eslint-config-airbnb-typescript": "^12.0.0",
|
|
48
41
|
"eslint-plugin-import": "^2.22.1",
|
|
42
|
+
"jest": "^29.7.0",
|
|
49
43
|
"node-tcp-proxy": "^0.0.28",
|
|
44
|
+
"ts-jest": "^29.2.3",
|
|
50
45
|
"ts-node": "^8.6.2",
|
|
51
|
-
"typescript": "^4.9.5"
|
|
52
|
-
"vitest": "^3.1.3"
|
|
46
|
+
"typescript": "^4.9.5"
|
|
53
47
|
},
|
|
54
48
|
"author": "",
|
|
55
|
-
"license": "
|
|
49
|
+
"license": "ISC"
|
|
56
50
|
}
|