@fgiova/sqs-consumer 2.1.1 → 2.1.3
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 +1 -0
- package/dist/cjs/hooks.d.ts +3 -1
- package/dist/esm/hooks.d.mts +3 -1
- package/package.json +79 -79
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@fgiova/sqs-consumer)
|
|
4
4
|

|
|
5
5
|
[](http://www.typescriptlang.org/)
|
|
6
|
+
[](https://biomejs.dev)
|
|
6
7
|
[](https://qlty.sh/gh/fgiova/projects/sqs-consumer)
|
|
7
8
|
[](https://qlty.sh/gh/fgiova/projects/sqs-consumer)
|
|
8
9
|
|
package/dist/cjs/hooks.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** biome-ignore-all lint/complexity/noBannedTypes: Function required as generic */
|
|
2
|
+
import type { Message } from "@fgiova/mini-sqs-client";
|
|
1
3
|
import type { Logger } from "./logger";
|
|
2
4
|
export type HookName = "onPoll" | "onMessage" | "onHandlerSuccess" | "onHandlerTimeout" | "onHandlerError" | "onSuccess" | "onError" | "onSQSError";
|
|
3
5
|
export declare class Hooks {
|
|
@@ -6,7 +8,7 @@ export declare class Hooks {
|
|
|
6
8
|
private readonly logger;
|
|
7
9
|
constructor(logger?: Logger);
|
|
8
10
|
addHook(hook: HookName, fn: Function): void;
|
|
9
|
-
runHook(hook: HookName, ...args: any[]): Promise<
|
|
11
|
+
runHook(hook: HookName, ...args: any[]): Promise<boolean | void | Message | Message[]>;
|
|
10
12
|
private runHookWithVoidReturn;
|
|
11
13
|
private runHookWithMessageReturn;
|
|
12
14
|
private runHookWithBooleanReturn;
|
package/dist/esm/hooks.d.mts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** biome-ignore-all lint/complexity/noBannedTypes: Function required as generic */
|
|
2
|
+
import type { Message } from "@fgiova/mini-sqs-client";
|
|
1
3
|
import type { Logger } from "./logger.mjs";
|
|
2
4
|
export type HookName = "onPoll" | "onMessage" | "onHandlerSuccess" | "onHandlerTimeout" | "onHandlerError" | "onSuccess" | "onError" | "onSQSError";
|
|
3
5
|
export declare class Hooks {
|
|
@@ -6,7 +8,7 @@ export declare class Hooks {
|
|
|
6
8
|
private readonly logger;
|
|
7
9
|
constructor(logger?: Logger);
|
|
8
10
|
addHook(hook: HookName, fn: Function): void;
|
|
9
|
-
runHook(hook: HookName, ...args: any[]): Promise<
|
|
11
|
+
runHook(hook: HookName, ...args: any[]): Promise<boolean | void | Message | Message[]>;
|
|
10
12
|
private runHookWithVoidReturn;
|
|
11
13
|
private runHookWithMessageReturn;
|
|
12
14
|
private runHookWithBooleanReturn;
|
package/package.json
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
2
|
+
"name": "@fgiova/sqs-consumer",
|
|
3
|
+
"version": "2.1.3",
|
|
4
|
+
"main": "./dist/cjs/index.js",
|
|
5
|
+
"types": "./dist/cjs/index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": {
|
|
9
|
+
"types": "./dist/esm/index.d.mts",
|
|
10
|
+
"default": "./dist/esm/index.mjs"
|
|
11
|
+
},
|
|
12
|
+
"require": {
|
|
13
|
+
"types": "./dist/cjs/index.d.ts",
|
|
14
|
+
"default": "./dist/cjs/index.js"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"clean": "rimraf dist",
|
|
23
|
+
"preBuild": "npm run clean",
|
|
24
|
+
"build": "esmBuilder",
|
|
25
|
+
"lint": "biome ci ./src ./test",
|
|
26
|
+
"fix": "biome check --write ./src ./test",
|
|
27
|
+
"test": "tap",
|
|
28
|
+
"test:debug": "tap --only --timeout=0",
|
|
29
|
+
"test:coverage": "tap --coverage-report=lcovonly --coverage-report=text",
|
|
30
|
+
"test:local": "TEST_LOCAL=true tap"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/fgiova/sqs-consumer.git"
|
|
35
|
+
},
|
|
36
|
+
"author": "Francesco Giovannini <fgiova@fgiova.com>",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"keywords": [
|
|
39
|
+
"aws",
|
|
40
|
+
"sqs",
|
|
41
|
+
"sqs-consumer"
|
|
42
|
+
],
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=20.0.0"
|
|
48
|
+
},
|
|
49
|
+
"tap": {
|
|
50
|
+
"show-full-coverage": true,
|
|
51
|
+
"before": "./test/scripts/executors/before.js",
|
|
52
|
+
"after": "./test/scripts/executors/teardown.js",
|
|
53
|
+
"exclude": [
|
|
54
|
+
"test/helpers/**/*",
|
|
55
|
+
"test/scripts/**/*"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@fgiova/mini-sqs-client": "^3.2.2",
|
|
60
|
+
"@watchable/unpromise": "^1.0.2",
|
|
61
|
+
"p-map": "^7.0.3"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"@fgiova/aws-signature": "^3.1.2"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@aws-sdk/client-sqs": "^3.758.0",
|
|
68
|
+
"@biomejs/biome": "2.2.2",
|
|
69
|
+
"@fgiova/cjs-esm-ts-builder": "^1.2.0",
|
|
70
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
71
|
+
"@semantic-release/git": "^10.0.1",
|
|
72
|
+
"@tsconfig/node20": "^20.1.4",
|
|
73
|
+
"@types/node": "^20.17.23",
|
|
74
|
+
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
75
|
+
"semantic-release": "^24.2.3",
|
|
76
|
+
"tap": "^21.1.0",
|
|
77
|
+
"testcontainers": "^11.5.1",
|
|
78
|
+
"ts-node": "^10.9.2",
|
|
79
|
+
"typescript": "^5.8.2"
|
|
80
|
+
}
|
|
81
81
|
}
|