@output.ai/http 0.1.2 → 0.2.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/dist/config.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  export declare const config: {
5
5
  /**
6
6
  * Whether to log verbose HTTP information (headers and bodies)
7
- * Controlled by LOG_HTTP_VERBOSE environment variable
7
+ * Controlled by OUTPUT_TRACE_HTTP_VERBOSE environment variable
8
8
  */
9
9
  logVerbose: boolean;
10
10
  };
package/dist/config.js CHANGED
@@ -4,7 +4,7 @@
4
4
  export const config = {
5
5
  /**
6
6
  * Whether to log verbose HTTP information (headers and bodies)
7
- * Controlled by LOG_HTTP_VERBOSE environment variable
7
+ * Controlled by OUTPUT_TRACE_HTTP_VERBOSE environment variable
8
8
  */
9
- logVerbose: ['1', 'true'].includes(process.env.LOG_HTTP_VERBOSE)
9
+ logVerbose: ['1', 'true'].includes(process.env.OUTPUT_TRACE_HTTP_VERBOSE)
10
10
  };
@@ -9,6 +9,6 @@ import type { BeforeErrorHook, Input } from 'ky';
9
9
  */
10
10
  export declare function applyFetchErrorTracing(fetchFn: (input: Input, init?: RequestInit) => Promise<Response>): (input: Input, init?: RequestInit) => Promise<Response>;
11
11
  /**
12
- * Traces HTTP errors for observability using Output SDK tracing
12
+ * Traces HTTP errors for observability using Output.ai tracing
13
13
  */
14
14
  export declare const traceError: BeforeErrorHook;
@@ -39,7 +39,7 @@ export function applyFetchErrorTracing(fetchFn) {
39
39
  };
40
40
  }
41
41
  /**
42
- * Traces HTTP errors for observability using Output SDK tracing
42
+ * Traces HTTP errors for observability using Output.ai tracing
43
43
  */
44
44
  export const traceError = (error) => {
45
45
  const traceId = createTraceId(error.request);
@@ -1,6 +1,6 @@
1
1
  import type { BeforeRequestHook } from 'ky';
2
2
  /**
3
- * Traces HTTP request for observability using Output SDK tracing
4
- * Respects LOG_HTTP_VERBOSE environment variable for detailed logging
3
+ * Traces HTTP request for observability using Output.ai tracing
4
+ * Respects OUTPUT_TRACE_HTTP_VERBOSE environment variable for detailed logging
5
5
  */
6
6
  export declare const traceRequest: BeforeRequestHook;
@@ -2,8 +2,8 @@ import { Tracing } from '@output.ai/core/tracing';
2
2
  import { redactHeaders, createTraceId, parseRequestBody } from '#utils/index.js';
3
3
  import { config } from '#config.js';
4
4
  /**
5
- * Traces HTTP request for observability using Output SDK tracing
6
- * Respects LOG_HTTP_VERBOSE environment variable for detailed logging
5
+ * Traces HTTP request for observability using Output.ai tracing
6
+ * Respects OUTPUT_TRACE_HTTP_VERBOSE environment variable for detailed logging
7
7
  */
8
8
  export const traceRequest = async (request, _options) => {
9
9
  const traceId = createTraceId(request);
@@ -1,6 +1,6 @@
1
1
  import type { AfterResponseHook } from 'ky';
2
2
  /**
3
- * Traces HTTP response for observability using Output SDK tracing
4
- * Respects LOG_HTTP_VERBOSE environment variable for detailed logging
3
+ * Traces HTTP response for observability using Output.ai tracing
4
+ * Respects OUTPUT_TRACE_HTTP_VERBOSE environment variable for detailed logging
5
5
  */
6
6
  export declare const traceResponse: AfterResponseHook;
@@ -2,8 +2,8 @@ import { Tracing } from '@output.ai/core/tracing';
2
2
  import { redactHeaders, createTraceId, parseResponseBody } from '#utils/index.js';
3
3
  import { config } from '#config.js';
4
4
  /**
5
- * Traces HTTP response for observability using Output SDK tracing
6
- * Respects LOG_HTTP_VERBOSE environment variable for detailed logging
5
+ * Traces HTTP response for observability using Output.ai tracing
6
+ * Respects OUTPUT_TRACE_HTTP_VERBOSE environment variable for detailed logging
7
7
  */
8
8
  export const traceResponse = async (request, _options, response) => {
9
9
  const traceId = createTraceId(request);
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { Options } from 'ky';
2
2
  /**
3
3
  * Creates a ky client.
4
4
  *
5
- * This client is customized with hooks to integrate with Output SDK tracing.
5
+ * This client is customized with hooks to integrate with Output.ai tracing.
6
6
  *
7
7
  * @example
8
8
  * ```ts
@@ -19,7 +19,7 @@ import type { Options } from 'ky';
19
19
  * ```
20
20
  *
21
21
  * @param options - The ky options to extend the base client.
22
- * @returns A ky instance extended with Output SDK tracing hooks.
22
+ * @returns A ky instance extended with Output.ai tracing hooks.
23
23
  */
24
24
  export declare function httpClient(options?: Options): import("ky").KyInstance;
25
25
  export { HTTPError, TimeoutError } from 'ky';
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@ const applyDefaultOptions = (userOptions) => (parentOptions) => {
26
26
  /**
27
27
  * Creates a ky client.
28
28
  *
29
- * This client is customized with hooks to integrate with Output SDK tracing.
29
+ * This client is customized with hooks to integrate with Output.ai tracing.
30
30
  *
31
31
  * @example
32
32
  * ```ts
@@ -43,7 +43,7 @@ const applyDefaultOptions = (userOptions) => (parentOptions) => {
43
43
  * ```
44
44
  *
45
45
  * @param options - The ky options to extend the base client.
46
- * @returns A ky instance extended with Output SDK tracing hooks.
46
+ * @returns A ky instance extended with Output.ai tracing hooks.
47
47
  */
48
48
  export function httpClient(options = {}) {
49
49
  return baseHttpClient.extend(applyDefaultOptions(options));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@output.ai/http",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Framework abstraction to make HTTP calls with tracing",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",