@forklaunch/implementation-worker-kafka 0.3.2 → 0.3.4

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.
@@ -1,6 +1,6 @@
1
1
  import { WorkerConsumer } from '@forklaunch/interfaces-worker/interfaces';
2
2
  import { WorkerEventEntity, WorkerProcessFunction, WorkerFailureHandler } from '@forklaunch/interfaces-worker/types';
3
- import { KafkaWorkerOptions } from '../types/index.mjs';
3
+ import { KafkaWorkerOptions } from '../domain/types/index.mjs';
4
4
 
5
5
  declare class KafkaWorkerConsumer<EventEntity extends WorkerEventEntity, Options extends KafkaWorkerOptions> implements WorkerConsumer<EventEntity> {
6
6
  protected readonly queueName: string;
@@ -1,6 +1,6 @@
1
1
  import { WorkerConsumer } from '@forklaunch/interfaces-worker/interfaces';
2
2
  import { WorkerEventEntity, WorkerProcessFunction, WorkerFailureHandler } from '@forklaunch/interfaces-worker/types';
3
- import { KafkaWorkerOptions } from '../types/index.js';
3
+ import { KafkaWorkerOptions } from '../domain/types/index.js';
4
4
 
5
5
  declare class KafkaWorkerConsumer<EventEntity extends WorkerEventEntity, Options extends KafkaWorkerOptions> implements WorkerConsumer<EventEntity> {
6
6
  protected readonly queueName: string;
@@ -454,14 +454,14 @@ var require_src = __commonJS({
454
454
  }
455
455
  });
456
456
 
457
- // schemas/index.ts
457
+ // domain/schemas/index.ts
458
458
  var schemas_exports = {};
459
459
  __export(schemas_exports, {
460
460
  KafkaWorkerSchemas: () => KafkaWorkerSchemas
461
461
  });
462
462
  module.exports = __toCommonJS(schemas_exports);
463
463
 
464
- // schemas/kafka.schema.ts
464
+ // domain/schemas/kafka.schema.ts
465
465
  var import_internal = require("@forklaunch/internal");
466
466
 
467
467
  // ../../../node_modules/.pnpm/@forklaunch+common@0.3.14/node_modules/@forklaunch/common/lib/index.mjs
@@ -982,7 +982,7 @@ var validate = StaticSchemaValidator.validate.bind(StaticSchemaValidator);
982
982
  var parse = StaticSchemaValidator.parse.bind(StaticSchemaValidator);
983
983
  var openapi = StaticSchemaValidator.openapi.bind(StaticSchemaValidator);
984
984
 
985
- // schemas/typebox/kafkaWorker.schema.ts
985
+ // domain/schemas/typebox/kafkaWorker.schema.ts
986
986
  var KafkaWorkerOptionsSchema = {
987
987
  brokers: array(string),
988
988
  clientId: string,
@@ -1356,7 +1356,7 @@ var validate2 = StaticSchemaValidator2.validate.bind(StaticSchemaValidator2);
1356
1356
  var parse2 = StaticSchemaValidator2.parse.bind(StaticSchemaValidator2);
1357
1357
  var openapi2 = StaticSchemaValidator2.openapi.bind(StaticSchemaValidator2);
1358
1358
 
1359
- // schemas/zod/kafkaWorker.schema.ts
1359
+ // domain/schemas/zod/kafkaWorker.schema.ts
1360
1360
  var KafkaWorkerOptionsSchema2 = {
1361
1361
  brokers: array2(string2),
1362
1362
  clientId: string2,
@@ -1366,7 +1366,7 @@ var KafkaWorkerOptionsSchema2 = {
1366
1366
  peekCount: number2
1367
1367
  };
1368
1368
 
1369
- // schemas/kafka.schema.ts
1369
+ // domain/schemas/kafka.schema.ts
1370
1370
  var KafkaWorkerSchemas = (0, import_internal.serviceSchemaResolver)(
1371
1371
  () => KafkaWorkerOptionsSchema,
1372
1372
  () => KafkaWorkerOptionsSchema2
@@ -454,7 +454,7 @@ var require_src = __commonJS({
454
454
  }
455
455
  });
456
456
 
457
- // schemas/kafka.schema.ts
457
+ // domain/schemas/kafka.schema.ts
458
458
  import { serviceSchemaResolver } from "@forklaunch/internal";
459
459
 
460
460
  // ../../../node_modules/.pnpm/@forklaunch+common@0.3.14/node_modules/@forklaunch/common/lib/index.mjs
@@ -984,7 +984,7 @@ var validate = StaticSchemaValidator.validate.bind(StaticSchemaValidator);
984
984
  var parse = StaticSchemaValidator.parse.bind(StaticSchemaValidator);
985
985
  var openapi = StaticSchemaValidator.openapi.bind(StaticSchemaValidator);
986
986
 
987
- // schemas/typebox/kafkaWorker.schema.ts
987
+ // domain/schemas/typebox/kafkaWorker.schema.ts
988
988
  var KafkaWorkerOptionsSchema = {
989
989
  brokers: array(string),
990
990
  clientId: string,
@@ -1361,7 +1361,7 @@ var validate2 = StaticSchemaValidator2.validate.bind(StaticSchemaValidator2);
1361
1361
  var parse2 = StaticSchemaValidator2.parse.bind(StaticSchemaValidator2);
1362
1362
  var openapi2 = StaticSchemaValidator2.openapi.bind(StaticSchemaValidator2);
1363
1363
 
1364
- // schemas/zod/kafkaWorker.schema.ts
1364
+ // domain/schemas/zod/kafkaWorker.schema.ts
1365
1365
  var KafkaWorkerOptionsSchema2 = {
1366
1366
  brokers: array2(string2),
1367
1367
  clientId: string2,
@@ -1371,7 +1371,7 @@ var KafkaWorkerOptionsSchema2 = {
1371
1371
  peekCount: number2
1372
1372
  };
1373
1373
 
1374
- // schemas/kafka.schema.ts
1374
+ // domain/schemas/kafka.schema.ts
1375
1375
  var KafkaWorkerSchemas = serviceSchemaResolver(
1376
1376
  () => KafkaWorkerOptionsSchema,
1377
1377
  () => KafkaWorkerOptionsSchema2
@@ -13,6 +13,6 @@ var __copyProps = (to, from, except, desc) => {
13
13
  };
14
14
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
15
 
16
- // types/index.ts
16
+ // domain/types/index.ts
17
17
  var types_exports = {};
18
18
  module.exports = __toCommonJS(types_exports);
@@ -5,7 +5,7 @@ import {
5
5
  WorkerProcessFunction
6
6
  } from '@forklaunch/interfaces-worker/types';
7
7
  import { Consumer, Kafka, Producer } from 'kafkajs';
8
- import { KafkaWorkerOptions } from '../types/kafkaWorker.types';
8
+ import { KafkaWorkerOptions } from '../domain/types/kafkaWorker.types';
9
9
 
10
10
  export class KafkaWorkerConsumer<
11
11
  EventEntity extends WorkerEventEntity,
@@ -1,4 +1,4 @@
1
- import { array, number, string } from '@{{app_name}}/core';
1
+ import { array, number, string } from '@forklaunch/validator/zod';
2
2
 
3
3
  export const KafkaWorkerOptionsSchema = {
4
4
  brokers: array(string),
@@ -1,6 +1,6 @@
1
1
  import { WorkerEventEntity } from '@forklaunch/interfaces-worker/types';
2
2
  import { Kafka } from 'kafkajs';
3
- import { KafkaWorkerOptions } from '../types/kafkaWorker.types';
3
+ import { KafkaWorkerOptions } from '../domain/types/kafkaWorker.types';
4
4
  export class KafkaWorkerProducer<
5
5
  EventEntity extends WorkerEventEntity,
6
6
  Options extends KafkaWorkerOptions
@@ -1,5 +1,5 @@
1
1
  import { WorkerEventEntity } from '@forklaunch/interfaces-worker/types';
2
- import { KafkaWorkerOptions } from '../types/index.mjs';
2
+ import { KafkaWorkerOptions } from '../domain/types/index.mjs';
3
3
 
4
4
  declare class KafkaWorkerProducer<EventEntity extends WorkerEventEntity, Options extends KafkaWorkerOptions> {
5
5
  private readonly queueName;
@@ -1,5 +1,5 @@
1
1
  import { WorkerEventEntity } from '@forklaunch/interfaces-worker/types';
2
- import { KafkaWorkerOptions } from '../types/index.js';
2
+ import { KafkaWorkerOptions } from '../domain/types/index.js';
3
3
 
4
4
  declare class KafkaWorkerProducer<EventEntity extends WorkerEventEntity, Options extends KafkaWorkerOptions> {
5
5
  private readonly queueName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forklaunch/implementation-worker-kafka",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Kafka implementation for forklaunch workers",
5
5
  "homepage": "https://github.com/forklaunch/forklaunch-js#readme",
6
6
  "bugs": {
@@ -26,16 +26,16 @@
26
26
  "default": "./lib/producers/index.js"
27
27
  },
28
28
  "./schemas": {
29
- "types": "./lib/schemas/index.d.ts",
30
- "import": "./lib/schemas/index.mjs",
31
- "require": "./lib/schemas/index.js",
32
- "default": "./lib/schemas/index.js"
29
+ "types": "./lib/domain/schemas/index.d.ts",
30
+ "import": "./lib/domain/schemas/index.mjs",
31
+ "require": "./lib/domain/schemas/index.js",
32
+ "default": "./lib/domain/schemas/index.js"
33
33
  },
34
34
  "./types": {
35
- "types": "./lib/types/index.d.ts",
36
- "import": "./lib/types/index.mjs",
37
- "require": "./lib/types/index.js",
38
- "default": "./lib/types/index.js"
35
+ "types": "./lib/domain/types/index.d.ts",
36
+ "import": "./lib/domain/types/index.mjs",
37
+ "require": "./lib/domain/types/index.js",
38
+ "default": "./lib/domain/types/index.js"
39
39
  }
40
40
  },
41
41
  "files": [
@@ -58,7 +58,7 @@
58
58
  "typescript-eslint": "^8.34.1"
59
59
  },
60
60
  "scripts": {
61
- "build": "tsc --noEmit && tsup producers/index.ts consumers/index.ts schemas/index.ts types/index.ts --format cjs,esm --no-splitting --dts --tsconfig tsconfig.json --out-dir lib --clean && if [ -f eject-package.bash ]; then pnpm package:eject; fi",
61
+ "build": "tsc --noEmit && tsup producers/index.ts consumers/index.ts domain/schemas/index.ts domain/types/index.ts --format cjs,esm --no-splitting --dts --tsconfig tsconfig.json --out-dir lib --clean && if [ -f eject-package.bash ]; then pnpm package:eject; fi",
62
62
  "clean": "rm -rf lib pnpm.lock.yaml node_modules",
63
63
  "docs": "typedoc --out docs *",
64
64
  "format": "prettier --ignore-path=.prettierignore --config .prettierrc '**/*.{ts,tsx,json}' --write",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes