@mtndev/cli 0.0.0-dev-20260626045221 → 0.0.0-dev-20260914234436
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 +84 -3
- 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/{IEGW3TSF.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/{XK7EMDSU.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 +12 -2
- package/vitest.config.ts +11 -0
- package/cjs/__chunks/MFAORPG6.cjs +0 -52
- package/esm/__chunks/3KUXVWUE.js +0 -52
- /package/cjs/__chunks/{WNJ3ZYLI.cjs → 3BY5Y4W7.cjs} +0 -0
- /package/esm/__chunks/{46HGXFME.js → 5ZBVGSOK.js} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract the AWS service error code from a CLI stderr string.
|
|
3
|
+
* AWS prints codes in parentheses, e.g. "...(UnauthorizedOperation) when calling...".
|
|
4
|
+
* @param {string} stderr
|
|
5
|
+
* @returns {string | null}
|
|
6
|
+
*/
|
|
7
|
+
export function parseAwsErrorCode(stderr: string): string | null;
|
|
8
|
+
/**
|
|
9
|
+
* Verify that the given executables are available on PATH.
|
|
10
|
+
* @param {string[]} commands
|
|
11
|
+
* @throws {Error} If any command is missing
|
|
12
|
+
*/
|
|
13
|
+
export function requireCommands(commands: string[]): void;
|
|
14
|
+
/**
|
|
15
|
+
* Run an AWS CLI command using a credential profile.
|
|
16
|
+
* Uses an argument array (no shell) so JSON arguments need no escaping.
|
|
17
|
+
* @param {{
|
|
18
|
+
* profile?: string;
|
|
19
|
+
* region?: string;
|
|
20
|
+
* args: string[];
|
|
21
|
+
* expectJson?: boolean;
|
|
22
|
+
* verbose?: boolean;
|
|
23
|
+
* env?: Record<string, string>;
|
|
24
|
+
* }} params
|
|
25
|
+
* @returns {any} Parsed JSON when expectJson is true, otherwise trimmed stdout string
|
|
26
|
+
*/
|
|
27
|
+
export function runAws(params: {
|
|
28
|
+
profile?: string;
|
|
29
|
+
region?: string;
|
|
30
|
+
args: string[];
|
|
31
|
+
expectJson?: boolean;
|
|
32
|
+
verbose?: boolean;
|
|
33
|
+
env?: Record<string, string>;
|
|
34
|
+
}): any;
|
|
35
|
+
/**
|
|
36
|
+
* Run an AWS CLI command through `aws-vault exec` for profiles whose credentials
|
|
37
|
+
* are stored in the OS keychain rather than ~/.aws/credentials.
|
|
38
|
+
* @param {{
|
|
39
|
+
* profile: string;
|
|
40
|
+
* args: string[];
|
|
41
|
+
* duration?: string;
|
|
42
|
+
* expectJson?: boolean;
|
|
43
|
+
* verbose?: boolean;
|
|
44
|
+
* }} params
|
|
45
|
+
* @returns {any}
|
|
46
|
+
*/
|
|
47
|
+
export function runAwsVault(params: {
|
|
48
|
+
profile: string;
|
|
49
|
+
args: string[];
|
|
50
|
+
duration?: string;
|
|
51
|
+
expectJson?: boolean;
|
|
52
|
+
verbose?: boolean;
|
|
53
|
+
}): any;
|
|
54
|
+
/**
|
|
55
|
+
* Fetch the caller identity for a profile (account id and ARN).
|
|
56
|
+
* @param {{ profile?: string; region?: string; verbose?: boolean }} params
|
|
57
|
+
* @returns {{ Account: string; Arn: string; UserId: string }}
|
|
58
|
+
*/
|
|
59
|
+
export function getCallerIdentity(params: {
|
|
60
|
+
profile?: string;
|
|
61
|
+
region?: string;
|
|
62
|
+
verbose?: boolean;
|
|
63
|
+
}): {
|
|
64
|
+
Account: string;
|
|
65
|
+
Arn: string;
|
|
66
|
+
UserId: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Error raised when the AWS CLI (or aws-vault) exits non-zero.
|
|
70
|
+
* The `code` is the AWS service error code parsed from stderr (e.g. "UnauthorizedOperation").
|
|
71
|
+
*/
|
|
72
|
+
export class AwsCliError extends Error {
|
|
73
|
+
/**
|
|
74
|
+
* @param {string} message
|
|
75
|
+
* @param {string | null} [code]
|
|
76
|
+
*/
|
|
77
|
+
constructor(message: string, code?: string | null);
|
|
78
|
+
code: string | null;
|
|
79
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the absolute path to a bundled IAM policy document.
|
|
3
|
+
* Policies live alongside the source in `iam/policies/`, and the CLI runs from
|
|
4
|
+
* source, so this path is valid at runtime.
|
|
5
|
+
* @param {string} fileName - Policy JSON file name (e.g. "user-admins-write-list.json")
|
|
6
|
+
* @returns {string}
|
|
7
|
+
*/
|
|
8
|
+
export function resolvePolicyPath(fileName: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _NT2XXAI6cjs = require('../../../__chunks/NT2XXAI6.cjs');
|
|
6
|
+
require('../../../__chunks/CMUD7LLN.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.listConfigProfiles = _NT2XXAI6cjs.listConfigProfiles; exports.pickProfileInteractive = _NT2XXAI6cjs.pickProfileInteractive; exports.resolveProfile = _NT2XXAI6cjs.resolveProfile;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read profile names from ~/.aws/config (honoring AWS_CONFIG_FILE).
|
|
3
|
+
* Handles both `[profile NAME]` entries and a bare `[default]` section.
|
|
4
|
+
* @returns {string[]}
|
|
5
|
+
*/
|
|
6
|
+
export function listConfigProfiles(): string[];
|
|
7
|
+
/**
|
|
8
|
+
* Interactively narrow a profile list by substring, then pick one.
|
|
9
|
+
* A single match auto-selects; too many matches asks the user to narrow.
|
|
10
|
+
* @param {string[]} profiles
|
|
11
|
+
* @returns {Promise<string>}
|
|
12
|
+
*/
|
|
13
|
+
export function pickProfileInteractive(profiles: string[]): Promise<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Resolve the AWS profile for a single-profile command.
|
|
16
|
+
*
|
|
17
|
+
* Precedence: explicit `--profile`, then `AWS_PROFILE`, then — only when stdin
|
|
18
|
+
* is a TTY — an interactive filter-and-pick over `~/.aws/config` profiles.
|
|
19
|
+
* Returns `undefined` when nothing is set and we cannot prompt (non-interactive
|
|
20
|
+
* shell, or no config profiles), leaving each command's existing "no profile"
|
|
21
|
+
* handling in place.
|
|
22
|
+
* @param {{ profile?: string; interactive?: boolean }} params
|
|
23
|
+
* @returns {Promise<string | undefined>}
|
|
24
|
+
*/
|
|
25
|
+
export function resolveProfile(params: {
|
|
26
|
+
profile?: string;
|
|
27
|
+
interactive?: boolean;
|
|
28
|
+
}): Promise<string | undefined>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _CMUD7LLNcjs = require('../../../__chunks/CMUD7LLN.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.prompt = _CMUD7LLNcjs.prompt; exports.promptChoice = _CMUD7LLNcjs.promptChoice; exports.promptYesNo = _CMUD7LLNcjs.promptYesNo;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt for a single line of input.
|
|
3
|
+
* @param {string} message - Prompt text shown to the user
|
|
4
|
+
* @returns {Promise<string>}
|
|
5
|
+
*/
|
|
6
|
+
export function prompt(message: string): Promise<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Prompt the user to pick one option from a numbered list.
|
|
9
|
+
* @param {{ message: string; options: string[] }} params
|
|
10
|
+
* @returns {Promise<number>} Zero-based index of the chosen option
|
|
11
|
+
*/
|
|
12
|
+
export function promptChoice(params: {
|
|
13
|
+
message: string;
|
|
14
|
+
options: string[];
|
|
15
|
+
}): Promise<number>;
|
|
16
|
+
/**
|
|
17
|
+
* Prompt a yes/no question.
|
|
18
|
+
* @param {{ message: string; defaultYes?: boolean }} params
|
|
19
|
+
* @returns {Promise<boolean>}
|
|
20
|
+
*/
|
|
21
|
+
export function promptYesNo(params: {
|
|
22
|
+
message: string;
|
|
23
|
+
defaultYes?: boolean;
|
|
24
|
+
}): Promise<boolean>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _LXDF5QVZcjs = require('../../../__chunks/LXDF5QVZ.cjs');
|
|
4
|
+
require('../../../__chunks/3A5ZYU5M.cjs');
|
|
5
|
+
require('../../../__chunks/K4QNHRTP.cjs');
|
|
6
|
+
require('../../../__chunks/H74JSDBU.cjs');
|
|
7
|
+
require('../../../__chunks/NWZGFHKH.cjs');
|
|
8
|
+
require('../../../__chunks/CMUD7LLN.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.createReadonlyUserCommand = _LXDF5QVZcjs.createReadonlyUserCommand;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../../__chunks/W6K7BV74.cjs');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _LXDF5QVZcjs = require('../../../__chunks/LXDF5QVZ.cjs');
|
|
5
|
+
require('../../../__chunks/3A5ZYU5M.cjs');
|
|
6
|
+
require('../../../__chunks/K4QNHRTP.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _H74JSDBUcjs = require('../../../__chunks/H74JSDBU.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
var _NWZGFHKHcjs = require('../../../__chunks/NWZGFHKH.cjs');
|
|
24
|
+
require('../../../__chunks/CMUD7LLN.cjs');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
exports.DEFAULT_MYSQL_HOST_PATTERN = _H74JSDBUcjs.DEFAULT_MYSQL_HOST_PATTERN; exports.DEFAULT_READONLY_USERNAME = _H74JSDBUcjs.DEFAULT_READONLY_USERNAME; exports.ENGINES = _H74JSDBUcjs.ENGINES; exports.buildReadonlyUrl = _NWZGFHKHcjs.buildReadonlyUrl; exports.createReadonlyUserCommand = _LXDF5QVZcjs.createReadonlyUserCommand; exports.createReadonlyUserOptionsSchema = _H74JSDBUcjs.createReadonlyUserOptionsSchema; exports.detectEngineFromUrl = _NWZGFHKHcjs.detectEngineFromUrl; exports.generatePassword = _NWZGFHKHcjs.generatePassword; exports.isSystemDatabase = _NWZGFHKHcjs.isSystemDatabase; exports.parseConnectionUrl = _NWZGFHKHcjs.parseConnectionUrl; exports.quoteIdent = _NWZGFHKHcjs.quoteIdent; exports.quoteLiteral = _NWZGFHKHcjs.quoteLiteral; exports.resolveAdminUrl = _NWZGFHKHcjs.resolveAdminUrl; exports.resolveSsl = _NWZGFHKHcjs.resolveSsl;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _3A5ZYU5Mcjs = require('../../../__chunks/3A5ZYU5M.cjs');
|
|
5
|
+
require('../../../__chunks/NWZGFHKH.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.applyMysqlReadonly = _3A5ZYU5Mcjs.applyMysqlReadonly; exports.listMysqlDatabases = _3A5ZYU5Mcjs.listMysqlDatabases;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List schemas/databases visible to the admin user (excluding system schemas).
|
|
3
|
+
* @param {ConnectionConfig} config
|
|
4
|
+
* @returns {Promise<string[]>}
|
|
5
|
+
*/
|
|
6
|
+
export function listMysqlDatabases(config: ConnectionConfig): Promise<string[]>;
|
|
7
|
+
/**
|
|
8
|
+
* Create/update a MySQL user and grant SELECT on one database or *.* .
|
|
9
|
+
* @param {{
|
|
10
|
+
* config: ConnectionConfig;
|
|
11
|
+
* username: string;
|
|
12
|
+
* password: string;
|
|
13
|
+
* databases: string[] | "all";
|
|
14
|
+
* hostPattern: string;
|
|
15
|
+
* dryRun?: boolean;
|
|
16
|
+
* verbose?: boolean;
|
|
17
|
+
* }} params
|
|
18
|
+
* @returns {Promise<{ created: boolean; statements: string[]; databases: string[] | "all" }>}
|
|
19
|
+
*/
|
|
20
|
+
export function applyMysqlReadonly(params: {
|
|
21
|
+
config: ConnectionConfig;
|
|
22
|
+
username: string;
|
|
23
|
+
password: string;
|
|
24
|
+
databases: string[] | "all";
|
|
25
|
+
hostPattern: string;
|
|
26
|
+
dryRun?: boolean;
|
|
27
|
+
verbose?: boolean;
|
|
28
|
+
}): Promise<{
|
|
29
|
+
created: boolean;
|
|
30
|
+
statements: string[];
|
|
31
|
+
databases: string[] | "all";
|
|
32
|
+
}>;
|
|
33
|
+
export type ConnectionConfig = import("./utils.js").ConnectionConfig;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _K4QNHRTPcjs = require('../../../__chunks/K4QNHRTP.cjs');
|
|
5
|
+
require('../../../__chunks/NWZGFHKH.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.applyPostgresReadonly = _K4QNHRTPcjs.applyPostgresReadonly; exports.listPostgresDatabases = _K4QNHRTPcjs.listPostgresDatabases;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List non-template databases visible to the admin user.
|
|
3
|
+
* @param {ConnectionConfig} config
|
|
4
|
+
* @returns {Promise<string[]>}
|
|
5
|
+
*/
|
|
6
|
+
export function listPostgresDatabases(config: ConnectionConfig): Promise<string[]>;
|
|
7
|
+
/**
|
|
8
|
+
* Create/update a Postgres role and grant read-only on one or all databases.
|
|
9
|
+
* @param {{
|
|
10
|
+
* config: ConnectionConfig;
|
|
11
|
+
* username: string;
|
|
12
|
+
* password: string;
|
|
13
|
+
* databases: string[];
|
|
14
|
+
* dryRun?: boolean;
|
|
15
|
+
* verbose?: boolean;
|
|
16
|
+
* }} params
|
|
17
|
+
* @returns {Promise<{ created: boolean; statements: string[]; databases: string[] }>}
|
|
18
|
+
*/
|
|
19
|
+
export function applyPostgresReadonly(params: {
|
|
20
|
+
config: ConnectionConfig;
|
|
21
|
+
username: string;
|
|
22
|
+
password: string;
|
|
23
|
+
databases: string[];
|
|
24
|
+
dryRun?: boolean;
|
|
25
|
+
verbose?: boolean;
|
|
26
|
+
}): Promise<{
|
|
27
|
+
created: boolean;
|
|
28
|
+
statements: string[];
|
|
29
|
+
databases: string[];
|
|
30
|
+
}>;
|
|
31
|
+
export type ConnectionConfig = import("./utils.js").ConnectionConfig;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _H74JSDBUcjs = require('../../../__chunks/H74JSDBU.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.DEFAULT_MYSQL_HOST_PATTERN = _H74JSDBUcjs.DEFAULT_MYSQL_HOST_PATTERN; exports.DEFAULT_READONLY_USERNAME = _H74JSDBUcjs.DEFAULT_READONLY_USERNAME; exports.ENGINES = _H74JSDBUcjs.ENGINES; exports.createReadonlyUserOptionsSchema = _H74JSDBUcjs.createReadonlyUserOptionsSchema;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported database engines.
|
|
3
|
+
* @type {readonly ["postgres", "mysql"]}
|
|
4
|
+
*/
|
|
5
|
+
export const ENGINES: readonly ["postgres", "mysql"];
|
|
6
|
+
/**
|
|
7
|
+
* Zod schema for `db create-readonly-user` options.
|
|
8
|
+
*/
|
|
9
|
+
export const createReadonlyUserOptionsSchema: z.ZodObject<{
|
|
10
|
+
engine: z.ZodOptional<z.ZodEnum<["postgres", "mysql"]>>;
|
|
11
|
+
url: z.ZodOptional<z.ZodString>;
|
|
12
|
+
database: z.ZodOptional<z.ZodString>;
|
|
13
|
+
username: z.ZodOptional<z.ZodString>;
|
|
14
|
+
password: z.ZodOptional<z.ZodString>;
|
|
15
|
+
hostPattern: z.ZodOptional<z.ZodString>;
|
|
16
|
+
ssl: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
yes: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
18
|
+
dryRun: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
19
|
+
verbose: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
verbose: boolean;
|
|
22
|
+
yes: boolean;
|
|
23
|
+
dryRun: boolean;
|
|
24
|
+
username?: string | undefined;
|
|
25
|
+
url?: string | undefined;
|
|
26
|
+
engine?: "postgres" | "mysql" | undefined;
|
|
27
|
+
password?: string | undefined;
|
|
28
|
+
database?: string | undefined;
|
|
29
|
+
ssl?: boolean | undefined;
|
|
30
|
+
hostPattern?: string | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
verbose?: boolean | undefined;
|
|
33
|
+
yes?: boolean | undefined;
|
|
34
|
+
dryRun?: boolean | undefined;
|
|
35
|
+
username?: string | undefined;
|
|
36
|
+
url?: string | undefined;
|
|
37
|
+
engine?: "postgres" | "mysql" | undefined;
|
|
38
|
+
password?: string | undefined;
|
|
39
|
+
database?: string | undefined;
|
|
40
|
+
ssl?: boolean | undefined;
|
|
41
|
+
hostPattern?: string | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* @typedef {z.infer<typeof createReadonlyUserOptionsSchema>} CreateReadonlyUserOptions
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* Default username when none is provided.
|
|
48
|
+
*/
|
|
49
|
+
export const DEFAULT_READONLY_USERNAME: "readonly";
|
|
50
|
+
/**
|
|
51
|
+
* Default MySQL host pattern (any client host).
|
|
52
|
+
*/
|
|
53
|
+
export const DEFAULT_MYSQL_HOST_PATTERN: "%";
|
|
54
|
+
export type CreateReadonlyUserOptions = z.infer<typeof createReadonlyUserOptionsSchema>;
|
|
55
|
+
import { z } from "zod";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
var _NWZGFHKHcjs = require('../../../__chunks/NWZGFHKH.cjs');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
exports.buildReadonlyUrl = _NWZGFHKHcjs.buildReadonlyUrl; exports.detectEngineFromUrl = _NWZGFHKHcjs.detectEngineFromUrl; exports.generatePassword = _NWZGFHKHcjs.generatePassword; exports.isSystemDatabase = _NWZGFHKHcjs.isSystemDatabase; exports.parseConnectionUrl = _NWZGFHKHcjs.parseConnectionUrl; exports.quoteIdent = _NWZGFHKHcjs.quoteIdent; exports.quoteLiteral = _NWZGFHKHcjs.quoteLiteral; exports.resolveAdminUrl = _NWZGFHKHcjs.resolveAdminUrl; exports.resolveSsl = _NWZGFHKHcjs.resolveSsl;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {"postgres" | "mysql"} Engine
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {Object} ConnectionConfig
|
|
6
|
+
* @property {Engine} engine
|
|
7
|
+
* @property {string} host
|
|
8
|
+
* @property {number} port
|
|
9
|
+
* @property {string} user
|
|
10
|
+
* @property {string} password
|
|
11
|
+
* @property {string} database
|
|
12
|
+
* @property {boolean | object} ssl
|
|
13
|
+
* @property {string} [url]
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Generate a URL-safe random password.
|
|
17
|
+
* @param {{ length?: number }} [params]
|
|
18
|
+
* @returns {string}
|
|
19
|
+
*/
|
|
20
|
+
export function generatePassword(params?: {
|
|
21
|
+
length?: number;
|
|
22
|
+
}): string;
|
|
23
|
+
/**
|
|
24
|
+
* Detect engine from a connection URL scheme.
|
|
25
|
+
* @param {string} url
|
|
26
|
+
* @returns {Engine | null}
|
|
27
|
+
*/
|
|
28
|
+
export function detectEngineFromUrl(url: string): Engine | null;
|
|
29
|
+
/**
|
|
30
|
+
* Resolve an admin URL from flags / common env vars.
|
|
31
|
+
* @param {{ url?: string; engine?: Engine }} params
|
|
32
|
+
* @returns {string | null}
|
|
33
|
+
*/
|
|
34
|
+
export function resolveAdminUrl(params: {
|
|
35
|
+
url?: string;
|
|
36
|
+
engine?: Engine;
|
|
37
|
+
}): string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Decide SSL settings: remote hosts get loose SSL by default (RDS-friendly).
|
|
40
|
+
* @param {{ host: string; sslOption?: boolean }} params
|
|
41
|
+
* @returns {boolean | object}
|
|
42
|
+
*/
|
|
43
|
+
export function resolveSsl(params: {
|
|
44
|
+
host: string;
|
|
45
|
+
sslOption?: boolean;
|
|
46
|
+
}): boolean | object;
|
|
47
|
+
/**
|
|
48
|
+
* Parse a postgres/mysql connection URL into a config object.
|
|
49
|
+
* @param {{ url: string; engine?: Engine; sslOption?: boolean }} params
|
|
50
|
+
* @returns {ConnectionConfig}
|
|
51
|
+
*/
|
|
52
|
+
export function parseConnectionUrl(params: {
|
|
53
|
+
url: string;
|
|
54
|
+
engine?: Engine;
|
|
55
|
+
sslOption?: boolean;
|
|
56
|
+
}): ConnectionConfig;
|
|
57
|
+
/**
|
|
58
|
+
* Build a client connection URL for the new read-only user.
|
|
59
|
+
* @param {{
|
|
60
|
+
* engine: Engine;
|
|
61
|
+
* host: string;
|
|
62
|
+
* port: number;
|
|
63
|
+
* username: string;
|
|
64
|
+
* password: string;
|
|
65
|
+
* database: string;
|
|
66
|
+
* }} params
|
|
67
|
+
* @returns {string}
|
|
68
|
+
*/
|
|
69
|
+
export function buildReadonlyUrl(params: {
|
|
70
|
+
engine: Engine;
|
|
71
|
+
host: string;
|
|
72
|
+
port: number;
|
|
73
|
+
username: string;
|
|
74
|
+
password: string;
|
|
75
|
+
database: string;
|
|
76
|
+
}): string;
|
|
77
|
+
/**
|
|
78
|
+
* Quote an identifier for the given engine (not for string literals).
|
|
79
|
+
* @param {{ engine: Engine; name: string }} params
|
|
80
|
+
* @returns {string}
|
|
81
|
+
*/
|
|
82
|
+
export function quoteIdent(params: {
|
|
83
|
+
engine: Engine;
|
|
84
|
+
name: string;
|
|
85
|
+
}): string;
|
|
86
|
+
/**
|
|
87
|
+
* Escape a string literal for SQL (single-quote doubling).
|
|
88
|
+
* Prefer parameterized queries when the driver supports them for DDL.
|
|
89
|
+
* @param {string} value
|
|
90
|
+
* @returns {string}
|
|
91
|
+
*/
|
|
92
|
+
export function quoteLiteral(value: string): string;
|
|
93
|
+
/**
|
|
94
|
+
* System / template databases to skip when granting "all".
|
|
95
|
+
* @param {{ engine: Engine; name: string }} params
|
|
96
|
+
* @returns {boolean}
|
|
97
|
+
*/
|
|
98
|
+
export function isSystemDatabase(params: {
|
|
99
|
+
engine: Engine;
|
|
100
|
+
name: string;
|
|
101
|
+
}): boolean;
|
|
102
|
+
export type Engine = "postgres" | "mysql";
|
|
103
|
+
export type ConnectionConfig = {
|
|
104
|
+
engine: Engine;
|
|
105
|
+
host: string;
|
|
106
|
+
port: number;
|
|
107
|
+
user: string;
|
|
108
|
+
password: string;
|
|
109
|
+
database: string;
|
|
110
|
+
ssl: boolean | object;
|
|
111
|
+
url?: string | undefined;
|
|
112
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _DTQ2LB3Icjs = require('../../__chunks/DTQ2LB3I.cjs');
|
|
4
|
+
require('../../__chunks/W6K7BV74.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _LXDF5QVZcjs = require('../../__chunks/LXDF5QVZ.cjs');
|
|
8
|
+
require('../../__chunks/3A5ZYU5M.cjs');
|
|
9
|
+
require('../../__chunks/K4QNHRTP.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _H74JSDBUcjs = require('../../__chunks/H74JSDBU.cjs');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
var _NWZGFHKHcjs = require('../../__chunks/NWZGFHKH.cjs');
|
|
27
|
+
require('../../__chunks/CMUD7LLN.cjs');
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
exports.DEFAULT_MYSQL_HOST_PATTERN = _H74JSDBUcjs.DEFAULT_MYSQL_HOST_PATTERN; exports.DEFAULT_READONLY_USERNAME = _H74JSDBUcjs.DEFAULT_READONLY_USERNAME; exports.ENGINES = _H74JSDBUcjs.ENGINES; exports.buildReadonlyUrl = _NWZGFHKHcjs.buildReadonlyUrl; exports.createReadonlyUserCommand = _LXDF5QVZcjs.createReadonlyUserCommand; exports.createReadonlyUserOptionsSchema = _H74JSDBUcjs.createReadonlyUserOptionsSchema; exports.detectEngineFromUrl = _NWZGFHKHcjs.detectEngineFromUrl; exports.generatePassword = _NWZGFHKHcjs.generatePassword; exports.isSystemDatabase = _NWZGFHKHcjs.isSystemDatabase; exports.parseConnectionUrl = _NWZGFHKHcjs.parseConnectionUrl; exports.quoteIdent = _NWZGFHKHcjs.quoteIdent; exports.quoteLiteral = _NWZGFHKHcjs.quoteLiteral; exports.registerDbCommands = _DTQ2LB3Icjs.registerDbCommands; exports.resolveAdminUrl = _NWZGFHKHcjs.resolveAdminUrl; exports.resolveSsl = _NWZGFHKHcjs.resolveSsl;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../__chunks/
|
|
3
|
+
var _GU3R54MKcjs = require('../../__chunks/GU3R54MK.cjs');
|
|
4
|
+
require('../../__chunks/NFXQNOQH.cjs');
|
|
5
|
+
require('../../__chunks/JB7T7PKQ.cjs');
|
|
6
|
+
require('../../__chunks/CMUD7LLN.cjs');
|
|
5
7
|
require('../../__chunks/NIMXXHJQ.cjs');
|
|
6
|
-
require('../../__chunks/
|
|
8
|
+
require('../../__chunks/FRHST54J.cjs');
|
|
7
9
|
|
|
8
10
|
|
|
9
|
-
exports.dopplerCommand =
|
|
11
|
+
exports.dopplerCommand = _GU3R54MKcjs.dopplerCommand;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../__chunks/
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../__chunks/GZMTNK5N.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _GU3R54MKcjs = require('../../__chunks/GU3R54MK.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -9,9 +9,20 @@ var _IEGW3TSFcjs = require('../../__chunks/IEGW3TSF.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
var _NFXQNOQHcjs = require('../../__chunks/NFXQNOQH.cjs');
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
var _JB7T7PKQcjs = require('../../__chunks/JB7T7PKQ.cjs');
|
|
25
|
+
require('../../__chunks/CMUD7LLN.cjs');
|
|
15
26
|
|
|
16
27
|
|
|
17
28
|
|
|
@@ -21,7 +32,23 @@ var _NIMXXHJQcjs = require('../../__chunks/NIMXXHJQ.cjs');
|
|
|
21
32
|
|
|
22
33
|
|
|
23
34
|
|
|
24
|
-
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
var _FRHST54Jcjs = require('../../__chunks/FRHST54J.cjs');
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
25
52
|
|
|
26
53
|
|
|
27
54
|
|
|
@@ -38,4 +65,4 @@ var _MFAORPG6cjs = require('../../__chunks/MFAORPG6.cjs');
|
|
|
38
65
|
|
|
39
66
|
|
|
40
67
|
|
|
41
|
-
exports.checkDependencies =
|
|
68
|
+
exports.checkDependencies = _JB7T7PKQcjs.checkDependencies; exports.checkDopplerAuth = _JB7T7PKQcjs.checkDopplerAuth; exports.cloneProject = _JB7T7PKQcjs.cloneProject; exports.createDiff = _JB7T7PKQcjs.createDiff; exports.dopplerCloneSchema = _FRHST54Jcjs.dopplerCloneSchema; exports.dopplerCommand = _GU3R54MKcjs.dopplerCommand; exports.dopplerCommandMetadata = _FRHST54Jcjs.dopplerCommandMetadata; exports.dopplerCommandOptionsSchema = _FRHST54Jcjs.dopplerCommandOptionsSchema; exports.dopplerDownloadSchema = _FRHST54Jcjs.dopplerDownloadSchema; exports.dopplerSetSchema = _FRHST54Jcjs.dopplerSetSchema; exports.dopplerUploadSchema = _FRHST54Jcjs.dopplerUploadSchema; exports.downloadConfigs = _JB7T7PKQcjs.downloadConfigs; exports.exec = _NIMXXHJQcjs.exec; exports.execDoppler = _JB7T7PKQcjs.execDoppler; exports.execJson = _NIMXXHJQcjs.execJson; exports.execNumber = _NIMXXHJQcjs.execNumber; exports.execString = _NIMXXHJQcjs.execString; exports.getConfigs = _JB7T7PKQcjs.getConfigs; exports.getSecret = _NFXQNOQHcjs.getSecret; exports.listConfigs = _NFXQNOQHcjs.listConfigs; exports.listEnvironments = _NFXQNOQHcjs.listEnvironments; exports.listProjects = _NFXQNOQHcjs.listProjects; exports.normalizeEscapeSequences = _JB7T7PKQcjs.normalizeEscapeSequences; exports.promptConfirmation = _JB7T7PKQcjs.promptConfirmation; exports.setSecret = _NFXQNOQHcjs.setSecret; exports.setSecretInteractive = _NFXQNOQHcjs.setSecretInteractive; exports.uploadConfigs = _JB7T7PKQcjs.uploadConfigs;
|