diff --git a/node_modules/.gitignore b/node_modules/.gitignore index 3ecb03621ff1d..14da65d21b845 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -176,8 +176,6 @@ !/init-package-json !/init-package-json/node_modules/ /init-package-json/node_modules/* -!/init-package-json/node_modules/mute-stream -!/init-package-json/node_modules/read !/init-package-json/node_modules/validate-npm-package-name !/ip-address !/ip-regex @@ -289,10 +287,6 @@ !/promise-inflight !/promise-retry !/promzard -!/promzard/node_modules/ -/promzard/node_modules/* -!/promzard/node_modules/mute-stream -!/promzard/node_modules/read !/qrcode-terminal !/read-cmd-shim !/read-package-json-fast diff --git a/node_modules/init-package-json/node_modules/mute-stream/LICENSE b/node_modules/init-package-json/node_modules/mute-stream/LICENSE deleted file mode 100644 index 19129e315fe59..0000000000000 --- a/node_modules/init-package-json/node_modules/mute-stream/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/init-package-json/node_modules/mute-stream/lib/index.js b/node_modules/init-package-json/node_modules/mute-stream/lib/index.js deleted file mode 100644 index 368f727e2c3ed..0000000000000 --- a/node_modules/init-package-json/node_modules/mute-stream/lib/index.js +++ /dev/null @@ -1,142 +0,0 @@ -const Stream = require('stream') - -class MuteStream extends Stream { - #isTTY = null - - constructor (opts = {}) { - super(opts) - this.writable = this.readable = true - this.muted = false - this.on('pipe', this._onpipe) - this.replace = opts.replace - - // For readline-type situations - // This much at the start of a line being redrawn after a ctrl char - // is seen (such as backspace) won't be redrawn as the replacement - this._prompt = opts.prompt || null - this._hadControl = false - } - - #destSrc (key, def) { - if (this._dest) { - return this._dest[key] - } - if (this._src) { - return this._src[key] - } - return def - } - - #proxy (method, ...args) { - if (typeof this._dest?.[method] === 'function') { - this._dest[method](...args) - } - if (typeof this._src?.[method] === 'function') { - this._src[method](...args) - } - } - - get isTTY () { - if (this.#isTTY !== null) { - return this.#isTTY - } - return this.#destSrc('isTTY', false) - } - - // basically just get replace the getter/setter with a regular value - set isTTY (val) { - this.#isTTY = val - } - - get rows () { - return this.#destSrc('rows') - } - - get columns () { - return this.#destSrc('columns') - } - - mute () { - this.muted = true - } - - unmute () { - this.muted = false - } - - _onpipe (src) { - this._src = src - } - - pipe (dest, options) { - this._dest = dest - return super.pipe(dest, options) - } - - pause () { - if (this._src) { - return this._src.pause() - } - } - - resume () { - if (this._src) { - return this._src.resume() - } - } - - write (c) { - if (this.muted) { - if (!this.replace) { - return true - } - // eslint-disable-next-line no-control-regex - if (c.match(/^\u001b/)) { - if (c.indexOf(this._prompt) === 0) { - c = c.slice(this._prompt.length) - c = c.replace(/./g, this.replace) - c = this._prompt + c - } - this._hadControl = true - return this.emit('data', c) - } else { - if (this._prompt && this._hadControl && - c.indexOf(this._prompt) === 0) { - this._hadControl = false - this.emit('data', this._prompt) - c = c.slice(this._prompt.length) - } - c = c.toString().replace(/./g, this.replace) - } - } - this.emit('data', c) - } - - end (c) { - if (this.muted) { - if (c && this.replace) { - c = c.toString().replace(/./g, this.replace) - } else { - c = null - } - } - if (c) { - this.emit('data', c) - } - this.emit('end') - } - - destroy (...args) { - return this.#proxy('destroy', ...args) - } - - destroySoon (...args) { - return this.#proxy('destroySoon', ...args) - } - - close (...args) { - return this.#proxy('close', ...args) - } -} - -module.exports = MuteStream diff --git a/node_modules/init-package-json/node_modules/mute-stream/package.json b/node_modules/init-package-json/node_modules/mute-stream/package.json deleted file mode 100644 index 3725daf0810fe..0000000000000 --- a/node_modules/init-package-json/node_modules/mute-stream/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "mute-stream", - "version": "2.0.0", - "main": "lib/index.js", - "devDependencies": { - "@npmcli/eslint-config": "^5.0.0", - "@npmcli/template-oss": "4.23.3", - "tap": "^16.3.0" - }, - "scripts": { - "test": "tap", - "lint": "npm run eslint", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run eslint -- --fix", - "snap": "tap", - "posttest": "npm run lint", - "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/npm/mute-stream.git" - }, - "keywords": [ - "mute", - "stream", - "pipe" - ], - "author": "GitHub Inc.", - "license": "ISC", - "description": "Bytes go in, but they don't come out (when muted).", - "files": [ - "bin/", - "lib/" - ], - "tap": { - "statements": 70, - "branches": 60, - "functions": 81, - "lines": 70, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.23.3", - "publish": true - } -} diff --git a/node_modules/init-package-json/node_modules/read/LICENSE b/node_modules/init-package-json/node_modules/read/LICENSE deleted file mode 100644 index 19129e315fe59..0000000000000 --- a/node_modules/init-package-json/node_modules/read/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/init-package-json/node_modules/read/dist/commonjs/package.json b/node_modules/init-package-json/node_modules/read/dist/commonjs/package.json deleted file mode 100644 index 5bbefffbabee3..0000000000000 --- a/node_modules/init-package-json/node_modules/read/dist/commonjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/node_modules/init-package-json/node_modules/read/dist/commonjs/read.js b/node_modules/init-package-json/node_modules/read/dist/commonjs/read.js deleted file mode 100644 index c0600d2b4e8ca..0000000000000 --- a/node_modules/init-package-json/node_modules/read/dist/commonjs/read.js +++ /dev/null @@ -1,94 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.read = read; -const mute_stream_1 = __importDefault(require("mute-stream")); -const readline_1 = require("readline"); -async function read({ default: def, input = process.stdin, output = process.stdout, completer, prompt = '', silent, timeout, edit, terminal, replace, }) { - if (typeof def !== 'undefined' && - typeof def !== 'string' && - typeof def !== 'number') { - throw new Error('default value must be string or number'); - } - let editDef = false; - const defString = def?.toString(); - prompt = prompt.trim() + ' '; - terminal = !!(terminal || output.isTTY); - if (defString) { - if (silent) { - prompt += '(