@tsed/pulse 8.29.1 → 8.31.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 (2) hide show
  1. package/package.json +6 -6
  2. package/readme.md +47 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tsed/pulse",
3
3
  "description": "@pulsecron/pulse package for Ts.ED framework",
4
4
  "type": "module",
5
- "version": "8.29.1",
5
+ "version": "8.31.0",
6
6
  "source": "./src/index.ts",
7
7
  "main": "./lib/esm/index.js",
8
8
  "module": "./lib/esm/index.js",
@@ -27,11 +27,11 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@pulsecron/pulse": "^1.6.3",
30
- "@tsed/barrels": "8.29.1",
31
- "@tsed/core": "8.29.1",
32
- "@tsed/di": "8.29.1",
33
- "@tsed/platform-http": "8.29.1",
34
- "@tsed/typescript": "8.29.1",
30
+ "@tsed/barrels": "8.31.0",
31
+ "@tsed/core": "8.31.0",
32
+ "@tsed/di": "8.31.0",
33
+ "@tsed/platform-http": "8.31.0",
34
+ "@tsed/typescript": "8.31.0",
35
35
  "eslint": "9.12.0",
36
36
  "typescript": "6.0.2",
37
37
  "vitest": "4.1.4"
package/readme.md CHANGED
@@ -30,6 +30,13 @@
30
30
 
31
31
  A package of Ts.ED framework. See website: https://tsed.dev
32
32
 
33
+ > [!WARNING] > `@tsed/pulse` is deprecated and will be removed in a future major release.
34
+ > This package won't receive any future updates.
35
+ > For new projects, use `@tsed/agenda` with Agenda v6.
36
+ > Existing consumers should plan a migration to `@tsed/agenda` + `agenda` + `@agendajs/mongo-backend`.
37
+ >
38
+ > The legacy Pulse examples below are kept only to help existing consumers maintain or migrate old code.
39
+
33
40
  ## Feature
34
41
 
35
42
  `@pulsecron/pulse` is maintained fork of the Agenda.
@@ -49,6 +56,45 @@ npm install --save @tsed/pulse
49
56
  npm install --save @pulsecron/pulse
50
57
  ```
51
58
 
59
+ ## Migration note
60
+
61
+ Prefer `@tsed/agenda` over `@tsed/pulse`.
62
+
63
+ ```diff
64
+ import {Configuration} from "@tsed/di";
65
+ -import "@tsed/pulse";
66
+ +import "@tsed/agenda";
67
+ +import {MongoBackend} from "@agendajs/mongo-backend";
68
+
69
+ @Configuration({
70
+ - pulse: {
71
+ + agenda: {
72
+ enabled: true,
73
+ - db: {
74
+ - address: mongoConnectionString
75
+ - }
76
+ + backend: new MongoBackend({
77
+ + address: mongoConnectionString
78
+ + })
79
+ }
80
+ })
81
+ export class Server {}
82
+ ```
83
+
84
+ ```diff
85
+ -import {Pulse, Every, Define, PulseModule} from "@tsed/pulse";
86
+ +import {JobsController, Every, Define} from "@tsed/agenda";
87
+ +import {Agenda} from "agenda";
88
+
89
+ -@Pulse({namespace: "email"})
90
+ +@JobsController({namespace: "email"})
91
+ export class EmailJobService {
92
+ @Inject()
93
+ - pulse: PulseModule;
94
+ + agenda: Agenda;
95
+ }
96
+ ```
97
+
52
98
  ## Configure your server
53
99
 
54
100
  Import `@tsed/pulse` in your Server:
@@ -204,7 +250,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
204
250
 
205
251
  The MIT License (MIT)
206
252
 
207
- Copyright (c) 2016 - 2021 Romain Lenzotti
253
+ Copyright (c) 2016 - Today Romain Lenzotti
208
254
 
209
255
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
210
256