@trigger.dev/sdk 2.3.3 → 2.3.5

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/dist/index.mjs CHANGED
@@ -76,8 +76,8 @@ var _Job = class _Job {
76
76
  * Attaches the job to a client. This is called automatically when you define a job using `client.defineJob()`.
77
77
  */
78
78
  attachToClient(client) {
79
- this.client = client;
80
- this.trigger.attachToJob(client, this);
79
+ client.attach(this);
80
+ return this;
81
81
  }
82
82
  get id() {
83
83
  return slugifyId(this.options.id);
@@ -258,7 +258,7 @@ __name(_Job, "Job");
258
258
  var Job = _Job;
259
259
 
260
260
  // package.json
261
- var version = "2.3.3";
261
+ var version = "2.3.5";
262
262
 
263
263
  // src/errors.ts
264
264
  var _ResumeWithTaskError = class _ResumeWithTaskError {
@@ -3419,7 +3419,8 @@ var _TriggerClient = class _TriggerClient {
3419
3419
  }
3420
3420
  attach(job) {
3421
3421
  __privateGet(this, _registeredJobs)[job.id] = job;
3422
- job.attachToClient(this);
3422
+ job.trigger.attachToJob(this, job);
3423
+ job.client = this;
3423
3424
  }
3424
3425
  attachDynamicTrigger(trigger) {
3425
3426
  __privateGet(this, _registeredDynamicTriggers)[trigger.id] = trigger;