@posthog/wizard 2.26.0 → 2.28.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/README.md +14 -1
- package/dist/{add-mcp-server-to-clients-C58l_KpV.js → add-mcp-server-to-clients-BzCc6be4.js} +4 -4
- package/dist/{add-mcp-server-to-clients-C58l_KpV.js.map → add-mcp-server-to-clients-BzCc6be4.js.map} +1 -1
- package/dist/{agent-interface-Dq_4h2eN.js → agent-interface-DRsyO_6R.js} +5 -5
- package/dist/{agent-interface-Dq_4h2eN.js.map → agent-interface-DRsyO_6R.js.map} +1 -1
- package/dist/{agent-runner-BNGW3osc.js → agent-runner-MPlvLP8K.js} +9 -9
- package/dist/{agent-runner-BNGW3osc.js.map → agent-runner-MPlvLP8K.js.map} +1 -1
- package/dist/{analytics-BX3LKPch.js → analytics-Ds4CvvcU.js} +2 -2
- package/dist/{analytics-BX3LKPch.js.map → analytics-Ds4CvvcU.js.map} +1 -1
- package/dist/{api-DCHci5SD.js → api-Dye-Pi5r.js} +3 -3
- package/dist/{api-DCHci5SD.js.map → api-Dye-Pi5r.js.map} +1 -1
- package/dist/bin.js +613 -36
- package/dist/bin.js.map +1 -1
- package/dist/{ci-install-CHIbwXio.js → ci-install-6P61txQ4.js} +4 -4
- package/dist/{ci-install-CHIbwXio.js.map → ci-install-6P61txQ4.js.map} +1 -1
- package/dist/{debug-BizeRFR0.js → debug-BDwqX9QZ.js} +2 -2
- package/dist/{debug-BizeRFR0.js.map → debug-BDwqX9QZ.js.map} +1 -1
- package/dist/{debug-fg4BAKKA.js → debug-D2iIa763.js} +1 -1
- package/dist/{environment-DS5Pq9Wm.js → environment-BaqpBPme.js} +3 -3
- package/dist/{environment-DS5Pq9Wm.js.map → environment-BaqpBPme.js.map} +1 -1
- package/dist/file-utils-YnB1jGgs.js +116 -0
- package/dist/file-utils-YnB1jGgs.js.map +1 -0
- package/dist/{interactive-DE3WDjk7.js → interactive-DU3K6B8R.js} +2 -2
- package/dist/{interactive-DE3WDjk7.js.map → interactive-DU3K6B8R.js.map} +1 -1
- package/dist/{mcp-prompt-streaming-zsYd1zJx.js → mcp-prompt-streaming-BQeDKkGA.js} +4 -4
- package/dist/{mcp-prompt-streaming-zsYd1zJx.js.map → mcp-prompt-streaming-BQeDKkGA.js.map} +1 -1
- package/dist/{non-interactive-DNah9u3t.js → non-interactive-BJctvoie.js} +2 -2
- package/dist/{non-interactive-DNah9u3t.js.map → non-interactive-BJctvoie.js.map} +1 -1
- package/dist/{package-manager-Dma9-zGs.js → package-manager-BErboBJc.js} +2 -2
- package/dist/{package-manager-Dma9-zGs.js.map → package-manager-BErboBJc.js.map} +1 -1
- package/dist/{playground-Cwe0Q9HW.js → playground-X-wOeuhv.js} +5 -5
- package/dist/{playground-Cwe0Q9HW.js.map → playground-X-wOeuhv.js.map} +1 -1
- package/dist/{posthog-integration-CAYZdk0r.js → posthog-integration-Bh31wBAT.js} +12 -12
- package/dist/{posthog-integration-CAYZdk0r.js.map → posthog-integration-Bh31wBAT.js.map} +1 -1
- package/dist/{provisioning-BmL4ro-o.js → provisioning-DpdPWuzQ.js} +3 -3
- package/dist/{provisioning-BmL4ro-o.js.map → provisioning-DpdPWuzQ.js.map} +1 -1
- package/dist/{registry-C3wcDM3X.js → registry-CSy1ilMT.js} +4 -4
- package/dist/{registry-C3wcDM3X.js.map → registry-CSy1ilMT.js.map} +1 -1
- package/dist/{setup-utils-CNWIMZ-d.js → setup-utils-STqW1cwa.js} +18 -8
- package/dist/setup-utils-STqW1cwa.js.map +1 -0
- package/dist/{start-tui-CS802Ww9.js → start-tui-BQJQ9_KJ.js} +176 -16
- package/dist/start-tui-BQJQ9_KJ.js.map +1 -0
- package/dist/{steps-BX44xr30.js → steps-BxSRheOs.js} +7 -6
- package/dist/{steps-BX44xr30.js.map → steps-BxSRheOs.js.map} +1 -1
- package/dist/{telemetry-BH-MgWPT.js → telemetry-De90OWXL.js} +3 -3
- package/dist/{telemetry-BH-MgWPT.js.map → telemetry-De90OWXL.js.map} +1 -1
- package/dist/{terminal-BSiupnOQ.js → terminal-D430k0Z1.js} +9 -9
- package/dist/terminal-D430k0Z1.js.map +1 -0
- package/dist/{urls-BuEABcmF.js → urls-DDUXt-oY.js} +2 -2
- package/dist/{urls-BuEABcmF.js.map → urls-DDUXt-oY.js.map} +1 -1
- package/dist/{wizard-abort-Dl2MJOP9.js → wizard-abort-B_Ri4Ant.js} +3 -3
- package/dist/{wizard-abort-Dl2MJOP9.js.map → wizard-abort-B_Ri4Ant.js.map} +1 -1
- package/dist/{wizard-abort-CR3w2Efg.js → wizard-abort-Cht_9Mo0.js} +1 -1
- package/package.json +1 -1
- package/dist/file-utils-VAXoyXVA.js +0 -38
- package/dist/file-utils-VAXoyXVA.js.map +0 -1
- package/dist/setup-utils-CNWIMZ-d.js.map +0 -1
- package/dist/start-tui-CS802Ww9.js.map +0 -1
- package/dist/terminal-BSiupnOQ.js.map +0 -1
package/dist/bin.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as getSkillsBaseUrl, P as POSTHOG_DOCS_URL, X as WIZARD_USER_AGENT, _ as SIGNUP_WIZARD_READINESS_CONFIG, a as getLogFilePath, et as VERSION, h as LoggingUI, m as setUI, p as getUI, r as debug, s as logToFile, v as evaluateWizardReadiness, y as getBlockingServiceKeys } from "./debug-
|
|
3
|
-
import { t as analytics } from "./analytics-
|
|
4
|
-
import { r as setEntryCommand } from "./telemetry-
|
|
5
|
-
import { n as isUsingTypeScript } from "./setup-utils-
|
|
6
|
-
import { a as getUiHostFromHost, n as getCloudUrlFromRegion } from "./urls-
|
|
7
|
-
import { o as handleApiError } from "./api-
|
|
2
|
+
import { $ as getSkillsBaseUrl, P as POSTHOG_DOCS_URL, X as WIZARD_USER_AGENT, _ as SIGNUP_WIZARD_READINESS_CONFIG, a as getLogFilePath, et as VERSION, h as LoggingUI, m as setUI, p as getUI, r as debug, s as logToFile, v as evaluateWizardReadiness, y as getBlockingServiceKeys } from "./debug-BDwqX9QZ.js";
|
|
3
|
+
import { t as analytics } from "./analytics-Ds4CvvcU.js";
|
|
4
|
+
import { r as setEntryCommand } from "./telemetry-De90OWXL.js";
|
|
5
|
+
import { n as isUsingTypeScript } from "./setup-utils-STqW1cwa.js";
|
|
6
|
+
import { a as getUiHostFromHost, n as getCloudUrlFromRegion } from "./urls-DDUXt-oY.js";
|
|
7
|
+
import { o as handleApiError } from "./api-Dye-Pi5r.js";
|
|
8
8
|
import "./wizard-session-G3VWD6hv.js";
|
|
9
|
-
import { r as runCleanups } from "./wizard-abort-
|
|
10
|
-
import { n as isNonInteractiveEnvironment } from "./environment-
|
|
11
|
-
import { S as AUDIT_REPORT_FILE, b as AUDIT_CHECKS_FILE, c as recoverOrphanedSettingsBackups, h as fetchSkillMenu, p as WIZARD_TOOL_NAMES, u as AgentSignals, x as AUDIT_CHECKS_KEY } from "./agent-interface-
|
|
12
|
-
import { i as SPINNER_MESSAGE } from "./registry-
|
|
13
|
-
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, p as Icons, r as FUNNEL_BLOCK } from "./posthog-integration-
|
|
14
|
-
import { t as IGNORED_DIRS } from "./file-utils-
|
|
9
|
+
import { r as runCleanups } from "./wizard-abort-B_Ri4Ant.js";
|
|
10
|
+
import { n as isNonInteractiveEnvironment } from "./environment-BaqpBPme.js";
|
|
11
|
+
import { S as AUDIT_REPORT_FILE, b as AUDIT_CHECKS_FILE, c as recoverOrphanedSettingsBackups, h as fetchSkillMenu, p as WIZARD_TOOL_NAMES, u as AgentSignals, x as AUDIT_CHECKS_KEY } from "./agent-interface-DRsyO_6R.js";
|
|
12
|
+
import { i as SPINNER_MESSAGE } from "./registry-CSy1ilMT.js";
|
|
13
|
+
import { _ as parseRequirementsTxt, a as PRODUCT_SUITE_BLOCK, f as Colors, g as parsePyprojectToml, h as parsePipfile, i as LINE_CHART_BLOCK, l as isClearBlock, m as HEALTH_CHECK_STEP, n as posthogIntegrationConfig, o as StatusPeekTrigger, p as Icons, r as FUNNEL_BLOCK } from "./posthog-integration-Bh31wBAT.js";
|
|
14
|
+
import { n as safeReadFile, r as walkProjectFiles, t as IGNORED_DIRS } from "./file-utils-YnB1jGgs.js";
|
|
15
15
|
import { n as readApiKeyFromEnv } from "./env-api-key-MlzJYAvt.js";
|
|
16
16
|
import { satisfies } from "semver";
|
|
17
17
|
import yargs from "yargs";
|
|
@@ -190,7 +190,7 @@ function runProvision(argv) {
|
|
|
190
190
|
}
|
|
191
191
|
async function provision({ email, region, name, jsonMode }) {
|
|
192
192
|
try {
|
|
193
|
-
const { provisionNewAccount } = await import("./provisioning-
|
|
193
|
+
const { provisionNewAccount } = await import("./provisioning-DpdPWuzQ.js").then((n) => n.n);
|
|
194
194
|
if (!jsonMode) getUI().log.info(`Provisioning account for ${email} in ${region}...`);
|
|
195
195
|
emitResult(await provisionNewAccount(email, name, region), jsonMode);
|
|
196
196
|
process.exit(0);
|
|
@@ -255,18 +255,18 @@ const basicIntegrationCommand = {
|
|
|
255
255
|
setEntryCommand("integrate");
|
|
256
256
|
(async () => {
|
|
257
257
|
if (argv.ci) {
|
|
258
|
-
const { runCIInstall } = await import("./ci-install-
|
|
258
|
+
const { runCIInstall } = await import("./ci-install-6P61txQ4.js");
|
|
259
259
|
return runCIInstall(argv);
|
|
260
260
|
}
|
|
261
261
|
if (isNonInteractiveEnvironment()) {
|
|
262
|
-
const { failNonInteractive } = await import("./non-interactive-
|
|
262
|
+
const { failNonInteractive } = await import("./non-interactive-BJctvoie.js");
|
|
263
263
|
return failNonInteractive();
|
|
264
264
|
}
|
|
265
265
|
if (argv.playground) {
|
|
266
|
-
const { runPlayground } = await import("./playground-
|
|
266
|
+
const { runPlayground } = await import("./playground-X-wOeuhv.js");
|
|
267
267
|
return runPlayground();
|
|
268
268
|
}
|
|
269
|
-
const { runInteractive } = await import("./interactive-
|
|
269
|
+
const { runInteractive } = await import("./interactive-DU3K6B8R.js");
|
|
270
270
|
runInteractive(argv);
|
|
271
271
|
})();
|
|
272
272
|
}
|
|
@@ -509,6 +509,571 @@ const revenueAnalyticsConfig = {
|
|
|
509
509
|
requires: ["posthog-integration"]
|
|
510
510
|
};
|
|
511
511
|
//#endregion
|
|
512
|
+
//#region src/lib/warehouse-sources/registry.ts
|
|
513
|
+
const SOURCE_DETECTORS = [
|
|
514
|
+
{
|
|
515
|
+
kind: "Postgres",
|
|
516
|
+
label: "PostgreSQL",
|
|
517
|
+
mode: "in-cli",
|
|
518
|
+
signals: {
|
|
519
|
+
npm: [
|
|
520
|
+
"pg",
|
|
521
|
+
"postgres",
|
|
522
|
+
"postgres.js",
|
|
523
|
+
"knex",
|
|
524
|
+
"sequelize"
|
|
525
|
+
],
|
|
526
|
+
python: [
|
|
527
|
+
"psycopg",
|
|
528
|
+
"psycopg2",
|
|
529
|
+
"psycopg2-binary",
|
|
530
|
+
"asyncpg"
|
|
531
|
+
],
|
|
532
|
+
ruby: ["pg"],
|
|
533
|
+
envKeys: [
|
|
534
|
+
/^DATABASE_URL$/,
|
|
535
|
+
/^POSTGRES_/,
|
|
536
|
+
/^PG(HOST|DATABASE|USER|PORT)$/
|
|
537
|
+
]
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
kind: "MySQL",
|
|
542
|
+
label: "MySQL",
|
|
543
|
+
mode: "in-cli",
|
|
544
|
+
signals: {
|
|
545
|
+
npm: ["mysql", "mysql2"],
|
|
546
|
+
python: [
|
|
547
|
+
"pymysql",
|
|
548
|
+
"mysqlclient",
|
|
549
|
+
"mysql-connector-python"
|
|
550
|
+
],
|
|
551
|
+
ruby: ["mysql2"],
|
|
552
|
+
envKeys: [/^MYSQL_/]
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
kind: "MongoDB",
|
|
557
|
+
label: "MongoDB",
|
|
558
|
+
mode: "in-cli",
|
|
559
|
+
signals: {
|
|
560
|
+
npm: ["mongodb", "mongoose"],
|
|
561
|
+
python: ["pymongo", "motor"],
|
|
562
|
+
ruby: ["mongo", "mongoid"],
|
|
563
|
+
envKeys: [/^MONGO(DB)?_/]
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
kind: "Snowflake",
|
|
568
|
+
label: "Snowflake",
|
|
569
|
+
mode: "in-cli",
|
|
570
|
+
signals: {
|
|
571
|
+
npm: ["snowflake-sdk"],
|
|
572
|
+
python: ["snowflake-connector-python", "snowflake-sqlalchemy"],
|
|
573
|
+
envKeys: [/^SNOWFLAKE_/]
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
kind: "BigQuery",
|
|
578
|
+
label: "BigQuery",
|
|
579
|
+
mode: "in-cli",
|
|
580
|
+
signals: {
|
|
581
|
+
npm: ["@google-cloud/bigquery"],
|
|
582
|
+
python: ["google-cloud-bigquery"],
|
|
583
|
+
envKeys: [/^BIGQUERY_/]
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
kind: "Redshift",
|
|
588
|
+
label: "Redshift",
|
|
589
|
+
mode: "in-cli",
|
|
590
|
+
signals: {
|
|
591
|
+
npm: ["node-redshift"],
|
|
592
|
+
python: ["redshift-connector"],
|
|
593
|
+
envKeys: [/^REDSHIFT_/]
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
kind: "MSSQL",
|
|
598
|
+
label: "SQL Server",
|
|
599
|
+
mode: "in-cli",
|
|
600
|
+
signals: {
|
|
601
|
+
npm: ["mssql", "tedious"],
|
|
602
|
+
python: ["pyodbc", "pymssql"],
|
|
603
|
+
envKeys: [/^MSSQL_/]
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
kind: "Supabase",
|
|
608
|
+
label: "Supabase",
|
|
609
|
+
mode: "in-cli",
|
|
610
|
+
signals: {
|
|
611
|
+
npm: ["@supabase/supabase-js"],
|
|
612
|
+
python: ["supabase"],
|
|
613
|
+
envKeys: [/^SUPABASE_/]
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
kind: "ClickHouse",
|
|
618
|
+
label: "ClickHouse",
|
|
619
|
+
mode: "in-cli",
|
|
620
|
+
signals: {
|
|
621
|
+
npm: ["@clickhouse/client"],
|
|
622
|
+
python: ["clickhouse-connect", "clickhouse-driver"],
|
|
623
|
+
envKeys: [/^CLICKHOUSE_/]
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
kind: "Convex",
|
|
628
|
+
label: "Convex",
|
|
629
|
+
mode: "in-cli",
|
|
630
|
+
signals: {
|
|
631
|
+
npm: ["convex"],
|
|
632
|
+
python: ["convex"],
|
|
633
|
+
envKeys: [/^CONVEX_/, /^NEXT_PUBLIC_CONVEX_URL$/]
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
kind: "Stripe",
|
|
638
|
+
label: "Stripe",
|
|
639
|
+
mode: "in-cli",
|
|
640
|
+
signals: {
|
|
641
|
+
npm: [
|
|
642
|
+
"stripe",
|
|
643
|
+
"@stripe/stripe-js",
|
|
644
|
+
"@stripe/react-stripe-js"
|
|
645
|
+
],
|
|
646
|
+
python: ["stripe"],
|
|
647
|
+
ruby: ["stripe"],
|
|
648
|
+
envKeys: [/^STRIPE_(SECRET|API)_KEY$/]
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
kind: "Clerk",
|
|
653
|
+
label: "Clerk",
|
|
654
|
+
mode: "in-cli",
|
|
655
|
+
signals: {
|
|
656
|
+
npm: [
|
|
657
|
+
"@clerk/nextjs",
|
|
658
|
+
"@clerk/clerk-react",
|
|
659
|
+
"@clerk/backend",
|
|
660
|
+
"@clerk/express",
|
|
661
|
+
"@clerk/fastify",
|
|
662
|
+
"@clerk/remix"
|
|
663
|
+
],
|
|
664
|
+
envKeys: [/^CLERK_SECRET_KEY$/, /^NEXT_PUBLIC_CLERK_/]
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
kind: "Resend",
|
|
669
|
+
label: "Resend",
|
|
670
|
+
mode: "in-cli",
|
|
671
|
+
signals: {
|
|
672
|
+
npm: ["resend"],
|
|
673
|
+
python: ["resend"],
|
|
674
|
+
envKeys: [/^RESEND_API_KEY$/]
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
kind: "Shopify",
|
|
679
|
+
label: "Shopify",
|
|
680
|
+
mode: "in-cli",
|
|
681
|
+
signals: {
|
|
682
|
+
npm: ["@shopify/shopify-api", "shopify-api-node"],
|
|
683
|
+
python: ["shopifyapi"],
|
|
684
|
+
envKeys: [/^SHOPIFY_/]
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
kind: "Klaviyo",
|
|
689
|
+
label: "Klaviyo",
|
|
690
|
+
mode: "in-cli",
|
|
691
|
+
signals: {
|
|
692
|
+
npm: ["klaviyo-api"],
|
|
693
|
+
python: ["klaviyo-api"],
|
|
694
|
+
envKeys: [/^KLAVIYO_/]
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
kind: "Chargebee",
|
|
699
|
+
label: "Chargebee",
|
|
700
|
+
mode: "in-cli",
|
|
701
|
+
signals: {
|
|
702
|
+
npm: ["chargebee"],
|
|
703
|
+
python: ["chargebee"],
|
|
704
|
+
envKeys: [/^CHARGEBEE_/]
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
kind: "Paddle",
|
|
709
|
+
label: "Paddle",
|
|
710
|
+
mode: "in-cli",
|
|
711
|
+
signals: {
|
|
712
|
+
npm: ["@paddle/paddle-node-sdk", "@paddle/paddle-js"],
|
|
713
|
+
envKeys: [/^PADDLE_/]
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
kind: "Polar",
|
|
718
|
+
label: "Polar",
|
|
719
|
+
mode: "in-cli",
|
|
720
|
+
signals: {
|
|
721
|
+
npm: ["@polar-sh/sdk", "@polar-sh/nextjs"],
|
|
722
|
+
envKeys: [/^POLAR_/]
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
kind: "Mailchimp",
|
|
727
|
+
label: "Mailchimp",
|
|
728
|
+
mode: "in-cli",
|
|
729
|
+
signals: {
|
|
730
|
+
npm: ["@mailchimp/mailchimp_marketing"],
|
|
731
|
+
python: ["mailchimp-marketing"],
|
|
732
|
+
envKeys: [/^MAILCHIMP_/]
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
kind: "CustomerIO",
|
|
737
|
+
label: "Customer.io",
|
|
738
|
+
mode: "in-cli",
|
|
739
|
+
signals: {
|
|
740
|
+
npm: ["customerio-node"],
|
|
741
|
+
python: ["customerio"],
|
|
742
|
+
envKeys: [/^CUSTOMER_?IO_/]
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
kind: "Typeform",
|
|
747
|
+
label: "Typeform",
|
|
748
|
+
mode: "in-cli",
|
|
749
|
+
signals: {
|
|
750
|
+
npm: ["@typeform/api-client"],
|
|
751
|
+
envKeys: [/^TYPEFORM_/]
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
kind: "Sentry",
|
|
756
|
+
label: "Sentry",
|
|
757
|
+
mode: "in-cli",
|
|
758
|
+
signals: {
|
|
759
|
+
npm: [
|
|
760
|
+
"@sentry/node",
|
|
761
|
+
"@sentry/browser",
|
|
762
|
+
"@sentry/react",
|
|
763
|
+
"@sentry/nextjs"
|
|
764
|
+
],
|
|
765
|
+
python: ["sentry-sdk"],
|
|
766
|
+
ruby: ["sentry-ruby"]
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
kind: "Salesforce",
|
|
771
|
+
label: "Salesforce",
|
|
772
|
+
mode: "deep-link",
|
|
773
|
+
signals: {
|
|
774
|
+
npm: ["jsforce"],
|
|
775
|
+
python: ["simple-salesforce"],
|
|
776
|
+
envKeys: [/^SALESFORCE_/]
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
kind: "Hubspot",
|
|
781
|
+
label: "HubSpot",
|
|
782
|
+
mode: "deep-link",
|
|
783
|
+
signals: {
|
|
784
|
+
npm: ["@hubspot/api-client"],
|
|
785
|
+
python: ["hubspot-api-client"],
|
|
786
|
+
envKeys: [/^HUBSPOT_/]
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
kind: "Zendesk",
|
|
791
|
+
label: "Zendesk",
|
|
792
|
+
mode: "deep-link",
|
|
793
|
+
signals: {
|
|
794
|
+
npm: ["node-zendesk"],
|
|
795
|
+
python: ["zenpy"],
|
|
796
|
+
envKeys: [/^ZENDESK_/]
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
kind: "Intercom",
|
|
801
|
+
label: "Intercom",
|
|
802
|
+
mode: "deep-link",
|
|
803
|
+
signals: {
|
|
804
|
+
npm: ["intercom-client", "@intercom/messenger-js-sdk"],
|
|
805
|
+
python: ["python-intercom"],
|
|
806
|
+
envKeys: [/^INTERCOM_/]
|
|
807
|
+
}
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
kind: "Linear",
|
|
811
|
+
label: "Linear",
|
|
812
|
+
mode: "deep-link",
|
|
813
|
+
signals: {
|
|
814
|
+
npm: ["@linear/sdk"],
|
|
815
|
+
envKeys: [/^LINEAR_API_KEY$/]
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
];
|
|
819
|
+
//#endregion
|
|
820
|
+
//#region src/lib/warehouse-sources/detect.ts
|
|
821
|
+
/**
|
|
822
|
+
* Data warehouse source detection.
|
|
823
|
+
*
|
|
824
|
+
* Scans a project for codebase signals (npm/python/ruby deps, `.env` key
|
|
825
|
+
* names) and matches them against the `SOURCE_DETECTORS` registry. Pure
|
|
826
|
+
* function: no store mutations, no UI calls. Reads files locally — only the
|
|
827
|
+
* wizard process does this; the agent never sees secret values.
|
|
828
|
+
*
|
|
829
|
+
* Note we only read `.env` KEY NAMES, never values.
|
|
830
|
+
*/
|
|
831
|
+
const MAX_DEPTH = 3;
|
|
832
|
+
/**
|
|
833
|
+
* Detect which warehouse sources the project at `installDir` appears to use.
|
|
834
|
+
* Returns one `DetectedSource` per matched registry entry (kinds are unique,
|
|
835
|
+
* so the result is naturally deduped).
|
|
836
|
+
*/
|
|
837
|
+
function detectWarehouseSources(installDir) {
|
|
838
|
+
const signals = collectSignals$1(installDir);
|
|
839
|
+
const detected = [];
|
|
840
|
+
for (const detector of SOURCE_DETECTORS) {
|
|
841
|
+
const match = matchDetector(detector, signals);
|
|
842
|
+
if (match) detected.push({
|
|
843
|
+
kind: detector.kind,
|
|
844
|
+
label: detector.label,
|
|
845
|
+
mode: detector.mode,
|
|
846
|
+
matchedSignal: match
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
return detected;
|
|
850
|
+
}
|
|
851
|
+
/** Returns a human-readable description of the first matching signal, or null. */
|
|
852
|
+
function matchDetector(detector, signals) {
|
|
853
|
+
const { npm, python, ruby, envKeys } = detector.signals;
|
|
854
|
+
const npmHit = npm?.find((dep) => signals.npm.has(dep));
|
|
855
|
+
if (npmHit) return `found \`${npmHit}\` in package.json`;
|
|
856
|
+
const pyHit = python?.find((dep) => signals.python.has(dep));
|
|
857
|
+
if (pyHit) return `found \`${pyHit}\` in Python dependencies`;
|
|
858
|
+
const rubyHit = ruby?.find((gem) => signals.ruby.has(gem));
|
|
859
|
+
if (rubyHit) return `found \`${rubyHit}\` in Gemfile`;
|
|
860
|
+
if (envKeys) {
|
|
861
|
+
for (const key of signals.envKeys) if (envKeys.some((re) => re.test(key))) return `found \`${key}\` in .env`;
|
|
862
|
+
}
|
|
863
|
+
return null;
|
|
864
|
+
}
|
|
865
|
+
function collectSignals$1(installDir) {
|
|
866
|
+
const signals = {
|
|
867
|
+
npm: /* @__PURE__ */ new Set(),
|
|
868
|
+
python: /* @__PURE__ */ new Set(),
|
|
869
|
+
ruby: /* @__PURE__ */ new Set(),
|
|
870
|
+
envKeys: /* @__PURE__ */ new Set()
|
|
871
|
+
};
|
|
872
|
+
walkProjectFiles(installDir, (name, fullPath) => ingestFile(name, fullPath, signals), MAX_DEPTH);
|
|
873
|
+
return signals;
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* Route a file to the right parser BY NAME, reading its contents only when the
|
|
877
|
+
* name matches one of the ~6 manifests we care about. Checking the name first
|
|
878
|
+
* avoids slurping every file in the tree (lockfiles, binaries, assets) into
|
|
879
|
+
* memory just to discard it.
|
|
880
|
+
*/
|
|
881
|
+
function ingestFile(name, fullPath, signals) {
|
|
882
|
+
const ingest = ingestorFor(name);
|
|
883
|
+
if (!ingest) return;
|
|
884
|
+
const content = safeReadFile(fullPath);
|
|
885
|
+
if (content === null) return;
|
|
886
|
+
ingest(content, signals);
|
|
887
|
+
}
|
|
888
|
+
/** Pick the parser for a manifest filename, or null if it's not one we read. */
|
|
889
|
+
function ingestorFor(name) {
|
|
890
|
+
if (name === "package.json") return addNpmDeps;
|
|
891
|
+
if (name === "requirements.txt") return (c, s) => parseRequirementsTxt(c).forEach((d) => s.python.add(d));
|
|
892
|
+
if (name === "pyproject.toml") return (c, s) => parsePyprojectToml(c).forEach((d) => s.python.add(d));
|
|
893
|
+
if (name === "Pipfile") return (c, s) => parsePipfile(c).forEach((d) => s.python.add(d));
|
|
894
|
+
if (name === "Gemfile") return (c, s) => parseGemfile(c).forEach((g) => s.ruby.add(g));
|
|
895
|
+
if (name.startsWith(".env")) return (c, s) => parseEnvKeys(c).forEach((k) => s.envKeys.add(k));
|
|
896
|
+
return null;
|
|
897
|
+
}
|
|
898
|
+
function addNpmDeps(content, signals) {
|
|
899
|
+
try {
|
|
900
|
+
const pkg = JSON.parse(content);
|
|
901
|
+
for (const dep of Object.keys({
|
|
902
|
+
...pkg.dependencies,
|
|
903
|
+
...pkg.devDependencies
|
|
904
|
+
})) signals.npm.add(dep);
|
|
905
|
+
} catch (error) {
|
|
906
|
+
analytics.captureException(error instanceof Error ? error : new Error(String(error)), { step: "detectWarehouseSources.parsePackageJson" });
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
/** Extract gem names from `gem 'name'` declarations. */
|
|
910
|
+
function parseGemfile(content) {
|
|
911
|
+
const gems = [];
|
|
912
|
+
for (const match of content.matchAll(/^\s*gem\s+['"]([^'"]+)['"]/gm)) gems.push(match[1]);
|
|
913
|
+
return gems;
|
|
914
|
+
}
|
|
915
|
+
/** Extract KEY NAMES from a dotenv file. Values are intentionally discarded. */
|
|
916
|
+
function parseEnvKeys(content) {
|
|
917
|
+
const keys = [];
|
|
918
|
+
for (const line of content.split("\n")) {
|
|
919
|
+
const trimmed = line.trim();
|
|
920
|
+
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
921
|
+
const match = trimmed.match(/^(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=/);
|
|
922
|
+
if (match) keys.push(match[1]);
|
|
923
|
+
}
|
|
924
|
+
return keys;
|
|
925
|
+
}
|
|
926
|
+
//#endregion
|
|
927
|
+
//#region src/lib/programs/warehouse-source/detect.ts
|
|
928
|
+
/**
|
|
929
|
+
* Warehouse-source program detection step.
|
|
930
|
+
*
|
|
931
|
+
* Thin adapter over `detectWarehouseSources` that writes results into
|
|
932
|
+
* frameworkContext for the intro screen, plus the `[ABORT]` cases the
|
|
933
|
+
* data-warehouse-source-setup skill can emit.
|
|
934
|
+
*/
|
|
935
|
+
/** frameworkContext key holding the detected sources (set on success). */
|
|
936
|
+
const DETECTED_WAREHOUSE_SOURCES_KEY = "detectedWarehouseSources";
|
|
937
|
+
/**
|
|
938
|
+
* Read the detected sources out of frameworkContext. Single accessor shared by
|
|
939
|
+
* the intro screen and the prompt builder so the key + cast live in one place.
|
|
940
|
+
*/
|
|
941
|
+
function getDetectedWarehouseSources(session) {
|
|
942
|
+
return session.frameworkContext["detectedWarehouseSources"] ?? [];
|
|
943
|
+
}
|
|
944
|
+
/** `[ABORT] <reason>` cases the skill can emit. */
|
|
945
|
+
const WAREHOUSE_ABORT_CASES = [{
|
|
946
|
+
match: /^no data sources? detected\.?$/i,
|
|
947
|
+
message: "No data source detected",
|
|
948
|
+
body: "The agent could not confirm a data warehouse source to connect. Run this command from a project that uses a supported source (a database, Stripe, etc.).",
|
|
949
|
+
docsUrl: "https://posthog.com/docs/data-warehouse"
|
|
950
|
+
}, {
|
|
951
|
+
match: /^source creation failed\.?$/i,
|
|
952
|
+
message: "Source creation failed",
|
|
953
|
+
body: "PostHog could not create the data warehouse source with the credentials provided. Double-check the connection details and try again, or set the source up directly in the PostHog app.",
|
|
954
|
+
docsUrl: "https://posthog.com/docs/data-warehouse"
|
|
955
|
+
}];
|
|
956
|
+
/**
|
|
957
|
+
* Scan `session.installDir` for warehouse-source signals. Writes the detected
|
|
958
|
+
* sources (or a `detectError`) into frameworkContext for the intro screen.
|
|
959
|
+
*/
|
|
960
|
+
function detectWarehousePrerequisites(session, setFrameworkContext) {
|
|
961
|
+
const fail = (error) => setFrameworkContext("detectError", error);
|
|
962
|
+
const installDir = session.installDir;
|
|
963
|
+
if (!existsSync(installDir)) {
|
|
964
|
+
fail({
|
|
965
|
+
kind: "bad-directory",
|
|
966
|
+
path: installDir,
|
|
967
|
+
reason: "missing"
|
|
968
|
+
});
|
|
969
|
+
return;
|
|
970
|
+
}
|
|
971
|
+
try {
|
|
972
|
+
if (!statSync(installDir).isDirectory()) {
|
|
973
|
+
fail({
|
|
974
|
+
kind: "bad-directory",
|
|
975
|
+
path: installDir,
|
|
976
|
+
reason: "not-dir"
|
|
977
|
+
});
|
|
978
|
+
return;
|
|
979
|
+
}
|
|
980
|
+
} catch (error) {
|
|
981
|
+
analytics.captureException(error instanceof Error ? error : new Error(String(error)), {
|
|
982
|
+
step: "detectWarehousePrerequisites.stat",
|
|
983
|
+
path: installDir
|
|
984
|
+
});
|
|
985
|
+
fail({
|
|
986
|
+
kind: "bad-directory",
|
|
987
|
+
path: installDir,
|
|
988
|
+
reason: "unreadable"
|
|
989
|
+
});
|
|
990
|
+
return;
|
|
991
|
+
}
|
|
992
|
+
const sources = detectWarehouseSources(installDir);
|
|
993
|
+
if (sources.length === 0) {
|
|
994
|
+
fail({ kind: "no-sources" });
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
997
|
+
setFrameworkContext(DETECTED_WAREHOUSE_SOURCES_KEY, sources);
|
|
998
|
+
}
|
|
999
|
+
//#endregion
|
|
1000
|
+
//#region src/lib/programs/warehouse-source/steps.ts
|
|
1001
|
+
const WAREHOUSE_SOURCE_PROGRAM = [
|
|
1002
|
+
{
|
|
1003
|
+
id: "detect",
|
|
1004
|
+
label: "Detecting data sources",
|
|
1005
|
+
onReady: (ctx) => detectWarehousePrerequisites(ctx.session, ctx.setFrameworkContext)
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
id: "intro",
|
|
1009
|
+
label: "Welcome",
|
|
1010
|
+
screenId: "warehouse-intro",
|
|
1011
|
+
gate: (session) => session.setupConfirmed
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
id: "auth",
|
|
1015
|
+
label: "Authentication",
|
|
1016
|
+
screenId: "auth",
|
|
1017
|
+
isComplete: (session) => session.credentials !== null
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
id: "run",
|
|
1021
|
+
label: "Data warehouse",
|
|
1022
|
+
screenId: "run",
|
|
1023
|
+
isComplete: (session) => session.runPhase === "completed" || session.runPhase === "error"
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
id: "outro",
|
|
1027
|
+
label: "Done",
|
|
1028
|
+
screenId: "outro",
|
|
1029
|
+
isComplete: (session) => session.outroDismissed
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
id: "skills",
|
|
1033
|
+
label: "Skills",
|
|
1034
|
+
screenId: "keep-skills"
|
|
1035
|
+
}
|
|
1036
|
+
];
|
|
1037
|
+
//#endregion
|
|
1038
|
+
//#region src/lib/programs/warehouse-source/index.ts
|
|
1039
|
+
/**
|
|
1040
|
+
* Inject the detected sources (and their creation mode) into the prompt so the
|
|
1041
|
+
* skill knows what to set up. The *how* — in-CLI creation vs deep-link, field
|
|
1042
|
+
* collection, validation — lives in the skill, not here.
|
|
1043
|
+
*/
|
|
1044
|
+
function buildPrompt(session) {
|
|
1045
|
+
const sources = getDetectedWarehouseSources(session);
|
|
1046
|
+
if (sources.length === 0) return "Set up a data warehouse source for this project.";
|
|
1047
|
+
return [
|
|
1048
|
+
"The wizard detected the following data warehouse sources in this project:",
|
|
1049
|
+
...sources.map((s) => `- ${s.label} (kind: ${s.kind}, mode: ${s.mode}) — ${s.matchedSignal}`),
|
|
1050
|
+
"",
|
|
1051
|
+
"Set these up in PostHog following the skill instructions: create `in-cli` sources directly via the PostHog MCP after collecting credentials; for `deep-link` sources, provide the user the pre-filled new-source URL."
|
|
1052
|
+
].join("\n");
|
|
1053
|
+
}
|
|
1054
|
+
const warehouseSourceConfig = {
|
|
1055
|
+
command: "warehouse",
|
|
1056
|
+
description: "Detect and connect a data warehouse source (Postgres, Stripe, …)",
|
|
1057
|
+
id: "warehouse-source",
|
|
1058
|
+
skillId: "data-warehouse-source-setup",
|
|
1059
|
+
steps: WAREHOUSE_SOURCE_PROGRAM,
|
|
1060
|
+
getContentBlocks: getContentBlocks$2,
|
|
1061
|
+
reportFile: "posthog-warehouse-report.md",
|
|
1062
|
+
allowedTools: ["Agent"],
|
|
1063
|
+
run: (session) => Promise.resolve({
|
|
1064
|
+
skillId: "data-warehouse-source-setup",
|
|
1065
|
+
integrationLabel: "data-warehouse-source-setup",
|
|
1066
|
+
customPrompt: () => buildPrompt(session),
|
|
1067
|
+
successMessage: "Data warehouse source connected!",
|
|
1068
|
+
reportFile: "posthog-warehouse-report.md",
|
|
1069
|
+
docsUrl: "https://posthog.com/docs/data-warehouse",
|
|
1070
|
+
spinnerMessage: "Connecting your data source...",
|
|
1071
|
+
estimatedDurationMinutes: 5,
|
|
1072
|
+
abortCases: WAREHOUSE_ABORT_CASES
|
|
1073
|
+
}),
|
|
1074
|
+
requires: ["posthog-integration"]
|
|
1075
|
+
};
|
|
1076
|
+
//#endregion
|
|
512
1077
|
//#region src/lib/programs/agent-skill/steps.ts
|
|
513
1078
|
const AGENT_SKILL_STEPS = [
|
|
514
1079
|
{
|
|
@@ -2687,8 +3252,9 @@ STEP 5 — Offer issue-tracker integrations. (skill: "Connected tools")
|
|
|
2687
3252
|
a source only for a tool the user picked.
|
|
2688
3253
|
|
|
2689
3254
|
STEP 6 — Configure the scout fleet. (skill: "Scouts")
|
|
2690
|
-
Materialize the fleet
|
|
2691
|
-
|
|
3255
|
+
Materialize the fleet, then enable only a small set — the "general"
|
|
3256
|
+
scout plus the one or two specialists for the products this project
|
|
3257
|
+
uses most — and disable the rest, per the skill.
|
|
2692
3258
|
|
|
2693
3259
|
STEP 7 — Design custom scouts for this product. (skill: "Custom scouts")
|
|
2694
3260
|
You are the only actor that has read this repo — turn that into
|
|
@@ -2933,6 +3499,7 @@ const agentSkillConfig = {
|
|
|
2933
3499
|
const PROGRAM_REGISTRY = [
|
|
2934
3500
|
posthogIntegrationConfig,
|
|
2935
3501
|
revenueAnalyticsConfig,
|
|
3502
|
+
warehouseSourceConfig,
|
|
2936
3503
|
errorTrackingUploadSourceMapsConfig,
|
|
2937
3504
|
auditConfig,
|
|
2938
3505
|
eventsAuditConfig,
|
|
@@ -2954,6 +3521,7 @@ const PROGRAM_REGISTRY = [
|
|
|
2954
3521
|
const Program = {
|
|
2955
3522
|
PostHogIntegration: posthogIntegrationConfig.id,
|
|
2956
3523
|
RevenueAnalyticsSetup: revenueAnalyticsConfig.id,
|
|
3524
|
+
WarehouseSource: warehouseSourceConfig.id,
|
|
2957
3525
|
ErrorTrackingUploadSourceMaps: errorTrackingUploadSourceMapsConfig.id,
|
|
2958
3526
|
Migration: migrationConfig.id,
|
|
2959
3527
|
Audit: auditConfig.id,
|
|
@@ -3005,7 +3573,7 @@ function runMcpAdd(argv) {
|
|
|
3005
3573
|
const debug = argv.debug;
|
|
3006
3574
|
const localMcp = argv.local;
|
|
3007
3575
|
try {
|
|
3008
|
-
const { startTUI } = await import("./start-tui-
|
|
3576
|
+
const { startTUI } = await import("./start-tui-BQJQ9_KJ.js");
|
|
3009
3577
|
const { buildSession } = await import("./wizard-session-wPJtNl4c.js");
|
|
3010
3578
|
const tui = startTUI(VERSION, Program.McpAdd);
|
|
3011
3579
|
tui.store.session = buildSession({
|
|
@@ -3017,7 +3585,7 @@ function runMcpAdd(argv) {
|
|
|
3017
3585
|
} catch (error) {
|
|
3018
3586
|
if (!isTUIUnavailable(error)) throw error;
|
|
3019
3587
|
setUI(new LoggingUI());
|
|
3020
|
-
const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-
|
|
3588
|
+
const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-BzCc6be4.js").then((n) => n.r);
|
|
3021
3589
|
await addMCPServerToClientsStep({
|
|
3022
3590
|
local: localMcp,
|
|
3023
3591
|
features,
|
|
@@ -3056,7 +3624,7 @@ function runMcpRemove(argv) {
|
|
|
3056
3624
|
const debug = argv.debug;
|
|
3057
3625
|
const localMcp = argv.local;
|
|
3058
3626
|
try {
|
|
3059
|
-
const { startTUI } = await import("./start-tui-
|
|
3627
|
+
const { startTUI } = await import("./start-tui-BQJQ9_KJ.js");
|
|
3060
3628
|
const { buildSession } = await import("./wizard-session-wPJtNl4c.js");
|
|
3061
3629
|
const tui = startTUI(VERSION, Program.McpRemove);
|
|
3062
3630
|
tui.store.session = buildSession({
|
|
@@ -3065,7 +3633,7 @@ function runMcpRemove(argv) {
|
|
|
3065
3633
|
});
|
|
3066
3634
|
} catch {
|
|
3067
3635
|
setUI(new LoggingUI());
|
|
3068
|
-
const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-
|
|
3636
|
+
const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-BzCc6be4.js").then((n) => n.r);
|
|
3069
3637
|
await removeMCPServerFromClientsStep({ local: localMcp });
|
|
3070
3638
|
}
|
|
3071
3639
|
})();
|
|
@@ -3087,7 +3655,7 @@ function runMcpTutorial(argv) {
|
|
|
3087
3655
|
const debug = argv.debug;
|
|
3088
3656
|
const localMcp = argv.local;
|
|
3089
3657
|
try {
|
|
3090
|
-
const { startTUI } = await import("./start-tui-
|
|
3658
|
+
const { startTUI } = await import("./start-tui-BQJQ9_KJ.js");
|
|
3091
3659
|
const { buildSession } = await import("./wizard-session-wPJtNl4c.js");
|
|
3092
3660
|
const tui = startTUI(VERSION, Program.McpTutorial);
|
|
3093
3661
|
tui.store.session = buildSession({
|
|
@@ -3142,7 +3710,7 @@ function runWizard(config, options) {
|
|
|
3142
3710
|
(async () => {
|
|
3143
3711
|
try {
|
|
3144
3712
|
const installDir = options.installDir || process.cwd();
|
|
3145
|
-
const { startTUI } = await import("./start-tui-
|
|
3713
|
+
const { startTUI } = await import("./start-tui-BQJQ9_KJ.js");
|
|
3146
3714
|
const { buildSession, RunPhase } = await import("./wizard-session-wPJtNl4c.js");
|
|
3147
3715
|
const { TaskStreamPush } = await import("./task-stream-BQNSp0qR.js");
|
|
3148
3716
|
const { PostHogDestination } = await import("./posthog-Cr37rnla.js");
|
|
@@ -3198,7 +3766,7 @@ function runWizard(config, options) {
|
|
|
3198
3766
|
await activeTui.store.getGate("health-check");
|
|
3199
3767
|
const skipAgent = config.run == null;
|
|
3200
3768
|
if (skipAgent) {
|
|
3201
|
-
const { getOrAskForProjectData } = await import("./setup-utils-
|
|
3769
|
+
const { getOrAskForProjectData } = await import("./setup-utils-STqW1cwa.js").then((n) => n.r);
|
|
3202
3770
|
const { projectApiKey, host, accessToken, projectId } = await getOrAskForProjectData({
|
|
3203
3771
|
signup: session.signup,
|
|
3204
3772
|
ci: session.ci,
|
|
@@ -3213,7 +3781,7 @@ function runWizard(config, options) {
|
|
|
3213
3781
|
projectId
|
|
3214
3782
|
});
|
|
3215
3783
|
} else {
|
|
3216
|
-
const { runAgent } = await import("./agent-runner-
|
|
3784
|
+
const { runAgent } = await import("./agent-runner-MPlvLP8K.js");
|
|
3217
3785
|
await runAgent(config, activeTui.store.session);
|
|
3218
3786
|
}
|
|
3219
3787
|
const isDone = () => skipAgent ? activeTui.store.session.outroDismissed : activeTui.store.session.skillsComplete;
|
|
@@ -3290,10 +3858,10 @@ function runWizardCI(config, options) {
|
|
|
3290
3858
|
(async () => {
|
|
3291
3859
|
const path = await import("path");
|
|
3292
3860
|
const { buildSession } = await import("./wizard-session-wPJtNl4c.js");
|
|
3293
|
-
const { readEnvironment } = await import("./environment-
|
|
3861
|
+
const { readEnvironment } = await import("./environment-BaqpBPme.js").then((n) => n.t);
|
|
3294
3862
|
const { readApiKeyFromEnv } = await import("./env-api-key-MlzJYAvt.js").then((n) => n.t);
|
|
3295
|
-
const { configureLogFileFromEnvironment, logToFile } = await import("./debug-
|
|
3296
|
-
const { wizardAbort, WizardError } = await import("./wizard-abort-
|
|
3863
|
+
const { configureLogFileFromEnvironment, logToFile } = await import("./debug-D2iIa763.js");
|
|
3864
|
+
const { wizardAbort, WizardError } = await import("./wizard-abort-Cht_9Mo0.js");
|
|
3297
3865
|
configureLogFileFromEnvironment();
|
|
3298
3866
|
const env = readEnvironment();
|
|
3299
3867
|
const apiKey = options.apiKey ?? readApiKeyFromEnv() ?? void 0;
|
|
@@ -3344,7 +3912,7 @@ function runWizardCI(config, options) {
|
|
|
3344
3912
|
})
|
|
3345
3913
|
});
|
|
3346
3914
|
}
|
|
3347
|
-
const { runAgent } = await import("./agent-runner-
|
|
3915
|
+
const { runAgent } = await import("./agent-runner-MPlvLP8K.js");
|
|
3348
3916
|
await runAgent(config, session);
|
|
3349
3917
|
} catch (error) {
|
|
3350
3918
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -4211,7 +4779,7 @@ async function runDoctorCI(options) {
|
|
|
4211
4779
|
getUI().intro("Welcome to the PostHog setup wizard");
|
|
4212
4780
|
getUI().log.info("Running posthog-doctor in CI mode");
|
|
4213
4781
|
try {
|
|
4214
|
-
const { getOrAskForProjectData } = await import("./setup-utils-
|
|
4782
|
+
const { getOrAskForProjectData } = await import("./setup-utils-STqW1cwa.js").then((n) => n.r);
|
|
4215
4783
|
const { host, accessToken, projectId } = await getOrAskForProjectData({
|
|
4216
4784
|
signup: false,
|
|
4217
4785
|
ci: true,
|
|
@@ -4228,7 +4796,7 @@ async function runDoctorCI(options) {
|
|
|
4228
4796
|
for (const issue of sorted) getUI().log.info(` • [${issue.severity}] ${getKindMeta(issue.kind).title}`);
|
|
4229
4797
|
process.exit(1);
|
|
4230
4798
|
} catch (error) {
|
|
4231
|
-
const { ApiError } = await import("./api-
|
|
4799
|
+
const { ApiError } = await import("./api-Dye-Pi5r.js").then((n) => n.n);
|
|
4232
4800
|
const message = error instanceof ApiError && error.statusCode === 401 ? "Your PostHog API key is invalid or expired." : error instanceof Error ? error.message : String(error);
|
|
4233
4801
|
getUI().log.error(`Doctor failed: ${message}`);
|
|
4234
4802
|
process.exit(1);
|
|
@@ -4276,6 +4844,15 @@ const migrateCommand = nativeCommandFactory(migrationConfig);
|
|
|
4276
4844
|
*/
|
|
4277
4845
|
const revenueCommand = nativeCommandFactory(revenueAnalyticsConfig);
|
|
4278
4846
|
//#endregion
|
|
4847
|
+
//#region src/commands/warehouse.ts
|
|
4848
|
+
/**
|
|
4849
|
+
* `wizard warehouse` — detect and connect a data warehouse source.
|
|
4850
|
+
*
|
|
4851
|
+
* Mirrors `revenue-analytics`: flat skill command driven by the
|
|
4852
|
+
* warehouse-source program.
|
|
4853
|
+
*/
|
|
4854
|
+
const warehouseCommand = nativeCommandFactory(warehouseSourceConfig);
|
|
4855
|
+
//#endregion
|
|
4279
4856
|
//#region src/commands/self-driving.ts
|
|
4280
4857
|
const selfDrivingCommand = {
|
|
4281
4858
|
name: "self-driving",
|
|
@@ -4315,7 +4892,7 @@ function runSlackConnect(argv) {
|
|
|
4315
4892
|
(async () => {
|
|
4316
4893
|
const debug = argv.debug;
|
|
4317
4894
|
try {
|
|
4318
|
-
const { startTUI } = await import("./start-tui-
|
|
4895
|
+
const { startTUI } = await import("./start-tui-BQJQ9_KJ.js");
|
|
4319
4896
|
const { buildSession } = await import("./wizard-session-wPJtNl4c.js");
|
|
4320
4897
|
const tui = startTUI(VERSION, Program.SlackConnect);
|
|
4321
4898
|
tui.store.session = buildSession({ debug });
|
|
@@ -4692,8 +5269,8 @@ function resolveInstallDir() {
|
|
|
4692
5269
|
if (inline) return inline.slice(14);
|
|
4693
5270
|
return process.env.POSTHOG_WIZARD_INSTALL_DIR ?? process.cwd();
|
|
4694
5271
|
}
|
|
4695
|
-
Wizard.use(basicIntegrationCommand).use(mcpCommand).use(cliCommand).use(auditCommand).use(doctorCommand).use(migrateCommand).use(revenueCommand).use(selfDrivingCommand).use(slackCommand).use(uploadSourcemapsCommand).use(skillCommand).init();
|
|
5272
|
+
Wizard.use(basicIntegrationCommand).use(mcpCommand).use(cliCommand).use(auditCommand).use(doctorCommand).use(migrateCommand).use(revenueCommand).use(warehouseCommand).use(selfDrivingCommand).use(slackCommand).use(uploadSourcemapsCommand).use(skillCommand).init();
|
|
4696
5273
|
//#endregion
|
|
4697
|
-
export {
|
|
5274
|
+
export { getContentBlocks$2 as _, ConfirmButton as a, runWizard as c, getProgramConfig as d, DISPLAY_NAME as f, getDetectedWarehouseSources as g, fetchHealthIssues as h, useKeyboardHintsContext as i, PROGRAM_REGISTRY as l, getKindMeta as m, useKeyBindings as n, PromptLabel as o, SOURCE_MAPS_CONTEXT_KEYS as p, KeyboardHintsProvider as r, runWizardCI as s, PickerMenu as t, Program as u, POSTHOG_SDKS$1 as v, STRIPE_SDKS as y };
|
|
4698
5275
|
|
|
4699
5276
|
//# sourceMappingURL=bin.js.map
|