@posthog/wizard 2.52.1 → 2.53.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-C7P4_dhF.js → add-mcp-server-to-clients-DmMHsYYM.js} +5 -5
- package/dist/{add-mcp-server-to-clients-C7P4_dhF.js.map → add-mcp-server-to-clients-DmMHsYYM.js.map} +1 -1
- package/dist/{agent-interface-oqI_K3-4.js → agent-interface-xWyATfJi.js} +330 -25
- package/dist/agent-interface-xWyATfJi.js.map +1 -0
- package/dist/{agent-prompt-loader-DwFFfuZ4.js → agent-prompt-loader-i6miJlmN.js} +5 -5
- package/dist/{agent-prompt-loader-DwFFfuZ4.js.map → agent-prompt-loader-i6miJlmN.js.map} +1 -1
- package/dist/{agent-runner-CunYPDzL.js → agent-runner-CPuubcP_.js} +157 -137
- package/dist/agent-runner-CPuubcP_.js.map +1 -0
- package/dist/{analytics-DsXLkDwE.js → analytics-BC3iiS1p.js} +5 -2
- package/dist/analytics-BC3iiS1p.js.map +1 -0
- package/dist/analytics-CLuGZo9D.js +2 -0
- package/dist/{api-Dpnv0jVL.js → api-CXk-efCU.js} +3 -3
- package/dist/{api-Dpnv0jVL.js.map → api-CXk-efCU.js.map} +1 -1
- package/dist/bin.js +316 -179
- package/dist/bin.js.map +1 -1
- package/dist/{bounded-fs-bvlHO1PM.js → bounded-fs-B6Eqbgoj.js} +3 -3
- package/dist/{bounded-fs-bvlHO1PM.js.map → bounded-fs-B6Eqbgoj.js.map} +1 -1
- package/dist/{ci-install-BLSCzEZs.js → ci-install-CXD2meJ4.js} +5 -5
- package/dist/{ci-install-BLSCzEZs.js.map → ci-install-CXD2meJ4.js.map} +1 -1
- package/dist/{debug-D-lnRFLU.js → debug-Bz-LaIU8.js} +1 -1
- package/dist/{debug-BH67OSPW.js → debug-tCr3A18e.js} +13 -4
- package/dist/debug-tCr3A18e.js.map +1 -0
- package/dist/{defaults-DAE9_QMn.js → defaults-BWLIffh5.js} +1 -1
- package/dist/{defaults-DAE9_QMn.js.map → defaults-BWLIffh5.js.map} +1 -1
- package/dist/{env-api-key-DDVkPQmo.js → env-api-key-cjD4yfGT.js} +1 -1
- package/dist/{env-api-key-DDVkPQmo.js.map → env-api-key-cjD4yfGT.js.map} +1 -1
- package/dist/{environment-CPPBK-08.js → environment-JwRHoXao.js} +4 -4
- package/dist/{environment-CPPBK-08.js.map → environment-JwRHoXao.js.map} +1 -1
- package/dist/{file-watcher-Dgbe0xK9.js → file-watcher-Cm-B3jyb.js} +2 -2
- package/dist/{file-watcher-Dgbe0xK9.js.map → file-watcher-Cm-B3jyb.js.map} +1 -1
- package/dist/{headless-ui-BJbByiLj.js → headless-ui-o1cpGr1W.js} +2 -2
- package/dist/{headless-ui-BJbByiLj.js.map → headless-ui-o1cpGr1W.js.map} +1 -1
- package/dist/{interactive-ClJi6jV4.js → interactive-CM2fMt8l.js} +3 -3
- package/dist/{interactive-ClJi6jV4.js.map → interactive-CM2fMt8l.js.map} +1 -1
- package/dist/{mcp-C5pjmTsm.js → mcp-C4Xn8mq5.js} +2 -2
- package/dist/{mcp-C5pjmTsm.js.map → mcp-C4Xn8mq5.js.map} +1 -1
- package/dist/{mcp-prompt-streaming-BFDtuwJN.js → mcp-prompt-streaming-Dqrcns_Z.js} +5 -4
- package/dist/{mcp-prompt-streaming-BFDtuwJN.js.map → mcp-prompt-streaming-Dqrcns_Z.js.map} +1 -1
- package/dist/{non-interactive-C3DW7sGO.js → non-interactive-DYvEgWZx.js} +2 -2
- package/dist/{non-interactive-C3DW7sGO.js.map → non-interactive-DYvEgWZx.js.map} +1 -1
- package/dist/{orchestrator-tools-S88ycFO0.js → orchestrator-tools-CAl7aLtB.js} +3 -3
- package/dist/{orchestrator-tools-S88ycFO0.js.map → orchestrator-tools-CAl7aLtB.js.map} +1 -1
- package/dist/{package-manager-De6lmm9s.js → package-manager-DnU0j41n.js} +2 -2
- package/dist/{package-manager-De6lmm9s.js.map → package-manager-DnU0j41n.js.map} +1 -1
- package/dist/pi-2hh_NXKT.js +409 -0
- package/dist/pi-2hh_NXKT.js.map +1 -0
- package/dist/{playground-B4yTvjn4.js → playground-rG007Ve9.js} +353 -18
- package/dist/playground-rG007Ve9.js.map +1 -0
- package/dist/{posthog-mgz-FQlS.js → posthog-DDLIrku0.js} +1 -1
- package/dist/{posthog-mgz-FQlS.js.map → posthog-DDLIrku0.js.map} +1 -1
- package/dist/{posthog-integration-BA2aFHGz.js → posthog-integration-Bd-kybes.js} +15 -15
- package/dist/{posthog-integration-BA2aFHGz.js.map → posthog-integration-Bd-kybes.js.map} +1 -1
- package/dist/{provisioning-CtC0Ekeq.js → provisioning-tkKe6aM4.js} +3 -3
- package/dist/{provisioning-CtC0Ekeq.js.map → provisioning-tkKe6aM4.js.map} +1 -1
- package/dist/{queue-tools-DXg_5old.js → queue-tools-kBa-8bPH.js} +45 -32
- package/dist/queue-tools-kBa-8bPH.js.map +1 -0
- package/dist/{registry-B6ubVKTJ.js → registry-Cg_M-kov.js} +5 -5
- package/dist/{registry-B6ubVKTJ.js.map → registry-Cg_M-kov.js.map} +1 -1
- package/dist/{security-np5qnEMM.js → security-BtIAMdyk.js} +5 -5
- package/dist/security-BtIAMdyk.js.map +1 -0
- package/dist/{setup-utils-QwrY_J01.js → setup-utils-t0jzKwBE.js} +8 -8
- package/dist/{setup-utils-QwrY_J01.js.map → setup-utils-t0jzKwBE.js.map} +1 -1
- package/dist/{start-tui-DHEtMtnm.js → start-tui-CK3rpaKD.js} +35 -21
- package/dist/start-tui-CK3rpaKD.js.map +1 -0
- package/dist/{steps-ehGnaz9V.js → steps-dNXQiyOZ.js} +7 -7
- package/dist/{steps-ehGnaz9V.js.map → steps-dNXQiyOZ.js.map} +1 -1
- package/dist/{store-Cp_jvnNp.js → store-qv5UdGQO.js} +5 -5
- package/dist/{store-Cp_jvnNp.js.map → store-qv5UdGQO.js.map} +1 -1
- package/dist/{subagent-B9GiHZVj.js → subagent-DsfcNf0P.js} +2 -2
- package/dist/{subagent-B9GiHZVj.js.map → subagent-DsfcNf0P.js.map} +1 -1
- package/dist/{task-CmWToh2Q.js → task-BZ77d7rm.js} +25 -23
- package/dist/task-BZ77d7rm.js.map +1 -0
- package/dist/{task-stream-4I08S7A6.js → task-stream-5k_cd_Wz.js} +4 -4
- package/dist/{task-stream-4I08S7A6.js.map → task-stream-5k_cd_Wz.js.map} +1 -1
- package/dist/{tasks-C6CfAC-D.js → tasks-C9yxUVN7.js} +2 -2
- package/dist/{tasks-C6CfAC-D.js.map → tasks-C9yxUVN7.js.map} +1 -1
- package/dist/{telemetry-3fcP3zSF.js → telemetry-5NqJBWNN.js} +3 -3
- package/dist/{telemetry-3fcP3zSF.js.map → telemetry-5NqJBWNN.js.map} +1 -1
- package/dist/{terminal-D4A6Hmkf.js → terminal-q-Sd8CdO.js} +806 -62
- package/dist/terminal-q-Sd8CdO.js.map +1 -0
- package/dist/{tools-pH2CNwNX.js → tools-2weX1XHC.js} +8 -10
- package/dist/tools-2weX1XHC.js.map +1 -0
- package/dist/warlock-smoke-test.ts +177 -1
- package/dist/{wizard-abort-BbsBpCCV.js → wizard-abort-B1XewmPn.js} +3 -3
- package/dist/{wizard-abort-BbsBpCCV.js.map → wizard-abort-B1XewmPn.js.map} +1 -1
- package/dist/{wizard-abort-BEBAXmPp.js → wizard-abort-Cl8D3gW8.js} +1 -1
- package/dist/yara-hooks-Cj7xUAKE.js +2 -0
- package/dist/{yara-hooks-BGBQ4IcA.js → yara-hooks-Cu0rEw1L.js} +39 -83
- package/dist/yara-hooks-Cu0rEw1L.js.map +1 -0
- package/package.json +1 -1
- package/dist/agent-interface-oqI_K3-4.js.map +0 -1
- package/dist/agent-runner-CunYPDzL.js.map +0 -1
- package/dist/analytics-DsXLkDwE.js.map +0 -1
- package/dist/analytics-agQIoFg6.js +0 -2
- package/dist/commandments-BagyrYRW.js +0 -2
- package/dist/commandments-DiMtIz1o.js +0 -42
- package/dist/commandments-DiMtIz1o.js.map +0 -1
- package/dist/debug-BH67OSPW.js.map +0 -1
- package/dist/pi-BOCjsfgo.js +0 -575
- package/dist/pi-BOCjsfgo.js.map +0 -1
- package/dist/playground-B4yTvjn4.js.map +0 -1
- package/dist/queue-tools-DXg_5old.js.map +0 -1
- package/dist/security-np5qnEMM.js.map +0 -1
- package/dist/start-tui-DHEtMtnm.js.map +0 -1
- package/dist/task-CmWToh2Q.js.map +0 -1
- package/dist/terminal-D4A6Hmkf.js.map +0 -1
- package/dist/tools-pH2CNwNX.js.map +0 -1
- package/dist/yara-hooks-BGBQ4IcA.js.map +0 -1
- package/dist/yara-hooks-BfhKhlIT.js +0 -2
package/dist/bin.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { n as analytics } from "./analytics-
|
|
4
|
-
import { r as setEntryCommand } from "./telemetry-
|
|
5
|
-
import { a as walkProjectFiles, i as safeReadFile } from "./bounded-fs-
|
|
6
|
-
import { n as isUsingTypeScript } from "./setup-utils-
|
|
7
|
-
import { o as handleApiError } from "./api-
|
|
2
|
+
import { Ct as regionOption, L as Integration, St as isHeadless, U as POSTHOG_DOCS_URL, a as getLogFilePath, f as getUI, ft as WIZARD_USER_AGENT, ht as VERSION, m as LoggingUI, p as setUI, pt as getSkillsBaseUrl, r as debug, s as logToFile, xt as headlessOption } from "./debug-tCr3A18e.js";
|
|
3
|
+
import { n as analytics } from "./analytics-BC3iiS1p.js";
|
|
4
|
+
import { r as setEntryCommand } from "./telemetry-5NqJBWNN.js";
|
|
5
|
+
import { a as walkProjectFiles, i as safeReadFile } from "./bounded-fs-B6Eqbgoj.js";
|
|
6
|
+
import { n as isUsingTypeScript } from "./setup-utils-t0jzKwBE.js";
|
|
7
|
+
import { o as handleApiError } from "./api-CXk-efCU.js";
|
|
8
8
|
import "./wizard-session-BAZql11N.js";
|
|
9
|
-
import { r as runCleanups } from "./wizard-abort-
|
|
10
|
-
import { n as isNonInteractiveEnvironment } from "./environment-
|
|
11
|
-
import { n as runAgent, o as authenticate } from "./agent-runner-
|
|
12
|
-
import {
|
|
13
|
-
import { S as SETUP_REPORT_FILE, _ as AUDIT_CHECKS_KEY, g as AUDIT_CHECKS_FILE, v as AUDIT_REPORT_FILE } from "./yara-hooks-
|
|
14
|
-
import { i as SPINNER_MESSAGE } from "./registry-
|
|
15
|
-
import {
|
|
16
|
-
import { n as readApiKeyFromEnv } from "./env-api-key-
|
|
9
|
+
import { r as runCleanups } from "./wizard-abort-B1XewmPn.js";
|
|
10
|
+
import { n as isNonInteractiveEnvironment } from "./environment-JwRHoXao.js";
|
|
11
|
+
import { n as runAgent, o as authenticate } from "./agent-runner-CPuubcP_.js";
|
|
12
|
+
import { l as recoverOrphanedSettingsBackups, p as AgentSignals, v as WIZARD_TOOL_NAMES, x as fetchSkillMenu } from "./agent-interface-xWyATfJi.js";
|
|
13
|
+
import { S as SETUP_REPORT_FILE, _ as AUDIT_CHECKS_KEY, g as AUDIT_CHECKS_FILE, v as AUDIT_REPORT_FILE } from "./yara-hooks-Cu0rEw1L.js";
|
|
14
|
+
import { i as SPINNER_MESSAGE } from "./registry-Cg_M-kov.js";
|
|
15
|
+
import { C as gatherFrameworkContext, S as resolveProjectDir, _ as WAREHOUSE_ABORT_CASES, a as LINE_CHART_BLOCK, b as detectIntegrationProjects, d as isClearBlock, g as HEALTH_CHECK_STEP, h as Icons, i as FUNNEL_BLOCK, m as Colors, n as integrationRunStep, o as PRODUCT_SUITE_BLOCK, r as posthogIntegrationConfig, s as StatusPeekTrigger, u as wordWrap, v as detectWarehousePrerequisites, y as getDetectedWarehouseSources } from "./posthog-integration-Bd-kybes.js";
|
|
16
|
+
import { n as readApiKeyFromEnv } from "./env-api-key-cjD4yfGT.js";
|
|
17
17
|
import { satisfies } from "semver";
|
|
18
18
|
import yargs from "yargs";
|
|
19
19
|
import { hideBin } from "yargs/helpers";
|
|
@@ -26,7 +26,7 @@ import { spawnSync } from "node:child_process";
|
|
|
26
26
|
import * as fs$1 from "node:fs";
|
|
27
27
|
import axios from "axios";
|
|
28
28
|
import { z } from "zod";
|
|
29
|
-
import { Box, Text, render, useInput } from "ink";
|
|
29
|
+
import { Box, Text, render, useInput, useStdout } from "ink";
|
|
30
30
|
import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
31
31
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
32
32
|
import { access, rm } from "node:fs/promises";
|
|
@@ -200,7 +200,7 @@ function runProvision(argv) {
|
|
|
200
200
|
}
|
|
201
201
|
async function provision({ email, region, name, baseUrl, jsonMode }) {
|
|
202
202
|
try {
|
|
203
|
-
const { provisionNewAccount } = await import("./provisioning-
|
|
203
|
+
const { provisionNewAccount } = await import("./provisioning-tkKe6aM4.js").then((n) => n.n);
|
|
204
204
|
if (!jsonMode) getUI().log.info(`Provisioning account for ${email} in ${region}...`);
|
|
205
205
|
emitResult(await provisionNewAccount(email, name, region, { baseUrl }), jsonMode);
|
|
206
206
|
process.exit(0);
|
|
@@ -267,22 +267,22 @@ const basicIntegrationCommand = {
|
|
|
267
267
|
setEntryCommand("integrate");
|
|
268
268
|
(async () => {
|
|
269
269
|
if (isHeadless(argv)) {
|
|
270
|
-
const { runHeadlessInstall } = await import("./ci-install-
|
|
270
|
+
const { runHeadlessInstall } = await import("./ci-install-CXD2meJ4.js");
|
|
271
271
|
return runHeadlessInstall(argv);
|
|
272
272
|
}
|
|
273
273
|
if (argv.ci) {
|
|
274
|
-
const { runCIInstall } = await import("./ci-install-
|
|
274
|
+
const { runCIInstall } = await import("./ci-install-CXD2meJ4.js");
|
|
275
275
|
return runCIInstall(argv);
|
|
276
276
|
}
|
|
277
277
|
if (isNonInteractiveEnvironment()) {
|
|
278
|
-
const { failNonInteractive } = await import("./non-interactive-
|
|
278
|
+
const { failNonInteractive } = await import("./non-interactive-DYvEgWZx.js");
|
|
279
279
|
return failNonInteractive();
|
|
280
280
|
}
|
|
281
281
|
if (argv.playground) {
|
|
282
|
-
const { runPlayground } = await import("./playground-
|
|
282
|
+
const { runPlayground } = await import("./playground-rG007Ve9.js");
|
|
283
283
|
return runPlayground();
|
|
284
284
|
}
|
|
285
|
-
const { runInteractive } = await import("./interactive-
|
|
285
|
+
const { runInteractive } = await import("./interactive-CM2fMt8l.js");
|
|
286
286
|
runInteractive(argv);
|
|
287
287
|
})();
|
|
288
288
|
}
|
|
@@ -3793,12 +3793,12 @@ const mcpAddCommand = {
|
|
|
3793
3793
|
function runMcpAdd(argv) {
|
|
3794
3794
|
const features = parseFeatures(argv.features);
|
|
3795
3795
|
(async () => {
|
|
3796
|
-
const { readApiKeyFromEnv } = await import("./env-api-key-
|
|
3796
|
+
const { readApiKeyFromEnv } = await import("./env-api-key-cjD4yfGT.js").then((n) => n.t);
|
|
3797
3797
|
const apiKey = argv.apiKey || readApiKeyFromEnv();
|
|
3798
3798
|
const debug = argv.debug;
|
|
3799
3799
|
const localMcp = argv.local;
|
|
3800
3800
|
try {
|
|
3801
|
-
const { startTUI } = await import("./start-tui-
|
|
3801
|
+
const { startTUI } = await import("./start-tui-CK3rpaKD.js");
|
|
3802
3802
|
const { buildSession } = await import("./wizard-session-C5lZPPEc.js");
|
|
3803
3803
|
const tui = startTUI(VERSION, Program.McpAdd);
|
|
3804
3804
|
tui.store.session = buildSession({
|
|
@@ -3811,7 +3811,7 @@ function runMcpAdd(argv) {
|
|
|
3811
3811
|
} catch (error) {
|
|
3812
3812
|
if (!isTUIUnavailable(error)) throw error;
|
|
3813
3813
|
setUI(new LoggingUI());
|
|
3814
|
-
const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-
|
|
3814
|
+
const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-DmMHsYYM.js").then((n) => n.r);
|
|
3815
3815
|
await addMCPServerToClientsStep({
|
|
3816
3816
|
local: localMcp,
|
|
3817
3817
|
features,
|
|
@@ -3850,7 +3850,7 @@ function runMcpRemove(argv) {
|
|
|
3850
3850
|
const debug = argv.debug;
|
|
3851
3851
|
const localMcp = argv.local;
|
|
3852
3852
|
try {
|
|
3853
|
-
const { startTUI } = await import("./start-tui-
|
|
3853
|
+
const { startTUI } = await import("./start-tui-CK3rpaKD.js");
|
|
3854
3854
|
const { buildSession } = await import("./wizard-session-C5lZPPEc.js");
|
|
3855
3855
|
const tui = startTUI(VERSION, Program.McpRemove);
|
|
3856
3856
|
tui.store.session = buildSession({
|
|
@@ -3860,7 +3860,7 @@ function runMcpRemove(argv) {
|
|
|
3860
3860
|
});
|
|
3861
3861
|
} catch {
|
|
3862
3862
|
setUI(new LoggingUI());
|
|
3863
|
-
const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-
|
|
3863
|
+
const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-DmMHsYYM.js").then((n) => n.r);
|
|
3864
3864
|
await removeMCPServerFromClientsStep({ local: localMcp });
|
|
3865
3865
|
}
|
|
3866
3866
|
})();
|
|
@@ -3882,7 +3882,7 @@ function runMcpTutorial(argv) {
|
|
|
3882
3882
|
const debug = argv.debug;
|
|
3883
3883
|
const localMcp = argv.local;
|
|
3884
3884
|
try {
|
|
3885
|
-
const { startTUI } = await import("./start-tui-
|
|
3885
|
+
const { startTUI } = await import("./start-tui-CK3rpaKD.js");
|
|
3886
3886
|
const { buildSession } = await import("./wizard-session-C5lZPPEc.js");
|
|
3887
3887
|
const tui = startTUI(VERSION, Program.McpTutorial);
|
|
3888
3888
|
tui.store.session = buildSession({
|
|
@@ -3963,10 +3963,10 @@ function runWizard(config, options) {
|
|
|
3963
3963
|
(async () => {
|
|
3964
3964
|
try {
|
|
3965
3965
|
const installDir = options.installDir || process.cwd();
|
|
3966
|
-
const { startTUI } = await import("./start-tui-
|
|
3966
|
+
const { startTUI } = await import("./start-tui-CK3rpaKD.js");
|
|
3967
3967
|
const { buildSession, RunPhase } = await import("./wizard-session-C5lZPPEc.js");
|
|
3968
|
-
const { TaskStreamPush } = await import("./task-stream-
|
|
3969
|
-
const { PostHogDestination } = await import("./posthog-
|
|
3968
|
+
const { TaskStreamPush } = await import("./task-stream-5k_cd_Wz.js");
|
|
3969
|
+
const { PostHogDestination } = await import("./posthog-DDLIrku0.js");
|
|
3970
3970
|
tui = startTUI(WIZARD_VERSION, config.id);
|
|
3971
3971
|
const activeTui = tui;
|
|
3972
3972
|
const session = buildSession({
|
|
@@ -4031,7 +4031,7 @@ function runWizard(config, options) {
|
|
|
4031
4031
|
if (shown(step)) await advanceStep(step, activeTui.store, config);
|
|
4032
4032
|
}
|
|
4033
4033
|
else if (skipAgent) {
|
|
4034
|
-
const { getOrAskForProjectData } = await import("./setup-utils-
|
|
4034
|
+
const { getOrAskForProjectData } = await import("./setup-utils-t0jzKwBE.js").then((n) => n.r);
|
|
4035
4035
|
const { projectApiKey, host, accessToken, projectId } = await getOrAskForProjectData({
|
|
4036
4036
|
signup: session.signup,
|
|
4037
4037
|
ci: session.ci,
|
|
@@ -4133,10 +4133,10 @@ function runNonInteractive(config, options, mode) {
|
|
|
4133
4133
|
(async () => {
|
|
4134
4134
|
const path = await import("path");
|
|
4135
4135
|
const { buildSession, RunPhase, OutroKind } = await import("./wizard-session-C5lZPPEc.js");
|
|
4136
|
-
const { readEnvironment } = await import("./environment-
|
|
4137
|
-
const { readApiKeyFromEnv } = await import("./env-api-key-
|
|
4138
|
-
const { configureLogFileFromEnvironment, logToFile } = await import("./debug-
|
|
4139
|
-
const { wizardAbort, WizardError } = await import("./wizard-abort-
|
|
4136
|
+
const { readEnvironment } = await import("./environment-JwRHoXao.js").then((n) => n.t);
|
|
4137
|
+
const { readApiKeyFromEnv } = await import("./env-api-key-cjD4yfGT.js").then((n) => n.t);
|
|
4138
|
+
const { configureLogFileFromEnvironment, logToFile } = await import("./debug-Bz-LaIU8.js");
|
|
4139
|
+
const { wizardAbort, WizardError } = await import("./wizard-abort-Cl8D3gW8.js");
|
|
4140
4140
|
configureLogFileFromEnvironment();
|
|
4141
4141
|
const env = readEnvironment();
|
|
4142
4142
|
const apiKey = options.apiKey ?? readApiKeyFromEnv() ?? void 0;
|
|
@@ -4168,9 +4168,9 @@ function runNonInteractive(config, options, mode) {
|
|
|
4168
4168
|
let store = null;
|
|
4169
4169
|
let taskStream = null;
|
|
4170
4170
|
if (mode === "headless") {
|
|
4171
|
-
const { WizardStore } = await import("./store-
|
|
4172
|
-
const { HeadlessUI } = await import("./headless-ui-
|
|
4173
|
-
const { TaskStreamPush, PostHogDestination } = await import("./task-stream-
|
|
4171
|
+
const { WizardStore } = await import("./store-qv5UdGQO.js").then((n) => n.n);
|
|
4172
|
+
const { HeadlessUI } = await import("./headless-ui-o1cpGr1W.js");
|
|
4173
|
+
const { TaskStreamPush, PostHogDestination } = await import("./task-stream-5k_cd_Wz.js");
|
|
4174
4174
|
store = new WizardStore(config.id);
|
|
4175
4175
|
store.session = session;
|
|
4176
4176
|
setUI(new HeadlessUI(store));
|
|
@@ -4226,7 +4226,7 @@ function runNonInteractive(config, options, mode) {
|
|
|
4226
4226
|
});
|
|
4227
4227
|
}
|
|
4228
4228
|
}
|
|
4229
|
-
const { runAgent } = await import("./agent-runner-
|
|
4229
|
+
const { runAgent } = await import("./agent-runner-CPuubcP_.js").then((n) => n.t);
|
|
4230
4230
|
await runAgent(config, session);
|
|
4231
4231
|
await settleStream(RunPhase.Completed);
|
|
4232
4232
|
} catch (error) {
|
|
@@ -4512,6 +4512,7 @@ function pickerChildrenToShow(children) {
|
|
|
4512
4512
|
* where [!] is black text on accent background.
|
|
4513
4513
|
*/
|
|
4514
4514
|
const PromptLabel = ({ message }) => {
|
|
4515
|
+
if (!message) return null;
|
|
4515
4516
|
return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Text, {
|
|
4516
4517
|
bold: true,
|
|
4517
4518
|
color: Colors.accent,
|
|
@@ -4547,6 +4548,35 @@ const ConfirmButton = ({ label = "Confirm", focused, count }) => {
|
|
|
4547
4548
|
});
|
|
4548
4549
|
};
|
|
4549
4550
|
//#endregion
|
|
4551
|
+
//#region src/ui/tui/hooks/useStdoutDimensions.ts
|
|
4552
|
+
/**
|
|
4553
|
+
* useStdoutDimensions — Returns [columns, rows] and re-renders on terminal resize.
|
|
4554
|
+
*
|
|
4555
|
+
* Ink's useStdout() does not subscribe to resize events, so layout only updates
|
|
4556
|
+
* when something else causes a re-render. This hook listens to the stream's
|
|
4557
|
+
* 'resize' event (Node TTY) and updates state so the component re-renders
|
|
4558
|
+
* with the new dimensions.
|
|
4559
|
+
*/
|
|
4560
|
+
function useStdoutDimensions() {
|
|
4561
|
+
const { stdout } = useStdout();
|
|
4562
|
+
const [size, setSize] = useState(() => [stdout.columns || 80, stdout.rows || 24]);
|
|
4563
|
+
useEffect(() => {
|
|
4564
|
+
setSize([stdout.columns || 80, stdout.rows || 24]);
|
|
4565
|
+
const stream = stdout;
|
|
4566
|
+
if (typeof stream.on !== "function") return;
|
|
4567
|
+
const onResize = () => {
|
|
4568
|
+
const c = stdout.columns || 80;
|
|
4569
|
+
const r = stdout.rows || 24;
|
|
4570
|
+
if (c > 0 && r > 0) setSize([c, r]);
|
|
4571
|
+
};
|
|
4572
|
+
stream.on("resize", onResize);
|
|
4573
|
+
return () => {
|
|
4574
|
+
stream.off?.("resize", onResize);
|
|
4575
|
+
};
|
|
4576
|
+
}, [stdout]);
|
|
4577
|
+
return size;
|
|
4578
|
+
}
|
|
4579
|
+
//#endregion
|
|
4550
4580
|
//#region src/ui/tui/hooks/keyboard-hints-utils.ts
|
|
4551
4581
|
/** Default priorities by key type. */
|
|
4552
4582
|
const DEFAULT_PRIORITY = {
|
|
@@ -4706,16 +4736,61 @@ function stepEnabled(options, rows, from, dir) {
|
|
|
4706
4736
|
}
|
|
4707
4737
|
return from;
|
|
4708
4738
|
}
|
|
4709
|
-
/**
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4739
|
+
/** First enabled option in [start, end), for initial focus and for entering
|
|
4740
|
+
* a page from the Confirm button. */
|
|
4741
|
+
function firstEnabled(options, start = 0, end = options.length) {
|
|
4742
|
+
for (let i = start; i < end; i++) if (!options[i]?.disabled) return i;
|
|
4743
|
+
return start;
|
|
4744
|
+
}
|
|
4745
|
+
/** Last enabled option in [start, end), for wrapping from the button onto
|
|
4746
|
+
* the bottom of the page. */
|
|
4747
|
+
function lastEnabled(options, start = 0, end = options.length) {
|
|
4748
|
+
for (let i = end - 1; i >= start; i--) if (!options[i]?.disabled) return i;
|
|
4749
|
+
return end - 1;
|
|
4713
4750
|
}
|
|
4714
|
-
/**
|
|
4715
|
-
*
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4751
|
+
/**
|
|
4752
|
+
* Rows the surrounding screen or overlay consumes above and below a picker —
|
|
4753
|
+
* border + padding, title, prompt text, and the keyboard-hints bar. A
|
|
4754
|
+
* deliberately generous estimate: overshooting just shows a few fewer rows,
|
|
4755
|
+
* whereas undershooting lets a long list overflow the viewport (the bug this
|
|
4756
|
+
* windowing guards against). Mirrors GroupedPickerMenu's budgeting.
|
|
4757
|
+
*/
|
|
4758
|
+
const CHROME_OVERHEAD = 13;
|
|
4759
|
+
/**
|
|
4760
|
+
* Max visual rows a picker renders regardless of terminal height. Without a
|
|
4761
|
+
* ceiling a tall terminal lets a long list fill the whole viewport, which
|
|
4762
|
+
* reads as a wall of options; ~12 rows keeps the menu scannable and leaves
|
|
4763
|
+
* known breathing room above and below.
|
|
4764
|
+
*/
|
|
4765
|
+
const MAX_LIST_ROWS = 12;
|
|
4766
|
+
/** Extra rows a multi-select adds below its options: marginTop + Confirm button. */
|
|
4767
|
+
const CONFIRM_CHROME = 3;
|
|
4768
|
+
/** Width the multi-select wraps option descriptions to (matches the render). */
|
|
4769
|
+
const DESCRIPTION_WIDTH = 56;
|
|
4770
|
+
/**
|
|
4771
|
+
* Pages a single-column option list to the terminal height. The visible page
|
|
4772
|
+
* is derived from the focused index — no scroll state — so ↑/↓ flip pages as
|
|
4773
|
+
* focus crosses a page edge and n/p jump a whole page. Pages hold a fixed
|
|
4774
|
+
* option count sized to the tallest row (`rowCost`), trading a sparser page
|
|
4775
|
+
* on mixed-height lists for arithmetic-only paging. Engages only for
|
|
4776
|
+
* single-column pickers — multi-column grids already compress vertically.
|
|
4777
|
+
*/
|
|
4778
|
+
function usePickerViewport(count, rowCost, chromeBelow, enabled, focused) {
|
|
4779
|
+
const [, termRows] = useStdoutDimensions();
|
|
4780
|
+
const budget = Math.max(5, Math.min(termRows - CHROME_OVERHEAD - chromeBelow, MAX_LIST_ROWS));
|
|
4781
|
+
const needsScroll = enabled && count * rowCost > budget;
|
|
4782
|
+
const perPage = needsScroll ? Math.max(1, Math.floor((budget - 2) / rowCost)) : count;
|
|
4783
|
+
const pageCount = Math.max(1, Math.ceil(count / perPage));
|
|
4784
|
+
const start = Math.floor(focused / perPage) * perPage;
|
|
4785
|
+
const end = Math.min(start + perPage, count);
|
|
4786
|
+
return {
|
|
4787
|
+
needsScroll,
|
|
4788
|
+
start,
|
|
4789
|
+
end,
|
|
4790
|
+
hiddenAbove: start,
|
|
4791
|
+
hiddenBelow: count - end,
|
|
4792
|
+
pageStep: (f, dir) => (Math.floor(f / perPage) + dir + pageCount) % pageCount * perPage
|
|
4793
|
+
};
|
|
4719
4794
|
}
|
|
4720
4795
|
const PickerMenu = ({ message, options, mode = "single", centered = false, columns = 1, optionMarginBottom = 0, onSelect }) => {
|
|
4721
4796
|
if (mode === "multi") return /* @__PURE__ */ jsx(MultiPickerMenu, {
|
|
@@ -4739,26 +4814,50 @@ const PickerMenu = ({ message, options, mode = "single", centered = false, colum
|
|
|
4739
4814
|
const SinglePickerMenu = ({ message, options, centered = false, columns = 1, optionMarginBottom = 0, onSelect }) => {
|
|
4740
4815
|
const [focused, setFocused] = useState(() => firstEnabled(options));
|
|
4741
4816
|
const rows = Math.ceil(options.length / columns);
|
|
4817
|
+
const viewport = usePickerViewport(options.length, 1 + optionMarginBottom, 0, columns === 1, focused);
|
|
4742
4818
|
useEffect(() => {
|
|
4743
4819
|
if (focused >= options.length || options[focused]?.disabled) setFocused(firstEnabled(options));
|
|
4744
4820
|
}, [options, focused]);
|
|
4745
|
-
const bindings = [
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4821
|
+
const bindings = [
|
|
4822
|
+
{
|
|
4823
|
+
match: ["upArrow", "downArrow"],
|
|
4824
|
+
label: "↑↓",
|
|
4825
|
+
action: "navigate",
|
|
4826
|
+
handler: (_input, key) => {
|
|
4827
|
+
const dir = key.upArrow ? -1 : 1;
|
|
4828
|
+
if (columns === 1) {
|
|
4829
|
+
const { start, end } = viewport;
|
|
4830
|
+
const span = end - start;
|
|
4831
|
+
let r = focused;
|
|
4832
|
+
for (let i = 0; i < span; i++) {
|
|
4833
|
+
r = start + (r - start + dir + span) % span;
|
|
4834
|
+
if (!options[r]?.disabled) break;
|
|
4835
|
+
}
|
|
4836
|
+
setFocused(r);
|
|
4837
|
+
return;
|
|
4838
|
+
}
|
|
4839
|
+
setFocused(stepEnabled(options, rows, focused, dir));
|
|
4840
|
+
}
|
|
4841
|
+
},
|
|
4842
|
+
...viewport.needsScroll ? [{
|
|
4843
|
+
match: ["n", "p"],
|
|
4844
|
+
label: "n/p",
|
|
4845
|
+
action: "page",
|
|
4846
|
+
handler: (input) => {
|
|
4847
|
+
const target = viewport.pageStep(focused, input === "n" ? 1 : -1);
|
|
4848
|
+
setFocused(options[target]?.disabled ? stepEnabled(options, rows, target, 1) : target);
|
|
4849
|
+
}
|
|
4850
|
+
}] : [],
|
|
4851
|
+
{
|
|
4852
|
+
match: "return",
|
|
4853
|
+
label: "enter",
|
|
4854
|
+
action: "select",
|
|
4855
|
+
handler: () => {
|
|
4856
|
+
const selected = options[focused];
|
|
4857
|
+
if (selected && !selected.disabled) onSelect(selected.value);
|
|
4858
|
+
}
|
|
4760
4859
|
}
|
|
4761
|
-
|
|
4860
|
+
];
|
|
4762
4861
|
if (columns > 1) bindings.splice(1, 0, {
|
|
4763
4862
|
match: ["leftArrow", "rightArrow"],
|
|
4764
4863
|
label: "←→",
|
|
@@ -4782,41 +4881,55 @@ const SinglePickerMenu = ({ message, options, centered = false, columns = 1, opt
|
|
|
4782
4881
|
useKeyBindings("single-picker", bindings);
|
|
4783
4882
|
const columnArrays = [];
|
|
4784
4883
|
for (let c = 0; c < columns; c++) columnArrays.push(options.slice(c * rows, c * rows + rows));
|
|
4884
|
+
const align = centered ? "center" : void 0;
|
|
4885
|
+
const renderOption = (opt, flatIdx) => {
|
|
4886
|
+
const isFocused = flatIdx === focused;
|
|
4887
|
+
const base = opt.hint ? `${opt.label} (${opt.hint})` : opt.label;
|
|
4888
|
+
const label = opt.indent ? ` ${base}` : base;
|
|
4889
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
4890
|
+
gap: 1,
|
|
4891
|
+
marginBottom: optionMarginBottom,
|
|
4892
|
+
children: [
|
|
4893
|
+
/* @__PURE__ */ jsx(Text, {
|
|
4894
|
+
color: isFocused ? Colors.accent : void 0,
|
|
4895
|
+
dimColor: !isFocused,
|
|
4896
|
+
children: isFocused && !opt.header ? Icons.triangleSmallRight : " "
|
|
4897
|
+
}),
|
|
4898
|
+
opt.icon && /* @__PURE__ */ jsx(Text, {
|
|
4899
|
+
color: opt.icon.color,
|
|
4900
|
+
children: opt.icon.glyph
|
|
4901
|
+
}),
|
|
4902
|
+
/* @__PURE__ */ jsx(Text, {
|
|
4903
|
+
color: opt.header ? void 0 : opt.disabled ? Colors.muted : isFocused ? Colors.accent : void 0,
|
|
4904
|
+
bold: opt.header || isFocused && !opt.disabled,
|
|
4905
|
+
dimColor: !opt.header && (!isFocused || opt.disabled),
|
|
4906
|
+
children: label
|
|
4907
|
+
})
|
|
4908
|
+
]
|
|
4909
|
+
}, flatIdx);
|
|
4910
|
+
};
|
|
4785
4911
|
return /* @__PURE__ */ jsxs(Box, {
|
|
4786
4912
|
flexDirection: "column",
|
|
4787
|
-
alignItems:
|
|
4788
|
-
children: [/* @__PURE__ */ jsx(PromptLabel, { message }), /* @__PURE__ */
|
|
4913
|
+
alignItems: align,
|
|
4914
|
+
children: [/* @__PURE__ */ jsx(PromptLabel, { message }), viewport.needsScroll ? /* @__PURE__ */ jsxs(Box, {
|
|
4915
|
+
flexDirection: "column",
|
|
4916
|
+
children: [
|
|
4917
|
+
/* @__PURE__ */ jsx(Text, {
|
|
4918
|
+
dimColor: true,
|
|
4919
|
+
children: viewport.hiddenAbove > 0 ? `↑ ${viewport.hiddenAbove} more [P] for previous page` : " "
|
|
4920
|
+
}),
|
|
4921
|
+
options.slice(viewport.start, viewport.end).map((opt, relIdx) => renderOption(opt, viewport.start + relIdx)),
|
|
4922
|
+
/* @__PURE__ */ jsx(Text, {
|
|
4923
|
+
dimColor: true,
|
|
4924
|
+
children: viewport.hiddenBelow > 0 ? `↓ ${viewport.hiddenBelow} more [N] for next page` : " "
|
|
4925
|
+
})
|
|
4926
|
+
]
|
|
4927
|
+
}) : /* @__PURE__ */ jsx(Box, {
|
|
4789
4928
|
flexDirection: "row",
|
|
4790
4929
|
gap: 4,
|
|
4791
4930
|
children: columnArrays.map((colOpts, colIdx) => /* @__PURE__ */ jsx(Box, {
|
|
4792
4931
|
flexDirection: "column",
|
|
4793
|
-
children: colOpts.map((opt, rowIdx) =>
|
|
4794
|
-
const flatIdx = colIdx * rows + rowIdx;
|
|
4795
|
-
const isFocused = flatIdx === focused;
|
|
4796
|
-
const base = opt.hint ? `${opt.label} (${opt.hint})` : opt.label;
|
|
4797
|
-
const label = opt.indent ? ` ${base}` : base;
|
|
4798
|
-
return /* @__PURE__ */ jsxs(Box, {
|
|
4799
|
-
gap: 1,
|
|
4800
|
-
marginBottom: optionMarginBottom,
|
|
4801
|
-
children: [
|
|
4802
|
-
/* @__PURE__ */ jsx(Text, {
|
|
4803
|
-
color: isFocused ? Colors.accent : void 0,
|
|
4804
|
-
dimColor: !isFocused,
|
|
4805
|
-
children: isFocused && !opt.header ? Icons.triangleSmallRight : " "
|
|
4806
|
-
}),
|
|
4807
|
-
opt.icon && /* @__PURE__ */ jsx(Text, {
|
|
4808
|
-
color: opt.icon.color,
|
|
4809
|
-
children: opt.icon.glyph
|
|
4810
|
-
}),
|
|
4811
|
-
/* @__PURE__ */ jsx(Text, {
|
|
4812
|
-
color: opt.header ? void 0 : opt.disabled ? Colors.muted : isFocused ? Colors.accent : void 0,
|
|
4813
|
-
bold: opt.header || isFocused && !opt.disabled,
|
|
4814
|
-
dimColor: !opt.header && (!isFocused || opt.disabled),
|
|
4815
|
-
children: label
|
|
4816
|
-
})
|
|
4817
|
-
]
|
|
4818
|
-
}, flatIdx);
|
|
4819
|
-
})
|
|
4932
|
+
children: colOpts.map((opt, rowIdx) => renderOption(opt, colIdx * rows + rowIdx))
|
|
4820
4933
|
}, colIdx))
|
|
4821
4934
|
})]
|
|
4822
4935
|
});
|
|
@@ -4838,67 +4951,76 @@ const MultiPickerMenu = ({ message, options, centered = false, columns = 1, opti
|
|
|
4838
4951
|
const [onButton, setOnButton] = useState(false);
|
|
4839
4952
|
const [selected, setSelected] = useState(/* @__PURE__ */ new Set());
|
|
4840
4953
|
const rows = Math.ceil(options.length / columns);
|
|
4954
|
+
const rowCost = options.reduce((max, opt) => Math.max(max, 1 + optionMarginBottom + (opt.description ? wordWrap(opt.description, DESCRIPTION_WIDTH).length : 0)), 1);
|
|
4955
|
+
const viewport = usePickerViewport(options.length, rowCost, CONFIRM_CHROME, columns === 1, focused);
|
|
4841
4956
|
useEffect(() => {
|
|
4842
4957
|
if (focused >= options.length || options[focused]?.disabled) setFocused(firstEnabled(options));
|
|
4843
4958
|
}, [options, focused]);
|
|
4844
4959
|
const confirm = () => {
|
|
4845
4960
|
onSelect([...selected].sort((a, b) => a - b).map((i) => options[i].value));
|
|
4846
4961
|
};
|
|
4847
|
-
const bindings = [
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4962
|
+
const bindings = [
|
|
4963
|
+
{
|
|
4964
|
+
match: ["upArrow", "downArrow"],
|
|
4965
|
+
label: "↑↓",
|
|
4966
|
+
action: "navigate",
|
|
4967
|
+
handler: (_input, key) => {
|
|
4968
|
+
const dir = key.upArrow ? -1 : 1;
|
|
4853
4969
|
if (onButton) {
|
|
4854
4970
|
setOnButton(false);
|
|
4855
|
-
setFocused(lastEnabled(options));
|
|
4971
|
+
setFocused(dir === -1 ? lastEnabled(options, viewport.start, viewport.end) : firstEnabled(options, viewport.start, viewport.end));
|
|
4856
4972
|
return;
|
|
4857
4973
|
}
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
}
|
|
4864
|
-
if (key.downArrow) {
|
|
4865
|
-
if (onButton) {
|
|
4866
|
-
setOnButton(false);
|
|
4867
|
-
setFocused(firstEnabled(options));
|
|
4974
|
+
if (columns === 1) {
|
|
4975
|
+
let r = focused + dir;
|
|
4976
|
+
while (r >= viewport.start && r < viewport.end && options[r]?.disabled) r += dir;
|
|
4977
|
+
if (r >= viewport.start && r < viewport.end) setFocused(r);
|
|
4978
|
+
else setOnButton(true);
|
|
4868
4979
|
return;
|
|
4869
4980
|
}
|
|
4870
4981
|
const col = Math.floor(focused / rows);
|
|
4871
4982
|
const row = focused % rows;
|
|
4872
4983
|
const colLen = Math.min(rows, options.length - col * rows);
|
|
4873
|
-
let r = row +
|
|
4874
|
-
while (r < colLen && options[col * rows + r]?.disabled) r
|
|
4875
|
-
if (r < colLen) setFocused(col * rows + r);
|
|
4984
|
+
let r = row + dir;
|
|
4985
|
+
while (r >= 0 && r < colLen && options[col * rows + r]?.disabled) r += dir;
|
|
4986
|
+
if (r >= 0 && r < colLen) setFocused(col * rows + r);
|
|
4876
4987
|
else setOnButton(true);
|
|
4877
4988
|
}
|
|
4878
|
-
}
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4989
|
+
},
|
|
4990
|
+
...viewport.needsScroll ? [{
|
|
4991
|
+
match: ["n", "p"],
|
|
4992
|
+
label: "n/p",
|
|
4993
|
+
action: "page",
|
|
4994
|
+
handler: (input) => {
|
|
4995
|
+
const target = viewport.pageStep(focused, input === "n" ? 1 : -1);
|
|
4996
|
+
setOnButton(false);
|
|
4997
|
+
setFocused(options[target]?.disabled ? stepEnabled(options, rows, target, 1) : target);
|
|
4887
4998
|
}
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4999
|
+
}] : [],
|
|
5000
|
+
{
|
|
5001
|
+
match: ["space", "return"],
|
|
5002
|
+
label: "enter",
|
|
5003
|
+
action: "select",
|
|
5004
|
+
handler: () => {
|
|
5005
|
+
if (onButton) {
|
|
5006
|
+
confirm();
|
|
5007
|
+
return;
|
|
4894
5008
|
}
|
|
4895
|
-
if (options[focused]?.
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
5009
|
+
if (options[focused]?.disabled) return;
|
|
5010
|
+
setSelected((prev) => {
|
|
5011
|
+
const next = new Set(prev);
|
|
5012
|
+
if (next.has(focused)) {
|
|
5013
|
+
next.delete(focused);
|
|
5014
|
+
return next;
|
|
5015
|
+
}
|
|
5016
|
+
if (options[focused]?.exclusive) return new Set([focused]);
|
|
5017
|
+
for (const i of next) if (options[i]?.exclusive) next.delete(i);
|
|
5018
|
+
next.add(focused);
|
|
5019
|
+
return next;
|
|
5020
|
+
});
|
|
5021
|
+
}
|
|
4900
5022
|
}
|
|
4901
|
-
|
|
5023
|
+
];
|
|
4902
5024
|
if (columns > 1) bindings.splice(1, 0, {
|
|
4903
5025
|
match: ["leftArrow", "rightArrow"],
|
|
4904
5026
|
label: "←→",
|
|
@@ -4923,57 +5045,72 @@ const MultiPickerMenu = ({ message, options, centered = false, columns = 1, opti
|
|
|
4923
5045
|
useKeyBindings("multi-picker", bindings);
|
|
4924
5046
|
const columnArrays = [];
|
|
4925
5047
|
for (let c = 0; c < columns; c++) columnArrays.push(options.slice(c * rows, c * rows + rows));
|
|
5048
|
+
const renderOption = (opt, flatIdx) => {
|
|
5049
|
+
const isFocused = !onButton && flatIdx === focused;
|
|
5050
|
+
const isSelected = selected.has(flatIdx);
|
|
5051
|
+
const label = opt.hint ? `${opt.label} (${opt.hint})` : opt.label;
|
|
5052
|
+
const checkbox = isSelected ? Icons.squareFilled : Icons.squareOpen;
|
|
5053
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
5054
|
+
flexDirection: "column",
|
|
5055
|
+
marginBottom: optionMarginBottom,
|
|
5056
|
+
children: [/* @__PURE__ */ jsxs(Box, {
|
|
5057
|
+
gap: 1,
|
|
5058
|
+
children: [
|
|
5059
|
+
/* @__PURE__ */ jsx(Text, {
|
|
5060
|
+
color: isSelected ? "white" : Colors.muted,
|
|
5061
|
+
dimColor: !isFocused && !isSelected,
|
|
5062
|
+
children: checkbox
|
|
5063
|
+
}),
|
|
5064
|
+
opt.icon && /* @__PURE__ */ jsx(Text, {
|
|
5065
|
+
color: opt.icon.color,
|
|
5066
|
+
children: opt.icon.glyph
|
|
5067
|
+
}),
|
|
5068
|
+
/* @__PURE__ */ jsx(Text, {
|
|
5069
|
+
color: opt.disabled ? Colors.muted : isFocused ? Colors.accent : void 0,
|
|
5070
|
+
bold: isFocused && !opt.disabled,
|
|
5071
|
+
dimColor: !isFocused || opt.disabled,
|
|
5072
|
+
children: label
|
|
5073
|
+
})
|
|
5074
|
+
]
|
|
5075
|
+
}), opt.description && /* @__PURE__ */ jsx(Box, {
|
|
5076
|
+
marginLeft: 4,
|
|
5077
|
+
width: DESCRIPTION_WIDTH,
|
|
5078
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
5079
|
+
dimColor: true,
|
|
5080
|
+
wrap: "wrap",
|
|
5081
|
+
children: opt.description
|
|
5082
|
+
})
|
|
5083
|
+
})]
|
|
5084
|
+
}, flatIdx);
|
|
5085
|
+
};
|
|
4926
5086
|
return /* @__PURE__ */ jsxs(Box, {
|
|
4927
5087
|
flexDirection: "column",
|
|
4928
5088
|
alignItems: centered ? "center" : void 0,
|
|
4929
5089
|
children: [
|
|
4930
5090
|
/* @__PURE__ */ jsx(PromptLabel, { message }),
|
|
4931
|
-
/* @__PURE__ */
|
|
5091
|
+
viewport.needsScroll ? /* @__PURE__ */ jsxs(Box, {
|
|
5092
|
+
flexDirection: "column",
|
|
5093
|
+
marginLeft: centered ? 0 : 2,
|
|
5094
|
+
marginTop: message ? 1 : 0,
|
|
5095
|
+
children: [
|
|
5096
|
+
/* @__PURE__ */ jsx(Text, {
|
|
5097
|
+
dimColor: true,
|
|
5098
|
+
children: viewport.hiddenAbove > 0 ? `↑ ${viewport.hiddenAbove} more [P] for previous page` : " "
|
|
5099
|
+
}),
|
|
5100
|
+
options.slice(viewport.start, viewport.end).map((opt, relIdx) => renderOption(opt, viewport.start + relIdx)),
|
|
5101
|
+
/* @__PURE__ */ jsx(Text, {
|
|
5102
|
+
dimColor: true,
|
|
5103
|
+
children: viewport.hiddenBelow > 0 ? `↓ ${viewport.hiddenBelow} more [N] for next page` : " "
|
|
5104
|
+
})
|
|
5105
|
+
]
|
|
5106
|
+
}) : /* @__PURE__ */ jsx(Box, {
|
|
4932
5107
|
flexDirection: "row",
|
|
4933
5108
|
gap: 4,
|
|
4934
5109
|
marginLeft: centered ? 0 : 2,
|
|
4935
|
-
marginTop: 1,
|
|
5110
|
+
marginTop: message ? 1 : 0,
|
|
4936
5111
|
children: columnArrays.map((colOpts, colIdx) => /* @__PURE__ */ jsx(Box, {
|
|
4937
5112
|
flexDirection: "column",
|
|
4938
|
-
children: colOpts.map((opt, rowIdx) =>
|
|
4939
|
-
const flatIdx = colIdx * rows + rowIdx;
|
|
4940
|
-
const isFocused = !onButton && flatIdx === focused;
|
|
4941
|
-
const isSelected = selected.has(flatIdx);
|
|
4942
|
-
const label = opt.hint ? `${opt.label} (${opt.hint})` : opt.label;
|
|
4943
|
-
const checkbox = isSelected ? Icons.squareFilled : Icons.squareOpen;
|
|
4944
|
-
return /* @__PURE__ */ jsxs(Box, {
|
|
4945
|
-
flexDirection: "column",
|
|
4946
|
-
marginBottom: optionMarginBottom,
|
|
4947
|
-
children: [/* @__PURE__ */ jsxs(Box, {
|
|
4948
|
-
gap: 1,
|
|
4949
|
-
children: [
|
|
4950
|
-
/* @__PURE__ */ jsx(Text, {
|
|
4951
|
-
color: isSelected ? "white" : Colors.muted,
|
|
4952
|
-
dimColor: !isFocused && !isSelected,
|
|
4953
|
-
children: checkbox
|
|
4954
|
-
}),
|
|
4955
|
-
opt.icon && /* @__PURE__ */ jsx(Text, {
|
|
4956
|
-
color: opt.icon.color,
|
|
4957
|
-
children: opt.icon.glyph
|
|
4958
|
-
}),
|
|
4959
|
-
/* @__PURE__ */ jsx(Text, {
|
|
4960
|
-
color: opt.disabled ? Colors.muted : isFocused ? Colors.accent : void 0,
|
|
4961
|
-
bold: isFocused && !opt.disabled,
|
|
4962
|
-
dimColor: !isFocused || opt.disabled,
|
|
4963
|
-
children: label
|
|
4964
|
-
})
|
|
4965
|
-
]
|
|
4966
|
-
}), opt.description && /* @__PURE__ */ jsx(Box, {
|
|
4967
|
-
marginLeft: 4,
|
|
4968
|
-
width: 56,
|
|
4969
|
-
children: /* @__PURE__ */ jsx(Text, {
|
|
4970
|
-
dimColor: true,
|
|
4971
|
-
wrap: "wrap",
|
|
4972
|
-
children: opt.description
|
|
4973
|
-
})
|
|
4974
|
-
})]
|
|
4975
|
-
}, flatIdx);
|
|
4976
|
-
})
|
|
5113
|
+
children: colOpts.map((opt, rowIdx) => renderOption(opt, colIdx * rows + rowIdx))
|
|
4977
5114
|
}, colIdx))
|
|
4978
5115
|
}),
|
|
4979
5116
|
/* @__PURE__ */ jsx(Box, {
|
|
@@ -5169,7 +5306,7 @@ async function runDoctorCI(options) {
|
|
|
5169
5306
|
getUI().intro("Welcome to the PostHog setup wizard");
|
|
5170
5307
|
getUI().log.info("Running posthog-doctor in CI mode");
|
|
5171
5308
|
try {
|
|
5172
|
-
const { getOrAskForProjectData } = await import("./setup-utils-
|
|
5309
|
+
const { getOrAskForProjectData } = await import("./setup-utils-t0jzKwBE.js").then((n) => n.r);
|
|
5173
5310
|
const { host, accessToken, projectId } = await getOrAskForProjectData({
|
|
5174
5311
|
signup: false,
|
|
5175
5312
|
ci: true,
|
|
@@ -5187,7 +5324,7 @@ async function runDoctorCI(options) {
|
|
|
5187
5324
|
for (const issue of sorted) getUI().log.info(` • [${issue.severity}] ${getKindMeta(issue.kind).title}`);
|
|
5188
5325
|
process.exit(1);
|
|
5189
5326
|
} catch (error) {
|
|
5190
|
-
const { ApiError } = await import("./api-
|
|
5327
|
+
const { ApiError } = await import("./api-CXk-efCU.js").then((n) => n.n);
|
|
5191
5328
|
const message = error instanceof ApiError && error.statusCode === 401 ? "Your PostHog API key is invalid or expired." : error instanceof Error ? error.message : String(error);
|
|
5192
5329
|
getUI().log.error(`Doctor failed: ${message}`);
|
|
5193
5330
|
process.exit(1);
|
|
@@ -5269,7 +5406,7 @@ function runSlackConnect(argv) {
|
|
|
5269
5406
|
(async () => {
|
|
5270
5407
|
const debug = argv.debug;
|
|
5271
5408
|
try {
|
|
5272
|
-
const { startTUI } = await import("./start-tui-
|
|
5409
|
+
const { startTUI } = await import("./start-tui-CK3rpaKD.js");
|
|
5273
5410
|
const { buildSession } = await import("./wizard-session-C5lZPPEc.js");
|
|
5274
5411
|
const tui = startTUI(VERSION, Program.SlackConnect);
|
|
5275
5412
|
tui.store.session = buildSession({
|
|
@@ -5552,6 +5689,6 @@ function resolveInstallDir() {
|
|
|
5552
5689
|
}
|
|
5553
5690
|
Wizard.use(basicIntegrationCommand).use(mcpCommand).use(mcpAnalyticsCommand).use(aiObservabilityCommand).use(cliCommand).use(auditCommand).use(doctorCommand).use(migrateCommand).use(revenueCommand).use(warehouseCommand).use(selfDrivingCommand).use(slackCommand).use(uploadSourcemapsCommand).use(skillCommand).init();
|
|
5554
5691
|
//#endregion
|
|
5555
|
-
export { STRIPE_SDKS as S,
|
|
5692
|
+
export { STRIPE_SDKS as C, POSTHOG_SDKS as S, DISPLAY_NAME as _, useStdoutDimensions as a, fetchHealthIssues as b, runWizardHeadless as c, PROGRAM_REGISTRY as d, Program as f, AUTOMATABLE_VARIANTS as g, SELF_DRIVING_INTEGRATE_PATH_KEY as h, useKeyboardHintsContext as i, runWizardCI as l, detectSelfDrivingIntegrationProjects as m, useKeyBindings as n, ConfirmButton as o, getProgramConfig as p, KeyboardHintsProvider as r, PromptLabel as s, PickerMenu as t, runWizard as u, SOURCE_MAPS_CONTEXT_KEYS as v, getContentBlocks$3 as x, getKindMeta as y };
|
|
5556
5693
|
|
|
5557
5694
|
//# sourceMappingURL=bin.js.map
|