@veloxts/queue 0.6.57 → 0.6.59

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/README.md CHANGED
@@ -1,34 +1,8 @@
1
1
  # @veloxts/queue
2
2
 
3
- > **Early Preview** - APIs may change before v1.0.
3
+ > **Early Preview (v0.6.x)** - APIs are stabilizing but may still change. Use with caution in production.
4
4
 
5
- Background job processing with type-safe job definitions and multiple drivers.
6
-
7
- ## Installation
8
-
9
- ```bash
10
- npm install @veloxts/queue
11
- ```
12
-
13
- ## Quick Start
14
-
15
- ```typescript
16
- import { queuePlugin, defineJob } from '@veloxts/queue';
17
-
18
- app.use(queuePlugin({ driver: 'sync' }));
19
-
20
- const sendEmail = defineJob({
21
- name: 'email.send',
22
- handler: async ({ data }) => {
23
- await mailer.send(data.to, data.subject, data.body);
24
- },
25
- });
26
-
27
- // Dispatch a job
28
- await ctx.queue.dispatch(sendEmail, { to: 'user@example.com', subject: 'Hello' });
29
- ```
30
-
31
- See [GUIDE.md](./GUIDE.md) for detailed documentation.
5
+ Background job processing for VeloxTS Framework - provides sync and BullMQ drivers with type-safe job definitions and reliable execution. Learn more at [@veloxts/velox](https://www.npmjs.com/package/@veloxts/velox).
32
6
 
33
7
  ## License
34
8
 
package/dist/index.d.ts CHANGED
@@ -52,6 +52,20 @@ export { defineJob, job } from './job.js';
52
52
  export { createQueueManager, createWorkerManager, type QueueManager, queue, type WorkerManager, } from './manager.js';
53
53
  export { closeQueue, getQueue, getQueueFromInstance, initQueue, queuePlugin, } from './plugin.js';
54
54
  export type { BackoffOptions, BullMQConfig, Delay, DispatchOptions, DurationString, FailedJob, JobContext, JobDefinition, JobDefinitionConfig, JobHandler, JobOptions, QueueConfig, QueueDriver, QueuePluginOptions, QueueStats, QueueStore, SyncConfig, WorkerStore, } from './types.js';
55
+ /**
56
+ * Utility functions for job processing.
57
+ *
58
+ * @deprecated Import from '@veloxts/queue/utils' instead. Will be removed in v2.0.
59
+ *
60
+ * @example
61
+ * ```typescript
62
+ * // Old (deprecated):
63
+ * import { parseDelay, formatDuration } from '@veloxts/queue';
64
+ *
65
+ * // New:
66
+ * import { parseDelay, formatDuration } from '@veloxts/queue/utils';
67
+ * ```
68
+ */
55
69
  export { formatDuration, isDurationString, parseDelay, validateJobName } from './utils.js';
56
70
  /**
57
71
  * DI tokens and providers for @veloxts/queue
package/dist/index.js CHANGED
@@ -55,7 +55,20 @@ export { defineJob, job } from './job.js';
55
55
  export { createQueueManager, createWorkerManager, queue, } from './manager.js';
56
56
  // Plugin
57
57
  export { closeQueue, getQueue, getQueueFromInstance, initQueue, queuePlugin, } from './plugin.js';
58
- // Utilities
58
+ /**
59
+ * Utility functions for job processing.
60
+ *
61
+ * @deprecated Import from '@veloxts/queue/utils' instead. Will be removed in v2.0.
62
+ *
63
+ * @example
64
+ * ```typescript
65
+ * // Old (deprecated):
66
+ * import { parseDelay, formatDuration } from '@veloxts/queue';
67
+ *
68
+ * // New:
69
+ * import { parseDelay, formatDuration } from '@veloxts/queue/utils';
70
+ * ```
71
+ */
59
72
  export { formatDuration, isDurationString, parseDelay, validateJobName } from './utils.js';
60
73
  export { registerQueueProviders } from './providers.js';
61
74
  // Token exports - unique identifiers for DI resolution
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/queue",
3
- "version": "0.6.57",
3
+ "version": "0.6.59",
4
4
  "description": "Background job processing for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -8,8 +8,12 @@
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
- "import": "./dist/index.js",
12
- "types": "./dist/index.d.ts"
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./utils": {
15
+ "types": "./dist/utils.d.ts",
16
+ "import": "./dist/utils.js"
13
17
  }
14
18
  },
15
19
  "files": [
@@ -23,7 +27,7 @@
23
27
  "ioredis": "5.6.1",
24
28
  "superjson": "2.2.2",
25
29
  "zod": "3.24.4",
26
- "@veloxts/core": "0.6.57"
30
+ "@veloxts/core": "0.6.59"
27
31
  },
28
32
  "devDependencies": {
29
33
  "@biomejs/biome": "2.0.0",
@@ -32,7 +36,7 @@
32
36
  "fastify": "5.6.2",
33
37
  "typescript": "5.8.3",
34
38
  "vitest": "4.0.16",
35
- "@veloxts/testing": "0.6.57"
39
+ "@veloxts/testing": "0.6.59"
36
40
  },
37
41
  "peerDependencies": {
38
42
  "fastify": "^5.0.0"