@posthog/wizard 2.12.0 → 2.13.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/{AuditChecksViewer-DsfXIO9e.js → AuditChecksViewer-B0J7zcY2.js} +157 -54
- package/dist/AuditChecksViewer-B0J7zcY2.js.map +1 -0
- package/dist/{add-mcp-server-to-clients-BKoew3aT.js → add-mcp-server-to-clients-CUNR00bB.js} +4 -4
- package/dist/{add-mcp-server-to-clients-BKoew3aT.js.map → add-mcp-server-to-clients-CUNR00bB.js.map} +1 -1
- package/dist/{agent-interface-D5W9BAB2.js → agent-interface-CV0-vtxj.js} +7 -6
- package/dist/{agent-interface-D5W9BAB2.js.map → agent-interface-CV0-vtxj.js.map} +1 -1
- package/dist/{agent-runner-B8Cx6X6x.js → agent-runner-LvVQH31D.js} +9 -8
- package/dist/{agent-runner-B8Cx6X6x.js.map → agent-runner-LvVQH31D.js.map} +1 -1
- package/dist/analytics-BH7bEHQR.js +2 -0
- package/dist/{analytics-DmD31Ssc.js → analytics-VM7laaFx.js} +2 -2
- package/dist/{analytics-DmD31Ssc.js.map → analytics-VM7laaFx.js.map} +1 -1
- package/dist/bin.js +237 -32
- package/dist/bin.js.map +1 -1
- package/dist/{debug-I5sRZubJ.js → debug-BdcTB7EF.js} +1 -1
- package/dist/{debug-Bkaqv1ab.js → debug-Cqi6nVfX.js} +2 -2
- package/dist/{debug-Bkaqv1ab.js.map → debug-Cqi6nVfX.js.map} +1 -1
- package/dist/{detection-C_RfYYDe.js → detection-CSjmal-X.js} +3 -3
- package/dist/{detection-C_RfYYDe.js.map → detection-CSjmal-X.js.map} +1 -1
- package/dist/{package-manager-qxP2PpM_.js → package-manager-CD8RQW-e.js} +2 -2
- package/dist/{package-manager-qxP2PpM_.js.map → package-manager-CD8RQW-e.js.map} +1 -1
- package/dist/{posthog-integration-DX77Msto.js → posthog-integration-BL21S3T6.js} +9 -9
- package/dist/{posthog-integration-DX77Msto.js.map → posthog-integration-BL21S3T6.js.map} +1 -1
- package/dist/provisioning-BdQ1ONIg.js +2 -0
- package/dist/{provisioning-DUj285NO.js → provisioning-g9aoVIEd.js} +3 -3
- package/dist/{provisioning-DUj285NO.js.map → provisioning-g9aoVIEd.js.map} +1 -1
- package/dist/{registry-CCtIsqb8.js → registry-BaMEaAKd.js} +4 -4
- package/dist/{registry-CCtIsqb8.js.map → registry-BaMEaAKd.js.map} +1 -1
- package/dist/{router-BTfmEDDJ.js → router-COhhuIW3.js} +3 -2
- package/dist/router-COhhuIW3.js.map +1 -0
- package/dist/{setup-utils-Bv8z6HMb.js → setup-utils-CNV7FSlY.js} +6 -6
- package/dist/{setup-utils-Bv8z6HMb.js.map → setup-utils-CNV7FSlY.js.map} +1 -1
- package/dist/setup-utils-CU4FIqjB.js +2 -0
- package/dist/{start-playground-DYNQ8rOz.js → start-playground-C9GWnVdM.js} +3 -3
- package/dist/{start-playground-DYNQ8rOz.js.map → start-playground-C9GWnVdM.js.map} +1 -1
- package/dist/{start-tui-DleQG3La.js → start-tui-B_zwutLe.js} +1225 -42
- package/dist/start-tui-B_zwutLe.js.map +1 -0
- package/dist/{steps-C-syS8if.js → steps-Dawz7k3T.js} +6 -6
- package/dist/{steps-C-syS8if.js.map → steps-Dawz7k3T.js.map} +1 -1
- package/dist/{telemetry-DHZfjgqx.js → telemetry-D6bjWA-A.js} +2 -2
- package/dist/{telemetry-DHZfjgqx.js.map → telemetry-D6bjWA-A.js.map} +1 -1
- package/dist/{wizard-abort-DfhWuzaw.js → wizard-abort-CJkNkSjT.js} +3 -3
- package/dist/{wizard-abort-DfhWuzaw.js.map → wizard-abort-CJkNkSjT.js.map} +1 -1
- package/dist/{wizard-abort-DIhFXJ5N.js → wizard-abort-Dl0BkqhT.js} +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/AuditChecksViewer-DsfXIO9e.js.map +0 -1
- package/dist/analytics-JDitS2JI.js +0 -2
- package/dist/provisioning-CHfTOEvg.js +0 -2
- package/dist/router-BTfmEDDJ.js.map +0 -1
- package/dist/setup-utils-CoX-vLgw.js +0 -2
- package/dist/start-tui-DleQG3La.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as SERVICE_LABELS } from "./debug-
|
|
1
|
+
import { d as SERVICE_LABELS } from "./debug-Cqi6nVfX.js";
|
|
2
2
|
import { n as isTaskStatus } from "./wizard-ui-YdGFRyu_.js";
|
|
3
|
-
import { n as analytics, r as sessionProperties } from "./analytics-
|
|
3
|
+
import { n as analytics, r as sessionProperties } from "./analytics-VM7laaFx.js";
|
|
4
4
|
import { r as buildSession } from "./wizard-session-BcNJTl2I.js";
|
|
5
|
-
import { g as AUDIT_SEVERITY_STYLE } from "./agent-interface-
|
|
6
|
-
import {
|
|
5
|
+
import { g as AUDIT_SEVERITY_STYLE } from "./agent-interface-CV0-vtxj.js";
|
|
6
|
+
import { r as getKindMeta } from "./bin.js";
|
|
7
7
|
import { n as AVAILABLE_FEATURES, t as ALL_FEATURE_VALUES } from "./defaults-GbLPuHxj.js";
|
|
8
|
-
import { i as WORKFLOW_STEPS, t as WizardRouter } from "./router-
|
|
8
|
+
import { i as WORKFLOW_STEPS, t as WizardRouter } from "./router-COhhuIW3.js";
|
|
9
9
|
import * as fs$1 from "fs";
|
|
10
10
|
import { Box, Text, measureElement, useInput, useStdout } from "ink";
|
|
11
11
|
import { Component, Fragment, createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -3480,6 +3480,27 @@ const McpScreen = ({ store, installer, mode = "install" }) => {
|
|
|
3480
3480
|
})]
|
|
3481
3481
|
});
|
|
3482
3482
|
};
|
|
3483
|
+
//#endregion
|
|
3484
|
+
//#region src/ui/tui/screens/audit/AuditChecksViewer/AreaHeaderRow.tsx
|
|
3485
|
+
/** Sub-header row inside the scrollable body — one per area group. */
|
|
3486
|
+
const AreaHeaderRow = ({ area, resolved, total }) => /* @__PURE__ */ jsxs(Box, {
|
|
3487
|
+
flexShrink: 0,
|
|
3488
|
+
marginTop: 1,
|
|
3489
|
+
children: [/* @__PURE__ */ jsxs(Text, {
|
|
3490
|
+
bold: true,
|
|
3491
|
+
color: "cyan",
|
|
3492
|
+
children: [area, " "]
|
|
3493
|
+
}), /* @__PURE__ */ jsxs(Text, {
|
|
3494
|
+
dimColor: true,
|
|
3495
|
+
children: [
|
|
3496
|
+
"(",
|
|
3497
|
+
resolved,
|
|
3498
|
+
"/",
|
|
3499
|
+
total,
|
|
3500
|
+
")"
|
|
3501
|
+
]
|
|
3502
|
+
})]
|
|
3503
|
+
});
|
|
3483
3504
|
/** ScreenContainer wraps content in paddingX={1} inside a width capped at
|
|
3484
3505
|
* MAX_WIDTH, so the actual width available to the viewer is
|
|
3485
3506
|
* min(cols, MAX_WIDTH) - 2. */
|
|
@@ -3493,7 +3514,7 @@ function computeLayout(rawCols, termRows) {
|
|
|
3493
3514
|
const fixedExceptLabel = padding + statusWidth + 2 + 18 + 2 + 2;
|
|
3494
3515
|
const labelWidth = Math.max(28, cols - fixedExceptLabel);
|
|
3495
3516
|
const detailIndent = statusWidth + 2 + 18 + 2;
|
|
3496
|
-
const viewerChrome =
|
|
3517
|
+
const viewerChrome = 10;
|
|
3497
3518
|
return {
|
|
3498
3519
|
cols,
|
|
3499
3520
|
visibleHeight: Math.max(5, termRows - 10 - viewerChrome),
|
|
@@ -3547,24 +3568,60 @@ const CheckRow = ({ item, layout }) => {
|
|
|
3547
3568
|
};
|
|
3548
3569
|
//#endregion
|
|
3549
3570
|
//#region src/ui/tui/screens/audit/AuditChecksViewer/DetailRow.tsx
|
|
3571
|
+
/** Format a `details` string. If it parses as a JSON object, render it as
|
|
3572
|
+
* indented key: value lines (skipping huge nested arrays/objects which we
|
|
3573
|
+
* truncate). Otherwise return the original text. v3000 emits structured
|
|
3574
|
+
* JSON for several event-quality checks — a raw dump is unreadable. */
|
|
3575
|
+
function formatDetails(raw) {
|
|
3576
|
+
const trimmed = raw.trim();
|
|
3577
|
+
if (!trimmed.startsWith("{") && !trimmed.startsWith("[")) return [raw];
|
|
3578
|
+
let parsed;
|
|
3579
|
+
try {
|
|
3580
|
+
parsed = JSON.parse(trimmed);
|
|
3581
|
+
} catch {
|
|
3582
|
+
return [raw];
|
|
3583
|
+
}
|
|
3584
|
+
if (parsed === null || typeof parsed !== "object") return [raw];
|
|
3585
|
+
const lines = [];
|
|
3586
|
+
const renderValue = (v) => {
|
|
3587
|
+
if (v === null) return "null";
|
|
3588
|
+
if (typeof v === "string") return v;
|
|
3589
|
+
if (typeof v === "number" || typeof v === "boolean") return String(v);
|
|
3590
|
+
if (Array.isArray(v)) {
|
|
3591
|
+
if (v.length === 0) return "[]";
|
|
3592
|
+
if (v.every((e) => e === null || typeof e !== "object")) return v.map(renderValue).join(", ");
|
|
3593
|
+
return `[${v.length} item${v.length === 1 ? "" : "s"}]`;
|
|
3594
|
+
}
|
|
3595
|
+
if (typeof v === "object") {
|
|
3596
|
+
const keys = Object.keys(v);
|
|
3597
|
+
return `{${keys.length} field${keys.length === 1 ? "" : "s"}}`;
|
|
3598
|
+
}
|
|
3599
|
+
return String(v);
|
|
3600
|
+
};
|
|
3601
|
+
for (const [key, value] of Object.entries(parsed)) lines.push(`${key}: ${renderValue(value)}`);
|
|
3602
|
+
return lines.length > 0 ? lines : [raw];
|
|
3603
|
+
}
|
|
3550
3604
|
/** Indented under the CHECK column; wrap continuation aligns with the prefix. */
|
|
3551
|
-
const DetailRow = ({ item, layout }) =>
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
width: layout.
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3605
|
+
const DetailRow = ({ item, layout }) => {
|
|
3606
|
+
const detailLines = item.details ? formatDetails(item.details) : [];
|
|
3607
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
3608
|
+
flexShrink: 0,
|
|
3609
|
+
children: [/* @__PURE__ */ jsx(Box, { width: layout.detailIndent }), /* @__PURE__ */ jsxs(Box, {
|
|
3610
|
+
flexDirection: "column",
|
|
3611
|
+
width: layout.detailWidth,
|
|
3612
|
+
children: [item.file && /* @__PURE__ */ jsx(Text, {
|
|
3613
|
+
dimColor: true,
|
|
3614
|
+
wrap: "wrap",
|
|
3615
|
+
children: `↳ File: ${item.file}`
|
|
3616
|
+
}), detailLines.map((line, i) => /* @__PURE__ */ jsx(Text, {
|
|
3617
|
+
dimColor: true,
|
|
3618
|
+
italic: true,
|
|
3619
|
+
wrap: "wrap",
|
|
3620
|
+
children: i === 0 ? `${item.file ? " " : "↳ "}${line}` : ` ${line}`
|
|
3621
|
+
}, i))]
|
|
3565
3622
|
})]
|
|
3566
|
-
})
|
|
3567
|
-
}
|
|
3623
|
+
});
|
|
3624
|
+
};
|
|
3568
3625
|
//#endregion
|
|
3569
3626
|
//#region src/ui/tui/screens/audit/AuditChecksViewer/Legend.tsx
|
|
3570
3627
|
const Legend = () => /* @__PURE__ */ jsxs(Text, { children: [
|
|
@@ -3670,22 +3727,61 @@ const STATUS_ORDER = {
|
|
|
3670
3727
|
pass: 3,
|
|
3671
3728
|
pending: 4
|
|
3672
3729
|
};
|
|
3673
|
-
/**
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3730
|
+
/** Audit areas in the order they should be displayed. Areas not listed
|
|
3731
|
+
* here fall through to alphabetical order at the end. Mirrors the
|
|
3732
|
+
* Full audit section grouping in the generated report. */
|
|
3733
|
+
const AREA_ORDER = [
|
|
3734
|
+
"Installation",
|
|
3735
|
+
"Identification",
|
|
3736
|
+
"Event Capture",
|
|
3737
|
+
"Event Quality",
|
|
3738
|
+
"Feature Flags",
|
|
3739
|
+
"Session Replay",
|
|
3740
|
+
"Session Replay — Optimize",
|
|
3741
|
+
"Use Case: Expansion",
|
|
3742
|
+
"Additional Sections"
|
|
3743
|
+
];
|
|
3744
|
+
function areaRank(area) {
|
|
3745
|
+
const idx = AREA_ORDER.indexOf(area);
|
|
3746
|
+
return idx === -1 ? AREA_ORDER.length : idx;
|
|
3747
|
+
}
|
|
3748
|
+
/** Group checks by area, in AREA_ORDER. Within each area, sort by status. */
|
|
3749
|
+
function groupChecksByArea(checks) {
|
|
3750
|
+
const byArea = /* @__PURE__ */ new Map();
|
|
3751
|
+
for (const c of checks) {
|
|
3752
|
+
const list = byArea.get(c.area);
|
|
3753
|
+
if (list) list.push(c);
|
|
3754
|
+
else byArea.set(c.area, [c]);
|
|
3755
|
+
}
|
|
3756
|
+
const groups = [];
|
|
3757
|
+
for (const [area, areaChecks] of byArea) {
|
|
3758
|
+
const sorted = [...areaChecks].sort((a, b) => STATUS_ORDER[a.status] - STATUS_ORDER[b.status]);
|
|
3759
|
+
const resolved = sorted.filter((c) => c.status !== "pending").length;
|
|
3760
|
+
groups.push({
|
|
3761
|
+
area,
|
|
3762
|
+
checks: sorted,
|
|
3763
|
+
counts: {
|
|
3764
|
+
total: sorted.length,
|
|
3765
|
+
resolved
|
|
3766
|
+
}
|
|
3767
|
+
});
|
|
3768
|
+
}
|
|
3769
|
+
groups.sort((a, b) => {
|
|
3770
|
+
const dr = areaRank(a.area) - areaRank(b.area);
|
|
3771
|
+
if (dr !== 0) return dr;
|
|
3678
3772
|
return a.area.localeCompare(b.area);
|
|
3679
3773
|
});
|
|
3774
|
+
return groups;
|
|
3680
3775
|
}
|
|
3681
3776
|
//#endregion
|
|
3682
3777
|
//#region src/ui/tui/screens/audit/AuditChecksViewer/AuditChecksViewer.tsx
|
|
3683
3778
|
/**
|
|
3684
3779
|
* AuditChecksViewer — "Audit plan" tab.
|
|
3685
3780
|
*
|
|
3686
|
-
* Renders the full audit ledger as a scrollable
|
|
3687
|
-
*
|
|
3688
|
-
*
|
|
3781
|
+
* Renders the full audit ledger as a scrollable, area-grouped list that
|
|
3782
|
+
* mirrors the structure of the final report. Each area gets a sub-header
|
|
3783
|
+
* with a resolved/total count; checks within an area are sorted by
|
|
3784
|
+
* severity (error → warning → suggestion → pass → pending).
|
|
3689
3785
|
*
|
|
3690
3786
|
* Two interactions, both registered via `useKeyBindings`:
|
|
3691
3787
|
* - `e` — toggle detail rows (file:line + agent's `details` text)
|
|
@@ -3699,30 +3795,32 @@ const AuditChecksViewer = ({ checks }) => {
|
|
|
3699
3795
|
const [rawCols, termRows] = useStdoutDimensions();
|
|
3700
3796
|
const layout = computeLayout(rawCols, termRows);
|
|
3701
3797
|
const totalHeight = layout.visibleHeight + layout.viewerChrome;
|
|
3702
|
-
const
|
|
3703
|
-
const
|
|
3704
|
-
const
|
|
3705
|
-
const
|
|
3706
|
-
const [expanded, setExpanded] = useState(sorted.some((c) => c.status === "error" || c.status === "warning" || c.status === "suggestion") && hasExpandable);
|
|
3798
|
+
const groups = useMemo(() => groupChecksByArea(checks), [checks]);
|
|
3799
|
+
const counts = useMemo(() => statusCounts(checks), [checks]);
|
|
3800
|
+
const hasExpandable = checks.some((c) => Boolean(c.details || c.file));
|
|
3801
|
+
const [expanded, setExpanded] = useState(checks.some((c) => c.status === "error" || c.status === "warning" || c.status === "suggestion") && hasExpandable);
|
|
3707
3802
|
const allRows = useMemo(() => {
|
|
3708
3803
|
const rows = [];
|
|
3709
|
-
const
|
|
3710
|
-
rows.push(/* @__PURE__ */ jsx(
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3804
|
+
for (const group of groups) {
|
|
3805
|
+
rows.push(/* @__PURE__ */ jsx(AreaHeaderRow, {
|
|
3806
|
+
area: group.area,
|
|
3807
|
+
resolved: group.counts.resolved,
|
|
3808
|
+
total: group.counts.total
|
|
3809
|
+
}, `header-${group.area}`));
|
|
3810
|
+
for (const item of group.checks) {
|
|
3811
|
+
rows.push(/* @__PURE__ */ jsx(CheckRow, {
|
|
3812
|
+
item,
|
|
3813
|
+
layout
|
|
3814
|
+
}, item.id));
|
|
3815
|
+
if (expanded && (item.details || item.file)) rows.push(/* @__PURE__ */ jsx(DetailRow, {
|
|
3816
|
+
item,
|
|
3817
|
+
layout
|
|
3818
|
+
}, `${item.id}-detail`));
|
|
3819
|
+
}
|
|
3820
|
+
}
|
|
3722
3821
|
return rows;
|
|
3723
3822
|
}, [
|
|
3724
|
-
|
|
3725
|
-
pending,
|
|
3823
|
+
groups,
|
|
3726
3824
|
expanded,
|
|
3727
3825
|
layout
|
|
3728
3826
|
]);
|
|
@@ -3749,6 +3847,7 @@ const AuditChecksViewer = ({ checks }) => {
|
|
|
3749
3847
|
});
|
|
3750
3848
|
useKeyBindings("audit-checks-viewer", bindings);
|
|
3751
3849
|
const visibleRows = allRows.slice(clampedOffset, clampedOffset + layout.visibleHeight);
|
|
3850
|
+
const subtitle = groups.length === 0 ? "No checks yet." : `Review across ${groups.length} ${groups.length === 1 ? "area" : "areas"} — mirrors the final report.`;
|
|
3752
3851
|
return /* @__PURE__ */ jsxs(Box, {
|
|
3753
3852
|
flexDirection: "column",
|
|
3754
3853
|
paddingX: 1,
|
|
@@ -3760,7 +3859,11 @@ const AuditChecksViewer = ({ checks }) => {
|
|
|
3760
3859
|
}),
|
|
3761
3860
|
/* @__PURE__ */ jsx(Text, {
|
|
3762
3861
|
dimColor: true,
|
|
3763
|
-
children:
|
|
3862
|
+
children: subtitle
|
|
3863
|
+
}),
|
|
3864
|
+
/* @__PURE__ */ jsx(Summary, {
|
|
3865
|
+
total: checks.length,
|
|
3866
|
+
counts
|
|
3764
3867
|
}),
|
|
3765
3868
|
/* @__PURE__ */ jsx(Box, { height: 1 }),
|
|
3766
3869
|
/* @__PURE__ */ jsx(Header, { layout }),
|
|
@@ -3784,12 +3887,12 @@ const AuditChecksViewer = ({ checks }) => {
|
|
|
3784
3887
|
}),
|
|
3785
3888
|
/* @__PURE__ */ jsx(Footer, {
|
|
3786
3889
|
total: checks.length,
|
|
3787
|
-
counts
|
|
3890
|
+
counts
|
|
3788
3891
|
})
|
|
3789
3892
|
]
|
|
3790
3893
|
});
|
|
3791
3894
|
};
|
|
3792
3895
|
//#endregion
|
|
3793
|
-
export {
|
|
3896
|
+
export { CardLayout as C, WizardStore as E, SplitView as S, Icons as T, useStdoutDimensions as _, SEVERITY_ORDER as a, ProgressList as b, LearnCard as c, ScreenContainer as d, EventPlanViewer as f, GroupedPickerMenu as g, ConfirmationInput as h, SEVERITY_LABEL as i, HNViewer as l, ModalOverlay as m, McpScreen as n, ServiceHealthList as o, LogViewer as p, IssueTable as r, TipsCard as s, AuditChecksViewer as t, TabContainer as u, PickerMenu as v, Colors as w, LoadingBox as x, useKeyBindings as y };
|
|
3794
3897
|
|
|
3795
|
-
//# sourceMappingURL=AuditChecksViewer-
|
|
3898
|
+
//# sourceMappingURL=AuditChecksViewer-B0J7zcY2.js.map
|