autotel-posthog 13.0.0 → 13.0.1

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/index.d.cts CHANGED
@@ -66,7 +66,7 @@ interface PostHogCompatibilityOptions {
66
66
  */
67
67
  debug?: boolean;
68
68
  }
69
- declare function posthogCompatibility(options?: PostHogCompatibilityOptions): SpanProcessor;
69
+ export declare function posthogCompatibility(options?: PostHogCompatibilityOptions): SpanProcessor;
70
70
  //#endregion
71
71
  //#region src/before-send.d.ts
72
72
  /**
@@ -129,7 +129,7 @@ interface AutotelBeforeSendOptions {
129
129
  * Returns `{}` when nothing is being traced, so the spread is always safe.
130
130
  * Properties the caller sets are never overwritten, so this always wins.
131
131
  */
132
- declare function traceProperties(): {
132
+ export declare function traceProperties(): {
133
133
  $trace_id?: string;
134
134
  $span_id?: string;
135
135
  };
@@ -137,7 +137,7 @@ declare function traceProperties(): {
137
137
  * A PostHog `before_send` hook that adds `$trace_id` and `$span_id` from the
138
138
  * span in progress.
139
139
  */
140
- declare function autotelBeforeSend(options?: AutotelBeforeSendOptions): BeforeSendLike;
140
+ export declare function autotelBeforeSend(options?: AutotelBeforeSendOptions): BeforeSendLike;
141
141
  //#endregion
142
142
  //#region src/join.d.ts
143
143
  /**
@@ -159,9 +159,9 @@ interface JoinPostHogOptions extends Omit<PostHogCompatibilityOptions, 'posthog'
159
159
  */
160
160
  propagateSession?: boolean;
161
161
  }
162
- declare function joinPostHog(posthog: PostHogLike | (() => PostHogLike | undefined), options?: JoinPostHogOptions): SpanProcessor;
162
+ export declare function joinPostHog(posthog: PostHogLike | (() => PostHogLike | undefined), options?: JoinPostHogOptions): SpanProcessor;
163
163
  //#endregion
164
164
  //#region src/session-id.d.ts
165
- declare function posthogSessionId(posthog?: PostHogLike): string | undefined;
165
+ export declare function posthogSessionId(posthog?: PostHogLike): string | undefined;
166
166
  //#endregion
167
- export { type AutotelBeforeSendOptions, type BeforeSendLike, type CaptureResultLike, type JoinPostHogOptions, type PostHogCompatibilityOptions, type PostHogLike, autotelBeforeSend, joinPostHog, posthogCompatibility, posthogSessionId, traceProperties };
167
+ export type { AutotelBeforeSendOptions, BeforeSendLike, CaptureResultLike, JoinPostHogOptions, PostHogCompatibilityOptions, PostHogLike };
package/dist/index.d.ts CHANGED
@@ -66,7 +66,7 @@ interface PostHogCompatibilityOptions {
66
66
  */
67
67
  debug?: boolean;
68
68
  }
69
- declare function posthogCompatibility(options?: PostHogCompatibilityOptions): SpanProcessor;
69
+ export declare function posthogCompatibility(options?: PostHogCompatibilityOptions): SpanProcessor;
70
70
  //#endregion
71
71
  //#region src/before-send.d.ts
72
72
  /**
@@ -129,7 +129,7 @@ interface AutotelBeforeSendOptions {
129
129
  * Returns `{}` when nothing is being traced, so the spread is always safe.
130
130
  * Properties the caller sets are never overwritten, so this always wins.
131
131
  */
132
- declare function traceProperties(): {
132
+ export declare function traceProperties(): {
133
133
  $trace_id?: string;
134
134
  $span_id?: string;
135
135
  };
@@ -137,7 +137,7 @@ declare function traceProperties(): {
137
137
  * A PostHog `before_send` hook that adds `$trace_id` and `$span_id` from the
138
138
  * span in progress.
139
139
  */
140
- declare function autotelBeforeSend(options?: AutotelBeforeSendOptions): BeforeSendLike;
140
+ export declare function autotelBeforeSend(options?: AutotelBeforeSendOptions): BeforeSendLike;
141
141
  //#endregion
142
142
  //#region src/join.d.ts
143
143
  /**
@@ -159,9 +159,9 @@ interface JoinPostHogOptions extends Omit<PostHogCompatibilityOptions, 'posthog'
159
159
  */
160
160
  propagateSession?: boolean;
161
161
  }
162
- declare function joinPostHog(posthog: PostHogLike | (() => PostHogLike | undefined), options?: JoinPostHogOptions): SpanProcessor;
162
+ export declare function joinPostHog(posthog: PostHogLike | (() => PostHogLike | undefined), options?: JoinPostHogOptions): SpanProcessor;
163
163
  //#endregion
164
164
  //#region src/session-id.d.ts
165
- declare function posthogSessionId(posthog?: PostHogLike): string | undefined;
165
+ export declare function posthogSessionId(posthog?: PostHogLike): string | undefined;
166
166
  //#endregion
167
- export { type AutotelBeforeSendOptions, type BeforeSendLike, type CaptureResultLike, type JoinPostHogOptions, type PostHogCompatibilityOptions, type PostHogLike, autotelBeforeSend, joinPostHog, posthogCompatibility, posthogSessionId, traceProperties };
167
+ export type { AutotelBeforeSendOptions, BeforeSendLike, CaptureResultLike, JoinPostHogOptions, PostHogCompatibilityOptions, PostHogLike };
@@ -24,7 +24,7 @@ interface UnknownRecord {
24
24
  *
25
25
  * Provides detailed context about the event that caused an error.
26
26
  */
27
- interface ErrorContext {
27
+ export interface ErrorContext {
28
28
  /** The error that occurred */
29
29
  error: Error;
30
30
  /** Event name (if applicable) */
@@ -37,7 +37,7 @@ interface ErrorContext {
37
37
  subscriberName: string;
38
38
  }
39
39
  type StringRedactor = (value: string) => string;
40
- interface PostHogConfig {
40
+ export interface PostHogConfig {
41
41
  /** PostHog API key (starts with phc_) - required if not providing custom client */
42
42
  apiKey?: string;
43
43
  /** PostHog host (defaults to US cloud) */
@@ -138,7 +138,7 @@ interface PostHogConfig {
138
138
  /**
139
139
  * PostHog feature flag options
140
140
  */
141
- interface FeatureFlagOptions {
141
+ export interface FeatureFlagOptions {
142
142
  /** Group context for group-based feature flags */
143
143
  groups?: Record<string, string | number>;
144
144
  /** Group properties for feature flag evaluation */
@@ -153,7 +153,7 @@ interface FeatureFlagOptions {
153
153
  /**
154
154
  * Person properties for identify calls
155
155
  */
156
- interface PersonProperties {
156
+ export interface PersonProperties {
157
157
  /** Set properties (will update existing values) */
158
158
  $set?: Record<string, unknown>;
159
159
  /** Set properties only if they don't exist */
@@ -161,7 +161,7 @@ interface PersonProperties {
161
161
  /** Any custom properties */
162
162
  [key: string]: unknown;
163
163
  }
164
- declare class PostHogSubscriber extends EventSubscriber {
164
+ export declare class PostHogSubscriber extends EventSubscriber {
165
165
  readonly name = "PostHogSubscriber";
166
166
  readonly version = "2.0.0";
167
167
  private posthog;
@@ -365,5 +365,4 @@ declare class PostHogSubscriber extends EventSubscriber {
365
365
  */
366
366
  protected handleError(error: Error, payload: EventPayload): void;
367
367
  }
368
- //#endregion
369
- export { ErrorContext, FeatureFlagOptions, PersonProperties, PostHogConfig, PostHogSubscriber };
368
+ //#endregion
@@ -24,7 +24,7 @@ interface UnknownRecord {
24
24
  *
25
25
  * Provides detailed context about the event that caused an error.
26
26
  */
27
- interface ErrorContext {
27
+ export interface ErrorContext {
28
28
  /** The error that occurred */
29
29
  error: Error;
30
30
  /** Event name (if applicable) */
@@ -37,7 +37,7 @@ interface ErrorContext {
37
37
  subscriberName: string;
38
38
  }
39
39
  type StringRedactor = (value: string) => string;
40
- interface PostHogConfig {
40
+ export interface PostHogConfig {
41
41
  /** PostHog API key (starts with phc_) - required if not providing custom client */
42
42
  apiKey?: string;
43
43
  /** PostHog host (defaults to US cloud) */
@@ -138,7 +138,7 @@ interface PostHogConfig {
138
138
  /**
139
139
  * PostHog feature flag options
140
140
  */
141
- interface FeatureFlagOptions {
141
+ export interface FeatureFlagOptions {
142
142
  /** Group context for group-based feature flags */
143
143
  groups?: Record<string, string | number>;
144
144
  /** Group properties for feature flag evaluation */
@@ -153,7 +153,7 @@ interface FeatureFlagOptions {
153
153
  /**
154
154
  * Person properties for identify calls
155
155
  */
156
- interface PersonProperties {
156
+ export interface PersonProperties {
157
157
  /** Set properties (will update existing values) */
158
158
  $set?: Record<string, unknown>;
159
159
  /** Set properties only if they don't exist */
@@ -161,7 +161,7 @@ interface PersonProperties {
161
161
  /** Any custom properties */
162
162
  [key: string]: unknown;
163
163
  }
164
- declare class PostHogSubscriber extends EventSubscriber {
164
+ export declare class PostHogSubscriber extends EventSubscriber {
165
165
  readonly name = "PostHogSubscriber";
166
166
  readonly version = "2.0.0";
167
167
  private posthog;
@@ -365,5 +365,4 @@ declare class PostHogSubscriber extends EventSubscriber {
365
365
  */
366
366
  protected handleError(error: Error, payload: EventPayload): void;
367
367
  }
368
- //#endregion
369
- export { ErrorContext, FeatureFlagOptions, PersonProperties, PostHogConfig, PostHogSubscriber };
368
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autotel-posthog",
3
- "version": "13.0.0",
3
+ "version": "13.0.1",
4
4
  "description": "Everything PostHog for autotel: browser session/replay join, server-side event subscriber, and trace links in both directions",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -30,9 +30,9 @@
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@opentelemetry/sdk-trace-base": ">=2.0.0",
33
- "autotel": "7.9.0",
34
- "autotel-subscribers": "59.0.0",
35
- "autotel-web": "2.2.0",
33
+ "autotel": "7.10.0",
34
+ "autotel-subscribers": "59.0.1",
35
+ "autotel-web": "2.2.1",
36
36
  "posthog-js": ">=1.200.0",
37
37
  "posthog-node": ">=4.0.0"
38
38
  },
@@ -40,17 +40,17 @@
40
40
  "@opentelemetry/context-async-hooks": "^2.11.0",
41
41
  "@opentelemetry/sdk-trace-base": "^2.11.0",
42
42
  "@opentelemetry/sdk-trace-web": "2.11.0",
43
- "@types/node": "^26.1.2",
44
- "autotel": "7.9.0",
45
- "autotel-subscribers": "59.0.0",
46
- "autotel-web": "2.2.0",
47
- "jsdom": "29.1.1",
48
- "posthog-js": "1.417.1",
49
- "posthog-node": "^4.18.0",
43
+ "@types/node": "^26.6.3",
44
+ "autotel": "7.10.0",
45
+ "autotel-subscribers": "59.0.1",
46
+ "autotel-web": "2.2.1",
47
+ "jsdom": "30.1.1",
48
+ "posthog-js": "1.434.17",
49
+ "posthog-node": "^5.54.1",
50
50
  "rimraf": "^6.1.3",
51
- "tsdown": "^0.22.14",
52
- "typescript": "^6.0.3",
53
- "vitest": "^4.1.10"
51
+ "tsdown": "^0.23.0",
52
+ "typescript": "^7.0.2",
53
+ "vitest": "^5.0.2"
54
54
  },
55
55
  "keywords": [
56
56
  "opentelemetry",
@@ -89,7 +89,7 @@
89
89
  "build": "tsdown",
90
90
  "dev": "tsdown --watch",
91
91
  "type-check": "tsc --noEmit",
92
- "lint": "eslint src",
92
+ "lint": "oxlint -c oxlint.json --disable-nested-config src",
93
93
  "test": "vitest run",
94
94
  "clean": "rimraf dist"
95
95
  }