@inquirer/password
Advanced tools
Comparing version 1.1.9 to 1.1.10
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const input_1 = __importDefault(require("@inquirer/input")); | ||
const chalk_1 = __importDefault(require("chalk")); | ||
const ansi_escapes_1 = __importDefault(require("ansi-escapes")); | ||
const input_1 = require("@inquirer/input"); | ||
const chalk_1 = require("chalk"); | ||
const ansi_escapes_1 = require("ansi-escapes"); | ||
const password = (config, context) => { | ||
@@ -13,6 +10,6 @@ if ('transformer' in config) { | ||
} | ||
return (0, input_1.default)(Object.assign(Object.assign({}, config), { default: undefined, transformer(input, { isFinal }) { | ||
return (0, input_1.default)(Object.assign(Object.assign({}, config), { default: undefined, transformer(str, { isFinal }) { | ||
if (config.mask) { | ||
const maskChar = typeof config.mask === 'string' ? config.mask : '*'; | ||
return maskChar.repeat(input.length); | ||
return maskChar.repeat(str.length); | ||
} | ||
@@ -19,0 +16,0 @@ if (!isFinal) { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const input_1 = __importDefault(require("@inquirer/input")); | ||
const chalk_1 = __importDefault(require("chalk")); | ||
const ansi_escapes_1 = __importDefault(require("ansi-escapes")); | ||
const input_1 = require("@inquirer/input"); | ||
const chalk_1 = require("chalk"); | ||
const ansi_escapes_1 = require("ansi-escapes"); | ||
const password = (config, context) => { | ||
@@ -13,6 +10,6 @@ if ('transformer' in config) { | ||
} | ||
return (0, input_1.default)(Object.assign(Object.assign({}, config), { default: undefined, transformer(input, { isFinal }) { | ||
return (0, input_1.default)(Object.assign(Object.assign({}, config), { default: undefined, transformer(str, { isFinal }) { | ||
if (config.mask) { | ||
const maskChar = typeof config.mask === 'string' ? config.mask : '*'; | ||
return maskChar.repeat(input.length); | ||
return maskChar.repeat(str.length); | ||
} | ||
@@ -19,0 +16,0 @@ if (!isFinal) { |
{ | ||
"name": "@inquirer/password", | ||
"version": "1.1.9", | ||
"version": "1.1.10", | ||
"engines": { | ||
@@ -60,4 +60,4 @@ "node": ">=14.18.0" | ||
"dependencies": { | ||
"@inquirer/input": "^1.2.9", | ||
"@inquirer/type": "^1.1.2", | ||
"@inquirer/input": "^1.2.10", | ||
"@inquirer/type": "^1.1.3", | ||
"ansi-escapes": "^4.3.2", | ||
@@ -67,9 +67,8 @@ "chalk": "^4.1.2" | ||
"devDependencies": { | ||
"@inquirer/testing": "^2.1.4" | ||
"@inquirer/testing": "^2.1.5" | ||
}, | ||
"scripts": { | ||
"tsc": "yarn run clean && yarn run tsc:esm && yarn run tsc:cjs", | ||
"clean": "rm -rf dist", | ||
"tsc:esm": "tsc -p ./tsconfig.json", | ||
"tsc:cjs": "tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs" | ||
"tsc": "yarn run tsc:esm && yarn run tsc:cjs", | ||
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json", | ||
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs" | ||
}, | ||
@@ -91,3 +90,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "ea5baff21fb29ed3c0931ea4030cc1dd1e92fc8d" | ||
"gitHead": "f5c544a8ded1c7dfb6ac8364759955e8f2ecfb0c" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8454
73
Updated@inquirer/input@^1.2.10
Updated@inquirer/type@^1.1.3