Skip to content

Commit 7e351d2

Browse files
committed
lint
1 parent 273dbc7 commit 7e351d2

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

packages/b2c-tooling/src/auth/basic.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import {getLogger} from '../logging/logger.js';
44
export class BasicAuthStrategy implements AuthStrategy {
55
private encoded: string;
66

7-
constructor(
8-
private user: string,
9-
pass: string,
10-
) {
7+
constructor(user: string, pass: string) {
118
this.encoded = Buffer.from(`${user}:${pass}`).toString('base64');
129

1310
const logger = getLogger();

packages/b2c-tooling/src/clients/ocapi.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ export function createLoggingMiddleware(): Middleware {
8181
// Debug: Log request start
8282
logger.debug({method: request.method, url}, `[OCAPI REQ] ${request.method} ${url}`);
8383

84-
// Trace: Log request details
84+
// Trace: Log request details (body is in options for openapi-fetch)
85+
const body = (options as {body?: unknown}).body;
8586
logger.trace(
86-
{headers: headersToObject(request.headers), body: options.body},
87+
{headers: headersToObject(request.headers), body},
8788
`[OCAPI REQ BODY] ${request.method} ${url}`,
8889
);
8990

packages/b2c-tooling/src/clients/webdav.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export class WebDavClient {
102102
/**
103103
* Converts Headers to a plain object for logging.
104104
*/
105-
private headersToObject(headers?: HeadersInit | Headers): Record<string, string> | undefined {
105+
private headersToObject(headers?: RequestInit['headers'] | Headers): Record<string, string> | undefined {
106106
if (!headers) return undefined;
107107

108108
const result: Record<string, string> = {};
@@ -123,7 +123,7 @@ export class WebDavClient {
123123
/**
124124
* Formats body for logging, describing binary data.
125125
*/
126-
private formatBody(body?: BodyInit | null): string | undefined {
126+
private formatBody(body?: RequestInit['body']): string | undefined {
127127
if (!body) return undefined;
128128
if (typeof body === 'string') {
129129
return body;

0 commit comments

Comments
 (0)