@binaryandthread/cli 0.4.7 → 0.4.9
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/bin.js +8 -6
- package/dist/bin.js.map +1 -1
- package/dist/{chunk-CE324N5B.js → chunk-NMEL2CPI.js} +36 -17
- package/dist/chunk-NMEL2CPI.js.map +1 -0
- package/dist/{interactive-7GY3BVQ6.js → interactive-4MFERLH7.js} +2 -2
- package/package.json +2 -1
- package/dist/chunk-CE324N5B.js.map +0 -1
- /package/dist/{interactive-7GY3BVQ6.js.map → interactive-4MFERLH7.js.map} +0 -0
package/dist/bin.js
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
box,
|
|
21
21
|
brandOf,
|
|
22
22
|
cartMoneyRows,
|
|
23
|
+
colourLabel,
|
|
23
24
|
colourMarker,
|
|
24
25
|
contributionBar,
|
|
25
26
|
cyan,
|
|
@@ -34,6 +35,7 @@ import {
|
|
|
34
35
|
green,
|
|
35
36
|
header,
|
|
36
37
|
isCartTaxInclusive,
|
|
38
|
+
labelVariantTitle,
|
|
37
39
|
lineColour,
|
|
38
40
|
ok,
|
|
39
41
|
orderStage,
|
|
@@ -56,7 +58,7 @@ import {
|
|
|
56
58
|
versionLine,
|
|
57
59
|
warn,
|
|
58
60
|
working
|
|
59
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-NMEL2CPI.js";
|
|
60
62
|
import {
|
|
61
63
|
__require
|
|
62
64
|
} from "./chunk-7OCVIDC7.js";
|
|
@@ -105,7 +107,7 @@ function makeLogger(debug, write = (s) => process.stderr.write(s)) {
|
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
// src/version.ts
|
|
108
|
-
var VERSION = "0.4.
|
|
110
|
+
var VERSION = "0.4.9";
|
|
109
111
|
|
|
110
112
|
// src/eggs.ts
|
|
111
113
|
function teapot() {
|
|
@@ -525,7 +527,7 @@ function registerBrowse(program, makeClient2, loadConfig2) {
|
|
|
525
527
|
program.command("browse").alias("ls").description("list what's in stock on a branch.").option("--branch <branch>", "main (live) or next (terminal-only drops)").option("--pick", "opt into the arrow-key picker (default is the numbered table \u2014 use bt stage <n>)").option("--plain", "force the static table (the default; kept for back-compat)").action(async (opts) => {
|
|
526
528
|
const { json, brand } = resolveOutput(program);
|
|
527
529
|
if (opts.pick && !json && brand.color && process.stdout.isTTY && process.stdin.isTTY) {
|
|
528
|
-
const { runInteractiveBrowse } = await import("./interactive-
|
|
530
|
+
const { runInteractiveBrowse } = await import("./interactive-4MFERLH7.js");
|
|
529
531
|
const handled = await runInteractiveBrowse(makeClient2(), loadConfig2(), { branch: opts.branch, brand });
|
|
530
532
|
if (handled) return;
|
|
531
533
|
}
|
|
@@ -894,7 +896,7 @@ async function runCheckout(client, config, args, deps) {
|
|
|
894
896
|
const reviewLines = [header(style, "bt checkout \u2014 staged for commit")];
|
|
895
897
|
for (const li of cart.items) {
|
|
896
898
|
const colour = lineColour(li);
|
|
897
|
-
const colourTag = colour ? ` \xB7 ${colour}` : "";
|
|
899
|
+
const colourTag = colour ? ` \xB7 ${colourLabel(colour).toLowerCase()}` : "";
|
|
898
900
|
reviewLines.push(
|
|
899
901
|
` ${(li.title ?? li.product_title ?? "item").toString()}${colourTag} \xB7 qty ${li.quantity}` + (li.total != null ? ` ${cyan(style, fmtPrice(li.total, cart.currency_code ?? region.currency_code))}` : "")
|
|
900
902
|
);
|
|
@@ -1126,7 +1128,7 @@ async function runOrder(client, config, args) {
|
|
|
1126
1128
|
const items = o.items ?? [];
|
|
1127
1129
|
const orderTaxInclusive = items.some((i) => i.is_tax_inclusive === true);
|
|
1128
1130
|
const first = items[0];
|
|
1129
|
-
const itemLabel = first ? `${first.title ?? "item"}${first.variant_title ? ` \xB7 ${first.variant_title}` : ""}` : "your order";
|
|
1131
|
+
const itemLabel = first ? `${first.title ?? "item"}${first.variant_title ? ` \xB7 ${labelVariantTitle(first.variant_title)}` : ""}` : "your order";
|
|
1130
1132
|
const style = brandOf(args);
|
|
1131
1133
|
const lines = [];
|
|
1132
1134
|
const stageWord = idx < 0 ? "reverted" : STAGES[idx];
|
|
@@ -1213,7 +1215,7 @@ function label(o) {
|
|
|
1213
1215
|
const items = o.items ?? [];
|
|
1214
1216
|
const first = items[0];
|
|
1215
1217
|
if (!first) return "order";
|
|
1216
|
-
return `${first.title ?? "order"}${first.variant_title ? ` \xB7 ${first.variant_title}` : ""}`;
|
|
1218
|
+
return `${first.title ?? "order"}${first.variant_title ? ` \xB7 ${labelVariantTitle(first.variant_title)}` : ""}`;
|
|
1217
1219
|
}
|
|
1218
1220
|
function hasLiveHead(orders) {
|
|
1219
1221
|
return orders.some((o) => orderStage2(o) !== "reverted");
|