cf 1.0.0-beta.4 → 1.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{abuse-reports-L4L7sC0F.mjs → abuse-reports-DoqL_52r.mjs} +1 -1
- package/dist/{access-DUQisFsH.mjs → access-DRlrq_cq.mjs} +1 -1
- package/dist/{account-J7N4Ukse.mjs → account-DfC3gRTf.mjs} +1 -1
- package/dist/{account-tags-DMmTopgx.mjs → account-tags-DMCYk5rR.mjs} +1 -1
- package/dist/{accounts-DbZdpH5e.mjs → accounts-BlVDzIWc.mjs} +1 -1
- package/dist/{acm-BtXPdUqH.mjs → acm-CCc33e4l.mjs} +1 -1
- package/dist/{addressing-Bc_ZSmrK.mjs → addressing-BA-5A3jQ.mjs} +1 -1
- package/dist/{agent-memory-CEUI1wKI.mjs → agent-memory-Csgs8W5u.mjs} +1 -1
- package/dist/{ai-CFHaVQcc.mjs → ai-BN_pzw7p.mjs} +1 -1
- package/dist/{ai-audit-guygqmOl.mjs → ai-audit-Dbln3Ai6.mjs} +1 -1
- package/dist/{ai-gateway-BcKOL4WQ.mjs → ai-gateway-BhASWwdp.mjs} +1 -1
- package/dist/{ai-search-DJvNkX2o.mjs → ai-search-DvA8g4xr.mjs} +1 -1
- package/dist/{ai-security-CVaHbGzn.mjs → ai-security-nualpneg.mjs} +1 -1
- package/dist/{alerting-wy4IuGs7.mjs → alerting-HUbVuQMl.mjs} +1 -1
- package/dist/{analytics-Do4VMrPX.mjs → analytics-ClKN9YnQ.mjs} +1 -1
- package/dist/{analytics_engine-Cv7IF8ex.mjs → analytics_engine-DP_O5HIq.mjs} +1 -1
- package/dist/{api-security-fuzV322d.mjs → api-security-Ce_9nFH9.mjs} +1 -1
- package/dist/{argo-BBf-Jw0O.mjs → argo-CLLBrtiV.mjs} +1 -1
- package/dist/{artifacts-B7_OhBxW.mjs → artifacts-CIxZX3VM.mjs} +1 -1
- package/dist/{audit-logs-DyARgcxN.mjs → audit-logs-DjzIj9T4.mjs} +1 -1
- package/dist/{auth-BYFcxn1F.mjs → auth-B_Utev-x.mjs} +1 -1
- package/dist/{auth-CiOv7s9F.mjs → auth-CgPQplnD.mjs} +1 -1
- package/dist/{autoconfig-DbL_FL5k.mjs → autoconfig-BunaOShS.mjs} +1 -1
- package/dist/{billing-07_VIO4X.mjs → billing-tHlHhEVf.mjs} +1 -1
- package/dist/{bot-management-CmkPUu2I.mjs → bot-management-ChV-gaXh.mjs} +1 -1
- package/dist/{botnet-feed-Bn5pE_rx.mjs → botnet-feed-DQWBOEqC.mjs} +1 -1
- package/dist/{brand-protection-CWDqPOXe.mjs → brand-protection-B3afeuOj.mjs} +1 -1
- package/dist/{browser-run-CfEIfpnQ.mjs → browser-run-eQMomr1x.mjs} +1 -1
- package/dist/build-DFa0ngeO.mjs +2 -0
- package/dist/{build-DEbkHHVh.mjs → build-VUz0URCV.mjs} +1 -1
- package/dist/{builds-mgouQLUs.mjs → builds-wTOvlp0S.mjs} +1 -1
- package/dist/{cache-DXLofz5T.mjs → cache-s4HK0we7.mjs} +1 -1
- package/dist/{certificate-authorities-BfW-rEpf.mjs → certificate-authorities-CaPUfYzA.mjs} +1 -1
- package/dist/{cli-Dgk9bd8j.mjs → cli-CT-QJu7q.mjs} +1 -1
- package/dist/{client-certificates-By2A46a2.mjs → client-certificates-BfNDnT8H.mjs} +1 -1
- package/dist/{client-side-security-Bo6ZwJOS.mjs → client-side-security-BV7iORbb.mjs} +1 -1
- package/dist/{cloud-connector-DYb_3u-M.mjs → cloud-connector-CGT8ezvv.mjs} +1 -1
- package/dist/{cloudforce-one-D8l0I5PL.mjs → cloudforce-one-BDhbXtA_.mjs} +1 -1
- package/dist/{command-C7cOrHdI.mjs → command-C8gLcKlB.mjs} +1 -1
- package/dist/{command-C_lQtSPg.mjs → command-C_l69o2b.mjs} +1 -1
- package/dist/{command-CJR1CUK_.mjs → command-Cox9Wh1i.mjs} +1 -1
- package/dist/{command-DaAGN9uP.mjs → command-DJF4wdrM.mjs} +1 -1
- package/dist/{command-DJJN9xaA.mjs → command-DQcG8PK-.mjs} +1 -1
- package/dist/{command-DRlUj6lW.mjs → command-DpEQ07Xe.mjs} +1 -1
- package/dist/{command-DYeBZ5mA.mjs → command-G_VL3Jf8.mjs} +1 -1
- package/dist/{command-CGD1oByJ.mjs → command-SgtzgQrs.mjs} +1 -1
- package/dist/{command-gSmdvn_d.mjs → command-lYaHS62l.mjs} +1 -1
- package/dist/{command-BPfW-yE4.mjs → command-ozwmaY7n.mjs} +1 -1
- package/dist/{completions-DUDx3DwX.mjs → completions-VR53Fiec.mjs} +1 -1
- package/dist/{connector-interrupts-DIMvaZhN.mjs → connector-interrupts-hfttjm-b.mjs} +1 -1
- package/dist/{connector-telemetry-events-TWQvm-cj.mjs → connector-telemetry-events-5nVvivYA.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-Dyoe-_R3.mjs → connector-telemetry-snapshots-DKk_7VQa.mjs} +1 -1
- package/dist/{connectors-D7ZFg3hB.mjs → connectors-CvX4Z3cg.mjs} +1 -1
- package/dist/{containers-Bu3tLjU1.mjs → containers-BQxj87na.mjs} +1 -1
- package/dist/{containers-CduXjFBJ.mjs → containers-BU9RquYh.mjs} +1 -1
- package/dist/{content-scan-CVBD6mUI.mjs → content-scan-hWh-aGbO.mjs} +1 -1
- package/dist/{context-BsGrhAqB.mjs → context-CPVzoKbN.mjs} +1 -1
- package/dist/{cps-CgiRKmTe.mjs → cps-o8QQFfnF.mjs} +1 -1
- package/dist/{csamScanner-BlXIOFFe.mjs → csamScanner-DHod3Hak.mjs} +1 -1
- package/dist/{ct-alerting-CJZK0uSQ.mjs → ct-alerting-D-_YsE1x.mjs} +1 -1
- package/dist/{custom-certificates-DFaj_czg.mjs → custom-certificates-UnaVRb3W.mjs} +1 -1
- package/dist/{custom-csrs-BnFQpjOo.mjs → custom-csrs-BCJ7LOUe.mjs} +1 -1
- package/dist/{custom-hostnames-DSnE6xOT.mjs → custom-hostnames-DOluVIfa.mjs} +1 -1
- package/dist/{custom-nameservers-CdQOt_qU.mjs → custom-nameservers-CvIucaA2.mjs} +1 -1
- package/dist/{custom-pages-TWGlS6Ms.mjs → custom-pages-DzrXSeCR.mjs} +1 -1
- package/dist/{d1-Cbqx2kAz.mjs → d1-BCg7BhWi.mjs} +1 -1
- package/dist/{dcv-delegation-DM3oGGio.mjs → dcv-delegation-9bMHPSoc.mjs} +1 -1
- package/dist/{deploy-BZUWZ888.mjs → deploy-BT_EVz0K.mjs} +1 -1
- package/dist/{deploy-input-ChEbf2Kp.mjs → deploy-input-YW632ysz.mjs} +1 -1
- package/dist/{dev-OsbQIdD8.mjs → dev-jRnP9IIJ.mjs} +1 -1
- package/dist/{diagnostics-8bbleTmW.mjs → diagnostics-BIe-XR-P.mjs} +1 -1
- package/dist/{dist-DTN-pqSs.mjs → dist-COohnEBL.mjs} +1 -1
- package/dist/{dls-TzQpry2j.mjs → dls-BuKO5QWL.mjs} +1 -1
- package/dist/{dns-Bzv4YLeg.mjs → dns-DzVN-WA4.mjs} +1 -1
- package/dist/{dns-firewall-BjWwOmDR.mjs → dns-firewall-Dx_XvWKJ.mjs} +1 -1
- package/dist/{durable-objects-CRhSGkpc.mjs → durable-objects-DnU6OsEb.mjs} +1 -1
- package/dist/{email-auth-Bth4_FHy.mjs → email-auth-DqIyzEcR.mjs} +1 -1
- package/dist/{email-routing-CkTh4F5j.mjs → email-routing-8rhAmzOY.mjs} +1 -1
- package/dist/{email-security-C-2jADxE.mjs → email-security-BRq5J31C.mjs} +1 -1
- package/dist/{email-sending-B_sd4ouE.mjs → email-sending-Bsfk4Jia.mjs} +1 -1
- package/dist/{fieldExtractors-z92V55-Y.mjs → fieldExtractors-COaK02vB.mjs} +1 -1
- package/dist/{firewall-0yKpxdjj.mjs → firewall-Dar706zc.mjs} +1 -1
- package/dist/{flagship-IRVq23te.mjs → flagship-CTchDpyw.mjs} +1 -1
- package/dist/{fraud-BpJ_aoIE.mjs → fraud-H-mdJfRU.mjs} +1 -1
- package/dist/{google-tag-gateway-DA_7SCC3.mjs → google-tag-gateway-zqXS_12f.mjs} +1 -1
- package/dist/{healthchecks-C-GthoQz.mjs → healthchecks-x889sT8g.mjs} +1 -1
- package/dist/{hostnames-CH6utzVv.mjs → hostnames-DqB5I-_U.mjs} +1 -1
- package/dist/{hyperdrive-_rIC33bB.mjs → hyperdrive-sR7Mwif9.mjs} +1 -1
- package/dist/{iam-sseKl99z.mjs → iam-CKt7U41p.mjs} +1 -1
- package/dist/{images-CvIOwtg0.mjs → images-CakdBcMc.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-DEIhItNF.mjs → init-CVyWV_Ow.mjs} +1 -1
- package/dist/{intel-Da84oZMO.mjs → intel-Dcv1vMsK.mjs} +1 -1
- package/dist/{ips-zTTd_3jg.mjs → ips-Ce9_k1Vh.mjs} +1 -1
- package/dist/{keyless-certificates-BGOUKdJc.mjs → keyless-certificates-Cf_6sc7K.mjs} +1 -1
- package/dist/{keys-CDnrfmiS.mjs → keys-DW2A43fL.mjs} +1 -1
- package/dist/{kv-C5jR7vjM.mjs → kv-BKBWXf8s.mjs} +1 -1
- package/dist/{lazy-command-DZtpMsVB.mjs → lazy-command-BOjQB_U7.mjs} +1 -1
- package/dist/{leaked-credential-checks-B7WSzVG3.mjs → leaked-credential-checks-D-gwxxaF.mjs} +1 -1
- package/dist/{load-balancers-DG9wMQUM.mjs → load-balancers-DHUVei95.mjs} +1 -1
- package/dist/{login-k3QLVysD.mjs → login-CptngugC.mjs} +1 -1
- package/dist/{login-rJanUgdL.mjs → login-D37fy09s.mjs} +1 -1
- package/dist/{logo-matches-5nijgkg7.mjs → logo-matches-D1aNSBnZ.mjs} +1 -1
- package/dist/{logos-BRRqg8_2.mjs → logos-SyEjq15s.mjs} +1 -1
- package/dist/{logpush-Br7H8sRD.mjs → logpush-l9tVWnua.mjs} +1 -1
- package/dist/{logs-CBU44LT8.mjs → logs-EW0Pq-gf.mjs} +1 -1
- package/dist/{magic-cloud-networking-Bu7O7wKz.mjs → magic-cloud-networking-CN2Qd2Lx.mjs} +1 -1
- package/dist/{magic-network-monitoring-Bnc--4Jr.mjs → magic-network-monitoring-8jxG-tPc.mjs} +1 -1
- package/dist/{magic-transit-Dxr86HKN.mjs → magic-transit-DLhIQz2l.mjs} +1 -1
- package/dist/{managed-defense-Bm_jKFTN.mjs → managed-defense-CgKdTd9J.mjs} +1 -1
- package/dist/{managed-transforms-D5mvHv_N.mjs → managed-transforms-BASi4j_s.mjs} +1 -1
- package/dist/{matches-Dhc1eSWw.mjs → matches-BCV6x948.mjs} +1 -1
- package/dist/{mcp-B-PBoBl5.mjs → mcp-DQODvLQm.mjs} +1 -1
- package/dist/{mesh-CW8B4naI.mjs → mesh-S_yYh-w3.mjs} +1 -1
- package/dist/{mtls-certificates-swvfPqA2.mjs → mtls-certificates-XJXK21J_.mjs} +1 -1
- package/dist/{network-iwRBn0i7.mjs → network-DA81Mcdh.mjs} +1 -1
- package/dist/{network-interconnects-CjXYZC4g.mjs → network-interconnects-OttR92s7.mjs} +1 -1
- package/dist/{oauth-DJW_HyaL.mjs → oauth-CKeW8CqE.mjs} +1 -1
- package/dist/{oauth-CrTr-mRe.mjs → oauth-ChXrM0q9.mjs} +1 -1
- package/dist/{oauth-clients-DGUJzFFu.mjs → oauth-clients-Ba-YZsxB.mjs} +1 -1
- package/dist/{oauth-scopes-Bl0YUOHt.mjs → oauth-scopes-XqOk2zCQ.mjs} +1 -1
- package/dist/{observability-DRHiMrLy.mjs → observability-BdIbZ1D8.mjs} +1 -1
- package/dist/{organization-BoMJzks7.mjs → organization-DnQ2_txo.mjs} +1 -1
- package/dist/{organizations-UGtCHzSq.mjs → organizations-BkI0IhEg.mjs} +1 -1
- package/dist/{origin-ca-certificates-CdByaOCe.mjs → origin-ca-certificates-Br91H1EG.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-GjmifGkF.mjs → origin-post-quantum-encryption-BcpK8DaG.mjs} +1 -1
- package/dist/{origin-tls-client-auth-CCIqSj_C.mjs → origin-tls-client-auth-CYK6YnzK.mjs} +1 -1
- package/dist/{page-rules-Btn-r3QF.mjs → page-rules-DpOcNsJr.mjs} +1 -1
- package/dist/{pages-iil93G96.mjs → pages-Cw4DM-1N.mjs} +1 -1
- package/dist/{pay-per-crawl-DcAZuk9T.mjs → pay-per-crawl-BORpCGxC.mjs} +1 -1
- package/dist/{pay-per-use-z0Iwy9rN.mjs → pay-per-use-CZw-KHEz.mjs} +1 -1
- package/dist/{pipelines-YRPwntqo.mjs → pipelines-DDDyJ6Oe.mjs} +1 -1
- package/dist/{precursor-Bcww14RH.mjs → precursor-DrH1i64o.mjs} +1 -1
- package/dist/{previews-BBn-IiQu.mjs → previews-CiYBBKj8.mjs} +1 -1
- package/dist/{progress-5nsUpQL6.mjs → progress-DS2fwfNP.mjs} +1 -1
- package/dist/{prompt-Ba_bys2F.mjs → prompt-doX80PCd.mjs} +1 -1
- package/dist/{queries-lxdncISw.mjs → queries-CD6h6iEP.mjs} +1 -1
- package/dist/{queues-Egb0KXYK.mjs → queues-3TpjE349.mjs} +1 -1
- package/dist/{r2-BD4NOkR7.mjs → r2-CV_hSFkM.mjs} +1 -1
- package/dist/{r2-data-catalog-CI-oHtKe.mjs → r2-data-catalog-D_YHTMFG.mjs} +1 -1
- package/dist/{radar-B4dtfeBP.mjs → radar-6-4_LoQ1.mjs} +1 -1
- package/dist/{raw-fetch-AX_Gz3c3.mjs → raw-fetch-_Z55VEDY.mjs} +1 -1
- package/dist/{realtime-CtLXkW8l.mjs → realtime-B5ce977I.mjs} +1 -1
- package/dist/{registrar-I9XClUOe.mjs → registrar-CF-3h2dN.mjs} +1 -1
- package/dist/{registrar-sandbox-DAqK58QS.mjs → registrar-sandbox-BDRZbyAV.mjs} +1 -1
- package/dist/{reporting-BYsEUCIE.mjs → reporting-CiS-RBNJ.mjs} +1 -1
- package/dist/{request-headers-sc4CaZX0.mjs → request-headers-DPbWytRv.mjs} +1 -1
- package/dist/{request-tracers-DXr9Dr2z.mjs → request-tracers-Drcpv8ha.mjs} +1 -1
- package/dist/{resource-sharing-DgbnNgCQ.mjs → resource-sharing-BI3CoOjl.mjs} +1 -1
- package/dist/{resource-tagging-CjPU8PpX.mjs → resource-tagging-D4i_-E0W.mjs} +1 -1
- package/dist/{rules-BrshTdy1.mjs → rules-C4I4CLoq.mjs} +1 -1
- package/dist/{rulesets-BZulblVp.mjs → rulesets-c2efesdy.mjs} +1 -1
- package/dist/{rum-B4IRlWgy.mjs → rum-DT58nW8a.mjs} +1 -1
- package/dist/{run-UHTbUldP.mjs → run-CJ-6owN3.mjs} +1 -1
- package/dist/run-D0esoYSn.mjs +2 -0
- package/dist/{schema-flags-C4KmiKur.mjs → schema-flags-DDW79Tda.mjs} +1 -1
- package/dist/{scim-BL2TVEZM.mjs → scim-PfJWMuRu.mjs} +1 -1
- package/dist/{secrets-store-BcyhU7Kj.mjs → secrets-store-7jrgww1J.mjs} +1 -1
- package/dist/{security-center-D1LSkhL_.mjs → security-center-BhUM_Flh.mjs} +1 -1
- package/dist/{security-txt-BGIj4nU3.mjs → security-txt-ButEG3qy.mjs} +1 -1
- package/dist/{shared-jqlTaG5K.mjs → shared-JNtE--kh.mjs} +1 -1
- package/dist/{smart-shield-C8mGSzyE.mjs → smart-shield-DgbYuUFC.mjs} +1 -1
- package/dist/{snippets-BmHMaKEZ.mjs → snippets-De-xVTIb.mjs} +1 -1
- package/dist/{spectrum-CrGKTMx-.mjs → spectrum-DcknX0jS.mjs} +1 -1
- package/dist/{speed-yyPLwj5X.mjs → speed-Cn_p-ieT.mjs} +1 -1
- package/dist/{src-DFnlH5Tg.mjs → src-BYjublVL.mjs} +5 -5
- package/dist/{ssl-DZ6G7pP_.mjs → ssl-Bkn4ke9Q.mjs} +1 -1
- package/dist/{stream-hoBmKs9X.mjs → stream-Cx78uNm_.mjs} +1 -1
- package/dist/{submit-Lfebq3yj.mjs → submit-Gu34n1a6.mjs} +1 -1
- package/dist/{tags-CnHv__u_.mjs → tags-BQqO7TLX.mjs} +1 -1
- package/dist/telemetry-D2UwfCd1.mjs +2 -0
- package/dist/{telemetry-DbAo3nvk.mjs → telemetry-Qc-g_0fL.mjs} +1 -1
- package/dist/{tenant-7CL844dh.mjs → tenant-Dr0hGlhU.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-CZL9_D8w.mjs → tenant-custom-nameservers-B5Nf5hLr.mjs} +1 -1
- package/dist/{tunnels-DuO8F5_h.mjs → tunnels-ndJtol-f.mjs} +1 -1
- package/dist/{turnstile-B-6k-bKa.mjs → turnstile-Cd65N6jD.mjs} +1 -1
- package/dist/{update-check-g9Jcn6YJ.mjs → update-check-AraGlAQf.mjs} +1 -1
- package/dist/update-check-D5-zqJoN.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-C6-jj9nl.mjs → url-info-CQKJ5A-x.mjs} +1 -1
- package/dist/{url-normalization-BRSTQe20.mjs → url-normalization-BPXZwYu0.mjs} +1 -1
- package/dist/{url-scanner-DER5YAdW.mjs → url-scanner-Bq43LJ98.mjs} +1 -1
- package/dist/{user-foSeF-0m.mjs → user-D4InwQxA.mjs} +1 -1
- package/dist/{values-DgBNckq9.mjs → values-C3YLablc.mjs} +1 -1
- package/dist/{vectorize-9AZMN3fN.mjs → vectorize-CYt0qXQ5.mjs} +1 -1
- package/dist/version-DyZwKU6l.mjs +2 -0
- package/dist/{waiting-rooms-CUc0Xqp0.mjs → waiting-rooms-B3ksWao9.mjs} +1 -1
- package/dist/{web-assets-D5LUB5UO.mjs → web-assets-DNiElHgV.mjs} +1 -1
- package/dist/{web3-BvOpojFR.mjs → web3-DfMKMDix.mjs} +1 -1
- package/dist/{workers-Cko7OnFE.mjs → workers-C8uiRedD.mjs} +1 -1
- package/dist/{workers-builds-BFqiT0GR.mjs → workers-builds-DbEy311-.mjs} +1 -1
- package/dist/{workers-for-platforms-EVE01qsM.mjs → workers-for-platforms-BjvcY5A1.mjs} +1 -1
- package/dist/{workers-vpc-9xBzFjiF.mjs → workers-vpc-BEnB6e_3.mjs} +1 -1
- package/dist/{workflows-BS0EGixd.mjs → workflows-CX3Zer8w.mjs} +1 -1
- package/dist/{zaraz-DBccJ-ZM.mjs → zaraz-DR1KbYY-.mjs} +1 -1
- package/dist/{zero-trust-DGagti-V.mjs → zero-trust-CLoXVq1e.mjs} +1 -1
- package/dist/{zone-B4OniptR.mjs → zone-B9qejq6W.mjs} +1 -1
- package/dist/{zones-DYuGVoTH.mjs → zones-BxU08wO0.mjs} +1 -1
- package/package.json +3 -3
- package/dist/build-BmLpTw4w.mjs +0 -2
- package/dist/run-BQGVl3vg.mjs +0 -2
- package/dist/telemetry-C3hmM9Q9.mjs +0 -2
- package/dist/update-check-BDMPumcv.mjs +0 -2
- package/dist/version-DLvRzH-I.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p}from"./prompt-doX80PCd.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 abuse-reports appeals eligibility <report-id>
|
|
3
3
|
|
|
4
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 t()??`<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 n();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
5
|
`}).option(`host-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./lazy-command-
|
|
2
|
+
import{t as e}from"./lazy-command-BOjQB_U7.mjs";var t=e(`curl <url>`,`Run curl against an Access-protected application with its JWT injected by cloudflared.`,()=>import(`./command-ozwmaY7n.mjs`),{command:`access curl`,recordArgs:!1}),n=e(`login <url>`,`Authenticate with an Access application and store its JWT through cloudflared.`,()=>import(`./command-G_VL3Jf8.mjs`),{command:`access login`,recordArgs:!1}),r=e(`ssh-config`,`Print an example SSH configuration for an Access application.`,()=>import(`./command-Cox9Wh1i.mjs`),{command:`access ssh-config`,recordArgs:!1}),i=e(`ssh-gen`,`Generate a short-lived certificate for an Access SSH application.`,()=>import(`./command-lYaHS62l.mjs`),{command:`access ssh-gen`,recordArgs:!1}),a={...e(`tcp`,`Proxy a TCP connection through Access. The command is also available as ssh, rdp, and smb.`,()=>import(`./command-DpEQ07Xe.mjs`),{command:`access tcp`,recordArgs:!1}),aliases:[`ssh`,`rdp`,`smb`]},o=e(`token <url>`,`Print a JWT for authenticating with an Access application.`,()=>import(`./command-DQcG8PK-.mjs`),{command:`access token`,recordArgs:!1});const s={command:`access`,describe:`Access protected applications and services`,builder:e=>e.command(t).command(n).command(r).command(i).command(a).command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d}from"./prompt-doX80PCd.mjs";function f(e){return e.usage(`$0 account batch move
|
|
3
3
|
|
|
4
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
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-CPVzoKbN.mjs";import{a as i,r as a}from"./auth-B_Utev-x.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DS2fwfNP.mjs";import{t as l}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{i as u,n as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-doX80PCd.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";function v(e){return e.usage(`$0 account-tags delete
|
|
3
3
|
|
|
4
4
|
Removes all tags from a specific account or zone-level resource.`).option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
|
|
5
5
|
verify the current resource ETag matches before applying the write. Returns
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-CPVzoKbN.mjs";import{a as i,r as a}from"./auth-B_Utev-x.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DS2fwfNP.mjs";import{t as l}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-hh2avzkz.mjs";import{n as m}from"./input-validation-Dk52b0me.mjs";import{a as h,i as g,n as _}from"./prompt-doX80PCd.mjs";import{t as v}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-_Z55VEDY.mjs";function y(e){return e.usage(`$0 accounts applications create
|
|
3
3
|
|
|
4
4
|
Create a custom application for an account.`).option(`category-id`,{type:`number`,description:`Returns the category ID.`}).option(`hostnames`,{type:`string`,array:!0,description:`Hostnames matched by the application.`}).option(`human-id`,{type:`string`,description:`Returns the human readable ID.`}).option(`ip-subnets`,{type:`string`,array:!0,description:`IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128.`}).option(`name`,{type:`string`,description:`Returns the application name.`}).option(`port-protocols`,{type:`string`,array:!0,description:`Port and protocol pairs matched by the application.`}).option(`support-domains`,{type:`string`,array:!0,description:`Support domains matched by the application.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom application. At least one hostname or IP subnet is required. Support domains and port/protocol pairs do not satisfy this requirement. `})}const b={command:`create`,describe:`Create application`,builder:y,handler:async n=>l({command:`accounts applications create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf accounts applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/resource-library/applications`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({category_id:n[`category-id`],hostnames:n.hostnames,human_id:m(n[`human-id`],`human-id`,`text`),ip_subnets:n[`ip-subnets`],name:m(n.name,`name`,`text`),port_protocols:n[`port-protocols`],support_domains:n[`support-domains`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.accounts.applications.create({body:e,account_id:l})),{successLabel:`Created`});return}if(n[`category-id`]===void 0)throw Error(`--category-id is required (or pass --body with this field set).`);n[`human-id`]===void 0&&(n[`human-id`]=await h(`human-id`,`Returns the human readable ID.`)),n.name===void 0&&(n.name=await h(`name`,`Returns the application name.`));let u=p({category_id:n[`category-id`],hostnames:n.hostnames,human_id:m(n[`human-id`],`human-id`,`text`),ip_subnets:n[`ip-subnets`],name:m(n.name,`name`,`text`),port_protocols:n[`port-protocols`],support_domains:n[`support-domains`]});o(await c(`Creating`,async()=>i.accounts.applications.create({body:u,account_id:l})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 accounts applications delete <id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e}from"./context-
|
|
2
|
+
import{i as e}from"./context-CPVzoKbN.mjs";import{r as t}from"./auth-B_Utev-x.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DS2fwfNP.mjs";import{t as a}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,n as u}from"./prompt-doX80PCd.mjs";function d(e){return e.usage(`$0 acm custom-trust-store create
|
|
3
3
|
|
|
4
4
|
Upload a root CA certificate to the Custom Origin Trust Store for a Zone. Only root CA certificates are accepted.`).option(`certificate`,{type:`string`,description:`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const f={command:`create`,describe:`Upload Custom Origin Trust Store`,builder:d,handler:async u=>a({command:`acm custom-trust-store create`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf acm custom-trust-store create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({certificate:c(u.certificate,`certificate`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.acm.customTrustStore.create({...e,zone_id:d})),{successLabel:`Created`});return}u.certificate===void 0&&(u.certificate=await l(`certificate`,`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`));let f=s({certificate:c(u.certificate,`certificate`,`text`)});n(await i(`Creating`,async()=>a.acm.customTrustStore.create({...f,zone_id:d})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 acm custom-trust-store delete <custom-origin-trust-store-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-CPVzoKbN.mjs";import{a as i,r as a}from"./auth-B_Utev-x.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DS2fwfNP.mjs";import{t as l}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,n as g}from"./prompt-doX80PCd.mjs";import{n as ee,t as te}from"./raw-fetch-_Z55VEDY.mjs";function _(e){return e.usage(`$0 addressing address-maps accounts delete <member-account-id>
|
|
3
3
|
|
|
4
4
|
Remove an account as a member of a particular address map.`).positional(`member-account-id`,{type:`string`,description:`Identifier of a Cloudflare account.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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 v={command:`delete <member-account-id>`,describe:`Remove an account membership from an Address Map`,builder:_,handler:async n=>l({command:`addressing address-maps accounts delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf addressing address-maps accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/addressing/address_maps/${n[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(n[`address-map-id`]))}/accounts/${n[`member-account-id`]==null?`<member-account-id>`:encodeURIComponent(String(n[`member-account-id`]))}`,pathParams:{"address-map-id":String(n[`address-map-id`]??``),"member-account-id":String(n[`member-account-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await g({force:!!n.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}o(await c(`Deleting`,async()=>i.addressing.addressMaps.accounts.delete({account_id:l,address_map_id:n[`address-map-id`],member_account_id:n[`member-account-id`]})),{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 addressing address-maps accounts update <member-account-id>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,n as p}from"./prompt-doX80PCd.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 agent-memory create-namespace
|
|
3
3
|
|
|
4
4
|
Creates a new memory namespace owned by the account.`).option(`name`,{type:`string`,description:`Namespace name.`}).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:`create-namespace`,describe:`Create a namespace`,builder:h,handler:async l=>s({command:`agent-memory create-namespace`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf agent-memory create-namespace`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/agent-memory/namespaces`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await n();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.agentMemory.createNamespace({...e,account_id:p})),{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Namespace name.`));let m=u({name:d(l.name,`name`,`text`)});i(await o(`Creating`,async()=>s.agentMemory.createNamespace({...m,account_id:p})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 agent-memory delete-memory <memory-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t,t as n}from"./local-B3OyWKkW.mjs";import{a as r,t as i}from"./context-
|
|
2
|
+
import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t,t as n}from"./local-B3OyWKkW.mjs";import{a as r,t as i}from"./context-CPVzoKbN.mjs";import{a,o,r as s}from"./auth-B_Utev-x.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{t as l}from"./dry-run-Bq0JAsbX.mjs";import{t as u}from"./progress-DS2fwfNP.mjs";import{n as d,t as f}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as p,t as m}from"./body-parser-hh2avzkz.mjs";import{n as h,t as g}from"./input-validation-Dk52b0me.mjs";import{a as _,i as v,n as y}from"./prompt-doX80PCd.mjs";import{t as b}from"./cli-types-DoVT5q_M.mjs";import{n as x}from"./raw-fetch-_Z55VEDY.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-DDW79Tda.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 r()??`<account-id>`:await i(),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
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
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
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e}from"./context-
|
|
2
|
+
import{i as e}from"./context-CPVzoKbN.mjs";import{a as t,r as n}from"./auth-B_Utev-x.mjs";import{t as r}from"./output-CvQFJkvi.mjs";import{t as i}from"./dry-run-Bq0JAsbX.mjs";import{t as a}from"./progress-DS2fwfNP.mjs";import{t as o}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as s}from"./body-parser-hh2avzkz.mjs";function c(e){return e.usage(`$0 ai-audit robots bulk-get
|
|
3
3
|
|
|
4
4
|
Fetches and parses robots.txt files for multiple domains within a zone in a single request. Each domain must belong to the specified zone. Results are keyed by hostname.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of domain hostnames to fetch robots.txt for. Each domain must end with the zone name. Maximum 25 domains per request.`})}const l={command:`bulk-get`,describe:`Bulk get robots.txt rules`,builder:c,handler:async c=>o({command:`ai-audit robots bulk-get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){i({command:`cf ai-audit robots bulk-get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/ai-audit/robots/bulk`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c);if(c.zoneId=await e({zone:c.zone},o,{quiet:c.quiet}),c.body){let e=s(c.body);if(Array.isArray(e)&&e.length>25){let n=Math.ceil(e.length/25),i=null;for(let r=0;r<e.length;r+=25){let s=e.slice(r,r+25);i=await a(`Loading: batch ${Math.floor(r/25)+1}/${n}`,async()=>t(o,`POST`,`/zones/${c.zoneId}/ai-audit/robots/bulk`,{body:s}))}r(i,{successLabel:`Loaded`});return}r(await a(`Loading`,async()=>t(o,`POST`,`/zones/${c.zoneId}/ai-audit/robots/bulk`,{body:e})),{successLabel:`Loaded`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function u(e){return e.usage(`$0 ai-audit robots get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{a as r,r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,n as h}from"./prompt-doX80PCd.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 ai-gateway custom-domains create <gateway-id>
|
|
3
3
|
|
|
4
4
|
Provisions a Cloudflare-for-SaaS custom hostname and returns the CNAME target to point DNS at.`).positional(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`domain`,{type:`string`,description:"Custom hostname that you own, such as `ai.example.com`."}).option(`min-tls`,{type:`string`,description:`The minTLS field`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).option(`zone-id`,{type:`string`,description:`ID of the Cloudflare zone that contains the custom hostname.`}).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 te={command:`create <gateway-id>`,describe:`Create a custom domain for a gateway`,builder:ee,handler:async r=>c({command:`ai-gateway custom-domains create`,classification:{safeFlags:[`min-tls`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway custom-domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/custom-domains`,pathParams:{"gateway-id":String(r[`gateway-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({domain:p(r.domain,`domain`,`text`),minTLS:p(r[`min-tls`],`min-tls`,`text`),zone_id:p(r[`zone-id`],`zone-id`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.aiGateway.customDomains.create({...e,account_id:l,gateway_id:r[`gateway-id`]})),{successLabel:`Created`});return}r.domain===void 0&&(r.domain=await m(`domain`,"Custom hostname that you own, such as `ai.example.com`.")),r[`zone-id`]===void 0&&(r[`zone-id`]=await m(`zone-id`,`ID of the Cloudflare zone that contains the custom hostname.`));let d=f({domain:p(r.domain,`domain`,`text`),minTLS:p(r[`min-tls`],`min-tls`,`text`),zone_id:p(r[`zone-id`],`zone-id`,`text`)});a(await s(`Creating`,async()=>c.aiGateway.customDomains.create({...d,account_id:l,gateway_id:r[`gateway-id`]})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 ai-gateway custom-domains delete <hostname>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{a as r,r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f,t as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-doX80PCd.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-_Z55VEDY.mjs";function v(e){return e.usage(`$0 ai-search chat-completions <id>
|
|
3
3
|
|
|
4
4
|
Performs a chat completion request against an AI Search instance, using indexed content as context for generating responses.`).positional(`id`,{type:`string`,description:`AI Search instance ID.`,demandOption:!0}).option(`name`,{type:`string`,description:`Namespace to use for this operation.`,demandOption:!0}).option(`ai-search-options-cache-cache-threshold`,{type:`string`,description:`The ai_search_options.cache.cache_threshold field`,choices:[`super_strict_match`,`close_enough`,`flexible_friend`,`anything_goes`]}).option(`ai-search-options-cache-enabled`,{type:`boolean`,description:`The ai_search_options.cache.enabled field`}).option(`ai-search-options-query-rewrite-enabled`,{type:`boolean`,description:`The ai_search_options.query_rewrite.enabled field`}).option(`ai-search-options-query-rewrite-model`,{type:`string`,description:`A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.`}).option(`ai-search-options-query-rewrite-rewrite-prompt`,{type:`string`,description:`The ai_search_options.query_rewrite.rewrite_prompt field`}).option(`ai-search-options-reranking-enabled`,{type:`boolean`,description:`The ai_search_options.reranking.enabled field`}).option(`ai-search-options-reranking-match-threshold`,{type:`number`,description:`The ai_search_options.reranking.match_threshold field`}).option(`ai-search-options-reranking-model`,{type:`string`,description:`The ai_search_options.reranking.model field`}).option(`ai-search-options-retrieval-context-expansion`,{type:`number`,description:`The ai_search_options.retrieval.context_expansion field`}).option(`ai-search-options-retrieval-fusion-method`,{type:`string`,description:`The ai_search_options.retrieval.fusion_method field`,choices:[`max`,`rrf`]}).option(`ai-search-options-retrieval-keyword-match-mode`,{type:`string`,description:`Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'.`,choices:[`and`,`or`]}).option(`ai-search-options-retrieval-match-threshold`,{type:`number`,description:`The ai_search_options.retrieval.match_threshold field`}).option(`ai-search-options-retrieval-max-num-results`,{type:`number`,description:`The ai_search_options.retrieval.max_num_results field`}).option(`ai-search-options-retrieval-retrieval-type`,{type:`string`,description:`The ai_search_options.retrieval.retrieval_type field`,choices:[`vector`,`keyword`,`hybrid`]}).option(`ai-search-options-retrieval-return-on-failure`,{type:`boolean`,description:`The ai_search_options.retrieval.return_on_failure field`}).option(`messages`,{type:`string`,description:`The messages field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`model`,{type:`string`,description:`A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.`}).option(`stream`,{type:`boolean`,description:`The stream 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 y={command:`chat-completions <id>`,describe:`Chat Completions`,builder:v,handler:async r=>c({command:`ai-search chat-completions`,classification:{safeFlags:[`ai-search-options-cache-cache-threshold`,`ai-search-options-cache-enabled`,`ai-search-options-query-rewrite-enabled`,`ai-search-options-reranking-enabled`,`ai-search-options-retrieval-fusion-method`,`ai-search-options-retrieval-keyword-match-mode`,`ai-search-options-retrieval-retrieval-type`,`ai-search-options-retrieval-return-on-failure`,`stream`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-search chat-completions`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-search/namespaces/${r.name==null?`<name>`:encodeURIComponent(String(r.name))}/instances/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/chat/completions`,pathParams:{id:String(r.id??``),name:String(r.name??``)},bodyKind:`json`,body:r.body===void 0?d({ai_search_options:{cache:{cache_threshold:f(r[`ai-search-options-cache-cache-threshold`],`ai-search-options-cache-cache-threshold`,`text`),enabled:r[`ai-search-options-cache-enabled`]},query_rewrite:{enabled:r[`ai-search-options-query-rewrite-enabled`],model:f(r[`ai-search-options-query-rewrite-model`],`ai-search-options-query-rewrite-model`,`text`),rewrite_prompt:f(r[`ai-search-options-query-rewrite-rewrite-prompt`],`ai-search-options-query-rewrite-rewrite-prompt`,`text`)},reranking:{enabled:r[`ai-search-options-reranking-enabled`],match_threshold:r[`ai-search-options-reranking-match-threshold`],model:f(r[`ai-search-options-reranking-model`],`ai-search-options-reranking-model`,`text`)},retrieval:{context_expansion:r[`ai-search-options-retrieval-context-expansion`],fusion_method:f(r[`ai-search-options-retrieval-fusion-method`],`ai-search-options-retrieval-fusion-method`,`text`),keyword_match_mode:f(r[`ai-search-options-retrieval-keyword-match-mode`],`ai-search-options-retrieval-keyword-match-mode`,`text`),match_threshold:r[`ai-search-options-retrieval-match-threshold`],max_num_results:r[`ai-search-options-retrieval-max-num-results`],retrieval_type:f(r[`ai-search-options-retrieval-retrieval-type`],`ai-search-options-retrieval-retrieval-type`,`text`),return_on_failure:r[`ai-search-options-retrieval-return-on-failure`]}},messages:u(r.messages,`messages`),model:f(r.model,`model`,`text`),stream:r.stream}):l(r.body)});return}let c=await i(r),p=r.local?e:await n();if(r.accountId=p,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.aiSearch.chatCompletions({...e,account_id:p,name:r.name,id:r.id})),{successLabel:`Created`});return}if(r.messages===void 0)throw Error(`--messages is required (or pass --body with this field set).`);let m=d({ai_search_options:{cache:{cache_threshold:f(r[`ai-search-options-cache-cache-threshold`],`ai-search-options-cache-cache-threshold`,`text`),enabled:r[`ai-search-options-cache-enabled`]},query_rewrite:{enabled:r[`ai-search-options-query-rewrite-enabled`],model:f(r[`ai-search-options-query-rewrite-model`],`ai-search-options-query-rewrite-model`,`text`),rewrite_prompt:f(r[`ai-search-options-query-rewrite-rewrite-prompt`],`ai-search-options-query-rewrite-rewrite-prompt`,`text`)},reranking:{enabled:r[`ai-search-options-reranking-enabled`],match_threshold:r[`ai-search-options-reranking-match-threshold`],model:f(r[`ai-search-options-reranking-model`],`ai-search-options-reranking-model`,`text`)},retrieval:{context_expansion:r[`ai-search-options-retrieval-context-expansion`],fusion_method:f(r[`ai-search-options-retrieval-fusion-method`],`ai-search-options-retrieval-fusion-method`,`text`),keyword_match_mode:f(r[`ai-search-options-retrieval-keyword-match-mode`],`ai-search-options-retrieval-keyword-match-mode`,`text`),match_threshold:r[`ai-search-options-retrieval-match-threshold`],max_num_results:r[`ai-search-options-retrieval-max-num-results`],retrieval_type:f(r[`ai-search-options-retrieval-retrieval-type`],`ai-search-options-retrieval-retrieval-type`,`text`),return_on_failure:r[`ai-search-options-retrieval-return-on-failure`]}},messages:u(r.messages,`messages`),model:f(r.model,`model`,`text`),stream:r.stream});a(await s(`Creating`,async()=>c.aiSearch.chatCompletions({...m,account_id:p,name:r.name,id:r.id})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 ai-search create <name> <id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e}from"./context-
|
|
2
|
+
import{i as e}from"./context-CPVzoKbN.mjs";import{r as t}from"./auth-B_Utev-x.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DS2fwfNP.mjs";import{t as a}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as o,r as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./prompt-doX80PCd.mjs";function u(e){return e.usage(`$0 ai-security custom-topics get
|
|
3
3
|
|
|
4
4
|
Get the custom topic categories defined for the zone. While AI Security for Apps is enabled, it scores every incoming prompt against these topics and writes the scores to the \`cf.llm.prompt.custom_topic_categories\` field, keyed by topic label. Topics can be configured while the detection is disabled, but no prompt is scored until you enable it.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get the AI Security for Apps custom topics of a zone.`,builder:u,handler:async o=>a({command:`ai-security custom-topics get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf ai-security custom-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.aiSecurity.customTopics.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage("$0 ai-security custom-topics update\n\nUpdate the custom topic list of the zone, overwriting it entirely with the topics in the request, so include every topic you want to keep. Changes can take up to a minute to propagate. Each entry has a `label`, used to reference the topic in rule expressions and analytics, and a `topic` description, which the classifier scores prompts against while AI Security for Apps is enabled. The following rules apply: - A zone can hold at most 20 topics. - `label` must be 2–20 characters, using only lowercase letters (a–z), digits (0–9), and hyphens. - `topic` must be 2–50 printable ASCII characters. - Labels must be unique within the zone, and so must topic descriptions.").option(`topics`,{type:`string`,description:`Custom topic categories for AI Security for Apps content detection. 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(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`update`,describe:`Update the AI Security for Apps custom topics of a zone.`,builder:f,handler:async u=>a({command:`ai-security custom-topics update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},u,async()=>{if(u.dryRun){r({command:`cf ai-security custom-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({topics:s(u.topics,`topics`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,!await l({force:!!u.force,message:`This operation overwrites the AI Security for Apps custom topics for a zone.`})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}if(u.body){let e=o(u.body);n(await i(`Deleting`,async()=>a.aiSecurity.customTopics.update({body:e,zone_id:d})),{successLabel:`Deleted`});return}let f=c({topics:s(u.topics,`topics`)});n(await i(`Deleting`,async()=>a.aiSecurity.customTopics.update({body:f,zone_id:d})),{successLabel:`Deleted`})})},m={command:`custom-topics`,describe:`Organization-specific topic categories used by AI Security for Apps content detection`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.usage(`$0 ai-security get
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-doX80PCd.mjs";import{n as m,t as h}from"./raw-fetch-_Z55VEDY.mjs";function ee(e){return e.usage(`$0 alerting available-alerts list
|
|
3
3
|
|
|
4
4
|
Gets a list of all alert types for which an account is eligible.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`Get Alert Types`,builder:ee,handler:async c=>s({command:`alerting available-alerts list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting available-alerts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/available_alerts`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.availableAlerts.list({account_id:l})),{successLabel:`Loaded`})})},_={command:`available-alerts`,describe:`Operations for available-alerts`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 alerting destinations eligible get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-CPVzoKbN.mjs";import{a as i,r as a}from"./auth-B_Utev-x.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DS2fwfNP.mjs";import{t as l}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-hh2avzkz.mjs";import{n as m,t as h}from"./input-validation-Dk52b0me.mjs";import{a as g}from"./prompt-doX80PCd.mjs";function _(e){return e.usage(`$0 analytics latency colos get
|
|
3
3
|
|
|
4
4
|
Retrieves Argo Smart Routing analytics broken down by geographic points of presence (PoPs). Shows latency improvements and routing efficiency per location.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Argo Analytics for a zone at different PoPs`,builder:_,handler:async e=>l({command:`analytics latency colos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf analytics latency colos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/analytics/latency/colos`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>t.analytics.latency.colos.get({zone_id:r})),{successLabel:`Loaded`})})},y={command:`colos`,describe:`Operations for latency.colos`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 analytics latency get
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{a as r,r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as l,t as u}from"./input-validation-Dk52b0me.mjs";function d(e){return e.usage(`$0 analytics_engine sql query
|
|
3
3
|
|
|
4
4
|
Executes a SQL query against Workers Analytics Engine data. Pass the SQL query in the request body as plain text. The response uses newline-delimited JSON (NDJSON) by default, or a single JSON object when the query includes a FORMAT JSON clause. Prefer this method for longer queries that may exceed URL length limits.`).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`})}const f={command:`query`,describe:`Execute an Analytics Engine SQL query via request body`,builder:d,handler:async d=>c({command:`analytics_engine sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf analytics_engine sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/analytics_engine/sql`,pathParams:{},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await n();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Loading`,async()=>r(c,`POST`,`/accounts/${f}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}if(d.body){let e=l(d.body,`body`,`binary`);a(await s(`Loading`,async()=>r(c,`POST`,`/accounts/${f}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}a(await s(`Loading`,async()=>c.analyticsEngine.sql.query({account_id:f})),{successLabel:`Loaded`})})},p={command:`sql`,describe:`Operations for sql`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`analytics_engine`,describe:`analytics_engine`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,i as n,t as r}from"./context-CPVzoKbN.mjs";import{a as i,r as a}from"./auth-B_Utev-x.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DS2fwfNP.mjs";import{t as l}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-doX80PCd.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 api-security schema-validation schemas create
|
|
3
3
|
|
|
4
4
|
Uploads an OpenAPI schema that defines expected request formats for API operations.`).option(`kind`,{type:`string`,description:`The kind of the schema`,choices:[`openapi_v3`]}).option(`name`,{type:`string`,description:`A human-readable name for the schema`}).option(`source`,{type:`string`,description:`The raw schema, e.g., the OpenAPI schema, either as JSON or YAML`}).option(`validation-enabled`,{type:`boolean`,description:`An indicator if this schema is enabled`}).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 te={command:`create`,describe:`Upload a schema`,builder:ee,handler:async e=>l({command:`api-security schema-validation schemas create`,classification:{safeFlags:[`kind`,`validation-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf api-security schema-validation schemas create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/schemas`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({kind:p(e.kind,`kind`,`text`),name:p(e.name,`name`,`text`),source:p(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]}):u(e.body)});return}let t=await a(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body);o(await c(`Creating`,async()=>t.apiSecurity.schemaValidation.schemas.create({...n,zone_id:r})),{successLabel:`Created`});return}if(e.kind===void 0&&(e.kind=await h(`kind`,`The kind of the schema`,[`openapi_v3`])),e.name===void 0&&(e.name=await m(`name`,`A human-readable name for the schema`)),e.source===void 0&&(e.source=await m(`source`,`The raw schema, e.g., the OpenAPI schema, either as JSON or YAML`)),e[`validation-enabled`]===void 0)throw Error(`--validation-enabled is required (or pass --body with this field set).`);let i=f({kind:p(e.kind,`kind`,`text`),name:p(e.name,`name`,`text`),source:p(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]});o(await c(`Creating`,async()=>t.apiSecurity.schemaValidation.schemas.create({...i,zone_id:r})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 api-security schema-validation schemas delete <schema-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e}from"./context-
|
|
2
|
+
import{i as e}from"./context-CPVzoKbN.mjs";import{r as t}from"./auth-B_Utev-x.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DS2fwfNP.mjs";import{t as a}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{i as l}from"./prompt-doX80PCd.mjs";function u(e){return e.usage(`$0 argo smart-routing edit
|
|
3
3
|
|
|
4
4
|
Configures the value of the Argo Smart Routing enablement setting.`).option(`value`,{type:`string`,description:`Specifies the enablement value of Argo Smart Routing.`,choices:[`on`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configures the enablement of Argo Smart Routing.`})}const d={command:`edit`,describe:`Patch Argo Smart Routing setting`,builder:u,handler:async u=>a({command:`argo smart-routing edit`,classification:{safeFlags:[`value`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf argo smart-routing edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/argo/smart_routing`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({value:c(u.value,`value`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.argo.smartRouting.edit({...e,zone_id:d})),{successLabel:`Updated`});return}u.value===void 0&&(u.value=await l(`value`,`Specifies the enablement value of Argo Smart Routing.`,[`on`,`off`]));let f=s({value:c(u.value,`value`,`text`)});n(await i(`Updating`,async()=>a.argo.smartRouting.edit({...f,zone_id:d})),{successLabel:`Updated`})})};function f(e){return e.usage(`$0 argo smart-routing get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,n as f}from"./prompt-doX80PCd.mjs";import{t as p}from"./cli-types-DoVT5q_M.mjs";import{n as m,t as h}from"./raw-fetch-_Z55VEDY.mjs";function ee(e){return e.usage(`$0 artifacts namespaces create
|
|
3
3
|
|
|
4
4
|
Creates an empty Artifacts namespace for an account.`).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`unrestricted`,`us`,`eu`,`fedramp`],default:`unrestricted`}).option(`namespace`,{type:`string`,description:`The namespace 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 g={command:`create`,describe:`Create a namespace`,builder:ee,handler:async f=>s({command:`artifacts namespaces create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf artifacts namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/artifacts/namespaces`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({jurisdiction:u(f.jurisdiction,`jurisdiction`,`text`),namespace:u(f.namespace,`namespace`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await n();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.artifacts.namespaces.create({...e,account_id:p})),{successLabel:`Created`});return}f.namespace===void 0&&(f.namespace=await d(`namespace`,`The namespace field`));let m=l({jurisdiction:u(f.jurisdiction,`jurisdiction`,`text`),namespace:u(f.namespace,`namespace`,`text`)});i(await o(`Creating`,async()=>s.artifacts.namespaces.create({...m,account_id:p})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 artifacts namespaces delete <namespace>
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{t as c}from"./cli-types-DoVT5q_M.mjs";function l(e){return e.usage(`$0 audit-logs list
|
|
3
3
|
|
|
4
4
|
Gets a list of audit logs for an account. Can be filtered by who made the change, on which zone, and the timeframe of the change.`).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`export`,{type:`boolean`,description:`Indicates that this request is an export of logs in CSV format.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-ip`,{type:`string`,description:`Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.`}).option(`actor-email`,{type:`string`,description:`Filters by the email address of the actor that made the change.`}).option(`since`,{type:`string`,description:"Limits the returned results to logs newer than the specified date. A `full-date` that conforms to RFC3339."}).option(`before`,{type:`string`,description:"Limits the returned results to logs older than the specified date. A `full-date` that conforms to RFC3339."}).option(`zone-name`,{type:`string`,description:`Filters by the name of the zone associated to the change.`}).option(`direction`,{type:`string`,description:`Changes the direction of the chronological sorting.`,choices:[`desc`,`asc`]}).option(`per-page`,{type:`number`,description:`Sets the number of results to return per page.`}).option(`page`,{type:`number`,description:`Defines which page of results to return.`}).option(`hide-user-logs`,{type:`boolean`,description:`Indicates whether or not to hide user level audit logs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`list`,describe:`Get account audit logs`,builder:c(l),handler:async c=>s({command:`audit-logs list`,classification:{safeFlags:[`export`,`direction`,`hide-user-logs`,`dry-run`]}},c,async()=>{let s={id:c.id,export:c.export,"action.type":c[`action-type`],"actor.ip":c[`actor-ip`],"actor.email":c[`actor-email`],since:c.since,before:c.before,"zone.name":c[`zone-name`],direction:c.direction,per_page:c[`per-page`],page:c.page,hide_user_logs:c[`hide-user-logs`]};if(c.dryRun){a({command:`cf audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/audit_logs`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.auditLogs.list({account_id:u,...s})),{successLabel:`Loaded`})})},d={command:`audit-logs`,describe:`audit-logs`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,r as t,t as n}from"./sdk-Bx29ZKK3.mjs";import{G as r}from"./dist-DfMipWKR.mjs";import{o as i}from"./chunk-RV27PEH3-Cws_30ln.mjs";import{a,n as o}from"./context-
|
|
2
|
+
import{n as e,r as t,t as n}from"./sdk-Bx29ZKK3.mjs";import{G as r}from"./dist-DfMipWKR.mjs";import{o as i}from"./chunk-RV27PEH3-Cws_30ln.mjs";import{a,n as o}from"./context-CPVzoKbN.mjs";import{s}from"./oauth-CKeW8CqE.mjs";import{n as c}from"./request-headers-DPbWytRv.mjs";const l=3e4,u=e.Default;function d(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream||e instanceof URLSearchParams}function f(e){return Object.keys(e).some(e=>e.toLowerCase()===`content-type`)}async function p(e){let t=e.headers.get(`content-type`)??``;try{return t.includes(`application/json`)?await e.json():await e.text()}catch{return null}}function m(e,t,n){if(!(n==null||n===``)){if(Array.isArray(n)){for(let r of n)m(e,t,r);return}e.append(t,String(n))}}function h(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))m(t,n,r);return t.toString()}function g(e,t,n){let r=new URL(t.endsWith(`/`)?t:`${t}/`),i=new URL(e.startsWith(`/`)?e.slice(1):e,r);if(i.origin!==r.origin)throw Error(`Refusing to send an authenticated request to ${i.origin} (expected ${r.origin})`);let a=h(n??{});return a&&(i.search=a),i.toString()}const _=new WeakMap;async function v(e,n,r,i={}){let a=g(r,_.get(e)??u,i.query),o={...i.headers},s;i.body!==void 0&&(d(i.body)||typeof i.body==`string`&&f(o)?s=i.body:(o[`Content-Type`]??=`application/json`,s=JSON.stringify(i.body)));let c;try{c=await e.fetch(a,{method:n,headers:o,body:s,signal:i.signal},{timeoutInSeconds:i.timeout?i.timeout/1e3:void 0,abortSignal:i.signal})}catch(e){throw i.signal?.aborted?Error(`Request aborted`):e instanceof Error&&e.name===`AbortError`?Error(`Request timed out after ${i.timeout??3e4}ms`):e instanceof Error?Error(`Request failed: ${e.message}`):e}if(!c.ok)throw new t({statusCode:c.status,body:await p(c),rawResponse:{status:c.status,statusText:c.statusText,url:c.url||a,headers:c.headers,redirected:c.redirected,type:c.type}});if(c.status===204)return null;let l=c.headers.get(`content-type`)??``;if(!l.includes(`application/json`)&&i.preserveNonJsonBytes)return Buffer.from(await c.arrayBuffer());let m=await c.text();if(m===``)return null;if(!l.includes(`application/json`))return m;let h=JSON.parse(m);if(h.success===!1)throw new t({message:`API error: ${h.errors?.map(e=>e.message).filter(Boolean).join(`, `)||`unknown error`}`,statusCode:c.status,body:h});return`result`in h?h.result:h}function y(e){let t=e.baseURL??u,r=new n({baseUrl:t,auth:async()=>({headers:{Authorization:`Bearer ${e.apiToken}`}}),headers:e.defaultHeaders,timeoutInSeconds:(e.timeout??3e4)/1e3,maxRetries:0,fetch:e.fetch??globalThis.fetch});return _.set(r,t),r}async function b(){let e=i({allowGlobalAuthKey:!1});if(e&&`apiToken`in e)return e.apiToken;let t=await s();if(t)return t;throw Error(`No authentication token found.
|
|
3
3
|
|
|
4
4
|
Please set one of the following:
|
|
5
5
|
1. Set the CLOUDFLARE_API_TOKEN environment variable
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-BIWQFmZ0.mjs";import{a as t,n,r}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{c as i,d as a,i as o,p as s,r as c,t as l,u}from"./oauth-
|
|
2
|
+
import{r as e}from"./theme-BIWQFmZ0.mjs";import{a as t,n,r}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{c as i,d as a,i as o,p as s,r as c,t as l,u}from"./oauth-CKeW8CqE.mjs";import{i as d,n as f}from"./auth-B_Utev-x.mjs";import{t as p}from"./output-CvQFJkvi.mjs";import{n as m}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{a as h,c as g,i as _,n as v,o as y,r as b,s as x,t as S}from"./login-CptngugC.mjs";const C={command:`logout`,describe:`Log out and remove stored credentials`,handler:async a=>{_(a,`logout`,"Run `cf auth delete <name>` to remove a named profile.");let l=c();l!==`default`&&console.log(t(`This directory has profile "${l}" active. \`cf auth logout\` removes the default profile's token, not "${l}".\nTo delete "${l}", run \`cf auth delete ${l}\`.`)),s(`default`);let d=i(),f=!!process.env.CLOUDFLARE_API_TOKEN;if(!d){f?(console.log(r(`No cf OAuth credentials found, but CLOUDFLARE_API_TOKEN environment variable is set.`)),console.log(r(`Unset it with: unset CLOUDFLARE_API_TOKEN`))):(console.log(r(`You are not currently logged in.`)),console.log(n(`Run ${e.code(`cf auth login`)} to authenticate.`)));return}console.log(r(`Logging out...`)),await u(`default`),console.log(`${e.info(`Removed:`)} OAuth tokens from ${e.muted(o())}`),f&&(console.log(``),console.log(t(`CLOUDFLARE_API_TOKEN environment variable is still set.`)),console.log(r(`You will remain authenticated via the env var. Unset it with: unset CLOUDFLARE_API_TOKEN`)))}},w={command:`whoami`,describe:`Show current user and authentication status`,builder:e=>e,handler:async e=>{let t=process.env.CLOUDFLARE_API_TOKEN,n=a(),r;r=t?`CLOUDFLARE_API_TOKEN environment variable`:n?.oauth_token?`OAuth token from ${o()}`:`none`;let i;try{i=await d()}catch{p({authenticated:!1,error:`Not logged in`});return}let s=f({apiToken:i}),c,u=[],[m,h]=await Promise.allSettled([s.user.get(),l()]);if(m.status===`fulfilled`){let e=m.value;e&&`email`in e&&typeof e.email==`string`&&(c=e.email)}else process.env.DEBUG&&console.error(`User lookup error:`,m.reason);h.status===`fulfilled`?u=h.value:process.env.DEBUG&&console.error(`Account lookup error:`,h.reason);let g=m.status===`fulfilled`||h.status===`fulfilled`,_={authenticated:!0,authSource:r,tokenValid:g,...c&&{email:c},accounts:u};n?.oauth_token&&(_.scopes=n.scopes,_.expiresAt=n.expiration_time),p(_)}},T={command:`auth`,describe:`Manage authentication and profiles`,builder:e=>e.command(m(S,{command:`auth login`,classification:v})).command(E(C,`auth logout`)).command(E(w,`auth whoami`)).command(E(h,`auth create`,[`browser`,`device`])).command(E(x,`auth delete`)).command(E(b,`auth activate`)).command(E(y,`auth deactivate`)).command(E(g,`auth list`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e,t,n=[],r){return m(e,{command:t,classification:{safeFlags:n,shortFlagAliases:r}})}export{T as default};
|
|
@@ -504,7 +504,7 @@ export default defineConfig({
|
|
|
504
504
|
|
|
505
505
|
export default defineWranglerConfig(${JSON.stringify(e,null,2)});
|
|
506
506
|
`}x($f,`renderWranglerConfigTs`);function ep(e){return` `+e.trimEnd().replace(/\n/g,`
|
|
507
|
-
`)}x(ep,`indentFileContent`);async function tp(e,t,n,r,i,a,o,s){let{logger:c}=o;c.log(``);let l=a===`wrangler`?qf(t,n):null,u={scripts:{},...a===`wrangler`?{wranglerConfig:l??void 0}:{workerConfig:t??void 0,buildConfig:n.buildConfig},outputDir:e.outputDir,frameworkId:e.framework.id,buildCommand:r.build,deployCommand:r.deploy,versionCommand:r.version},d=new Set;if(e.packageJson&&(i&&d.add(a),n.buildTool===`vite`?d.add(a===`cf`?`@cloudflare/vite-plugin@beta`:`@cloudflare/vite-plugin`):a===`cf`&&n.buildTool===`wrangler`&&d.add(`wrangler`)),d.size>0){c.log(`📦 Install packages:`);for(let e of d)c.log(` - ${e} (devDependency)`);c.log(``)}if(e.packageJson){let n=a===`wrangler`?s:void 0,r=a===`wrangler`&&e.buildCommand?`${e.buildCommand} && `:``;u.scripts={deploy:n?.deploy??`${r}${a} deploy`},a===`wrangler`&&(u.scripts.preview=n?.preview??`${r}${a} dev`),t?.entrypoint&&Ya(e.projectPath)&&!(`cf-typegen`in(e.packageJson.scripts??{}))&&(u.scripts[`cf-typegen`]=n?.typegen
|
|
507
|
+
`)}x(ep,`indentFileContent`);async function tp(e,t,n,r,i,a,o,s){let{logger:c}=o;c.log(``);let l=a===`wrangler`?qf(t,n):null,u={scripts:{},...a===`wrangler`?{wranglerConfig:l??void 0}:{workerConfig:t??void 0,buildConfig:n.buildConfig},outputDir:e.outputDir,frameworkId:e.framework.id,buildCommand:r.build,deployCommand:r.deploy,versionCommand:r.version},d=new Set;if(e.packageJson&&(i&&d.add(a),n.buildTool===`vite`?d.add(a===`cf`?`@cloudflare/vite-plugin@beta`:`@cloudflare/vite-plugin`):a===`cf`&&n.buildTool===`wrangler`&&d.add(`wrangler`)),d.size>0){c.log(`📦 Install packages:`);for(let e of d)c.log(` - ${e} (devDependency)`);c.log(``)}if(e.packageJson){let n=a===`wrangler`?s:void 0,r=a===`wrangler`&&e.buildCommand?`${e.buildCommand} && `:``;u.scripts={deploy:n?.deploy??`${r}${a} deploy`},a===`wrangler`&&(u.scripts.preview=n?.preview??`${r}${a} dev`),t?.entrypoint&&Ya(e.projectPath)&&!(`cf-typegen`in(e.packageJson.scripts??{}))&&(u.scripts[`cf-typegen`]=n?.typegen??(a===`cf`?`cf workers types`:`wrangler types`)),c.log(`📝 Update package.json scripts:`);for(let[e,t]of Object.entries(u.scripts))c.log(` - "${e}": "${t}"`);c.log(``)}if(a===`cf`&&t&&(c.log(`📄 Create cloudflare.config.ts:`),c.log(ep(Qf(t))),c.log(``)),a===`cf`&&n.buildTool===`wrangler`&&n.buildConfig&&(c.log(`📄 Create wrangler.config.ts:`),c.log(ep($f(n.buildConfig))),c.log(``)),a===`wrangler`&&l){let t=R(xe(e.projectPath,`wrangler.jsonc`));c.log(t?`📄 Update wrangler.jsonc:`:`📄 Create wrangler.jsonc:`),c.log(` `+JSON.stringify(l,null,2).replace(/\n/g,`
|
|
508
508
|
`)),c.log(``)}return e.framework&&!(e.framework instanceof Eo)&&!e.framework.isConfigured(e.projectPath,{target:a})&&(u.frameworkConfiguration=e.framework.configurationDescription??`Configuring project for ${e.framework.name}`,c.log(`\u{1F6E0}\uFE0F ${u.frameworkConfiguration}`),c.log(``)),u}x(tp,`buildOperationsSummary`);function np(e){let t=xe(e,`wrangler.jsonc`);if(R(t))return t;let n=xe(e,`wrangler.json`);if(R(n))return n}x(np,`getDirWranglerJsonConfigPath`);function rp(e){let t=typeof e==`string`?`
|
|
509
509
|
`:10,n=typeof e==`string`?`\r`:13;return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}function ip(e={}){let{env:t=process.env,platform:n=process.platform}=e;return n===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`}const ap=({cwd:e=V.cwd(),path:t=V.env[ip()],preferLocal:n=!0,execPath:r=V.execPath,addExecPath:i=!0}={})=>{let a=e instanceof URL?Se(e):e,o=z.resolve(a),s=[];return n&&op(s,o),i&&sp(s,r,o),[...s,t].join(z.delimiter)},op=(e,t)=>{let n;for(;n!==t;)e.push(z.join(t,`node_modules/.bin`)),n=t,t=z.resolve(t,`..`)},sp=(e,t,n)=>{let r=t instanceof URL?Se(t):t;e.push(z.resolve(n,r,`..`))},cp=({env:e=V.env,...t}={})=>{e={...e};let n=ip({env:e});return t.path=e[n],e[n]=ap(t),e},lp=(e,t,n,r)=>{if(n===`length`||n===`prototype`||n===`arguments`||n===`caller`)return;let i=Object.getOwnPropertyDescriptor(e,n),a=Object.getOwnPropertyDescriptor(t,n);!up(i,a)&&r||Object.defineProperty(e,n,a)},up=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},dp=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},fp=(e,t)=>`/* Wrapped ${e}*/\n${t}`,pp=Object.getOwnPropertyDescriptor(Function.prototype,`toString`),mp=Object.getOwnPropertyDescriptor(Function.prototype.toString,`name`),hp=(e,t,n)=>{let r=n===``?``:`with ${n.trim()}() `,i=fp.bind(null,r,t.toString());Object.defineProperty(i,`name`,mp),Object.defineProperty(e,`toString`,{...pp,value:i})};function gp(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let r of Reflect.ownKeys(t))lp(e,t,r,n);return dp(e,t),hp(e,t,r),e}const _p=new WeakMap,vp=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let n,r=0,i=e.displayName||e.name||`<anonymous>`,a=function(...o){if(_p.set(a,++r),r===1)n=e.apply(this,o),e=null;else if(t.throw===!0)throw Error(`Function \`${i}\` can only be called once`);return n};return gp(a,e),_p.set(a,r),a};vp.callCount=e=>{if(!_p.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return _p.get(e)};const yp=function(){let e=64-xp+1;return Array.from({length:e},bp)},bp=function(e,t){return{name:`SIGRT${t+1}`,number:xp+t,action:`terminate`,description:`Application-specific signal (realtime)`,standard:`posix`}},xp=34,Sp=[{name:`SIGHUP`,number:1,action:`terminate`,description:`Terminal closed`,standard:`posix`},{name:`SIGINT`,number:2,action:`terminate`,description:`User interruption with CTRL-C`,standard:`ansi`},{name:`SIGQUIT`,number:3,action:`core`,description:`User interruption with CTRL-\\`,standard:`posix`},{name:`SIGILL`,number:4,action:`core`,description:`Invalid machine instruction`,standard:`ansi`},{name:`SIGTRAP`,number:5,action:`core`,description:`Debugger breakpoint`,standard:`posix`},{name:`SIGABRT`,number:6,action:`core`,description:`Aborted`,standard:`ansi`},{name:`SIGIOT`,number:6,action:`core`,description:`Aborted`,standard:`bsd`},{name:`SIGBUS`,number:7,action:`core`,description:`Bus error due to misaligned, non-existing address or paging error`,standard:`bsd`},{name:`SIGEMT`,number:7,action:`terminate`,description:`Command should be emulated but is not implemented`,standard:`other`},{name:`SIGFPE`,number:8,action:`core`,description:`Floating point arithmetic error`,standard:`ansi`},{name:`SIGKILL`,number:9,action:`terminate`,description:`Forced termination`,standard:`posix`,forced:!0},{name:`SIGUSR1`,number:10,action:`terminate`,description:`Application-specific signal`,standard:`posix`},{name:`SIGSEGV`,number:11,action:`core`,description:`Segmentation fault`,standard:`ansi`},{name:`SIGUSR2`,number:12,action:`terminate`,description:`Application-specific signal`,standard:`posix`},{name:`SIGPIPE`,number:13,action:`terminate`,description:`Broken pipe or socket`,standard:`posix`},{name:`SIGALRM`,number:14,action:`terminate`,description:`Timeout or timer`,standard:`posix`},{name:`SIGTERM`,number:15,action:`terminate`,description:`Termination`,standard:`ansi`},{name:`SIGSTKFLT`,number:16,action:`terminate`,description:`Stack is empty or overflowed`,standard:`other`},{name:`SIGCHLD`,number:17,action:`ignore`,description:`Child process terminated, paused or unpaused`,standard:`posix`},{name:`SIGCLD`,number:17,action:`ignore`,description:`Child process terminated, paused or unpaused`,standard:`other`},{name:`SIGCONT`,number:18,action:`unpause`,description:`Unpaused`,standard:`posix`,forced:!0},{name:`SIGSTOP`,number:19,action:`pause`,description:`Paused`,standard:`posix`,forced:!0},{name:`SIGTSTP`,number:20,action:`pause`,description:`Paused using CTRL-Z or "suspend"`,standard:`posix`},{name:`SIGTTIN`,number:21,action:`pause`,description:`Background process cannot read terminal input`,standard:`posix`},{name:`SIGBREAK`,number:21,action:`terminate`,description:`User interruption with CTRL-BREAK`,standard:`other`},{name:`SIGTTOU`,number:22,action:`pause`,description:`Background process cannot write to terminal output`,standard:`posix`},{name:`SIGURG`,number:23,action:`ignore`,description:`Socket received out-of-band data`,standard:`bsd`},{name:`SIGXCPU`,number:24,action:`core`,description:`Process timed out`,standard:`bsd`},{name:`SIGXFSZ`,number:25,action:`core`,description:`File too big`,standard:`bsd`},{name:`SIGVTALRM`,number:26,action:`terminate`,description:`Timeout or timer`,standard:`bsd`},{name:`SIGPROF`,number:27,action:`terminate`,description:`Timeout or timer`,standard:`bsd`},{name:`SIGWINCH`,number:28,action:`ignore`,description:`Terminal window size changed`,standard:`bsd`},{name:`SIGIO`,number:29,action:`terminate`,description:`I/O is available`,standard:`other`},{name:`SIGPOLL`,number:29,action:`terminate`,description:`Watched event`,standard:`other`},{name:`SIGINFO`,number:29,action:`ignore`,description:`Request for process information`,standard:`other`},{name:`SIGPWR`,number:30,action:`terminate`,description:`Device running out of power`,standard:`systemv`},{name:`SIGSYS`,number:31,action:`core`,description:`Invalid system call`,standard:`other`},{name:`SIGUNUSED`,number:31,action:`terminate`,description:`Invalid system call`,standard:`other`}],Cp=function(){let e=yp();return[...Sp,...e].map(wp)},wp=function({name:e,number:t,description:n,action:r,forced:i=!1,standard:a}){let{signals:{[e]:o}}=Ae,s=o!==void 0;return{name:e,number:s?o:t,description:n,supported:s,action:r,forced:i,standard:a}},Tp=function(){return Cp().reduce(Ep,{})},Ep=function(e,{name:t,number:n,description:r,supported:i,action:a,forced:o,standard:s}){return{...e,[t]:{name:t,number:n,description:r,supported:i,action:a,forced:o,standard:s}}},Dp=Tp(),Op=function(){let e=Cp(),t=Array.from({length:65},(t,n)=>kp(n,e));return Object.assign({},...t)},kp=function(e,t){let n=Ap(e,t);if(n===void 0)return{};let{name:r,description:i,supported:a,action:o,forced:s,standard:c}=n;return{[e]:{name:r,number:e,description:i,supported:a,action:o,forced:s,standard:c}}},Ap=function(e,t){let n=t.find(({name:t})=>Ae.signals[t]===e);return n===void 0?t.find(t=>t.number===e):n};Op();const jp=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:i,exitCode:a,isCanceled:o})=>e?`timed out after ${t} milliseconds`:o?`was canceled`:n===void 0?r===void 0?a===void 0?`failed`:`failed with exit code ${a}`:`was killed with ${r} (${i})`:`failed with ${n}`,Mp=({stdout:e,stderr:t,all:n,error:r,signal:i,exitCode:a,command:o,escapedCommand:s,timedOut:c,isCanceled:l,killed:u,parsed:{options:{timeout:d}}})=>{a=a===null?void 0:a,i=i===null?void 0:i;let f=i===void 0?void 0:Dp[i].description,p=`Command ${jp({timedOut:c,timeout:d,errorCode:r&&r.code,signal:i,signalDescription:f,exitCode:a,isCanceled:l})}: ${o}`,m=Object.prototype.toString.call(r)===`[object Error]`,h=m?`${p}\n${r.message}`:p,g=[h,t,e].filter(Boolean).join(`
|
|
510
510
|
`);return m?(r.originalMessage=r.message,r.message=g):r=Error(g),r.shortMessage=h,r.command=o,r.escapedCommand=s,r.exitCode=a,r.signal=i,r.signalDescription=f,r.stdout=e,r.stderr=t,n!==void 0&&(r.all=n),`bufferedData`in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!c,r.isCanceled=l,r.killed=u&&!c,r},Np=[`stdin`,`stdout`,`stderr`],Pp=e=>Np.some(t=>e[t]!==void 0),Fp=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return Np.map(t=>e[t]);if(Pp(e))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${Np.map(e=>`\`${e}\``).join(`, `)}`);if(typeof t==`string`)return t;if(!Array.isArray(t))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let n=Math.max(t.length,Np.length);return Array.from({length:n},(e,n)=>t[n])};var Ip=e(N(),1);const Lp=(e,t=`SIGTERM`,n={})=>{let r=e(t);return Rp(e,t,n,r),r},Rp=(e,t,n,r)=>{if(!zp(t,n,r))return;let i=Vp(n),a=setTimeout(()=>{e(`SIGKILL`)},i);a.unref&&a.unref()},zp=(e,{forceKillAfterTimeout:t},n)=>Bp(e)&&t!==!1&&n,Bp=e=>e===Ce.constants.signals.SIGTERM||typeof e==`string`&&e.toUpperCase()===`SIGTERM`,Vp=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return 5e3;if(!Number.isFinite(e)||e<0)throw TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Hp=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Up=(e,t,n)=>{e.kill(t),n(Object.assign(Error(`Timed out`),{timedOut:!0,signal:t}))},Wp=(e,{timeout:t,killSignal:n=`SIGTERM`},r)=>{if(t===0||t===void 0)return r;let i,a=new Promise((r,a)=>{i=setTimeout(()=>{Up(e,n,a)},t)}),o=r.finally(()=>{clearTimeout(i)});return Promise.race([a,o])},Gp=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Kp=async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;let i=(0,Ip.default)(()=>{e.kill()});return r.finally(()=>{i()})};function qp(e){return typeof e==`object`&&!!e&&typeof e.pipe==`function`}var Jp=t(((e,t)=>{let{PassThrough:r}=n(`stream`);t.exports=e=>{e={...e};let{array:t}=e,{encoding:n}=e,i=n===`buffer`,a=!1;t?a=!(n||i):n||=`utf8`,i&&(n=null);let o=new r({objectMode:a});n&&o.setEncoding(n);let s=0,c=[];return o.on(`data`,e=>{c.push(e),a?s=c.length:s+=e.length}),o.getBufferedValue=()=>t?c:i?Buffer.concat(c,s):c.join(``),o.getBufferedLength=()=>s,o}})),Yp=t(((e,t)=>{let{constants:r}=n(`buffer`),i=n(`stream`),{promisify:a}=n(`util`),o=Jp(),s=a(i.pipeline);var c=class extends Error{constructor(){super(`maxBuffer exceeded`),this.name=`MaxBufferError`}};async function l(e,t){if(!e)throw Error(`Expected a stream`);t={maxBuffer:1/0,...t};let{maxBuffer:n}=t,i=o(t);return await new Promise((t,a)=>{let o=e=>{e&&i.getBufferedLength()<=r.MAX_LENGTH&&(e.bufferedData=i.getBufferedValue()),a(e)};(async()=>{try{await s(e,i),t()}catch(e){o(e)}})(),i.on(`data`,()=>{i.getBufferedLength()>n&&o(new c)})}),i.getBufferedValue()}t.exports=l,t.exports.buffer=(e,t)=>l(e,{...t,encoding:`buffer`}),t.exports.array=(e,t)=>l(e,{...t,array:!0}),t.exports.MaxBufferError=c})),Xp=t(((e,t)=>{let{PassThrough:r}=n(`stream`);t.exports=function(){var e=[],t=new r({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=i,t.on(`unpipe`,a),Array.prototype.slice.call(arguments).forEach(n),t;function n(r){return Array.isArray(r)?(r.forEach(n),this):(e.push(r),r.once(`end`,a.bind(null,r)),r.once(`error`,t.emit.bind(t,`error`)),r.pipe(t,{end:!1}),this)}function i(){return e.length==0}function a(n){e=e.filter(function(e){return e!==n}),!e.length&&t.readable&&t.end()}}})),Zp=e(Yp(),1),Qp=e(Xp(),1);const $p=(e,t)=>{t===void 0||e.stdin===void 0||(qp(t)?t.pipe(e.stdin):e.stdin.end(t))},em=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let n=(0,Qp.default)();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},tm=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},nm=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(!(!e||!n))return t?(0,Zp.default)(e,{encoding:t,maxBuffer:r}):Zp.default.buffer(e,{maxBuffer:r})},rm=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:a},o)=>{let s=nm(e,{encoding:r,buffer:i,maxBuffer:a}),c=nm(t,{encoding:r,buffer:i,maxBuffer:a}),l=nm(n,{encoding:r,buffer:i,maxBuffer:a*2});try{return await Promise.all([o,s,c,l])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},tm(e,s),tm(t,c),tm(n,l)])}},im=(async()=>{})().constructor.prototype,am=[`then`,`catch`,`finally`].map(e=>[e,Reflect.getOwnPropertyDescriptor(im,e)]),om=(e,t)=>{for(let[n,r]of am){let i=typeof t==`function`?(...e)=>Reflect.apply(r.value,t(),e):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:i})}return e},sm=e=>new Promise((t,n)=>{e.on(`exit`,(e,n)=>{t({exitCode:e,signal:n})}),e.on(`error`,e=>{n(e)}),e.stdin&&e.stdin.on(`error`,e=>{n(e)})}),cm=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],lm=/^[\w.-]+$/,um=/"/g,dm=e=>typeof e!=`string`||lm.test(e)?e:`"${e.replace(um,`\\"`)}"`,fm=(e,t)=>cm(e,t).join(` `),pm=(e,t)=>cm(e,t).map(e=>dm(e)).join(` `),mm=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{let a=t?{...V.env,...e}:e;return n?cp({env:a,cwd:r,execPath:i}):a},hm=(e,t,n={})=>{let r=Je.default._parse(e,t,n);return e=r.command,t=r.args,n=r.options,n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||V.cwd(),execPath:V.execPath,encoding:`utf8`,reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=mm(n),n.stdio=Fp(n),V.platform===`win32`&&z.basename(e,`.exe`)===`cmd`&&t.unshift(`/q`),{file:e,args:t,options:n,parsed:r}},gm=(e,t,n)=>typeof t!=`string`&&!je.isBuffer(t)?n===void 0?void 0:``:e.stripFinalNewline?rp(t):t;function _m(e,t,n){let r=hm(e,t,n),i=fm(e,t),a=pm(e,t);Gp(r.options);let o;try{o=Ne.spawn(r.file,r.args,r.options)}catch(e){return om(new Ne.ChildProcess,Promise.reject(Mp({error:e,stdout:``,stderr:``,all:``,command:i,escapedCommand:a,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})))}let s=sm(o),c=Wp(o,r.options,s),l=Kp(o,r.options,c),u={isCanceled:!1};o.kill=Lp.bind(null,o.kill.bind(o)),o.cancel=Hp.bind(null,o,u);let d=vp(async()=>{let[{error:e,exitCode:t,signal:n,timedOut:s},c,d,f]=await rm(o,r.options,l),p=gm(r.options,c),m=gm(r.options,d),h=gm(r.options,f);if(e||t!==0||n!==null){let c=Mp({error:e,exitCode:t,signal:n,stdout:p,stderr:m,all:h,command:i,escapedCommand:a,parsed:r,timedOut:s,isCanceled:u.isCanceled||(r.options.signal?r.options.signal.aborted:!1),killed:o.killed});if(!r.options.reject)return c;throw c}return{command:i,escapedCommand:a,exitCode:0,stdout:p,stderr:m,all:h,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return $p(o,r.options.input),o.all=em(o,r.options),om(o,d)}var vm=t(((e,t)=>{var n=[`||`,`&&`,`;;`,`|&`,`<(`,`<<<`,`>>`,`>&`,`<&`,`&`,`;`,`(`,`)`,`|`,`<`,`>`],r=/[\n\r\u2028\u2029]/,i=/[\s#!"$&'():;<=>@\\^`|]/g;t.exports=function(e){return e.map(function(e){if(e===``)return`''`;if(e&&typeof e==`object`){if(e.op===`glob`){if(typeof e.pattern!=`string`)throw TypeError("glob token requires a string `pattern`");if(r.test(e.pattern))throw TypeError("glob `pattern` must not contain line terminators");return e.pattern.replace(i,`\\$&`)}if(typeof e.op==`string`){if(n.indexOf(e.op)<0)throw TypeError("invalid `op` value: "+JSON.stringify(e.op));return e.op.replace(/[\s\S]/g,`\\$&`)}if(typeof e.comment==`string`){if(r.test(e.comment))throw TypeError("`comment` must not contain line terminators");return`#`+e.comment}throw TypeError(`unrecognized object token shape`)}return/["\s\\]/.test(e)&&!/'/.test(e)?`'`+e.replace(/(['])/g,`\\$1`)+`'`:/["'\s]/.test(e)?`"`+e.replace(/(["\\$`!])/g,`\\$1`)+`"`:String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,`$1\\$2`)}).join(` `)}})),ym=t(((e,t)=>{for(var n=`(?:`+[`\\|\\|`,`\\&\\&`,`;;`,`\\|\\&`,`\\<\\(`,`\\<\\<\\<`,`>>`,`>\\&`,`<\\&`,`[&;()|<>]`].join(`|`)+`)`,r=RegExp(`^`+n+`$`),i=`|&;()<> \\t`,a=`"((\\\\"|[^"])*?)"`,o=`'((\\\\'|[^'])*?)'`,s=/^#$/,c=`'`,l=`"`,u=`$`,d=``,f=4294967296,p=0;p<4;p++)d+=(f*Math.random()).toString(16);var m=RegExp(`^`+d);function h(e,t){for(var n=t.lastIndex,r=[],i;i=t.exec(e);)r.push(i),t.lastIndex===i.index&&(t.lastIndex+=1);return t.lastIndex=n,r}function g(e,t,n){var r=typeof e==`function`?e(n):e[n];return r===void 0&&n!=``?r=``:r===void 0&&(r=`$`),typeof r==`object`?t+d+JSON.stringify(r)+d:t+r}function _(e,t,d){d||={};var f=d.escape||`\\`,p=`(\\`+f+`['"`+i+`]|[^\\s'"`+i+`])+`,m=h(e,new RegExp([`(`+n+`)`,`(`+p+`|`+a+`|`+o+`)+`].join(`|`),`g`));if(m.length===0)return[];t||={};var _=!1;return m.map(function(n){var i=n[0];if(!i||_)return;if(r.test(i))return{op:i};var a=!1,o=!1,d=``,p=!1,m;function h(){m+=1;var e,n,r=i.charAt(m);if(r===`{`){if(m+=1,i.charAt(m)===`}`)throw Error(`Bad substitution: `+i.slice(m-2,m+1));if(e=i.indexOf(`}`,m),e<0)throw Error(`Bad substitution: `+i.slice(m));n=i.slice(m,e),m=e}else if(/[*@#?$!_-]/.test(r))n=r,m+=1;else{var a=i.slice(m);e=a.match(/[^\w\d_]/),e?(n=a.slice(0,e.index),m+=e.index-1):(n=a,m=i.length)}return g(t,``,n)}for(m=0;m<i.length;m++){var v=i.charAt(m);if(p||=!a&&(v===`*`||v===`?`),o)d+=v,o=!1;else if(a)v===a?a=!1:a==c?d+=v:v===f?(m+=1,v=i.charAt(m),v===l||v===f||v===u?d+=v:d+=f+v):v===u?d+=h():d+=v;else if(v===l||v===c)a=v;else if(r.test(v))return{op:i};else if(s.test(v)){_=!0;var y={comment:e.slice(n.index+m+1)};return d.length?[d,y]:[y]}else v===f?o=!0:v===u?d+=h():d+=v}return p?{op:`glob`,pattern:d}:d}).reduce(function(e,t){return t===void 0?e:e.concat(t)},[])}t.exports=function(e,t,n){var r=_(e,t,n);return typeof t==`function`?r.reduce(function(e,t){if(typeof t==`object`)return e.concat(t);var n=t.split(RegExp(`(`+d+`.*?`+d+`)`,`g`));return n.length===1?e.concat(n[0]):e.concat(n.filter(Boolean).map(function(e){return m.test(e)?JSON.parse(e.split(d)[1]):e}))},[]):r}})),bm=t((e=>{e.quote=vm(),e.parse=ym()}))();function xm(e){return Sm(e)?{...e,configured:!0,framework:Object.assign(Object.create(e.framework),{supportsMode:!0}),devCommand:Cm(e,`dev`),buildCommand:Cm(e,`build`),env:{...e.env,CLOUDFLARE_VITE_FORCE_BUILD_OUTPUT:`true`}}:e}function Sm(e){return e.framework?.id===`next`&&(e.packageJson?.dependencies?.vinext!==void 0||e.packageJson?.devDependencies?.vinext!==void 0)&&i(`vinext`,e.projectPath)}function Cm(e,t){return`${e.packageManager.npx} vite ${t}`}function wm(e,t=process.platform){return t!==`win32`||e!==`SIGINT`}function Tm(e,t,n){let r=(t&&t in we.signals?t:void 0)??n;return{exitCode:e??(r?128+(we.signals[r]??1):1),...r?{signal:r}:{}}}async function Em(e,t={}){let n=jm(t);try{return xm(await Vf({projectPath:e,target:`cf`,context:n}))}catch(e){if(e instanceof da){n.logger.debug(`Autoconfig could not detect this project:`,e);return}throw e}}async function Dm(e,t={}){return Gf(e,{target:`cf`,context:jm(t),runBuild:!1})}async function Om(e,t={}){let n=await Em(e,t);if(n?.configured)return{details:n};let r=jm(t);return await F(e,(e,t)=>r.dialogs.confirm(e,t),t.output)?(n=await Em(e,t),{details:n}):{details:n,...n?{configuration:await Dm(n,t)}:{}}}async function km(e,t,n={}){let r=n.output??`stdout`,i=process.env.DEBUG?Object.entries(n.env??{}):[],a=i.map(([e,t])=>` ${e}=${t}`).join(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{n as f}from"./prompt-doX80PCd.mjs";function p(e){return e.usage(`$0 billing addresses validate
|
|
3
3
|
|
|
4
4
|
Validates a billing address and returns validated address suggestions. Authentication is not enforced to support pre-signup address validation flows, so credentials are accepted but not required.`).option(`address`,{type:`string`,description:`Address line 1.`}).option(`address2`,{type:`string`,description:`Address line 2.`}).option(`city`,{type:`string`,description:`City.`}).option(`country`,{type:`string`,description:`Country code.`}).option(`state`,{type:`string`,description:`State or province.`}).option(`zipcode`,{type:`string`,description:`Postal or zip code.`}).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 m={command:`validate`,describe:`Validate Billing Address`,builder:p,handler:async e=>s({command:`billing addresses validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf billing addresses validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/billing/address-validation`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({address:d(e.address,`address`,`text`),address2:d(e.address2,`address2`,`text`),city:d(e.city,`city`,`text`),country:d(e.country,`country`,`text`),state:d(e.state,`state`,`text`),zipcode:d(e.zipcode,`zipcode`,`text`)}):c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Creating`,async()=>t.billing.addresses.validate({...n})),{successLabel:`Created`});return}let n=u({address:d(e.address,`address`,`text`),address2:d(e.address2,`address2`,`text`),city:d(e.city,`city`,`text`),country:d(e.country,`country`,`text`),state:d(e.state,`state`,`text`),zipcode:d(e.zipcode,`zipcode`,`text`)});i(await o(`Creating`,async()=>t.billing.addresses.validate({...n})),{successLabel:`Created`})})},h={command:`addresses`,describe:`Operations for addresses`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 billing profiles create
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e}from"./context-
|
|
2
|
+
import{i as e}from"./context-CPVzoKbN.mjs";import{r as t}from"./auth-B_Utev-x.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DS2fwfNP.mjs";import{t as a}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,i as u}from"./prompt-doX80PCd.mjs";function d(e){return e.usage("$0 bot-management feedback create\n\nSubmit a feedback report for the specified zone. Use `type` to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use `expression` as a wirefilter to identify the affected traffic sample. See more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively.").option(`description`,{type:`string`,description:`The description field`}).option(`expression`,{type:`string`,description:`Wirefilter expression describing the traffic being reported.`}).option(`first-request-seen-at`,{type:`string`,description:`The first_request_seen_at field`}).option(`last-request-seen-at`,{type:`string`,description:`The last_request_seen_at field`}).option(`requests`,{type:`number`,description:`The requests field`}).option(`subtype`,{type:`string`,description:`The subtype field`}).option(`type`,{type:`string`,description:`Type of feedback report.`,choices:[`false_positive`,`false_negative`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const f={command:`create`,describe:`Submit a feedback report`,builder:d,handler:async d=>a({command:`bot-management feedback create`,classification:{safeFlags:[`type`,`dry-run`]}},d,async()=>{if(d.dryRun){r({command:`cf bot-management feedback create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${d.zone??d.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(d.zone??d[`zone-id`]??``)},bodyKind:`json`,body:d.body===void 0?s({description:c(d.description,`description`,`text`),expression:c(d.expression,`expression`,`text`),first_request_seen_at:c(d[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:c(d[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:d.requests,subtype:c(d.subtype,`subtype`,`text`),type:c(d.type,`type`,`text`)}):o(d.body)});return}let a=await t(d),f=await e({zone:d.zone},a,{quiet:d.quiet});if(d.zoneId=f,d.body){let e=o(d.body);n(await i(`Creating`,async()=>a.botManagement.feedback.create({body:e,zone_id:f})),{successLabel:`Created`});return}if(d.description===void 0&&(d.description=await l(`description`,`The description field`)),d.expression===void 0&&(d.expression=await l(`expression`,`Wirefilter expression describing the traffic being reported.`)),d[`first-request-seen-at`]===void 0&&(d[`first-request-seen-at`]=await l(`first-request-seen-at`,`The first_request_seen_at field`)),d[`last-request-seen-at`]===void 0&&(d[`last-request-seen-at`]=await l(`last-request-seen-at`,`The last_request_seen_at field`)),d.requests===void 0)throw Error(`--requests is required (or pass --body with this field set).`);d.type===void 0&&(d.type=await u(`type`,`Type of feedback report.`,[`false_positive`,`false_negative`]));let p=s({description:c(d.description,`description`,`text`),expression:c(d.expression,`expression`,`text`),first_request_seen_at:c(d[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:c(d[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:d.requests,subtype:c(d.subtype,`subtype`,`text`),type:c(d.type,`type`,`text`)});n(await i(`Creating`,async()=>a.botManagement.feedback.create({body:p,zone_id:f})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 bot-management feedback list
|
|
3
3
|
|
|
4
4
|
Returns all feedback reports previously submitted for the specified zone. Feedback reports help improve detection by sharing samples of traffic that were misclassified as bots or humans.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`List zone feedback reports`,builder:p,handler:async o=>a({command:`bot-management feedback list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf bot-management feedback list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.botManagement.feedback.list({zone_id:s})),{successLabel:`Loaded`})})},h={command:`feedback`,describe:`Operations for feedback`,builder:e=>e.command(f).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 bot-management get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c}from"./prompt-doX80PCd.mjs";function l(e){return e.usage(`$0 botnet-feed asn day-report <asn-id>
|
|
3
3
|
|
|
4
4
|
Gets all the data the botnet tracking database has for a given ASN registered to user account for given date. If no date is given, it will return results for the previous day.`).positional(`asn-id`,{type:`string`,description:`Asn ID`,demandOption:!0}).option(`date`,{type:`string`,description:`Date`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`day-report <asn-id>`,describe:`Get daily report`,builder:l,handler:async c=>s({command:`botnet-feed asn day-report`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={date:c.date};if(c.dryRun){a({command:`cf botnet-feed asn day-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/botnet_feed/asn/${c[`asn-id`]==null?`<asn-id>`:encodeURIComponent(String(c[`asn-id`]))}/day_report`,pathParams:{"asn-id":String(c[`asn-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.botnetFeed.asn.dayReport({account_id:u,asn_id:c[`asn-id`],...s})),{successLabel:`Loaded`})})};function d(e){return e.usage(`$0 botnet-feed asn full-report <asn-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p,n as m}from"./prompt-doX80PCd.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";function g(e){return e.usage(`$0 brand-protection logo-matches get
|
|
3
3
|
|
|
4
4
|
Get paginated list of logo matches for a specific brand protection logo query`).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`query-id`,{type:`string`,description:`Query ID`,demandOption:!0}).option(`download`,{type:`string`,description:`Download`}).option(`order-by`,{type:`string`,description:`Column to sort by. Options: 'matchedAt', 'domain', 'similarityScore', or 'registrar'`,choices:[`matchedAt`,`domain`,`similarityScore`,`registrar`]}).option(`order`,{type:`string`,description:`Sort order. Options: 'asc' (ascending) or 'desc' (descending)`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get`,describe:`List logo matches`,builder:h(g),handler:async c=>s({command:`brand-protection logo-matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},c,async()=>{let s={offset:c.offset,limit:c.limit,query_id:c[`query-id`],download:c.download,orderBy:c[`order-by`],order:c.order};if(c.dryRun){a({command:`cf brand-protection logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/matches`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.brandProtection.logoMatches.get({account_id:u,...s})),{successLabel:`Loaded`})})},v={command:`logo-matches`,describe:`Operations for logo-matches`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.usage(`$0 brand-protection logos create
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{a as r,r as i}from"./auth-B_Utev-x.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DS2fwfNP.mjs";import{t as c}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{n as m}from"./prompt-doX80PCd.mjs";import{t as h}from"./cli-types-DoVT5q_M.mjs";import{n as g,t as _}from"./raw-fetch-_Z55VEDY.mjs";function v(e){return e.usage("$0 browser-run crawl create\n\nStarts a crawl job for the provided URL and its children. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.").option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`create`,describe:`Crawl websites.`,builder:v,handler:async l=>c({command:`browser-run crawl create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={cacheTTL:l[`cache-ttl`]};if(l.dryRun){o({command:`cf browser-run crawl create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/browser-rendering/crawl`,pathParams:{},query:c,bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await i(l),f=l.local?e:await n();if(l.accountId=f,l.body){let e=u(l.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>d.browserRun.crawl.create({body:e,account_id:f,...c})),{successLabel:`Created`});return}a(await s(`Creating`,async()=>r(d,`POST`,`/accounts/${f}/browser-rendering/crawl`,{query:c})),{successLabel:`Created`})})};function te(e){return e.usage(`$0 browser-run crawl delete <job-id>
|
|
3
3
|
|
|
4
4
|
Cancels an ongoing crawl job by setting its status to cancelled and stopping all queued URLs.`).positional(`job-id`,{type:`string`,description:`The ID of the crawl job to cancel.`,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 y={command:`delete <job-id>`,describe:`Cancel a crawl job.`,builder:te,handler:async r=>c({command:`browser-run crawl delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf browser-run crawl delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/browser-rendering/crawl/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await m({force:!!r.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}a(await s(`Deleting`,async()=>c.browserRun.crawl.delete({account_id:l,job_id:r[`job-id`]})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 browser-run crawl get <job-id>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{M as n}from"./dist-DfMipWKR.mjs";import"./ui-BQxRjahW.mjs";import{n as r}from"./dist-DW47TUGh.mjs";import{i,r as a}from"./autoconfig-
|
|
2
|
+
import{r as e}from"./theme-BIWQFmZ0.mjs";import{t}from"./cli-exit-Dqoo6Jgb.mjs";import{M as n}from"./dist-DfMipWKR.mjs";import"./ui-BQxRjahW.mjs";import{n as r}from"./dist-DW47TUGh.mjs";import{i,r as a}from"./autoconfig-BunaOShS.mjs";import{n as o,t as s}from"./spawn-IM_tQldH.mjs";import c from"node:path";import{readBuildOutput as l}from"@cloudflare/build-output-utils";import{convertToWranglerConfig as u}from"@cloudflare/config";var d=class extends Error{constructor(e){super(e),this.name=`BuildOutputConfigError`}};function f(e,t){if(e!==void 0){if(t===void 0)throw new d(`The Build Output does not record which mode it was created with, but this command requested mode "${e}". Rebuild with "--mode ${e}" before deploying.`);if(t!==e)throw new d(`The Build Output was created with mode "${t}", but this command requested mode "${e}". To use the existing Build Output, rerun with "--mode ${t}". To deploy in ${e} mode, rebuild with "--mode ${e}" before deploying.`)}}const p={type:`string`,description:`Name of the Worker in the Build Output to use (defaults to the default Worker)`,requiresArg:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--worker can only be specified once.`);return e}};function m(e,t){if(t===void 0)return e.default;let n=Object.values(e).filter(e=>e.config.name===t);if(n.length>1)throw new d(`The Build Output contains more than one Worker named "${t}".`);if(n[0]!==void 0)return n[0];let{default:r,...i}=e;throw new d(`The Build Output has no Worker named "${t}". Available Workers: ${[`${r.config.name} (default)`,...Object.values(i).map(e=>e.config.name).sort()].join(`, `)}.`)}function h(e,t){let n=e.config,{buildContext:r,...i}=t,{manifest:a,...o}=n,s=u({...i,worker:o,containers:[]});n.manifest?.mainModule&&e.bundleDir&&(s.main=c.join(e.bundleDir,n.manifest.mainModule));let l=c.resolve(`cloudflare.config.ts`),{validationConfig:d,containerReferences:f}=_(s),p=g(d,e.configPath,l);v(p,f);let{containers:m,...h}=p;return{wranglerConfig:h,builtConfig:n}}function g(e,t,r){let{config:i,diagnostics:a}=n(e,t,r,{});if(a.hasErrors())throw new d(a.renderErrors());return a.hasWarnings()&&console.warn(a.renderWarnings()),i}function _(e){let{containers:t,...n}=e,r=new Map;return n.exports!==void 0&&(n.exports=Object.fromEntries(Object.entries(n.exports).map(([e,t])=>{if(!(`container`in t)||typeof t.container!=`string`)return[e,t];r.set(e,t.container);let{container:n,...i}=t;return[e,i]}))),{validationConfig:n,containerReferences:r}}function v(e,t){e.exports===void 0||t.size===0||(e.exports=Object.fromEntries(Object.entries(e.exports).map(([e,n])=>{let r=t.get(e);return[e,r===void 0?n:{...n,container:r}]})))}function y(e){return e}async function b(n,{worker:c,...u}={},d={}){let f=u.output??`stdout`,p=process.cwd(),{details:g,configuration:_}=await a(p,u),v=_?.buildCommand??g?.buildCommand,y={...g?.env,...d.isPreview?{CLOUDFLARE_PREVIEW_BUILD:`true`}:{}};if(v&&n&&!g?.framework?.supportsMode)throw Error(`The detected command \`${v}\` does not currently support \`--mode\`.`);f!==`silent`&&r.message(e.bold(`Build`),{symbol:e.muted(`├`),spacing:0,output:f===`stderr`?process.stderr:void 0});let b=n?[`--mode`,n]:[],S;if(v)S=await i(v,p,{...u,env:y,args:b});else{let e=o(p);f!==`silent`&&r.message(`Delegating to ${x(e)}`,{spacing:0,output:f===`stderr`?process.stderr:void 0}),S=await s(e,`build`,b,{...u,env:y})}if(S.exitCode!==0||S.signal)throw new t(S.exitCode,{signal:S.signal});let{workers:C,rootConfig:w}=await l(p);h(m(C,c),w),f!==`silent`&&r.success(`Build complete`,{spacing:0,output:f===`stderr`?process.stderr:void 0})}function x(e){switch(e.impl.pkg){case`@cloudflare/vite-plugin`:return`Vite`;case`wrangler`:return`Wrangler`;case`cloudflare-py-dev-server`:return`the Python dev server`;case`cloudflare-rs-dev-server`:return`the Rust dev server`;default:return e.impl.pkg}}const S={command:`build`,describe:`Build a project for Cloudflare`,builder:y,handler:async e=>{await b(e.mode)}};export{m as a,h as i,b as n,f as o,p as r,d as s,S as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-
|
|
2
|
+
import{t as e}from"./local-B3OyWKkW.mjs";import{a as t,t as n}from"./context-CPVzoKbN.mjs";import{r}from"./auth-B_Utev-x.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DS2fwfNP.mjs";import{t as s}from"./run-CJ-6owN3.mjs";import"./telemetry-D2UwfCd1.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-doX80PCd.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 builds cancel <build-uuid>
|
|
3
3
|
|
|
4
4
|
Cancel a queued or running build.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`cancel <build-uuid>`,describe:`Cancel a Workers build`,builder:h,handler:async c=>s({command:`builds cancel`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf builds cancel`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/builds/builds/${c[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(c[`build-uuid`]))}/cancel`,pathParams:{"build-uuid":String(c[`build-uuid`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Updating`,async()=>s.builds.cancel({account_id:l,build_uuid:c[`build-uuid`]})),{successLabel:`Updated`})})};function te(e){return e.usage(`$0 builds create <trigger-uuid>
|
|
5
5
|
|