@digitraffic/common 2026.10.27-1 → 2026.10.27-2

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.
@@ -45,7 +45,7 @@ export declare class HttpLogger {
45
45
  /** Records a received HTTP response and writes the request log entry. */
46
46
  end(statusCode: number, contentLength?: number): void;
47
47
  /** Create hooks for Ky HTTP client using the provided logger */
48
- createKyHooks(logger: HttpLogger): Hooks;
48
+ createKyHooks(): Hooks;
49
49
  /** Hook logging into undici response events */
50
50
  log(response: Dispatcher.ResponseData<unknown>): void;
51
51
  /**
@@ -58,7 +58,7 @@ export class HttpLogger {
58
58
  this.logStatus();
59
59
  }
60
60
  /** Create hooks for Ky HTTP client using the provided logger */
61
- createKyHooks(logger) {
61
+ createKyHooks() {
62
62
  return {
63
63
  afterResponse: [
64
64
  async (state) => {
@@ -66,19 +66,19 @@ export class HttpLogger {
66
66
  // use header when available to determine content length
67
67
  if (contentLengthHeader) {
68
68
  const contentLength = parseInt(contentLengthHeader, 10);
69
- logger.end(state.response.status, contentLength);
69
+ this.end(state.response.status, contentLength);
70
70
  return state.response;
71
71
  }
72
72
  // create clone from the response, so we can read its body without affecting the original response
73
73
  const resp = state.response.clone();
74
74
  const contentLength = (await resp.bytes()).length;
75
- logger.end(resp.status, contentLength);
75
+ this.end(resp.status, contentLength);
76
76
  return state.response;
77
77
  },
78
78
  ],
79
79
  beforeError: [
80
80
  (state) => {
81
- logger.error(state.error);
81
+ this.error(state.error);
82
82
  return state.error;
83
83
  },
84
84
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitraffic/common",
3
- "version": "2026.10.27-1",
3
+ "version": "2026.10.27-2",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "repository": {