{"_id":"@trufflesuite/spinnies","_rev":"19-406f2a83a763809af019cea8f9a2485d","name":"@trufflesuite/spinnies","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@trufflesuite/spinnies","version":"0.1.0","keywords":["node","nodejs","node.js","multiple","multi","multispinner","spinner","spinners","loadre","loading","loading-bar","cli","console","command-line","command","terminal"],"license":"MIT","_id":"@trufflesuite/spinnies@0.1.0","maintainers":[{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"jeff.smale","email":"jeff.smale@consensys.net"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"davidmurdoch","email":"david@davidmurdoch.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"micaiahreid","email":"micaiahreid@gmail.com"}],"contributors":[{"url":"https://github.com/jcarpanelli","name":"Juan Bautista Carpanelli","email":"juanbanelli@gmail.com"},{"url":"https://github.com/benjamincburns","name":"Ben Burns"}],"homepage":"https://github.com/trufflesuite/spinnies#readme","bugs":{"url":"https://github.com/trufflesuite/spinnies/issues"},"dist":{"shasum":"da09ff7c526b563ff6e4d4d86b7884ec00a77be2","tarball":"https://registry.npmjs.org/@trufflesuite/spinnies/-/spinnies-0.1.0.tgz","fileCount":16,"integrity":"sha512-22rVi7rECyAg9vsopa9jR84xQ9kSbjRxCYI9SPbHx4jjfRQODDzmVZtXLobUuXEQZYLgP1pXBtgY5kReb72E2g==","signatures":[{"sig":"MEUCIQDHBc7M1b89dq7FfqIHDlLbDVqhgajyJkUj5RSmc6NJkgIgcOkeTX16kAYRjfkDC4EJLriwTOYGuYp/FmPeeQW6cog=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVlJFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrh9RAAop0N/8nVO9DsVO+M9zDx3SHtDx5cLwDxTdVUv8E/T+29D7HO\r\nXfO67A/O8H0WxfXYpV1Dx/+U7689JfVIKt9qx8DNJwUpMRctxKcIU1wNr1k1\r\nFpdikQQBriVhOHfj/yxbbFF/Egl8cR0pEQuDMedwiYM+B6MsZcD53ob+m5qM\r\n2RXYiwSFDdSL9otvkj5VA8XbRjnJhDtwx6B73WlMc3+beqnvtBTfhDVaDaQ8\r\nvk4VtkY0eWtUO93Ovsjz/IvFoPBUhdLA3uEusBBVy0ffL3y7/ylJCvn3Hk1e\r\nTemDKlPXAdKNUy/M+B4azHedcKRrVWaGlapLA7wdKGuhGhlHtmNBGZ9Mv35U\r\nFt5S4ER4qkD+yQ+7ofVT2NDWlu5FsNg+Ol/Vrk+JbzB4ChmBE+8WwLPiwXzl\r\nHYyhTEUwf9iRTvSYpuJCtKaEo0aleVYMcXFjr3yOFPmk8ows5hOjvJgxrA4I\r\nxdCJm4iIbqd56+81gTKWngEm7LC7gkjN/lpfFVFrQPD7zdn+Rtdwt5W1s1nP\r\nR4438wi+ukJOosiNBsK+6eSY9yihR7idki4VrGeCjdkpJI9cTZG7ZruMTLid\r\ngaNDXOosQ9UBhI9UAeeE8T4qeUbG26eMFsTSGgugtIcIQdy3Aql7WJMROoj8\r\nBY5QR4ygFM4qwhVq4Qc+Khs+Nwt6GZuyKzU=\r\n=S57v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"index.d.ts","gitHead":"5e97f11bfd6f80027e35c7dcd347f37b1d89d62e","scripts":{"test":"npx mocha test"},"_npmUser":{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},"repository":{"url":"git+ssh://git@github.com/trufflesuite/spinnies.git","type":"git"},"_npmVersion":"6.14.16","description":"Create and manage multiple spinners in command-line interface programs","directories":{},"_nodeVersion":"12.22.10","dependencies":{"chalk":"^4.1.2","cli-cursor":"^3.1.0","strip-ansi":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.6","mocha":"^9.2.2"},"_npmOperationalInternal":{"tmp":"tmp/spinnies_0.1.0_1649824325282_0.7935877089797341","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@trufflesuite/spinnies","version":"0.1.1","keywords":["node","nodejs","node.js","multiple","multi","multispinner","spinner","spinners","loadre","loading","loading-bar","cli","console","command-line","command","terminal"],"license":"MIT","_id":"@trufflesuite/spinnies@0.1.1","maintainers":[{"name":"sukanyaparashar","email":"sukanyaparashar111@gmail.com"},{"name":"cliffoo","email":"cliffzhang08@gmail.com"},{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"jeff.smale","email":"jeff.smale@consensys.net"},{"name":"kevinbluer","email":"kevin@bluer.com"},{"name":"tenthirtyone","email":"ASherbuck@gmail.com"},{"name":"lsqproduction","email":"ll@trufflesuite.com"},{"name":"kevinweaver","email":"kevinweaver2@gmail.com"},{"name":"leeftk","email":"leandro.faria@consensys.net"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"davidmurdoch","email":"david@davidmurdoch.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"rkalis","email":"roscokalis@gmail.com"},{"name":"cds-amal","email":"cds.sudama@gmail.com"},{"name":"micaiahreid","email":"micaiahreid@gmail.com"}],"contributors":[{"url":"https://github.com/jcarpanelli","name":"Juan Bautista Carpanelli","email":"juanbanelli@gmail.com"},{"url":"https://github.com/benjamincburns","name":"Ben Burns"}],"homepage":"https://github.com/trufflesuite/spinnies#readme","bugs":{"url":"https://github.com/trufflesuite/spinnies/issues"},"dist":{"shasum":"719230993f55ab39f936ed8778979e7661af188d","tarball":"https://registry.npmjs.org/@trufflesuite/spinnies/-/spinnies-0.1.1.tgz","fileCount":14,"integrity":"sha512-jltEtmFJj6xmQqr85gP8OqBHCEiId+zw+uAsb3DyLLRD17O6sySW6Afa2Z/jpzSafj+32ssDfLJ+c0of1NLqcA==","signatures":[{"sig":"MEUCIAHdVZ4SNKSpZDZKw7XsrelBQYx0XwC4zJ3lfO6xfZ6WAiEA5+mq5NBYO0hmbfC5GvDT3hjXu9a6+PsKB4nozTl/kKU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7KByACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqlfQ/+PIDx+hyYjlE80eKjnc7uMlM1xv8EULAtR/2xci345ye0oDck\r\nRbm8krGqHhbiIl9BHC5vTkOr893myT5EyYVH4dnEEJ8Js54rwD3cK/1f38Kc\r\n9mAPB27/svPbnOMqZ5U6doh0+4oUhKwZNb7HSwySa/fyX5JyMUvfW8oT9ICf\r\n4gaDIvi+jvbDgQ4u4a7o3r5dkFRDRv4dsw/v8VFCpTx1PGjY6SDavPLaSIkx\r\nNXDRenejDm5EGjBGl9Owy2zWLzyZMOtKMRTQ5NEx4PcL7BCnP2IsDN4WX9vb\r\nZ8KGYhp5pLxEZ/+BhgyuXyg4YAULM0ZN1UbuTinMpPfx8nfDHd1UA+JdyZio\r\nENxGvpa9gh4n95H8u2V7OAZmbVkw1vZlXCkZyHEFCdsmICN128PVbufIV49W\r\nZ8bm+EU4CgHam8XFa7FnGvOF1fFf9x/OZnhPfhxlEo7HoZJw8uQ57Nk5gVMM\r\nNqg6jgV536jUt+FR1JhWBwyIhYCvvL/MzFYjf1N7Yq7jsdm8b7H0F1lfFh3h\r\nh1xapgNlpssRWIxI+DXzmvE8XtDEvmBiy0FSHhdNaF+WJEL3jdugEzcfxln5\r\nT3gXRmjuNiWnScsmER+P+3aRrqwZWzT9j2Wtn3QdrGsmlX/QNc4MZo4UhLXc\r\nksz8XtFSWVt5g73agxwt5dnpqduh0Dm87y8=\r\n=WUxw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"index.d.ts","gitHead":"b43630fca436619f54e196a95a3ebf1743100f7d","scripts":{"test":"npx mocha test"},"_npmUser":{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},"repository":{"url":"git+ssh://git@github.com/trufflesuite/spinnies.git","type":"git"},"_npmVersion":"6.14.16","description":"Create and manage multiple spinners in command-line interface programs","directories":{},"_nodeVersion":"12.22.12","dependencies":{"chalk":"^4.1.2","cli-cursor":"^3.1.0","strip-ansi":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.6","mocha":"^9.2.2"},"_npmOperationalInternal":{"tmp":"tmp/spinnies_0.1.1_1659674738190_0.9992463323646075","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-04-13T04:32:05.229Z","modified":"2026-04-29T21:46:33.033Z","0.1.0":"2022-04-13T04:32:05.416Z","0.1.1":"2022-08-05T04:45:38.394Z"},"bugs":{"url":"https://github.com/trufflesuite/spinnies/issues"},"license":"MIT","homepage":"https://github.com/trufflesuite/spinnies#readme","keywords":["node","nodejs","node.js","multiple","multi","multispinner","spinner","spinners","loadre","loading","loading-bar","cli","console","command-line","command","terminal"],"repository":{"url":"git+ssh://git@github.com/trufflesuite/spinnies.git","type":"git"},"description":"Create and manage multiple spinners in command-line interface programs","contributors":[{"url":"https://github.com/jcarpanelli","name":"Juan Bautista Carpanelli","email":"juanbanelli@gmail.com"},{"url":"https://github.com/benjamincburns","name":"Ben Burns"}],"maintainers":[{"email":"david@davidmurdoch.com","name":"davidmurdoch"},{"email":"jeff.smale@consensys.net","name":"jeff.smale"},{"email":"it@consensys.net","name":"rizedr"}],"readme":"# ![spin](https://i.ibb.co/4M0J13j/spin.png) Spinnies ![spin](https://i.ibb.co/4M0J13j/spin.png)\n> Maintained by the Truffle team, originally forked from\n> [jcarpanelli/spinnies](https://github.com/jcarpanelli/spinnies)\n\n> Node.js module to create and manage multiple spinners in command-line interface programs\n\n\n[![npm](https://img.shields.io/npm/v/spinnies.svg)](https://www.npmjs.com/package/@trufflesuite/spinnies)\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n<p align=\"center\"> <br> <img src='https://s3.us-west-2.amazonaws.com/jcarpanelli/termtosvg_zb90005u.svg' title='' /> </p>\n\n\n## Installation\n\n```\n$ npm i spinnies\n```\n\n## Usage & Example\n\n```js\nconst spinnies = new Spinnies();\n\nspinnies.add('spinner-1', { text: 'I am a spinner' });\nspinnies.add('spinner-2', { text: 'I am another spinner' });\n\nsetTimeout(() => {\n  spinnies.succeed('spinner-1', { text: 'Success!' });\n  spinnies.fail('spinner-2', { text: 'Fail :(' });\n}, 2000);\n```\n\n## API\n\nThis library follows a **non-error-throwing** philosophy. If you provide an invalid option or an invalid value for a valid option *it will be ignored*.\n\n### Initialization:\n\n#### new Spinnies([options])\n\nParameters\n- **options** - `object`:\n  - **color** - `string`: Any valid [chalk color](https://github.com/chalk/chalk#colors). The default value is `white`.\n  - **succeedColor** - `string`: Any valid [chalk color](https://github.com/chalk/chalk#colors). The default value is `green`.\n  - **failColor** - `string`: Any valid [chalk color](https://github.com/chalk/chalk#colors). The default value is `red`.\n  - **spinnerColor** - `string`: Any valid [chalk color](https://github.com/chalk/chalk#colors). The default value is `greenBright`.\n  - **succeedPrefix** - `string`: The default value is ✓.\n  - **failPrefix**- `string`: The default value is ✖.\n  - **spinner**- `object`:\n    - **interval** - `number`\n    - **frames** - `string[]`\n\n    You can see the already provided spinner [here](https://github.com/jcarpanelli/spinnies/blob/master/spinners.json).\n  - **disableSpins** - `boolean`: Disable spins (will still print raw messages).\n\n*Note: If you are working in any `win32` platform, the default spin animation will be overriden. You can get rid of this defining a different spinner animation manually, or by using the integrated VSCode terminal or Windows Terminal.*\n\nExample:\n\n```js\nconst spinner = { interval: 80, frames: ['🍇', '🍈', '🍉', '🍋'] }\nconst spinnies = new Spinnies({ color: 'blue', succeedColor: 'green', spinner });\n```\n\n### Instance methods:\n\n#### add(name, [options])\n\nAdds a new spinner with the given name.\n\nParameters:\n- **name** - `string`: spinner reference name.\n- **options** - `object`:\n  - **text**: - `string`: Optional text to show in the spinner. If none is provided, the `name` field will be shown.\n  - **indent**: - `number`: Optional, indent the spinner with the given number of spaces.\n  - **status** - `string`: Initial status of the spinner. Valid statuses are: `succeed`, `fail`, `spinning`, `non-spinnable`and `stopped`.\n  - **color** - `string`: Any valid [chalk color](https://github.com/chalk/chalk#colors).\n  - **succeedColor** - `string`: Any valid [chalk color](https://github.com/chalk/chalk#colors).\n  - **failColor** - `string`: Any valid [chalk color](https://github.com/chalk/chalk#colors).\n\nReturn value: Returns the spinner's options.\n\nExample:\n\n```js\nconst spinnies = new Spinnies();\nspinnies.add('spinner-1');\nspinnies.add('another-spinner', { text: 'Hello, I am a spinner!', color: 'greenBright' });\n\n```\n\n#### pick(name)\nPicks a spinner.\n\nParameters:\n- **name** - `string`: spinner reference name.\n\nReturn value: Returns the spinner's options.\n\n#### remove(name)\nRemoves a spinner.\n\nParameters:\n- **name** - `string`: spinner reference name.\n\nReturn value: Returns the spinner's options.\n\n#### update(name, [options])\n\nUpdates the spinner with name `name` with the provided options.\n\nParameters:\n- **name** - `string`: spinner reference name.\n- **options** - `object`:\n  - **text**: - `string`: Optional text to show in the spinner. If none is provided, the `name` field will be shown.\n  - **status** - `string`: New status of the spinner. Valid statuses are: `succeed`, `fail`, `spinning`, `non-spinnable`and `stopped`.\n  - **color** - `string`: Any valid [chalk color](https://github.com/chalk/chalk#colors).\n  - **succeedColor** - `string`: Any valid [chalk color](https://github.com/chalk/chalk#colors).\n  - **failColor** - `string`: Any valid [chalk color](https://github.com/chalk/chalk#colors).\n\nReturn value: Returns the spinner's options.\n\nExample:\n\n```js\nconst spinnies = new Spinnies();\nspinnies.add('spinner-1', { text: 'Hello! I am the initial text', color: 'green' });\n// some code\nspinnies.update('spinner-1', { text: 'Hello, I am an updated text!', color: 'blue' });\n\n```\n\n#### succeed(name, [options])\n\nSets the specified spinner status as `succeed`.\n\nParameters:\n- **name** - `string`: spinner reference name.\n- **options** - `object`:\n  - **text**: - `string`: Optional text to show in the spinner. If none is provided, the `name` field will be shown.\n  - **succeedColor** - `string`: Any valid [chalk color](https://github.com/chalk/chalk#colors).\n\nReturn value: Returns the spinner's options.\n\nExample:\n\n```js\nconst spinnies = new Spinnies();\nspinnies.add('spinner-1', { text: 'Hello! I am the initial text', color: 'green' });\n// some code\nspinnies.succeed('spinner-1', { text: 'Success!', successColor: 'greenBright' });\n\n```\n\n#### fail(name, [options])\n\nSets the specified spinner status as `fail`.\n\nParameters:\n- **name** - `string`: spinner reference name.\n- **options** - `object`:\n  - **text**: - `string`: Optional text to show in the spinner. If none is provided, the `name` field will be shown.\n  - **failColor** - `string`: Any valid [chalk color](https://github.com/chalk/chalk#colors).\n\nReturn value: Returns the spinner's options.\n\nExample:\n\n```js\nconst spinnies = new Spinnies();\nspinnies.add('spinner-1', { text: 'Hello! I am the initial text', color: 'green' });\n// some code\nspinnies.fail('spinner-1', { text: 'I failed', failColor: 'redBright' });\n\n```\n\n#### stopAll([status])\n\nStops the spinners and sets the non-succeeded and non-failed ones to the provided status, which can be `succeed`, `fail` or `stopped`. You can see an example [here](https://github.com/jcarpanelli/spinnies/blob/master/examples/demo-stop-all.js).\n\n#### hasActiveSpinners()\nReturn value: returns `false` if all spinners have succeeded, failed or have been stopped.\n\n\n## Contribute\n\nStar it, fork it, improve it, PR it! :raised_hands:.\n\n\n## Acknowledgements\n\nThanks to [chalk](https://github.com/chalk/chalk) for helping making this lib colorful :rainbow: and to [ora](https://github.com/sindresorhus/ora) which was a great inspiration :unicorn:.\n\n## License\n\n[MIT](https://github.com/jcarpanelli/spinnies/blob/master/LICENSE)\n","readmeFilename":"README.md"}