@infineit-nestjs/core 1.0.14 → 1.0.15
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/cjs/index.d.ts +0 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/kafka/index.d.ts +3 -0
- package/dist/es/index.d.ts +0 -2
- package/dist/es/index.js +1 -1
- package/dist/es/kafka/index.d.ts +3 -0
- package/dist/types/index.d.ts +0 -2
- package/package.json +12 -3
- package/dist/types/kafka/interfaces/kafka.interface.d.ts +0 -16
- package/dist/types/kafka/interfaces/kafka.service.interface.d.ts +0 -13
- package/dist/types/kafka/kafka.module.d.ts +0 -12
- package/dist/types/kafka/kafka.service.d.ts +0 -27
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const r=require("tslib");r.__exportStar(require("./constants"),exports),r.__exportStar(require("./decorators"),exports),r.__exportStar(require("./errors"),exports),r.__exportStar(require("./exceptions"),exports),r.__exportStar(require("./filters"),exports),r.__exportStar(require("./validators"),exports)
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const r=require("tslib");r.__exportStar(require("./constants"),exports),r.__exportStar(require("./decorators"),exports),r.__exportStar(require("./errors"),exports),r.__exportStar(require("./exceptions"),exports),r.__exportStar(require("./filters"),exports),r.__exportStar(require("./validators"),exports);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/es/index.d.ts
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0});const r=require("tslib");r.__exportStar(require("./constants"),exports),r.__exportStar(require("./decorators"),exports),r.__exportStar(require("./errors"),exports),r.__exportStar(require("./exceptions"),exports),r.__exportStar(require("./filters"),exports),r.__exportStar(require("./validators"),exports)
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});const r=require("tslib");r.__exportStar(require("./constants"),exports),r.__exportStar(require("./decorators"),exports),r.__exportStar(require("./errors"),exports),r.__exportStar(require("./exceptions"),exports),r.__exportStar(require("./filters"),exports),r.__exportStar(require("./validators"),exports);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -22,5 +22,3 @@ export { Query } from './filters/query.js';
|
|
|
22
22
|
export { UnprocessableEntityFilter } from './filters/unprocessable-entity.filter.js';
|
|
23
23
|
export { IsValidField } from './validators/field.validator.js';
|
|
24
24
|
export { CommaSeparated, SortBy } from './validators/filter.validator.js';
|
|
25
|
-
export { IKafkaModuleOptions, KafkaModule } from './kafka/kafka.module.js';
|
|
26
|
-
export { KafkaService } from './kafka/kafka.service.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infineit-nestjs/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"main": "./dist/cjs/index.js",
|
|
5
5
|
"module": "./dist/es/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -45,6 +45,12 @@
|
|
|
45
45
|
"import": "./dist/es/validators/index.mjs",
|
|
46
46
|
"require": "./dist/cjs/validators/index.js",
|
|
47
47
|
"default": "./dist/cjs/validators/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./kafka": {
|
|
50
|
+
"types": "./dist/types/kafka/index.d.ts",
|
|
51
|
+
"import": "./dist/es/kafka/index.mjs",
|
|
52
|
+
"require": "./dist/cjs/kafka/index.js",
|
|
53
|
+
"default": "./dist/cjs/kafka/index.js"
|
|
48
54
|
}
|
|
49
55
|
},
|
|
50
56
|
"types": "./dist/types/index.d.ts",
|
|
@@ -67,6 +73,9 @@
|
|
|
67
73
|
],
|
|
68
74
|
"validators": [
|
|
69
75
|
"dist/types/validators/index.d.ts"
|
|
76
|
+
],
|
|
77
|
+
"kafka": [
|
|
78
|
+
"dist/types/kafka/index.d.ts"
|
|
70
79
|
]
|
|
71
80
|
}
|
|
72
81
|
},
|
|
@@ -84,7 +93,7 @@
|
|
|
84
93
|
"dev": "concurrently -c blue,red -n tsc,rollup --kill-others \"tsc --watch -p . --preserveWatchOutput\" \"rollup --config --watch --no-watch.clearScreen\""
|
|
85
94
|
},
|
|
86
95
|
"dependencies": {
|
|
87
|
-
"@infineit-nestjs/services": "1.0.
|
|
96
|
+
"@infineit-nestjs/services": "1.0.24",
|
|
88
97
|
"@infineit-nestjs/types": "1.0.6",
|
|
89
98
|
"@nestjs/swagger": "^11.0.7"
|
|
90
99
|
},
|
|
@@ -118,5 +127,5 @@
|
|
|
118
127
|
"publishConfig": {
|
|
119
128
|
"access": "public"
|
|
120
129
|
},
|
|
121
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "fe55a3bd0cb2ce27a7690ea4d8a68ad9adef141d"
|
|
122
131
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
interface IKafkaMessageHeader {
|
|
2
|
-
[key: string]: string | undefined;
|
|
3
|
-
}
|
|
4
|
-
interface IKafkaProducerMessageOptions {
|
|
5
|
-
headers?: IKafkaMessageHeader;
|
|
6
|
-
}
|
|
7
|
-
interface IKafkaProducerSendMessageOptions extends IKafkaProducerMessageOptions {
|
|
8
|
-
raw?: boolean;
|
|
9
|
-
}
|
|
10
|
-
interface IKafkaMessage<T = Record<string, string>> {
|
|
11
|
-
key: string;
|
|
12
|
-
value: T;
|
|
13
|
-
headers?: IKafkaMessageHeader;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type { IKafkaMessage, IKafkaMessageHeader, IKafkaProducerMessageOptions, IKafkaProducerSendMessageOptions };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { KafkaContext } from '@nestjs/microservices';
|
|
2
|
-
import { IKafkaProducerSendMessageOptions, IKafkaMessage, IKafkaProducerMessageOptions } from './kafka.interface.js';
|
|
3
|
-
|
|
4
|
-
interface IKafkaService {
|
|
5
|
-
produceSend<T, N>(topic: string, data: T, options?: IKafkaProducerSendMessageOptions): Promise<IKafkaMessage<N> | N>;
|
|
6
|
-
produceEmit<T>(topic: string, data: T, options?: IKafkaProducerMessageOptions): void;
|
|
7
|
-
produceSendSequential<T, N>(topic: string, data: T, options?: IKafkaProducerSendMessageOptions): Promise<IKafkaMessage<N> | N>;
|
|
8
|
-
produceEmitSequential<T>(topic: string, data: T, options?: IKafkaProducerMessageOptions): void;
|
|
9
|
-
createId(): string;
|
|
10
|
-
commitOffsets(context: KafkaContext): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type { IKafkaService };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DynamicModule } from '@nestjs/common';
|
|
2
|
-
|
|
3
|
-
interface IKafkaModuleOptions {
|
|
4
|
-
subscribeTopics?: string[];
|
|
5
|
-
enableConsumer?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare class KafkaModule {
|
|
8
|
-
static forRoot(options?: IKafkaModuleOptions): DynamicModule;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { KafkaModule };
|
|
12
|
-
export type { IKafkaModuleOptions };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { OnModuleInit, OnApplicationBootstrap, OnApplicationShutdown } from '@nestjs/common';
|
|
2
|
-
import { ConfigService } from '@nestjs/config';
|
|
3
|
-
import { ClientKafka, KafkaContext } from '@nestjs/microservices';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { IKafkaProducerSendMessageOptions, IKafkaMessage, IKafkaProducerMessageOptions } from './interfaces/kafka.interface.js';
|
|
6
|
-
import { IKafkaService } from './interfaces/kafka.service.interface.js';
|
|
7
|
-
|
|
8
|
-
declare class KafkaService implements IKafkaService, OnModuleInit, OnApplicationBootstrap, OnApplicationShutdown {
|
|
9
|
-
private readonly clientKafka;
|
|
10
|
-
private readonly topics;
|
|
11
|
-
private readonly configService;
|
|
12
|
-
private readonly timeout;
|
|
13
|
-
private readonly logger;
|
|
14
|
-
constructor(clientKafka: ClientKafka, topics: string[], configService: ConfigService);
|
|
15
|
-
onApplicationBootstrap(): Promise<void>;
|
|
16
|
-
onModuleInit(): Promise<void>;
|
|
17
|
-
onApplicationShutdown(signal?: string): Promise<void>;
|
|
18
|
-
produceSend<T, N>(topic: string, data: T, options?: IKafkaProducerSendMessageOptions): Promise<IKafkaMessage<N> | N>;
|
|
19
|
-
produceEmit<T, N>(topic: string, data: T, options?: IKafkaProducerMessageOptions): Observable<N>;
|
|
20
|
-
produceSendSequential<T, N = any>(topic: string, data: T, options?: IKafkaProducerSendMessageOptions): Promise<N>;
|
|
21
|
-
produceEmitSequential<T, N = any>(topic: string, data: T, options?: IKafkaProducerMessageOptions): Observable<N>;
|
|
22
|
-
createId(): string;
|
|
23
|
-
generateRandomString(length: number): string;
|
|
24
|
-
commitOffsets(context: KafkaContext): Promise<void>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { KafkaService };
|