@forklaunch/implementation-worker-kafka 0.1.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.
Files changed (50) hide show
  1. package/LICENSE +21 -0
  2. package/lib/__test__/schemaEquality.test.d.ts +2 -0
  3. package/lib/__test__/schemaEquality.test.d.ts.map +1 -0
  4. package/lib/__test__/schemaEquality.test.js +16 -0
  5. package/lib/consumers/index.d.ts +2 -0
  6. package/lib/consumers/index.d.ts.map +1 -0
  7. package/lib/consumers/index.js +1 -0
  8. package/lib/consumers/kafkaWorker.consumer.d.ts +19 -0
  9. package/lib/consumers/kafkaWorker.consumer.d.ts.map +1 -0
  10. package/lib/consumers/kafkaWorker.consumer.js +149 -0
  11. package/lib/eject/consumers/index.ts +1 -0
  12. package/lib/eject/consumers/kafkaWorker.consumer.ts +180 -0
  13. package/lib/eject/domain/schemas/index.ts +1 -0
  14. package/lib/eject/domain/schemas/kafkaWorker.schema.ts +10 -0
  15. package/lib/eject/producers/index.ts +1 -0
  16. package/lib/eject/producers/kafkaWorker.producer.ts +33 -0
  17. package/lib/eject/types/index.ts +1 -0
  18. package/lib/eject/types/kafkaWorker.types.ts +8 -0
  19. package/lib/jest.config.d.ts +4 -0
  20. package/lib/jest.config.d.ts.map +1 -0
  21. package/lib/jest.config.js +19 -0
  22. package/lib/producers/index.d.ts +2 -0
  23. package/lib/producers/index.d.ts.map +1 -0
  24. package/lib/producers/index.js +1 -0
  25. package/lib/producers/kafkaWorker.producer.d.ts +11 -0
  26. package/lib/producers/kafkaWorker.producer.d.ts.map +1 -0
  27. package/lib/producers/kafkaWorker.producer.js +28 -0
  28. package/lib/schemas/index.d.ts +2 -0
  29. package/lib/schemas/index.d.ts.map +1 -0
  30. package/lib/schemas/index.js +1 -0
  31. package/lib/schemas/kafka.schema.d.ts +18 -0
  32. package/lib/schemas/kafka.schema.d.ts.map +1 -0
  33. package/lib/schemas/kafka.schema.js +4 -0
  34. package/lib/schemas/typebox/kafkaWorker.schema.d.ts +9 -0
  35. package/lib/schemas/typebox/kafkaWorker.schema.d.ts.map +1 -0
  36. package/lib/schemas/typebox/kafkaWorker.schema.js +9 -0
  37. package/lib/schemas/zod/kafkaWorker.schema.d.ts +9 -0
  38. package/lib/schemas/zod/kafkaWorker.schema.d.ts.map +1 -0
  39. package/lib/schemas/zod/kafkaWorker.schema.js +9 -0
  40. package/lib/tsconfig.tsbuildinfo +1 -0
  41. package/lib/types/index.d.ts +2 -0
  42. package/lib/types/index.d.ts.map +1 -0
  43. package/lib/types/index.js +1 -0
  44. package/lib/types/kafkaWorker.types.d.ts +9 -0
  45. package/lib/types/kafkaWorker.types.d.ts.map +1 -0
  46. package/lib/types/kafkaWorker.types.js +1 -0
  47. package/lib/vitest.config.d.ts +3 -0
  48. package/lib/vitest.config.d.ts.map +1 -0
  49. package/lib/vitest.config.js +7 -0
  50. package/package.json +65 -0
@@ -0,0 +1,2 @@
1
+ export * from './kafkaWorker.types';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './kafkaWorker.types';
@@ -0,0 +1,9 @@
1
+ export type KafkaWorkerOptions = {
2
+ brokers: string[];
3
+ clientId: string;
4
+ groupId: string;
5
+ retries: number;
6
+ interval: number;
7
+ peekCount: number;
8
+ };
9
+ //# sourceMappingURL=kafkaWorker.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kafkaWorker.types.d.ts","sourceRoot":"","sources":["../../types/kafkaWorker.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
3
+ //# sourceMappingURL=vitest.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":";AAEA,wBAKG"}
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from 'vitest/config';
2
+ export default defineConfig({
3
+ test: {
4
+ globals: true,
5
+ exclude: ['**/lib/**', '**/node_modules/**']
6
+ }
7
+ });
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@forklaunch/implementation-worker-kafka",
3
+ "version": "0.1.0",
4
+ "description": "Kafka implementation for forklaunch workers",
5
+ "homepage": "https://github.com/forklaunch/forklaunch-js#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/forklaunch/forklaunch-js/issues"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/forklaunch/forklaunch-js.git"
12
+ },
13
+ "license": "MIT",
14
+ "author": "Forklift Technologies, Inc.",
15
+ "exports": {
16
+ "./consumers": {
17
+ "types": "./lib/consumers/index.d.ts",
18
+ "import": "./lib/consumers/index.js",
19
+ "require": "./lib/consumers/index.js"
20
+ },
21
+ "./producers": {
22
+ "types": "./lib/producers/index.d.ts",
23
+ "import": "./lib/producers/index.js",
24
+ "require": "./lib/producers/index.js"
25
+ },
26
+ "./schemas": {
27
+ "types": "./lib/schemas/index.d.ts",
28
+ "import": "./lib/schemas/index.js",
29
+ "require": "./lib/schemas/index.js"
30
+ },
31
+ "./types": {
32
+ "types": "./lib/types/index.d.ts",
33
+ "import": "./lib/types/index.js",
34
+ "require": "./lib/types/index.js"
35
+ }
36
+ },
37
+ "files": [
38
+ "lib/**"
39
+ ],
40
+ "dependencies": {
41
+ "@forklaunch/core": "^0.7.3",
42
+ "@sinclair/typebox": "^0.34.33",
43
+ "kafkajs": "^2.2.4",
44
+ "zod": "^3.24.3",
45
+ "@forklaunch/interfaces-worker": "0.1.0"
46
+ },
47
+ "devDependencies": {
48
+ "depcheck": "^1.4.7",
49
+ "eslint": "^9.25.0",
50
+ "prettier": "^3.5.3",
51
+ "typedoc": "^0.28.2",
52
+ "typescript-eslint": "^8.30.1"
53
+ },
54
+ "scripts": {
55
+ "build": "tsc && if [ -f eject-package.bash ]; then pnpm package:eject; fi",
56
+ "clean": "rm -rf lib pnpm.lock.yaml node_modules",
57
+ "docs": "typedoc --out docs *",
58
+ "format": "prettier --ignore-path=.prettierignore --config .prettierrc '**/*.{ts,tsx,json}' --write",
59
+ "lint": "eslint . -c eslint.config.mjs",
60
+ "lint:fix": "eslint . -c eslint.config.mjs --fix",
61
+ "package:eject": "./eject-package.bash",
62
+ "publish:package": "./publish-package.bash",
63
+ "test": "vitest --passWithNoTests"
64
+ }
65
+ }