UNPKG

zksync-cli

Version:

CLI tool that simplifies the process of developing applications and interacting with the ZKsync network

57 lines 4.77 kB
import chalk from "chalk"; import Logger from "./logger.js"; const API_URL = "https://zenquotes.io/api/random/"; const ASCII_ART = "\n\n\ -██-- --▓▓- \n\ -█▓---▓▓██▓ -▓██▓▓--█▓ \n\ ▓█--▓▓▓---▓██- ▓██▓---▓▓--██ \n\ ██-██-▓█▓▓---▓█▓- -▓█▓---▓▓█▓██-▓█-\n\ █▓▓█- -██▓---▓██- ▓▓▓▓▓▓▓▓▓▓▓▓ -██▓---▓██- █▓-█▓\n\ -█▓██ -██----▓██████▓▓▓▓▓---------▓▓▓▓▓▓██▓▓▓██▓---▓██- ▓█-██\n\ -█▓█▓ ▓█▓---------------------------------▓-----██- -█-▓█\n\ -█▓█▓ -▓█▓---------------------------------------▓██- -█▓▓█\n\ █▓█▓ ▓██▓--------------------------------------------▓█▓ -█▓██\n\ █▓██ ▓█▓-------------------------------------------------▓█▓ ▓█-██\n\ ██▓█-██-----------------------------------------------------▓█- ██-█▓\n\ -█▓██▓-------------------------------------------------------▓███▓▓█ \n\ ███▓----------------------------------------------------------██▓█▓ \n\ ██▓---------▓▓▓▓▓████▓▓▓▓----------------▓▓▓▓▓▓▓▓▓▓▓▓----------███ \n\ █▓-------▓██▓▓▓▓▓██▓▓▓▓▓██▓▓----------▓██▓▓▓▓▓▓▓▓▓▓▓██▓▓--------█▓ \n\ ██------▓██▓▓███████▓--▓██▓▓██-------▓██▓▓███████▓-▓██▓▓██▓------▓█ \n\ -█▓-----▓█▓▓███▓▓▓▓▓▓ -███▓▓█▓▓▓▓▓██▓▓███▓▓▓▓▓▓ ███▓▓█▓------█▓ \n\ ▓█-----▓█▓▓██▓▓▓▓▓▓▓- ▓▓ ▓█▓▓██▓▓██▓███▓▓▓▓▓▓▓ ▓▓--█▓▓█▓-----▓█ \n\ ██-----██▓██▓▓▓▓▓▓▓▓ ▓▓ ▓█▓▓██▓██▓▓██▓▓▓▓▓▓▓ -▓- -██▓██-----▓█-\n\ ██-----██▓██▓▓▓▓▓▓▓ ▓▓- -▓█▓▓█▓-▓█▓▓██▓▓▓▓▓▓- ▓▓ ▓██▓██------█-\n\ ██-----▓█▓▓██▓▓▓▓▓ -▓- ▓██▓▓█▓--█▓▓██▓▓▓▓▓▓ ▓▓ ▓██▓▓██-----▓█-\n\ ██------▓█▓▓███▓▓- ▓▓ ▓██▓▓█▓---▓█▓▓███▓▓▓ ▓▓ -███▓██▓-----▓█-\n\ ▓█-------▓██▓████ ▓█--▓█▓▓██▓-----▓██▓▓███- -▓▓ -██▓▓██-------██ \n\ █▓--------▓██▓▓▓███████▓▓▓█▓- -██▓▓▓██▓▓████▓▓▓██▓--------█▓ \n\ ▓█ -------▓▓▓████████▓▓- -█▓▓▓▓- -▓███▓▓▓████▓▓--------- ▓█ \n\ ▓█ ▓▓ --███-- █ ▓█- \n\ ▓█- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓- ▓█ \n\ -█▓ -█▓ \n\ -█▓ -█▓ \n\ -▓█- ▓█▓ \n\ -▓█▓- -▓█▓- \n\ -▓██▓-- --▓██▓- \n\ --▓▓█▓▓▓▓▓▓--------▓▓▓▓▓▓█▓▓-- \n\ "; const fetchAndFormatQuote = async () => { try { const response = await fetch(API_URL); if (!response.ok) { throw new Error(`Network response was not ok: ${response.statusText}`); } const data = await response.json(); return `${data[0].q} - ${data[0].a}`; } catch { return "No inspirational quote for you now."; } }; export default async () => { const quote = await fetchAndFormatQuote(); Logger.info(chalk.white(ASCII_ART)); Logger.info(`\nzeek would like to tell you: "${quote}"\n\n`); }; //# sourceMappingURL=zeek.js.map