{"_id":"ora-classic","_rev":"3-1f9d4531473523178a2f2bbb51babac2","name":"ora-classic","dist-tags":{"latest":"5.4.2"},"versions":{"5.4.1":{"name":"ora-classic","version":"5.4.1","description":"Elegant terminal spinner","license":"MIT","repository":{"type":"git","url":"git+https://github.com/tjohnston-softdev/ora.git"},"funding":"https://github.com/sponsors/sindresorhus","contributors":[{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},{"name":"Tyrone Johnston","email":"REDACTED","url":"https://github.com/tjohnston-softdev"}],"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["cli","spinner","spinners","terminal","term","console","ascii","unicode","loading","indicator","progress","busy","wait","idle"],"dependencies":{"bl":"^4.1.0","chalk":"^4.1.0","cli-cursor":"^3.1.0","cli-spinners":"^2.5.0","is-interactive":"^1.0.0","is-unicode-supported":"^0.1.0","log-symbols":"^4.1.0","strip-ansi":"^6.0.0","wcwidth":"^1.0.1"},"devDependencies":{"@types/node":"^14.14.35","ava":"^2.4.0","get-stream":"^6.0.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"4a3001fa0b8c2b3707c4fbea452c636db077c464","bugs":{"url":"https://github.com/tjohnston-softdev/ora/issues"},"homepage":"https://github.com/tjohnston-softdev/ora#readme","_id":"ora-classic@5.4.1","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-EVgsG/9EGYnKuJC0q4gax7xZxIkWVIfVYCAfnusJLw7n4mKdwf2JAs2xeWrKUS97htKssCVoXqx6093ZHROxMg==","shasum":"a9e5283b0a4081a9a93ae8109f8f4fddccc6f1ce","tarball":"https://registry.npmjs.org/ora-classic/-/ora-classic-5.4.1.tgz","fileCount":5,"unpackedSize":25317,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2dT2zO8BvmA77gHadC5/wNUsSLqwzp3oxZsCSmaVl8AIhANvD66v+T6f/9yYIycNjs7FhnzhJzf4+gC5U5kg86FY+"}]},"_npmUser":{"name":"tjohnston-softdev","email":"anoncat20210707@gmx.com"},"directories":{},"maintainers":[{"name":"tjohnston-softdev","email":"anoncat20210707@gmx.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ora-classic_5.4.1_1633223329252_0.2422667606190907"},"_hasShrinkwrap":false},"5.4.2":{"name":"ora-classic","version":"5.4.2","description":"Elegant terminal spinner","license":"MIT","repository":{"type":"git","url":"git+https://github.com/tjohnston-softdev/ora.git"},"funding":"https://github.com/sponsors/sindresorhus","contributors":[{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},{"name":"Tyrone Johnston","email":"REDACTED","url":"https://github.com/tjohnston-softdev"}],"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["cli","spinner","spinners","terminal","term","console","ascii","unicode","loading","indicator","progress","busy","wait","idle","legacy","mirror","commonjs","classic"],"dependencies":{"bl":"^4.1.0","chalk":"^4.1.0","cli-cursor":"^3.1.0","cli-spinners":"^2.5.0","is-interactive":"^1.0.0","is-unicode-supported":"^0.1.0","log-symbols":"^4.1.0","strip-ansi":"^6.0.0","wcwidth":"^1.0.1"},"devDependencies":{"@types/node":"^14.14.35","ava":"^2.4.0","get-stream":"^6.0.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"2b58e193c411a3cd7a6d6fa6c8f728f014b1768a","bugs":{"url":"https://github.com/tjohnston-softdev/ora/issues"},"homepage":"https://github.com/tjohnston-softdev/ora#readme","_id":"ora-classic@5.4.2","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-/xX8D5AMHB+LnvEJHOglmq6pXwm65CQ/gqPrIjIN5GJ1Bl9KC9fSmgzR/FwjrtalDj/WVxukAVuH8GP00Zpiaw==","shasum":"3d53a065d13a1f3b2f9c13ad89177e580f604588","tarball":"https://registry.npmjs.org/ora-classic/-/ora-classic-5.4.2.tgz","fileCount":5,"unpackedSize":25368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh219sCRA9TVsSAnZWagAA3PkP/iqzHN0BILBpElIMQ/K4\ny+lOIWpsE8rL+91IEJuHox9RDNurb1NrjlvlCnGuHBUVI++lTSqwCFBUKdmB\nCX9dEhmtfC4l5EtZKSZZKqkB4dU/qBfDc83JE+jhDRr1l0PmUBHNb3LPfoj0\nkvXwmUwTW968K4FlYNqtWdaYWFQxCdZ//oAimfKlXgPnrILObeWa2yPYwxCy\nx0sKWZFQHUCODbDdBxLL1iHDgcdGYnpjBkEtQe71ZSho9Synli85zPQ8daP0\n8hr0NrBNHSILU7A/fJQcv63Hrkm76Auw2vmPyHiGAFLTlLF3Ed9+ps1tM+oI\niWLmxzktpo3YYL393avMlEbCpPHS28Yzv+Gejzt7W1WipqmVldGmzmq+zKkO\nqnE8vzse6sw6bM5MlD69fkBWk3ZrfgfiY4XWdQhoaTes/HzbjvT/k35YZqt4\n1xSUPeIpQI1chJ0LI+LXYLS5hLXwZLiP057IogpSVRphika42gMIQWHIDljo\noi1m5ApGJO4+QobdrvLWBoqRQvAMOosqKU4s8NOuuLgJZ587Gs6gPK2mzAlF\nWehKRAt0mQlIew2r5tfQq+jZVYoUXoq/bEsGOErQlP/vI3xg6pfDd+XpfJuM\nN2rfPHbovXS1a6RxyCjZDMz84uWsH7Sg6rtoBLm8dAX5uanpBpUeoRc4DE8R\nUW4J\r\n=tbJX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBrMZUm7R2s3yrcbHt+UdfZ3dYYEHZhWYLysMFOgLGsQAiB5L8qLqtScISHFJWWwz5MRRpzUxJt2HT3sxypj/l9C3g=="}]},"_npmUser":{"name":"tjohnston-softdev","email":"anoncat20210707@gmx.com"},"directories":{},"maintainers":[{"name":"tjohnston-softdev","email":"anoncat20210707@gmx.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ora-classic_5.4.2_1633223616804_0.21050755899767193"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-03T01:08:49.252Z","5.4.1":"2021-10-03T01:08:49.373Z","modified":"2022-05-12T07:27:33.492Z","5.4.2":"2021-10-03T01:13:36.904Z"},"maintainers":[{"name":"tjohnston-softdev","email":"anoncat20210707@gmx.com"}],"description":"Elegant terminal spinner","homepage":"https://github.com/tjohnston-softdev/ora#readme","keywords":["cli","spinner","spinners","terminal","term","console","ascii","unicode","loading","indicator","progress","busy","wait","idle","legacy","mirror","commonjs","classic"],"repository":{"type":"git","url":"git+https://github.com/tjohnston-softdev/ora.git"},"contributors":[{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},{"name":"Tyrone Johnston","email":"REDACTED","url":"https://github.com/tjohnston-softdev"}],"bugs":{"url":"https://github.com/tjohnston-softdev/ora/issues"},"license":"MIT","readme":"# ora-classic\n\nLegacy mirror of the [ora](https://www.npmjs.com/package/ora) package before it switched to the [pure ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) syntax in August 2021. I have decided to publish this as a separate package for those who are not ready to migrate, or explicitly need to use the classic syntax for compatibility reasons.\n\n---\n\n> Elegant terminal spinner\n\n<p align=\"center\">\n\t<br>\n\t<img src=\"screenshot.svg\" width=\"500\">\n\t<br>\n</p>\n\n## Install\n\n```\n$ npm install ora-classic\n```\n\n## Usage\n\n```js\nconst ora = require('ora-classic');\n\nconst spinner = ora('Loading unicorns').start();\n\nsetTimeout(() => {\n\tspinner.color = 'yellow';\n\tspinner.text = 'Loading rainbows';\n}, 1000);\n```\n\n## API\n\n### ora(text)\n### ora(options)\n\nIf a string is provided, it is treated as a shortcut for [`options.text`](#text).\n\n#### options\n\nType: `object`\n\n##### text\n\nType: `string`\n\nText to display after the spinner.\n\n##### prefixText\n\nType: `string | () => string`\n\nText or a function that returns text to display before the spinner. No prefix text will be displayed if set to an empty string.\n\n##### spinner\n\nType: `string | object`\\\nDefault: `'dots'` <img src=\"screenshot-spinner.gif\" width=\"14\">\n\nName of one of the [provided spinners](https://github.com/sindresorhus/cli-spinners/blob/main/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.\n\nOr an object like:\n\n```js\n{\n\tinterval: 80, // Optional\n\tframes: ['-', '+', '-']\n}\n```\n\n##### color\n\nType: `string`\\\nDefault: `'cyan'`\\\nValues: `'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray'`\n\nColor of the spinner.\n\n##### hideCursor\n\nType: `boolean`\\\nDefault: `true`\n\nSet to `false` to stop Ora from hiding the cursor.\n\n##### indent\n\nType: `number`\\\nDefault: `0`\n\nIndent the spinner with the given number of spaces.\n\n##### interval\n\nType: `number`\\\nDefault: Provided by the spinner or `100`\n\nInterval between each frame.\n\nSpinners provide their own recommended interval, so you don't really need to specify this.\n\n##### stream\n\nType: `stream.Writable`\\\nDefault: `process.stderr`\n\nStream to write the output.\n\nYou could for example set this to `process.stdout` instead.\n\n##### isEnabled\n\nType: `boolean`\n\nForce 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.\n\nNote 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.\n\n##### isSilent\n\nType: `boolean`\\\nDefault: `false`\n\nDisable the spinner and all log text. All output is suppressed and `isEnabled` will be considered `false`.\n\n##### discardStdin\n\nType: `boolean`\\\nDefault: `true`\n\nDiscard 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.\n\nThis has no effect on Windows as there's no good way to implement discarding stdin properly there.\n\n### Instance\n\n#### .start(text?)\n\nStart the spinner. Returns the instance. Set the current text if `text` is provided.\n\n#### .stop()\n\nStop and clear the spinner. Returns the instance.\n\n#### .succeed(text?)\n\nStop the spinner, change it to a green `✔` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.\n\n#### .fail(text?)\n\nStop the spinner, change it to a red `✖` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.\n\n#### .warn(text?)\n\nStop the spinner, change it to a yellow `⚠` and persist the current text, or `text` if provided. Returns the instance.\n\n#### .info(text?)\n\nStop the spinner, change it to a blue `ℹ` and persist the current text, or `text` if provided. Returns the instance.\n\n#### .isSpinning\n\nA boolean of whether the instance is currently spinning.\n\n#### .stopAndPersist(options?)\n\nStop the spinner and change the symbol or text. Returns the instance. See the GIF below.\n\n##### options\n\nType: `object`\n\n###### symbol\n\nType: `string`\\\nDefault: `' '`\n\nSymbol to replace the spinner with.\n\n###### text\n\nType: `string`\\\nDefault: Current `'text'`\n\nText to be persisted after the symbol\n\n###### prefixText\n\nType: `string`\\\nDefault: Current `prefixText`\n\nText to be persisted before the symbol. No prefix text will be displayed if set to an empty string.\n\n<img src=\"screenshot-2.gif\" width=\"480\">\n\n#### .clear()\n\nClear the spinner. Returns the instance.\n\n#### .render()\n\nManually render a new frame. Returns the instance.\n\n#### .frame()\n\nGet a new frame.\n\n#### .text\n\nChange the text after the spinner.\n\n#### .prefixText\n\nChange the text before the spinner. No prefix text will be displayed if set to an empty string.\n\n#### .color\n\nChange the spinner color.\n\n#### .spinner\n\nChange the spinner.\n\n#### .indent\n\nChange the spinner indent.\n\n### ora.promise(action, text)\n### ora.promise(action, options)\n\nStarts 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.\n\n#### action\n\nType: `Promise`\n\n## FAQ\n\n### How do I change the color of the text?\n\nUse [Chalk](https://github.com/chalk/chalk):\n\n```js\nconst ora = require('ora');\nconst chalk = require('chalk');\n\nconst spinner = ora(`Loading ${chalk.red('unicorns')}`).start();\n```\n\n### Why does the spinner freeze?\n\nJavaScript is single-threaded, so synchronous operations blocks the thread, including the spinner animation. Prefer asynchronous operations whenever possible.\n\n## Related\n\n- [cli-spinners](https://github.com/sindresorhus/cli-spinners) - Spinners for use in the terminal\n- [listr](https://github.com/SamVerschueren/listr) - Terminal task list\n- [CLISpinner](https://github.com/kiliankoe/CLISpinner) - Terminal spinner library for Swift\n- [halo](https://github.com/ManrajGrover/halo) - Python port\n- [spinners](https://github.com/FGRibreau/spinners) - Terminal spinners for Rust\n- [marquee-ora](https://github.com/joeycozza/marquee-ora) - Scrolling marquee spinner for Ora\n- [briandowns/spinner](https://github.com/briandowns/spinner) - Terminal spinner/progress indicator for Go\n- [tj/go-spin](https://github.com/tj/go-spin) - Terminal spinner package for Go\n- [observablehq.com/@victordidenko/ora](https://observablehq.com/@victordidenko/ora) - Ora port to Observable notebooks\n- [spinnies](https://github.com/jcarpanelli/spinnies) - Terminal multi-spinner library for Node.js\n- [kia](https://github.com/HarryPeach/kia) - Simple terminal spinners for Deno 🦕\n\n---\n\n# Disclaimer\n\nThis repository is a fork of the [ora](https://www.npmjs.com/package/ora) package for Node JS. It mirrors the final version (5.4.1, June 2021) before transitioning from the CommonJS syntax to ESM (6.0.0, August 2021). The original work is licensed under MIT and as such, I claim no personal copyright for this publishing. All credit should go to the original developer [@sindresorhus](https://github.com/sindresorhus).\n\nI am not trying to promote this over the original package. Rather, I am encouraging freedom of choice between the classic 'CommonJS' syntax and the emerging 'ESM' syntax. I have published this as a separate package under a distinct name in order to help developers make informed decisions when managing their dependencies. If you are not ready to transition to ESM and don't want to have to tiptoe around ora's recent updates, you can download this instead.\n\nThis is only a legacy publication and not an official project. I have never worked directly on the 'ora' library. I have absolutely no affiliation with [@sindresorhus](https://github.com/sindresorhus) as a developer, or any of their contributors. Since this is only a mirror of a previous version, I will not be actively maintaining this repository. However, I cannot guarantee that this will work in the future. If something does break, I will try my best to fix it. Hopefully we will have all transitioned to ESM by the time that does actually happen.\n","readmeFilename":"readme.md"}