@arkyn/server 3.0.1-beta.34 → 3.0.1-beta.35

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.
@@ -1,5 +1,40 @@
1
+ /**
2
+ * Service for managing HTTP debug configuration and behavior.
3
+ *
4
+ * This service provides functionality to configure how the `getCaller` function
5
+ * identifies the actual caller in the stack trace by allowing specific files
6
+ * to be ignored during stack trace analysis.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * // Configure to ignore httpAdapter.ts in stack traces
11
+ * HttpDebugService.setIgnoreFile("httpAdapter.ts");
12
+ *
13
+ * // Now when httpDebug is called from within httpAdapter.ts,
14
+ * // it will show the actual caller (e.g., cart.ts) instead
15
+ * ```
16
+ */
1
17
  declare class HttpDebugService {
18
+ /**
19
+ * The name of the file to ignore when analyzing the stack trace.
20
+ * When set, the `getCaller` function will skip stack frames containing this file name.
21
+ */
2
22
  static ignoreFile?: string;
23
+ /**
24
+ * Sets the file name to be ignored during stack trace analysis.
25
+ *
26
+ * This method configures the debug service to skip specific files when
27
+ * determining the actual caller of a function. This is useful when you have
28
+ * adapter or wrapper functions that you want to be transparent in the debug output.
29
+ *
30
+ * @param file - The name of the file to ignore in stack traces (e.g., "httpAdapter.ts")
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * // Ignore the HTTP adapter file so debug shows the actual business logic caller
35
+ * HttpDebugService.setIgnoreFile("httpAdapter.ts");
36
+ * ```
37
+ */
3
38
  static setIgnoreFile(file: string): void;
4
39
  }
5
40
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"httpDebug.d.ts","sourceRoot":"","sources":["../../src/services/httpDebug.ts"],"names":[],"mappings":"AAEA,cAAM,gBAAgB;IACpB,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE3B,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM;CAGlC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,iBAAS,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,GAAG,QAuBtD;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"httpDebug.d.ts","sourceRoot":"","sources":["../../src/services/httpDebug.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,cAAM,gBAAgB;IACpB;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM;CAGlC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,iBAAS,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,GAAG,QAuBtD;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,6 +1,41 @@
1
1
  import { getCaller } from "../services/getCaller";
2
+ /**
3
+ * Service for managing HTTP debug configuration and behavior.
4
+ *
5
+ * This service provides functionality to configure how the `getCaller` function
6
+ * identifies the actual caller in the stack trace by allowing specific files
7
+ * to be ignored during stack trace analysis.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * // Configure to ignore httpAdapter.ts in stack traces
12
+ * HttpDebugService.setIgnoreFile("httpAdapter.ts");
13
+ *
14
+ * // Now when httpDebug is called from within httpAdapter.ts,
15
+ * // it will show the actual caller (e.g., cart.ts) instead
16
+ * ```
17
+ */
2
18
  class HttpDebugService {
19
+ /**
20
+ * The name of the file to ignore when analyzing the stack trace.
21
+ * When set, the `getCaller` function will skip stack frames containing this file name.
22
+ */
3
23
  static ignoreFile;
24
+ /**
25
+ * Sets the file name to be ignored during stack trace analysis.
26
+ *
27
+ * This method configures the debug service to skip specific files when
28
+ * determining the actual caller of a function. This is useful when you have
29
+ * adapter or wrapper functions that you want to be transparent in the debug output.
30
+ *
31
+ * @param file - The name of the file to ignore in stack traces (e.g., "httpAdapter.ts")
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * // Ignore the HTTP adapter file so debug shows the actual business logic caller
36
+ * HttpDebugService.setIgnoreFile("httpAdapter.ts");
37
+ * ```
38
+ */
4
39
  static setIgnoreFile(file) {
5
40
  this.ignoreFile = file;
6
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/server",
3
- "version": "3.0.1-beta.34",
3
+ "version": "3.0.1-beta.35",
4
4
  "author": "Arkyn | Lucas Gonçalves",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./src/index.ts",
@@ -1,8 +1,43 @@
1
1
  import { getCaller } from "../services/getCaller";
2
2
 
3
+ /**
4
+ * Service for managing HTTP debug configuration and behavior.
5
+ *
6
+ * This service provides functionality to configure how the `getCaller` function
7
+ * identifies the actual caller in the stack trace by allowing specific files
8
+ * to be ignored during stack trace analysis.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Configure to ignore httpAdapter.ts in stack traces
13
+ * HttpDebugService.setIgnoreFile("httpAdapter.ts");
14
+ *
15
+ * // Now when httpDebug is called from within httpAdapter.ts,
16
+ * // it will show the actual caller (e.g., cart.ts) instead
17
+ * ```
18
+ */
3
19
  class HttpDebugService {
20
+ /**
21
+ * The name of the file to ignore when analyzing the stack trace.
22
+ * When set, the `getCaller` function will skip stack frames containing this file name.
23
+ */
4
24
  static ignoreFile?: string;
5
25
 
26
+ /**
27
+ * Sets the file name to be ignored during stack trace analysis.
28
+ *
29
+ * This method configures the debug service to skip specific files when
30
+ * determining the actual caller of a function. This is useful when you have
31
+ * adapter or wrapper functions that you want to be transparent in the debug output.
32
+ *
33
+ * @param file - The name of the file to ignore in stack traces (e.g., "httpAdapter.ts")
34
+ *
35
+ * @example
36
+ * ```typescript
37
+ * // Ignore the HTTP adapter file so debug shows the actual business logic caller
38
+ * HttpDebugService.setIgnoreFile("httpAdapter.ts");
39
+ * ```
40
+ */
6
41
  static setIgnoreFile(file: string) {
7
42
  this.ignoreFile = file;
8
43
  }