cf 1.0.0-beta.12 → 1.0.0-beta.13
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/dist/_meta/commands.json +3119 -2067
- package/dist/_meta/hand-written-commands.json +14 -1
- package/dist/_meta/schemas.json +1856 -1132
- package/dist/{abuse-reports-Cy9RcWPu.mjs → abuse-reports-BjU1s8cf.mjs} +10 -10
- package/dist/{access-DwJm1qet.mjs → access-C_G2MZnA.mjs} +1 -1
- package/dist/account-tags-CaXDDeZ4.mjs +15 -0
- package/dist/{accounts-BSd4b-1j.mjs → accounts-BALwxDQY.mjs} +70 -77
- package/dist/{acm-BfI0p2sX.mjs → acm-CP9EaXQN.mjs} +1 -1
- package/dist/{addressing-lfeJf7YB.mjs → addressing-DRlaxqrI.mjs} +1 -1
- package/dist/{agent-memory-CP1qpn-y.mjs → agent-memory-vGhlfZBx.mjs} +1 -1
- package/dist/{ai-jFzFBANM.mjs → ai-CJtbWfB9.mjs} +18 -16
- package/dist/{ai-audit-B_tSl78A.mjs → ai-audit-C0BJNqZZ.mjs} +1 -1
- package/dist/ai-gateway-BQtv3U3x.mjs +80 -0
- package/dist/ai-search-DGU1Y5By.mjs +79 -0
- package/dist/{ai-security-CKGE547U.mjs → ai-security-CFTaYk_X.mjs} +1 -1
- package/dist/{alerting-CuxoqG3S.mjs → alerting-1hun27JC.mjs} +3 -3
- package/dist/analytics-DXUSjvzT.mjs +17 -0
- package/dist/{analytics_engine-BoapM9wd.mjs → analytics_engine-CQsnL09C.mjs} +1 -1
- package/dist/{api-security-Nk_bg-Kg.mjs → api-security-BXhrfR6-.mjs} +4 -4
- package/dist/argo-LPUCTnee.mjs +14 -0
- package/dist/{artifacts-BS6cEqCB.mjs → artifacts-Dt6easua.mjs} +1 -1
- package/dist/{audit-logs-x5tLqeX2.mjs → audit-logs-CVznAM2Z.mjs} +1 -1
- package/dist/{auth-AobvBmz4.mjs → auth-CGLsxbc6.mjs} +1 -1
- package/dist/auth-CrmVwfpJ.mjs +2 -0
- package/dist/{auth-CKotxfap.mjs → auth-eQr-kQCH.mjs} +1 -1
- package/dist/{auth-token-CtguMdmF.mjs → auth-token-pNQrX_9O.mjs} +1 -1
- package/dist/{autoconfig-PfnbLuEO.mjs → autoconfig-sD7Frryg.mjs} +151 -151
- package/dist/{basin-catalog-Ddi-t3q9.mjs → basin-catalog-ZQICw-zF.mjs} +1 -1
- package/dist/{billing-CDMc4tvX.mjs → billing-Dy1-dV_B.mjs} +2 -2
- package/dist/{bot-management-UrCM3P8K.mjs → bot-management-DTgPwL7O.mjs} +1 -1
- package/dist/{botnet-feed-CVwRm42k.mjs → botnet-feed-xb98Cj3Y.mjs} +1 -1
- package/dist/{brand-protection-DfNf5REj.mjs → brand-protection-Ck3okE2k.mjs} +1 -1
- package/dist/browser-run-DJGJSzFX.mjs +42 -0
- package/dist/build-B1L6xrgC.mjs +2 -0
- package/dist/{build-BKPVP5ip.mjs → build-HmSXqjGn.mjs} +1 -1
- package/dist/{builds-BG5DHqU3.mjs → builds-CYxcZtkG.mjs} +3 -3
- package/dist/{cache-C05hHXUp.mjs → cache-D9tSfovH.mjs} +1 -1
- package/dist/{certificate-authorities-DyCFmZwR.mjs → certificate-authorities-CpiveTFC.mjs} +1 -1
- package/dist/cf-BxsXrVeh.mjs +18 -0
- package/dist/chunk-DSGVRFIS-C1_SEtRK.mjs +2 -0
- package/dist/{chunk-FT2NMTJB-DQ7s3x7Q.mjs → chunk-NDZDTP46-Bjx_wtJe.mjs} +3 -3
- package/dist/{chunk-AUSY7DKT-BJX6Fdc4.mjs → chunk-TAK63GWY-DdMktrgc.mjs} +9 -2
- package/dist/{cli-D9qlPB-6.mjs → cli-DeJc9U8z.mjs} +1 -1
- package/dist/{client-certificates-B-m8rfM9.mjs → client-certificates-CF6YZyvP.mjs} +1 -1
- package/dist/{client-side-security-M4oIUqID.mjs → client-side-security-BLoe9kS5.mjs} +1 -1
- package/dist/{cloud-connector-B63Dwn6n.mjs → cloud-connector-DXRUHsjt.mjs} +1 -1
- package/dist/cloudflared--1Ws1RJy.mjs +2 -0
- package/dist/{cloudforce-one-Dlc1GNFy.mjs → cloudforce-one-CBLxXi6v.mjs} +162 -162
- package/dist/{command-BQpXcGKV.mjs → command-83uVfXh9.mjs} +1 -1
- package/dist/{command-BWlpCtHe.mjs → command-BDe67N_n.mjs} +1 -1
- package/dist/{command-CXxh5Hce.mjs → command-BlIb6RR2.mjs} +1 -1
- package/dist/{command-ZBQ1WITj.mjs → command-Bpzp8Mz2.mjs} +1 -1
- package/dist/{command-CKQlxypn.mjs → command-BvfKhMl7.mjs} +1 -1
- package/dist/command-CG6RvZs0.mjs +2 -0
- package/dist/{command-CRl00uA2.mjs → command-CcuLC6CJ.mjs} +1 -1
- package/dist/{command-CUkXxZsc.mjs → command-Cu7dcaHT.mjs} +1 -1
- package/dist/{command-SS1z_t68.mjs → command-D3fyhdy-.mjs} +1 -1
- package/dist/{command-DyE8v4sd.mjs → command-DUhX8Dcr.mjs} +1 -1
- package/dist/{command-VuxpEvmH.mjs → command-Dh7RmjFu.mjs} +1 -1
- package/dist/{command-DEQSv-S1.mjs → command-DwXiDOeH.mjs} +1 -1
- package/dist/{command-BlGILcTA.mjs → command-UiHLJ8Ji.mjs} +1 -1
- package/dist/{command-Rv2MR-eh.mjs → command-_rqD0hXF.mjs} +1 -1
- package/dist/{command-DBaNgfA4.mjs → command-oNVwyjGB.mjs} +1 -1
- package/dist/{completions-lf50FBGm.mjs → completions-D06AO7A8.mjs} +11 -11
- package/dist/{connector-interrupts-DHN1KtUE.mjs → connector-interrupts-DelTmNyw.mjs} +1 -1
- package/dist/{connector-telemetry-events-CHg7FmXh.mjs → connector-telemetry-events-BwxR3G8d.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-CSifYi9r.mjs → connector-telemetry-snapshots-Bqq-hrpJ.mjs} +1 -1
- package/dist/{connectors-0UwPUav-.mjs → connectors-D-m3rEpk.mjs} +1 -1
- package/dist/{containers-DuIsM7lM.mjs → containers-CVNfEjJs.mjs} +3 -3
- package/dist/{containers-DRzgE46U.mjs → containers-DeoZyeQe.mjs} +25 -25
- package/dist/{content-scan-COyTz0Wb.mjs → content-scan-W0BNzbQp.mjs} +1 -1
- package/dist/{context-Bwkz4Lm_.mjs → context-q7UaYK69.mjs} +2 -2
- package/dist/{cps-B7_BJaAU.mjs → cps-BZ6hqRb5.mjs} +1 -1
- package/dist/{csamScanner-jez2EYXC.mjs → csamScanner-Bo1t3CLh.mjs} +1 -1
- package/dist/{ct-alerting-CACDrY0E.mjs → ct-alerting-E03faC7p.mjs} +1 -1
- package/dist/{custom-certificates-BBd92YlF.mjs → custom-certificates-CUySSPzi.mjs} +3 -3
- package/dist/{custom-csrs-DTwBiNMX.mjs → custom-csrs-gNpWkJPQ.mjs} +1 -1
- package/dist/{custom-hostnames-DIWlqvN9.mjs → custom-hostnames-abGBAbx7.mjs} +4 -4
- package/dist/{custom-nameservers-DISy8v8u.mjs → custom-nameservers-BgNXol1P.mjs} +1 -1
- package/dist/{custom-pages-BHXO_NFv.mjs → custom-pages-DMKX3aoD.mjs} +1 -1
- package/dist/{d1-MvAQMvvo.mjs → d1-CE08YqYk.mjs} +26 -22
- package/dist/{dcv-delegation-Buq0hcm_.mjs → dcv-delegation-B5YUEWu0.mjs} +1 -1
- package/dist/deploy-CWNm1-5v.mjs +2 -0
- package/dist/deploy-context-Dr6bxNcB.mjs +56 -0
- package/dist/deploy-input-Cc0_2QlW.mjs +2 -0
- package/dist/{dev-D8FGPKRt.mjs → dev-ZA8itQE7.mjs} +1 -1
- package/dist/{diagnostics-ChDfJ-Gv.mjs → diagnostics-UMbG6m4n.mjs} +1 -1
- package/dist/dialog-D4Y9ocuF.mjs +2 -0
- package/dist/{dist-CYFkGHYv.mjs → dist-BHEmAAHr.mjs} +4 -4
- package/dist/dist-uRuGmkMB.mjs +60 -0
- package/dist/{dls-8D00tqvC.mjs → dls-DIl16mLp.mjs} +1 -1
- package/dist/{dns-C-A5pwf3.mjs → dns-QUpgljRG.mjs} +5 -5
- package/dist/{dns-firewall-DIiF4pro.mjs → dns-firewall-BZwJXHLj.mjs} +1 -1
- package/dist/dry-run-DRj2_uV3.mjs +2 -0
- package/dist/{durable-objects-CnIqbj84.mjs → durable-objects-BCj4ykpU.mjs} +1 -1
- package/dist/{email-auth-v97Md32E.mjs → email-auth-DlHIYhCk.mjs} +1 -1
- package/dist/{email-routing-I29RG4hb.mjs → email-routing-UKVS4DYy.mjs} +1 -1
- package/dist/{email-security-BCarmbky.mjs → email-security-CZjfRIg0.mjs} +8 -8
- package/dist/{email-sending-CsHk2HAJ.mjs → email-sending-Dquc880C.mjs} +1 -1
- package/dist/{error-sanitization-BWnGnB73.mjs → error-sanitization-DE_zSrXw.mjs} +1 -1
- package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
- package/dist/{fieldExtractors-GIVe9jZa.mjs → fieldExtractors-BbwDRquU.mjs} +1 -1
- package/dist/{firewall-DpgFqJr3.mjs → firewall--mTfDnCJ.mjs} +3 -3
- package/dist/{flagship-BVaXXlsX.mjs → flagship-cfoSwwM9.mjs} +1 -1
- package/dist/{fraud-B5GQdEF2.mjs → fraud-Dcsq3EYK.mjs} +1 -1
- package/dist/{google-tag-gateway-C4O61lp-.mjs → google-tag-gateway-DPKSkZQi.mjs} +1 -1
- package/dist/{healthchecks-BwYMnKSF.mjs → healthchecks-D78hIIBC.mjs} +1 -1
- package/dist/{hostnames-DhrGRFeI.mjs → hostnames-sF999-6H.mjs} +1 -1
- package/dist/{hyperdrive-DAA8Fazg.mjs → hyperdrive-qWACKfA4.mjs} +2 -2
- package/dist/{iam-sRKDU2Z3.mjs → iam-Bvg_PayW.mjs} +1 -1
- package/dist/{images-DXdekLVs.mjs → images-DI_lEZ4L.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/init-1w_mcgk3.mjs +43 -0
- package/dist/{intel-CnVeSjIS.mjs → intel-BxElBUMP.mjs} +1 -1
- package/dist/interactive-BW9T1D1q.mjs +48 -0
- package/dist/interactive-DGUWZ2Gk.mjs +2 -0
- package/dist/{ips-COCUG8mk.mjs → ips-DWoaKxi7.mjs} +1 -1
- package/dist/k2-tFjaftl-.mjs +11 -0
- package/dist/{keyless-certificates-l2_S__h3.mjs → keyless-certificates-BrvxHU4J.mjs} +1 -1
- package/dist/{keys-CDZreums.mjs → keys-DcwTYKRf.mjs} +1 -1
- package/dist/{kv-DkpKVimq.mjs → kv-htXS-7uP.mjs} +2 -2
- package/dist/{lazy-command-_vZGz6mv.mjs → lazy-command-BDiIwpss.mjs} +1 -1
- package/dist/{leaked-credential-checks-edbapECI.mjs → leaked-credential-checks-bvGrLOmQ.mjs} +1 -1
- package/dist/{load-balancers-C5YMvhXD.mjs → load-balancers-BNTUt4yG.mjs} +1 -1
- package/dist/local-DlDumOSC.mjs +2 -0
- package/dist/{local-C0lQ9sTg.mjs → local-DlT72Xpn.mjs} +1 -1
- package/dist/{local-runtime-DtnWXN0a.mjs → local-runtime-CokO6qaX.mjs} +1 -1
- package/dist/{login-BrjOuHKu.mjs → login-BGF_I_LT.mjs} +1 -1
- package/dist/{login-DeOM4v0L.mjs → login-Ccw-mYwT.mjs} +1 -1
- package/dist/{logo-matches-CF8321pb.mjs → logo-matches-tE8LTKgg.mjs} +1 -1
- package/dist/{logos-Bd8xNRKW.mjs → logos-Bj845Mcw.mjs} +1 -1
- package/dist/{logpush-BYk3qqwY.mjs → logpush-Cs8JdvKi.mjs} +7 -7
- package/dist/{logs-Jcj2NN8H.mjs → logs-C92XZvNu.mjs} +1 -1
- package/dist/{magic-cloud-networking-Dgdb9H0f.mjs → magic-cloud-networking-hNp5MMw-.mjs} +1 -1
- package/dist/{magic-network-monitoring-CxVU4MZB.mjs → magic-network-monitoring-68GuWAnv.mjs} +1 -1
- package/dist/{magic-transit-KDyfUgTv.mjs → magic-transit-DNd7gu4j.mjs} +6 -6
- package/dist/{managed-defense-CxaDeNUd.mjs → managed-defense-B_wCAuFD.mjs} +1 -1
- package/dist/{managed-transforms-C7rT5E-x.mjs → managed-transforms-DZdxHPOh.mjs} +1 -1
- package/dist/{matches-BtKqG8T9.mjs → matches-B65CkflD.mjs} +1 -1
- package/dist/{mcp-QDd1Iyc0.mjs → mcp-DrJW5ayK.mjs} +4 -4
- package/dist/mesh-DfVzYTn1.mjs +26 -0
- package/dist/{migrate-DHlfR_gZ.mjs → migrate-CZNq63Uj.mjs} +1 -1
- package/dist/{monetization-pLalYYMI.mjs → monetization-BGaI8CMO.mjs} +1 -1
- package/dist/{mtls-certificates-DYA9Wu-c.mjs → mtls-certificates-BsU2emDD.mjs} +2 -2
- package/dist/{network-DrJxPWXQ.mjs → network-BEMD8P0U.mjs} +1 -1
- package/dist/{network-interconnects-D73MlYG8.mjs → network-interconnects-DMu_fcbo.mjs} +2 -7
- package/dist/o11y-C1a4gDGF.mjs +93 -0
- package/dist/{oauth-B08YQ4xq.mjs → oauth-Bj5Ne1o8.mjs} +1 -1
- package/dist/{oauth-clients-CkPDLFd-.mjs → oauth-clients-p4Etdqy_.mjs} +1 -1
- package/dist/{oauth-TGbM1Q0V.mjs → oauth-mspHHU5U.mjs} +1 -1
- package/dist/{oauth-scopes-VgliqcQe.mjs → oauth-scopes-B2IabFza.mjs} +1 -1
- package/dist/{organization-DIwqRBBV.mjs → organization-CdXt7AVZ.mjs} +1 -1
- package/dist/{organizations-Dk0D9ukm.mjs → organizations-5S6xEp7T.mjs} +1 -1
- package/dist/{origin-ca-certificates-BSFqMTn-.mjs → origin-ca-certificates-_VJAoK1D.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-BOKWKDTY.mjs → origin-post-quantum-encryption-GcldDsT2.mjs} +1 -1
- package/dist/{origin-tls-client-auth-BzE3WpcN.mjs → origin-tls-client-auth-DZHld9fA.mjs} +3 -3
- package/dist/{output-BGqhvqe2.mjs → output-BOe-3AQG.mjs} +1 -1
- package/dist/{page-rules-BKaU37cM.mjs → page-rules-o1tAMMsD.mjs} +1 -1
- package/dist/{pages-2Xg-lrMf.mjs → pages-CmiOhjSl.mjs} +4 -4
- package/dist/pay-per-crawl-BsnOxGYU.mjs +38 -0
- package/dist/pay-per-use-BXWMCSyE.mjs +33 -0
- package/dist/{pipelines-BM-T7mMK.mjs → pipelines-DWLQC0F6.mjs} +2 -2
- package/dist/{precursor-DmQ32-Sp.mjs → precursor-B6DjBib6.mjs} +1 -1
- package/dist/{previews-DDQ9ACDJ.mjs → previews-dUKEBGSM.mjs} +1 -1
- package/dist/process-2wmDCy17.mjs +2 -0
- package/dist/{progress-BYVZuEcG.mjs → progress-BtkTVcHI.mjs} +1 -1
- package/dist/prompt-RlgRrmbm.mjs +3 -0
- package/dist/{queries-DPBkVynK.mjs → queries-yLwoJRHV.mjs} +1 -1
- package/dist/{queues-CCXRs98q.mjs → queues-CnJRaE1o.mjs} +1 -1
- package/dist/{r2-BKuBSW8h.mjs → r2-CuC6-zQX.mjs} +48 -45
- package/dist/{radar-Gv1yFoRX.mjs → radar-DrQLcbkq.mjs} +1 -1
- package/dist/{raw-fetch-DyYWa923.mjs → raw-fetch-B4NvWuZD.mjs} +1 -1
- package/dist/{realtime-CVl-rvgx.mjs → realtime-CjsnzHxD.mjs} +1 -1
- package/dist/{registrar-swlnh22i.mjs → registrar-BgOsxTnX.mjs} +1 -1
- package/dist/{registrar-sandbox-cmOYDnkp.mjs → registrar-sandbox-3ikBD9fB.mjs} +1 -1
- package/dist/{registry-C20J1MW0.mjs → registry-CHowrQsZ.mjs} +1 -1
- package/dist/{reporting-Bgwsvol1.mjs → reporting-hE127s5r.mjs} +1 -1
- package/dist/{request-headers-CUee83pa.mjs → request-headers-DiJeDAn1.mjs} +1 -1
- package/dist/{request-tracers-BBiJvVDz.mjs → request-tracers-BCwLxmPN.mjs} +1 -1
- package/dist/{resolve-DvxgnWjL.mjs → resolve-CaTBV-c6.mjs} +1 -1
- package/dist/resolve-DCGSzUDQ.mjs +2 -0
- package/dist/{resource-sharing-C1JiYLbl.mjs → resource-sharing-2qvWUuMa.mjs} +11 -11
- package/dist/{resource-tagging-C9VOSlDR.mjs → resource-tagging-Dwx7iL3v.mjs} +1 -1
- package/dist/{rules-BDunCGMj.mjs → rules-DxVQ6jIg.mjs} +1 -1
- package/dist/rulesets-Cdh8YjI9.mjs +37 -0
- package/dist/{rum-B7XiECe9.mjs → rum-a4CMq4Qu.mjs} +1 -1
- package/dist/{run-CrZgB8L_.mjs → run-BvHwWWUX.mjs} +1 -1
- package/dist/run-CkbrPJPx.mjs +2 -0
- package/dist/{schema-DC0kdqgV.mjs → schema-elj12WOx.mjs} +1 -1
- package/dist/{schema-flags-BUZR9SLd.mjs → schema-flags-BzoBGPWk.mjs} +1 -1
- package/dist/{scim-CORcs2wK.mjs → scim-B8XlXl8v.mjs} +1 -1
- package/dist/{secrets-store-BoZQaFey.mjs → secrets-store-Cqhedh_i.mjs} +2 -2
- package/dist/{security-insights-DblK_6sg.mjs → security-insights-le2-DteL.mjs} +1 -1
- package/dist/{security-txt-Dl7RPnRb.mjs → security-txt-cCArWXur.mjs} +1 -1
- package/dist/{session-BWe9et4K.mjs → session-C1BhT1ZJ.mjs} +1 -1
- package/dist/shared-BPjcpXuA.mjs +2 -0
- package/dist/{smart-shield-DX0-8ruu.mjs → smart-shield-Csyh8hwB.mjs} +1 -1
- package/dist/{snippets-BFN-Lg3K.mjs → snippets-DUWx25q6.mjs} +1 -1
- package/dist/spawn-IysxuTNW.mjs +10 -0
- package/dist/{spectrum-HYWLWB0X.mjs → spectrum-Da3UYSOR.mjs} +1 -1
- package/dist/{speed-Dj0YhfRe.mjs → speed-NxlMnB2e.mjs} +1 -1
- package/dist/sql-CNdHAlQ8.mjs +4 -0
- package/dist/src-JfLDUxFr.mjs +125 -0
- package/dist/{ssl-BQL1fNtD.mjs → ssl-BtaX2WEJ.mjs} +1 -1
- package/dist/startup-profile-B2l0ChVu.mjs +2 -0
- package/dist/{startup-profile-0X5ebbng.mjs → startup-profile-CdJWgNjd.mjs} +1 -1
- package/dist/{state-Dy6-rKNd.mjs → state-BDSvdSdP.mjs} +1 -1
- package/dist/state-JB4_BU1o.mjs +2 -0
- package/dist/{stream-DKv2TtZN.mjs → stream-C1Ijjzn4.mjs} +3 -3
- package/dist/{submit-Byt2KBGI.mjs → submit-MdkuU_Pt.mjs} +1 -1
- package/dist/{tags-BIBsdG68.mjs → tags-CA1xMM96.mjs} +1 -1
- package/dist/telemetry-BsYO3nxG.mjs +2 -0
- package/dist/{telemetry-bu3txnIR.mjs → telemetry-Cm39QJ-M.mjs} +1 -1
- package/dist/{tenant-Bs4Ac4n3.mjs → tenant-BB6Oszcl.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-DcaELeCE.mjs → tenant-custom-nameservers-BsbgYAEo.mjs} +1 -1
- package/dist/{tools-BbTX7rlM.mjs → tools-CSc5DmFi.mjs} +1 -1
- package/dist/{tunnels-DWcrz9Sf.mjs → tunnels-CRFtyHWz.mjs} +4 -4
- package/dist/{turnstile-2MIGp2ce.mjs → turnstile-DBXWo_Xe.mjs} +1 -1
- package/dist/update-check-C2oVEbXx.mjs +2 -0
- package/dist/{update-check-CfB0PNTY.mjs → update-check-CMXSdres.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-B8udoxlx.mjs → url-info-t-XAs0Mk.mjs} +1 -1
- package/dist/{url-normalization-C6AdWtaE.mjs → url-normalization-Cs4F8e0a.mjs} +1 -1
- package/dist/{url-scanner-Dg0c_yVb.mjs → url-scanner-CBIoDbTx.mjs} +1 -1
- package/dist/{user-BLZ-0Bgv.mjs → user-CevdOMoa.mjs} +3 -3
- package/dist/values-CjNlkbIh.mjs +4 -0
- package/dist/{vectorize-DEUSEQXY.mjs → vectorize-9d9tPmg5.mjs} +1 -1
- package/dist/version-BdVUXLnK.mjs +2 -0
- package/dist/{waiting-rooms-BycGk2Y0.mjs → waiting-rooms--5WmrWb3.mjs} +1 -1
- package/dist/{web-assets-CLZdWOmN.mjs → web-assets-BHot_MU8.mjs} +1 -1
- package/dist/{web3-DjeavuLg.mjs → web3-CYfWAF6b.mjs} +1 -1
- package/dist/{workers-C_SfyU-v.mjs → workers-S17M0n3h.mjs} +23 -21
- package/dist/{workers-builds-COn5Ne5G.mjs → workers-builds-Dw7ho3So.mjs} +2 -2
- package/dist/{workers-for-platforms-tchCXwNF.mjs → workers-for-platforms-A3yjyLh3.mjs} +4 -6
- package/dist/{workers-vpc-CKts8Av0.mjs → workers-vpc-BZ2xXtC3.mjs} +1 -1
- package/dist/{workflows-BibtWuOx.mjs → workflows-BgGrVpSR.mjs} +1 -1
- package/dist/{wrangler-migration-BpJqCFAa.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
- package/dist/{zaraz-BvQZB0YY.mjs → zaraz-BsD2dMI3.mjs} +1 -1
- package/dist/{zero-trust-FStq4uhn.mjs → zero-trust-CA3iGQbG.mjs} +413 -397
- package/dist/{zone-tymlghWb.mjs → zone-D2M4EZD0.mjs} +1 -1
- package/dist/{zones-Bz6dgT9_.mjs → zones-BoOC_JzC.mjs} +1 -1
- package/package.json +25 -26
- package/dist/account-tags-d0RkEw6s.mjs +0 -15
- package/dist/ai-gateway-CJaUlfGc.mjs +0 -82
- package/dist/ai-search-PTlpY1T9.mjs +0 -79
- package/dist/analytics-NPND7aHB.mjs +0 -20
- package/dist/argo-DYfLQhd2.mjs +0 -10
- package/dist/auth-CBtzZ3Sw.mjs +0 -2
- package/dist/browser-run-DVaiBLYX.mjs +0 -46
- package/dist/build-C4giET85.mjs +0 -2
- package/dist/cf-B9aqZZKD.mjs +0 -18
- package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +0 -2
- package/dist/cloudflared-B48cfu95.mjs +0 -2
- package/dist/command-CzvlHvov.mjs +0 -2
- package/dist/deploy-BS47vZvJ.mjs +0 -2
- package/dist/deploy-context-Cfushp8j.mjs +0 -56
- package/dist/deploy-input-BAhS5LYx.mjs +0 -2
- package/dist/dialog-CL1Zy4pn.mjs +0 -2
- package/dist/dist-8rP3V95o.mjs +0 -57
- package/dist/dry-run-DmsbOMF1.mjs +0 -2
- package/dist/error-sanitization-C_a2LxOK.mjs +0 -2
- package/dist/init-j47MT4Qe.mjs +0 -39
- package/dist/interactive-Dqv0RWVU.mjs +0 -42
- package/dist/interactive-Wpd3FcDc.mjs +0 -2
- package/dist/k2-CmHkArHL.mjs +0 -13
- package/dist/local-D5L5Bwju.mjs +0 -2
- package/dist/mesh-DtrIzl5z.mjs +0 -26
- package/dist/observability-CvN9oxAo.mjs +0 -80
- package/dist/pay-per-crawl-5-KTQXRr.mjs +0 -65
- package/dist/pay-per-use-sGebKzNK.mjs +0 -6
- package/dist/prompt-F5wxc8zq.mjs +0 -3
- package/dist/resolve-qwL1LmKN.mjs +0 -2
- package/dist/rulesets-BMGxrnv9.mjs +0 -37
- package/dist/run-nNxXb_Cv.mjs +0 -2
- package/dist/shared-0N31BXkY.mjs +0 -2
- package/dist/spawn-DZ9A-xXb.mjs +0 -10
- package/dist/src-CAiZlihY.mjs +0 -117
- package/dist/startup-profile-CXnsF4c7.mjs +0 -2
- package/dist/state-BA2CanJ_.mjs +0 -2
- package/dist/telemetry-DBXOMuLh.mjs +0 -2
- package/dist/update-check-B-CvDAUz.mjs +0 -2
- package/dist/values-BUK-m0Jg.mjs +0 -4
- package/dist/version-BZNc7Y3t.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,n as u}from"./prompt-RlgRrmbm.mjs";function d(e){return e.usage(`$0 healthchecks create
|
|
3
3
|
|
|
4
4
|
Create a new health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const f={command:`create`,describe:`Create Health Check`,builder:d,handler:async u=>a({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Creating`,async()=>a.healthchecks.create({body:e,zone_id:d}));n(t,{successLabel:`Created`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}),p=await i(`Creating`,async()=>a.healthchecks.create({body:f,zone_id:d}));n(p,{successLabel:`Created`})})};function p(e){return e.usage(`$0 healthchecks delete <healthcheck-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e,n as t}from"./auth-
|
|
2
|
+
import{i as e,n as t}from"./auth-CGLsxbc6.mjs";import{i as n}from"./context-q7UaYK69.mjs";import{t as r}from"./output-BOe-3AQG.mjs";import{t as i}from"./dry-run-DRj2_uV3.mjs";import{t as a}from"./progress-BtkTVcHI.mjs";import{t as o}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./prompt-RlgRrmbm.mjs";function l(e){return e.usage(`$0 hostnames settings tls-single get <hostname>
|
|
3
3
|
|
|
4
4
|
Get the requested TLS setting for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get <hostname>`,describe:`Get TLS setting for hostname`,builder:l,handler:async e=>o({command:`hostnames settings tls-single get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf hostnames settings tls-single get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/hostnames/settings/${e[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(e[`setting-id`]))}/${e.hostname==null?`<hostname>`:encodeURIComponent(String(e.hostname))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"setting-id":String(e[`setting-id`]??``),hostname:String(e.hostname??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.hostnames.settings.tlsSingle.get({zone_id:s,setting_id:e[`setting-id`],hostname:e.hostname}));r(c,{successLabel:`Loaded`})})},d={command:`tls-single`,describe:`Operations for settings.tls-single`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function f(e){return e.usage(`$0 hostnames settings tls delete <hostname>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-RlgRrmbm.mjs";function m(e){return e.usage(`$0 hyperdrive create
|
|
3
3
|
|
|
4
4
|
Creates and returns a new Hyperdrive configuration. For a PlanetScale integration, the Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.`).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
|
|
5
5
|
|
|
@@ -24,7 +24,7 @@ Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts.
|
|
|
24
24
|
If not specified, defaults to 20 for free tier and 60 for paid tier.
|
|
25
25
|
Certain Cloudflare-managed origins may be permitted a higher limit.
|
|
26
26
|
Contact Cloudflare if you need a higher limit.
|
|
27
|
-
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`origin-host`,[`origin-service-id`]).conflicts(`origin-port`,[`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`origin-port`,[`origin-host`]).conflicts(`origin-access-client-id`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-id`,[`origin-host`,`origin-access-client-secret`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-secret`,[`origin-host`,`origin-access-client-id`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`])}const D={command:`replace <hyperdrive-id>`,describe:`Replace Hyperdrive`,builder:E,handler:async p=>s({command:`hyperdrive replace`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`origin-scheme`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=await n();a({command:`cf hyperdrive replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/configs/${p[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(p[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(p[`hyperdrive-id`]??``)},bodyKind:`json`,body:p.body===void 0?l({caching:{disabled:p[`caching-disabled`],max_age:p[`caching-max-age`],stale_while_revalidate:p[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(p[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(p[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(p[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(p.name,`name`,`text`),origin:{database:u(p[`origin-database`],`origin-database`,`text`),password:u(p[`origin-password`],`origin-password`,`text`),scheme:u(p[`origin-scheme`],`origin-scheme`,`text`),user:u(p[`origin-user`],`origin-user`,`text`),host:u(p[`origin-host`],`origin-host`,`text`),port:p[`origin-port`],access_client_id:u(p[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:u(p[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:u(p[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:p[`origin-connection-limit`]}):c(p.body)});return}let s=await t(p),m=p.local?e:await r();if(p.accountId=m,p.body){let e=c(p.body),t=await o(`Updating`,async()=>s.hyperdrive.replace({...e,account_id:m,hyperdrive_id:p[`hyperdrive-id`]}));i(t,{successLabel:`Updated`});return}p.name===void 0&&(p.name=await d(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`)),p[`origin-database`]===void 0&&(p[`origin-database`]=await d(`origin-database`,`Set the name of your origin database.`)),p[`origin-password`]===void 0&&(p[`origin-password`]=await d(`origin-password`,`Set the password needed to access your origin database. The API never returns this write-only value.`,{kind:`secret`})),p[`origin-scheme`]===void 0&&(p[`origin-scheme`]=await f(`origin-scheme`,`Specifies the URL scheme used to connect to your origin database.`,[`postgres`,`postgresql`,`mysql`])),p[`origin-user`]===void 0&&(p[`origin-user`]=await d(`origin-user`,`Set the user of your origin database.`));let h=l({caching:{disabled:p[`caching-disabled`],max_age:p[`caching-max-age`],stale_while_revalidate:p[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(p[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(p[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(p[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(p.name,`name`,`text`),origin:{database:u(p[`origin-database`],`origin-database`,`text`),password:u(p[`origin-password`],`origin-password`,`text`),scheme:u(p[`origin-scheme`],`origin-scheme`,`text`),user:u(p[`origin-user`],`origin-user`,`text`),host:u(p[`origin-host`],`origin-host`,`text`),port:p[`origin-port`],access_client_id:u(p[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:u(p[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:u(p[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:p[`origin-connection-limit`]}),g=await o(`Updating`,async()=>s.hyperdrive.replace({...h,account_id:m,hyperdrive_id:p[`hyperdrive-id`]}));i(g,{successLabel:`Updated`})})};function O(e){return e.usage(`$0 hyperdrive restart <hyperdrive-id>
|
|
27
|
+
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`origin-host`,[`origin-service-id`]).conflicts(`origin-port`,[`origin-access-client-id`,`origin-access-client-secret`,`origin-service-id`]).implies(`origin-port`,[`origin-host`]).conflicts(`origin-access-client-id`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-id`,[`origin-host`,`origin-access-client-secret`]).conflicts(`origin-access-client-secret`,[`origin-port`,`origin-service-id`]).implies(`origin-access-client-secret`,[`origin-host`,`origin-access-client-id`]).conflicts(`origin-service-id`,[`origin-host`,`origin-port`,`origin-access-client-id`,`origin-access-client-secret`])}const D={command:`replace <hyperdrive-id>`,describe:`Replace Hyperdrive`,builder:E,handler:async p=>s({command:`hyperdrive replace`,classification:{safeFlags:[`caching-disabled`,`mtls-sslmode`,`origin-scheme`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=await n();a({command:`cf hyperdrive replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/configs/${p[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(p[`hyperdrive-id`]))}`,pathParams:{"hyperdrive-id":String(p[`hyperdrive-id`]??``)},bodyKind:`json`,body:p.body===void 0?l({caching:{disabled:p[`caching-disabled`],max_age:p[`caching-max-age`],stale_while_revalidate:p[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(p[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(p[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(p[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(p.name,`name`,`text`),origin:{database:u(p[`origin-database`],`origin-database`,`text`),password:u(p[`origin-password`],`origin-password`,`text`),scheme:u(p[`origin-scheme`],`origin-scheme`,`text`),user:u(p[`origin-user`],`origin-user`,`text`),host:u(p[`origin-host`],`origin-host`,`text`),port:p[`origin-port`],access_client_id:u(p[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:u(p[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:u(p[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:p[`origin-connection-limit`]}):c(p.body),sensitiveBodyPaths:[[`origin`,`password`],[`origin`,`access_client_secret`]]});return}let s=await t(p),m=p.local?e:await r();if(p.accountId=m,p.body){let e=c(p.body),t=await o(`Updating`,async()=>s.hyperdrive.replace({...e,account_id:m,hyperdrive_id:p[`hyperdrive-id`]}));i(t,{successLabel:`Updated`});return}p.name===void 0&&(p.name=await d(`name`,`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`)),p[`origin-database`]===void 0&&(p[`origin-database`]=await d(`origin-database`,`Set the name of your origin database.`)),p[`origin-password`]===void 0&&(p[`origin-password`]=await d(`origin-password`,`Set the password needed to access your origin database. The API never returns this write-only value.`,{kind:`secret`})),p[`origin-scheme`]===void 0&&(p[`origin-scheme`]=await f(`origin-scheme`,`Specifies the URL scheme used to connect to your origin database.`,[`postgres`,`postgresql`,`mysql`])),p[`origin-user`]===void 0&&(p[`origin-user`]=await d(`origin-user`,`Set the user of your origin database.`));let h=l({caching:{disabled:p[`caching-disabled`],max_age:p[`caching-max-age`],stale_while_revalidate:p[`caching-stale-while-revalidate`]},mtls:{ca_certificate_id:u(p[`mtls-ca-certificate-id`],`mtls-ca-certificate-id`,`text`),mtls_certificate_id:u(p[`mtls-certificate-id`],`mtls-certificate-id`,`text`),sslmode:u(p[`mtls-sslmode`],`mtls-sslmode`,`text`)},name:u(p.name,`name`,`text`),origin:{database:u(p[`origin-database`],`origin-database`,`text`),password:u(p[`origin-password`],`origin-password`,`text`),scheme:u(p[`origin-scheme`],`origin-scheme`,`text`),user:u(p[`origin-user`],`origin-user`,`text`),host:u(p[`origin-host`],`origin-host`,`text`),port:p[`origin-port`],access_client_id:u(p[`origin-access-client-id`],`origin-access-client-id`,`text`),access_client_secret:u(p[`origin-access-client-secret`],`origin-access-client-secret`,`text`),service_id:u(p[`origin-service-id`],`origin-service-id`,`text`)},origin_connection_limit:p[`origin-connection-limit`]}),g=await o(`Updating`,async()=>s.hyperdrive.replace({...h,account_id:m,hyperdrive_id:p[`hyperdrive-id`]}));i(g,{successLabel:`Updated`})})};function O(e){return e.usage(`$0 hyperdrive restart <hyperdrive-id>
|
|
28
28
|
|
|
29
29
|
Restarts the connection pool for the specified Hyperdrive configuration without changing its configuration. Existing connections are drained and a new pool is established at the edge.`).positional(`hyperdrive-id`,{type:`string`,description:`The unique identifier of the Hyperdrive configuration.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`restart <hyperdrive-id>`,describe:`Restart Hyperdrive`,builder:O,handler:async c=>s({command:`hyperdrive restart`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf hyperdrive restart`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/hyperdrive/configs/${c[`hyperdrive-id`]==null?`<hyperdrive-id>`:encodeURIComponent(String(c[`hyperdrive-id`]))}/restart`,pathParams:{"hyperdrive-id":String(c[`hyperdrive-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Creating`,async()=>s.hyperdrive.restart({account_id:l,hyperdrive_id:c[`hyperdrive-id`]}));i(u,{successLabel:`Created`})})};function A(e){return e.usage(`$0 hyperdrive update <hyperdrive-id>
|
|
30
30
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-RlgRrmbm.mjs";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
|
|
3
3
|
|
|
4
4
|
Get information about a specific permission group in an account.`).positional(`permission-group-id`,{type:`string`,description:`Permission Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <permission-group-id>`,describe:`Permission Group Details`,builder:h,handler:async c=>s({command:`iam permission-groups get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam permission-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/permission_groups/${c[`permission-group-id`]==null?`<permission-group-id>`:encodeURIComponent(String(c[`permission-group-id`]))}`,pathParams:{"permission-group-id":String(c[`permission-group-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.permissionGroups.get({account_id:l,permission_group_id:c[`permission-group-id`]}));i(u,{successLabel:`Loaded`})})};function ee(e){return e.usage(`$0 iam permission-groups list
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{i as t,n}from"./auth-CGLsxbc6.mjs";import{a as r,i,t as a}from"./context-q7UaYK69.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-BtkTVcHI.mjs";import{t as l}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-RlgRrmbm.mjs";import{t as ee}from"./cli-types-9oYmRTHJ.mjs";import{n as te,t as v}from"./raw-fetch-B4NvWuZD.mjs";function y(e){return e.usage(`$0 images create
|
|
3
3
|
|
|
4
4
|
Upload an image to CF Images. Images up to 10 Megabytes can be uploaded using a single HTTP POST (multipart/form-data) request by sending an image file or passing a URL accessible to the API.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`id`,{type:`string`,description:`An optional custom unique identifier for your image.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can use used for keeping references to another system of record for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token for the access.`}).option(`url`,{type:`string`,description:`A URL to fetch an image from origin. Only needed when type is uploading from a URL.`})}const b={command:`create`,describe:`Upload an image`,builder:y,handler:async i=>l({command:`images create`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=await r();s({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:i.body,file:i.file,creator:i.creator,id:i.id,metadata:i.metadata,"require-signed-urls":i[`require-signed-urls`],url:i.url}});return}let l=await n(i),u=i.local?e:await a();if(i.accountId=u,i.file!==void 0||i.body!==void 0||i.creator!==void 0||i.id!==void 0||i.metadata!==void 0||i[`require-signed-urls`]!==void 0||i.url!==void 0){let e=new FormData;if(i.file){let t=m(i.file);e.append(`file`,new Blob([t]),i.file.split(/[\\/]/).filter(Boolean).pop())}else i.body!==void 0&&e.append(`file`,i.body);if(i.creator!==void 0&&e.append(`creator`,String(p(i.creator,`creator`,`text`)??``)),i.id!==void 0&&e.append(`id`,String(p(i.id,`id`,`text`)??``)),i.metadata!==void 0){let t=typeof i.metadata==`string`?p(i.metadata,`metadata`,`text`):i.metadata;e.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}i[`require-signed-urls`]!==void 0&&e.append(`requireSignedURLs`,String(i[`require-signed-urls`])),i.url!==void 0&&e.append(`url`,String(p(i.url,`url`,`text`)??``));let n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/images/v1`,{body:e}));o(n,{successLabel:`Created`});return}if(i.body){let e=p(i.body,`body`,`binary`),n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/images/v1`,{body:e,headers:{"Content-Type":`multipart/form-data`}}));o(n,{successLabel:`Created`});return}let d=await c(`Creating`,async()=>l.images.create({account_id:u}));o(d,{successLabel:`Created`})})};function x(e){return e.usage(`$0 images delete <image-id>
|
|
5
5
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,r as t,t as n}from"./src-
|
|
2
|
+
import{n as e,r as t,t as n}from"./src-JfLDUxFr.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";export{r as CliExit,n as buildCli,e as main,t as runMain};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./src-JfLDUxFr.mjs";import{r as e}from"./theme-CQ_TYifs.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{R as n,n as r}from"./dist-BHEmAAHr.mjs";import{i,n as a,t as o}from"./autoconfig-sD7Frryg.mjs";import{n as s}from"./version-BdVUXLnK.mjs";import{n as c}from"./delegate-Tgfxa-MZ.mjs";import"./ui-YmjF66Ct.mjs";import{t as l}from"./project-settings-nBMEx1f-.mjs";import{n as u}from"./dist-uRuGmkMB.mjs";import{t as d}from"./progress-BtkTVcHI.mjs";import{n as f}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as p,r as m}from"./dialog-D4Y9ocuF.mjs";import{basename as h,dirname as g,isAbsolute as _,join as v,relative as y,resolve as b}from"node:path";import{mkdir as x,readdir as S,stat as C,writeFile as w}from"node:fs/promises";const T={"@cloudflare/vite-plugin":`beta`,typescript:`^7.0.2`,vite:`^8.3.0`};function ee(e){return{".gitignore":M(),"cloudflare.config.ts":D(e),"package.json":A(e),...e.packageManager===`pnpm`?{"pnpm-workspace.yaml":te()}:{},"src/index.ts":k(),"tsconfig.json":j(),"vite.config.ts":O()}}function te(){return`# Approve build scripts needed by the generated Worker's dependencies.
|
|
3
|
+
allowBuilds:
|
|
4
|
+
esbuild: true
|
|
5
|
+
workerd: true
|
|
6
|
+
`}function E(e){return/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(e)?`^${e}`:`latest`}function D(e){return`import { bindings, defineConfig } from "cf/config";
|
|
7
|
+
import * as entrypoint from "./src/index.ts" with { type: "cf-worker" };
|
|
8
|
+
|
|
9
|
+
export default defineConfig({
|
|
10
|
+
worker: {
|
|
11
|
+
name: ${JSON.stringify(e.name)},
|
|
12
|
+
compatibilityDate: ${JSON.stringify(e.compatibilityDate)},
|
|
13
|
+
entrypoint,
|
|
14
|
+
env: {
|
|
15
|
+
WORLD: bindings.text("World"),
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
`}function O(){return`import { cloudflare } from "@cloudflare/vite-plugin";
|
|
20
|
+
import { defineConfig } from "vite";
|
|
21
|
+
|
|
22
|
+
export default defineConfig({
|
|
23
|
+
plugins: [cloudflare()],
|
|
24
|
+
});
|
|
25
|
+
`}function k(){return`import { env } from "cloudflare:workers";
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
fetch() {
|
|
29
|
+
return new Response(\`Hello \${env.WORLD}!\`);
|
|
30
|
+
},
|
|
31
|
+
} satisfies ExportedHandler;
|
|
32
|
+
`}function A(e){let t={name:e.name,private:!0,type:`module`,scripts:{dev:`cf dev`,build:`cf build`,deploy:`cf deploy`,typecheck:`cf workers types && tsc`},devDependencies:{"@cloudflare/vite-plugin":T[`@cloudflare/vite-plugin`],cf:E(e.cfVersion),typescript:T.typescript,vite:T.vite}};return`${JSON.stringify(t,null,` `)}\n`}function j(){return`${JSON.stringify({compilerOptions:{target:`es2024`,lib:[`es2024`],module:`preserve`,moduleResolution:`bundler`,types:[],strict:!0,noEmit:!0,allowImportingTsExtensions:!0,isolatedModules:!0,verbatimModuleSyntax:!0,skipLibCheck:!0},include:[`src`,`cloudflare.config.ts`,`.cloudflare/types`]},null,` `)}\n`}function M(){return`node_modules/
|
|
33
|
+
dist/
|
|
34
|
+
.cloudflare/
|
|
35
|
+
.wrangler/
|
|
36
|
+
.dev.vars*
|
|
37
|
+
!.dev.vars.example
|
|
38
|
+
.env*
|
|
39
|
+
!.env.example
|
|
40
|
+
*.log
|
|
41
|
+
.DS_Store
|
|
42
|
+
`}const N=[`npm`,`pnpm`,`yarn`,`bun`],P=[`install`,`package-manager`],F=/* @__PURE__ */ new Set([`.git`]);function I(e){return e.positional(`directory`,{type:`string`,describe:`Directory to initialize; created when missing (prompts when omitted; use . for the current directory)`}).option(`install`,{type:`boolean`,default:!0,describe:`Install dependencies after creating a new project (use --no-install to skip)`}).option(`package-manager`,{type:`string`,choices:N,describe:`Package manager for a new project (prompts when interactive)`})}async function L(e){let t=b(e.directory??await R());if(await H(t)===`not-empty`){await K(t,e);return}await U(t,e)}async function R(){return(await p(`Which directory do you want to initialize?`,{defaultValue:`.`,placeholder:`. (the current directory)`,fallbackError:`Pass the directory to initialize, for example ${e.code(`cf init my-worker`)}, or ${e.code(`cf init .`)} for the current directory.`})).trim()||`.`}function z(e){return{directory:e.directory,install:e.install??!0,packageManager:V(e.packageManager),mode:e.mode}}function B(e=process.env.npm_config_user_agent){return V(e?.split(`/`,1)[0])}function V(e){return N.find(t=>t===e)}async function H(e){let t;try{t=(await C(e)).isDirectory()}catch(e){if(ne(e)&&e.code===`ENOENT`)return`missing`;throw e}if(!t)throw Error(`Cannot initialize ${Z(e)} because it is not a directory.`);return(await S(e)).every(e=>F.has(e))?`empty`:`not-empty`}async function U(a,o){u.info(`Creating a new Worker in ${e.bold(a)}`,{spacing:0});let c=await G(o),l=n(h(a).toLowerCase().replace(/\s+/g,`-`)).replace(/-+$/,``),d=ee({name:l,compatibilityDate:r,cfVersion:s,packageManager:c});for(let[e,t]of Object.entries(d)){let n=v(a,e);await x(g(n),{recursive:!0}),await w(n,t,{flag:`wx`})}if(u.success(`Created the ${e.bold(l)} Worker in ${Z(a)}`,{spacing:0}),o.install){let n=`${c} install`,r=await i(n,a);if(r.exitCode!==0||r.signal)throw u.error(`Dependency installation failed. Run ${e.code(n)} in ${Z(a)} to try again.`,{spacing:0}),new t(r.exitCode,{signal:r.signal});await W(a,o.mode)}Y(a,[...o.install?[]:[{command:`${c} install`,description:`Install dependencies`}],...J()])}async function W(t,n){try{let{generateWorkerTypes:e}=await import(`./generate-D80-1GnZ.mjs`),r=await d(`Generating types`,()=>e({configPath:v(t,l),mode:n,includeRuntime:!0}));u.success(`Generated types in ${Z(r)}`,{spacing:0})}catch(n){let r=n instanceof Error?n.message:String(n);u.warn(`Could not generate types: ${r}\nRun ${e.code(`${q()} workers types`)} in ${Z(t)} to try again.`,{spacing:0})}}async function G(e){if(e.packageManager)return e.packageManager;let t=B()??`npm`;return e.install?m(`Which package manager do you want to use?`,{choices:N.map(e=>({title:e,value:e})),defaultOption:N.indexOf(t)}):t}async function K(t,n){let r=Z(t);u.info(`Setting up the existing project in ${e.bold(t)}`,{spacing:0}),(!n.install||n.packageManager)&&u.warn(`${e.code(`--no-install`)} and ${e.code(`--package-manager`)} only apply when creating a new project. Setting up an existing project uses its own package manager.`,{spacing:0});let i=process.cwd();process.chdir(t);let s=!1;try{let n=await o(t);if(!n)throw Error(`cf could not detect a project to set up in ${r}, and the directory is not empty.\nRun ${e.code(`cf init`)} in an empty directory, or pass a new directory name (for example, ${e.code(`cf init my-worker`)}).`);s=n.configured,s||await a(n)}finally{process.chdir(i)}s?u.info(`Found an existing Cloudflare configuration in ${r}.`,{spacing:0}):u.success(`Set up ${r} for Cloudflare.`,{spacing:0}),Y(t,J())}function q(){return c()?`npx cf`:`cf`}function J(){let e=q();return[{command:`${e} dev`,description:`Start a local development server`},{command:`${e} deploy`,description:`Deploy to Cloudflare`}]}function Y(t,n){let r=[...X(t).map(e=>({command:e})),...n],i=Math.max(...r.filter(e=>e.description).map(e=>e.command.length)),a=r.map(({command:t,description:n})=>n?` ${e.code(t)}${` `.repeat(i-t.length+2)}${e.muted(n)}`:` ${e.code(t)}`);u.message([e.bold(`Next steps`),...a].join(`
|
|
43
|
+
`),{symbol:e.muted(`├`)})}function X(e){let t=y(process.cwd(),e);if(t===``)return[];let n=Q(t)?e:t;return[`cd ${/\s/.test(n)?JSON.stringify(n):n}`]}function Z(e){let t=y(process.cwd(),e);return t===``?`the current directory`:Q(t)?e:t}function Q(e){return e.startsWith(`..`)||_(e)}function ne(e){return e instanceof Error&&`code`in e}const $={command:`workers [directory]`,describe:`Create a new Workers project or set up an existing one`,builder:I,handler:async e=>{await L(z(e))}},re={command:`init [directory]`,describe:`Create a new Cloudflare project or set up an existing one`,builder:e=>I(e).command(f({...$,describe:`${$.describe} [default]`},{command:`init workers`,classification:{safeFlags:P}})).epilogue(`Running cf init without a subcommand runs cf init workers. An empty directory, or one containing only .git, receives a new hello-world Worker. A directory with other files is set up with autoconfig instead. When no directory is given, cf asks for one; non-interactive runs must pass it. Use ./workers to initialize a directory named workers.`),handler:async e=>{await L(z(e))}};export{re as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{i as t,n}from"./auth-CGLsxbc6.mjs";import{a as r,i,t as a}from"./context-q7UaYK69.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-BtkTVcHI.mjs";import{t as l}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f,t as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-RlgRrmbm.mjs";import{t as g}from"./cli-types-9oYmRTHJ.mjs";import{n as ee,t as te}from"./raw-fetch-B4NvWuZD.mjs";function _(e){return e.usage(`$0 intel asn get <asn>
|
|
3
3
|
|
|
4
4
|
Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <asn>`,describe:`Get ASN Overview.`,builder:_,handler:async t=>l({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/asn/${t.asn==null?`<asn>`:encodeURIComponent(String(t.asn))}`,pathParams:{asn:String(t.asn??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.intel.asn.get({account_id:l,asn:t.asn}));o(u,{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 intel asn subnets get <asn>
|
|
5
5
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{i as e,n as t,r as n,t as r}from"./source-mXUcrTVw.mjs";import{n as i,t as a}from"./ansi-styles-kSC6bEIq.mjs";import o,{exit as s,stdin as c,stdout as l}from"node:process";import"node:os";import"node:tty";import{styleText as u}from"node:util";import d from"node:readline";var f=/* @__PURE__ */ t(((e,t)=>{let n={to(e,t){return t?`[${t+1};${e+1}H`:`[${e+1}G`},move(e,t){let n=``;return e<0?n+=`[${-e}D`:e>0&&(n+=`[${e}C`),t<0?n+=`[${-t}A`:t>0&&(n+=`[${t}B`),n},up:(e=1)=>`[${e}A`,down:(e=1)=>`[${e}B`,forward:(e=1)=>`[${e}C`,backward:(e=1)=>`[${e}D`,nextLine:(e=1)=>`\x1B[E`.repeat(e),prevLine:(e=1)=>`\x1B[F`.repeat(e),left:`\x1B[G`,hide:`\x1B[?25l`,show:`\x1B[?25h`,save:`\x1B7`,restore:`\x1B8`};t.exports={cursor:n,scroll:{up:(e=1)=>`\x1B[S`.repeat(e),down:(e=1)=>`\x1B[T`.repeat(e)},erase:{screen:`\x1B[2J`,up:(e=1)=>`\x1B[1J`.repeat(e),down:(e=1)=>`\x1B[J`.repeat(e),line:`\x1B[2K`,lineEnd:`\x1B[K`,lineStart:`\x1B[1K`,lines(e){let t=``;for(let r=0;r<e;r++)t+=this.line+(r<e-1?n.up():``);return e&&(t+=n.left),t}},beep:`\x07`}}));const{white:p,gray:m,dim:h,hidden:g,bold:_,cyanBright:v,bgCyan:y}=r,b=r.hex(`#BD5B08`),x=r.hex(`#111`),S=r.hex(`#0E838F`),C=x.bgHex(`#0E838F`),w=r.hex(`#AB2526`),ee=x.bgHex(`#AB2526`),te=r.hex(`#218529`),ne=x.bgHex(`#218529`),re=r.hex(`#7F7322`),ie=x.bgHex(`#7F7322`);var ae=class extends Error{constructor(e,t){super(e),this.signal=t}};const oe=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,se=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,ce=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,le=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,T=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,E=/\t{1,1000}/y,ue=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,D=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,de=/\p{M}+/gu,fe={limit:1/0,ellipsis:``},pe=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?pe(i,fe,n).width:0),o=n.ansiWidth??0,s=n.controlWidth??0,c=n.tabWidth??8,l=n.ambiguousWidth??1,u=n.emojiWidth??2,d=n.fullWidthWidth??2,f=n.regularWidth??1,p=n.wideWidth??2,m=0,h=0,g=e.length,_=0,v=!1,y=g,b=Math.max(0,r-a),x=0,S=0,C=0,w=0;outer:for(;;){if(S>x||h>=g&&h>m){let t=e.slice(x,S)||e.slice(m,h);_=0;for(let e of t.replaceAll(de,``)){let t=e.codePointAt(0)||0;if(w=se(t)?d:ce(t)?p:l!==f&&oe(t)?l:f,C+w>b&&(y=Math.min(y,Math.max(x,m)+_)),C+w>r){v=!0;break outer}_+=e.length,C+=w}x=S=0}if(h>=g)break;if(D.lastIndex=h,D.test(e)){if(_=D.lastIndex-h,w=_*f,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/f))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=D.lastIndex;continue}if(le.lastIndex=h,le.test(e)){if(C+o>b&&(y=Math.min(y,h)),C+o>r){v=!0;break}C+=o,x=m,S=h,h=m=le.lastIndex;continue}if(T.lastIndex=h,T.test(e)){if(_=T.lastIndex-h,w=_*s,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/s))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=T.lastIndex;continue}if(E.lastIndex=h,E.test(e)){if(_=E.lastIndex-h,w=_*c,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/c))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=E.lastIndex;continue}if(ue.lastIndex=h,ue.test(e)){if(C+u>b&&(y=Math.min(y,h)),C+u>r){v=!0;break}C+=u,x=m,S=h,h=m=ue.lastIndex;continue}h+=1}return{width:v?b:C,index:v?y:g,truncated:v,ellipsed:v&&r>=a}},me={limit:1/0,ellipsis:``,ellipsisWidth:0},O=(e,t={})=>pe(e,me,t).width,he=`]8;;`,ge=RegExp(`(?:\\[(?<code>\\d+)m|\\${he}(?<uri>.*))`,`y`),_e=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},ve=e=>`[${e}m`,ye=e=>`${he}${e}`,be=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:O(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=O(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===``)&&(i=!0,a=t.startsWith(he,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},xe=e=>{let t=e.split(` `),n=t.length;for(;n&&!O(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Se=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=O(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=O(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),be(s,r,t),c=O(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){be(s,r,t),c=O(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){be(s,r,t),c=O(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>xe(e)));let l=s.join(`
|
|
3
|
+
`),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,!u)u=t>=`\ud800`&&t<=`\udbff`;else continue;if(t===`\x1B`||t===``){ge.lastIndex=e+1;let t=ge.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
|
|
4
|
+
`){a&&(r+=ye(``));let e=i?_e(i):void 0;i&&e&&(r+=ve(e))}else t===`
|
|
5
|
+
`&&(i&&_e(i)&&(r+=ve(i)),a&&(r+=ye(a)))}return r},Ce=/\r?\n/;function we(e,t,n){return String(e).normalize().split(Ce).map(e=>Se(e,t,n)).join(`
|
|
6
|
+
`)}var k=f();function A(e,t,n){if(!n.some(e=>!e.disabled))return e;let r=e+t,i=Math.max(n.length-1,0),a=r<0?i:r>i?0:r;return n[a].disabled?A(a,t<0?-1:1,n):a}const j={actions:/* @__PURE__ */ new Set([`up`,`down`,`left`,`right`,`space`,`enter`,`cancel`]),aliases:/* @__PURE__ */ new Map([[`k`,`up`],[`j`,`down`],[`h`,`left`],[`l`,`right`],[``,`cancel`],[`escape`,`cancel`]]),messages:{cancel:`Canceled`,error:`Something went wrong`},withGuide:!0,date:{monthNames:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],messages:{required:`Please enter a valid date`,invalidMonth:`There are only 12 months in a year`,invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function Te(e,t){if(typeof e==`string`)return j.aliases.get(e)===t;for(let n of e)if(n!==void 0&&Te(n,t))return!0;return!1}function Ee(e,t){if(e===t)return;let n=e.split(`
|
|
7
|
+
`),r=t.split(`
|
|
8
|
+
`),i=Math.max(n.length,r.length),a=[];for(let e=0;e<i;e++)n[e]!==r[e]&&a.push(e);return{lines:a,numLinesBefore:n.length,numLinesAfter:r.length,numLines:i}}globalThis.process.platform.startsWith(`win`);const De=Symbol(`clack:cancel`);function Oe(e){return e===De}function M(e,t){let n=e;n.isTTY&&n.setRawMode(t)}const ke=e=>`rows`in e&&typeof e.rows==`number`?e.rows:20;let N=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame=``;_subscribers=/* @__PURE__ */ new Map;_cursor=0;state=`initial`;error=``;value;userInput=``;constructor(e,t=!0){let{input:n=c,output:r=l,render:i,signal:a,...o}=e;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=i.bind(this),this._track=t,this._abortSignal=a,this.input=n,this.output=r}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let n=this._subscribers.get(e)??[];n.push(t),this._subscribers.set(e,n)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let n=this._subscribers.get(e)??[],r=[];for(let e of n)e.cb(...t),e.once&&r.push(()=>n.splice(n.indexOf(e),1));for(let e of r)e()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state=`cancel`,this.close(),e(De);this._abortSignal.addEventListener(`abort`,()=>{this.state=`cancel`,this.close()},{once:!0})}this.rl=d.createInterface({input:this.input,tabSize:2,prompt:``,escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on(`keypress`,this.onKeypress),M(this.input,!0),this.output.on(`resize`,this.render),this.render(),this.once(`submit`,()=>{this.output.write(k.cursor.show),this.output.off(`resize`,this.render),M(this.input,!1),e(this.value)}),this.once(`cancel`,()=>{this.output.write(k.cursor.show),this.output.off(`resize`,this.render),M(this.input,!1),e(De)})})}_isActionKey(e,t){return e===` `}_setValue(e){this.value=e,this.emit(`value`,this.value)}_setUserInput(e,t){this.userInput=e??``,this.emit(`userInput`,this.userInput),t&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:`u`}),this._setUserInput(``)}onKeypress(e,t){if(this._track&&t.name!==`return`&&(t.name&&this._isActionKey(e,t)&&this.rl?.write(null,{ctrl:!0,name:`h`}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state===`error`&&(this.state=`active`),t?.name&&(!this._track&&j.aliases.has(t.name)&&this.emit(`cursor`,j.aliases.get(t.name)),j.actions.has(t.name)&&this.emit(`cursor`,t.name)),e&&(e.toLowerCase()===`y`||e.toLowerCase()===`n`)&&this.emit(`confirm`,e.toLowerCase()===`y`),this.emit(`key`,e?.toLowerCase(),t),t?.name===`return`){if(this.opts.validate){let e=this.opts.validate(this.value);e&&(this.error=e instanceof Error?e.message:e,this.state=`error`,this.rl?.write(this.userInput))}this.state!==`error`&&(this.state=`submit`)}Te([e,t?.name,t?.sequence],`cancel`)&&(this.state=`cancel`),(this.state===`submit`||this.state===`cancel`)&&this.emit(`finalize`),this.render(),(this.state===`submit`||this.state===`cancel`)&&this.close()}close(){this.input.unpipe(),this.input.removeListener(`keypress`,this.onKeypress),this.output.write(`
|
|
9
|
+
`),M(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=we(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
|
|
10
|
+
`).length-1;this.output.write(k.cursor.move(-999,e*-1))}render(){let e=we(this._render(this)??``,process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state===`initial`)this.output.write(k.cursor.hide);else{let t=Ee(this._prevFrame,e),n=ke(this.output);if(this.restoreCursor(),t){let r=Math.max(0,t.numLinesAfter-n),i=Math.max(0,t.numLinesBefore-n),a=t.lines.find(e=>e>=r);if(a===void 0){this._prevFrame=e;return}if(t.lines.length===1){this.output.write(k.cursor.move(0,a-i)),this.output.write(k.erase.lines(1));let t=e.split(`
|
|
11
|
+
`);this.output.write(t[a]),this._prevFrame=e,this.output.write(k.cursor.move(0,t.length-a-1));return}if(t.lines.length>1){if(r<i)a=r;else{let e=a-i;e>0&&this.output.write(k.cursor.move(0,e))}this.output.write(k.erase.down());let t=e.split(`
|
|
12
|
+
`).slice(a);this.output.write(t.join(`
|
|
13
|
+
`)),this._prevFrame=e;return}}this.output.write(k.erase.down())}this.output.write(e),this.state===`initial`&&(this.state=`active`),this._prevFrame=e}}};var Ae=class extends N{get cursor(){return+!this.value}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on(`userInput`,()=>{this.value=this._value}),this.on(`confirm`,e=>{this.output.write(k.cursor.move(0,-1)),this.value=e,this.state=`submit`,this.close()}),this.on(`cursor`,()=>{this.value=!this.value})}};let je=class extends N{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(e=>e.disabled!==!0)}toggleAll(){let e=this._enabledOptions,t=this.value!==void 0&&this.value.length===e.length;this.value=t?[]:e.map(e=>e.value)}toggleInvert(){let e=this.value;if(!e)return;let t=this._enabledOptions.filter(t=>!e.includes(t.value));this.value=t.map(e=>e.value)}toggleValue(){this.value===void 0&&(this.value=[]);let e=this.value.includes(this._value);this.value=e?this.value.filter(e=>e!==this._value):[...this.value,this._value]}constructor(e){super(e,!1),this.options=e.options,this.value=[...e.initialValues??[]];let t=Math.max(this.options.findIndex(({value:t})=>t===e.cursorAt),0);this.cursor=this.options[t].disabled?A(t,1,this.options):t,this.on(`key`,e=>{e===`a`&&this.toggleAll(),e===`i`&&this.toggleInvert()}),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=A(this.cursor,-1,this.options);break;case`down`:case`right`:this.cursor=A(this.cursor,1,this.options);break;case`space`:this.toggleValue()}})}};var Me=class extends N{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(e){super(e,!1),this.options=e.options;let t=this.options.findIndex(({value:t})=>t===e.initialValue),n=t===-1?0:t;this.cursor=this.options[n].disabled?A(n,1,this.options):n,this.changeValue(),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=A(this.cursor,-1,this.options);break;case`down`:case`right`:this.cursor=A(this.cursor,1,this.options)}this.changeValue()})}},Ne=class extends N{get userInputWithCursor(){if(this.state===`submit`)return this.userInput;let e=this.userInput;if(this.cursor>=e.length)return`${this.userInput}\u2588`;let t=e.slice(0,this.cursor),[n,...r]=e.slice(this.cursor);return`${t}${u(`inverse`,n)}${r.join(``)}`}get cursor(){return this._cursor}constructor(e){super({...e,initialUserInput:e.initialUserInput??e.initialValue}),this.on(`userInput`,e=>{this._setValue(e)}),this.on(`finalize`,()=>{this.value||=e.defaultValue,this.value===void 0&&(this.value=``)})}},Pe=class extends N{options;cursor=0;get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}constructor(e){super(e,!1),this.options=e.options,this.cursor=this.options.findIndex(({value:t})=>t===e.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on(`key`,t=>{t===`r`&&e.onRefresh().then(e=>{this.options=[...e],this.cursor=0,this.changeValue();let t=this;`render`in t&&typeof t.render==`function`&&t.render()}).catch(()=>{})}),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case`down`:case`right`:this.cursor=this.cursor===this.options.length-1?0:this.cursor+1}this.changeValue()})}};const Fe=process.stdout,Ie=process.stderr;var Le=/* @__PURE__ */ t(((e,t)=>{t.exports=[{name:`Agola CI`,constant:`AGOLA`,env:`AGOLA_GIT_REF`,pr:`AGOLA_PULL_REQUEST_ID`},{name:`Alpic`,constant:`ALPIC`,env:`ALPIC_HOST`},{name:`Appcircle`,constant:`APPCIRCLE`,env:`AC_APPCIRCLE`,pr:{env:`AC_GIT_PR`,ne:`false`}},{name:`AppVeyor`,constant:`APPVEYOR`,env:`APPVEYOR`,pr:`APPVEYOR_PULL_REQUEST_NUMBER`},{name:`AWS CodeBuild`,constant:`CODEBUILD`,env:`CODEBUILD_BUILD_ARN`,pr:{env:`CODEBUILD_WEBHOOK_EVENT`,any:[`PULL_REQUEST_CREATED`,`PULL_REQUEST_UPDATED`,`PULL_REQUEST_REOPENED`]}},{name:`Azure Pipelines`,constant:`AZURE_PIPELINES`,env:`TF_BUILD`,pr:{BUILD_REASON:`PullRequest`}},{name:`Bamboo`,constant:`BAMBOO`,env:`bamboo_planKey`},{name:`Bitbucket Pipelines`,constant:`BITBUCKET`,env:`BITBUCKET_COMMIT`,pr:`BITBUCKET_PR_ID`},{name:`Bitrise`,constant:`BITRISE`,env:`BITRISE_IO`,pr:`BITRISE_PULL_REQUEST`},{name:`Buddy`,constant:`BUDDY`,env:`BUDDY_WORKSPACE_ID`,pr:`BUDDY_EXECUTION_PULL_REQUEST_ID`},{name:`Buildkite`,constant:`BUILDKITE`,env:`BUILDKITE`,pr:{env:`BUILDKITE_PULL_REQUEST`,ne:`false`}},{name:`CircleCI`,constant:`CIRCLE`,env:`CIRCLECI`,pr:`CIRCLE_PULL_REQUEST`},{name:`Cirrus CI`,constant:`CIRRUS`,env:`CIRRUS_CI`,pr:`CIRRUS_PR`},{name:`Cloudflare Pages`,constant:`CLOUDFLARE_PAGES`,env:`CF_PAGES`},{name:`Cloudflare Workers`,constant:`CLOUDFLARE_WORKERS`,env:`WORKERS_CI`},{name:`Codefresh`,constant:`CODEFRESH`,env:`CF_BUILD_ID`,pr:{any:[`CF_PULL_REQUEST_NUMBER`,`CF_PULL_REQUEST_ID`]}},{name:`Codemagic`,constant:`CODEMAGIC`,env:`CM_BUILD_ID`,pr:`CM_PULL_REQUEST`},{name:`Codeship`,constant:`CODESHIP`,env:{CI_NAME:`codeship`}},{name:`Drone`,constant:`DRONE`,env:`DRONE`,pr:{DRONE_BUILD_EVENT:`pull_request`}},{name:`dsari`,constant:`DSARI`,env:`DSARI`},{name:`Earthly`,constant:`EARTHLY`,env:`EARTHLY_CI`},{name:`Expo Application Services`,constant:`EAS`,env:`EAS_BUILD`},{name:`Gerrit`,constant:`GERRIT`,env:`GERRIT_PROJECT`},{name:`Gitea Actions`,constant:`GITEA_ACTIONS`,env:`GITEA_ACTIONS`},{name:`GitHub Actions`,constant:`GITHUB_ACTIONS`,env:`GITHUB_ACTIONS`,pr:{GITHUB_EVENT_NAME:`pull_request`}},{name:`GitLab CI`,constant:`GITLAB`,env:`GITLAB_CI`,pr:`CI_MERGE_REQUEST_ID`},{name:`GoCD`,constant:`GOCD`,env:`GO_PIPELINE_LABEL`},{name:`Google Cloud Build`,constant:`GOOGLE_CLOUD_BUILD`,env:`BUILDER_OUTPUT`},{name:`Harness CI`,constant:`HARNESS`,env:`HARNESS_BUILD_ID`},{name:`Heroku`,constant:`HEROKU`,env:{env:`NODE`,includes:`/app/.heroku/node/bin/node`}},{name:`Hudson`,constant:`HUDSON`,env:`HUDSON_URL`},{name:`Jenkins`,constant:`JENKINS`,env:[`JENKINS_URL`,`BUILD_ID`],pr:{any:[`ghprbPullId`,`CHANGE_ID`]}},{name:`LayerCI`,constant:`LAYERCI`,env:`LAYERCI`,pr:`LAYERCI_PULL_REQUEST`},{name:`Magnum CI`,constant:`MAGNUM`,env:`MAGNUM`},{name:`Netlify CI`,constant:`NETLIFY`,env:`NETLIFY`,pr:{env:`PULL_REQUEST`,ne:`false`}},{name:`Nevercode`,constant:`NEVERCODE`,env:`NEVERCODE`,pr:{env:`NEVERCODE_PULL_REQUEST`,ne:`false`}},{name:`Prow`,constant:`PROW`,env:`PROW_JOB_ID`},{name:`ReleaseHub`,constant:`RELEASEHUB`,env:`RELEASE_BUILD_ID`},{name:`Render`,constant:`RENDER`,env:`RENDER`,pr:{IS_PULL_REQUEST:`true`}},{name:`Sail CI`,constant:`SAIL`,env:`SAILCI`,pr:`SAIL_PULL_REQUEST_NUMBER`},{name:`Screwdriver`,constant:`SCREWDRIVER`,env:`SCREWDRIVER`,pr:{env:`SD_PULL_REQUEST`,ne:`false`}},{name:`Semaphore`,constant:`SEMAPHORE`,env:`SEMAPHORE`,pr:`PULL_REQUEST_NUMBER`},{name:`Sourcehut`,constant:`SOURCEHUT`,env:{CI_NAME:`sourcehut`}},{name:`Strider CD`,constant:`STRIDER`,env:`STRIDER`},{name:`TaskCluster`,constant:`TASKCLUSTER`,env:[`TASK_ID`,`RUN_ID`]},{name:`TeamCity`,constant:`TEAMCITY`,env:`TEAMCITY_VERSION`},{name:`Travis CI`,constant:`TRAVIS`,env:`TRAVIS`,pr:{env:`TRAVIS_PULL_REQUEST`,ne:`false`}},{name:`Vela`,constant:`VELA`,env:`VELA`,pr:{VELA_PULL_REQUEST:`1`}},{name:`Vercel`,constant:`VERCEL`,env:{any:[`NOW_BUILDER`,`VERCEL`]},pr:`VERCEL_GIT_PULL_REQUEST_ID`},{name:`Visual Studio App Center`,constant:`APPCENTER`,env:`APPCENTER_BUILD_ID`},{name:`Woodpecker`,constant:`WOODPECKER`,env:{CI:`woodpecker`},pr:{CI_BUILD_EVENT:`pull_request`}},{name:`Xcode Cloud`,constant:`XCODE_CLOUD`,env:`CI_XCODE_PROJECT`,pr:`CI_PULL_REQUEST_NUMBER`},{name:`Xcode Server`,constant:`XCODE_SERVER`,env:`XCS`}]})),Re=/* @__PURE__ */ e((/* @__PURE__ */ t((e=>{let t=Le(),n=process.env;Object.defineProperty(e,"_vendors",{value:t.map(function(e){return e.constant})}),e.name=null,e.isPR=null,e.id=null,n.CI!==`false`&&t.forEach(function(t){let n=(Array.isArray(t.env)?t.env:[t.env]).every(function(e){return r(e)});e[t.constant]=n,n&&(e.name=t.name,e.isPR=i(t),e.id=t.constant)}),e.isCI=!!(n.CI!==`false`&&(n.BUILD_ID||n.BUILD_NUMBER||n.CI||n.CI_APP_ID||n.CI_BUILD_ID||n.CI_BUILD_NUMBER||n.CI_NAME||n.CONTINUOUS_INTEGRATION||n.RUN_ID||e.name));function r(e){return typeof e==`string`?!!n[e]:`env`in e?n[e.env]&&n[e.env].includes(e.includes):`any`in e?e.any.some(function(e){return!!n[e]}):Object.keys(e).every(function(t){return n[t]===e[t]})}function i(e){switch(typeof e.pr){case`string`:return!!n[e.pr];case`object`:return`env`in e.pr?`any`in e.pr?e.pr.any.some(function(t){return n[e.pr.env]===t}):e.pr.env in n&&n[e.pr.env]!==e.pr.ne:`any`in e.pr?e.pr.any.some(function(e){return!!n[e]}):r(e.pr);default:return null}}})))(),1);const P={diamond:`◇`,dash:`─`,radioInactive:`○`,radioActive:`●`,backActive:`◀`,backInactive:`◁`,bar:`│`,leftT:`├`,rigthT:`┤`,arrows:{left:`‹`,right:`›`},corners:{tl:`╭`,bl:`╰`,tr:`╮`,br:`╯`}},F={error:ee(` ERROR `),warning:ie(` WARNING `),info:C(` INFO `),success:ne(` SUCCESS `),cancel:p.bgRed(` X `)},I=(e=1)=>g(` `.repeat(e)),L={none:-1,error:0,warn:1,info:2,log:3,debug:4};let ze=`log`;function Be(e){ze=e}function Ve(){return ze}const R=e=>{L[Ve()]>=L.log&&Fe.write(`${e}\n`)},He=e=>{R(e.split(`
|
|
14
|
+
`).map(e=>`${m(P.bar)}${e.length>0?` `+p(e):``}`).join(`
|
|
15
|
+
`))},z=()=>{He(``)},B=(e,{linePrefix:t=m(P.bar),firstLinePrefix:n=t,newlineBefore:r=!1,newlineAfter:i=!1,formatLine:a=e=>p(e),multiline:o=!0}={})=>{let s=(o?e.split(`
|
|
16
|
+
`):[e]).map((e,r)=>(r===0?n:t)+I()+a(e));return r&&s.unshift(t),i&&s.push(t),s.join(`
|
|
17
|
+
`)},Ue=(e,t=!0)=>{R(B(e,{firstLinePrefix:m(P.leftT),linePrefix:m(P.bar),newlineAfter:t}))},We=(e,t,n=!0)=>{R(`${m(P.corners.tl)} ${b(e)} ${t?h(t):``}`),n&&z()},Ge=(e,t)=>{R(`${m(P.corners.bl)} ${b(e)} ${t?h(t):``}\n`)},Ke=(e,{shape:t=P.corners.bl,multiline:n=!1}={})=>{R(B(e,{firstLinePrefix:`${m(t)} ${F.cancel}`,linePrefix:m(P.bar),newlineBefore:!0,formatLine:e=>h(e),multiline:n}))},qe=(e,{shape:t=P.corners.bl,multiline:n=!1,newlineBefore:r=!0}={})=>{R(B(e,{firstLinePrefix:m(t)+I()+F.warning,linePrefix:m(P.bar),formatLine:e=>h(e),multiline:n,newlineBefore:r}))},Je=(e,{shape:t=P.corners.bl,multiline:n=!1}={})=>{R(B(e,{firstLinePrefix:m(t)+I()+F.success,linePrefix:m(P.bar),newlineBefore:!0,formatLine:e=>h(e),multiline:n}))},Ye=e=>{let t=[`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)`,`(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))`].join(`|`),n=RegExp(t,`g`);return e.replace(Xe,`$2`).replace(n,``)},Xe=/\u001B\]8;;(?<url>.+)\u001B\\(?<label>.+)\u001B\]8;;\u001B\\/g,Ze=(e,t)=>{Qe(e,t),s(1)},Qe=(e,t,n=P.corners.bl)=>{let r=Ve();e&&L[r]>=L.error&&Ie.write(`${m(n)} ${F.error} ${h(e)}\n${t?I()+t+`
|
|
18
|
+
`:``}`)},$e=process.env.TERM_PROGRAM===`Apple_Terminal`,V={};V.cursorTo=(e,t)=>{if(typeof e!=`number`)throw TypeError("The `x` argument is required");return typeof t==`number`?`\x1B[`+(t+1)+`;`+(e+1)+`H`:`\x1B[`+(e+1)+`G`},V.cursorMove=(e,t)=>{if(typeof e!=`number`)throw TypeError("The `x` argument is required");let n=``;return e<0?n+=`\x1B[`+-e+`D`:e>0&&(n+=`\x1B[`+e+`C`),t<0?n+=`\x1B[`+-t+`A`:t>0&&(n+=`\x1B[`+t+`B`),n},V.cursorUp=(e=1)=>`\x1B[`+e+`A`,V.cursorDown=(e=1)=>`\x1B[`+e+`B`,V.cursorForward=(e=1)=>`\x1B[`+e+`C`,V.cursorBackward=(e=1)=>`\x1B[`+e+`D`,V.cursorLeft=`\x1B[G`,V.cursorSavePosition=$e?`\x1B7`:`\x1B[s`,V.cursorRestorePosition=$e?`\x1B8`:`\x1B[u`,V.cursorGetPosition=`\x1B[6n`,V.cursorNextLine=`\x1B[E`,V.cursorPrevLine=`\x1B[F`,V.cursorHide=`\x1B[?25l`,V.cursorShow=`\x1B[?25h`,V.eraseLines=e=>{let t=``;for(let n=0;n<e;n++)t+=V.eraseLine+(n<e-1?V.cursorUp():``);return e&&(t+=V.cursorLeft),t},V.eraseEndLine=`\x1B[K`,V.eraseStartLine=`\x1B[1K`,V.eraseLine=`\x1B[2K`,V.eraseDown=`\x1B[J`,V.eraseUp=`\x1B[1J`,V.eraseScreen=`\x1B[2J`,V.scrollUp=`\x1B[S`,V.scrollDown=`\x1B[T`,V.clearScreen=`\x1Bc`,V.clearTerminal=process.platform===`win32`?`${V.eraseScreen}[0f`:`${V.eraseScreen}[3J[H`,V.beep=`\x07`,V.link=(e,t)=>[`\x1B]`,`8`,`;`,`;`,t,`\x07`,e,`\x1B]`,`8`,`;`,`;`,`\x07`].join(``),V.image=(e,t={})=>{let n=`\x1B]1337;File=inline=1`;return t.width&&(n+=`;width=${t.width}`),t.height&&(n+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(n+=`;preserveAspectRatio=0`),n+`:`+e.toString(`base64`)+`\x07`},V.iTerm={setCwd:(e=process.cwd())=>`]50;CurrentDir=${e}`,annotation:(e,t={})=>{let n=`\x1B]1337;`,r=t.x!==void 0,i=t.y!==void 0;if((r||i)&&!(r&&i&&t.length!==void 0))throw Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,``),n+=t.isHidden?`AddHiddenAnnotation=`:`AddAnnotation=`,t.length>0?n+=(r?[e,t.length,t.x,t.y]:[t.length,e]).join(`|`):n+=e,n+`\x07`}};var et=/* @__PURE__ */ t(((e,t)=>{let n=(e,t)=>{for(let n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};t.exports=n,t.exports.default=n})),tt=/* @__PURE__ */ t(((e,t)=>{let n=et(),r=/* @__PURE__ */ new WeakMap,i=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let i,a=0,o=e.displayName||e.name||`<anonymous>`,s=function(...n){if(r.set(s,++a),a===1)i=e.apply(this,n),e=null;else if(t.throw===!0)throw Error(`Function \`${o}\` can only be called once`);return i};return n(s,e),r.set(s,a),s};t.exports=i,t.exports.default=i,t.exports.callCount=e=>{if(!r.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return r.get(e)}})),nt=/* @__PURE__ */ t(((e,t)=>{t.exports=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`],process.platform!==`win32`&&t.exports.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&t.exports.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`)})),rt=/* @__PURE__ */ t(((e,t)=>{var r=global.process;let i=function(e){return e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`};
|
|
19
|
+
/* istanbul ignore if */
|
|
20
|
+
if(!i(r))t.exports=function(){return function(){}};else{var a=n(`assert`),o=nt(),s=/^win/i.test(r.platform),c=n(`events`);
|
|
21
|
+
/* istanbul ignore if */
|
|
22
|
+
typeof c!=`function`&&(c=c.EventEmitter);var l;r.__signal_exit_emitter__?l=r.__signal_exit_emitter__:(l=r.__signal_exit_emitter__=new c,l.count=0,l.emitted={}),l.infinite||(l.setMaxListeners(1/0),l.infinite=!0),t.exports=function(e,t){
|
|
23
|
+
/* istanbul ignore if */
|
|
24
|
+
if(!i(global.process))return function(){};a.equal(typeof e,`function`,`a callback must be provided for exit handler`),p===!1&&m();var n=`exit`;return t&&t.alwaysLast&&(n=`afterexit`),l.on(n,e),function(){l.removeListener(n,e),l.listeners(`exit`).length===0&&l.listeners(`afterexit`).length===0&&u()}};var u=function(){p&&i(global.process)&&(p=!1,o.forEach(function(e){try{r.removeListener(e,f[e])}catch{}}),r.emit=_,r.reallyExit=h,--l.count)};t.exports.unload=u;var d=function(e,t,n){
|
|
25
|
+
/* istanbul ignore if */
|
|
26
|
+
l.emitted[e]||(l.emitted[e]=!0,l.emit(e,t,n))},f={};o.forEach(function(e){f[e]=function(){
|
|
27
|
+
/* istanbul ignore if */
|
|
28
|
+
i(global.process)&&r.listeners(e).length===l.count&&(u(),d(`exit`,null,e),d(`afterexit`,null,e),s&&e===`SIGHUP`&&(e=`SIGINT`),r.kill(r.pid,e))}}),t.exports.signals=function(){return o};var p=!1,m=function(){!p&&i(global.process)&&(p=!0,l.count+=1,o=o.filter(function(e){try{return r.on(e,f[e]),!0}catch{return!1}}),r.emit=v,r.reallyExit=g)};t.exports.load=m;var h=r.reallyExit,g=function(e){
|
|
29
|
+
/* istanbul ignore if */
|
|
30
|
+
i(global.process)&&(r.exitCode=e||/* istanbul ignore next */0,d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),h.call(r,r.exitCode))},_=r.emit,v=function(e,t){if(e===`exit`&&i(global.process)){
|
|
31
|
+
/* istanbul ignore else */
|
|
32
|
+
t!==void 0&&(r.exitCode=t);var n=_.apply(this,arguments);
|
|
33
|
+
/* istanbul ignore next */
|
|
34
|
+
return d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),n}return _.apply(this,arguments)}}})),it=/* @__PURE__ */ e(tt(),1),at=/* @__PURE__ */ e(rt(),1);const ot=(0,it.default)(()=>{(0,at.default)(()=>{o.stderr.write(`\x1B[?25h`)},{alwaysLast:!0})});let H=!1;const U={};U.show=(e=o.stderr)=>{e.isTTY&&(H=!1,e.write(`\x1B[?25h`))},U.hide=(e=o.stderr)=>{e.isTTY&&(ot(),H=!0,e.write(`\x1B[?25l`))},U.toggle=(e,t)=>{e!==void 0&&(H=e),H?U.show(t):U.hide(t)};var st=/* @__PURE__ */ t(((e,t)=>{var n={};t===void 0?window.eastasianwidth=n:t.exports=n,n.eastAsianWidth=function(e){var t=e.charCodeAt(0),n=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=n&&n<=57343&&(t&=1023,n&=1023,r=t<<10|n,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?`F`:r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?`H`:4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?`W`:32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?`Na`:r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?`A`:`N`},n.characterLength=function(e){var t=this.eastAsianWidth(e);return t==`F`||t==`W`||t==`A`?2:1};function r(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}n.length=function(e){for(var t=r(e),n=0,i=0;i<t.length;i++)n+=this.characterLength(t[i]);return n},n.slice=function(e,t,i){textLen=n.length(e),t||=0,i||=1,t<0&&(t=textLen+t),i<0&&(i=textLen+i);for(var a=``,o=0,s=r(e),c=0;c<s.length;c++){var l=s[c],u=n.length(l);if(o>=t-+(u==2)){if(o+u<=i)a+=l;else break}o+=u}return a}})),ct=/* @__PURE__ */ t(((e,t)=>{t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}})),lt=/* @__PURE__ */ e(st(),1),ut=/* @__PURE__ */ e(ct(),1);function W(e,t={}){if(typeof e!=`string`||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=i(e),e.length===0))return 0;e=e.replace((0,ut.default)(),` `);let n=t.ambiguousIsNarrow?1:2,r=0;for(let t of e){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=768&&e<=879))switch(lt.default.eastAsianWidth(t)){case`F`:case`W`:r+=2;break;case`A`:r+=n;break;default:r+=1}}return r}const G=/* @__PURE__ */ new Set([`\x1B`,``]),dt=`]8;;`,ft=e=>`${G.values().next().value}[${e}m`,pt=e=>`${G.values().next().value}${dt}${e}`,mt=e=>e.split(` `).map(e=>W(e)),ht=(e,t,n)=>{let r=[...t],a=!1,o=!1,s=W(i(e[e.length-1]));for(let[t,i]of r.entries()){let c=W(i);if(s+c<=n?e[e.length-1]+=i:(e.push(i),s=0),G.has(i)&&(a=!0,o=r.slice(t+1).join(``).startsWith(dt)),a){o?i===`\x07`&&(a=!1,o=!1):i===`m`&&(a=!1);continue}s+=c,s===n&&t<r.length-1&&(e.push(``),s=0)}!s&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},gt=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(W(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},_t=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,o,s=mt(e),c=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let e=W(c[c.length-1]);if(r!==0&&(e>=t&&(n.wordWrap===!1||n.trim===!1)&&(c.push(``),e=0),(e>0||n.trim===!1)&&(c[c.length-1]+=` `,e++)),n.hard&&s[r]>t){let n=t-e,a=1+Math.floor((s[r]-n-1)/t);Math.floor((s[r]-1)/t)<a&&c.push(``),ht(c,i,t);continue}if(e+s[r]>t&&e>0&&s[r]>0){if(n.wordWrap===!1&&e<t){ht(c,i,t);continue}c.push(``)}if(e+s[r]>t&&n.wordWrap===!1){ht(c,i,t);continue}c[c.length-1]+=i}n.trim!==!1&&(c=c.map(e=>gt(e)));let l=[...c.join(`
|
|
35
|
+
`)];for(let[e,t]of l.entries()){if(r+=t,G.has(t)){let{groups:t}=RegExp(`(?:\\[(?<code>\\d+)m|\\${dt}(?<uri>.*))`).exec(l.slice(e).join(``))||{groups:{}};if(t.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t.uri!==void 0&&(o=t.uri.length===0?void 0:t.uri)}let n=a.codes.get(Number(i));l[e+1]===`
|
|
36
|
+
`?(o&&(r+=pt(``)),i&&n&&(r+=ft(n))):t===`
|
|
37
|
+
`&&(i&&n&&(r+=ft(i)),o&&(r+=pt(o)))}return r};function vt(e,t,n){return String(e).normalize().replace(/\r\n/g,`
|
|
38
|
+
`).split(`
|
|
39
|
+
`).map(e=>_t(e,t,n)).join(`
|
|
40
|
+
`)}function yt(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}const bt=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,xt=[`\x1B`,``],K=e=>`${xt[0]}[${e}m`,St=(e,t,n)=>{let r=[];e=[...e];for(let n of e){let i=n;n.includes(`;`)&&(n=n.split(`;`)[0][0]+`0`);let o=a.codes.get(Number.parseInt(n,10));if(o){let n=e.indexOf(o.toString());n===-1?r.push(K(t?o:i)):e.splice(n,1)}else if(t){r.push(K(0));break}else r.push(K(i))}if(t&&(r=r.filter((e,t)=>r.indexOf(e)===t),n!==void 0)){let e=K(a.codes.get(Number.parseInt(n,10)));r=r.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return r.join(``)};function Ct(e,t,n){let r=[...e],i=[],a=typeof n==`number`?n:r.length,o=!1,s,c=0,l=``;for(let[u,d]of r.entries()){let r=!1;if(xt.includes(d)){let t=/\d[^m]*/.exec(e.slice(u,u+18));s=t&&t.length>0?t[0]:void 0,c<a&&(o=!0,s!==void 0&&i.push(s))}else o&&d===`m`&&(o=!1,r=!0);if(!o&&!r&&c++,!bt.test(d)&&yt(d.codePointAt())&&(c++,typeof n!=`number`&&a++),c>t&&c<=a)l+=d;else if(c===t&&!o&&s!==void 0)l=St(i);else if(c>=a){l+=St(i,!0,s);break}}return l}const q=e=>{let{columns:t}=e;return t||80},wt=(e,t)=>{let n=e.rows||24,r=t.split(`
|
|
41
|
+
`),a=r.length-n;return a<=0?t:Ct(t,i(r.slice(0,a).join(`
|
|
42
|
+
`)).length+1)};function Tt(e,{showCursor:t=!1}={}){let n=0,r=q(e),i=``,a=(...a)=>{t||U.hide();let o=a.join(` `)+`
|
|
43
|
+
`;o=wt(e,o);let s=q(e);(o!==i||r!==s)&&(i=o,r=s,o=vt(o,s,{trim:!1,hard:!0,wordWrap:!1}),e.write(V.eraseLines(n)+o),n=o.split(`
|
|
44
|
+
`).length)};return a.clear=()=>{e.write(V.eraseLines(n)),i=``,r=q(e),n=0},a.done=()=>{i=``,r=q(e),n=0,t||U.show()},a}Tt(o.stdout),Tt(o.stderr);const J=Tt(Fe),Y=m(P.bar),X=m(P.corners.bl),Z=m(P.leftT);function Q(e,t,n){let r=e.validate?.(n);if(r){let t=r instanceof Error?r.message:r;if(e.throwOnError)throw Error(t);Ze(t)}return R(t.submit({value:n}).join(`
|
|
45
|
+
`)),n}const Et=async e=>{let t={...Dt(e),...e.renderers},n,r=(n,r)=>{let i=n.state;return i===`initial`&&e.initialErrorMessage&&(i=`error`,n.error=e.initialErrorMessage),t[i](n,r).join(`
|
|
46
|
+
`)};if(e.type===`select`){let i=String(e.defaultValue);if(e.acceptDefault)return Q(e,t,i);n=new Me({...e,options:e.options.filter(e=>!e.hidden),initialValue:i,render(){return r(this,n)}})}else if(e.type===`confirm`){let i=!!e.defaultValue;if(e.acceptDefault)return Q(e,t,i);n=new Ae({...e,initialValue:i,active:e.activeText||``,inactive:e.inactiveText||``,render(){return r(this,n)}})}else if(e.type==`multiselect`){let i;if(Array.isArray(e.defaultValue)?i=e.defaultValue:e.defaultValue!==void 0&&(i=[String(e.defaultValue)]),e.acceptDefault)return Q(e,t,i);n=new je({...e,options:e.options,initialValues:i,render(){return r(this,n)}})}else if(e.type===`list`){let i=String(e.defaultValue);if(e.acceptDefault)return Q(e,t,i);n=new Pe({...e,onRefresh:e.onRefresh??(()=>Promise.resolve(e.options)),initialValue:i,render(){return r(this,n)}})}else{let i=e.initialValue??String(e.defaultValue??``);if(e.acceptDefault)return Q(e,t,i);n=new Ne({...e,initialValue:e.initialValue,defaultValue:String(e.defaultValue??``),render(){return r(this,n)}})}let i=await n.prompt();if(Oe(i)){if(e.throwOnError)throw new ae(`Operation cancelled`);Ke(`Operation cancelled`),process.exit(0)}return i},$=(e,t)=>{let{question:n,label:r}=e;if(e.type!==`confirm`&&!t)return[`${Z} ${n} ${h(`(skipped)`)}`,`${Y}`];let i=e.type===`confirm`?`${Y} ${b(t)} ${h(r)}`:`${Y} ${b(r)} ${h(t)}`;return[`${Z} ${n}`,i,`${Y}`]},Dt=e=>{switch(e.type){case`select`:return kt(e);case`confirm`:return jt(e);case`text`:return Ot(e);case`multiselect`:return kt(e);case`list`:return At(e)}},Ot=e=>{let{question:t}=e,n=e.helpText??``,r=e.format??(e=>String(e)),i=e.defaultValue?.toString()??``,a=e=>{let{userInputWithCursor:a}=e;return[`${X} ${_(t)} ${h(n)}`,`${I(2)}${r(a||h(i))}`,``]};return{initial:()=>[`${X} ${_(t)} ${h(n)}`,`${I(2)}${m(r(i))}`,``],active:a,error:({value:e,error:i})=>[`${Z} ${F.error} ${h(i)}`,`${Y}`,`${X} ${t} ${h(n)}`,`${I(2)}${r(e)}`,``],submit:({value:t})=>$(e,r(t??``)),cancel:a}},kt=e=>{let{options:t,question:n,helpText:r}=e,i=r??``,a=e.maxItemsPerPage??32,o=({cursor:e=0,value:r})=>{let o=(t,n)=>{let{label:i,value:a}=t,o=n===e,s=Array.isArray(r)&&r.includes(a),c=s||o?S:p,l=o?c.underline(i):c(i),u=t.sublabel?c.grey(t.sublabel):``,d=c(s||o&&!Array.isArray(r)?t.activeIcon??P.radioActive:t.inactiveIcon??P.radioInactive);return`${I(2)}${d} ${l} ${u}`},s=(n,r)=>t.length<=a?!0:r<e?t.length-r<=a:e+a>r,c=t.filter(e=>!e.hidden),l=c.at(e),u=[`${X} ${_(n)} ${h(i)}`,`${e>0&&t.length>a?`${I(2)}${h(`...`)}\n`:``}${c.map(o).filter(s).join(`
|
|
47
|
+
`)}${e+a<t.length&&t.length>a?`\n${I(2)}${h(`...`)}`:``}`,``];if(l?.description){let e=new Intl.Segmenter(`en`,{granularity:`word`}),t=I(2),n=process.stdout.columns-Ye(t).length*2,r=Ye(l.description),i=[],a=0;for(let t of e.segment(r)){let e=i[a]??``;e.length+t.segment.length>n&&(a++,e=``,t.segment.match(/^\s+$/))||(i[a]=e+t.segment)}u.push(h(i.map(e=>t+e+t).join(`
|
|
48
|
+
`)),``)}return u};return{initial:o,active:o,confirm:o,error:(e,t)=>[`${Z} ${F.error} ${h(e.error)}`,`${Y}`,...o(e,t)],submit:({value:n})=>Array.isArray(n)?$(e,t.filter(e=>n.includes(e.value)).map(e=>e.label).join(`, `)):$(e,t.find(e=>e.value===n)?.label),cancel:o}},At=e=>{let{question:t,helpText:n}=e,r=e.options,i=n??``,{rows:a}=Fe,o=({cursor:e,value:n},o)=>{o instanceof Pe&&(r=o.options),e??=0;let s=0,c=(e,t)=>{let{label:r,value:i}=e,a=i.toString(),o=t===s,c=Array.isArray(n)&&n.includes(a),l=c||o?S:p,u=o?l.underline(r):l(r),d=l(c||o&&!Array.isArray(n)?P.radioActive:P.radioInactive);return[`${I(2)}${d} ${u}`,...e.details.map((t,n)=>`${I(6)}${n===e.details.length-1?m(P.corners.bl):Y} ${t}`)]},l=[],u={size:0,options:[]};for(let e of r){let t=e.details.length+1;if(u.size+t>a-6){l.push(u.options),u={size:t,options:[e]};continue}u.size+=t,u.options.push(e)}u.size!==0&&l.push(u.options);let d=!0,f=!1,g=[],v=0;for(let t=0;t<l.length;t++){let n=l[t];if(e>=v&&n.length+v>e){d=t===0,f=t===l.length-1,g=n,s=e-v;break}v+=n.length}return[`${X} ${_(t)} ${h(i)}`,...d?[]:[`${I(2)}${h(`...`)}`],...g.map(c).reduce((e,t)=>[...e,...t],[]),...f?[]:[`${I(2)}${h(`...`)}`]]};return{initial:o,active:o,confirm:o,error:(e,t)=>[`${Z} ${F.error} ${h(e.error)}`,`${Y}`,...o(e,t)],submit:({value:t})=>Array.isArray(t)?$(e,r.filter(e=>t.includes(e.value)).map(e=>e.value).join(`, `)):$(e,r.find(e=>e.value===t)?.value),cancel:o}},jt=e=>{let{activeText:t,inactiveText:n,question:r,helpText:i}=e,a=i??``,o=t||`Yes`,s=n||`No`,c=({value:e})=>{let t=e?S.underline:h,n=e?h:S.underline;return[`${X} ${_(r)} ${h(a)}`,`${I(2)}${t(o)} / ${n(s)}`]};return{initial:c,active:c,confirm:c,error:c,submit:({value:t})=>$(e,t?`yes`:`no`),cancel:c}},Mt={clockwise:[`┤`,`┘`,`┴`,`└`,`├`,`┌`,`┬`,`┐`],vertical:[`▁`,`▃`,`▄`,`▅`,`▆`,`▇`,`▆`,`▅`,`▄`,`▃`]},Nt=[``,`.`,`..`,`...`,` ..`,` .`,``],Pt=(e=Mt.clockwise,t=b)=>{let n=null,r,i;function a(){n&&clearTimeout(n),n=null}return{start(o,s){if(s||=``,i=o,r=i,s!==void 0&&s.length>0&&(r+=` ${h(s)}`),Ft()){let r=0;a(),n=setInterval(()=>{r++;let n=e[r%e.length],a=Nt[r%Nt.length];o&&J(`${t(n)} ${i} ${a}`)},120)}else R(`${Z} ${r}`)},update(e){i=e},stop(e){Ft()?(J.clear(),e&&(J(`${Z} ${r}\n${Y} ${e}`),J.done(),z()),a()):(e!==void 0&&R(`${Y} ${e}`),z())}}};function Ft(){try{return!!(process.stdin.isTTY&&process.stdout.isTTY)}catch{return!1}}function It(){return!Ft()||Re.isCI}const Lt=Re.isCI;export{f as A,b as C,w as D,te as E,p as O,_ as S,m as T,Je as _,Z as a,ae as b,Ge as c,R as d,z as f,Ye as g,We as h,Ft as i,re as k,Ve as l,P as m,It as n,Pt as o,Be as p,Et as r,Ke as s,Lt as t,He as u,Ue as v,h as w,S as x,qe as y};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-CGLsxbc6.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-BtkTVcHI.mjs";import{t as i}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";function a(e){return e.usage(`$0 ips list
|
|
3
3
|
|
|
4
4
|
Get IPs used on the Cloudflare/JD Cloud network, see https://www.cloudflare.com/ips for Cloudflare IPs or https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD Cloud IPs.`).option(`networks`,{type:`string`,description:"Specified as `jdcloud` to list IPs used by JD Cloud data centers."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:a,handler:async a=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={networks:a.networks};if(a.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.ips.list(i));t(s,{successLabel:`Loaded`})})},s={command:`ips`,describe:`ips`,builder:e=>e.command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-RlgRrmbm.mjs";function p(e){return e.usage("$0 k2 streams create\n\nCreate a new K2 stream. HTTP is disabled when `http` is omitted. Enabled HTTP requires authentication and allows all origins unless `authentication` or `cors` say otherwise. At least one input must be enabled.").option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`name`,{type:`string`,description:`Specifies the name of the K2 stream.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`,default:604800}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0)){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0}).check(e=>{if([`worker-binding-enabled`].some(t=>e[t]!==void 0)){let t=[`worker-binding-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --worker_binding-* flag is set`)}return!0})}const m={command:`create`,describe:`Create K2 stream`,builder:p,handler:async f=>s({command:`k2 streams create`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=await n();a({command:`cf k2 streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({http:{authentication:f[`http-authentication`],cors:{origins:f[`http-cors-origins`]},enabled:f[`http-enabled`]},name:u(f.name,`name`,`text`),retention_seconds:f[`retention-seconds`],worker_binding:{enabled:f[`worker-binding-enabled`]}}):c(f.body)});return}let s=await t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Creating`,async()=>s.k2.streams.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`Specifies the name of the K2 stream.`));let m=l({http:{authentication:f[`http-authentication`],cors:{origins:f[`http-cors-origins`]},enabled:f[`http-enabled`]},name:u(f.name,`name`,`text`),retention_seconds:f[`retention-seconds`],worker_binding:{enabled:f[`worker-binding-enabled`]}}),h=await o(`Creating`,async()=>s.k2.streams.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function h(e){return e.usage(`$0 k2 streams delete <stream-id>
|
|
3
|
+
|
|
4
|
+
Delete a K2 stream in an account. Deleting a stream that does not exist also succeeds.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <stream-id>`,describe:`Delete K2 stream`,builder:h,handler:async c=>s({command:`k2 streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf k2 streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
|
|
5
|
+
`);return}let u=await o(`Deleting`,async()=>s.k2.streams.delete({account_id:l,stream_id:c[`stream-id`]}));i(u,{successLabel:`Deleted`})})};function _(e){return e.usage(`$0 k2 streams get <stream-id>
|
|
6
|
+
|
|
7
|
+
Get K2 stream details.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <stream-id>`,describe:`Get K2 stream`,builder:_,handler:async c=>s({command:`k2 streams get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf k2 streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.k2.streams.get({account_id:l,stream_id:c[`stream-id`]}));i(u,{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 k2 streams list
|
|
8
|
+
|
|
9
|
+
List or filter K2 streams in an account.`).option(`name`,{type:`string`,description:`Filters K2 streams by name using a case-insensitive substring.`}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List K2 streams`,builder:y,handler:async c=>s({command:`k2 streams list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={name:c.name,page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf k2 streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.k2.streams.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 k2 streams subscriptions list
|
|
10
|
+
|
|
11
|
+
Lists every subscription on one stream, oldest first. Lag uses committed positions, not reserved read positions. A failed tail observation preserves subscription metadata and returns unavailable lag.`).option(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List K2 stream subscriptions`,builder:x,handler:async c=>s({command:`k2 streams subscriptions list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf k2 streams subscriptions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}/subscriptions`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.k2.streams.subscriptions.list({account_id:l,stream_id:c[`stream-id`]}));i(u,{successLabel:`Loaded`})})},C={command:`subscriptions`,describe:`Subscriptions that consume a K2 stream, with committed-position lag`,builder:e=>e.command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage("$0 k2 streams update <stream-id>\n\nUpdate a K2 stream. Omitted `http` settings, such as `authentication` and `cors`, keep their current values. Disabling HTTP keeps them, so enabling HTTP again restores them. At least one input must remain enabled.").positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0)){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0}).check(e=>{if([`worker-binding-enabled`].some(t=>e[t]!==void 0)){let t=[`worker-binding-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --worker_binding-* flag is set`)}return!0})}const T={command:`update <stream-id>`,describe:`Update K2 stream`,builder:w,handler:async u=>s({command:`k2 streams update`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=await n();a({command:`cf k2 streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams/${u[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(u[`stream-id`]))}`,pathParams:{"stream-id":String(u[`stream-id`]??``)},bodyKind:`json`,body:u.body===void 0?l({http:{authentication:u[`http-authentication`],cors:{origins:u[`http-cors-origins`]},enabled:u[`http-enabled`]},retention_seconds:u[`retention-seconds`],worker_binding:{enabled:u[`worker-binding-enabled`]}}):c(u.body)});return}let s=await t(u),d=u.local?e:await r();if(u.accountId=d,u.body){let e=c(u.body),t=await o(`Updating`,async()=>s.k2.streams.update({...e,account_id:d,stream_id:u[`stream-id`]}));i(t,{successLabel:`Updated`});return}let f=l({http:{authentication:u[`http-authentication`],cors:{origins:u[`http-cors-origins`]},enabled:u[`http-enabled`]},retention_seconds:u[`retention-seconds`],worker_binding:{enabled:u[`worker-binding-enabled`]}}),p=await o(`Updating`,async()=>s.k2.streams.update({...f,account_id:d,stream_id:u[`stream-id`]}));i(p,{successLabel:`Updated`})})},E={command:`streams`,describe:`K2 streams, their retention, and the HTTP and Workers binding inputs used to produce records`,builder:e=>e.command(m).command(g).command(v).command(b).command(T).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},D={command:`k2`,describe:`Durable, ordered event streams that you produce records to and consume from with subscriptions`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{D as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,n as u}from"./prompt-RlgRrmbm.mjs";function d(e){return e.usage(`$0 keyless-certificates create
|
|
3
3
|
|
|
4
4
|
Creates a Keyless SSL configuration that allows SSL/TLS termination without exposing private keys to Cloudflare. Keys remain on your infrastructure.`).option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or SSL certificate and intermediate(s).`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`,default:24008}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --tunnel-* flag is set`)}return!0})}const f={command:`create`,describe:`Create Keyless SSL Configuration`,builder:d,handler:async u=>a({command:`keyless-certificates create`,classification:{safeFlags:[`bundle-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf keyless-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({bundle_method:c(u[`bundle-method`],`bundle-method`,`text`),certificate:c(u.certificate,`certificate`,`text`),host:c(u.host,`host`,`text`),name:c(u.name,`name`,`text`),port:u.port,tunnel:{private_ip:c(u[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(u[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Creating`,async()=>a.keylessCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}if(u.certificate===void 0&&(u.certificate=await l(`certificate`,`The zone's SSL certificate or SSL certificate and intermediate(s).`)),u.host===void 0&&(u.host=await l(`host`,`The keyless SSL name.`)),u.port===void 0)throw Error(`--port is required (or pass --body with this field set).`);let f=s({bundle_method:c(u[`bundle-method`],`bundle-method`,`text`),certificate:c(u.certificate,`certificate`,`text`),host:c(u.host,`host`,`text`),name:c(u.name,`name`,`text`),port:u.port,tunnel:{private_ip:c(u[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(u[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}),p=await i(`Creating`,async()=>a.keylessCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function p(e){return e.usage(`$0 keyless-certificates delete <keyless-certificate-id>
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";function c(e){return e.usage(`$0 keys list
|
|
3
3
|
|
|
4
4
|
Lists all distinct tag keys used across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`list`,describe:`List tag keys`,builder:c,handler:async c=>s({command:`keys list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor};if(c.dryRun){let e=await n();a({command:`cf keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/keys`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.keys.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},u={command:`keys`,describe:`keys`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{i as t,n}from"./auth-CGLsxbc6.mjs";import{a as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d,t as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-RlgRrmbm.mjs";import{t as h}from"./cli-types-9oYmRTHJ.mjs";import{n as g,t as _}from"./raw-fetch-B4NvWuZD.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
|
|
3
3
|
|
|
4
4
|
Deletes up to 10,000 key-value pairs from the specified Workers KV namespace. Send a JSON array of the key names to delete. The result reports the number of successful deletions and any keys that failed and should be retried.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`delete <namespace-id>`,describe:`Delete multiple key-value pairs`,builder:v,handler:async u=>c({command:`kv bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},u,async()=>{if(u.dryRun){let e=await r();o({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${u[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(u[`namespace-id`]??``)},bodyKind:`json`,body:u.body===void 0?void 0:l(u.body)});return}let c=await n(u),d=u.local?e:await i();if(u.accountId=d,!await m({force:!!u.force,message:`This operation deletes the specified keys and their values from the Workers KV namespace.`})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}if(u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let n=Math.ceil(e.length/1e4),r=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4),o=Math.floor(i/1e4)+1;r=await s(`Deleting: batch ${o}/${n}`,async()=>t(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:a}))}a(r,{successLabel:`Deleted`});return}let n=await s(`Deleting`,async()=>t(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:e}));a(n,{successLabel:`Deleted`});return}if(u.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function b(e){return e.usage("$0 kv bulk get <namespace-id>\n\nRetrieves the text-based values of up to 100 keys from the specified Workers KV namespace. The result maps each requested key to its value. Set `type` to `json` to parse JSON values instead of returning strings, and set `withMetadata` to `true` to include metadata with each value. Binary values are not supported by this operation.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:"Return values as strings with `text`, or parse stored JSON values with `json`.",choices:[`text`,`json`],default:`text`}).option(`with-metadata`,{type:`boolean`,description:`Whether to include metadata in the response.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`get <namespace-id>`,describe:`Get multiple key-value pairs`,builder:b,handler:async t=>c({command:`kv bulk get`,classification:{safeFlags:[`type`,`with-metadata`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(t[`namespace-id`]??``)},bodyKind:`json`,body:t.body===void 0?u({keys:t.keys,type:d(t.type,`type`,`text`),withMetadata:t[`with-metadata`]}):l(t.body)});return}let c=await n(t),f=t.local?e:await i();if(t.accountId=f,t.body){let e=l(t.body),n=await s(`Creating`,async()=>c.kv.bulk.get({...e,account_id:f,namespace_id:t[`namespace-id`]}));a(n,{successLabel:`Created`});return}if(t.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let p=u({keys:t.keys,type:d(t.type,`type`,`text`),withMetadata:t[`with-metadata`]}),m=await s(`Creating`,async()=>c.kv.bulk.get({...p,account_id:f,namespace_id:t[`namespace-id`]}));a(m,{successLabel:`Created`})})};function S(e){return e.usage("$0 kv bulk put <namespace-id>\n\nWrites up to 10,000 key-value pairs to the specified Workers KV namespace from a JSON array, with optional metadata and expiration settings for each pair. Existing values and expirations are overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence. The entire request must be 100 megabytes or less. The result reports the number of successful writes and any keys that failed and should be retried.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`put <namespace-id>`,describe:`Write multiple key-value pairs`,builder:S,handler:async u=>c({command:`kv bulk put`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){let e=await r();o({command:`cf kv bulk put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${u[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(u[`namespace-id`]))}/bulk`,pathParams:{"namespace-id":String(u[`namespace-id`]??``)},bodyKind:`json`,body:u.body===void 0?void 0:l(u.body)});return}let c=await n(u),d=u.local?e:await i();if(u.accountId=d,u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let n=Math.ceil(e.length/1e4),r=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4),o=Math.floor(i/1e4)+1;r=await s(`Updating: batch ${o}/${n}`,async()=>t(c,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk`,{body:a}))}a(r,{successLabel:`Updated`});return}let n=await s(`Updating`,async()=>t(c,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk`,{body:e}));a(n,{successLabel:`Updated`});return}if(u.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},w={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage("$0 kv keys delete <key-name>\n\nDeletes the specified key and its value from the Workers KV namespace. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`delete <key-name>`,describe:`Delete a key-value pair`,builder:T,handler:async t=>c({command:`kv keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}/values/${t[`key-name`]==null?`<key-name>`:encodeURIComponent(String(t[`key-name`]))}`,pathParams:{"key-name":String(t[`key-name`]??``),"namespace-id":String(t[`namespace-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await m({force:!!t.force,message:`This operation deletes the selected key-value pair from the Workers KV namespace.`})){process.stderr.write(`Aborted.
|
|
6
6
|
`);return}let u=await s(`Deleting`,async()=>c.kv.keys.delete({account_id:l,namespace_id:t[`namespace-id`],key_name:t[`key-name`]}));a(u,{successLabel:`Deleted`})})};function D(e){return e.usage("$0 kv keys get <key-name>\n\nReturns the value stored under the specified key in the Workers KV namespace as raw bytes. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If the key-value pair expires, the `expiration` response header contains its expiration time in seconds since the UNIX epoch.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const O={command:`get <key-name>`,describe:`Get a key's value`,builder:D,handler:async t=>c({command:`kv keys get`,classification:{safeFlags:[`dry-run`,`text`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv keys get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}/values/${t[`key-name`]==null?`<key-name>`:encodeURIComponent(String(t[`key-name`]))}`,pathParams:{"key-name":String(t[`key-name`]??``),"namespace-id":String(t[`namespace-id`]??``)},bodyKind:`none`});return}await n(t);let a=t.local?e:await i();t.accountId=a;let c=await s(`Loading`,async()=>_(`/accounts/${a}/storage/kv/namespaces/${encodeURIComponent(String(t[`namespace-id`]))}/values/${encodeURIComponent(String(t[`key-name`]))}`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));g(t.text===!0?c.toString(`utf-8`):c)})};function k(e){return e.usage("$0 kv keys list\n\nLists key names in the specified Workers KV namespace, with expiration times and metadata when present. Use `prefix` to filter names and `cursor` to request the next page. Values are not included.").option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`limit`,{type:`number`,description:"Maximum number of keys to return in one response. Pass `result_info.cursor` from the response as `cursor` to request the next page."}).option(`prefix`,{type:`string`,description:`Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned.`}).option(`cursor`,{type:`string`,description:"Opaque pagination token from `result_info.cursor` in the previous response. Pass it unchanged to request the next page of keys."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List keys in a namespace`,builder:k,handler:async t=>c({command:`kv keys list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={limit:t.limit,prefix:t.prefix,cursor:t.cursor};if(t.dryRun){let e=await r();o({command:`cf kv keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}/keys`,pathParams:{"namespace-id":String(t[`namespace-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.kv.keys.list({account_id:u,namespace_id:t[`namespace-id`],...c}));a(d,{successLabel:`Loaded`})})};function j(e){return e.usage("$0 kv keys put <key-name>\n\nWrites a value under the specified key in the Workers KV namespace, creating the key-value pair or replacing its existing value, expiration, and metadata. Send the value as an `application/octet-stream` request body, or use `multipart/form-data` with a `value` part and an optional JSON `metadata` part. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`expiration`,{type:`number`,description:`Expires the key at a certain time, measured in number of seconds since the UNIX epoch.`}).option(`expiration-ttl`,{type:`number`,description:"Number of seconds until the key expires. Must be at least 60. Takes precedence over `expiration` when both are specified."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A byte sequence to be stored, up to 25 MiB in length.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`The metadata`})}const M={command:`put <key-name>`,describe:`Write a key-value pair with optional metadata`,builder:j,handler:async l=>c({command:`kv keys put`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={expiration:l.expiration,expiration_ttl:l[`expiration-ttl`]};if(l.dryRun){let e=await r();o({command:`cf kv keys put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${l[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(l[`namespace-id`]))}/values/${l[`key-name`]==null?`<key-name>`:encodeURIComponent(String(l[`key-name`]))}`,pathParams:{"key-name":String(l[`key-name`]??``),"namespace-id":String(l[`namespace-id`]??``)},query:c,bodyKind:l.metadata===void 0?`octet-stream`:`multipart`,body:l.metadata===void 0?l.body:{body:l.body,file:l.file,metadata:l.metadata}});return}let u=await n(l),p=l.local?e:await i();if(l.accountId=p,l.metadata!==void 0){let e=new FormData;if(l.file){let t=f(l.file);e.append(`value`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`value`,l.body);l.metadata!==void 0&&e.append(`metadata`,String(d(l.metadata,`metadata`,`text`)??``));let n=await s(`Updating`,async()=>t(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}`,{body:e}));a(n,{successLabel:`Updated`});return}if(l.file){let e=f(l.file),n=await s(`Updating`,async()=>t(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`}}));a(n,{successLabel:`Updated`});return}if(l.body){let e=d(l.body,`body`,`binary`),n=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),r=await s(`Updating`,async()=>t(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}${n?`?`+n:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}}));a(r,{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},N={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(E).command(O).command(A).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage("$0 kv metadata get <key-name>\n\nReturns the JSON metadata associated with the specified key in the Workers KV namespace, without retrieving its value. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <key-name>`,describe:`Get a key's metadata`,builder:P,handler:async t=>c({command:`kv metadata get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv metadata get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}/metadata/${t[`key-name`]==null?`<key-name>`:encodeURIComponent(String(t[`key-name`]))}`,pathParams:{"key-name":String(t[`key-name`]??``),"namespace-id":String(t[`namespace-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.kv.metadata.get({account_id:l,namespace_id:t[`namespace-id`],key_name:t[`key-name`]}));a(u,{successLabel:`Loaded`})})},I={command:`metadata`,describe:`Operations for metadata`,builder:e=>e.command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 kv namespaces create
|
|
7
7
|
|
|
8
|
-
Creates a Workers KV namespace in the specified account with the given title. Returns \`400\` if the account already owns a namespace with that title; an existing namespace must be explicitly deleted before it can be replaced. An optional jurisdiction restricts where data is durably stored and can only be set at creation time.`).option(`jurisdiction`,{type:`string`,description:`Specify the jurisdiction to restrict the KV namespace to durably store data within. Can only be set at namespace creation time.`,choices:[`eu`,`fedramp`,`us`]}).option(`title`,{type:`string`,description:`Human-readable string name for a Workers KV namespace.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`create`,describe:`Create a namespace`,builder:L,handler:async t=>c({command:`kv namespaces create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces`,pathParams:{},bodyKind:`json`,body:t.body===void 0?u({jurisdiction:d(t.jurisdiction,`jurisdiction`,`text`),title:d(t.title,`title`,`text`)}):l(t.body)});return}let c=await n(t),f=t.local?e:await i();if(t.accountId=f,t.body){let e=l(t.body),n=await s(`Creating`,async()=>c.kv.namespaces.create({...e,account_id:f}));a(n,{successLabel:`Created`});return}t.title===void 0&&(t.title=await p(`title`,`Human-readable string name for a Workers KV namespace.`));let m=u({jurisdiction:d(t.jurisdiction,`jurisdiction`,`text`),title:d(t.title,`title`,`text`)}),h=await s(`Creating`,async()=>c.kv.namespaces.create({...m,account_id:f}));a(h,{successLabel:`Created`})})};function z(e){return e.usage(`$0 kv namespaces delete <namespace-id>
|
|
8
|
+
Creates a Workers KV namespace in the specified account with the given title. Returns \`400\` if the account already owns a namespace with that title; an existing namespace must be explicitly deleted before it can be replaced. An optional jurisdiction restricts where data is durably stored and can only be set at creation time.`).option(`jurisdiction`,{type:`string`,description:`Specify the jurisdiction to restrict the KV namespace to durably store data within. Can only be set at namespace creation time.`,choices:[`eu`,`fedramp`,`us`]}).option(`namespace-mode`,{type:`string`,description:"The mode of the Workers KV namespace. Specify `instant` when creating a namespace to create a KV Instant namespace. Omit this field when creating a namespace to create a classic namespace. Currently, `instant` is the only supported explicit value.",choices:[`instant`]}).option(`title`,{type:`string`,description:`Human-readable string name for a Workers KV namespace.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`create`,describe:`Create a namespace`,builder:L,handler:async t=>c({command:`kv namespaces create`,classification:{safeFlags:[`jurisdiction`,`namespace-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces`,pathParams:{},bodyKind:`json`,body:t.body===void 0?u({jurisdiction:d(t.jurisdiction,`jurisdiction`,`text`),mode:d(t[`namespace-mode`],`namespace-mode`,`text`),title:d(t.title,`title`,`text`)}):l(t.body)});return}let c=await n(t),f=t.local?e:await i();if(t.accountId=f,t.body){let e=l(t.body),n=await s(`Creating`,async()=>c.kv.namespaces.create({...e,account_id:f}));a(n,{successLabel:`Created`});return}t.title===void 0&&(t.title=await p(`title`,`Human-readable string name for a Workers KV namespace.`));let m=u({jurisdiction:d(t.jurisdiction,`jurisdiction`,`text`),mode:d(t[`namespace-mode`],`namespace-mode`,`text`),title:d(t.title,`title`,`text`)}),h=await s(`Creating`,async()=>c.kv.namespaces.create({...m,account_id:f}));a(h,{successLabel:`Created`})})};function z(e){return e.usage(`$0 kv namespaces delete <namespace-id>
|
|
9
9
|
|
|
10
10
|
Deletes the specified Workers KV namespace and its stored key-value pairs from the account.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const B={command:`delete <namespace-id>`,describe:`Delete a namespace`,builder:z,handler:async t=>c({command:`kv namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}`,pathParams:{"namespace-id":String(t[`namespace-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await m({force:!!t.force,message:`This operation deletes the selected Workers KV namespace and all of its key-value pairs.`})){process.stderr.write(`Aborted.
|
|
11
11
|
`);return}let u=await s(`Deleting`,async()=>c.kv.namespaces.delete({account_id:l,namespace_id:t[`namespace-id`]}));a(u,{successLabel:`Deleted`})})};function V(e){return e.usage(`$0 kv namespaces get <namespace-id>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-
|
|
2
|
+
function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-CkbrPJPx.mjs`);await i(r,e,()=>t.default.handler(e))}}}export{e as t};
|
package/dist/{leaked-credential-checks-edbapECI.mjs → leaked-credential-checks-bvGrLOmQ.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{n as l}from"./prompt-RlgRrmbm.mjs";function u(e){return e.usage(`$0 leaked-credential-checks detections create
|
|
3
3
|
|
|
4
4
|
Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const d={command:`create`,describe:`Create a custom detection location for a zone.`,builder:u,handler:async l=>a({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Creating`,async()=>a.leakedCredentialChecks.detections.create({body:e,zone_id:u}));n(t,{successLabel:`Created`});return}let d=s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)}),f=await i(`Creating`,async()=>a.leakedCredentialChecks.detections.create({body:d,zone_id:u}));n(f,{successLabel:`Created`})})};function f(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-id>
|
|
5
5
|
|