diff --git a/package.json b/package.json index fd27206..df54658 100644 --- a/package.json +++ b/package.json @@ -40,10 +40,11 @@ "packageManager": "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34", "dependencies": { "@aws-sdk/client-ssm": "^3.990.0", + "@inquirer/input": "^5.0.6", + "@inquirer/password": "^5.0.6", "@napi-rs/keyring": "^1.2.0", "commander": "^14.0.3", "dotenv": "^17.3.1", - "inquirer": "^12.11.1", "zod": "^4.3.6" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c9521e6..b0442bc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,12 @@ importers: '@aws-sdk/client-ssm': specifier: ^3.990.0 version: 3.990.0 + '@inquirer/input': + specifier: ^5.0.6 + version: 5.0.6(@types/node@24.10.13) + '@inquirer/password': + specifier: ^5.0.6 + version: 5.0.6(@types/node@24.10.13) '@napi-rs/keyring': specifier: ^1.2.0 version: 1.2.0 @@ -20,9 +26,6 @@ importers: dotenv: specifier: ^17.3.1 version: 17.3.1 - inquirer: - specifier: ^12.11.1 - version: 12.11.1(@types/node@24.10.13) zod: specifier: ^4.3.6 version: 4.3.6 @@ -222,134 +225,44 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} - '@inquirer/ansi@1.0.2': - resolution: {integrity: sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==} - engines: {node: '>=18'} - - '@inquirer/checkbox@4.3.2': - resolution: {integrity: sha512-VXukHf0RR1doGe6Sm4F0Em7SWYLTHSsbGfJdS9Ja2bX5/D5uwVOEjr07cncLROdBvmnvCATYEWlHqYmXv2IlQA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/confirm@5.1.21': - resolution: {integrity: sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/core@10.3.2': - resolution: {integrity: sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/editor@4.2.23': - resolution: {integrity: sha512-aLSROkEwirotxZ1pBaP8tugXRFCxW94gwrQLxXfrZsKkfjOYC1aRvAZuhpJOb5cu4IBTJdsCigUlf2iCOu4ZDQ==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/expand@4.0.23': - resolution: {integrity: sha512-nRzdOyFYnpeYTTR2qFwEVmIWypzdAx/sIkCMeTNTcflFOovfqUk+HcFhQQVBftAh9gmGrpFj6QcGEqrDMDOiew==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/external-editor@1.0.3': - resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true + '@inquirer/ansi@2.0.3': + resolution: {integrity: sha512-g44zhR3NIKVs0zUesa4iMzExmZpLUdTLRMCStqX3GE5NT6VkPcxQGJ+uC8tDgBUC/vB1rUhUd55cOf++4NZcmw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} - '@inquirer/figures@1.0.15': - resolution: {integrity: sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==} - engines: {node: '>=18'} - - '@inquirer/input@4.3.1': - resolution: {integrity: sha512-kN0pAM4yPrLjJ1XJBjDxyfDduXOuQHrBB8aLDMueuwUGn+vNpF7Gq7TvyVxx8u4SHlFFj4trmj+a2cbpG4Jn1g==} - engines: {node: '>=18'} + '@inquirer/core@11.1.3': + resolution: {integrity: sha512-TBAGPDGvpwFSQ4nkawQzq5/X7DhElANjvKeUtcjpVnBIfuH/OEu4M+79R3+bGPtwxST4DOIGRtF933mUH2bRVw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/number@3.0.23': - resolution: {integrity: sha512-5Smv0OK7K0KUzUfYUXDXQc9jrf8OHo4ktlEayFlelCjwMXz0299Y8OrI+lj7i4gCBY15UObk76q0QtxjzFcFcg==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/password@4.0.23': - resolution: {integrity: sha512-zREJHjhT5vJBMZX/IUbyI9zVtVfOLiTO66MrF/3GFZYZ7T4YILW5MSkEYHceSii/KtRk+4i3RE7E1CUXA2jHcA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true + '@inquirer/figures@2.0.3': + resolution: {integrity: sha512-y09iGt3JKoOCBQ3w4YrSJdokcD8ciSlMIWsD+auPu+OZpfxLuyz+gICAQ6GCBOmJJt4KEQGHuZSVff2jiNOy7g==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} - '@inquirer/prompts@7.10.1': - resolution: {integrity: sha512-Dx/y9bCQcXLI5ooQ5KyvA4FTgeo2jYj/7plWfV5Ak5wDPKQZgudKez2ixyfz7tKXzcJciTxqLeK7R9HItwiByg==} - engines: {node: '>=18'} + '@inquirer/input@5.0.6': + resolution: {integrity: sha512-RZsJcjMJA3QNI9q9OiAi1fAom+Pb8on6alJB1Teh5jjKaiG5C79P69cG955ZRfgPdxTmI4uyhf33+94Xj7xWig==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/rawlist@4.1.11': - resolution: {integrity: sha512-+LLQB8XGr3I5LZN/GuAHo+GpDJegQwuPARLChlMICNdwW7OwV2izlCSCxN6cqpL0sMXmbKbFcItJgdQq5EBXTw==} - engines: {node: '>=18'} + '@inquirer/password@5.0.6': + resolution: {integrity: sha512-c4BT4SB79iYwPhtGVBSvrlTnn4oFSYnwocafmktpay8RK75T2c2+fLlR0i1Cxw0QOhdy/YULdmpHoy1sOrPzvA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: '@types/node': optional: true - '@inquirer/search@3.2.2': - resolution: {integrity: sha512-p2bvRfENXCZdWF/U2BXvnSI9h+tuA8iNqtUKb9UWbmLYCRQxd8WkvwWvYn+3NgYaNwdUkHytJMGG4MMLucI1kA==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/select@4.4.2': - resolution: {integrity: sha512-l4xMuJo55MAe+N7Qr4rX90vypFwCajSakx59qe/tMaC1aEHWLyw68wF4o0A4SLAY4E0nd+Vt+EyskeDIqu1M6w==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - - '@inquirer/type@3.0.10': - resolution: {integrity: sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==} - engines: {node: '>=18'} + '@inquirer/type@4.0.3': + resolution: {integrity: sha512-cKZN7qcXOpj1h+1eTTcGDVLaBIHNMT1Rz9JqJP5MnEJ0JhgVWllx7H/tahUp5YEK1qaByH2Itb8wLG/iScD5kw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} peerDependencies: '@types/node': '>=18' peerDependenciesMeta: @@ -817,10 +730,6 @@ packages: ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -848,9 +757,6 @@ packages: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} - chardet@2.1.1: - resolution: {integrity: sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==} - cli-width@4.1.0: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} @@ -889,9 +795,6 @@ packages: resolution: {integrity: sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA==} engines: {node: '>=12'} - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -947,6 +850,15 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-string-truncated-width@3.0.3: + resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==} + + fast-string-width@3.0.2: + resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==} + + fast-wrap-ansi@0.2.0: + resolution: {integrity: sha512-rLV8JHxTyhVmFYhBJuMujcrHqOT2cnO5Zxj37qROj23CP39GXubJRBUFF0z8KFK77Uc0SukZUf7JZhsVEQ6n8w==} + fast-xml-parser@5.3.4: resolution: {integrity: sha512-EFd6afGmXlCx8H8WTZHhAoDaWaGyuIBoZJ2mknrNxug+aZKjkp0a0dlars9Izl+jF+7Gu1/5f/2h68cQpe0IiA==} hasBin: true @@ -987,10 +899,6 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - iconv-lite@0.7.0: - resolution: {integrity: sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==} - engines: {node: '>=0.10.0'} - ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -1003,23 +911,10 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} - inquirer@12.11.1: - resolution: {integrity: sha512-9VF7mrY+3OmsAfjH3yKz/pLbJ5z22E23hENKw3/LNSaA/sAt3v49bDRY+Ygct1xwuKT+U+cBfTzjCPySna69Qw==} - engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true - is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -1064,9 +959,9 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - mute-stream@2.0.0: - resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} - engines: {node: ^18.17.0 || >=20.5.0} + mute-stream@3.0.0: + resolution: {integrity: sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==} + engines: {node: ^20.17.0 || >=22.9.0} natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -1125,16 +1020,6 @@ packages: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} - run-async@4.0.6: - resolution: {integrity: sha512-IoDlSLTs3Yq593mb3ZoKWKXMNu3UpObxhgA/Xuid5p4bbfi2jdY1Hj0m1K+0/tEuQTxIGMhQDqGjKb7RuxGpAQ==} - engines: {node: '>=0.12.0'} - - rxjs@7.8.2: - resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} - - safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - semver@7.7.4: resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==} engines: {node: '>=10'} @@ -1152,14 +1037,6 @@ packages: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -1208,18 +1085,10 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} - wrap-ansi@6.2.0: - resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} - engines: {node: '>=8'} - yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - yoctocolors-cjs@2.1.3: - resolution: {integrity: sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==} - engines: {node: '>=18'} - zod@4.3.6: resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==} @@ -1650,128 +1519,38 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@inquirer/ansi@1.0.2': {} + '@inquirer/ansi@2.0.3': {} - '@inquirer/checkbox@4.3.2(@types/node@24.10.13)': + '@inquirer/core@11.1.3(@types/node@24.10.13)': dependencies: - '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@24.10.13) - '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@24.10.13) - yoctocolors-cjs: 2.1.3 - optionalDependencies: - '@types/node': 24.10.13 - - '@inquirer/confirm@5.1.21(@types/node@24.10.13)': - dependencies: - '@inquirer/core': 10.3.2(@types/node@24.10.13) - '@inquirer/type': 3.0.10(@types/node@24.10.13) - optionalDependencies: - '@types/node': 24.10.13 - - '@inquirer/core@10.3.2(@types/node@24.10.13)': - dependencies: - '@inquirer/ansi': 1.0.2 - '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@24.10.13) + '@inquirer/ansi': 2.0.3 + '@inquirer/figures': 2.0.3 + '@inquirer/type': 4.0.3(@types/node@24.10.13) cli-width: 4.1.0 - mute-stream: 2.0.0 + fast-wrap-ansi: 0.2.0 + mute-stream: 3.0.0 signal-exit: 4.1.0 - wrap-ansi: 6.2.0 - yoctocolors-cjs: 2.1.3 - optionalDependencies: - '@types/node': 24.10.13 - - '@inquirer/editor@4.2.23(@types/node@24.10.13)': - dependencies: - '@inquirer/core': 10.3.2(@types/node@24.10.13) - '@inquirer/external-editor': 1.0.3(@types/node@24.10.13) - '@inquirer/type': 3.0.10(@types/node@24.10.13) - optionalDependencies: - '@types/node': 24.10.13 - - '@inquirer/expand@4.0.23(@types/node@24.10.13)': - dependencies: - '@inquirer/core': 10.3.2(@types/node@24.10.13) - '@inquirer/type': 3.0.10(@types/node@24.10.13) - yoctocolors-cjs: 2.1.3 - optionalDependencies: - '@types/node': 24.10.13 - - '@inquirer/external-editor@1.0.3(@types/node@24.10.13)': - dependencies: - chardet: 2.1.1 - iconv-lite: 0.7.0 - optionalDependencies: - '@types/node': 24.10.13 - - '@inquirer/figures@1.0.15': {} - - '@inquirer/input@4.3.1(@types/node@24.10.13)': - dependencies: - '@inquirer/core': 10.3.2(@types/node@24.10.13) - '@inquirer/type': 3.0.10(@types/node@24.10.13) - optionalDependencies: - '@types/node': 24.10.13 - - '@inquirer/number@3.0.23(@types/node@24.10.13)': - dependencies: - '@inquirer/core': 10.3.2(@types/node@24.10.13) - '@inquirer/type': 3.0.10(@types/node@24.10.13) - optionalDependencies: - '@types/node': 24.10.13 - - '@inquirer/password@4.0.23(@types/node@24.10.13)': - dependencies: - '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@24.10.13) - '@inquirer/type': 3.0.10(@types/node@24.10.13) - optionalDependencies: - '@types/node': 24.10.13 - - '@inquirer/prompts@7.10.1(@types/node@24.10.13)': - dependencies: - '@inquirer/checkbox': 4.3.2(@types/node@24.10.13) - '@inquirer/confirm': 5.1.21(@types/node@24.10.13) - '@inquirer/editor': 4.2.23(@types/node@24.10.13) - '@inquirer/expand': 4.0.23(@types/node@24.10.13) - '@inquirer/input': 4.3.1(@types/node@24.10.13) - '@inquirer/number': 3.0.23(@types/node@24.10.13) - '@inquirer/password': 4.0.23(@types/node@24.10.13) - '@inquirer/rawlist': 4.1.11(@types/node@24.10.13) - '@inquirer/search': 3.2.2(@types/node@24.10.13) - '@inquirer/select': 4.4.2(@types/node@24.10.13) optionalDependencies: '@types/node': 24.10.13 - '@inquirer/rawlist@4.1.11(@types/node@24.10.13)': - dependencies: - '@inquirer/core': 10.3.2(@types/node@24.10.13) - '@inquirer/type': 3.0.10(@types/node@24.10.13) - yoctocolors-cjs: 2.1.3 - optionalDependencies: - '@types/node': 24.10.13 + '@inquirer/figures@2.0.3': {} - '@inquirer/search@3.2.2(@types/node@24.10.13)': + '@inquirer/input@5.0.6(@types/node@24.10.13)': dependencies: - '@inquirer/core': 10.3.2(@types/node@24.10.13) - '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@24.10.13) - yoctocolors-cjs: 2.1.3 + '@inquirer/core': 11.1.3(@types/node@24.10.13) + '@inquirer/type': 4.0.3(@types/node@24.10.13) optionalDependencies: '@types/node': 24.10.13 - '@inquirer/select@4.4.2(@types/node@24.10.13)': + '@inquirer/password@5.0.6(@types/node@24.10.13)': dependencies: - '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@24.10.13) - '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@24.10.13) - yoctocolors-cjs: 2.1.3 + '@inquirer/ansi': 2.0.3 + '@inquirer/core': 11.1.3(@types/node@24.10.13) + '@inquirer/type': 4.0.3(@types/node@24.10.13) optionalDependencies: '@types/node': 24.10.13 - '@inquirer/type@3.0.10(@types/node@24.10.13)': + '@inquirer/type@4.0.3(@types/node@24.10.13)': optionalDependencies: '@types/node': 24.10.13 @@ -2264,8 +2043,6 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ansi-regex@5.0.1: {} - ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 @@ -2292,8 +2069,6 @@ snapshots: ansi-styles: 4.3.0 supports-color: 7.2.0 - chardet@2.1.1: {} - cli-width@4.1.0: {} color-convert@2.0.1: @@ -2320,8 +2095,6 @@ snapshots: dotenv@17.3.1: {} - emoji-regex@8.0.0: {} - escape-string-regexp@4.0.0: {} eslint-scope@8.4.0: @@ -2396,6 +2169,16 @@ snapshots: fast-levenshtein@2.0.6: {} + fast-string-truncated-width@3.0.3: {} + + fast-string-width@3.0.2: + dependencies: + fast-string-truncated-width: 3.0.3 + + fast-wrap-ansi@0.2.0: + dependencies: + fast-string-width: 3.0.2 + fast-xml-parser@5.3.4: dependencies: strnum: 2.1.2 @@ -2428,10 +2211,6 @@ snapshots: has-flag@4.0.0: {} - iconv-lite@0.7.0: - dependencies: - safer-buffer: 2.1.2 - ignore@5.3.2: {} import-fresh@3.3.1: @@ -2441,22 +2220,8 @@ snapshots: imurmurhash@0.1.4: {} - inquirer@12.11.1(@types/node@24.10.13): - dependencies: - '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@24.10.13) - '@inquirer/prompts': 7.10.1(@types/node@24.10.13) - '@inquirer/type': 3.0.10(@types/node@24.10.13) - mute-stream: 2.0.0 - run-async: 4.0.6 - rxjs: 7.8.2 - optionalDependencies: - '@types/node': 24.10.13 - is-extglob@2.1.1: {} - is-fullwidth-code-point@3.0.0: {} - is-glob@4.0.3: dependencies: is-extglob: 2.1.1 @@ -2498,7 +2263,7 @@ snapshots: ms@2.1.3: {} - mute-stream@2.0.0: {} + mute-stream@3.0.0: {} natural-compare@1.4.0: {} @@ -2567,14 +2332,6 @@ snapshots: resolve-from@4.0.0: {} - run-async@4.0.6: {} - - rxjs@7.8.2: - dependencies: - tslib: 2.8.1 - - safer-buffer@2.1.2: {} - semver@7.7.4: {} shebang-command@2.0.0: @@ -2585,16 +2342,6 @@ snapshots: signal-exit@4.1.0: {} - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - strip-json-comments@3.1.1: {} strnum@2.1.2: {} @@ -2632,14 +2379,6 @@ snapshots: word-wrap@1.2.5: {} - wrap-ansi@6.2.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - yocto-queue@0.1.0: {} - yoctocolors-cjs@2.1.3: {} - zod@4.3.6: {} diff --git a/src/cli.ts b/src/cli.ts index a795911..07667b4 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -23,6 +23,10 @@ try { } catch (error) { if (error instanceof Error) { + // https://github.com/SBoudrias/Inquirer.js/blob/main/packages/prompts/README.md#handling-ctrlc-gracefully + if (error.name === 'ExitPromptError') { + process.exit(0) + } console.error(`Error: ${error.name} ${error.message}`) } else { diff --git a/src/commands/auth.ts b/src/commands/auth.ts index e9b2410..fb2e8eb 100644 --- a/src/commands/auth.ts +++ b/src/commands/auth.ts @@ -1,5 +1,6 @@ import { Command } from 'commander' -import inquirer from 'inquirer' +import promptInput from '@inquirer/input' +import promptPassword from '@inquirer/password' import { writeCredentials } from '../keyring.js' const SUMMARY = 'Authenticate and store AWS credentials securely' @@ -13,11 +14,15 @@ export function authCommand(program: Command) { .summary(SUMMARY) .description(DESCRIPTION) .action(async () => { - const answers = await inquirer.prompt([ - { default: 'eu-central-1', message: 'AWS Region:', name: 'region', type: 'input' }, - { message: 'AWS Access Key ID:', name: 'accessKeyId', required: true, type: 'input' }, - { message: 'AWS Secret Access Key:', name: 'secretAccessKey', type: 'password' }, - ]) + const answers = { + region: await promptInput({ message: 'AWS Region:', default: 'eu-central-1' }), + accessKeyId: await promptInput({ message: 'AWS Access Key ID:', required: true }), + secretAccessKey: await promptPassword({ + message: 'AWS Secret Access Key:', + validate: v => v !== '' || 'Key is required', + mask: true, + }), + } writeCredentials(answers) console.log('✅ Credentials securely stored in system keyring') diff --git a/src/commands/put.ts b/src/commands/put.ts index 5c8dd0e..50af16c 100644 --- a/src/commands/put.ts +++ b/src/commands/put.ts @@ -1,4 +1,5 @@ import { Command } from 'commander' +import promptPassword from '@inquirer/password' import { putParameter } from '../aws.js' const SUMMARY = 'Add or update a parameter' @@ -15,8 +16,15 @@ export function putCommand(program: Command) { .description(DESCRIPTION) .argument('', 'SSM path, e.g. some/path') .argument('', 'Parameter name, e.g. param') - .argument('', 'Value to store') - .action(async (path: string, name: string, value: string) => { + .argument('[value]', 'Value to store') + .action(async (path: string, name: string, argValue: string | undefined) => { + // Value can be prompted interactively to avoid saving + // sensitive data in shell history + let value = argValue ?? await promptPassword({ message: 'Value to store:', mask: true }) + if (typeof value !== 'string') { + program.error('Value is required') + } + const version = await putParameter(path, name, value) let message = '✅ Parameter stored'