@letterstory/cli 0.176.99 → 0.176.100
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/lib/cli.mjs +2 -1
- package/lib/commands/vary.mjs +16 -2
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
88
88
|
|
|
89
89
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
90
|
-
export const VERSION = "0.176.
|
|
90
|
+
export const VERSION = "0.176.100";
|
|
91
91
|
|
|
92
92
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
93
93
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -1992,6 +1992,7 @@ Domains (the domains you hold, and free ones that match what people search):
|
|
|
1992
1992
|
Vary (A/B tests of a page's words and images on your own site):
|
|
1993
1993
|
vary [list] [--status running] [--site <id>] Your variationals and how many visitors each has seen
|
|
1994
1994
|
vary create --page <url> [--name <n>] [--goals-file <path>]
|
|
1995
|
+
vary launch [--brief <words>] [--page <url>] An A/B test Letter writes from the page and starts
|
|
1995
1996
|
vary get <id> Variants, their changes, and the results against the original
|
|
1996
1997
|
vary page <id> The page's copy as changes need it, and whether each variant still applies
|
|
1997
1998
|
vary save-variant <id> --deltas-file <path> [--key b] [--name <n>]
|
package/lib/commands/vary.mjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// `vary` — Variationals from a terminal: A/B tests of a page's words and images on your own site
|
|
2
2
|
// (docs/architecture/variationals.md). Thin wrappers over the variationals tools (list_variationals,
|
|
3
|
-
// get_variational, create_variational, update_variational, save_variational_variant,
|
|
3
|
+
// get_variational, create_variational, launch_variational_test, update_variational, save_variational_variant,
|
|
4
4
|
// remove_variational_variant, delete_variational, ship_variational_winner), the same lib functions the app calls.
|
|
5
5
|
//
|
|
6
6
|
// letterstory vary list [--status running]
|
|
7
7
|
// letterstory vary create --page https://acme.com/pricing [--name "Pricing headline"] [--goals-file goals.json]
|
|
8
|
+
// letterstory vary launch [--brief "Test the hero button"] [--page https://acme.com/] [--name <n>]
|
|
9
|
+
// made, given a challenger Letter writes from the page, and started (Ideas' A/B test row)
|
|
8
10
|
// letterstory vary get <id>
|
|
9
11
|
// letterstory vary page <id> the page's blocks, as a change's tag/before/occurrence
|
|
10
12
|
// letterstory vary save-variant <id> --deltas-file b.json [--key b] [--name "Shorter headline"]
|
|
@@ -74,6 +76,12 @@ export const ARGS = {
|
|
|
74
76
|
name: "name",
|
|
75
77
|
goals: jsonFile("goals-file", "goals"),
|
|
76
78
|
},
|
|
79
|
+
launch_variational_test: {
|
|
80
|
+
brief: "brief",
|
|
81
|
+
page_url: "page",
|
|
82
|
+
site_id: "site",
|
|
83
|
+
name: "name",
|
|
84
|
+
},
|
|
77
85
|
ship_variational_winner: {
|
|
78
86
|
variational_id: variationalId,
|
|
79
87
|
variant: "variant",
|
|
@@ -135,6 +143,12 @@ export async function cmdVary(ctx) {
|
|
|
135
143
|
case "create":
|
|
136
144
|
refuseUnknownFlags(rest, ARGS.create_variational, ["goals-file"]);
|
|
137
145
|
return varyShow(rest, await call(rest, "create_variational"));
|
|
146
|
+
case "launch": {
|
|
147
|
+
refuseUnknownFlags(rest, ARGS.launch_variational_test, []);
|
|
148
|
+
const result = await call(rest, "launch_variational_test");
|
|
149
|
+
printResult(rest.io, rest.flags, result, (r) => `${r.message}\n${r.variational.edit_url}`);
|
|
150
|
+
return 0;
|
|
151
|
+
}
|
|
138
152
|
case "update":
|
|
139
153
|
case "weights":
|
|
140
154
|
case "goals":
|
|
@@ -170,7 +184,7 @@ export async function cmdVary(ctx) {
|
|
|
170
184
|
}
|
|
171
185
|
default:
|
|
172
186
|
throw new CliError(
|
|
173
|
-
"Usage: vary [list|get|page|create|update|weights|goals|start|pause|end|save-variant|remove-variant|ship|delete]"
|
|
187
|
+
"Usage: vary [list|get|page|create|launch|update|weights|goals|start|pause|end|save-variant|remove-variant|ship|delete]"
|
|
174
188
|
);
|
|
175
189
|
}
|
|
176
190
|
}
|