@anchan828/nest-cloud-run-queue-worker 2.0.18 → 2.0.20
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/dist/interfaces.d.ts +7 -7
- package/package.json +3 -3
package/dist/interfaces.d.ts
CHANGED
|
@@ -32,9 +32,9 @@ export interface QueueWorkerModuleOptions extends ModuleOptions {
|
|
|
32
32
|
*/
|
|
33
33
|
workerController?: QueueWorkerControllerMetadata | null;
|
|
34
34
|
}
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
35
|
+
export type QueueWorkerModuleAsyncOptions = ModuleAsyncOptions<Omit<QueueWorkerModuleOptions, "workerController">> & Pick<QueueWorkerModuleOptions, "workerController">;
|
|
36
|
+
export type QueueWorkerModuleOptionsFactory = ModuleOptionsFactory<Omit<QueueWorkerModuleOptions, "workerController">> & Pick<QueueWorkerModuleOptions, "workerController">;
|
|
37
|
+
export type QueueWorkerProcessor = <T>(message: T, raw: QueueWorkerRawMessage) => Promise<void> | void;
|
|
38
38
|
export interface QueueWorkerMetadata {
|
|
39
39
|
instance: Injectable;
|
|
40
40
|
processors: QueueWorkerProcessorMetadata[];
|
|
@@ -48,7 +48,7 @@ export declare enum QueueWorkerProcessorStatus {
|
|
|
48
48
|
IN_PROGRESS = 0,
|
|
49
49
|
SKIP = 1
|
|
50
50
|
}
|
|
51
|
-
export
|
|
51
|
+
export type QueueWorkerExtraConfig = {
|
|
52
52
|
preProcessor?: (name: string, ...args: Parameters<QueueWorkerProcessor>) => (QueueWorkerProcessorStatus | undefined | void) | Promise<QueueWorkerProcessorStatus | undefined | void>;
|
|
53
53
|
postProcessor?: (name: string, ...args: Parameters<QueueWorkerProcessor>) => void | Promise<void>;
|
|
54
54
|
};
|
|
@@ -71,16 +71,16 @@ export interface QueueWorkerProcessDecoratorArgs {
|
|
|
71
71
|
*/
|
|
72
72
|
priority: number;
|
|
73
73
|
}
|
|
74
|
-
export
|
|
74
|
+
export type QueueWorkerRawMessage<T = any> = {
|
|
75
75
|
readonly data?: string | null | Message<T>;
|
|
76
76
|
readonly headers?: Record<string, string>;
|
|
77
77
|
} & Record<string, any>;
|
|
78
|
-
export
|
|
78
|
+
export type QueueWorkerDecodedMessage<T = any> = {
|
|
79
79
|
readonly data: Message<T>;
|
|
80
80
|
readonly headers?: Record<string, string>;
|
|
81
81
|
readonly raw: QueueWorkerRawMessage;
|
|
82
82
|
};
|
|
83
|
-
export
|
|
83
|
+
export type QueueWorkerReceivedMessage = {
|
|
84
84
|
readonly message: QueueWorkerRawMessage;
|
|
85
85
|
};
|
|
86
86
|
export interface QueueWorkerControllerMetadata extends RequestMappingMetadata {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anchan828/nest-cloud-run-queue-worker",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.20",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "https://github.com/anchan828/nest-cloud-run-queue/tree/master/packages/worker#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"watch": "tsc -w"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@anchan828/nest-cloud-run-queue-common": "^2.0.
|
|
36
|
+
"@anchan828/nest-cloud-run-queue-common": "^2.0.20"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@nestjs/common": "^9.1.1",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "fb2f363564fbae513ce63b61a2fc082baa98430f"
|
|
49
49
|
}
|