mirror of
https://github.com/arthur-pbty/portfolio2023.git
synced 2026-06-04 07:46:21 +02:00
64 lines
1.9 KiB
JavaScript
64 lines
1.9 KiB
JavaScript
"use strict";
|
|
/*
|
|
* @poppinss/cliui
|
|
*
|
|
* (c) Harminder Virk <virk@adonisjs.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.table = exports.tasks = exports.sticker = exports.instructions = exports.icons = exports.logger = exports.consoleRenderer = exports.testingRenderer = exports.supportsColors = exports.isInteractive = void 0;
|
|
const api_1 = require("./api");
|
|
const ui = (0, api_1.instantiate)(!!process.env.CLI_UI_IS_TESTING);
|
|
/**
|
|
* Is terminal interactive or not. The code is copied from
|
|
* https://github.com/sindresorhus/is-interactive/blob/master/index.js.
|
|
*
|
|
* Yes, we can install it as a dependency, but decided to copy/paste 4
|
|
* lines. NO STRONG REASONS BEHIND IT
|
|
*/
|
|
exports.isInteractive = ui.isInteractive;
|
|
/**
|
|
* Whether or not colors are enabled. They are enabled by default,
|
|
* unless the terminal doesn't support color. Also "FORCE_COLOR"
|
|
* env variable enables them forcefully.
|
|
*/
|
|
exports.supportsColors = ui.supportsColors;
|
|
/**
|
|
* The renderer used in the testing mode. One can access it to listen
|
|
* for the log messages. Also, the memory renderer only works when
|
|
* the "CLI_UI_IS_TESTING" flag is set
|
|
*/
|
|
exports.testingRenderer = ui.testingRenderer;
|
|
/**
|
|
* Console renderer outputs to the console. We do not export it, since one
|
|
* cannot do much by having an access to it.
|
|
*/
|
|
exports.consoleRenderer = ui.consoleRenderer;
|
|
/**
|
|
* Logger
|
|
*/
|
|
exports.logger = ui.logger;
|
|
/**
|
|
* Icons
|
|
*/
|
|
exports.icons = ui.icons;
|
|
/**
|
|
* Reference to the instructions block to render a set of lines inside
|
|
* a box.
|
|
*/
|
|
exports.instructions = ui.instructions;
|
|
/**
|
|
* Similar to instructions. But the lines are not prefix with a pointer `>`
|
|
*/
|
|
exports.sticker = ui.sticker;
|
|
/**
|
|
* Initiates a group of tasks
|
|
*/
|
|
exports.tasks = ui.tasks;
|
|
/**
|
|
* Instantiate a new table
|
|
*/
|
|
exports.table = ui.table;
|