@posthog/wizard 2.18.0 → 2.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.
Files changed (63) hide show
  1. package/dist/{add-mcp-server-to-clients-DnPwZl1P.js → add-mcp-server-to-clients-CjnvTVj0.js} +72 -13
  2. package/dist/add-mcp-server-to-clients-CjnvTVj0.js.map +1 -0
  3. package/dist/{agent-interface-C2VEF-BD.js → agent-interface-CQU6x4Hj.js} +8 -6
  4. package/dist/agent-interface-CQU6x4Hj.js.map +1 -0
  5. package/dist/{agent-runner-Dw8cjZoN.js → agent-runner-Cj7saDkL.js} +14 -10
  6. package/dist/{agent-runner-Dw8cjZoN.js.map → agent-runner-Cj7saDkL.js.map} +1 -1
  7. package/dist/{analytics-C-zcTO6g.js → analytics-Df-Xb81i.js} +2 -2
  8. package/dist/{analytics-C-zcTO6g.js.map → analytics-Df-Xb81i.js.map} +1 -1
  9. package/dist/{api-B3MWP3vm.js → api-Dw6_orDE.js} +3 -3
  10. package/dist/{api-B3MWP3vm.js.map → api-Dw6_orDE.js.map} +1 -1
  11. package/dist/bin.js +33 -31
  12. package/dist/bin.js.map +1 -1
  13. package/dist/{ci-install-DLuSmSq6.js → ci-install-BKAvFfK6.js} +4 -4
  14. package/dist/{ci-install-DLuSmSq6.js.map → ci-install-BKAvFfK6.js.map} +1 -1
  15. package/dist/{debug--gQGudnY.js → debug-Cp_wNn8i.js} +1 -1
  16. package/dist/{debug-BorYMfpE.js → debug-DnMO6O8O.js} +36 -21
  17. package/dist/debug-DnMO6O8O.js.map +1 -0
  18. package/dist/{defaults-DA3-9dHT.js → defaults-BNWIWzjc.js} +34 -8
  19. package/dist/defaults-BNWIWzjc.js.map +1 -0
  20. package/dist/{environment-DIOtLqTQ.js → environment-Ls0H9ljT.js} +3 -3
  21. package/dist/{environment-DIOtLqTQ.js.map → environment-Ls0H9ljT.js.map} +1 -1
  22. package/dist/{interactive-DjGjlvY3.js → interactive-D15byhpc.js} +2 -2
  23. package/dist/{interactive-DjGjlvY3.js.map → interactive-D15byhpc.js.map} +1 -1
  24. package/dist/{mcp-prompt-streaming-Dm47tmiy.js → mcp-prompt-streaming-DQOTQfW1.js} +4 -4
  25. package/dist/{mcp-prompt-streaming-Dm47tmiy.js.map → mcp-prompt-streaming-DQOTQfW1.js.map} +1 -1
  26. package/dist/{non-interactive-C2f3Gwva.js → non-interactive-DcFLJtl_.js} +2 -2
  27. package/dist/{non-interactive-C2f3Gwva.js.map → non-interactive-DcFLJtl_.js.map} +1 -1
  28. package/dist/{package-manager-Bl2KOUFK.js → package-manager-DUPgLGpQ.js} +2 -2
  29. package/dist/{package-manager-Bl2KOUFK.js.map → package-manager-DUPgLGpQ.js.map} +1 -1
  30. package/dist/{playground-ZLG68cvx.js → playground-BZ0hGjbL.js} +12 -4
  31. package/dist/playground-BZ0hGjbL.js.map +1 -0
  32. package/dist/{posthog-integration-B_DLodqr.js → posthog-integration-C8qhJnI3.js} +13 -11
  33. package/dist/posthog-integration-C8qhJnI3.js.map +1 -0
  34. package/dist/{provisioning-Bk4E6VYn.js → provisioning-C-2ExcqY.js} +3 -3
  35. package/dist/{provisioning-Bk4E6VYn.js.map → provisioning-C-2ExcqY.js.map} +1 -1
  36. package/dist/{registry-DMM3UmZD.js → registry-hBUgaWFx.js} +4 -4
  37. package/dist/{registry-DMM3UmZD.js.map → registry-hBUgaWFx.js.map} +1 -1
  38. package/dist/{setup-utils-Df9ezAjZ.js → setup-utils-DetnhXo0.js} +33 -19
  39. package/dist/setup-utils-DetnhXo0.js.map +1 -0
  40. package/dist/{slides-DwvXZ8iS.js → slides-mT2s9wM_.js} +163 -70
  41. package/dist/slides-mT2s9wM_.js.map +1 -0
  42. package/dist/{start-tui-P9aMwBzt.js → start-tui-BfXoErKg.js} +15 -14
  43. package/dist/start-tui-BfXoErKg.js.map +1 -0
  44. package/dist/{steps-RCRZbLjZ.js → steps-SoDXSUxe.js} +6 -6
  45. package/dist/{steps-RCRZbLjZ.js.map → steps-SoDXSUxe.js.map} +1 -1
  46. package/dist/{telemetry-CMbVbpaY.js → telemetry-CPcMFxcO.js} +2 -2
  47. package/dist/{telemetry-CMbVbpaY.js.map → telemetry-CPcMFxcO.js.map} +1 -1
  48. package/dist/{urls-BzG_Jtw9.js → urls-BO7doNJG.js} +2 -2
  49. package/dist/{urls-BzG_Jtw9.js.map → urls-BO7doNJG.js.map} +1 -1
  50. package/dist/{wizard-abort-QuKm_B5z.js → wizard-abort-CDXufkqJ.js} +5 -3
  51. package/dist/wizard-abort-CDXufkqJ.js.map +1 -0
  52. package/dist/{wizard-abort-Dl8WJQgJ.js → wizard-abort-CtMY57ZE.js} +1 -1
  53. package/package.json +1 -1
  54. package/dist/add-mcp-server-to-clients-DnPwZl1P.js.map +0 -1
  55. package/dist/agent-interface-C2VEF-BD.js.map +0 -1
  56. package/dist/debug-BorYMfpE.js.map +0 -1
  57. package/dist/defaults-DA3-9dHT.js.map +0 -1
  58. package/dist/playground-ZLG68cvx.js.map +0 -1
  59. package/dist/posthog-integration-B_DLodqr.js.map +0 -1
  60. package/dist/setup-utils-Df9ezAjZ.js.map +0 -1
  61. package/dist/slides-DwvXZ8iS.js.map +0 -1
  62. package/dist/start-tui-P9aMwBzt.js.map +0 -1
  63. package/dist/wizard-abort-QuKm_B5z.js.map +0 -1
package/dist/bin.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { J as VERSION, M as POSTHOG_DOCS_URL, W as WIZARD_USER_AGENT, X as runtimeEnv, _ as SIGNUP_WIZARD_READINESS_CONFIG, h as LoggingUI, m as setUI, p as getUI, s as logToFile, v as evaluateWizardReadiness, y as getBlockingServiceKeys } from "./debug-BorYMfpE.js";
3
- import { t as analytics } from "./analytics-C-zcTO6g.js";
4
- import { n as isUsingTypeScript } from "./setup-utils-Df9ezAjZ.js";
5
- import { a as getUiHostFromHost, n as getCloudUrlFromRegion } from "./urls-BzG_Jtw9.js";
6
- import { a as handleApiError } from "./api-B3MWP3vm.js";
2
+ import { J as VERSION, M as POSTHOG_DOCS_URL, W as WIZARD_USER_AGENT, _ as SIGNUP_WIZARD_READINESS_CONFIG, a as getLogFilePath, h as LoggingUI, m as setUI, p as getUI, s as logToFile, v as evaluateWizardReadiness, y as getBlockingServiceKeys } from "./debug-DnMO6O8O.js";
3
+ import { t as analytics } from "./analytics-Df-Xb81i.js";
4
+ import { n as isUsingTypeScript } from "./setup-utils-DetnhXo0.js";
5
+ import { a as getUiHostFromHost, n as getCloudUrlFromRegion } from "./urls-BO7doNJG.js";
6
+ import { a as handleApiError } from "./api-Dw6_orDE.js";
7
7
  import "./wizard-session-d27JGRGi.js";
8
- import { n as isNonInteractiveEnvironment } from "./environment-DIOtLqTQ.js";
9
- import { _ as AUDIT_REPORT_FILE, c as AgentSignals, d as WIZARD_TOOL_NAMES, g as AUDIT_CHECKS_KEY, h as AUDIT_CHECKS_FILE } from "./agent-interface-C2VEF-BD.js";
10
- import { i as SPINNER_MESSAGE } from "./registry-DMM3UmZD.js";
11
- import { a as PRODUCT_SUITE_BLOCK, f as Colors, i as LINE_CHART_BLOCK, l as isClearBlock, m as HEALTH_CHECK_STEP, n as posthogIntegrationConfig, o as StatusPeekTrigger, r as FUNNEL_BLOCK } from "./posthog-integration-B_DLodqr.js";
8
+ import { n as isNonInteractiveEnvironment } from "./environment-Ls0H9ljT.js";
9
+ import { _ as AUDIT_REPORT_FILE, c as AgentSignals, d as WIZARD_TOOL_NAMES, g as AUDIT_CHECKS_KEY, h as AUDIT_CHECKS_FILE } from "./agent-interface-CQU6x4Hj.js";
10
+ import { i as SPINNER_MESSAGE } from "./registry-hBUgaWFx.js";
11
+ import { a as PRODUCT_SUITE_BLOCK, f as Colors, i as LINE_CHART_BLOCK, l as isClearBlock, m as HEALTH_CHECK_STEP, n as posthogIntegrationConfig, o as StatusPeekTrigger, r as FUNNEL_BLOCK } from "./posthog-integration-C8qhJnI3.js";
12
12
  import { t as IGNORED_DIRS } from "./file-utils-VAXoyXVA.js";
13
13
  import { n as readApiKeyFromEnv } from "./env-api-key-MlzJYAvt.js";
14
14
  import { satisfies } from "semver";
@@ -160,7 +160,7 @@ function runProvision(argv) {
160
160
  }
161
161
  async function provision({ email, region, name, jsonMode }) {
162
162
  try {
163
- const { provisionNewAccount } = await import("./provisioning-Bk4E6VYn.js").then((n) => n.n);
163
+ const { provisionNewAccount } = await import("./provisioning-C-2ExcqY.js").then((n) => n.n);
164
164
  if (!jsonMode) getUI().log.info(`Provisioning account for ${email} in ${region}...`);
165
165
  emitResult(await provisionNewAccount(email, name, region), jsonMode);
166
166
  process.exit(0);
@@ -234,18 +234,18 @@ const basicIntegrationCommand = {
234
234
  handler: (argv) => {
235
235
  (async () => {
236
236
  if (argv.ci) {
237
- const { runCIInstall } = await import("./ci-install-DLuSmSq6.js");
237
+ const { runCIInstall } = await import("./ci-install-BKAvFfK6.js");
238
238
  return runCIInstall(argv);
239
239
  }
240
240
  if (isNonInteractiveEnvironment()) {
241
- const { failNonInteractive } = await import("./non-interactive-C2f3Gwva.js");
241
+ const { failNonInteractive } = await import("./non-interactive-DcFLJtl_.js");
242
242
  return failNonInteractive();
243
243
  }
244
244
  if (argv.playground) {
245
- const { runPlayground } = await import("./playground-ZLG68cvx.js");
245
+ const { runPlayground } = await import("./playground-BZ0hGjbL.js");
246
246
  return runPlayground();
247
247
  }
248
- const { runInteractive } = await import("./interactive-DjGjlvY3.js");
248
+ const { runInteractive } = await import("./interactive-D15byhpc.js");
249
249
  runInteractive(argv);
250
250
  })();
251
251
  }
@@ -2777,7 +2777,7 @@ function runMcpAdd(argv) {
2777
2777
  const debug = argv.debug;
2778
2778
  const localMcp = argv.local;
2779
2779
  try {
2780
- const { startTUI } = await import("./start-tui-P9aMwBzt.js");
2780
+ const { startTUI } = await import("./start-tui-BfXoErKg.js");
2781
2781
  const { buildSession } = await import("./wizard-session-y304gEEI.js");
2782
2782
  const tui = startTUI(VERSION, Program.McpAdd);
2783
2783
  tui.store.session = buildSession({
@@ -2789,7 +2789,7 @@ function runMcpAdd(argv) {
2789
2789
  } catch (error) {
2790
2790
  if (!isTUIUnavailable(error)) throw error;
2791
2791
  setUI(new LoggingUI());
2792
- const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-DnPwZl1P.js").then((n) => n.r);
2792
+ const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-CjnvTVj0.js").then((n) => n.r);
2793
2793
  await addMCPServerToClientsStep({
2794
2794
  local: localMcp,
2795
2795
  features,
@@ -2828,7 +2828,7 @@ function runMcpRemove(argv) {
2828
2828
  const debug = argv.debug;
2829
2829
  const localMcp = argv.local;
2830
2830
  try {
2831
- const { startTUI } = await import("./start-tui-P9aMwBzt.js");
2831
+ const { startTUI } = await import("./start-tui-BfXoErKg.js");
2832
2832
  const { buildSession } = await import("./wizard-session-y304gEEI.js");
2833
2833
  const tui = startTUI(VERSION, Program.McpRemove);
2834
2834
  tui.store.session = buildSession({
@@ -2837,7 +2837,7 @@ function runMcpRemove(argv) {
2837
2837
  });
2838
2838
  } catch {
2839
2839
  setUI(new LoggingUI());
2840
- const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-DnPwZl1P.js").then((n) => n.r);
2840
+ const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-CjnvTVj0.js").then((n) => n.r);
2841
2841
  await removeMCPServerFromClientsStep({ local: localMcp });
2842
2842
  }
2843
2843
  })();
@@ -2859,7 +2859,7 @@ function runMcpTutorial(argv) {
2859
2859
  const debug = argv.debug;
2860
2860
  const localMcp = argv.local;
2861
2861
  try {
2862
- const { startTUI } = await import("./start-tui-P9aMwBzt.js");
2862
+ const { startTUI } = await import("./start-tui-BfXoErKg.js");
2863
2863
  const { buildSession } = await import("./wizard-session-y304gEEI.js");
2864
2864
  const tui = startTUI(VERSION, Program.McpTutorial);
2865
2865
  tui.store.session = buildSession({
@@ -2914,11 +2914,10 @@ function runWizard(config, options) {
2914
2914
  (async () => {
2915
2915
  try {
2916
2916
  const installDir = options.installDir || process.cwd();
2917
- const { startTUI } = await import("./start-tui-P9aMwBzt.js");
2917
+ const { startTUI } = await import("./start-tui-BfXoErKg.js");
2918
2918
  const { buildSession, RunPhase } = await import("./wizard-session-y304gEEI.js");
2919
2919
  const { TaskStreamPush } = await import("./task-stream-CZRj6auI.js");
2920
2920
  const { PostHogDestination } = await import("./posthog-Cr37rnla.js");
2921
- const { logToFile } = await import("./debug--gQGudnY.js");
2922
2921
  tui = startTUI(WIZARD_VERSION, config.id);
2923
2922
  const activeTui = tui;
2924
2923
  const session = buildSession({
@@ -2954,8 +2953,9 @@ function runWizard(config, options) {
2954
2953
  onSignal = () => {
2955
2954
  if (signalled || exitInProgress) return;
2956
2955
  signalled = true;
2956
+ logToFile("[run-wizard] signal received, flushing task stream");
2957
2957
  if (activeTui.store.session.runPhase === RunPhase.Running) activeTui.store.setRunPhase(RunPhase.Error);
2958
- activeStream.shutdown(2e3).finally(() => {
2958
+ activeStream.shutdown(2e3).catch((e) => logToFile("[run-wizard] task stream shutdown error on signal:", e)).finally(() => {
2959
2959
  try {
2960
2960
  activeTui.unmount();
2961
2961
  } catch {}
@@ -2969,7 +2969,7 @@ function runWizard(config, options) {
2969
2969
  await activeTui.store.getGate("health-check");
2970
2970
  const skipAgent = config.run == null;
2971
2971
  if (skipAgent) {
2972
- const { getOrAskForProjectData } = await import("./setup-utils-Df9ezAjZ.js").then((n) => n.r);
2972
+ const { getOrAskForProjectData } = await import("./setup-utils-DetnhXo0.js").then((n) => n.r);
2973
2973
  const { projectApiKey, host, accessToken, projectId } = await getOrAskForProjectData({
2974
2974
  signup: session.signup,
2975
2975
  ci: session.ci,
@@ -2984,7 +2984,7 @@ function runWizard(config, options) {
2984
2984
  projectId
2985
2985
  });
2986
2986
  } else {
2987
- const { runAgent } = await import("./agent-runner-Dw8cjZoN.js");
2987
+ const { runAgent } = await import("./agent-runner-Cj7saDkL.js");
2988
2988
  await runAgent(config, activeTui.store.session);
2989
2989
  }
2990
2990
  const isDone = () => skipAgent ? activeTui.store.session.outroDismissed : activeTui.store.session.skillsComplete;
@@ -3007,7 +3007,7 @@ function runWizard(config, options) {
3007
3007
  activeTui.unmount();
3008
3008
  process.exit(0);
3009
3009
  } catch (err) {
3010
- if (runtimeEnv("DEBUG") || runtimeEnv("POSTHOG_WIZARD_DEBUG")) console.error("TUI init failed:", err);
3010
+ logToFile("[run-wizard] FATAL:", err);
3011
3011
  exitInProgress = true;
3012
3012
  if (onSignal) {
3013
3013
  process.off("SIGINT", onSignal);
@@ -3019,6 +3019,8 @@ function runWizard(config, options) {
3019
3019
  if (tui) try {
3020
3020
  tui.unmount();
3021
3021
  } catch {}
3022
+ console.error("Wizard run failed:", err);
3023
+ console.error(`Full logs: ${getLogFilePath()}`);
3022
3024
  process.exit(1);
3023
3025
  }
3024
3026
  })();
@@ -3057,10 +3059,10 @@ function runWizardCI(config, options) {
3057
3059
  (async () => {
3058
3060
  const path = await import("path");
3059
3061
  const { buildSession } = await import("./wizard-session-y304gEEI.js");
3060
- const { readEnvironment } = await import("./environment-DIOtLqTQ.js").then((n) => n.t);
3062
+ const { readEnvironment } = await import("./environment-Ls0H9ljT.js").then((n) => n.t);
3061
3063
  const { readApiKeyFromEnv } = await import("./env-api-key-MlzJYAvt.js").then((n) => n.t);
3062
- const { configureLogFileFromEnvironment, logToFile } = await import("./debug--gQGudnY.js");
3063
- const { wizardAbort, WizardError } = await import("./wizard-abort-Dl8WJQgJ.js");
3064
+ const { configureLogFileFromEnvironment, logToFile } = await import("./debug-Cp_wNn8i.js");
3065
+ const { wizardAbort, WizardError } = await import("./wizard-abort-CtMY57ZE.js");
3064
3066
  configureLogFileFromEnvironment();
3065
3067
  const env = readEnvironment();
3066
3068
  const apiKey = options.apiKey ?? readApiKeyFromEnv() ?? void 0;
@@ -3108,7 +3110,7 @@ function runWizardCI(config, options) {
3108
3110
  })
3109
3111
  });
3110
3112
  }
3111
- const { runAgent } = await import("./agent-runner-Dw8cjZoN.js");
3113
+ const { runAgent } = await import("./agent-runner-Cj7saDkL.js");
3112
3114
  await runAgent(config, session);
3113
3115
  } catch (error) {
3114
3116
  const errorMessage = error instanceof Error ? error.message : String(error);
@@ -3262,7 +3264,7 @@ async function runDoctorCI(options) {
3262
3264
  getUI().intro("Welcome to the PostHog setup wizard");
3263
3265
  getUI().log.info("Running posthog-doctor in CI mode");
3264
3266
  try {
3265
- const { getOrAskForProjectData } = await import("./setup-utils-Df9ezAjZ.js").then((n) => n.r);
3267
+ const { getOrAskForProjectData } = await import("./setup-utils-DetnhXo0.js").then((n) => n.r);
3266
3268
  const { host, accessToken, projectId } = await getOrAskForProjectData({
3267
3269
  signup: false,
3268
3270
  ci: true,
@@ -3279,7 +3281,7 @@ async function runDoctorCI(options) {
3279
3281
  for (const issue of sorted) getUI().log.info(` • [${issue.severity}] ${getKindMeta(issue.kind).title}`);
3280
3282
  process.exit(1);
3281
3283
  } catch (error) {
3282
- const { ApiError } = await import("./api-B3MWP3vm.js").then((n) => n.n);
3284
+ const { ApiError } = await import("./api-Dw6_orDE.js").then((n) => n.n);
3283
3285
  const message = error instanceof ApiError && error.statusCode === 401 ? "Your PostHog API key is invalid or expired." : error instanceof Error ? error.message : String(error);
3284
3286
  getUI().log.error(`Doctor failed: ${message}`);
3285
3287
  process.exit(1);