cf 1.0.0-beta.1 → 1.0.0-beta.3
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/README.md +12 -0
- package/dist/_meta/commands.json +7481 -10370
- package/dist/_meta/hand-written-commands.json +578 -40
- package/dist/_meta/schemas.json +29048 -31332
- package/dist/{abuse-reports-Dd6kJM7r.mjs → abuse-reports-CWX7WKhe.mjs} +11 -11
- package/dist/access-2aKv_Dya.mjs +2 -0
- package/dist/{account-CZ9SPVdz.mjs → account-CnZO9-bl.mjs} +5 -5
- package/dist/{account-tags-DAf-hq1m.mjs → account-tags-ClLZOfTA.mjs} +4 -4
- package/dist/{accounts-BDIKjiG2.mjs → accounts-Cbj9aFyY.mjs} +59 -59
- package/dist/{acm-D-q1FVWJ.mjs → acm-wGJ9cnzE.mjs} +3 -3
- package/dist/{addressing-0w2U1NEy.mjs → addressing-YvHX2dAb.mjs} +50 -50
- package/dist/agent-context-GRiQ4zRU.mjs +2 -0
- package/dist/{agent-memory-Drumm4qd.mjs → agent-memory-B4N-lmLb.mjs} +15 -15
- package/dist/{ai-audit-CPrmohqf.mjs → ai-audit-CG_DG6N7.mjs} +1 -1
- package/dist/ai-gateway-DUttjxrN.mjs +80 -0
- package/dist/{ai-ARwLeQ1O.mjs → ai-lziiVEGR.mjs} +14 -14
- package/dist/{ai-search-B5l4IDSR.mjs → ai-search-k63uopiK.mjs} +37 -37
- package/dist/{ai-security-C7_IGDDl.mjs → ai-security-D10lzYTn.mjs} +1 -1
- package/dist/{alerting-B6m1Rhf4.mjs → alerting-c4ICS8KO.mjs} +26 -26
- package/dist/{analytics-nnzFBB_7.mjs → analytics-CEQ0EVTq.mjs} +9 -9
- package/dist/{analytics_engine-BvjKCwn1.mjs → analytics_engine-B9kiAPbY.mjs} +2 -2
- package/dist/{api-security-B9IozS2a.mjs → api-security-6LlxeiOi.mjs} +61 -61
- package/dist/{argo-C_QcqR6P.mjs → argo-BCcp1ybr.mjs} +1 -1
- package/dist/args-CXgkQKK7.mjs +2 -0
- package/dist/{artifacts-DDFNpYBz.mjs → artifacts-PoO3rAvo.mjs} +20 -20
- package/dist/{audit-logs-cTzNV0DV.mjs → audit-logs-Vt3NbAA1.mjs} +2 -2
- package/dist/auth-3bFlHTVl.mjs +8 -0
- package/dist/auth-BfYtTyXo.mjs +2 -0
- package/dist/autoconfig-DqgOi1kW.mjs +511 -0
- package/dist/banner-ClclgnBn.mjs +2 -0
- package/dist/{billing-DU2X-q-x.mjs → billing-DVrpin2a.mjs} +10 -10
- package/dist/{bot-management-BHAAoZOh.mjs → bot-management-Bw-GZWoT.mjs} +1 -1
- package/dist/{botnet-feed-DOOnGVVY.mjs → botnet-feed-ov970cZf.mjs} +5 -5
- package/dist/{brand-protection-C_DYa7IK.mjs → brand-protection-C7WOvdx6.mjs} +13 -13
- package/dist/browser-extension-C1zmKFDG.mjs +2 -0
- package/dist/{browser-run-Dw-vgWGR.mjs → browser-run-DhnKUXVv.mjs} +23 -23
- package/dist/build-CVvo9BvP.mjs +2 -0
- package/dist/build-vfD1txJe.mjs +2 -0
- package/dist/{builds-CO0MmSd3.mjs → builds-BIqfNXEE.mjs} +31 -31
- package/dist/{cache-XxusQxXe.mjs → cache-Dzl3kth1.mjs} +1 -1
- package/dist/{certificate-authorities-Dmxh7w-Z.mjs → certificate-authorities-CQinLiq_.mjs} +1 -1
- package/dist/cf-O3gEaXYZ.mjs +18 -0
- package/dist/chunk-M77HNR46-DPbhuhiy.mjs +2 -0
- package/dist/chunk-RV27PEH3-Cws_30ln.mjs +97 -0
- package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +2 -0
- package/dist/chunk-WMOON6TZ-D_ToS88f.mjs +2 -0
- package/dist/cli-ZXrxm369.mjs +6 -0
- package/dist/cli-exit-Dqoo6Jgb.mjs +2 -0
- package/dist/client-certificates--vw-4vvy.mjs +13 -0
- package/dist/{client-side-security-D7NWV0YH.mjs → client-side-security-YCsdeK3e.mjs} +1 -1
- package/dist/{cloud-connector-XMFOTNqT.mjs → cloud-connector-CwSi4zZI.mjs} +1 -1
- package/dist/{cloudflared-DhItYrCq.mjs → cloudflared-CH8rOneA.mjs} +1 -1
- package/dist/{cloudforce-one-Cew4MHvA.mjs → cloudforce-one-hEykJeqy.mjs} +214 -214
- package/dist/command-Axp5Wfpj.mjs +2 -0
- package/dist/command-BH-TMJWp.mjs +2 -0
- package/dist/command-C1CwuI4O.mjs +2 -0
- package/dist/command-CIZDQPmS.mjs +2 -0
- package/dist/command-CeL8kQCM.mjs +2 -0
- package/dist/command-ChDtawgh.mjs +2 -0
- package/dist/command-D5nZoVE1.mjs +2 -0
- package/dist/command-DBCoI1fN.mjs +2 -0
- package/dist/command-DBpr6U4L.mjs +2 -0
- package/dist/command-DrQKTf1O.mjs +2 -0
- package/dist/command-IuYNIUk9.mjs +2 -0
- package/dist/command-L0y09SE5.mjs +2 -0
- package/dist/{command-RiZ_LYcm.mjs → command-ZSxcR8-J.mjs} +1 -1
- package/dist/command-egPOyKbx.mjs +2 -0
- package/dist/command-jJKEah9i.mjs +2 -0
- package/dist/{completions-xPLd1cvL.mjs → completions-DNisLHie.mjs} +26 -26
- package/dist/{connector-interrupts-BfQN_pm6.mjs → connector-interrupts-uIHLde10.mjs} +3 -3
- package/dist/{connector-telemetry-events-B7qLZsZJ.mjs → connector-telemetry-events-D2MH0OSs.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-Ckvg9BPc.mjs → connector-telemetry-snapshots-CQICQaGf.mjs} +3 -3
- package/dist/{connectors-BhvAP5fb.mjs → connectors-BXwvP7SF.mjs} +7 -7
- package/dist/{containers-Cq1gtnq6.mjs → containers-ClK7HGfx.mjs} +70 -72
- package/dist/{containers-Bl3EY-cy.mjs → containers-DOyOrVV9.mjs} +17 -17
- package/dist/{content-scan-BYGe9fFj.mjs → content-scan-B71JZ7G6.mjs} +1 -1
- package/dist/context-5JRcefHh.mjs +7 -0
- package/dist/{cps-BWMDWeVq.mjs → cps-CzNfFv-5.mjs} +1 -1
- package/dist/{csamScanner-DMYGzLNi.mjs → csamScanner-BfZcrcjk.mjs} +1 -1
- package/dist/{ct-alerting-Vq4l2s7n.mjs → ct-alerting-Cm8YLmXE.mjs} +1 -1
- package/dist/{custom-certificates-BDEHH0Ym.mjs → custom-certificates-DFMRe9_D.mjs} +4 -4
- package/dist/{custom-csrs-CHSkZNdX.mjs → custom-csrs-B5njuvdd.mjs} +5 -5
- package/dist/{custom-hostnames-Bch3iQZC.mjs → custom-hostnames-D06jQfNs.mjs} +6 -6
- package/dist/{custom-nameservers-Tdvu1-vr.mjs → custom-nameservers-CKwKLqbF.mjs} +5 -5
- package/dist/{custom-pages-rFsiIXlr.mjs → custom-pages-D339_r6I.mjs} +10 -10
- package/dist/{d1-C1GK7DsW.mjs → d1-CHXmF-Ga.mjs} +14 -14
- package/dist/{dcv-delegation-D6xiYj2l.mjs → dcv-delegation-BAnTwW8J.mjs} +1 -1
- package/dist/{delegate-GctF_lrq.mjs → delegate-B6LetRpZ.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-D04Xvm0m.mjs → deploy-CsQbufsL.mjs} +1 -1
- package/dist/{deploy-input-COEKxOA1.mjs → deploy-input-dwBe8pSi.mjs} +1 -1
- package/dist/dev-BpvWl6pG.mjs +4 -0
- package/dist/{diagnostics-BZVAAguV.mjs → diagnostics-BEUAWeLH.mjs} +7 -7
- package/dist/dialog-BlUXJKbA.mjs +2 -0
- package/dist/discover-DmIsaE54.mjs +2 -0
- package/dist/dist-CpufWpsP.mjs +48 -0
- package/dist/{dist-BpadEMNY.mjs → dist-DW47TUGh.mjs} +35 -35
- package/dist/dist-DfMipWKR.mjs +366 -0
- package/dist/{dls-BsnURYja.mjs → dls-CXS7bPlj.mjs} +8 -8
- package/dist/{dns-B_nTXhuM.mjs → dns-Dx7oPdtH.mjs} +63 -63
- package/dist/{dns-firewall-DDsrdulo.mjs → dns-firewall-wcP1fgB-.mjs} +8 -8
- package/dist/dot-prop-IITUZ2XW-BilKo4kO.mjs +2 -0
- package/dist/dotenv-CcQjGlV0.mjs +4 -0
- package/dist/dry-run-Bq0JAsbX.mjs +2 -0
- package/dist/{durable-objects-8U8DpF9q.mjs → durable-objects-DmieQflu.mjs} +4 -4
- package/dist/{email-auth-CzjtGH6g.mjs → email-auth-DiO-k5wt.mjs} +1 -1
- package/dist/{email-routing-B92fty1-.mjs → email-routing-CycPV4UR.mjs} +24 -24
- package/dist/{email-security-keTqF0nJ.mjs → email-security-DhtBU1X_.mjs} +77 -79
- package/dist/{email-sending-B7f95epu.mjs → email-sending-BjgiwUht.mjs} +23 -23
- package/dist/error-sanitization-Cu-8OKRA.mjs +2 -0
- package/dist/error-sanitization-Dc4bLj8k.mjs +2 -0
- package/dist/{fieldExtractors-DL_H1m7E.mjs → fieldExtractors-BOBRZ8gw.mjs} +4 -4
- package/dist/firewall-Dc0Xm26N.mjs +36 -0
- package/dist/{flagship-CjC3dF7L.mjs → flagship-BRqR3ioN.mjs} +13 -13
- package/dist/{fraud-DU_YCLC5.mjs → fraud-Czu1ed5n.mjs} +1 -1
- package/dist/generate-BAHK895m.mjs +2 -0
- package/dist/generate-DWW1YPjv.mjs +3 -0
- package/dist/{google-tag-gateway-xqN-QudN.mjs → google-tag-gateway-DsZA0a1r.mjs} +1 -1
- package/dist/gt-DmcMNPX6.mjs +2 -0
- package/dist/{healthchecks-COnq1YOx.mjs → healthchecks-CFH5bIAG.mjs} +1 -1
- package/dist/{hostnames-CxRAY_Pp.mjs → hostnames-CKDSQsXT.mjs} +1 -1
- package/dist/{hyperdrive-DPWyiXpj.mjs → hyperdrive-BLiI7eoy.mjs} +9 -9
- package/dist/{iam-CtX9NPCy.mjs → iam-B5mdfq5e.mjs} +24 -24
- package/dist/{images-CuWFOsGw.mjs → images-IVRjrB4_.mjs} +38 -38
- package/dist/index.mjs +1 -1
- package/dist/init-C6pA2OKl.mjs +39 -0
- package/dist/{intel-BeGV3VXt.mjs → intel-CvesITo3.mjs} +38 -38
- package/dist/interactive-C-o16XQs.mjs +32 -0
- package/dist/interactive-SgAjen2z.mjs +2 -0
- package/dist/{ips-d6aoKAI4.mjs → ips-DT9GaimG.mjs} +1 -1
- package/dist/keyless-certificates-B0Xe5WqA.mjs +13 -0
- package/dist/{keys-Fyf3vWcA.mjs → keys-BfcwaSGe.mjs} +2 -2
- package/dist/kv-BAKDr9h1.mjs +15 -0
- package/dist/lazy-command-BR3u8SQ2.mjs +2 -0
- package/dist/{leaked-credential-checks-B7ewx3W-.mjs → leaked-credential-checks-gRpF7J9-.mjs} +1 -1
- package/dist/{load-balancers-DHD4f2CT.mjs → load-balancers-CLVWIN9d.mjs} +39 -39
- package/dist/local-22UA5g9y.mjs +2 -0
- package/dist/{local-B6b2OIBW.mjs → local-CxYne8s2.mjs} +1 -1
- package/dist/{local-runtime-DD8DAIlm.mjs → local-runtime-C_fR3pz4.mjs} +1 -1
- package/dist/login-B2IW-LZC.mjs +5 -0
- package/dist/login-BKQI53YQ.mjs +2 -0
- package/dist/{logo-matches-BAX8v3iL.mjs → logo-matches-CmCWQC_j.mjs} +3 -3
- package/dist/{logos-BWBVGwU6.mjs → logos-DoGIvvML.mjs} +3 -3
- package/dist/{logpush-CZKR8DHO.mjs → logpush-C2fS4mz8.mjs} +23 -23
- package/dist/{logs-CiDyrqEu.mjs → logs-DOchrxC9.mjs} +16 -16
- package/dist/{magic-cloud-networking-DttrBXqd.mjs → magic-cloud-networking-BTWKttlB.mjs} +34 -34
- package/dist/{magic-network-monitoring-9VXDSYuL.mjs → magic-network-monitoring-C_6hCn_f.mjs} +17 -17
- package/dist/{magic-transit-Dsu_cSGM.mjs → magic-transit-B-Rmmg-Z.mjs} +139 -139
- package/dist/{managed-defense-SYreve4W.mjs → managed-defense-BPSLbGgV.mjs} +9 -9
- package/dist/{managed-transforms-CzSy_xPw.mjs → managed-transforms-BqiDVQD6.mjs} +1 -1
- package/dist/{matches-qf7GReyu.mjs → matches-wLc335So.mjs} +3 -3
- package/dist/{mcp-DYSk5_gc.mjs → mcp-CmQOrkzP.mjs} +15 -15
- package/dist/{mesh-DdY07OYt.mjs → mesh-DRuFq2pw.mjs} +12 -12
- package/dist/migrate-DBwOnU6B.mjs +2 -0
- package/dist/mtls-certificates-BUcQwJGQ.mjs +13 -0
- package/dist/{network-DpaZ5LJL.mjs → network-BuXy0ysq.mjs} +24 -24
- package/dist/{network-interconnects-C4uUoeNa.mjs → network-interconnects-BzfPaxkW.mjs} +17 -17
- package/dist/oauth-BYmfy7l7.mjs +9 -0
- package/dist/{oauth-nsTDJ0dF.mjs → oauth-BlFK0DPZ.mjs} +1 -1
- package/dist/{oauth-clients-D7Ou7oAS.mjs → oauth-clients-CnABE4xT.mjs} +7 -7
- package/dist/{oauth-scopes-BFoE82Mv.mjs → oauth-scopes-BFy1Hw7K.mjs} +1 -1
- package/dist/{observability-smcOFbC1.mjs → observability-B1IkzeE0.mjs} +44 -44
- package/dist/open-PCXX3ZDZ-BKRik1gi.mjs +4 -0
- package/dist/{organization-Dyf_0mq4.mjs → organization-DeIzTyFr.mjs} +1 -1
- package/dist/{organizations-D7zGPLVm.mjs → organizations-dpNO5XaQ.mjs} +1 -1
- package/dist/{origin-ca-certificates-DJrp29gv.mjs → origin-ca-certificates-B-1YtC61.mjs} +3 -3
- package/dist/{origin-post-quantum-encryption-BYj3kJiq.mjs → origin-post-quantum-encryption-DdvwucsG.mjs} +1 -1
- package/dist/{origin-tls-client-auth-j0tGh6Fy.mjs → origin-tls-client-auth-CzfpVmTE.mjs} +5 -5
- package/dist/output-CvQFJkvi.mjs +2 -0
- package/dist/{page-rules-CLzba_nr.mjs → page-rules--wnIp30C.mjs} +1 -1
- package/dist/pages-DvhJZv5S.mjs +60 -0
- package/dist/{pay-per-crawl-DbaTVI8V.mjs → pay-per-crawl-lqX3Rwt9.mjs} +32 -32
- package/dist/{pay-per-use-BEvtoppJ.mjs → pay-per-use-BRKnBlz2.mjs} +3 -3
- package/dist/{pipelines-lps71uoA.mjs → pipelines-CvePummb.mjs} +20 -20
- package/dist/precursor-DgotmHQd.mjs +4 -0
- package/dist/previews-Brsuhzmk.mjs +4 -0
- package/dist/progress-DUeNqM-j.mjs +2 -0
- package/dist/prompt-DV6YTdoa.mjs +3 -0
- package/dist/{queries-EJYlFw8m.mjs → queries-CLqy4AM6.mjs} +4 -4
- package/dist/{queues-CozKGaA4.mjs → queues-D0Y4LNP1.mjs} +29 -35
- package/dist/r2-D_FuuTGm.mjs +132 -0
- package/dist/{r2-data-catalog-Bfn3AWzn.mjs → r2-data-catalog-D5Fvpr3C.mjs} +16 -16
- package/dist/{radar-NmpdyMo5.mjs → radar-B6bYFNVn.mjs} +1 -1
- package/dist/raw-fetch-Cp3EaTcj.mjs +2 -0
- package/dist/{realtime-iWTz8WbH.mjs → realtime-BTBZoZNW.mjs} +78 -78
- package/dist/{registrar-Cza1L8i_.mjs → registrar-CFh4TCkC.mjs} +8 -8
- package/dist/{registrar-sandbox-BP4GQg5s.mjs → registrar-sandbox-By6ukXxf.mjs} +6 -6
- package/dist/{registry-vreNkX6u.mjs → registry-kYRASukx.mjs} +1 -1
- package/dist/{reporting-gvXX2MxY.mjs → reporting-Cf3q4cuO.mjs} +7 -7
- package/dist/request-headers-jdUlF-_S.mjs +2 -0
- package/dist/{request-tracers-F8a_aj32.mjs → request-tracers-CqNmb-dS.mjs} +2 -2
- package/dist/resolve-PZuJ878-.mjs +2 -0
- package/dist/{resource-sharing-D6XWIDmb.mjs → resource-sharing-vDvq5J5a.mjs} +14 -14
- package/dist/{resource-tagging-c_z4VZt0.mjs → resource-tagging-DRCkpRmf.mjs} +2 -2
- package/dist/{rules-_QDaG3U5.mjs → rules-D-IfU82u.mjs} +8 -8
- package/dist/{rulesets-Bc4ZuPG_.mjs → rulesets-ezJUnXm7.mjs} +17 -17
- package/dist/{rum-ChPyfpM2.mjs → rum-G42H7AXu.mjs} +14 -14
- package/dist/run-BhfDNWCI.mjs +2 -0
- package/dist/run-djd1-6kN.mjs +2 -0
- package/dist/{schema-flags-C9lbLgE-.mjs → schema-flags-yDMur8UR.mjs} +2 -2
- package/dist/schema-s22s29sJ.mjs +2 -0
- package/dist/{scim-BjiswXbC.mjs → scim-DgRlqTtE.mjs} +10 -10
- package/dist/{sdk-CsWOex96.mjs → sdk-Bx29ZKK3.mjs} +2 -2
- package/dist/{secrets-store-Cn3D5a0d.mjs → secrets-store-DcNmMGG2.mjs} +11 -11
- package/dist/{security-center-DP4GC1cG.mjs → security-center-CZwVaL7t.mjs} +15 -15
- package/dist/{security-txt-CaR5Idmz.mjs → security-txt-CD0RAEsU.mjs} +1 -1
- package/dist/session-CjQFm10R.mjs +2 -0
- package/dist/shared-Cfuwhk19.mjs +2 -0
- package/dist/{smart-shield-CphSzoh4.mjs → smart-shield-C72SYuAe.mjs} +1 -1
- package/dist/{snippets-r-Mre0cE.mjs → snippets-Bl4Rfvdf.mjs} +1 -1
- package/dist/source-38bULAR8.mjs +6 -0
- package/dist/spawn-PBhhCQdl.mjs +10 -0
- package/dist/{spectrum-BhjCVFZk.mjs → spectrum-BgOMd04u.mjs} +1 -1
- package/dist/{speed-CPgypY7n.mjs → speed-dahwVmv-.mjs} +1 -1
- package/dist/src-npcmT3gh.mjs +109 -0
- package/dist/{ssl-DsMrXyqK.mjs → ssl-BMZZPgJx.mjs} +4 -4
- package/dist/startup-profile-B0UCc9_J.mjs +2 -0
- package/dist/startup-profile-DrV846S5.mjs +17 -0
- package/dist/{state-BxCejn42.mjs → state-DhHOAdTo.mjs} +1 -1
- package/dist/state-Dyo8DcW7.mjs +2 -0
- package/dist/{stream-L2NmGPby.mjs → stream-CsQ8wMMF.mjs} +45 -45
- package/dist/{submit-KN0Ul5fV.mjs → submit-DdoTeeRt.mjs} +2 -2
- package/dist/{tags-CZMFKGdP.mjs → tags-BESTUjkv.mjs} +2 -2
- package/dist/telemetry-CVjp5qaj.mjs +2 -0
- package/dist/telemetry-iBZ-f6og.mjs +2 -0
- package/dist/{tenant-Cu4P-foo.mjs → tenant-COyp8x56.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-Nx59Buv0.mjs → tenant-custom-nameservers-BdrnvyTk.mjs} +1 -1
- package/dist/{theme-BiIYWOed.mjs → theme-BIWQFmZ0.mjs} +2 -2
- package/dist/tools-LlzHD_86.mjs +2 -0
- package/dist/{tunnels-C-mMZy4v.mjs → tunnels-CjDCYR0_.mjs} +15 -15
- package/dist/turnstile-crX-kMig.mjs +33 -0
- package/dist/ui-BQxRjahW.mjs +5 -0
- package/dist/update-check-BpLdkJeA.mjs +2 -0
- package/dist/update-check-CtmTFJ-O.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-7ikewAnp.mjs → url-info-CSU3TaVe.mjs} +2 -2
- package/dist/{url-normalization-B0D7Fhf3.mjs → url-normalization-DKZYH3Tv.mjs} +1 -1
- package/dist/{url-scanner-DpKIqkin.mjs → url-scanner-mtiMlSyE.mjs} +8 -8
- package/dist/{user-BFq8UM1s.mjs → user-DuDnsFvs.mjs} +1 -1
- package/dist/{values-DnBYV1ZD.mjs → values-B4gL0UvN.mjs} +2 -2
- package/dist/{vectorize-BpZ4UsUj.mjs → vectorize-CEC7tpRJ.mjs} +15 -15
- package/dist/version-CPwqVR_p.mjs +2 -0
- package/dist/{waiting-rooms-DJfqehy9.mjs → waiting-rooms-CosskYpi.mjs} +25 -25
- package/dist/{web-assets-CCSSW_JH.mjs → web-assets-Do2JEl4p.mjs} +1 -1
- package/dist/{web3-bbT1REPc.mjs → web3-C3sb4DR8.mjs} +1 -1
- package/dist/{workers-CXuyjZB8.mjs → workers-ByA4Nddg.mjs} +20 -20
- package/dist/{workers-builds-TRF3K416.mjs → workers-builds-CDE-wcw-.mjs} +7 -7
- package/dist/{workers-for-platforms-B57iKiSN.mjs → workers-for-platforms-CvZI2B1d.mjs} +11 -11
- package/dist/{workers-vpc-kgryQ48l.mjs → workers-vpc-WbwBVV_L.mjs} +6 -6
- package/dist/{workflows-CKdPlIkK.mjs → workflows-Ch7cNhhq.mjs} +20 -20
- package/dist/{zaraz-BXFlEWSx.mjs → zaraz-BO7WT_U7.mjs} +1 -1
- package/dist/{zero-trust-M08mBsYd.mjs → zero-trust-CTKtzxxW.mjs} +466 -426
- package/dist/{zone-DHmrotGW.mjs → zone-DSHj2Vv2.mjs} +1 -1
- package/dist/{zones-C0eKBTqG.mjs → zones-CeFb9USG.mjs} +1 -1
- package/package.json +13 -11
- package/dist/access-C_2rEi0H.mjs +0 -27
- package/dist/ai-gateway-DNY4FPF2.mjs +0 -147
- package/dist/auth-DJhSjNNL.mjs +0 -8
- package/dist/auth-sAorfdWU.mjs +0 -2
- package/dist/browser-extension-C48pKh3t.mjs +0 -15
- package/dist/build-1a8CiNIT.mjs +0 -2
- package/dist/build-Ca_drQY2.mjs +0 -2
- package/dist/cf-oadujOtC.mjs +0 -18
- package/dist/chunk-6EUZQHAF-QVTL_mC-.mjs +0 -2
- package/dist/chunk-DL5FNmn1.mjs +0 -2
- package/dist/chunk-Q72B4Q5Z-Cr1H_iK6.mjs +0 -2
- package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +0 -2
- package/dist/chunk-QBZBEHZB-Byagrlop.mjs +0 -2
- package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +0 -374
- package/dist/client-certificates-CgaIc3zN.mjs +0 -13
- package/dist/command-CF0giIIc.mjs +0 -3
- package/dist/command-CsZFRm3P.mjs +0 -2
- package/dist/command-DBz8QiFk.mjs +0 -2
- package/dist/config-B4vIa0zp.mjs +0 -2
- package/dist/data-security-DDhPnX8Z.mjs +0 -71
- package/dist/dev-CVD3BVUG.mjs +0 -4
- package/dist/dialog--iw0F2s-.mjs +0 -2
- package/dist/dist-CUUGKvjh.mjs +0 -48
- package/dist/dist-dc4E1u01.mjs +0 -272
- package/dist/dot-prop-6SRZBKHT-Dj7YOlwR.mjs +0 -2
- package/dist/dry-run-CLX6Pbtq.mjs +0 -2
- package/dist/error-sanitization-Cbd_oegl.mjs +0 -2
- package/dist/error-sanitization-DwOlM3R7.mjs +0 -2
- package/dist/firewall-67qoXiqD.mjs +0 -56
- package/dist/interactive-B6woOLo-.mjs +0 -32
- package/dist/interactive-DnUvQHjc.mjs +0 -2
- package/dist/keyless-certificates-Dvib4jhw.mjs +0 -13
- package/dist/kv-CA4J7cCq.mjs +0 -21
- package/dist/local-BrfySqnx.mjs +0 -2
- package/dist/login-CLW108XX.mjs +0 -5
- package/dist/login-xgRjiyJa.mjs +0 -2
- package/dist/mtls-certificates-LXlgdkf1.mjs +0 -13
- package/dist/oauth-Dzk6Gy-6.mjs +0 -14
- package/dist/open-PBXRGS4R-C4CKEADM.mjs +0 -4
- package/dist/open-PBXRGS4R-C_-G_4DC.mjs +0 -4
- package/dist/output-Bia1u2k5.mjs +0 -2
- package/dist/pages-pah6dZBJ.mjs +0 -60
- package/dist/precursor-DTTYLDEa.mjs +0 -4
- package/dist/previews-B89cUmpr.mjs +0 -4
- package/dist/progress-D_mL-Kcy.mjs +0 -2
- package/dist/prompt-sL_yMZbI.mjs +0 -3
- package/dist/r2-Chn_JQUM.mjs +0 -127
- package/dist/raw-fetch-lSVttVJF.mjs +0 -2
- package/dist/request-headers-POBKmu93.mjs +0 -2
- package/dist/resolve-BXemCSyA.mjs +0 -2
- package/dist/run-DtN51G2A.mjs +0 -2
- package/dist/run-oACgYK8I.mjs +0 -2
- package/dist/schema-DZSSJaY0.mjs +0 -2
- package/dist/shared-W9uoX1-W.mjs +0 -2
- package/dist/source-BR4_k2ad.mjs +0 -6
- package/dist/spawn-BWEuIO-w.mjs +0 -523
- package/dist/src-Hw-TlVAO.mjs +0 -108
- package/dist/startup-profile-CYEokTVe.mjs +0 -2
- package/dist/startup-profile-CgWHy4rE.mjs +0 -17
- package/dist/state-DSzkxXML.mjs +0 -2
- package/dist/telemetry-CSj_ezpk.mjs +0 -2
- package/dist/telemetry-DAf9gLyH.mjs +0 -2
- package/dist/telemetry-Dk1GcQ0u.mjs +0 -5
- package/dist/tools-BMKpYraQ.mjs +0 -2
- package/dist/turnstile-39JL9tMt.mjs +0 -33
- package/dist/ui-DH95w1Qk.mjs +0 -5
- package/dist/undici-DTSBJHNS.mjs +0 -96
- package/dist/update-check-BKQBD4MQ.mjs +0 -2
- package/dist/update-check-CE9XB6gf.mjs +0 -2
- package/dist/version-Bh3b9vTa.mjs +0 -2
- /package/dist/{Page-C-JHZnIy.mjs → Page-CjJht2qT.mjs} +0 -0
- /package/dist/{alerts-CstOk8n0.mjs → alerts-DqZgVSCT.mjs} +0 -0
- /package/dist/{autorag-PRTwXGgn.mjs → autorag-Cq9k9Ye6.mjs} +0 -0
- /package/dist/{body-parser-CUWbw_Tq.mjs → body-parser-hh2avzkz.mjs} +0 -0
- /package/dist/{brands-BHRXlWDm.mjs → brands-DeLbFxSt.mjs} +0 -0
- /package/dist/{clear-UvKESVx3.mjs → clear-CRfI7WS7.mjs} +0 -0
- /package/dist/{cli-types-tt_LZMbn.mjs → cli-types-DoVT5q_M.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-DwnFeZg0.mjs → connector-telemetry-events-latest-D8p_dR8s.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-Dv6rZlxs.mjs → connector-telemetry-snapshots-latest-COFmzmlk.mjs} +0 -0
- /package/dist/{domain-info-BqTDXNBo.mjs → domain-info-aiwP60Fo.mjs} +0 -0
- /package/dist/{health-CwPzzrV6.mjs → health-Bz33n-_F.mjs} +0 -0
- /package/dist/{input-validation-Ch4Vllrm.mjs → input-validation-Dk52b0me.mjs} +0 -0
- /package/dist/{internal-WLHfxX64.mjs → internal-BHrJbbdA.mjs} +0 -0
- /package/dist/{lifecycle-Ichnb2x1.mjs → lifecycle-C7tAC1Mn.mjs} +0 -0
- /package/dist/{live-D_k7eHdv.mjs → live-a01OfPf9.mjs} +0 -0
- /package/dist/{metadata-APBiectA.mjs → metadata-C33s4rc-.mjs} +0 -0
- /package/dist/{project-settings-DSXevRvj.mjs → project-settings-DO6njFg_.mjs} +0 -0
- /package/dist/{rate-limit-analytics-CDTPxSET.mjs → rate-limit-analytics-Bw9qmxMx.mjs} +0 -0
- /package/dist/{rate-limits-C3K9smdl.mjs → rate-limits-CDm_xzKt.mjs} +0 -0
- /package/dist/{ready-CvwvbdTX.mjs → ready-BXGqY1Wi.mjs} +0 -0
- /package/dist/{recent-submissions-CjzcT-iH.mjs → recent-submissions-AhGZD3a3.mjs} +0 -0
- /package/dist/{refute-CIAFMj00.mjs → refute-D_w5Gw20.mjs} +0 -0
- /package/dist/{resolve-CUDKxUrW.mjs → resolve-BCTrtcx7.mjs} +0 -0
- /package/dist/{scan-logo-zFkphtQ3.mjs → scan-logo-BZzFam-Q.mjs} +0 -0
- /package/dist/{scan-page-CLl2MAkZ.mjs → scan-page-BPA8nSPM.mjs} +0 -0
- /package/dist/{search-12jA1b4l.mjs → search-De0UlXYN.mjs} +0 -0
- /package/dist/{signed-url-U0T_PEMR.mjs → signed-url-ziDz9frX.mjs} +0 -0
- /package/dist/{submission-info-CZ84a3Nb.mjs → submission-info-83D2DCCG.mjs} +0 -0
- /package/dist/{total-queries-CJTc9Pde.mjs → total-queries-Dhol31Kn.mjs} +0 -0
- /package/dist/{tracked-domains-BKLxnnSv.mjs → tracked-domains-DoOPs6Vd.mjs} +0 -0
- /package/dist/{verify-CZW5Fo1q.mjs → verify-CxpGEnJb.mjs} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{i as e}from"./chunk-6EUZQHAF-QVTL_mC-.mjs";var t=e(e=>{let t=typeof e;return e!==null&&(t===`object`||t===`function`)},`isObject`),n=e(e=>t(e)&&Object.keys(e).length===0,`isEmptyObject`),r=new Set([`__proto__`,`prototype`,`constructor`]),i=new Set(`0123456789`);function a(e){let t=[],n=``,a=`start`,o=!1;for(let s of e)switch(s){case`\\`:if(a===`index`)throw Error(`Invalid character in an index`);if(a===`indexEnd`)throw Error(`Invalid character after an index`);o&&(n+=s),a=`property`,o=!o;break;case`.`:if(a===`index`)throw Error(`Invalid character in an index`);if(a===`indexEnd`){a=`property`;break}if(o){o=!1,n+=s;break}if(r.has(n))return[];t.push(n),n=``,a=`property`;break;case`[`:if(a===`index`)throw Error(`Invalid character in an index`);if(a===`indexEnd`){a=`index`;break}if(o){o=!1,n+=s;break}if(a===`property`){if(r.has(n))return[];t.push(n),n=``}a=`index`;break;case`]`:if(a===`index`){t.push(Number.parseInt(n,10)),n=``,a=`indexEnd`;break}if(a===`indexEnd`)throw Error(`Invalid character after an index`);default:if(a===`index`&&!i.has(s))throw Error(`Invalid character in an index`);if(a===`indexEnd`)throw Error(`Invalid character after an index`);a===`start`&&(a=`property`),o&&(o=!1,n+=`\\`),n+=s}switch(o&&(n+=`\\`),a){case`property`:if(r.has(n))return[];t.push(n);break;case`index`:throw Error(`Index was not closed`);case`start`:t.push(``);break}return t}e(a,`getPathSegments`);function o(e,t){if(typeof t!=`number`&&Array.isArray(e)){let n=Number.parseInt(t,10);return Number.isInteger(n)&&e[n]===e[t]}return!1}e(o,`isStringIndex`);function s(e,t){if(o(e,t))throw Error(`Cannot use string index`)}e(s,`assertNotStringIndex`);function c(e,n,r){if(!t(e)||typeof n!=`string`)return r===void 0?e:r;let i=a(n);if(i.length===0)return r;for(let t=0;t<i.length;t++){let n=i[t];if(e=o(e,n)?t===i.length-1?void 0:null:e[n],e==null){if(t!==i.length-1)return r;break}}return e===void 0?r:e}e(c,`getProperty`);function l(e,n,r){if(!t(e)||typeof n!=`string`)return e;let i=e,o=a(n);for(let n=0;n<o.length;n++){let i=o[n];s(e,i),n===o.length-1?e[i]=r:t(e[i])||(e[i]=typeof o[n+1]==`number`?[]:{}),e=e[i]}return i}e(l,`setProperty`);function u(e,n){if(!t(e)||typeof n!=`string`)return!1;let r=a(n);for(let n=0;n<r.length;n++){let i=r[n];if(s(e,i),n===r.length-1)return delete e[i],!0;if(e=e[i],!t(e))return!1}}e(u,`deleteProperty`);function d(e,n){if(!t(e)||typeof n!=`string`)return!1;let r=a(n);if(r.length===0)return!1;for(let n of r){if(!t(e)||!(n in e)||o(e,n))return!1;e=e[n]}return!0}e(d,`hasProperty`);function f(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replaceAll(/[\\.[]/g,`\\$&`)}e(f,`escapePath`);function p(e){let t=Object.entries(e);return Array.isArray(e)?t.map(([e,t])=>[Number(e),t]):t}e(p,`entries`);function m(e){let t=``;for(let[n,r]of p(e))typeof r==`number`?t+=`[${r}]`:(r=f(r),t+=n===0?r:`.${r}`);return t}e(m,`stringifyPath`);function*h(e,r=[]){if(!t(e)||n(e)){r.length>0&&(yield m(r));return}for(let[t,n]of p(e))yield*h(n,[...r,t])}e(h,`deepKeysIterator`);function g(e){return[...h(e)]}e(g,`deepKeys`);export{c as getProperty};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./sdk-CsWOex96.mjs";import{I as t}from"./dist-dc4E1u01.mjs";function n(e){if(typeof e!=`object`||!e)return[];let t=e.errors;return Array.isArray(t)?t.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.code;return typeof t==`number`&&Number.isFinite(t)?[t]:[]}):[]}function r(e){return typeof e==`number`&&Number.isInteger(e)&&e>=100&&e<=599}function i(e){try{return a(e)}catch{return{errorType:`Error`}}}function a(i){if(i instanceof e){let e=n(i.body);return{errorType:`APIError`,...r(i.statusCode)?{httpStatus:i.statusCode}:{},...e.length===0?{}:{errorCodes:e}}}return i instanceof t?{errorType:`APIError`,...r(i.status)?{httpStatus:i.status}:{},...typeof i.code==`number`&&Number.isFinite(i.code)?{errorCodes:[i.code]}:{}}:i instanceof Error?{errorType:`Error`}:{errorType:typeof i}}export{i as t};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{n as p}from"./prompt-sL_yMZbI.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 firewall access-rules create
|
|
3
|
-
|
|
4
|
-
Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).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 ee={command:`create`,describe:`Create an IP Access rule`,builder:h,handler:async u=>c({command:`firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await r():void 0,t=u.zone===void 0?`accounts`:`zones`,n=u.zone??e??`<account-id>`;o({command:`cf firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:u.body===void 0?d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)}}):l(u.body)});return}let c=await i(u),p=u.zone===void 0?`accounts`:`zones`,m=p===`zones`?await t({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await n();if(p===`zones`?u.zoneId=m:u.accountId=m,u.body){let e=l(u.body);a(await s(`Creating`,async()=>c.firewall.accessRules.create({...e,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Created`});return}let h=d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)}});a(await s(`Creating`,async()=>c.firewall.accessRules.create({...h,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 firewall access-rules delete <rule-id>
|
|
5
|
-
|
|
6
|
-
Deletes an existing IP Access rule defined. Note: This operation will affect all zones in the account or zone.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,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 _={command:`delete <rule-id>`,describe:`Delete an IP Access rule`,builder:g,handler:async l=>c({command:`firewall access-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/firewall/access_rules/rules/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(l[`rule-id`]??``),"account-or-zone-id":String(n)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await n();if(u===`zones`?l.zoneId=d:l.accountId=d,!await p({force:!!l.force,message:`This operation deletes the account-level IP Access Rule and affects every zone in the account.`})){process.stderr.write(`Aborted.
|
|
7
|
-
`);return}a(await s(`Deleting`,async()=>c.firewall.accessRules.delete({account_or_zone:u,account_or_zone_id:d,rule_id:l[`rule-id`]})),{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 firewall access-rules edit <rule-id>
|
|
8
|
-
|
|
9
|
-
Updates an IP Access rule defined. Note: This operation will affect all zones in the account or zone.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`}).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 y={command:`edit <rule-id>`,describe:`Update an IP Access rule`,builder:v,handler:async u=>c({command:`firewall access-rules edit`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await r():void 0,t=u.zone===void 0?`accounts`:`zones`,n=u.zone??e??`<account-id>`;o({command:`cf firewall access-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/firewall/access_rules/rules/${u[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(u[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(u[`rule-id`]??``),"account-or-zone-id":String(n)},bodyKind:`json`,body:u.body===void 0?d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)},notes:f(u.notes,`notes`,`text`)}):l(u.body)});return}let c=await i(u),p=u.zone===void 0?`accounts`:`zones`,m=p===`zones`?await t({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await n();if(p===`zones`?u.zoneId=m:u.accountId=m,u.body){let e=l(u.body);a(await s(`Updating`,async()=>c.firewall.accessRules.edit({body:e,account_or_zone:p,account_or_zone_id:m,rule_id:u[`rule-id`]})),{successLabel:`Updated`});return}let h=d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)},notes:f(u.notes,`notes`,`text`)});a(await s(`Updating`,async()=>c.firewall.accessRules.edit({body:h,account_or_zone:p,account_or_zone_id:m,rule_id:u[`rule-id`]})),{successLabel:`Updated`})})};function b(e){return e.usage(`$0 firewall access-rules get <rule-id>
|
|
10
|
-
|
|
11
|
-
Fetches the details of an IP Access rule defined.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <rule-id>`,describe:`Get an IP Access rule`,builder:b,handler:async l=>c({command:`firewall access-rules get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/firewall/access_rules/rules/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(l[`rule-id`]??``),"account-or-zone-id":String(n)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await n();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.firewall.accessRules.get({account_or_zone:u,account_or_zone_id:d,rule_id:l[`rule-id`]})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 firewall access-rules list
|
|
12
|
-
|
|
13
|
-
Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters.`).option(`configuration-target`,{type:`string`,description:`Defines the target to search in existing rules.`,choices:[`ip`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:"Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.\nNotes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code."}).option(`notes`,{type:`string`,description:`Defines the string to search for in the notes of existing IP Access rules.
|
|
14
|
-
Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List IP Access rules`,builder:m(S),handler:async l=>c({command:`firewall access-rules list`,classification:{safeFlags:[`configuration-target`,`match`,`order`,`direction`,`dry-run`]}},l,async()=>{let c={"configuration.target":l[`configuration-target`],"configuration.value":l[`configuration-value`],notes:l.notes,match:l.match,page:l.page,per_page:l[`per-page`],order:l.order,direction:l.direction};if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await t({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await n();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.firewall.accessRules.list({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},w={command:`access-rules`,describe:`IP-based access rules that allow, block, challenge, or whitelist traffic globally or per-zone`,builder:e=>e.command(ee).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 firewall filters bulk-delete
|
|
15
|
-
|
|
16
|
-
Deletes one or more existing filters.`).option(`id`,{type:`string`,description:`ID`,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:`bulk-delete`,describe:`Delete filters`,builder:T,handler:async e=>c({command:`firewall filters bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={id:e.id};if(e.dryRun){o({command:`cf firewall filters bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await i(e),c=await t({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=c,!await p({force:!!e.force})){process.stderr.write(`Aborted.
|
|
17
|
-
`);return}a(await s(`Deleting`,async()=>r.firewall.filters.bulkDelete({zone_id:c,...n})),{successLabel:`Deleted`})})};function D(e){return e.usage(`$0 firewall filters bulk-update
|
|
18
|
-
|
|
19
|
-
Updates one or more existing filters.`).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 O={command:`bulk-update`,describe:`Update filters`,builder:D,handler:async e=>c({command:`firewall filters bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall filters bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Updating`,async()=>n.firewall.filters.bulkUpdate({body:t,zone_id:r})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function k(e){return e.usage(`$0 firewall filters create
|
|
20
|
-
|
|
21
|
-
Creates one or more filters.`).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 A={command:`create`,describe:`Create filters`,builder:k,handler:async e=>c({command:`firewall filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Creating`,async()=>n.firewall.filters.create({body:t,zone_id:r})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function j(e){return e.usage(`$0 firewall filters delete <filter-id>
|
|
22
|
-
|
|
23
|
-
Deletes an existing filter.`).positional(`filter-id`,{type:`string`,description:`The unique identifier of the filter.`,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 M={command:`delete <filter-id>`,describe:`Delete a filter`,builder:j,handler:async e=>c({command:`firewall filters delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf firewall filters delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,!await p({force:!!e.force})){process.stderr.write(`Aborted.
|
|
24
|
-
`);return}a(await s(`Deleting`,async()=>n.firewall.filters.delete({zone_id:r,filter_id:e[`filter-id`]})),{successLabel:`Deleted`})})};function N(e){return e.usage(`$0 firewall filters get <filter-id>
|
|
25
|
-
|
|
26
|
-
Fetches the details of a filter.`).positional(`filter-id`,{type:`string`,description:`The unique identifier of the filter.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <filter-id>`,describe:`Get a filter`,builder:N,handler:async e=>c({command:`firewall filters get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.firewall.filters.get({zone_id:r,filter_id:e[`filter-id`]})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 firewall filters list
|
|
27
|
-
|
|
28
|
-
Fetches filters in a zone. You can filter the results using several optional parameters.`).option(`paused`,{type:`boolean`,description:`When true, indicates that the filter is currently paused.`}).option(`expression`,{type:`string`,description:`A case-insensitive string to find in the expression.`}).option(`description`,{type:`string`,description:`A case-insensitive string to find in the description.`}).option(`ref`,{type:`string`,description:`The filter ref (a short reference tag) to search for. Must be an exact match.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of filters per page.`}).option(`id`,{type:`string`,description:`The unique identifier of the filter.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`List filters`,builder:m(F),handler:async e=>c({command:`firewall filters list`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{let n={paused:e.paused,expression:e.expression,description:e.description,ref:e.ref,page:e.page,per_page:e[`per-page`],id:e.id};if(e.dryRun){o({command:`cf firewall filters list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await i(e),c=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.firewall.filters.list({zone_id:c,...n})),{successLabel:`Loaded`})})};function L(e){return e.usage(`$0 firewall filters update <filter-id>
|
|
29
|
-
|
|
30
|
-
Updates an existing filter.`).positional(`filter-id`,{type:`string`,description:`The unique identifier of the filter.`,demandOption:!0}).option(`description`,{type:`string`,description:`An informative summary of the filter.`}).option(`expression`,{type:`string`,description:`The filter expression. For more information, refer to [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/).`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the filter is currently paused.`}).option(`ref`,{type:`string`,description:`A short reference tag. Allows you to select related filters.`}).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:`update <filter-id>`,describe:`Update a filter`,builder:L,handler:async e=>c({command:`firewall filters update`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall filters update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({description:f(e.description,`description`,`text`),expression:f(e.expression,`expression`,`text`),paused:e.paused,ref:f(e.ref,`ref`,`text`)}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Updating`,async()=>n.firewall.filters.update({body:t,zone_id:r,filter_id:e[`filter-id`]})),{successLabel:`Updated`});return}let c=d({description:f(e.description,`description`,`text`),expression:f(e.expression,`expression`,`text`),paused:e.paused,ref:f(e.ref,`ref`,`text`)});a(await s(`Updating`,async()=>n.firewall.filters.update({body:c,zone_id:r,filter_id:e[`filter-id`]})),{successLabel:`Updated`})})},z={command:`filters`,describe:`Operations for filters`,builder:e=>e.command(E).command(O).command(A).command(M).command(P).command(I).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.usage(`$0 firewall lockdowns create
|
|
31
|
-
|
|
32
|
-
Creates a new Zone Lockdown rule.`).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).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 B={command:`create`,describe:`Create a Zone Lockdown rule`,builder:te,handler:async e=>c({command:`firewall lockdowns create`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configurations:u(e.configurations,`configurations`),description:f(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Creating`,async()=>n.firewall.lockdowns.create({...t,zone_id:r})),{successLabel:`Created`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let c=d({configurations:u(e.configurations,`configurations`),description:f(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls});a(await s(`Creating`,async()=>n.firewall.lockdowns.create({...c,zone_id:r})),{successLabel:`Created`})})};function V(e){return e.usage(`$0 firewall lockdowns delete <lock-downs-id>
|
|
33
|
-
|
|
34
|
-
Deletes an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,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 H={command:`delete <lock-downs-id>`,describe:`Delete a Zone Lockdown rule`,builder:V,handler:async e=>c({command:`firewall lockdowns delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"lock-downs-id":String(e[`lock-downs-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,!await p({force:!!e.force,message:`This operation deletes the Zone Lockdown rule from the zone.`})){process.stderr.write(`Aborted.
|
|
35
|
-
`);return}a(await s(`Deleting`,async()=>n.firewall.lockdowns.delete({zone_id:r,lock_downs_id:e[`lock-downs-id`]})),{successLabel:`Deleted`})})};function U(e){return e.usage(`$0 firewall lockdowns get <lock-downs-id>
|
|
36
|
-
|
|
37
|
-
Fetches the details of a Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get <lock-downs-id>`,describe:`Get a Zone Lockdown rule`,builder:U,handler:async e=>c({command:`firewall lockdowns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"lock-downs-id":String(e[`lock-downs-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.firewall.lockdowns.get({zone_id:r,lock_downs_id:e[`lock-downs-id`]})),{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 firewall lockdowns list
|
|
38
|
-
|
|
39
|
-
Fetches Zone Lockdown rules. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`modified-on`,{type:`string`,description:`The timestamp of when the rule was last modified.`}).option(`ip`,{type:`string`,description:`A single IP address to search for in existing rules.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`uri-search`,{type:`string`,description:`A single URI to search for in the list of URLs of existing rules.`}).option(`ip-range-search`,{type:`string`,description:`A single IP address range to search for in existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`created-on`,{type:`string`,description:`The timestamp of when the rule was created.`}).option(`description-search`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`ip-search`,{type:`string`,description:`A single IP address to search for in existing rules.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`list`,describe:`List Zone Lockdown rules`,builder:G,handler:async e=>c({command:`firewall lockdowns list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,description:e.description,modified_on:e[`modified-on`],ip:e.ip,priority:e.priority,uri_search:e[`uri-search`],ip_range_search:e[`ip-range-search`],per_page:e[`per-page`],created_on:e[`created-on`],description_search:e[`description-search`],ip_search:e[`ip-search`]};if(e.dryRun){o({command:`cf firewall lockdowns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await i(e),c=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.firewall.lockdowns.list({zone_id:c,...n})),{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 firewall lockdowns update <lock-downs-id>
|
|
40
|
-
|
|
41
|
-
Updates an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).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 J={command:`update <lock-downs-id>`,describe:`Update a Zone Lockdown rule`,builder:q,handler:async e=>c({command:`firewall lockdowns update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"lock-downs-id":String(e[`lock-downs-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configurations:u(e.configurations,`configurations`),urls:e.urls}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Updating`,async()=>n.firewall.lockdowns.update({...t,zone_id:r,lock_downs_id:e[`lock-downs-id`]})),{successLabel:`Updated`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let c=d({configurations:u(e.configurations,`configurations`),urls:e.urls});a(await s(`Updating`,async()=>n.firewall.lockdowns.update({...c,zone_id:r,lock_downs_id:e[`lock-downs-id`]})),{successLabel:`Updated`})})},Y={command:`lockdowns`,describe:`Zone lockdown rules that restrict access to URLs by IP address or range`,builder:e=>e.command(B).command(H).command(W).command(K).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function X(e){return e.usage(`$0 firewall ua-rules create
|
|
42
|
-
|
|
43
|
-
Creates a new User Agent Blocking rule in a zone.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ua` when specifying a user agent in the rule.",choices:[`ua`]}).option(`configuration-value`,{type:`string`,description:`the user agent to exactly match`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).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 Z={command:`create`,describe:`Create a User Agent Blocking rule`,builder:X,handler:async e=>c({command:`firewall ua-rules create`,classification:{safeFlags:[`configuration-target`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Creating`,async()=>n.firewall.uaRules.create({...t,zone_id:r})),{successLabel:`Created`});return}let c=d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused});a(await s(`Creating`,async()=>n.firewall.uaRules.create({...c,zone_id:r})),{successLabel:`Created`})})};function Q(e){return e.usage(`$0 firewall ua-rules delete <ua-rule-id>
|
|
44
|
-
|
|
45
|
-
Deletes an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,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 ne={command:`delete <ua-rule-id>`,describe:`Delete a User Agent Blocking rule`,builder:Q,handler:async e=>c({command:`firewall ua-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"ua-rule-id":String(e[`ua-rule-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,!await p({force:!!e.force,message:`This operation deletes the User Agent Blocking rule from the zone.`})){process.stderr.write(`Aborted.
|
|
46
|
-
`);return}a(await s(`Deleting`,async()=>n.firewall.uaRules.delete({zone_id:r,ua_rule_id:e[`ua-rule-id`]})),{successLabel:`Deleted`})})};function re(e){return e.usage(`$0 firewall ua-rules get <ua-rule-id>
|
|
47
|
-
|
|
48
|
-
Fetches the details of a User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get <ua-rule-id>`,describe:`Get a User Agent Blocking rule`,builder:re,handler:async e=>c({command:`firewall ua-rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"ua-rule-id":String(e[`ua-rule-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.firewall.uaRules.get({zone_id:r,ua_rule_id:e[`ua-rule-id`]})),{successLabel:`Loaded`})})};function ae(e){return e.usage(`$0 firewall ua-rules list
|
|
49
|
-
|
|
50
|
-
Fetches User Agent Blocking rules in a zone. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`user-agent`,{type:`string`,description:`A string to search for in the user agent values of existing rules.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`list`,describe:`List User Agent Blocking rules`,builder:ae,handler:async e=>c({command:`firewall ua-rules list`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{let n={page:e.page,description:e.description,per_page:e[`per-page`],user_agent:e[`user-agent`],paused:e.paused};if(e.dryRun){o({command:`cf firewall ua-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await i(e),c=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.firewall.uaRules.list({zone_id:c,...n})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 firewall ua-rules update <ua-rule-id>
|
|
51
|
-
|
|
52
|
-
Updates an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).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 se={command:`update <ua-rule-id>`,describe:`Update a User Agent Blocking rule`,builder:$,handler:async e=>c({command:`firewall ua-rules update`,classification:{safeFlags:[`configuration-target`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"ua-rule-id":String(e[`ua-rule-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Updating`,async()=>n.firewall.uaRules.update({...t,zone_id:r,ua_rule_id:e[`ua-rule-id`]})),{successLabel:`Updated`});return}let c=d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused});a(await s(`Updating`,async()=>n.firewall.uaRules.update({...c,zone_id:r,ua_rule_id:e[`ua-rule-id`]})),{successLabel:`Updated`})})},ce={command:`ua-rules`,describe:`Block or challenge requests based on the User-Agent header string`,builder:e=>e.command(Z).command(ne).command(ie).command(oe).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function le(e){return e.usage(`$0 firewall waf packages get <package-id>
|
|
53
|
-
|
|
54
|
-
Fetches the details of a WAF package. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).`).positional(`package-id`,{type:`string`,description:`Defines a package identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <package-id>`,describe:`Get a WAF package`,builder:le,handler:async e=>c({command:`firewall waf packages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall waf packages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/waf/packages/${e[`package-id`]==null?`<package-id>`:encodeURIComponent(String(e[`package-id`]))}`,pathParams:{"package-id":String(e[`package-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.firewall.waf.packages.get({zone_id:r,package_id:e[`package-id`]})),{successLabel:`Loaded`})})};function de(e){return e.usage(`$0 firewall waf packages list
|
|
55
|
-
|
|
56
|
-
Fetches WAF packages for a zone. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).`).option(`page`,{type:`number`,description:`The page number of paginated results.`}).option(`per-page`,{type:`number`,description:`The number of packages per page.`}).option(`order`,{type:`string`,description:`The field used to sort returned packages.`,choices:[`name`]}).option(`direction`,{type:`string`,description:`The direction used to sort returned packages.`,choices:[`asc`,`desc`]}).option(`match`,{type:`string`,description:"When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`name`,{type:`string`,description:`The name of the WAF package.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`List WAF packages`,builder:m(de),handler:async e=>c({command:`firewall waf packages list`,classification:{safeFlags:[`order`,`direction`,`match`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,match:e.match,name:e.name};if(e.dryRun){o({command:`cf firewall waf packages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/waf/packages`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await i(e),c=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.firewall.waf.packages.list({zone_id:c,...n})),{successLabel:`Loaded`})})},pe={command:`packages`,describe:`Operations for waf.packages`,builder:e=>e.command(ue).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},me={command:`waf`,describe:`Legacy WAF managed rule packages, rule groups, individual rules, and override configurations`,builder:e=>e.command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},he={command:`firewall`,describe:`Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages`,builder:e=>e.command(w).command(z).command(Y).command(ce).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{he as default};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{n as e,r as t,t as n}from"./chunk-DL5FNmn1.mjs";import{n as r,t as i}from"./ansi-styles-eKEZXVwN.mjs";import{t as a}from"./source-BR4_k2ad.mjs";import"node:os";import{styleText as o}from"node:util";import s,{exit as c,stdin as l,stdout as u}from"node:process";import"node:tty";import d from"node:readline";const f=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,p=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,m=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,h=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,g=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,_=/\t{1,1000}/y,ee=/[\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,te=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,ne=/\p{M}+/gu,re={limit:1/0,ellipsis:``},ie=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?ie(i,re,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,v=n.regularWidth??1,y=n.wideWidth??2,b=0,x=0,S=e.length,C=0,w=!1,T=S,E=Math.max(0,r-a),D=0,O=0,k=0,A=0;outer:for(;;){if(O>D||x>=S&&x>b){let t=e.slice(D,O)||e.slice(b,x);C=0;for(let e of t.replaceAll(ne,``)){let t=e.codePointAt(0)||0;if(A=p(t)?d:m(t)?y:l!==v&&f(t)?l:v,k+A>E&&(T=Math.min(T,Math.max(D,b)+C)),k+A>r){w=!0;break outer}C+=e.length,k+=A}D=O=0}if(x>=S)break;if(te.lastIndex=x,te.test(e)){if(C=te.lastIndex-x,A=C*v,k+A>E&&(T=Math.min(T,x+Math.floor((E-k)/v))),k+A>r){w=!0;break}k+=A,D=b,O=x,x=b=te.lastIndex;continue}if(h.lastIndex=x,h.test(e)){if(k+o>E&&(T=Math.min(T,x)),k+o>r){w=!0;break}k+=o,D=b,O=x,x=b=h.lastIndex;continue}if(g.lastIndex=x,g.test(e)){if(C=g.lastIndex-x,A=C*s,k+A>E&&(T=Math.min(T,x+Math.floor((E-k)/s))),k+A>r){w=!0;break}k+=A,D=b,O=x,x=b=g.lastIndex;continue}if(_.lastIndex=x,_.test(e)){if(C=_.lastIndex-x,A=C*c,k+A>E&&(T=Math.min(T,x+Math.floor((E-k)/c))),k+A>r){w=!0;break}k+=A,D=b,O=x,x=b=_.lastIndex;continue}if(ee.lastIndex=x,ee.test(e)){if(k+u>E&&(T=Math.min(T,x)),k+u>r){w=!0;break}k+=u,D=b,O=x,x=b=ee.lastIndex;continue}x+=1}return{width:w?E:k,index:w?T:S,truncated:w,ellipsed:w&&r>=a}},v={limit:1/0,ellipsis:``,ellipsisWidth:0},y=(e,t={})=>ie(e,v,t).width,b=`]8;;`,x=RegExp(`(?:\\[(?<code>\\d+)m|\\${b}(?<uri>.*))`,`y`),S=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},C=e=>`[${e}m`,w=e=>`${b}${e}`,T=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:y(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=y(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===``)&&(i=!0,a=t.startsWith(b,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())},E=e=>{let t=e.split(` `),n=t.length;for(;n&&!y(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},D=(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=y(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=y(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(``),T(s,r,t),c=y(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){T(s,r,t),c=y(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){T(s,r,t),c=y(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>E(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===``){x.lastIndex=e+1;let t=x.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+=w(``));let e=i?S(i):void 0;i&&e&&(r+=C(e))}else t===`
|
|
5
|
-
`&&(i&&S(i)&&(r+=C(i)),a&&(r+=w(a)))}return r},O=/\r?\n/;function k(e,t,n){return String(e).normalize().split(O).map(e=>D(e,t,n)).join(`
|
|
6
|
-
`)}var A=n(((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`}})),j=A();function M(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?M(a,t<0?-1:1,n):a}const ae={actions:new Set([`up`,`down`,`left`,`right`,`space`,`enter`,`cancel`]),aliases: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 oe(e,t){if(typeof e==`string`)return ae.aliases.get(e)===t;for(let n of e)if(n!==void 0&&oe(n,t))return!0;return!1}function se(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 ce=Symbol(`clack:cancel`);function le(e){return e===ce}function ue(e,t){let n=e;n.isTTY&&n.setRawMode(t)}const de=e=>`rows`in e&&typeof e.rows==`number`?e.rows:20;let N=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame=``;_subscribers=new Map;_cursor=0;state=`initial`;error=``;value;userInput=``;constructor(e,t=!0){let{input:n=l,output:r=u,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(ce);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),ue(this.input,!0),this.output.on(`resize`,this.render),this.render(),this.once(`submit`,()=>{this.output.write(j.cursor.show),this.output.off(`resize`,this.render),ue(this.input,!1),e(this.value)}),this.once(`cancel`,()=>{this.output.write(j.cursor.show),this.output.off(`resize`,this.render),ue(this.input,!1),e(ce)})})}_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&&ae.aliases.has(t.name)&&this.emit(`cursor`,ae.aliases.get(t.name)),ae.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`)}oe([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
|
-
`),ue(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=k(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
|
|
10
|
-
`).length-1;this.output.write(j.cursor.move(-999,e*-1))}render(){let e=k(this._render(this)??``,process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state===`initial`)this.output.write(j.cursor.hide);else{let t=se(this._prevFrame,e),n=de(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(j.cursor.move(0,a-i)),this.output.write(j.erase.lines(1));let t=e.split(`
|
|
11
|
-
`);this.output.write(t[a]),this._prevFrame=e,this.output.write(j.cursor.move(0,t.length-a-1));return}else if(t.lines.length>1){if(r<i)a=r;else{let e=a-i;e>0&&this.output.write(j.cursor.move(0,e))}this.output.write(j.erase.down());let t=e.split(`
|
|
12
|
-
`).slice(a);this.output.write(t.join(`
|
|
13
|
-
`)),this._prevFrame=e;return}}this.output.write(j.erase.down())}this.output.write(e),this.state===`initial`&&(this.state=`active`),this._prevFrame=e}}};var fe=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(j.cursor.move(0,-1)),this.value=e,this.state=`submit`,this.close()}),this.on(`cursor`,()=>{this.value=!this.value})}};let pe=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?M(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=M(this.cursor,-1,this.options);break;case`down`:case`right`:this.cursor=M(this.cursor,1,this.options);break;case`space`:this.toggleValue();break}})}};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?M(n,1,this.options):n,this.changeValue(),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=M(this.cursor,-1,this.options);break;case`down`:case`right`:this.cursor=M(this.cursor,1,this.options);break}this.changeValue()})}},he=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}${o(`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=``)})}};const{white:P,gray:F,dim:I,hidden:ge,bold:L,cyanBright:_e,bgCyan:ve}=a,R=a.hex(`#BD5B08`),z=a.hex(`#111`),B=a.hex(`#0E838F`),ye=z.bgHex(`#0E838F`),be=a.hex(`#AB2526`),xe=z.bgHex(`#AB2526`),Se=a.hex(`#218529`),Ce=z.bgHex(`#218529`),we=a.hex(`#7F7322`),Te=z.bgHex(`#7F7322`);var Ee=class extends Error{constructor(e,t){super(e),this.signal=t}},De=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;break}this.changeValue()})}};const Oe=process.stdout,ke=process.stderr;var Ae=n(((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`}]})),je=n((e=>{let t=Ae(),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}}})),Me=t(je(),1);function Ne(e,t=s.stderr){t.isTTY&&(e?t.write(`\x1B[?25h`):t.write(`\x1B[?25l`))}const V={diamond:`◇`,dash:`─`,radioInactive:`○`,radioActive:`●`,backActive:`◀`,backInactive:`◁`,bar:`│`,leftT:`├`,rigthT:`┤`,arrows:{left:`‹`,right:`›`},corners:{tl:`╭`,bl:`╰`,tr:`╮`,br:`╯`}},H={error:xe(` ERROR `),warning:Te(` WARNING `),info:ye(` INFO `),success:Ce(` SUCCESS `),cancel:P.bgRed(` X `)},U=(e=1)=>ge(` `.repeat(e)),Pe={none:-1,error:0,warn:1,info:2,log:3,debug:4};let Fe=`log`;function Ie(e){Fe=e}function Le(){return Fe}const W=e=>{Pe[Le()]>=Pe.log&&Oe.write(`${e}\n`)},Re=e=>{W(e.split(`
|
|
14
|
-
`).map(e=>`${F(V.bar)}${e.length>0?` `+P(e):``}`).join(`
|
|
15
|
-
`))},ze=()=>{Re(``)},Be=(e,{linePrefix:t=F(V.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)+U()+a(e));return r&&s.unshift(t),i&&s.push(t),s.join(`
|
|
17
|
-
`)},Ve=(e,t=!0)=>{W(Be(e,{firstLinePrefix:F(V.leftT),linePrefix:F(V.bar),newlineAfter:t}))},He=(e,t,n=!0)=>{W(`${F(V.corners.tl)} ${R(e)} ${t?I(t):``}`),n&&ze()},Ue=(e,t)=>{W(`${F(V.corners.bl)} ${R(e)} ${t?I(t):``}\n`)},We=(e,{shape:t=V.corners.bl,multiline:n=!1}={})=>{W(Be(e,{firstLinePrefix:`${F(t)} ${H.cancel}`,linePrefix:F(V.bar),newlineBefore:!0,formatLine:e=>I(e),multiline:n}))},Ge=(e,{shape:t=V.corners.bl,multiline:n=!1,newlineBefore:r=!0}={})=>{W(Be(e,{firstLinePrefix:F(t)+U()+H.warning,linePrefix:F(V.bar),formatLine:e=>I(e),multiline:n,newlineBefore:r}))},Ke=(e,{shape:t=V.corners.bl,multiline:n=!1}={})=>{W(Be(e,{firstLinePrefix:F(t)+U()+H.success,linePrefix:F(V.bar),newlineBefore:!0,formatLine:e=>I(e),multiline:n}))},qe=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(Je,`$2`).replace(n,``)},Je=/\u001B\]8;;(?<url>.+)\u001B\\(?<label>.+)\u001B\]8;;\u001B\\/g,Ye=(e,t)=>{Xe(e,t),c(1)},Xe=(e,t,n=V.corners.bl)=>{let r=Le();e&&Pe[r]>=Pe.error&&ke.write(`${F(n)} ${H.error} ${I(e)}\n${t?U()+t+`
|
|
18
|
-
`:``}`)},Ze=process.env.TERM_PROGRAM===`Apple_Terminal`,G={};G.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`},G.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},G.cursorUp=(e=1)=>`\x1B[`+e+`A`,G.cursorDown=(e=1)=>`\x1B[`+e+`B`,G.cursorForward=(e=1)=>`\x1B[`+e+`C`,G.cursorBackward=(e=1)=>`\x1B[`+e+`D`,G.cursorLeft=`\x1B[G`,G.cursorSavePosition=Ze?`\x1B7`:`\x1B[s`,G.cursorRestorePosition=Ze?`\x1B8`:`\x1B[u`,G.cursorGetPosition=`\x1B[6n`,G.cursorNextLine=`\x1B[E`,G.cursorPrevLine=`\x1B[F`,G.cursorHide=`\x1B[?25l`,G.cursorShow=`\x1B[?25h`,G.eraseLines=e=>{let t=``;for(let n=0;n<e;n++)t+=G.eraseLine+(n<e-1?G.cursorUp():``);return e&&(t+=G.cursorLeft),t},G.eraseEndLine=`\x1B[K`,G.eraseStartLine=`\x1B[1K`,G.eraseLine=`\x1B[2K`,G.eraseDown=`\x1B[J`,G.eraseUp=`\x1B[1J`,G.eraseScreen=`\x1B[2J`,G.scrollUp=`\x1B[S`,G.scrollDown=`\x1B[T`,G.clearScreen=`\x1Bc`,G.clearTerminal=process.platform===`win32`?`${G.eraseScreen}[0f`:`${G.eraseScreen}[3J[H`,G.beep=`\x07`,G.link=(e,t)=>[`\x1B]`,`8`,`;`,`;`,t,`\x07`,e,`\x1B]`,`8`,`;`,`;`,`\x07`].join(``),G.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`},G.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 Qe=n(((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})),$e=n(((e,t)=>{let n=Qe(),r=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)}})),et=n(((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`)})),tt=n(((t,n)=>{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`};if(!i(r))n.exports=function(){return function(){}};else{var a=e(`assert`),o=et(),s=/^win/i.test(r.platform),c=e(`events`);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),n.exports=function(e,t){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)};n.exports.unload=u;var d=function(e,t,n){l.emitted[e]||(l.emitted[e]=!0,l.emit(e,t,n))},f={};o.forEach(function(e){f[e]=function(){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))}}),n.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=ee,r.reallyExit=g)};n.exports.load=m;var h=r.reallyExit,g=function(e){i(global.process)&&(r.exitCode=e||0,d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),h.call(r,r.exitCode))},_=r.emit,ee=function(e,t){if(e===`exit`&&i(global.process)){t!==void 0&&(r.exitCode=t);var n=_.apply(this,arguments);return d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),n}else return _.apply(this,arguments)}}})),nt=t($e(),1),rt=t(tt(),1);const it=(0,nt.default)(()=>{(0,rt.default)(()=>{s.stderr.write(`\x1B[?25h`)},{alwaysLast:!0})});let at=!1;const K={};K.show=(e=s.stderr)=>{e.isTTY&&(at=!1,e.write(`\x1B[?25h`))},K.hide=(e=s.stderr)=>{e.isTTY&&(it(),at=!0,e.write(`\x1B[?25l`))},K.toggle=(e,t)=>{e!==void 0&&(at=e),at?K.show(t):K.hide(t)};var ot=n(((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}})),st=n(((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}})),ct=t(ot(),1),lt=t(st(),1);function q(e,t={}){if(typeof e!=`string`||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=r(e),e.length===0))return 0;e=e.replace((0,lt.default)(),` `);let n=t.ambiguousIsNarrow?1:2,i=0;for(let t of e){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=768&&e<=879))switch(ct.default.eastAsianWidth(t)){case`F`:case`W`:i+=2;break;case`A`:i+=n;break;default:i+=1}}return i}const ut=new Set([`\x1B`,``]),dt=`]8;;`,ft=e=>`${ut.values().next().value}[${e}m`,pt=e=>`${ut.values().next().value}${dt}${e}`,mt=e=>e.split(` `).map(e=>q(e)),ht=(e,t,n)=>{let i=[...t],a=!1,o=!1,s=q(r(e[e.length-1]));for(let[t,r]of i.entries()){let c=q(r);if(s+c<=n?e[e.length-1]+=r:(e.push(r),s=0),ut.has(r)&&(a=!0,o=i.slice(t+1).join(``).startsWith(dt)),a){o?r===`\x07`&&(a=!1,o=!1):r===`m`&&(a=!1);continue}s+=c,s===n&&t<i.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&&!(q(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=``,a,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=q(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(`
|
|
19
|
-
`)];for(let[e,t]of l.entries()){if(r+=t,ut.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);a=e===39?void 0:e}else t.uri!==void 0&&(o=t.uri.length===0?void 0:t.uri)}let n=i.codes.get(Number(a));l[e+1]===`
|
|
20
|
-
`?(o&&(r+=pt(``)),a&&n&&(r+=ft(n))):t===`
|
|
21
|
-
`&&(a&&n&&(r+=ft(a)),o&&(r+=pt(o)))}return r};function vt(e,t,n){return String(e).normalize().replace(/\r\n/g,`
|
|
22
|
-
`).split(`
|
|
23
|
-
`).map(e=>_t(e,t,n)).join(`
|
|
24
|
-
`)}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`,``],St=e=>`${xt[0]}[${e}m`,Ct=(e,t,n)=>{let r=[];e=[...e];for(let n of e){let a=n;n.includes(`;`)&&(n=n.split(`;`)[0][0]+`0`);let o=i.codes.get(Number.parseInt(n,10));if(o){let n=e.indexOf(o.toString());n===-1?r.push(St(t?o:a)):e.splice(n,1)}else if(t){r.push(St(0));break}else r.push(St(a))}if(t&&(r=r.filter((e,t)=>r.indexOf(e)===t),n!==void 0)){let e=St(i.codes.get(Number.parseInt(n,10)));r=r.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return r.join(``)};function wt(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=Ct(i);else if(c>=a){l+=Ct(i,!0,s);break}}return l}const Tt=e=>{let{columns:t}=e;return t||80},Et=(e,t)=>{let n=e.rows||24,i=t.split(`
|
|
25
|
-
`),a=i.length-n;return a<=0?t:wt(t,r(i.slice(0,a).join(`
|
|
26
|
-
`)).length+1)};function Dt(e,{showCursor:t=!1}={}){let n=0,r=Tt(e),i=``,a=(...a)=>{t||K.hide();let o=a.join(` `)+`
|
|
27
|
-
`;o=Et(e,o);let s=Tt(e);o===i&&r===s||(i=o,r=s,o=vt(o,s,{trim:!1,hard:!0,wordWrap:!1}),e.write(G.eraseLines(n)+o),n=o.split(`
|
|
28
|
-
`).length)};return a.clear=()=>{e.write(G.eraseLines(n)),i=``,r=Tt(e),n=0},a.done=()=>{i=``,r=Tt(e),n=0,t||K.show()},a}Dt(s.stdout),Dt(s.stderr);const Ot=Dt(Oe),J=F(V.bar),Y=F(V.corners.bl),X=F(V.leftT);function Z(e,t,n){let r=e.validate?.(n);if(r){let t=r instanceof Error?r.message:r;if(e.throwOnError)throw Error(t);Ye(t)}return W(t.submit({value:n}).join(`
|
|
29
|
-
`)),n}const kt=async e=>{let t={...At(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(`
|
|
30
|
-
`)};if(e.type===`select`){let i=String(e.defaultValue);if(e.acceptDefault)return Z(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 Z(e,t,i);n=new fe({...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 Z(e,t,i);n=new pe({...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 Z(e,t,i);n=new De({...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 Z(e,t,i);n=new he({...e,initialValue:e.initialValue,defaultValue:String(e.defaultValue??``),render(){return r(this,n)}})}let i=await n.prompt();if(le(i)){if(e.throwOnError)throw new Ee(`Operation cancelled`);We(`Operation cancelled`),process.exit(0)}return i},Q=(e,t)=>{let{question:n,label:r}=e;if(e.type!==`confirm`&&!t)return[`${X} ${n} ${I(`(skipped)`)}`,`${J}`];let i=e.type===`confirm`?`${J} ${R(t)} ${I(r)}`:`${J} ${R(r)} ${I(t)}`;return[`${X} ${n}`,i,`${J}`]},At=e=>{switch(e.type){case`select`:return Mt(e);case`confirm`:return Pt(e);case`text`:return jt(e);case`multiselect`:return Mt(e);case`list`:return Nt(e)}},jt=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[`${Y} ${L(t)} ${I(n)}`,`${U(2)}${r(a||I(i))}`,``]};return{initial:()=>[`${Y} ${L(t)} ${I(n)}`,`${U(2)}${F(r(i))}`,``],active:a,error:({value:e,error:i})=>[`${X} ${H.error} ${I(i)}`,`${J}`,`${Y} ${t} ${I(n)}`,`${U(2)}${r(e)}`,``],submit:({value:t})=>Q(e,r(t??``)),cancel:a}},Mt=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?B:P,l=o?c.underline(i):c(i),u=t.sublabel?c.grey(t.sublabel):``,d=c(s||o&&!Array.isArray(r)?t.activeIcon??V.radioActive:t.inactiveIcon??V.radioInactive);return`${U(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=[`${Y} ${L(n)} ${I(i)}`,`${e>0&&t.length>a?`${U(2)}${I(`...`)}\n`:``}${c.map(o).filter(s).join(`
|
|
31
|
-
`)}${e+a<t.length&&t.length>a?`\n${U(2)}${I(`...`)}`:``}`,``];if(l?.description){let e=new Intl.Segmenter(`en`,{granularity:`word`}),t=U(2),n=process.stdout.columns-qe(t).length*2,r=qe(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(I(i.map(e=>t+e+t).join(`
|
|
32
|
-
`)),``)}return u};return{initial:o,active:o,confirm:o,error:(e,t)=>[`${X} ${H.error} ${I(e.error)}`,`${J}`,...o(e,t)],submit:({value:n})=>Array.isArray(n)?Q(e,t.filter(e=>n.includes(e.value)).map(e=>e.label).join(`, `)):Q(e,t.find(e=>e.value===n)?.label),cancel:o}},Nt=e=>{let{question:t,helpText:n}=e,r=e.options,i=n??``,{rows:a}=Oe,o=({cursor:e,value:n},o)=>{o instanceof De&&(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?B:P,u=o?l.underline(r):l(r),d=l(c||o&&!Array.isArray(n)?V.radioActive:V.radioInactive);return[`${U(2)}${d} ${u}`,...e.details.map((t,n)=>`${U(6)}${n===e.details.length-1?F(V.corners.bl):J} ${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,p=[],m=0;for(let t=0;t<l.length;t++){let n=l[t];if(e>=m&&n.length+m>e){d=t===0,f=t===l.length-1,p=n,s=e-m;break}m+=n.length}return[`${Y} ${L(t)} ${I(i)}`,...d?[]:[`${U(2)}${I(`...`)}`],...p.map(c).reduce((e,t)=>[...e,...t],[]),...f?[]:[`${U(2)}${I(`...`)}`]]};return{initial:o,active:o,confirm:o,error:(e,t)=>[`${X} ${H.error} ${I(e.error)}`,`${J}`,...o(e,t)],submit:({value:t})=>Array.isArray(t)?Q(e,r.filter(e=>t.includes(e.value)).map(e=>e.value).join(`, `)):Q(e,r.find(e=>e.value===t)?.value),cancel:o}},Pt=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?B.underline:I,n=e?I:B.underline;return[`${Y} ${L(r)} ${I(a)}`,`${U(2)}${t(o)} / ${n(s)}`]};return{initial:c,active:c,confirm:c,error:c,submit:({value:t})=>Q(e,t?`yes`:`no`),cancel:c}},Ft={clockwise:[`┤`,`┘`,`┴`,`└`,`├`,`┌`,`┬`,`┐`],vertical:[`▁`,`▃`,`▄`,`▅`,`▆`,`▇`,`▆`,`▅`,`▄`,`▃`]},It=[``,`.`,`..`,`...`,` ..`,` .`,``],Lt=(e=Ft.clockwise,t=R)=>{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+=` ${I(s)}`),$()){let r=0;a(),n=setInterval(()=>{r++;let n=e[r%e.length],a=It[r%It.length];o&&Ot(`${t(n)} ${i} ${a}`)},120)}else W(`${X} ${r}`)},update(e){i=e},stop(e){$()?(Ot.clear(),e&&(Ot(`${X} ${r}\n${J} ${e}`),Ot.done(),ze()),a()):(e!==void 0&&W(`${J} ${e}`),ze())}}};function $(){try{return!!(process.stdin.isTTY&&process.stdout.isTTY)}catch{return!1}}function Rt(){return!$()||Me.isCI}const zt=Me.isCI;export{P as A,B as C,F as D,I as E,le as M,A as N,Se as O,je as S,R as T,He as _,X as a,Ge as b,tt as c,Le as d,Re as f,V as g,Ie as h,$ as i,we as j,be as k,We as l,ze as m,Rt as n,Lt as o,W as p,kt as r,Dt as s,zt as t,Ue as u,Ke as v,L as w,Ne as x,Ve as y};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,n as u}from"./prompt-sL_yMZbI.mjs";function d(e){return e.usage(`$0 keyless-certificates create
|
|
3
|
-
|
|
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 t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.keylessCertificates.create({...e,zone_id:d})),{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`)}});n(await i(`Creating`,async()=>a.keylessCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 keyless-certificates delete <keyless-certificate-id>
|
|
5
|
-
|
|
6
|
-
Removes a Keyless SSL configuration. SSL connections will no longer use the keyless server for cryptographic operations.`).positional(`keyless-certificate-id`,{type:`string`,description:`Identifier.`,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 m={command:`delete <keyless-certificate-id>`,describe:`Delete Keyless SSL Configuration`,builder:p,handler:async o=>a({command:`keyless-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf keyless-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/keyless_certificates/${o[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(o[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(o[`keyless-certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
|
|
7
|
-
`);return}n(await i(`Deleting`,async()=>a.keylessCertificates.delete({zone_id:s,keyless_certificate_id:o[`keyless-certificate-id`]})),{successLabel:`Deleted`})})};function h(e){return e.usage(`$0 keyless-certificates edit <keyless-certificate-id>
|
|
8
|
-
|
|
9
|
-
This will update attributes of a Keyless SSL. Consists of one or more of the following: host,name,port.`).positional(`keyless-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether or not the Keyless SSL is on or off.`}).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.`}).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 g={command:`edit <keyless-certificate-id>`,describe:`Edit Keyless SSL Configuration`,builder:h,handler:async l=>a({command:`keyless-certificates edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf keyless-certificates edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/keyless_certificates/${l[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(l[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(l[`keyless-certificate-id`]??``),"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({enabled:l.enabled,host:c(l.host,`host`,`text`),name:c(l.name,`name`,`text`),port:l.port,tunnel:{private_ip:c(l[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(l[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Updating`,async()=>a.keylessCertificates.edit({...e,zone_id:u,keyless_certificate_id:l[`keyless-certificate-id`]})),{successLabel:`Updated`});return}let d=s({enabled:l.enabled,host:c(l.host,`host`,`text`),name:c(l.name,`name`,`text`),port:l.port,tunnel:{private_ip:c(l[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(l[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}});n(await i(`Updating`,async()=>a.keylessCertificates.edit({...d,zone_id:u,keyless_certificate_id:l[`keyless-certificate-id`]})),{successLabel:`Updated`})})};function _(e){return e.usage(`$0 keyless-certificates get <keyless-certificate-id>
|
|
10
|
-
|
|
11
|
-
Get details for one Keyless SSL configuration.`).positional(`keyless-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <keyless-certificate-id>`,describe:`Get Keyless SSL Configuration`,builder:_,handler:async o=>a({command:`keyless-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf keyless-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/keyless_certificates/${o[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(o[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(o[`keyless-certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.keylessCertificates.get({zone_id:s,keyless_certificate_id:o[`keyless-certificate-id`]})),{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 keyless-certificates list
|
|
12
|
-
|
|
13
|
-
List all Keyless SSL configurations for a given zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List Keyless SSL Configurations`,builder:y,handler:async o=>a({command:`keyless-certificates list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf keyless-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.keylessCertificates.list({zone_id:s})),{successLabel:`Loaded`})})},x={command:`keyless-certificates`,describe:`keyless-certificates`,builder:e=>e.command(f).command(m).command(g).command(v).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{x as default};
|
package/dist/kv-CA4J7cCq.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d,t as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,n as m}from"./prompt-sL_yMZbI.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";import{n as g,t as _}from"./raw-fetch-lSVttVJF.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
|
|
3
|
-
|
|
4
|
-
Remove multiple KV pairs from the namespace. Body should be an array of up to 10,000 keys to be removed.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,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){o({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 i(u),d=u.local?e:await t();if(u.accountId=d,!await m({force:!!u.force,message:`This operation deletes the specified keys from the namespace.`})){process.stderr.write(`Aborted.
|
|
5
|
-
`);return}if(u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let t=Math.ceil(e.length/1e4),n=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4);n=await s(`Deleting: batch ${Math.floor(i/1e4)+1}/${t}`,async()=>r(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:a}))}a(n,{successLabel:`Deleted`});return}a(await s(`Deleting`,async()=>r(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:e})),{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>
|
|
6
|
-
|
|
7
|
-
Retrieve up to 100 KV pairs from the namespace. Keys must contain text-based values. JSON values can optionally be parsed instead of being returned as a string value. Metadata can be included if \`withMetadata\` is true.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:`Whether to parse JSON values in the response.`,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 r=>c({command:`kv bulk get`,classification:{safeFlags:[`type`,`with-metadata`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({keys:r.keys,type:d(r.type,`type`,`text`),withMetadata:r[`with-metadata`]}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.kv.bulk.get({...e,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Created`});return}if(r.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let p=u({keys:r.keys,type:d(r.type,`type`,`text`),withMetadata:r[`with-metadata`]});a(await s(`Creating`,async()=>c.kv.bulk.get({...p,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Created`})})};function S(e){return e.usage("$0 kv bulk update <namespace-id>\n\nWrite multiple keys and values at once. Body should be an array of up to 10,000 key-value pairs to be stored, along with optional expiration information. Existing values and expirations will be overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will never expire. If both are set, `expiration_ttl` is used and `expiration` is ignored. The entire request size must be 100 megabytes or less.").positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,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:`update <namespace-id>`,describe:`Write multiple key-value pairs`,builder:S,handler:async u=>c({command:`kv bulk update`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){o({command:`cf kv bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 i(u),d=u.local?e:await t();if(u.accountId=d,u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let t=Math.ceil(e.length/1e4),n=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4);n=await s(`Updating: batch ${Math.floor(i/1e4)+1}/${t}`,async()=>r(c,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk`,{body:a}))}a(n,{successLabel:`Updated`});return}a(await s(`Updating`,async()=>r(c,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk`,{body:e})),{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\nRemove a KV pair from the namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name.").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:`Namespace identifier tag.`,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 key-value pair`,builder:T,handler:async r=>c({command:`kv keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/values/${r[`key-name`]==null?`<key-name>`:encodeURIComponent(String(r[`key-name`]))}`,pathParams:{"key-name":String(r[`key-name`]??``),"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await m({force:!!r.force})){process.stderr.write(`Aborted.
|
|
8
|
-
`);return}a(await s(`Deleting`,async()=>c.kv.keys.delete({account_id:l,namespace_id:r[`namespace-id`],key_name:r[`key-name`]})),{successLabel:`Deleted`})})};function D(e){return e.usage("$0 kv keys get <key-name>\n\nReturns the value associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name. If the KV-pair is set to expire at some point, the expiration time as measured in seconds since the UNIX epoch will be returned in the `expiration` response header.").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:`Namespace identifier tag.`,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:`Read key-value pair`,builder:D,handler:async r=>c({command:`kv keys get`,classification:{safeFlags:[`dry-run`,`text`]}},r,async()=>{if(r.dryRun){o({command:`cf kv keys get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/values/${r[`key-name`]==null?`<key-name>`:encodeURIComponent(String(r[`key-name`]))}`,pathParams:{"key-name":String(r[`key-name`]??``),"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}await i(r);let a=r.local?e:await t();r.accountId=a;let c=await s(`Loading`,async()=>_(`/accounts/${a}/storage/kv/namespaces/${encodeURIComponent(String(r[`namespace-id`]))}/values/${encodeURIComponent(String(r[`key-name`]))}`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}));g(r.text===!0?c.toString(`utf-8`):c)})};function k(e){return e.usage(`$0 kv keys list
|
|
9
|
-
|
|
10
|
-
Lists a namespace's keys.`).option(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of keys returned in the response. The cursor attribute may be used to iterate over the next batch of keys if there are more than the limit.`}).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 token indicating the position from which to continue when requesting the next set of records if the amount of list results was limited by the limit parameter. A valid value for the cursor can be obtained from the `cursors` object in the `result_info` structure."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List a Namespace's Keys`,builder:k,handler:async r=>c({command:`kv keys list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,prefix:r.prefix,cursor:r.cursor};if(r.dryRun){o({command:`cf kv keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/keys`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.kv.keys.list({account_id:u,namespace_id:r[`namespace-id`],...c})),{successLabel:`Loaded`})})};function j(e){return e.usage("$0 kv keys update <key-name>\n\nWrite a value identified by a key. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name. Body should be the value to be stored. If JSON metadata to be associated with the key/value pair is needed, use `multipart/form-data` content type for your PUT request (see dropdown below in `REQUEST BODY SCHEMA`). Existing values, expirations, and metadata will be overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will never expire. If both are set, `expiration_ttl` is used and `expiration` is ignored.").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:`Namespace identifier tag.`,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:`Expires the key after a number of seconds. Must be at least 60.`}).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:`update <key-name>`,describe:`Write key-value pair with optional metadata`,builder:j,handler:async l=>c({command:`kv keys update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={expiration:l.expiration,expiration_ttl:l[`expiration-ttl`]};if(l.dryRun){o({command:`cf kv keys update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 i(l),p=l.local?e:await t();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`)??``)),a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}`,{body:e})),{successLabel:`Updated`});return}if(l.file){let e=f(l.file);a(await s(`Updating`,async()=>r(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`}})),{successLabel:`Updated`});return}if(l.body){let e=d(l.body,`body`,`binary`),t=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}${t?`?`+t:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{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 metadata associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name.").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:`Namespace identifier tag.`,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:`Read the metadata for a key`,builder:P,handler:async r=>c({command:`kv metadata get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv metadata get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/metadata/${r[`key-name`]==null?`<key-name>`:encodeURIComponent(String(r[`key-name`]))}`,pathParams:{"key-name":String(r[`key-name`]??``),"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.kv.metadata.get({account_id:l,namespace_id:r[`namespace-id`],key_name:r[`key-name`]})),{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
|
|
11
|
-
|
|
12
|
-
Creates a namespace under the given title. A \`400\` is returned if the account already owns a namespace with this title. A namespace must be explicitly deleted to be replaced.`).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:`A human-readable string name for a 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 r=>c({command:`kv namespaces create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({jurisdiction:d(r.jurisdiction,`jurisdiction`,`text`),title:d(r.title,`title`,`text`)}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.kv.namespaces.create({...e,account_id:f})),{successLabel:`Created`});return}r.title===void 0&&(r.title=await p(`title`,`A human-readable string name for a Namespace.`));let m=u({jurisdiction:d(r.jurisdiction,`jurisdiction`,`text`),title:d(r.title,`title`,`text`)});a(await s(`Creating`,async()=>c.kv.namespaces.create({...m,account_id:f})),{successLabel:`Created`})})};function z(e){return e.usage(`$0 kv namespaces delete <namespace-id>
|
|
13
|
-
|
|
14
|
-
Deletes the namespace corresponding to the given ID.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,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:`Remove a Namespace`,builder:z,handler:async r=>c({command:`kv namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf kv namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await m({force:!!r.force})){process.stderr.write(`Aborted.
|
|
15
|
-
`);return}a(await s(`Deleting`,async()=>c.kv.namespaces.delete({account_id:l,namespace_id:r[`namespace-id`]})),{successLabel:`Deleted`})})};function V(e){return e.usage(`$0 kv namespaces get <namespace-id>
|
|
16
|
-
|
|
17
|
-
Get the namespace corresponding to the given ID.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <namespace-id>`,describe:`Get a Namespace`,builder:V,handler:async r=>c({command:`kv namespaces get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv namespaces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.kv.namespaces.get({account_id:l,namespace_id:r[`namespace-id`]})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 kv namespaces list
|
|
18
|
-
|
|
19
|
-
Returns the namespaces owned by an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:`Field to order results by.`,choices:[`id`,`title`]}).option(`direction`,{type:`string`,description:`Direction to order namespaces.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List Namespaces`,builder:h(U),handler:async r=>c({command:`kv namespaces list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf kv namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.kv.namespaces.list({account_id:u,...c})),{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 kv namespaces update <namespace-id>
|
|
20
|
-
|
|
21
|
-
Modifies a namespace's title.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`title`,{type:`string`,description:`A human-readable string name for a 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 K={command:`update <namespace-id>`,describe:`Rename a Namespace`,builder:G,handler:async r=>c({command:`kv namespaces update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv namespaces update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({title:d(r.title,`title`,`text`)}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.kv.namespaces.update({...e,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Updated`});return}r.title===void 0&&(r.title=await p(`title`,`A human-readable string name for a Namespace.`));let m=u({title:d(r.title,`title`,`text`)});a(await s(`Updating`,async()=>c.kv.namespaces.update({...m,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Updated`})})},q={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(R).command(B).command(H).command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`kv`,describe:`kv`,builder:e=>e.command(w).command(N).command(I).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
|
package/dist/local-BrfySqnx.mjs
DELETED
package/dist/login-CLW108XX.mjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{m as e,o as t}from"./chunk-XLADBZ7F-BXKOjWbx.mjs";import{a as n}from"./theme-BiIYWOed.mjs";import{a as r,i,r as a}from"./ui-DH95w1Qk.mjs";import{c as o,d as s,i as c,l,o as u,p as d,r as f,s as p,u as m}from"./oauth-Dzk6Gy-6.mjs";import"./auth-DJhSjNNL.mjs";import{t as h}from"./output-Bia1u2k5.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(t({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async t=>{_(t,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),e(t.name);let r=u().configs.exists(t.name);await l({browser:t.browser,device:t.device,scopes:t.scopes,profile:t.name}),console.log(i(r?`Profile "${t.name}" re-authenticated.`:`Profile "${t.name}" created.`)),console.log(a(`Run ${n.code(`cf auth activate ${t.name}`)} to use this profile in a directory.`))}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async t=>{_(t,`delete`),v(),e(t.name);let r=u();if(!r.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist.`);let o=r.bindings.removeAllBindingsForProfile(t.name);if(o.length>0){console.log(i(`Removed directory bindings:`));for(let e of o)console.log(` ${e}`)}await m(t.name),r.configs.delete(t.name),console.log(i(`Profile "${t.name}" deleted.`));let s=r.bindings.getProfileForDirectory(process.cwd());s?console.log(i(`Active profile for this directory: ${s}.`)):r.configs.exists(`default`)?console.log(i(`This directory now uses the default profile.`)):console.log(a(`No active profile for this directory. Run ${n.code(`cf auth login`)} to set up the default profile, or ${n.code(`cf auth create <name>`)} to create a named profile.`))}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:t=>{_(t,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),e(t.name);let n=u();if(!n.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist. Run \`cf auth create ${t.name}\` first.`);let r=t.dir??process.cwd();n.bindings.activate(t.name,r),console.log(i(`Profile "${t.name}" activated for "${g.resolve(r)}".`))}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:e=>{_(e,`deactivate`),v();let t=u(),r=e.dir??process.cwd(),{removedProfile:o,newResolution:s}=t.bindings.deactivate(r);console.log(i(`Profile "${o}" deactivated from "${g.resolve(r)}".`)),s.profile===void 0?console.log(a(`Run ${n.code(`cf auth login`)} to set up the default profile, or ${n.code(`cf auth create <name>`)} to create a named profile.`)):s.profile===`default`?console.log(i(`This directory now uses the default profile.`)):console.log(i(`Now using: ${s.profile} (${s.source}).`))}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=u(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async e=>{_(e,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let t=f();if(t!==`default`&&console.log(r(`This directory has profile "${t}" active. \`cf auth login\` updates the default profile, not "${t}".\nTo re-authenticate "${t}", run \`cf auth create ${t}\`.`)),d(`default`),!e.force&&o()){if(await p()){let e=s();console.log(i(`You are already logged in.`)),console.log(`${n.info(`Config file:`)} ${n.muted(c())}`),e?.expiration_time&&console.log(`${n.info(`Token expires:`)} ${new Date(e.expiration_time).toLocaleString()}`),console.log(a(`Run ${n.code(`cf auth login --force`)} to re-authenticate, or ${n.code(`cf auth logout`)} to log out.`));return}console.log(r(`Existing tokens are invalid or expired. Starting fresh login...
|
|
3
|
-
`))}else e.force&&o()&&console.log(i(`Re-authenticating...
|
|
4
|
-
`));if(console.log(i(`Starting OAuth login flow...
|
|
5
|
-
`)),!await l({browser:e.browser,device:e.device,scopes:e.scopes,profile:`default`})){console.log(r(`CLOUDFLARE_API_TOKEN is set and takes precedence. Unset it to log in via OAuth.`));return}let u=s();console.log(`${n.info(`Config file:`)} ${n.muted(c())}`),u?.scopes&&console.log(`${n.info(`Scopes:`)} ${u.scopes.join(`, `)}`),u?.expiration_time&&console.log(`${n.info(`Token expires:`)} ${new Date(u.expiration_time).toLocaleString()}`)}};export{y as a,C as c,_ as i,w as n,S as o,x as r,b as s,T as t};
|
package/dist/login-xgRjiyJa.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as e}from"./theme-BiIYWOed.mjs";import{i as t}from"./ui-DH95w1Qk.mjs";import{n}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as r,t as i}from"./login-CLW108XX.mjs";var a=n({...i,describe:!1,handler:async n=>{n.quiet||console.error(t(`${e.code(`cf login`)} is an alias for ${e.code(`cf auth login`)}. Authentication commands are under ${e.code(`cf auth`)}.`)),await i.handler(n)}},{command:`login`,classification:r});export{a as default};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-sL_yMZbI.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function m(e){return e.usage(`$0 mtls-certificates associations get <mtls-certificate-id>
|
|
3
|
-
|
|
4
|
-
Lists all active associations between the certificate and Cloudflare services.`).positional(`mtls-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <mtls-certificate-id>`,describe:`List mTLS certificate associations`,builder:m,handler:async c=>s({command:`mtls-certificates associations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}/associations`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mtlsCertificates.associations.get({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Loaded`})})},g={command:`associations`,describe:`Operations for associations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 mtls-certificates create
|
|
5
|
-
|
|
6
|
-
Upload a certificate that you want to use with mTLS-enabled Cloudflare services, such as Bring Your Own CA (BYO-CA) for mTLS. To create certificates issued by the Cloudflare managed CA, use the [Create Client Certificate endpoint](/api/resources/client_certificates/methods/create/).`).option(`ca`,{type:`boolean`,description:`Indicates whether the certificate is a CA or leaf certificate.`}).option(`certificates`,{type:`string`,description:`The uploaded root CA certificate.`}).option(`name`,{type:`string`,description:`Optional unique name for the certificate. Only used for human readability.`}).option(`private-key`,{type:`string`,description:`The private key for the certificate. This field is only needed for specific use cases such as using a custom certificate with Zero Trust's block page.`}).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 v={command:`create`,describe:`Upload mTLS certificate`,builder:_,handler:async f=>s({command:`mtls-certificates create`,classification:{safeFlags:[`ca`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf mtls-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mtls_certificates`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({ca:f.ca,certificates:u(f.certificates,`certificates`,`text`),name:u(f.name,`name`,`text`),private_key:u(f[`private-key`],`private-key`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.mtlsCertificates.create({...e,account_id:p})),{successLabel:`Created`});return}if(f.ca===void 0)throw Error(`--ca is required (or pass --body with this field set).`);f.certificates===void 0&&(f.certificates=await d(`certificates`,`The uploaded root CA certificate.`));let m=l({ca:f.ca,certificates:u(f.certificates,`certificates`,`text`),name:u(f.name,`name`,`text`),private_key:u(f[`private-key`],`private-key`,`text`)});i(await o(`Creating`,async()=>s.mtlsCertificates.create({...m,account_id:p})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 mtls-certificates delete <mtls-certificate-id>
|
|
7
|
-
|
|
8
|
-
Deletes the mTLS certificate unless the certificate is in use by one or more Cloudflare services.`).positional(`mtls-certificate-id`,{type:`string`,description:`Identifier.`,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 <mtls-certificate-id>`,describe:`Delete mTLS certificate`,builder:y,handler:async c=>s({command:`mtls-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
|
|
9
|
-
`);return}i(await o(`Deleting`,async()=>s.mtlsCertificates.delete({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Deleted`})})};function x(e){return e.usage(`$0 mtls-certificates get <mtls-certificate-id>
|
|
10
|
-
|
|
11
|
-
Fetches a single mTLS certificate uploaded to your account. To get a certificate issued by the Cloudflare managed CA, use the [Client Certificate Details endpoint](/api/resources/client_certificates/methods/get/).`).positional(`mtls-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <mtls-certificate-id>`,describe:`Get mTLS certificate`,builder:x,handler:async c=>s({command:`mtls-certificates get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mtlsCertificates.get({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 mtls-certificates list
|
|
12
|
-
|
|
13
|
-
Lists all mTLS certificates uploaded to your account, such as Bring Your Own CA (BYO-CA) for mTLS. To list certificates issued by the Cloudflare managed CA, use the [List Client Certificates endpoint](/api/resources/client_certificates/methods/list/).`).option(`type`,{type:`string`,description:`Filters results by certificate type. Multiple types can be comma-separated.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`List mTLS certificates`,builder:p(C),handler:async c=>s({command:`mtls-certificates list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={type:c.type};if(c.dryRun){a({command:`cf mtls-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mtls_certificates`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.mtlsCertificates.list({account_id:u,...s})),{successLabel:`Loaded`})})},T={command:`mtls-certificates`,describe:`mtls-certificates`,builder:e=>e.command(v).command(b).command(S).command(w).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{T as default};
|
package/dist/oauth-Dzk6Gy-6.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as e,t}from"./src-Hw-TlVAO.mjs";import{n,t as r}from"./version-Bh3b9vTa.mjs";import{i,r as a}from"./project-settings-DSXevRvj.mjs";import{a as o,n as s,t as c}from"./cf-oadujOtC.mjs";import{n as l}from"./resolve-CUDKxUrW.mjs";import{M as u,n as d}from"./interactive-B6woOLo-.mjs";import{i as f,o as p}from"./dist-BpadEMNY.mjs";function m(e,t){if(t)return{value:t,source:`flag`};let n=process.env[e];if(n)return{value:n,source:`env`}}async function h(e={}){let t=process.env.CLOUDFLARE_ACCOUNT_ID;if(t)return{value:t,source:`env`};let n=a(void 0,e),r=n===void 0?await i(void 0,e):n;if(r?.settings?.accountId)return{value:r.settings.accountId,source:`settings`,path:r.path}}async function g(){let e=await h();if(e)return e.value;let{getActiveAccountId:t}=await import(`./oauth-nsTDJ0dF.mjs`);try{return t()}catch{return}}async function _(e){let t=await h(e);t&&v(t.value,D(t,`accountId`));let{getOrSelectAccountId:n}=await import(`./oauth-nsTDJ0dF.mjs`);return n(t?.value,e)}function v(e,t){if(!process.env.DEBUG)return;let n=e.length>12?e.slice(0,12)+`…`:e;process.stderr.write(`Using account: ${n} (${t})\n`)}async function y(e,t,n){if(e?.zoneId)return b(e.zoneId,t);let r=m(`CLOUDFLARE_ZONE_ID`,e?.zone);if(r){if(!n?.quiet&&r.source!==`flag`){let e=D(r);console.error(`Using zone: ${r.value} (from ${e})`)}return b(r.value,t)}throw Error(`No zone specified.
|
|
3
|
-
|
|
4
|
-
Please provide one of the following:
|
|
5
|
-
1. Zone as a positional argument: cf dns records list <zone>
|
|
6
|
-
2. --zone flag (or -z): cf dns records list --zone example.com
|
|
7
|
-
3. CLOUDFLARE_ZONE_ID environment variable`)}async function b(e,t){if(l(e)||!t)return e;let{resolveZoneId:n}=await import(`./resolve-BXemCSyA.mjs`);return n(t,await _(),e)}function x(e){if(e?.scriptName)return e.scriptName;throw Error("Required Worker name missing. Please specify the Worker name with `--worker <name>`.")}const S=[`public`,`fedramp_high`];let C=!1;async function w(e={}){let t=a(void 0,e),n=(t===void 0?await i(void 0,e):t)?.settings?.complianceRegion,r=E(n,`cloudflare.config.ts`),o=process.env.CLOUDFLARE_COMPLIANCE_REGION,s=E(o,`CLOUDFLARE_COMPLIANCE_REGION`);return s?(r&&r!==s&&!C&&(C=!0,console.warn(`The compliance region was resolved to "${o}" from the \`CLOUDFLARE_COMPLIANCE_REGION\` environment variable, which takes precedence over the configured value "${n}" in \`cloudflare.config.ts\`.`)),s):r}async function T(e){return await w(e)??`public`}function E(e,t){switch(e){case`fedramp-high`:return`fedramp_high`;case`fedramp_high`:case`public`:case void 0:return e;default:throw Error(`Invalid compliance region "${e}" from ${t}. Valid values are: ${S.join(`, `)}`)}}function D(e,t=`zone`){switch(e.source){case`flag`:return t===`zone`?`--zone flag`:`(flag)`;case`env`:return{accountId:`CLOUDFLARE_ACCOUNT_ID`,zone:`CLOUDFLARE_ZONE_ID`,complianceRegion:`CLOUDFLARE_COMPLIANCE_REGION`}[t];case`settings`:return`cloudflare.config.ts`}}const O={debug:(...e)=>{process.env.DEBUG&&console.error(...e)},info:(...e)=>console.error(...e),log:(...e)=>console.error(...e),warn:(...e)=>console.error(...e),error:(...e)=>console.error(...e)};var k=class extends Error{};async function A(r){if(d())throw new k;e(n);let i=await p({message:r});if(u(i)||typeof i!=`string`)throw new t(130,{cancelled:!0});return i}async function j(r,i){if(d())throw new k;e(n);let a=await f({message:r,options:i.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(u(a)||typeof a!=`string`)throw new t(130,{cancelled:!0});return O.log(`To have cf automatically use this account for future commands in this project, you can update your \`cloudflare.config.ts\`:
|
|
8
|
-
|
|
9
|
-
import { defineConfig } from "cf/config";
|
|
10
|
-
|
|
11
|
-
export default defineConfig({
|
|
12
|
-
accountId: "${a}",
|
|
13
|
-
});
|
|
14
|
-
`),a}const M=c({logger:O,userAgent:r,prompt:A,select:j,isNoDefaultValueProvidedError:e=>e instanceof k});async function N(e,t){return M.getOrSelectAccountId({account_id:e,compliance_region:await T(t)})}function P(){return M.getActiveAccountId({})}async function F(){return M.fetchAllAccounts({compliance_region:await T()},{throwOnEmpty:!1})}async function I(e){if(e?.scopes&&!o(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return M.login({compliance_region:await T()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function L(e){return M.logout(e)}function R(e){M.setProfile(e)}function z(){return M.getActiveProfile()}function B(){return s({logger:O})}function V(e,t=process.cwd()){let n=B().resolve({profile:e,cwd:t});return R(n),n}function H(){return M.getOAuthTokenFromLocalState()}function U(){return M.readAuthCredentials()?.oauth_token!==void 0}function W(){return M.readAuthCredentials()}function G(){return M.getCredentialStore().path()}export{y as _,N as a,U as c,W as d,V as f,x as g,T as h,G as i,I as l,_ as m,P as n,B as o,R as p,z as r,H as s,F as t,L as u,g as v};
|