@forklaunch/implementation-worker-redis 0.1.0 → 0.1.2

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 (32) hide show
  1. package/lib/__test__/schemaEquality.test.d.ts +1 -1
  2. package/lib/__test__/schemaEquality.test.js +12 -4
  3. package/lib/consumers/index.d.ts +1 -1
  4. package/lib/consumers/redisWorker.consumer.d.ts +28 -14
  5. package/lib/consumers/redisWorker.consumer.d.ts.map +1 -1
  6. package/lib/consumers/redisWorker.consumer.js +47 -36
  7. package/lib/eject/consumers/redisWorker.consumer.ts +6 -4
  8. package/lib/eject/producers/index.ts +1 -0
  9. package/lib/eject/producers/redisWorker.producer.ts +7 -4
  10. package/lib/eject/types/redisWorker.types.ts +1 -1
  11. package/lib/jest.config.d.ts +1 -1
  12. package/lib/jest.config.js +16 -16
  13. package/lib/producers/index.d.ts +2 -2
  14. package/lib/producers/index.d.ts.map +1 -1
  15. package/lib/producers/index.js +1 -1
  16. package/lib/producers/redisWorker.producer.d.ts +13 -7
  17. package/lib/producers/redisWorker.producer.d.ts.map +1 -1
  18. package/lib/producers/redisWorker.producer.js +15 -13
  19. package/lib/schemas/index.d.ts +1 -1
  20. package/lib/schemas/redisWorker.schema.d.ts +55 -11
  21. package/lib/schemas/redisWorker.schema.js +4 -1
  22. package/lib/schemas/typebox/redisWorker.schema.d.ts +40 -4
  23. package/lib/schemas/typebox/redisWorker.schema.js +3 -3
  24. package/lib/schemas/zod/redisWorker.schema.d.ts +4 -4
  25. package/lib/schemas/zod/redisWorker.schema.js +3 -3
  26. package/lib/tsconfig.tsbuildinfo +1 -1
  27. package/lib/types/index.d.ts +1 -1
  28. package/lib/types/redisWorker.types.d.ts +5 -5
  29. package/lib/types/redisWorker.types.d.ts.map +1 -1
  30. package/lib/vitest.config.d.ts +2 -2
  31. package/lib/vitest.config.js +4 -4
  32. package/package.json +4 -4
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=schemaEquality.test.d.ts.map
2
+ //# sourceMappingURL=schemaEquality.test.d.ts.map
@@ -3,11 +3,19 @@ import { testSchemaEquality } from '@forklaunch/core/test';
3
3
  import { RedisWorkerOptionsSchema as TypeboxRedisWorkerOptionsSchema } from '../schemas/typebox/redisWorker.schema';
4
4
  import { RedisWorkerOptionsSchema as ZodRedisWorkerOptionsSchema } from '../schemas/zod/redisWorker.schema';
5
5
  describe('schema equality', () => {
6
- it('should be equal for bullmq worker', () => {
7
- expect(isTrue(testSchemaEquality(ZodRedisWorkerOptionsSchema, TypeboxRedisWorkerOptionsSchema, {
6
+ it('should be equal for bullmq worker', () => {
7
+ expect(
8
+ isTrue(
9
+ testSchemaEquality(
10
+ ZodRedisWorkerOptionsSchema,
11
+ TypeboxRedisWorkerOptionsSchema,
12
+ {
8
13
  pageSize: 10,
9
14
  retries: 1,
10
15
  interval: 1000
11
- }))).toBeTruthy();
12
- });
16
+ }
17
+ )
18
+ )
19
+ ).toBeTruthy();
20
+ });
13
21
  });
@@ -1,2 +1,2 @@
1
1
  export * from './redisWorker.consumer';
2
- //# sourceMappingURL=index.d.ts.map
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,17 +1,31 @@
1
1
  import { TtlCache } from '@forklaunch/core/cache';
2
2
  import { WorkerConsumer } from '@forklaunch/interfaces-worker/interfaces';
3
- import { WorkerEventEntity, WorkerFailureHandler, WorkerProcessFunction } from '@forklaunch/interfaces-worker/types';
4
- import { RedisWorkerOptions } from '../types/redisWorker.types';
5
- export declare class RedisWorkerConsumer<EventEntity extends WorkerEventEntity> implements WorkerConsumer<EventEntity> {
6
- protected readonly queueName: string;
7
- protected readonly cache: TtlCache;
8
- protected readonly options: RedisWorkerOptions;
9
- protected readonly processEvents: WorkerProcessFunction<EventEntity>;
10
- protected readonly failureHandler: WorkerFailureHandler<EventEntity>;
11
- constructor(queueName: string, cache: TtlCache, options: RedisWorkerOptions, processEvents: WorkerProcessFunction<EventEntity>, failureHandler: WorkerFailureHandler<EventEntity>);
12
- private retrieveEvents;
13
- private updateEvents;
14
- peekEvents(): Promise<EventEntity[]>;
15
- start(): Promise<void>;
3
+ import {
4
+ WorkerEventEntity,
5
+ WorkerFailureHandler,
6
+ WorkerProcessFunction
7
+ } from '@forklaunch/interfaces-worker/types';
8
+ import { WorkerOptions } from '../types/redisWorker.types';
9
+ export declare class RedisWorkerConsumer<
10
+ EventEntity extends WorkerEventEntity,
11
+ Options extends WorkerOptions
12
+ > implements WorkerConsumer<EventEntity>
13
+ {
14
+ protected readonly queueName: string;
15
+ protected readonly cache: TtlCache;
16
+ protected readonly options: Options;
17
+ protected readonly processEvents: WorkerProcessFunction<EventEntity>;
18
+ protected readonly failureHandler: WorkerFailureHandler<EventEntity>;
19
+ constructor(
20
+ queueName: string,
21
+ cache: TtlCache,
22
+ options: Options,
23
+ processEvents: WorkerProcessFunction<EventEntity>,
24
+ failureHandler: WorkerFailureHandler<EventEntity>
25
+ );
26
+ private retrieveEvents;
27
+ private updateEvents;
28
+ peekEvents(): Promise<EventEntity[]>;
29
+ start(): Promise<void>;
16
30
  }
17
- //# sourceMappingURL=redisWorker.consumer.d.ts.map
31
+ //# sourceMappingURL=redisWorker.consumer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"redisWorker.consumer.d.ts","sourceRoot":"","sources":["../../consumers/redisWorker.consumer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,qBAAa,mBAAmB,CAAC,WAAW,SAAS,iBAAiB,CACpE,YAAW,cAAc,CAAC,WAAW,CAAC;IAGpC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM;IACpC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ;IAClC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,kBAAkB;IAC9C,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC,WAAW,CAAC;IACpE,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,oBAAoB,CAAC,WAAW,CAAC;gBAJjD,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,QAAQ,EACf,OAAO,EAAE,kBAAkB,EAC3B,aAAa,EAAE,qBAAqB,CAAC,WAAW,CAAC,EACjD,cAAc,EAAE,oBAAoB,CAAC,WAAW,CAAC;YAGxD,cAAc;YAUd,YAAY;IAYpB,UAAU,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAQpC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ7B"}
1
+ {"version":3,"file":"redisWorker.consumer.d.ts","sourceRoot":"","sources":["../../consumers/redisWorker.consumer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,qBAAa,mBAAmB,CAC9B,WAAW,SAAS,iBAAiB,EACrC,OAAO,SAAS,aAAa,CAC7B,YAAW,cAAc,CAAC,WAAW,CAAC;IAGpC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM;IACpC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ;IAClC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO;IACnC,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC,WAAW,CAAC;IACpE,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,oBAAoB,CAAC,WAAW,CAAC;gBAJjD,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,QAAQ,EACf,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,qBAAqB,CAAC,WAAW,CAAC,EACjD,cAAc,EAAE,oBAAoB,CAAC,WAAW,CAAC;YAGxD,cAAc;YAUd,YAAY;IAYpB,UAAU,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAQpC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ7B"}
@@ -1,38 +1,49 @@
1
1
  export class RedisWorkerConsumer {
2
- queueName;
3
- cache;
4
- options;
5
- processEvents;
6
- failureHandler;
7
- constructor(queueName, cache, options, processEvents, failureHandler) {
8
- this.queueName = queueName;
9
- this.cache = cache;
10
- this.options = options;
11
- this.processEvents = processEvents;
12
- this.failureHandler = failureHandler;
13
- }
14
- async retrieveEvents() {
15
- const events = (await this.cache.dequeueBatchRecords(this.queueName, this.options.pageSize)).filter((event) => event != null);
16
- return events;
17
- }
18
- async updateEvents(events) {
19
- await this.cache.enqueueBatchRecords(this.queueName, events
20
- .filter((event) => event != null && event.retryCount <= 3)
21
- .map((event) => ({
22
- ...event,
23
- retryCount: event.retryCount + 1
24
- })));
25
- }
26
- async peekEvents() {
27
- const events = await this.cache.peekQueueRecords(this.queueName, this.options.pageSize);
28
- return events;
29
- }
30
- async start() {
31
- setInterval(async () => {
32
- const events = await this.retrieveEvents();
33
- const failedEvents = await this.processEvents(events);
34
- await this.failureHandler(failedEvents);
35
- await this.updateEvents(failedEvents.map((event) => event.value));
36
- }, this.options.interval);
37
- }
2
+ queueName;
3
+ cache;
4
+ options;
5
+ processEvents;
6
+ failureHandler;
7
+ constructor(queueName, cache, options, processEvents, failureHandler) {
8
+ this.queueName = queueName;
9
+ this.cache = cache;
10
+ this.options = options;
11
+ this.processEvents = processEvents;
12
+ this.failureHandler = failureHandler;
13
+ }
14
+ async retrieveEvents() {
15
+ const events = (
16
+ await this.cache.dequeueBatchRecords(
17
+ this.queueName,
18
+ this.options.pageSize
19
+ )
20
+ ).filter((event) => event != null);
21
+ return events;
22
+ }
23
+ async updateEvents(events) {
24
+ await this.cache.enqueueBatchRecords(
25
+ this.queueName,
26
+ events
27
+ .filter((event) => event != null && event.retryCount <= 3)
28
+ .map((event) => ({
29
+ ...event,
30
+ retryCount: event.retryCount + 1
31
+ }))
32
+ );
33
+ }
34
+ async peekEvents() {
35
+ const events = await this.cache.peekQueueRecords(
36
+ this.queueName,
37
+ this.options.pageSize
38
+ );
39
+ return events;
40
+ }
41
+ async start() {
42
+ setInterval(async () => {
43
+ const events = await this.retrieveEvents();
44
+ const failedEvents = await this.processEvents(events);
45
+ await this.failureHandler(failedEvents);
46
+ await this.updateEvents(failedEvents.map((event) => event.value));
47
+ }, this.options.interval);
48
+ }
38
49
  }
@@ -5,15 +5,17 @@ import {
5
5
  WorkerFailureHandler,
6
6
  WorkerProcessFunction
7
7
  } from '@forklaunch/interfaces-worker/types';
8
- import { RedisWorkerOptions } from '../types/redisWorker.types';
8
+ import { WorkerOptions } from '../types/redisWorker.types';
9
9
 
10
- export class RedisWorkerConsumer<EventEntity extends WorkerEventEntity>
11
- implements WorkerConsumer<EventEntity>
10
+ export class RedisWorkerConsumer<
11
+ EventEntity extends WorkerEventEntity,
12
+ Options extends WorkerOptions
13
+ > implements WorkerConsumer<EventEntity>
12
14
  {
13
15
  constructor(
14
16
  protected readonly queueName: string,
15
17
  protected readonly cache: TtlCache,
16
- protected readonly options: RedisWorkerOptions,
18
+ protected readonly options: Options,
17
19
  protected readonly processEvents: WorkerProcessFunction<EventEntity>,
18
20
  protected readonly failureHandler: WorkerFailureHandler<EventEntity>
19
21
  ) {}
@@ -0,0 +1 @@
1
+ export * from './redisWorker.producer';
@@ -1,13 +1,16 @@
1
1
  import { TtlCache } from '@forklaunch/core/cache';
2
2
  import { WorkerProducer } from '@forklaunch/interfaces-worker/interfaces';
3
3
  import { WorkerEventEntity } from '@forklaunch/interfaces-worker/types';
4
-
5
- export class RedisWorkerProducer<EventEntity extends WorkerEventEntity>
6
- implements WorkerProducer<EventEntity>
4
+ import { WorkerOptions } from '../types/redisWorker.types';
5
+ export class RedisWorkerProducer<
6
+ EventEntity extends WorkerEventEntity,
7
+ Options extends WorkerOptions
8
+ > implements WorkerProducer<EventEntity>
7
9
  {
8
10
  constructor(
9
11
  private readonly queueName: string,
10
- private readonly cache: TtlCache
12
+ private readonly cache: TtlCache,
13
+ private readonly options: Options
11
14
  ) {}
12
15
 
13
16
  async enqueueJob(event: EventEntity): Promise<void> {
@@ -1,4 +1,4 @@
1
- export type RedisWorkerOptions = {
1
+ export type WorkerOptions = {
2
2
  pageSize: number;
3
3
  retries: number;
4
4
  interval: number;
@@ -1,4 +1,4 @@
1
1
  import type { JestConfigWithTsJest } from 'ts-jest';
2
2
  declare const jestConfig: JestConfigWithTsJest;
3
3
  export default jestConfig;
4
- //# sourceMappingURL=jest.config.d.ts.map
4
+ //# sourceMappingURL=jest.config.d.ts.map
@@ -1,19 +1,19 @@
1
1
  const jestConfig = {
2
- preset: 'ts-jest/presets/default-esm', // or other ESM presets
3
- moduleNameMapper: {
4
- '^(\\.{1,2}/.*)\\.js$': '$1'
5
- },
6
- transform: {
7
- // '^.+\\.[tj]sx?$' to process ts,js,tsx,jsx with `ts-jest`
8
- // '^.+\\.m?[tj]sx?$' to process ts,js,tsx,jsx,mts,mjs,mtsx,mjsx with `ts-jest`
9
- '^.+\\.[tj]sx?$': [
10
- 'ts-jest',
11
- {
12
- useESM: true
13
- }
14
- ],
15
- '^.+\\.js$': 'babel-jest'
16
- },
17
- testPathIgnorePatterns: ['.*dist/', '.*node_modules/']
2
+ preset: 'ts-jest/presets/default-esm', // or other ESM presets
3
+ moduleNameMapper: {
4
+ '^(\\.{1,2}/.*)\\.js$': '$1'
5
+ },
6
+ transform: {
7
+ // '^.+\\.[tj]sx?$' to process ts,js,tsx,jsx with `ts-jest`
8
+ // '^.+\\.m?[tj]sx?$' to process ts,js,tsx,jsx,mts,mjs,mtsx,mjsx with `ts-jest`
9
+ '^.+\\.[tj]sx?$': [
10
+ 'ts-jest',
11
+ {
12
+ useESM: true
13
+ }
14
+ ],
15
+ '^.+\\.js$': 'babel-jest'
16
+ },
17
+ testPathIgnorePatterns: ['.*dist/', '.*node_modules/']
18
18
  };
19
19
  export default jestConfig;
@@ -1,2 +1,2 @@
1
- export {};
2
- //# sourceMappingURL=index.d.ts.map
1
+ export * from './redisWorker.producer';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../producers/index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../producers/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -1 +1 @@
1
- export {};
1
+ export * from './redisWorker.producer';
@@ -1,11 +1,17 @@
1
1
  import { TtlCache } from '@forklaunch/core/cache';
2
2
  import { WorkerProducer } from '@forklaunch/interfaces-worker/interfaces';
3
3
  import { WorkerEventEntity } from '@forklaunch/interfaces-worker/types';
4
- export declare class RedisWorkerProducer<EventEntity extends WorkerEventEntity> implements WorkerProducer<EventEntity> {
5
- private readonly queueName;
6
- private readonly cache;
7
- constructor(queueName: string, cache: TtlCache);
8
- enqueueJob(event: EventEntity): Promise<void>;
9
- enqueueBatchJobs(events: EventEntity[]): Promise<void>;
4
+ import { WorkerOptions } from '../types/redisWorker.types';
5
+ export declare class RedisWorkerProducer<
6
+ EventEntity extends WorkerEventEntity,
7
+ Options extends WorkerOptions
8
+ > implements WorkerProducer<EventEntity>
9
+ {
10
+ private readonly queueName;
11
+ private readonly cache;
12
+ private readonly options;
13
+ constructor(queueName: string, cache: TtlCache, options: Options);
14
+ enqueueJob(event: EventEntity): Promise<void>;
15
+ enqueueBatchJobs(events: EventEntity[]): Promise<void>;
10
16
  }
11
- //# sourceMappingURL=redisWorker.producer.d.ts.map
17
+ //# sourceMappingURL=redisWorker.producer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"redisWorker.producer.d.ts","sourceRoot":"","sources":["../../producers/redisWorker.producer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,qBAAa,mBAAmB,CAAC,WAAW,SAAS,iBAAiB,CACpE,YAAW,cAAc,CAAC,WAAW,CAAC;IAGpC,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,KAAK;gBADL,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,QAAQ;IAG5B,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAI7D"}
1
+ {"version":3,"file":"redisWorker.producer.d.ts","sourceRoot":"","sources":["../../producers/redisWorker.producer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,qBAAa,mBAAmB,CAC9B,WAAW,SAAS,iBAAiB,EACrC,OAAO,SAAS,aAAa,CAC7B,YAAW,cAAc,CAAC,WAAW,CAAC;IAGpC,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAFP,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,QAAQ,EACf,OAAO,EAAE,OAAO;IAG7B,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAI7D"}
@@ -1,15 +1,17 @@
1
1
  export class RedisWorkerProducer {
2
- queueName;
3
- cache;
4
- constructor(queueName, cache) {
5
- this.queueName = queueName;
6
- this.cache = cache;
7
- }
8
- async enqueueJob(event) {
9
- await this.cache.enqueueRecord(this.queueName, event);
10
- }
11
- async enqueueBatchJobs(events) {
12
- console.log('Enqueuing batch jobs', events);
13
- await this.cache.enqueueBatchRecords(this.queueName, events);
14
- }
2
+ queueName;
3
+ cache;
4
+ options;
5
+ constructor(queueName, cache, options) {
6
+ this.queueName = queueName;
7
+ this.cache = cache;
8
+ this.options = options;
9
+ }
10
+ async enqueueJob(event) {
11
+ await this.cache.enqueueRecord(this.queueName, event);
12
+ }
13
+ async enqueueBatchJobs(events) {
14
+ console.log('Enqueuing batch jobs', events);
15
+ await this.cache.enqueueBatchRecords(this.queueName, events);
16
+ }
15
17
  }
@@ -1,2 +1,2 @@
1
1
  export * from './redisWorker.schema';
2
- //# sourceMappingURL=index.d.ts.map
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,12 +1,56 @@
1
- export declare const RedisWorkerSchemas: <SchemaValidator extends import("@forklaunch/validator").AnySchemaValidator>(options: Record<string, unknown> & {
1
+ export declare const RedisWorkerSchemas: <
2
+ SchemaValidator extends import('@forklaunch/validator').AnySchemaValidator
3
+ >(
4
+ options: Record<string, unknown> & {
2
5
  validator: SchemaValidator;
3
- }) => import("@forklaunch/core/mappers").SchemasByValidator<SchemaValidator, (options: Record<string, unknown>) => {
4
- pageSize: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TDate, import("@sinclair/typebox").TBigInt]>, number>;
5
- retries: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TDate, import("@sinclair/typebox").TBigInt]>, number>;
6
- interval: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TDate, import("@sinclair/typebox").TBigInt]>, number>;
7
- }, (options: Record<string, unknown>) => {
8
- pageSize: import("zod").ZodNumber;
9
- retries: import("zod").ZodNumber;
10
- interval: import("zod").ZodNumber;
11
- }>;
12
- //# sourceMappingURL=redisWorker.schema.d.ts.map
6
+ }
7
+ ) => import('@forklaunch/core/mappers').SchemasByValidator<
8
+ SchemaValidator,
9
+ (options: Record<string, unknown>) => {
10
+ pageSize: import('@sinclair/typebox').TTransform<
11
+ import('@sinclair/typebox').TUnion<
12
+ [
13
+ import('@sinclair/typebox').TNumber,
14
+ import('@sinclair/typebox').TString,
15
+ import('@sinclair/typebox').TBoolean,
16
+ import('@sinclair/typebox').TNull,
17
+ import('@sinclair/typebox').TDate,
18
+ import('@sinclair/typebox').TBigInt
19
+ ]
20
+ >,
21
+ number
22
+ >;
23
+ retries: import('@sinclair/typebox').TTransform<
24
+ import('@sinclair/typebox').TUnion<
25
+ [
26
+ import('@sinclair/typebox').TNumber,
27
+ import('@sinclair/typebox').TString,
28
+ import('@sinclair/typebox').TBoolean,
29
+ import('@sinclair/typebox').TNull,
30
+ import('@sinclair/typebox').TDate,
31
+ import('@sinclair/typebox').TBigInt
32
+ ]
33
+ >,
34
+ number
35
+ >;
36
+ interval: import('@sinclair/typebox').TTransform<
37
+ import('@sinclair/typebox').TUnion<
38
+ [
39
+ import('@sinclair/typebox').TNumber,
40
+ import('@sinclair/typebox').TString,
41
+ import('@sinclair/typebox').TBoolean,
42
+ import('@sinclair/typebox').TNull,
43
+ import('@sinclair/typebox').TDate,
44
+ import('@sinclair/typebox').TBigInt
45
+ ]
46
+ >,
47
+ number
48
+ >;
49
+ },
50
+ (options: Record<string, unknown>) => {
51
+ pageSize: import('zod').ZodNumber;
52
+ retries: import('zod').ZodNumber;
53
+ interval: import('zod').ZodNumber;
54
+ }
55
+ >;
56
+ //# sourceMappingURL=redisWorker.schema.d.ts.map
@@ -1,4 +1,7 @@
1
1
  import { serviceSchemaResolver } from '@forklaunch/core/mappers';
2
2
  import { RedisWorkerOptionsSchema as TypeBoxSchemas } from './typebox/redisWorker.schema';
3
3
  import { RedisWorkerOptionsSchema as ZodSchemas } from './zod/redisWorker.schema';
4
- export const RedisWorkerSchemas = serviceSchemaResolver(() => TypeBoxSchemas, () => ZodSchemas);
4
+ export const RedisWorkerSchemas = serviceSchemaResolver(
5
+ () => TypeBoxSchemas,
6
+ () => ZodSchemas
7
+ );
@@ -1,6 +1,42 @@
1
1
  export declare const RedisWorkerOptionsSchema: {
2
- pageSize: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TDate, import("@sinclair/typebox").TBigInt]>, number>;
3
- retries: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TDate, import("@sinclair/typebox").TBigInt]>, number>;
4
- interval: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TDate, import("@sinclair/typebox").TBigInt]>, number>;
2
+ pageSize: import('@sinclair/typebox').TTransform<
3
+ import('@sinclair/typebox').TUnion<
4
+ [
5
+ import('@sinclair/typebox').TNumber,
6
+ import('@sinclair/typebox').TString,
7
+ import('@sinclair/typebox').TBoolean,
8
+ import('@sinclair/typebox').TNull,
9
+ import('@sinclair/typebox').TDate,
10
+ import('@sinclair/typebox').TBigInt
11
+ ]
12
+ >,
13
+ number
14
+ >;
15
+ retries: import('@sinclair/typebox').TTransform<
16
+ import('@sinclair/typebox').TUnion<
17
+ [
18
+ import('@sinclair/typebox').TNumber,
19
+ import('@sinclair/typebox').TString,
20
+ import('@sinclair/typebox').TBoolean,
21
+ import('@sinclair/typebox').TNull,
22
+ import('@sinclair/typebox').TDate,
23
+ import('@sinclair/typebox').TBigInt
24
+ ]
25
+ >,
26
+ number
27
+ >;
28
+ interval: import('@sinclair/typebox').TTransform<
29
+ import('@sinclair/typebox').TUnion<
30
+ [
31
+ import('@sinclair/typebox').TNumber,
32
+ import('@sinclair/typebox').TString,
33
+ import('@sinclair/typebox').TBoolean,
34
+ import('@sinclair/typebox').TNull,
35
+ import('@sinclair/typebox').TDate,
36
+ import('@sinclair/typebox').TBigInt
37
+ ]
38
+ >,
39
+ number
40
+ >;
5
41
  };
6
- //# sourceMappingURL=redisWorker.schema.d.ts.map
42
+ //# sourceMappingURL=redisWorker.schema.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { number } from '@forklaunch/validator/typebox';
2
2
  export const RedisWorkerOptionsSchema = {
3
- pageSize: number,
4
- retries: number,
5
- interval: number
3
+ pageSize: number,
4
+ retries: number,
5
+ interval: number
6
6
  };
@@ -1,6 +1,6 @@
1
1
  export declare const RedisWorkerOptionsSchema: {
2
- pageSize: import("zod").ZodNumber;
3
- retries: import("zod").ZodNumber;
4
- interval: import("zod").ZodNumber;
2
+ pageSize: import('zod').ZodNumber;
3
+ retries: import('zod').ZodNumber;
4
+ interval: import('zod').ZodNumber;
5
5
  };
6
- //# sourceMappingURL=redisWorker.schema.d.ts.map
6
+ //# sourceMappingURL=redisWorker.schema.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { number } from '@forklaunch/validator/zod';
2
2
  export const RedisWorkerOptionsSchema = {
3
- pageSize: number,
4
- retries: number,
5
- interval: number
3
+ pageSize: number,
4
+ retries: number,
5
+ interval: number
6
6
  };