@h3ravel/queue 11.1.0-alpha.8 → 11.15.0-alpha.11

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.cjs CHANGED
@@ -1,9 +1,12 @@
1
- let __h3ravel_support = require("@h3ravel/support");
2
- let __h3ravel_contracts = require("@h3ravel/contracts");
3
- let __h3ravel_core = require("@h3ravel/core");
4
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _h3ravel_support = require("@h3ravel/support");
3
+ let _h3ravel_contracts = require("@h3ravel/contracts");
4
+ let _h3ravel_core = require("@h3ravel/core");
5
5
  //#region src/Events/JobFailed.ts
6
6
  var JobFailed = class {
7
+ connectionName;
8
+ job;
9
+ exception;
7
10
  /**
8
11
  * Create a new event instance.
9
12
  *
@@ -17,14 +20,12 @@ var JobFailed = class {
17
20
  this.exception = exception;
18
21
  }
19
22
  };
20
-
21
23
  //#endregion
22
24
  //#region src/Exceptions/ManuallyFailedException.ts
23
- var ManuallyFailedException = class extends __h3ravel_support.RuntimeException {};
24
-
25
+ var ManuallyFailedException = class extends _h3ravel_support.RuntimeException {};
25
26
  //#endregion
26
27
  //#region src/Exceptions/MaxAttemptsExceededException.ts
27
- var MaxAttemptsExceededException = class MaxAttemptsExceededException extends __h3ravel_support.RuntimeException {
28
+ var MaxAttemptsExceededException = class MaxAttemptsExceededException extends _h3ravel_support.RuntimeException {
28
29
  /**
29
30
  * The job instance.
30
31
  */
@@ -35,12 +36,11 @@ var MaxAttemptsExceededException = class MaxAttemptsExceededException extends __
35
36
  * @param job
36
37
  */
37
38
  static forJob(job) {
38
- return (0, __h3ravel_support.tap)(new MaxAttemptsExceededException(job.resolveName() + " has been attempted too many times."), (e) => {
39
+ return (0, _h3ravel_support.tap)(new MaxAttemptsExceededException(job.resolveName() + " has been attempted too many times."), (e) => {
39
40
  e.job = job;
40
41
  });
41
42
  }
42
43
  };
43
-
44
44
  //#endregion
45
45
  //#region src/Exceptions/TimeoutExceededException.ts
46
46
  var TimeoutExceededException = class TimeoutExceededException extends MaxAttemptsExceededException {
@@ -50,12 +50,11 @@ var TimeoutExceededException = class TimeoutExceededException extends MaxAttempt
50
50
  * @param job
51
51
  */
52
52
  static forJob(job) {
53
- return (0, __h3ravel_support.tap)(new TimeoutExceededException(job.resolveName() + " has timed out."), (e) => {
53
+ return (0, _h3ravel_support.tap)(new TimeoutExceededException(job.resolveName() + " has timed out."), (e) => {
54
54
  e.job = job;
55
55
  });
56
56
  }
57
57
  };
58
-
59
58
  //#endregion
60
59
  //#region src/Jobs/JobName.ts
61
60
  var JobName = class {
@@ -88,7 +87,6 @@ var JobName = class {
88
87
  return name;
89
88
  }
90
89
  };
91
-
92
90
  //#endregion
93
91
  //#region src/Jobs/Job.ts
94
92
  var Job = class {
@@ -155,7 +153,7 @@ var Job = class {
155
153
  *
156
154
  * @param delay
157
155
  */
158
- release(delay = 0) {
156
+ release(_delay = 0) {
159
157
  this.released = true;
160
158
  }
161
159
  /**
@@ -197,7 +195,7 @@ var Job = class {
197
195
  this.delete();
198
196
  this.failedJob(e);
199
197
  } finally {
200
- this.resolve(__h3ravel_contracts.IDispatcher).dispatch(new JobFailed(this.connectionName, this, e || new ManuallyFailedException()));
198
+ this.resolve(_h3ravel_contracts.IDispatcher).dispatch(new JobFailed(this.connectionName, this, e || new ManuallyFailedException()));
201
199
  }
202
200
  }
203
201
  /**
@@ -332,7 +330,6 @@ var Job = class {
332
330
  return this.container;
333
331
  }
334
332
  };
335
-
336
333
  //#endregion
337
334
  //#region src/Providers/QueueServiceProvider.ts
338
335
  /**
@@ -344,11 +341,10 @@ var Job = class {
344
341
  *
345
342
  * Auto-Registered if @h3ravel/queue is installed
346
343
  */
347
- var QueueServiceProvider = class extends __h3ravel_core.ServiceProvider {
344
+ var QueueServiceProvider = class extends _h3ravel_core.ServiceProvider {
348
345
  static priority = 991;
349
346
  register() {}
350
347
  };
351
-
352
348
  //#endregion
353
349
  exports.Job = Job;
354
350
  exports.JobFailed = JobFailed;
@@ -356,4 +352,4 @@ exports.JobName = JobName;
356
352
  exports.ManuallyFailedException = ManuallyFailedException;
357
353
  exports.MaxAttemptsExceededException = MaxAttemptsExceededException;
358
354
  exports.QueueServiceProvider = QueueServiceProvider;
359
- exports.TimeoutExceededException = TimeoutExceededException;
355
+ exports.TimeoutExceededException = TimeoutExceededException;
package/dist/index.d.ts CHANGED
@@ -69,7 +69,7 @@ declare abstract class Job {
69
69
  *
70
70
  * @param delay
71
71
  */
72
- release(delay?: number): void;
72
+ release(_delay?: number): void;
73
73
  /**
74
74
  * Determine if the job was released back into the queue.
75
75
  *
package/dist/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  import { RuntimeException, tap } from "@h3ravel/support";
2
2
  import { IDispatcher } from "@h3ravel/contracts";
3
3
  import { ServiceProvider } from "@h3ravel/core";
4
-
5
4
  //#region src/Events/JobFailed.ts
6
5
  var JobFailed = class {
6
+ connectionName;
7
+ job;
8
+ exception;
7
9
  /**
8
10
  * Create a new event instance.
9
11
  *
@@ -17,11 +19,9 @@ var JobFailed = class {
17
19
  this.exception = exception;
18
20
  }
19
21
  };
20
-
21
22
  //#endregion
22
23
  //#region src/Exceptions/ManuallyFailedException.ts
23
24
  var ManuallyFailedException = class extends RuntimeException {};
24
-
25
25
  //#endregion
26
26
  //#region src/Exceptions/MaxAttemptsExceededException.ts
27
27
  var MaxAttemptsExceededException = class MaxAttemptsExceededException extends RuntimeException {
@@ -40,7 +40,6 @@ var MaxAttemptsExceededException = class MaxAttemptsExceededException extends Ru
40
40
  });
41
41
  }
42
42
  };
43
-
44
43
  //#endregion
45
44
  //#region src/Exceptions/TimeoutExceededException.ts
46
45
  var TimeoutExceededException = class TimeoutExceededException extends MaxAttemptsExceededException {
@@ -55,7 +54,6 @@ var TimeoutExceededException = class TimeoutExceededException extends MaxAttempt
55
54
  });
56
55
  }
57
56
  };
58
-
59
57
  //#endregion
60
58
  //#region src/Jobs/JobName.ts
61
59
  var JobName = class {
@@ -88,7 +86,6 @@ var JobName = class {
88
86
  return name;
89
87
  }
90
88
  };
91
-
92
89
  //#endregion
93
90
  //#region src/Jobs/Job.ts
94
91
  var Job = class {
@@ -155,7 +152,7 @@ var Job = class {
155
152
  *
156
153
  * @param delay
157
154
  */
158
- release(delay = 0) {
155
+ release(_delay = 0) {
159
156
  this.released = true;
160
157
  }
161
158
  /**
@@ -332,7 +329,6 @@ var Job = class {
332
329
  return this.container;
333
330
  }
334
331
  };
335
-
336
332
  //#endregion
337
333
  //#region src/Providers/QueueServiceProvider.ts
338
334
  /**
@@ -348,6 +344,5 @@ var QueueServiceProvider = class extends ServiceProvider {
348
344
  static priority = 991;
349
345
  register() {}
350
346
  };
351
-
352
347
  //#endregion
353
- export { Job, JobFailed, JobName, ManuallyFailedException, MaxAttemptsExceededException, QueueServiceProvider, TimeoutExceededException };
348
+ export { Job, JobFailed, JobName, ManuallyFailedException, MaxAttemptsExceededException, QueueServiceProvider, TimeoutExceededException };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h3ravel/queue",
3
- "version": "11.1.0-alpha.8",
3
+ "version": "11.15.0-alpha.11",
4
4
  "description": "Job queues, workers and broadcasting support system for H3ravel.",
5
5
  "h3ravel": {
6
6
  "providers": [
@@ -41,14 +41,14 @@
41
41
  "laravel"
42
42
  ],
43
43
  "peerDependencies": {
44
- "@h3ravel/core": "^1.22.0-alpha.8",
45
- "@h3ravel/contracts": "^0.29.0-alpha.8"
44
+ "@h3ravel/core": "^1.29.0-alpha.11",
45
+ "@h3ravel/contracts": "^1.29.0-alpha.11"
46
46
  },
47
47
  "devDependencies": {
48
- "typescript": "^5.4.0"
48
+ "typescript": "^6.0.0"
49
49
  },
50
50
  "scripts": {
51
- "build": "tsdown --config-loader unconfig",
51
+ "build": "tsdown --config-loader unrun",
52
52
  "dev": "tsx watch src/index.ts",
53
53
  "start": "node dist/index.js",
54
54
  "lint": "eslint . --ext .ts",