cf 0.9.1 → 0.11.0
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 +20 -5
- package/dist/_meta/agent-context.json +46 -39
- package/dist/_meta/commands.json +9358 -10581
- package/dist/_meta/hand-written-commands.json +784 -0
- package/dist/_meta/schemas.json +14870 -14667
- package/dist/abuse-reports-sDBTV0qZ.mjs +8 -0
- package/dist/{access-CxyW_sIW.mjs → access-DcNzuCue.mjs} +1 -1
- package/dist/account-BX90zXn5.mjs +2 -0
- package/dist/account-tags-Bz3JG5hI.mjs +9 -0
- package/dist/accounts-DCuW3xyZ.mjs +28 -0
- package/dist/{acm-CHacxa3s.mjs → acm-zjfShZLS.mjs} +1 -1
- package/dist/{addressing-BnqNmmYN.mjs → addressing-DORQ64Ux.mjs} +11 -11
- package/dist/{agent-context-Bu6yvDqA.mjs → agent-context-BgPR_aQr.mjs} +1 -1
- package/dist/agent-memory-C0hAUMeC.mjs +6 -0
- package/dist/ai-BpEBGMT2.mjs +5 -0
- package/dist/ai-audit-DnU3vn3E.mjs +2 -0
- package/dist/ai-gateway-COOrr_Yw.mjs +13 -0
- package/dist/ai-search-DKbN9Tyd.mjs +7 -0
- package/dist/ai-security-C_I5lo58.mjs +4 -0
- package/dist/{alerting-qa8SkXlD.mjs → alerting-4T8gmZs-.mjs} +4 -4
- package/dist/analytics-Bxh4TCP7.mjs +3 -0
- package/dist/analytics_engine-fV56bjVN.mjs +2 -0
- package/dist/{api-security-MfHbfZyf.mjs → api-security-COk_i184.mjs} +20 -20
- package/dist/argo-DIRfvxvv.mjs +2 -0
- package/dist/args-DlUhyGU0.mjs +2 -0
- package/dist/artifacts-BBfXNfUg.mjs +4 -0
- package/dist/audit-logs-BlOrlAWe.mjs +2 -0
- package/dist/{auth-DuLchM18.mjs → auth-D3X9HYhD.mjs} +3 -3
- package/dist/auth-DPhNN3Ly.mjs +5 -0
- package/dist/billing-B9e4PnvN.mjs +3 -0
- package/dist/body-parser-BshbixEq.mjs +2 -0
- package/dist/bot-management-D2JVeS-V.mjs +5 -0
- package/dist/botnet-feed-BTzTYs5d.mjs +3 -0
- package/dist/brand-protection-C5Q6Gpw9.mjs +3 -0
- package/dist/{browser-extension-q79xHrVW.mjs → browser-extension-u5uA0Lwk.mjs} +1 -1
- package/dist/browser-run-CHGOCTdG.mjs +4 -0
- package/dist/build-D0FhOj40.mjs +8 -0
- package/dist/{cache-Cl7vKJwH.mjs → cache-C6V7PbQM.mjs} +1 -1
- package/dist/{calls-DtK_ANxq.mjs → calls-Bye8Tyy-.mjs} +1 -1
- package/dist/certificate-authorities-B-U_e6JJ.mjs +2 -0
- package/dist/cf-Ds4JFovl.mjs +18 -0
- package/dist/chunk-LQW53VED-22IYZovK.mjs +119 -0
- package/dist/chunk-QBZBEHZB-CKzQKcIp.mjs +2 -0
- package/dist/{client-certificates-BtPU9GsQ.mjs → client-certificates-3RrC-6LG.mjs} +1 -1
- package/dist/{client-side-security-DAn-3jwp.mjs → client-side-security-DIdKvRMT.mjs} +1 -1
- package/dist/cloud-connector-CL1jPQud.mjs +2 -0
- package/dist/cloudforce-one-DULeqLkR.mjs +36 -0
- package/dist/command-C9VP3xaA.mjs +2 -0
- package/dist/{completions-BHE4pRjB.mjs → completions-CqgGKRAC.mjs} +3 -3
- package/dist/config.d.mts +1460 -1348
- package/dist/config.mjs +1 -1
- package/dist/connector-interrupts-CXlLObDv.mjs +2 -0
- package/dist/connector-telemetry-events-BrYX4ig4.mjs +2 -0
- package/dist/connector-telemetry-events-latest-BbpcII3_.mjs +2 -0
- package/dist/connector-telemetry-snapshots-BdeBQYcM.mjs +2 -0
- package/dist/connector-telemetry-snapshots-latest-DuCiimXl.mjs +2 -0
- package/dist/{connectors-Bo6ZT8PT.mjs → connectors-BQwyBJ4_.mjs} +1 -1
- package/dist/containers-BrQtGiNp.mjs +58 -0
- package/dist/{content-scan-D03UfK2X.mjs → content-scan-DNzhXYkY.mjs} +1 -1
- package/dist/{csamScanner-DgS-7ADh.mjs → csamScanner-CFq5s1Q3.mjs} +1 -1
- package/dist/{ct-alerting-8AKtNnUg.mjs → ct-alerting-CH6UmsGQ.mjs} +1 -1
- package/dist/custom-certificates-DnG73Wg2.mjs +5 -0
- package/dist/custom-csrs-bhClr2SU.mjs +3 -0
- package/dist/custom-hostnames-C0eiGvG9.mjs +5 -0
- package/dist/custom-nameservers-CVMhhLm6.mjs +3 -0
- package/dist/custom-pages-DTINMR30.mjs +3 -0
- package/dist/d1-sKdExJYF.mjs +20 -0
- package/dist/data-security-mV3a6UfW.mjs +7 -0
- package/dist/dcv-delegation-dBu3jdRw.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-DGlmjPTS.mjs → deploy-BL59O1O1.mjs} +1 -1
- package/dist/deploy-input-Dz6q-__n.mjs +2 -0
- package/dist/{dev-BbLV0Ti-.mjs → dev-BDaavgH1.mjs} +2 -2
- package/dist/diagnostics-CJV6qWUA.mjs +3 -0
- package/dist/{directory-CCndFkbQ.mjs → directory-B5zCMusW.mjs} +1 -1
- package/dist/{dispatch-namespaces-C48JQ9EA.mjs → dispatch-namespaces-Dg5lu5xX.mjs} +1 -1
- package/dist/dist-BHi7UhXO.mjs +72 -0
- package/dist/dist-BWpErtDM.mjs +384 -0
- package/dist/{dls-BBq99pjI.mjs → dls-t0hnIe_P.mjs} +1 -1
- package/dist/dns-C8FC2hbh.mjs +29 -0
- package/dist/{dns-firewall-DdwVtm12.mjs → dns-firewall-CuhhUm55.mjs} +1 -1
- package/dist/{dot-prop-6SRZBKHT-C_xd7eTS.mjs → dot-prop-6SRZBKHT-wwGHcwAa.mjs} +1 -1
- package/dist/dry-run-DL2V6yFm.mjs +2 -0
- package/dist/durable-objects-BLrgM3Cw.mjs +2 -0
- package/dist/email-auth-BmYrl0pO.mjs +2 -0
- package/dist/email-routing-CF3_Z957.mjs +6 -0
- package/dist/email-security-F7OYcMkZ.mjs +18 -0
- package/dist/email-sending-EyU3WvGQ.mjs +7 -0
- package/dist/fieldExtractors-Cno37T2m.mjs +3 -0
- package/dist/firewall-8YWWy4iB.mjs +11 -0
- package/dist/flagship-C4x0l-8J.mjs +4 -0
- package/dist/{fraud-AH47n-wL.mjs → fraud-HR_SdUx3.mjs} +1 -1
- package/dist/google-tag-gateway-BdcS0WnX.mjs +2 -0
- package/dist/{healthchecks-DfEUG007.mjs → healthchecks-4qOvjrTN.mjs} +2 -2
- package/dist/{hostnames-DQUiD3Vr.mjs → hostnames-DehdYOMz.mjs} +1 -1
- package/dist/{hyperdrive-RyQboMWI.mjs → hyperdrive-3gD3hn70.mjs} +1 -1
- package/dist/iam-DR72hmii.mjs +6 -0
- package/dist/images-CeKc5JPh.mjs +8 -0
- package/dist/index.mjs +1 -1
- package/dist/intel-DtFix9WL.mjs +8 -0
- package/dist/{interactive-mV8PABm6.mjs → interactive-C7M55Wxx.mjs} +1 -1
- package/dist/ips-CtWCjXAN.mjs +2 -0
- package/dist/{keyless-certificates-oNu5jWKF.mjs → keyless-certificates-Dk24yQFz.mjs} +1 -1
- package/dist/keys-BmhG6Kn1.mjs +2 -0
- package/dist/{kv-Bi9B4E0A.mjs → kv-BuVPAuZP.mjs} +1 -1
- package/dist/{leaked-credential-checks-DKRjBLcr.mjs → leaked-credential-checks-XcZmt1I-.mjs} +1 -1
- package/dist/load-balancers-CylN-l7n.mjs +6 -0
- package/dist/{local-DTyuGwTw.mjs → local-Be3lg_9E.mjs} +1 -1
- package/dist/{local-runtime-IAXhEugU.mjs → local-runtime-Ce7k598H.mjs} +1 -1
- package/dist/logexplorer-CvRPoKbj.mjs +17 -0
- package/dist/logo-matches-Heuft3yF.mjs +2 -0
- package/dist/logos-DRYjGBDq.mjs +3 -0
- package/dist/logpush-Dve9jOMp.mjs +4 -0
- package/dist/{logs-DmWWL5f9.mjs → logs-SC86FE89.mjs} +1 -1
- package/dist/{magic-cloud-networking-XbTa6P52.mjs → magic-cloud-networking-DXzeqwX-.mjs} +4 -4
- package/dist/magic-network-monitoring-DW0Jl74i.mjs +4 -0
- package/dist/magic-transit-BK_3asH2.mjs +111 -0
- package/dist/managed-transforms-B6TV4qoE.mjs +3 -0
- package/dist/matches-Iss9Fo4R.mjs +2 -0
- package/dist/mcp-8wxXT6JU.mjs +4 -0
- package/dist/mesh-Bf9UAS4J.mjs +4 -0
- package/dist/{moq-CJpE-eNj.mjs → moq-ZKMFOeVz.mjs} +1 -1
- package/dist/mtls-certificates-DoWm6GiE.mjs +3 -0
- package/dist/{network-D2WRXCDe.mjs → network-B1lBARU9.mjs} +1 -1
- package/dist/{network-interconnects-Clq4X1U8.mjs → network-interconnects-CLYIFHfU.mjs} +1 -1
- package/dist/oauth-DuEONNgC.mjs +14 -0
- package/dist/{oauth-clients-hilWfAlm.mjs → oauth-clients-DgiTzLzu.mjs} +1 -1
- package/dist/oauth-scopes-BOBRMxjm.mjs +2 -0
- package/dist/observability-Jya7-zkl.mjs +4 -0
- package/dist/{open-PBXRGS4R-C46yIm3u.mjs → open-PBXRGS4R-CX8K4WYl.mjs} +3 -3
- package/dist/{organization-D41rIvJa.mjs → organization-CYxYV4e0.mjs} +6 -6
- package/dist/organizations-SacGUW44.mjs +2 -0
- package/dist/origin-ca-certificates-Ph1bJGQ1.mjs +3 -0
- package/dist/origin-post-quantum-encryption-BBLiGAGB.mjs +2 -0
- package/dist/origin-tls-client-auth-DSDgTN2X.mjs +4 -0
- package/dist/{output-DgW1hQGX.mjs → output-Ccqw2WOb.mjs} +1 -1
- package/dist/page-rules-BqEyFR2c.mjs +27 -0
- package/dist/pages-CQ7ZVWk1.mjs +14 -0
- package/dist/pay-per-crawl-BMe_3_Qj.mjs +4 -0
- package/dist/pipelines-6De2Pe2C.mjs +6 -0
- package/dist/precursor-iwK-1P_d.mjs +4 -0
- package/dist/progress-BqQcF5QH.mjs +2 -0
- package/dist/project-settings-C_1-JI6Y.mjs +3 -0
- package/dist/prompt-B0sWIs9c.mjs +3 -0
- package/dist/{public-BwQqexwo-DbWj8rrr.mjs → public-BYCVISMH-DnMJ5Jct.mjs} +1 -1
- package/dist/queries-c7zvnfEQ.mjs +3 -0
- package/dist/queues-BU6y16qS.mjs +6 -0
- package/dist/r2-Jo3QMahK.mjs +24 -0
- package/dist/{r2-data-catalog-DLtf9d6o.mjs → r2-data-catalog-B-tw-JdG.mjs} +1 -1
- package/dist/radar-DIYAMEof.mjs +2 -0
- package/dist/{rate-limits-B1YjnGue.mjs → rate-limits-DewOcznT.mjs} +1 -1
- package/dist/raw-fetch-Cc-MjHeL.mjs +2 -0
- package/dist/realtimekit-cnZEVNDn.mjs +7 -0
- package/dist/registrar-BsWr_aPM.mjs +23 -0
- package/dist/{registrar-sandbox-0i1T3zne.mjs → registrar-sandbox-BlcpUyIH.mjs} +6 -6
- package/dist/{registry-DDcSvd8H.mjs → registry-jifR3_Y6.mjs} +1 -1
- package/dist/reporting--1AyTV7k.mjs +2 -0
- package/dist/request-tracers-C_VX7X6-.mjs +2 -0
- package/dist/{resource-sharing-Ctdi9D-j.mjs → resource-sharing-Br5dqr3o.mjs} +1 -1
- package/dist/resource-tagging-C33U6T74.mjs +2 -0
- package/dist/rules-BfjzALMi.mjs +4 -0
- package/dist/rulesets-3i_1Vwt-.mjs +5 -0
- package/dist/rum-CjmIckiR.mjs +4 -0
- package/dist/{schema-BeXPWeK9.mjs → schema-1mwmslUV.mjs} +1 -1
- package/dist/schema-flags-llLJuFFw.mjs +5 -0
- package/dist/{scim-BgGsmHrL.mjs → scim-pApmzA5B.mjs} +1 -1
- package/dist/sdk-ZctLa5jW.mjs +3 -0
- package/dist/{secrets-store-BCpFhYFv.mjs → secrets-store-DBC9WJau.mjs} +1 -1
- package/dist/security-center-Djm06dq-.mjs +2 -0
- package/dist/{security-txt-Be2Bif0z.mjs → security-txt-Ci7bP4zH.mjs} +1 -1
- package/dist/{share-Bz2tFTUP.mjs → share-Dj-MNXrw.mjs} +4 -4
- package/dist/shared-BJvq4DkR.mjs +290 -0
- package/dist/smart-shield--8EpJjrF.mjs +4 -0
- package/dist/snippets-Dyz0PH60.mjs +4 -0
- package/dist/{spawn-CHkoow5W.mjs → spawn-C5Z7oWdp.mjs} +108 -112
- package/dist/{spectrum-BA0a42eM.mjs → spectrum-rAHWz8rH.mjs} +1 -1
- package/dist/{speed-mmOjxOzo.mjs → speed-BKepWBXj.mjs} +1 -1
- package/dist/src-gJma71Ec.mjs +108 -0
- package/dist/{ssl-Yr6kELqg.mjs → ssl-KdFiY3ev.mjs} +1 -1
- package/dist/startup-profile-GLNPHQ9U.mjs +17 -0
- package/dist/{state-DZC531l2.mjs → state-Cu3cItUg.mjs} +1 -1
- package/dist/{stream-Cu0kYWbc.mjs → stream-CKJ6Tb0M.mjs} +13 -13
- package/dist/submit-BxbKKhBn.mjs +2 -0
- package/dist/tags-DA8dq9fx.mjs +2 -0
- package/dist/tenant-DLXw48hS.mjs +2 -0
- package/dist/tenant-custom-nameservers-9G93XuvU.mjs +3 -0
- package/dist/{tools-D2Xxfkrc.mjs → tools-x8bj9E6b.mjs} +1 -1
- package/dist/{tunnel-CDYkWjnt.mjs → tunnel-CNQA5Flp.mjs} +1 -1
- package/dist/tunnels-CC10EOsU.mjs +2 -0
- package/dist/turnstile-CH58hnf4.mjs +23 -0
- package/dist/{ui-DIpjthrV.mjs → ui-CmnnBm_O.mjs} +1 -1
- package/dist/url-info-BpCgdUtL.mjs +2 -0
- package/dist/{url-normalization-BeKkOZz7.mjs → url-normalization-BzuynEy1.mjs} +1 -1
- package/dist/url-scanner-APIZbhB7.mjs +2 -0
- package/dist/user-2-NGebfI.mjs +12 -0
- package/dist/values-S_bNv819.mjs +2 -0
- package/dist/{vectorize-CjXfiFH4.mjs → vectorize-Bv7feLBC.mjs} +1 -1
- package/dist/waiting-rooms-Dk4LIpvm.mjs +11 -0
- package/dist/{web-assets-BzM5vVzy.mjs → web-assets-C1UmOyzD.mjs} +1 -1
- package/dist/web3-GnUocVYH.mjs +4 -0
- package/dist/workers-J1-PLwdl.mjs +28 -0
- package/dist/{workers-builds-B44wc67O.mjs → workers-builds-DCHmWOMS.mjs} +4 -4
- package/dist/{workflows-rFuQWClt.mjs → workflows-CArfEI2c.mjs} +2 -2
- package/dist/zaraz-mg2YlR3_.mjs +2 -0
- package/dist/zero-trust-DVdUPtj1.mjs +93 -0
- package/dist/zone-DMAfrDJX.mjs +2 -0
- package/dist/zones-CNwxUi7I.mjs +21 -0
- package/package.json +10 -7
- package/dist/abuse-reports-CzDAjFpo.mjs +0 -8
- package/dist/account-Dd4-tDYJ.mjs +0 -2
- package/dist/account-tags-65fAlHrf.mjs +0 -9
- package/dist/accounts-Bp5KGc6r.mjs +0 -28
- package/dist/agent-memory-D--BQS0W.mjs +0 -6
- package/dist/ai-BnVlQDiI.mjs +0 -5
- package/dist/ai-audit-CfpDKXkD.mjs +0 -2
- package/dist/ai-gateway-oG4j_oYN.mjs +0 -13
- package/dist/ai-search-B2l3B_jn.mjs +0 -7
- package/dist/ai-security-byjIIrfl.mjs +0 -4
- package/dist/analytics-DeIKjC9n.mjs +0 -3
- package/dist/analytics_engine-BnECMIWJ.mjs +0 -2
- package/dist/argo-DFerMyXF.mjs +0 -2
- package/dist/artifacts-CtyEYYDa.mjs +0 -4
- package/dist/audit-logs-retFtvow.mjs +0 -2
- package/dist/auth-aazs91XL.mjs +0 -5
- package/dist/billing-CxQVqpGZ.mjs +0 -3
- package/dist/body-parser-CYD7PKFC.mjs +0 -2
- package/dist/bot-management-Rli7v7tg.mjs +0 -5
- package/dist/botnet-feed-Cw6XSEf8.mjs +0 -3
- package/dist/brand-protection-CTvnHGfV.mjs +0 -3
- package/dist/browser-run-FwtwnBzA.mjs +0 -4
- package/dist/build-Dji9BYmV.mjs +0 -2
- package/dist/certificate-authorities-DZP1RzAs.mjs +0 -2
- package/dist/cf-oSz9pud_.mjs +0 -18
- package/dist/chunk-LQW53VED-Xakf_rUn.mjs +0 -499
- package/dist/cloud-connector-BpVcvhjZ.mjs +0 -2
- package/dist/cloudforce-one-2PecncfX.mjs +0 -30
- package/dist/connector-interrupts-ollUcksZ.mjs +0 -2
- package/dist/connector-telemetry-events-D5_3X7XW.mjs +0 -2
- package/dist/connector-telemetry-snapshots-CJ9gLRFR.mjs +0 -2
- package/dist/containers-Bog7j0Hw.mjs +0 -54
- package/dist/custom-certificates-4y35UC1X.mjs +0 -5
- package/dist/custom-csrs-DwBrLh-H.mjs +0 -4
- package/dist/custom-hostnames-CDIAnsRa.mjs +0 -5
- package/dist/custom-nameservers-stk7ymnP.mjs +0 -3
- package/dist/custom-pages-vfDxrXbt.mjs +0 -4
- package/dist/d1-Cllm-iTT.mjs +0 -20
- package/dist/data-security-rnoSCEdL.mjs +0 -7
- package/dist/dcv-delegation-DCRCOL6l.mjs +0 -2
- package/dist/deploy-input-DhCo1I0I.mjs +0 -242
- package/dist/diagnostics-D5Yo2xqx.mjs +0 -3
- package/dist/dist-COfwjT96.mjs +0 -72
- package/dist/dns-DdQYtenF.mjs +0 -29
- package/dist/durable-objects-BvxXBht_.mjs +0 -2
- package/dist/email-CGOC_evd.mjs +0 -2
- package/dist/email-auth-DFvXKSkg.mjs +0 -2
- package/dist/email-routing-QBRPBlyl.mjs +0 -6
- package/dist/email-security-BFagcRPP.mjs +0 -18
- package/dist/email-sending-Ddhe7xjN.mjs +0 -7
- package/dist/filters-CGisPGD1.mjs +0 -4
- package/dist/firewall-DD8U-Brd.mjs +0 -11
- package/dist/flagship-FJHc4mFi.mjs +0 -4
- package/dist/google-tag-gateway-149kbuG_.mjs +0 -2
- package/dist/iam-BhHYhMXO.mjs +0 -6
- package/dist/images-CDViyKtZ.mjs +0 -8
- package/dist/intel-YHZbPlS3.mjs +0 -8
- package/dist/ips-BpCdldFx.mjs +0 -2
- package/dist/keys-yYtv7Ztr.mjs +0 -2
- package/dist/load-balancers-jRCN75mX.mjs +0 -7
- package/dist/logexplorer-kO8CULiK.mjs +0 -24
- package/dist/logo-matches-LyDAYPbI.mjs +0 -2
- package/dist/logos-O9f5bGSB.mjs +0 -3
- package/dist/logpush-dtXLu3Ck.mjs +0 -5
- package/dist/magic-network-monitoring-CpfkgZMp.mjs +0 -4
- package/dist/magic-transit-DwgZeIj-.mjs +0 -111
- package/dist/managed-transforms-DCmogkxv.mjs +0 -3
- package/dist/matches-BAeN8VM1.mjs +0 -2
- package/dist/mcp-DKZ2D050.mjs +0 -4
- package/dist/media-CnxgOViL.mjs +0 -2
- package/dist/mesh-CzIPtuaM.mjs +0 -4
- package/dist/mtls-certificates-Bbm_1lQI.mjs +0 -3
- package/dist/oauth-BPizUUqP.mjs +0 -15
- package/dist/oauth-scopes-CmbgsPYd.mjs +0 -2
- package/dist/observability-DXYgDdU5.mjs +0 -4
- package/dist/organizations-eNzfOwlP.mjs +0 -2
- package/dist/origin-ca-certificates-DaiAmw45.mjs +0 -3
- package/dist/origin-post-quantum-encryption-7YztBged.mjs +0 -2
- package/dist/origin-tls-client-auth-DRwURM8s.mjs +0 -4
- package/dist/page-rules-B2Csdc4h.mjs +0 -18
- package/dist/pages-BAL6Q7OY.mjs +0 -14
- package/dist/pay-per-crawl-C-1-ZAtn.mjs +0 -4
- package/dist/pipelines-cyQOuFLb.mjs +0 -6
- package/dist/precursor-BrweY39h.mjs +0 -4
- package/dist/progress-B84wYh91.mjs +0 -2
- package/dist/prompt-CDtLWxNv.mjs +0 -3
- package/dist/queries-oM8uGZy5.mjs +0 -3
- package/dist/queues-CTx04ZNw.mjs +0 -6
- package/dist/r2-CnlIUn7R.mjs +0 -24
- package/dist/radar-CGNgGh8v.mjs +0 -2
- package/dist/raw-fetch-Dz-QBoP_.mjs +0 -2
- package/dist/realtimekit-BPwzhNS9.mjs +0 -7
- package/dist/registrar-BEcb90RX.mjs +0 -21
- package/dist/reporting-CLbjHlnw.mjs +0 -2
- package/dist/request-tracers-BcKpofP1.mjs +0 -2
- package/dist/resource-tagging-DGEyVTDN.mjs +0 -2
- package/dist/rules-CmuB5rIN.mjs +0 -4
- package/dist/rulesets-CGaMq8vG.mjs +0 -8
- package/dist/rum-QT6EP4JK.mjs +0 -4
- package/dist/schema-flags-DHryz6SF.mjs +0 -5
- package/dist/sdk-m4xeaua4.mjs +0 -3
- package/dist/security-center-BNm4uPVB.mjs +0 -2
- package/dist/session-Ckt20hHa.mjs +0 -2
- package/dist/shared-BzPQog8H.mjs +0 -2
- package/dist/smart-shield-SODkOUyO.mjs +0 -4
- package/dist/snippets-B5jY8v_7.mjs +0 -4
- package/dist/src-CHW7s5IS.mjs +0 -108
- package/dist/submit-Dl_27e0n.mjs +0 -2
- package/dist/tags-Cdo_Pwtr.mjs +0 -2
- package/dist/tenant-EX-ANl6X.mjs +0 -2
- package/dist/tenant-custom-nameservers-BPHUeckw.mjs +0 -3
- package/dist/triggers-Bf9hbP3h.mjs +0 -2
- package/dist/tunnels-CgyX8R2J.mjs +0 -2
- package/dist/turnstile-BUtzlW-0.mjs +0 -23
- package/dist/url-info-CJsa1Oc9.mjs +0 -2
- package/dist/url-scanner-Cz-yl0_3.mjs +0 -2
- package/dist/user-BxHjEqpd.mjs +0 -12
- package/dist/values-C43NurfT.mjs +0 -2
- package/dist/versions-BFbc90Wu.mjs +0 -2
- package/dist/waiting-rooms-C5jSQv_r.mjs +0 -11
- package/dist/web3-Ctv9HGiR.mjs +0 -4
- package/dist/workers-D-YbIedB.mjs +0 -24
- package/dist/zaraz-BA6kY-b6.mjs +0 -2
- package/dist/zero-trust-DOFLlUz1.mjs +0 -102
- package/dist/zone-B_rgejLV.mjs +0 -2
- package/dist/zone-tags-BWdza4rH.mjs +0 -9
- package/dist/zones-DTWO7Vvn.mjs +0 -21
- /package/dist/{Page-C-JHZnIy.mjs → Page-9ry_XAVC.mjs} +0 -0
- /package/dist/{alerts-B85uj2Vx.mjs → alerts-15-IW4jE.mjs} +0 -0
- /package/dist/{autorag-Do9l_LyY.mjs → autorag-CFwRkEKw.mjs} +0 -0
- /package/dist/{brands-DateHCdd.mjs → brands-BgT1vu9B.mjs} +0 -0
- /package/dist/{chunk-6EUZQHAF-l8tR2Qyj.mjs → chunk-6EUZQHAF-C3w62dek.mjs} +0 -0
- /package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-DVMMVVEs.mjs} +0 -0
- /package/dist/{clear-CB2kgcEB.mjs → clear-BlCK85Me.mjs} +0 -0
- /package/dist/{cli-types-BWdZbsFE.mjs → cli-types-DAYeL_Mj.mjs} +0 -0
- /package/dist/{domain-info-DJHEt8JJ.mjs → domain-info-C7LBxPBt.mjs} +0 -0
- /package/dist/{health-buY5f5pp.mjs → health-DZFfafkX.mjs} +0 -0
- /package/dist/{input-validation-BBKJRoRB.mjs → input-validation-QDIYu7Vb.mjs} +0 -0
- /package/dist/{internal-CwyoJUHh.mjs → internal-BKHC2D1Y.mjs} +0 -0
- /package/dist/{live-wEpA5V_n.mjs → live-DwCvDmaH.mjs} +0 -0
- /package/dist/{metadata-8AkOftcB.mjs → metadata-B5yfL0ln.mjs} +0 -0
- /package/dist/{rate-limit-analytics-Bf1uT0lT.mjs → rate-limit-analytics-B8Vuu1sU.mjs} +0 -0
- /package/dist/{ready-CBSCPiHE.mjs → ready-D9H2zHHI.mjs} +0 -0
- /package/dist/{recent-submissions-Dpmq1f7z.mjs → recent-submissions-BPo0J80d.mjs} +0 -0
- /package/dist/{refute-u7ZPQJZy.mjs → refute-2W8NLCN4.mjs} +0 -0
- /package/dist/{resolve-XgxRJ-Ys.mjs → resolve-B8CyM1mi.mjs} +0 -0
- /package/dist/{scan-logo-Ba8WZAyp.mjs → scan-logo-D5x6F1Y0.mjs} +0 -0
- /package/dist/{scan-page-Bcq3Ei86.mjs → scan-page-CWhta3x7.mjs} +0 -0
- /package/dist/{search-D9WDwnV4.mjs → search-DZmBQJL9.mjs} +0 -0
- /package/dist/{signed-url-CjPbG5zV.mjs → signed-url-CQrmWgz5.mjs} +0 -0
- /package/dist/{submission-info-Z9hhp9Rq.mjs → submission-info-C98A0bqq.mjs} +0 -0
- /package/dist/{theme-BePJemMn.mjs → theme-CrIBazAF.mjs} +0 -0
- /package/dist/{total-queries-aKAYX1iX.mjs → total-queries-BZoaFoDE.mjs} +0 -0
- /package/dist/{tracked-domains-Ck7Jm4Kn.mjs → tracked-domains-CNHogPHx.mjs} +0 -0
- /package/dist/{verify-2yi0H93r.mjs → verify-4e4L9IRk.mjs} +0 -0
package/dist/src-CHW7s5IS.mjs
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{i as e,t}from"./chunk-vbHwaUoU.mjs";import{a as n,n as r,o as i,r as a,s as o,t as s}from"./session-Ckt20hHa.mjs";import{r as c}from"./sdk-m4xeaua4.mjs";import{ft as l}from"./chunk-LQW53VED-Xakf_rUn.mjs";import{a as u,n as d,t as f}from"./theme-BePJemMn.mjs";import{i as p,t as m}from"./ui-DIpjthrV.mjs";import{i as h}from"./local-DTyuGwTw.mjs";import{createRequire as g}from"node:module";import{notStrictEqual as ee,strictEqual as _}from"assert";import{basename as te,dirname as v,extname as ne,join as re,normalize as ie,relative as y,resolve as b}from"path";import{readFileSync as x,readdirSync as ae,statSync as S,writeFile as oe}from"fs";import{format as se,inspect as ce}from"util";import{fileURLToPath as le}from"url";import{readFileSync as ue,readdirSync as de}from"node:fs";const fe={right:ge,center:_e};var pe=class{constructor(e){this.width=e.width,this.wrap=e.wrap??!0,this.rows=[]}span(...e){let t=this.div(...e);t.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(``),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]==`string`)return this.applyLayoutDSL(e[0]);let t=e.map(e=>typeof e==`string`?this.colFromString(e):e);return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]==`string`&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let t=e.split(`
|
|
3
|
-
`).map(e=>e.split(` `)),n=0;return t.forEach(e=>{e.length>1&&w.stringWidth(e[0])>n&&(n=Math.min(Math.floor(this.width*.5),w.stringWidth(e[0])))}),t.forEach(e=>{this.div(...e.map((t,r)=>({text:t.trim(),padding:this.measurePadding(t),width:r===0&&e.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let t=w.stripAnsi(e);return[0,t.match(/\s*$/)[0].length,0,t.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(t=>{this.rowToString(t,e)}),e.filter(e=>!e.hidden).map(e=>e.text).join(`
|
|
4
|
-
`)}rowToString(e,t){return this.rasterize(e).forEach((n,r)=>{let i=``;n.forEach((n,a)=>{let{width:o}=e[a],s=this.negatePadding(e[a]),c=n;if(s>w.stringWidth(n)&&(c+=` `.repeat(s-w.stringWidth(n))),e[a].align&&e[a].align!==`left`&&this.wrap){let t=fe[e[a].align];c=t(c,s),w.stringWidth(c)<s&&(c+=` `.repeat((o||0)-w.stringWidth(c)-1))}let l=e[a].padding||[0,0,0,0];l[3]&&(i+=` `.repeat(l[3])),i+=me(e[a],c,`| `),i+=c,i+=me(e[a],c,` |`),l[1]&&(i+=` `.repeat(l[1])),r===0&&t.length>0&&(i=this.renderInline(i,t[t.length-1]))}),t.push({text:i.replace(/ +$/,``),span:e.span})}),t}renderInline(e,t){let n=e.match(/^ */),r=n?n[0].length:0,i=t.text,a=w.stringWidth(i.trimRight());return t.span?this.wrap?r<a?e:(t.hidden=!0,i.trimRight()+` `.repeat(r-a)+e.trimLeft()):(t.hidden=!0,i+e):e}rasterize(e){let t=[],n=this.columnWidths(e),r;return e.forEach((e,i)=>{e.width=n[i],r=this.wrap?w.wrap(e.text,this.negatePadding(e),{hard:!0}).split(`
|
|
5
|
-
`):e.text.split(`
|
|
6
|
-
`),e.border&&(r.unshift(`.`+`-`.repeat(this.negatePadding(e)+2)+`.`),r.push(`'`+`-`.repeat(this.negatePadding(e)+2)+`'`)),e.padding&&(r.unshift(...Array(e.padding[0]||0).fill(``)),r.push(...Array(e.padding[2]||0).fill(``))),r.forEach((e,n)=>{t[n]||t.push([]);let r=t[n];for(let e=0;e<i;e++)r[e]===void 0&&r.push(``);r.push(e)})}),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[3]||0)+(e.padding[1]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(e=>e.width||w.stringWidth(e.text));let t=e.length,n=this.width,r=e.map(e=>{if(e.width)return t--,n-=e.width,e.width}),i=t?Math.floor(n/t):0;return r.map((t,n)=>t===void 0?Math.max(i,he(e[n])):t)}};function me(e,t,n){return e.border?/[.']-+[.']/.test(t)?``:t.trim().length===0?` `:n:``}function he(e){let t=e.padding||[],n=1+(t[3]||0)+(t[1]||0);return e.border?n+4:n}function C(){return typeof process==`object`&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function ge(e,t){e=e.trim();let n=w.stringWidth(e);return n<t?` `.repeat(t-n)+e:e}function _e(e,t){e=e.trim();let n=w.stringWidth(e);return n>=t?e:` `.repeat(t-n>>1)+e}let w;function ve(e,t){return w=t,new pe({width:e?.width||C(),wrap:e?.wrap})}const ye=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],be=[12288,12288,65281,65376,65504,65510],xe=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],Se=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),a=i*2;if(t<e[a])r=i-1;else if(t>e[a+1])n=i+1;else return!0}return!1},T=19968,[Ce,we]=Te(xe);function Te(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],a=e[r+1];if(T>=i&&T<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}const Ee=e=>e<161||e>1114109?!1:Se(ye,e),De=e=>e<12288||e>65510?!1:Se(be,e),Oe=e=>e>=Ce&&e<=we?!0:e<4352||e>262141?!1:Se(xe,e);function ke(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Ae(e,{ambiguousAsWide:t=!1}={}){return ke(e),De(e)||Oe(e)||t&&Ee(e)?2:1}var je=e(t(((e,t)=>{t.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\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?|[\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](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g}))(),1);const Me=new Intl.Segmenter,Ne=/^\p{Default_Ignorable_Code_Point}$/u;function Pe(e,t={}){if(typeof e!=`string`||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=o(e)),e.length===0)return 0;let i=0,a={ambiguousAsWide:!n};for(let{segment:t}of Me.segment(e)){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=8203&&e<=8207||e===65279)&&!(e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071)&&!(e>=55296&&e<=57343)&&!(e>=65024&&e<=65039)&&!Ne.test(t)){if((0,je.default)().test(t)){i+=2;continue}i+=Ae(e,a)}}return i}const Fe=new Set([`\x1B`,``]),Ie=`]8;;`,Le=e=>`${Fe.values().next().value}[${e}m`,Re=e=>`${Fe.values().next().value}${Ie}${e}`,ze=e=>e.split(` `).map(e=>Pe(e)),Be=(e,t,n)=>{let r=[...t],i=!1,a=!1,s=Pe(o(e.at(-1)));for(let[t,o]of r.entries()){let c=Pe(o);if(s+c<=n?e[e.length-1]+=o:(e.push(o),s=0),Fe.has(o)&&(i=!0,a=r.slice(t+1,t+1+4).join(``)===Ie),i){a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1);continue}s+=c,s===n&&t<r.length-1&&(e.push(``),s=0)}!s&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Ve=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(Pe(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},He=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,a,o,s=ze(e),c=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(c[c.length-1]=c.at(-1).trimStart());let e=Pe(c.at(-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(``),Be(c,i,t);continue}if(e+s[r]>t&&e>0&&s[r]>0){if(n.wordWrap===!1&&e<t){Be(c,i,t);continue}c.push(``)}if(e+s[r]>t&&n.wordWrap===!1){Be(c,i,t);continue}c[c.length-1]+=i}n.trim!==!1&&(c=c.map(e=>Ve(e)));let l=c.join(`
|
|
7
|
-
`),u=[...l],d=0;for(let[e,t]of u.entries()){if(r+=t,Fe.has(t)){let{groups:e}=RegExp(`(?:\\[(?<code>\\d+)m|\\${Ie}(?<uri>.*))`).exec(l.slice(d))||{groups:{}};if(e.code!==void 0){let t=Number.parseFloat(e.code);a=t===39?void 0:t}else e.uri!==void 0&&(o=e.uri.length===0?void 0:e.uri)}let n=i.codes.get(Number(a));u[e+1]===`
|
|
8
|
-
`?(o&&(r+=Re(``)),a&&n&&(r+=Le(n))):t===`
|
|
9
|
-
`&&(a&&n&&(r+=Le(a)),o&&(r+=Re(o))),d+=t.length}return r};function Ue(e,t,n){return String(e).normalize().replaceAll(`\r
|
|
10
|
-
`,`
|
|
11
|
-
`).split(`
|
|
12
|
-
`).map(e=>He(e,t,n)).join(`
|
|
13
|
-
`)}function We(e){return ve(e,{stringWidth:Pe,stripAnsi:o,wrap:Ue})}function Ge(e,t){let n=b(`.`,e),r;for(S(n).isDirectory()||(n=v(n));;){if(r=t(n,ae(n)),r)return b(n,r);if(n=v(r=n),r===n)break}}
|
|
14
|
-
/**
|
|
15
|
-
* @license
|
|
16
|
-
* Copyright (c) 2016, Contributors
|
|
17
|
-
* SPDX-License-Identifier: ISC
|
|
18
|
-
*/
|
|
19
|
-
function Ke(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf(`-`)===-1&&e.indexOf(`_`)===-1)return e;{let t=``,n=!1,r=e.match(/^-+/);for(let i=r?r[0].length:0;i<e.length;i++){let r=e.charAt(i);n&&(n=!1,r=r.toUpperCase()),i!==0&&(r===`-`||r===`_`)?n=!0:r!==`-`&&r!==`_`&&(t+=r)}return t}}function qe(e,t){let n=e.toLowerCase();t||=`-`;let r=``;for(let i=0;i<e.length;i++){let a=n.charAt(i),o=e.charAt(i);a!==o&&i>0?r+=`${t}${n.charAt(i)}`:r+=o}return r}function Je(e){return e==null?!1:typeof e==`number`||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}
|
|
20
|
-
/**
|
|
21
|
-
* @license
|
|
22
|
-
* Copyright (c) 2016, Contributors
|
|
23
|
-
* SPDX-License-Identifier: ISC
|
|
24
|
-
*/
|
|
25
|
-
function Ye(e){if(Array.isArray(e))return e.map(e=>typeof e==`string`?e:e+``);e=e.trim();let t=0,n=null,r=null,i=null,a=[];for(let o=0;o<e.length;o++){if(n=r,r=e.charAt(o),r===` `&&!i){n!==` `&&t++;continue}r===i?i=null:(r===`'`||r===`"`)&&!i&&(i=r),a[t]||(a[t]=``),a[t]+=r}return a}
|
|
26
|
-
/**
|
|
27
|
-
* @license
|
|
28
|
-
* Copyright (c) 2016, Contributors
|
|
29
|
-
* SPDX-License-Identifier: ISC
|
|
30
|
-
*/
|
|
31
|
-
var E;(function(e){e.BOOLEAN=`boolean`,e.STRING=`string`,e.NUMBER=`number`,e.ARRAY=`array`})(E||={});
|
|
32
|
-
/**
|
|
33
|
-
* @license
|
|
34
|
-
* Copyright (c) 2016, Contributors
|
|
35
|
-
* SPDX-License-Identifier: ISC
|
|
36
|
-
*/
|
|
37
|
-
let D;var Xe=class{constructor(e){D=e}parse(e,t){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},t),r=Ye(e),i=typeof e==`string`,a=Ze(Object.assign(Object.create(null),n.alias)),o=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":`no-`,"parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),s=Object.assign(Object.create(null),n.default),c=n.configObjects||[],l=n.envPrefix,u=o[`populate--`],d=u?`--`:`_`,f=Object.create(null),p=Object.create(null),m=n.__||D.format,h={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},g=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,ee=RegExp(`^--`+o[`negation-prefix`]+`(.+)`);[].concat(n.array||[]).filter(Boolean).forEach(function(e){let t=typeof e==`object`?e.key:e,n=Object.keys(e).map(function(e){return{boolean:`bools`,string:`strings`,number:`numbers`}[e]}).filter(Boolean).pop();n&&(h[n][t]=!0),h.arrays[t]=!0,h.keys.push(t)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(e){h.bools[e]=!0,h.keys.push(e)}),[].concat(n.string||[]).filter(Boolean).forEach(function(e){h.strings[e]=!0,h.keys.push(e)}),[].concat(n.number||[]).filter(Boolean).forEach(function(e){h.numbers[e]=!0,h.keys.push(e)}),[].concat(n.count||[]).filter(Boolean).forEach(function(e){h.counts[e]=!0,h.keys.push(e)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(e){h.normalize[e]=!0,h.keys.push(e)}),typeof n.narg==`object`&&Object.entries(n.narg).forEach(([e,t])=>{typeof t==`number`&&(h.nargs[e]=t,h.keys.push(e))}),typeof n.coerce==`object`&&Object.entries(n.coerce).forEach(([e,t])=>{typeof t==`function`&&(h.coercions[e]=t,h.keys.push(e))}),n.config!==void 0&&(Array.isArray(n.config)||typeof n.config==`string`?[].concat(n.config).filter(Boolean).forEach(function(e){h.configs[e]=!0}):typeof n.config==`object`&&Object.entries(n.config).forEach(([e,t])=>{(typeof t==`boolean`||typeof t==`function`)&&(h.configs[e]=t)})),he(n.key,a,n.default,h.arrays),Object.keys(s).forEach(function(e){(h.aliases[e]||[]).forEach(function(t){s[t]=s[e]})});let _=null;Ce();let te=[],v=Object.assign(Object.create(null),{_:[]}),ne={};for(let e=0;e<r.length;e++){let t=r[e],n=t.replace(/^-{3,}/,`---`),i,a,s,c,l,u;if(t!==`--`&&/^-/.test(t)&&ve(t))re(t);else if(n.match(/^---+(=|$)/)){re(t);continue}else if(t.match(/^--.+=/)||!o[`short-option-groups`]&&t.match(/^-.+=/))c=t.match(/^--?([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&(C(c[1],h.arrays)?e=y(e,c[1],r,c[2]):C(c[1],h.nargs)===!1?b(c[1],c[2],!0):e=ie(e,c[1],r,c[2]));else if(t.match(ee)&&o[`boolean-negation`])c=t.match(ee),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],b(a,C(a,h.arrays)?[!1]:!1));else if(t.match(/^--.+/)||!o[`short-option-groups`]&&t.match(/^-[^-]+/))c=t.match(/^--?(.+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],C(a,h.arrays)?e=y(e,a,r):C(a,h.nargs)===!1?(l=r[e+1],l!==void 0&&(!l.match(/^-/)||l.match(g))&&!C(a,h.bools)&&!C(a,h.counts)||/^(true|false)$/.test(l)?(b(a,l),e++):b(a,be(a))):e=ie(e,a,r));else if(t.match(/^-.\..+=/))c=t.match(/^-([^=]+)=([\s\S]*)$/),c!==null&&Array.isArray(c)&&c.length>=3&&b(c[1],c[2]);else if(t.match(/^-.\..+/)&&!t.match(g))l=r[e+1],c=t.match(/^-(.\..+)/),c!==null&&Array.isArray(c)&&c.length>=2&&(a=c[1],l!==void 0&&!l.match(/^-/)&&!C(a,h.bools)&&!C(a,h.counts)?(b(a,l),e++):b(a,be(a)));else if(t.match(/^-[^-]+/)&&!t.match(g)){s=t.slice(1,-1).split(``),i=!1;for(let n=0;n<s.length;n++){if(l=t.slice(n+2),s[n+1]&&s[n+1]===`=`){u=t.slice(n+3),a=s[n],C(a,h.arrays)?e=y(e,a,r,u):C(a,h.nargs)===!1?b(a,u):e=ie(e,a,r,u),i=!0;break}if(l===`-`){b(s[n],l);continue}if(/[A-Za-z]/.test(s[n])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(l)&&C(l,h.bools)===!1){b(s[n],l),i=!0;break}if(s[n+1]&&s[n+1].match(/\W/)){b(s[n],l),i=!0;break}else b(s[n],be(s[n]))}a=t.slice(-1)[0],!i&&a!==`-`&&(C(a,h.arrays)?e=y(e,a,r):C(a,h.nargs)===!1?(l=r[e+1],l!==void 0&&(!/^(-|--)[^-]/.test(l)||l.match(g))&&!C(a,h.bools)&&!C(a,h.counts)||/^(true|false)$/.test(l)?(b(a,l),e++):b(a,be(a))):e=ie(e,a,r))}else if(t.match(/^-[0-9]$/)&&t.match(g)&&C(t.slice(1),h.bools))a=t.slice(1),b(a,be(a));else if(t===`--`){te=r.slice(e+1);break}else if(o[`halt-at-non-option`]){te=r.slice(e);break}else re(t)}le(v,!0),le(v,!1),oe(v),ce(),fe(v,h.aliases,s,!0),ue(v),o[`set-placeholder-key`]&&de(v),Object.keys(h.counts).forEach(function(e){pe(v,e.split(`.`))||b(e,0)}),u&&te.length&&(v[d]=[]),te.forEach(function(e){v[d].push(e)}),o[`camel-case-expansion`]&&o[`strip-dashed`]&&Object.keys(v).filter(e=>e!==`--`&&e.includes(`-`)).forEach(e=>{delete v[e]}),o[`strip-aliased`]&&[].concat(...Object.keys(a).map(e=>a[e])).forEach(e=>{o[`camel-case-expansion`]&&e.includes(`-`)&&delete v[e.split(`.`).map(e=>Ke(e)).join(`.`)],delete v[e]});function re(e){let t=S(`_`,e);(typeof t==`string`||typeof t==`number`)&&v._.push(t)}function ie(e,t,n,r){let i,a=C(t,h.nargs);if(a=typeof a!=`number`||isNaN(a)?1:a,a===0)return T(r)||(_=Error(m(`Argument unexpected for: %s`,t))),b(t,be(t)),e;let s=+!T(r);if(o[`nargs-eats-options`])n.length-(e+1)+s<a&&(_=Error(m(`Not enough arguments following: %s`,t))),s=a;else{for(i=e+1;i<n.length&&(!n[i].match(/^-[^0-9]/)||n[i].match(g)||ve(n[i]));i++)s++;s<a&&(_=Error(m(`Not enough arguments following: %s`,t)))}let c=Math.min(s,a);for(!T(r)&&c>0&&(b(t,r),c--),i=e+1;i<c+e+1;i++)b(t,n[i]);return e+c}function y(e,t,n,r){let a=[],c=r||n[e+1],l=C(t,h.nargs);if(C(t,h.bools)&&!/^(true|false)$/.test(c))a.push(!0);else if(T(c)||T(r)&&/^-/.test(c)&&!g.test(c)&&!ve(c)){if(s[t]!==void 0){let e=s[t];a=Array.isArray(e)?e:[e]}}else{T(r)||a.push(ae(t,r,!0));for(let r=e+1;r<n.length&&!(!o[`greedy-arrays`]&&a.length>0||l&&typeof l==`number`&&a.length>=l||(c=n[r],/^-/.test(c)&&!g.test(c)&&!ve(c)));r++)e=r,a.push(ae(t,c,i))}return typeof l==`number`&&(l&&a.length<l||isNaN(l)&&a.length===0)&&(_=Error(m(`Not enough arguments following: %s`,t))),b(t,a),e}function b(e,t,n=i){/-/.test(e)&&o[`camel-case-expansion`]&&x(e,e.split(`.`).map(function(e){return Ke(e)}).join(`.`));let r=ae(e,t,n),a=e.split(`.`);me(v,a,r),h.aliases[e]&&h.aliases[e].forEach(function(e){me(v,e.split(`.`),r)}),a.length>1&&o[`dot-notation`]&&(h.aliases[a[0]]||[]).forEach(function(t){let n=t.split(`.`),i=[].concat(a);i.shift(),n=n.concat(i),(h.aliases[e]||[]).includes(n.join(`.`))||me(v,n,r)}),C(e,h.normalize)&&!C(e,h.arrays)&&[e].concat(h.aliases[e]||[]).forEach(function(e){Object.defineProperty(ne,e,{enumerable:!0,get(){return t},set(e){t=typeof e==`string`?D.normalize(e):e}})})}function x(e,t){h.aliases[e]&&h.aliases[e].length||(h.aliases[e]=[t],f[t]=!0),h.aliases[t]&&h.aliases[t].length||x(t,e)}function ae(e,t,n){n&&(t=et(t)),(C(e,h.bools)||C(e,h.counts))&&typeof t==`string`&&(t=t===`true`);let r=Array.isArray(t)?t.map(function(t){return S(e,t)}):S(e,t);return C(e,h.counts)&&(T(r)||typeof r==`boolean`)&&(r=Qe()),C(e,h.normalize)&&C(e,h.arrays)&&(r=Array.isArray(t)?t.map(e=>D.normalize(e)):D.normalize(t)),r}function S(e,t){return!o[`parse-positional-numbers`]&&e===`_`||!C(e,h.strings)&&!C(e,h.bools)&&!Array.isArray(t)&&(Je(t)&&o[`parse-numbers`]&&Number.isSafeInteger(Math.floor(parseFloat(`${t}`)))||!T(t)&&C(e,h.numbers))&&(t=Number(t)),t}function oe(e){let t=Object.create(null);fe(t,h.aliases,s),Object.keys(h.configs).forEach(function(n){let r=e[n]||t[n];if(r)try{let e=null,t=D.resolve(D.cwd(),r),i=h.configs[n];if(typeof i==`function`){try{e=i(t)}catch(t){e=t}if(e instanceof Error){_=e;return}}else e=D.require(t);se(e)}catch(t){t.name===`PermissionDenied`?_=t:e[n]&&(_=Error(m(`Invalid JSON config file: %s`,r)))}})}function se(e,t){Object.keys(e).forEach(function(n){let r=e[n],i=t?t+`.`+n:n;typeof r==`object`&&r&&!Array.isArray(r)&&o[`dot-notation`]?se(r,i):(!pe(v,i.split(`.`))||C(i,h.arrays)&&o[`combine-arrays`])&&b(i,r)})}function ce(){c!==void 0&&c.forEach(function(e){se(e)})}function le(e,t){if(l===void 0)return;let n=typeof l==`string`?l:``,r=D.env();Object.keys(r).forEach(function(i){if(n===``||i.lastIndexOf(n,0)===0){let a=i.split(`__`).map(function(e,t){return t===0&&(e=e.substring(n.length)),Ke(e)});(t&&h.configs[a.join(`.`)]||!t)&&!pe(e,a)&&b(a.join(`.`),r[i])}})}function ue(e){let t,n=new Set;Object.keys(e).forEach(function(r){if(!n.has(r)&&(t=C(r,h.coercions),typeof t==`function`))try{let i=S(r,t(e[r]));[].concat(h.aliases[r]||[],r).forEach(t=>{n.add(t),e[t]=i})}catch(e){_=e}})}function de(e){return h.keys.forEach(t=>{~t.indexOf(`.`)||e[t]===void 0&&(e[t]=void 0)}),e}function fe(e,t,n,r=!1){Object.keys(n).forEach(function(i){pe(e,i.split(`.`))||(me(e,i.split(`.`),n[i]),r&&(p[i]=!0),(t[i]||[]).forEach(function(t){pe(e,t.split(`.`))||me(e,t.split(`.`),n[i])}))})}function pe(e,t){let n=e;o[`dot-notation`]||(t=[t.join(`.`)]),t.slice(0,-1).forEach(function(e){n=n[e]||{}});let r=t[t.length-1];return typeof n==`object`?r in n:!1}function me(e,t,n){let r=e;o[`dot-notation`]||(t=[t.join(`.`)]),t.slice(0,-1).forEach(function(e){e=$e(e),typeof r==`object`&&r[e]===void 0&&(r[e]={}),typeof r[e]!=`object`||Array.isArray(r[e])?(Array.isArray(r[e])?r[e].push({}):r[e]=[r[e],{}],r=r[e][r[e].length-1]):r=r[e]});let i=$e(t[t.length-1]),a=C(t.join(`.`),h.arrays),s=Array.isArray(n),c=o[`duplicate-arguments-array`];!c&&C(i,h.nargs)&&(c=!0,(!T(r[i])&&h.nargs[i]===1||Array.isArray(r[i])&&r[i].length===h.nargs[i])&&(r[i]=void 0)),n===Qe()?r[i]=Qe(r[i]):Array.isArray(r[i])?c&&a&&s?r[i]=o[`flatten-duplicate-arrays`]?r[i].concat(n):(Array.isArray(r[i][0])?r[i]:[r[i]]).concat([n]):!c&&!!a==!!s?r[i]=n:r[i]=r[i].concat([n]):r[i]===void 0&&a?r[i]=s?n:[n]:c&&!(r[i]===void 0||C(i,h.counts)||C(i,h.bools))?r[i]=[r[i],n]:r[i]=n}function he(...e){e.forEach(function(e){Object.keys(e||{}).forEach(function(e){h.aliases[e]||(h.aliases[e]=[].concat(a[e]||[]),h.aliases[e].concat(e).forEach(function(t){if(/-/.test(t)&&o[`camel-case-expansion`]){let n=Ke(t);n!==e&&h.aliases[e].indexOf(n)===-1&&(h.aliases[e].push(n),f[n]=!0)}}),h.aliases[e].concat(e).forEach(function(t){if(t.length>1&&/[A-Z]/.test(t)&&o[`camel-case-expansion`]){let n=qe(t,`-`);n!==e&&h.aliases[e].indexOf(n)===-1&&(h.aliases[e].push(n),f[n]=!0)}}),h.aliases[e].forEach(function(t){h.aliases[t]=[e].concat(h.aliases[e].filter(function(e){return t!==e}))}))})})}function C(e,t){let n=[].concat(h.aliases[e]||[],e),r=Object.keys(t),i=n.find(e=>r.includes(e));return i?t[i]:!1}function ge(e){let t=Object.keys(h);return[].concat(t.map(e=>h[e])).some(function(t){return Array.isArray(t)?t.includes(e):t[e]})}function _e(e,...t){return[].concat(...t).some(function(t){let n=e.match(t);return n&&ge(n[1])})}function w(e){if(e.match(g)||!e.match(/^-[^-]+/))return!1;let t=!0,n,r=e.slice(1).split(``);for(let i=0;i<r.length;i++){if(n=e.slice(i+2),!ge(r[i])){t=!1;break}if(r[i+1]&&r[i+1]===`=`||n===`-`||/[A-Za-z]/.test(r[i])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(n)||r[i+1]&&r[i+1].match(/\W/))break}return t}function ve(e){return o[`unknown-options-as-args`]&&ye(e)}function ye(e){return e=e.replace(/^-{3,}/,`--`),e.match(g)||w(e)?!1:!_e(e,/^-+([^=]+?)=[\s\S]*$/,ee,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function be(e){return!C(e,h.bools)&&!C(e,h.counts)&&`${e}`in s?s[e]:xe(Se(e))}function xe(e){return{[E.BOOLEAN]:!0,[E.STRING]:``,[E.NUMBER]:void 0,[E.ARRAY]:[]}[e]}function Se(e){let t=E.BOOLEAN;return C(e,h.strings)?t=E.STRING:C(e,h.numbers)?t=E.NUMBER:C(e,h.bools)?t=E.BOOLEAN:C(e,h.arrays)&&(t=E.ARRAY),t}function T(e){return e===void 0}function Ce(){Object.keys(h.counts).find(e=>C(e,h.arrays)?(_=Error(m(`Invalid configuration: %s, opts.count excludes opts.array.`,e)),!0):C(e,h.nargs)?(_=Error(m(`Invalid configuration: %s, opts.count excludes opts.narg.`,e)),!0):!1)}return{aliases:Object.assign({},h.aliases),argv:Object.assign(ne,v),configuration:o,defaulted:Object.assign({},p),error:_,newAliases:Object.assign({},f)}}};function Ze(e){let t=[],n=Object.create(null),r=!0;for(Object.keys(e).forEach(function(n){t.push([].concat(e[n],n))});r;){r=!1;for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++)if(t[e].filter(function(e){return t[n].indexOf(e)!==-1}).length){t[e]=t[e].concat(t[n]),t.splice(n,1),r=!0;break}}return t.forEach(function(e){e=e.filter(function(e,t,n){return n.indexOf(e)===t});let t=e.pop();t!==void 0&&typeof t==`string`&&(n[t]=e)}),n}function Qe(e){return e===void 0?1:e+1}function $e(e){return e===`__proto__`?`___proto___`:e}function et(e){return typeof e==`string`&&(e[0]===`'`||e[0]===`"`)&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}const tt=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):20,nt=(process==null?void 0:process.versions)?.node??(process==null?void 0:process.version)?.slice(1);if(nt&&Number(nt.match(/^([^.]+)/)[1])<tt)throw Error(`yargs parser supports a minimum Node.js version of ${tt}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const rt=process?process.env:{},it=g?g(import.meta.url):void 0,at=new Xe({cwd:process.cwd,env:()=>rt,format:se,normalize:ie,resolve:b,require:e=>{if(it!==void 0)return it(e);if(e.match(/\.json$/))return JSON.parse(x(e,`utf8`));throw Error(`only .json config files are supported in ESM`)}}),ot=function(e,t){return at.parse(e.slice(),t).argv};ot.detailed=function(e,t){return at.parse(e.slice(),t)},ot.camelCase=Ke,ot.decamelize=qe,ot.looksLikeNumber=Je;function st(){return+!ct()}function ct(){return lt()&&!process.defaultApp}function lt(){return!!process.versions.electron}function ut(e){return e.slice(st()+1)}function dt(){return process.argv[st()]}var ft={fs:{readFileSync:x,writeFile:oe},format:se,resolve:b,exists:e=>{try{return S(e).isFile()}catch{return!1}}};let O;var pt=class{constructor(e){e||={},this.directory=e.directory||`./locales`,this.updateFiles=typeof e.updateFiles==`boolean`?e.updateFiles:!0,this.locale=e.locale||`en`,this.fallbackToLanguage=typeof e.fallbackToLanguage==`boolean`?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!=`string`)return this._taggedLiteral(arguments[0],...arguments);let t=e.shift(),n=function(){};return typeof e[e.length-1]==`function`&&(n=e.pop()),n||=function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),O.format.apply(O.format,[this.cache[this.locale][t]||t].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),t=e.shift(),n=e.shift(),r=e.shift(),i=function(){};typeof e[e.length-1]==`function`&&(i=e.pop()),this.cache[this.locale]||this._readLocaleFile();let a=r===1?t:n;this.cache[this.locale][t]&&(a=this.cache[this.locale][t][r===1?`one`:`other`]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i();let o=[a];return~a.indexOf(`%d`)&&o.push(r),O.format.apply(O.format,o.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let n=``;return e.forEach(function(e,r){let i=t[r+1];n+=e,i!==void 0&&(n+=`%s`)}),this.__.apply(this,[n].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,t=this.writeQueue[0],n=t.directory,r=t.locale,i=t.cb,a=this._resolveLocaleFile(n,r),o=JSON.stringify(this.cache[r],null,2);O.fs.writeFile(a,o,`utf-8`,function(t){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),i(t)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{O.fs.readFileSync&&(e=JSON.parse(O.fs.readFileSync(t,`utf-8`)))}catch(n){if(n instanceof SyntaxError&&(n.message=`syntax error in `+t),n.code===`ENOENT`)e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let n=O.resolve(e,`./`,t+`.json`);if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf(`_`)){let r=O.resolve(e,`./`,t.split(`_`)[0]+`.json`);this._fileExistsSync(r)&&(n=r)}return n}_fileExistsSync(e){return O.exists(e)}};function mt(e,t){O=t;let n=new pt(e);return{__:n.__.bind(n),__n:n.__n.bind(n),setLocale:n.setLocale.bind(n),getLocale:n.getLocale.bind(n),updateLocale:n.updateLocale.bind(n),locale:n.locale}}const ht=e=>mt(e,ft);var gt=e(t(((e,t)=>{t.exports=function(e){if(e===void 0&&(e=2),e>=Error.stackTraceLimit)throw TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+e+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");var t=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var n=Error().stack;if(Error.prepareStackTrace=t,typeof n==`object`&&n)return n[e]?n[e].getFileName():void 0}}))(),1);const _t=le(import.meta.url),vt=_t.substring(0,_t.lastIndexOf(`node_modules`)),yt=g(import.meta.url);var bt={assert:{notStrictEqual:ee,strictEqual:_},cliui:We,findUp:Ge,getEnv:e=>process.env[e],inspect:ce,getProcessArgvBin:dt,mainFilename:vt||process.cwd(),Parser:ot,path:{basename:te,dirname:v,extname:ne,relative:y,resolve:b,join:re},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:e=>{process.exit(e)},nextTick:process.nextTick,stdColumns:process.stdout.columns===void 0?null:process.stdout.columns},readFileSync:ue,readdirSync:de,require:yt,getCallerFile:()=>{let e=(0,gt.default)(3);return e.match(/^file:\/\//)?le(e):e},stringWidth:Pe,y18n:ht({directory:b(_t,`../../../locales`),updateFiles:!1})};function k(e,t,n,r){n.assert.notStrictEqual(e,t,r)}function xt(e,t){t.assert.strictEqual(typeof e,`string`)}function St(e){return Object.keys(e)}function A(e){return!!e&&!!e.then&&typeof e.then==`function`}var j=class e extends Error{constructor(t){super(t||`yargs error`),this.name=`YError`,Error.captureStackTrace&&Error.captureStackTrace(this,e)}};function Ct(e){let t=e.replace(/\s{2,}/g,` `).split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,r=t.shift();if(!r)throw Error(`No command found in: ${e}`);let i={cmd:r.replace(n,``),demanded:[],optional:[]};return t.forEach((e,r)=>{let a=!1;e=e.replace(/\s/g,``),/\.+[\]>]/.test(e)&&r===t.length-1&&(a=!0),/^\[/.test(e)?i.optional.push({cmd:e.replace(n,``).split(`|`),variadic:a}):i.demanded.push({cmd:e.replace(n,``).split(`|`),variadic:a})}),i}const wt=[`first`,`second`,`third`,`fourth`,`fifth`,`sixth`];function M(e,t,n){function r(){return typeof e==`object`?[{demanded:[],optional:[]},e,t]:[Ct(`cmd ${e}`),t,n]}try{let e=0,[t,n,i]=r(),a=[].slice.call(n);for(;a.length&&a[a.length-1]===void 0;)a.pop();let o=i||a.length;if(o<t.demanded.length)throw new j(`Not enough arguments provided. Expected ${t.demanded.length} but received ${a.length}.`);let s=t.demanded.length+t.optional.length;if(o>s)throw new j(`Too many arguments provided. Expected max ${s} but received ${o}.`);t.demanded.forEach(t=>{let n=Tt(a.shift());t.cmd.filter(e=>e===n||e===`*`).length===0&&Et(n,t.cmd,e),e+=1}),t.optional.forEach(t=>{if(a.length===0)return;let n=Tt(a.shift());t.cmd.filter(e=>e===n||e===`*`).length===0&&Et(n,t.cmd,e),e+=1})}catch(e){console.warn(e.stack)}}function Tt(e){return Array.isArray(e)?`array`:e===null?`null`:typeof e}function Et(e,t,n){throw new j(`Invalid ${wt[n]||`manyith`} argument. Expected ${t.join(` or `)} but received ${e}.`)}var Dt=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,n=!0,r=!1){if(M(`<array|function> [boolean] [boolean] [boolean]`,[e,t,n],arguments.length),Array.isArray(e)){for(let r=0;r<e.length;r++){if(typeof e[r]!=`function`)throw Error(`middleware must be a function`);let i=e[r];i.applyBeforeValidation=t,i.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e==`function`){let i=e;i.applyBeforeValidation=t,i.global=n,i.mutates=r,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(e=>{let r=[...n[t]||[],t];return e.option?!r.includes(e.option):!0}),e.option=t,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function Ot(e){return e?e.map(e=>(e.applyBeforeValidation=!1,e)):[]}function kt(e,t,n,r){return n.reduce((e,n)=>{if(n.applyBeforeValidation!==r)return e;if(n.mutates){if(n.applied)return e;n.applied=!0}if(A(e))return e.then(e=>Promise.all([e,n(e,t)])).then(([e,t])=>Object.assign(e,t));{let r=n(e,t);return A(r)?r.then(t=>Object.assign(e,t)):Object.assign(e,r)}},e)}function At(e,t,n=e=>{throw e}){try{let n=jt(e)?e():e;return A(n)?n.then(e=>t(e)):t(n)}catch(e){return n(e)}}function jt(e){return typeof e==`function`}const Mt=/(^\*)|(^\$0)/;var Nt=class{constructor(e,t,n,r){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=r,this.usage=e,this.globalMiddleware=n,this.validation=t}addDirectory(e,t,n,r){r||={},this.requireCache.add(n);let i=this.shim.path.resolve(this.shim.path.dirname(n),e),a=this.shim.readdirSync(i,{recursive:!!r.recurse});Array.isArray(r.extensions)||(r.extensions=[`js`]);let o=typeof r.visit==`function`?r.visit:e=>e;for(let e of a){let n=e.toString();if(r.exclude){let e=!1;if(e=typeof r.exclude==`function`?r.exclude(n):r.exclude.test(n),e)continue}if(r.include){let e=!1;if(e=typeof r.include==`function`?r.include(n):r.include.test(n),!e)continue}let a=!1;for(let e of r.extensions)n.endsWith(e)&&(a=!0);if(a){let e=this.shim.path.join(i,n),r=t(e),a=Object.create(null,Object.getOwnPropertyDescriptors({...r}));if(o(a,e,n)){if(this.requireCache.has(e))continue;this.requireCache.add(e),a.command||=this.shim.path.basename(e,this.shim.path.extname(e)),this.addHandler(a)}}}}addHandler(e,t,n,r,i,a){let o=[],s=Ot(i);if(r||=(()=>{}),Array.isArray(e))if(It(e))[e,...o]=e;else for(let t of e)this.addHandler(t);else if(zt(e)){let t=Array.isArray(e.command)||typeof e.command==`string`?e.command:null;if(t===null)throw Error(`No command name given for module: ${this.shim.inspect(e)}`);e.aliases&&(t=[].concat(t,e.aliases)),this.addHandler(t,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(Ft(n)){this.addHandler([e].concat(o),t,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e==`string`){let i=Ct(e);o=o.map(e=>Ct(e).cmd);let c=!1,l=[i.cmd].concat(o).filter(e=>Mt.test(e)?(c=!0,!1):!0);l.length===0&&c&&l.push(`$0`),c&&(i.cmd=l[0],o=l.slice(1),e=e.replace(Mt,i.cmd)),o.forEach(e=>{this.aliasMap[e]=i.cmd}),t!==!1&&this.usage.command(e,t,c,o,a),this.handlers[i.cmd]={original:e,description:t,handler:r,builder:n||{},middlewares:s,deprecated:a,demanded:i.demanded,optional:i.optional},c&&(this.defaultCommand=this.handlers[i.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,t,n,r,i,a){let o=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,s=t.getInternalMethods().getContext(),c=s.commands.slice(),l=!e;e&&(s.commands.push(e),s.fullCommands.push(o.original));let u=this.applyBuilderUpdateUsageAndParse(l,o,t,n.aliases,c,r,i,a);return A(u)?u.then(e=>this.applyMiddlewareAndGetResult(l,o,e.innerArgv,s,i,e.aliases,t)):this.applyMiddlewareAndGetResult(l,o,u.innerArgv,s,i,u.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,n,r,i,a,o,s){let c=t.builder,l=n;if(Lt(c)){n.getInternalMethods().getUsageInstance().freeze();let u=c(n.getInternalMethods().reset(r),s);if(A(u))return u.then(r=>(l=lr(r)?r:n,this.parseAndUpdateUsage(e,t,l,i,a,o)))}else Rt(c)&&(n.getInternalMethods().getUsageInstance().freeze(),l=n.getInternalMethods().reset(r),Object.keys(t.builder).forEach(e=>{l.option(e,c[e])}));return this.parseAndUpdateUsage(e,t,l,i,a,o)}parseAndUpdateUsage(e,t,n,r,i,a){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(r,t),t.description);let o=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,i,a);return A(o)?o.then(e=>({aliases:n.parsed.aliases,innerArgv:e})):{aliases:n.parsed.aliases,innerArgv:o}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,t){let n=Mt.test(t.original)?t.original.replace(Mt,``).trim():t.original,r=e.filter(e=>!Mt.test(e));return r.push(n),`$0 ${r.join(` `)}`}handleValidationAndGetResult(e,t,n,r,i,a,o,s){if(!a.getInternalMethods().getHasOutput()){let t=a.getInternalMethods().runValidation(i,s,a.parsed.error,e);n=At(n,e=>(t(e),e))}if(t.handler&&!a.getInternalMethods().getHasOutput()){a.getInternalMethods().setHasOutput();let r=!!a.getOptions().configuration[`populate--`];a.getInternalMethods().postProcess(n,r,!1,!1),n=kt(n,a,o,!1),n=At(n,e=>{let n=t.handler(e);return A(n)?n.then(()=>e):e}),e||a.getInternalMethods().getUsageInstance().cacheHelpMessage(),A(n)&&!a.getInternalMethods().hasParseCallback()&&n.catch(e=>{try{a.getInternalMethods().getUsageInstance().fail(null,e)}catch{}})}return e||(r.commands.pop(),r.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,t,n,r,i,a,o){let s={};if(i)return n;o.getInternalMethods().getHasOutput()||(s=this.populatePositionals(t,n,r,o));let c=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),l=kt(n,o,c,!0);return A(l)?l.then(n=>this.handleValidationAndGetResult(e,t,n,r,a,o,c,s)):this.handleValidationAndGetResult(e,t,l,r,a,o,c,s)}populatePositionals(e,t,n,r){t._=t._.slice(n.commands.length);let i=e.demanded.slice(0),a=e.optional.slice(0),o={};for(this.validation.positionalCount(i.length,t._.length);i.length;){let e=i.shift();this.populatePositional(e,t,o)}for(;a.length;){let e=a.shift();this.populatePositional(e,t,o)}return t._=n.commands.concat(t._.map(e=>``+e)),this.postProcessPositionals(t,o,this.cmdToParseOptions(e.original),r),o}populatePositional(e,t,n){let r=e.cmd[0];e.variadic?n[r]=t._.splice(0).map(String):t._.length&&(n[r]=[String(t._.shift())])}cmdToParseOptions(e){let t={array:[],default:{},alias:{},demand:{}},n=Ct(e);return n.demanded.forEach(e=>{let[n,...r]=e.cmd;e.variadic&&(t.array.push(n),t.default[n]=[]),t.alias[n]=r,t.demand[n]=!0}),n.optional.forEach(e=>{let[n,...r]=e.cmd;e.variadic&&(t.array.push(n),t.default[n]=[]),t.alias[n]=r}),t}postProcessPositionals(e,t,n,r){let i=Object.assign({},r.getOptions());i.default=Object.assign(n.default,i.default);for(let e of Object.keys(n.alias))i.alias[e]=(i.alias[e]||[]).concat(n.alias[e]);i.array=i.array.concat(n.array),i.config={};let a=[];if(Object.keys(t).forEach(e=>{t[e].map(t=>{i.configuration[`unknown-options-as-args`]&&(i.key[e]=!0),a.push(`--${e}`),a.push(t)})}),!a.length)return;let o=Object.assign({},i.configuration,{"populate--":!1}),s=this.shim.Parser.detailed(a,Object.assign({},i,{configuration:o}));if(s.error)r.getInternalMethods().getUsageInstance().fail(s.error.message,s.error);else{let n=Object.keys(t);Object.keys(t).forEach(e=>{n.push(...s.aliases[e])}),Object.keys(s.argv).forEach(i=>{n.includes(i)&&(t[i]||(t[i]=s.argv[i]),!this.isInConfigs(r,i)&&!this.isDefaulted(r,i)&&Object.prototype.hasOwnProperty.call(e,i)&&Object.prototype.hasOwnProperty.call(s.argv,i)&&(Array.isArray(e[i])||Array.isArray(s.argv[i]))?e[i]=[].concat(e[i],s.argv[i]):e[i]=s.argv[i])})}}isDefaulted(e,t){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,t)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(t))}isInConfigs(e,t){let{configObjects:n}=e.getOptions();return n.some(e=>Object.prototype.hasOwnProperty.call(e,t))||n.some(e=>Object.prototype.hasOwnProperty.call(e,this.shim.Parser.camelCase(t)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let t=Mt.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,`$0 `);e.getInternalMethods().getUsageInstance().usage(t,this.defaultCommand.description)}let t=this.defaultCommand.builder;if(Lt(t))return t(e,!0);Ft(t)||Object.keys(t).forEach(n=>{e.option(n,t[n])})}extractDesc({describe:e,description:t,desc:n}){for(let r of[e,t,n]){if(typeof r==`string`||r===!1)return r;k(r,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();k(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function Pt(e,t,n,r){return new Nt(e,t,n,r)}function Ft(e){return typeof e==`object`&&!!e.builder&&typeof e.handler==`function`}function It(e){return e.every(e=>typeof e==`string`)}function Lt(e){return typeof e==`function`}function Rt(e){return typeof e==`object`}function zt(e){return typeof e==`object`&&!Array.isArray(e)}function Bt(e={},t=()=>!0){let n={};return St(e).forEach(r=>{t(r,e[r])&&(n[r]=e[r])}),n}function Vt(e){typeof process>`u`||[process.stdout,process.stderr].forEach(t=>{let n=t;n._handle&&n.isTTY&&typeof n._handle.setBlocking==`function`&&n._handle.setBlocking(e)})}function Ht(e){return typeof e==`boolean`}function Ut(e,t){let n=t.y18n.__,r={},i=[];r.failFn=function(e){i.push(e)};let a=null,o=null,s=!0;r.showHelpOnFail=function(t=!0,n){let[i,c]=typeof t==`string`?[!0,t]:[t,n];return e.getInternalMethods().isGlobalContext()&&(o=c),a=c,s=i,r};let c=!1;r.fail=function(t,n){let l=e.getInternalMethods().getLoggerInstance();if(i.length)for(let e=i.length-1;e>=0;--e){let a=i[e];if(Ht(a)){if(n)throw n;if(t)throw Error(t)}else a(t,n,r)}else{if(e.getExitProcess()&&Vt(!0),!c){c=!0,s&&(e.showHelp(`error`),l.error()),(t||n)&&l.error(t||n);let r=a||o;r&&((t||n)&&l.error(``),l.error(r))}if(n||=new j(t),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,n);throw n}};let l=[],u=!1;r.usage=(e,t)=>e===null?(u=!0,l=[],r):(u=!1,l.push([e,t||``]),r),r.getUsage=()=>l,r.getUsageDisabled=()=>u,r.getPositionalGroupName=()=>n(`Positionals:`);let d=[];r.example=(e,t)=>{d.push([e,t||``])};let f=[];r.command=function(e,t,n,r,i=!1){n&&(f=f.map(e=>(e[2]=!1,e))),f.push([e,t||``,n,r,i])},r.getCommands=()=>f;let p={};r.describe=function(e,t){Array.isArray(e)?e.forEach(e=>{r.describe(e,t)}):typeof e==`object`?Object.keys(e).forEach(t=>{r.describe(t,e[t])}):p[e]=t},r.getDescriptions=()=>p;let m=[];r.epilog=e=>{m.push(e)};let h=!1,g;r.wrap=e=>{h=!0,g=e},r.getWrap=()=>t.getEnv(`YARGS_DISABLE_WRAP`)?null:(h||=(g=y(),!0),g);let ee=`__yargsString__:`;r.deferY18nLookup=e=>ee+e,r.help=function(){if(v)return v;te();let i=e.customScriptName?e.$0:t.path.basename(e.$0),a=e.getDemandedOptions(),o=e.getDemandedCommands(),s=e.getDeprecatedOptions(),c=e.getGroups(),h=e.getOptions(),g=[];g=g.concat(Object.keys(p)),g=g.concat(Object.keys(a)),g=g.concat(Object.keys(o)),g=g.concat(Object.keys(h.default)),g=g.filter(re),g=Object.keys(g.reduce((e,t)=>(t!==`_`&&(e[t]=!0),e),{}));let y=r.getWrap(),b=t.cliui({width:y,wrap:!!y});if(!u){if(l.length)l.forEach(e=>{b.div({text:`${e[0].replace(/\$0/g,i)}`}),e[1]&&b.div({text:`${e[1]}`,padding:[1,0,0,0]})}),b.div();else if(f.length){let e=null;e=o._?`${i} <${n(`command`)}>\n`:`${i} [${n(`command`)}]\n`,b.div(`${e}`)}}if(f.length>1||f.length===1&&!f[0][2]){b.div(n(`Commands:`));let t=e.getInternalMethods().getContext(),r=t.commands.length?`${t.commands.join(` `)} `:``;e.getInternalMethods().getParserConfiguration()[`sort-commands`]===!0&&(f=f.sort((e,t)=>e[0].localeCompare(t[0])));let a=i?`${i} `:``;f.forEach(e=>{let t=`${a}${r}${e[0].replace(/^\$0 ?/,``)}`;b.span({text:t,padding:[0,2,0,2],width:_(f,y,`${i}${r}`)+4},{text:e[1]});let o=[];e[2]&&o.push(`[${n(`default`)}]`),e[3]&&e[3].length&&o.push(`[${n(`aliases:`)} ${e[3].join(`, `)}]`),e[4]&&(typeof e[4]==`string`?o.push(`[${n(`deprecated: %s`,e[4])}]`):o.push(`[${n(`deprecated`)}]`)),o.length?b.div({text:o.join(` `),padding:[0,0,0,2],align:`right`}):b.div()}),b.div()}let x=(Object.keys(h.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);g=g.filter(t=>!e.parsed.newAliases[t]&&x.every(e=>(h.alias[e]||[]).indexOf(t)===-1));let ae=n(`Options:`);c[ae]||(c[ae]=[]),ne(g,h.alias,c,ae);let S=e=>/^--/.test(qt(e)),oe=Object.keys(c).filter(e=>c[e].length>0).map(e=>({groupName:e,normalizedKeys:c[e].filter(re).map(e=>{if(x.includes(e))return e;for(let t=0,n;(n=x[t])!==void 0;t++)if((h.alias[n]||[]).includes(e))return n;return e})})).filter(({normalizedKeys:e})=>e.length>0).map(({groupName:e,normalizedKeys:t})=>({groupName:e,normalizedKeys:t,switches:t.reduce((t,n)=>(t[n]=[n].concat(h.alias[n]||[]).map(t=>e===r.getPositionalGroupName()?t:(/^[0-9]$/.test(t)?h.boolean.includes(n)?`-`:`--`:t.length>1?`--`:`-`)+t).sort((e,t)=>S(e)===S(t)?0:S(e)?1:-1).join(`, `),t),{})}));if(oe.filter(({groupName:e})=>e!==r.getPositionalGroupName()).some(({normalizedKeys:e,switches:t})=>!e.every(e=>S(t[e])))&&oe.filter(({groupName:e})=>e!==r.getPositionalGroupName()).forEach(({normalizedKeys:e,switches:t})=>{e.forEach(e=>{S(t[e])&&(t[e]=Gt(t[e],4))})}),oe.forEach(({groupName:t,normalizedKeys:i,switches:o})=>{b.div(t),i.forEach(t=>{let i=o[t],c=p[t]||``,l=null;c.includes(ee)&&(c=n(c.substring(16))),h.boolean.includes(t)&&(l=`[${n(`boolean`)}]`),h.count.includes(t)&&(l=`[${n(`count`)}]`),h.string.includes(t)&&(l=`[${n(`string`)}]`),h.normalize.includes(t)&&(l=`[${n(`string`)}]`),h.array.includes(t)&&(l=`[${n(`array`)}]`),h.number.includes(t)&&(l=`[${n(`number`)}]`);let u=[t in s?(e=>typeof e==`string`?`[${n(`deprecated: %s`,e)}]`:`[${n(`deprecated`)}]`)(s[t]):null,l,t in a?`[${n(`required`)}]`:null,h.choices&&h.choices[t]?`[${n(`choices:`)} ${r.stringifiedValues(h.choices[t])}]`:null,ie(h.default[t],h.defaultDescription[t])].filter(Boolean).join(` `);b.span({text:qt(i),padding:[0,2,0,2+Kt(i)],width:_(o,y)+4},c);let d=e.getInternalMethods().getUsageConfiguration()[`hide-types`]===!0;u&&!d?b.div({text:u,padding:[0,0,0,2],align:`right`}):b.div()}),b.div()}),d.length&&(b.div(n(`Examples:`)),d.forEach(e=>{e[0]=e[0].replace(/\$0/g,i)}),d.forEach(e=>{e[1]===``?b.div({text:e[0],padding:[0,2,0,2]}):b.div({text:e[0],padding:[0,2,0,2],width:_(d,y)+4},{text:e[1]})}),b.div()),m.length>0){let e=m.map(e=>e.replace(/\$0/g,i)).join(`
|
|
38
|
-
`);b.div(`${e}\n`)}return b.toString().replace(/\s*$/,``)};function _(e,n,r){let i=0;return Array.isArray(e)||(e=Object.values(e).map(e=>[e])),e.forEach(e=>{i=Math.max(t.stringWidth(r?`${r} ${qt(e[0])}`:qt(e[0]))+Kt(e[0]),i)}),n&&(i=Math.min(i,parseInt((n*.5).toString(),10))),i}function te(){let t=e.getDemandedOptions(),n=e.getOptions();(Object.keys(n.alias)||[]).forEach(i=>{n.alias[i].forEach(a=>{p[a]&&r.describe(i,p[a]),a in t&&e.demandOption(i,t[a]),n.boolean.includes(a)&&e.boolean(i),n.count.includes(a)&&e.count(i),n.string.includes(a)&&e.string(i),n.normalize.includes(a)&&e.normalize(i),n.array.includes(a)&&e.array(i),n.number.includes(a)&&e.number(i)})})}let v;r.cacheHelpMessage=function(){v=this.help()},r.clearCachedHelpMessage=function(){v=void 0},r.hasCachedHelpMessage=function(){return!!v};function ne(e,t,n,r){let i=[],a=null;return Object.keys(n).forEach(e=>{i=i.concat(n[e])}),e.forEach(e=>{a=[e].concat(t[e]),a.some(e=>i.indexOf(e)!==-1)||n[r].push(e)}),i}function re(t){return e.getOptions().hiddenOptions.indexOf(t)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}r.showHelp=t=>{let n=e.getInternalMethods().getLoggerInstance();t||=`error`,(typeof t==`function`?t:n[t])(r.help())},r.functionDescription=e=>[`(`,e.name?t.Parser.decamelize(e.name,`-`):n(`generated-value`),`)`].join(``),r.stringifiedValues=function(e,t){let n=``,r=t||`, `,i=[].concat(e);return!e||!i.length||i.forEach(e=>{n.length&&(n+=r),n+=JSON.stringify(e)}),n};function ie(e,t){let r=`[${n(`default:`)} `;if(e===void 0&&!t)return null;if(t)r+=t;else switch(typeof e){case`string`:r+=`"${e}"`;break;case`object`:r+=JSON.stringify(e);break;default:r+=e}return`${r}]`}function y(){return t.process.stdColumns?Math.min(80,t.process.stdColumns):80}let b=null;r.version=e=>{b=e},r.showVersion=t=>{let n=e.getInternalMethods().getLoggerInstance();t||=`error`,(typeof t==`function`?t:n[t])(b)},r.reset=function(e){return a=null,c=!1,l=[],u=!1,m=[],d=[],f=[],p=Bt(p,t=>!e[t]),r};let x=[];return r.freeze=function(){x.push({failMessage:a,failureOutput:c,usages:l,usageDisabled:u,epilogs:m,examples:d,commands:f,descriptions:p})},r.unfreeze=function(e=!1){let t=x.pop();t&&(e?(p={...t.descriptions,...p},f=[...t.commands,...f],l=[...t.usages,...l],d=[...t.examples,...d],m=[...t.epilogs,...m]):{failMessage:a,failureOutput:c,usages:l,usageDisabled:u,epilogs:m,examples:d,commands:f,descriptions:p}=t)},r}function Wt(e){return typeof e==`object`}function Gt(e,t){return Wt(e)?{text:e.text,indentation:e.indentation+t}:{text:e,indentation:t}}function Kt(e){return Wt(e)?e.indentation:0}function qt(e){return Wt(e)?e.text:e}var Jt=class{constructor(e,t,n,r){this.yargs=e,this.usage=t,this.command=n,this.shim=r,this.completionKey=`get-yargs-completions`,this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(this.shim.getEnv(`SHELL`)?.includes(`zsh`)||this.shim.getEnv(`ZSH_NAME`)?.includes(`zsh`))??!1}defaultCompletion(e,t,n,r){let i=this.command.getCommandHandlers();for(let t=0,n=e.length;t<n;++t)if(i[e[t]]&&i[e[t]].builder){let n=i[e[t]].builder;if(Lt(n)){this.indexAfterLastReset=t+1;let e=this.yargs.getInternalMethods().reset();return n(e,!0),e.argv}}let a=[];this.commandCompletions(a,e,n),this.optionCompletions(a,e,t,n),this.choicesFromOptionsCompletions(a,e,t,n),this.choicesFromPositionalsCompletions(a,e,t,n),r(null,a)}commandCompletions(e,t,n){let r=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&r[r.length-1]!==n&&!this.previousArgHasChoices(t)&&this.usage.getCommands().forEach(n=>{let r=Ct(n[0]).cmd;if(t.indexOf(r)===-1)if(!this.zshShell)e.push(r);else{let t=n[1]||``;e.push(r.replace(/:/g,`\\:`)+`:`+t)}})}optionCompletions(e,t,n,r){if((r.match(/^-/)||r===``&&e.length===0)&&!this.previousArgHasChoices(t)){let n=this.yargs.getOptions(),i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(n.key).forEach(a=>{let o=!!n.configuration[`boolean-negation`]&&n.boolean.includes(a);!i.includes(a)&&!n.hiddenOptions.includes(a)&&!this.argsContainKey(t,a,o)&&this.completeOptionKey(a,e,r,o&&!!n.default[a])})}}choicesFromOptionsCompletions(e,t,n,r){if(this.previousArgHasChoices(t)){let n=this.getPreviousArgChoices(t);n&&n.length>0&&e.push(...n.map(e=>e.replace(/:/g,`\\:`)))}}choicesFromPositionalsCompletions(e,t,n,r){if(r===``&&e.length>0&&this.previousArgHasChoices(t))return;let i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],a=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=i[n._.length-a-1];if(!o)return;let s=this.yargs.getOptions().choices[o]||[];for(let t of s)t.startsWith(r)&&e.push(t.replace(/:/g,`\\:`))}getPreviousArgChoices(e){if(e.length<1)return;let t=e[e.length-1],n=``;if(!t.startsWith(`-`)&&e.length>1&&(n=t,t=e[e.length-2]),!t.startsWith(`-`))return;let r=t.replace(/^-+/,``),i=this.yargs.getOptions(),a=[r,...this.yargs.getAliases()[r]||[]],o;for(let e of a)if(Object.prototype.hasOwnProperty.call(i.key,e)&&Array.isArray(i.choices[e])){o=i.choices[e];break}if(o)return o.filter(e=>!n||e.startsWith(n))}previousArgHasChoices(e){let t=this.getPreviousArgChoices(e);return t!==void 0&&t.length>0}argsContainKey(e,t,n){let r=t=>e.indexOf((/^[^0-9]$/.test(t)?`-`:`--`)+t)!==-1;if(r(t)||n&&r(`no-${t}`))return!0;if(this.aliases){for(let e of this.aliases[t])if(r(e))return!0}return!1}completeOptionKey(e,t,n,r){let i=e;if(this.zshShell){let t=this.usage.getDescriptions(),n=((this===null||this===void 0?void 0:this.aliases)?.[e])?.find(e=>{let n=t[e];return typeof n==`string`&&n.length>0}),r=n?t[n]:void 0,a=t[e]??r??``;i=`${e.replace(/:/g,`\\:`)}:${a.replace(`__yargsString__:`,``).replace(/(\r\n|\n|\r)/gm,` `)}`}let a=!(e=>/^--/.test(e))(n)&&(e=>/^[^0-9]$/.test(e))(e)?`-`:`--`;t.push(a+i),r&&t.push(a+`no-`+i)}customCompletion(e,t,n,r){if(k(this.customCompletionFunction,null,this.shim),Xt(this.customCompletionFunction)){let e=this.customCompletionFunction(n,t);return A(e)?e.then(e=>{this.shim.process.nextTick(()=>{r(null,e)})}).catch(e=>{this.shim.process.nextTick(()=>{r(e,void 0)})}):r(null,e)}else if(Zt(this.customCompletionFunction))return this.customCompletionFunction(n,t,(i=r)=>this.defaultCompletion(e,t,n,i),e=>{r(null,e)});else return this.customCompletionFunction(n,t,e=>{r(null,e)})}getCompletion(e,t){let n=e.length?e[e.length-1]:``,r=this.yargs.parse(e,!0),i=this.customCompletionFunction?r=>this.customCompletion(e,r,n,t):r=>this.defaultCompletion(e,r,n,t);return A(r)?r.then(i):i(r)}generateCompletionScript(e,t){let n=this.zshShell?`#compdef {{app_name}}
|
|
39
|
-
###-begin-{{app_name}}-completions-###
|
|
40
|
-
#
|
|
41
|
-
# yargs command completion script
|
|
42
|
-
#
|
|
43
|
-
# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
|
|
44
|
-
# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.
|
|
45
|
-
#
|
|
46
|
-
_{{app_name}}_yargs_completions()
|
|
47
|
-
{
|
|
48
|
-
local reply
|
|
49
|
-
local si=$IFS
|
|
50
|
-
IFS=$'
|
|
51
|
-
' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
|
|
52
|
-
IFS=$si
|
|
53
|
-
if [[ \${#reply} -gt 0 ]]; then
|
|
54
|
-
_describe 'values' reply
|
|
55
|
-
else
|
|
56
|
-
_default
|
|
57
|
-
fi
|
|
58
|
-
}
|
|
59
|
-
if [[ "'\${zsh_eval_context[-1]}" == "loadautofunc" ]]; then
|
|
60
|
-
_{{app_name}}_yargs_completions "$@"
|
|
61
|
-
else
|
|
62
|
-
compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
63
|
-
fi
|
|
64
|
-
###-end-{{app_name}}-completions-###
|
|
65
|
-
`:`###-begin-{{app_name}}-completions-###
|
|
66
|
-
#
|
|
67
|
-
# yargs command completion script
|
|
68
|
-
#
|
|
69
|
-
# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
|
|
70
|
-
# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
|
|
71
|
-
#
|
|
72
|
-
_{{app_name}}_yargs_completions()
|
|
73
|
-
{
|
|
74
|
-
local cur_word args type_list
|
|
75
|
-
|
|
76
|
-
cur_word="\${COMP_WORDS[COMP_CWORD]}"
|
|
77
|
-
args=("\${COMP_WORDS[@]}")
|
|
78
|
-
|
|
79
|
-
# ask yargs to generate completions.
|
|
80
|
-
# see https://stackoverflow.com/a/40944195/7080036 for the spaces-handling awk
|
|
81
|
-
mapfile -t type_list < <({{app_path}} --get-yargs-completions "\${args[@]}")
|
|
82
|
-
mapfile -t COMPREPLY < <(compgen -W "$( printf '%q ' "\${type_list[@]}" )" -- "\${cur_word}" |
|
|
83
|
-
awk '/ / { print "\\""$0"\\"" } /^[^ ]+$/ { print $0 }')
|
|
84
|
-
|
|
85
|
-
# if no match was found, fall back to filename completion
|
|
86
|
-
if [ \${#COMPREPLY[@]} -eq 0 ]; then
|
|
87
|
-
COMPREPLY=()
|
|
88
|
-
fi
|
|
89
|
-
|
|
90
|
-
return 0
|
|
91
|
-
}
|
|
92
|
-
complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
|
|
93
|
-
###-end-{{app_name}}-completions-###
|
|
94
|
-
`,r=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,r),n=n.replace(/{{completion_command}}/g,t),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}};function Yt(e,t,n,r){return new Jt(e,t,n,r)}function Xt(e){return e.length<3}function Zt(e){return e.length>3}function Qt(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];let i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)===e.charAt(i-1)?n[r][i]=n[r-1][i-1]:r>1&&i>1&&t.charAt(r-2)===e.charAt(i-1)&&t.charAt(r-1)===e.charAt(i-2)?n[r][i]=n[r-2][i-2]+1:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}const $t=[`$0`,`--`,`_`];function en(e,t,n){let r=n.y18n.__,i=n.y18n.__n,a={};a.nonOptionCount=function(n){let r=e.getDemandedCommands(),a=n._.length+(n[`--`]?n[`--`].length:0)-e.getInternalMethods().getContext().commands.length;r._&&(a<r._.min||a>r._.max)&&(a<r._.min?r._.minMsg===void 0?t.fail(i(`Not enough non-option arguments: got %s, need at least %s`,`Not enough non-option arguments: got %s, need at least %s`,a,a.toString(),r._.min.toString())):t.fail(r._.minMsg?r._.minMsg.replace(/\$0/g,a.toString()).replace(/\$1/,r._.min.toString()):null):a>r._.max&&(r._.maxMsg===void 0?t.fail(i(`Too many non-option arguments: got %s, maximum of %s`,`Too many non-option arguments: got %s, maximum of %s`,a,a.toString(),r._.max.toString())):t.fail(r._.maxMsg?r._.maxMsg.replace(/\$0/g,a.toString()).replace(/\$1/,r._.max.toString()):null)))},a.positionalCount=function(e,n){n<e&&t.fail(i(`Not enough non-option arguments: got %s, need at least %s`,`Not enough non-option arguments: got %s, need at least %s`,n,n+``,e+``))},a.requiredArguments=function(e,n){let r=null;for(let t of Object.keys(n))(!Object.prototype.hasOwnProperty.call(e,t)||e[t]===void 0)&&(r||={},r[t]=n[t]);if(r){let e=[];for(let t of Object.keys(r)){let n=r[t];n&&e.indexOf(n)<0&&e.push(n)}let n=e.length?`\n${e.join(`
|
|
95
|
-
`)}`:``;t.fail(i(`Missing required argument: %s`,`Missing required arguments: %s`,Object.keys(r).length,Object.keys(r).join(`, `)+n))}},a.unknownArguments=function(n,r,o,s,c=!0){let l=e.getInternalMethods().getCommandInstance().getCommands(),u=[],d=e.getInternalMethods().getContext();if(Object.keys(n).forEach(t=>{!$t.includes(t)&&!Object.prototype.hasOwnProperty.call(o,t)&&!Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),t)&&!a.isValidAndSomeAliasIsNotNew(t,r)&&u.push(t)}),c&&(d.commands.length>0||l.length>0||s)&&n._.slice(d.commands.length).forEach(e=>{l.includes(``+e)||u.push(``+e)}),c){let t=e.getDemandedCommands()._?.max||0,r=d.commands.length+t;r<n._.length&&n._.slice(r).forEach(e=>{e=String(e),!d.commands.includes(e)&&!u.includes(e)&&u.push(e)})}u.length&&t.fail(i(`Unknown argument: %s`,`Unknown arguments: %s`,u.length,u.map(e=>e.trim()?e:`"${e}"`).join(`, `)))},a.unknownCommands=function(n){let r=e.getInternalMethods().getCommandInstance().getCommands(),a=[],o=e.getInternalMethods().getContext();return(o.commands.length>0||r.length>0)&&n._.slice(o.commands.length).forEach(e=>{r.includes(``+e)||a.push(``+e)}),a.length>0?(t.fail(i(`Unknown command: %s`,`Unknown commands: %s`,a.length,a.join(`, `))),!0):!1},a.isValidAndSomeAliasIsNotNew=function(t,n){if(!Object.prototype.hasOwnProperty.call(n,t))return!1;let r=e.parsed.newAliases;return[t,...n[t]].some(e=>!Object.prototype.hasOwnProperty.call(r,e)||!r[t])},a.limitedChoices=function(n){let i=e.getOptions(),a={};if(!Object.keys(i.choices).length)return;Object.keys(n).forEach(e=>{$t.indexOf(e)===-1&&Object.prototype.hasOwnProperty.call(i.choices,e)&&[].concat(n[e]).forEach(t=>{i.choices[e].indexOf(t)===-1&&t!==void 0&&(a[e]=(a[e]||[]).concat(t))})});let o=Object.keys(a);if(!o.length)return;let s=r(`Invalid values:`);o.forEach(e=>{s+=`\n ${r(`Argument: %s, Given: %s, Choices: %s`,e,t.stringifiedValues(a[e]),t.stringifiedValues(i.choices[e]))}`}),t.fail(s)};let o={};a.implies=function(t,r){M(`<string|object> [array|number|string]`,[t,r],arguments.length),typeof t==`object`?Object.keys(t).forEach(e=>{a.implies(e,t[e])}):(e.global(t),o[t]||(o[t]=[]),Array.isArray(r)?r.forEach(e=>a.implies(t,e)):(k(r,void 0,n),o[t].push(r)))},a.getImplied=function(){return o};function s(e,t){let n=Number(t);return t=isNaN(n)?t:n,typeof t==`number`?t=e._.length>=t:t.match(/^--no-.+/)?(t=t.match(/^--no-(.+)/)[1],t=!Object.prototype.hasOwnProperty.call(e,t)):t=Object.prototype.hasOwnProperty.call(e,t),t}a.implications=function(e){let n=[];if(Object.keys(o).forEach(t=>{let r=t;(o[t]||[]).forEach(t=>{let i=r,a=t;i=s(e,i),t=s(e,t),i&&!t&&n.push(` ${r} -> ${a}`)})}),n.length){let e=`${r(`Implications failed:`)}\n`;n.forEach(t=>{e+=t}),t.fail(e)}};let c={};a.conflicts=function(t,n){M(`<string|object> [array|string]`,[t,n],arguments.length),typeof t==`object`?Object.keys(t).forEach(e=>{a.conflicts(e,t[e])}):(e.global(t),c[t]||(c[t]=[]),Array.isArray(n)?n.forEach(e=>a.conflicts(t,e)):c[t].push(n))},a.getConflicting=()=>c,a.conflicting=function(i){Object.keys(i).forEach(e=>{c[e]&&c[e].forEach(n=>{n&&i[e]!==void 0&&i[n]!==void 0&&t.fail(r(`Arguments %s and %s are mutually exclusive`,e,n))})}),e.getInternalMethods().getParserConfiguration()[`strip-dashed`]&&Object.keys(c).forEach(e=>{c[e].forEach(a=>{a&&i[n.Parser.camelCase(e)]!==void 0&&i[n.Parser.camelCase(a)]!==void 0&&t.fail(r(`Arguments %s and %s are mutually exclusive`,e,a))})})},a.recommendCommands=function(e,n){n=n.sort((e,t)=>t.length-e.length);let i=null,a=1/0;for(let t=0,r;(r=n[t])!==void 0;t++){let t=Qt(e,r);t<=3&&t<a&&(a=t,i=r)}i&&t.fail(r(`Did you mean %s?`,i))},a.reset=function(e){return o=Bt(o,t=>!e[t]),c=Bt(c,t=>!e[t]),a};let l=[];return a.freeze=function(){l.push({implied:o,conflicting:c})},a.unfreeze=function(){let e=l.pop();k(e,void 0,n),{implied:o,conflicting:c}=e},a}let tn=[],nn;function rn(e,t,n,r){nn=r;let i={};if(Object.prototype.hasOwnProperty.call(e,`extends`)){if(typeof e.extends!=`string`)return i;let a=/\.json|\..*rc$/.test(e.extends),o=null;if(a)o=on(t,e.extends);else try{o=import.meta.resolve(e.extends)}catch{return e}an(o),tn.push(o),i=a?JSON.parse(nn.readFileSync(o,`utf8`)):r.require(e.extends),delete e.extends,i=rn(i,nn.path.dirname(o),n,nn)}return tn=[],n?sn(i,e):Object.assign({},i,e)}function an(e){if(tn.indexOf(e)>-1)throw new j(`Circular extended configurations: '${e}'.`)}function on(e,t){return nn.path.resolve(e,t)}function sn(e,t){let n={};function r(e){return e&&typeof e==`object`&&!Array.isArray(e)}Object.assign(n,e);for(let i of Object.keys(t))r(t[i])&&r(n[i])?n[i]=sn(e[i],t[i]):n[i]=t[i];return n}var N=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},P=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},F,cn,ln,I,L,un,R,dn,fn,z,pn,B,V,H,U,mn,hn,W,G,gn,_n,K,vn,yn,bn,q,xn,J,Sn,Cn,wn,Y,Tn,X,Z;function En(e){return(t=[],n=e.process.cwd(),r)=>{let i=new cr(t,n,r,e);return Object.defineProperty(i,`argv`,{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}const Dn=Symbol(`copyDoubleDash`),On=Symbol(`copyDoubleDash`),kn=Symbol(`deleteFromParserHintObject`),An=Symbol(`emitWarning`),jn=Symbol(`freeze`),Mn=Symbol(`getDollarZero`),Nn=Symbol(`getParserConfiguration`),Pn=Symbol(`getUsageConfiguration`),Fn=Symbol(`guessLocale`),In=Symbol(`guessVersion`),Ln=Symbol(`parsePositionalNumbers`),Rn=Symbol(`pkgUp`),Q=Symbol(`populateParserHintArray`),zn=Symbol(`populateParserHintSingleValueDictionary`),Bn=Symbol(`populateParserHintArrayDictionary`),Vn=Symbol(`populateParserHintDictionary`),Hn=Symbol(`sanitizeKey`),Un=Symbol(`setKey`),Wn=Symbol(`unfreeze`),Gn=Symbol(`validateAsync`),Kn=Symbol(`getCommandInstance`),qn=Symbol(`getContext`),Jn=Symbol(`getHasOutput`),Yn=Symbol(`getLoggerInstance`),Xn=Symbol(`getParseContext`),Zn=Symbol(`getUsageInstance`),Qn=Symbol(`getValidationInstance`),$n=Symbol(`hasParseCallback`),er=Symbol(`isGlobalContext`),tr=Symbol(`postProcess`),nr=Symbol(`rebase`),rr=Symbol(`reset`),ir=Symbol(`runYargsParserAndExecuteCommands`),ar=Symbol(`runValidation`),or=Symbol(`setHasOutput`),sr=Symbol(`kTrackManuallySetKeys`);var cr=class{constructor(e=[],t,n,r){this.customScriptName=!1,this.parsed=!1,F.set(this,void 0),cn.set(this,void 0),ln.set(this,{commands:[],fullCommands:[]}),I.set(this,null),L.set(this,null),un.set(this,`show-hidden`),R.set(this,null),dn.set(this,!0),fn.set(this,{}),z.set(this,!0),pn.set(this,[]),B.set(this,void 0),V.set(this,{}),H.set(this,!1),U.set(this,null),mn.set(this,!0),hn.set(this,void 0),W.set(this,``),G.set(this,void 0),gn.set(this,void 0),_n.set(this,{}),K.set(this,null),vn.set(this,null),yn.set(this,{}),bn.set(this,{}),q.set(this,void 0),xn.set(this,!1),J.set(this,void 0),Sn.set(this,!1),Cn.set(this,!1),wn.set(this,!1),Y.set(this,void 0),Tn.set(this,{}),X.set(this,null),Z.set(this,void 0),N(this,J,r,`f`),N(this,q,e,`f`),N(this,cn,t,`f`),N(this,gn,n,`f`),N(this,B,new Dt(this),`f`),this.$0=this[Mn](),this[rr](),N(this,F,P(this,F,`f`),`f`),N(this,Y,P(this,Y,`f`),`f`),N(this,Z,P(this,Z,`f`),`f`),N(this,G,P(this,G,`f`),`f`),P(this,G,`f`).showHiddenOpt=P(this,un,`f`),N(this,hn,this[On](),`f`),P(this,J,`f`).y18n.setLocale(`en_US`)}addHelpOpt(e,t){return M(`[string|boolean] [string]`,[e,t],arguments.length),P(this,U,`f`)&&(this[kn](P(this,U,`f`)),N(this,U,null,`f`)),e===!1&&t===void 0?this:(N(this,U,typeof e==`string`?e:`help`,`f`),this.boolean(P(this,U,`f`)),this.describe(P(this,U,`f`),t||P(this,Y,`f`).deferY18nLookup(`Show help`)),this)}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(M(`[string|boolean] [string]`,[e,t],arguments.length),e===!1&&t===void 0)return this;let n=typeof e==`string`?e:P(this,un,`f`);return this.boolean(n),this.describe(n,t||P(this,Y,`f`).deferY18nLookup(`Show hidden options`)),P(this,G,`f`).showHiddenOpt=n,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return M(`<object|string|array> [string|array]`,[e,t],arguments.length),this[Bn](this.alias.bind(this),`alias`,e,t),this}array(e){return M(`<array|string>`,[e],arguments.length),this[Q](`array`,e),this[sr](e),this}boolean(e){return M(`<array|string>`,[e],arguments.length),this[Q](`boolean`,e),this[sr](e),this}check(e,t){return M(`<function> [boolean]`,[e,t],arguments.length),this.middleware((t,n)=>At(()=>e(t,n.getOptions()),n=>(n?(typeof n==`string`||n instanceof Error)&&P(this,Y,`f`).fail(n.toString(),n):P(this,Y,`f`).fail(P(this,J,`f`).y18n.__(`Argument check failed: %s`,e.toString())),t),e=>(P(this,Y,`f`).fail(e.message?e.message:e.toString(),e),t)),!1,t),this}choices(e,t){return M(`<object|string|array> [string|array]`,[e,t],arguments.length),this[Bn](this.choices.bind(this),`choices`,e,t),this}coerce(e,t){if(M(`<object|string|array> [function]`,[e,t],arguments.length),Array.isArray(e)){if(!t)throw new j(`coerce callback must be provided`);for(let n of e)this.coerce(n,t);return this}else if(typeof e==`object`){for(let t of Object.keys(e))this.coerce(t,e[t]);return this}if(!t)throw new j(`coerce callback must be provided`);let n=e;return P(this,G,`f`).key[n]=!0,P(this,B,`f`).addCoerceMiddleware((e,r)=>{let i=[n,...r.getAliases()[n]??[]].filter(t=>Object.prototype.hasOwnProperty.call(e,t));return i.length===0?e:At(()=>t(e[i[0]]),t=>(i.forEach(n=>{e[n]=t}),e),e=>{throw new j(e.message)})},n),this}conflicts(e,t){return M(`<string|object> [string|array]`,[e,t],arguments.length),P(this,Z,`f`).conflicts(e,t),this}config(e=`config`,t,n){return M(`[object|string] [string|function] [function]`,[e,t,n],arguments.length),typeof e==`object`&&!Array.isArray(e)?(e=rn(e,P(this,cn,`f`),this[Nn]()[`deep-merge-config`]||!1,P(this,J,`f`)),P(this,G,`f`).configObjects=(P(this,G,`f`).configObjects||[]).concat(e),this):(typeof t==`function`&&(n=t,t=void 0),this.describe(e,t||P(this,Y,`f`).deferY18nLookup(`Path to JSON config file`)),(Array.isArray(e)?e:[e]).forEach(e=>{P(this,G,`f`).config[e]=n||!0}),this)}completion(e,t,n){return M(`[string] [string|boolean|function] [function]`,[e,t,n],arguments.length),typeof t==`function`&&(n=t,t=void 0),N(this,L,e||P(this,L,`f`)||`completion`,`f`),!t&&t!==!1&&(t=`generate completion script`),this.command(P(this,L,`f`),t),n&&P(this,I,`f`).registerFunction(n),this}command(e,t,n,r,i,a){return M(`<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]`,[e,t,n,r,i,a],arguments.length),P(this,F,`f`).addHandler(e,t,n,r,i,a),this}commands(e,t,n,r,i,a){return this.command(e,t,n,r,i,a)}commandDir(e,t){M(`<string> [object]`,[e,t],arguments.length);let n=P(this,gn,`f`)||P(this,J,`f`).require;return P(this,F,`f`).addDirectory(e,n,P(this,J,`f`).getCallerFile(),t),this}count(e){return M(`<array|string>`,[e],arguments.length),this[Q](`count`,e),this[sr](e),this}default(e,t,n){return M(`<object|string|array> [*] [string]`,[e,t,n],arguments.length),n&&(xt(e,P(this,J,`f`)),P(this,G,`f`).defaultDescription[e]=n),typeof t==`function`&&(xt(e,P(this,J,`f`)),P(this,G,`f`).defaultDescription[e]||(P(this,G,`f`).defaultDescription[e]=P(this,Y,`f`).functionDescription(t)),t=t.call()),this[zn](this.default.bind(this),`default`,e,t),this}defaults(e,t,n){return this.default(e,t,n)}demandCommand(e=1,t,n,r){return M(`[number] [number|string] [string|null|undefined] [string|null|undefined]`,[e,t,n,r],arguments.length),typeof t!=`number`&&(n=t,t=1/0),this.global(`_`,!1),P(this,G,`f`).demandedCommands._={min:e,max:t,minMsg:n,maxMsg:r},this}demand(e,t,n){return Array.isArray(t)?(t.forEach(e=>{k(n,!0,P(this,J,`f`)),this.demandOption(e,n)}),t=1/0):typeof t!=`number`&&(n=t,t=1/0),typeof e==`number`?(k(n,!0,P(this,J,`f`)),this.demandCommand(e,t,n,n)):Array.isArray(e)?e.forEach(e=>{k(n,!0,P(this,J,`f`)),this.demandOption(e,n)}):typeof n==`string`?this.demandOption(e,n):(n===!0||n===void 0)&&this.demandOption(e),this}demandOption(e,t){return M(`<object|string|array> [string]`,[e,t],arguments.length),this[zn](this.demandOption.bind(this),`demandedOptions`,e,t),this}deprecateOption(e,t){return M(`<string> [string|boolean]`,[e,t],arguments.length),P(this,G,`f`).deprecatedOptions[e]=t,this}describe(e,t){return M(`<object|string|array> [string]`,[e,t],arguments.length),this[Un](e,!0),P(this,Y,`f`).describe(e,t),this}detectLocale(e){return M(`<boolean>`,[e],arguments.length),N(this,dn,e,`f`),this}env(e){return M(`[string|boolean]`,[e],arguments.length),e===!1?delete P(this,G,`f`).envPrefix:P(this,G,`f`).envPrefix=e||``,this}epilogue(e){return M(`<string>`,[e],arguments.length),P(this,Y,`f`).epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return M(`<string|array> [string]`,[e,t],arguments.length),Array.isArray(e)?e.forEach(e=>this.example(...e)):P(this,Y,`f`).example(e,t),this}exit(e,t){N(this,H,!0,`f`),N(this,R,t,`f`),P(this,z,`f`)&&P(this,J,`f`).process.exit(e)}exitProcess(e=!0){return M(`[boolean]`,[e],arguments.length),N(this,z,e,`f`),this}fail(e){if(M(`<function|boolean>`,[e],arguments.length),typeof e==`boolean`&&e!==!1)throw new j(`Invalid first argument. Expected function or boolean 'false'`);return P(this,Y,`f`).failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return M(`<array> [function]`,[e,t],arguments.length),t?P(this,I,`f`).getCompletion(e,t):new Promise((t,n)=>{P(this,I,`f`).getCompletion(e,(e,r)=>{e?n(e):t(r)})})}getDemandedOptions(){return M([],0),P(this,G,`f`).demandedOptions}getDemandedCommands(){return M([],0),P(this,G,`f`).demandedCommands}getDeprecatedOptions(){return M([],0),P(this,G,`f`).deprecatedOptions}getDetectLocale(){return P(this,dn,`f`)}getExitProcess(){return P(this,z,`f`)}getGroups(){return Object.assign({},P(this,V,`f`),P(this,bn,`f`))}getHelp(){if(N(this,H,!0,`f`),!P(this,Y,`f`).hasCachedHelpMessage()){if(!this.parsed){let e=this[ir](P(this,q,`f`),void 0,void 0,0,!0);if(A(e))return e.then(()=>P(this,Y,`f`).help())}let e=P(this,F,`f`).runDefaultBuilderOn(this);if(A(e))return e.then(()=>P(this,Y,`f`).help())}return Promise.resolve(P(this,Y,`f`).help())}getOptions(){return P(this,G,`f`)}getStrict(){return P(this,Sn,`f`)}getStrictCommands(){return P(this,Cn,`f`)}getStrictOptions(){return P(this,wn,`f`)}global(e,t){return M(`<string|array> [boolean]`,[e,t],arguments.length),e=[].concat(e),t===!1?e.forEach(e=>{P(this,G,`f`).local.includes(e)||P(this,G,`f`).local.push(e)}):P(this,G,`f`).local=P(this,G,`f`).local.filter(t=>e.indexOf(t)===-1),this}group(e,t){M(`<string|array> <string>`,[e,t],arguments.length);let n=P(this,bn,`f`)[t]||P(this,V,`f`)[t];P(this,bn,`f`)[t]&&delete P(this,bn,`f`)[t];let r={};return P(this,V,`f`)[t]=(n||[]).concat(e).filter(e=>r[e]?!1:r[e]=!0),this}hide(e){return M(`<string>`,[e],arguments.length),P(this,G,`f`).hiddenOptions.push(e),this}implies(e,t){return M(`<string|object> [number|string|array]`,[e,t],arguments.length),P(this,Z,`f`).implies(e,t),this}locale(e){return M(`[string]`,[e],arguments.length),e===void 0?(this[Fn](),P(this,J,`f`).y18n.getLocale()):(N(this,dn,!1,`f`),P(this,J,`f`).y18n.setLocale(e),this)}middleware(e,t,n){return P(this,B,`f`).addMiddleware(e,!!t,n)}nargs(e,t){return M(`<string|object|array> [number]`,[e,t],arguments.length),this[zn](this.nargs.bind(this),`narg`,e,t),this}normalize(e){return M(`<array|string>`,[e],arguments.length),this[Q](`normalize`,e),this}number(e){return M(`<array|string>`,[e],arguments.length),this[Q](`number`,e),this[sr](e),this}option(e,t){if(M(`<string|object> [object]`,[e,t],arguments.length),typeof e==`object`)Object.keys(e).forEach(t=>{this.options(t,e[t])});else{typeof t!=`object`&&(t={}),this[sr](e),P(this,X,`f`)&&(e===`version`||t?.alias===`version`)&&this[An]([`"version" is a reserved word.`,`Please do one of the following:`,'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)",`- Use a different option key`,`https://yargs.js.org/docs/#api-reference-version`].join(`
|
|
96
|
-
`),void 0,`versionWarning`),P(this,G,`f`).key[e]=!0,t.alias&&this.alias(e,t.alias);let n=t.deprecate||t.deprecated;n&&this.deprecateOption(e,n);let r=t.demand||t.required||t.require;r&&this.demand(e,r),t.demandOption&&this.demandOption(e,typeof t.demandOption==`string`?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),`default`in t&&this.default(e,t.default),t.implies!==void 0&&this.implies(e,t.implies),t.nargs!==void 0&&this.nargs(e,t.nargs),t.config&&this.config(e,t.configParser),t.normalize&&this.normalize(e),t.choices&&this.choices(e,t.choices),t.coerce&&this.coerce(e,t.coerce),t.group&&this.group(e,t.group),(t.boolean||t.type===`boolean`)&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||t.type===`array`)&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||t.type===`number`)&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||t.type===`string`)&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||t.type===`count`)&&this.count(e),typeof t.global==`boolean`&&this.global(e,t.global),t.defaultDescription&&(P(this,G,`f`).defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let i=t.describe||t.description||t.desc,a=P(this,Y,`f`).getDescriptions();(!Object.prototype.hasOwnProperty.call(a,e)||typeof i==`string`)&&this.describe(e,i),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,n){M(`[string|array] [function|boolean|object] [function]`,[e,t,n],arguments.length),this[jn](),e===void 0&&(e=P(this,q,`f`)),typeof t==`object`&&(N(this,vn,t,`f`),t=n),typeof t==`function`&&(N(this,K,t,`f`),t=!1),t||N(this,q,e,`f`),P(this,K,`f`)&&N(this,z,!1,`f`);let r=this[ir](e,!!t),i=this.parsed;return P(this,I,`f`).setParsed(this.parsed),A(r)?r.then(e=>(P(this,K,`f`)&&P(this,K,`f`).call(this,P(this,R,`f`),e,P(this,W,`f`)),e)).catch(e=>{throw P(this,K,`f`)&&P(this,K,`f`)(e,this.parsed.argv,P(this,W,`f`)),e}).finally(()=>{this[Wn](),this.parsed=i}):(P(this,K,`f`)&&P(this,K,`f`).call(this,P(this,R,`f`),r,P(this,W,`f`)),this[Wn](),this.parsed=i,r)}parseAsync(e,t,n){let r=this.parse(e,t,n);return A(r)?r:Promise.resolve(r)}parseSync(e,t,n){let r=this.parse(e,t,n);if(A(r))throw new j(`.parseSync() must not be used with asynchronous builders, handlers, or middleware`);return r}parserConfiguration(e){return M(`<object>`,[e],arguments.length),N(this,_n,e,`f`),this}pkgConf(e,t){M(`<string> [string]`,[e,t],arguments.length);let n=null,r=this[Rn](t||P(this,cn,`f`));return r[e]&&typeof r[e]==`object`&&(n=rn(r[e],t||P(this,cn,`f`),this[Nn]()[`deep-merge-config`]||!1,P(this,J,`f`)),P(this,G,`f`).configObjects=(P(this,G,`f`).configObjects||[]).concat(n)),this}positional(e,t){M(`<string> <object>`,[e,t],arguments.length);let n=[`default`,`defaultDescription`,`implies`,`normalize`,`choices`,`conflicts`,`coerce`,`type`,`describe`,`desc`,`description`,`alias`];t=Bt(t,(e,t)=>e===`type`&&![`string`,`number`,`boolean`].includes(t)?!1:n.includes(e));let r=P(this,ln,`f`).fullCommands[P(this,ln,`f`).fullCommands.length-1],i=r?P(this,F,`f`).cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return St(i).forEach(n=>{let r=i[n];Array.isArray(r)?r.indexOf(e)!==-1&&(t[n]=!0):r[e]&&!(n in t)&&(t[n]=r[e])}),this.group(e,P(this,Y,`f`).getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return M(`[boolean]`,[e],arguments.length),N(this,xn,e,`f`),this}required(e,t,n){return this.demand(e,t,n)}require(e,t,n){return this.demand(e,t,n)}requiresArg(e){return M(`<array|string|object> [number]`,[e],arguments.length),typeof e==`string`&&P(this,G,`f`).narg[e]||this[zn](this.requiresArg.bind(this),`narg`,e,NaN),this}showCompletionScript(e,t){return M(`[string] [string]`,[e,t],arguments.length),e||=this.$0,P(this,hn,`f`).log(P(this,I,`f`).generateCompletionScript(e,t||P(this,L,`f`)||`completion`)),this}showHelp(e){if(M(`[string|function]`,[e],arguments.length),N(this,H,!0,`f`),!P(this,Y,`f`).hasCachedHelpMessage()){if(!this.parsed){let t=this[ir](P(this,q,`f`),void 0,void 0,0,!0);if(A(t))return t.then(()=>{P(this,Y,`f`).showHelp(e)}),this}let t=P(this,F,`f`).runDefaultBuilderOn(this);if(A(t))return t.then(()=>{P(this,Y,`f`).showHelp(e)}),this}return P(this,Y,`f`).showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return M(`[boolean|string] [string]`,[e,t],arguments.length),P(this,Y,`f`).showHelpOnFail(e,t),this}showVersion(e){return M(`[string|function]`,[e],arguments.length),P(this,Y,`f`).showVersion(e),this}skipValidation(e){return M(`<array|string>`,[e],arguments.length),this[Q](`skipValidation`,e),this}strict(e){return M(`[boolean]`,[e],arguments.length),N(this,Sn,e!==!1,`f`),this}strictCommands(e){return M(`[boolean]`,[e],arguments.length),N(this,Cn,e!==!1,`f`),this}strictOptions(e){return M(`[boolean]`,[e],arguments.length),N(this,wn,e!==!1,`f`),this}string(e){return M(`<array|string>`,[e],arguments.length),this[Q](`string`,e),this[sr](e),this}terminalWidth(){return M([],0),P(this,J,`f`).process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return M(`<object>`,[e],arguments.length),N(this,dn,!1,`f`),P(this,J,`f`).y18n.updateLocale(e),this}usage(e,t,n,r){if(M(`<string|null|undefined> [string|boolean] [function|object] [function]`,[e,t,n,r],arguments.length),t!==void 0){if(k(e,null,P(this,J,`f`)),(e||``).match(/^\$0( |$)/))return this.command(e,t,n,r);throw new j(`.usage() description must start with $0 if being used as alias for .command()`)}else return P(this,Y,`f`).usage(e),this}usageConfiguration(e){return M(`<object>`,[e],arguments.length),N(this,Tn,e,`f`),this}version(e,t,n){let r=`version`;if(M(`[boolean|string] [string] [string]`,[e,t,n],arguments.length),P(this,X,`f`)&&(this[kn](P(this,X,`f`)),P(this,Y,`f`).version(void 0),N(this,X,null,`f`)),arguments.length===0)n=this[In](),e=r;else if(arguments.length===1){if(e===!1)return this;n=e,e=r}else arguments.length===2&&(n=t,t=void 0);return N(this,X,typeof e==`string`?e:r,`f`),t||=P(this,Y,`f`).deferY18nLookup(`Show version number`),P(this,Y,`f`).version(n||void 0),this.boolean(P(this,X,`f`)),this.describe(P(this,X,`f`),t),this}wrap(e){return M(`<number|null|undefined>`,[e],arguments.length),P(this,Y,`f`).wrap(e),this}[(F=new WeakMap,cn=new WeakMap,ln=new WeakMap,I=new WeakMap,L=new WeakMap,un=new WeakMap,R=new WeakMap,dn=new WeakMap,fn=new WeakMap,z=new WeakMap,pn=new WeakMap,B=new WeakMap,V=new WeakMap,H=new WeakMap,U=new WeakMap,mn=new WeakMap,hn=new WeakMap,W=new WeakMap,G=new WeakMap,gn=new WeakMap,_n=new WeakMap,K=new WeakMap,vn=new WeakMap,yn=new WeakMap,bn=new WeakMap,q=new WeakMap,xn=new WeakMap,J=new WeakMap,Sn=new WeakMap,Cn=new WeakMap,wn=new WeakMap,Y=new WeakMap,Tn=new WeakMap,X=new WeakMap,Z=new WeakMap,Dn)](e){if(!e._||!e[`--`])return e;e._.push.apply(e._,e[`--`]);try{delete e[`--`]}catch{}return e}[On](){return{log:(...e)=>{this[$n]()||console.log(...e),N(this,H,!0,`f`),P(this,W,`f`).length&&N(this,W,P(this,W,`f`)+`
|
|
97
|
-
`,`f`),N(this,W,P(this,W,`f`)+e.join(` `),`f`)},error:(...e)=>{this[$n]()||console.error(...e),N(this,H,!0,`f`),P(this,W,`f`).length&&N(this,W,P(this,W,`f`)+`
|
|
98
|
-
`,`f`),N(this,W,P(this,W,`f`)+e.join(` `),`f`)}}}[kn](e){St(P(this,G,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=P(this,G,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete P(this,Y,`f`).getDescriptions()[e]}[An](e,t,n){P(this,fn,`f`)[n]||(P(this,J,`f`).process.emitWarning(e,t),P(this,fn,`f`)[n]=!0)}[jn](){P(this,pn,`f`).push({options:P(this,G,`f`),configObjects:P(this,G,`f`).configObjects.slice(0),exitProcess:P(this,z,`f`),groups:P(this,V,`f`),strict:P(this,Sn,`f`),strictCommands:P(this,Cn,`f`),strictOptions:P(this,wn,`f`),completionCommand:P(this,L,`f`),output:P(this,W,`f`),exitError:P(this,R,`f`),hasOutput:P(this,H,`f`),parsed:this.parsed,parseFn:P(this,K,`f`),parseContext:P(this,vn,`f`)}),P(this,Y,`f`).freeze(),P(this,Z,`f`).freeze(),P(this,F,`f`).freeze(),P(this,B,`f`).freeze()}[Mn](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(P(this,J,`f`).process.argv()[0])?P(this,J,`f`).process.argv().slice(1,2):P(this,J,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[nr](P(this,cn,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),P(this,J,`f`).getEnv(`_`)&&P(this,J,`f`).getProcessArgvBin()===P(this,J,`f`).getEnv(`_`)&&(e=P(this,J,`f`).getEnv(`_`).replace(`${P(this,J,`f`).path.dirname(P(this,J,`f`).process.execPath())}/`,``)),e}[Nn](){return P(this,_n,`f`)}[Pn](){return P(this,Tn,`f`)}[Fn](){if(!P(this,dn,`f`))return;let e=P(this,J,`f`).getEnv(`LC_ALL`)||P(this,J,`f`).getEnv(`LC_MESSAGES`)||P(this,J,`f`).getEnv(`LANG`)||P(this,J,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[In](){return this[Rn]().version||`unknown`}[Ln](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)P(this,J,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[Rn](e){let t=e||`*`;if(P(this,yn,`f`)[t])return P(this,yn,`f`)[t];let n={};try{let t=e||P(this,J,`f`).mainFilename;P(this,J,`f`).path.extname(t)&&(t=P(this,J,`f`).path.dirname(t));let r=P(this,J,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});k(r,void 0,P(this,J,`f`)),n=JSON.parse(P(this,J,`f`).readFileSync(r,`utf8`))}catch{}return P(this,yn,`f`)[t]=n||{},P(this,yn,`f`)[t]}[Q](e,t){t=[].concat(t),t.forEach(t=>{t=this[Hn](t),P(this,G,`f`)[e].push(t)})}[zn](e,t,n,r){this[Vn](e,t,n,r,(e,t,n)=>{P(this,G,`f`)[e][t]=n})}[Bn](e,t,n,r){this[Vn](e,t,n,r,(e,t,n)=>{P(this,G,`f`)[e][t]=(P(this,G,`f`)[e][t]||[]).concat(n)})}[Vn](e,t,n,r,i){if(Array.isArray(n))n.forEach(t=>{e(t,r)});else if((e=>typeof e==`object`)(n))for(let t of St(n))e(t,n[t]);else i(t,this[Hn](n),r)}[Hn](e){return e===`__proto__`?`___proto___`:e}[Un](e,t){return this[zn](this[Un].bind(this),`key`,e,t),this}[Wn](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=P(this,pn,`f`).pop();k(f,void 0,P(this,J,`f`));let p;e=this,t=this,n=this,r=this,i=this,a=this,o=this,s=this,c=this,l=this,u=this,d=this,{options:{set value(t){N(e,G,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){N(t,z,e,`f`)}}.value,groups:{set value(e){N(n,V,e,`f`)}}.value,output:{set value(e){N(r,W,e,`f`)}}.value,exitError:{set value(e){N(i,R,e,`f`)}}.value,hasOutput:{set value(e){N(a,H,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){N(o,Sn,e,`f`)}}.value,strictCommands:{set value(e){N(s,Cn,e,`f`)}}.value,strictOptions:{set value(e){N(c,wn,e,`f`)}}.value,completionCommand:{set value(e){N(l,L,e,`f`)}}.value,parseFn:{set value(e){N(u,K,e,`f`)}}.value,parseContext:{set value(e){N(d,vn,e,`f`)}}.value}=f,P(this,G,`f`).configObjects=p,P(this,Y,`f`).unfreeze(),P(this,Z,`f`).unfreeze(),P(this,F,`f`).unfreeze(),P(this,B,`f`).unfreeze()}[Gn](e,t){return At(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[Kn].bind(this),getContext:this[qn].bind(this),getHasOutput:this[Jn].bind(this),getLoggerInstance:this[Yn].bind(this),getParseContext:this[Xn].bind(this),getParserConfiguration:this[Nn].bind(this),getUsageConfiguration:this[Pn].bind(this),getUsageInstance:this[Zn].bind(this),getValidationInstance:this[Qn].bind(this),hasParseCallback:this[$n].bind(this),isGlobalContext:this[er].bind(this),postProcess:this[tr].bind(this),reset:this[rr].bind(this),runValidation:this[ar].bind(this),runYargsParserAndExecuteCommands:this[ir].bind(this),setHasOutput:this[or].bind(this)}}[Kn](){return P(this,F,`f`)}[qn](){return P(this,ln,`f`)}[Jn](){return P(this,H,`f`)}[Yn](){return P(this,hn,`f`)}[Xn](){return P(this,vn,`f`)||{}}[Zn](){return P(this,Y,`f`)}[Qn](){return P(this,Z,`f`)}[$n](){return!!P(this,K,`f`)}[er](){return P(this,mn,`f`)}[tr](e,t,n,r){return n||A(e)?e:(t||(e=this[Dn](e)),(this[Nn]()[`parse-positional-numbers`]||this[Nn]()[`parse-positional-numbers`]===void 0)&&(e=this[Ln](e)),r&&(e=kt(e,this,P(this,B,`f`).getMiddleware(),!1)),e)}[rr](e={}){N(this,G,P(this,G,`f`)||{},`f`);let t={};t.local=P(this,G,`f`).local||[],t.configObjects=P(this,G,`f`).configObjects||[];let n={};return t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(P(this,bn,`f`),Object.keys(P(this,V,`f`)).reduce((e,t)=>{let r=P(this,V,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),N(this,V,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(e=>{t[e]=(P(this,G,`f`)[e]||[]).filter(e=>!n[e])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(e=>{t[e]=Bt(P(this,G,`f`)[e],e=>!n[e])}),t.envPrefix=P(this,G,`f`).envPrefix,N(this,G,t,`f`),N(this,Y,P(this,Y,`f`)?P(this,Y,`f`).reset(n):Ut(this,P(this,J,`f`)),`f`),N(this,Z,P(this,Z,`f`)?P(this,Z,`f`).reset(n):en(this,P(this,Y,`f`),P(this,J,`f`)),`f`),N(this,F,P(this,F,`f`)?P(this,F,`f`).reset():Pt(P(this,Y,`f`),P(this,Z,`f`),P(this,B,`f`),P(this,J,`f`)),`f`),P(this,I,`f`)||N(this,I,Yt(this,P(this,Y,`f`),P(this,F,`f`),P(this,J,`f`)),`f`),P(this,B,`f`).reset(),N(this,L,null,`f`),N(this,W,``,`f`),N(this,R,null,`f`),N(this,H,!1,`f`),this.parsed=!1,this}[nr](e,t){return P(this,J,`f`).path.relative(e,t)}[ir](e,t,n,r=0,i=!1){let a=!!n||i;e||=P(this,q,`f`),P(this,G,`f`).__=P(this,J,`f`).y18n.__,P(this,G,`f`).configuration=this[Nn]();let o=!!P(this,G,`f`).configuration[`populate--`],s=Object.assign({},P(this,G,`f`).configuration,{"populate--":!0}),c=P(this,J,`f`).Parser.detailed(e,Object.assign({},P(this,G,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,P(this,vn,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===P(this,U,`f`)&&l[e]?f=!0:e===P(this,X,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&P(this,Y,`f`).clearCachedHelpMessage();try{if(this[Fn](),t)return this[tr](l,o,!!n,!1);P(this,U,`f`)&&[P(this,U,`f`)].concat(d[P(this,U,`f`)]||[]).filter(e=>e.length>1).includes(``+l._[l._.length-1])&&(l._.pop(),f=!0),N(this,mn,!1,`f`);let s=P(this,F,`f`).getCommands(),m=P(this,I,`f`)?.completionKey?[P(this,I,`f`)?.completionKey,...this.getAliases()[P(this,I,`f`)?.completionKey]??[]].some(e=>Object.prototype.hasOwnProperty.call(l,e)):!1,h=f||m||i;if(l._.length){if(s.length){let e;for(let t=r||0,a;l._[t]!==void 0;t++)if(a=String(l._[t]),s.includes(a)&&a!==P(this,L,`f`)){let e=P(this,F,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[tr](e,o,!!n,!1)}else if(!e&&a!==P(this,L,`f`)){e=a;break}!P(this,F,`f`).hasDefaultCommand()&&P(this,xn,`f`)&&e&&!h&&P(this,Z,`f`).recommendCommands(e,s)}P(this,L,`f`)&&l._.includes(P(this,L,`f`))&&!m&&(P(this,z,`f`)&&Vt(!0),this.showCompletionScript(),this.exit(0))}if(P(this,F,`f`).hasDefaultCommand()&&!h){let e=P(this,F,`f`).runCommand(null,this,c,0,i,f||p||i);return this[tr](e,o,!!n,!1)}if(m){P(this,z,`f`)&&Vt(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${P(this,I,`f`).completionKey}`)+1);return P(this,I,`f`).getCompletion(t,(e,t)=>{if(e)throw new j(e.message);(t||[]).forEach(e=>{P(this,hn,`f`).log(e)}),this.exit(0)}),this[tr](l,!o,!!n,!1)}if(P(this,H,`f`)||(f?(P(this,z,`f`)&&Vt(!0),a=!0,this.showHelp(e=>{P(this,hn,`f`).log(e),this.exit(0)})):p&&(P(this,z,`f`)&&Vt(!0),a=!0,P(this,Y,`f`).showVersion(`log`),this.exit(0))),!a&&P(this,G,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>P(this,G,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new j(c.error.message);if(!m){let e=this[ar](d,{},c.error);n||(u=kt(l,this,P(this,B,`f`).getMiddleware(),!0)),u=this[Gn](e,u??l),A(u)&&!n&&(u=u.then(()=>kt(l,this,P(this,B,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof j)P(this,Y,`f`).fail(e.message,e);else throw e}return this[tr](u??l,o,!!n,!0)}[ar](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new j(n.message);P(this,Z,`f`).nonOptionCount(a),P(this,Z,`f`).requiredArguments(a,i);let o=!1;P(this,Cn,`f`)&&(o=P(this,Z,`f`).unknownCommands(a)),P(this,Sn,`f`)&&!o?P(this,Z,`f`).unknownArguments(a,e,t,!!r):P(this,wn,`f`)&&P(this,Z,`f`).unknownArguments(a,e,{},!1,!1),P(this,Z,`f`).limitedChoices(a),P(this,Z,`f`).implications(a),P(this,Z,`f`).conflicting(a)}}[or](){N(this,H,!0,`f`)}[sr](e){if(typeof e==`string`)P(this,G,`f`).key[e]=!0;else for(let t of e)P(this,G,`f`).key[t]=!0}};function lr(e){return!!e&&typeof e.getInternalMethods==`function`}const ur=En(bt);function $(e,t,n){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{await(await n()).default.handler(e)}}}const dr=[{command:$(`abuse-reports`,`Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites`,()=>import(`./abuse-reports-CzDAjFpo.mjs`)),hideCommand:!0},{command:$(`access`,`access`,()=>import(`./access-CxyW_sIW.mjs`)),hideCommand:!0},{command:$(`account`,`account`,()=>import(`./account-Dd4-tDYJ.mjs`)),hideCommand:!1},{command:$(`account-tags`,`account-tags`,()=>import(`./account-tags-65fAlHrf.mjs`)),hideCommand:!0},{command:$(`accounts`,`Account settings, members, roles, subscriptions, and API tokens for your Cloudflare account`,()=>import(`./accounts-Bp5KGc6r.mjs`)),hideCommand:!1},{command:$(`acm`,`acm`,()=>import(`./acm-CHacxa3s.mjs`)),hideCommand:!0},{command:$(`addressing`,`addressing`,()=>import(`./addressing-BnqNmmYN.mjs`)),hideCommand:!0},{command:$(`agent-memory`,`agent-memory`,()=>import(`./agent-memory-D--BQS0W.mjs`)),hideCommand:!1},{command:$(`ai`,`ai`,()=>import(`./ai-BnVlQDiI.mjs`)),hideCommand:!1},{command:$(`ai-audit`,`ai-audit`,()=>import(`./ai-audit-CfpDKXkD.mjs`)),hideCommand:!1},{command:$(`ai-gateway`,`Proxy, cache, rate-limit, and observe requests to AI providers — OpenAI, Anthropic, Workers AI, and more`,()=>import(`./ai-gateway-oG4j_oYN.mjs`)),hideCommand:!1},{command:$(`ai-search`,`Managed search-as-a-service: crawl, index, and query content with AI-powered relevance and chat completions`,()=>import(`./ai-search-B2l3B_jn.mjs`)),hideCommand:!1},{command:$(`ai-security`,`Detect prompt injection, PII, and unsafe topics in traffic to your AI applications`,()=>import(`./ai-security-byjIIrfl.mjs`)),hideCommand:!0},{command:$(`alerting`,`alerting`,()=>import(`./alerting-qa8SkXlD.mjs`)),hideCommand:!0},{command:$(`alerts`,`alerts`,()=>import(`./alerts-B85uj2Vx.mjs`)),hideCommand:!0},{command:$(`analytics`,`Zone-level traffic analytics — dashboard summaries, per-colo breakdowns, and Argo latency metrics`,()=>import(`./analytics-DeIKjC9n.mjs`)),hideCommand:!1},{command:$(`analytics_engine`,`analytics_engine`,()=>import(`./analytics_engine-BnECMIWJ.mjs`)),hideCommand:!0},{command:$(`api-security`,`api-security`,()=>import(`./api-security-MfHbfZyf.mjs`)),hideCommand:!0},{command:$(`argo`,`argo`,()=>import(`./argo-DFerMyXF.mjs`)),hideCommand:!0},{command:$(`artifacts`,`artifacts`,()=>import(`./artifacts-CtyEYYDa.mjs`)),hideCommand:!0},{command:$(`audit-logs`,`audit-logs`,()=>import(`./audit-logs-retFtvow.mjs`)),hideCommand:!0},{command:$(`autorag`,`autorag`,()=>import(`./autorag-Do9l_LyY.mjs`)),hideCommand:!0},{command:$(`billing`,`Account billing profiles and usage data for Cloudflare subscriptions and add-on services`,()=>import(`./billing-CxQVqpGZ.mjs`)),hideCommand:!1},{command:$(`bot-management`,`bot-management`,()=>import(`./bot-management-Rli7v7tg.mjs`)),hideCommand:!0},{command:$(`botnet-feed`,`botnet-feed`,()=>import(`./botnet-feed-Cw6XSEf8.mjs`)),hideCommand:!0},{command:$(`brand-protection`,`brand-protection`,()=>import(`./brand-protection-CTvnHGfV.mjs`)),hideCommand:!0},{command:$(`brands`,`brands`,()=>import(`./brands-DateHCdd.mjs`)),hideCommand:!0},{command:$(`browser-extension`,`browser-extension`,()=>import(`./browser-extension-q79xHrVW.mjs`)),hideCommand:!1},{command:$(`browser-run`,`browser-run`,()=>import(`./browser-run-FwtwnBzA.mjs`)),hideCommand:!0},{command:$(`cache`,`cache`,()=>import(`./cache-Cl7vKJwH.mjs`)),hideCommand:!1},{command:$(`calls`,`Real-time audio/video communication infrastructure — SFU apps for WebRTC and TURN relay keys`,()=>import(`./calls-DtK_ANxq.mjs`)),hideCommand:!0},{command:$(`certificate-authorities`,`certificate-authorities`,()=>import(`./certificate-authorities-DZP1RzAs.mjs`)),hideCommand:!0},{command:$(`clear`,`clear`,()=>import(`./clear-CB2kgcEB.mjs`)),hideCommand:!0},{command:$(`client-certificates`,`client-certificates`,()=>import(`./client-certificates-BtPU9GsQ.mjs`)),hideCommand:!0},{command:$(`client-side-security`,`Client-Side Security — monitor JavaScript, connections, and cookies on your pages for supply-chain attacks`,()=>import(`./client-side-security-DAn-3jwp.mjs`)),hideCommand:!0},{command:$(`cloud-connector`,`Route traffic from Cloudflare directly to cloud provider services (AWS, Azure, GCP) without origin servers`,()=>import(`./cloud-connector-BpVcvhjZ.mjs`)),hideCommand:!1},{command:$(`cloudforce-one`,`Detection rule management APIs`,()=>import(`./cloudforce-one-2PecncfX.mjs`)),hideCommand:!1},{command:$(`connector-interrupts`,`connector-interrupts`,()=>import(`./connector-interrupts-ollUcksZ.mjs`)),hideCommand:!0},{command:$(`connector-telemetry-events`,`connector-telemetry-events`,()=>import(`./connector-telemetry-events-D5_3X7XW.mjs`)),hideCommand:!0},{command:$(`connector-telemetry-snapshots`,`connector-telemetry-snapshots`,()=>import(`./connector-telemetry-snapshots-CJ9gLRFR.mjs`)),hideCommand:!0},{command:$(`connectors`,`connectors`,()=>import(`./connectors-Bo6ZT8PT.mjs`)),hideCommand:!0},{command:$(`containers`,`Deploy and manage Containers applications on Cloudflare's global network`,()=>import(`./containers-Bog7j0Hw.mjs`)),hideCommand:!1},{command:$(`content-scan`,`Malicious uploads detection, scan uploaded content in HTTP requests for malware and malicious payloads`,()=>import(`./content-scan-D03UfK2X.mjs`)),hideCommand:!0},{command:$(`csamScanner`,`csamScanner`,()=>import(`./csamScanner-DgS-7ADh.mjs`)),hideCommand:!0},{command:$(`ct-alerting`,`ct-alerting`,()=>import(`./ct-alerting-8AKtNnUg.mjs`)),hideCommand:!0},{command:$(`custom-certificates`,`custom-certificates`,()=>import(`./custom-certificates-4y35UC1X.mjs`)),hideCommand:!0},{command:$(`custom-csrs`,`custom-csrs`,()=>import(`./custom-csrs-DwBrLh-H.mjs`)),hideCommand:!0},{command:$(`custom-hostnames`,`custom-hostnames`,()=>import(`./custom-hostnames-CDIAnsRa.mjs`)),hideCommand:!0},{command:$(`custom-nameservers`,`custom-nameservers`,()=>import(`./custom-nameservers-stk7ymnP.mjs`)),hideCommand:!0},{command:$(`custom-pages`,`Custom error and challenge pages (1000s, WAF blocks, captchas) for zones and accounts`,()=>import(`./custom-pages-vfDxrXbt.mjs`)),hideCommand:!0},{command:$(`d1`,`D1 is Cloudflare's managed, serverless database with SQLite's SQL semantics, built-in disaster recovery, and Worker and HTTP API access.`,()=>import(`./d1-Cllm-iTT.mjs`)),hideCommand:!0},{command:$(`data-security`,`data-security`,()=>import(`./data-security-rnoSCEdL.mjs`)),hideCommand:!1},{command:$(`dcv-delegation`,`dcv-delegation`,()=>import(`./dcv-delegation-DCRCOL6l.mjs`)),hideCommand:!0},{command:$(`diagnostics`,`Network diagnostic tools — traceroutes from Cloudflare's edge and endpoint health checks`,()=>import(`./diagnostics-D5Yo2xqx.mjs`)),hideCommand:!0},{command:$(`directory`,`directory`,()=>import(`./directory-CCndFkbQ.mjs`)),hideCommand:!0},{command:$(`dispatch-namespaces`,`dispatch-namespaces`,()=>import(`./dispatch-namespaces-C48JQ9EA.mjs`)),hideCommand:!0},{command:$(`dls`,`dls`,()=>import(`./dls-BBq99pjI.mjs`)),hideCommand:!0},{command:$(`dns`,`dns`,()=>import(`./dns-DdQYtenF.mjs`)),hideCommand:!1},{command:$(`dns-firewall`,`dns-firewall`,()=>import(`./dns-firewall-DdwVtm12.mjs`)),hideCommand:!0},{command:$(`domain-info`,`domain-info`,()=>import(`./domain-info-DJHEt8JJ.mjs`)),hideCommand:!0},{command:$(`durable-objects`,`durable-objects`,()=>import(`./durable-objects-BvxXBht_.mjs`)),hideCommand:!0},{command:$(`email`,`email`,()=>import(`./email-CGOC_evd.mjs`)),hideCommand:!0},{command:$(`email-auth`,`email-auth`,()=>import(`./email-auth-DFvXKSkg.mjs`)),hideCommand:!0},{command:$(`email-routing`,`Route incoming emails to destination addresses using custom rules, catch-all handlers, and DNS configuration`,()=>import(`./email-routing-QBRPBlyl.mjs`)),hideCommand:!0},{command:$(`email-security`,`Cloud email security — investigate threats, manage allow/block policies, and detect phishing`,()=>import(`./email-security-BFagcRPP.mjs`)),hideCommand:!0},{command:$(`email-sending`,`Send emails and manage sending subdomains`,()=>import(`./email-sending-Ddhe7xjN.mjs`)),hideCommand:!1},{command:$(`filters`,`Filter expressions used by legacy firewall rules to match requests — prefer Rulesets for new configurations`,()=>import(`./filters-CGisPGD1.mjs`)),hideCommand:!0},{command:$(`firewall`,`Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages`,()=>import(`./firewall-DD8U-Brd.mjs`)),hideCommand:!0},{command:$(`flagship`,`flagship`,()=>import(`./flagship-FJHc4mFi.mjs`)),hideCommand:!0},{command:$(`fraud`,`fraud`,()=>import(`./fraud-AH47n-wL.mjs`)),hideCommand:!0},{command:$(`google-tag-gateway`,`Google Tag Gateway operations`,()=>import(`./google-tag-gateway-149kbuG_.mjs`)),hideCommand:!0},{command:$(`health`,`health`,()=>import(`./health-buY5f5pp.mjs`)),hideCommand:!0},{command:$(`healthchecks`,`Standalone health checks that monitor origin server availability from Cloudflare's edge`,()=>import(`./healthchecks-DfEUG007.mjs`)),hideCommand:!0},{command:$(`hostnames`,`hostnames`,()=>import(`./hostnames-DQUiD3Vr.mjs`)),hideCommand:!0},{command:$(`hyperdrive`,`Accelerate access to existing databases by caching queries and pooling connections at the edge`,()=>import(`./hyperdrive-RyQboMWI.mjs`)),hideCommand:!1},{command:$(`iam`,`Identity and access management — permission groups, resource groups, user groups, and SSO connectors`,()=>import(`./iam-BhHYhMXO.mjs`)),hideCommand:!0},{command:$(`images`,`Store, resize, and deliver optimized images globally — variants, signing keys, and direct uploads`,()=>import(`./images-CDViyKtZ.mjs`)),hideCommand:!1},{command:$(`intel`,`Threat intelligence lookups — IP reputation, domain info, ASN details, WHOIS, and indicator feeds`,()=>import(`./intel-YHZbPlS3.mjs`)),hideCommand:!1},{command:$(`internal`,`internal`,()=>import(`./internal-CwyoJUHh.mjs`)),hideCommand:!0},{command:$(`ips`,`ips`,()=>import(`./ips-BpCdldFx.mjs`)),hideCommand:!0},{command:$(`keyless-certificates`,`keyless-certificates`,()=>import(`./keyless-certificates-oNu5jWKF.mjs`)),hideCommand:!0},{command:$(`keys`,`keys`,()=>import(`./keys-yYtv7Ztr.mjs`)),hideCommand:!0},{command:$(`kv`,`kv`,()=>import(`./kv-Bi9B4E0A.mjs`)),hideCommand:!0},{command:$(`leaked-credential-checks`,`Detect compromised credentials in login requests by checking against known breach databases`,()=>import(`./leaked-credential-checks-DKRjBLcr.mjs`)),hideCommand:!0},{command:$(`live`,`live`,()=>import(`./live-wEpA5V_n.mjs`)),hideCommand:!0},{command:$(`load-balancers`,`Distribute traffic across origin pools with health monitoring, geo-steering, and failover`,()=>import(`./load-balancers-jRCN75mX.mjs`)),hideCommand:!0},{command:$(`logexplorer`,`logexplorer`,()=>import(`./logexplorer-kO8CULiK.mjs`)),hideCommand:!0},{command:$(`logo-matches`,`logo-matches`,()=>import(`./logo-matches-LyDAYPbI.mjs`)),hideCommand:!0},{command:$(`logos`,`logos`,()=>import(`./logos-O9f5bGSB.mjs`)),hideCommand:!0},{command:$(`logpush`,`logpush`,()=>import(`./logpush-dtXLu3Ck.mjs`)),hideCommand:!0},{command:$(`logs`,`Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields`,()=>import(`./logs-DmWWL5f9.mjs`)),hideCommand:!0},{command:$(`magic-cloud-networking`,`magic-cloud-networking`,()=>import(`./magic-cloud-networking-XbTa6P52.mjs`)),hideCommand:!0},{command:$(`magic-network-monitoring`,`Flow-based network traffic monitoring with configurable alerting rules and VPC flow ingestion`,()=>import(`./magic-network-monitoring-CpfkgZMp.mjs`)),hideCommand:!0},{command:$(`magic-transit`,`DDoS-protected network transit — GRE/IPsec tunnels, static routes, Magic WAN sites, connectors, and packet captures`,()=>import(`./magic-transit-DwgZeIj-.mjs`)),hideCommand:!0},{command:$(`managed-transforms`,`managed-transforms`,()=>import(`./managed-transforms-DCmogkxv.mjs`)),hideCommand:!0},{command:$(`matches`,`matches`,()=>import(`./matches-BAeN8VM1.mjs`)),hideCommand:!0},{command:$(`mcp`,`mcp`,()=>import(`./mcp-DKZ2D050.mjs`)),hideCommand:!0},{command:$(`media`,`media`,()=>import(`./media-CnxgOViL.mjs`)),hideCommand:!1},{command:$(`mesh`,`mesh`,()=>import(`./mesh-CzIPtuaM.mjs`)),hideCommand:!0},{command:$(`moq`,`MoQ relays: provision a relay, then issue tokens for publishers and subscribers`,()=>import(`./moq-CJpE-eNj.mjs`)),hideCommand:!1},{command:$(`mtls-certificates`,`mtls-certificates`,()=>import(`./mtls-certificates-Bbm_1lQI.mjs`)),hideCommand:!0},{command:$(`network`,`network`,()=>import(`./network-D2WRXCDe.mjs`)),hideCommand:!0},{command:$(`network-interconnects`,`Physical and virtual private interconnects between your infrastructure and Cloudflare's network`,()=>import(`./network-interconnects-Clq4X1U8.mjs`)),hideCommand:!0},{command:$(`oauth-clients`,`oauth-clients`,()=>import(`./oauth-clients-hilWfAlm.mjs`)),hideCommand:!0},{command:$(`oauth-scopes`,`oauth-scopes`,()=>import(`./oauth-scopes-CmbgsPYd.mjs`)),hideCommand:!0},{command:$(`observability`,`observability`,()=>import(`./observability-DXYgDdU5.mjs`)),hideCommand:!1},{command:$(`organization`,`organization`,()=>import(`./organization-D41rIvJa.mjs`)),hideCommand:!1},{command:$(`organizations`,`Multi-user organizations that group accounts, members, and shared settings under a single entity`,()=>import(`./organizations-eNzfOwlP.mjs`)),hideCommand:!1},{command:$(`origin-ca-certificates`,`origin-ca-certificates`,()=>import(`./origin-ca-certificates-DaiAmw45.mjs`)),hideCommand:!0},{command:$(`origin-post-quantum-encryption`,`origin-post-quantum-encryption`,()=>import(`./origin-post-quantum-encryption-7YztBged.mjs`)),hideCommand:!0},{command:$(`origin-tls-client-auth`,`origin-tls-client-auth`,()=>import(`./origin-tls-client-auth-DRwURM8s.mjs`)),hideCommand:!0},{command:$(`page-rules`,`page-rules`,()=>import(`./page-rules-B2Csdc4h.mjs`)),hideCommand:!0},{command:$(`pages`,`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,()=>import(`./pages-BAL6Q7OY.mjs`)),hideCommand:!0},{command:$(`pay-per-crawl`,`pay-per-crawl`,()=>import(`./pay-per-crawl-C-1-ZAtn.mjs`)),hideCommand:!1},{command:$(`pipelines`,`Ingest, transform, and route event streams into R2, analytics, or other destinations in real time`,()=>import(`./pipelines-cyQOuFLb.mjs`)),hideCommand:!1},{command:$(`precursor`,`Precursor settings for a zone`,()=>import(`./precursor-BrweY39h.mjs`)),hideCommand:!0},{command:$(`queries`,`queries`,()=>import(`./queries-oM8uGZy5.mjs`)),hideCommand:!0},{command:$(`queues`,`Reliable message queuing between Workers — produce, consume, and batch-process messages at scale`,()=>import(`./queues-CTx04ZNw.mjs`)),hideCommand:!0},{command:$(`r2`,`S3-compatible object storage with zero egress fees — buckets, lifecycle rules, event notifications, and data migration`,()=>import(`./r2-CnlIUn7R.mjs`)),hideCommand:!1},{command:$(`r2-data-catalog`,`Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines`,()=>import(`./r2-data-catalog-DLtf9d6o.mjs`)),hideCommand:!0},{command:$(`radar`,`Internet-wide traffic intelligence — BGP, DNS, HTTP trends, attack data, and network quality insights`,()=>import(`./radar-CGNgGh8v.mjs`)),hideCommand:!0},{command:$(`rate-limit-analytics`,`rate-limit-analytics`,()=>import(`./rate-limit-analytics-Bf1uT0lT.mjs`)),hideCommand:!1},{command:$(`rate-limits`,`Legacy per-zone rate limiting rules — prefer Advanced Rate Limiting in Rulesets for new configurations`,()=>import(`./rate-limits-B1YjnGue.mjs`)),hideCommand:!0},{command:$(`ready`,`ready`,()=>import(`./ready-CBSCPiHE.mjs`)),hideCommand:!0},{command:$(`realtimekit`,`SDK-backed meetings, participants, recordings, livestreams, and webhooks`,()=>import(`./realtimekit-BPwzhNS9.mjs`)),hideCommand:!1},{command:$(`recent-submissions`,`recent-submissions`,()=>import(`./recent-submissions-Dpmq1f7z.mjs`)),hideCommand:!0},{command:$(`refute`,`refute`,()=>import(`./refute-u7ZPQJZy.mjs`)),hideCommand:!0},{command:$(`registrar`,`registrar`,()=>import(`./registrar-BEcb90RX.mjs`)),hideCommand:!0},{command:$(`registrar-sandbox`,`registrar-sandbox`,()=>import(`./registrar-sandbox-0i1T3zne.mjs`)),hideCommand:!0},{command:$(`reporting`,`reporting`,()=>import(`./reporting-CLbjHlnw.mjs`)),hideCommand:!1},{command:$(`request-tracers`,`Trace how a request would be processed through Cloudflare's rules and configuration pipeline`,()=>import(`./request-tracers-BcKpofP1.mjs`)),hideCommand:!0},{command:$(`resource-sharing`,`Share Cloudflare resources (zones, accounts) across organizations with granular access controls`,()=>import(`./resource-sharing-Ctdi9D-j.mjs`)),hideCommand:!1},{command:$(`resource-tagging`,`resource-tagging`,()=>import(`./resource-tagging-DGEyVTDN.mjs`)),hideCommand:!0},{command:$(`rules`,`Account-level IP lists, hostname lists, and other reusable lists referenced by firewall rules and rulesets`,()=>import(`./rules-CmuB5rIN.mjs`)),hideCommand:!0},{command:$(`rulesets`,`rulesets`,()=>import(`./rulesets-CGaMq8vG.mjs`)),hideCommand:!0},{command:$(`rum`,`Real User Measurement (Web Analytics) — track page loads, Core Web Vitals, and visitor metrics`,()=>import(`./rum-QT6EP4JK.mjs`)),hideCommand:!0},{command:$(`scan-logo`,`scan-logo`,()=>import(`./scan-logo-Ba8WZAyp.mjs`)),hideCommand:!0},{command:$(`scan-page`,`scan-page`,()=>import(`./scan-page-Bcq3Ei86.mjs`)),hideCommand:!0},{command:$(`scim`,`SCIM 2.0 provisioning — manage users, groups, and identity provider sync for your account`,()=>import(`./scim-BgGsmHrL.mjs`)),hideCommand:!0},{command:$(`search`,`search`,()=>import(`./search-D9WDwnV4.mjs`)),hideCommand:!0},{command:$(`secrets-store`,`Centralized secret management — store API keys, tokens, and credentials for use across Workers and other products`,()=>import(`./secrets-store-BCpFhYFv.mjs`)),hideCommand:!0},{command:$(`security-center`,`Security posture dashboard — view and manage security insights, misconfigurations, and vulnerabilities`,()=>import(`./security-center-BNm4uPVB.mjs`)),hideCommand:!1},{command:$(`security-txt`,`Manage the /.well-known/security.txt file that tells security researchers how to report vulnerabilities`,()=>import(`./security-txt-Be2Bif0z.mjs`)),hideCommand:!0},{command:$(`share`,`share`,()=>import(`./share-Bz2tFTUP.mjs`)),hideCommand:!1},{command:$(`signed-url`,`signed-url`,()=>import(`./signed-url-CjPbG5zV.mjs`)),hideCommand:!0},{command:$(`smart-shield`,`smart-shield`,()=>import(`./smart-shield-SODkOUyO.mjs`)),hideCommand:!0},{command:$(`snippets`,`snippets`,()=>import(`./snippets-B5jY8v_7.mjs`)),hideCommand:!1},{command:$(`spectrum`,`Proxy and protect arbitrary TCP/UDP applications through Cloudflare's network with DDoS mitigation`,()=>import(`./spectrum-BA0a42eM.mjs`)),hideCommand:!0},{command:$(`speed`,`Observatory speed tests — run Lighthouse audits, track performance trends, and schedule recurring tests`,()=>import(`./speed-mmOjxOzo.mjs`)),hideCommand:!0},{command:$(`ssl`,`SSL/TLS certificate management — certificate packs, Universal SSL, verification, and TLS mode recommendations`,()=>import(`./ssl-Yr6kELqg.mjs`)),hideCommand:!0},{command:$(`stream`,`Video encoding, storage, and delivery — upload, live-stream, clip, caption, and embed video at scale`,()=>import(`./stream-Cu0kYWbc.mjs`)),hideCommand:!1},{command:$(`submission-info`,`submission-info`,()=>import(`./submission-info-Z9hhp9Rq.mjs`)),hideCommand:!0},{command:$(`submit`,`submit`,()=>import(`./submit-Dl_27e0n.mjs`)),hideCommand:!0},{command:$(`tags`,`tags`,()=>import(`./tags-Cdo_Pwtr.mjs`)),hideCommand:!0},{command:$(`tenant`,`tenant`,()=>import(`./tenant-EX-ANl6X.mjs`)),hideCommand:!1},{command:$(`tenant-custom-nameservers`,`tenant-custom-nameservers`,()=>import(`./tenant-custom-nameservers-BPHUeckw.mjs`)),hideCommand:!0},{command:$(`total-queries`,`total-queries`,()=>import(`./total-queries-aKAYX1iX.mjs`)),hideCommand:!0},{command:$(`tracked-domains`,`tracked-domains`,()=>import(`./tracked-domains-Ck7Jm4Kn.mjs`)),hideCommand:!0},{command:$(`tunnel`,`tunnel`,()=>import(`./tunnel-CDYkWjnt.mjs`)),hideCommand:!0},{command:$(`tunnels`,`tunnels`,()=>import(`./tunnels-CgyX8R2J.mjs`)),hideCommand:!0},{command:$(`turnstile`,`turnstile`,()=>import(`./turnstile-BUtzlW-0.mjs`)),hideCommand:!0},{command:$(`url-info`,`url-info`,()=>import(`./url-info-CJsa1Oc9.mjs`)),hideCommand:!0},{command:$(`url-normalization`,`url-normalization`,()=>import(`./url-normalization-BeKkOZz7.mjs`)),hideCommand:!0},{command:$(`url-scanner`,`Scan URLs for phishing, malware, and other threats — submit scans and retrieve detailed results`,()=>import(`./url-scanner-Cz-yl0_3.mjs`)),hideCommand:!0},{command:$(`user`,`Your Cloudflare user profile, invitations, organizations, billing, and personal API tokens`,()=>import(`./user-BxHjEqpd.mjs`)),hideCommand:!1},{command:$(`values`,`values`,()=>import(`./values-C43NurfT.mjs`)),hideCommand:!0},{command:$(`vectorize`,`vectorize`,()=>import(`./vectorize-CjXfiFH4.mjs`)),hideCommand:!0},{command:$(`verify`,`verify`,()=>import(`./verify-2yi0H93r.mjs`)),hideCommand:!0},{command:$(`waiting-rooms`,`Virtual queues that throttle traffic to your site during peak demand with customizable waiting pages`,()=>import(`./waiting-rooms-C5jSQv_r.mjs`)),hideCommand:!0},{command:$(`web-assets`,`web-assets`,()=>import(`./web-assets-BzM5vVzy.mjs`)),hideCommand:!0},{command:$(`web3`,`web3`,()=>import(`./web3-Ctv9HGiR.mjs`)),hideCommand:!0},{command:$(`workers`,`workers`,()=>import(`./workers-D-YbIedB.mjs`)),hideCommand:!0},{command:$(`workers-builds`,`Automated build and deployment pipeline for Workers — track builds, logs, and repo connections`,()=>import(`./workers-builds-B44wc67O.mjs`)),hideCommand:!0},{command:$(`workflows`,`Durable, multi-step workflows that run on Workers with automatic retries and state persistence`,()=>import(`./workflows-rFuQWClt.mjs`)),hideCommand:!1},{command:$(`zaraz`,`Server-side tag manager — load third-party tools (analytics, pixels, etc.) from Cloudflare's edge without client-side JS`,()=>import(`./zaraz-BA6kY-b6.mjs`)),hideCommand:!0},{command:$(`zero-trust`,`Cloudflare's SASE platform — secure access, device posture, DLP, tunnels, gateway policies, and network segmentation`,()=>import(`./zero-trust-DOFLlUz1.mjs`)),hideCommand:!0},{command:$(`zone`,`zone`,()=>import(`./zone-B_rgejLV.mjs`)),hideCommand:!1},{command:$(`zone-tags`,`zone-tags`,()=>import(`./zone-tags-BWdza4rH.mjs`)),hideCommand:!0},{command:$(`zones`,`Zones are domains on Cloudflare — list, create, and configure domain settings`,()=>import(`./zones-DTWO7Vvn.mjs`)),hideCommand:!1}];function fr(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function pr(e){if(s(n),e instanceof c){let t=d(),n=e.statusCode,r=e.body,i=n===void 0?`Envelope Error`:hr(n),a=[];if(r){let e=r;Array.isArray(e.errors)&&(a=e.errors)}let o=e.rawResponse?.url?`HTTP ${fr(e.rawResponse.url)}`:void 0,s=n===void 0?i:`${n} ${i}`,c=o?`${s} · ${o}`:s,l=t.dim(c),u=``;return a.length>0?u=a.map((e,n)=>{let r=typeof e.code==`number`?t.hex(f.error).bold(`[${e.code}]`):t.hex(f.error).bold(`[error]`),i=t.bold(e.message??``);return n===a.length-1?`${r} ${i}\n${l}`:`${r} ${i}`}).join(`
|
|
99
|
-
|
|
100
|
-
`):(u=t.hex(f.error).bold(e.message||c),e.message&&c&&(u+=`\n${l}`)),console.error(p(u,void 0,{title:`APIError`,rawMessage:!0})),n===401?console.error(`
|
|
101
|
-
`+m(`Try running: cf auth login`)):n===403&&console.error(`
|
|
102
|
-
`+m(`Check your API token permissions`)),e}if(e instanceof l){let t=d(),n=e.status===void 0?``:`${e.status} ${hr(e.status)}`.trim(),r=n?t.dim(n):``,i=e.notes??[],a;if(i.length>0){let n=typeof e.code==`number`?t.hex(f.error).bold(`[${e.code}]`):t.hex(f.error).bold(`[error]`);a=i.map((e,a)=>{let o=t.bold(e.text),s=a===0?`${n} ${o}`:o;return a===i.length-1&&r?`${s}\n${r}`:s}).join(`
|
|
103
|
-
|
|
104
|
-
`)}else{let n=t.hex(f.error).bold(e.message);a=r?`${n}\n${r}`:n}return console.error(p(a,void 0,{title:`APIError`,rawMessage:!0})),e.status===401?console.error(`
|
|
105
|
-
`+m(`Try running: cf auth login`)):e.status===403&&console.error(`
|
|
106
|
-
`+m(`Check your API token permissions`)),e}if(e instanceof Error){let t=process.env.DEBUG&&e.stack?mr(e.stack):void 0;return console.error(p(e.message,t)),e}return console.error(p(`An unexpected error occurred`,String(e))),e}function mr(e){return e.replace(/[A-Za-z0-9_-]{40,}/g,`[REDACTED]`)}function hr(e){return{400:`Bad Request`,401:`Unauthorized`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,409:`Conflict`,422:`Unprocessable Entity`,429:`Too Many Requests`,500:`Internal Server Error`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`}[e]??``}const gr=$(`auth`,`Manage authentication and profiles`,()=>import(`./auth-aazs91XL.mjs`)),_r=$(`complete [shell]`,`Generate and handle shell completions`,()=>import(`./completions-BHE4pRjB.mjs`)),vr=$(`schema [command..]`,`Show API schema details for a command`,()=>import(`./schema-BeXPWeK9.mjs`)),yr=$(`agent-context [product]`,`Output agent context and tool definitions`,()=>import(`./agent-context-Bu6yvDqA.mjs`)),br=$(`tools`,!1,()=>import(`./tools-D2Xxfkrc.mjs`)),xr=$(`dev [implArgs..]`,`Run the project's Cloudflare dev server`,()=>import(`./dev-BbLV0Ti-.mjs`)),Sr=$(`build`,`Build a project for Cloudflare`,()=>import(`./build-Dji9BYmV.mjs`).then(e=>e.t)),Cr=$(`deploy`,`Deploy a project to Cloudflare`,()=>import(`./deploy-DGlmjPTS.mjs`)),wr=$(`triggers`,`Manage triggers (Routes, Workflows, Cron triggers etc.)`,()=>import(`./triggers-Bf9hbP3h.mjs`)),Tr=$(`versions`,`Manage Worker Versions`,()=>import(`./versions-BFbc90Wu.mjs`)),Er=new Set([`auth`,`build`,`complete`,`deploy`,`dev`,`triggers`,`versions`,`schema`,`agent-context`,`tools`]);function Dr(e){return e.includes(`--quiet`)||e.includes(`-q`)}function Or(){process.stderr.isTTY&&(Dr(process.argv.slice(2))||process.argv.slice(2).find(e=>!e.startsWith(`-`))!==`complete`&&import(`./state-DZC531l2.mjs`).then(({readState:e,updateState:t})=>{e().completions?.prompted||(process.stderr.write(u.muted("Tip: run `cf complete <bash|zsh|fish>` to install shell completions.\n")),t({completions:{prompted:!0}}))}))}function kr(){let e=process.argv.slice(2);return!e.includes(`--version`)&&!e.includes(`-v`)?!1:(console.log(a(n)),!0)}function Ar(){if(process.argv.slice(2).length>0)return!1;let e=[a(n),``,`The Cloudflare CLI — manage your account, zones, and developer platform.`,``,`${u.bold(`Get started:`)}`,` ${u.code(`cf auth login`)} ${u.muted(`Authenticate with Cloudflare`)}`,` ${u.code(`cf --help`)} ${u.muted(`Browse all commands`)}`,` ${u.code(`cf <command> --help`)} ${u.muted(`Per-command help`)}`,` ${u.code(`cf complete bash`)} ${u.muted(`Install shell completions`)}`,``,`${u.bold(`Docs:`)} ${u.brand(`https://developers.cloudflare.com/`)}`,``];return console.log(e.join(`
|
|
107
|
-
`)),!0}function jr(){let e=process.argv.slice(2);e.length!==0&&(e.includes(`--version`)||e.includes(`-v`)||e.find(e=>!e.startsWith(`-`))!==`complete`&&s(n,{quiet:Dr(e)}))}function Mr(e){let t=e=>u.brand(e),i=e.indexOf(`--`),a=(i===-1?e:e.slice(0,i)).some(e=>e===`--local`||e===`--no-local`||e.startsWith(`--local=`)),o=ur(e).scriptName(`cf`).usage(`$0 <command> [options]`).usage(`
|
|
108
|
-
The Cloudflare CLI - manage your Cloudflare resources`).updateStrings({"Commands:":t(`Commands`),"Options:":t(`Options`),"Positionals:":t(`Positionals`),"Examples:":t(`Examples`)}).help(`help`,`Show help`).alias(`h`,`help`).option(`quiet`,{type:`boolean`,alias:`q`,description:`Suppress non-essential output`,global:!0,default:!1}).option(`zone`,{type:`string`,alias:`z`,description:`Zone ID or domain name (overrides CLOUDFLARE_ZONE_ID)`,global:!0}).option(`profile`,{type:`string`,description:`Use a specific auth profile`,requiresArg:!0,global:!0}).option(`local`,{type:`boolean`,description:`Use local resource simulations`,global:!0,default:!1}).option(`persist-to`,{type:`string`,description:`Directory holding local persisted state (default: ~/.config/cloudflare/state)`,requiresArg:!0,global:!0}).group([`quiet`,`zone`,`profile`,`local`,`persist-to`,`help`,`version`],t(`Global flags`)).command(gr).command(Sr).command(_r).command(Cr).command(xr).command(wr).command(Tr).command(vr).command(yr).command(br);for(let e of dr)e.hideCommand?o.command({...e.command,describe:!1}):o.command(e.command);return o.middleware(async e=>{let t=String(e._[0]??``);if(!e.help&&(t===`dev`&&a||e.local&&Er.has(t)))throw Error(`--local is not supported by cf ${t}.`);if(e.persistTo===``)throw Error(`--persist-to requires a non-empty directory.`);if(e.persistTo!==void 0&&!e.local)throw Error(`--persist-to can only be used with --local.`);if(!e.local){let{resolveProfile:t}=await import(`./oauth-BPizUUqP.mjs`).then(e=>e.l);r(t(e.profile))}}).demandCommand(1,`You need to specify a command`).strictCommands().strictOptions().version(n).alias(`v`,`version`).epilogue(`For more information, visit https://developers.cloudflare.com/`).exitProcess(!1).fail((e,t,n)=>{if(t)throw t;if(e===`Please specify a subcommand`){n.showHelp(`log`);return}throw n.showHelp(`error`),Error(e)}),o}var Nr=class extends Error{constructor(e){super(`CliExit(${e})`),this.code=e,this.name=`CliExit`}};async function Pr(e){let t=process.argv;process.argv=[`node`,`cf`,...e];try{await Fr()}finally{process.argv=t}}async function Fr(){if(kr()||Ar())throw new Nr(0);jr();let e=Mr(ut(process.argv));Or();try{await e.parse(ut(process.argv))}catch(e){throw e instanceof Nr?e:pr(e)}finally{await h()}}export{Pr as i,Mr as n,Fr as r,Nr as t};
|
package/dist/submit-Dl_27e0n.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";function s(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`create`,describe:`Return new URL submissions`,builder:s,handler:async s=>{if(s.dryRun){a({command:`cf submit create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/submit`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Creating`,async()=>c.submit.create({account_id:l})),{successLabel:`Created`})}},l={command:`submit`,describe:`submit`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{l as default};
|
package/dist/tags-Cdo_Pwtr.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";import{t as s}from"./cli-types-BWdZbsFE.mjs";function c(e){return e.option(`type`,{type:`string`,description:`Filter by resource type. Can be repeated to filter by multiple types (OR logic). Example: ?type=zone&type=worker`}).option(`name`,{type:`string`,description:`Filter by resource name. Performs a case-insensitive substring match. Example: ?name=my-zone`}).option(`id`,{type:`string`,description:`Filter by resource ID. Can be repeated up to 50 times to filter by multiple IDs. Example: ?id=abc&id=def`}).option(`case-insensitive`,{type:`boolean`,description:"Match `tag` keys and values case-insensitively. Stored casing is unchanged. Example: ?tag=environment=production&case_insensitive=true"}).option(`tag`,{type:`string`,description:"Filter resources by tag criteria. This parameter can be repeated multiple times, with AND logic between parameters.\n\nSupported syntax:\n- **Key-only**: `tag=<key>` - Resource must have the tag key (e.g., `tag=production`)\n- **Key-value**: `tag=<key>=<value>` - Resource must have the tag with specific value (e.g., `tag=env=prod`)\n- **Multiple values (OR)**: `tag=<key>=<v1>,<v2>` - Resource must have tag with any of the values (e.g., `tag=env=prod,staging`)\n- **Negate key-only**: `tag=!<key>` - Resource must not have the tag key (e.g., `tag=!archived`)\n- **Negate key-value**: `tag=<key>!=<value>` - Resource must not have the tag with specific value (e.g., `tag=region!=us-west-1`)\n\nMultiple tag parameters are combined with AND logic."}).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`list`,describe:`Lists all tagged resources for an account.`,builder:s(c),handler:async s=>{let c={type:s.type,name:s.name,id:s.id,case_insensitive:s[`case-insensitive`],tag:s.tag,cursor:s.cursor};if(s.dryRun){a({command:`cf tags resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/tags/resources`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.tags.resources.list({account_id:u,...c})),{successLabel:`Loaded`})}},u={command:`resources`,describe:`Operations for resources`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},d={command:`tags`,describe:`tags`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
|
package/dist/tenant-EX-ANl6X.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./auth-DuLchM18.mjs";import{t}from"./output-DgW1hQGX.mjs";import{n,t as r}from"./progress-B84wYh91.mjs";function i(e){return e.option(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const a={command:`list`,describe:`List of account types available for the Tenant to provision accounts.`,builder:i,handler:async i=>{if(i.dryRun){n({command:`cf tenant account-type list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${i[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(i[`tenant-id`]))}/account_types`,pathParams:{"tenant-id":String(i[`tenant-id`]??``)},bodyKind:`none`});return}let a=await e(i);t(await r(`Loading`,async()=>a.tenant.accountType.list({tenant_id:i[`tenant-id`]})),{successLabel:`Loaded`})}},o={command:`account-type`,describe:`Operations for account-type`,builder:e=>e.command(a).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function s(e){return e.option(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`list`,describe:`List of accounts for the Tenant.`,builder:s,handler:async i=>{if(i.dryRun){n({command:`cf tenant account list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${i[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(i[`tenant-id`]))}/accounts`,pathParams:{"tenant-id":String(i[`tenant-id`]??``)},bodyKind:`none`});return}let a=await e(i);t(await r(`Loading`,async()=>a.tenant.account.list({tenant_id:i[`tenant-id`]})),{successLabel:`Loaded`})}},l={command:`account`,describe:`Operations for account`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.option(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`list`,describe:`List of innate entitlements available for the Tenant.`,builder:u,handler:async i=>{if(i.dryRun){n({command:`cf tenant entitlement list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${i[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(i[`tenant-id`]))}/entitlements`,pathParams:{"tenant-id":String(i[`tenant-id`]??``)},bodyKind:`none`});return}let a=await e(i);t(await r(`Loading`,async()=>a.tenant.entitlement.list({tenant_id:i[`tenant-id`]})),{successLabel:`Loaded`})}},f={command:`entitlement`,describe:`Operations for entitlement`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function p(e){return e.positional(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get <tenant-id>`,describe:`Retrieves a Tenant by Tenant ID.`,builder:p,handler:async i=>{if(i.dryRun){n({command:`cf tenant get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${i[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(i[`tenant-id`]))}`,pathParams:{"tenant-id":String(i[`tenant-id`]??``)},bodyKind:`none`});return}let a=await e(i);t(await r(`Loading`,async()=>a.tenant.get({tenant_id:i[`tenant-id`]})),{successLabel:`Loaded`})}};function h(e){return e.option(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`List of active members (Cloudflare users) for the Tenant.`,builder:h,handler:async i=>{if(i.dryRun){n({command:`cf tenant membership list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${i[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(i[`tenant-id`]))}/memberships`,pathParams:{"tenant-id":String(i[`tenant-id`]??``)},bodyKind:`none`});return}let a=await e(i);t(await r(`Loading`,async()=>a.tenant.membership.list({tenant_id:i[`tenant-id`]})),{successLabel:`Loaded`})}},_={command:`membership`,describe:`Operations for membership`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},v={command:`tenant`,describe:`tenant`,builder:e=>e.command(m).command(l).command(o).command(f).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{v as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./auth-DuLchM18.mjs";import{t}from"./output-DgW1hQGX.mjs";import{n,t as r}from"./progress-B84wYh91.mjs";import{n as i,t as a}from"./body-parser-CYD7PKFC.mjs";import{n as o}from"./input-validation-BBKJRoRB.mjs";import{a as s,n as c}from"./prompt-CDtLWxNv.mjs";function l(e){return e.positional(`tenant-tag`,{type:`string`,description:`Tenant identifier tag.`,demandOption:!0}).option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,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 u={command:`create <tenant-tag>`,describe:`Adds a custom nameserver for a tenant.`,builder:l,handler:async c=>{if(c.dryRun){n({command:`cf tenant-custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/tenants/${c[`tenant-tag`]==null?`<tenant-tag>`:encodeURIComponent(String(c[`tenant-tag`]))}/custom_ns`,pathParams:{"tenant-tag":String(c[`tenant-tag`]??``)},bodyKind:`json`,body:c.body===void 0?a({ns_name:o(c[`ns-name`],`ns-name`,`text`),ns_set:c[`ns-set`]}):i(c.body)});return}let l=await e(c);if(c.body){let e=i(c.body);t(await r(`Creating`,async()=>l.tenantCustomNameservers.create({body:e,tenant_tag:c[`tenant-tag`]})),{successLabel:`Created`});return}c[`ns-name`]===void 0&&(c[`ns-name`]=await s(`ns-name`,`The FQDN of the name server.`));let u=a({ns_name:o(c[`ns-name`],`ns-name`,`text`),ns_set:c[`ns-set`]});t(await r(`Creating`,async()=>l.tenantCustomNameservers.create({body:u,tenant_tag:c[`tenant-tag`]})),{successLabel:`Created`})}};function d(e){return e.positional(`custom-ns-id`,{type:`string`,description:`The FQDN of the name server.`,demandOption:!0}).option(`tenant-tag`,{type:`string`,description:`Tenant 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 f={command:`delete <custom-ns-id>`,describe:`Deletes a tenant's custom nameserver.`,builder:d,handler:async i=>{if(i.dryRun){n({command:`cf tenant-custom-nameservers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/tenants/${i[`tenant-tag`]==null?`<tenant-tag>`:encodeURIComponent(String(i[`tenant-tag`]))}/custom_ns/${i[`custom-ns-id`]==null?`<custom-ns-id>`:encodeURIComponent(String(i[`custom-ns-id`]))}`,pathParams:{"custom-ns-id":String(i[`custom-ns-id`]??``),"tenant-tag":String(i[`tenant-tag`]??``)},bodyKind:`none`});return}let a=await e(i);if(!await c({force:!!i.force})){process.stderr.write(`Aborted.
|
|
3
|
-
`);return}t(await r(`Deleting`,async()=>a.tenantCustomNameservers.delete({tenant_tag:i[`tenant-tag`],custom_ns_id:i[`custom-ns-id`]})),{successLabel:`Deleted`})}};function p(e){return e.positional(`tenant-tag`,{type:`string`,description:`Tenant identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get <tenant-tag>`,describe:`Lists a tenant's custom nameservers.`,builder:p,handler:async i=>{if(i.dryRun){n({command:`cf tenant-custom-nameservers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${i[`tenant-tag`]==null?`<tenant-tag>`:encodeURIComponent(String(i[`tenant-tag`]))}/custom_ns`,pathParams:{"tenant-tag":String(i[`tenant-tag`]??``)},bodyKind:`none`});return}let a=await e(i);t(await r(`Loading`,async()=>a.tenantCustomNameservers.get({tenant_tag:i[`tenant-tag`]})),{successLabel:`Loaded`})}},h={command:`tenant-custom-nameservers`,describe:`tenant-custom-nameservers`,builder:e=>e.command(u).command(f).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as e,o as t}from"./theme-BePJemMn.mjs";import"./ui-DIpjthrV.mjs";import{f as n}from"./oauth-BPizUUqP.mjs";import{c as r}from"./interactive-mV8PABm6.mjs";import{i}from"./auth-DuLchM18.mjs";import{a,i as o,n as s}from"./build-Dji9BYmV.mjs";import{a as c,l,r as u,s as d}from"./deploy-input-DhCo1I0I.mjs";function f(e){return e.option(`mode`,{type:`string`,alias:`m`,description:`Build mode (e.g. production, staging, preview)`}).option(`dry-run`,{type:`boolean`,description:`Build a project and run checks without applying triggers`,default:!1})}const p={command:`deploy`,describe:`Apply triggers (Routes, Workflows, Cron triggers etc.)`,builder:f,handler:async f=>{await s(f.mode),r.message(``,{spacing:0});let{workers:{default:p},settings:m}=await a(process.cwd()),{wranglerConfig:h}=o(p,m),g=await i(),_=await n();l(c(g)),r.message(e.bold(`Deploy triggers`),{symbol:t.dim(`├`),spacing:0}),await d(u(p,h,_,f)),r.success(f[`dry-run`]?`Dry run complete`:`Trigger deploy complete`)}},m={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";import{t as s}from"./cli-types-BWdZbsFE.mjs";function c(e){return e.option(`name`,{type:`string`,description:`A user-friendly name for the tunnel.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If empty, all tunnels will be included."}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`uuid`,{type:`string`,description:`UUID of the tunnel.`}).option(`was-active-at`,{type:`string`,description:`Was active at`}).option(`was-inactive-at`,{type:`string`,description:`Was inactive at`}).option(`include-prefix`,{type:`string`,description:`Include prefix`}).option(`exclude-prefix`,{type:`string`,description:`Exclude prefix`}).option(`tun-types`,{type:`string`,description:`The types of tunnels to filter by, separated by commas.`}).option(`status`,{type:`string`,description:"The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).",choices:[`inactive`,`degraded`,`healthy`,`down`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`list`,describe:`Lists and filters all types of Tunnels in an account.`,builder:s(c),handler:async s=>{let c={name:s.name,is_deleted:s[`is-deleted`],existed_at:s[`existed-at`],uuid:s.uuid,was_active_at:s[`was-active-at`],was_inactive_at:s[`was-inactive-at`],include_prefix:s[`include-prefix`],exclude_prefix:s[`exclude-prefix`],tun_types:s[`tun-types`],status:s.status,per_page:s[`per-page`],page:s.page};if(s.dryRun){a({command:`cf tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/tunnels`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.tunnels.list({account_id:u,...c})),{successLabel:`Loaded`})}},u={command:`tunnels`,describe:`tunnels`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";import{n as s,t as c}from"./body-parser-CYD7PKFC.mjs";import{n as l}from"./input-validation-BBKJRoRB.mjs";import{a as u,i as d,n as f}from"./prompt-CDtLWxNv.mjs";import{t as p}from"./cli-types-BWdZbsFE.mjs";function m(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order widgets by.`,choices:[`id`,`sitekey`,`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order widgets.`,choices:[`asc`,`desc`]}).option(`filter`,{type:`string`,description:"Filter widgets by field using case-insensitive substring matching.\nFormat: `field:value`\n\nSupported fields:\n- `name` - Filter by widget name (e.g., `filter=name:login-form`)\n- `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`)\n\nReturns 400 Bad Request if the field is unsupported or format is invalid.\nAn empty filter value returns all results."}).option(`bot-fight-mode`,{type:`boolean`,description:`If bot_fight_mode is set to \`true\`, Cloudflare issues computationally
|
|
3
|
-
expensive challenges in response to malicious bots (ENT only).
|
|
4
|
-
`}).option(`clearance-level`,{type:`string`,description:`If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance,
|
|
5
|
-
this setting can determine the clearance level to be set
|
|
6
|
-
`,choices:[`no_clearance`,`jschallenge`,`managed`,`interactive`]}).option(`domains`,{type:`string`,array:!0,description:`The domains field`}).option(`ephemeral-id`,{type:`boolean`,description:`Return the Ephemeral ID in /siteverify (ENT only).
|
|
7
|
-
`}).option(`mode`,{type:`string`,description:`Widget Mode`,choices:[`non-interactive`,`invisible`,`managed`]}).option(`name`,{type:`string`,description:`Human readable widget name. Not unique. Cloudflare suggests that you
|
|
8
|
-
set this to a meaningful string to make it easier to identify your
|
|
9
|
-
widget, and where it is used.
|
|
10
|
-
`}).option(`offlabel`,{type:`boolean`,description:`Do not show any Cloudflare branding on the widget (ENT only).
|
|
11
|
-
`}).option(`region`,{type:`string`,description:`Region where this widget can be used. This cannot be changed after creation.
|
|
12
|
-
`,choices:[`world`,`china`],default:`world`}).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 h={command:`create`,describe:`Lists challenge widgets.`,builder:p(m),handler:async f=>{let p={page:f.page,per_page:f[`per-page`],order:f.order,direction:f.direction,filter:f.filter};if(f.dryRun){a({command:`cf turnstile widgets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/challenges/widgets`,pathParams:{},query:p,bodyKind:`json`,body:f.body===void 0?c({bot_fight_mode:f[`bot-fight-mode`],clearance_level:l(f[`clearance-level`],`clearance-level`,`text`),domains:f.domains,ephemeral_id:f[`ephemeral-id`],mode:l(f.mode,`mode`,`text`),name:l(f.name,`name`,`text`),offlabel:f.offlabel,region:l(f.region,`region`,`text`)}):s(f.body)});return}let m=await r(f),h=f.local?e:await t();if(f.accountId=h,f.body){let e=s(f.body);new URLSearchParams(Object.entries(p).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i(await o(`Creating`,async()=>m.turnstile.widgets.create({...e,account_id:h,...p})),{successLabel:`Created`});return}if(f.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);f.mode===void 0&&(f.mode=await d(`mode`,`Widget Mode`,[`non-interactive`,`invisible`,`managed`])),f.name===void 0&&(f.name=await u(`name`,`Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. `));let g=c({bot_fight_mode:f[`bot-fight-mode`],clearance_level:l(f[`clearance-level`],`clearance-level`,`text`),domains:f.domains,ephemeral_id:f[`ephemeral-id`],mode:l(f.mode,`mode`,`text`),name:l(f.name,`name`,`text`),offlabel:f.offlabel,region:l(f.region,`region`,`text`)});new URLSearchParams(Object.entries(p).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i(await o(`Creating`,async()=>m.turnstile.widgets.create({...g,account_id:h,...p})),{successLabel:`Created`})}};function g(e){return e.positional(`sitekey`,{type:`string`,description:`Widget item 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 _={command:`delete <sitekey>`,describe:`Destroy a Turnstile Widget.`,builder:g,handler:async s=>{if(s.dryRun){a({command:`cf turnstile widgets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/challenges/widgets/${s.sitekey==null?`<sitekey>`:encodeURIComponent(String(s.sitekey))}`,pathParams:{sitekey:String(s.sitekey??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force})){process.stderr.write(`Aborted.
|
|
13
|
-
`);return}i(await o(`Deleting`,async()=>c.turnstile.widgets.delete({account_id:l,sitekey:s.sitekey})),{successLabel:`Deleted`})}};function v(e){return e.positional(`sitekey`,{type:`string`,description:`Widget item identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <sitekey>`,describe:`Show a single challenge widget configuration.`,builder:v,handler:async s=>{if(s.dryRun){a({command:`cf turnstile widgets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/challenges/widgets/${s.sitekey==null?`<sitekey>`:encodeURIComponent(String(s.sitekey))}`,pathParams:{sitekey:String(s.sitekey??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.turnstile.widgets.get({account_id:l,sitekey:s.sitekey})),{successLabel:`Loaded`})}};function b(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order widgets by.`,choices:[`id`,`sitekey`,`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order widgets.`,choices:[`asc`,`desc`]}).option(`filter`,{type:`string`,description:"Filter widgets by field using case-insensitive substring matching.\nFormat: `field:value`\n\nSupported fields:\n- `name` - Filter by widget name (e.g., `filter=name:login-form`)\n- `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`)\n\nReturns 400 Bad Request if the field is unsupported or format is invalid.\nAn empty filter value returns all results."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`Lists all turnstile widgets of an account.`,builder:p(b),handler:async s=>{let c={page:s.page,per_page:s[`per-page`],order:s.order,direction:s.direction,filter:s.filter};if(s.dryRun){a({command:`cf turnstile widgets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/challenges/widgets`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.turnstile.widgets.list({account_id:u,...c})),{successLabel:`Loaded`})}};function S(e){return e.positional(`sitekey`,{type:`string`,description:`Widget item identifier tag.`,demandOption:!0}).option(`invalidate-immediately`,{type:`boolean`,description:"If `invalidate_immediately` is set to `false`, the previous secret will\nremain valid for two hours. Otherwise, the secret is immediately\ninvalidated, and requests using it will be rejected.\n",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 C={command:`rotate-secret <sitekey>`,describe:"Generate a new secret key for this widget. If `invalidate_immediately` is set to `false`, the previous secret remains valid for 2 hours. Note that secrets cannot be rotated again during the grace period.",builder:S,handler:async l=>{if(l.dryRun){a({command:`cf turnstile widgets rotate-secret`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/challenges/widgets/${l.sitekey==null?`<sitekey>`:encodeURIComponent(String(l.sitekey))}/rotate_secret`,pathParams:{sitekey:String(l.sitekey??``)},bodyKind:`json`,body:l.body===void 0?c({invalidate_immediately:l[`invalidate-immediately`]}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.turnstile.widgets.rotateSecret({...e,account_id:d,sitekey:l.sitekey})),{successLabel:`Created`});return}let f=c({invalidate_immediately:l[`invalidate-immediately`]});i(await o(`Creating`,async()=>u.turnstile.widgets.rotateSecret({...f,account_id:d,sitekey:l.sitekey})),{successLabel:`Created`})}};function w(e){return e.positional(`sitekey`,{type:`string`,description:`Widget item identifier tag.`,demandOption:!0}).option(`bot-fight-mode`,{type:`boolean`,description:`If bot_fight_mode is set to \`true\`, Cloudflare issues computationally
|
|
14
|
-
expensive challenges in response to malicious bots (ENT only).
|
|
15
|
-
`}).option(`clearance-level`,{type:`string`,description:`If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance,
|
|
16
|
-
this setting can determine the clearance level to be set
|
|
17
|
-
`,choices:[`no_clearance`,`jschallenge`,`managed`,`interactive`]}).option(`domains`,{type:`string`,array:!0,description:`The domains field`}).option(`ephemeral-id`,{type:`boolean`,description:`Return the Ephemeral ID in /siteverify (ENT only).
|
|
18
|
-
`}).option(`mode`,{type:`string`,description:`Widget Mode`,choices:[`non-interactive`,`invisible`,`managed`]}).option(`name`,{type:`string`,description:`Human readable widget name. Not unique. Cloudflare suggests that you
|
|
19
|
-
set this to a meaningful string to make it easier to identify your
|
|
20
|
-
widget, and where it is used.
|
|
21
|
-
`}).option(`offlabel`,{type:`boolean`,description:`Do not show any Cloudflare branding on the widget (ENT only).
|
|
22
|
-
`}).option(`region`,{type:`string`,description:`Region where this widget can be used. This cannot be changed after creation.
|
|
23
|
-
`,choices:[`world`,`china`]}).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 T={command:`update <sitekey>`,describe:`Update the configuration of a widget.`,builder:w,handler:async f=>{if(f.dryRun){a({command:`cf turnstile widgets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/challenges/widgets/${f.sitekey==null?`<sitekey>`:encodeURIComponent(String(f.sitekey))}`,pathParams:{sitekey:String(f.sitekey??``)},bodyKind:`json`,body:f.body===void 0?c({bot_fight_mode:f[`bot-fight-mode`],clearance_level:l(f[`clearance-level`],`clearance-level`,`text`),domains:f.domains,ephemeral_id:f[`ephemeral-id`],mode:l(f.mode,`mode`,`text`),name:l(f.name,`name`,`text`),offlabel:f.offlabel,region:l(f.region,`region`,`text`)}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Updating`,async()=>p.turnstile.widgets.update({...e,account_id:m,sitekey:f.sitekey})),{successLabel:`Updated`});return}if(f.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);f.mode===void 0&&(f.mode=await d(`mode`,`Widget Mode`,[`non-interactive`,`invisible`,`managed`])),f.name===void 0&&(f.name=await u(`name`,`Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. `));let h=c({bot_fight_mode:f[`bot-fight-mode`],clearance_level:l(f[`clearance-level`],`clearance-level`,`text`),domains:f.domains,ephemeral_id:f[`ephemeral-id`],mode:l(f.mode,`mode`,`text`),name:l(f.name,`name`,`text`),offlabel:f.offlabel,region:l(f.region,`region`,`text`)});i(await o(`Updating`,async()=>p.turnstile.widgets.update({...h,account_id:m,sitekey:f.sitekey})),{successLabel:`Updated`})}},E={command:`widgets`,describe:`Operations for widgets`,builder:e=>e.command(h).command(_).command(y).command(x).command(C).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},D={command:`turnstile`,describe:`turnstile`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{D as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";function s(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get`,describe:`Return submitted URLs based on ID`,builder:s,handler:async s=>{if(s.dryRun){a({command:`cf url-info get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/url-info`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.urlInfo.get({account_id:l})),{successLabel:`Loaded`})}},l={command:`url-info`,describe:`url-info`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{l as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";import{n as s,t as c}from"./body-parser-CYD7PKFC.mjs";import{n as l}from"./input-validation-BBKJRoRB.mjs";import{a as u}from"./prompt-CDtLWxNv.mjs";import{n as d,t as f}from"./raw-fetch-Dz-QBoP_.mjs";function p(e){return e.positional(`response-id`,{type:`string`,description:`Response hash.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get <response-id>`,describe:"Returns the raw response of the network request. Find the `response_id` in the `data.requests.response.hash`.",builder:p,handler:async i=>{if(i.dryRun){a({command:`cf url-scanner responses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/responses/${i[`response-id`]==null?`<response-id>`:encodeURIComponent(String(i[`response-id`]))}`,pathParams:{"response-id":String(i[`response-id`]??``)},bodyKind:`none`});return}await r(i);let s=i.local?e:await t();i.accountId=s,d((await o(`Loading`,async()=>f(`/accounts/${s}/urlscanner/v2/responses/${encodeURIComponent(String(i[`response-id`]))}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}))).toString(`utf-8`))}},h={command:`responses`,describe:`Raw HTTP response data captured during URL scans`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of urls to scan (up to a 100).`})}const _={command:`bulk-create`,describe:`Submit URLs to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/ and take into account scans submitted in bulk have lower priority and may take longer to finish.`,builder:g,handler:async c=>{if(c.dryRun){a({command:`cf url-scanner scans bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/bulk`,pathParams:{},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let l=await r(c),u=c.local?e:await t();if(c.accountId=u,c.body){let e=s(c.body);i(await o(`Creating`,async()=>l.urlScanner.scans.bulkCreate({body:e,account_id:u})),{successLabel:`Created`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function v(e){return e.option(`agent-readiness`,{type:`boolean`,description:`Enable agent readiness checks.`}).option(`country`,{type:`string`,description:`Country to geo egress from`,choices:`AF.AL.DZ.AD.AO.AG.AR.AM.AU.AT.AZ.BH.BD.BB.BY.BE.BZ.BJ.BM.BT.BO.BA.BW.BR.BN.BG.BF.BI.KH.CM.CA.CV.KY.CF.TD.CL.CN.CO.KM.CG.CR.CI.HR.CU.CY.CZ.CD.DK.DJ.DM.DO.EC.EG.SV.GQ.ER.EE.SZ.ET.FJ.FI.FR.GA.GE.DE.GH.GR.GL.GD.GT.GN.GW.GY.HT.HN.HU.IS.IN.ID.IR.IQ.IE.IL.IT.JM.JP.JO.KZ.KE.KI.KW.KG.LA.LV.LB.LS.LR.LY.LI.LT.LU.MO.MG.MW.MY.MV.ML.MR.MU.MX.FM.MD.MC.MN.MS.MA.MZ.MM.NA.NR.NP.NL.NZ.NI.NE.NG.KP.MK.NO.OM.PK.PS.PA.PG.PY.PE.PH.PL.PT.QA.RO.RU.RW.SH.KN.LC.VC.WS.SM.ST.SA.SN.RS.SC.SL.SK.SI.SB.SO.ZA.KR.SS.ES.LK.SD.SR.SE.CH.SY.TW.TJ.TZ.TH.BS.GM.TL.TG.TO.TT.TN.TR.TM.UG.UA.AE.GB.US.UY.UZ.VU.VE.VN.YE.ZM.ZW`.split(`.`)}).option(`customagent`,{type:`string`,description:`The customagent field`}).option(`referer`,{type:`string`,description:`The referer field`}).option(`screenshots-resolutions`,{type:`string`,array:!0,description:`Take multiple screenshots targeting different device types.`}).option(`url`,{type:`string`,description:`The url field`}).option(`visibility`,{type:`string`,description:"The option `Public` means it will be included in listings like recent scans and search results. `Unlisted` means it will not be included in the aforementioned listings, users will need to have the scan's ID to access it. A a scan will be automatically marked as unlisted if it fails, if it contains potential PII or other sensitive material.",choices:[`Public`,`Unlisted`],default:`Public`}).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:`create`,describe:`Submit a URL to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/.`,builder:v,handler:async d=>{if(d.dryRun){a({command:`cf url-scanner scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/scan`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({agentReadiness:d[`agent-readiness`],country:l(d.country,`country`,`text`),customagent:l(d.customagent,`customagent`,`text`),referer:l(d.referer,`referer`,`text`),screenshotsResolutions:d[`screenshots-resolutions`],url:l(d.url,`url`,`text`),visibility:l(d.visibility,`visibility`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.urlScanner.scans.create({...e,account_id:p})),{successLabel:`Created`});return}d.url===void 0&&(d.url=await u(`url`,`The url field`));let m=c({agentReadiness:d[`agent-readiness`],country:l(d.country,`country`,`text`),customagent:l(d.customagent,`customagent`,`text`),referer:l(d.referer,`referer`,`text`),screenshotsResolutions:d[`screenshots-resolutions`],url:l(d.url,`url`,`text`),visibility:l(d.visibility,`visibility`,`text`)});i(await o(`Creating`,async()=>f.urlScanner.scans.create({...m,account_id:p})),{successLabel:`Created`})}};function b(e){return e.positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`dom <scan-id>`,describe:`Returns a plain text response, with the scan's DOM content as rendered by Chrome.`,builder:b,handler:async i=>{if(i.dryRun){a({command:`cf url-scanner scans dom`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/dom/${i[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(i[`scan-id`]))}`,pathParams:{"scan-id":String(i[`scan-id`]??``)},bodyKind:`none`});return}await r(i);let s=i.local?e:await t();i.accountId=s,d((await o(`Loading`,async()=>f(`/accounts/${s}/urlscanner/v2/dom/${encodeURIComponent(String(i[`scan-id`]))}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}))).toString(`utf-8`))}};function S(e){return e.positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <scan-id>`,describe:`Get URL scan by uuid`,builder:S,handler:async s=>{if(s.dryRun){a({command:`cf url-scanner scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/result/${s[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(s[`scan-id`]))}`,pathParams:{"scan-id":String(s[`scan-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.urlScanner.scans.get({account_id:l,scan_id:s[`scan-id`]})),{successLabel:`Loaded`})}};function w(e){return e.positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`har <scan-id>`,describe:`Get a URL scan's HAR file. See HAR spec at http://www.softwareishard.com/blog/har-12-spec/.`,builder:w,handler:async s=>{if(s.dryRun){a({command:`cf url-scanner scans har`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/har/${s[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(s[`scan-id`]))}`,pathParams:{"scan-id":String(s[`scan-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.urlScanner.scans.har({account_id:l,scan_id:s[`scan-id`]})),{successLabel:`Loaded`})}};function E(e){return e.option(`size`,{type:`number`,description:`Limit the number of objects in the response.`}).option(`q`,{type:`string`,description:`Filter scans`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`Use a subset of ElasticSearch Query syntax to filter scans. Some example queries:<br/> <br/>- 'path:"/bundles/jquery.js"': Searches for scans who requested resources with the given path.<br/>- 'page.asn:AS24940 AND hash:xxx': Websites hosted in AS24940 where a resource with the given hash was downloaded.<br/>- 'page.domain:microsoft* AND verdicts.malicious:true AND NOT page.domain:microsoft.com': malicious scans whose hostname starts with "microsoft".<br/>- 'apikey:me AND date:[2025-01 TO 2025-02]': my scans from 2025 January to 2025 February.`,builder:E,handler:async s=>{let c={size:s.size,q:s.q};if(s.dryRun){a({command:`cf url-scanner scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/search`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.urlScanner.scans.list({account_id:u,...c})),{successLabel:`Loaded`})}};function O(e){return e.positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`resolution`,{type:`string`,description:`Target device type.`,choices:[`desktop`,`mobile`,`tablet`]}).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 k={command:`screenshot <scan-id>`,describe:`Get scan's screenshot by resolution (desktop/mobile/tablet).`,builder:O,handler:async i=>{let s={resolution:i.resolution};if(i.dryRun){a({command:`cf url-scanner scans screenshot`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/urlscanner/v2/screenshots/${i[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(i[`scan-id`]))}.png`,pathParams:{"scan-id":String(i[`scan-id`]??``)},query:s,bodyKind:`none`});return}await r(i);let c=i.local?e:await t();i.accountId=c;let l=new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await o(`Loading`,async()=>f(`/accounts/${c}/urlscanner/v2/screenshots/${encodeURIComponent(String(i[`scan-id`]))}.png${l?`?`+l:``}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}));d(i.text===!0?u.toString(`utf-8`):u)}},A={command:`scans`,describe:`URL scan requests and results — submit URLs for analysis and retrieve threat verdicts`,builder:e=>e.command(_).command(y).command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`url-scanner`,describe:`Scan URLs for phishing, malware, and other threats — submit scans and retrieve detailed results`,builder:e=>e.command(h).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{j as default};
|