@posthog/wizard 2.50.0 → 2.52.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/{add-mcp-server-to-clients-Bd8XRxzi.js → add-mcp-server-to-clients-DJyWMMGj.js} +5 -5
- package/dist/{add-mcp-server-to-clients-Bd8XRxzi.js.map → add-mcp-server-to-clients-DJyWMMGj.js.map} +1 -1
- package/dist/{agent-interface-C_aRBziP.js → agent-interface-DoFVHRFh.js} +30 -69
- package/dist/agent-interface-DoFVHRFh.js.map +1 -0
- package/dist/agent-prompt-loader-D-cPVoL5.js +275 -0
- package/dist/agent-prompt-loader-D-cPVoL5.js.map +1 -0
- package/dist/{agent-runner-NzzrOB02.js → agent-runner-B1qCtjid.js} +100 -318
- package/dist/agent-runner-B1qCtjid.js.map +1 -0
- package/dist/{analytics-CArgq7XO.js → analytics-BXz4SIuS.js} +33 -20
- package/dist/analytics-BXz4SIuS.js.map +1 -0
- package/dist/analytics-D2xds3nw.js +2 -0
- package/dist/{api-CX1g-14-.js → api-BaacjH-Y.js} +3 -3
- package/dist/{api-CX1g-14-.js.map → api-BaacjH-Y.js.map} +1 -1
- package/dist/bin.js +97 -91
- package/dist/bin.js.map +1 -1
- package/dist/bounded-fs-Cx-8nk-1.js +242 -0
- package/dist/bounded-fs-Cx-8nk-1.js.map +1 -0
- package/dist/{ci-install-BYThh_Gl.js → ci-install-D1Mum8Ah.js} +4 -4
- package/dist/{ci-install-BYThh_Gl.js.map → ci-install-D1Mum8Ah.js.map} +1 -1
- package/dist/commandments-BagyrYRW.js +2 -0
- package/dist/{commandments-DSNrOeOC.js → commandments-DiMtIz1o.js} +1 -1
- package/dist/{commandments-DSNrOeOC.js.map → commandments-DiMtIz1o.js.map} +1 -1
- package/dist/{debug-dX5JKcxf.js → debug-C3ZR1TVF.js} +14 -29
- package/dist/debug-C3ZR1TVF.js.map +1 -0
- package/dist/{debug-CdScMjI7.js → debug-DsSCOPe8.js} +1 -1
- package/dist/{defaults-CtWMmC8s.js → defaults-DAE9_QMn.js} +1 -1
- package/dist/{defaults-CtWMmC8s.js.map → defaults-DAE9_QMn.js.map} +1 -1
- package/dist/{env-api-key-C3LzH8Lr.js → env-api-key-DDVkPQmo.js} +1 -1
- package/dist/{env-api-key-C3LzH8Lr.js.map → env-api-key-DDVkPQmo.js.map} +1 -1
- package/dist/{environment-D-xSv8Xv.js → environment-Bi-zynk6.js} +4 -4
- package/dist/environment-Bi-zynk6.js.map +1 -0
- package/dist/{file-watcher-Z28w46F3.js → file-watcher-PmRIDAfM.js} +2 -2
- package/dist/{file-watcher-Z28w46F3.js.map → file-watcher-PmRIDAfM.js.map} +1 -1
- package/dist/{headless-ui-T-cv04Ne.js → headless-ui-C4X9lAOY.js} +2 -2
- package/dist/{headless-ui-T-cv04Ne.js.map → headless-ui-C4X9lAOY.js.map} +1 -1
- package/dist/{interactive-uhGISvkt.js → interactive-HM71vLQe.js} +2 -2
- package/dist/{interactive-uhGISvkt.js.map → interactive-HM71vLQe.js.map} +1 -1
- package/dist/mcp-D0Hpb_nk.js +64 -0
- package/dist/mcp-D0Hpb_nk.js.map +1 -0
- package/dist/{mcp-prompt-streaming-ByofAot4.js → mcp-prompt-streaming-Crk8qFlQ.js} +3 -3
- package/dist/{mcp-prompt-streaming-ByofAot4.js.map → mcp-prompt-streaming-Crk8qFlQ.js.map} +1 -1
- package/dist/{non-interactive-dGAp1rES.js → non-interactive-DdUe8lqX.js} +2 -2
- package/dist/{non-interactive-dGAp1rES.js.map → non-interactive-DdUe8lqX.js.map} +1 -1
- package/dist/{orchestrator-tools-9D5vTenD.js → orchestrator-tools-CpRruqZl.js} +3 -3
- package/dist/{orchestrator-tools-9D5vTenD.js.map → orchestrator-tools-CpRruqZl.js.map} +1 -1
- package/dist/{package-json-DCuoye-H.js → package-json-CDs1ZVKu.js} +1 -1
- package/dist/{package-json-DCuoye-H.js.map → package-json-CDs1ZVKu.js.map} +1 -1
- package/dist/{package-manager-D3M_H5Pk.js → package-manager-wkSzPJqW.js} +2 -2
- package/dist/{package-manager-D3M_H5Pk.js.map → package-manager-wkSzPJqW.js.map} +1 -1
- package/dist/{pi--w-M8eD-.js → pi-CGPjm4oE.js} +91 -140
- package/dist/pi-CGPjm4oE.js.map +1 -0
- package/dist/{playground-GURThvy5.js → playground-lg7h9GHG.js} +7 -7
- package/dist/{playground-GURThvy5.js.map → playground-lg7h9GHG.js.map} +1 -1
- package/dist/{posthog-integration-Dk1hbtRQ.js → posthog-integration-pnxhTbxw.js} +45 -38
- package/dist/posthog-integration-pnxhTbxw.js.map +1 -0
- package/dist/{posthog-DZZbziJ1.js → posthog-mgz-FQlS.js} +1 -1
- package/dist/{posthog-DZZbziJ1.js.map → posthog-mgz-FQlS.js.map} +1 -1
- package/dist/{provisioning-CJQwMFVo.js → provisioning-T4jtJqBa.js} +3 -3
- package/dist/{provisioning-CJQwMFVo.js.map → provisioning-T4jtJqBa.js.map} +1 -1
- package/dist/{queue-tools-DW-pUVKK.js → queue-tools-D7ctuzyo.js} +97 -10
- package/dist/queue-tools-D7ctuzyo.js.map +1 -0
- package/dist/{registry-CYNjgbAh.js → registry-CsFuKtXn.js} +272 -429
- package/dist/registry-CsFuKtXn.js.map +1 -0
- package/dist/{security-D9TV_nIO.js → security-YAaZfmHs.js} +4 -4
- package/dist/{security-D9TV_nIO.js.map → security-YAaZfmHs.js.map} +1 -1
- package/dist/{setup-utils-D5RLhAEe.js → setup-utils-DDzEnDxJ.js} +14 -17
- package/dist/setup-utils-DDzEnDxJ.js.map +1 -0
- package/dist/smoke-test.sh +1 -1
- package/dist/{start-tui-Dvk-0lGv.js → start-tui-pCi7WVAK.js} +72 -87
- package/dist/start-tui-pCi7WVAK.js.map +1 -0
- package/dist/{steps-CcRX3kDT.js → steps-DmsrBqb9.js} +7 -7
- package/dist/{steps-CcRX3kDT.js.map → steps-DmsrBqb9.js.map} +1 -1
- package/dist/{store-DkQLlZF9.js → store-BCRdtfOH.js} +5 -5
- package/dist/{store-DkQLlZF9.js.map → store-BCRdtfOH.js.map} +1 -1
- package/dist/{subagent-Dxh0Pwgv.js → subagent-jNXS8IPU.js} +2 -2
- package/dist/{subagent-Dxh0Pwgv.js.map → subagent-jNXS8IPU.js.map} +1 -1
- package/dist/{task-C-r2xQvb.js → task-CSmrfyNf.js} +30 -46
- package/dist/task-CSmrfyNf.js.map +1 -0
- package/dist/{task-stream-_e6Mf24V.js → task-stream-BZOjOhKu.js} +5 -5
- package/dist/{task-stream-_e6Mf24V.js.map → task-stream-BZOjOhKu.js.map} +1 -1
- package/dist/{tasks-BqpaakPz.js → tasks-BMgQt251.js} +2 -2
- package/dist/{tasks-BqpaakPz.js.map → tasks-BMgQt251.js.map} +1 -1
- package/dist/{telemetry-CeQm0f0H.js → telemetry-qeKIGkte.js} +3 -3
- package/dist/{telemetry-CeQm0f0H.js.map → telemetry-qeKIGkte.js.map} +1 -1
- package/dist/{terminal-2gT6ezna.js → terminal-tbxhJGlI.js} +13 -13
- package/dist/{terminal-2gT6ezna.js.map → terminal-tbxhJGlI.js.map} +1 -1
- package/dist/{tools-C5Lsz2zR.js → tools-DVnBIYFn.js} +10 -8
- package/dist/tools-DVnBIYFn.js.map +1 -0
- package/dist/{wizard-abort-D_Xcbesm.js → wizard-abort-AEhoDJ4P.js} +4 -4
- package/dist/{wizard-abort-D_Xcbesm.js.map → wizard-abort-AEhoDJ4P.js.map} +1 -1
- package/dist/{wizard-abort-CaKAS9_Z.js → wizard-abort-DHC_XStW.js} +1 -1
- package/dist/{wizard-session-tp4Zdbwl.js → wizard-session-BAZql11N.js} +1 -1
- package/dist/{wizard-session-tp4Zdbwl.js.map → wizard-session-BAZql11N.js.map} +1 -1
- package/dist/{wizard-session-DWHe83uk.js → wizard-session-C5lZPPEc.js} +1 -1
- package/dist/{yara-hooks-CGzlyuQA.js → yara-hooks-CKsVxWiN.js} +139 -56
- package/dist/yara-hooks-CKsVxWiN.js.map +1 -0
- package/dist/yara-hooks-DWRdZQuG.js +2 -0
- package/package.json +7 -7
- package/dist/agent-interface-C_aRBziP.js.map +0 -1
- package/dist/agent-runner-NzzrOB02.js.map +0 -1
- package/dist/analytics-C7QE7PWl.js +0 -2
- package/dist/analytics-CArgq7XO.js.map +0 -1
- package/dist/commandments-qTW7pwaT.js +0 -2
- package/dist/debug-dX5JKcxf.js.map +0 -1
- package/dist/environment-D-xSv8Xv.js.map +0 -1
- package/dist/file-utils-BpTQ4NFR.js +0 -140
- package/dist/file-utils-BpTQ4NFR.js.map +0 -1
- package/dist/mcp-B9NosVx4.js +0 -104
- package/dist/mcp-B9NosVx4.js.map +0 -1
- package/dist/pi--w-M8eD-.js.map +0 -1
- package/dist/posthog-integration-Dk1hbtRQ.js.map +0 -1
- package/dist/queue-tools-DW-pUVKK.js.map +0 -1
- package/dist/registry-CYNjgbAh.js.map +0 -1
- package/dist/setup-utils-D5RLhAEe.js.map +0 -1
- package/dist/start-tui-Dvk-0lGv.js.map +0 -1
- package/dist/task-C-r2xQvb.js.map +0 -1
- package/dist/tools-C5Lsz2zR.js.map +0 -1
- package/dist/yara-hooks-CGzlyuQA.js.map +0 -1
- package/dist/yara-hooks-CQaKM0f4.js +0 -2
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as analytics } from "./analytics-
|
|
3
|
-
import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-
|
|
4
|
-
import { t as ApiError } from "./api-
|
|
5
|
-
import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-
|
|
6
|
-
import { i as wizardAbort } from "./wizard-abort-
|
|
7
|
-
import { a as formatTokenCount, i as formatCostUsd } from "./agent-runner-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as FRAMEWORK_REGISTRY } from "./registry-
|
|
11
|
-
import { b as detectProjectsWithAgent, m as Icons, p as Colors, t as SETUP_REPORT_FILE, v as getDetectedWarehouseSources } from "./posthog-integration-
|
|
1
|
+
import { G as POSTHOG_ORG_AI_SETTINGS_URL, H as POSTHOG_DOCS_URL, I as Integration, K as POSTHOG_PRIVACY_URL, L as OAUTH_PORTS, Q as REMOTE_SKILLS_BASE_URL, R as OAUTH_TIMEOUT_MS, X as POSTHOG_TERMS_URL, d as relativeToInstallDir, g as SIGNUP_WIZARD_READINESS_CONFIG, l as WIZARD_LOG_FILE, p as setUI, s as logToFile, v as getBlockingServiceKeys } from "./debug-C3ZR1TVF.js";
|
|
2
|
+
import { n as analytics } from "./analytics-BXz4SIuS.js";
|
|
3
|
+
import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-DDzEnDxJ.js";
|
|
4
|
+
import { t as ApiError } from "./api-BaacjH-Y.js";
|
|
5
|
+
import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-BAZql11N.js";
|
|
6
|
+
import { i as wizardAbort } from "./wizard-abort-AEhoDJ4P.js";
|
|
7
|
+
import { a as formatTokenCount, i as formatCostUsd } from "./agent-runner-B1qCtjid.js";
|
|
8
|
+
import { b as fetchSkillMenu, v as downloadSkill } from "./agent-interface-DoFVHRFh.js";
|
|
9
|
+
import { _ as AUDIT_CHECKS_KEY, b as coerceAuditChecks, g as AUDIT_CHECKS_FILE, x as getAuditChecks, y as AUDIT_SEVERITY_STYLE } from "./yara-hooks-CKsVxWiN.js";
|
|
10
|
+
import { t as FRAMEWORK_REGISTRY } from "./registry-CsFuKtXn.js";
|
|
11
|
+
import { b as detectProjectsWithAgent, m as Icons, p as Colors, t as SETUP_REPORT_FILE, v as getDetectedWarehouseSources } from "./posthog-integration-pnxhTbxw.js";
|
|
12
12
|
import { S as STRIPE_SDKS, _ as SOURCE_MAPS_CONTEXT_KEYS, b as getContentBlocks, d as Program, f as getProgramConfig, g as DISPLAY_NAME, h as AUTOMATABLE_VARIANTS, m as SELF_DRIVING_INTEGRATE_PATH_KEY, n as useKeyBindings, p as detectSelfDrivingIntegrationProjects, t as PickerMenu, x as POSTHOG_SDKS, y as fetchHealthIssues } from "./bin.js";
|
|
13
|
-
import { r as totalTokenCount, t as WizardStore } from "./store-
|
|
14
|
-
import { A as ConfirmationInput, C as TabContainer, D as LinkText, E as LogViewer, F as SplitView, M as useStdoutDimensions, N as ProgressList, O as extractUrls, P as LoadingBox, S as HNViewer, T as EventPlanViewer, _ as SEVERITY_ORDER, a as useSkillEntry, b as LearnCard, c as SlackConnectScreen, d as AuditChecksViewer, f as McpSuggestedPromptsScreen, g as SEVERITY_LABEL, h as IssueTable, i as SkillSourceInfo, k as ModalOverlay, l as AUDIT_AREA_SLIDES, m as McpScreen, n as releaseTerminal, o as OutroScreen, r as AiOptInRequiredScreen, s as useDismissOnAnyKey, t as enterDarkTerminal, u as VisualBox, v as ServiceHealthList, w as ScreenContainer, y as TipsCard } from "./terminal-
|
|
15
|
-
import { t as ALL_FEATURE_VALUES } from "./defaults-
|
|
16
|
-
import { t as startFileWatcher } from "./file-watcher-
|
|
17
|
-
import { a as getSupportedClients, c as removeMCPServer, i as getInstalledClients, o as getSupportedPluginClients, s as installPlugins, u as isPluginCapable } from "./add-mcp-server-to-clients-
|
|
18
|
-
import
|
|
13
|
+
import { r as totalTokenCount, t as WizardStore } from "./store-BCRdtfOH.js";
|
|
14
|
+
import { A as ConfirmationInput, C as TabContainer, D as LinkText, E as LogViewer, F as SplitView, M as useStdoutDimensions, N as ProgressList, O as extractUrls, P as LoadingBox, S as HNViewer, T as EventPlanViewer, _ as SEVERITY_ORDER, a as useSkillEntry, b as LearnCard, c as SlackConnectScreen, d as AuditChecksViewer, f as McpSuggestedPromptsScreen, g as SEVERITY_LABEL, h as IssueTable, i as SkillSourceInfo, k as ModalOverlay, l as AUDIT_AREA_SLIDES, m as McpScreen, n as releaseTerminal, o as OutroScreen, r as AiOptInRequiredScreen, s as useDismissOnAnyKey, t as enterDarkTerminal, u as VisualBox, v as ServiceHealthList, w as ScreenContainer, y as TipsCard } from "./terminal-tbxhJGlI.js";
|
|
15
|
+
import { t as ALL_FEATURE_VALUES } from "./defaults-DAE9_QMn.js";
|
|
16
|
+
import { t as startFileWatcher } from "./file-watcher-PmRIDAfM.js";
|
|
17
|
+
import { a as getSupportedClients, c as removeMCPServer, i as getInstalledClients, o as getSupportedPluginClients, s as installPlugins, u as isPluginCapable } from "./add-mcp-server-to-clients-DJyWMMGj.js";
|
|
18
|
+
import { existsSync } from "fs";
|
|
19
|
+
import path, { join } from "path";
|
|
19
20
|
import { join as join$1 } from "node:path";
|
|
20
|
-
import { spawn
|
|
21
|
+
import { spawn } from "node:child_process";
|
|
21
22
|
import { Box, Text, render, useInput } from "ink";
|
|
22
23
|
import { Fragment, createElement, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
23
24
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1056,19 +1057,6 @@ const PrivacyPanel = () => {
|
|
|
1056
1057
|
* 3. Unsupported version: upgrade prompt
|
|
1057
1058
|
* 4. Detection succeeded: continue/change-framework/cancel
|
|
1058
1059
|
*/
|
|
1059
|
-
const TOOLS = [{
|
|
1060
|
-
label: "Troubleshoot Integration",
|
|
1061
|
-
command: "doctor"
|
|
1062
|
-
}];
|
|
1063
|
-
function launchTool(command, installDir) {
|
|
1064
|
-
releaseTerminal();
|
|
1065
|
-
const result = spawnSync(process.execPath, [
|
|
1066
|
-
process.argv[1],
|
|
1067
|
-
command,
|
|
1068
|
-
`--install-dir=${installDir}`
|
|
1069
|
-
], { stdio: "inherit" });
|
|
1070
|
-
process.exit(result.status ?? 0);
|
|
1071
|
-
}
|
|
1072
1060
|
/** Framework picker shown when auto-detection fails. */
|
|
1073
1061
|
const FrameworkPicker = ({ store, onComplete }) => {
|
|
1074
1062
|
return /* @__PURE__ */ jsx(PickerMenu, {
|
|
@@ -1081,7 +1069,7 @@ const FrameworkPicker = ({ store, onComplete }) => {
|
|
|
1081
1069
|
})),
|
|
1082
1070
|
onSelect: (value) => {
|
|
1083
1071
|
const integration = Array.isArray(value) ? value[0] : value;
|
|
1084
|
-
import("./registry-
|
|
1072
|
+
import("./registry-CsFuKtXn.js").then((n) => n.n).then(({ FRAMEWORK_REGISTRY }) => {
|
|
1085
1073
|
const config = FRAMEWORK_REGISTRY[integration];
|
|
1086
1074
|
store.setFrameworkConfig(integration, config);
|
|
1087
1075
|
store.setDetectedFramework(config.metadata.name);
|
|
@@ -1095,17 +1083,6 @@ const PostHogIntegrationIntroScreen = ({ store }) => {
|
|
|
1095
1083
|
const [pickingFramework, setPickingFramework] = useState(false);
|
|
1096
1084
|
const [manuallySelected, setManuallySelected] = useState(false);
|
|
1097
1085
|
const [view, setView] = useState("default");
|
|
1098
|
-
const [toolsEnabled, setToolsEnabled] = useState(false);
|
|
1099
|
-
useEffect(() => {
|
|
1100
|
-
let cancelled = false;
|
|
1101
|
-
analytics.getAllFlagsForWizard().then((flags) => {
|
|
1102
|
-
const value = flags[WIZARD_TOOLS_MENU_FLAG_KEY];
|
|
1103
|
-
if (!cancelled && value && value !== "false") setToolsEnabled(true);
|
|
1104
|
-
});
|
|
1105
|
-
return () => {
|
|
1106
|
-
cancelled = true;
|
|
1107
|
-
};
|
|
1108
|
-
}, []);
|
|
1109
1086
|
const { session } = store;
|
|
1110
1087
|
const config = session.frameworkConfig;
|
|
1111
1088
|
const frameworkLabel = session.detectedFrameworkLabel ?? config?.metadata.name;
|
|
@@ -1244,14 +1221,7 @@ const PostHogIntegrationIntroScreen = ({ store }) => {
|
|
|
1244
1221
|
]
|
|
1245
1222
|
});
|
|
1246
1223
|
let menuOptions = null;
|
|
1247
|
-
if (view === "
|
|
1248
|
-
label: t.label,
|
|
1249
|
-
value: t.command
|
|
1250
|
-
})), {
|
|
1251
|
-
label: "Back",
|
|
1252
|
-
value: "back"
|
|
1253
|
-
}];
|
|
1254
|
-
else if (view === "more-info") menuOptions = [{
|
|
1224
|
+
if (view === "more-info") menuOptions = [{
|
|
1255
1225
|
label: "Back",
|
|
1256
1226
|
value: "back"
|
|
1257
1227
|
}, {
|
|
@@ -1271,10 +1241,6 @@ const PostHogIntegrationIntroScreen = ({ store }) => {
|
|
|
1271
1241
|
label: "Change framework",
|
|
1272
1242
|
value: "framework"
|
|
1273
1243
|
},
|
|
1274
|
-
...toolsEnabled ? [{
|
|
1275
|
-
label: "Tools",
|
|
1276
|
-
value: "tools"
|
|
1277
|
-
}] : [],
|
|
1278
1244
|
{
|
|
1279
1245
|
label: "More info",
|
|
1280
1246
|
value: "more-info"
|
|
@@ -1289,18 +1255,12 @@ const PostHogIntegrationIntroScreen = ({ store }) => {
|
|
|
1289
1255
|
value,
|
|
1290
1256
|
view
|
|
1291
1257
|
});
|
|
1292
|
-
if (view === "tools") {
|
|
1293
|
-
if (value === "back") setView("default");
|
|
1294
|
-
else launchTool(value, session.installDir);
|
|
1295
|
-
return;
|
|
1296
|
-
}
|
|
1297
1258
|
if (value === "cancel") process.exit(0);
|
|
1298
1259
|
else if (value === "framework") {
|
|
1299
1260
|
setPickingFramework(true);
|
|
1300
1261
|
setManuallySelected(true);
|
|
1301
1262
|
} else if (value === "more-info") setView("more-info");
|
|
1302
1263
|
else if (value === "privacy") setView("privacy");
|
|
1303
|
-
else if (value === "tools") setView("tools");
|
|
1304
1264
|
else if (value === "back") setView(view === "privacy" ? "more-info" : "default");
|
|
1305
1265
|
else store.completeSetup();
|
|
1306
1266
|
};
|
|
@@ -1902,14 +1862,15 @@ const SourceMapsIntroScreen = ({ store }) => {
|
|
|
1902
1862
|
/**
|
|
1903
1863
|
* Variant precedence for the agentic picker (most specific first). The detector
|
|
1904
1864
|
* keeps the EARLIEST matching target. Unsupported native targets are included
|
|
1905
|
-
* as guards before Android and iOS so React Native
|
|
1906
|
-
*
|
|
1907
|
-
*
|
|
1908
|
-
*
|
|
1865
|
+
* as guards before Android and iOS so React Native projects with nested Gradle
|
|
1866
|
+
* or Xcode manifests are not misclassified as instrumentable native apps. JS
|
|
1867
|
+
* ordering mirrors `pickJsVariant` in detect.ts: opinionated frameworks →
|
|
1868
|
+
* bundlers → bare React → Node → generic web.
|
|
1909
1869
|
*/
|
|
1910
|
-
const NON_AUTOMATABLE_NATIVE_VARIANTS = ["react-native"
|
|
1870
|
+
const NON_AUTOMATABLE_NATIVE_VARIANTS = ["react-native"];
|
|
1911
1871
|
const VARIANT_PRECEDENCE = [
|
|
1912
1872
|
...NON_AUTOMATABLE_NATIVE_VARIANTS,
|
|
1873
|
+
"flutter",
|
|
1913
1874
|
"android",
|
|
1914
1875
|
"ios",
|
|
1915
1876
|
"nextjs",
|
|
@@ -1935,34 +1896,58 @@ const SOURCE_MAPS_TARGETS = [...NON_AUTOMATABLE_NATIVE_VARIANTS, ...AUTOMATABLE_
|
|
|
1935
1896
|
id: v,
|
|
1936
1897
|
name: DISPLAY_NAME[v]
|
|
1937
1898
|
}));
|
|
1938
|
-
function
|
|
1939
|
-
|
|
1899
|
+
function isAutomatableVariant(value) {
|
|
1900
|
+
return value !== null && AUTOMATABLE_VARIANTS.includes(value);
|
|
1901
|
+
}
|
|
1902
|
+
const FLUTTER_NO_BUILD_TARGET_REASON = "Flutter project has no web, android or ios target — nothing to upload symbols for";
|
|
1903
|
+
/**
|
|
1904
|
+
* True when the Flutter project at `projectPath` has at least one platform
|
|
1905
|
+
* target the wizard can wire uploads into: web (dart2js source maps), android
|
|
1906
|
+
* (R8 mapping files) or ios (dSYMs). `flutter create` scaffolds a directory per
|
|
1907
|
+
* enabled platform, so their absence means this is a pure Dart package or
|
|
1908
|
+
* plugin — it produces no app build, and there is nothing to upload.
|
|
1909
|
+
*/
|
|
1910
|
+
function projectHasBuildTarget(installDir, projectPath) {
|
|
1911
|
+
const root = join(installDir, projectPath);
|
|
1912
|
+
return existsSync(join(root, "web", "index.html")) || existsSync(join(root, "android")) || existsSync(join(root, "ios"));
|
|
1913
|
+
}
|
|
1914
|
+
/** Classify one agent-detected project for source-map upload. */
|
|
1915
|
+
function classifyProject(p, hasBuildTarget) {
|
|
1916
|
+
const base = {
|
|
1917
|
+
path: p.path,
|
|
1918
|
+
framework: p.framework,
|
|
1919
|
+
hasPostHog: p.hasPostHog
|
|
1920
|
+
};
|
|
1921
|
+
const namesForeignNativePlatform = /\b(?:react[\s-]*native|expo)\b/i.test(p.framework) || /\bflutter\b/i.test(p.framework) && p.targetId !== "flutter";
|
|
1922
|
+
if (!isAutomatableVariant(p.targetId) || namesForeignNativePlatform) return {
|
|
1923
|
+
...base,
|
|
1924
|
+
variant: null,
|
|
1940
1925
|
instrumentable: false,
|
|
1941
1926
|
reason: "Source-map upload isn't supported for this stack yet"
|
|
1942
1927
|
};
|
|
1943
|
-
if (!
|
|
1928
|
+
if (p.targetId === "flutter" && !hasBuildTarget(p.path)) return {
|
|
1929
|
+
...base,
|
|
1930
|
+
variant: null,
|
|
1931
|
+
instrumentable: false,
|
|
1932
|
+
reason: FLUTTER_NO_BUILD_TARGET_REASON
|
|
1933
|
+
};
|
|
1934
|
+
if (!p.hasPostHog) return {
|
|
1935
|
+
...base,
|
|
1936
|
+
variant: p.targetId,
|
|
1944
1937
|
instrumentable: false,
|
|
1945
1938
|
reason: "No PostHog SDK installed yet — run `npx @posthog/wizard` first"
|
|
1946
1939
|
};
|
|
1947
|
-
return {
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1940
|
+
return {
|
|
1941
|
+
...base,
|
|
1942
|
+
variant: p.targetId,
|
|
1943
|
+
instrumentable: true
|
|
1944
|
+
};
|
|
1951
1945
|
}
|
|
1952
1946
|
/** Map a generic detection report into source-maps projects. */
|
|
1953
|
-
function toSourceMapsReport(report) {
|
|
1947
|
+
function toSourceMapsReport(report, hasBuildTarget) {
|
|
1954
1948
|
return {
|
|
1955
1949
|
repoType: report.repoType,
|
|
1956
|
-
projects: report.projects.map((p) =>
|
|
1957
|
-
const variant = isAutomatableVariant(p.targetId) && !/\b(?:react[\s-]*native|expo|flutter)\b/i.test(p.framework) ? p.targetId : null;
|
|
1958
|
-
return {
|
|
1959
|
-
path: p.path,
|
|
1960
|
-
framework: p.framework,
|
|
1961
|
-
variant,
|
|
1962
|
-
hasPostHog: p.hasPostHog,
|
|
1963
|
-
...classify(variant, p.hasPostHog)
|
|
1964
|
-
};
|
|
1965
|
-
})
|
|
1950
|
+
projects: report.projects.map((p) => classifyProject(p, hasBuildTarget))
|
|
1966
1951
|
};
|
|
1967
1952
|
}
|
|
1968
1953
|
/** Run the Haiku detector over the repo and classify projects for source maps. */
|
|
@@ -1971,7 +1956,7 @@ async function detectSourceMapsProjects(session, onEvent) {
|
|
|
1971
1956
|
targets: SOURCE_MAPS_TARGETS,
|
|
1972
1957
|
purpose: "set up PostHog Error Tracking source-map upload",
|
|
1973
1958
|
onEvent
|
|
1974
|
-
}));
|
|
1959
|
+
}), (path) => projectHasBuildTarget(session.installDir, path));
|
|
1975
1960
|
}
|
|
1976
1961
|
//#endregion
|
|
1977
1962
|
//#region src/ui/tui/screens/SourceMapsDetectScreen.tsx
|
|
@@ -5295,7 +5280,7 @@ function createMcpSuggestedPromptsServices(store) {
|
|
|
5295
5280
|
};
|
|
5296
5281
|
}
|
|
5297
5282
|
async function* runProductionPromptStreaming(args) {
|
|
5298
|
-
const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-
|
|
5283
|
+
const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-Crk8qFlQ.js");
|
|
5299
5284
|
yield* runMcpPromptViaSdk(args);
|
|
5300
5285
|
}
|
|
5301
5286
|
//#endregion
|
|
@@ -5472,4 +5457,4 @@ function startTUI(version, program = Program.PostHogIntegration) {
|
|
|
5472
5457
|
//#endregion
|
|
5473
5458
|
export { startTUI };
|
|
5474
5459
|
|
|
5475
|
-
//# sourceMappingURL=start-tui-
|
|
5460
|
+
//# sourceMappingURL=start-tui-pCi7WVAK.js.map
|