@athenna/cron 5.10.0 → 5.11.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@athenna/cron",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.11.0",
|
|
4
4
|
"description": "Athenna scheduler application. Built on top of node-cron.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "João Lenon <lenon@athenna.io>",
|
|
@@ -57,17 +57,17 @@
|
|
|
57
57
|
"node-cron": "^3.0.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@athenna/artisan": "^5.
|
|
61
|
-
"@athenna/common": "^5.
|
|
62
|
-
"@athenna/config": "^5.
|
|
60
|
+
"@athenna/artisan": "^5.11.0",
|
|
61
|
+
"@athenna/common": "^5.30.0",
|
|
62
|
+
"@athenna/config": "^5.6.0",
|
|
63
63
|
"@athenna/ioc": "^5.2.0",
|
|
64
|
-
"@athenna/logger": "^5.
|
|
65
|
-
"@athenna/test": "^5.
|
|
64
|
+
"@athenna/logger": "^5.14.0",
|
|
65
|
+
"@athenna/test": "^5.6.0",
|
|
66
66
|
"@athenna/tsconfig": "^5.0.0",
|
|
67
|
-
"@athenna/view": "^5.
|
|
67
|
+
"@athenna/view": "^5.4.0",
|
|
68
68
|
"@types/node-cron": "^3.0.11",
|
|
69
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
70
|
-
"@typescript-eslint/parser": "^8.
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "^8.57.0",
|
|
70
|
+
"@typescript-eslint/parser": "^8.57.0",
|
|
71
71
|
"cls-rtracer": "^2.6.3",
|
|
72
72
|
"commitizen": "^4.3.1",
|
|
73
73
|
"cz-conventional-changelog": "^3.3.0",
|
package/src/cron/CronBuilder.js
CHANGED
package/src/debug/index.d.ts
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* For the full copyright and license information, please view the LICENSE
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
import { ExceptionHandler, type ExceptionHandlerContext } from '@athenna/common';
|
|
10
|
+
export declare class CronExceptionHandler extends ExceptionHandler {
|
|
10
11
|
/**
|
|
11
12
|
* Error codes that should be ignored from logging.
|
|
12
13
|
*/
|
|
@@ -18,7 +19,7 @@ export declare class CronExceptionHandler {
|
|
|
18
19
|
/**
|
|
19
20
|
* The exception handler of all Artisan commands.
|
|
20
21
|
*/
|
|
21
|
-
handle(error:
|
|
22
|
+
handle({ error }: ExceptionHandlerContext): Promise<void>;
|
|
22
23
|
/**
|
|
23
24
|
* Return a boolean indicating if the error can be logged or not.
|
|
24
25
|
*/
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* For the full copyright and license information, please view the LICENSE
|
|
7
7
|
* file that was distributed with this source code.
|
|
8
8
|
*/
|
|
9
|
+
import { Is, String, ExceptionHandler } from '@athenna/common';
|
|
9
10
|
import { Log } from '@athenna/logger';
|
|
10
11
|
import { Config } from '@athenna/config';
|
|
11
|
-
|
|
12
|
-
export class CronExceptionHandler {
|
|
12
|
+
export class CronExceptionHandler extends ExceptionHandler {
|
|
13
13
|
/**
|
|
14
14
|
* Error codes that should be ignored from logging.
|
|
15
15
|
*/
|
|
@@ -25,7 +25,7 @@ export class CronExceptionHandler {
|
|
|
25
25
|
/**
|
|
26
26
|
* The exception handler of all Artisan commands.
|
|
27
27
|
*/
|
|
28
|
-
async handle(error) {
|
|
28
|
+
async handle({ error }) {
|
|
29
29
|
error.code = String.toSnakeCase(`${error.code}` || error.name).toUpperCase();
|
|
30
30
|
if (!Is.Exception(error)) {
|
|
31
31
|
error = error.toAthennaException();
|