@theholocron/posthog-client 1.15.0 → 1.16.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/index.d.mts +5 -0
- package/dist/index.mjs +3 -1
- package/package.json +11 -13
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "@theholocron/http-client";
|
|
2
|
+
import { ErrorSink, Logger } from "@theholocron/observability/core";
|
|
2
3
|
//#region src/utils.d.ts
|
|
3
4
|
interface PostHogClientOptions {
|
|
4
5
|
token: string;
|
|
@@ -11,6 +12,10 @@ interface PostHogClientOptions {
|
|
|
11
12
|
baseUrl?: string;
|
|
12
13
|
/** Override fetch for testing. Defaults to globalThis.fetch. */
|
|
13
14
|
fetch?: typeof fetch;
|
|
15
|
+
/** Structured logger for request/response diagnostics. Defaults to a no-op. */
|
|
16
|
+
logger?: Logger;
|
|
17
|
+
/** Reports transport failures and unexpected 5xx. Defaults to a no-op. */
|
|
18
|
+
errors?: ErrorSink;
|
|
14
19
|
}
|
|
15
20
|
//#endregion
|
|
16
21
|
//#region src/users/users.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -25,7 +25,9 @@ function createPostHogRestClient(opts) {
|
|
|
25
25
|
baseUrl: opts.baseUrl ?? opts.host ?? "https://app.posthog.com",
|
|
26
26
|
token: opts.token,
|
|
27
27
|
vendor: "PostHog",
|
|
28
|
-
fetch: opts.fetch
|
|
28
|
+
fetch: opts.fetch,
|
|
29
|
+
logger: opts.logger,
|
|
30
|
+
errors: opts.errors
|
|
29
31
|
});
|
|
30
32
|
}
|
|
31
33
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/posthog-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "A TypeScript client for the PostHog management API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"posthog",
|
|
@@ -28,26 +28,25 @@
|
|
|
28
28
|
"default": "./dist/index.mjs"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
-
"main": "./dist/index.mjs",
|
|
32
31
|
"files": [
|
|
33
|
-
"dist"
|
|
34
|
-
"README.md"
|
|
32
|
+
"dist"
|
|
35
33
|
],
|
|
36
34
|
"dependencies": {
|
|
37
|
-
"@theholocron/
|
|
35
|
+
"@theholocron/observability": "^0.3.0",
|
|
36
|
+
"@theholocron/http-client": "^1.16.0"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
|
-
"@theholocron/eslint-config": "^
|
|
41
|
-
"@theholocron/tsconfig": "^
|
|
42
|
-
"@theholocron/tsdown-config": "^
|
|
43
|
-
"@theholocron/vitest-config": "^
|
|
44
|
-
"@types/node": "^26.
|
|
39
|
+
"@theholocron/eslint-config": "^8.2.0",
|
|
40
|
+
"@theholocron/tsconfig": "^8.2.0",
|
|
41
|
+
"@theholocron/tsdown-config": "^8.2.0",
|
|
42
|
+
"@theholocron/vitest-config": "^8.2.0",
|
|
43
|
+
"@types/node": "^26.4.1",
|
|
45
44
|
"@vitest/coverage-v8": "^4.1.10",
|
|
46
45
|
"@vitest/eslint-plugin": "^1.6.25",
|
|
47
46
|
"eslint": "^10.8.1",
|
|
48
47
|
"eslint-plugin-n": "^18.3.0",
|
|
49
48
|
"eslint-plugin-simple-import-sort": "^14.0.0",
|
|
50
|
-
"globals": "^17.
|
|
49
|
+
"globals": "^17.12.0",
|
|
51
50
|
"tsdown": "^0.22.14",
|
|
52
51
|
"typescript": "^5.9.3",
|
|
53
52
|
"vitest": "^4.1.10"
|
|
@@ -67,6 +66,5 @@
|
|
|
67
66
|
"test:coverage": "vitest run --coverage",
|
|
68
67
|
"test:watch": "vitest",
|
|
69
68
|
"typecheck": "tsc --noEmit"
|
|
70
|
-
}
|
|
71
|
-
"types": "./dist/index.d.mts"
|
|
69
|
+
}
|
|
72
70
|
}
|