@forklaunch/implementation-worker-bullmq 0.2.2 → 0.3.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 (47) hide show
  1. package/lib/consumers/index.d.mts +19 -0
  2. package/lib/consumers/index.d.ts +19 -2
  3. package/lib/consumers/index.js +73 -1
  4. package/lib/consumers/{bullMqWorker.consumer.js → index.mjs} +11 -11
  5. package/lib/producers/index.d.mts +15 -0
  6. package/lib/producers/index.d.ts +15 -2
  7. package/lib/producers/index.js +66 -1
  8. package/lib/producers/{bullMqWorker.producer.js → index.mjs} +8 -6
  9. package/lib/schemas/index.d.mts +390 -0
  10. package/lib/schemas/index.d.ts +390 -2
  11. package/lib/schemas/index.js +1613 -1
  12. package/lib/schemas/index.mjs +1617 -0
  13. package/lib/types/index.d.mts +9 -0
  14. package/lib/types/index.d.ts +9 -2
  15. package/lib/types/index.js +18 -1
  16. package/lib/types/index.mjs +0 -0
  17. package/package.json +6 -5
  18. package/lib/__test__/schemaEquality.test.d.ts +0 -2
  19. package/lib/__test__/schemaEquality.test.d.ts.map +0 -1
  20. package/lib/__test__/schemaEquality.test.js +0 -24
  21. package/lib/consumers/bullMqWorker.consumer.d.ts +0 -29
  22. package/lib/consumers/bullMqWorker.consumer.d.ts.map +0 -1
  23. package/lib/consumers/index.d.ts.map +0 -1
  24. package/lib/jest.config.d.ts +0 -4
  25. package/lib/jest.config.d.ts.map +0 -1
  26. package/lib/jest.config.js +0 -19
  27. package/lib/producers/bullMqWorker.producer.d.ts +0 -16
  28. package/lib/producers/bullMqWorker.producer.d.ts.map +0 -1
  29. package/lib/producers/index.d.ts.map +0 -1
  30. package/lib/schemas/bullMqWorker.schema.d.ts +0 -2117
  31. package/lib/schemas/bullMqWorker.schema.d.ts.map +0 -1
  32. package/lib/schemas/bullMqWorker.schema.js +0 -7
  33. package/lib/schemas/index.d.ts.map +0 -1
  34. package/lib/schemas/typebox/bullMqWorker.schema.d.ts +0 -1016
  35. package/lib/schemas/typebox/bullMqWorker.schema.d.ts.map +0 -1
  36. package/lib/schemas/typebox/bullMqWorker.schema.js +0 -145
  37. package/lib/schemas/zod/bullMqWorker.schema.d.ts +0 -1066
  38. package/lib/schemas/zod/bullMqWorker.schema.d.ts.map +0 -1
  39. package/lib/schemas/zod/bullMqWorker.schema.js +0 -145
  40. package/lib/tsconfig.tsbuildinfo +0 -1
  41. package/lib/types/bullMqWorker.types.d.ts +0 -7
  42. package/lib/types/bullMqWorker.types.d.ts.map +0 -1
  43. package/lib/types/bullMqWorker.types.js +0 -1
  44. package/lib/types/index.d.ts.map +0 -1
  45. package/lib/vitest.config.d.ts +0 -3
  46. package/lib/vitest.config.d.ts.map +0 -1
  47. package/lib/vitest.config.js +0 -7
@@ -1 +0,0 @@
1
- {"version":3,"file":"bullMqWorker.schema.d.ts","sourceRoot":"","sources":["../../../schemas/zod/bullMqWorker.schema.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAkIlC,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKrC,CAAC"}
@@ -1,145 +0,0 @@
1
- import {
2
- any,
3
- array,
4
- boolean,
5
- date,
6
- enum_,
7
- function_,
8
- literal,
9
- null_,
10
- number,
11
- optional,
12
- promise,
13
- record,
14
- string,
15
- undefined_,
16
- union,
17
- unknown,
18
- void_
19
- } from '@forklaunch/validator/zod';
20
- import { SpanKind } from 'bullmq';
21
- const BullMqWorkerKeepJobsSchema = {
22
- age: optional(number),
23
- count: optional(number)
24
- };
25
- const BullMqWorkerBackoffOptionsSchema = {
26
- type: union([literal('fixed'), literal('exponential')]),
27
- delay: optional(number)
28
- };
29
- const BullMqWorkerDefaultJobOptionsSchema = {
30
- timestamp: optional(number),
31
- priority: optional(number),
32
- delay: optional(number),
33
- attempts: optional(number),
34
- backoff: optional(union([number, BullMqWorkerBackoffOptionsSchema])),
35
- lifo: optional(boolean),
36
- removeOnComplete: optional(
37
- union([boolean, number, BullMqWorkerKeepJobsSchema])
38
- ),
39
- removeOnFail: optional(union([boolean, number, BullMqWorkerKeepJobsSchema])),
40
- keepLogs: optional(number),
41
- stackTraceLimit: optional(number),
42
- sizeLimit: optional(number)
43
- };
44
- const BullMqDateType = union([date, number, string]);
45
- const BullMqWorkerAdvancedRepeatOptionsSchema = {
46
- repeatStrategy: optional(
47
- function_(
48
- [
49
- number,
50
- {
51
- pattern: optional(string),
52
- key: optional(string),
53
- limit: optional(number),
54
- every: optional(number),
55
- immediately: optional(boolean),
56
- count: optional(number),
57
- offset: optional(number),
58
- prevMillis: optional(number),
59
- jobId: optional(string),
60
- currentDate: optional(BullMqDateType),
61
- startDate: optional(BullMqDateType),
62
- endDate: optional(BullMqDateType),
63
- utc: optional(boolean),
64
- tz: optional(string),
65
- nthDayOfWeek: optional(number)
66
- },
67
- optional(string)
68
- ],
69
- union([number, undefined_, promise(union([number, undefined_]))])
70
- )
71
- ),
72
- repeatKeyHashAlgorithm: optional(string)
73
- };
74
- const BullMqWorkerTelemetryAttributeValueSchema = union([
75
- string,
76
- number,
77
- boolean,
78
- array(union([string, null_, undefined_])),
79
- array(union([number, null_, undefined_])),
80
- array(union([boolean, null_, undefined_]))
81
- ]);
82
- const BullMqWorkerTelemetryAttributesSchema = record(
83
- string,
84
- union([BullMqWorkerTelemetryAttributeValueSchema, undefined_])
85
- );
86
- const BullMqWorkerTelemetrySchema = optional({
87
- tracer: {
88
- startSpan: function_(
89
- [
90
- string,
91
- optional({
92
- kind: optional(enum_(SpanKind))
93
- }),
94
- optional(unknown)
95
- ],
96
- {
97
- setSpanOnContext: function_([unknown], unknown),
98
- setAttribute: function_(
99
- [string, BullMqWorkerTelemetryAttributeValueSchema],
100
- void_
101
- ),
102
- setAttributes: function_(
103
- [BullMqWorkerTelemetryAttributesSchema],
104
- void_
105
- ),
106
- addEvent: function_(
107
- [string, optional(BullMqWorkerTelemetryAttributesSchema)],
108
- void_
109
- ),
110
- recordException: function_([unknown, optional(number)], void_),
111
- end: function_([], void_)
112
- }
113
- )
114
- },
115
- contextManager: {
116
- with: function_([unknown, function_([any], any)], any),
117
- active: function_([], unknown),
118
- getMetadata: function_([unknown], string),
119
- fromMetadata: function_([unknown, string], unknown)
120
- }
121
- });
122
- const BullMqWorkerQueueOptionsSchema = {
123
- connection: {
124
- skipVersionCheck: optional(boolean),
125
- url: optional(string)
126
- },
127
- blockingConnection: optional(boolean),
128
- prefix: optional(string),
129
- telemetry: BullMqWorkerTelemetrySchema,
130
- skipWaitingForReady: optional(boolean),
131
- defaultJobOptions: optional(BullMqWorkerDefaultJobOptionsSchema),
132
- streams: optional({
133
- events: {
134
- maxLen: number
135
- }
136
- }),
137
- skipMetasUpdate: optional(boolean),
138
- settings: optional(BullMqWorkerAdvancedRepeatOptionsSchema)
139
- };
140
- export const BullMqWorkerOptionsSchema = {
141
- ...BullMqWorkerQueueOptionsSchema,
142
- backoffType: union([literal('exponential'), literal('fixed')]),
143
- retries: number,
144
- interval: number
145
- };