keyman: replace removed inquirer prompt type 'list' with 'select'
inquirer v10 removed the legacy 'list' prompt in favour of 'select', so every list-style prompt — starting with the main menu — died with "Prompt type \"list\" is not registered" on any real run against the declared ^14 dependency. The tests never saw it because they all mock inquirer.prompt, which accepts any type string. Choice shapes and the 'default' option are unchanged; 'select' takes them as-is. Bump to 0.7.2 to ship the fix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ce5atB2tXDXyz2jd9s1bqE
This commit is contained in:
co-authored by
Claude Opus 5
parent
643d7379ba
commit
568d4c83ff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@bitsquare/keyman",
|
||||
"version": "0.7.1",
|
||||
"version": "0.7.2",
|
||||
"description": "A system to simplify ssh key management",
|
||||
"keywords": [
|
||||
"ssh",
|
||||
|
||||
@@ -22,7 +22,7 @@ export async function copyKey(sshDir: string, tmpDir: string) {
|
||||
|
||||
const { selectedKey } = await inquirer.prompt<{ selectedKey: string }>([
|
||||
{
|
||||
type: 'list',
|
||||
type: 'select',
|
||||
name: 'selectedKey',
|
||||
message: 'Select key to copy public key from:',
|
||||
choices: keys,
|
||||
|
||||
@@ -31,7 +31,7 @@ export async function decryptKeys(sshDir: string, keysDir: string, tmpDir: strin
|
||||
choices: vaultKeys,
|
||||
},
|
||||
{
|
||||
type: 'list',
|
||||
type: 'select',
|
||||
name: 'decryptMode',
|
||||
message: 'Choose decryption location:',
|
||||
// Named after the directories actually in use, which are configurable.
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface KeyOptions {
|
||||
export async function promptKeyOptions(defaultIdentity?: string): Promise<KeyOptions> {
|
||||
const { algorithm } = await inquirer.prompt<{ algorithm: string }>([
|
||||
{
|
||||
type: 'list',
|
||||
type: 'select',
|
||||
name: 'algorithm',
|
||||
message: 'Select algorithm:',
|
||||
choices: ['ed25519', 'rsa'],
|
||||
|
||||
@@ -67,7 +67,7 @@ export async function keyman() {
|
||||
// 🔹 Show category selection
|
||||
const { category } = await inquirer.prompt<{ category: string }>([
|
||||
{
|
||||
type: 'list',
|
||||
type: 'select',
|
||||
name: 'category',
|
||||
message: 'Select operation:',
|
||||
choices: [
|
||||
|
||||
@@ -120,7 +120,7 @@ export async function rotateKey(
|
||||
|
||||
const { key } = await inquirer.prompt<{ key: string }>([
|
||||
{
|
||||
type: 'list',
|
||||
type: 'select',
|
||||
name: 'key',
|
||||
message: 'Select the key to rotate:',
|
||||
choices: vaultKeys,
|
||||
@@ -180,7 +180,7 @@ export async function retireKey(sshDir: string, keysDir: string, tmpDir: string)
|
||||
|
||||
const { key } = await inquirer.prompt<{ key: string }>([
|
||||
{
|
||||
type: 'list',
|
||||
type: 'select',
|
||||
name: 'key',
|
||||
message: 'Select the key to retire:',
|
||||
choices: vaultKeys,
|
||||
|
||||
Reference in New Issue
Block a user