summaryrefslogtreecommitdiff
path: root/node_modules/ora
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/ora')
-rw-r--r--node_modules/ora/index.d.ts278
-rw-r--r--node_modules/ora/index.js407
-rw-r--r--node_modules/ora/license9
-rw-r--r--node_modules/ora/package.json89
-rw-r--r--node_modules/ora/readme.md263
5 files changed, 1046 insertions, 0 deletions
diff --git a/node_modules/ora/index.d.ts b/node_modules/ora/index.d.ts
new file mode 100644
index 0000000..dc58717
--- /dev/null
+++ b/node_modules/ora/index.d.ts
@@ -0,0 +1,278 @@
+/// <reference types="node"/>
+import {SpinnerName} from 'cli-spinners';
+
+declare namespace ora {
+ interface Spinner {
+ readonly interval?: number;
+ readonly frames: string[];
+ }
+
+ type Color =
+ | 'black'
+ | 'red'
+ | 'green'
+ | 'yellow'
+ | 'blue'
+ | 'magenta'
+ | 'cyan'
+ | 'white'
+ | 'gray';
+
+ type PrefixTextGenerator = () => string;
+
+ interface Options {
+ /**
+ Text to display after the spinner.
+ */
+ readonly text?: string;
+
+ /**
+ Text or a function that returns text to display before the spinner. No prefix text will be displayed if set to an empty string.
+ */
+ readonly prefixText?: string | PrefixTextGenerator;
+
+ /**
+ Name of one of the provided spinners. See [`example.js`](https://github.com/BendingBender/ora/blob/master/example.js) in this repo if you want to test out different spinners. On Windows, it will always use the line spinner as the Windows command-line doesn't have proper Unicode support.
+
+ @default 'dots'
+
+ Or an object like:
+
+ @example
+ ```
+ {
+ interval: 80, // Optional
+ frames: ['-', '+', '-']
+ }
+ ```
+ */
+ readonly spinner?: SpinnerName | Spinner;
+
+ /**
+ Color of the spinner.
+
+ @default 'cyan'
+ */
+ readonly color?: Color;
+
+ /**
+ Set to `false` to stop Ora from hiding the cursor.
+
+ @default true
+ */
+ readonly hideCursor?: boolean;
+
+ /**
+ Indent the spinner with the given number of spaces.
+
+ @default 0
+ */
+ readonly indent?: number;
+
+ /**
+ Interval between each frame.
+
+ Spinners provide their own recommended interval, so you don't really need to specify this.
+
+ Default: Provided by the spinner or `100`.
+ */
+ readonly interval?: number;
+
+ /**
+ Stream to write the output.
+
+ You could for example set this to `process.stdout` instead.
+
+ @default process.stderr
+ */
+ readonly stream?: NodeJS.WritableStream;
+
+ /**
+ Force enable/disable the spinner. If not specified, the spinner will be enabled if the `stream` is being run inside a TTY context (not spawned or piped) and/or not in a CI environment.
+
+ Note that `{isEnabled: false}` doesn't mean it won't output anything. It just means it won't output the spinner, colors, and other ansi escape codes. It will still log text.
+ */
+ readonly isEnabled?: boolean;
+
+ /**
+ Disable the spinner and all log text. All output is suppressed and `isEnabled` will be considered `false`.
+
+ @default false
+ */
+ readonly isSilent?: boolean;
+
+ /**
+ Discard stdin input (except Ctrl+C) while running if it's TTY. This prevents the spinner from twitching on input, outputting broken lines on `Enter` key presses, and prevents buffering of input while the spinner is running.
+
+ This has no effect on Windows as there's no good way to implement discarding stdin properly there.
+
+ @default true
+ */
+ readonly discardStdin?: boolean;
+ }
+
+ interface PersistOptions {
+ /**
+ Symbol to replace the spinner with.
+
+ @default ' '
+ */
+ readonly symbol?: string;
+
+ /**
+ Text to be persisted after the symbol.
+
+ Default: Current `text`.
+ */
+ readonly text?: string;
+
+ /**
+ Text or a function that returns text to be persisted before the symbol. No prefix text will be displayed if set to an empty string.
+
+ Default: Current `prefixText`.
+ */
+ readonly prefixText?: string | PrefixTextGenerator;
+ }
+
+ interface Ora {
+ /**
+ A boolean of whether the instance is currently spinning.
+ */
+ readonly isSpinning: boolean;
+
+ /**
+ Change the text after the spinner.
+ */
+ text: string;
+
+ /**
+ Change the text or function that returns text before the spinner. No prefix text will be displayed if set to an empty string.
+ */
+ prefixText: string | PrefixTextGenerator;
+
+ /**
+ Change the spinner color.
+ */
+ color: Color;
+
+ /**
+ Change the spinner.
+ */
+ spinner: SpinnerName | Spinner;
+
+ /**
+ Change the spinner indent.
+ */
+ indent: number;
+
+ /**
+ Start the spinner.
+
+ @param text - Set the current text.
+ @returns The spinner instance.
+ */
+ start(text?: string): Ora;
+
+ /**
+ Stop and clear the spinner.
+
+ @returns The spinner instance.
+ */
+ stop(): Ora;
+
+ /**
+ Stop the spinner, change it to a green `✔` and persist the current text, or `text` if provided.
+
+ @param text - Will persist text if provided.
+ @returns The spinner instance.
+ */
+ succeed(text?: string): Ora;
+
+ /**
+ Stop the spinner, change it to a red `✖` and persist the current text, or `text` if provided.
+
+ @param text - Will persist text if provided.
+ @returns The spinner instance.
+ */
+ fail(text?: string): Ora;
+
+ /**
+ Stop the spinner, change it to a yellow `⚠` and persist the current text, or `text` if provided.
+
+ @param text - Will persist text if provided.
+ @returns The spinner instance.
+ */
+ warn(text?: string): Ora;
+
+ /**
+ Stop the spinner, change it to a blue `ℹ` and persist the current text, or `text` if provided.
+
+ @param text - Will persist text if provided.
+ @returns The spinner instance.
+ */
+ info(text?: string): Ora;
+
+ /**
+ Stop the spinner and change the symbol or text.
+
+ @returns The spinner instance.
+ */
+ stopAndPersist(options?: PersistOptions): Ora;
+
+ /**
+ Clear the spinner.
+
+ @returns The spinner instance.
+ */
+ clear(): Ora;
+
+ /**
+ Manually render a new frame.
+
+ @returns The spinner instance.
+ */
+ render(): Ora;
+
+ /**
+ Get a new frame.
+
+ @returns The spinner instance text.
+ */
+ frame(): string;
+ }
+}
+
+declare const ora: {
+ /**
+ Elegant terminal spinner.
+
+ @param options - If a string is provided, it is treated as a shortcut for `options.text`.
+
+ @example
+ ```
+ import ora = require('ora');
+
+ const spinner = ora('Loading unicorns').start();
+
+ setTimeout(() => {
+ spinner.color = 'yellow';
+ spinner.text = 'Loading rainbows';
+ }, 1000);
+ ```
+ */
+ (options?: ora.Options | string): ora.Ora;
+
+ /**
+ Starts a spinner for a promise. The spinner is stopped with `.succeed()` if the promise fulfills or with `.fail()` if it rejects.
+
+ @param action - The promise to start the spinner for.
+ @param options - If a string is provided, it is treated as a shortcut for `options.text`.
+ @returns The spinner instance.
+ */
+ promise(
+ action: PromiseLike<unknown>,
+ options?: ora.Options | string
+ ): ora.Ora;
+};
+
+export = ora;
diff --git a/node_modules/ora/index.js b/node_modules/ora/index.js
new file mode 100644
index 0000000..980502c
--- /dev/null
+++ b/node_modules/ora/index.js
@@ -0,0 +1,407 @@
+'use strict';
+const readline = require('readline');
+const chalk = require('chalk');
+const cliCursor = require('cli-cursor');
+const cliSpinners = require('cli-spinners');
+const logSymbols = require('log-symbols');
+const stripAnsi = require('strip-ansi');
+const wcwidth = require('wcwidth');
+const isInteractive = require('is-interactive');
+const MuteStream = require('mute-stream');
+
+const TEXT = Symbol('text');
+const PREFIX_TEXT = Symbol('prefixText');
+
+const ASCII_ETX_CODE = 0x03; // Ctrl+C emits this code
+
+class StdinDiscarder {
+ constructor() {
+ this.requests = 0;
+
+ this.mutedStream = new MuteStream();
+ this.mutedStream.pipe(process.stdout);
+ this.mutedStream.mute();
+
+ const self = this;
+ this.ourEmit = function (event, data, ...args) {
+ const {stdin} = process;
+ if (self.requests > 0 || stdin.emit === self.ourEmit) {
+ if (event === 'keypress') { // Fixes readline behavior
+ return;
+ }
+
+ if (event === 'data' && data.includes(ASCII_ETX_CODE)) {
+ process.emit('SIGINT');
+ }
+
+ Reflect.apply(self.oldEmit, this, [event, data, ...args]);
+ } else {
+ Reflect.apply(process.stdin.emit, this, [event, data, ...args]);
+ }
+ };
+ }
+
+ start() {
+ this.requests++;
+
+ if (this.requests === 1) {
+ this.realStart();
+ }
+ }
+
+ stop() {
+ if (this.requests <= 0) {
+ throw new Error('`stop` called more times than `start`');
+ }
+
+ this.requests--;
+
+ if (this.requests === 0) {
+ this.realStop();
+ }
+ }
+
+ realStart() {
+ // No known way to make it work reliably on Windows
+ if (process.platform === 'win32') {
+ return;
+ }
+
+ this.rl = readline.createInterface({
+ input: process.stdin,
+ output: this.mutedStream
+ });
+
+ this.rl.on('SIGINT', () => {
+ if (process.listenerCount('SIGINT') === 0) {
+ process.emit('SIGINT');
+ } else {
+ this.rl.close();
+ process.kill(process.pid, 'SIGINT');
+ }
+ });
+ }
+
+ realStop() {
+ if (process.platform === 'win32') {
+ return;
+ }
+
+ this.rl.close();
+ this.rl = undefined;
+ }
+}
+
+let stdinDiscarder;
+
+class Ora {
+ constructor(options) {
+ if (!stdinDiscarder) {
+ stdinDiscarder = new StdinDiscarder();
+ }
+
+ if (typeof options === 'string') {
+ options = {
+ text: options
+ };
+ }
+
+ this.options = {
+ text: '',
+ color: 'cyan',
+ stream: process.stderr,
+ discardStdin: true,
+ ...options
+ };
+
+ this.spinner = this.options.spinner;
+
+ this.color = this.options.color;
+ this.hideCursor = this.options.hideCursor !== false;
+ this.interval = this.options.interval || this.spinner.interval || 100;
+ this.stream = this.options.stream;
+ this.id = undefined;
+ this.isEnabled = typeof this.options.isEnabled === 'boolean' ? this.options.isEnabled : isInteractive({stream: this.stream});
+ this.isSilent = typeof this.options.isSilent === 'boolean' ? this.options.isSilent : false;
+
+ // Set *after* `this.stream`
+ this.text = this.options.text;
+ this.prefixText = this.options.prefixText;
+ this.linesToClear = 0;
+ this.indent = this.options.indent;
+ this.discardStdin = this.options.discardStdin;
+ this.isDiscardingStdin = false;
+ }
+
+ get indent() {
+ return this._indent;
+ }
+
+ set indent(indent = 0) {
+ if (!(indent >= 0 && Number.isInteger(indent))) {
+ throw new Error('The `indent` option must be an integer from 0 and up');
+ }
+
+ this._indent = indent;
+ }
+
+ _updateInterval(interval) {
+ if (interval !== undefined) {
+ this.interval = interval;
+ }
+ }
+
+ get spinner() {
+ return this._spinner;
+ }
+
+ set spinner(spinner) {
+ this.frameIndex = 0;
+
+ if (typeof spinner === 'object') {
+ if (spinner.frames === undefined) {
+ throw new Error('The given spinner must have a `frames` property');
+ }
+
+ this._spinner = spinner;
+ } else if (process.platform === 'win32') {
+ this._spinner = cliSpinners.line;
+ } else if (spinner === undefined) {
+ // Set default spinner
+ this._spinner = cliSpinners.dots;
+ } else if (cliSpinners[spinner]) {
+ this._spinner = cliSpinners[spinner];
+ } else {
+ throw new Error(`There is no built-in spinner named '${spinner}'. See https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json for a full list.`);
+ }
+
+ this._updateInterval(this._spinner.interval);
+ }
+
+ get text() {
+ return this[TEXT];
+ }
+
+ get prefixText() {
+ return this[PREFIX_TEXT];
+ }
+
+ get isSpinning() {
+ return this.id !== undefined;
+ }
+
+ getFullPrefixText(prefixText = this[PREFIX_TEXT], postfix = ' ') {
+ if (typeof prefixText === 'string') {
+ return prefixText + postfix;
+ }
+
+ if (typeof prefixText === 'function') {
+ return prefixText() + postfix;
+ }
+
+ return '';
+ }
+
+ updateLineCount() {
+ const columns = this.stream.columns || 80;
+ const fullPrefixText = this.getFullPrefixText(this.prefixText, '-');
+ this.lineCount = stripAnsi(fullPrefixText + '--' + this[TEXT]).split('\n').reduce((count, line) => {
+ return count + Math.max(1, Math.ceil(wcwidth(line) / columns));
+ }, 0);
+ }
+
+ set text(value) {
+ this[TEXT] = value;
+ this.updateLineCount();
+ }
+
+ set prefixText(value) {
+ this[PREFIX_TEXT] = value;
+ this.updateLineCount();
+ }
+
+ get isEnabled() {
+ return this._isEnabled && !this.isSilent;
+ }
+
+ set isEnabled(value) {
+ if (typeof value !== 'boolean') {
+ throw new TypeError('The `isEnabled` option must be a boolean');
+ }
+
+ this._isEnabled = value;
+ }
+
+ get isSilent() {
+ return this._isSilent;
+ }
+
+ set isSilent(value) {
+ if (typeof value !== 'boolean') {
+ throw new TypeError('The `isSilent` option must be a boolean');
+ }
+
+ this._isSilent = value;
+ }
+
+ frame() {
+ const {frames} = this.spinner;
+ let frame = frames[this.frameIndex];
+
+ if (this.color) {
+ frame = chalk[this.color](frame);
+ }
+
+ this.frameIndex = ++this.frameIndex % frames.length;
+ const fullPrefixText = (typeof this.prefixText === 'string' && this.prefixText !== '') ? this.prefixText + ' ' : '';
+ const fullText = typeof this.text === 'string' ? ' ' + this.text : '';
+
+ return fullPrefixText + frame + fullText;
+ }
+
+ clear() {
+ if (!this.isEnabled || !this.stream.isTTY) {
+ return this;
+ }
+
+ for (let i = 0; i < this.linesToClear; i++) {
+ if (i > 0) {
+ this.stream.moveCursor(0, -1);
+ }
+
+ this.stream.clearLine();
+ this.stream.cursorTo(this.indent);
+ }
+
+ this.linesToClear = 0;
+
+ return this;
+ }
+
+ render() {
+ if (this.isSilent) {
+ return this;
+ }
+
+ this.clear();
+ this.stream.write(this.frame());
+ this.linesToClear = this.lineCount;
+
+ return this;
+ }
+
+ start(text) {
+ if (text) {
+ this.text = text;
+ }
+
+ if (this.isSilent) {
+ return this;
+ }
+
+ if (!this.isEnabled) {
+ if (this.text) {
+ this.stream.write(`- ${this.text}\n`);
+ }
+
+ return this;
+ }
+
+ if (this.isSpinning) {
+ return this;
+ }
+
+ if (this.hideCursor) {
+ cliCursor.hide(this.stream);
+ }
+
+ if (this.discardStdin && process.stdin.isTTY) {
+ this.isDiscardingStdin = true;
+ stdinDiscarder.start();
+ }
+
+ this.render();
+ this.id = setInterval(this.render.bind(this), this.interval);
+
+ return this;
+ }
+
+ stop() {
+ if (!this.isEnabled) {
+ return this;
+ }
+
+ clearInterval(this.id);
+ this.id = undefined;
+ this.frameIndex = 0;
+ this.clear();
+ if (this.hideCursor) {
+ cliCursor.show(this.stream);
+ }
+
+ if (this.discardStdin && process.stdin.isTTY && this.isDiscardingStdin) {
+ stdinDiscarder.stop();
+ this.isDiscardingStdin = false;
+ }
+
+ return this;
+ }
+
+ succeed(text) {
+ return this.stopAndPersist({symbol: logSymbols.success, text});
+ }
+
+ fail(text) {
+ return this.stopAndPersist({symbol: logSymbols.error, text});
+ }
+
+ warn(text) {
+ return this.stopAndPersist({symbol: logSymbols.warning, text});
+ }
+
+ info(text) {
+ return this.stopAndPersist({symbol: logSymbols.info, text});
+ }
+
+ stopAndPersist(options = {}) {
+ if (this.isSilent) {
+ return this;
+ }
+
+ const prefixText = options.prefixText || this.prefixText;
+ const text = options.text || this.text;
+ const fullText = (typeof text === 'string') ? ' ' + text : '';
+
+ this.stop();
+ this.stream.write(`${this.getFullPrefixText(prefixText, ' ')}${options.symbol || ' '}${fullText}\n`);
+
+ return this;
+ }
+}
+
+const oraFactory = function (options) {
+ return new Ora(options);
+};
+
+module.exports = oraFactory;
+
+module.exports.promise = (action, options) => {
+ // eslint-disable-next-line promise/prefer-await-to-then
+ if (typeof action.then !== 'function') {
+ throw new TypeError('Parameter `action` must be a Promise');
+ }
+
+ const spinner = new Ora(options);
+ spinner.start();
+
+ (async () => {
+ try {
+ await action;
+ spinner.succeed();
+ } catch (_) {
+ spinner.fail();
+ }
+ })();
+
+ return spinner;
+};
diff --git a/node_modules/ora/license b/node_modules/ora/license
new file mode 100644
index 0000000..fa7ceba
--- /dev/null
+++ b/node_modules/ora/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/ora/package.json b/node_modules/ora/package.json
new file mode 100644
index 0000000..abedf82
--- /dev/null
+++ b/node_modules/ora/package.json
@@ -0,0 +1,89 @@
+{
+ "_from": "ora",
+ "_id": "ora@5.1.0",
+ "_inBundle": false,
+ "_integrity": "sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w==",
+ "_location": "/ora",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "ora",
+ "name": "ora",
+ "escapedName": "ora",
+ "rawSpec": "",
+ "saveSpec": null,
+ "fetchSpec": "latest"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/ora/-/ora-5.1.0.tgz",
+ "_shasum": "b188cf8cd2d4d9b13fd25383bc3e5cba352c94f8",
+ "_spec": "ora",
+ "_where": "/mnt/n/Projets/langdetect",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "https://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/ora/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "chalk": "^4.1.0",
+ "cli-cursor": "^3.1.0",
+ "cli-spinners": "^2.4.0",
+ "is-interactive": "^1.0.0",
+ "log-symbols": "^4.0.0",
+ "mute-stream": "0.0.8",
+ "strip-ansi": "^6.0.0",
+ "wcwidth": "^1.0.1"
+ },
+ "deprecated": false,
+ "description": "Elegant terminal spinner",
+ "devDependencies": {
+ "@types/node": "^14.0.27",
+ "ava": "^2.4.0",
+ "get-stream": "^5.1.0",
+ "tsd": "^0.13.1",
+ "xo": "^0.25.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "files": [
+ "index.js",
+ "index.d.ts"
+ ],
+ "funding": "https://github.com/sponsors/sindresorhus",
+ "homepage": "https://github.com/sindresorhus/ora#readme",
+ "keywords": [
+ "cli",
+ "spinner",
+ "spinners",
+ "terminal",
+ "term",
+ "console",
+ "ascii",
+ "unicode",
+ "loading",
+ "indicator",
+ "progress",
+ "busy",
+ "wait",
+ "idle"
+ ],
+ "license": "MIT",
+ "name": "ora",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/ora.git"
+ },
+ "scripts": {
+ "test": "xo && ava && tsd"
+ },
+ "version": "5.1.0"
+}
diff --git a/node_modules/ora/readme.md b/node_modules/ora/readme.md
new file mode 100644
index 0000000..ca44995
--- /dev/null
+++ b/node_modules/ora/readme.md
@@ -0,0 +1,263 @@
+# ora [![Build Status](https://travis-ci.com/sindresorhus/ora.svg?branch=master)](https://travis-ci.com/github/sindresorhus/ora)
+
+> Elegant terminal spinner
+
+<p align="center">
+ <br>
+ <img src="screenshot.svg" width="500">
+ <br>
+</p>
+
+## Install
+
+```
+$ npm install ora
+```
+
+## Usage
+
+```js
+const ora = require('ora');
+
+const spinner = ora('Loading unicorns').start();
+
+setTimeout(() => {
+ spinner.color = 'yellow';
+ spinner.text = 'Loading rainbows';
+}, 1000);
+```
+
+## API
+
+### ora(text)
+### ora(options)
+
+If a string is provided, it is treated as a shortcut for [`options.text`](#text).
+
+#### options
+
+Type: `object`
+
+##### text
+
+Type: `string`
+
+Text to display after the spinner.
+
+##### prefixText
+
+Type: `string | () => string`
+
+Text or a function that returns text to display before the spinner. No prefix text will be displayed if set to an empty string.
+
+##### spinner
+
+Type: `string | object`\
+Default: `'dots'` <img src="screenshot-spinner.gif" width="14">
+
+Name of one of the [provided spinners](https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json). See `example.js` in this repo if you want to test out different spinners. On Windows, it will always use the `line` spinner as the Windows command-line doesn't have proper Unicode support.
+
+Or an object like:
+
+```js
+{
+ interval: 80, // Optional
+ frames: ['-', '+', '-']
+}
+```
+
+##### color
+
+Type: `string`\
+Default: `'cyan'`\
+Values: `'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray'`
+
+Color of the spinner.
+
+##### hideCursor
+
+Type: `boolean`\
+Default: `true`
+
+Set to `false` to stop Ora from hiding the cursor.
+
+##### indent
+
+Type: `number`\
+Default: `0`
+
+Indent the spinner with the given number of spaces.
+
+##### interval
+
+Type: `number`\
+Default: Provided by the spinner or `100`
+
+Interval between each frame.
+
+Spinners provide their own recommended interval, so you don't really need to specify this.
+
+##### stream
+
+Type: `stream.Writable`\
+Default: `process.stderr`
+
+Stream to write the output.
+
+You could for example set this to `process.stdout` instead.
+
+##### isEnabled
+
+Type: `boolean`
+
+Force enable/disable the spinner. If not specified, the spinner will be enabled if the `stream` is being run inside a TTY context (not spawned or piped) and/or not in a CI environment.
+
+Note that `{isEnabled: false}` doesn't mean it won't output anything. It just means it won't output the spinner, colors, and other ansi escape codes. It will still log text.
+
+##### isSilent
+
+Type: `boolean`\
+Default: `false`
+
+Disable the spinner and all log text. All output is suppressed and `isEnabled` will be considered `false`.
+
+##### discardStdin
+
+Type: `boolean`\
+Default: `true`
+
+Discard stdin input (except Ctrl+C) while running if it's TTY. This prevents the spinner from twitching on input, outputting broken lines on <kbd>Enter</kbd> key presses, and prevents buffering of input while the spinner is running.
+
+This has no effect on Windows as there's no good way to implement discarding stdin properly there.
+
+### Instance
+
+#### .start(text?)
+
+Start the spinner. Returns the instance. Set the current text if `text` is provided.
+
+#### .stop()
+
+Stop and clear the spinner. Returns the instance.
+
+#### .succeed(text?)
+
+Stop the spinner, change it to a green `✔` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.
+
+#### .fail(text?)
+
+Stop the spinner, change it to a red `✖` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.
+
+#### .warn(text?)
+
+Stop the spinner, change it to a yellow `⚠` and persist the current text, or `text` if provided. Returns the instance.
+
+#### .info(text?)
+
+Stop the spinner, change it to a blue `ℹ` and persist the current text, or `text` if provided. Returns the instance.
+
+#### .isSpinning
+
+A boolean of whether the instance is currently spinning.
+
+#### .stopAndPersist(options?)
+
+Stop the spinner and change the symbol or text. Returns the instance. See the GIF below.
+
+##### options
+
+Type: `object`
+
+###### symbol
+
+Type: `string`\
+Default: `' '`
+
+Symbol to replace the spinner with.
+
+###### text
+
+Type: `string`\
+Default: Current `'text'`
+
+Text to be persisted after the symbol
+
+###### prefixText
+
+Type: `string`\
+Default: Current `prefixText`
+
+Text to be persisted before the symbol. No prefix text will be displayed if set to an empty string.
+
+<img src="screenshot-2.gif" width="480">
+
+#### .clear()
+
+Clear the spinner. Returns the instance.
+
+#### .render()
+
+Manually render a new frame. Returns the instance.
+
+#### .frame()
+
+Get a new frame.
+
+#### .text
+
+Change the text after the spinner.
+
+#### .prefixText
+
+Change the text before the spinner. No prefix text will be displayed if set to an empty string.
+
+#### .color
+
+Change the spinner color.
+
+#### .spinner
+
+Change the spinner.
+
+#### .indent
+
+Change the spinner indent.
+
+### ora.promise(action, text)
+### ora.promise(action, options)
+
+Starts a spinner for a promise. The spinner is stopped with `.succeed()` if the promise fulfills or with `.fail()` if it rejects. Returns the spinner instance.
+
+#### action
+
+Type: `Promise`
+
+## FAQ
+
+### How do I change the color of the text?
+
+Use [Chalk](https://github.com/chalk/chalk):
+
+```js
+const ora = require('ora');
+const chalk = require('chalk');
+
+const spinner = ora(`Loading ${chalk.red('unicorns')}`).start();
+```
+
+### Why does the spinner freeze?
+
+JavaScript is single-threaded, so synchronous operations blocks the thread, including the spinner animation. Prefer asynchronous operations whenever possible.
+
+## Related
+
+- [cli-spinners](https://github.com/sindresorhus/cli-spinners) - Spinners for use in the terminal
+- [listr](https://github.com/SamVerschueren/listr) - Terminal task list
+- [CLISpinner](https://github.com/kiliankoe/CLISpinner) - Terminal spinner library for Swift
+- [halo](https://github.com/ManrajGrover/halo) - Python port
+- [spinners](https://github.com/FGRibreau/spinners) - Terminal spinners for Rust
+- [marquee-ora](https://github.com/joeycozza/marquee-ora) - Scrolling marquee spinner for Ora
+- [briandowns/spinner](https://github.com/briandowns/spinner) - Terminal spinner/progress indicator for Go
+- [tj/go-spin](https://github.com/tj/go-spin) - Terminal spinner package for Go
+- [observablehq.com/@victordidenko/ora](https://observablehq.com/@victordidenko/ora) - Ora port to Observable notebooks
+- [spinnies](https://github.com/jcarpanelli/spinnies) - Terminal multi-spinner library for Node.js