@alchemy/cli 0.5.1 → 0.5.2

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.
@@ -0,0 +1,554 @@
1
+ #!/usr/bin/env node
2
+ if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
3
+ import {
4
+ esc,
5
+ isJSONMode,
6
+ quiet,
7
+ rgb
8
+ } from "./chunk-56ZVYB4G.js";
9
+
10
+ // src/lib/terminal-ui.ts
11
+ import * as readline from "readline";
12
+ import { stdin, stdout } from "process";
13
+ var ansi = {
14
+ cyan: esc("36"),
15
+ dim: esc("2"),
16
+ green: esc("32"),
17
+ red: esc("31"),
18
+ purple: rgb(180, 160, 255)
19
+ };
20
+ var FLOW_PIPE = "\u2502";
21
+ function optionLabel(option) {
22
+ return option.label ?? String(option.value);
23
+ }
24
+ function printCancel(message) {
25
+ if (!message) return;
26
+ console.log(` ${ansi.dim(FLOW_PIPE)}`);
27
+ console.log(` ${ansi.dim(message)}`);
28
+ }
29
+ function clearRenderedLines(lines) {
30
+ for (let i = 0; i < lines; i += 1) {
31
+ readline.clearLine(stdout, 0);
32
+ readline.cursorTo(stdout, 0);
33
+ if (i < lines - 1) {
34
+ readline.moveCursor(stdout, 0, -1);
35
+ }
36
+ }
37
+ }
38
+ function suspendStdinKeypressListeners() {
39
+ const listeners = stdin.listeners("keypress");
40
+ for (const listener of listeners) {
41
+ stdin.removeListener("keypress", listener);
42
+ }
43
+ return () => {
44
+ for (const listener of listeners) {
45
+ stdin.on("keypress", listener);
46
+ }
47
+ };
48
+ }
49
+ async function runListPrompt(opts) {
50
+ if (!stdin.isTTY || !stdout.isTTY) {
51
+ const initial = opts.initialValue ?? opts.options.find((o) => !o.disabled)?.value ?? null;
52
+ return { value: initial, cancelled: false };
53
+ }
54
+ readline.emitKeypressEvents(stdin);
55
+ const restoreKeypressListeners = suspendStdinKeypressListeners();
56
+ const previousRawMode = stdin.isRaw;
57
+ stdin.resume();
58
+ stdin.setRawMode(true);
59
+ let query = "";
60
+ let cursor = Math.max(
61
+ 0,
62
+ opts.options.findIndex((o) => o.value === opts.initialValue && !o.disabled)
63
+ );
64
+ const selected = /* @__PURE__ */ new Set();
65
+ const maxVisible = 8;
66
+ let renderedLines = 0;
67
+ const getFiltered = () => {
68
+ if (!opts.filterable || !query.trim()) return opts.options;
69
+ const q = query.toLowerCase();
70
+ return opts.options.filter((option) => {
71
+ const label = optionLabel(option).toLowerCase();
72
+ const hint = (option.hint ?? "").toLowerCase();
73
+ const value = String(option.value).toLowerCase();
74
+ return label.includes(q) || hint.includes(q) || value.includes(q);
75
+ });
76
+ };
77
+ const normalizeCursor = (filtered) => {
78
+ if (filtered.length === 0) {
79
+ cursor = 0;
80
+ return;
81
+ }
82
+ if (cursor >= filtered.length) cursor = filtered.length - 1;
83
+ if (cursor < 0) cursor = 0;
84
+ if (filtered[cursor]?.disabled) {
85
+ const next = filtered.findIndex((o) => !o.disabled);
86
+ cursor = next >= 0 ? next : 0;
87
+ }
88
+ };
89
+ const render = () => {
90
+ const filtered = getFiltered();
91
+ normalizeCursor(filtered);
92
+ if (renderedLines > 0) clearRenderedLines(renderedLines);
93
+ const lines = [];
94
+ const suffix = opts.filterable && query ? ` ${ansi.dim(`(${query})`)}` : "";
95
+ lines.push(` ${ansi.dim(FLOW_PIPE)}`);
96
+ lines.push(` ${ansi.cyan("\u25C6")} ${opts.message}${suffix}`);
97
+ if (filtered.length === 0) {
98
+ lines.push(` ${ansi.dim(FLOW_PIPE)} ${ansi.dim("No matches found")}`);
99
+ } else {
100
+ const start = Math.max(0, Math.min(cursor - 3, Math.max(0, filtered.length - maxVisible)));
101
+ const visible = filtered.slice(start, start + maxVisible);
102
+ for (let i = 0; i < visible.length; i += 1) {
103
+ const option = visible[i];
104
+ const active = start + i === cursor;
105
+ const disabled = option.disabled === true;
106
+ const selectedMark = opts.allowMultiple ? selected.has(option.value) ? ansi.green("\u25C6") : ansi.dim("\u25C7") : active ? ansi.cyan("\u25C6") : ansi.dim("\u25C7");
107
+ const label = optionLabel(option);
108
+ const value = disabled ? ansi.dim(label) : label;
109
+ const hint = option.hint ? ` ${ansi.dim(`\u2014 ${option.hint}`)}` : "";
110
+ lines.push(` ${ansi.dim(FLOW_PIPE)} ${selectedMark} ${value}${hint}`);
111
+ }
112
+ if (filtered.length > maxVisible) {
113
+ lines.push(` ${ansi.dim(FLOW_PIPE)} ${ansi.dim(`${filtered.length} options`)}`);
114
+ }
115
+ }
116
+ if (opts.filterable && query.length === 0 && opts.placeholder) {
117
+ lines.push(` ${ansi.dim(FLOW_PIPE)} ${ansi.dim(opts.placeholder)}`);
118
+ } else if (opts.allowMultiple) {
119
+ lines.push(` ${ansi.dim(FLOW_PIPE)} ${ansi.dim("Space to toggle, Enter to confirm")}`);
120
+ } else {
121
+ lines.push(` ${ansi.dim(FLOW_PIPE)} ${ansi.dim("Use arrows and press Enter")}`);
122
+ }
123
+ stdout.write(lines.join("\n"));
124
+ renderedLines = lines.length;
125
+ };
126
+ const cleanup = () => {
127
+ if (renderedLines > 0) clearRenderedLines(renderedLines);
128
+ stdin.setRawMode(previousRawMode);
129
+ stdin.removeListener("keypress", onKeypress);
130
+ restoreKeypressListeners();
131
+ if (!previousRawMode) {
132
+ stdin.pause();
133
+ }
134
+ };
135
+ const commitSingleLine = (text) => {
136
+ if (opts.commitLabel === null) return;
137
+ const label = opts.commitLabel ?? opts.message;
138
+ console.log(` ${ansi.green("\u25C6")} ${label}: ${text}`);
139
+ };
140
+ const onKeypress = (str, key) => {
141
+ const filtered = getFiltered();
142
+ const current = filtered[cursor];
143
+ if (key.name === "escape" || key.ctrl && key.name === "c") {
144
+ cleanup();
145
+ resolver({ value: null, cancelled: true });
146
+ return;
147
+ }
148
+ if (key.name === "return") {
149
+ if (opts.allowMultiple) {
150
+ if (opts.required && selected.size === 0) return;
151
+ cleanup();
152
+ const values = Array.from(selected);
153
+ const labels = opts.options.filter((o) => values.includes(o.value)).map((o) => optionLabel(o)).join(", ");
154
+ commitSingleLine(labels || "none");
155
+ resolver({ value: values, cancelled: false });
156
+ return;
157
+ }
158
+ if (!current || current.disabled) return;
159
+ cleanup();
160
+ commitSingleLine(optionLabel(current));
161
+ resolver({ value: current.value, cancelled: false });
162
+ return;
163
+ }
164
+ if (opts.allowMultiple && key.name === "space") {
165
+ if (!current || current.disabled) return;
166
+ if (selected.has(current.value)) selected.delete(current.value);
167
+ else selected.add(current.value);
168
+ render();
169
+ return;
170
+ }
171
+ if (key.name === "up") {
172
+ if (filtered.length === 0) return;
173
+ let next = cursor - 1;
174
+ while (next >= 0 && filtered[next]?.disabled) next -= 1;
175
+ if (next >= 0) cursor = next;
176
+ render();
177
+ return;
178
+ }
179
+ if (key.name === "down") {
180
+ if (filtered.length === 0) return;
181
+ let next = cursor + 1;
182
+ while (next < filtered.length && filtered[next]?.disabled) next += 1;
183
+ if (next < filtered.length) cursor = next;
184
+ render();
185
+ return;
186
+ }
187
+ if (opts.filterable && key.name === "backspace") {
188
+ if (query.length > 0) {
189
+ query = query.slice(0, -1);
190
+ render();
191
+ }
192
+ return;
193
+ }
194
+ if (opts.filterable && str && !key.ctrl && !key.meta && str >= " " && str !== "\x7F") {
195
+ query += str;
196
+ cursor = 0;
197
+ render();
198
+ }
199
+ };
200
+ let resolver;
201
+ const done = new Promise((resolve) => {
202
+ resolver = resolve;
203
+ });
204
+ stdin.on("keypress", onKeypress);
205
+ render();
206
+ return done;
207
+ }
208
+ async function promptText(opts) {
209
+ if (!stdin.isTTY || !stdout.isTTY) {
210
+ return opts.defaultValue ?? opts.initialValue ?? "";
211
+ }
212
+ stdin.resume();
213
+ stdin.ref?.();
214
+ const restoreKeypressListeners = suspendStdinKeypressListeners();
215
+ const rl = readline.createInterface({ input: stdin, output: stdout, terminal: true });
216
+ console.log(` ${ansi.dim(FLOW_PIPE)}`);
217
+ const question = ` ${ansi.cyan("\u25C6")} ${opts.message}${opts.placeholder ? ` ${ansi.dim(`(${opts.placeholder})`)}` : ""}: `;
218
+ const previousRawMode = stdin.isRaw;
219
+ if (previousRawMode) stdin.setRawMode(false);
220
+ const value = await new Promise((resolve) => {
221
+ rl.on("SIGINT", () => resolve(null));
222
+ rl.question(question, (answer) => resolve(answer));
223
+ });
224
+ rl.close();
225
+ restoreKeypressListeners();
226
+ if (previousRawMode) stdin.setRawMode(true);
227
+ if (opts.clearAfterSubmit) {
228
+ clearRenderedLines(2);
229
+ }
230
+ if (value === null) {
231
+ printCancel(opts.cancelMessage);
232
+ return null;
233
+ }
234
+ if (!value.trim() && opts.defaultValue !== void 0) return opts.defaultValue;
235
+ if (!value.trim() && opts.initialValue !== void 0) return opts.initialValue;
236
+ return value;
237
+ }
238
+ async function promptConfirm(opts) {
239
+ const defaultYes = opts.initialValue ?? true;
240
+ const suffix = defaultYes ? "[Y/n]" : "[y/N]";
241
+ const answer = await promptText({
242
+ message: `${opts.message} ${suffix}`,
243
+ cancelMessage: opts.cancelMessage
244
+ });
245
+ if (answer === null) return null;
246
+ const normalized = answer.trim().toLowerCase();
247
+ if (!normalized) return defaultYes;
248
+ if (normalized === "y" || normalized === "yes") return true;
249
+ if (normalized === "n" || normalized === "no") return false;
250
+ return defaultYes;
251
+ }
252
+ async function promptSelect(opts) {
253
+ const result = await runListPrompt({
254
+ message: opts.message,
255
+ options: opts.options,
256
+ initialValue: opts.initialValue,
257
+ commitLabel: opts.commitLabel ?? "Selected"
258
+ });
259
+ if (result.cancelled) {
260
+ printCancel(opts.cancelMessage);
261
+ return null;
262
+ }
263
+ return result.value;
264
+ }
265
+ async function promptAutocomplete(opts) {
266
+ const result = await runListPrompt({
267
+ message: opts.message,
268
+ options: opts.options,
269
+ initialValue: opts.initialValue,
270
+ placeholder: opts.placeholder,
271
+ filterable: true,
272
+ commitLabel: opts.commitLabel ?? "Selected"
273
+ });
274
+ if (result.cancelled) {
275
+ printCancel(opts.cancelMessage);
276
+ return null;
277
+ }
278
+ return result.value;
279
+ }
280
+ async function promptMultiselect(opts) {
281
+ const result = await runListPrompt({
282
+ message: opts.message,
283
+ options: opts.options,
284
+ allowMultiple: true,
285
+ required: opts.required,
286
+ commitLabel: "Selected"
287
+ });
288
+ if (result.cancelled) {
289
+ printCancel(opts.cancelMessage);
290
+ return null;
291
+ }
292
+ return result.value;
293
+ }
294
+ async function runWithSpinner(label, doneLabel, fn) {
295
+ if (!stdout.isTTY) return fn();
296
+ const spinFrames = ["\u2B16", "\u2B18", "\u2B17", "\u2B19"];
297
+ let tick = 0;
298
+ const render = () => {
299
+ readline.clearLine(stdout, 0);
300
+ readline.cursorTo(stdout, 0);
301
+ const spin = spinFrames[tick % spinFrames.length];
302
+ stdout.write(` ${ansi.dim(FLOW_PIPE)} ${ansi.purple(spin)} ${label}`);
303
+ tick += 1;
304
+ };
305
+ render();
306
+ const timer = setInterval(render, 160);
307
+ try {
308
+ const result = await fn();
309
+ clearInterval(timer);
310
+ readline.clearLine(stdout, 0);
311
+ readline.cursorTo(stdout, 0);
312
+ stdout.write(` ${ansi.green("\u25C6")} ${doneLabel}
313
+ `);
314
+ return result;
315
+ } catch (err) {
316
+ clearInterval(timer);
317
+ readline.clearLine(stdout, 0);
318
+ readline.cursorTo(stdout, 0);
319
+ stdout.write(` ${ansi.red("\u2717")} ${label}
320
+ `);
321
+ throw err;
322
+ }
323
+ }
324
+
325
+ // src/lib/ui.ts
326
+ import Table from "cli-table3";
327
+ var ansi2 = {
328
+ green: esc("32"),
329
+ red: esc("31"),
330
+ dim: esc("2"),
331
+ cyan: esc("36"),
332
+ bold: esc("1"),
333
+ yellow: esc("33"),
334
+ // Alchemy brand colors
335
+ brand: rgb(54, 63, 249),
336
+ // Primary #363FF9
337
+ brandSecondary: rgb(139, 92, 246)
338
+ // Secondary #8B5CF6
339
+ };
340
+ var stripAnsi = (s) => s.replace(/\x1B\[[0-9;]*m/g, "");
341
+ function wrap(fn) {
342
+ return (s) => isJSONMode() ? s : fn(s);
343
+ }
344
+ var green = wrap(ansi2.green);
345
+ var red = wrap(ansi2.red);
346
+ var dim = wrap(ansi2.dim);
347
+ var cyan = wrap(ansi2.cyan);
348
+ var bold = wrap(ansi2.bold);
349
+ var yellow = wrap(ansi2.yellow);
350
+ var brand = wrap(ansi2.brand);
351
+ var suppressBrandedHelp = false;
352
+ function setBrandedHelpSuppressed(suppressed) {
353
+ suppressBrandedHelp = suppressed;
354
+ }
355
+ function successBadge() {
356
+ return isJSONMode() ? "Success" : ansi2.green("\u2713");
357
+ }
358
+ function failBadge() {
359
+ return isJSONMode() ? "Failed" : ansi2.red("\u2717");
360
+ }
361
+ async function withSpinner(label, doneLabel, fn) {
362
+ if (isJSONMode() || quiet) return fn();
363
+ return runWithSpinner(label, doneLabel, fn);
364
+ }
365
+ function printKeyValueBox(pairs) {
366
+ if (isJSONMode()) return;
367
+ if (pairs.length === 0) {
368
+ console.log(` ${ansi2.brand("\u250C\u2500\u2500\u2510")}`);
369
+ console.log(` ${ansi2.brand("\u2514\u2500\u2500\u2518")}`);
370
+ return;
371
+ }
372
+ const keyWidth = Math.max(...pairs.map(([k]) => stripAnsi(k).length));
373
+ const contentRows = pairs.map(([key, value]) => {
374
+ const visibleKeyLen = stripAnsi(key).length;
375
+ const paddedKey = key + " ".repeat(Math.max(0, keyWidth - visibleKeyLen));
376
+ return `${ansi2.dim(paddedKey)} ${value}`;
377
+ });
378
+ const contentWidth = Math.max(...contentRows.map((row) => stripAnsi(row).length));
379
+ const top = `\u250C${"\u2500".repeat(contentWidth + 2)}\u2510`;
380
+ const bottom = `\u2514${"\u2500".repeat(contentWidth + 2)}\u2518`;
381
+ console.log(` ${ansi2.dim(top)}`);
382
+ for (const row of contentRows) {
383
+ const visibleLen = stripAnsi(row).length;
384
+ const padded = row + " ".repeat(Math.max(0, contentWidth - visibleLen));
385
+ console.log(` ${ansi2.dim("\u2502")} ${padded} ${ansi2.dim("\u2502")}`);
386
+ }
387
+ console.log(` ${ansi2.dim(bottom)}`);
388
+ }
389
+ function emptyState(message) {
390
+ if (isJSONMode()) return;
391
+ console.log(`
392
+ ${ansi2.dim(`\u25CB ${message}`)}`);
393
+ }
394
+ function printSyntaxJSON(obj) {
395
+ if (isJSONMode()) {
396
+ console.log(JSON.stringify(obj));
397
+ return;
398
+ }
399
+ const raw = JSON.stringify(obj, null, 2);
400
+ const highlighted = raw.replace(
401
+ /("(?:\\.|[^"\\])*")\s*(:)?|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)|(\btrue\b|\bfalse\b|\bnull\b)/g,
402
+ (match, str, colon, num, lit) => {
403
+ if (str && colon) return ansi2.brand(str) + colon;
404
+ if (str) return ansi2.green(str);
405
+ if (num) return ansi2.cyan(num);
406
+ if (lit) return ansi2.yellow(lit);
407
+ return match;
408
+ }
409
+ );
410
+ console.log(highlighted);
411
+ }
412
+ function printTable(headers, rows) {
413
+ if (isJSONMode()) {
414
+ const objects = rows.map(
415
+ (row) => Object.fromEntries(headers.map((h, i) => [h, row[i] ?? null]))
416
+ );
417
+ console.log(JSON.stringify(objects, null, 2));
418
+ return;
419
+ }
420
+ const table = new Table({
421
+ head: headers.map((h) => ansi2.brand(ansi2.bold(h))),
422
+ chars: {
423
+ top: "\u2500",
424
+ "top-mid": "\u252C",
425
+ "top-left": "\u250C",
426
+ "top-right": "\u2510",
427
+ bottom: "\u2500",
428
+ "bottom-mid": "\u2534",
429
+ "bottom-left": "\u2514",
430
+ "bottom-right": "\u2518",
431
+ left: "\u2502",
432
+ "left-mid": "\u251C",
433
+ mid: "\u2500",
434
+ "mid-mid": "\u253C",
435
+ right: "\u2502",
436
+ "right-mid": "\u2524",
437
+ middle: "\u2502"
438
+ },
439
+ style: {
440
+ head: [],
441
+ border: [],
442
+ "padding-left": 1,
443
+ "padding-right": 1
444
+ }
445
+ });
446
+ for (let i = 0; i < rows.length; i++) {
447
+ const row = i % 2 === 1 ? rows[i].map((cell) => ansi2.dim(cell)) : rows[i];
448
+ table.push(row);
449
+ }
450
+ const output = table.toString();
451
+ const dimBorders = output.replace(
452
+ /[┌┐└┘┬┴├┤┼─│]/g,
453
+ (ch) => ansi2.dim(ch)
454
+ );
455
+ console.log(dimBorders);
456
+ }
457
+ function weiToEth(wei) {
458
+ const divisor = 10n ** 18n;
459
+ const whole = wei / divisor;
460
+ const remainder = wei % divisor;
461
+ if (remainder === 0n) return `${whole}.0`;
462
+ const remStr = remainder.toString().padStart(18, "0").replace(/0+$/, "");
463
+ return `${whole}.${remStr}`;
464
+ }
465
+ function timeAgo(hexTimestamp) {
466
+ const seconds = parseInt(hexTimestamp, 16);
467
+ if (isNaN(seconds)) return hexTimestamp;
468
+ const now = Math.floor(Date.now() / 1e3);
469
+ const diff = now - seconds;
470
+ if (diff < 0) return "in the future";
471
+ if (diff < 60) return `${diff} seconds ago`;
472
+ if (diff < 3600) return `${Math.floor(diff / 60)} minutes ago`;
473
+ if (diff < 86400) return `${Math.floor(diff / 3600)} hours ago`;
474
+ if (diff < 2592e3) return `${Math.floor(diff / 86400)} days ago`;
475
+ return `${Math.floor(diff / 2592e3)} months ago`;
476
+ }
477
+ var EXPLORER_MAP = {
478
+ "eth-mainnet": "https://etherscan.io",
479
+ "eth-sepolia": "https://sepolia.etherscan.io",
480
+ "eth-holesky": "https://holesky.etherscan.io",
481
+ "polygon-mainnet": "https://polygonscan.com",
482
+ "polygon-amoy": "https://amoy.polygonscan.com",
483
+ "arb-mainnet": "https://arbiscan.io",
484
+ "arb-sepolia": "https://sepolia.arbiscan.io",
485
+ "opt-mainnet": "https://optimistic.etherscan.io",
486
+ "opt-sepolia": "https://sepolia-optimism.etherscan.io",
487
+ "base-mainnet": "https://basescan.org",
488
+ "base-sepolia": "https://sepolia.basescan.org"
489
+ };
490
+ function etherscanTxURL(hash, network) {
491
+ const base = EXPLORER_MAP[network];
492
+ if (!base) return void 0;
493
+ return `${base}/tx/${hash}`;
494
+ }
495
+ function brandedHelp(options) {
496
+ if (isJSONMode() || quiet) return "";
497
+ if (suppressBrandedHelp && !options?.force) return "";
498
+ const lerp = (a, b, t) => Math.round(a + (b - a) * t);
499
+ const gradientAt = (t) => {
500
+ const c0 = { r: 5, g: 213, b: 255 };
501
+ const c1 = { r: 54, g: 63, b: 249 };
502
+ const c2 = { r: 85, g: 51, b: 255 };
503
+ if (t <= 0.723958) {
504
+ const p2 = t / 0.723958;
505
+ return rgb(
506
+ lerp(c0.r, c1.r, p2),
507
+ lerp(c0.g, c1.g, p2),
508
+ lerp(c0.b, c1.b, p2)
509
+ );
510
+ }
511
+ const p = (t - 0.723958) / (1 - 0.723958);
512
+ return rgb(
513
+ lerp(c1.r, c2.r, p),
514
+ lerp(c1.g, c2.g, p),
515
+ lerp(c1.b, c2.b, p)
516
+ );
517
+ };
518
+ const markLines = [
519
+ " \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557",
520
+ "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D",
521
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2554\u255D ",
522
+ "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u255A\u2588\u2588\u2554\u255D ",
523
+ "\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551 \u2588\u2588\u2551 ",
524
+ "\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D "
525
+ ];
526
+ const logo = markLines.map((line, i) => gradientAt(i / (markLines.length - 1))(line)).join("\n");
527
+ return "\n" + logo + "\n";
528
+ }
529
+
530
+ export {
531
+ promptText,
532
+ promptConfirm,
533
+ promptSelect,
534
+ promptAutocomplete,
535
+ promptMultiselect,
536
+ green,
537
+ red,
538
+ dim,
539
+ bold,
540
+ yellow,
541
+ brand,
542
+ setBrandedHelpSuppressed,
543
+ successBadge,
544
+ failBadge,
545
+ withSpinner,
546
+ printKeyValueBox,
547
+ emptyState,
548
+ printSyntaxJSON,
549
+ printTable,
550
+ weiToEth,
551
+ timeAgo,
552
+ etherscanTxURL,
553
+ brandedHelp
554
+ };