@theholocron/holocron-plugin-posthog 5.0.0-alpha.231 → 5.0.0-alpha.233

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 CHANGED
@@ -1,5 +1,5 @@
1
- import { PostHogClient, PostHogClient as PostHogClient$1, PostHogClientOptions, PostHogProject, PostHogProjectsResponse, PostHogUser, createPostHogClient } from "@theholocron/posthog-client";
2
1
  import { Analytics, AuthError, ResolveTokenInput, VerifyTokenFailure, VerifyTokenResult, VerifyTokenResult as VerifyTokenResult$1, VerifyTokenSuccess } from "@theholocron/cli";
2
+ import { PostHogClient, PostHogClient as PostHogClient$1, PostHogClientOptions, PostHogProject, PostHogProjectsResponse, PostHogUser, createPostHogClient } from "@theholocron/posthog-client";
3
3
  //#region src/auth.d.ts
4
4
  declare const resolveToken: (input?: ResolveTokenInput) => string;
5
5
  //#endregion
@@ -57,6 +57,9 @@ declare function createContext(options?: PostHogPluginOptions): PluginContext;
57
57
  declare function analytics(ctx: PluginContext): Analytics;
58
58
  declare function createPlugin(options?: PostHogPluginOptions): {
59
59
  name: string;
60
+ probes: {
61
+ connection: import("@theholocron/cli").Probe;
62
+ };
60
63
  capabilities: {
61
64
  analytics: () => Analytics;
62
65
  };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
+ import { AuthError, connectionProbe, createResolveToken } from "@theholocron/cli";
1
2
  import { createPostHogClient, createPostHogClient as createPostHogClient$1 } from "@theholocron/posthog-client";
2
- import { AuthError, createResolveToken } from "@theholocron/cli";
3
3
  import { errorMessage } from "@theholocron/misc-utils";
4
4
  //#region src/auth.ts
5
5
  const resolveToken = createResolveToken({
@@ -88,6 +88,17 @@ function createPlugin(options = {}) {
88
88
  const ctx = createContext(options);
89
89
  return {
90
90
  name: "@theholocron/holocron-plugin-posthog",
91
+ probes: { connection: connectionProbe({
92
+ provider: "PostHog",
93
+ url: options.baseUrl ?? options.host ?? "https://app.posthog.com",
94
+ fetch: options.fetch,
95
+ token: () => resolveToken(options),
96
+ verify: (token) => verifyToken(token, {
97
+ host: options.host,
98
+ baseUrl: options.baseUrl,
99
+ fetch: options.fetch
100
+ })
101
+ }) },
91
102
  capabilities: { analytics: () => analytics(ctx) }
92
103
  };
93
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-posthog",
3
- "version": "5.0.0-alpha.231",
3
+ "version": "5.0.0-alpha.233",
4
4
  "description": "Holocron plugin for PostHog. Implements the analytics capability — project provisioning and tracking token retrieval.",
5
5
  "keywords": [
6
6
  "analytics",
@@ -50,11 +50,11 @@
50
50
  "tsx": "4.23.15",
51
51
  "typescript": "^5.9.3",
52
52
  "vitest": "^4.1.11",
53
- "@theholocron/cli": "5.0.0-alpha.231"
53
+ "@theholocron/cli": "5.0.0-alpha.233"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@theholocron/misc-utils": "^1.16.0",
57
- "@theholocron/cli": "5.0.0-alpha.231"
57
+ "@theholocron/cli": "5.0.0-alpha.233"
58
58
  },
59
59
  "engines": {
60
60
  "node": ">=22"