splithub 0.3.0 → 0.4.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/alerts-Q46GJETJ.js +28 -0
- package/dist/analytics-TRB4FPA5.js +18 -0
- package/dist/{chunk-4YXB73AZ.js → chunk-4OQEIP33.js} +28 -3
- package/dist/chunk-4OQEIP33.js.map +1 -0
- package/dist/{chunk-4PUFNQ5F.js → chunk-6GP534WA.js} +6 -6
- package/dist/{chunk-QKOATM5G.js → chunk-6MWK7QV4.js} +12 -11
- package/dist/chunk-6MWK7QV4.js.map +1 -0
- package/dist/{chunk-TIL2VQX4.js → chunk-6T652N3X.js} +2 -2
- package/dist/{chunk-WTUZFXXJ.js → chunk-BEQ74VTG.js} +8 -8
- package/dist/{chunk-WTUZFXXJ.js.map → chunk-BEQ74VTG.js.map} +1 -1
- package/dist/chunk-CAFWOX3S.js +49 -0
- package/dist/chunk-CAFWOX3S.js.map +1 -0
- package/dist/{chunk-JBPVGBLN.js → chunk-EVTPXMLO.js} +12 -12
- package/dist/chunk-EVTPXMLO.js.map +1 -0
- package/dist/chunk-F5ESBFEN.js +237 -0
- package/dist/chunk-F5ESBFEN.js.map +1 -0
- package/dist/chunk-FDSNZRQQ.js +125 -0
- package/dist/chunk-FDSNZRQQ.js.map +1 -0
- package/dist/{chunk-C3ZJEZDE.js → chunk-FOHCW2J3.js} +44 -17
- package/dist/chunk-FOHCW2J3.js.map +1 -0
- package/dist/{chunk-EQCMCULO.js → chunk-GIYKIJKW.js} +25 -8
- package/dist/chunk-GIYKIJKW.js.map +1 -0
- package/dist/{chunk-A3FYDTIP.js → chunk-HFIBLDUA.js} +2 -2
- package/dist/{chunk-J5ZUSS43.js → chunk-ILEPMQNT.js} +55 -2
- package/dist/chunk-ILEPMQNT.js.map +1 -0
- package/dist/chunk-J3DANPLP.js +250 -0
- package/dist/chunk-J3DANPLP.js.map +1 -0
- package/dist/{chunk-NHRWXNB5.js → chunk-KV7D6SB7.js} +8 -8
- package/dist/{chunk-NHRWXNB5.js.map → chunk-KV7D6SB7.js.map} +1 -1
- package/dist/chunk-MIHX7XYV.js +819 -0
- package/dist/chunk-MIHX7XYV.js.map +1 -0
- package/dist/chunk-MSYL3XZF.js +243 -0
- package/dist/chunk-MSYL3XZF.js.map +1 -0
- package/dist/{chunk-4LE4SCWY.js → chunk-MUDDASN6.js} +2 -2
- package/dist/{chunk-U3QRNSLM.js → chunk-NFZZSF4M.js} +3 -3
- package/dist/{chunk-BNZFC2DQ.js → chunk-QBQKQH6S.js} +31 -18
- package/dist/chunk-QBQKQH6S.js.map +1 -0
- package/dist/{chunk-VSMWYVJ2.js → chunk-QCFQFDEB.js} +35 -13
- package/dist/chunk-QCFQFDEB.js.map +1 -0
- package/dist/{chunk-PMER7I7F.js → chunk-RMWW4YMN.js} +4 -4
- package/dist/{chunk-PMER7I7F.js.map → chunk-RMWW4YMN.js.map} +1 -1
- package/dist/chunk-SHKXD2C6.js +199 -0
- package/dist/chunk-SHKXD2C6.js.map +1 -0
- package/dist/chunk-SPXUP3WA.js +321 -0
- package/dist/chunk-SPXUP3WA.js.map +1 -0
- package/dist/chunk-SUUNAQAC.js +270 -0
- package/dist/chunk-SUUNAQAC.js.map +1 -0
- package/dist/{chunk-PP3RLIJP.js → chunk-ZISCJRR5.js} +4 -3
- package/dist/chunk-ZISCJRR5.js.map +1 -0
- package/dist/{ci-KFSOM2AF.js → ci-4SY2X2CU.js} +4 -4
- package/dist/connect-TCBFW2NT.js +220 -0
- package/dist/connect-TCBFW2NT.js.map +1 -0
- package/dist/create-GM5H72LW.js +18 -0
- package/dist/dev-YNKPWJHX.js +11 -0
- package/dist/doctor-BKS7TUAT.js +14 -0
- package/dist/domains-CR34APOD.js +10 -0
- package/dist/experiment-reports-LL2TFQQN.js +49 -0
- package/dist/{holdout-OYKY6UIE.js → holdout-JJEP6673.js} +7 -6
- package/dist/holdout-JJEP6673.js.map +1 -0
- package/dist/index.js +126 -37
- package/dist/index.js.map +1 -1
- package/dist/init-WHK4EV37.js +15 -0
- package/dist/lifecycle-3GUIJ74P.js +12 -0
- package/dist/links-BQZLMGZJ.js +18 -0
- package/dist/{login-AETAL2DO.js → login-OT77MNKL.js} +4 -4
- package/dist/login-OT77MNKL.js.map +1 -0
- package/dist/menu-QYXFUWNE.js +726 -0
- package/dist/menu-QYXFUWNE.js.map +1 -0
- package/dist/notes-BASGWNNX.js +18 -0
- package/dist/notes-BASGWNNX.js.map +1 -0
- package/dist/{plan-Q2EZSSAO.js → plan-44334RQS.js} +7 -7
- package/dist/plan-44334RQS.js.map +1 -0
- package/dist/push-UV4O66QR.js +16 -0
- package/dist/push-UV4O66QR.js.map +1 -0
- package/dist/{refs-VPQ7WIRJ.js → refs-5DTSKMXU.js} +5 -5
- package/dist/{remove-IPLTQIFK.js → remove-PYYPRP3R.js} +8 -8
- package/dist/{report-TOWSAQYM.js → report-JVMKVZTS.js} +6 -6
- package/dist/results-KC24ZZTX.js +20 -0
- package/dist/results-KC24ZZTX.js.map +1 -0
- package/dist/{review-HMBIZ6V2.js → review-GIYBPVP3.js} +3 -3
- package/dist/{ship-LKSCUDAE.js → ship-3TDWAQIJ.js} +8 -8
- package/dist/skills-LVIFTOTI.js +18 -0
- package/dist/skills-LVIFTOTI.js.map +1 -0
- package/dist/status-SK5PPBPL.js +17 -0
- package/dist/status-SK5PPBPL.js.map +1 -0
- package/dist/{update-R4L7ZP5G.js → update-XF7HWJ3A.js} +3 -3
- package/package.json +3 -3
- package/dist/chunk-4YXB73AZ.js.map +0 -1
- package/dist/chunk-BNZFC2DQ.js.map +0 -1
- package/dist/chunk-C3ZJEZDE.js.map +0 -1
- package/dist/chunk-EQCMCULO.js.map +0 -1
- package/dist/chunk-HK267YK2.js +0 -571
- package/dist/chunk-HK267YK2.js.map +0 -1
- package/dist/chunk-J5ZUSS43.js.map +0 -1
- package/dist/chunk-JBPVGBLN.js.map +0 -1
- package/dist/chunk-PP3RLIJP.js.map +0 -1
- package/dist/chunk-QKOATM5G.js.map +0 -1
- package/dist/chunk-VSMWYVJ2.js.map +0 -1
- package/dist/create-POZWP6JT.js +0 -18
- package/dist/dev-3SPMTW3T.js +0 -11
- package/dist/doctor-OHZEXUGO.js +0 -14
- package/dist/holdout-OYKY6UIE.js.map +0 -1
- package/dist/init-4PNOZUIZ.js +0 -15
- package/dist/lifecycle-3QVRQRHM.js +0 -12
- package/dist/menu-PBZVBCGA.js +0 -163
- package/dist/menu-PBZVBCGA.js.map +0 -1
- package/dist/plan-Q2EZSSAO.js.map +0 -1
- package/dist/push-7EELDSKG.js +0 -16
- package/dist/results-SMBCREVI.js +0 -17
- package/dist/skills-5ZAMIVP3.js +0 -18
- package/dist/status-7LDIKVX7.js +0 -12
- /package/dist/{ci-KFSOM2AF.js.map → alerts-Q46GJETJ.js.map} +0 -0
- /package/dist/{create-POZWP6JT.js.map → analytics-TRB4FPA5.js.map} +0 -0
- /package/dist/{chunk-4PUFNQ5F.js.map → chunk-6GP534WA.js.map} +0 -0
- /package/dist/{chunk-TIL2VQX4.js.map → chunk-6T652N3X.js.map} +0 -0
- /package/dist/{chunk-A3FYDTIP.js.map → chunk-HFIBLDUA.js.map} +0 -0
- /package/dist/{chunk-4LE4SCWY.js.map → chunk-MUDDASN6.js.map} +0 -0
- /package/dist/{chunk-U3QRNSLM.js.map → chunk-NFZZSF4M.js.map} +0 -0
- /package/dist/{dev-3SPMTW3T.js.map → ci-4SY2X2CU.js.map} +0 -0
- /package/dist/{doctor-OHZEXUGO.js.map → create-GM5H72LW.js.map} +0 -0
- /package/dist/{init-4PNOZUIZ.js.map → dev-YNKPWJHX.js.map} +0 -0
- /package/dist/{lifecycle-3QVRQRHM.js.map → doctor-BKS7TUAT.js.map} +0 -0
- /package/dist/{login-AETAL2DO.js.map → domains-CR34APOD.js.map} +0 -0
- /package/dist/{push-7EELDSKG.js.map → experiment-reports-LL2TFQQN.js.map} +0 -0
- /package/dist/{results-SMBCREVI.js.map → init-WHK4EV37.js.map} +0 -0
- /package/dist/{skills-5ZAMIVP3.js.map → lifecycle-3GUIJ74P.js.map} +0 -0
- /package/dist/{status-7LDIKVX7.js.map → links-BQZLMGZJ.js.map} +0 -0
- /package/dist/{refs-VPQ7WIRJ.js.map → refs-5DTSKMXU.js.map} +0 -0
- /package/dist/{remove-IPLTQIFK.js.map → remove-PYYPRP3R.js.map} +0 -0
- /package/dist/{report-TOWSAQYM.js.map → report-JVMKVZTS.js.map} +0 -0
- /package/dist/{review-HMBIZ6V2.js.map → review-GIYBPVP3.js.map} +0 -0
- /package/dist/{ship-LKSCUDAE.js.map → ship-3TDWAQIJ.js.map} +0 -0
- /package/dist/{update-R4L7ZP5G.js.map → update-XF7HWJ3A.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -2,46 +2,77 @@
|
|
|
2
2
|
import {
|
|
3
3
|
offerUpdateAfterCommand,
|
|
4
4
|
startUpdateCheck
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HFIBLDUA.js";
|
|
6
6
|
import {
|
|
7
7
|
c,
|
|
8
8
|
errorJson,
|
|
9
9
|
fail
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZISCJRR5.js";
|
|
11
11
|
|
|
12
12
|
// src/index.ts
|
|
13
13
|
import { createRequire } from "module";
|
|
14
14
|
import { parseArgs } from "util";
|
|
15
15
|
var updateCheck = startUpdateCheck({ argv: process.argv.slice(2), env: process.env, stdinTTY: process.stdin.isTTY, stdoutTTY: process.stdout.isTTY });
|
|
16
16
|
var HELP = `
|
|
17
|
-
${c.bold("splithub")} \u2014
|
|
17
|
+
${c.bold("splithub")} \u2014 experiments and analytics for agent-built apps
|
|
18
18
|
|
|
19
19
|
Usage
|
|
20
|
-
splithub
|
|
20
|
+
splithub the menu: experiments, analytics, links, alerts, notes, domains \u2014 pick what you need
|
|
21
|
+
|
|
22
|
+
Experiments
|
|
21
23
|
splithub init set up config, framework files, agent docs
|
|
22
|
-
splithub create add an experiment (wizard, or flags for agents)
|
|
24
|
+
splithub create add an experiment (wizard, or flags for agents); its goal can be any event you track()
|
|
23
25
|
splithub start|pause|finish <id>
|
|
24
26
|
splithub status all experiments with a verdict headline
|
|
25
27
|
splithub results <id> full verdict for one experiment
|
|
26
|
-
|
|
28
|
+
a slice: --from --to (first-exposure days) --filter country=DE (country, region, city, device, os, browser,
|
|
29
|
+
language, host, source, channel, utm_*, landing); one view: --by <dimension> (lift per segment),
|
|
30
|
+
--timeline (per day), --engagement (bounce, visit length per variant), --events (every goal and event
|
|
31
|
+
per variant, lift vs control); --export with --by <dimension> or --events writes CSV
|
|
32
|
+
splithub events --experiment <id> latest raw events of an experiment (--type exposure|goal, --limit 50, --before <ms>, --from --to, --filter)
|
|
33
|
+
splithub plan visitors an experiment needs (asks SplitHub Cloud, no account needed): --baseline 0.05 --mde 0.1 [--variants 2] [<id> for days at its traffic]
|
|
27
34
|
splithub refs <id> files and lines that use the experiment and its goal
|
|
28
35
|
splithub ship <id> --keep <v> finish, remove from the config and rewrite the code to the kept variant (--dry-run shows the diff)
|
|
29
36
|
splithub remove <id> remove an experiment from the config (archived in the cloud when connected)
|
|
30
|
-
splithub holdout set <percent> keep a share of visitors out of every
|
|
37
|
+
splithub holdout set <percent> keep a share of visitors out of every experiment to measure the long-term impact (0-50; --goal); holdout off removes it
|
|
31
38
|
splithub review [<id>] AI reviews stored in the cloud (Pro: at start, on verdict changes, on finish, or on demand)
|
|
39
|
+
|
|
40
|
+
Analytics
|
|
41
|
+
splithub analytics connect pick or create a property and name it on the app's provider (or get the sh.js tag); [<id>] [--name "Site"] [--force]
|
|
42
|
+
splithub analytics [<id>] every property, or one: visitors, pages, sources, events, goals (--by page|source|channel|country|event|goal|variant --experiment <key>|trait --key <name>, --days 7, --from --to, --filter country=DE, --compare [year|<from>..<to>])
|
|
43
|
+
splithub analytics create --name "Site" add a property (id generated, like sh-x1h78w); pause|resume|archive|restore|remove|events <id>
|
|
44
|
+
splithub analytics funnel <id> --steps "page:/,event:Signup,goal:paid" visitors per step, conversion, drop-off (--within visit|7d|30d, --by <dimension>)
|
|
45
|
+
splithub analytics paths <id> --page /pricing [--prev] where visitors go next (or came from)
|
|
46
|
+
splithub analytics retention <id> who comes back, per weekly cohort (--start visit|event:<name>|goal:<key>, --return visit|event:<name>, --period day|week)
|
|
47
|
+
splithub analytics realtime|props|export <id> visitors now; an event's props (--event <name> [--key <prop>]); CSV to stdout (--by <dimension>|day, --raw)
|
|
48
|
+
splithub analytics segments saved filters: --save <name> country=DE ..., --delete <id|name>; any report takes --segment <name>
|
|
49
|
+
|
|
50
|
+
Notes, links, alerts, domains (SplitHub Cloud)
|
|
51
|
+
splithub notes what happened on a day (--experiment <key> | --property <id>, --kind note|issue|win, --days 30)
|
|
52
|
+
splithub notes add "<text>" [--kind issue|win] [--experiment <key> | --property <id>] [--day YYYY-MM-DD]; notes edit <id> "<text>", notes delete <id>
|
|
53
|
+
splithub links short links and their clicks; links <id|slug> for one link's clicks
|
|
54
|
+
splithub links create <url> [<url> ...] [--slug spring] [--name "Spring sale"] [--weights 70,30]; links edit|pause|resume|delete <id|slug>
|
|
55
|
+
splithub alerts alert rules (they run on Pro) and recent alerts; alerts enable|disable|delete|test <id>
|
|
56
|
+
splithub alerts add <condition> srm | winner | loser --lift 10 | exposures --visitors N | conversions --conversions N | duration --days N | no_events --hours 24
|
|
57
|
+
| quota --percent 80 | usage --every 1000 | traffic_drop|traffic_spike --property <id> --percent 50
|
|
58
|
+
| goal_silent --property <id> --goal <key> --hours 24 | event_count --property <id> [--event <name>] --count N [--repeat]
|
|
59
|
+
(--experiment <key>, --name, --cooldown <hours>, --disabled, --pause, --finish, --drop-loser)
|
|
60
|
+
splithub domains which domains may send events, per experiment and property; domains set experiment|property <id> <domain...>, domains clear experiment|property <id>
|
|
61
|
+
|
|
62
|
+
Project
|
|
63
|
+
splithub push [--dry-run] upload splithub.config.ts to SplitHub Cloud (--dry-run: check and show what would change)
|
|
64
|
+
a key that already belonged to another experiment stops the push: --replace <keys> (new experiment, old numbers cleared) or --same <keys> (same experiment, numbers stay)
|
|
65
|
+
splithub pull show the config stored in the cloud
|
|
32
66
|
splithub report status and verdicts as Markdown, raw numbers when self-hosted (used by the GitHub workflow)
|
|
33
67
|
splithub ci init write .github/workflows/splithub.yml (checks on PRs, results comment on a schedule)
|
|
34
68
|
splithub dev [--url] [--hold] open the app with ?sh_debug=1 (console + panel: variants, reasons, events) and watch results
|
|
35
69
|
splithub doctor check the installation
|
|
36
70
|
splithub update [--yes] update splithub (and the project's @splithub/* packages) to the latest release; --json only reports
|
|
37
|
-
splithub skills [--mcp] install / refresh agent skills (library, A/B testing, API, MCP, self-hosting, ship the winner, full loop); --mcp registers the MCP server
|
|
71
|
+
splithub skills [--mcp] install / refresh agent skills (library, A/B testing, analytics, API, MCP, self-hosting, ship the winner, full loop); --mcp registers the MCP server
|
|
38
72
|
splithub login [--project <name|id>] connect this directory to a SplitHub Cloud project (sign-in link, no secrets typed)
|
|
39
73
|
splithub projects every directory connected on this machine and its project
|
|
40
74
|
splithub whoami the project this directory is connected to
|
|
41
75
|
splithub logout disconnect this directory
|
|
42
|
-
splithub push [--dry-run] upload splithub.config.ts to SplitHub Cloud (--dry-run: check and show what would change)
|
|
43
|
-
a key that already belonged to another test stops the push: --replace <keys> (new test, old numbers cleared) or --same <keys> (same test, numbers stay)
|
|
44
|
-
splithub pull show the config stored in the cloud
|
|
45
76
|
|
|
46
77
|
create flags
|
|
47
78
|
--kind value|component|redirect|mvt --id <key> --goal <goal> --status running|draft --name "Hero headline" --description "..." --yes
|
|
@@ -51,7 +82,7 @@ create flags
|
|
|
51
82
|
mvt: --factor headline=old:Old,new:New --factor button=blue:#2563eb,green:#16a34a (repeatable; first level = control)
|
|
52
83
|
limits: --traffic 50 (percent of visitors) --max-visitors 10000 --min-days 3 (opt-in days before a verdict, 0-30, default 0) --good-sample 5000 (visitors for a good sample) --start / --end <ISO date>
|
|
53
84
|
metrics: --secondary pricing_view,signup --guardrail refunds:higher,errors (must not get worse; :higher when a rise is bad)
|
|
54
|
-
layers: --layer checkout:0-50 (
|
|
85
|
+
layers: --layer checkout:0-50 (experiments in one layer never share a visitor; ranges must not overlap)
|
|
55
86
|
|
|
56
87
|
init flags
|
|
57
88
|
--mode self|cloud --db sqlite|postgres|mysql|custom (self mode) --key pk_... --no-install --no-login --no-mcp --github-action --yes
|
|
@@ -66,7 +97,9 @@ Global
|
|
|
66
97
|
-h, --help
|
|
67
98
|
`;
|
|
68
99
|
async function main() {
|
|
100
|
+
const args = process.argv.slice(2).map((a, i, all) => a === "--compare" && !/^(previous|year)$|\.\./.test(all[i + 1] ?? "") ? "--compare=previous" : a);
|
|
69
101
|
const { values, positionals } = parseArgs({
|
|
102
|
+
args,
|
|
70
103
|
allowPositionals: true,
|
|
71
104
|
options: {
|
|
72
105
|
url: { type: "string" },
|
|
@@ -114,7 +147,49 @@ async function main() {
|
|
|
114
147
|
"github-action": { type: "boolean", default: false },
|
|
115
148
|
secondary: { type: "string", multiple: true },
|
|
116
149
|
guardrail: { type: "string", multiple: true },
|
|
117
|
-
layer: { type: "string" }
|
|
150
|
+
layer: { type: "string" },
|
|
151
|
+
goals: { type: "string" },
|
|
152
|
+
by: { type: "string" },
|
|
153
|
+
days: { type: "string" },
|
|
154
|
+
from: { type: "string" },
|
|
155
|
+
filter: { type: "string", multiple: true },
|
|
156
|
+
limit: { type: "string" },
|
|
157
|
+
compare: { type: "string" },
|
|
158
|
+
segment: { type: "string" },
|
|
159
|
+
steps: { type: "string" },
|
|
160
|
+
within: { type: "string" },
|
|
161
|
+
page: { type: "string" },
|
|
162
|
+
prev: { type: "boolean", default: false },
|
|
163
|
+
return: { type: "string" },
|
|
164
|
+
period: { type: "string" },
|
|
165
|
+
event: { type: "string" },
|
|
166
|
+
raw: { type: "boolean", default: false },
|
|
167
|
+
save: { type: "string" },
|
|
168
|
+
delete: { type: "string" },
|
|
169
|
+
day: { type: "string" },
|
|
170
|
+
property: { type: "string" },
|
|
171
|
+
experiment: { type: "string" },
|
|
172
|
+
slug: { type: "string" },
|
|
173
|
+
every: { type: "string" },
|
|
174
|
+
count: { type: "string" },
|
|
175
|
+
percent: { type: "string" },
|
|
176
|
+
hours: { type: "string" },
|
|
177
|
+
visitors: { type: "string" },
|
|
178
|
+
conversions: { type: "string" },
|
|
179
|
+
lift: { type: "string" },
|
|
180
|
+
"min-visitors": { type: "string" },
|
|
181
|
+
cooldown: { type: "string" },
|
|
182
|
+
repeat: { type: "boolean", default: false },
|
|
183
|
+
disabled: { type: "boolean", default: false },
|
|
184
|
+
pause: { type: "boolean", default: false },
|
|
185
|
+
finish: { type: "boolean", default: false },
|
|
186
|
+
"drop-loser": { type: "boolean", default: false },
|
|
187
|
+
timeline: { type: "boolean", default: false },
|
|
188
|
+
engagement: { type: "boolean", default: false },
|
|
189
|
+
events: { type: "boolean", default: false },
|
|
190
|
+
export: { type: "boolean", default: false },
|
|
191
|
+
type: { type: "string" },
|
|
192
|
+
before: { type: "string" }
|
|
118
193
|
}
|
|
119
194
|
});
|
|
120
195
|
const [command, arg, third] = positionals;
|
|
@@ -128,60 +203,73 @@ async function main() {
|
|
|
128
203
|
return;
|
|
129
204
|
}
|
|
130
205
|
if (!command) {
|
|
131
|
-
if (process.stdin.isTTY && process.stdout.isTTY && !values.json) return (await import("./menu-
|
|
206
|
+
if (process.stdin.isTTY && process.stdout.isTTY && !values.json) return (await import("./menu-QYXFUWNE.js")).menu(values);
|
|
132
207
|
console.log(HELP.trimEnd());
|
|
133
208
|
return;
|
|
134
209
|
}
|
|
135
210
|
switch (command) {
|
|
136
211
|
case "init":
|
|
137
|
-
return (await import("./init-
|
|
212
|
+
return (await import("./init-WHK4EV37.js")).init(values);
|
|
138
213
|
case "create":
|
|
139
|
-
return (await import("./create-
|
|
214
|
+
return (await import("./create-GM5H72LW.js")).create(values);
|
|
140
215
|
case "start":
|
|
141
216
|
case "pause":
|
|
142
217
|
case "finish":
|
|
143
|
-
return (await import("./lifecycle-
|
|
218
|
+
return (await import("./lifecycle-3GUIJ74P.js")).lifecycle(command, arg, values);
|
|
144
219
|
case "status":
|
|
145
|
-
return (await import("./status-
|
|
220
|
+
return (await import("./status-SK5PPBPL.js")).status(values);
|
|
146
221
|
case "results":
|
|
147
|
-
return (await import("./results-
|
|
222
|
+
return (await import("./results-KC24ZZTX.js")).results(arg, values);
|
|
223
|
+
case "events":
|
|
224
|
+
return (await import("./experiment-reports-LL2TFQQN.js")).experimentEvents(typeof values.experiment === "string" ? values.experiment : arg, values);
|
|
148
225
|
case "plan":
|
|
149
|
-
return (await import("./plan-
|
|
226
|
+
return (await import("./plan-44334RQS.js")).plan(arg, values);
|
|
150
227
|
case "refs":
|
|
151
|
-
return (await import("./refs-
|
|
228
|
+
return (await import("./refs-5DTSKMXU.js")).refs(arg, values);
|
|
152
229
|
case "remove":
|
|
153
|
-
return (await import("./remove-
|
|
230
|
+
return (await import("./remove-PYYPRP3R.js")).remove(arg, values);
|
|
154
231
|
case "ship":
|
|
155
|
-
return (await import("./ship-
|
|
232
|
+
return (await import("./ship-3TDWAQIJ.js")).ship(arg, values);
|
|
156
233
|
case "report":
|
|
157
|
-
return (await import("./report-
|
|
234
|
+
return (await import("./report-JVMKVZTS.js")).report(values);
|
|
158
235
|
case "ci":
|
|
159
236
|
if (arg !== "init") fail("USAGE", `Unknown "ci ${arg ?? ""}".`, "Run npx splithub ci init.");
|
|
160
|
-
return (await import("./ci-
|
|
237
|
+
return (await import("./ci-4SY2X2CU.js")).ciInit(values);
|
|
161
238
|
case "holdout":
|
|
162
|
-
return (await import("./holdout-
|
|
239
|
+
return (await import("./holdout-JJEP6673.js")).holdout(arg, third, values);
|
|
240
|
+
case "analytics":
|
|
241
|
+
case "properties":
|
|
242
|
+
return (await import("./analytics-TRB4FPA5.js")).analytics(positionals.slice(1), values);
|
|
243
|
+
case "notes":
|
|
244
|
+
return (await import("./notes-BASGWNNX.js")).notes(positionals.slice(1), values);
|
|
245
|
+
case "links":
|
|
246
|
+
return (await import("./links-BQZLMGZJ.js")).links(positionals.slice(1), values);
|
|
247
|
+
case "alerts":
|
|
248
|
+
return (await import("./alerts-Q46GJETJ.js")).alerts(positionals.slice(1), values);
|
|
249
|
+
case "domains":
|
|
250
|
+
return (await import("./domains-CR34APOD.js")).domains(positionals.slice(1), values);
|
|
163
251
|
case "review":
|
|
164
|
-
return (await import("./review-
|
|
252
|
+
return (await import("./review-GIYBPVP3.js")).review(arg, values);
|
|
165
253
|
case "dev":
|
|
166
|
-
return (await import("./dev-
|
|
254
|
+
return (await import("./dev-YNKPWJHX.js")).dev(values);
|
|
167
255
|
case "doctor":
|
|
168
|
-
return (await import("./doctor-
|
|
256
|
+
return (await import("./doctor-BKS7TUAT.js")).doctor(values);
|
|
169
257
|
case "update":
|
|
170
|
-
return (await import("./update-
|
|
258
|
+
return (await import("./update-XF7HWJ3A.js")).update(values);
|
|
171
259
|
case "skills":
|
|
172
|
-
return (await import("./skills-
|
|
260
|
+
return (await import("./skills-LVIFTOTI.js")).skills(values);
|
|
173
261
|
case "push":
|
|
174
|
-
return (await import("./push-
|
|
262
|
+
return (await import("./push-UV4O66QR.js")).push(values);
|
|
175
263
|
case "pull":
|
|
176
|
-
return (await import("./push-
|
|
264
|
+
return (await import("./push-UV4O66QR.js")).pull(values);
|
|
177
265
|
case "login":
|
|
178
|
-
return (await import("./login-
|
|
266
|
+
return (await import("./login-OT77MNKL.js")).login(values);
|
|
179
267
|
case "logout":
|
|
180
|
-
return (await import("./login-
|
|
268
|
+
return (await import("./login-OT77MNKL.js")).logout(values);
|
|
181
269
|
case "whoami":
|
|
182
|
-
return (await import("./login-
|
|
270
|
+
return (await import("./login-OT77MNKL.js")).whoami(values);
|
|
183
271
|
case "projects":
|
|
184
|
-
return (await import("./login-
|
|
272
|
+
return (await import("./login-OT77MNKL.js")).projects(values);
|
|
185
273
|
default:
|
|
186
274
|
fail("USAGE", `Unknown command "${command}".`, "Run npx splithub --help for the list.");
|
|
187
275
|
}
|
|
@@ -191,6 +279,7 @@ main().then(() => offerUpdateAfterCommand(updateCheck)).catch((error) => {
|
|
|
191
279
|
if (process.argv.includes("--json")) console.log(JSON.stringify(body));
|
|
192
280
|
else {
|
|
193
281
|
console.error(c.red(`error: ${body.error}`));
|
|
282
|
+
if (body.scope && !body.error.includes(body.scope)) console.error(c.dim(`Missing scope: ${body.scope}`));
|
|
194
283
|
if (body.hint) console.error(c.dim(body.hint));
|
|
195
284
|
}
|
|
196
285
|
process.exit(1);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { createRequire } from 'node:module';\nimport { parseArgs } from 'node:util';\nimport { errorJson, fail } from './errors';\nimport { c } from './ui';\nimport { offerUpdateAfterCommand, startUpdateCheck } from './update';\n\n// Started before the command so the registry answer is usually in by the time it ends.\nconst updateCheck = startUpdateCheck({ argv: process.argv.slice(2), env: process.env, stdinTTY: process.stdin.isTTY, stdoutTTY: process.stdout.isTTY });\n\nconst HELP = `\n${c.bold('splithub')} — A/B testing for agent-built apps\n\nUsage\n splithub interactive menu: set up, create, results, start/pause, push — step by step\n splithub init set up config, framework files, agent docs\n splithub create add an experiment (wizard, or flags for agents)\n splithub start|pause|finish <id>\n splithub status all experiments with a verdict headline\n splithub results <id> full verdict for one experiment\n splithub plan visitors a test needs (asks SplitHub Cloud, no account needed): --baseline 0.05 --mde 0.1 [--variants 2] [<id> for days at its traffic]\n splithub refs <id> files and lines that use the experiment and its goal\n splithub ship <id> --keep <v> finish, remove from the config and rewrite the code to the kept variant (--dry-run shows the diff)\n splithub remove <id> remove an experiment from the config (archived in the cloud when connected)\n splithub holdout set <percent> keep a share of visitors out of every test to measure the long-term impact (0-50; --goal); holdout off removes it\n splithub review [<id>] AI reviews stored in the cloud (Pro: at start, on verdict changes, on finish, or on demand)\n splithub report status and verdicts as Markdown, raw numbers when self-hosted (used by the GitHub workflow)\n splithub ci init write .github/workflows/splithub.yml (checks on PRs, results comment on a schedule)\n splithub dev [--url] [--hold] open the app with ?sh_debug=1 (console + panel: variants, reasons, events) and watch results\n splithub doctor check the installation\n splithub update [--yes] update splithub (and the project's @splithub/* packages) to the latest release; --json only reports\n splithub skills [--mcp] install / refresh agent skills (library, A/B testing, API, MCP, self-hosting, ship the winner, full loop); --mcp registers the MCP server\n splithub login [--project <name|id>] connect this directory to a SplitHub Cloud project (sign-in link, no secrets typed)\n splithub projects every directory connected on this machine and its project\n splithub whoami the project this directory is connected to\n splithub logout disconnect this directory\n splithub push [--dry-run] upload splithub.config.ts to SplitHub Cloud (--dry-run: check and show what would change)\n a key that already belonged to another test stops the push: --replace <keys> (new test, old numbers cleared) or --same <keys> (same test, numbers stay)\n splithub pull show the config stored in the cloud\n\ncreate flags\n --kind value|component|redirect|mvt --id <key> --goal <goal> --status running|draft --name \"Hero headline\" --description \"...\" --yes\n value / component / redirect: --variants control,b --weights 50,50\n value: --value control=\"Old text\" --value b=\"New text\" (repeatable)\n redirect: --match /path --to control=/ --to b=/new (repeatable)\n mvt: --factor headline=old:Old,new:New --factor button=blue:#2563eb,green:#16a34a (repeatable; first level = control)\n limits: --traffic 50 (percent of visitors) --max-visitors 10000 --min-days 3 (opt-in days before a verdict, 0-30, default 0) --good-sample 5000 (visitors for a good sample) --start / --end <ISO date>\n metrics: --secondary pricing_view,signup --guardrail refunds:higher,errors (must not get worse; :higher when a rise is bad)\n layers: --layer checkout:0-50 (tests in one layer never share a visitor; ranges must not overlap)\n\ninit flags\n --mode self|cloud --db sqlite|postgres|mysql|custom (self mode) --key pk_... --no-install --no-login --no-mcp --github-action --yes\n (cloud mode without a saved login prints a link; approve it in the browser and init continues)\n\nGlobal\n --url <url> results endpoint (default: $SPLITHUB_URL, the cloud API in cloud mode, else the local dev server)\n --token <token> admin token (self: $SPLITHUB_ADMIN_TOKEN) or project API key (cloud: $SPLITHUB_API_KEY, else the key saved by \"splithub login\")\n --api <url> cloud API base (default: https://go.splithub.io/v1 or $SPLITHUB_API)\n --json one line of JSON (for agents); errors are { error, code, hint? } and exit 1\n -v, --version\n -h, --help\n`;\n\nasync function main(): Promise<void> {\n const { values, positionals } = parseArgs({\n allowPositionals: true,\n options: {\n url: { type: 'string' },\n api: { type: 'string' },\n token: { type: 'string' },\n json: { type: 'boolean', default: false },\n yes: { type: 'boolean', short: 'y', default: false },\n help: { type: 'boolean', short: 'h', default: false },\n version: { type: 'boolean', short: 'v', default: false },\n mode: { type: 'string' },\n db: { type: 'string' },\n key: { type: 'string' },\n 'no-install': { type: 'boolean', default: false },\n 'no-login': { type: 'boolean', default: false },\n 'no-mcp': { type: 'boolean', default: false },\n 'no-open': { type: 'boolean', default: false },\n hold: { type: 'boolean', default: false },\n mcp: { type: 'boolean', default: false },\n force: { type: 'boolean', default: false },\n kind: { type: 'string' },\n id: { type: 'string' },\n variants: { type: 'string' },\n weights: { type: 'string' },\n goal: { type: 'string' },\n value: { type: 'string', multiple: true },\n match: { type: 'string' },\n to: { type: 'string', multiple: true },\n factor: { type: 'string', multiple: true },\n status: { type: 'string' },\n description: { type: 'string' },\n name: { type: 'string' },\n replace: { type: 'string' },\n same: { type: 'string' },\n traffic: { type: 'string' },\n 'max-visitors': { type: 'string' },\n 'min-days': { type: 'string' },\n 'good-sample': { type: 'string' },\n start: { type: 'string' },\n end: { type: 'string' },\n project: { type: 'string' },\n keep: { type: 'string' },\n 'dry-run': { type: 'boolean', default: false },\n baseline: { type: 'string' },\n mde: { type: 'string' },\n 'github-action': { type: 'boolean', default: false },\n secondary: { type: 'string', multiple: true },\n guardrail: { type: 'string', multiple: true },\n layer: { type: 'string' },\n },\n });\n const [command, arg, third] = positionals;\n if (values.help) {\n console.log(HELP.trimEnd());\n return;\n }\n if (values.version) {\n // dist/index.js sits next to the package.json that npm installed.\n const { version } = createRequire(import.meta.url)('../package.json') as { version: string };\n console.log(values.json ? JSON.stringify({ version }) : version);\n return;\n }\n if (!command) {\n // A terminal → the interactive menu; a pipe or an agent → the help text.\n if (process.stdin.isTTY && process.stdout.isTTY && !values.json) return (await import('./commands/menu')).menu(values);\n console.log(HELP.trimEnd());\n return;\n }\n // Each command loads on demand: `splithub status` never pays for the wizard or the TypeScript compiler.\n switch (command) {\n case 'init':\n return (await import('./commands/init')).init(values);\n case 'create':\n return (await import('./commands/create')).create(values);\n case 'start':\n case 'pause':\n case 'finish':\n return (await import('./commands/lifecycle')).lifecycle(command, arg, values);\n case 'status':\n return (await import('./commands/status')).status(values);\n case 'results':\n return (await import('./commands/results')).results(arg, values);\n case 'plan':\n return (await import('./commands/plan')).plan(arg, values);\n case 'refs':\n return (await import('./commands/refs')).refs(arg, values);\n case 'remove':\n return (await import('./commands/remove')).remove(arg, values);\n case 'ship':\n return (await import('./commands/ship')).ship(arg, values);\n case 'report':\n return (await import('./commands/report')).report(values);\n case 'ci':\n if (arg !== 'init') fail('USAGE', `Unknown \"ci ${arg ?? ''}\".`, 'Run npx splithub ci init.');\n return (await import('./commands/ci')).ciInit(values);\n case 'holdout':\n return (await import('./commands/holdout')).holdout(arg, third, values);\n case 'review':\n return (await import('./commands/review')).review(arg, values);\n case 'dev':\n return (await import('./commands/dev')).dev(values);\n case 'doctor':\n return (await import('./commands/doctor')).doctor(values);\n case 'update':\n return (await import('./commands/update')).update(values);\n case 'skills':\n return (await import('./commands/skills')).skills(values);\n case 'push':\n return (await import('./commands/push')).push(values);\n case 'pull':\n return (await import('./commands/push')).pull(values);\n case 'login':\n return (await import('./commands/login')).login(values);\n case 'logout':\n return (await import('./commands/login')).logout(values);\n case 'whoami':\n return (await import('./commands/login')).whoami(values);\n case 'projects':\n return (await import('./commands/login')).projects(values);\n default:\n fail('USAGE', `Unknown command \"${command}\".`, 'Run npx splithub --help for the list.');\n }\n}\n\nmain()\n .then(() => offerUpdateAfterCommand(updateCheck))\n .catch((error: unknown) => {\n const body = errorJson(error);\n if (process.argv.includes('--json')) console.log(JSON.stringify(body));\n else {\n console.error(c.red(`error: ${body.error}`));\n if (body.hint) console.error(c.dim(body.hint));\n }\n process.exit(1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D;AACE,WAAK,SAAS,oBAAoB,OAAO,MAAM,uCAAuC;AAAA,EAC1F;AACF;AAEA,KAAK,EACF,KAAK,MAAM,wBAAwB,WAAW,CAAC,EAC/C,MAAM,CAAC,UAAmB;AACzB,QAAM,OAAO,UAAU,KAAK;AAC5B,MAAI,QAAQ,KAAK,SAAS,QAAQ,EAAG,SAAQ,IAAI,KAAK,UAAU,IAAI,CAAC;AAAA,OAChE;AACH,YAAQ,MAAM,EAAE,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;AAC3C,QAAI,KAAK,KAAM,SAAQ,MAAM,EAAE,IAAI,KAAK,IAAI,CAAC;AAAA,EAC/C;AACA,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { createRequire } from 'node:module';\nimport { parseArgs } from 'node:util';\nimport { errorJson, fail } from './errors';\nimport { c } from './ui';\nimport { offerUpdateAfterCommand, startUpdateCheck } from './update';\n\n// Started before the command so the registry answer is usually in by the time it ends.\nconst updateCheck = startUpdateCheck({ argv: process.argv.slice(2), env: process.env, stdinTTY: process.stdin.isTTY, stdoutTTY: process.stdout.isTTY });\n\nconst HELP = `\n${c.bold('splithub')} — experiments and analytics for agent-built apps\n\nUsage\n splithub the menu: experiments, analytics, links, alerts, notes, domains — pick what you need\n\nExperiments\n splithub init set up config, framework files, agent docs\n splithub create add an experiment (wizard, or flags for agents); its goal can be any event you track()\n splithub start|pause|finish <id>\n splithub status all experiments with a verdict headline\n splithub results <id> full verdict for one experiment\n a slice: --from --to (first-exposure days) --filter country=DE (country, region, city, device, os, browser,\n language, host, source, channel, utm_*, landing); one view: --by <dimension> (lift per segment),\n --timeline (per day), --engagement (bounce, visit length per variant), --events (every goal and event\n per variant, lift vs control); --export with --by <dimension> or --events writes CSV\n splithub events --experiment <id> latest raw events of an experiment (--type exposure|goal, --limit 50, --before <ms>, --from --to, --filter)\n splithub plan visitors an experiment needs (asks SplitHub Cloud, no account needed): --baseline 0.05 --mde 0.1 [--variants 2] [<id> for days at its traffic]\n splithub refs <id> files and lines that use the experiment and its goal\n splithub ship <id> --keep <v> finish, remove from the config and rewrite the code to the kept variant (--dry-run shows the diff)\n splithub remove <id> remove an experiment from the config (archived in the cloud when connected)\n splithub holdout set <percent> keep a share of visitors out of every experiment to measure the long-term impact (0-50; --goal); holdout off removes it\n splithub review [<id>] AI reviews stored in the cloud (Pro: at start, on verdict changes, on finish, or on demand)\n\nAnalytics\n splithub analytics connect pick or create a property and name it on the app's provider (or get the sh.js tag); [<id>] [--name \"Site\"] [--force]\n splithub analytics [<id>] every property, or one: visitors, pages, sources, events, goals (--by page|source|channel|country|event|goal|variant --experiment <key>|trait --key <name>, --days 7, --from --to, --filter country=DE, --compare [year|<from>..<to>])\n splithub analytics create --name \"Site\" add a property (id generated, like sh-x1h78w); pause|resume|archive|restore|remove|events <id>\n splithub analytics funnel <id> --steps \"page:/,event:Signup,goal:paid\" visitors per step, conversion, drop-off (--within visit|7d|30d, --by <dimension>)\n splithub analytics paths <id> --page /pricing [--prev] where visitors go next (or came from)\n splithub analytics retention <id> who comes back, per weekly cohort (--start visit|event:<name>|goal:<key>, --return visit|event:<name>, --period day|week)\n splithub analytics realtime|props|export <id> visitors now; an event's props (--event <name> [--key <prop>]); CSV to stdout (--by <dimension>|day, --raw)\n splithub analytics segments saved filters: --save <name> country=DE ..., --delete <id|name>; any report takes --segment <name>\n\nNotes, links, alerts, domains (SplitHub Cloud)\n splithub notes what happened on a day (--experiment <key> | --property <id>, --kind note|issue|win, --days 30)\n splithub notes add \"<text>\" [--kind issue|win] [--experiment <key> | --property <id>] [--day YYYY-MM-DD]; notes edit <id> \"<text>\", notes delete <id>\n splithub links short links and their clicks; links <id|slug> for one link's clicks\n splithub links create <url> [<url> ...] [--slug spring] [--name \"Spring sale\"] [--weights 70,30]; links edit|pause|resume|delete <id|slug>\n splithub alerts alert rules (they run on Pro) and recent alerts; alerts enable|disable|delete|test <id>\n splithub alerts add <condition> srm | winner | loser --lift 10 | exposures --visitors N | conversions --conversions N | duration --days N | no_events --hours 24\n | quota --percent 80 | usage --every 1000 | traffic_drop|traffic_spike --property <id> --percent 50\n | goal_silent --property <id> --goal <key> --hours 24 | event_count --property <id> [--event <name>] --count N [--repeat]\n (--experiment <key>, --name, --cooldown <hours>, --disabled, --pause, --finish, --drop-loser)\n splithub domains which domains may send events, per experiment and property; domains set experiment|property <id> <domain...>, domains clear experiment|property <id>\n\nProject\n splithub push [--dry-run] upload splithub.config.ts to SplitHub Cloud (--dry-run: check and show what would change)\n a key that already belonged to another experiment stops the push: --replace <keys> (new experiment, old numbers cleared) or --same <keys> (same experiment, numbers stay)\n splithub pull show the config stored in the cloud\n splithub report status and verdicts as Markdown, raw numbers when self-hosted (used by the GitHub workflow)\n splithub ci init write .github/workflows/splithub.yml (checks on PRs, results comment on a schedule)\n splithub dev [--url] [--hold] open the app with ?sh_debug=1 (console + panel: variants, reasons, events) and watch results\n splithub doctor check the installation\n splithub update [--yes] update splithub (and the project's @splithub/* packages) to the latest release; --json only reports\n splithub skills [--mcp] install / refresh agent skills (library, A/B testing, analytics, API, MCP, self-hosting, ship the winner, full loop); --mcp registers the MCP server\n splithub login [--project <name|id>] connect this directory to a SplitHub Cloud project (sign-in link, no secrets typed)\n splithub projects every directory connected on this machine and its project\n splithub whoami the project this directory is connected to\n splithub logout disconnect this directory\n\ncreate flags\n --kind value|component|redirect|mvt --id <key> --goal <goal> --status running|draft --name \"Hero headline\" --description \"...\" --yes\n value / component / redirect: --variants control,b --weights 50,50\n value: --value control=\"Old text\" --value b=\"New text\" (repeatable)\n redirect: --match /path --to control=/ --to b=/new (repeatable)\n mvt: --factor headline=old:Old,new:New --factor button=blue:#2563eb,green:#16a34a (repeatable; first level = control)\n limits: --traffic 50 (percent of visitors) --max-visitors 10000 --min-days 3 (opt-in days before a verdict, 0-30, default 0) --good-sample 5000 (visitors for a good sample) --start / --end <ISO date>\n metrics: --secondary pricing_view,signup --guardrail refunds:higher,errors (must not get worse; :higher when a rise is bad)\n layers: --layer checkout:0-50 (experiments in one layer never share a visitor; ranges must not overlap)\n\ninit flags\n --mode self|cloud --db sqlite|postgres|mysql|custom (self mode) --key pk_... --no-install --no-login --no-mcp --github-action --yes\n (cloud mode without a saved login prints a link; approve it in the browser and init continues)\n\nGlobal\n --url <url> results endpoint (default: $SPLITHUB_URL, the cloud API in cloud mode, else the local dev server)\n --token <token> admin token (self: $SPLITHUB_ADMIN_TOKEN) or project API key (cloud: $SPLITHUB_API_KEY, else the key saved by \"splithub login\")\n --api <url> cloud API base (default: https://go.splithub.io/v1 or $SPLITHUB_API)\n --json one line of JSON (for agents); errors are { error, code, hint? } and exit 1\n -v, --version\n -h, --help\n`;\n\nasync function main(): Promise<void> {\n // `--compare` alone means the period right before; it takes a value only when one follows (year, previous, from..to).\n const args = process.argv.slice(2).map((a, i, all) => (a === '--compare' && !/^(previous|year)$|\\.\\./.test(all[i + 1] ?? '') ? '--compare=previous' : a));\n const { values, positionals } = parseArgs({\n args,\n allowPositionals: true,\n options: {\n url: { type: 'string' },\n api: { type: 'string' },\n token: { type: 'string' },\n json: { type: 'boolean', default: false },\n yes: { type: 'boolean', short: 'y', default: false },\n help: { type: 'boolean', short: 'h', default: false },\n version: { type: 'boolean', short: 'v', default: false },\n mode: { type: 'string' },\n db: { type: 'string' },\n key: { type: 'string' },\n 'no-install': { type: 'boolean', default: false },\n 'no-login': { type: 'boolean', default: false },\n 'no-mcp': { type: 'boolean', default: false },\n 'no-open': { type: 'boolean', default: false },\n hold: { type: 'boolean', default: false },\n mcp: { type: 'boolean', default: false },\n force: { type: 'boolean', default: false },\n kind: { type: 'string' },\n id: { type: 'string' },\n variants: { type: 'string' },\n weights: { type: 'string' },\n goal: { type: 'string' },\n value: { type: 'string', multiple: true },\n match: { type: 'string' },\n to: { type: 'string', multiple: true },\n factor: { type: 'string', multiple: true },\n status: { type: 'string' },\n description: { type: 'string' },\n name: { type: 'string' },\n replace: { type: 'string' },\n same: { type: 'string' },\n traffic: { type: 'string' },\n 'max-visitors': { type: 'string' },\n 'min-days': { type: 'string' },\n 'good-sample': { type: 'string' },\n start: { type: 'string' },\n end: { type: 'string' },\n project: { type: 'string' },\n keep: { type: 'string' },\n 'dry-run': { type: 'boolean', default: false },\n baseline: { type: 'string' },\n mde: { type: 'string' },\n 'github-action': { type: 'boolean', default: false },\n secondary: { type: 'string', multiple: true },\n guardrail: { type: 'string', multiple: true },\n layer: { type: 'string' },\n goals: { type: 'string' },\n by: { type: 'string' },\n days: { type: 'string' },\n from: { type: 'string' },\n filter: { type: 'string', multiple: true },\n limit: { type: 'string' },\n compare: { type: 'string' },\n segment: { type: 'string' },\n steps: { type: 'string' },\n within: { type: 'string' },\n page: { type: 'string' },\n prev: { type: 'boolean', default: false },\n return: { type: 'string' },\n period: { type: 'string' },\n event: { type: 'string' },\n raw: { type: 'boolean', default: false },\n save: { type: 'string' },\n delete: { type: 'string' },\n day: { type: 'string' },\n property: { type: 'string' },\n experiment: { type: 'string' },\n slug: { type: 'string' },\n every: { type: 'string' },\n count: { type: 'string' },\n percent: { type: 'string' },\n hours: { type: 'string' },\n visitors: { type: 'string' },\n conversions: { type: 'string' },\n lift: { type: 'string' },\n 'min-visitors': { type: 'string' },\n cooldown: { type: 'string' },\n repeat: { type: 'boolean', default: false },\n disabled: { type: 'boolean', default: false },\n pause: { type: 'boolean', default: false },\n finish: { type: 'boolean', default: false },\n 'drop-loser': { type: 'boolean', default: false },\n timeline: { type: 'boolean', default: false },\n engagement: { type: 'boolean', default: false },\n events: { type: 'boolean', default: false },\n export: { type: 'boolean', default: false },\n type: { type: 'string' },\n before: { type: 'string' },\n },\n });\n const [command, arg, third] = positionals;\n if (values.help) {\n console.log(HELP.trimEnd());\n return;\n }\n if (values.version) {\n // dist/index.js sits next to the package.json that npm installed.\n const { version } = createRequire(import.meta.url)('../package.json') as { version: string };\n console.log(values.json ? JSON.stringify({ version }) : version);\n return;\n }\n if (!command) {\n // A terminal → the interactive menu; a pipe or an agent → the help text.\n if (process.stdin.isTTY && process.stdout.isTTY && !values.json) return (await import('./commands/menu')).menu(values);\n console.log(HELP.trimEnd());\n return;\n }\n // Each command loads on demand: `splithub status` never pays for the wizard or the TypeScript compiler.\n switch (command) {\n case 'init':\n return (await import('./commands/init')).init(values);\n case 'create':\n return (await import('./commands/create')).create(values);\n case 'start':\n case 'pause':\n case 'finish':\n return (await import('./commands/lifecycle')).lifecycle(command, arg, values);\n case 'status':\n return (await import('./commands/status')).status(values);\n case 'results':\n return (await import('./commands/results')).results(arg, values);\n case 'events':\n return (await import('./commands/experiment-reports')).experimentEvents(typeof values.experiment === 'string' ? values.experiment : arg, values);\n case 'plan':\n return (await import('./commands/plan')).plan(arg, values);\n case 'refs':\n return (await import('./commands/refs')).refs(arg, values);\n case 'remove':\n return (await import('./commands/remove')).remove(arg, values);\n case 'ship':\n return (await import('./commands/ship')).ship(arg, values);\n case 'report':\n return (await import('./commands/report')).report(values);\n case 'ci':\n if (arg !== 'init') fail('USAGE', `Unknown \"ci ${arg ?? ''}\".`, 'Run npx splithub ci init.');\n return (await import('./commands/ci')).ciInit(values);\n case 'holdout':\n return (await import('./commands/holdout')).holdout(arg, third, values);\n case 'analytics':\n case 'properties':\n return (await import('./commands/analytics')).analytics(positionals.slice(1), values);\n case 'notes':\n return (await import('./commands/notes')).notes(positionals.slice(1), values);\n case 'links':\n return (await import('./commands/links')).links(positionals.slice(1), values);\n case 'alerts':\n return (await import('./commands/alerts')).alerts(positionals.slice(1), values);\n case 'domains':\n return (await import('./commands/domains')).domains(positionals.slice(1), values);\n case 'review':\n return (await import('./commands/review')).review(arg, values);\n case 'dev':\n return (await import('./commands/dev')).dev(values);\n case 'doctor':\n return (await import('./commands/doctor')).doctor(values);\n case 'update':\n return (await import('./commands/update')).update(values);\n case 'skills':\n return (await import('./commands/skills')).skills(values);\n case 'push':\n return (await import('./commands/push')).push(values);\n case 'pull':\n return (await import('./commands/push')).pull(values);\n case 'login':\n return (await import('./commands/login')).login(values);\n case 'logout':\n return (await import('./commands/login')).logout(values);\n case 'whoami':\n return (await import('./commands/login')).whoami(values);\n case 'projects':\n return (await import('./commands/login')).projects(values);\n default:\n fail('USAGE', `Unknown command \"${command}\".`, 'Run npx splithub --help for the list.');\n }\n}\n\nmain()\n .then(() => offerUpdateAfterCommand(updateCheck))\n .catch((error: unknown) => {\n const body = errorJson(error);\n if (process.argv.includes('--json')) console.log(JSON.stringify(body));\n else {\n console.error(c.red(`error: ${body.error}`));\n if (body.scope && !body.error.includes(body.scope)) console.error(c.dim(`Missing scope: ${body.scope}`));\n if (body.hint) console.error(c.dim(body.hint));\n }\n process.exit(1);\n });\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB;AAM1B,IAAM,cAAc,iBAAiB,EAAE,MAAM,QAAQ,KAAK,MAAM,CAAC,GAAG,KAAK,QAAQ,KAAK,UAAU,QAAQ,MAAM,OAAO,WAAW,QAAQ,OAAO,MAAM,CAAC;AAEtJ,IAAM,OAAO;AAAA,EACX,EAAE,KAAK,UAAU,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmFpB,eAAe,OAAsB;AAEnC,QAAM,OAAO,QAAQ,KAAK,M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node
|
|
2
|
+
import {
|
|
3
|
+
init
|
|
4
|
+
} from "./chunk-FOHCW2J3.js";
|
|
5
|
+
import "./chunk-RMWW4YMN.js";
|
|
6
|
+
import "./chunk-NFZZSF4M.js";
|
|
7
|
+
import "./chunk-BEQ74VTG.js";
|
|
8
|
+
import "./chunk-MIHX7XYV.js";
|
|
9
|
+
import "./chunk-MUDDASN6.js";
|
|
10
|
+
import "./chunk-4OQEIP33.js";
|
|
11
|
+
import "./chunk-ZISCJRR5.js";
|
|
12
|
+
export {
|
|
13
|
+
init
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=init-WHK4EV37.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
lifecycle
|
|
4
|
+
} from "./chunk-KV7D6SB7.js";
|
|
5
|
+
import "./chunk-ILEPMQNT.js";
|
|
6
|
+
import "./chunk-MUDDASN6.js";
|
|
7
|
+
import "./chunk-4OQEIP33.js";
|
|
8
|
+
import "./chunk-ZISCJRR5.js";
|
|
9
|
+
export {
|
|
10
|
+
lifecycle
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=lifecycle-3GUIJ74P.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
destinationsFrom,
|
|
4
|
+
findLink,
|
|
5
|
+
links,
|
|
6
|
+
nameFromUrl
|
|
7
|
+
} from "./chunk-SHKXD2C6.js";
|
|
8
|
+
import "./chunk-J3DANPLP.js";
|
|
9
|
+
import "./chunk-MUDDASN6.js";
|
|
10
|
+
import "./chunk-4OQEIP33.js";
|
|
11
|
+
import "./chunk-ZISCJRR5.js";
|
|
12
|
+
export {
|
|
13
|
+
destinationsFrom,
|
|
14
|
+
findLink,
|
|
15
|
+
links,
|
|
16
|
+
nameFromUrl
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=links-BQZLMGZJ.js.map
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
logout,
|
|
6
6
|
projects,
|
|
7
7
|
whoami
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-NFZZSF4M.js";
|
|
9
|
+
import "./chunk-4OQEIP33.js";
|
|
10
|
+
import "./chunk-ZISCJRR5.js";
|
|
11
11
|
export {
|
|
12
12
|
deviceLogin,
|
|
13
13
|
login,
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
projects,
|
|
16
16
|
whoami
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=login-
|
|
18
|
+
//# sourceMappingURL=login-OT77MNKL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|