diff --git a/package.json b/package.json index 731a3a9..cf53a9d 100644 --- a/package.json +++ b/package.json @@ -128,8 +128,8 @@ }, "prettier": "@adonisjs/prettier-config", "dependencies": { - "@poppinss/dumper": "^0.6.0", + "@poppinss/dumper": "^0.6.1", "@speed-highlight/core": "^1.2.6", - "youch-core": "^0.2.6" + "youch-core": "^0.3.0" } } diff --git a/src/types.ts b/src/types.ts index 63e4db0..c234cc0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -112,6 +112,14 @@ export type YouchHTMLOptions = { */ offset?: number + /** + * Number of lines of code to display for the error stack frame. + * For example: If you set the frameSourceBuffer=7, then 3 lines + * above the error line and 3 lines after the error line will + * be displayed. + */ + frameSourceBuffer?: number + /** * Define the error title. It could be the HTTP status * text @@ -159,6 +167,14 @@ export type YouchANSIOptions = { * the top */ offset?: number + + /** + * Number of lines of code to display for the error stack frame. + * For example: If you set the frameSourceBuffer=7, then 3 lines + * above the error line and 3 lines after the error line will + * be displayed. + */ + frameSourceBuffer?: number } /** @@ -171,4 +187,12 @@ export type YouchJSONOptions = { * the top */ offset?: number + + /** + * Number of lines of code to display for the error stack frame. + * For example: If you set the frameSourceBuffer=7, then 3 lines + * above the error line and 3 lines after the error line will + * be displayed. + */ + frameSourceBuffer?: number }