@mtndev/cli 0.0.0-dev-20260626045346 → 0.0.0-pr-20-20261020022402
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +86 -1
- package/cjs/__chunks/2FSYDFUV.cjs +146 -0
- package/cjs/__chunks/3A5ZYU5M.cjs +105 -0
- package/cjs/__chunks/3NOHGUCF.cjs +9 -0
- package/cjs/__chunks/3T2LXW7J.cjs +387 -0
- package/cjs/__chunks/4XT5JEAS.cjs +1 -0
- package/cjs/__chunks/AZEB4H4I.cjs +208 -0
- package/cjs/__chunks/B5ENMOCD.cjs +288 -0
- package/cjs/__chunks/B6XM5KSF.cjs +338 -0
- package/cjs/__chunks/BDU2UCE5.cjs +1 -0
- package/cjs/__chunks/BLMSMR5E.cjs +46 -0
- package/cjs/__chunks/CMUD7LLN.cjs +47 -0
- package/cjs/__chunks/DTQ2LB3I.cjs +49 -0
- package/cjs/__chunks/FM5MVRQF.cjs +23 -0
- package/cjs/__chunks/FRHST54J.cjs +135 -0
- package/cjs/__chunks/FU4VP2LN.cjs +1 -0
- package/cjs/__chunks/G5K4PVIL.cjs +26 -0
- package/cjs/__chunks/{NSRFG4DF.cjs → GU3R54MK.cjs} +45 -18
- package/cjs/__chunks/GUL36IFZ.cjs +61 -0
- package/cjs/__chunks/GZMTNK5N.cjs +1 -0
- package/cjs/__chunks/H74JSDBU.cjs +30 -0
- package/cjs/__chunks/{EMMC33QA.cjs → JB7T7PKQ.cjs} +170 -33
- package/cjs/__chunks/JSL2JDMW.cjs +1 -0
- package/cjs/__chunks/K4QNHRTP.cjs +163 -0
- package/cjs/__chunks/KU76LC42.cjs +192 -0
- package/cjs/__chunks/LFDSHANP.cjs +34 -0
- package/cjs/__chunks/LHE24ECK.cjs +192 -0
- package/cjs/__chunks/LIKQ3SI4.cjs +1 -0
- package/cjs/__chunks/LXDF5QVZ.cjs +313 -0
- package/cjs/__chunks/LXOOJR2R.cjs +74 -0
- package/cjs/__chunks/N5MXFOQZ.cjs +167 -0
- package/cjs/__chunks/N7D56LPP.cjs +25 -0
- package/cjs/__chunks/NFXQNOQH.cjs +393 -0
- package/cjs/__chunks/NLKJIUEX.cjs +126 -0
- package/cjs/__chunks/NT2XXAI6.cjs +89 -0
- package/cjs/__chunks/NWZGFHKH.cjs +121 -0
- package/cjs/__chunks/R3GUC7O7.cjs +110 -0
- package/cjs/__chunks/RPVAXPJ4.cjs +1 -0
- package/cjs/__chunks/S3LVCWPN.cjs +23 -0
- package/cjs/__chunks/SBBNW2BF.cjs +249 -0
- package/cjs/__chunks/T2A7TN4F.cjs +81 -0
- package/cjs/__chunks/TKNNDDIB.cjs +97 -0
- package/cjs/__chunks/TNSRDJPR.cjs +1 -0
- package/cjs/__chunks/UWHPE2GI.cjs +20 -0
- package/cjs/__chunks/W6K7BV74.cjs +1 -0
- package/cjs/__chunks/WBOQ6AUN.cjs +320 -0
- package/cjs/__chunks/WHGN5PZI.cjs +299 -0
- package/cjs/__chunks/WOYF2L6T.cjs +11 -0
- package/cjs/__chunks/X26XY2N6.cjs +18 -0
- package/cjs/__chunks/XMKOKRXZ.cjs +16 -0
- package/cjs/__chunks/XTJPQ3EX.cjs +1 -0
- package/cjs/__chunks/YRHFKTW2.cjs +63 -0
- package/cjs/commands/aws/ec2/allow-ip/handler.cjs +12 -0
- package/cjs/commands/aws/ec2/allow-ip/handler.d.ts +6 -0
- package/cjs/commands/aws/ec2/allow-ip/index.cjs +55 -0
- package/cjs/commands/aws/ec2/allow-ip/index.d.ts +3 -0
- package/cjs/commands/aws/ec2/allow-ip/schema.cjs +13 -0
- package/cjs/commands/aws/ec2/allow-ip/schema.d.ts +33 -0
- package/cjs/commands/aws/ec2/allow-ip/utils.cjs +39 -0
- package/cjs/commands/aws/ec2/allow-ip/utils.d.ts +189 -0
- package/cjs/commands/aws/iam/admin-group.cjs +15 -0
- package/cjs/commands/aws/iam/admin-group.d.ts +55 -0
- package/cjs/commands/aws/iam/break-glass/handler.cjs +12 -0
- package/cjs/commands/aws/iam/break-glass/handler.d.ts +7 -0
- package/cjs/commands/aws/iam/break-glass/index.cjs +19 -0
- package/cjs/commands/aws/iam/break-glass/index.d.ts +2 -0
- package/cjs/commands/aws/iam/break-glass/schema.cjs +12 -0
- package/cjs/commands/aws/iam/break-glass/schema.d.ts +25 -0
- package/cjs/commands/aws/iam/check-admin/handler.cjs +10 -0
- package/cjs/commands/aws/iam/check-admin/handler.d.ts +5 -0
- package/cjs/commands/aws/iam/check-admin/index.cjs +17 -0
- package/cjs/commands/aws/iam/check-admin/index.d.ts +2 -0
- package/cjs/commands/aws/iam/check-admin/schema.cjs +12 -0
- package/cjs/commands/aws/iam/check-admin/schema.d.ts +19 -0
- package/cjs/commands/aws/iam/policies/s3-restrictions-deny-non-s3-services.cjs +28 -0
- package/cjs/commands/aws/iam/policies/sts-federation.cjs +19 -0
- package/cjs/commands/aws/iam/policies/user-admins-deny-list.cjs +183 -0
- package/cjs/commands/aws/iam/policies/user-admins-deny-regions-list.cjs +49 -0
- package/cjs/commands/aws/iam/policies/user-admins-self-service-iam.cjs +64 -0
- package/cjs/commands/aws/iam/policies/user-admins-write-list.cjs +125 -0
- package/cjs/commands/aws/iam/remove-admin/handler.cjs +11 -0
- package/cjs/commands/aws/iam/remove-admin/handler.d.ts +6 -0
- package/cjs/commands/aws/iam/remove-admin/index.cjs +18 -0
- package/cjs/commands/aws/iam/remove-admin/index.d.ts +2 -0
- package/cjs/commands/aws/iam/remove-admin/schema.cjs +12 -0
- package/cjs/commands/aws/iam/remove-admin/schema.d.ts +28 -0
- package/cjs/commands/aws/iam/setup-acl/handler.cjs +14 -0
- package/cjs/commands/aws/iam/setup-acl/handler.d.ts +6 -0
- package/cjs/commands/aws/iam/setup-acl/index.cjs +33 -0
- package/cjs/commands/aws/iam/setup-acl/index.d.ts +3 -0
- package/cjs/commands/aws/iam/setup-acl/schema.cjs +7 -0
- package/cjs/commands/aws/iam/setup-acl/schema.d.ts +24 -0
- package/cjs/commands/aws/iam/setup-acl/utils.cjs +20 -0
- package/cjs/commands/aws/iam/setup-acl/utils.d.ts +61 -0
- package/cjs/commands/aws/iam/users/handler.cjs +12 -0
- package/cjs/commands/aws/iam/users/handler.d.ts +5 -0
- package/cjs/commands/aws/iam/users/index.cjs +41 -0
- package/cjs/commands/aws/iam/users/index.d.ts +3 -0
- package/cjs/commands/aws/iam/users/schema.cjs +7 -0
- package/cjs/commands/aws/iam/users/schema.d.ts +18 -0
- package/cjs/commands/aws/iam/users/utils.cjs +30 -0
- package/cjs/commands/aws/iam/users/utils.d.ts +119 -0
- package/cjs/commands/aws/index.cjs +229 -0
- package/cjs/commands/aws/index.d.ts +14 -0
- package/cjs/commands/aws/route53/add-record/handler.cjs +18 -0
- package/cjs/commands/aws/route53/add-record/handler.d.ts +36 -0
- package/cjs/commands/aws/route53/add-record/index.cjs +57 -0
- package/cjs/commands/aws/route53/add-record/index.d.ts +3 -0
- package/cjs/commands/aws/route53/add-record/schema.cjs +11 -0
- package/cjs/commands/aws/route53/add-record/schema.d.ts +45 -0
- package/cjs/commands/aws/route53/add-record/utils.cjs +37 -0
- package/cjs/commands/aws/route53/add-record/utils.d.ts +216 -0
- package/cjs/commands/aws/route53/remove-record/handler.cjs +14 -0
- package/cjs/commands/aws/route53/remove-record/handler.d.ts +6 -0
- package/cjs/commands/aws/route53/remove-record/index.cjs +18 -0
- package/cjs/commands/aws/route53/remove-record/index.d.ts +2 -0
- package/cjs/commands/aws/route53/remove-record/schema.cjs +8 -0
- package/cjs/commands/aws/route53/remove-record/schema.d.ts +30 -0
- package/cjs/commands/aws/schema.cjs +10 -0
- package/cjs/commands/aws/schema.d.ts +13 -0
- package/cjs/commands/aws/ses/send-email/handler.cjs +12 -0
- package/cjs/commands/aws/ses/send-email/handler.d.ts +5 -0
- package/cjs/commands/aws/ses/send-email/index.cjs +23 -0
- package/cjs/commands/aws/ses/send-email/index.d.ts +3 -0
- package/cjs/commands/aws/ses/send-email/schema.cjs +7 -0
- package/cjs/commands/aws/ses/send-email/schema.d.ts +39 -0
- package/cjs/commands/aws/ses/send-email/utils.cjs +11 -0
- package/cjs/commands/aws/ses/send-email/utils.d.ts +47 -0
- package/cjs/commands/aws/ses/smtp-password.cjs +10 -0
- package/cjs/commands/aws/ses/smtp-password.d.ts +21 -0
- package/cjs/commands/aws/utils/exec-aws.cjs +16 -0
- package/cjs/commands/aws/utils/exec-aws.d.ts +79 -0
- package/cjs/commands/aws/utils/resolve-policy-path.cjs +6 -0
- package/cjs/commands/aws/utils/resolve-policy-path.d.ts +8 -0
- package/cjs/commands/aws/utils/resolve-profile.cjs +11 -0
- package/cjs/commands/aws/utils/resolve-profile.d.ts +28 -0
- package/cjs/commands/aws/utils/tty.cjs +10 -0
- package/cjs/commands/aws/utils/tty.d.ts +24 -0
- package/cjs/commands/db/create-readonly-user/handler.cjs +11 -0
- package/cjs/commands/db/create-readonly-user/handler.d.ts +5 -0
- package/cjs/commands/db/create-readonly-user/index.cjs +40 -0
- package/cjs/commands/db/create-readonly-user/index.d.ts +3 -0
- package/cjs/commands/db/create-readonly-user/mysql.cjs +9 -0
- package/cjs/commands/db/create-readonly-user/mysql.d.ts +33 -0
- package/cjs/commands/db/create-readonly-user/postgres.cjs +9 -0
- package/cjs/commands/db/create-readonly-user/postgres.d.ts +31 -0
- package/cjs/commands/db/create-readonly-user/schema.cjs +12 -0
- package/cjs/commands/db/create-readonly-user/schema.d.ts +55 -0
- package/cjs/commands/db/create-readonly-user/utils.cjs +22 -0
- package/cjs/commands/db/create-readonly-user/utils.d.ts +112 -0
- package/cjs/commands/db/index.cjs +44 -0
- package/cjs/commands/db/index.d.ts +6 -0
- package/cjs/commands/doppler/handler.cjs +6 -4
- package/cjs/commands/doppler/index.cjs +32 -5
- package/cjs/commands/doppler/index.d.ts +1 -0
- package/cjs/commands/doppler/schema.cjs +10 -2
- package/cjs/commands/doppler/schema.d.ts +233 -17
- package/cjs/commands/doppler/set-secret.cjs +19 -0
- package/cjs/commands/doppler/set-secret.d.ts +113 -0
- package/cjs/commands/doppler/utils.cjs +6 -2
- package/cjs/commands/doppler/utils.d.ts +32 -8
- package/cjs/commands/icons/schema.d.ts +1 -1
- package/cjs/commands/index.cjs +91 -12
- package/esm/__chunks/2FTTEFEK.js +97 -0
- package/esm/__chunks/33UYMUQD.js +338 -0
- package/esm/__chunks/3BKWTHLJ.js +25 -0
- package/esm/__chunks/3HE4BEJX.js +105 -0
- package/esm/__chunks/3QLI5BDL.js +387 -0
- package/esm/__chunks/5GIUAFXL.js +89 -0
- package/esm/__chunks/73BJG53F.js +11 -0
- package/esm/__chunks/7VF4Q43Q.js +0 -0
- package/esm/__chunks/AEDEAYF5.js +0 -0
- package/esm/__chunks/AZCP3SFJ.js +0 -0
- package/esm/__chunks/B2DVQ2UL.js +61 -0
- package/esm/__chunks/CVQVHLW5.js +0 -0
- package/esm/__chunks/D62SPZXC.js +0 -0
- package/esm/__chunks/DLEJ25GZ.js +121 -0
- package/esm/__chunks/DMYFNF54.js +192 -0
- package/esm/__chunks/DNFTUMGD.js +23 -0
- package/esm/__chunks/DVKD6YSR.js +49 -0
- package/esm/__chunks/EMSH4P76.js +20 -0
- package/esm/__chunks/FFKFVMIE.js +167 -0
- package/esm/__chunks/FNXUONAV.js +110 -0
- package/esm/__chunks/G4NJHFFU.js +320 -0
- package/esm/__chunks/IEOGAQYI.js +46 -0
- package/esm/__chunks/IZFGBYGE.js +34 -0
- package/esm/__chunks/J34UVKLA.js +26 -0
- package/esm/__chunks/JZPBBBIG.js +74 -0
- package/esm/__chunks/KWUJP5MG.js +135 -0
- package/esm/__chunks/M35URMT4.js +313 -0
- package/esm/__chunks/NF3M2L6C.js +81 -0
- package/esm/__chunks/PNPPDYKC.js +299 -0
- package/esm/__chunks/QFXN4EHM.js +393 -0
- package/esm/__chunks/QKDDLIWD.js +146 -0
- package/esm/__chunks/QSE66AKY.js +208 -0
- package/esm/__chunks/QUF7PS4R.js +18 -0
- package/esm/__chunks/S7IJPJ4R.js +126 -0
- package/esm/__chunks/SD3E3EPH.js +163 -0
- package/esm/__chunks/T3TTUHTW.js +30 -0
- package/esm/__chunks/TIOVE6HR.js +0 -0
- package/esm/__chunks/TXKMEIDQ.js +0 -0
- package/esm/__chunks/U7HAE2RF.js +288 -0
- package/esm/__chunks/UXWY7BYE.js +63 -0
- package/esm/__chunks/VKAKISRG.js +192 -0
- package/esm/__chunks/WD2YR6I7.js +0 -0
- package/esm/__chunks/WOZFZKFY.js +0 -0
- package/esm/__chunks/XI7GZDE2.js +0 -0
- package/esm/__chunks/XOUWDB3T.js +249 -0
- package/esm/__chunks/XQN2TA4S.js +23 -0
- package/esm/__chunks/XXK32TIM.js +16 -0
- package/esm/__chunks/{O262GK4B.js → YGWTVPZE.js} +164 -27
- package/esm/__chunks/{6L5RNR7G.js → YRG7PT33.js} +44 -17
- package/esm/__chunks/ZHKVJO2U.js +47 -0
- package/esm/__chunks/ZO55YUSY.js +9 -0
- package/esm/commands/aws/ec2/allow-ip/handler.d.ts +6 -0
- package/esm/commands/aws/ec2/allow-ip/handler.js +12 -0
- package/esm/commands/aws/ec2/allow-ip/index.d.ts +3 -0
- package/esm/commands/aws/ec2/allow-ip/index.js +55 -0
- package/esm/commands/aws/ec2/allow-ip/schema.d.ts +33 -0
- package/esm/commands/aws/ec2/allow-ip/schema.js +13 -0
- package/esm/commands/aws/ec2/allow-ip/utils.d.ts +189 -0
- package/esm/commands/aws/ec2/allow-ip/utils.js +39 -0
- package/esm/commands/aws/iam/admin-group.d.ts +55 -0
- package/esm/commands/aws/iam/admin-group.js +15 -0
- package/esm/commands/aws/iam/break-glass/handler.d.ts +7 -0
- package/esm/commands/aws/iam/break-glass/handler.js +12 -0
- package/esm/commands/aws/iam/break-glass/index.d.ts +2 -0
- package/esm/commands/aws/iam/break-glass/index.js +19 -0
- package/esm/commands/aws/iam/break-glass/schema.d.ts +25 -0
- package/esm/commands/aws/iam/break-glass/schema.js +12 -0
- package/esm/commands/aws/iam/check-admin/handler.d.ts +5 -0
- package/esm/commands/aws/iam/check-admin/handler.js +10 -0
- package/esm/commands/aws/iam/check-admin/index.d.ts +2 -0
- package/esm/commands/aws/iam/check-admin/index.js +17 -0
- package/esm/commands/aws/iam/check-admin/schema.d.ts +19 -0
- package/esm/commands/aws/iam/check-admin/schema.js +12 -0
- package/esm/commands/aws/iam/policies/s3-restrictions-deny-non-s3-services.js +28 -0
- package/esm/commands/aws/iam/policies/sts-federation.js +19 -0
- package/esm/commands/aws/iam/policies/user-admins-deny-list.js +183 -0
- package/esm/commands/aws/iam/policies/user-admins-deny-regions-list.js +49 -0
- package/esm/commands/aws/iam/policies/user-admins-self-service-iam.js +64 -0
- package/esm/commands/aws/iam/policies/user-admins-write-list.js +125 -0
- package/esm/commands/aws/iam/remove-admin/handler.d.ts +6 -0
- package/esm/commands/aws/iam/remove-admin/handler.js +11 -0
- package/esm/commands/aws/iam/remove-admin/index.d.ts +2 -0
- package/esm/commands/aws/iam/remove-admin/index.js +18 -0
- package/esm/commands/aws/iam/remove-admin/schema.d.ts +28 -0
- package/esm/commands/aws/iam/remove-admin/schema.js +12 -0
- package/esm/commands/aws/iam/setup-acl/handler.d.ts +6 -0
- package/esm/commands/aws/iam/setup-acl/handler.js +14 -0
- package/esm/commands/aws/iam/setup-acl/index.d.ts +3 -0
- package/esm/commands/aws/iam/setup-acl/index.js +33 -0
- package/esm/commands/aws/iam/setup-acl/schema.d.ts +24 -0
- package/esm/commands/aws/iam/setup-acl/schema.js +7 -0
- package/esm/commands/aws/iam/setup-acl/utils.d.ts +61 -0
- package/esm/commands/aws/iam/setup-acl/utils.js +20 -0
- package/esm/commands/aws/iam/users/handler.d.ts +5 -0
- package/esm/commands/aws/iam/users/handler.js +12 -0
- package/esm/commands/aws/iam/users/index.d.ts +3 -0
- package/esm/commands/aws/iam/users/index.js +41 -0
- package/esm/commands/aws/iam/users/schema.d.ts +18 -0
- package/esm/commands/aws/iam/users/schema.js +7 -0
- package/esm/commands/aws/iam/users/utils.d.ts +119 -0
- package/esm/commands/aws/iam/users/utils.js +30 -0
- package/esm/commands/aws/index.d.ts +14 -0
- package/esm/commands/aws/index.js +229 -0
- package/esm/commands/aws/route53/add-record/handler.d.ts +36 -0
- package/esm/commands/aws/route53/add-record/handler.js +18 -0
- package/esm/commands/aws/route53/add-record/index.d.ts +3 -0
- package/esm/commands/aws/route53/add-record/index.js +57 -0
- package/esm/commands/aws/route53/add-record/schema.d.ts +45 -0
- package/esm/commands/aws/route53/add-record/schema.js +11 -0
- package/esm/commands/aws/route53/add-record/utils.d.ts +216 -0
- package/esm/commands/aws/route53/add-record/utils.js +37 -0
- package/esm/commands/aws/route53/remove-record/handler.d.ts +6 -0
- package/esm/commands/aws/route53/remove-record/handler.js +14 -0
- package/esm/commands/aws/route53/remove-record/index.d.ts +2 -0
- package/esm/commands/aws/route53/remove-record/index.js +18 -0
- package/esm/commands/aws/route53/remove-record/schema.d.ts +30 -0
- package/esm/commands/aws/route53/remove-record/schema.js +8 -0
- package/esm/commands/aws/schema.d.ts +13 -0
- package/esm/commands/aws/schema.js +10 -0
- package/esm/commands/aws/ses/send-email/handler.d.ts +5 -0
- package/esm/commands/aws/ses/send-email/handler.js +12 -0
- package/esm/commands/aws/ses/send-email/index.d.ts +3 -0
- package/esm/commands/aws/ses/send-email/index.js +23 -0
- package/esm/commands/aws/ses/send-email/schema.d.ts +39 -0
- package/esm/commands/aws/ses/send-email/schema.js +7 -0
- package/esm/commands/aws/ses/send-email/utils.d.ts +47 -0
- package/esm/commands/aws/ses/send-email/utils.js +11 -0
- package/esm/commands/aws/ses/smtp-password.d.ts +21 -0
- package/esm/commands/aws/ses/smtp-password.js +10 -0
- package/esm/commands/aws/utils/exec-aws.d.ts +79 -0
- package/esm/commands/aws/utils/exec-aws.js +16 -0
- package/esm/commands/aws/utils/resolve-policy-path.d.ts +8 -0
- package/esm/commands/aws/utils/resolve-policy-path.js +6 -0
- package/esm/commands/aws/utils/resolve-profile.d.ts +28 -0
- package/esm/commands/aws/utils/resolve-profile.js +11 -0
- package/esm/commands/aws/utils/tty.d.ts +24 -0
- package/esm/commands/aws/utils/tty.js +10 -0
- package/esm/commands/db/create-readonly-user/handler.d.ts +5 -0
- package/esm/commands/db/create-readonly-user/handler.js +11 -0
- package/esm/commands/db/create-readonly-user/index.d.ts +3 -0
- package/esm/commands/db/create-readonly-user/index.js +40 -0
- package/esm/commands/db/create-readonly-user/mysql.d.ts +33 -0
- package/esm/commands/db/create-readonly-user/mysql.js +9 -0
- package/esm/commands/db/create-readonly-user/postgres.d.ts +31 -0
- package/esm/commands/db/create-readonly-user/postgres.js +9 -0
- package/esm/commands/db/create-readonly-user/schema.d.ts +55 -0
- package/esm/commands/db/create-readonly-user/schema.js +12 -0
- package/esm/commands/db/create-readonly-user/utils.d.ts +112 -0
- package/esm/commands/db/create-readonly-user/utils.js +22 -0
- package/esm/commands/db/index.d.ts +6 -0
- package/esm/commands/db/index.js +44 -0
- package/esm/commands/doppler/handler.js +5 -3
- package/esm/commands/doppler/index.d.ts +1 -0
- package/esm/commands/doppler/index.js +32 -5
- package/esm/commands/doppler/schema.d.ts +233 -17
- package/esm/commands/doppler/schema.js +11 -3
- package/esm/commands/doppler/set-secret.d.ts +113 -0
- package/esm/commands/doppler/set-secret.js +19 -0
- package/esm/commands/doppler/utils.d.ts +32 -8
- package/esm/commands/doppler/utils.js +5 -1
- package/esm/commands/icons/schema.d.ts +1 -1
- package/esm/commands/index.js +86 -7
- package/package.json +13 -3
- package/vitest.config.ts +11 -0
- package/cjs/__chunks/4GFJUCSP.cjs +0 -52
- package/esm/__chunks/X3R5PSWH.js +0 -52
- /package/cjs/__chunks/{WNJ3ZYLI.cjs → 3BY5Y4W7.cjs} +0 -0
- /package/esm/__chunks/{46HGXFME.js → 5ZBVGSOK.js} +0 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import {
|
|
2
|
+
execDoppler
|
|
3
|
+
} from "./YGWTVPZE.js";
|
|
4
|
+
import {
|
|
5
|
+
prompt,
|
|
6
|
+
promptChoice,
|
|
7
|
+
promptYesNo
|
|
8
|
+
} from "./ZHKVJO2U.js";
|
|
9
|
+
|
|
10
|
+
// src/commands/doppler/set-secret.js
|
|
11
|
+
import { spawnSync } from "child_process";
|
|
12
|
+
import chalk from "chalk";
|
|
13
|
+
function listProjects(params = {}) {
|
|
14
|
+
const { verbose = false, limit = 500 } = params;
|
|
15
|
+
const projects = [];
|
|
16
|
+
let page = 1;
|
|
17
|
+
while (projects.length < limit) {
|
|
18
|
+
const batch = execDoppler(
|
|
19
|
+
["projects", "--json", "--page", String(page), "--number", "100"],
|
|
20
|
+
"json",
|
|
21
|
+
true,
|
|
22
|
+
verbose
|
|
23
|
+
);
|
|
24
|
+
if (!Array.isArray(batch) || batch.length === 0) {
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
for (const raw of batch) {
|
|
28
|
+
projects.push({
|
|
29
|
+
id: String(raw.id ?? raw.name ?? ""),
|
|
30
|
+
name: String(raw.name ?? raw.id ?? ""),
|
|
31
|
+
description: raw.description ? String(raw.description) : ""
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
if (batch.length < 100) {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
page += 1;
|
|
38
|
+
}
|
|
39
|
+
return projects.filter((project) => project.name).sort((a, b) => a.name.localeCompare(b.name));
|
|
40
|
+
}
|
|
41
|
+
function listEnvironments(params) {
|
|
42
|
+
const { project, verbose = false } = params;
|
|
43
|
+
const data = execDoppler(
|
|
44
|
+
["environments", "--json", "--project", project],
|
|
45
|
+
"json",
|
|
46
|
+
true,
|
|
47
|
+
verbose
|
|
48
|
+
);
|
|
49
|
+
if (!Array.isArray(data)) {
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
return data.map((raw) => ({
|
|
53
|
+
id: String(raw.id ?? ""),
|
|
54
|
+
name: String(raw.name ?? raw.id ?? "")
|
|
55
|
+
})).filter((env) => env.id).sort((a, b) => a.id.localeCompare(b.id));
|
|
56
|
+
}
|
|
57
|
+
function listConfigs(params) {
|
|
58
|
+
const { project, environment, verbose = false } = params;
|
|
59
|
+
const args = ["configs", "--json", "--project", project];
|
|
60
|
+
if (environment) {
|
|
61
|
+
args.push("--environment", environment);
|
|
62
|
+
}
|
|
63
|
+
const data = execDoppler(args, "json", true, verbose);
|
|
64
|
+
if (!Array.isArray(data)) {
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
return data.map((raw) => ({
|
|
68
|
+
name: String(raw.name ?? ""),
|
|
69
|
+
environment: String(raw.environment ?? ""),
|
|
70
|
+
root: Boolean(raw.root)
|
|
71
|
+
})).filter((config) => config.name).sort((a, b) => a.name.localeCompare(b.name));
|
|
72
|
+
}
|
|
73
|
+
function getSecret(params) {
|
|
74
|
+
const { project, config, name, verbose = false } = params;
|
|
75
|
+
try {
|
|
76
|
+
const data = execDoppler(
|
|
77
|
+
[
|
|
78
|
+
"secrets",
|
|
79
|
+
"get",
|
|
80
|
+
name,
|
|
81
|
+
"--project",
|
|
82
|
+
project,
|
|
83
|
+
"--config",
|
|
84
|
+
config,
|
|
85
|
+
"--plain",
|
|
86
|
+
"--raw"
|
|
87
|
+
],
|
|
88
|
+
"string",
|
|
89
|
+
true,
|
|
90
|
+
verbose
|
|
91
|
+
);
|
|
92
|
+
if (typeof data !== "string") {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
const value = data.replace(/\n$/, "");
|
|
96
|
+
return value.length > 0 ? value : "";
|
|
97
|
+
} catch {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function setSecret(params) {
|
|
102
|
+
const { project, config, name, value, verbose = false } = params;
|
|
103
|
+
const args = [
|
|
104
|
+
"secrets",
|
|
105
|
+
"set",
|
|
106
|
+
name,
|
|
107
|
+
"--project",
|
|
108
|
+
project,
|
|
109
|
+
"--config",
|
|
110
|
+
config,
|
|
111
|
+
"--no-interactive"
|
|
112
|
+
];
|
|
113
|
+
if (verbose) {
|
|
114
|
+
console.log(
|
|
115
|
+
chalk.gray(
|
|
116
|
+
` Executing: doppler ${args.join(" ")} <stdin value (${value.length} chars)>`
|
|
117
|
+
)
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
const result = spawnSync("doppler", args, {
|
|
121
|
+
encoding: "utf-8",
|
|
122
|
+
input: value
|
|
123
|
+
});
|
|
124
|
+
if (result.error) {
|
|
125
|
+
throw new Error(result.error.message);
|
|
126
|
+
}
|
|
127
|
+
if (result.status !== 0) {
|
|
128
|
+
const stderr = (result.stderr || result.stdout || "").trim();
|
|
129
|
+
throw new Error(stderr || `doppler secrets set failed for ${name}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async function resolveProject(params) {
|
|
133
|
+
const { projects, projectOption } = params;
|
|
134
|
+
if (projectOption) {
|
|
135
|
+
const match = projects.find(
|
|
136
|
+
(project) => project.name === projectOption || project.id === projectOption
|
|
137
|
+
);
|
|
138
|
+
if (!match) {
|
|
139
|
+
throw new Error(
|
|
140
|
+
`Project "${projectOption}" not found. Available examples: ${projects.slice(0, 8).map((project) => project.name).join(", ")}`
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
return match.name;
|
|
144
|
+
}
|
|
145
|
+
if (projects.length === 0) {
|
|
146
|
+
throw new Error("No Doppler projects found for this account.");
|
|
147
|
+
}
|
|
148
|
+
let candidates = projects;
|
|
149
|
+
if (projects.length > 30) {
|
|
150
|
+
const filter = await prompt(
|
|
151
|
+
` Filter projects (${projects.length} total, Enter for all): `
|
|
152
|
+
);
|
|
153
|
+
if (filter) {
|
|
154
|
+
const lower = filter.toLowerCase();
|
|
155
|
+
candidates = projects.filter(
|
|
156
|
+
(project) => project.name.toLowerCase().includes(lower) || project.id.toLowerCase().includes(lower)
|
|
157
|
+
);
|
|
158
|
+
if (candidates.length === 0) {
|
|
159
|
+
throw new Error(`No projects matched "${filter}".`);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const maxShown = 50;
|
|
164
|
+
const shown = candidates.slice(0, maxShown);
|
|
165
|
+
if (candidates.length > maxShown) {
|
|
166
|
+
console.log(
|
|
167
|
+
chalk.yellow(
|
|
168
|
+
` Showing first ${maxShown} of ${candidates.length} matches \u2014 refine with a filter next time.`
|
|
169
|
+
)
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
const index = await promptChoice({
|
|
173
|
+
message: "Choose a Doppler project:",
|
|
174
|
+
options: shown.map(
|
|
175
|
+
(project) => project.description ? `${project.name} \u2014 ${project.description}` : project.name
|
|
176
|
+
)
|
|
177
|
+
});
|
|
178
|
+
const chosen = shown[index];
|
|
179
|
+
if (!chosen) {
|
|
180
|
+
throw new Error("No project selected");
|
|
181
|
+
}
|
|
182
|
+
return chosen.name;
|
|
183
|
+
}
|
|
184
|
+
async function resolveEnvironment(params) {
|
|
185
|
+
const { environments, environmentOption } = params;
|
|
186
|
+
if (environmentOption) {
|
|
187
|
+
const normalized = environmentOption.trim().toLowerCase();
|
|
188
|
+
if (normalized === "all" || normalized === "*") {
|
|
189
|
+
return "all";
|
|
190
|
+
}
|
|
191
|
+
const match = environments.find(
|
|
192
|
+
(env) => env.id.toLowerCase() === normalized || env.name.toLowerCase() === normalized
|
|
193
|
+
);
|
|
194
|
+
if (!match) {
|
|
195
|
+
throw new Error(
|
|
196
|
+
`Environment "${environmentOption}" not found. Available: ${environments.map((env) => env.id).join(", ")}`
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
return match.id;
|
|
200
|
+
}
|
|
201
|
+
if (environments.length === 0) {
|
|
202
|
+
return "all";
|
|
203
|
+
}
|
|
204
|
+
const options = [
|
|
205
|
+
...environments.map((env) => `${env.id} (${env.name})`),
|
|
206
|
+
"all environments"
|
|
207
|
+
];
|
|
208
|
+
const index = await promptChoice({
|
|
209
|
+
message: "Choose an environment:",
|
|
210
|
+
options
|
|
211
|
+
});
|
|
212
|
+
if (index === options.length - 1) {
|
|
213
|
+
return "all";
|
|
214
|
+
}
|
|
215
|
+
const chosen = environments[index];
|
|
216
|
+
if (!chosen) {
|
|
217
|
+
throw new Error("No environment selected");
|
|
218
|
+
}
|
|
219
|
+
return chosen.id;
|
|
220
|
+
}
|
|
221
|
+
async function resolveConfigs(params) {
|
|
222
|
+
const { configs, configOption, environment } = params;
|
|
223
|
+
const scoped = environment === "all" ? configs : configs.filter((config) => config.environment === environment);
|
|
224
|
+
if (scoped.length === 0) {
|
|
225
|
+
throw new Error(
|
|
226
|
+
environment === "all" ? "No configs found in this project." : `No configs found for environment "${environment}".`
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
if (configOption) {
|
|
230
|
+
const normalized = configOption.trim().toLowerCase();
|
|
231
|
+
if (normalized === "all" || normalized === "*") {
|
|
232
|
+
return scoped.map((config) => config.name);
|
|
233
|
+
}
|
|
234
|
+
const requested = configOption.split(",").map((value) => value.trim());
|
|
235
|
+
const names = new Set(scoped.map((config) => config.name));
|
|
236
|
+
const missing = requested.filter((name) => !names.has(name));
|
|
237
|
+
if (missing.length > 0) {
|
|
238
|
+
throw new Error(
|
|
239
|
+
`Config(s) not found: ${missing.join(", ")}. Available: ${[
|
|
240
|
+
...names
|
|
241
|
+
].join(", ")}`
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
return requested;
|
|
245
|
+
}
|
|
246
|
+
if (scoped.length === 1) {
|
|
247
|
+
const only = scoped[0];
|
|
248
|
+
if (!only) {
|
|
249
|
+
throw new Error("No config selected");
|
|
250
|
+
}
|
|
251
|
+
console.log(` Config: ${only.name}`);
|
|
252
|
+
return [only.name];
|
|
253
|
+
}
|
|
254
|
+
const options = [
|
|
255
|
+
...scoped.map(
|
|
256
|
+
(config) => config.root ? `${config.name} (root, env: ${config.environment})` : `${config.name} (env: ${config.environment})`
|
|
257
|
+
),
|
|
258
|
+
`all configs listed (${scoped.length})`
|
|
259
|
+
];
|
|
260
|
+
const index = await promptChoice({
|
|
261
|
+
message: "Choose a config:",
|
|
262
|
+
options
|
|
263
|
+
});
|
|
264
|
+
if (index === options.length - 1) {
|
|
265
|
+
return scoped.map((config) => config.name);
|
|
266
|
+
}
|
|
267
|
+
const chosen = scoped[index];
|
|
268
|
+
if (!chosen) {
|
|
269
|
+
throw new Error("No config selected");
|
|
270
|
+
}
|
|
271
|
+
return [chosen.name];
|
|
272
|
+
}
|
|
273
|
+
async function resolveSecretName(nameOption) {
|
|
274
|
+
if (nameOption) {
|
|
275
|
+
return nameOption;
|
|
276
|
+
}
|
|
277
|
+
const raw = await prompt(" Secret name (e.g. DATABASE_URL): ");
|
|
278
|
+
if (!raw) {
|
|
279
|
+
throw new Error("Secret name is required");
|
|
280
|
+
}
|
|
281
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(raw)) {
|
|
282
|
+
throw new Error(
|
|
283
|
+
"Secret name must be a valid env var identifier (letters, numbers, underscore)"
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
return raw;
|
|
287
|
+
}
|
|
288
|
+
async function resolveSecretValue(valueOption) {
|
|
289
|
+
if (valueOption !== void 0) {
|
|
290
|
+
return valueOption;
|
|
291
|
+
}
|
|
292
|
+
const raw = await prompt(" Secret value: ");
|
|
293
|
+
if (raw === "") {
|
|
294
|
+
const confirmEmpty = await promptYesNo({
|
|
295
|
+
message: " Set an empty value?",
|
|
296
|
+
defaultYes: false
|
|
297
|
+
});
|
|
298
|
+
if (!confirmEmpty) {
|
|
299
|
+
throw new Error("Secret value is required");
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return raw;
|
|
303
|
+
}
|
|
304
|
+
async function setSecretInteractive(options) {
|
|
305
|
+
const {
|
|
306
|
+
project: projectOption,
|
|
307
|
+
environment: environmentOption,
|
|
308
|
+
config: configOption,
|
|
309
|
+
name: nameOption,
|
|
310
|
+
value: valueOption,
|
|
311
|
+
yes = false,
|
|
312
|
+
verbose = false
|
|
313
|
+
} = options;
|
|
314
|
+
console.log(chalk.blue("\nSet Doppler secret"));
|
|
315
|
+
console.log("");
|
|
316
|
+
const projects = listProjects({ verbose });
|
|
317
|
+
const project = await resolveProject({ projects, projectOption });
|
|
318
|
+
console.log(`Project: ${project}`);
|
|
319
|
+
console.log("");
|
|
320
|
+
const environments = listEnvironments({ project, verbose });
|
|
321
|
+
const environment = await resolveEnvironment({
|
|
322
|
+
environments,
|
|
323
|
+
environmentOption
|
|
324
|
+
});
|
|
325
|
+
console.log(
|
|
326
|
+
environment === "all" ? "Environment: all" : `Environment: ${environment}`
|
|
327
|
+
);
|
|
328
|
+
console.log("");
|
|
329
|
+
const configs = listConfigs({
|
|
330
|
+
project,
|
|
331
|
+
environment: environment === "all" ? void 0 : environment,
|
|
332
|
+
verbose
|
|
333
|
+
});
|
|
334
|
+
const targetConfigs = await resolveConfigs({
|
|
335
|
+
configs,
|
|
336
|
+
configOption,
|
|
337
|
+
environment
|
|
338
|
+
});
|
|
339
|
+
console.log(`Config(s): ${targetConfigs.join(", ")}`);
|
|
340
|
+
console.log("");
|
|
341
|
+
const name = await resolveSecretName(nameOption);
|
|
342
|
+
const value = await resolveSecretValue(valueOption);
|
|
343
|
+
const existingByConfig = [];
|
|
344
|
+
for (const config of targetConfigs) {
|
|
345
|
+
const existing = getSecret({ project, config, name, verbose });
|
|
346
|
+
existingByConfig.push({ config, existing });
|
|
347
|
+
}
|
|
348
|
+
const overwrites = existingByConfig.filter(
|
|
349
|
+
(entry) => entry.existing !== null
|
|
350
|
+
);
|
|
351
|
+
console.log("");
|
|
352
|
+
console.log("Plan:");
|
|
353
|
+
console.log(` Project: ${project}`);
|
|
354
|
+
console.log(` Configs: ${targetConfigs.join(", ")}`);
|
|
355
|
+
console.log(` Name: ${name}`);
|
|
356
|
+
console.log(
|
|
357
|
+
` Value: ${value.length === 0 ? "(empty)" : `(${value.length} chars)`}`
|
|
358
|
+
);
|
|
359
|
+
if (overwrites.length > 0) {
|
|
360
|
+
console.log(
|
|
361
|
+
chalk.yellow(
|
|
362
|
+
` Overwrite: ${overwrites.length} config(s) already have this secret (${overwrites.map((entry) => entry.config).join(", ")})`
|
|
363
|
+
)
|
|
364
|
+
);
|
|
365
|
+
} else {
|
|
366
|
+
console.log(chalk.green(" Overwrite: none (new secret on all targets)"));
|
|
367
|
+
}
|
|
368
|
+
console.log("");
|
|
369
|
+
if (!yes) {
|
|
370
|
+
const confirmed = await promptYesNo({
|
|
371
|
+
message: overwrites.length > 0 ? "Overwrite / set this secret?" : "Set this secret?",
|
|
372
|
+
defaultYes: false
|
|
373
|
+
});
|
|
374
|
+
if (!confirmed) {
|
|
375
|
+
console.log("Aborted.");
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
console.log("");
|
|
379
|
+
}
|
|
380
|
+
for (const config of targetConfigs) {
|
|
381
|
+
setSecret({ project, config, name, value, verbose });
|
|
382
|
+
console.log(chalk.green(` \u2713 set ${name} on ${project}/${config}`));
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export {
|
|
387
|
+
listProjects,
|
|
388
|
+
listEnvironments,
|
|
389
|
+
listConfigs,
|
|
390
|
+
getSecret,
|
|
391
|
+
setSecret,
|
|
392
|
+
setSecretInteractive
|
|
393
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import {
|
|
2
|
+
removeRecordOptionsSchema
|
|
3
|
+
} from "./IZFGBYGE.js";
|
|
4
|
+
import {
|
|
5
|
+
resolveHostedZone,
|
|
6
|
+
resolveName,
|
|
7
|
+
resolveRecordType
|
|
8
|
+
} from "./G4NJHFFU.js";
|
|
9
|
+
import {
|
|
10
|
+
deleteResourceRecordSet,
|
|
11
|
+
formatValues,
|
|
12
|
+
getResourceRecordSet,
|
|
13
|
+
hostedZoneLabel,
|
|
14
|
+
withoutTrailingDot
|
|
15
|
+
} from "./33UYMUQD.js";
|
|
16
|
+
import {
|
|
17
|
+
AwsCliError,
|
|
18
|
+
getCallerIdentity,
|
|
19
|
+
requireCommands
|
|
20
|
+
} from "./FNXUONAV.js";
|
|
21
|
+
import {
|
|
22
|
+
resolveProfile
|
|
23
|
+
} from "./5GIUAFXL.js";
|
|
24
|
+
import {
|
|
25
|
+
promptYesNo
|
|
26
|
+
} from "./ZHKVJO2U.js";
|
|
27
|
+
|
|
28
|
+
// src/commands/aws/route53/remove-record/handler.js
|
|
29
|
+
import chalk from "chalk";
|
|
30
|
+
import { ZodError } from "zod";
|
|
31
|
+
async function removeRecordCommand(options) {
|
|
32
|
+
try {
|
|
33
|
+
const {
|
|
34
|
+
profile: profileOption,
|
|
35
|
+
zone: zoneOption,
|
|
36
|
+
type: typeOption,
|
|
37
|
+
name: nameOption,
|
|
38
|
+
yes,
|
|
39
|
+
dryRun,
|
|
40
|
+
verbose
|
|
41
|
+
} = removeRecordOptionsSchema.parse(options);
|
|
42
|
+
const profile = await resolveProfile({ profile: profileOption });
|
|
43
|
+
if (!profile) {
|
|
44
|
+
console.error(chalk.red("Error: pass --profile or set AWS_PROFILE."));
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
requireCommands(["aws"]);
|
|
48
|
+
const identity = getCallerIdentity({ profile, verbose });
|
|
49
|
+
console.log("Caller:");
|
|
50
|
+
console.log(` Account: ${identity.Account}`);
|
|
51
|
+
console.log(` Arn: ${identity.Arn}`);
|
|
52
|
+
console.log("");
|
|
53
|
+
const zone = await resolveHostedZone({ profile, zoneOption, verbose });
|
|
54
|
+
console.log(`Hosted zone: ${hostedZoneLabel(zone)}`);
|
|
55
|
+
console.log("");
|
|
56
|
+
const type = await resolveRecordType(typeOption);
|
|
57
|
+
const name = await resolveName({ nameOption, zoneName: zone.name });
|
|
58
|
+
const existing = getResourceRecordSet({
|
|
59
|
+
profile,
|
|
60
|
+
hostedZoneId: zone.id,
|
|
61
|
+
name,
|
|
62
|
+
type,
|
|
63
|
+
verbose
|
|
64
|
+
});
|
|
65
|
+
if (!existing) {
|
|
66
|
+
console.log(
|
|
67
|
+
chalk.yellow(
|
|
68
|
+
`No ${type} record at ${withoutTrailingDot(name)}. Nothing to remove.`
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
console.log("Record to remove:");
|
|
74
|
+
console.log(` Name: ${withoutTrailingDot(name)}`);
|
|
75
|
+
console.log(` Type: ${type}`);
|
|
76
|
+
if (existing.isAlias) {
|
|
77
|
+
console.log(
|
|
78
|
+
` Alias: ${withoutTrailingDot(String(existing.aliasTarget?.DNSName ?? ""))}`
|
|
79
|
+
);
|
|
80
|
+
} else {
|
|
81
|
+
if (existing.ttl !== void 0) {
|
|
82
|
+
console.log(` TTL: ${existing.ttl}`);
|
|
83
|
+
}
|
|
84
|
+
console.log(` Value:${formatValues(existing.values)}`);
|
|
85
|
+
}
|
|
86
|
+
console.log("");
|
|
87
|
+
if (dryRun) {
|
|
88
|
+
console.log(chalk.cyan("Dry run \u2014 no changes made."));
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (!yes) {
|
|
92
|
+
const confirmed = await promptYesNo({
|
|
93
|
+
message: `Delete this ${type} record?`,
|
|
94
|
+
defaultYes: false
|
|
95
|
+
});
|
|
96
|
+
if (!confirmed) {
|
|
97
|
+
console.log("Aborted.");
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const changeInfo = deleteResourceRecordSet({
|
|
102
|
+
profile,
|
|
103
|
+
hostedZoneId: zone.id,
|
|
104
|
+
record: existing,
|
|
105
|
+
verbose
|
|
106
|
+
});
|
|
107
|
+
console.log("");
|
|
108
|
+
console.log(
|
|
109
|
+
chalk.green(`Done. Deleted ${type} ${withoutTrailingDot(name)}.`)
|
|
110
|
+
);
|
|
111
|
+
if (changeInfo?.Id) {
|
|
112
|
+
console.log(` Change ID: ${changeInfo.Id}`);
|
|
113
|
+
console.log(` Status: ${changeInfo.Status ?? "PENDING"}`);
|
|
114
|
+
}
|
|
115
|
+
} catch (error) {
|
|
116
|
+
if (error instanceof ZodError) {
|
|
117
|
+
console.error(chalk.red("\n\u274C Invalid command options:"));
|
|
118
|
+
error.errors.forEach((err) => {
|
|
119
|
+
console.error(chalk.red(` ${err.path.join(".")}: ${err.message}`));
|
|
120
|
+
});
|
|
121
|
+
process.exit(1);
|
|
122
|
+
}
|
|
123
|
+
const verbose = (
|
|
124
|
+
/** @type {any} */
|
|
125
|
+
options?.verbose || false
|
|
126
|
+
);
|
|
127
|
+
console.error(chalk.red("\n\u274C remove-record failed:"));
|
|
128
|
+
if (error instanceof AwsCliError || error instanceof Error) {
|
|
129
|
+
console.error(chalk.red(` ${error.message}`));
|
|
130
|
+
if (verbose && error.stack) {
|
|
131
|
+
console.error(chalk.gray("\nStack trace:"));
|
|
132
|
+
console.error(chalk.gray(error.stack));
|
|
133
|
+
}
|
|
134
|
+
} else {
|
|
135
|
+
console.error(chalk.red(` ${String(error)}`));
|
|
136
|
+
}
|
|
137
|
+
console.error(
|
|
138
|
+
chalk.yellow("\n\u{1F4A1} Use --verbose for detailed error information\n")
|
|
139
|
+
);
|
|
140
|
+
process.exit(1);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export {
|
|
145
|
+
removeRecordCommand
|
|
146
|
+
};
|