From 01160246e4a0c0052181c72a53737e356ea7d02d Mon Sep 17 00:00:00 2001 From: Minteck Date: Sat, 12 Feb 2022 10:33:06 +0100 Subject: First commit --- node_modules/restore-cursor/index.d.ts | 11 +++++++ node_modules/restore-cursor/index.js | 11 +++++++ node_modules/restore-cursor/license | 9 ++++++ node_modules/restore-cursor/package.json | 55 ++++++++++++++++++++++++++++++++ node_modules/restore-cursor/readme.md | 31 ++++++++++++++++++ 5 files changed, 117 insertions(+) create mode 100644 node_modules/restore-cursor/index.d.ts create mode 100644 node_modules/restore-cursor/index.js create mode 100644 node_modules/restore-cursor/license create mode 100644 node_modules/restore-cursor/package.json create mode 100644 node_modules/restore-cursor/readme.md (limited to 'node_modules/restore-cursor') diff --git a/node_modules/restore-cursor/index.d.ts b/node_modules/restore-cursor/index.d.ts new file mode 100644 index 0000000..417891a --- /dev/null +++ b/node_modules/restore-cursor/index.d.ts @@ -0,0 +1,11 @@ +/** +Gracefully restore the CLI cursor on exit. + +@example +``` +import restoreCursor from 'restore-cursor'; + +restoreCursor(); +``` +*/ +export default function restoreCursor(): void; diff --git a/node_modules/restore-cursor/index.js b/node_modules/restore-cursor/index.js new file mode 100644 index 0000000..0c117e9 --- /dev/null +++ b/node_modules/restore-cursor/index.js @@ -0,0 +1,11 @@ +import process from 'node:process'; +import onetime from 'onetime'; +import signalExit from 'signal-exit'; + +const restoreCursor = onetime(() => { + signalExit(() => { + process.stderr.write('\u001B[?25h'); + }, {alwaysLast: true}); +}); + +export default restoreCursor; diff --git a/node_modules/restore-cursor/license b/node_modules/restore-cursor/license new file mode 100644 index 0000000..fa7ceba --- /dev/null +++ b/node_modules/restore-cursor/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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/restore-cursor/package.json b/node_modules/restore-cursor/package.json new file mode 100644 index 0000000..031d45a --- /dev/null +++ b/node_modules/restore-cursor/package.json @@ -0,0 +1,55 @@ +{ + "name": "restore-cursor", + "version": "4.0.0", + "description": "Gracefully restore the CLI cursor on exit", + "license": "MIT", + "repository": "sindresorhus/restore-cursor", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "type": "module", + "exports": "./index.js", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "scripts": { + "test": "xo && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "exit", + "quit", + "process", + "graceful", + "shutdown", + "sigterm", + "sigint", + "terminate", + "kill", + "stop", + "cli", + "cursor", + "ansi", + "show", + "term", + "terminal", + "console", + "tty", + "shell", + "command-line" + ], + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "devDependencies": { + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/restore-cursor/readme.md b/node_modules/restore-cursor/readme.md new file mode 100644 index 0000000..0ed544e --- /dev/null +++ b/node_modules/restore-cursor/readme.md @@ -0,0 +1,31 @@ +# restore-cursor + +> Gracefully restore the CLI cursor on exit + +Prevent the cursor you've hidden interactively from remaining hidden if the process crashes. + +## Install + +``` +$ npm install restore-cursor +``` + +## Usage + +```js +import restoreCursor from 'restore-cursor'; + +restoreCursor(); +``` + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
-- cgit