@theholocron/holocron-plugin-posthog 5.0.0-alpha.422 → 5.0.0-alpha.424
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/README.md +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +3 -3
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ Token resolution order:
|
|
|
22
22
|
2. `HOLOCRON_POSTHOG_TOKEN` env var
|
|
23
23
|
3. `POSTHOG_PERSONAL_API_KEY` env var
|
|
24
24
|
4. Keyring `posthog.<org>` — tried first when an org is active via `--org`, `HOLOCRON_ORG`, or `org` in `holocron.config.ts`
|
|
25
|
-
5. Keyring `posthog` — unnamespaced fallback; set via `holocron
|
|
25
|
+
5. Keyring `posthog` — unnamespaced fallback; set via `holocron new token posthog <phx_key>`
|
|
26
26
|
|
|
27
27
|
The token must be a **personal API key** (`phx_*`), found at
|
|
28
28
|
**app.posthog.com → Settings → User → Personal API keys**. This is
|
|
@@ -53,6 +53,6 @@ runtime — the personal key is for management only.
|
|
|
53
53
|
| `whoami` | Calls `/api/users/@me/` to verify the token and return the org slug. |
|
|
54
54
|
| `ensureProject` | Lists projects and returns the existing one if found by name; creates it via `POST /api/projects/` otherwise. Returns the project's `api_token` (`phc_*`) and `alreadyExists`. |
|
|
55
55
|
|
|
56
|
-
`holocron
|
|
56
|
+
`holocron setup` calls `ensureProject` and pushes `NEXT_PUBLIC_POSTHOG_KEY`
|
|
57
57
|
(the project `api_token`) and `NEXT_PUBLIC_POSTHOG_HOST` (the resolved
|
|
58
58
|
`host` value) to GitHub Secrets.
|
package/dist/index.d.mts
CHANGED
|
@@ -75,6 +75,6 @@ export declare function createPlugin(options?: PostHogPluginOptions): {
|
|
|
75
75
|
analytics: () => Analytics;
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
|
-
/** One-line hint shown by `holocron
|
|
78
|
+
/** One-line hint shown by `holocron new token posthog` when no token is given or the token is rejected. */
|
|
79
79
|
export declare const AUTH_HINT: string;
|
|
80
80
|
export { AuthError, type PostHogAnalyticsOptions, type PostHogClient, type PostHogClientOptions, type PostHogProject, type PostHogProjectsResponse, type PostHogUser, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createPostHogClient };
|
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ const resolveToken = createResolveToken({
|
|
|
7
7
|
envName: "HOLOCRON_POSTHOG_TOKEN",
|
|
8
8
|
vendorEnvName: "POSTHOG_PERSONAL_API_KEY",
|
|
9
9
|
keyringService: "posthog",
|
|
10
|
-
errorMessage: "no PostHog personal API key found. Pass --token <KEY>, set HOLOCRON_POSTHOG_TOKEN / POSTHOG_PERSONAL_API_KEY, or run: holocron
|
|
10
|
+
errorMessage: "no PostHog personal API key found. Pass --token <KEY>, set HOLOCRON_POSTHOG_TOKEN / POSTHOG_PERSONAL_API_KEY, or run: holocron new token posthog <phx_KEY>"
|
|
11
11
|
});
|
|
12
12
|
/** Every token this plugin takes, for `holocron doctor tokens`. */
|
|
13
13
|
const tokens = [resolveToken.token];
|
|
@@ -111,6 +111,6 @@ function createPlugin(options = {}) {
|
|
|
111
111
|
capabilities: { analytics: () => analytics(ctx) }
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
/** One-line hint shown by `holocron
|
|
115
|
-
const AUTH_HINT = "create a personal API key at https://app.posthog.com/settings/user/api-keys (not the project API key — that is the client-side phc_* tracking token), then run: holocron
|
|
114
|
+
/** One-line hint shown by `holocron new token posthog` when no token is given or the token is rejected. */
|
|
115
|
+
const AUTH_HINT = "create a personal API key at https://app.posthog.com/settings/user/api-keys (not the project API key — that is the client-side phc_* tracking token), then run: holocron new token posthog <phx_KEY>";
|
|
116
116
|
export { AUTH_HINT, AuthError, PostHogAnalytics, analytics, createContext, createPlugin, createPostHogClient, resolveToken, tokens, verifyToken };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-plugin-posthog",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.424",
|
|
4
4
|
"description": "Holocron plugin for PostHog. Implements the analytics capability — project provisioning and tracking token retrieval.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"analytics",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@theholocron/posthog-client": "^1.58.0-alpha.
|
|
33
|
+
"@theholocron/posthog-client": "^1.58.0-alpha.29"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^26",
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
"tsx": "4.23.15",
|
|
45
45
|
"typescript": "^5.9.3",
|
|
46
46
|
"vitest": "^5.1.0",
|
|
47
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
47
|
+
"@theholocron/cli": "5.0.0-alpha.424",
|
|
48
48
|
"@theholocron/env-utils": "^1.17.0-alpha.4",
|
|
49
|
-
"@theholocron/
|
|
49
|
+
"@theholocron/eslint-config": "^8.9.0-alpha.17",
|
|
50
|
+
"@theholocron/http-client": "^1.58.0-alpha.29",
|
|
51
|
+
"@theholocron/tsconfig": "^8.9.0-alpha.17",
|
|
50
52
|
"@theholocron/misc-utils": "^1.17.0-alpha.4",
|
|
51
|
-
"@theholocron/
|
|
52
|
-
"@theholocron/
|
|
53
|
-
"@theholocron/tsconfig": "^8.9.0-alpha.16",
|
|
54
|
-
"@theholocron/vitest-config": "^8.9.0-alpha.16"
|
|
53
|
+
"@theholocron/tsdown-config": "^8.9.0-alpha.17",
|
|
54
|
+
"@theholocron/vitest-config": "^8.9.0-alpha.17"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@theholocron/misc-utils": "^1.16.0",
|
|
58
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
58
|
+
"@theholocron/cli": "5.0.0-alpha.424"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=22"
|