cf 1.0.0-beta.1 → 1.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/_meta/commands.json +11448 -13819
- package/dist/_meta/hand-written-commands.json +579 -41
- package/dist/_meta/schemas.json +14496 -16450
- package/dist/abuse-reports-DX5xgeka.mjs +24 -0
- package/dist/access-DuHs0Mii.mjs +2 -0
- package/dist/{account-tags-DAf-hq1m.mjs → account-tags-CiKwgOWd.mjs} +6 -6
- package/dist/{accounts-BDIKjiG2.mjs → accounts-DfXSHrkF.mjs} +63 -57
- package/dist/{acm-D-q1FVWJ.mjs → acm-BgSr3Ig4.mjs} +7 -7
- package/dist/{addressing-0w2U1NEy.mjs → addressing-B70NFnrX.mjs} +43 -43
- package/dist/agent-context-GRiQ4zRU.mjs +2 -0
- package/dist/{agent-memory-Drumm4qd.mjs → agent-memory-DJRquHeq.mjs} +15 -15
- package/dist/ai-CP2oIS-I.mjs +29 -0
- package/dist/{ai-audit-CPrmohqf.mjs → ai-audit-Bn_BfMFS.mjs} +3 -3
- package/dist/ai-gateway-CrrEtzUP.mjs +82 -0
- package/dist/{ai-search-B5l4IDSR.mjs → ai-search-C4YWVTCa.mjs} +42 -42
- package/dist/{ai-security-C7_IGDDl.mjs → ai-security-Bt_fG65f.mjs} +4 -4
- package/dist/{alerting-B6m1Rhf4.mjs → alerting-CRr88fVR.mjs} +26 -26
- package/dist/{analytics-nnzFBB_7.mjs → analytics-XqS9OP5B.mjs} +11 -12
- package/dist/{analytics_engine-BvjKCwn1.mjs → analytics_engine-CzmYem4f.mjs} +2 -2
- package/dist/{api-security-B9IozS2a.mjs → api-security-gB1FHrHq.mjs} +57 -57
- package/dist/{argo-C_QcqR6P.mjs → argo-wFCAsYx7.mjs} +5 -5
- package/dist/args-CXgkQKK7.mjs +2 -0
- package/dist/{artifacts-DDFNpYBz.mjs → artifacts-qFjlNRqb.mjs} +20 -20
- package/dist/{audit-logs-cTzNV0DV.mjs → audit-logs-CpPUjMUP.mjs} +2 -2
- package/dist/auth-7Fk7PVIC.mjs +2 -0
- package/dist/auth-BmJ946bE.mjs +2 -0
- package/dist/auth-Br-t8vL_.mjs +2 -0
- package/dist/auth-token-DeG33BMQ.mjs +8 -0
- package/dist/autoconfig-D-copdZG.mjs +511 -0
- package/dist/banner-Xk4xBN8U.mjs +2 -0
- package/dist/basin-catalog-CshcpsAH.mjs +46 -0
- package/dist/{billing-DU2X-q-x.mjs → billing-B-xNxxiP.mjs} +11 -11
- package/dist/{bot-management-BHAAoZOh.mjs → bot-management-DhafeA2J.mjs} +4 -4
- package/dist/{botnet-feed-DOOnGVVY.mjs → botnet-feed-D6uCLE_D.mjs} +5 -5
- package/dist/{brand-protection-C_DYa7IK.mjs → brand-protection-c3WiHbYn.mjs} +13 -13
- package/dist/browser-extension-Dee2Y1qn.mjs +2 -0
- package/dist/{browser-run-Dw-vgWGR.mjs → browser-run-D9_cwaSD.mjs} +24 -24
- package/dist/build-9ihDp-Gy.mjs +2 -0
- package/dist/build-DrG6TqMw.mjs +2 -0
- package/dist/{builds-CO0MmSd3.mjs → builds-Dl8if-2k.mjs} +32 -32
- package/dist/cache-CIZokBjd.mjs +45 -0
- package/dist/{certificate-authorities-Dmxh7w-Z.mjs → certificate-authorities-NUQzCDK8.mjs} +3 -3
- package/dist/cf-DfQfIu3q.mjs +18 -0
- package/dist/chunk-FT2NMTJB-BFqlGcem.mjs +97 -0
- package/dist/chunk-KKDV4JPS-B_t8sDTz.mjs +2 -0
- package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +2 -0
- package/dist/chunk-WMOON6TZ-B8xCqjB1.mjs +2 -0
- package/dist/cli-aChy8ou_.mjs +6 -0
- package/dist/cli-exit-Dqoo6Jgb.mjs +2 -0
- package/dist/client-certificates-qgLpBn8t.mjs +13 -0
- package/dist/{client-side-security-D7NWV0YH.mjs → client-side-security-DZO6Xw14.mjs} +14 -14
- package/dist/{cloud-connector-XMFOTNqT.mjs → cloud-connector-C7vGDCzX.mjs} +3 -3
- package/dist/{cloudflared-DhItYrCq.mjs → cloudflared-CEfZhSQH.mjs} +1 -1
- package/dist/{cloudforce-one-Cew4MHvA.mjs → cloudforce-one-CE7y5UkF.mjs} +237 -246
- package/dist/command-07vhr56i.mjs +2 -0
- package/dist/command-B6TpINoN.mjs +2 -0
- package/dist/command-BWC9CbE7.mjs +2 -0
- package/dist/command-BsmF3J_l.mjs +2 -0
- package/dist/command-C2pNxAeL.mjs +2 -0
- package/dist/command-C65Ed0o9.mjs +2 -0
- package/dist/command-Cdx___59.mjs +2 -0
- package/dist/command-CrtDkZNs.mjs +2 -0
- package/dist/command-D0MKPucK.mjs +2 -0
- package/dist/command-DHdWKtqx.mjs +2 -0
- package/dist/command-Ds5OVat3.mjs +2 -0
- package/dist/command-Dv6YavZa.mjs +2 -0
- package/dist/command-dAYWrB5y.mjs +2 -0
- package/dist/command-eM48o0J6.mjs +2 -0
- package/dist/command-maDJWJgu.mjs +2 -0
- package/dist/{completions-xPLd1cvL.mjs → completions-D0280hul.mjs} +26 -26
- package/dist/{connector-interrupts-BfQN_pm6.mjs → connector-interrupts-CVjFhU-C.mjs} +3 -3
- package/dist/{connector-telemetry-events-B7qLZsZJ.mjs → connector-telemetry-events-Bu3LKP6T.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-Ckvg9BPc.mjs → connector-telemetry-snapshots-BbDTIc06.mjs} +3 -3
- package/dist/{connectors-BhvAP5fb.mjs → connectors-DGtx-rPI.mjs} +7 -7
- package/dist/{containers-Cq1gtnq6.mjs → containers-CzNbBrYE.mjs} +70 -72
- package/dist/{containers-Bl3EY-cy.mjs → containers-DEFrbNgO.mjs} +17 -17
- package/dist/{content-scan-BYGe9fFj.mjs → content-scan-BCtWBCqd.mjs} +6 -6
- package/dist/context-CquYYyS3.mjs +7 -0
- package/dist/{cps-BWMDWeVq.mjs → cps-C8BbnbuD.mjs} +1 -1
- package/dist/{csamScanner-DMYGzLNi.mjs → csamScanner-CsJ9H2fA.mjs} +3 -3
- package/dist/{ct-alerting-Vq4l2s7n.mjs → ct-alerting-CYsQZO2H.mjs} +3 -3
- package/dist/{custom-certificates-BDEHH0Ym.mjs → custom-certificates-CA8HqolM.mjs} +8 -8
- package/dist/{custom-csrs-CHSkZNdX.mjs → custom-csrs-D0P2vWJE.mjs} +5 -5
- package/dist/{custom-hostnames-Bch3iQZC.mjs → custom-hostnames-CzYMChbh.mjs} +12 -12
- package/dist/{custom-nameservers-Tdvu1-vr.mjs → custom-nameservers-Cet3oF56.mjs} +5 -5
- package/dist/{custom-pages-rFsiIXlr.mjs → custom-pages-DUkHIaTP.mjs} +10 -10
- package/dist/d1-B2duXfH2.mjs +41 -0
- package/dist/{dcv-delegation-D6xiYj2l.mjs → dcv-delegation-BkdRVEAH.mjs} +2 -2
- package/dist/{delegate-GctF_lrq.mjs → delegate-CCGgla7X.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-D04Xvm0m.mjs → deploy-BdWBEbLj.mjs} +1 -1
- package/dist/{deploy-input-COEKxOA1.mjs → deploy-input-LmLfj6kI.mjs} +1 -1
- package/dist/dev-BHkVwAea.mjs +4 -0
- package/dist/{diagnostics-BZVAAguV.mjs → diagnostics-9Wj5UWBL.mjs} +7 -7
- package/dist/dialog-Dpi-UVbz.mjs +2 -0
- package/dist/discover-BYkHr5Ja.mjs +2 -0
- package/dist/discover-t6E9lpf3.mjs +2 -0
- package/dist/{dist-BpadEMNY.mjs → dist-Cpb7_h4N.mjs} +35 -35
- package/dist/dist-D1iG7guo.mjs +366 -0
- package/dist/dist-zep5OXGt.mjs +48 -0
- package/dist/{dls-BsnURYja.mjs → dls-Caya7FZc.mjs} +8 -8
- package/dist/{dns-B_nTXhuM.mjs → dns-BLNa0GrP.mjs} +72 -63
- package/dist/{dns-firewall-DDsrdulo.mjs → dns-firewall-ChCvC5rT.mjs} +8 -8
- package/dist/dot-prop-IITUZ2XW-BsZYdILY.mjs +2 -0
- package/dist/dotenv-CcQjGlV0.mjs +4 -0
- package/dist/dry-run-p9Q7nMZ5.mjs +2 -0
- package/dist/durable-objects-DuRbdp7N.mjs +6 -0
- package/dist/{email-auth-CzjtGH6g.mjs → email-auth-C28s03aI.mjs} +3 -3
- package/dist/{email-routing-B92fty1-.mjs → email-routing-Ci-xjXIN.mjs} +24 -24
- package/dist/email-security-DPU6xvI9.mjs +158 -0
- package/dist/{email-sending-B7f95epu.mjs → email-sending-kTVAlVKO.mjs} +23 -23
- package/dist/error-sanitization-BbEw--0B.mjs +2 -0
- package/dist/error-sanitization-p5rmb53x.mjs +2 -0
- package/dist/errors-cuuW88wR.mjs +3 -0
- package/dist/{fieldExtractors-DL_H1m7E.mjs → fieldExtractors-ceaXu4zD.mjs} +4 -4
- package/dist/firewall-BND3qSY2.mjs +36 -0
- package/dist/flagship-DfxbNzgx.mjs +28 -0
- package/dist/{fraud-DU_YCLC5.mjs → fraud-DgyYv_CC.mjs} +3 -3
- package/dist/generate-9P8Q_RiO.mjs +2 -0
- package/dist/generate-VxmGG8BF.mjs +3 -0
- package/dist/{google-tag-gateway-xqN-QudN.mjs → google-tag-gateway-v3p7murv.mjs} +3 -3
- package/dist/gt-KlYHH-UC.mjs +2 -0
- package/dist/{healthchecks-COnq1YOx.mjs → healthchecks-CByb4qYA.mjs} +10 -10
- package/dist/{hostnames-CxRAY_Pp.mjs → hostnames-3CqeMF5g.mjs} +6 -6
- package/dist/hyperdrive-CmyYTE-K.mjs +37 -0
- package/dist/{iam-CtX9NPCy.mjs → iam-CV_M681j.mjs} +24 -24
- package/dist/{images-CuWFOsGw.mjs → images-DaLPjskW.mjs} +33 -33
- package/dist/index.mjs +1 -1
- package/dist/init-CBKifk5L.mjs +39 -0
- package/dist/{intel-BeGV3VXt.mjs → intel-MpftjuPB.mjs} +36 -36
- package/dist/interactive-D80kbTap.mjs +32 -0
- package/dist/interactive-mJQ_IrGd.mjs +2 -0
- package/dist/{ips-d6aoKAI4.mjs → ips-WWvPwSBc.mjs} +1 -1
- package/dist/k2-D0QYUFqT.mjs +13 -0
- package/dist/keyless-certificates-DqILy3t9.mjs +13 -0
- package/dist/{keys-Fyf3vWcA.mjs → keys-DhX4AcqF.mjs} +2 -2
- package/dist/kv-DLUfUL0_.mjs +15 -0
- package/dist/lazy-command--5YpWUVY.mjs +2 -0
- package/dist/{leaked-credential-checks-B7ewx3W-.mjs → leaked-credential-checks-C0U1oYM5.mjs} +8 -8
- package/dist/{load-balancers-DHD4f2CT.mjs → load-balancers-BJKI9lm7.mjs} +39 -39
- package/dist/local-DkYQiSQQ.mjs +2 -0
- package/dist/{local-B6b2OIBW.mjs → local-rYpzEQb-.mjs} +1 -1
- package/dist/{local-runtime-DD8DAIlm.mjs → local-runtime-DZTTIe6x.mjs} +1 -1
- package/dist/login-CnE2Ii_F.mjs +2 -0
- package/dist/login-bnylLTit.mjs +5 -0
- package/dist/{logo-matches-BAX8v3iL.mjs → logo-matches-DFZybI0C.mjs} +3 -3
- package/dist/{logos-BWBVGwU6.mjs → logos-Da2YtqSN.mjs} +4 -4
- package/dist/{logpush-CZKR8DHO.mjs → logpush-Q7WIEHS1.mjs} +23 -23
- package/dist/logs-c3b3USyS.mjs +36 -0
- package/dist/{magic-cloud-networking-DttrBXqd.mjs → magic-cloud-networking-BoyDmFq3.mjs} +37 -37
- package/dist/{magic-network-monitoring-9VXDSYuL.mjs → magic-network-monitoring-BkUbpMUp.mjs} +18 -18
- package/dist/{magic-transit-Dsu_cSGM.mjs → magic-transit-4-THD45G.mjs} +161 -165
- package/dist/{managed-defense-SYreve4W.mjs → managed-defense-CTMqSp6z.mjs} +9 -9
- package/dist/{managed-transforms-CzSy_xPw.mjs → managed-transforms-DcYAvqTe.mjs} +4 -4
- package/dist/{matches-qf7GReyu.mjs → matches-hnU16rSJ.mjs} +3 -3
- package/dist/{mcp-DYSk5_gc.mjs → mcp-kZX4irfN.mjs} +15 -15
- package/dist/{mesh-DdY07OYt.mjs → mesh-Dxzvvso6.mjs} +12 -12
- package/dist/migrate-BNvUWrjy.mjs +2 -0
- package/dist/monetization-Dsqj9DCA.mjs +20 -0
- package/dist/mtls-certificates-BSbMwIna.mjs +13 -0
- package/dist/{network-interconnects-C4uUoeNa.mjs → network-interconnects-osO_vAPu.mjs} +17 -17
- package/dist/{network-DpaZ5LJL.mjs → network-mEnXTEiG.mjs} +24 -24
- package/dist/oauth-CeZ3d_dB.mjs +9 -0
- package/dist/{oauth-clients-D7Ou7oAS.mjs → oauth-clients-CWPHi-Yn.mjs} +7 -7
- package/dist/{oauth-scopes-BFoE82Mv.mjs → oauth-scopes-CxpRD6d7.mjs} +1 -1
- package/dist/{oauth-nsTDJ0dF.mjs → oauth-w0fWmrwU.mjs} +1 -1
- package/dist/{observability-smcOFbC1.mjs → observability-BxL2RqWZ.mjs} +44 -44
- package/dist/open-PCXX3ZDZ-C7gpxSsl.mjs +4 -0
- package/dist/{organization-Dyf_0mq4.mjs → organization-DNieJ1xJ.mjs} +7 -7
- package/dist/{organizations-D7zGPLVm.mjs → organizations-BIXPmTy5.mjs} +1 -1
- package/dist/{origin-ca-certificates-DJrp29gv.mjs → origin-ca-certificates-dVJvSIH8.mjs} +3 -3
- package/dist/{origin-post-quantum-encryption-BYj3kJiq.mjs → origin-post-quantum-encryption-CO6tDW1t.mjs} +3 -3
- package/dist/{origin-tls-client-auth-j0tGh6Fy.mjs → origin-tls-client-auth-DeTY8aN2.mjs} +14 -14
- package/dist/output-ClYel9WX.mjs +2 -0
- package/dist/{page-rules-CLzba_nr.mjs → page-rules-DA552Ra4.mjs} +7 -7
- package/dist/pages-B0x7tidm.mjs +54 -0
- package/dist/{pay-per-crawl-DbaTVI8V.mjs → pay-per-crawl-DoTg9VP7.mjs} +32 -32
- package/dist/{pay-per-use-BEvtoppJ.mjs → pay-per-use-yRO2QBfe.mjs} +3 -3
- package/dist/{pipelines-lps71uoA.mjs → pipelines-CQxrm9ao.mjs} +20 -20
- package/dist/precursor-FiGYDRV9.mjs +4 -0
- package/dist/previews-BthBa50j.mjs +4 -0
- package/dist/progress-TLUEIYE6.mjs +2 -0
- package/dist/prompt-Ck_1PCHm.mjs +3 -0
- package/dist/{queries-EJYlFw8m.mjs → queries-C0RRdol7.mjs} +4 -4
- package/dist/{queues-CozKGaA4.mjs → queues-sLgvjsRP.mjs} +29 -35
- package/dist/r2-C2PllL6i.mjs +125 -0
- package/dist/r2-data-catalog-Bg7zq1IB.mjs +2 -0
- package/dist/{radar-NmpdyMo5.mjs → radar-Bez6k9Dw.mjs} +1 -1
- package/dist/raw-fetch-DNxNCoeP.mjs +2 -0
- package/dist/{realtime-iWTz8WbH.mjs → realtime-D-HSXznX.mjs} +78 -78
- package/dist/{registrar-Cza1L8i_.mjs → registrar-DwHrG9QR.mjs} +9 -9
- package/dist/{registrar-sandbox-BP4GQg5s.mjs → registrar-sandbox-jNukmzQP.mjs} +6 -6
- package/dist/{registry-vreNkX6u.mjs → registry-CsSLAAOE.mjs} +1 -1
- package/dist/{reporting-gvXX2MxY.mjs → reporting-DolhAb10.mjs} +7 -7
- package/dist/request-headers-Lhj314mk.mjs +2 -0
- package/dist/{request-tracers-F8a_aj32.mjs → request-tracers-w72hKc33.mjs} +2 -2
- package/dist/resolve-Djf2xgBx.mjs +2 -0
- package/dist/{resource-sharing-D6XWIDmb.mjs → resource-sharing-DTrSkqI4.mjs} +18 -18
- package/dist/{resource-tagging-c_z4VZt0.mjs → resource-tagging-aURR4fIJ.mjs} +2 -2
- package/dist/{rules-_QDaG3U5.mjs → rules-C8a7cV-W.mjs} +8 -8
- package/dist/{rulesets-Bc4ZuPG_.mjs → rulesets-RJ6yBefy.mjs} +20 -20
- package/dist/{rum-ChPyfpM2.mjs → rum-Bk1dPW4p.mjs} +14 -14
- package/dist/run-BJOAPmsz.mjs +2 -0
- package/dist/run-iFM5TxtQ.mjs +2 -0
- package/dist/{schema-flags-C9lbLgE-.mjs → schema-flags-PagOq-G2.mjs} +2 -2
- package/dist/schema-v7mOxMdx.mjs +2 -0
- package/dist/{scim-BjiswXbC.mjs → scim-C0FmjkkV.mjs} +10 -10
- package/dist/{secrets-store-Cn3D5a0d.mjs → secrets-store-cG_5RMzK.mjs} +11 -11
- package/dist/security-insights-DVAqroY5.mjs +40 -0
- package/dist/{security-txt-CaR5Idmz.mjs → security-txt-rfrrdiZV.mjs} +4 -4
- package/dist/session-B6mFkaVZ.mjs +2 -0
- package/dist/shared-BqsWoApw.mjs +2 -0
- package/dist/{smart-shield-CphSzoh4.mjs → smart-shield-_HA814Im.mjs} +11 -11
- package/dist/{snippets-r-Mre0cE.mjs → snippets-mRelEw0p.mjs} +10 -10
- package/dist/source-38bULAR8.mjs +6 -0
- package/dist/spawn-BzPhcLJI.mjs +10 -0
- package/dist/{spectrum-BhjCVFZk.mjs → spectrum-BwtOiaDw.mjs} +11 -11
- package/dist/{speed-CPgypY7n.mjs → speed-DmqsZtiJ.mjs} +11 -11
- package/dist/src--KDGqL5N.mjs +109 -0
- package/dist/{ssl-DsMrXyqK.mjs → ssl-DCvfveJB.mjs} +16 -16
- package/dist/startup-profile-BCe9k9sR.mjs +17 -0
- package/dist/startup-profile-WrwRyMwH.mjs +2 -0
- package/dist/{state-BxCejn42.mjs → state-BPwdiNO_.mjs} +1 -1
- package/dist/state-a1tTOGjm.mjs +2 -0
- package/dist/{stream-L2NmGPby.mjs → stream-aroClJeD.mjs} +56 -56
- package/dist/{submit-KN0Ul5fV.mjs → submit-BBKhoKT8.mjs} +2 -2
- package/dist/{tags-CZMFKGdP.mjs → tags-Djw0e-4j.mjs} +2 -2
- package/dist/telemetry-DoBQOGRk.mjs +2 -0
- package/dist/telemetry-DrFNujdx.mjs +2 -0
- package/dist/{tenant-custom-nameservers-Nx59Buv0.mjs → tenant-custom-nameservers-XCbXryBZ.mjs} +1 -1
- package/dist/tenant-tc1wb_ym.mjs +10 -0
- package/dist/{theme-BiIYWOed.mjs → theme-BIWQFmZ0.mjs} +2 -2
- package/dist/tools-CB4NleeJ.mjs +2 -0
- package/dist/{tunnels-C-mMZy4v.mjs → tunnels-C2FTswb6.mjs} +15 -15
- package/dist/{turnstile-39JL9tMt.mjs → turnstile-BV4Mdd-j.mjs} +8 -8
- package/dist/ui-D1hhIDIs.mjs +5 -0
- package/dist/update-check-CFt6cMOi.mjs +2 -0
- package/dist/update-check-Dtj9fzNe.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-7ikewAnp.mjs → url-info-CeegsDK7.mjs} +2 -2
- package/dist/{url-normalization-B0D7Fhf3.mjs → url-normalization-Dbypc9wz.mjs} +4 -4
- package/dist/{url-scanner-DpKIqkin.mjs → url-scanner-BFXMrpJF.mjs} +8 -8
- package/dist/{user-BFq8UM1s.mjs → user-3uwLMH78.mjs} +1 -1
- package/dist/{values-DnBYV1ZD.mjs → values-BTncDc3U.mjs} +2 -2
- package/dist/{vectorize-BpZ4UsUj.mjs → vectorize-CtMAtx8r.mjs} +17 -17
- package/dist/version-oN1bmOgM.mjs +2 -0
- package/dist/{waiting-rooms-DJfqehy9.mjs → waiting-rooms-1xDvjF13.mjs} +25 -25
- package/dist/{web-assets-CCSSW_JH.mjs → web-assets-BfEprX1S.mjs} +29 -29
- package/dist/{web3-bbT1REPc.mjs → web3-DNbp5sZw.mjs} +13 -13
- package/dist/workers-DK_JgS4Y.mjs +38 -0
- package/dist/{workers-builds-TRF3K416.mjs → workers-builds-CdhwmmsQ.mjs} +7 -7
- package/dist/workers-for-platforms-CP6IqxrK.mjs +42 -0
- package/dist/{workers-vpc-kgryQ48l.mjs → workers-vpc-LVfayM2-.mjs} +6 -6
- package/dist/{workflows-CKdPlIkK.mjs → workflows-CA5K8FFb.mjs} +23 -23
- package/dist/wrangler-migration-B0mKHqGd.mjs +2 -0
- package/dist/{zaraz-BXFlEWSx.mjs → zaraz-BY60ZUQ4.mjs} +11 -11
- package/dist/{zero-trust-M08mBsYd.mjs → zero-trust-CQNohO7_.mjs} +460 -434
- package/dist/{zone-DHmrotGW.mjs → zone-BVDW2UGd.mjs} +2 -2
- package/dist/{zones-C0eKBTqG.mjs → zones-CcZL0YQp.mjs} +44 -44
- package/package.json +23 -15
- package/dist/abuse-reports-Dd6kJM7r.mjs +0 -26
- package/dist/access-C_2rEi0H.mjs +0 -27
- package/dist/account-CZ9SPVdz.mjs +0 -12
- package/dist/ai-ARwLeQ1O.mjs +0 -31
- package/dist/ai-gateway-DNY4FPF2.mjs +0 -147
- package/dist/auth-DJhSjNNL.mjs +0 -8
- package/dist/auth-sAorfdWU.mjs +0 -2
- package/dist/browser-extension-C48pKh3t.mjs +0 -15
- package/dist/build-1a8CiNIT.mjs +0 -2
- package/dist/build-Ca_drQY2.mjs +0 -2
- package/dist/cache-XxusQxXe.mjs +0 -45
- package/dist/cf-oadujOtC.mjs +0 -18
- package/dist/chunk-6EUZQHAF-QVTL_mC-.mjs +0 -2
- package/dist/chunk-DL5FNmn1.mjs +0 -2
- package/dist/chunk-Q72B4Q5Z-Cr1H_iK6.mjs +0 -2
- package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +0 -2
- package/dist/chunk-QBZBEHZB-Byagrlop.mjs +0 -2
- package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +0 -374
- package/dist/client-certificates-CgaIc3zN.mjs +0 -13
- package/dist/command-CF0giIIc.mjs +0 -3
- package/dist/command-CsZFRm3P.mjs +0 -2
- package/dist/command-DBz8QiFk.mjs +0 -2
- package/dist/command-RiZ_LYcm.mjs +0 -2
- package/dist/config-B4vIa0zp.mjs +0 -2
- package/dist/d1-C1GK7DsW.mjs +0 -45
- package/dist/data-security-DDhPnX8Z.mjs +0 -71
- package/dist/dev-CVD3BVUG.mjs +0 -4
- package/dist/dialog--iw0F2s-.mjs +0 -2
- package/dist/dist-CUUGKvjh.mjs +0 -48
- package/dist/dist-dc4E1u01.mjs +0 -272
- package/dist/dot-prop-6SRZBKHT-Dj7YOlwR.mjs +0 -2
- package/dist/dry-run-CLX6Pbtq.mjs +0 -2
- package/dist/durable-objects-8U8DpF9q.mjs +0 -8
- package/dist/email-security-keTqF0nJ.mjs +0 -160
- package/dist/error-sanitization-Cbd_oegl.mjs +0 -2
- package/dist/error-sanitization-DwOlM3R7.mjs +0 -2
- package/dist/firewall-67qoXiqD.mjs +0 -56
- package/dist/flagship-CjC3dF7L.mjs +0 -28
- package/dist/hyperdrive-DPWyiXpj.mjs +0 -37
- package/dist/interactive-B6woOLo-.mjs +0 -32
- package/dist/interactive-DnUvQHjc.mjs +0 -2
- package/dist/keyless-certificates-Dvib4jhw.mjs +0 -13
- package/dist/kv-CA4J7cCq.mjs +0 -21
- package/dist/local-BrfySqnx.mjs +0 -2
- package/dist/login-CLW108XX.mjs +0 -5
- package/dist/login-xgRjiyJa.mjs +0 -2
- package/dist/logs-CiDyrqEu.mjs +0 -48
- package/dist/mtls-certificates-LXlgdkf1.mjs +0 -13
- package/dist/oauth-Dzk6Gy-6.mjs +0 -14
- package/dist/open-PBXRGS4R-C4CKEADM.mjs +0 -4
- package/dist/open-PBXRGS4R-C_-G_4DC.mjs +0 -4
- package/dist/output-Bia1u2k5.mjs +0 -2
- package/dist/pages-pah6dZBJ.mjs +0 -60
- package/dist/precursor-DTTYLDEa.mjs +0 -4
- package/dist/previews-B89cUmpr.mjs +0 -4
- package/dist/progress-D_mL-Kcy.mjs +0 -2
- package/dist/prompt-sL_yMZbI.mjs +0 -3
- package/dist/r2-Chn_JQUM.mjs +0 -127
- package/dist/r2-data-catalog-Bfn3AWzn.mjs +0 -44
- package/dist/raw-fetch-lSVttVJF.mjs +0 -2
- package/dist/request-headers-POBKmu93.mjs +0 -2
- package/dist/resolve-BXemCSyA.mjs +0 -2
- package/dist/run-DtN51G2A.mjs +0 -2
- package/dist/run-oACgYK8I.mjs +0 -2
- package/dist/schema-DZSSJaY0.mjs +0 -2
- package/dist/sdk-CsWOex96.mjs +0 -3
- package/dist/security-center-DP4GC1cG.mjs +0 -30
- package/dist/shared-W9uoX1-W.mjs +0 -2
- package/dist/source-BR4_k2ad.mjs +0 -6
- package/dist/spawn-BWEuIO-w.mjs +0 -523
- package/dist/src-Hw-TlVAO.mjs +0 -108
- package/dist/startup-profile-CYEokTVe.mjs +0 -2
- package/dist/startup-profile-CgWHy4rE.mjs +0 -17
- package/dist/state-DSzkxXML.mjs +0 -2
- package/dist/telemetry-CSj_ezpk.mjs +0 -2
- package/dist/telemetry-DAf9gLyH.mjs +0 -2
- package/dist/telemetry-Dk1GcQ0u.mjs +0 -5
- package/dist/tenant-Cu4P-foo.mjs +0 -12
- package/dist/tools-BMKpYraQ.mjs +0 -2
- package/dist/ui-DH95w1Qk.mjs +0 -5
- package/dist/undici-DTSBJHNS.mjs +0 -96
- package/dist/update-check-BKQBD4MQ.mjs +0 -2
- package/dist/update-check-CE9XB6gf.mjs +0 -2
- package/dist/version-Bh3b9vTa.mjs +0 -2
- package/dist/workers-CXuyjZB8.mjs +0 -36
- package/dist/workers-for-platforms-B57iKiSN.mjs +0 -25
- /package/dist/{Page-C-JHZnIy.mjs → Page-DAgOEX17.mjs} +0 -0
- /package/dist/{alerts-CstOk8n0.mjs → alerts-D3iKtzoN.mjs} +0 -0
- /package/dist/{autorag-PRTwXGgn.mjs → autorag-pvRfDwne.mjs} +0 -0
- /package/dist/{body-parser-CUWbw_Tq.mjs → body-parser-NjzJZMOV.mjs} +0 -0
- /package/dist/{brands-BHRXlWDm.mjs → brands-DP5Ndir1.mjs} +0 -0
- /package/dist/{clear-UvKESVx3.mjs → clear-qLKPlJqb.mjs} +0 -0
- /package/dist/{cli-types-tt_LZMbn.mjs → cli-types-_Kmwfpnp.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-DwnFeZg0.mjs → connector-telemetry-events-latest-_aCmWeZx.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-Dv6rZlxs.mjs → connector-telemetry-snapshots-latest-CffEplpV.mjs} +0 -0
- /package/dist/{domain-info-BqTDXNBo.mjs → domain-info-BQh9XapD.mjs} +0 -0
- /package/dist/{health-CwPzzrV6.mjs → health--10IShMi.mjs} +0 -0
- /package/dist/{input-validation-Ch4Vllrm.mjs → input-validation-0CeePPHp.mjs} +0 -0
- /package/dist/{internal-WLHfxX64.mjs → internal-BUs583vv.mjs} +0 -0
- /package/dist/{lifecycle-Ichnb2x1.mjs → lifecycle-Cyc3fmyN.mjs} +0 -0
- /package/dist/{live-D_k7eHdv.mjs → live-VCSxA0N9.mjs} +0 -0
- /package/dist/{metadata-APBiectA.mjs → metadata-C33s4rc-.mjs} +0 -0
- /package/dist/{project-settings-DSXevRvj.mjs → project-settings-Bf6rReo1.mjs} +0 -0
- /package/dist/{rate-limit-analytics-CDTPxSET.mjs → rate-limit-analytics-D3q0mGv2.mjs} +0 -0
- /package/dist/{rate-limits-C3K9smdl.mjs → rate-limits-BIxlBuMn.mjs} +0 -0
- /package/dist/{ready-CvwvbdTX.mjs → ready-CAgelFmC.mjs} +0 -0
- /package/dist/{recent-submissions-CjzcT-iH.mjs → recent-submissions-B3TOjNmk.mjs} +0 -0
- /package/dist/{refute-CIAFMj00.mjs → refute-BZNkFpBB.mjs} +0 -0
- /package/dist/{resolve-CUDKxUrW.mjs → resolve-CGKqk7q8.mjs} +0 -0
- /package/dist/{scan-logo-zFkphtQ3.mjs → scan-logo-StecHiaf.mjs} +0 -0
- /package/dist/{scan-page-CLl2MAkZ.mjs → scan-page-B4adr-vD.mjs} +0 -0
- /package/dist/{search-12jA1b4l.mjs → search-Devngw4M.mjs} +0 -0
- /package/dist/{signed-url-U0T_PEMR.mjs → signed-url-ChR5eXXd.mjs} +0 -0
- /package/dist/{submission-info-CZ84a3Nb.mjs → submission-info-BGb81HZN.mjs} +0 -0
- /package/dist/{total-queries-CJTc9Pde.mjs → total-queries-_wa6KxEl.mjs} +0 -0
- /package/dist/{tracked-domains-BKLxnnSv.mjs → tracked-domains-BesKGqfI.mjs} +0 -0
- /package/dist/{verify-CZW5Fo1q.mjs → verify-CYM5GlPu.mjs} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cf",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.11",
|
|
4
4
|
"description": "The Cloudflare CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -47,7 +47,10 @@
|
|
|
47
47
|
"imports": {
|
|
48
48
|
"#commands/*": "./src/commands/*",
|
|
49
49
|
"#lib/*": "./src/lib/*",
|
|
50
|
-
"#sdk": "./src/sdk/sdk/index.ts"
|
|
50
|
+
"#sdk": "./src/sdk/sdk/index.ts",
|
|
51
|
+
"#sdk/errors": "./src/sdk/sdk/errors/index.ts",
|
|
52
|
+
"#sdk/client": "./src/sdk/sdk/Client.ts",
|
|
53
|
+
"#sdk/environments": "./src/sdk/sdk/environments.ts"
|
|
51
54
|
},
|
|
52
55
|
"exports": {
|
|
53
56
|
".": "./dist/index.mjs",
|
|
@@ -58,30 +61,33 @@
|
|
|
58
61
|
"./package.json": "./package.json"
|
|
59
62
|
},
|
|
60
63
|
"dependencies": {
|
|
61
|
-
"@cloudflare/build-output-utils": "0.8.
|
|
62
|
-
"@cloudflare/
|
|
63
|
-
"@cloudflare/
|
|
64
|
+
"@cloudflare/build-output-utils": "0.8.4",
|
|
65
|
+
"@cloudflare/codemods": "0.3.0",
|
|
66
|
+
"@cloudflare/config": "0.22.0",
|
|
67
|
+
"@cloudflare/runtime-types": "0.1.6",
|
|
64
68
|
"blake3-wasm": "2.1.5",
|
|
65
|
-
"miniflare": "5.
|
|
69
|
+
"miniflare": "5.20260930.0-alpha",
|
|
70
|
+
"minisearch": "7.2.0"
|
|
66
71
|
},
|
|
67
72
|
"devDependencies": {
|
|
68
73
|
"@bomb.sh/tab": "0.0.15",
|
|
69
74
|
"@clack/core": "1.2.0",
|
|
70
75
|
"@clack/prompts": "^1.2.0",
|
|
71
|
-
"@cloudflare/autoconfig": "0.
|
|
72
|
-
"@cloudflare/cli-shared-helpers": "0.1
|
|
73
|
-
"@cloudflare/containers-shared": "0.
|
|
74
|
-
"@cloudflare/deploy-helpers": "0.
|
|
76
|
+
"@cloudflare/autoconfig": "0.7.3",
|
|
77
|
+
"@cloudflare/cli-shared-helpers": "0.2.1",
|
|
78
|
+
"@cloudflare/containers-shared": "0.21.1",
|
|
79
|
+
"@cloudflare/deploy-helpers": "0.19.0",
|
|
75
80
|
"@cloudflare/forge": "file:../../vendor/cloudflare-forge-0.1.0.tgz",
|
|
76
81
|
"@cloudflare/forge-transformer-sdk-ts": "file:../../vendor/cloudflare-forge-transformer-sdk-ts-0.1.0.tgz",
|
|
77
|
-
"@cloudflare/workers-auth": "0.
|
|
78
|
-
"@cloudflare/workers-utils": "0.
|
|
82
|
+
"@cloudflare/workers-auth": "0.11.0",
|
|
83
|
+
"@cloudflare/workers-utils": "0.45.0",
|
|
79
84
|
"@types/node": "25.3.5",
|
|
80
85
|
"@types/semver": "7.7.1",
|
|
81
86
|
"@types/shell-quote": "^1.7.5",
|
|
82
87
|
"@types/yargs": "17.0.35",
|
|
83
88
|
"chalk": "5.6.2",
|
|
84
89
|
"ci-info": "^4.4.0",
|
|
90
|
+
"esbuild": "0.28.1",
|
|
85
91
|
"execa": "^6.1.0",
|
|
86
92
|
"figures": "6.1.0",
|
|
87
93
|
"minimatch": "10.2.5",
|
|
@@ -90,8 +96,8 @@
|
|
|
90
96
|
"shell-quote": "^1.8.1",
|
|
91
97
|
"tsdown": "^0.21.0",
|
|
92
98
|
"tsx": "4.21.0",
|
|
93
|
-
"undici": "7.29.
|
|
94
|
-
"vitest": "4.1.
|
|
99
|
+
"undici": "7.29.1",
|
|
100
|
+
"vitest": "4.1.11",
|
|
95
101
|
"yargs": "18.0.0",
|
|
96
102
|
"zod": "4.4.3"
|
|
97
103
|
},
|
|
@@ -102,8 +108,10 @@
|
|
|
102
108
|
"generate": "tsx generate.ts",
|
|
103
109
|
"dev": "tsx src/dev.ts",
|
|
104
110
|
"build": "tsdown",
|
|
111
|
+
"build:test": "tsdown --config tsdown.test.config.ts",
|
|
105
112
|
"check:type": "tsgo --noEmit",
|
|
106
113
|
"test": "vitest run",
|
|
107
|
-
"test:watch": "vitest"
|
|
114
|
+
"test:watch": "vitest",
|
|
115
|
+
"test:imports": "vitest run --maxWorkers=1 --no-file-parallelism --experimental.importDurations.limit=100000 --reporter=default --reporter=./src/__tests__/helpers/import-reporter.ts"
|
|
108
116
|
}
|
|
109
117
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p}from"./prompt-sL_yMZbI.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 abuse-reports appeals eligibility <report-id>
|
|
3
|
-
|
|
4
|
-
Returns whether the report is currently appealable, along with the signals behind that decision: whether it already has an open appeal, how many appeals have been submitted against it, and whether it has at least one mitigation that an appeal could reverse.`).positional(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`eligibility <report-id>`,describe:`Check whether a report can be appealed`,builder:h,handler:async c=>s({command:`abuse-reports appeals eligibility`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf abuse-reports appeals eligibility`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${c[`report-id`]==null?`<report-id>`:encodeURIComponent(String(c[`report-id`]))}/appeals/eligibility`,pathParams:{"report-id":String(c[`report-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.abuseReports.appeals.eligibility({account_id:l,report_id:c[`report-id`]})),{successLabel:`Loaded`})})},_={command:`appeals`,describe:`Operations for appeals`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage("$0 abuse-reports create <report-param>\n\nSubmit an abuse report of a particular type. Requires the abuse-reports entitlement on the account (Enterprise accounts have it by default; other accounts must request access) and an API token with the `Account > Abuse Reports > Edit` permission. If the account is not entitled, the request is rejected with an HTTP `401` response (see below).").positional(`report-param`,{type:`string`,description:`The report type to be submitted. Example: abuse_general`,demandOption:!0}).option(`act`,{type:`string`,description:`The act field`,choices:[`abuse_dmca`,`abuse_trademark`,`abuse_general`,`abuse_phishing`,`abuse_children`,`abuse_threat`,`abuse_registrar_whois`,`abuse_ncsei`]}).option(`comments`,{type:`string`,description:`Any additional comments about the infringement not exceeding 2000 characters`}).option(`company`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email`,{type:`string`,description:`A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email2`,{type:`string`,description:"Should match the value provided in `email`"}).option(`name`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`reported-country`,{type:`string`,description:`Text containing 2 characters`}).option(`reported-user-agent`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`tele`,{type:`string`,description:`Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`title`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`urls`,{type:`string`,description:`A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`address1`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agent-name`,{type:`string`,description:`The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agree`,{type:`number`,description:"Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"}).option(`city`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`country`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).
|
|
5
|
-
`}).option(`host-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
6
|
-
`,choices:[`send`,`send-anon`]}).option(`original-work`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).
|
|
7
|
-
`}).option(`owner-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
8
|
-
`,choices:[`send`,`send-anon`,`none`]}).option(`signature`,{type:`string`,description:`Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare's abuse reports`}).option(`state`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`justification`,{type:`string`,description:`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters.
|
|
9
|
-
`}).option(`trademark-number`,{type:`string`,description:`Text not exceeding 1000 characters`}).option(`trademark-office`,{type:`string`,description:`Text not exceeding 1000 characters`}).option(`trademark-symbol`,{type:`string`,description:`Text not exceeding 1000 characters`}).option(`destination-ips`,{type:`string`,description:`A list of IP addresses separated by ‘\\n’ (new line character). The list of destination IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique.`}).option(`ports-protocols`,{type:`string`,description:`A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. Each individual port/protocol should not exceed 100 characters. The list should not have more than 30 unique ports and protocols.`}).option(`source-ips`,{type:`string`,description:`A list of IP addresses separated by ‘\\n’ (new line character). The list of source IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique.`}).option(`ncmec-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
10
|
-
`,choices:[`send`,`send-anon`]}).option(`reg-who-request-reg-who-authorization-statement`,{type:`string`,description:`Optional authorization statement or power of attorney per RDP 10.2.1.3.`}).option(`reg-who-request-reg-who-good-faith-affirmation`,{type:`boolean`,description:`Affirmation that the request is made in good faith per RDP 10.2.4. Must be true.`}).option(`reg-who-request-reg-who-lawful-processing-agreement`,{type:`boolean`,description:`Agreement to process data lawfully per RDP 10.2.5. Must be true.`}).option(`reg-who-request-reg-who-legal-basis`,{type:`string`,description:`Legal rights and rationale for the request per RDP 10.2.3. Required for all WHOIS requests.`}).option(`reg-who-request-reg-who-request-type`,{type:`string`,description:`The type of WHOIS data request per RDP procedure.`,choices:[`disclosure`,`invalid_whois`]}).option(`reg-who-request-reg-who-requested-data-elements`,{type:`string`,array:!0,description:`The specific WHOIS data elements being requested per RDP 10.2.2. Required for all WHOIS requests.`}).option(`reg-who-request-reg-who-requestor-type`,{type:`string`,description:`The nature of the requestor per RDP 10.2.1.2.`,choices:[`government`,`corporation`,`individual`]}).option(`ncsei-subject-representation`,{type:`boolean`,description:`If the submitter is the target of NCSEI in the URLs of the abuse report.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`address1`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`address1`,[`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`agent-name`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`agent-name`,[`address1`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`agree`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`agree`,[`address1`,`agent-name`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`city`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`city`,[`address1`,`agent-name`,`agree`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`country`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`original-work`]).implies(`country`,[`address1`,`agent-name`,`agree`,`city`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`host-notification`,[`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`]).conflicts(`original-work`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`,`country`]).implies(`original-work`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`signature`,`state`]).conflicts(`signature`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`signature`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`state`]).conflicts(`state`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`state`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`]).conflicts(`justification`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`trademark-number`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`trademark-number`,[`host-notification`,`justification`,`trademark-office`,`trademark-symbol`]).conflicts(`trademark-office`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`trademark-office`,[`host-notification`,`justification`,`trademark-number`,`trademark-symbol`]).conflicts(`trademark-symbol`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`trademark-symbol`,[`host-notification`,`justification`,`trademark-number`,`trademark-office`]).conflicts(`destination-ips`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`ports-protocols`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`source-ips`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`ncmec-notification`,[`address1`,`agent-name`,`agree`,`city`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`ncmec-notification`,[`host-notification`,`justification`]).conflicts(`reg-who-request-reg-who-authorization-statement`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-good-faith-affirmation`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-lawful-processing-agreement`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-legal-basis`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-request-type`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-requested-data-elements`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-requestor-type`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`ncsei-subject-representation`,[`address1`,`agent-name`,`agree`,`city`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`]).implies(`ncsei-subject-representation`,[`host-notification`]).check(e=>{if([`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`].some(t=>e[t]!==void 0)){let t={"reg-who-request-reg-who-good-faith-affirmation":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-lawful-processing-agreement":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-legal-basis":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-request-type":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-requested-data-elements":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]},n=[`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`].filter(n=>e[n]===void 0&&!(t[n]??[]).some(t=>e[t]!==void 0));if(n.length>0)throw Error(`${n.map(e=>`--`+e).join(`, `)} ${n.length===1?`is`:`are`} required when any --reg_who_request-* flag is set`)}return!0})}const y={command:`create <report-param>`,describe:`Submit an abuse report`,builder:v,handler:async l=>s({command:`abuse-reports create`,classification:{safeFlags:[`act`,`host-notification`,`owner-notification`,`ncmec-notification`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf abuse-reports create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${l[`report-param`]==null?`<report-param>`:encodeURIComponent(String(l[`report-param`]))}`,pathParams:{"report-param":String(l[`report-param`]??``)},bodyKind:`json`,body:l.body===void 0?u({act:d(l.act,`act`,`text`),comments:d(l.comments,`comments`,`text`),company:d(l.company,`company`,`text`),email:d(l.email,`email`,`text`),email2:d(l.email2,`email2`,`text`),name:d(l.name,`name`,`text`),reported_country:d(l[`reported-country`],`reported-country`,`text`),reported_user_agent:d(l[`reported-user-agent`],`reported-user-agent`,`text`),tele:d(l.tele,`tele`,`text`),title:d(l.title,`title`,`text`),urls:d(l.urls,`urls`,`text`),address1:d(l.address1,`address1`,`text`),agent_name:d(l[`agent-name`],`agent-name`,`text`),agree:l.agree,city:d(l.city,`city`,`text`),country:d(l.country,`country`,`text`),host_notification:d(l[`host-notification`],`host-notification`,`text`),original_work:d(l[`original-work`],`original-work`,`text`),owner_notification:d(l[`owner-notification`],`owner-notification`,`text`),signature:d(l.signature,`signature`,`text`),state:d(l.state,`state`,`text`),justification:d(l.justification,`justification`,`text`),trademark_number:d(l[`trademark-number`],`trademark-number`,`text`),trademark_office:d(l[`trademark-office`],`trademark-office`,`text`),trademark_symbol:d(l[`trademark-symbol`],`trademark-symbol`,`text`),destination_ips:d(l[`destination-ips`],`destination-ips`,`text`),ports_protocols:d(l[`ports-protocols`],`ports-protocols`,`text`),source_ips:d(l[`source-ips`],`source-ips`,`text`),ncmec_notification:d(l[`ncmec-notification`],`ncmec-notification`,`text`),reg_who_request:{reg_who_authorization_statement:d(l[`reg-who-request-reg-who-authorization-statement`],`reg-who-request-reg-who-authorization-statement`,`text`),reg_who_good_faith_affirmation:l[`reg-who-request-reg-who-good-faith-affirmation`],reg_who_lawful_processing_agreement:l[`reg-who-request-reg-who-lawful-processing-agreement`],reg_who_legal_basis:d(l[`reg-who-request-reg-who-legal-basis`],`reg-who-request-reg-who-legal-basis`,`text`),reg_who_request_type:d(l[`reg-who-request-reg-who-request-type`],`reg-who-request-reg-who-request-type`,`text`),reg_who_requested_data_elements:l[`reg-who-request-reg-who-requested-data-elements`],reg_who_requestor_type:d(l[`reg-who-request-reg-who-requestor-type`],`reg-who-request-reg-who-requestor-type`,`text`)},ncsei_subject_representation:l[`ncsei-subject-representation`]}):c(l.body)});return}let s=await r(l),m=l.local?e:await t();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.abuseReports.create({body:e,account_id:m,report_param:l[`report-param`]})),{successLabel:`Created`});return}if(l.act===void 0&&(l.act=await p(`act`,`The act field`,[`abuse_dmca`,`abuse_trademark`,`abuse_general`,`abuse_phishing`,`abuse_children`,`abuse_threat`,`abuse_registrar_whois`,`abuse_ncsei`])),l.email===void 0&&(l.email=await f(`email`,`A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),l.email2===void 0&&(l.email2=await f(`email2`,"Should match the value provided in `email`")),l.name===void 0&&(l.name=await f(`name`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),l.urls===void 0&&(l.urls=await f(`urls`,`A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),l[`owner-notification`]===void 0&&(l[`owner-notification`]=await p(`owner-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,[`send`,`send-anon`,`none`])),l.act===`abuse_dmca`&&l.address1===void 0&&(l.address1=await f(`address1`,`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`,{question:`Enter value for --address1`})),l.act===`abuse_dmca`&&l[`agent-name`]===void 0&&(l[`agent-name`]=await f(`agent-name`,`The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`,{question:`Enter value for --agent-name`})),l.act===`abuse_dmca`&&l.agree===void 0)throw Error(`--agree is required (or pass --body with this field set).`);if(l.act===`abuse_dmca`&&l.city===void 0&&(l.city=await f(`city`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`,{question:`Enter value for --city`})),l.act===`abuse_dmca`&&l.country===void 0&&(l.country=await f(`country`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). `,{question:`Enter value for --country`})),l.act===`abuse_dmca`&&l[`host-notification`]===void 0&&(l[`host-notification`]=await f(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),l.act===`abuse_dmca`&&l[`original-work`]===void 0&&(l[`original-work`]=await f(`original-work`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). `,{question:`Enter value for --original-work`})),l.act===`abuse_dmca`&&l.signature===void 0&&(l.signature=await f(`signature`,`Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare's abuse reports`,{question:`Enter value for --signature`})),l.act===`abuse_dmca`&&l.state===void 0&&(l.state=await f(`state`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`,{question:`Enter value for --state`})),l.act===`abuse_trademark`&&l[`host-notification`]===void 0&&(l[`host-notification`]=await f(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),l.act===`abuse_trademark`&&l.justification===void 0&&(l.justification=await f(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),l.act===`abuse_trademark`&&l[`trademark-number`]===void 0&&(l[`trademark-number`]=await f(`trademark-number`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-number`})),l.act===`abuse_trademark`&&l[`trademark-office`]===void 0&&(l[`trademark-office`]=await f(`trademark-office`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-office`})),l.act===`abuse_trademark`&&l[`trademark-symbol`]===void 0&&(l[`trademark-symbol`]=await f(`trademark-symbol`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-symbol`})),l.act===`abuse_general`&&l[`host-notification`]===void 0&&(l[`host-notification`]=await f(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),l.act===`abuse_general`&&l.justification===void 0&&(l.justification=await f(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),l.act===`abuse_phishing`&&l[`host-notification`]===void 0&&(l[`host-notification`]=await f(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),l.act===`abuse_phishing`&&l.justification===void 0&&(l.justification=await f(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),l.act===`abuse_children`&&l[`host-notification`]===void 0&&(l[`host-notification`]=await f(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),l.act===`abuse_children`&&l.justification===void 0&&(l.justification=await f(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),l.act===`abuse_children`&&l[`ncmec-notification`]===void 0&&(l[`ncmec-notification`]=await f(`ncmec-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --ncmec-notification`})),l.act===`abuse_threat`&&l[`host-notification`]===void 0&&(l[`host-notification`]=await f(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),l.act===`abuse_threat`&&l.justification===void 0&&(l.justification=await f(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),l.act===`abuse_ncsei`&&l[`host-notification`]===void 0&&(l[`host-notification`]=await f(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),l.act===`abuse_ncsei`&&l[`ncsei-subject-representation`]===void 0)throw Error(`--ncsei-subject-representation is required (or pass --body with this field set).`);let h=u({act:d(l.act,`act`,`text`),comments:d(l.comments,`comments`,`text`),company:d(l.company,`company`,`text`),email:d(l.email,`email`,`text`),email2:d(l.email2,`email2`,`text`),name:d(l.name,`name`,`text`),reported_country:d(l[`reported-country`],`reported-country`,`text`),reported_user_agent:d(l[`reported-user-agent`],`reported-user-agent`,`text`),tele:d(l.tele,`tele`,`text`),title:d(l.title,`title`,`text`),urls:d(l.urls,`urls`,`text`),address1:d(l.address1,`address1`,`text`),agent_name:d(l[`agent-name`],`agent-name`,`text`),agree:l.agree,city:d(l.city,`city`,`text`),country:d(l.country,`country`,`text`),host_notification:d(l[`host-notification`],`host-notification`,`text`),original_work:d(l[`original-work`],`original-work`,`text`),owner_notification:d(l[`owner-notification`],`owner-notification`,`text`),signature:d(l.signature,`signature`,`text`),state:d(l.state,`state`,`text`),justification:d(l.justification,`justification`,`text`),trademark_number:d(l[`trademark-number`],`trademark-number`,`text`),trademark_office:d(l[`trademark-office`],`trademark-office`,`text`),trademark_symbol:d(l[`trademark-symbol`],`trademark-symbol`,`text`),destination_ips:d(l[`destination-ips`],`destination-ips`,`text`),ports_protocols:d(l[`ports-protocols`],`ports-protocols`,`text`),source_ips:d(l[`source-ips`],`source-ips`,`text`),ncmec_notification:d(l[`ncmec-notification`],`ncmec-notification`,`text`),reg_who_request:{reg_who_authorization_statement:d(l[`reg-who-request-reg-who-authorization-statement`],`reg-who-request-reg-who-authorization-statement`,`text`),reg_who_good_faith_affirmation:l[`reg-who-request-reg-who-good-faith-affirmation`],reg_who_lawful_processing_agreement:l[`reg-who-request-reg-who-lawful-processing-agreement`],reg_who_legal_basis:d(l[`reg-who-request-reg-who-legal-basis`],`reg-who-request-reg-who-legal-basis`,`text`),reg_who_request_type:d(l[`reg-who-request-reg-who-request-type`],`reg-who-request-reg-who-request-type`,`text`),reg_who_requested_data_elements:l[`reg-who-request-reg-who-requested-data-elements`],reg_who_requestor_type:d(l[`reg-who-request-reg-who-requestor-type`],`reg-who-request-reg-who-requestor-type`,`text`)},ncsei_subject_representation:l[`ncsei-subject-representation`]});i(await o(`Creating`,async()=>s.abuseReports.create({body:h,account_id:m,report_param:l[`report-param`]})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 abuse-reports emails list-submitted <report-id>
|
|
11
|
-
|
|
12
|
-
List successful emails sent to the submitter of a report submitted by the account. Does not include emails sent to customers or hosts.`).positional(`report-id`,{type:`string`,description:`Public report code.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number to retrieve (default 1).`}).option(`per-page`,{type:`number`,description:`Number of emails per page (default 20, max 100).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list-submitted <report-id>`,describe:`List emails sent to an abuse report submitter`,builder:b,handler:async c=>s({command:`abuse-reports emails list-submitted`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf abuse-reports emails list-submitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/submitted/${c[`report-id`]==null?`<report-id>`:encodeURIComponent(String(c[`report-id`]))}/emails`,pathParams:{"report-id":String(c[`report-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.emails.listSubmitted({account_id:u,report_id:c[`report-id`],...s})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 abuse-reports emails list
|
|
13
|
-
|
|
14
|
-
List emails sent to the customer for an abuse report. Returns all successful customer emails sent for the specified abuse report. Does not include emails sent to hosts or submitters.`).option(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number to retrieve (default 1)`}).option(`per-page`,{type:`number`,description:`Number of emails per page (default 20, max 100)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List abuse report emails`,builder:S,handler:async c=>s({command:`abuse-reports emails list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf abuse-reports emails list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${c[`report-id`]==null?`<report-id>`:encodeURIComponent(String(c[`report-id`]))}/emails`,pathParams:{"report-id":String(c[`report-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.emails.list({account_id:u,report_id:c[`report-id`],...s})),{successLabel:`Loaded`})})},w={command:`emails`,describe:`Emails operations`,builder:e=>e.command(C).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 abuse-reports get-submitted <report-id>
|
|
15
|
-
|
|
16
|
-
Retrieve a report submitted by the account.`).positional(`report-id`,{type:`string`,description:`Public report code.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get-submitted <report-id>`,describe:`Get a submitted abuse report`,builder:T,handler:async c=>s({command:`abuse-reports get-submitted`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf abuse-reports get-submitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/submitted/${c[`report-id`]==null?`<report-id>`:encodeURIComponent(String(c[`report-id`]))}`,pathParams:{"report-id":String(c[`report-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.abuseReports.getSubmitted({account_id:l,report_id:c[`report-id`]})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 abuse-reports get <report-param>
|
|
17
|
-
|
|
18
|
-
Retrieve the details of an abuse report.`).positional(`report-param`,{type:`string`,description:`Identifier of the abuse report`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <report-param>`,describe:`Abuse Report Details`,builder:D,handler:async c=>s({command:`abuse-reports get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf abuse-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${c[`report-param`]==null?`<report-param>`:encodeURIComponent(String(c[`report-param`]))}`,pathParams:{"report-param":String(c[`report-param`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.abuseReports.get({account_id:l,report_param:c[`report-param`]})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 abuse-reports list-submitted
|
|
19
|
-
|
|
20
|
-
List abuse reports submitted by the account.`).option(`page`,{type:`number`,description:`Page of submitted reports to return.`}).option(`per-page`,{type:`number`,description:`Number of submitted reports per page.`}).option(`sort`,{type:`string`,description:`A property and direction to sort by (id, cdate, domain, type, status).`}).option(`id`,{type:`string`,description:`Filter by report code.`}).option(`domain`,{type:`string`,description:`Filter by reported domain. This parameter can be specified multiple times.`}).option(`created-before`,{type:`string`,description:`Return reports submitted before this time.`}).option(`created-after`,{type:`string`,description:`Return reports submitted after this time.`}).option(`status`,{type:`string`,description:`Filter by submitter-facing status. This parameter can be specified multiple times.`}).option(`type`,{type:`string`,description:`Filter by report type. This parameter can be specified multiple times.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list-submitted`,describe:`List submitted abuse reports`,builder:m(k),handler:async c=>s({command:`abuse-reports list-submitted`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],sort:c.sort,id:c.id,domain:c.domain,created_before:c[`created-before`],created_after:c[`created-after`],status:c.status,type:c.type};if(c.dryRun){a({command:`cf abuse-reports list-submitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/submitted`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.listSubmitted({account_id:u,...s})),{successLabel:`Loaded`})})};function j(e){return e.usage(`$0 abuse-reports list
|
|
21
|
-
|
|
22
|
-
List the abuse reports for a given account`).option(`page`,{type:`number`,description:`Where in pagination to start listing abuse reports`}).option(`per-page`,{type:`number`,description:`How many abuse reports per page to list`}).option(`sort`,{type:`string`,description:`A property to sort by, followed by the order (id, cdate, domain, type, status)`}).option(`domain`,{type:`string`,description:`Filter by domain name related to the abuse report`}).option(`created-before`,{type:`string`,description:`Returns reports created before the specified date`}).option(`created-after`,{type:`string`,description:`Returns reports created after the specified date`}).option(`status`,{type:`string`,description:`Filter by the status of the report.`,choices:[`accepted`,`in_review`]}).option(`type`,{type:`string`,description:`Filter by the type of the report.`,choices:[`PHISH`,`GEN`,`THREAT`,`DMCA`,`EMER`,`TM`,`REG_WHO`,`NCSEI`,`NETWORK`]}).option(`mitigation-status`,{type:`string`,description:`Filter reports that have any mitigations in the given status.`,choices:[`pending`,`active`,`in_review`,`cancelled`,`removed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List abuse reports`,builder:m(j),handler:async c=>s({command:`abuse-reports list`,classification:{safeFlags:[`status`,`type`,`mitigation-status`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],sort:c.sort,domain:c.domain,created_before:c[`created-before`],created_after:c[`created-after`],status:c.status,type:c.type,mitigation_status:c[`mitigation-status`]};if(c.dryRun){a({command:`cf abuse-reports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.list({account_id:u,...s})),{successLabel:`Loaded`})})};function N(e){return e.usage(`$0 abuse-reports mitigations list
|
|
23
|
-
|
|
24
|
-
List mitigations done to remediate the abuse report.`).option(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`page`,{type:`number`,description:`Where in pagination to start listing abuse reports`}).option(`per-page`,{type:`number`,description:`How many abuse reports per page to list`}).option(`sort`,{type:`string`,description:`A property to sort by, followed by the order`,choices:[`type,asc`,`type,desc`,`effective_date,asc`,`effective_date,desc`,`status,asc`,`status,desc`,`entity_type,asc`,`entity_type,desc`]}).option(`type`,{type:`string`,description:`Filter by the type of mitigation. This filter parameter can be specified multiple times to include multiple types of mitigations in the result set.`}).option(`effective-before`,{type:`string`,description:`Returns mitigations that were dispatched before the given date`}).option(`effective-after`,{type:`string`,description:`Returns mitigation that were dispatched after the given date`}).option(`status`,{type:`string`,description:`Filter by the status of the mitigation.`,choices:[`pending`,`active`,`in_review`,`cancelled`,`removed`]}).option(`entity-type`,{type:`string`,description:`Filter by the type of entity the mitigation impacts.`,choices:[`url_pattern`,`account`,`zone`,`custom_expression`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List abuse report mitigations`,builder:m(N),handler:async c=>s({command:`abuse-reports mitigations list`,classification:{safeFlags:[`sort`,`status`,`entity-type`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],sort:c.sort,type:c.type,effective_before:c[`effective-before`],effective_after:c[`effective-after`],status:c.status,entity_type:c[`entity-type`]};if(c.dryRun){a({command:`cf abuse-reports mitigations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${c[`report-id`]==null?`<report-id>`:encodeURIComponent(String(c[`report-id`]))}/mitigations`,pathParams:{"report-id":String(c[`report-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.mitigations.list({account_id:u,report_id:c[`report-id`],...s})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 abuse-reports mitigations review <report-id>
|
|
25
|
-
|
|
26
|
-
Request a review for mitigations on an account. Repeating a request for a mitigation with an unresolved appeal is idempotent and returns that mitigation in the in-review state.`).positional(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`appeals`,{type:`string`,description:`List of mitigations to appeal. Provide as a JSON array of objects or @path/to/file.json.`}).option(`data-city`,{type:`string`,description:`The data.city field`}).option(`data-company`,{type:`string`,description:`The data.company field`}).option(`data-counter-notice-response`,{type:`string`,description:`The data.counter_notice_response field`}).option(`data-country`,{type:`string`,description:`The data.country field`}).option(`data-email`,{type:`string`,description:`The data.email field`}).option(`data-full-name`,{type:`string`,description:`The data.full_name field`}).option(`data-jurisdiction-consent`,{type:`boolean`,description:`The data.jurisdiction_consent field`}).option(`data-perjury-attestation`,{type:`boolean`,description:`The data.perjury_attestation field`}).option(`data-phone-number`,{type:`string`,description:`The data.phone_number field`}).option(`data-signature`,{type:`string`,description:`The data.signature field`}).option(`data-state`,{type:`string`,description:`The data.state field`}).option(`data-street-address`,{type:`string`,description:`The data.street_address field`}).option(`data-urls`,{type:`string`,array:!0,description:`The data.urls field`}).option(`data-zip-code`,{type:`string`,description:`The data.zip_code field`}).option(`type`,{type:`string`,description:`The type of appeal being submitted.`,choices:[`counter_notice`,`content_removed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Submit an appeal for a report. Provide either a list of mitigations to appeal, or an appeal type with its supporting details, but not both. When type is "counter_notice", the counter-notice details are required.`}).check(e=>{if([`data-city`,`data-company`,`data-counter-notice-response`,`data-country`,`data-email`,`data-full-name`,`data-jurisdiction-consent`,`data-perjury-attestation`,`data-phone-number`,`data-signature`,`data-state`,`data-street-address`,`data-urls`,`data-zip-code`].some(t=>e[t]!==void 0)){let t=[`data-city`,`data-country`,`data-email`,`data-full-name`,`data-jurisdiction-consent`,`data-perjury-attestation`,`data-phone-number`,`data-signature`,`data-state`,`data-street-address`,`data-urls`,`data-zip-code`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --data-* flag is set`)}return!0})}const I={command:`review <report-id>`,describe:`Request review on mitigations`,builder:F,handler:async f=>s({command:`abuse-reports mitigations review`,classification:{safeFlags:[`data-jurisdiction-consent`,`data-perjury-attestation`,`type`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf abuse-reports mitigations review`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${f[`report-id`]==null?`<report-id>`:encodeURIComponent(String(f[`report-id`]))}/mitigations/appeal`,pathParams:{"report-id":String(f[`report-id`]??``)},bodyKind:`json`,body:f.body===void 0?u({appeals:l(f.appeals,`appeals`),data:{city:d(f[`data-city`],`data-city`,`text`),company:d(f[`data-company`],`data-company`,`text`),counter_notice_response:d(f[`data-counter-notice-response`],`data-counter-notice-response`,`text`),country:d(f[`data-country`],`data-country`,`text`),email:d(f[`data-email`],`data-email`,`text`),full_name:d(f[`data-full-name`],`data-full-name`,`text`),jurisdiction_consent:f[`data-jurisdiction-consent`],perjury_attestation:f[`data-perjury-attestation`],phone_number:d(f[`data-phone-number`],`data-phone-number`,`text`),signature:d(f[`data-signature`],`data-signature`,`text`),state:d(f[`data-state`],`data-state`,`text`),street_address:d(f[`data-street-address`],`data-street-address`,`text`),urls:f[`data-urls`],zip_code:d(f[`data-zip-code`],`data-zip-code`,`text`)},type:d(f.type,`type`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.abuseReports.mitigations.review({body:e,account_id:p,report_id:f[`report-id`]})),{successLabel:`Created`});return}let m=u({appeals:l(f.appeals,`appeals`),data:{city:d(f[`data-city`],`data-city`,`text`),company:d(f[`data-company`],`data-company`,`text`),counter_notice_response:d(f[`data-counter-notice-response`],`data-counter-notice-response`,`text`),country:d(f[`data-country`],`data-country`,`text`),email:d(f[`data-email`],`data-email`,`text`),full_name:d(f[`data-full-name`],`data-full-name`,`text`),jurisdiction_consent:f[`data-jurisdiction-consent`],perjury_attestation:f[`data-perjury-attestation`],phone_number:d(f[`data-phone-number`],`data-phone-number`,`text`),signature:d(f[`data-signature`],`data-signature`,`text`),state:d(f[`data-state`],`data-state`,`text`),street_address:d(f[`data-street-address`],`data-street-address`,`text`),urls:f[`data-urls`],zip_code:d(f[`data-zip-code`],`data-zip-code`,`text`)},type:d(f.type,`type`,`text`)});i(await o(`Creating`,async()=>s.abuseReports.mitigations.review({body:m,account_id:p,report_id:f[`report-id`]})),{successLabel:`Created`})})},L={command:`mitigations`,describe:`Mitigation actions taken in response to abuse reports`,builder:e=>e.command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},R={command:`abuse-reports`,describe:`Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites`,builder:e=>e.command(y).command(O).command(E).command(M).command(A).command(_).command(w).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{R as default};
|
package/dist/access-C_2rEi0H.mjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,n as p}from"./prompt-sL_yMZbI.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 access targets bulk delete
|
|
3
|
-
|
|
4
|
-
Removes one or more targets.`).option(`target-ids`,{type:`string`,array:!0,description:`List of target IDs to bulk delete`}).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 g={command:`delete`,describe:`Delete targets`,builder:h,handler:async l=>s({command:`access targets bulk delete`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf access targets bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/batch_delete`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({target_ids:l[`target-ids`]}):c(l.body)});return}let s=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.access.targets.bulk.delete({...e,account_id:d})),{successLabel:`Created`});return}if(l[`target-ids`]===void 0)throw Error(`--target-ids is required (or pass --body with this field set).`);let f=u({target_ids:l[`target-ids`]});i(await o(`Creating`,async()=>s.access.targets.bulk.delete({...f,account_id:d})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 access targets bulk replace-tags
|
|
5
|
-
|
|
6
|
-
Replaces tags for one or more existing infrastructure access targets.`).option(`items`,{type:`string`,description:`The items field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`replace-tags`,describe:`Replace tags on existing targets`,builder:_,handler:async d=>s({command:`access targets bulk replace-tags`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf access targets bulk replace-tags`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/batch_tags`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({items:l(d.items,`items`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.access.targets.bulk.replaceTags({...e,account_id:f})),{successLabel:`Created`});return}if(d.items===void 0)throw Error(`--items is required (or pass --body with this field set).`);let p=u({items:l(d.items,`items`)});i(await o(`Creating`,async()=>s.access.targets.bulk.replaceTags({...p,account_id:f})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 access targets bulk update
|
|
7
|
-
|
|
8
|
-
Adds one or more targets.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`update`,describe:`Create new targets`,builder:y,handler:async l=>s({command:`access targets bulk update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf access targets bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/batch`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.access.targets.bulk.update({body:e,account_id:u})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},x={command:`bulk`,describe:`Operations for targets.bulk`,builder:e=>e.command(g).command(v).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.usage(`$0 access targets create
|
|
9
|
-
|
|
10
|
-
Creates a new infrastructure access target in the account.`).option(`hostname`,{type:`string`,description:`A non-unique field that refers to a target. Case insensitive, maximum
|
|
11
|
-
length of 255 characters, supports the use of special characters dash
|
|
12
|
-
and period, does not support spaces, and must start and end with an
|
|
13
|
-
alphanumeric character.`}).option(`ip-ipv4-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv4-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`ip-ipv6-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv6-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).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:`create`,describe:`Create new target`,builder:S,handler:async l=>s({command:`access targets create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf access targets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({hostname:d(l.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:d(l[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:d(l[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:d(l[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:d(l[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.access.targets.create({...e,account_id:p})),{successLabel:`Created`});return}l.hostname===void 0&&(l.hostname=await f(`hostname`,`A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.`));let m=u({hostname:d(l.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:d(l[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:d(l[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:d(l[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:d(l[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}});i(await o(`Creating`,async()=>s.access.targets.create({...m,account_id:p})),{successLabel:`Created`})})};function w(e){return e.usage(`$0 access targets delete <target-id>
|
|
14
|
-
|
|
15
|
-
Removes a single infrastructure access target by its ID.`).positional(`target-id`,{type:`string`,description:`Target identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const T={command:`delete <target-id>`,describe:`Delete target`,builder:w,handler:async c=>s({command:`access targets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf access targets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/${c[`target-id`]==null?`<target-id>`:encodeURIComponent(String(c[`target-id`]))}`,pathParams:{"target-id":String(c[`target-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force})){process.stderr.write(`Aborted.
|
|
16
|
-
`);return}i(await o(`Deleting`,async()=>s.access.targets.delete({account_id:l,target_id:c[`target-id`]})),{successLabel:`Deleted`})})};function E(e){return e.usage(`$0 access targets get <target-id>
|
|
17
|
-
|
|
18
|
-
Fetches a single infrastructure access target by its ID.`).positional(`target-id`,{type:`string`,description:`Target identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <target-id>`,describe:`Get target`,builder:E,handler:async c=>s({command:`access targets get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf access targets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/${c[`target-id`]==null?`<target-id>`:encodeURIComponent(String(c[`target-id`]))}`,pathParams:{"target-id":String(c[`target-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.access.targets.get({account_id:l,target_id:c[`target-id`]})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 access targets list
|
|
19
|
-
|
|
20
|
-
Lists and sorts an account's targets. Filters are optional and are ANDed together.`).option(`hostname`,{type:`string`,description:`Hostname of a target`}).option(`hostname-contains`,{type:`string`,description:`Partial match to the hostname of a target`}).option(`virtual-network-id`,{type:`string`,description:`Private virtual network identifier of the target`}).option(`ip-v4`,{type:`string`,description:`IPv4 address of the target`}).option(`ip-v6`,{type:`string`,description:`IPv6 address of the target`}).option(`created-before`,{type:`string`,description:`Date and time at which the target was created before (inclusive)`}).option(`created-after`,{type:`string`,description:`Date and time at which the target was created after (inclusive)`}).option(`modified-before`,{type:`string`,description:`Date and time at which the target was modified before (inclusive)`}).option(`modified-after`,{type:`string`,description:`Date and time at which the target was modified after (inclusive)`}).option(`ips`,{type:`string`,description:"Filters for targets that have any of the following IP addresses. Specify\n`ips` multiple times in query parameter to build list of candidates."}).option(`target-ids`,{type:`string`,description:`Filters for targets that have any of the following UUIDs. Specify
|
|
21
|
-
\`target_ids\` multiple times in query parameter to build list of
|
|
22
|
-
candidates.`}).option(`ip-like`,{type:`string`,description:"Filters for targets whose IP addresses look like the specified string.\nSupports `*` as a wildcard character"}).option(`ipv4-start`,{type:`string`,description:"Defines an IPv4 filter range's starting value (inclusive). Requires\n`ipv4_end` to be specified as well."}).option(`ipv4-end`,{type:`string`,description:"Defines an IPv4 filter range's ending value (inclusive). Requires\n`ipv4_start` to be specified as well."}).option(`ipv6-start`,{type:`string`,description:"Defines an IPv6 filter range's starting value (inclusive). Requires\n`ipv6_end` to be specified as well."}).option(`ipv6-end`,{type:`string`,description:"Defines an IPv6 filter range's ending value (inclusive). Requires\n`ipv6_start` to be specified as well."}).option(`tag`,{type:`string`,description:"Filter by tag key:value pairs. Multiple `tag` params are AND'd.\nFormat: `tag=key:value` (e.g., `tag=environment:production`).\nKey and value must both be non-empty; `tag=:value` and `tag=key:` return 400."}).option(`page`,{type:`number`,description:`Current page in the response`}).option(`per-page`,{type:`number`,description:`Max amount of entries returned per page`}).option(`order`,{type:`string`,description:`The field to sort by.`,choices:[`hostname`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List all targets`,builder:m(O),handler:async c=>s({command:`access targets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},c,async()=>{let s={hostname:c.hostname,hostname_contains:c[`hostname-contains`],virtual_network_id:c[`virtual-network-id`],ip_v4:c[`ip-v4`],ip_v6:c[`ip-v6`],created_before:c[`created-before`],created_after:c[`created-after`],modified_before:c[`modified-before`],modified_after:c[`modified-after`],ips:c.ips,target_ids:c[`target-ids`],ip_like:c[`ip-like`],ipv4_start:c[`ipv4-start`],ipv4_end:c[`ipv4-end`],ipv6_start:c[`ipv6-start`],ipv6_end:c[`ipv6-end`],tag:c.tag,page:c.page,per_page:c[`per-page`],order:c.order,direction:c.direction};if(c.dryRun){a({command:`cf access targets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.access.targets.list({account_id:u,...s})),{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 access targets update <target-id>
|
|
23
|
-
|
|
24
|
-
Updates an existing infrastructure access target by its ID.`).positional(`target-id`,{type:`string`,description:`Target identifier`,demandOption:!0}).option(`hostname`,{type:`string`,description:`A non-unique field that refers to a target. Case insensitive, maximum
|
|
25
|
-
length of 255 characters, supports the use of special characters dash
|
|
26
|
-
and period, does not support spaces, and must start and end with an
|
|
27
|
-
alphanumeric character.`}).option(`ip-ipv4-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv4-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`ip-ipv6-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv6-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const j={command:`update <target-id>`,describe:`Update target`,builder:A,handler:async l=>s({command:`access targets update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf access targets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/${l[`target-id`]==null?`<target-id>`:encodeURIComponent(String(l[`target-id`]))}`,pathParams:{"target-id":String(l[`target-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({hostname:d(l.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:d(l[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:d(l[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:d(l[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:d(l[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.access.targets.update({...e,account_id:p,target_id:l[`target-id`]})),{successLabel:`Updated`});return}l.hostname===void 0&&(l.hostname=await f(`hostname`,`A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.`));let m=u({hostname:d(l.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:d(l[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:d(l[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:d(l[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:d(l[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}});i(await o(`Updating`,async()=>s.access.targets.update({...m,account_id:p,target_id:l[`target-id`]})),{successLabel:`Updated`})})},M={command:`targets`,describe:`Operations for targets`,builder:e=>e.command(C).command(T).command(D).command(k).command(j).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},N={command:`access`,describe:`access`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{N as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d}from"./prompt-sL_yMZbI.mjs";function f(e){return e.usage(`$0 account batch move
|
|
3
|
-
|
|
4
|
-
Batch move a collection of accounts to a specific organization. ⚠️ Not implemented.`).option(`account-ids`,{type:`string`,array:!0,description:`Move these accounts to the destination organization.`}).option(`destination-organization-id`,{type:`string`,description:`Move accounts to this organization ID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`move`,describe:`Batch move accounts`,builder:f,handler:async e=>s({command:`account batch move`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf account batch move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/move`,pathParams:{},bodyKind:`json`,body:e.body===void 0?l({account_ids:e[`account-ids`],destination_organization_id:u(e[`destination-organization-id`],`destination-organization-id`,`text`)}):c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Creating`,async()=>t.account.batch.move({...n})),{successLabel:`Created`});return}if(e[`account-ids`]===void 0)throw Error(`--account-ids is required (or pass --body with this field set).`);e[`destination-organization-id`]===void 0&&(e[`destination-organization-id`]=await d(`destination-organization-id`,`Move accounts to this organization ID.`));let n=l({account_ids:e[`account-ids`],destination_organization_id:u(e[`destination-organization-id`],`destination-organization-id`,`text`)});i(await o(`Creating`,async()=>t.account.batch.move({...n})),{successLabel:`Created`})})},m={command:`batch`,describe:`Operations for batch`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.usage(`$0 account move
|
|
5
|
-
|
|
6
|
-
Move an account within an organization hierarchy or an account outside an organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`).option(`destination-organization-id`,{type:`string`,description:`The destination_organization_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The destination organization ID is where the account is to be moved.`})}const g={command:`move`,describe:`Move account`,builder:h,handler:async f=>s({command:`account move`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf account move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/move`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({destination_organization_id:u(f[`destination-organization-id`],`destination-organization-id`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.account.move({...e,account_id:p})),{successLabel:`Created`});return}f[`destination-organization-id`]===void 0&&(f[`destination-organization-id`]=await d(`destination-organization-id`,`The destination_organization_id field`));let m=l({destination_organization_id:u(f[`destination-organization-id`],`destination-organization-id`,`text`)});i(await o(`Creating`,async()=>s.account.move({...m,account_id:p})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 account organization list
|
|
7
|
-
|
|
8
|
-
Retrieve a list of the organizations that "contain" this account or are managing it. The returned list will be in order from "root" to "leaf", where the "leaf" will be the organization that _immediately_ contains the specified account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List account organizations`,builder:_,handler:async c=>s({command:`account organization list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf account organization list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/organizations`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.account.organization.list({account_id:l})),{successLabel:`Loaded`})})},y={command:`organization`,describe:`Operations for organization`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 account profile get
|
|
9
|
-
|
|
10
|
-
Retrieves the profile information for a specific Cloudflare account, including organization details, settings, and metadata. This endpoint is commonly used to verify account access and retrieve account-level configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get`,describe:`Get account profile`,builder:b,handler:async c=>s({command:`account profile get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf account profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/profile`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.account.profile.get({account_id:l})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 account profile update
|
|
11
|
-
|
|
12
|
-
Updates the profile information for a Cloudflare account. Allows modification of account-level settings and organizational details. Requires Account Settings Write permission.`).option(`business-address`,{type:`string`,description:`The business_address field`}).option(`business-email`,{type:`string`,description:`The business_email field`}).option(`business-name`,{type:`string`,description:`The business_name field`}).option(`business-phone`,{type:`string`,description:`The business_phone field`}).option(`external-metadata`,{type:`string`,description:`The external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`update`,describe:`Modify account profile`,builder:S,handler:async f=>s({command:`account profile update`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf account profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/profile`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({business_address:u(f[`business-address`],`business-address`,`text`),business_email:u(f[`business-email`],`business-email`,`text`),business_name:u(f[`business-name`],`business-name`,`text`),business_phone:u(f[`business-phone`],`business-phone`,`text`),external_metadata:u(f[`external-metadata`],`external-metadata`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Updating`,async()=>s.account.profile.update({body:e,account_id:p})),{successLabel:`Updated`});return}f[`business-address`]===void 0&&(f[`business-address`]=await d(`business-address`,`The business_address field`)),f[`business-email`]===void 0&&(f[`business-email`]=await d(`business-email`,`The business_email field`)),f[`business-name`]===void 0&&(f[`business-name`]=await d(`business-name`,`The business_name field`)),f[`business-phone`]===void 0&&(f[`business-phone`]=await d(`business-phone`,`The business_phone field`)),f[`external-metadata`]===void 0&&(f[`external-metadata`]=await d(`external-metadata`,`The external_metadata field`));let m=l({business_address:u(f[`business-address`],`business-address`,`text`),business_email:u(f[`business-email`],`business-email`,`text`),business_name:u(f[`business-name`],`business-name`,`text`),business_phone:u(f[`business-phone`],`business-phone`,`text`),external_metadata:u(f[`external-metadata`],`external-metadata`,`text`)});i(await o(`Updating`,async()=>s.account.profile.update({body:m,account_id:p})),{successLabel:`Updated`})})},w={command:`profile`,describe:`Operations for profile`,builder:e=>e.command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},T={command:`account`,describe:`account`,builder:e=>e.command(g).command(m).command(y).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{T as default};
|
package/dist/ai-ARwLeQ1O.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{a as e}from"./theme-BiIYWOed.mjs";import{n as t,t as n}from"./local-B6b2OIBW.mjs";import{m as r,v as i}from"./oauth-Dzk6Gy-6.mjs";import{a,o,r as s}from"./auth-DJhSjNNL.mjs";import{t as c}from"./output-Bia1u2k5.mjs";import{t as l}from"./dry-run-CLX6Pbtq.mjs";import{t as u}from"./progress-D_mL-Kcy.mjs";import{n as d,t as f}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as p,t as m}from"./body-parser-CUWbw_Tq.mjs";import{n as h,t as g}from"./input-validation-Ch4Vllrm.mjs";import{a as _,i as v,n as y}from"./prompt-sL_yMZbI.mjs";import{t as b}from"./cli-types-tt_LZMbn.mjs";import{n as x}from"./raw-fetch-lSVttVJF.mjs";import{_ as S,c as C,d as w,f as T,g as ee,h as E,i as D,l as O,m as k,n as A,o as j,p as M,r as N,s as P,t as F}from"./schema-flags-C9lbLgE-.mjs";const I=`ai-model-schema`;async function L(e,t,n,r){let i=ee(I,[t,e]);if(i)return{ok:!0,schema:i};let a;try{let i=await n();if(r===void 0)a=await i.ai.getModelSchema({account_id:t,model:e});else{let n=r-Date.now();if(n<=0)return{ok:!1,reason:`the request timed out`};a=await i.ai.getModelSchema({account_id:t,model:e},{timeoutInSeconds:n/1e3,maxRetries:0})}}catch(e){return{ok:!1,reason:k(e)}}let o=E(a,`input`);return o?(S(I,[t,e],o),{ok:!0,schema:o}):{ok:!1,reason:`the API returned no input schema`}}const R="Run `cf ai models list` to see the models you can run.",z=[`model-name`,`modelName`];let B;function V(e){return B=e,e.positional(`model-name`,{type:`string`,description:`Model ID, e.g. @cf/meta/llama-3.1-8b-instruct`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this model's input flags`}).epilogue(`Input flags depend on the model: run \`cf ai run <model> --help\`.\n${R}`)}async function H(n){n.local&&console.log(`${t}\n`),B?.showHelp(`log`);let r=n[`model-name`];if(!r||n.local)return;let i=Date.now()+M,a=await o(i);if(!a){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the input flags for ${r}.`)}`);return}let c=await L(r,a,()=>s(n),i);console.log(c.ok?`\n${j(C(c.schema),`Input flags for ${r}`)}`:`\n${e.muted(`Could not load the input flags for ${r}: ${c.reason}.`)}`)}var U=d({command:`run [model-name]`,describe:"Run inference on a Workers AI model. Input flags are model-specific — see `cf ai run <model> --help`",builder:V,handler:async e=>{if(e.help){await H(e);return}if(e.local)throw Error(t);let n=e[`model-name`];if(!n)throw Error(`A model is required: cf ai run <model>. ${R}`);let o=e.dryRun?await i()??`<account-id>`:await r(),d=n.split(`/`).map(encodeURIComponent).join(`/`),f;if(e.body!==void 0){if(O(e,z).length>0)throw Error(`--body cannot be combined with model input flags. Pass one or the other.`);f=p(e.body)}else{let t=await L(n,o,()=>s(e));if(!t.ok)throw Error(`Could not load the input schema for ${n}: ${t.reason}.\nPass the request body directly instead: cf ai run ${n} --body '{…}'`);let r=C(t.schema),i=O(e,[...z,...A(r)]);if(i.length>0)throw Error(`${i.map(e=>`Unknown flag --${e}`).join(`
|
|
3
|
-
`)}\n\nRun \`cf ai run ${n} --help\` for this model's input flags.`);let a=new Set;for(;;){let t=D(r,e).find(e=>!a.has(e.name)&&(e.choices!==void 0||e.type===`string`));if(!t)break;a.add(t.name),t.choices?e[t.name]=await v(t.name,P(t),t.choices,t.choiceLabels):e[t.name]=await _(t.name,P(t))}let c=N(t.schema),l=F(r,e,{reserved:z}),u=l.errors.length===0?c?w(t.schema,l.body):T(t.schema,l.body):l.errors;if(u.length>0)throw Error(`${u.join(`
|
|
4
|
-
`)}\n\nRun \`cf ai run ${n} --help\` for this model's input flags.`);f=l.body}if(e.dryRun){l({command:`cf ai run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${o}/ai/run/${d}`,pathParams:{"model-name":n},bodyKind:`json`,body:f});return}let m=await s(e);e.accountId=o;let h=await u(`Running`,async()=>a(m,`POST`,`/accounts/${o}/ai/run/${d}`,{body:f,preserveNonJsonBytes:!0}));if(Buffer.isBuffer(h)){x(h);return}c(h,{successLabel:`Ran`})}},{command:`ai run`,recordArgs:!1});function W(e){return e.usage(`$0 ai authors list
|
|
5
|
-
|
|
6
|
-
Searches Workers AI models by author or organization name.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`Author Search`,builder:W,handler:async e=>f({command:`ai authors list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf ai authors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/authors/search`,pathParams:{},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.ai.authors.list({account_id:a})),{successLabel:`Loaded`})})},K={command:`authors`,describe:`Operations for authors`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return e.usage(`$0 ai finetunes assets create <finetune-id>
|
|
7
|
-
|
|
8
|
-
Uploads training data assets for a Workers AI fine-tuning job.`).positional(`finetune-id`,{type:`string`,description:`Finetune ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Finetune asset file upload.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`file-name`,{type:`string`,description:`Name of the file (adapter_config.json or adapter_model.safetensors).`})}const J={command:`create <finetune-id>`,describe:`Upload a Finetune Asset`,builder:q,handler:async e=>f({command:`ai finetunes assets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf ai finetunes assets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/finetunes/${e[`finetune-id`]==null?`<finetune-id>`:encodeURIComponent(String(e[`finetune-id`]))}/finetune-assets`,pathParams:{"finetune-id":String(e[`finetune-id`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,"file-name":e[`file-name`]}});return}let t=await s(e),o=e.local?n:await r();if(e.accountId=o,e.file!==void 0||e.body!==void 0||e[`file-name`]!==void 0){let n=new FormData;if(e.file){let t=g(e.file);n.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`file`,e.body);e[`file-name`]!==void 0&&n.append(`file_name`,String(h(e[`file-name`],`file-name`,`text`)??``)),c(await u(`Creating`,async()=>a(t,`POST`,`/accounts/${o}/ai/finetunes/${encodeURIComponent(String(e[`finetune-id`]))}/finetune-assets`,{body:n})),{successLabel:`Created`});return}if(e.body){let n=h(e.body,`body`,`binary`);c(await u(`Creating`,async()=>a(t,`POST`,`/accounts/${o}/ai/finetunes/${encodeURIComponent(String(e[`finetune-id`]))}/finetune-assets`,{body:n,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Y(e){return e.usage(`$0 ai finetunes assets download <file-name>
|
|
9
|
-
|
|
10
|
-
Returns a pre-signed R2 URL for downloading a finetune asset file.`).positional(`file-name`,{type:`string`,description:`File name`,demandOption:!0}).option(`finetune-id`,{type:`string`,description:`Finetune ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`download <file-name>`,describe:`Download a Finetune Asset`,builder:Y,handler:async e=>f({command:`ai finetunes assets download`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf ai finetunes assets download`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/finetunes/${e[`finetune-id`]==null?`<finetune-id>`:encodeURIComponent(String(e[`finetune-id`]))}/finetune-assets/${e[`file-name`]==null?`<file-name>`:encodeURIComponent(String(e[`file-name`]))}`,pathParams:{"finetune-id":String(e[`finetune-id`]??``),"file-name":String(e[`file-name`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.ai.finetunes.assets.download({account_id:a,finetune_id:e[`finetune-id`],file_name:e[`file-name`]})),{successLabel:`Loaded`})})},X={command:`assets`,describe:`Operations for finetunes.assets`,builder:e=>e.command(J).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Z(e){return e.usage(`$0 ai finetunes create
|
|
11
|
-
|
|
12
|
-
Creates a new fine-tuning job for a Workers AI model using custom training data.`).option(`description`,{type:`string`,description:`The description field`}).option(`model`,{type:`string`,description:`The model field`}).option(`name`,{type:`string`,description:`The name field`}).option(`public`,{type:`boolean`,description:`The public field`,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 Q={command:`create`,describe:`Create a new Finetune`,builder:Z,handler:async e=>f({command:`ai finetunes create`,classification:{safeFlags:[`public`,`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf ai finetunes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/finetunes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({description:h(e.description,`description`,`text`),model:h(e.model,`model`,`text`),name:h(e.name,`name`,`text`),public:e.public}):p(e.body)});return}let t=await s(e),a=e.local?n:await r();if(e.accountId=a,e.body){let n=p(e.body);c(await u(`Creating`,async()=>t.ai.finetunes.create({...n,account_id:a})),{successLabel:`Created`});return}e.model===void 0&&(e.model=await _(`model`,`The model field`)),e.name===void 0&&(e.name=await _(`name`,`The name field`));let o=m({description:h(e.description,`description`,`text`),model:h(e.model,`model`,`text`),name:h(e.name,`name`,`text`),public:e.public});c(await u(`Creating`,async()=>t.ai.finetunes.create({...o,account_id:a})),{successLabel:`Created`})})};function ne(e){return e.usage(`$0 ai finetunes delete <finetune-id>
|
|
13
|
-
|
|
14
|
-
Delete a finetune. Any in-flight requests referencing the lora will fail after the files are deleted.`).positional(`finetune-id`,{type:`string`,description:`Finetune ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const re={command:`delete <finetune-id>`,describe:`Delete a Finetune`,builder:ne,handler:async e=>f({command:`ai finetunes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){l({command:`cf ai finetunes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/finetunes/${e[`finetune-id`]==null?`<finetune-id>`:encodeURIComponent(String(e[`finetune-id`]))}`,pathParams:{"finetune-id":String(e[`finetune-id`]??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();if(e.accountId=a,!await y({force:!!e.force})){process.stderr.write(`Aborted.
|
|
15
|
-
`);return}c(await u(`Deleting`,async()=>t.ai.finetunes.delete({account_id:a,finetune_id:e[`finetune-id`]})),{successLabel:`Deleted`})})};function ie(e){return e.usage(`$0 ai finetunes list
|
|
16
|
-
|
|
17
|
-
Lists all fine-tuning jobs created by the account, including status and metrics.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`list`,describe:`List Finetunes`,builder:ie,handler:async e=>f({command:`ai finetunes list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf ai finetunes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/finetunes`,pathParams:{},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.ai.finetunes.list({account_id:a})),{successLabel:`Loaded`})})};function oe(e){return e.usage(`$0 ai finetunes public list
|
|
18
|
-
|
|
19
|
-
Lists publicly available fine-tuned models that can be used with Workers AI.`).option(`limit`,{type:`number`,description:`Pagination Limit.`}).option(`offset`,{type:`number`,description:`Pagination Offset.`}).option(`order-by`,{type:`string`,description:`Order By Column Name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`list`,describe:`List Public Finetunes`,builder:oe,handler:async e=>f({command:`ai finetunes public list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={limit:e.limit,offset:e.offset,orderBy:e[`order-by`]};if(e.dryRun){l({command:`cf ai finetunes public list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/finetunes/public`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await r();e.accountId=o,c(await u(`Loading`,async()=>a.ai.finetunes.public.list({account_id:o,...t})),{successLabel:`Loaded`})})},ce={command:`public`,describe:`Operations for finetunes.public`,builder:e=>e.command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},le={command:`finetunes`,describe:`Operations for finetunes`,builder:e=>e.command(Q).command(re).command(ae).command(X).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ue(e){return e.usage(`$0 ai get-model-schema
|
|
20
|
-
|
|
21
|
-
Retrieves the input and output JSON schema definition for a Workers AI model.`).option(`model`,{type:`string`,description:`Model Name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get-model-schema`,describe:`Get Model Schema`,builder:ue,handler:async e=>f({command:`ai get-model-schema`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={model:e.model};if(e.dryRun){l({command:`cf ai get-model-schema`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/models/schema`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await r();e.accountId=o,c(await u(`Loading`,async()=>a.ai.getModelSchema({account_id:o,...t})),{successLabel:`Loaded`})})};function fe(e){return e.usage(`$0 ai listMarkdownSupportedFormats
|
|
22
|
-
|
|
23
|
-
Lists all file formats supported for conversion to Markdown.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`listMarkdownSupportedFormats`,describe:`Get all converted formats supported`,builder:fe,handler:async e=>f({command:`ai listMarkdownSupportedFormats`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf ai listMarkdownSupportedFormats`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/tomarkdown/supported`,pathParams:{},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.ai.listMarkdownSupportedFormats({account_id:a})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 ai models list
|
|
24
|
-
|
|
25
|
-
Searches Workers AI models by name or description.`).option(`per-page`,{type:`number`,description:`Per page`}).option(`page`,{type:`number`,description:`Page`}).option(`task`,{type:`string`,description:`Filter by Task Name.`}).option(`author`,{type:`string`,description:`Filter by Author.`}).option(`source`,{type:`number`,description:`Filter by Source Id.`}).option(`hide-experimental`,{type:`boolean`,description:`Filter to hide experimental models.`}).option(`search`,{type:`string`,description:`Search.`}).option(`include-deprecated`,{type:`boolean`,description:`If true, include models for up to three months after their deprecation date. Defaults to false.`}).option(`format`,{type:`string`,description:`If set, return models in the requested marketplace format instead of the default response.`,choices:[`openrouter`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`Model Search`,builder:b($),handler:async e=>f({command:`ai models list`,classification:{safeFlags:[`hide-experimental`,`include-deprecated`,`format`,`dry-run`]}},e,async()=>{let t={per_page:e[`per-page`],page:e.page,task:e.task,author:e.author,source:e.source,hide_experimental:e[`hide-experimental`],search:e.search,include_deprecated:e[`include-deprecated`],format:e.format};if(e.dryRun){l({command:`cf ai models list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/models/search`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await r();e.accountId=o,c(await u(`Loading`,async()=>a.ai.models.list({account_id:o,...t})),{successLabel:`Loaded`})})},he={command:`models`,describe:`Operations for models`,builder:e=>e.command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ge(e){return e.usage(`$0 ai run-model <model-name>
|
|
26
|
-
|
|
27
|
-
This endpoint provides users with the capability to run specific AI models on-demand. By submitting the required input data, users can receive real-time predictions or results generated by the chosen AI model. The endpoint supports various AI model types, ensuring flexibility and adaptability for diverse use cases. Model specific inputs available in [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).`).positional(`model-name`,{type:`string`,description:`Model name`,demandOption:!0}).option(`text`,{type:`string`,description:`The text that you want to classify`}).option(`guidance`,{type:`number`,description:`Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt`}).option(`height`,{type:`number`,description:`The height of the generated image in pixels`}).option(`image`,{type:`string`,array:!0,description:`For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values`}).option(`image-b64`,{type:`string`,description:`For use with img2img tasks. A base64-encoded string of the input image`}).option(`mask`,{type:`string`,array:!0,description:`An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values`}).option(`negative-prompt`,{type:`string`,description:`Text describing elements to avoid in the generated image`}).option(`num-steps`,{type:`number`,description:`The number of diffusion steps; higher values can improve quality but take longer`}).option(`prompt`,{type:`string`,description:`A text description of the image you want to generate`}).option(`seed`,{type:`number`,description:`Random seed for reproducibility of the image generation`}).option(`strength`,{type:`number`,description:`A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image`}).option(`width`,{type:`number`,description:`The width of the generated image in pixels`}).option(`lang`,{type:`string`,description:`The speech language (e.g., 'en' for English, 'fr' for French). Defaults to 'en' if not specified`}).option(`source-lang`,{type:`string`,description:`The language code of the source text (e.g., 'en' for English). Defaults to 'en' if not specified`}).option(`target-lang`,{type:`string`,description:`The language code to translate the text into (e.g., 'es' for Spanish)`}).option(`input-text`,{type:`string`,description:`The text that you want the model to summarize`}).option(`max-length`,{type:`number`,description:`The maximum length of the generated summary in tokens`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`text`,[`guidance`,`height`,`image`,`image-b64`,`mask`,`negative-prompt`,`num-steps`,`prompt`,`seed`,`strength`,`width`,`lang`,`input-text`,`max-length`]).conflicts(`guidance`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`height`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`image`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`,`prompt`]).conflicts(`image-b64`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`mask`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`negative-prompt`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`num-steps`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`prompt`,[`text`,`source-lang`,`target-lang`,`input-text`,`max-length`,`image`]).conflicts(`seed`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`strength`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`width`,[`text`,`lang`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`lang`,[`text`,`guidance`,`height`,`image`,`image-b64`,`mask`,`negative-prompt`,`num-steps`,`seed`,`strength`,`width`,`source-lang`,`target-lang`,`input-text`,`max-length`]).conflicts(`source-lang`,[`guidance`,`height`,`image`,`image-b64`,`mask`,`negative-prompt`,`num-steps`,`prompt`,`seed`,`strength`,`width`,`lang`,`input-text`,`max-length`]).conflicts(`target-lang`,[`guidance`,`height`,`image`,`image-b64`,`mask`,`negative-prompt`,`num-steps`,`prompt`,`seed`,`strength`,`width`,`lang`,`input-text`,`max-length`]).implies(`target-lang`,[`text`]).conflicts(`input-text`,[`text`,`guidance`,`height`,`image`,`image-b64`,`mask`,`negative-prompt`,`num-steps`,`prompt`,`seed`,`strength`,`width`,`lang`,`source-lang`,`target-lang`]).conflicts(`max-length`,[`text`,`guidance`,`height`,`image`,`image-b64`,`mask`,`negative-prompt`,`num-steps`,`prompt`,`seed`,`strength`,`width`,`lang`,`source-lang`,`target-lang`])}const _e={command:`run-model <model-name>`,describe:`Execute AI model`,builder:ge,handler:async e=>f({command:`ai run-model`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf ai run-model`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/run/${e[`model-name`]==null?`<model-name>`:encodeURIComponent(String(e[`model-name`]))}`,pathParams:{"model-name":String(e[`model-name`]??``)},bodyKind:`json`,body:e.body===void 0?m({text:h(e.text,`text`,`text`),guidance:e.guidance,height:e.height,image:e.image,image_b64:h(e[`image-b64`],`image-b64`,`text`),mask:e.mask,negative_prompt:h(e[`negative-prompt`],`negative-prompt`,`text`),num_steps:e[`num-steps`],prompt:h(e.prompt,`prompt`,`text`),seed:e.seed,strength:e.strength,width:e.width,lang:h(e.lang,`lang`,`text`),source_lang:h(e[`source-lang`],`source-lang`,`text`),target_lang:h(e[`target-lang`],`target-lang`,`text`),input_text:h(e[`input-text`],`input-text`,`text`),max_length:e[`max-length`]}):p(e.body)});return}let t=await s(e),a=e.local?n:await r();if(e.accountId=a,e.body){let n=p(e.body);c(await u(`Creating`,async()=>t.ai.runModel({body:n,account_id:a,model_name:e[`model-name`]})),{successLabel:`Created`});return}let o=m({text:h(e.text,`text`,`text`),guidance:e.guidance,height:e.height,image:e.image,image_b64:h(e[`image-b64`],`image-b64`,`text`),mask:e.mask,negative_prompt:h(e[`negative-prompt`],`negative-prompt`,`text`),num_steps:e[`num-steps`],prompt:h(e.prompt,`prompt`,`text`),seed:e.seed,strength:e.strength,width:e.width,lang:h(e.lang,`lang`,`text`),source_lang:h(e[`source-lang`],`source-lang`,`text`),target_lang:h(e[`target-lang`],`target-lang`,`text`),input_text:h(e[`input-text`],`input-text`,`text`),max_length:e[`max-length`]});c(await u(`Creating`,async()=>t.ai.runModel({body:o,account_id:a,model_name:e[`model-name`]})),{successLabel:`Created`})})};function ve(e){return e.usage(`$0 ai tasks list
|
|
28
|
-
|
|
29
|
-
Searches Workers AI models by task type (e.g., text-generation, embeddings).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`list`,describe:`Task Search`,builder:ve,handler:async e=>f({command:`ai tasks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf ai tasks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/tasks/search`,pathParams:{},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.ai.tasks.list({account_id:a})),{successLabel:`Loaded`})})},be={command:`tasks`,describe:`Operations for tasks`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xe(e){return e.usage(`$0 ai to-markdown
|
|
30
|
-
|
|
31
|
-
Converts uploaded files into Markdown format using Workers AI.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`files`,{type:`string`,description:`The files`})}const Se={command:`to-markdown`,describe:`Convert Files into Markdown`,builder:xe,handler:async e=>f({command:`ai to-markdown`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf ai to-markdown`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/ai/tomarkdown`,pathParams:{},bodyKind:`multipart`,body:{body:e.body,file:e.file,files:e.files}});return}let t=await s(e),o=e.local?n:await r();if(e.accountId=o,e.file!==void 0||e.body!==void 0||e.files!==void 0){let n=new FormData;if(e.file){let t=g(e.file);n.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`file`,e.body);if(e.files!==void 0){let t=typeof e.files==`string`?h(e.files,`files`,`text`):e.files;n.append(`files`,typeof t==`string`?t:JSON.stringify(t))}c(await u(`Creating`,async()=>a(t,`POST`,`/accounts/${o}/ai/tomarkdown`,{body:n})),{successLabel:`Created`});return}if(e.body){let n=h(e.body,`body`,`binary`);c(await u(`Creating`,async()=>a(t,`POST`,`/accounts/${o}/ai/tomarkdown`,{body:n,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Ce={command:`ai`,describe:`ai`,builder:e=>e.command(de).command(pe).command(U).command(_e).command(Se).command(K).command(le).command(he).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ce as default};
|