@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.d.mts CHANGED
@@ -2382,7 +2382,7 @@ declare class Job<TTrigger extends Trigger<EventSpecification<any>>, TIntegratio
2382
2382
  /**
2383
2383
  * Attaches the job to a client. This is called automatically when you define a job using `client.defineJob()`.
2384
2384
  */
2385
- attachToClient(client: TriggerClient): void;
2385
+ attachToClient(client: TriggerClient): this;
2386
2386
  get id(): string;
2387
2387
  get enabled(): boolean;
2388
2388
  get name(): string;
package/dist/index.d.ts CHANGED
@@ -2382,7 +2382,7 @@ declare class Job<TTrigger extends Trigger<EventSpecification<any>>, TIntegratio
2382
2382
  /**
2383
2383
  * Attaches the job to a client. This is called automatically when you define a job using `client.defineJob()`.
2384
2384
  */
2385
- attachToClient(client: TriggerClient): void;
2385
+ attachToClient(client: TriggerClient): this;
2386
2386
  get id(): string;
2387
2387
  get enabled(): boolean;
2388
2388
  get name(): string;
package/dist/index.js CHANGED
@@ -84,8 +84,8 @@ var _Job = class _Job {
84
84
  * Attaches the job to a client. This is called automatically when you define a job using `client.defineJob()`.
85
85
  */
86
86
  attachToClient(client) {
87
- this.client = client;
88
- this.trigger.attachToJob(client, this);
87
+ client.attach(this);
88
+ return this;
89
89
  }
90
90
  get id() {
91
91
  return slugifyId(this.options.id);
@@ -266,7 +266,7 @@ __name(_Job, "Job");
266
266
  var Job = _Job;
267
267
 
268
268
  // package.json
269
- var version = "2.3.3";
269
+ var version = "2.3.5";
270
270
 
271
271
  // src/errors.ts
272
272
  var _ResumeWithTaskError = class _ResumeWithTaskError {
@@ -3427,7 +3427,8 @@ var _TriggerClient = class _TriggerClient {
3427
3427
  }
3428
3428
  attach(job) {
3429
3429
  __privateGet(this, _registeredJobs)[job.id] = job;
3430
- job.attachToClient(this);
3430
+ job.trigger.attachToJob(this, job);
3431
+ job.client = this;
3431
3432
  }
3432
3433
  attachDynamicTrigger(trigger) {
3433
3434
  __privateGet(this, _registeredDynamicTriggers)[trigger.id] = trigger;