@hogsend/cli 0.18.0 → 0.19.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/bin.js
CHANGED
|
@@ -1954,6 +1954,25 @@ function skillsNudge(ctx) {
|
|
|
1954
1954
|
"Skills out of date"
|
|
1955
1955
|
);
|
|
1956
1956
|
}
|
|
1957
|
+
function analyticsNudge(ctx) {
|
|
1958
|
+
if (ctx.json) return;
|
|
1959
|
+
const dotenv = loadDotEnv(process.cwd());
|
|
1960
|
+
const captureKey = process.env.POSTHOG_API_KEY ?? dotenv.POSTHOG_API_KEY;
|
|
1961
|
+
const personalKey = process.env.POSTHOG_PERSONAL_API_KEY ?? dotenv.POSTHOG_PERSONAL_API_KEY;
|
|
1962
|
+
if (!captureKey || personalKey) return;
|
|
1963
|
+
ctx.out.note(
|
|
1964
|
+
[
|
|
1965
|
+
"POSTHOG_API_KEY is set without POSTHOG_PERSONAL_API_KEY \u2014 person",
|
|
1966
|
+
"property READS are disabled (the phc_ project key is write-only by",
|
|
1967
|
+
"PostHog's design), so per-user timezone resolution falls back to",
|
|
1968
|
+
"contact properties. Capture and person WRITES are unaffected.",
|
|
1969
|
+
"",
|
|
1970
|
+
`Fix: create a personal API key scoped ${color.cyan("person:read")} and set ${color.cyan("POSTHOG_PERSONAL_API_KEY")}.`,
|
|
1971
|
+
`Docs: ${color.cyan("https://hogsend.com/docs/guides/analytics-access")}`
|
|
1972
|
+
].join("\n"),
|
|
1973
|
+
"PostHog person reads disabled"
|
|
1974
|
+
);
|
|
1975
|
+
}
|
|
1957
1976
|
var usage5 = `hogsend doctor [--url <baseUrl>] [--admin-key <key>] [--json]
|
|
1958
1977
|
|
|
1959
1978
|
Probe a running Hogsend instance via GET /v1/health and report its health:
|
|
@@ -2087,6 +2106,7 @@ async function run5(ctx) {
|
|
|
2087
2106
|
];
|
|
2088
2107
|
ctx.out.note(lines.join("\n"), "Doctor");
|
|
2089
2108
|
skillsNudge(ctx);
|
|
2109
|
+
analyticsNudge(ctx);
|
|
2090
2110
|
if (ok) {
|
|
2091
2111
|
ctx.out.outro(color.green("doctor: ok"));
|
|
2092
2112
|
return;
|